Plugin Directory

Changeset 3235108


Ignore:
Timestamp:
02/05/2025 03:18:25 AM (14 months ago)
Author:
arraycodes
Message:

Version 4.6.0

Location:
datalayer-for-ecommerce-free
Files:
2 added
12 edited

Legend:

Unmodified
Added
Removed
  • datalayer-for-ecommerce-free/assets/icon-svg.svg

    r2758905 r3235108  
    1 <?xml version="1.0" encoding="UTF-8"?><svg id="Camada_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 187.54 225.8"><defs><style>.cls-1{letter-spacing:-.02em;}.cls-2{fill:#f6f6f6;}.cls-3{fill:#008aff;}.cls-4{fill:#2abda3;}.cls-5{fill:#0983db;}.cls-6{fill:#d1340f;}.cls-7{letter-spacing:-.04em;}.cls-8{fill:#ad5c91;}.cls-9{fill:#008afd;}.cls-10{letter-spacing:.03em;}.cls-11{fill:#fbfbfb;}.cls-12{font-size:13.52px;letter-spacing:.01em;}.cls-12,.cls-13{font-family:Roboto-Bold, Roboto;}.cls-14{letter-spacing:.04em;}.cls-15{fill:#ad5d91;}.cls-13{font-size:32.34px;}.cls-16{fill:#e74514;}.cls-17{fill:#fff;font-family:Roboto-Black, Roboto;font-size:21.15px;}.cls-18{fill:#1da288;}.cls-19{fill:#fcfcfc;}</style></defs><g><path class="cls-16" d="M147.28,78.61l-20.53-9.91-31.59,15.25c-1.06,.51-2.29,.51-3.35,0l-31.59-15.25-20.53,9.91c-2.9,1.4-2.9,5.53,0,6.94l52.12,25.16c1.06,.51,2.29,.51,3.35,0l52.12-25.16c2.9-1.4,2.9-5.53,0-6.94Z"/><g><path class="cls-6" d="M60.89,73.84h0l26.06,12.58c1.06,.51,2.29,.51,3.35,0l36.58-17.66-.13-.06-31.59,15.25c-1.06,.51-2.29,.51-3.35,0-.96-.46-30-14.48-31.59-15.25h0l-4.99,2.41h0l5.66,2.73Z"/><path class="cls-6" d="M44.36,82.75s-3.99-1.64-4.47-4.23l-.2,.1c-.45,.22-.84,.5-1.15,.84-1.68,1.79-1.3,4.92,1.15,6.1,1.08,.52,46.53,22.46,52.12,25.16,1.03,.5,2.27,.52,3.35,0l3.56-1.72-54.36-26.24Z"/></g><path class="cls-9" d="M147.28,52.08l-20.53-9.91-31.59,15.25c-1.06,.51-2.29,.51-3.35,0l-31.59-15.25-20.53,9.91c-2.9,1.4-2.9,5.53,0,6.94l52.12,25.16c1.06,.51,2.29,.51,3.35,0l52.12-25.16c2.9-1.4,2.9-5.53,0-6.94Z"/><path class="cls-4" d="M91.81,.38L39.69,25.54c-2.9,1.4-2.9,5.54,0,6.94l52.12,25.16c1.06,.51,2.29,.51,3.35,0l52.12-25.16c2.9-1.4,2.9-5.54,0-6.94L95.16,.38c-1.06-.51-2.29-.51-3.35,0Z"/><path class="cls-18" d="M38.87,26.08c-2.05,1.72-1.77,5.15,.82,6.41l52.12,25.16c1.06,.51,2.29,.51,3.35,0l3.56-1.72L44.36,29.68s-3.7-1.54-5.49-3.61Z"/><g><path class="cls-5" d="M60.89,47.31h0l26.06,12.58c1.06,.51,2.29,.51,3.35,0l36.58-17.66-.13-.06-31.59,15.25c-1.06,.51-2.29,.51-3.35,0-.96-.46-30-14.48-31.59-15.25h0l-4.99,2.41h0l5.66,2.73Z"/><path class="cls-5" d="M44.36,56.22s-3.99-1.64-4.47-4.23l-.2,.1c-.45,.22-.84,.5-1.15,.84-1.68,1.79-1.3,4.92,1.15,6.1l44.5,21.48,7.62,3.68c.98,.47,2.22,.54,3.35,0l3.56-1.72-54.36-26.24Z"/></g></g><g><text class="cls-12"><tspan x="13.59" y="176.05">FOR</tspan></text><g><path class="cls-8" d="M79.65,186.78c-.76-.42-1.53-.84-2.29-1.26-1.57-.87-3.14-1.74-4.7-2.62-.19-.1-.37-.15-.58-.15-5.24,0-10.47,0-15.71,0-1.88,0-3.39-1.22-3.81-3.05-.07-.31-.1-.63-.1-.95,0-4.23,0-8.45,0-12.68,0-2.32,1.68-3.99,4.01-3.99,11.21,0,22.42,0,33.63,0,2.3,0,4,1.68,4,3.97,0,4.25,0,8.5,0,12.75,0,2.26-1.69,3.94-3.95,3.95-3.89,0-7.78,0-11.68,0-.41,0-.41,0-.26,.38,.49,1.2,.98,2.39,1.47,3.59l-.05,.06Zm-12.81-12.39c-.08-.18-.13-.27-.16-.36-.49-1.32-.87-2.67-1.18-4.05-.14-.62-.21-1.26-.42-1.86-.36-1.04-1.44-1.24-2.18-.42-.17,.19-.29,.41-.41,.63-1.16,2.2-2.31,4.4-3.47,6.6-.05,.1-.08,.22-.22,.31-.14-.6-.28-1.18-.4-1.75-.52-2.38-.93-4.78-1.3-7.19-.07-.43-.19-.84-.6-1.05-.54-.28-1.11-.25-1.63,.07-.5,.31-.68,.82-.6,1.39,.47,3.15,1.02,6.29,1.76,9.39,.31,1.29,.61,2.59,1.16,3.8,.52,1.15,1.27,1.24,2.12,.3,.43-.47,.79-1,1.1-1.56,.94-1.71,1.75-3.49,2.65-5.22,.07-.13,.13-.25,.22-.42,.04,.14,.07,.22,.1,.31,.58,1.91,1.31,3.75,2.45,5.4,.44,.64,.91,1.26,1.51,1.75,.9,.74,1.89,.38,2.13-.75,.1-.46,0-.9,0-1.36,.02-2.42,.33-4.82,.77-7.2,.3-1.6,.64-3.18,1.38-4.65,.4-.8,.14-1.6-.63-1.99-.75-.38-1.53-.12-1.95,.67-.37,.69-.65,1.42-.89,2.17-.71,2.26-1.04,4.59-1.32,7.03Zm14.45-2.73c.02-.9-.12-1.76-.43-2.6-1.2-3.29-5.31-3.8-7.35-1.24-1.75,2.18-2.33,4.66-1.83,7.38,.22,1.21,.77,2.29,1.81,3.02,1.7,1.17,4.25,1.14,5.88-.93,1.3-1.65,1.91-3.53,1.92-5.62Zm10.67,.22c.03-.44,0-1.02-.1-1.59-.2-1.18-.64-2.26-1.56-3.07-1.7-1.5-4.28-1.39-5.85,.31-2.01,2.18-2.63,4.79-2.1,7.68,.21,1.14,.71,2.16,1.66,2.89,1.6,1.24,4.31,1.39,6.06-.86,1.19-1.54,1.81-3.29,1.89-5.37Z"/><path d="M122.39,173.03c.4-2.02,.88-4.01,1.35-6,.05-.21,.13-.27,.34-.27,1.17,0,2.34,.01,3.52,0,.23,0,.29,.09,.31,.28,.37,2.77,.74,5.53,1.11,8.3,.12,.91,.24,1.82,.38,2.73,.03,.2,.02,.28-.22,.28-.86-.01-1.73-.01-2.59,0-.2,0-.28-.06-.3-.26-.25-2.5-.51-4.99-.78-7.51-.15,.13-.14,.32-.17,.47-.58,2.34-1.15,4.69-1.71,7.03-.05,.2-.12,.28-.34,.27-.52-.02-1.05-.02-1.57,0-.23,0-.31-.08-.36-.29-.59-2.34-1.18-4.68-1.78-7.02-.03-.12-.04-.24-.19-.37-.07,.71-.15,1.37-.21,2.03-.18,1.81-.37,3.61-.54,5.42-.02,.19-.09,.22-.25,.22-.83,0-1.66,0-2.49,0-.21,0-.24-.06-.22-.25,.2-1.53,.39-3.06,.59-4.59,.26-2.06,.53-4.12,.79-6.18,.07-.56,.06-.56,.6-.56,1.05,0,2.09,0,3.14,0,.23,0,.31,.07,.35,.29,.41,1.91,.83,3.81,1.17,5.73,.02,.09,.04,.17,.06,.26Z"/><path d="M133.58,170.58c-.11,1.07-.22,2.14-.33,3.22-.14,1.43-.29,2.87-.42,4.3-.02,.19-.09,.25-.27,.24-.83,0-1.66,0-2.49,0-.21,0-.23-.06-.21-.26,.41-3.15,.81-6.3,1.21-9.45,.07-.54,.15-1.08,.2-1.62,.02-.21,.11-.26,.3-.26,1.14,0,2.28,.02,3.41,0,.28,0,.31,.13,.35,.33,.42,1.92,.83,3.83,1.18,5.76,0,.05,0,.11,.09,.16,.13-.65,.24-1.29,.38-1.92,.3-1.36,.62-2.72,.92-4.08,.04-.19,.11-.25,.31-.25,1.17,0,2.34,0,3.52,0,.21,0,.28,.05,.31,.28,.44,3.29,.89,6.59,1.34,9.88,.05,.37,.09,.74,.15,1.11,.05,.26-.04,.32-.29,.32-.83-.02-1.66-.01-2.49,0-.2,0-.29-.03-.31-.26-.16-1.66-.34-3.32-.52-4.98-.09-.82-.17-1.64-.27-2.54-.17,.31-.2,.59-.26,.85-.54,2.2-1.07,4.4-1.59,6.61-.05,.23-.14,.33-.4,.32-.5-.03-1-.02-1.5,0-.25,.01-.32-.08-.38-.31-.6-2.38-1.21-4.76-1.81-7.15-.03-.11-.06-.21-.09-.32h-.06Z"/><path d="M115.41,172.51c-.02,.94-.11,1.88-.4,2.78-.73,2.26-2.57,3.49-4.95,3.33-.59-.04-1.18-.12-1.73-.33-1.17-.44-2-1.27-2.45-2.41-.84-2.14-.9-4.32-.13-6.49,.65-1.82,2.24-2.89,4.18-2.95,.85-.02,1.68,.05,2.48,.37,1.53,.62,2.35,1.83,2.75,3.37,.2,.76,.25,1.54,.27,2.33Zm-6.84-.05c.01,.85,.02,1.62,.24,2.37,.16,.54,.46,.96,1.04,1.11,.89,.23,1.69-.24,1.95-1.19,.27-.97,.31-1.97,.24-2.97-.04-.59-.12-1.17-.37-1.72-.22-.49-.55-.86-1.11-.95-.8-.13-1.37,.22-1.68,1.04-.29,.77-.31,1.57-.31,2.31Z"/><path d="M160.75,178.34c-1.08,0-2.1,0-3.12,0-.2,0-.24-.13-.3-.26-.75-1.55-1.49-3.1-2.24-4.65-.05-.1-.1-.19-.21-.28v.32c0,1.51,0,3.02,0,4.53,0,.25-.04,.36-.33,.35-.85-.02-1.71-.02-2.56,0-.22,0-.26-.06-.26-.27,0-3.68,0-7.36,0-11.04,0-.19,.02-.28,.25-.28,1.38,.02,2.75-.04,4.13,.04,.87,.05,1.7,.26,2.46,.72,2.14,1.3,2.1,4.25-.08,5.47-.2,.11-.21,.19-.12,.39,.74,1.53,1.47,3.06,2.21,4.59,.05,.1,.09,.2,.17,.36Zm-5.9-7.97c0,.38,0,.77,0,1.15,0,.12,0,.23,.17,.21,.44-.03,.88-.06,1.29-.26,.44-.22,.65-.58,.62-1.07-.04-.72-.37-1.12-1.08-1.29-.25-.06-.51-.07-.77-.12-.18-.03-.24,.04-.23,.22,.01,.38,0,.77,0,1.15Z"/><path d="M169.03,172.53c0-1.82,0-3.63,0-5.45,0-.23,.02-.33,.3-.33,1.91,.01,3.82,.01,5.73,0,.26,0,.33,.06,.32,.32-.02,.62-.02,1.25,0,1.87,0,.25-.08,.3-.31,.3-.88-.01-1.75,0-2.63-.01-.25,0-.3,.07-.29,.3,.02,.5,.02,1,0,1.5-.02,.29,.09,.33,.34,.33,.73-.02,1.46,0,2.18,0,.19,0,.25,.05,.25,.25-.01,.64-.02,1.27,0,1.91,0,.23-.08,.25-.27,.25-.75-.01-1.5,0-2.25,0-.19,0-.25,.05-.25,.24,.01,.53,.01,1.07,0,1.6,0,.22,.05,.29,.28,.28,.9-.01,1.8,0,2.7-.01,.22,0,.27,.06,.26,.27-.01,.65-.01,1.29,0,1.94,0,.2-.03,.27-.25,.27-1.95-.01-3.89-.01-5.84,0-.24,0-.27-.08-.27-.29,0-1.84,0-3.68,0-5.52Z"/><path d="M144.49,172.52c0-1.79,0-3.59,0-5.38,0-.27,.04-.36,.34-.36,1.89,.02,3.78,.01,5.67,0,.28,0,.34,.08,.33,.34-.02,.61-.02,1.23,0,1.84,0,.23-.05,.31-.29,.3-.88-.02-1.75,0-2.63-.01-.21,0-.29,.04-.28,.27,.02,.52,.02,1.05,0,1.57,0,.21,.04,.29,.27,.29,.75-.02,1.5,0,2.25-.01,.19,0,.25,.04,.25,.24-.01,.65-.01,1.29,0,1.94,0,.19-.06,.22-.23,.22-.75,0-1.5,0-2.25,0-.22,0-.3,.04-.29,.28,.02,.52,.02,1.05,0,1.57,0,.22,.06,.29,.28,.28,.88-.01,1.75,0,2.63-.01,.26,0,.33,.07,.32,.32-.02,.64-.01,1.27,0,1.91,0,.19-.05,.26-.25,.26-1.96,0-3.91,0-5.87,0-.29,0-.24-.16-.24-.33,0-1.84,0-3.68,0-5.52Z"/><path d="M168.15,169.41c-.36-.06-.69-.12-1.02-.18-2.18-.38-3.35,1.23-3.48,2.82-.06,.71,0,1.41,.27,2.07,.52,1.23,1.73,1.9,3.1,1.71,.37-.05,.74-.13,1.13-.2,0,.87,0,1.73,0,2.59,0,.14-.08,.16-.18,.19-3.15,.83-6.79-.66-7.54-4.47-.31-1.55-.23-3.09,.56-4.5,1.05-1.86,2.69-2.83,4.82-2.97,.67-.04,1.34,0,2,.13,.23,.04,.34,.11,.33,.38-.02,.8,0,1.61,0,2.43Z"/><path d="M104.57,175.63c0,.87,0,1.71,0,2.55,0,.14-.05,.19-.18,.23-3.15,.83-6.8-.66-7.54-4.5-.29-1.53-.22-3.04,.55-4.43,1.05-1.89,2.71-2.87,4.87-3.01,.68-.04,1.36,.02,2.04,.14,.19,.04,.27,.11,.27,.33-.02,.74-.02,1.48,0,2.21,0,.26-.08,.27-.29,.22-.59-.15-1.19-.26-1.79-.16-1.23,.19-1.94,.98-2.29,2.11-.25,.81-.23,1.64,0,2.45,.42,1.45,1.71,2.28,3.22,2.06,.37-.05,.74-.13,1.13-.2Z"/><path class="cls-19" d="M66.84,174.4c.28-2.44,.6-4.77,1.32-7.03,.24-.75,.52-1.48,.89-2.17,.42-.79,1.2-1.05,1.95-.67,.77,.39,1.04,1.2,.63,1.99-.74,1.47-1.09,3.05-1.38,4.65-.44,2.38-.75,4.77-.77,7.2,0,.45,.1,.9,0,1.36-.24,1.13-1.24,1.49-2.13,.75-.6-.5-1.07-1.11-1.51-1.75-1.13-1.66-1.86-3.5-2.45-5.4-.03-.09-.05-.17-.1-.31-.09,.17-.15,.29-.22,.42-.9,1.73-1.71,3.51-2.65,5.22-.31,.56-.67,1.08-1.1,1.56-.85,.94-1.6,.84-2.12-.3-.55-1.21-.86-2.51-1.16-3.8-.73-3.1-1.28-6.24-1.76-9.39-.09-.57,.09-1.08,.6-1.39,.52-.32,1.09-.35,1.63-.07,.41,.21,.53,.62,.6,1.05,.37,2.41,.77,4.81,1.3,7.19,.13,.57,.26,1.15,.4,1.75,.14-.09,.17-.21,.22-.31,1.16-2.2,2.32-4.4,3.47-6.6,.12-.22,.24-.44,.41-.63,.74-.82,1.82-.62,2.18,.42,.21,.6,.28,1.24,.42,1.86,.31,1.37,.69,2.73,1.18,4.05,.03,.09,.08,.18,.16,.36Z"/><path class="cls-19" d="M81.29,171.66c-.01,2.09-.62,3.97-1.92,5.62-1.63,2.07-4.18,2.1-5.88,.93-1.05-.73-1.59-1.81-1.81-3.02-.5-2.72,.09-5.2,1.83-7.38,2.05-2.55,6.15-2.05,7.35,1.24,.31,.84,.45,1.71,.43,2.6Zm-6.93,1.62c-.03,.74,.14,1.48,.54,2.15,.41,.69,1,.82,1.68,.4,.53-.32,.92-.77,1.21-1.31,.46-.86,.66-1.79,.66-2.75,0-.75-.17-1.47-.57-2.11-.42-.66-1.08-.79-1.73-.35-.18,.12-.34,.27-.48,.43-.83,1.02-1.31,2.17-1.3,3.54Z"/><path class="cls-19" d="M91.96,171.88c-.08,2.08-.69,3.83-1.89,5.37-1.75,2.25-4.47,2.1-6.06,.86-.94-.73-1.45-1.75-1.66-2.89-.52-2.88,.1-5.5,2.1-7.68,1.56-1.7,4.14-1.8,5.85-.31,.92,.81,1.36,1.88,1.56,3.07,.1,.57,.13,1.15,.1,1.59Zm-6.93,1.39c-.02,.76,.15,1.47,.53,2.13,.4,.7,1.01,.85,1.7,.43,.55-.33,.95-.81,1.24-1.38,.46-.92,.66-1.91,.62-2.93-.03-.68-.22-1.32-.59-1.9-.38-.59-.99-.74-1.6-.39-.27,.16-.49,.37-.68,.61-.79,1.01-1.23,2.14-1.22,3.42Z"/><path class="cls-11" d="M108.57,172.46c0-.73,.02-1.54,.31-2.31,.31-.82,.88-1.18,1.68-1.04,.56,.09,.89,.46,1.11,.95,.25,.55,.33,1.13,.37,1.72,.06,1,.03,2-.24,2.97-.26,.95-1.06,1.42-1.95,1.19-.58-.15-.88-.57-1.04-1.11-.22-.75-.22-1.52-.24-2.37Z"/><path class="cls-2" d="M154.85,170.37c0-.38,0-.77,0-1.15,0-.18,.06-.25,.23-.22,.26,.04,.52,.06,.77,.12,.71,.16,1.04,.56,1.08,1.29,.03,.49-.17,.85-.62,1.07-.41,.2-.85,.23-1.29,.26-.18,.01-.17-.09-.17-.21,0-.38,0-.77,0-1.15Z"/><path class="cls-15" d="M74.36,173.28c0-1.37,.47-2.52,1.3-3.54,.14-.17,.3-.31,.48-.43,.65-.44,1.31-.32,1.73,.35,.41,.64,.57,1.36,.57,2.11,0,.96-.2,1.89-.66,2.75-.29,.54-.68,.99-1.21,1.31-.68,.41-1.27,.28-1.68-.4-.4-.67-.57-1.4-.54-2.15Z"/><path class="cls-15" d="M85.03,173.27c0-1.28,.44-2.41,1.22-3.42,.19-.24,.41-.46,.68-.61,.61-.35,1.22-.21,1.6,.39,.37,.58,.56,1.22,.59,1.9,.04,1.02-.15,2.01-.62,2.93-.29,.57-.69,1.04-1.24,1.38-.69,.42-1.3,.27-1.7-.43-.37-.65-.54-1.37-.53-2.13Z"/></g></g><text class="cls-13" transform="translate(.56 153.2)"><tspan class="cls-10" x="0" y="0">D</tspan><tspan class="cls-1" x="22.15" y="0">AT</tspan><tspan class="cls-10" x="62.39" y="0">A</tspan><tspan class="cls-14" x="85.29" y="0">L</tspan><tspan class="cls-7" x="104.23" y="0">A</tspan><tspan class="cls-10" x="124.76" y="0">YER</tspan></text><g id="Rectangle_1"><rect class="cls-3" x="45.66" y="194.32" width="88.72" height="31.48" rx="3" ry="3"/></g><text class="cls-17" transform="translate(63.98 218.29)"><tspan x="0" y="0">FREE</tspan></text></svg>
     1<?xml version="1.0" encoding="UTF-8"?>
     2<svg id="Camada_2" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 116 116">
     3  <!-- Generator: Adobe Illustrator 29.2.1, SVG Export Plug-In . SVG Version: 2.1.0 Build 116)  -->
     4  <defs>
     5    <style>
     6      .st0 {
     7        fill: #008cff;
     8      }
     9
     10      .st1 {
     11        fill: #26bfa5;
     12      }
     13
     14      .st2 {
     15        fill: #1ba58a;
     16      }
     17
     18      .st3, .st4 {
     19        isolation: isolate;
     20      }
     21
     22      .st5 {
     23        fill: #d3340f;
     24      }
     25
     26      .st6 {
     27        fill: #e94514;
     28      }
     29
     30      .st7 {
     31        fill: #0385dd;
     32      }
     33
     34      .st4 {
     35        fill: #fff;
     36        font-family: Roboto-Bold, Roboto;
     37        font-size: 12.4px;
     38        font-weight: 700;
     39      }
     40    </style>
     41  </defs>
     42  <g id="icon">
     43    <g>
     44      <g>
     45        <path class="st6" d="M90.4,58.2l-12.4-6-19,9.2c-.6.3-1.4.3-2,0l-19-9.2-12.4,6c-1.8.8-1.8,3.3,0,4.2l31.4,15.2c.6.3,1.4.3,2,0l31.4-15.2c1.8-.8,1.8-3.3,0-4.2Z"/>
     46        <g>
     47          <path class="st5" d="M38.3,55.3h0l15.7,7.6c.6.3,1.4.3,2,0l22.1-10.7h0s-19,9.2-19,9.2c-.6.3-1.4.3-2,0-.6-.3-18.1-8.7-19-9.2h0l-3,1.5h0l3.4,1.7h0Z"/>
     48          <path class="st5" d="M28.4,60.7s-2.4-1-2.7-2.5h-.1c-.3.2-.5.4-.7.6-1,1.1-.8,3,.7,3.7.6.3,28.1,13.5,31.4,15.2.6.3,1.4.3,2,0l2.2-1s-32.8-15.8-32.8-15.8Z"/>
     49        </g>
     50        <path class="st0" d="M90.4,42.2l-12.4-6-19,9.2c-.6.3-1.4.3-2,0l-19-9.2-12.4,6c-1.8.8-1.8,3.3,0,4.2l31.4,15.2c.6.3,1.4.3,2,0l31.4-15.2c1.8-.8,1.8-3.3,0-4.2Z"/>
     51        <path class="st1" d="M57,11l-31.4,15.2c-1.8.8-1.8,3.3,0,4.2l31.4,15.2c.6.3,1.4.3,2,0l31.4-15.2c1.8-.8,1.8-3.3,0-4.2l-31.4-15.2c-.6-.3-1.4-.3-2,0Z"/>
     52        <path class="st2" d="M25.1,26.5c-1.2,1-1.1,3.1.5,3.9l31.4,15.2c.6.3,1.4.3,2,0l2.2-1-32.8-15.8s-2.2-.9-3.3-2.2Z"/>
     53        <g>
     54          <path class="st7" d="M38.3,39.3h0l15.7,7.6c.6.3,1.4.3,2,0l22.1-10.7h0s-19,9.2-19,9.2c-.6.3-1.4.3-2,0-.6-.3-18.1-8.7-19-9.2h0l-3,1.5h0l3.4,1.7h0Z"/>
     55          <path class="st7" d="M28.4,44.7s-2.4-1-2.7-2.5h-.1c-.3.2-.5.4-.7.6-1,1.1-.8,3,.7,3.7l26.8,13,4.6,2.2c.6.3,1.3.3,2,0l2.2-1s-32.8-15.8-32.8-15.8Z"/>
     56        </g>
     57      </g>
     58      <g>
     59        <rect class="st0" x="38.4" y="85.8" width="39.2" height="18.5" rx="2.5" ry="2.5"/>
     60        <g class="st3">
     61          <text class="st4" transform="translate(45.5 99.3)"><tspan x="0" y="0">F</tspan></text>
     62          <text class="st4" transform="translate(52.1 99.3)"><tspan x="0" y="0">ree</tspan></text>
     63        </g>
     64      </g>
     65    </g>
     66  </g>
     67</svg>
  • datalayer-for-ecommerce-free/trunk/assets/build/index.asset.php

    r3177578 r3235108  
    1 <?php return array('dependencies' => array('react', 'wc-components', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-primitives'), 'version' => '91a98d35e021df019dc19e46d93a6ebe');
     1<?php return array('dependencies' => array('react', 'wc-components', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-primitives'), 'version' => '1231c4f5930d9f309d2c');
     2
  • datalayer-for-ecommerce-free/trunk/assets/build/index.css

    r3177578 r3235108  
    1 :root body.woocommerce-admin-page__datalayer-for-ecommerce-free{--wp-admin-theme-color:#008bff;--wp-admin-theme-color-darker-10:#008bff;--wp-admin-theme-color-darker-20:#008bff}body.woocommerce-admin-page__datalayer-for-ecommerce-free{background:#f7f7f7}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free{-ms-flex-line-pack:stretch;-webkit-align-content:stretch;align-items:flex-start;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap{background:#fff;border-bottom-right-radius:30px;border-top-right-radius:30px;box-shadow:10px 17px 21px 0 rgba(0,0,0,.1);min-height:764px;padding:50px 50px 0;width:82%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .my-gutenberg-form{padding-bottom:100px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-section-header{padding-left:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-section-header .woocommerce-section-header__title{font-size:22px;line-height:4.2}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control{margin-bottom:30px!important;white-space:pre-wrap}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated{position:relative}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated{background:red;border-radius:5px;font-size:11px;padding:5px;position:absolute;right:63%;top:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated a,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated a:visited{color:#fff;font-weight:700;text-decoration:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control .components-base-control__field .components-base-control__label,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control .components-base-control__field label{font-size:14px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control p.components-base-control__help{color:#74797e}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons .components-button{border-radius:6px;font-size:15px;padding:0 20px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons .components-button:hover{opacity:.8}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary{border:1px solid #008bff;border-radius:6px;box-shadow:none;font-size:15px;padding:0 20px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:active,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:focus{border:1px solid #008bff;box-shadow:none;color:#008bff}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:hover{opacity:.8}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .css-off1bd{flex-direction:column}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function{margin-top:30px;position:relative}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function .components-base-control,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function .form-fields-button,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function table.wp-list-table{opacity:.5}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function{background:#fec228;border-radius:6px;color:#fff;display:inline-block;font-size:20px;font-weight:700;margin-bottom:25px;padding:20px;text-align:center}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function .components-external-link__contents{text-decoration:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function svg{display:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap{background:#fbfbfb;border-bottom-left-radius:30px;border-right:1px solid #eaebee;border-top-left-radius:30px;box-shadow:0 17px 21px 0 rgba(0,0,0,.1);min-height:720px;padding:28px 20px;width:18%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .logoDatalayer{text-align:center}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .logoDatalayer img{width:120px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel{background:transparent;border:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle{font-size:16px!important;font-weight:700!important;padding:18px 48px 18px 35px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle:focus{box-shadow:inset 0 0 0 2px #e1f1fa}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle svg.components-panel__icon{height:25px;left:0;margin:0;position:absolute;width:25px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__body.is-opened>.components-panel__body-title{margin:-16px -16px 0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr{margin-bottom:2px;margin-top:2px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o.is-active{background:#e1f1fa;color:#74797e;font-weight:700}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o.is-active .components-button span{font-weight:500}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o:hover{background:#e1f1fa}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item .components-button{color:#74797e;opacity:1}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item .components-button:focus:not(:disabled){box-shadow:0 0 0 2px #e1f1fa}
     1:root body.woocommerce-admin-page__datalayer-for-ecommerce-free{--wp-admin-theme-color:#008bff;--wp-admin-theme-color-darker-10:#008bff;--wp-admin-theme-color-darker-20:#008bff}body.woocommerce-admin-page__datalayer-for-ecommerce-free{background:#f7f7f7}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free{-webkit-align-content:stretch;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;-ms-flex-line-pack:stretch;align-items:flex-start}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap{background:#fff;border-bottom-right-radius:30px;border-top-right-radius:30px;box-shadow:10px 17px 21px 0 rgba(0,0,0,.1);min-height:764px;padding:50px 50px 0;width:82%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .my-gutenberg-form{padding-bottom:100px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-section-header{padding-left:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-section-header .woocommerce-section-header__title{font-size:22px;line-height:4.2}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control{margin-bottom:30px!important;white-space:pre-wrap}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated{position:relative}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated{background:red;border-radius:5px;font-size:11px;padding:5px;position:absolute;right:63%;top:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated a,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated a:visited{color:#fff;font-weight:700;text-decoration:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control .components-base-control__field .components-base-control__label,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control .components-base-control__field label{font-size:14px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control p.components-base-control__help{color:#74797e}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons .components-button{border-radius:6px;font-size:15px;padding:0 20px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons .components-button:hover{opacity:.8}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary{border:1px solid #008bff;border-radius:6px;box-shadow:none;font-size:15px;padding:0 20px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:active,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:focus{border:1px solid #008bff;box-shadow:none;color:#008bff}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:hover{opacity:.8}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .css-off1bd{flex-direction:column}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function{margin-top:30px;position:relative}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function .components-base-control,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function .form-fields-button,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function table.wp-list-table{opacity:.5}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function{background:#fec228;border-radius:6px;color:#fff;display:inline-block;font-size:20px;font-weight:700;margin-bottom:25px;padding:20px;text-align:center}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function .components-external-link__contents{text-decoration:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function svg{display:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap{background:#fbfbfb;border-bottom-left-radius:30px;border-right:1px solid #eaebee;border-top-left-radius:30px;box-shadow:0 17px 21px 0 rgba(0,0,0,.1);min-height:720px;padding:28px 20px;width:18%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .logoDatalayer{text-align:center}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .logoDatalayer img{width:120px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel{background:transparent;border:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle{font-size:16px!important;font-weight:700!important;padding:18px 48px 18px 35px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle:focus{box-shadow:inset 0 0 0 2px #e1f1fa}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle svg.components-panel__icon{height:25px;left:0;margin:0;position:absolute;width:25px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__body.is-opened>.components-panel__body-title{margin:-16px -16px 0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr{margin-bottom:2px;margin-top:2px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o.is-active{background:#e1f1fa;color:#74797e;font-weight:700}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o.is-active .components-button span{font-weight:500}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o:hover{background:#e1f1fa}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item .components-button{color:#74797e;opacity:1}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item .components-button:focus:not(:disabled){box-shadow:0 0 0 2px #e1f1fa}
  • datalayer-for-ecommerce-free/trunk/assets/build/index.js

    r3177578 r3235108  
    1 !function(){"use strict";var e={n:function(a){var t=a&&a.__esModule?function(){return a.default}:function(){return a};return e.d(t,{a:t}),t},d:function(a,t){for(var r in t)e.o(t,r)&&!e.o(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:t[r]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},function(){var a;e.g.importScripts&&(a=e.g.location+"");var t=e.g.document;if(!a&&t&&(t.currentScript&&(a=t.currentScript.src),!a)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&!a;)a=r[o--].src}if(!a)throw new Error("Automatic publicPath is not supported in this browser");a=a.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=a}();var a=window.wp.hooks,t=window.wp.i18n,r=window.React,o=window.wp.element,_=window.wp.data,l=window.wp.components,n=window.wp.notices,c=window.wc.components,m=e=>{const{createSuccessNotice:a,createErrorNotice:m}=(0,_.useDispatch)(n.store),g=(0,_.useDispatch)(),[s,d]=(0,o.useState)(!1),{getFields:i,isLoading:p}=(0,_.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[u,y]=(0,o.useState)({tracking_google_tag_manager:"",data_layer_google_tag_manager_custom_domain_server_side:"",data_layer_google_tag_manager_custom_script_filename_server_side:"",data_layer_google_tag_manager_custom_environment_gtm_auth:"",data_layer_google_tag_manager_custom_environment_gtm_preview:""}),f=(0,o.useCallback)(((e,a)=>{y((t=>({...t,[a]:e})))}),[]),h=(0,_.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,o.useEffect)((()=>{i&&y(i)}),[i]);const v=(0,r.createElement)(r.Fragment,null,(0,t.__)("Example: GTM-XXXXXX - ","datalayer-for-ecommerce-free"),(0,r.createElement)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/6103696"},"Read more")),E=(0,r.createElement)(r.Fragment,null,(0,t.__)("Example: https://DOMAIN-NAME.com - Send Google scripts gtm.js directly from your tagging server - ","datalayer-for-ecommerce-free"),(0,r.createElement)(l.ExternalLink,{href:"https://developers.google.com/tag-platform/tag-manager/server-side/send-data?hl=en#update_the_gtmjs_source_domain"},"Read more"),"\n",(0,t.__)("Leave empty if you don't use GTM Server Side","datalayer-for-ecommerce-free")),b=(0,r.createElement)(r.Fragment,null,(0,t.__)("Example: filename.js - Enter a custom name for the file gtm.js","datalayer-for-ecommerce-free"),"\n",(0,t.__)("Only use for custom file loader in your GTM Server Side","datalayer-for-ecommerce-free")),w=(0,r.createElement)(r.Fragment,null,(0,t.__)("Insert gtm_auth to use a custom environment - ","datalayer-for-woocommerce"),(0,r.createElement)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/6311518?hl=en"},"Read more"),"\n",(0,t.__)("Leave empty if you don't use GTM Custom Environment","datalayer-for-woocommerce")),S=(0,r.createElement)(r.Fragment,null,(0,t.__)("Insert gtm_preview to use a custom environment - ","datalayer-for-woocommerce"),(0,r.createElement)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/6311518?hl=en"},"Read more"),"\n",(0,t.__)("Leave empty if you don't use GTM Custom Environment","datalayer-for-woocommerce"));return(0,r.createElement)("div",{className:"my-gutenberg-form"},(0,r.createElement)(c.SectionHeader,{title:(0,t.__)("Google Tag Manager Settings","datalayer-for-ecommerce-free")}),p?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.TextControl,{label:(0,t.__)("Google Tag Manager ID","datalayer-for-ecommerce-free"),value:u.tracking_google_tag_manager,onChange:e=>f(e,"tracking_google_tag_manager"),help:v}),(0,r.createElement)("div",{className:"form-buttons"},(0,r.createElement)(l.Button,{onClick:async()=>{try{d(!0),await g("shop-datalayer-for-ecommerce-free").saveSettings({tracking_google_tag_manager:u.tracking_google_tag_manager,data_layer_google_tag_manager_custom_domain_server_side:u.data_layer_google_tag_manager_custom_domain_server_side,data_layer_google_tag_manager_custom_script_filename_server_side:u.data_layer_google_tag_manager_custom_script_filename_server_side,data_layer_google_tag_manager_custom_environment_gtm_auth:u.data_layer_google_tag_manager_custom_environment_gtm_auth,data_layer_google_tag_manager_custom_environment_gtm_preview:u.data_layer_google_tag_manager_custom_environment_gtm_preview},h),d(!1),a((0,t.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),m("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:s},s?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.Spinner,null),(0,t.__)("Saving","datalayer-for-ecommerce-free")):(0,t.__)("Save","datalayer-for-ecommerce-free"))),(0,r.createElement)("div",{className:"premium-function"},(0,r.createElement)("span",null,(0,r.createElement)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function"},"Unlock with Premium")),(0,r.createElement)(l.TextControl,{disabled:!0,label:(0,t.__)("Custom domain GTM Server Side","datalayer-for-ecommerce-free"),value:u.data_layer_google_tag_manager_custom_domain_server_side,onChange:e=>f(e,"data_layer_google_tag_manager_custom_domain_server_side"),help:E}),(0,r.createElement)(l.TextControl,{disabled:!0,label:(0,t.__)("Custom script filename GTM Server Side","datalayer-for-ecommerce-free"),value:u.data_layer_google_tag_manager_custom_script_filename_server_side,onChange:e=>f(e,"data_layer_google_tag_manager_custom_script_filename_server_side"),help:b}),(0,r.createElement)(l.TextControl,{disabled:!0,label:(0,t.__)("Custom Environment gtm_auth","datalayer-for-woocommerce"),value:u.data_layer_google_tag_manager_custom_environment_gtm_auth,onChange:e=>f(e,"data_layer_google_tag_manager_custom_environment_gtm_auth"),help:w}),(0,r.createElement)(l.TextControl,{disabled:!0,label:(0,t.__)("Custom Environment gtm_preview","datalayer-for-woocommerce"),value:u.data_layer_google_tag_manager_custom_environment_gtm_preview,onChange:e=>f(e,"data_layer_google_tag_manager_custom_environment_gtm_preview"),help:S}))):(0,r.createElement)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}}))},g=()=>(0,r.createElement)("div",{className:"my-gutenberg-form"},(0,r.createElement)(c.SectionHeader,{title:(0,t.__)("Google Tag Manager Tags Synchronization","datalayer-for-ecommerce-free")}),(0,r.createElement)("div",{className:"form-buttons"},(0,r.createElement)(l.Button,{variant:"primary",href:"https://demoshop.arrayevida.com.br/wp-content/uploads/2024/07/workspace.zip"},(0,t.__)("Download Import File GTM","datalayer-for-ecommerce-free")))),s=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,_.useDispatch)(n.store),m=(0,_.useDispatch)(),[g,s]=(0,o.useState)(!1),{getFields:d,isLoading:i}=(0,_.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[p,u]=(0,o.useState)({data_layer_google_tag_manager_consent_mode_default:"",data_layer_google_tag_manager_consent_mode_default_ad_storage:"",data_layer_google_tag_manager_consent_mode_default_ad_user_data:"",data_layer_google_tag_manager_consent_mode_default_ad_personalization:"",data_layer_google_tag_manager_consent_mode_default_analytics_storage:"",data_layer_google_tag_manager_consent_mode_default_functionality_storage:"",data_layer_google_tag_manager_consent_mode_default_personalization_storage:"",data_layer_google_tag_manager_consent_mode_default_security_storage:""}),y=(0,o.useCallback)(((e,a)=>{u((t=>({...t,[a]:e})))}),[]),f=(0,_.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,o.useEffect)((()=>{d&&u(d)}),[d]);const h=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger for all parameters consent to denied. ","datalayer-for-woocommerce"),(0,r.createElement)(l.ExternalLink,{href:"https://developers.google.com/tag-platform/security/guides/consent?consentmode=advanced#default-consent"},"Read more")),v=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger ad_storage consent to granted","datalayer-for-woocommerce")),E=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger ad_user_data consent to granted","datalayer-for-woocommerce")),b=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger ad_personalization consent to granted","datalayer-for-woocommerce")),w=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger analytics_storage consent to granted","datalayer-for-woocommerce")),S=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger functionality_storage consent to granted","datalayer-for-woocommerce")),C=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger personalization_storage consent to granted","datalayer-for-woocommerce")),T=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger security_storage consent to granted","datalayer-for-woocommerce")),k=p.data_layer_google_tag_manager_consent_mode_default;return(0,r.createElement)("div",{className:"my-gutenberg-form"},(0,r.createElement)(c.SectionHeader,{title:(0,t.__)("Google Tag Manager Consent Mode","datalayer-for-woocommerce")}),(0,r.createElement)("div",{className:"form-legend"},(0,r.createElement)(l.Tip,null,(0,t.__)("Use this feature to trigger DEFAULT consent before the GTM declaration.","datalayer-for-woocommerce"),"\n",(0,t.__)("This feature does not replace the use of a consent tool. If the consent tool already triggers a DEFAULT consent, you do not need to use this feature.","datalayer-for-woocommerce")," ",(0,r.createElement)(l.ExternalLink,{href:"https://woocommerce.com/document/datalayer-for-woocommerce/#consent-mode"},(0,t.__)("Read more","datalayer-for-woocommerce"))),(0,r.createElement)("br",null),(0,r.createElement)("br",null)),i?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"premium-function"},(0,r.createElement)("span",null,(0,r.createElement)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function"},"Unlock with Premium")),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Google Consent Mode","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_consent_mode_default,onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default"),help:h}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Ad Storage","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_consent_mode_default_ad_storage,onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_ad_storage"),help:v,disabled:!k}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Ad User Data","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_consent_mode_default_ad_user_data,onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_ad_user_data"),help:E,disabled:!k}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Ad Personalization","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_consent_mode_default_ad_personalization,onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_ad_personalization"),help:b,disabled:!k}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Analytics Storage","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_consent_mode_default_analytics_storage,onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_analytics_storage"),help:w,disabled:!k}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Functionality Storage","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_consent_mode_default_functionality_storage,onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_functionality_storage"),help:S,disabled:!k}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Personalization Storage","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_consent_mode_default_personalization_storage,onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_personalization_storage"),help:C,disabled:!k}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Security Storage","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_consent_mode_default_security_storage,onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_security_storage"),help:T,disabled:!k}),(0,r.createElement)("div",{className:"form-buttons"},(0,r.createElement)(l.Button,{onClick:async()=>{try{s(!0),await m("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_consent_mode_default:p.data_layer_google_tag_manager_consent_mode_default,data_layer_google_tag_manager_consent_mode_default_ad_storage:p.data_layer_google_tag_manager_consent_mode_default_ad_storage,data_layer_google_tag_manager_consent_mode_default_ad_user_data:p.data_layer_google_tag_manager_consent_mode_default_ad_user_data,data_layer_google_tag_manager_consent_mode_default_ad_personalization:p.data_layer_google_tag_manager_consent_mode_default_ad_personalization,data_layer_google_tag_manager_consent_mode_default_analytics_storage:p.data_layer_google_tag_manager_consent_mode_default_analytics_storage,data_layer_google_tag_manager_consent_mode_default_functionality_storage:p.data_layer_google_tag_manager_consent_mode_default_functionality_storage,data_layer_google_tag_manager_consent_mode_default_personalization_storage:p.data_layer_google_tag_manager_consent_mode_default_personalization_storage,data_layer_google_tag_manager_consent_mode_default_security_storage:p.data_layer_google_tag_manager_consent_mode_default_security_storage},f),s(!1),e((0,t.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0},g?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.Spinner,null),(0,t.__)("Saving","datalayer-for-woocommerce")):(0,t.__)("Save","datalayer-for-woocommerce"))))):(0,r.createElement)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}}))},d=window.wp.apiFetch,i=e.n(d),p=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,_.useDispatch)(n.store),m=(0,_.useDispatch)(),[g,s]=(0,o.useState)(!1),[d,p]=(0,o.useState)(null),{getFields:u,isLoading:y}=(0,_.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[f,h]=(0,o.useState)({data_layer_google_tag_manager_server_to_server_container_url:"",data_layer_google_tag_manager_server_to_server_measurement_id:"",data_layer_google_tag_manager_server_to_server_preview_request_header:"",data_layer_google_tag_manager_server_to_server_purchase_event:"",data_layer_google_tag_manager_server_to_server_status_purchase_event:"",data_layer_google_tag_manager_server_to_server_order_pay_event:"",data_layer_google_tag_manager_server_to_server_status_order_pay_event:"",data_layer_google_tag_manager_server_to_server_refund_event:""}),v=(0,o.useCallback)(((e,a)=>{h((t=>({...t,[a]:e})))}),[]),E=(0,_.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,o.useEffect)((()=>{u&&h(u)}),[u]);const b=(0,r.createElement)(r.Fragment,null,(0,t.__)("Insert preview request header to test manually send a preview request. ","datalayer-for-woocommerce"),(0,r.createElement)(l.ExternalLink,{href:"https://woocommerce.com/document/datalayer-for-woocommerce/#server-to-server-request-header"},"Read more"));return f.data_layer_google_tag_manager_server_to_server_purchase_event,f.data_layer_google_tag_manager_server_to_server_order_pay_event,(0,o.useEffect)((()=>{(async()=>{try{const e=await i()({method:"GET",path:"/datalayer-for-woocommerce/v1/get-status-order"});e.result&&p(e.result)}catch(e){console.error(e)}})()}),[]),(0,r.createElement)("div",{className:"my-gutenberg-form"},(0,r.createElement)(c.SectionHeader,{title:(0,t.__)("Google Tag Manager Server-to-Server","datalayer-for-woocommerce")}),(0,r.createElement)("div",{className:"form-legend"},(0,r.createElement)(l.Tip,null,(0,t.__)("Use this feature to send events directly to GTM server side.","datalayer-for-woocommerce"),(0,r.createElement)("br",null),(0,t.__)("Please note: This is an advanced feature. Recommended for experienced users only.","datalayer-for-woocommerce")," ",(0,r.createElement)(l.ExternalLink,{href:"https://developers.google.com/tag-platform/tag-manager/server-side/send-data?hl=en&option=GTM#3_optional_send_data_from_sources_other_than_websites"},(0,t.__)("Read more","datalayer-for-woocommerce"))),(0,r.createElement)("br",null),(0,r.createElement)("br",null)),y?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"premium-function"},(0,r.createElement)("span",null,(0,r.createElement)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function"},"Unlock with Premium")),(0,r.createElement)(l.TextControl,{label:(0,t.__)("Google Server Container Url","datalayer-for-woocommerce"),value:f.data_layer_google_tag_manager_server_to_server_container_url,onChange:e=>v(e,"data_layer_google_tag_manager_server_to_server_container_url"),help:(0,t.__)("Insert GTM Server container URL","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)(l.TextControl,{label:(0,t.__)("Measurement ID GA4","datalayer-for-woocommerce"),value:f.data_layer_google_tag_manager_server_to_server_measurement_id,onChange:e=>v(e,"data_layer_google_tag_manager_server_to_server_measurement_id"),help:(0,t.__)("Insert Measurement ID GA4. Example: G-G999999999","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)(l.TextControl,{label:(0,t.__)("Preview Request Header","datalayer-for-woocommerce"),value:f.data_layer_google_tag_manager_server_to_server_preview_request_header,onChange:e=>v(e,"data_layer_google_tag_manager_server_to_server_preview_request_header"),help:b,disabled:!0}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Purchase Event","datalayer-for-woocommerce"),checked:f.data_layer_google_tag_manager_server_to_server_purchase_event,onChange:e=>v(e,"data_layer_google_tag_manager_server_to_server_purchase_event"),help:(0,t.__)("Enable to trigger purchase event directly via server side and stop via client web","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)(l.SelectControl,{label:(0,t.__)("Purchase Event Status","datalayer-for-woocommerce"),value:f.data_layer_google_tag_manager_server_to_server_status_purchase_event,selected:f.data_layer_google_tag_manager_server_to_server_status_purchase_event,onChange:e=>v(e,"data_layer_google_tag_manager_server_to_server_status_purchase_event"),options:d,help:(0,t.__)("Select which order status the purchase event should be triggered on","datalayer-for-woocommerce"),disabled:!0,className:"components-base-control-bottom-minus-active"}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Order Pay Event","datalayer-for-woocommerce"),checked:f.data_layer_google_tag_manager_server_to_server_order_pay_event,onChange:e=>v(e,"data_layer_google_tag_manager_server_to_server_order_pay_event"),help:(0,t.__)("Enable to trigger order_pay event directly via server side","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)(l.SelectControl,{label:(0,t.__)("Order Pay Status","datalayer-for-woocommerce"),value:f.data_layer_google_tag_manager_server_to_server_status_order_pay_event,selected:f.data_layer_google_tag_manager_server_to_server_status_order_pay_event,onChange:e=>v(e,"data_layer_google_tag_manager_server_to_server_status_order_pay_event"),options:d,help:(0,t.__)("Select which order status the order pay event should be triggered on","datalayer-for-woocommerce"),disabled:!0,className:"components-base-control-bottom-minus-active"}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Order Refund Event","datalayer-for-woocommerce"),checked:f.data_layer_google_tag_manager_server_to_server_refund_event,onChange:e=>v(e,"data_layer_google_tag_manager_server_to_server_refund_event"),help:(0,t.__)("Enable to trigger refund event directly via server side","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)("div",{className:"form-buttons"},(0,r.createElement)(l.Button,{onClick:async()=>{try{s(!0),await m("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_server_to_server_container_url:f.data_layer_google_tag_manager_server_to_server_container_url,data_layer_google_tag_manager_server_to_server_measurement_id:f.data_layer_google_tag_manager_server_to_server_measurement_id,data_layer_google_tag_manager_server_to_server_preview_request_header:f.data_layer_google_tag_manager_server_to_server_preview_request_header,data_layer_google_tag_manager_server_to_server_purchase_event:f.data_layer_google_tag_manager_server_to_server_purchase_event,data_layer_google_tag_manager_server_to_server_status_purchase_event:f.data_layer_google_tag_manager_server_to_server_status_purchase_event,data_layer_google_tag_manager_server_to_server_order_pay_event:f.data_layer_google_tag_manager_server_to_server_order_pay_event,data_layer_google_tag_manager_server_to_server_status_order_pay_event:f.data_layer_google_tag_manager_server_to_server_status_order_pay_event,data_layer_google_tag_manager_server_to_server_refund_event:f.data_layer_google_tag_manager_server_to_server_refund_event},E),s(!1),e((0,t.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0},g?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.Spinner,null),(0,t.__)("Saving","datalayer-for-woocommerce")):(0,t.__)("Save","datalayer-for-woocommerce"))))):(0,r.createElement)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}}))},u=window.wp.coreData,y=e=>{const{createSuccessNotice:a,createErrorNotice:m}=(0,_.useDispatch)(n.store),g=(0,_.useDispatch)(),[s,d]=(0,o.useState)(!1),{getFields:i,isLoading:p,getBrands:y}=(0,_.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings"),getBrands:e(u.store).getTaxonomies({type:"product"})})),[]),[f,h]=(0,o.useState)({data_layer_google_tag_manager_ecommerce_ga4:!1,data_layer_google_tag_manager_related_product_show:!1}),v=y?y.map((e=>({label:e.labels.name,value:e.slug}))):[];v.unshift({label:"Do not use",value:"none"});const E=(0,o.useCallback)(((e,a)=>{h((t=>({...t,[a]:e})))}),[]),b=(0,_.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,o.useEffect)((()=>{i&&h(i)}),[i]);const w=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to use datalayer only with ","datalayer-for-ecommerce-free"),(0,r.createElement)(l.ExternalLink,{href:"https://developers.google.com/tag-manager/ecommerce-ga4?hl=en"},"Ecommerce (GA4)")),S=(0,r.createElement)(r.Fragment,null,(0,t.__)("Select if product items show ID or SKU","datalayer-for-ecommerce-free")),C=(0,r.createElement)(r.Fragment,null,(0,t.__)("Select the taxonomy containing Product Brands","datalayer-for-ecommerce-free")),T=(0,r.createElement)(r.Fragment,null,(0,t.__)("Select when the event should be triggered","datalayer-for-ecommerce-free")),k=(0,r.createElement)(r.Fragment,null,(0,t.__)("Select when the event should be triggered","datalayer-for-ecommerce-free")),x=(0,r.createElement)(r.Fragment,null,(0,t.__)("Select when the view_item event should fire if its a product variable","datalayer-for-ecommerce-free")),N=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to show variable product variants as an individual product","datalayer-for-ecommerce-free")),F=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to show event view_item_list for related product in page product","datalayer-for-woocommerce")),P=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to show discount in ecommerce.items when product is on sale - ","datalayer-for-woocommerce"),(0,r.createElement)(l.ExternalLink,{href:"https://developers.google.com/analytics/devguides/collection/ga4/apply-discount?client_type=gtag"},"Read more"));return(0,r.createElement)("div",{className:"my-gutenberg-form"},(0,r.createElement)(c.SectionHeader,{title:(0,t.__)("Ecommerce Settings","datalayer-for-ecommerce-free")}),p?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("DataLayer for WooCommerce Ecommerce GA4","datalayer-for-ecommerce-free"),checked:f.data_layer_google_tag_manager_ecommerce_ga4,onChange:e=>E(e,"data_layer_google_tag_manager_ecommerce_ga4"),help:w}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Show view_item_list related product","datalayer-for-woocommerce"),checked:f.data_layer_google_tag_manager_related_product_show,onChange:e=>E(e,"data_layer_google_tag_manager_related_product_show"),help:F}),(0,r.createElement)("div",{className:"form-buttons"},(0,r.createElement)(l.Button,{onClick:async()=>{try{d(!0),await g("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_ecommerce_ga4:f.data_layer_google_tag_manager_ecommerce_ga4,data_layer_google_tag_manager_related_product_show:f.data_layer_google_tag_manager_related_product_show},b),d(!1),a((0,t.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),m("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:s},s?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.Spinner,null),(0,t.__)("Saving","datalayer-for-ecommerce-free")):(0,t.__)("Save","datalayer-for-ecommerce-free"))),(0,r.createElement)("div",{className:"premium-function"},(0,r.createElement)("span",null,(0,r.createElement)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function"},"Unlock with Premium")),(0,r.createElement)(l.SelectControl,{disabled:!0,label:(0,t.__)("Product Items","datalayer-for-ecommerce-free"),value:f.data_layer_google_tag_manager_product_items,options:[{label:"ID",value:"ID"},{label:"SKU",value:"SKU"}],onChange:e=>E(e,"data_layer_google_tag_manager_product_items"),help:S}),(0,r.createElement)(l.SelectControl,{disabled:!0,label:(0,t.__)("Product Brands","datalayer-for-ecommerce-free"),value:f.data_layer_google_tag_manager_product_brands,options:v,onChange:e=>E(e,"data_layer_google_tag_manager_product_brands"),help:C}),(0,r.createElement)(l.SelectControl,{disabled:!0,label:(0,t.__)("Event add_shipping_info","datalayer-for-ecommerce-free"),value:f.data_layer_google_tag_manager_javascript_event_add_shipping_info,options:[{label:"Shipping selected",value:"Shipping selected"},{label:"Place order button",value:"Place order button"}],onChange:e=>E(e,"data_layer_google_tag_manager_javascript_event_add_shipping_info"),help:T}),(0,r.createElement)(l.SelectControl,{disabled:!0,label:(0,t.__)("Event add_payment_info","datalayer-for-ecommerce-free"),value:f.data_layer_google_tag_manager_javascript_event_add_payment_info,options:[{label:"Payment selected",value:"Payment selected"},{label:"Place order button",value:"Place order button"}],onChange:e=>E(e,"data_layer_google_tag_manager_javascript_event_add_payment_info"),help:k}),(0,r.createElement)(l.SelectControl,{disabled:!0,label:(0,t.__)("Variable product event view_item","datalayer-for-ecommerce-free"),value:f.data_layer_google_tag_manager_javascript_event_view_item,options:[{label:"Parent product page view",value:"Parent product page view"},{label:"When selecting a variation",value:"When selecting a variation"},{label:"Parent product page view and When selecting a variation",value:"Parent product page view and When selecting a variation"}],onChange:e=>E(e,"data_layer_google_tag_manager_javascript_event_view_item"),help:x}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Variable product as individual product","datalayer-for-ecommerce-free"),checked:f.data_layer_google_tag_manager_variable_product_as_individual,onChange:e=>E(e,"data_layer_google_tag_manager_variable_product_as_individual"),help:N}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Show discount in ecommerce.items when product is on sale","datalayer-for-woocommerce"),checked:f.data_layer_google_tag_manager_discount_in_items_show,onChange:e=>E(e,"data_layer_google_tag_manager_discount_in_items_show"),help:P}))):(0,r.createElement)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}}))},f=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,_.useDispatch)(n.store),m=(0,_.useDispatch)(),[g,s]=(0,o.useState)(!1),[d,i]=(0,o.useState)(!1),[p,y]=(0,o.useState)(null),[f,h]=(0,o.useState)(!1),v=()=>h(!1),{getFields:E,isLoading:b,getProducts:w}=(0,_.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings"),getProducts:e(u.store).getEntityRecords("postType","product",{per_page:-1})})),[]),[S,C]=(0,o.useState)({data_layer_google_tag_manager_promotions:[]}),[T,k]=(0,o.useState)({}),x=w?w.map((e=>({key:e.id,label:e.title.rendered,value:{id:e.id}}))):[],N=(0,o.useCallback)(((e,a)=>{k((t=>({...t,[a]:e})))}),[]),F=(0,_.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));return(0,o.useEffect)((()=>{E&&C(E)}),[E]),(0,r.createElement)("div",{className:"my-gutenberg-form"},(0,r.createElement)(c.SectionHeader,{title:(0,t.__)("Ecommerce Promotions","datalayer-for-woocommerce")}),(0,r.createElement)("div",{className:"form-legend"},(0,r.createElement)(l.Tip,null,(0,t.__)("Create the promotions that will be used to trigger the","datalayer-for-woocommerce")," ",(0,r.createElement)("b",null,"select_promotion")," and ",(0,r.createElement)("b",null,"view_promotion")," events."," ",(0,r.createElement)(l.ExternalLink,{href:"https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?hl=en&client_type=gtm#apply_promotions"},(0,t.__)("Read more","datalayer-for-woocommerce"))),(0,r.createElement)("br",null),(0,r.createElement)("br",null)),b?(0,r.createElement)(r.Fragment,null,f?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"form-fields"},(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Status Promotion","datalayer-for-woocommerce"),checked:T.status,onChange:e=>N(e,"status"),help:(0,t.__)("Select promotion status","datalayer-for-woocommerce")}),(0,r.createElement)(l.TextControl,{label:(0,t.__)("Promotion ID","datalayer-for-woocommerce"),value:T.promotion_id,onChange:e=>N(e,"promotion_id"),help:(0,t.__)("The ID of the promotion associated with the event","datalayer-for-woocommerce")}),(0,r.createElement)(l.TextControl,{label:(0,t.__)("Promotion Name","datalayer-for-woocommerce"),value:T.promotion_name,onChange:e=>N(e,"promotion_name"),help:(0,t.__)("The name of the promotion associated with the event","datalayer-for-woocommerce")}),(0,r.createElement)(l.TextControl,{label:(0,t.__)("Creative Name","datalayer-for-woocommerce"),value:T.creative_name,onChange:e=>N(e,"creative_name"),help:(0,t.__)("The name of the promotional creative","datalayer-for-woocommerce")}),(0,r.createElement)(l.TextControl,{label:(0,t.__)("Creative Slot","datalayer-for-woocommerce"),value:T.creative_slot,onChange:e=>N(e,"creative_slot"),help:(0,t.__)("The name of the promotional creative slot associated with the event","datalayer-for-woocommerce")}),(0,r.createElement)("label",{className:"components-base-control__label css-1v57ksj ej5x27r2 label_external",htmlFor:"woocommerce-select-control-1"},"Products"),(0,r.createElement)(c.SelectControl,{label:(0,t.__)("Select products","datalayer-for-woocommerce"),help:(0,t.__)("Select the products for which the event will be triggered","datalayer-for-woocommerce"),options:x,selected:T.products,onChange:e=>N(e,"products"),isSearchable:!0,multiple:!0,showClearButton:!0,hideBeforeSearch:!0,staticList:!0}),(0,r.createElement)("div",{className:"form-buttons"},(0,r.createElement)(l.Button,{onClick:v,variant:"secondary"},(0,t.__)("Cancel","datalayer-for-woocommerce")),(0,r.createElement)(l.Button,{onClick:async()=>{try{s(!0);const a=S.data_layer_google_tag_manager_promotions.map((e=>e.id===T.id?{...e,...T}:e));S.data_layer_google_tag_manager_promotions.find((e=>e.id===T.id))||a.push(T),C({...S,data_layer_google_tag_manager_promotions:a}),await m("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_promotions:a},F),s(!1),v(),e((0,t.__)("Promotion saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:g},g?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.Spinner,null),(0,t.__)("Saving","datalayer-for-woocommerce")):(0,t.__)("Save","datalayer-for-woocommerce"))))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"premium-function"},(0,r.createElement)("span",null,(0,r.createElement)(l.ExternalLink,{href:"https://woo.woocommerce/products/datalayer-for-woocommerce/",className:"link-premium-function"},"Unlock with Premium")),(0,r.createElement)("table",{className:"wp-list-table widefat fixed striped table-view-list"},(0,r.createElement)("thead",null,(0,r.createElement)("tr",null,(0,r.createElement)("td",{style:{width:100}},"#"),(0,r.createElement)("td",null,(0,t.__)("Promotion ID","datalayer-for-woocommerce")),(0,r.createElement)("td",null,(0,t.__)("Promotion Name","datalayer-for-woocommerce")),(0,r.createElement)("td",{style:{width:100}},(0,t.__)("Status","datalayer-for-woocommerce")),(0,r.createElement)("td",{style:{width:450}},(0,t.__)("Actions","datalayer-for-woocommerce")))),(0,r.createElement)("tbody",null)),(0,r.createElement)("div",{className:"form-fields-button"},(0,r.createElement)(l.Button,{onClick:()=>{const e=S.data_layer_google_tag_manager_promotions;let a=1;e.length>0&&(a=Math.max(...e.map((e=>parseInt(e.id,10))))+1),k({id:a,status:!1,promotion_id:"",promotion_name:"",creative_name:"",creative_slot:""}),h(!0)},variant:"primary",disabled:!0},(0,t.__)("Create","datalayer-for-woocommerce")))))):(0,r.createElement)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}}))},h=e=>{const{createSuccessNotice:a,createErrorNotice:m}=(0,_.useDispatch)(n.store),g=(0,_.useDispatch)(),[s,d]=(0,o.useState)(!1),{getFields:i,isLoading:p}=(0,_.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[u,y]=(0,o.useState)({data_layer_google_tag_manager_show_user_info:!1}),f=(0,o.useCallback)(((e,a)=>{y((t=>({...t,[a]:e})))}),[]),h=(0,_.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,o.useEffect)((()=>{i&&y(i)}),[i]);const v=(0,r.createElement)(r.Fragment,null,(0,t.__)("When a user refreshes the thank you page, the purchase event is not sent again. Prevent duplicate transactions in analytics","datalayer-for-ecommerce-free")),E=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable this option if user information show when logged.","datalayer-for-ecommerce-free")),b=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable this option via javascript as an alternative when your theme fails to load the hook add_to_cart with php.","datalayer-for-ecommerce-free"));return(0,r.createElement)("div",{className:"my-gutenberg-form"},(0,r.createElement)(c.SectionHeader,{title:(0,t.__)("Ecommerce Advanced","datalayer-for-ecommerce-free")}),p?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Show user info","datalayer-for-ecommerce-free"),checked:u.data_layer_google_tag_manager_show_user_info,onChange:e=>f(e,"data_layer_google_tag_manager_show_user_info"),help:E}),(0,r.createElement)("div",{className:"form-buttons"},(0,r.createElement)(l.Button,{onClick:async()=>{try{d(!0),await g("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_show_user_info:u.data_layer_google_tag_manager_show_user_info},h),d(!1),a((0,t.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),m("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:s},s?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.Spinner,null),(0,t.__)("Saving","datalayer-for-ecommerce-free")):(0,t.__)("Save","datalayer-for-ecommerce-free"))),(0,r.createElement)("div",{className:"premium-function"},(0,r.createElement)("span",null,(0,r.createElement)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function"},"Unlock with Premium")),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Trigger Purchase only once","datalayer-for-ecommerce-free"),checked:u.data_layer_google_tag_manager_purchase_only_once,onChange:e=>f(e,"data_layer_google_tag_manager_purchase_only_once"),help:v}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Events with Javascript","datalayer-for-ecommerce-free"),checked:u.data_layer_google_tag_manager_javascript_events,onChange:e=>f(e,"data_layer_google_tag_manager_javascript_events"),help:b}))):(0,r.createElement)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}}))},v=e=>{const{createSuccessNotice:a,createErrorNotice:m}=(0,_.useDispatch)(n.store),g=(0,_.useDispatch)(),[s,d]=(0,o.useState)(!1),{getFields:i,isLoading:p}=(0,_.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[u,y]=(0,o.useState)({data_layer_google_tag_manager_debug_activate:!1}),f=(0,o.useCallback)(((e,a)=>{y((t=>({...t,[a]:e})))}),[]),h=(0,_.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,o.useEffect)((()=>{i&&y(i)}),[i]);const v=(0,r.createElement)(r.Fragment,null,(0,t.__)("Activate DEBUG BAR TEST MODE","datalayer-for-ecommerce-free"));return(0,r.createElement)("div",{className:"my-gutenberg-form"},(0,r.createElement)(c.SectionHeader,{title:(0,t.__)("Extra Debug Bar","datalayer-for-ecommerce-free")}),p?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"premium-function"},(0,r.createElement)("span",null,(0,r.createElement)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function"},"Unlock with Premium")),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Activate Test Debugger Bar","datalayer-for-ecommerce-free"),checked:u.data_layer_google_tag_manager_debug_activate,onChange:e=>f(e,"data_layer_google_tag_manager_debug_activate"),help:v}),(0,r.createElement)("div",{className:"form-buttons"},(0,r.createElement)(l.Button,{onClick:async()=>{try{d(!0),await g("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_debug_activate:u.data_layer_google_tag_manager_debug_activate},h),d(!1),a((0,t.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),m("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0},s?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.Spinner,null),(0,t.__)("Saving","datalayer-for-ecommerce-free")):(0,t.__)("Save","datalayer-for-ecommerce-free"))))):(0,r.createElement)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}}))},E=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,_.useDispatch)(n.store),[m,g]=((0,_.useDispatch)(),(0,o.useState)(!1)),{getFields:s,isLoading:d}=(0,_.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[i,p]=(0,o.useState)({}),u=(0,o.useCallback)(((e,a)=>{p((t=>({...t,[a]:e})))}),[]);(0,_.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState())),(0,o.useEffect)((()=>{s&&p(s)}),[s]);const y=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger Popup Consent Mode. ","datalayer-for-woocommerce"),(0,r.createElement)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/10718549"},"Read more")),f=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger ad_storage consent option","datalayer-for-woocommerce")),h=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger ad_user_data consent option","datalayer-for-woocommerce")),v=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger ad_personalization consent option","datalayer-for-woocommerce")),E=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger analytics_storage consent option","datalayer-for-woocommerce")),b=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger functionality_storage consent option","datalayer-for-woocommerce")),w=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger personalization_storage consent option","datalayer-for-woocommerce")),S=(0,r.createElement)(r.Fragment,null,(0,t.__)("Enable to trigger security_storage consent option","datalayer-for-woocommerce"));return(0,r.createElement)("div",{className:"my-gutenberg-form"},(0,r.createElement)(c.SectionHeader,{title:(0,t.__)("Popup Consent Mode","datalayer-for-woocommerce")}),d?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"premium-function"},(0,r.createElement)("span",null,(0,r.createElement)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function"},"Unlock with Premium")),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Popup Consent Mode","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup"),help:y}),(0,r.createElement)("div",{className:"form-subtitle"},(0,t.__)("Consent Types","datalayer-for-woocommerce")),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Ad Storage","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup_active_ad_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_ad_storage"),help:f,disabled:!i.data_layer_google_tag_manager_consent_mode_popup}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Active Default","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup_active_default_ad_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_ad_storage"),disabled:!i.data_layer_google_tag_manager_consent_mode_popup_active_ad_storage,className:"components-base-control-bottom-minus-active"}),(0,r.createElement)(l.TextControl,{disabled:!0,label:(0,t.__)("Ad Storage Text Description","datalayer-for-woocommerce"),value:i.data_layer_google_tag_manager_consent_mode_popup_text_ad_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_text_ad_storage"),help:(0,t.__)("Example: Enables storage (such as cookies) related to advertising","datalayer-for-woocommerce"),disabled:!i.data_layer_google_tag_manager_consent_mode_popup_active_ad_storage,className:"components-base-control-bottom-minus"}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Ad User Data","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data"),help:h,disabled:!i.data_layer_google_tag_manager_consent_mode_popup}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Active Default","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup_active_default_ad_user_data,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_ad_user_data"),disabled:!i.data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data,className:"components-base-control-bottom-minus-active"}),(0,r.createElement)(l.TextControl,{disabled:!0,label:(0,t.__)("Ad User Data Text Description","datalayer-for-woocommerce"),value:i.data_layer_google_tag_manager_consent_mode_popup_text_ad_user_data,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_text_ad_user_data"),help:(0,t.__)("Example: Sets consent for sending user data related to advertising to Google","datalayer-for-woocommerce"),disabled:!i.data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data,className:"components-base-control-bottom-minus"}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Ad Personalization","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization"),help:v,disabled:!i.data_layer_google_tag_manager_consent_mode_popup}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Active Default","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup_active_default_ad_personalization,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_ad_personalization"),disabled:!i.data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization,className:"components-base-control-bottom-minus-active"}),(0,r.createElement)(l.TextControl,{disabled:!0,label:(0,t.__)("Ad Personalization Text Description","datalayer-for-woocommerce"),value:i.data_layer_google_tag_manager_consent_mode_popup_text_ad_personalization,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_text_ad_personalization"),help:(0,t.__)("Example: Sets consent for personalized advertising","datalayer-for-woocommerce"),disabled:!i.data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization,className:"components-base-control-bottom-minus"}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Analytics Storage","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage"),help:E,disabled:!i.data_layer_google_tag_manager_consent_mode_popup}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Active Default","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup_active_default_analytics_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_analytics_storage"),disabled:!i.data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage,className:"components-base-control-bottom-minus-active"}),(0,r.createElement)(l.TextControl,{disabled:!0,label:(0,t.__)("Analytics Storage Text Description","datalayer-for-woocommerce"),value:i.data_layer_google_tag_manager_consent_mode_popup_text_analytics_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_text_analytics_storage"),help:(0,t.__)("Example: Enables storage (such as cookies) related to analytics e.g. visit duration","datalayer-for-woocommerce"),disabled:!i.data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage,className:"components-base-control-bottom-minus"}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Functionality Storage","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage"),help:b,disabled:!i.data_layer_google_tag_manager_consent_mode_popup}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Active Default","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup_active_default_functionality_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_functionality_storage"),disabled:!i.data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage,className:"components-base-control-bottom-minus-active"}),(0,r.createElement)(l.TextControl,{disabled:!0,label:(0,t.__)("Functionality Storage Text Description","datalayer-for-woocommerce"),value:i.data_layer_google_tag_manager_consent_mode_popup_text_functionality_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_text_functionality_storage"),help:(0,t.__)("Example: Enables storage that supports the functionality of the website or app e.g. language settings","datalayer-for-woocommerce"),disabled:!i.data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage,className:"components-base-control-bottom-minus"}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Personalization Storage","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage"),help:w,disabled:!i.data_layer_google_tag_manager_consent_mode_popup}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Active Default","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup_active_default_personalization_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_personalization_storage"),disabled:!i.data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage,className:"components-base-control-bottom-minus-active"}),(0,r.createElement)(l.TextControl,{disabled:!0,label:(0,t.__)("Personalization Storage Text Description","datalayer-for-woocommerce"),value:i.data_layer_google_tag_manager_consent_mode_popup_text_personalization_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_text_personalization_storage"),help:(0,t.__)("Example: Enables storage related to personalization e.g. video recommendations","datalayer-for-woocommerce"),disabled:!i.data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage,className:"components-base-control-bottom-minus"}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Security Storage","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup_active_security_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_security_storage"),help:S,disabled:!i.data_layer_google_tag_manager_consent_mode_popup}),(0,r.createElement)(l.ToggleControl,{disabled:!0,label:(0,t.__)("Active Default","datalayer-for-woocommerce"),checked:i.data_layer_google_tag_manager_consent_mode_popup_active_default_security_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_security_storage"),disabled:!i.data_layer_google_tag_manager_consent_mode_popup_active_security_storage,className:"components-base-control-bottom-minus-active"}),(0,r.createElement)(l.TextControl,{disabled:!0,label:(0,t.__)("Security Storage Text Description","datalayer-for-woocommerce"),value:i.data_layer_google_tag_manager_consent_mode_popup_text_security_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_text_security_storage"),help:(0,t.__)("Example: Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","datalayer-for-woocommerce"),disabled:!i.data_layer_google_tag_manager_consent_mode_popup_active_security_storage,className:"components-base-control-bottom-minus"}),(0,r.createElement)("div",{className:"form-subtitle"},(0,t.__)("Popup Style","datalayer-for-woocommerce")),(0,r.createElement)(l.SelectControl,{disabled:!0,label:(0,t.__)("Style","datalayer-for-woocommerce"),value:i.data_layer_google_tag_manager_consent_mode_popup_style,options:[{label:"BOTTOM",value:"BOTTOM"},{label:"FLOAT LEFT",value:"FLOAT LEFT"},{label:"FLOAT RIGHT",value:"FLOAT RIGHT"},{label:"CENTER",value:"CENTER"}],onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_style"),help:(0,t.__)("Select popup style","datalayer-for-woocommerce")}),(0,r.createElement)("div",{className:"form-buttons"},(0,r.createElement)(l.Button,{onClick:async()=>{try{g(!0),e((0,t.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0},m?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.Spinner,null),(0,t.__)("Saving","datalayer-for-woocommerce")):(0,t.__)("Save","datalayer-for-woocommerce"))))):(0,r.createElement)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}}))},b=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,_.useDispatch)(n.store),m=(0,_.useDispatch)(),[g,s]=(0,o.useState)(!1),{getFields:d,isLoading:i}=(0,_.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[p,u]=(0,o.useState)({data_layer_google_tag_manager_post_data_active:!1,data_layer_google_tag_manager_post_data_page_title:!1,data_layer_google_tag_manager_post_data_visitor_type:!1,data_layer_google_tag_manager_post_data_page_post_type:!1,data_layer_google_tag_manager_post_data_page_post_date:!1,data_layer_google_tag_manager_post_data_page_post_author:!1,data_layer_google_tag_manager_post_data_page_post_author_id:!1,data_layer_google_tag_manager_post_data_page_category:!1,data_layer_google_tag_manager_post_data_page_tags:!1,data_layer_google_tag_manager_post_data_page_id:!1}),y=(0,o.useCallback)(((e,a)=>{u((t=>({...t,[a]:e})))}),[]),f=(0,_.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));return(0,o.useEffect)((()=>{d&&u(d)}),[d]),(0,r.createElement)("div",{className:"my-gutenberg-form"},(0,r.createElement)(c.SectionHeader,{title:(0,t.__)("Post Data","datalayer-for-woocommerce")}),(0,r.createElement)("div",{className:"form-legend"},(0,r.createElement)(l.Tip,null,(0,t.__)("Select the post data that will be used to trigger the","datalayer-for-woocommerce")," ",(0,r.createElement)("b",null,"Pageview")," event."),(0,r.createElement)("br",null),(0,r.createElement)("br",null)),i?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"premium-function"},(0,r.createElement)("span",null,(0,r.createElement)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function"},"Unlock with Premium")),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Active Event Pageview","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_post_data_active,onChange:e=>y(e,"data_layer_google_tag_manager_post_data_active"),help:(0,t.__)("Active Event Pageview","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Page Title","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_post_data_page_title,onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_title"),help:(0,t.__)("Insert pageTitle parameter","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Visitor Type","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_post_data_visitor_type,onChange:e=>y(e,"data_layer_google_tag_manager_post_data_visitor_type"),help:(0,t.__)("Insert visitorType parameter","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Page Post Type","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_post_data_page_post_type,onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_type"),help:(0,t.__)("Insert pagePostType parameter","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Page Date","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_post_data_page_post_date,onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_date"),help:(0,t.__)("Insert pagePostDate parameter","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Page Author","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_post_data_page_post_author,onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_author"),help:(0,t.__)("Insert pagePostAuthor parameter","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Page Author ID","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_post_data_page_post_author_id,onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_author_id"),help:(0,t.__)("Insert pagePostAuthorId parameter","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Page Category","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_post_data_page_category,onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_category"),help:(0,t.__)("Insert pageCategory parameter","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Page Tags","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_post_data_page_tags,onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_tags"),help:(0,t.__)("Insert pageTags parameter","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)(l.ToggleControl,{label:(0,t.__)("Page ID","datalayer-for-woocommerce"),checked:p.data_layer_google_tag_manager_post_data_page_id,onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_id"),help:(0,t.__)("Insert pageId parameter","datalayer-for-woocommerce"),disabled:!0}),(0,r.createElement)("div",{className:"form-buttons"},(0,r.createElement)(l.Button,{onClick:async()=>{try{s(!0),await m("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_post_data_active:p.data_layer_google_tag_manager_post_data_active,data_layer_google_tag_manager_post_data_page_title:p.data_layer_google_tag_manager_post_data_page_title,data_layer_google_tag_manager_post_data_visitor_type:p.data_layer_google_tag_manager_post_data_visitor_type,data_layer_google_tag_manager_post_data_page_post_type:p.data_layer_google_tag_manager_post_data_page_post_type,data_layer_google_tag_manager_post_data_page_post_date:p.data_layer_google_tag_manager_post_data_page_post_date,data_layer_google_tag_manager_post_data_page_post_author:p.data_layer_google_tag_manager_post_data_page_post_author,data_layer_google_tag_manager_post_data_page_post_author_id:p.data_layer_google_tag_manager_post_data_page_post_author_id,data_layer_google_tag_manager_post_data_page_category:p.data_layer_google_tag_manager_post_data_page_category,data_layer_google_tag_manager_post_data_page_tags:p.data_layer_google_tag_manager_post_data_page_tags,data_layer_google_tag_manager_post_data_page_id:p.data_layer_google_tag_manager_post_data_page_id},f),s(!1),e((0,t.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0},g?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.Spinner,null),(0,t.__)("Saving","datalayer-for-woocommerce")):(0,t.__)("Save","datalayer-for-woocommerce"))))):(0,r.createElement)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}}))},w=()=>(0,r.createElement)("div",{className:"my-gutenberg-form"},(0,r.createElement)(c.SectionHeader,{title:(0,t.__)("Help","datalayer-for-ecommerce-free")}),(0,r.createElement)(l.Flex,{gap:"20",justify:"flex-start"},(0,r.createElement)(l.FlexItem,null,(0,r.createElement)(l.Card,null,(0,r.createElement)(l.CardHeader,null,(0,r.createElement)(l.__experimentalHeading,{level:1},(0,t.__)("Contact us","datalayer-for-ecommerce-free"))),(0,r.createElement)(l.CardBody,null,(0,r.createElement)(l.Button,{variant:"secondary",href:"https://wordpress.org/support/plugin/datalayer-for-ecommerce-free/",target:"_blank"},(0,t.__)("Create ticket","datalayer-for-ecommerce-free"))))),(0,r.createElement)(l.FlexItem,null,(0,r.createElement)(l.Card,null,(0,r.createElement)(l.CardHeader,null,(0,r.createElement)(l.__experimentalHeading,{level:1},(0,t.__)("Configuration","datalayer-for-ecommerce-free"))),(0,r.createElement)(l.CardBody,null,(0,r.createElement)(l.Button,{variant:"secondary",href:"https://wordpress.org/plugins/datalayer-for-ecommerce-free/#installation",target:"_blank"},(0,t.__)("View documentation","datalayer-for-ecommerce-free"))))),(0,r.createElement)(l.FlexItem,null,(0,r.createElement)(l.Card,null,(0,r.createElement)(l.CardHeader,null,(0,r.createElement)(l.__experimentalHeading,{level:1},(0,t.__)("Review","datalayer-for-ecommerce-free"))),(0,r.createElement)(l.CardBody,null,(0,r.createElement)(l.Button,{variant:"secondary",href:"https://wordpress.org/support/plugin/datalayer-for-ecommerce-free/reviews/#new-post",target:"_blank"},(0,t.__)("Send your review","datalayer-for-ecommerce-free"))))))),S=()=>(0,r.createElement)("div",{className:"my-gutenberg-form"},(0,r.createElement)(c.SectionHeader,{title:(0,t.__)("About","datalayer-for-ecommerce-free")}),(0,r.createElement)("p",null,"= 4.3.0 - 2024-10-28 =",(0,r.createElement)("br",null),"* New: Option Show view_item_list related product in product page",(0,r.createElement)("br",null),"* Support: Support -> WP 6.6.2 WC 9.3.3",(0,r.createElement)("br",null),(0,r.createElement)("br",null),(0,r.createElement)("br",null),"= 4.0.0 - 2024-07-03 =",(0,r.createElement)("br",null),"* Remove: Option DataLayer for WooCommerce Enhanced Ecommerce removed",(0,r.createElement)("br",null),"* Support: Support -> WP 6.5.5 WC 9.0.2",(0,r.createElement)("br",null),(0,r.createElement)("br",null),(0,r.createElement)("br",null),"= 3.4.0 - 2024-06-10 =",(0,r.createElement)("br",null),"* Update: Push Datalayer function without jQuery",(0,r.createElement)("br",null),"* Update: Get Country Code Phone Number User",(0,r.createElement)("br",null),"* Support: Support -> WP 6.5.3 WC 8.9.2",(0,r.createElement)("br",null),(0,r.createElement)("br",null),(0,r.createElement)("br",null),"= 3.3.0 - 2024-03-27 =",(0,r.createElement)("br",null),"* New: Parameter item_category with multiples categories in all events",(0,r.createElement)("br",null),"* Fix: Php 8.2 deprecated function get options",(0,r.createElement)("br",null),"* Fix: Product tax update in item price",(0,r.createElement)("br",null),"* Support: Support -> WP 6.4.3 WC 8.7.0",(0,r.createElement)("br",null),(0,r.createElement)("br",null),(0,r.createElement)("br",null),"= 3.2.0 - 2023-12-15 =",(0,r.createElement)("br",null),"* Update: Compatibility with multicurrency WPML plugin",(0,r.createElement)("br",null),"* Support: Support -> WP 6.4.2 WC 8.4.0",(0,r.createElement)("br",null),(0,r.createElement)("br",null),(0,r.createElement)("br",null),"= 3.1.0 - 2023-11-29 =",(0,r.createElement)("br",null),"* Update: Select only one datalayer type in ecommerce settings",(0,r.createElement)("br",null),"* Support: Support -> WP 6.4.1 WC 8.3.1",(0,r.createElement)("br",null),(0,r.createElement)("br",null),(0,r.createElement)("br",null),"= 3.0.0 - 2023-10-30 =",(0,r.createElement)("br",null),"* New: Full compatibility with WooCommerce Blocks",(0,r.createElement)("br",null),"* New: New Modern Admin Page",(0,r.createElement)("br",null),"* Support: Support -> WP 6.3.2 WC 8.2.1",(0,r.createElement)("br",null),(0,r.createElement)("br",null),(0,r.createElement)("br",null),"= 2.7.0 - 2023-06-21 =",(0,r.createElement)("br",null),"* New: Select if user information show or not when logged",(0,r.createElement)("br",null),"* New: Full Compatibility HPOS - High-Performance order storage (COT)",(0,r.createElement)("br",null),"* Support: Support -> WP 6.2.2 WC 7.8.0",(0,r.createElement)("br",null),(0,r.createElement)("br",null),(0,r.createElement)("br",null),"= 2.4.0 - 2023-03-29 =",(0,r.createElement)("br",null),"* Support: Support -> WP 6.1.1 WC 7.5.1",(0,r.createElement)("br",null),"* Update: optimization and improvement of the code that triggers the events",(0,r.createElement)("br",null),(0,r.createElement)("br",null),(0,r.createElement)("br",null),"= 2.0.2 - 2022-09-21 =",(0,r.createElement)("br",null),"* Support: WP 6.0.2 WC 6.9.3",(0,r.createElement)("br",null),"* Fix: Multisite full support check WooCommerce Active",(0,r.createElement)("br",null),(0,r.createElement)("br",null),(0,r.createElement)("br",null),"= 2.0.0 - 2022-06-22 =",(0,r.createElement)("br",null),"* First Release",(0,r.createElement)("br",null))),C=window.wp.primitives,T=(0,r.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(C.Path,{d:"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"})),k=(0,r.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(C.Path,{fillRule:"evenodd",d:"M19.75 11H21V8.667L19.875 4H4.125L3 8.667V11h1.25v8.75h15.5V11zm-1.5 0H5.75v7.25H10V13h4v5.25h4.25V11zm-5.5-5.5h2.067l.486 3.24.028.76H12.75v-4zm-3.567 0h2.067v4H8.669l.028-.76.486-3.24zm7.615 3.1l-.464-3.1h2.36l.806 3.345V9.5h-2.668l-.034-.9zM7.666 5.5h-2.36L4.5 8.845V9.5h2.668l.034-.9.464-3.1z",clipRule:"evenodd"})),x=(0,r.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(C.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,r.createElement)(C.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})),N=({onNavItemChange:e,activeNavItem:a})=>{const o=a=>{e(a)};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.Panel,null,(0,r.createElement)(l.PanelBody,{icon:T,title:"Google Tag Manager",initialOpen:!0},(0,r.createElement)(l.PanelRow,null,(0,r.createElement)(l.__experimentalNavigation,{activeItem:a,className:"navigation-story",onActivateMenu:function(){}},(0,r.createElement)(l.__experimentalNavigationMenu,{title:""},(0,r.createElement)(l.__experimentalNavigationItem,{item:"item-1",onClick:()=>o("item-1"),title:(0,t.__)("Settings","datalayer-for-woocommerce")}),(0,r.createElement)(l.__experimentalNavigationItem,{item:"item-2",onClick:()=>o("item-2"),title:(0,t.__)("Tags Synchronization","datalayer-for-woocommerce")}),(0,r.createElement)(l.__experimentalNavigationItem,{item:"item-3",onClick:()=>o("item-3"),title:(0,t.__)("Consent Mode","datalayer-for-woocommerce")}),(0,r.createElement)(l.__experimentalNavigationItem,{item:"item-4",onClick:()=>o("item-4"),title:(0,t.__)("Server-to-Server","datalayer-for-woocommerce")}))))),(0,r.createElement)(l.PanelBody,{title:"Ecommerce",icon:k,initialOpen:!0},(0,r.createElement)(l.PanelRow,null,(0,r.createElement)(l.__experimentalNavigation,{activeItem:a,className:"navigation-story",onActivateMenu:function(){}},(0,r.createElement)(l.__experimentalNavigationMenu,{title:""},(0,r.createElement)(l.__experimentalNavigationItem,{item:"item-5",onClick:()=>o("item-5"),title:(0,t.__)("Settings","datalayer-for-woocommerce")}),(0,r.createElement)(l.__experimentalNavigationItem,{item:"item-6",onClick:()=>o("item-6"),title:(0,t.__)("Promotions","datalayer-for-woocommerce")}),(0,r.createElement)(l.__experimentalNavigationItem,{item:"item-7",onClick:()=>o("item-7"),title:(0,t.__)("Advanced","datalayer-for-woocommerce")}))))),(0,r.createElement)(l.PanelBody,{title:"Extra",icon:x,initialOpen:!0},(0,r.createElement)(l.PanelRow,null,(0,r.createElement)(l.__experimentalNavigation,{activeItem:a,className:"navigation-story",onActivateMenu:function(){}},(0,r.createElement)(l.__experimentalNavigationMenu,{title:""},(0,r.createElement)(l.__experimentalNavigationItem,{item:"item-8",onClick:()=>o("item-8"),title:(0,t.__)("Debug Bar","datalayer-for-woocommerce")}),(0,r.createElement)(l.__experimentalNavigationItem,{item:"item-9",onClick:()=>o("item-9"),title:(0,t.__)("Popup Consent Mode","datalayer-for-woocommerce")}),(0,r.createElement)(l.__experimentalNavigationItem,{item:"item-10",onClick:()=>o("item-10"),title:(0,t.__)("Post Data","datalayer-for-woocommerce")}),(0,r.createElement)(l.__experimentalNavigationItem,{item:"item-11",onClick:()=>o("item-11"),title:(0,t.__)("Help","datalayer-for-woocommerce")}),(0,r.createElement)(l.__experimentalNavigationItem,{item:"item-12",onClick:()=>o("item-12"),title:(0,t.__)("About","datalayer-for-woocommerce")})))))))};const F={tracking_google_tag_manager:"",data_layer_google_tag_manager_enhanced_ecommerce:!1,data_layer_google_tag_manager_ecommerce_ga4:!1,data_layer_google_tag_manager_show_user_info:!1,data_layer_google_tag_manager_related_product_show:!1},P={initSettings(e){return{type:"STATE_FROM_DATABASE",payload:{...e}}},*saveSettings(e,a){const t={...F,...a,...e};try{return yield P.saveSettingsToDatabase(t),{type:"SAVE_SETTINGS",payload:t}}catch(e){throw e}},saveSettingsToDatabase(e){return{type:"SAVE_SETTINGS_TO_DATABASE",payload:e}}},A={getState(e){return{...F,...e}},getSettings(e){const{...a}=e;return a},getEcommerceData(e){const{data_layer_google_tag_manager_purchase_only_once:a,data_layer_google_tag_manager_show_user_info:t,data_layer_google_tag_manager_javascript_events:r}=e;return{data_layer_google_tag_manager_purchase_only_once:a,data_layer_google_tag_manager_show_user_info:t,data_layer_google_tag_manager_javascript_events:r}}},D={getSettings(){return async({dispatch:e})=>{const a=await i()({path:"/wp/v2/settings"});e.initSettings(a.options_tracking_option_free)}}},I={async SAVE_SETTINGS_TO_DATABASE(e){try{const a=await i()({path:"/wp/v2/settings"});if(a&&a.options_tracking_option_free)return await i()({path:"/wp/v2/settings",method:"PUT",body:JSON.stringify({options_tracking_option_free:e.payload})}),e;throw"error"}catch(e){throw e}}},L=(0,_.createReduxStore)("shop-datalayer-for-ecommerce-free",{reducer:(e=F,a)=>{switch(a.type){case"STATE_FROM_DATABASE":case"SAVE_SETTINGS":return{...e,...a.payload};default:return e}},actions:P,selectors:A,resolvers:D,controls:I});(0,_.register)(L);var z=e.p+"images/logo-datalayer-for-ecommerce-free.1a10e733.png",M=()=>{const[e,a]=(0,o.useState)("item-1");return(0,_.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getSettings())),(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"wrap datalayer-for-ecommerce-free"},(0,r.createElement)("div",{className:"content-sidebar-datalayer-for-ecommerce-free-wrap"},(0,r.createElement)("div",{className:"logoDatalayer"},(0,r.createElement)("img",{src:z,width:"100",alt:"Datalayer for WooCommerce Icon"})),(0,r.createElement)(N,{onNavItemChange:e=>{a(e)},activeNavItem:e})),(0,r.createElement)("div",{className:"content-form-datalayer-for-ecommerce-free-wrap"},"item-1"===e&&(0,r.createElement)(m,null),"item-2"===e&&(0,r.createElement)(g,null),"item-3"===e&&(0,r.createElement)(s,null),"item-4"===e&&(0,r.createElement)(p,null),"item-5"===e&&(0,r.createElement)(y,null),"item-6"===e&&(0,r.createElement)(f,null),"item-7"===e&&(0,r.createElement)(h,null),"item-8"===e&&(0,r.createElement)(v,null),"item-9"===e&&(0,r.createElement)(E,null),"item-10"===e&&(0,r.createElement)(b,null),"item-11"===e&&(0,r.createElement)(w,null),"item-12"===e&&(0,r.createElement)(S,null))))};(0,a.addFilter)("woocommerce_admin_pages_list","datalayer-for-ecommerce-free",(e=>(e.push({breadcrumbs:["",wcSettings.woocommerceTranslation,(0,t.__)("Datalayer for WooCommerce FREE","datalayer-for-ecommerce-free")],capability:"manage_options",container:M,path:"/datalayer-for-ecommerce-free",wpOpenMenu:"toplevel_page_woocommerce",title:(0,t.__)("Datalayer for WooCommerce FREE","datalayer-for-ecommerce-free"),navArgs:{id:"datalayer-for-ecommerce-free"}}),e)))}();
     1(()=>{"use strict";var e={20:(e,a,o)=>{var t=o(609),r=Symbol.for("react.element"),_=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,l=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,a,o){var t,_={},c=null,g=null;for(t in void 0!==o&&(c=""+o),void 0!==a.key&&(c=""+a.key),void 0!==a.ref&&(g=a.ref),a)n.call(a,t)&&!s.hasOwnProperty(t)&&(_[t]=a[t]);if(e&&e.defaultProps)for(t in a=e.defaultProps)void 0===_[t]&&(_[t]=a[t]);return{$$typeof:r,type:e,key:c,ref:g,props:_,_owner:l.current}}a.Fragment=_,a.jsx=c,a.jsxs=c},848:(e,a,o)=>{e.exports=o(20)},609:e=>{e.exports=window.React}},a={};function o(t){var r=a[t];if(void 0!==r)return r.exports;var _=a[t]={exports:{}};return e[t](_,_.exports,o),_.exports}o.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return o.d(a,{a}),a},o.d=(e,a)=>{for(var t in a)o.o(a,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var a=o.g.document;if(!e&&a&&(a.currentScript&&"SCRIPT"===a.currentScript.tagName.toUpperCase()&&(e=a.currentScript.src),!e)){var t=a.getElementsByTagName("script");if(t.length)for(var r=t.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=t[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();const t=window.wp.hooks,r=window.wp.i18n,_=window.wp.element,n=window.wp.data,l=window.wp.components,s=window.wp.notices,c=window.wc.components;var g=o(848);const i=e=>{const{createSuccessNotice:a,createErrorNotice:o}=(0,n.useDispatch)(s.store),t=(0,n.useDispatch)(),[i,d]=(0,_.useState)(!1),{getFields:m,isLoading:p}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[h,y]=(0,_.useState)({tracking_google_tag_manager:"",data_layer_google_tag_manager_custom_domain_server_side:"",data_layer_google_tag_manager_custom_script_filename_server_side:"",data_layer_google_tag_manager_custom_environment_gtm_auth:"",data_layer_google_tag_manager_custom_environment_gtm_preview:""}),u=(0,_.useCallback)(((e,a)=>{y((o=>({...o,[a]:e})))}),[]),f=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,_.useEffect)((()=>{m&&y(m)}),[m]);const x=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Example: GTM-XXXXXX - ","datalayer-for-ecommerce-free"),(0,g.jsx)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/6103696",children:"Read more"})]}),v=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Example: https://DOMAIN-NAME.com - Send Google scripts gtm.js directly from your tagging server - ","datalayer-for-ecommerce-free"),(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/tag-platform/tag-manager/server-side/send-data?hl=en#update_the_gtmjs_source_domain",children:"Read more"}),"\n",(0,r.__)("Leave empty if you don't use GTM Server Side","datalayer-for-ecommerce-free")]}),b=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Example: filename.js - Enter a custom name for the file gtm.js","datalayer-for-ecommerce-free"),"\n",(0,r.__)("Only use for custom file loader in your GTM Server Side","datalayer-for-ecommerce-free")]}),j=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Insert gtm_auth to use a custom environment - ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/6311518?hl=en",children:"Read more"}),"\n",(0,r.__)("Leave empty if you don't use GTM Custom Environment","datalayer-for-woocommerce")]}),w=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Insert gtm_preview to use a custom environment - ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/6311518?hl=en",children:"Read more"}),"\n",(0,r.__)("Leave empty if you don't use GTM Custom Environment","datalayer-for-woocommerce")]});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Google Tag Manager Settings","datalayer-for-ecommerce-free")}),p?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Google Tag Manager ID","datalayer-for-ecommerce-free"),value:h.tracking_google_tag_manager,onChange:e=>u(e,"tracking_google_tag_manager"),help:x}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{d(!0),await t("shop-datalayer-for-ecommerce-free").saveSettings({tracking_google_tag_manager:h.tracking_google_tag_manager,data_layer_google_tag_manager_custom_domain_server_side:h.data_layer_google_tag_manager_custom_domain_server_side,data_layer_google_tag_manager_custom_script_filename_server_side:h.data_layer_google_tag_manager_custom_script_filename_server_side,data_layer_google_tag_manager_custom_environment_gtm_auth:h.data_layer_google_tag_manager_custom_environment_gtm_auth,data_layer_google_tag_manager_custom_environment_gtm_preview:h.data_layer_google_tag_manager_custom_environment_gtm_preview},f),d(!1),a((0,r.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),o("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:i,children:i?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-ecommerce-free")]}):(0,r.__)("Save","datalayer-for-ecommerce-free")})}),(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Custom domain GTM Server Side","datalayer-for-ecommerce-free"),help:v}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Custom script filename GTM Server Side","datalayer-for-ecommerce-free"),help:b}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Custom Environment gtm_auth","datalayer-for-woocommerce"),help:j}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Custom Environment gtm_preview","datalayer-for-woocommerce"),help:w})]})]}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},d=()=>(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Google Tag Manager Tags Synchronization","datalayer-for-ecommerce-free")}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{variant:"primary",href:"https://demoshop.arrayevida.com.br/wp-content/uploads/2024/07/workspace.zip",children:(0,r.__)("Download Import File GTM","datalayer-for-ecommerce-free")})})]}),m=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),{getFields:d,isLoading:m}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[p,h]=(0,_.useState)({data_layer_google_tag_manager_consent_mode_default:"",data_layer_google_tag_manager_consent_mode_default_ad_storage:"",data_layer_google_tag_manager_consent_mode_default_ad_user_data:"",data_layer_google_tag_manager_consent_mode_default_ad_personalization:"",data_layer_google_tag_manager_consent_mode_default_analytics_storage:"",data_layer_google_tag_manager_consent_mode_default_functionality_storage:"",data_layer_google_tag_manager_consent_mode_default_personalization_storage:"",data_layer_google_tag_manager_consent_mode_default_security_storage:""}),y=(0,_.useCallback)(((e,a)=>{h((o=>({...o,[a]:e})))}),[]),u=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,_.useEffect)((()=>{d&&h(d)}),[d]);const f=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Enable to trigger for all parameters consent to denied. ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/tag-platform/security/guides/consent?consentmode=advanced#default-consent",children:"Read more"})]}),x=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_storage consent to granted","datalayer-for-woocommerce")}),v=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_user_data consent to granted","datalayer-for-woocommerce")}),b=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_personalization consent to granted","datalayer-for-woocommerce")}),j=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger analytics_storage consent to granted","datalayer-for-woocommerce")}),w=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger functionality_storage consent to granted","datalayer-for-woocommerce")}),S=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger personalization_storage consent to granted","datalayer-for-woocommerce")}),C=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger security_storage consent to granted","datalayer-for-woocommerce")}),N=p.data_layer_google_tag_manager_consent_mode_default;return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Google Tag Manager Consent Mode","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsxs)(l.Tip,{children:[(0,r.__)("Use this feature to trigger DEFAULT consent before the GTM declaration.","datalayer-for-woocommerce"),"\n",(0,r.__)("This feature does not replace the use of a consent tool. If the consent tool already triggers a DEFAULT consent, you do not need to use this feature.","datalayer-for-woocommerce")," ",(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/document/datalayer-for-woocommerce/#consent-mode",children:(0,r.__)("Read more","datalayer-for-woocommerce")})]}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),m?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Google Consent Mode","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default"),help:f}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Ad Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_ad_storage"),help:x,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Ad User Data","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_ad_user_data"),help:v,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Ad Personalization","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_ad_personalization"),help:b,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Analytics Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_analytics_storage"),help:j,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Functionality Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_functionality_storage"),help:w,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Personalization Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_personalization_storage"),help:S,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Security Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_security_storage"),help:C,disabled:!N}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_consent_mode_default:p.data_layer_google_tag_manager_consent_mode_default,data_layer_google_tag_manager_consent_mode_default_ad_storage:p.data_layer_google_tag_manager_consent_mode_default_ad_storage,data_layer_google_tag_manager_consent_mode_default_ad_user_data:p.data_layer_google_tag_manager_consent_mode_default_ad_user_data,data_layer_google_tag_manager_consent_mode_default_ad_personalization:p.data_layer_google_tag_manager_consent_mode_default_ad_personalization,data_layer_google_tag_manager_consent_mode_default_analytics_storage:p.data_layer_google_tag_manager_consent_mode_default_analytics_storage,data_layer_google_tag_manager_consent_mode_default_functionality_storage:p.data_layer_google_tag_manager_consent_mode_default_functionality_storage,data_layer_google_tag_manager_consent_mode_default_personalization_storage:p.data_layer_google_tag_manager_consent_mode_default_personalization_storage,data_layer_google_tag_manager_consent_mode_default_security_storage:p.data_layer_google_tag_manager_consent_mode_default_security_storage},u),i(!1),e((0,r.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},p=window.wp.apiFetch;var h=o.n(p);const y=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),[d,m]=(0,_.useState)(null),{getFields:p,isLoading:h}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[y,u]=(0,_.useState)({data_layer_google_tag_manager_server_to_server_container_url:"",data_layer_google_tag_manager_server_to_server_measurement_id:"",data_layer_google_tag_manager_server_to_server_preview_request_header:"",data_layer_google_tag_manager_server_to_server_purchase_event:"",data_layer_google_tag_manager_server_to_server_status_purchase_event:"",data_layer_google_tag_manager_server_to_server_order_pay_event:"",data_layer_google_tag_manager_server_to_server_status_order_pay_event:"",data_layer_google_tag_manager_server_to_server_refund_event:""}),f=((0,_.useCallback)(((e,a)=>{u((o=>({...o,[a]:e})))}),[]),(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState())));(0,_.useEffect)((()=>{p&&u(p)}),[p]);const x=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Insert preview request header to test manually send a preview request. ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/document/datalayer-for-woocommerce/#server-to-server-request-header",children:"Read more"})]});return y.data_layer_google_tag_manager_server_to_server_purchase_event,y.data_layer_google_tag_manager_server_to_server_order_pay_event,(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Google Tag Manager Server-to-Server","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsxs)(l.Tip,{children:[(0,r.__)("Use this feature to send events directly to GTM server side.","datalayer-for-woocommerce"),(0,g.jsx)("br",{}),(0,r.__)("Please note: This is an advanced feature. Recommended for experienced users only.","datalayer-for-woocommerce")," ",(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/tag-platform/tag-manager/server-side/send-data?hl=en&option=GTM#3_optional_send_data_from_sources_other_than_websites",children:(0,r.__)("Read more","datalayer-for-woocommerce")})]}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),h?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Google Server Container Url","datalayer-for-woocommerce"),help:(0,r.__)("Insert GTM Server container URL","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Measurement ID GA4","datalayer-for-woocommerce"),help:(0,r.__)("Insert Measurement ID GA4. Example: G-G999999999","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Preview Request Header","datalayer-for-woocommerce"),help:x,disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Save Cookies in Order","datalayer-for-woocommerce"),help:(0,r.__)("Enable to save user cookies in order and link web and server events","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Purchase Event","datalayer-for-woocommerce"),help:(0,r.__)("Enable to trigger purchase event directly via server side and stop via client web","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Purchase Event Status","datalayer-for-woocommerce"),options:d,help:(0,r.__)("Select which order status the purchase event should be triggered on","datalayer-for-woocommerce"),disabled:!0,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Order Pay Event","datalayer-for-woocommerce"),help:(0,r.__)("Enable to trigger order_pay event directly via server side","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Order Pay Status","datalayer-for-woocommerce"),options:d,help:(0,r.__)("Select which order status the order pay event should be triggered on","datalayer-for-woocommerce"),disabled:!0,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Order Refund Event","datalayer-for-woocommerce"),help:(0,r.__)("Enable to trigger refund event directly via server side","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_server_to_server_container_url:y.data_layer_google_tag_manager_server_to_server_container_url,data_layer_google_tag_manager_server_to_server_measurement_id:y.data_layer_google_tag_manager_server_to_server_measurement_id,data_layer_google_tag_manager_server_to_server_preview_request_header:y.data_layer_google_tag_manager_server_to_server_preview_request_header,data_layer_google_tag_manager_server_to_server_purchase_event:y.data_layer_google_tag_manager_server_to_server_purchase_event,data_layer_google_tag_manager_server_to_server_status_purchase_event:y.data_layer_google_tag_manager_server_to_server_status_purchase_event,data_layer_google_tag_manager_server_to_server_order_pay_event:y.data_layer_google_tag_manager_server_to_server_order_pay_event,data_layer_google_tag_manager_server_to_server_status_order_pay_event:y.data_layer_google_tag_manager_server_to_server_status_order_pay_event,data_layer_google_tag_manager_server_to_server_refund_event:y.data_layer_google_tag_manager_server_to_server_refund_event},f),i(!1),e((0,r.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},u=window.wp.coreData,f=e=>{const{createSuccessNotice:a,createErrorNotice:o}=(0,n.useDispatch)(s.store),t=(0,n.useDispatch)(),[i,d]=(0,_.useState)(!1),{getFields:m,isLoading:p,getBrands:h}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings"),getBrands:e(u.store).getTaxonomies({type:"product"})})),[]),[y,f]=(0,_.useState)({data_layer_google_tag_manager_ecommerce_ga4:!1,data_layer_google_tag_manager_related_product_show:!1}),x=h?h.map((e=>({label:e.labels.name,value:e.slug}))):[];x.unshift({label:"Do not use",value:"none"});const v=(0,_.useCallback)(((e,a)=>{f((o=>({...o,[a]:e})))}),[]),b=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,_.useEffect)((()=>{m&&f(m)}),[m]);const j=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Enable to use datalayer only with ","datalayer-for-ecommerce-free"),(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/tag-manager/ecommerce-ga4?hl=en",children:"Ecommerce (GA4)"})]}),w=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select if product items show ID or SKU","datalayer-for-ecommerce-free")}),S=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select the taxonomy containing Product Brands","datalayer-for-ecommerce-free")}),C=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select when the event should be triggered","datalayer-for-ecommerce-free")}),N=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select when the event should be triggered","datalayer-for-ecommerce-free")}),T=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select when the view_item event should fire if its a product variable","datalayer-for-ecommerce-free")}),E=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to show variable product variants as an individual product","datalayer-for-ecommerce-free")}),k=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to show event view_item_list for related product in page product","datalayer-for-woocommerce")}),F=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Enable to show discount in ecommerce.items when product is on sale - ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/analytics/devguides/collection/ga4/apply-discount?client_type=gtag",children:"Read more"})]});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Ecommerce Settings","datalayer-for-ecommerce-free")}),p?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("DataLayer for WooCommerce Ecommerce GA4","datalayer-for-ecommerce-free"),checked:y.data_layer_google_tag_manager_ecommerce_ga4,onChange:e=>v(e,"data_layer_google_tag_manager_ecommerce_ga4"),help:j}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Show view_item_list related product","datalayer-for-woocommerce"),checked:y.data_layer_google_tag_manager_related_product_show,onChange:e=>v(e,"data_layer_google_tag_manager_related_product_show"),help:k}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{d(!0),await t("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_ecommerce_ga4:y.data_layer_google_tag_manager_ecommerce_ga4,data_layer_google_tag_manager_related_product_show:y.data_layer_google_tag_manager_related_product_show},b),d(!1),a((0,r.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),o("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:i,children:i?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-ecommerce-free")]}):(0,r.__)("Save","datalayer-for-ecommerce-free")})}),(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Product Items","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_product_items,options:[{label:"ID",value:"ID"},{label:"SKU",value:"SKU"}],onChange:e=>v(e,"data_layer_google_tag_manager_product_items"),help:w}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Product Brands","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_product_brands,options:x,onChange:e=>v(e,"data_layer_google_tag_manager_product_brands"),help:S}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Event add_shipping_info","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_javascript_event_add_shipping_info,options:[{label:"Shipping selected",value:"Shipping selected"},{label:"Place order button",value:"Place order button"}],onChange:e=>v(e,"data_layer_google_tag_manager_javascript_event_add_shipping_info"),help:C}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Event add_payment_info","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_javascript_event_add_payment_info,options:[{label:"Payment selected",value:"Payment selected"},{label:"Place order button",value:"Place order button"}],onChange:e=>v(e,"data_layer_google_tag_manager_javascript_event_add_payment_info"),help:N}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Variable product event view_item","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_javascript_event_view_item,options:[{label:"Parent product page view",value:"Parent product page view"},{label:"When selecting a variation",value:"When selecting a variation"},{label:"Parent product page view and When selecting a variation",value:"Parent product page view and When selecting a variation"}],onChange:e=>v(e,"data_layer_google_tag_manager_javascript_event_view_item"),help:T}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Variable product as individual product","datalayer-for-ecommerce-free"),checked:y.data_layer_google_tag_manager_variable_product_as_individual,onChange:e=>v(e,"data_layer_google_tag_manager_variable_product_as_individual"),help:E}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Show discount in ecommerce.items when product is on sale","datalayer-for-woocommerce"),checked:y.data_layer_google_tag_manager_discount_in_items_show,onChange:e=>v(e,"data_layer_google_tag_manager_discount_in_items_show"),help:F})]})]}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},x=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),[d,m]=(0,_.useState)(!1),[p,h]=(0,_.useState)(null),[y,f]=(0,_.useState)(!1),x=()=>f(!1),{getFields:v,isLoading:b,getProducts:j}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings"),getProducts:e(u.store).getEntityRecords("postType","product",{per_page:-1})})),[]),[w,S]=(0,_.useState)({data_layer_google_tag_manager_promotions:[]}),[C,N]=(0,_.useState)({}),T=j?j.map((e=>({key:e.id,label:e.title.rendered,value:{id:e.id}}))):[],E=(0,_.useCallback)(((e,a)=>{N((o=>({...o,[a]:e})))}),[]),k=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));return(0,_.useEffect)((()=>{v&&S(v)}),[v]),(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Ecommerce Promotions","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsxs)(l.Tip,{children:[(0,r.__)("Create the promotions that will be used to trigger the","datalayer-for-woocommerce")," ",(0,g.jsx)("b",{children:"select_promotion"})," and ",(0,g.jsx)("b",{children:"view_promotion"})," events."," ",(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?hl=en&client_type=gtm#apply_promotions",children:(0,r.__)("Read more","datalayer-for-woocommerce")})]}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),b?(0,g.jsx)(g.Fragment,{children:y?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"form-fields",children:[(0,g.jsx)(l.ToggleControl,{label:(0,r.__)("Status Promotion","datalayer-for-woocommerce"),checked:C.status,onChange:e=>E(e,"status"),help:(0,r.__)("Select promotion status","datalayer-for-woocommerce")}),(0,g.jsx)(l.TextControl,{label:(0,r.__)("Promotion ID","datalayer-for-woocommerce"),value:C.promotion_id,onChange:e=>E(e,"promotion_id"),help:(0,r.__)("The ID of the promotion associated with the event","datalayer-for-woocommerce")}),(0,g.jsx)(l.TextControl,{label:(0,r.__)("Promotion Name","datalayer-for-woocommerce"),value:C.promotion_name,onChange:e=>E(e,"promotion_name"),help:(0,r.__)("The name of the promotion associated with the event","datalayer-for-woocommerce")}),(0,g.jsx)(l.TextControl,{label:(0,r.__)("Creative Name","datalayer-for-woocommerce"),value:C.creative_name,onChange:e=>E(e,"creative_name"),help:(0,r.__)("The name of the promotional creative","datalayer-for-woocommerce")}),(0,g.jsx)(l.TextControl,{label:(0,r.__)("Creative Slot","datalayer-for-woocommerce"),value:C.creative_slot,onChange:e=>E(e,"creative_slot"),help:(0,r.__)("The name of the promotional creative slot associated with the event","datalayer-for-woocommerce")}),(0,g.jsx)("label",{className:"components-base-control__label css-1v57ksj ej5x27r2 label_external",htmlFor:"woocommerce-select-control-1",children:"Products"}),(0,g.jsx)(c.SelectControl,{label:(0,r.__)("Select products","datalayer-for-woocommerce"),help:(0,r.__)("Select the products for which the event will be triggered","datalayer-for-woocommerce"),options:T,selected:C.products,onChange:e=>E(e,"products"),isSearchable:!0,multiple:!0,showClearButton:!0,hideBeforeSearch:!0,staticList:!0}),(0,g.jsxs)("div",{className:"form-buttons",children:[(0,g.jsx)(l.Button,{onClick:x,variant:"secondary",children:(0,r.__)("Cancel","datalayer-for-woocommerce")}),(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0);const a=w.data_layer_google_tag_manager_promotions.map((e=>e.id===C.id?{...e,...C}:e));w.data_layer_google_tag_manager_promotions.find((e=>e.id===C.id))||a.push(C),S({...w,data_layer_google_tag_manager_promotions:a}),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_promotions:a},k),i(!1),x(),e((0,r.__)("Promotion saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:t,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})]})]})}):(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woo.woocommerce/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsxs)("table",{className:"wp-list-table widefat fixed striped table-view-list",children:[(0,g.jsx)("thead",{children:(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{style:{width:100},children:"#"}),(0,g.jsx)("td",{children:(0,r.__)("Promotion ID","datalayer-for-woocommerce")}),(0,g.jsx)("td",{children:(0,r.__)("Promotion Name","datalayer-for-woocommerce")}),(0,g.jsx)("td",{style:{width:100},children:(0,r.__)("Status","datalayer-for-woocommerce")}),(0,g.jsx)("td",{style:{width:450},children:(0,r.__)("Actions","datalayer-for-woocommerce")})]})}),(0,g.jsx)("tbody",{})]}),(0,g.jsx)("div",{className:"form-fields-button",children:(0,g.jsx)(l.Button,{onClick:()=>{const e=w.data_layer_google_tag_manager_promotions;let a=1;e.length>0&&(a=Math.max(...e.map((e=>parseInt(e.id,10))))+1),N({id:a,status:!1,promotion_id:"",promotion_name:"",creative_name:"",creative_slot:""}),f(!0)},variant:"primary",disabled:!0,children:(0,r.__)("Create","datalayer-for-woocommerce")})})]})})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},v=e=>{const{createSuccessNotice:a,createErrorNotice:o}=(0,n.useDispatch)(s.store),t=(0,n.useDispatch)(),[i,d]=(0,_.useState)(!1),{getFields:m,isLoading:p}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[h,y]=(0,_.useState)({data_layer_google_tag_manager_show_user_info:!1}),u=(0,_.useCallback)(((e,a)=>{y((o=>({...o,[a]:e})))}),[]),f=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,_.useEffect)((()=>{m&&y(m)}),[m]);const x=(0,g.jsx)(g.Fragment,{children:(0,r.__)("When a user refreshes the thank you page, the purchase event is not sent again. Prevent duplicate transactions in analytics","datalayer-for-ecommerce-free")}),v=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable this option if user information show when logged.","datalayer-for-ecommerce-free")}),b=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable this option via javascript as an alternative when your theme fails to load the hook add_to_cart with php.","datalayer-for-ecommerce-free")});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Ecommerce Advanced","datalayer-for-ecommerce-free")}),p?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Show user info","datalayer-for-ecommerce-free"),checked:h.data_layer_google_tag_manager_show_user_info,onChange:e=>u(e,"data_layer_google_tag_manager_show_user_info"),help:v}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{d(!0),await t("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_show_user_info:h.data_layer_google_tag_manager_show_user_info},f),d(!1),a((0,r.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),o("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:i,children:i?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-ecommerce-free")]}):(0,r.__)("Save","datalayer-for-ecommerce-free")})}),(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Trigger Purchase only once","datalayer-for-ecommerce-free"),checked:h.data_layer_google_tag_manager_purchase_only_once,onChange:e=>u(e,"data_layer_google_tag_manager_purchase_only_once"),help:x}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Events with Javascript","datalayer-for-ecommerce-free"),checked:h.data_layer_google_tag_manager_javascript_events,onChange:e=>u(e,"data_layer_google_tag_manager_javascript_events"),help:b})]})]}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},b=e=>{const{createSuccessNotice:a,createErrorNotice:o}=(0,n.useDispatch)(s.store),t=(0,n.useDispatch)(),[i,d]=(0,_.useState)(!1),{getFields:m,isLoading:p}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[h,y]=(0,_.useState)({data_layer_google_tag_manager_debug_activate:!1}),u=((0,_.useCallback)(((e,a)=>{y((o=>({...o,[a]:e})))}),[]),(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState())));(0,_.useEffect)((()=>{m&&y(m)}),[m]);const f=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Activate DEBUG BAR TEST MODE","datalayer-for-ecommerce-free")});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Extra Debug Bar","datalayer-for-ecommerce-free")}),p?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{disabled:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Activate Test Debugger Bar","datalayer-for-ecommerce-free"),help:f}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{d(!0),await t("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_debug_activate:h.data_layer_google_tag_manager_debug_activate},u),d(!1),a((0,r.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),o("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:i?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-ecommerce-free")]}):(0,r.__)("Save","datalayer-for-ecommerce-free")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},j=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),[o,t]=((0,n.useDispatch)(),(0,_.useState)(!1)),{getFields:i,isLoading:d}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[m,p]=(0,_.useState)({}),h=(0,_.useCallback)(((e,a)=>{p((o=>({...o,[a]:e})))}),[]);(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState())),(0,_.useEffect)((()=>{i&&p(i)}),[i]);const y=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Enable to trigger Popup Consent Mode. ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/10718549",children:"Read more"})]}),u=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_storage consent option","datalayer-for-woocommerce")}),f=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_user_data consent option","datalayer-for-woocommerce")}),x=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_personalization consent option","datalayer-for-woocommerce")}),v=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger analytics_storage consent option","datalayer-for-woocommerce")}),b=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger functionality_storage consent option","datalayer-for-woocommerce")}),j=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger personalization_storage consent option","datalayer-for-woocommerce")}),w=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger security_storage consent option","datalayer-for-woocommerce")});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Popup Consent Mode","datalayer-for-woocommerce")}),d?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Popup Consent Mode","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup"),help:y}),(0,g.jsx)("div",{className:"form-subtitle",children:(0,r.__)("Consent Types","datalayer-for-woocommerce")}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_ad_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_ad_storage"),help:u,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_ad_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_ad_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_ad_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_text_ad_storage"),help:(0,r.__)("Example: Enables storage (such as cookies) related to advertising","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad User Data","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data"),help:f,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_ad_user_data,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_ad_user_data"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad User Data Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_ad_user_data,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_text_ad_user_data"),help:(0,r.__)("Example: Sets consent for sending user data related to advertising to Google","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad Personalization","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization"),help:x,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_ad_personalization,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_ad_personalization"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad Personalization Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_ad_personalization,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_text_ad_personalization"),help:(0,r.__)("Example: Sets consent for personalized advertising","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Analytics Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage"),help:v,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_analytics_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_analytics_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Analytics Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_analytics_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_text_analytics_storage"),help:(0,r.__)("Example: Enables storage (such as cookies) related to analytics e.g. visit duration","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Functionality Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage"),help:b,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_functionality_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_functionality_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Functionality Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_functionality_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_text_functionality_storage"),help:(0,r.__)("Example: Enables storage that supports the functionality of the website or app e.g. language settings","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Personalization Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage"),help:j,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_personalization_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_personalization_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Personalization Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_personalization_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_text_personalization_storage"),help:(0,r.__)("Example: Enables storage related to personalization e.g. video recommendations","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Security Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_security_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_security_storage"),help:w,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_security_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_security_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_security_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Security Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_security_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_text_security_storage"),help:(0,r.__)("Example: Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_security_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)("div",{className:"form-subtitle",children:(0,r.__)("Popup Style","datalayer-for-woocommerce")}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Style","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_style,options:[{label:"BOTTOM",value:"BOTTOM"},{label:"FLOAT LEFT",value:"FLOAT LEFT"},{label:"FLOAT RIGHT",value:"FLOAT RIGHT"},{label:"CENTER",value:"CENTER"}],onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_style"),help:(0,r.__)("Select popup style","datalayer-for-woocommerce")}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{t(!0),e((0,r.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:o?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},w=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),{getFields:d,isLoading:m}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[p,h]=(0,_.useState)({data_layer_google_tag_manager_post_data_active:!1,data_layer_google_tag_manager_post_data_page_title:!1,data_layer_google_tag_manager_post_data_visitor_type:!1,data_layer_google_tag_manager_post_data_page_post_type:!1,data_layer_google_tag_manager_post_data_page_post_date:!1,data_layer_google_tag_manager_post_data_page_post_author:!1,data_layer_google_tag_manager_post_data_page_post_author_id:!1,data_layer_google_tag_manager_post_data_page_category:!1,data_layer_google_tag_manager_post_data_page_tags:!1,data_layer_google_tag_manager_post_data_page_id:!1}),y=(0,_.useCallback)(((e,a)=>{h((o=>({...o,[a]:e})))}),[]),u=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));return(0,_.useEffect)((()=>{d&&h(d)}),[d]),(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Post Data","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsxs)(l.Tip,{children:[(0,r.__)("Select the post data that will be used to trigger the","datalayer-for-woocommerce")," ",(0,g.jsx)("b",{children:"Pageview"})," event."]}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),m?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Active Event Pageview","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_active"),help:(0,r.__)("Active Event Pageview","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Title","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_title"),help:(0,r.__)("Insert pageTitle parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Visitor Type","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_visitor_type"),help:(0,r.__)("Insert visitorType parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Post Type","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_type"),help:(0,r.__)("Insert pagePostType parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Date","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_date"),help:(0,r.__)("Insert pagePostDate parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Author","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_author"),help:(0,r.__)("Insert pagePostAuthor parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Author ID","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_author_id"),help:(0,r.__)("Insert pagePostAuthorId parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Category","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_category"),help:(0,r.__)("Insert pageCategory parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Tags","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_tags"),help:(0,r.__)("Insert pageTags parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page ID","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_id"),help:(0,r.__)("Insert pageId parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_post_data_active:p.data_layer_google_tag_manager_post_data_active,data_layer_google_tag_manager_post_data_page_title:p.data_layer_google_tag_manager_post_data_page_title,data_layer_google_tag_manager_post_data_visitor_type:p.data_layer_google_tag_manager_post_data_visitor_type,data_layer_google_tag_manager_post_data_page_post_type:p.data_layer_google_tag_manager_post_data_page_post_type,data_layer_google_tag_manager_post_data_page_post_date:p.data_layer_google_tag_manager_post_data_page_post_date,data_layer_google_tag_manager_post_data_page_post_author:p.data_layer_google_tag_manager_post_data_page_post_author,data_layer_google_tag_manager_post_data_page_post_author_id:p.data_layer_google_tag_manager_post_data_page_post_author_id,data_layer_google_tag_manager_post_data_page_category:p.data_layer_google_tag_manager_post_data_page_category,data_layer_google_tag_manager_post_data_page_tags:p.data_layer_google_tag_manager_post_data_page_tags,data_layer_google_tag_manager_post_data_page_id:p.data_layer_google_tag_manager_post_data_page_id},u),i(!1),e((0,r.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},S=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),[d,m]=(0,_.useState)([]),{getFields:p,isLoading:h}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[y,u]=(0,_.useState)({data_layer_google_tag_manager_catalog_feed_google:!1,data_layer_google_tag_manager_catalog_feed_facebook:!1}),f=(0,_.useCallback)(((e,a)=>{u((o=>({...o,[a]:e})))}),[]),x=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState())),v=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Active for Create a product file for Merchant Center. ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://support.google.com/merchants/answer/12631822?&hl=en",children:(0,r.__)("Read more","datalayer-for-woocommerce")})]}),b=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Active for Create a product file for Meta. ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://web.facebook.com/business/help/1898524300466211?id=725943027795860",children:(0,r.__)("Read more","datalayer-for-woocommerce")})]});return(0,_.useEffect)((()=>{p&&u(p)}),[p]),(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Catalog Feed","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsx)(l.Tip,{children:(0,r.__)("Create a Catalog Feed files for platforms.","datalayer-for-woocommerce")}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),h?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{disabled:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Google Merchant Center","datalayer-for-woocommerce"),onChange:e=>f(e,"data_layer_google_tag_manager_catalog_feed_google"),help:v}),(0,g.jsx)(l.ToggleControl,{disabled:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Facebook Catalog","datalayer-for-woocommerce"),onChange:e=>f(e,"data_layer_google_tag_manager_catalog_feed_facebook"),help:b}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_catalog_feed_google:y.data_layer_google_tag_manager_catalog_feed_google,data_layer_google_tag_manager_catalog_feed_facebook:y.data_layer_google_tag_manager_catalog_feed_facebook},x),i(!1),e((0,r.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})}),d.length>0&&(0,g.jsxs)("div",{className:"feed-url",children:[(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("p",{children:(0,r.__)("Catalog feeds generated:","datalayer-for-woocommerce")}),(0,g.jsx)("ul",{children:d.map(((e,a)=>(0,g.jsx)("li",{children:(0,g.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:e})},a)))})]})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},C=()=>(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Help","datalayer-for-ecommerce-free")}),(0,g.jsxs)(l.Flex,{gap:"20",justify:"flex-start",children:[(0,g.jsx)(l.FlexItem,{children:(0,g.jsxs)(l.Card,{children:[(0,g.jsx)(l.CardHeader,{children:(0,g.jsx)(l.__experimentalHeading,{level:1,children:(0,r.__)("Contact us","datalayer-for-ecommerce-free")})}),(0,g.jsx)(l.CardBody,{children:(0,g.jsx)(l.Button,{variant:"secondary",href:"https://wordpress.org/support/plugin/datalayer-for-ecommerce-free/",target:"_blank",children:(0,r.__)("Create ticket","datalayer-for-ecommerce-free")})})]})}),(0,g.jsx)(l.FlexItem,{children:(0,g.jsxs)(l.Card,{children:[(0,g.jsx)(l.CardHeader,{children:(0,g.jsx)(l.__experimentalHeading,{level:1,children:(0,r.__)("Configuration","datalayer-for-ecommerce-free")})}),(0,g.jsx)(l.CardBody,{children:(0,g.jsx)(l.Button,{variant:"secondary",href:"https://wordpress.org/plugins/datalayer-for-ecommerce-free/#installation",target:"_blank",children:(0,r.__)("View documentation","datalayer-for-ecommerce-free")})})]})}),(0,g.jsx)(l.FlexItem,{children:(0,g.jsxs)(l.Card,{children:[(0,g.jsx)(l.CardHeader,{children:(0,g.jsx)(l.__experimentalHeading,{level:1,children:(0,r.__)("Review","datalayer-for-ecommerce-free")})}),(0,g.jsx)(l.CardBody,{children:(0,g.jsx)(l.Button,{variant:"secondary",href:"https://wordpress.org/support/plugin/datalayer-for-ecommerce-free/reviews/#new-post",target:"_blank",children:(0,r.__)("Send your review","datalayer-for-ecommerce-free")})})]})})]})]}),N=()=>(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("About","datalayer-for-ecommerce-free")}),(0,g.jsxs)("p",{children:["= 4.3.0 - 2024-10-28 =",(0,g.jsx)("br",{}),"* New: Option Show view_item_list related product in product page",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.6.2 WC 9.3.3",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 4.0.0 - 2024-07-03 =",(0,g.jsx)("br",{}),"* Remove: Option DataLayer for WooCommerce Enhanced Ecommerce removed",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.5.5 WC 9.0.2",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.4.0 - 2024-06-10 =",(0,g.jsx)("br",{}),"* Update: Push Datalayer function without jQuery",(0,g.jsx)("br",{}),"* Update: Get Country Code Phone Number User",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.5.3 WC 8.9.2",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.3.0 - 2024-03-27 =",(0,g.jsx)("br",{}),"* New: Parameter item_category with multiples categories in all events",(0,g.jsx)("br",{}),"* Fix: Php 8.2 deprecated function get options",(0,g.jsx)("br",{}),"* Fix: Product tax update in item price",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.4.3 WC 8.7.0",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.2.0 - 2023-12-15 =",(0,g.jsx)("br",{}),"* Update: Compatibility with multicurrency WPML plugin",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.4.2 WC 8.4.0",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.1.0 - 2023-11-29 =",(0,g.jsx)("br",{}),"* Update: Select only one datalayer type in ecommerce settings",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.4.1 WC 8.3.1",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.0.0 - 2023-10-30 =",(0,g.jsx)("br",{}),"* New: Full compatibility with WooCommerce Blocks",(0,g.jsx)("br",{}),"* New: New Modern Admin Page",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.3.2 WC 8.2.1",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 2.7.0 - 2023-06-21 =",(0,g.jsx)("br",{}),"* New: Select if user information show or not when logged",(0,g.jsx)("br",{}),"* New: Full Compatibility HPOS - High-Performance order storage (COT)",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.2.2 WC 7.8.0",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 2.4.0 - 2023-03-29 =",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.1.1 WC 7.5.1",(0,g.jsx)("br",{}),"* Update: optimization and improvement of the code that triggers the events",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 2.0.2 - 2022-09-21 =",(0,g.jsx)("br",{}),"* Support: WP 6.0.2 WC 6.9.3",(0,g.jsx)("br",{}),"* Fix: Multisite full support check WooCommerce Active",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 2.0.0 - 2022-06-22 =",(0,g.jsx)("br",{}),"* First Release",(0,g.jsx)("br",{})]})]}),T=window.wp.primitives,E=(0,g.jsx)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,g.jsx)(T.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),k=(0,g.jsx)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,g.jsx)(T.Path,{fillRule:"evenodd",d:"M19.75 11H21V8.667L19.875 4H4.125L3 8.667V11h1.25v8.75h15.5V11zm-1.5 0H5.75v7.25H10V13h4v5.25h4.25V11zm-5.5-5.5h2.067l.486 3.24.028.76H12.75v-4zm-3.567 0h2.067v4H8.669l.028-.76.486-3.24zm7.615 3.1l-.464-3.1h2.36l.806 3.345V9.5h-2.668l-.034-.9zM7.666 5.5h-2.36L4.5 8.845V9.5h2.668l.034-.9.464-3.1z",clipRule:"evenodd"})}),F=(0,g.jsxs)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,g.jsx)(T.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,g.jsx)(T.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]}),M=({onNavItemChange:e,activeNavItem:a})=>{const o=a=>{e(a)};return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(l.Panel,{children:[(0,g.jsx)(l.PanelBody,{icon:E,title:"Google Tag Manager",initialOpen:!0,children:(0,g.jsx)(l.PanelRow,{children:(0,g.jsx)(l.__experimentalNavigation,{activeItem:a,className:"navigation-story",onActivateMenu:function(){},children:(0,g.jsxs)(l.__experimentalNavigationMenu,{title:"",children:[(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-1",onClick:()=>o("item-1"),title:(0,r.__)("Settings","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-2",onClick:()=>o("item-2"),title:(0,r.__)("Tags Synchronization","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-3",onClick:()=>o("item-3"),title:(0,r.__)("Consent Mode","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-4",onClick:()=>o("item-4"),title:(0,r.__)("Server-to-Server","datalayer-for-woocommerce")})]})})})}),(0,g.jsx)(l.PanelBody,{title:"Ecommerce",icon:k,initialOpen:!0,children:(0,g.jsx)(l.PanelRow,{children:(0,g.jsx)(l.__experimentalNavigation,{activeItem:a,className:"navigation-story",onActivateMenu:function(){},children:(0,g.jsxs)(l.__experimentalNavigationMenu,{title:"",children:[(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-5",onClick:()=>o("item-5"),title:(0,r.__)("Settings","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-6",onClick:()=>o("item-6"),title:(0,r.__)("Promotions","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-7",onClick:()=>o("item-7"),title:(0,r.__)("Advanced","datalayer-for-woocommerce")})]})})})}),(0,g.jsx)(l.PanelBody,{title:"Extra",icon:F,initialOpen:!0,children:(0,g.jsx)(l.PanelRow,{children:(0,g.jsx)(l.__experimentalNavigation,{activeItem:a,className:"navigation-story",onActivateMenu:function(){},children:(0,g.jsxs)(l.__experimentalNavigationMenu,{title:"",children:[(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-8",onClick:()=>o("item-8"),title:(0,r.__)("Debug Bar","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-9",onClick:()=>o("item-9"),title:(0,r.__)("Popup Consent Mode","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-10",onClick:()=>o("item-10"),title:(0,r.__)("Post Data","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-11",onClick:()=>o("item-11"),title:(0,r.__)("Catalog Feed","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-12",onClick:()=>o("item-12"),title:(0,r.__)("Help","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-13",onClick:()=>o("item-13"),title:(0,r.__)("About","datalayer-for-woocommerce")})]})})})})]})})},B={tracking_google_tag_manager:"",data_layer_google_tag_manager_enhanced_ecommerce:!1,data_layer_google_tag_manager_ecommerce_ga4:!1,data_layer_google_tag_manager_show_user_info:!1,data_layer_google_tag_manager_related_product_show:!1},P={initSettings:e=>({type:"STATE_FROM_DATABASE",payload:{...e}}),*saveSettings(e,a){const o={...B,...a,...e};try{return yield P.saveSettingsToDatabase(o),{type:"SAVE_SETTINGS",payload:o}}catch(e){throw e}},saveSettingsToDatabase:e=>({type:"SAVE_SETTINGS_TO_DATABASE",payload:e})},H={getState:e=>({...B,...e}),getSettings(e){const{...a}=e;return a},getEcommerceData(e){const{data_layer_google_tag_manager_purchase_only_once:a,data_layer_google_tag_manager_show_user_info:o,data_layer_google_tag_manager_javascript_events:t}=e;return{data_layer_google_tag_manager_purchase_only_once:a,data_layer_google_tag_manager_show_user_info:o,data_layer_google_tag_manager_javascript_events:t}}},A={getSettings:()=>async({dispatch:e})=>{const a=await h()({path:"/wp/v2/settings"});e.initSettings(a.options_tracking_option_free)}},D={async SAVE_SETTINGS_TO_DATABASE(e){try{const a=await h()({path:"/wp/v2/settings"});if(a&&a.options_tracking_option_free)return await h()({path:"/wp/v2/settings",method:"PUT",body:JSON.stringify({options_tracking_option_free:e.payload})}),e;throw"error"}catch(e){throw e}}},L=(0,n.createReduxStore)("shop-datalayer-for-ecommerce-free",{reducer:(e=B,a)=>{switch(a.type){case"STATE_FROM_DATABASE":case"SAVE_SETTINGS":return{...e,...a.payload};default:return e}},actions:P,selectors:H,resolvers:A,controls:D});(0,n.register)(L);const I=o.p+"images/logo-datalayer-for-ecommerce-free.1980fdad.png",R=()=>{const[e,a]=(0,_.useState)("item-1");return(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getSettings())),(0,g.jsx)("div",{children:(0,g.jsxs)("div",{className:"wrap datalayer-for-ecommerce-free",children:[(0,g.jsxs)("div",{className:"content-sidebar-datalayer-for-ecommerce-free-wrap",children:[(0,g.jsx)("div",{className:"logoDatalayer",children:(0,g.jsx)("img",{src:I,width:"100",alt:"Datalayer for WooCommerce Icon"})}),(0,g.jsx)(M,{onNavItemChange:e=>{a(e)},activeNavItem:e})]}),(0,g.jsxs)("div",{className:"content-form-datalayer-for-ecommerce-free-wrap",children:["item-1"===e&&(0,g.jsx)(i,{}),"item-2"===e&&(0,g.jsx)(d,{}),"item-3"===e&&(0,g.jsx)(m,{}),"item-4"===e&&(0,g.jsx)(y,{}),"item-5"===e&&(0,g.jsx)(f,{}),"item-6"===e&&(0,g.jsx)(x,{}),"item-7"===e&&(0,g.jsx)(v,{}),"item-8"===e&&(0,g.jsx)(b,{}),"item-9"===e&&(0,g.jsx)(j,{}),"item-10"===e&&(0,g.jsx)(w,{}),"item-11"===e&&(0,g.jsx)(S,{}),"item-12"===e&&(0,g.jsx)(C,{}),"item-13"===e&&(0,g.jsx)(N,{})]})]})})};(0,t.addFilter)("woocommerce_admin_pages_list","datalayer-for-ecommerce-free",(e=>(e.push({breadcrumbs:["",wcSettings.woocommerceTranslation,(0,r.__)("Datalayer for WooCommerce FREE","datalayer-for-ecommerce-free")],capability:"manage_options",container:R,path:"/datalayer-for-ecommerce-free",wpOpenMenu:"toplevel_page_woocommerce",title:(0,r.__)("Datalayer for WooCommerce FREE","datalayer-for-ecommerce-free"),navArgs:{id:"datalayer-for-ecommerce-free"}}),e)))})();
  • datalayer-for-ecommerce-free/trunk/datalayer-for-ecommerce-free.php

    r3177578 r3235108  
    44 * Plugin URI:  https://wordpress.org/plugins/datalayer-for-ecommerce-free/
    55 * Description: DataLayer is an object that makes available in real time the information that is executed by users while browsing the WooCommerce Store.
    6  * Version:     4.3.0
     6 * Version:     4.6.0
    77 * Requires at least: 5.2.0
    8  * Tested up to: 6.6.2
     8 * Tested up to: 6.7.1
    99 * Requires PHP:      7.2
    1010 * Author:      Array.codes
     
    1616 * *
    1717 * WC requires at least: 4.8.0
    18  * WC tested up to: 9.3.3
     18 * WC tested up to: 9.6.0
    1919 *
    2020 * License: GNU General Public License v3.0
  • datalayer-for-ecommerce-free/trunk/readme.txt

    r3177578 r3235108  
    44Tags: datalayer, gtm tag manager, analytics, ga4
    55Requires at least: 5.2.0
    6 Tested up to: 6.6.2
    7 Stable tag: 4.3.0
     6Tested up to: 6.7.1
     7Stable tag: 4.6.0
    88License: GNU General Public License v3.0
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5757
    5858== Changelog ==
     59= 4.6.0 - 2025-01-29 =
     60* Update: Packages dependencies
     61* Support: Support -> WP 6.7.1 WC 9.6.0
     62
    5963= 4.3.0 - 2024-10-28 =
    6064* New: Option Show view_item_list related product in product page
  • datalayer-for-ecommerce-free/trunk/src/AdminPageReact.php

    r3177578 r3235108  
    5252        public function add_extension_register_script() {
    5353
    54             if ( ! method_exists( '\Automattic\WooCommerce\Admin\PageController', 'is_admin_or_embed_page' ) || ! \Automattic\WooCommerce\Admin\PageController::is_admin_or_embed_page() ) {
    55                 return;
     54            if ( defined( 'WC_VERSION' ) && version_compare( \WC_VERSION, '6.5', '>=' ) ) {
     55                if ( ! method_exists( '\Automattic\WooCommerce\Admin\PageController', 'is_admin_or_embed_page' ) || ! \Automattic\WooCommerce\Admin\PageController::is_admin_or_embed_page() ) {
     56                    return;
     57                }
     58            } else {
     59                wp_register_script( 'inline-datalayer', '', array(), '1.0', true );
     60                wp_enqueue_script( 'inline-datalayer' );
     61                $inline_script = 'document.body.classList.add("woocommerce-admin-page__datalayer-for-woocommerce");';
     62                wp_add_inline_script( 'inline-datalayer', $inline_script );
    5663            }
    5764
  • datalayer-for-ecommerce-free/trunk/vendor/composer/installed.php

    r3003488 r3235108  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => 'f1a624dc4047985b1058e09c9c51a92b9811139a',
     6        'reference' => 'c367c46c279c1e1c5ccf0e69cd6f14f237fb4d51',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => 'f1a624dc4047985b1058e09c9c51a92b9811139a',
     16            'reference' => 'c367c46c279c1e1c5ccf0e69cd6f14f237fb4d51',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.