Plugin Directory

Changeset 3070452


Ignore:
Timestamp:
04/15/2024 05:58:17 AM (2 years ago)
Author:
tlamedia
Message:

Update to version 1.21 from GitHub

Location:
gtm-kit
Files:
32 edited
1 copied

Legend:

Unmodified
Added
Removed
  • gtm-kit/tags/1.21/assets/admin/settings.asset.php

    r3055017 r3070452  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'a5a3123d0ef3202afc03');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '596c1a7b6bd34fb67624');
  • gtm-kit/tags/1.21/assets/admin/settings.css

    r3055017 r3070452  
    1 :root{--gtmkit-background-white:#fff;--gtmkit-background-grey:#f0f0f1;--gtmkit-border-color:#ddd;--gtmkit-text-color-heading:#454545;--gtmkit-text-color-grey:#777;--gtmkit-color-grey:#888;--gtmkit-color-primary:#3969bb;--gtmkit-color-secondary:#00a32a;--gtmkit-color-button:#3969bb;--gtmkit-color-success:#00a32a;--gtmkit-color-warning:orange;--gtmkit-color-error:red;--gtmkit-space-h:2rem;--gtmkit-space-v:1.5rem;--gtmkit-font-size-l:18px;--gtmkit-font-size-m:16px;--gtmkit-font-size-s:14px;--gtmkit-font-size-xl:22px;--gtmkit-font-size-xs:12px;--gtmkit-font-size-xxl:24px;--gtmkit-button-disabled:#bbb;--gtmkit-button-disabled-bg:#f5f5f5;--gtmkit-button-disabled-border:1px solid #ddd;--gtmkit-button-disabled-text:#bbb;--gtmkit-button-primary-bg:var(--gtmkit-color-primary);--gtmkit-button-primary-bg-hover:#397eeb;--gtmkit-button-primary-text:#fff;--gtmkit-button-primary-text-hover:#fff;--gtmkit-button-secondary-bg:#f8f8f8;--gtmkit-button-secondary-bg-hover:#fff;--gtmkit-button-secondary-border:#ddd;--gtmkit-button-secondary-text:#777;--gtmkit-button-secondary-text-hover:#454545}*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.gtmkit-container{width:100%}@media(min-width:640px){.gtmkit-container{max-width:640px}}@media(min-width:768px){.gtmkit-container{max-width:768px}}@media(min-width:1024px){.gtmkit-container{max-width:1024px}}@media(min-width:1280px){.gtmkit-container{max-width:1280px}}@media(min-width:1536px){.gtmkit-container{max-width:1536px}}.gtmkit-fixed{position:fixed}.gtmkit-absolute{position:absolute}.gtmkit-relative{position:relative}.gtmkit-sticky{position:sticky}.gtmkit-inset-0{inset:0}.gtmkit-bottom-0{bottom:0}.gtmkit-z-10{z-index:10}.gtmkit-m-4{margin:1rem}.\!gtmkit-my-6{margin-bottom:1.5rem!important;margin-top:1.5rem!important}.gtmkit-mx-auto{margin-left:auto;margin-right:auto}.gtmkit-my-16{margin-bottom:4rem;margin-top:4rem}.gtmkit-my-4{margin-bottom:1rem;margin-top:1rem}.gtmkit-my-6{margin-bottom:1.5rem;margin-top:1.5rem}.gtmkit-my-8{margin-bottom:2rem;margin-top:2rem}.\!gtmkit-mt-4{margin-top:1rem!important}.gtmkit-mb-0{margin-bottom:0}.gtmkit-mb-0\.5{margin-bottom:.125rem}.gtmkit-mb-12{margin-bottom:3rem}.gtmkit-mb-14{margin-bottom:3.5rem}.gtmkit-mb-2{margin-bottom:.5rem}.gtmkit-mb-20{margin-bottom:5rem}.gtmkit-mb-4{margin-bottom:1rem}.gtmkit-mb-5{margin-bottom:1.25rem}.gtmkit-mb-6{margin-bottom:1.5rem}.gtmkit-mb-8{margin-bottom:2rem}.gtmkit-ml-2{margin-left:.5rem}.gtmkit-ml-4{margin-left:1rem}.gtmkit-mr-8{margin-right:2rem}.gtmkit-mt-12{margin-top:3rem}.gtmkit-mt-3{margin-top:.75rem}.gtmkit-mt-4{margin-top:1rem}.gtmkit-mt-6{margin-top:1.5rem}.gtmkit-mt-8{margin-top:2rem}.gtmkit-block{display:block}.gtmkit-inline-block{display:inline-block}.gtmkit-flex{display:flex}.gtmkit-grid{display:grid}.gtmkit-h-0{height:0}.gtmkit-h-0\.5{height:.125rem}.gtmkit-h-2{height:.5rem}.gtmkit-h-2\.5{height:.625rem}.gtmkit-h-5{height:1.25rem}.gtmkit-h-8{height:2rem}.gtmkit-h-screen{height:100vh}.gtmkit-min-h-\[128px\]{min-height:128px}.gtmkit-min-h-\[175px\]{min-height:175px}.gtmkit-w-2{width:.5rem}.gtmkit-w-2\.5{width:.625rem}.gtmkit-w-3\/4{width:75%}.gtmkit-w-5{width:1.25rem}.gtmkit-w-8{width:2rem}.gtmkit-w-\[225px\]{width:225px}.gtmkit-w-\[250px\]{width:250px}.gtmkit-w-full{width:100%}.gtmkit-min-w-\[225px\]{min-width:225px}.gtmkit-max-w-3xl{max-width:48rem}.gtmkit-max-w-\[1536px\]{max-width:1536px}.gtmkit-max-w-\[90\%\]{max-width:90%}.gtmkit-max-w-lg{max-width:32rem}.gtmkit-max-w-max{max-width:-moz-max-content;max-width:max-content}.gtmkit-max-w-md{max-width:28rem}.gtmkit-max-w-xl{max-width:36rem}.gtmkit-flex-auto{flex:1 1 auto}.gtmkit-shrink-0{flex-shrink:0}.gtmkit-table-fixed{table-layout:fixed}.gtmkit-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.gtmkit-flex-col{flex-direction:column}.gtmkit-flex-wrap{flex-wrap:wrap}.gtmkit-items-center{align-items:center}.gtmkit-justify-center{justify-content:center}.gtmkit-justify-between{justify-content:space-between}.gtmkit-gap-16{gap:4rem}.gtmkit-gap-4{gap:1rem}.gtmkit-gap-6{gap:1.5rem}.gtmkit-gap-8{gap:2rem}.gtmkit-space-x-9>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2.25rem*var(--tw-space-x-reverse))}.gtmkit-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.gtmkit-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.gtmkit-whitespace-nowrap{white-space:nowrap}.gtmkit-rounded{border-radius:.25rem}.gtmkit-rounded-full{border-radius:9999px}.gtmkit-rounded-md{border-radius:.375rem}.gtmkit-border{border-width:1px}.gtmkit-border-2{border-width:2px}.gtmkit-border-y{border-top-width:1px}.gtmkit-border-b,.gtmkit-border-y{border-bottom-width:1px}.gtmkit-border-b-2{border-bottom-width:2px}.gtmkit-border-b-4{border-bottom-width:4px}.gtmkit-border-t-4{border-top-width:4px}.gtmkit-border-color-border{border-color:var(--gtmkit-border-color)}.gtmkit-border-color-grey{border-color:var(--gtmkit-color-grey)}.gtmkit-border-color-primary{border-color:var(--gtmkit-color-primary)}.gtmkit-border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.gtmkit-border-b-color-primary{border-bottom-color:var(--gtmkit-color-primary)}.gtmkit-bg-color-border{background-color:var(--gtmkit-border-color)}.gtmkit-bg-color-button-disabled{background-color:var(--gtmkit-button-disabled)}.gtmkit-bg-color-grey{background-color:var(--gtmkit-color-grey)}.gtmkit-bg-color-primary{background-color:var(--gtmkit-color-primary)}.gtmkit-bg-color-success{background-color:var(--gtmkit-color-success)}.gtmkit-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.gtmkit-p-3{padding:.75rem}.gtmkit-p-6{padding:1.5rem}.gtmkit-p-8{padding:2rem}.\!gtmkit-px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.\!gtmkit-px-8{padding-left:2rem!important;padding-right:2rem!important}.\!gtmkit-py-4{padding-bottom:1rem!important;padding-top:1rem!important}.\!gtmkit-py-6{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.gtmkit-px-16{padding-left:4rem;padding-right:4rem}.gtmkit-px-2{padding-left:.5rem;padding-right:.5rem}.gtmkit-px-20{padding-left:5rem;padding-right:5rem}.gtmkit-px-3{padding-left:.75rem;padding-right:.75rem}.gtmkit-px-4{padding-left:1rem;padding-right:1rem}.gtmkit-px-5{padding-left:1.25rem;padding-right:1.25rem}.gtmkit-px-6{padding-left:1.5rem;padding-right:1.5rem}.gtmkit-px-8{padding-left:2rem;padding-right:2rem}.gtmkit-py-1{padding-bottom:.25rem;padding-top:.25rem}.gtmkit-py-12{padding-bottom:3rem;padding-top:3rem}.gtmkit-py-2{padding-bottom:.5rem;padding-top:.5rem}.gtmkit-py-4{padding-bottom:1rem;padding-top:1rem}.gtmkit-py-6{padding-top:1.5rem}.gtmkit-pb-6,.gtmkit-py-6{padding-bottom:1.5rem}.gtmkit-pb-\[18px\]{padding-bottom:18px}.gtmkit-pt-3{padding-top:.75rem}.gtmkit-pt-4{padding-top:1rem}.gtmkit-pt-5{padding-top:1.25rem}.gtmkit-pt-8{padding-top:2rem}.gtmkit-text-left{text-align:left}.gtmkit-text-center{text-align:center}.gtmkit-text-2xl{font-size:1.5rem;line-height:2rem}.gtmkit-text-3xl{font-size:1.875rem;line-height:2.25rem}.gtmkit-text-4xl{font-size:2.25rem;line-height:2.5rem}.gtmkit-text-\[15px\]{font-size:15px}.gtmkit-text-base{font-size:1rem;line-height:1.5rem}.gtmkit-text-lg{font-size:1.125rem;line-height:1.75rem}.gtmkit-text-sm{font-size:.875rem;line-height:1.25rem}.gtmkit-text-xl{font-size:1.25rem;line-height:1.75rem}.gtmkit-text-xs{font-size:.75rem;line-height:1rem}.gtmkit-font-bold{font-weight:700}.gtmkit-font-light{font-weight:300}.gtmkit-font-medium{font-weight:500}.gtmkit-font-semibold{font-weight:600}.gtmkit-uppercase{text-transform:uppercase}.gtmkit-leading-5{line-height:1.25rem}.gtmkit-text-color-grey{color:var(--gtmkit-color-grey)}.gtmkit-text-color-heading{color:var(--gtmkit-text-color-heading)}.gtmkit-text-color-primary{color:var(--gtmkit-color-primary)}.gtmkit-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.gtmkit-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.gtmkit-underline{text-decoration-line:underline}.gtmkit-opacity-100{opacity:1}.gtmkit-opacity-60{opacity:.6}.gtmkit-drop-shadow-md{--tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.gtmkit-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.gtmkit-duration-500{transition-duration:.5s}.hover\:gtmkit-border-color-grey:hover{border-color:var(--gtmkit-color-grey)}.hover\:gtmkit-underline:hover{text-decoration-line:underline}.disabled\:\!gtmkit-bg-color-button-disabled:disabled{background-color:var(--gtmkit-button-disabled)!important}.disabled\:\!gtmkit-text-color-grey:disabled{color:var(--gtmkit-color-grey)!important}@media(min-width:640px){.sm\:gtmkit-w-auto{width:auto}}@media(min-width:768px){.md\:gtmkit-mt-10{margin-top:2.5rem}.md\:gtmkit-mt-12{margin-top:3rem}.md\:gtmkit-mt-16{margin-top:4rem}.md\:gtmkit-mt-8{margin-top:2rem}.md\:gtmkit-grid{display:grid}.md\:gtmkit-max-w-xl{max-width:36rem}}@media(min-width:1024px){.lg\:gtmkit-grid{display:grid}.lg\:gtmkit-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:gtmkit-justify-between{justify-content:space-between}}@media(min-width:1280px){.xl\:gtmkit-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.gtmkit #wpcontent{padding-left:0!important}.gtmkit #wpcontent *,.gtmkit #wpcontent :after,.gtmkit #wpcontent :before{box-sizing:border-box}.gtmkit a:focus{box-shadow:none}.gtmkit p{font-size:14px}.gtmkit .components-button.is-primary{background-color:var(--gtmkit-color-button)}.gtmkit .components-button .components-spinner{margin:0 0 0 1rem}.gtmkit-settings-field-wrap .components-base-control.components-toggle-control{line-height:1.5em}.gtmkit-settings-field-wrap .components-base-control__label{font-size:14px;font-weight:600;text-transform:none}.gtmkit .slide-appear,.gtmkit .slide-enter{transform:translateY(100%)}.gtmkit .slide-appear-active,.gtmkit .slide-enter-active{transform:translateY(0);transition:transform .5s ease-in-out}.gtmkit .slide-exit{transform:translateY(0)}.gtmkit .slide-exit-active{transform:translateY(100%);transition:transform .5s ease-in-out}
     1:root{--gtmkit-background-white:#fff;--gtmkit-background-grey:#f0f0f1;--gtmkit-border-color:#ddd;--gtmkit-text-color-heading:#454545;--gtmkit-text-color-grey:#777;--gtmkit-color-grey:#888;--gtmkit-color-primary:#3969bb;--gtmkit-color-secondary:#00a32a;--gtmkit-color-button:#3969bb;--gtmkit-color-success:#00a32a;--gtmkit-color-warning:orange;--gtmkit-color-error:red;--gtmkit-space-h:2rem;--gtmkit-space-v:1.5rem;--gtmkit-font-size-l:18px;--gtmkit-font-size-m:16px;--gtmkit-font-size-s:14px;--gtmkit-font-size-xl:22px;--gtmkit-font-size-xs:12px;--gtmkit-font-size-xxl:24px;--gtmkit-button-disabled:#bbb;--gtmkit-button-disabled-bg:#f5f5f5;--gtmkit-button-disabled-border:1px solid #ddd;--gtmkit-button-disabled-text:#bbb;--gtmkit-button-primary-bg:var(--gtmkit-color-primary);--gtmkit-button-primary-bg-hover:#397eeb;--gtmkit-button-primary-text:#fff;--gtmkit-button-primary-text-hover:#fff;--gtmkit-button-secondary-bg:#f8f8f8;--gtmkit-button-secondary-bg-hover:#fff;--gtmkit-button-secondary-border:#ddd;--gtmkit-button-secondary-text:#777;--gtmkit-button-secondary-text-hover:#454545}*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.gtmkit-container{width:100%}@media(min-width:640px){.gtmkit-container{max-width:640px}}@media(min-width:768px){.gtmkit-container{max-width:768px}}@media(min-width:1024px){.gtmkit-container{max-width:1024px}}@media(min-width:1280px){.gtmkit-container{max-width:1280px}}@media(min-width:1536px){.gtmkit-container{max-width:1536px}}.gtmkit-fixed{position:fixed}.gtmkit-absolute{position:absolute}.gtmkit-relative{position:relative}.gtmkit-sticky{position:sticky}.gtmkit-inset-0{inset:0}.gtmkit-bottom-0{bottom:0}.gtmkit-z-10{z-index:10}.gtmkit-m-4{margin:1rem}.\!gtmkit-my-6{margin-bottom:1.5rem!important;margin-top:1.5rem!important}.gtmkit-mx-auto{margin-left:auto;margin-right:auto}.gtmkit-my-16{margin-bottom:4rem;margin-top:4rem}.gtmkit-my-4{margin-bottom:1rem;margin-top:1rem}.gtmkit-my-6{margin-bottom:1.5rem;margin-top:1.5rem}.gtmkit-my-8{margin-bottom:2rem;margin-top:2rem}.\!gtmkit-mt-4{margin-top:1rem!important}.gtmkit-mb-0{margin-bottom:0}.gtmkit-mb-0\.5{margin-bottom:.125rem}.gtmkit-mb-12{margin-bottom:3rem}.gtmkit-mb-14{margin-bottom:3.5rem}.gtmkit-mb-2{margin-bottom:.5rem}.gtmkit-mb-20{margin-bottom:5rem}.gtmkit-mb-4{margin-bottom:1rem}.gtmkit-mb-5{margin-bottom:1.25rem}.gtmkit-mb-6{margin-bottom:1.5rem}.gtmkit-mb-8{margin-bottom:2rem}.gtmkit-ml-2{margin-left:.5rem}.gtmkit-ml-4{margin-left:1rem}.gtmkit-mr-8{margin-right:2rem}.gtmkit-mt-12{margin-top:3rem}.gtmkit-mt-3{margin-top:.75rem}.gtmkit-mt-4{margin-top:1rem}.gtmkit-mt-6{margin-top:1.5rem}.gtmkit-mt-8{margin-top:2rem}.gtmkit-block{display:block}.gtmkit-inline-block{display:inline-block}.gtmkit-flex{display:flex}.gtmkit-grid{display:grid}.gtmkit-h-0{height:0}.gtmkit-h-0\.5{height:.125rem}.gtmkit-h-2{height:.5rem}.gtmkit-h-2\.5{height:.625rem}.gtmkit-h-5{height:1.25rem}.gtmkit-h-8{height:2rem}.gtmkit-h-screen{height:100vh}.gtmkit-min-h-\[128px\]{min-height:128px}.gtmkit-min-h-\[175px\]{min-height:175px}.gtmkit-w-2{width:.5rem}.gtmkit-w-2\.5{width:.625rem}.gtmkit-w-3\/4{width:75%}.gtmkit-w-5{width:1.25rem}.gtmkit-w-8{width:2rem}.gtmkit-w-\[225px\]{width:225px}.gtmkit-w-\[250px\]{width:250px}.gtmkit-w-full{width:100%}.gtmkit-min-w-\[225px\]{min-width:225px}.gtmkit-max-w-3xl{max-width:48rem}.gtmkit-max-w-\[1536px\]{max-width:1536px}.gtmkit-max-w-\[90\%\]{max-width:90%}.gtmkit-max-w-lg{max-width:32rem}.gtmkit-max-w-max{max-width:-moz-max-content;max-width:max-content}.gtmkit-max-w-md{max-width:28rem}.gtmkit-max-w-xl{max-width:36rem}.gtmkit-flex-auto{flex:1 1 auto}.gtmkit-shrink-0{flex-shrink:0}.gtmkit-table-fixed{table-layout:fixed}.gtmkit-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.gtmkit-flex-col{flex-direction:column}.gtmkit-flex-wrap{flex-wrap:wrap}.gtmkit-items-center{align-items:center}.gtmkit-justify-center{justify-content:center}.gtmkit-justify-between{justify-content:space-between}.gtmkit-gap-16{gap:4rem}.gtmkit-gap-4{gap:1rem}.gtmkit-gap-6{gap:1.5rem}.gtmkit-gap-8{gap:2rem}.gtmkit-space-x-9>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2.25rem*var(--tw-space-x-reverse))}.gtmkit-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.gtmkit-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.gtmkit-whitespace-nowrap{white-space:nowrap}.gtmkit-rounded{border-radius:.25rem}.gtmkit-rounded-full{border-radius:9999px}.gtmkit-rounded-md{border-radius:.375rem}.gtmkit-border{border-width:1px}.gtmkit-border-2{border-width:2px}.gtmkit-border-y{border-top-width:1px}.gtmkit-border-b,.gtmkit-border-y{border-bottom-width:1px}.gtmkit-border-b-2{border-bottom-width:2px}.gtmkit-border-b-4{border-bottom-width:4px}.gtmkit-border-t-4{border-top-width:4px}.gtmkit-border-color-border{border-color:var(--gtmkit-border-color)}.gtmkit-border-color-grey{border-color:var(--gtmkit-color-grey)}.gtmkit-border-color-primary{border-color:var(--gtmkit-color-primary)}.gtmkit-border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.gtmkit-border-b-color-primary{border-bottom-color:var(--gtmkit-color-primary)}.gtmkit-bg-color-border{background-color:var(--gtmkit-border-color)}.gtmkit-bg-color-button-disabled{background-color:var(--gtmkit-button-disabled)}.gtmkit-bg-color-grey{background-color:var(--gtmkit-color-grey)}.gtmkit-bg-color-primary{background-color:var(--gtmkit-color-primary)}.gtmkit-bg-color-success{background-color:var(--gtmkit-color-success)}.gtmkit-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.gtmkit-p-3{padding:.75rem}.gtmkit-p-6{padding:1.5rem}.gtmkit-p-8{padding:2rem}.\!gtmkit-px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.\!gtmkit-px-8{padding-left:2rem!important;padding-right:2rem!important}.\!gtmkit-py-4{padding-bottom:1rem!important;padding-top:1rem!important}.\!gtmkit-py-6{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.gtmkit-px-16{padding-left:4rem;padding-right:4rem}.gtmkit-px-2{padding-left:.5rem;padding-right:.5rem}.gtmkit-px-20{padding-left:5rem;padding-right:5rem}.gtmkit-px-3{padding-left:.75rem;padding-right:.75rem}.gtmkit-px-4{padding-left:1rem;padding-right:1rem}.gtmkit-px-5{padding-left:1.25rem;padding-right:1.25rem}.gtmkit-px-6{padding-left:1.5rem;padding-right:1.5rem}.gtmkit-px-8{padding-left:2rem;padding-right:2rem}.gtmkit-py-1{padding-bottom:.25rem;padding-top:.25rem}.gtmkit-py-12{padding-bottom:3rem;padding-top:3rem}.gtmkit-py-2{padding-bottom:.5rem;padding-top:.5rem}.gtmkit-py-4{padding-bottom:1rem;padding-top:1rem}.gtmkit-py-6{padding-top:1.5rem}.gtmkit-pb-6,.gtmkit-py-6{padding-bottom:1.5rem}.gtmkit-pb-\[18px\]{padding-bottom:18px}.gtmkit-pt-3{padding-top:.75rem}.gtmkit-pt-4{padding-top:1rem}.gtmkit-pt-5{padding-top:1.25rem}.gtmkit-pt-8{padding-top:2rem}.gtmkit-text-left{text-align:left}.gtmkit-text-center{text-align:center}.gtmkit-text-2xl{font-size:1.5rem;line-height:2rem}.gtmkit-text-3xl{font-size:1.875rem;line-height:2.25rem}.gtmkit-text-4xl{font-size:2.25rem;line-height:2.5rem}.gtmkit-text-\[15px\]{font-size:15px}.gtmkit-text-base{font-size:1rem;line-height:1.5rem}.gtmkit-text-lg{font-size:1.125rem;line-height:1.75rem}.gtmkit-text-sm{font-size:.875rem;line-height:1.25rem}.gtmkit-text-xl{font-size:1.25rem;line-height:1.75rem}.gtmkit-text-xs{font-size:.75rem;line-height:1rem}.gtmkit-font-bold{font-weight:700}.gtmkit-font-light{font-weight:300}.gtmkit-font-medium{font-weight:500}.gtmkit-font-semibold{font-weight:600}.gtmkit-uppercase{text-transform:uppercase}.gtmkit-leading-5{line-height:1.25rem}.gtmkit-text-color-grey{color:var(--gtmkit-color-grey)}.gtmkit-text-color-heading{color:var(--gtmkit-text-color-heading)}.gtmkit-text-color-primary{color:var(--gtmkit-color-primary)}.gtmkit-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.gtmkit-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.gtmkit-underline{text-decoration-line:underline}.gtmkit-opacity-100{opacity:1}.gtmkit-opacity-60{opacity:.6}.gtmkit-drop-shadow-md{--tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.gtmkit-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.gtmkit-duration-500{transition-duration:.5s}.hover\:gtmkit-border-color-grey:hover{border-color:var(--gtmkit-color-grey)}.hover\:gtmkit-underline:hover{text-decoration-line:underline}.disabled\:\!gtmkit-bg-color-button-disabled:disabled{background-color:var(--gtmkit-button-disabled)!important}.disabled\:\!gtmkit-text-color-grey:disabled{color:var(--gtmkit-color-grey)!important}@media(min-width:640px){.sm\:gtmkit-w-auto{width:auto}}@media(min-width:768px){.md\:gtmkit-mt-10{margin-top:2.5rem}.md\:gtmkit-mt-12{margin-top:3rem}.md\:gtmkit-mt-16{margin-top:4rem}.md\:gtmkit-mt-8{margin-top:2rem}.md\:gtmkit-grid{display:grid}.md\:gtmkit-max-w-xl{max-width:36rem}}@media(min-width:1024px){.lg\:gtmkit-grid{display:grid}.lg\:gtmkit-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:gtmkit-justify-between{justify-content:space-between}}@media(min-width:1280px){.xl\:gtmkit-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.gtmkit #wpcontent{padding-left:0!important}.gtmkit #wpcontent *,.gtmkit #wpcontent :after,.gtmkit #wpcontent :before{box-sizing:border-box}.gtmkit a{font-size:14px}.gtmkit a:focus{box-shadow:none}.gtmkit p{font-size:14px}.gtmkit .components-button.is-primary{background-color:var(--gtmkit-color-button)}.gtmkit .components-button .components-spinner{margin:0 0 0 1rem}.gtmkit-settings-field-wrap .components-base-control.components-toggle-control{line-height:1.5em}.gtmkit-settings-field-wrap .components-base-control__label{font-size:14px;font-weight:600;text-transform:none}.gtmkit .slide-appear,.gtmkit .slide-enter{transform:translateY(100%)}.gtmkit .slide-appear-active,.gtmkit .slide-enter-active{transform:translateY(0);transition:transform .5s ease-in-out}.gtmkit .slide-exit{transform:translateY(0)}.gtmkit .slide-exit-active{transform:translateY(100%);transition:transform .5s ease-in-out}
  • gtm-kit/tags/1.21/assets/admin/settings.js

    r3055017 r3070452  
    1 (()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(e,a)=>{for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React;var a=t.n(e);const n=window.wp.i18n,i=window.wp.element,o=window.wp.components,r=window.lodash,l=window.wp.apiFetch;var s=t.n(l);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const m=async(t,e,a=null,n=!1)=>{let i={};try{i=await s()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:options},c=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,n.__)("An error occurred.","gtm-kit"),a.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":a.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.isPending=!1,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,n.__)("An error occurred.","gtm-kit"):(0,n.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage}return a},g=(0,i.createContext)(),u=t=>{const[a,n]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),o=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};n({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},l=async t=>{n({type:"UPDATE_STATE",payload:t})};(0,i.useEffect)((()=>{o()}),[]);const s={useDispatch:t=>{n(t)},useUpdateSettings:async()=>{n({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=a.stateSettings,m("gtmkit/v1/set-options","POST",e));var e;n({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:o,useUpdateState:l,useUpdateStateSettings:async(t,e,n)=>{const i=JSON.parse(JSON.stringify(a.stateSettings));let o;i[t][e]=n,o=!(0,r.isEqual)(i,a.fetchedSettings),l({stateSettings:i,canSave:o})},useImportSettings:async(t,e)=>{const n=JSON.parse(JSON.stringify(a.stateSettings));let i;const o={};o.general={...n.general,...e.general},"integrations"in e&&(o.integrations={...n.integrations,...e.integrations}),i=!(0,r.isEqual)(o,a.fetchedSettings),l({stateSettings:o,canSave:i})},useUpdateSupportTicket:async t=>{l({supportTicket:t})},useSendSystemData:async()=>{n({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=a.supportTicket,m("gtmkit/v1/send-support-data","POST",e,!0));var e;n({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useSettings:a.stateSettings,useIsPending:a.isPending,useNotice:a.notice,useHasError:a.hasError,useCanSave:a.canSave,useSiteData:a.siteData,useInstallData:a.installData,useIsSending:a.isSendingSystemData,useSupportTicket:a.supportTicket,useIsSystemDataSent:a.isSystemDataSent,useSystemDataMessage:a.systemDataMessage,isWooAddonActive:!!window.gtmkitSettings.wa&&window.gtmkitSettings.wa};return(0,e.createElement)(g.Provider,{value:s},t.children)};function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},d.apply(this,arguments)}var p;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(p||(p={}));const h="popstate";function _(t,e){if(!1===t||null==t)throw new Error(e)}function k(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function f(t,e){return{usr:t.state,key:t.key,idx:e}}function E(t,e,a,n){return void 0===a&&(a=null),d({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?v(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function b(t){let{pathname:e="/",search:a="",hash:n=""}=t;return a&&"?"!==a&&(e+="?"===a.charAt(0)?a:"?"+a),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function v(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var y;function x(t,e,a){void 0===a&&(a="/");let n=U(("string"==typeof e?v(e):e).pathname||"/",a);if(null==n)return null;let i=w(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(i);let o=null;for(let t=0;null==o&&t<i.length;++t)o=O(i[t],A(n));return o}function w(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,o)=>{let r={relativePath:void 0===o?t.path||"":o,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};r.relativePath.startsWith("/")&&(_(r.relativePath.startsWith(n),'Absolute route path "'+r.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),r.relativePath=r.relativePath.slice(n.length));let l=F([n,r.relativePath]),s=a.concat(r);t.children&&t.children.length>0&&(_(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),w(t.children,e,s,l)),(null!=t.path||t.index)&&e.push({path:l,score:I(l,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of S(t.path))i(t,e,a);else i(t,e)})),e}function S(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),o=a.replace(/\?$/,"");if(0===n.length)return i?[o,""]:[o];let r=S(n.join("/")),l=[];return l.push(...r.map((t=>""===t?o:[o,t].join("/")))),i&&l.push(...r),l.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(y||(y={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const N=/^:\w+$/,C=3,T=2,G=1,D=10,P=-2,M=t=>"*"===t;function I(t,e){let a=t.split("/"),n=a.length;return a.some(M)&&(n+=P),e&&(n+=T),a.filter((t=>!M(t))).reduce(((t,e)=>t+(N.test(e)?C:""===e?G:D)),n)}function O(t,e){let{routesMeta:a}=t,n={},i="/",o=[];for(let t=0;t<a.length;++t){let r=a[t],l=t===a.length-1,s="/"===i?e:e.slice(i.length)||"/",m=R({path:r.relativePath,caseSensitive:r.caseSensitive,end:l},s);if(!m)return null;Object.assign(n,m.params);let c=r.route;o.push({params:n,pathname:F([i,m.pathname]),pathnameBase:B(F([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=F([i,m.pathnameBase]))}return o}function R(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[a,n]=function(t,e,a){void 0===e&&(e=!1),void 0===a&&(a=!0),k("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,((t,e,a)=>(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let o=i[0],r=o.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=l[a]||"";r=o.slice(0,o.length-t.length).replace(/(.)\/+$/,"$1")}const s=l[a];return t[n]=i&&!s?void 0:function(t,e){try{return decodeURIComponent(t)}catch(a){return k(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+a+")."),t}}(s||"",n),t}),{}),pathname:o,pathnameBase:r,pattern:t}}function A(t){try{return decodeURI(t)}catch(e){return k(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function U(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function L(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function j(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function H(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=v(t):(i=d({},t),_(!i.pathname||!i.pathname.includes("?"),L("?","pathname","search",i)),_(!i.pathname||!i.pathname.includes("#"),L("#","pathname","hash",i)),_(!i.search||!i.search.includes("#"),L("#","search","hash",i)));let o,r=""===t||""===i.pathname,l=r?"/":i.pathname;if(null==l)o=a;else if(n){let t=0===e.length?[]:e[e.length-1].replace(/^\//,"").split("/");if(l.startsWith("..")){let e=l.split("/");for(;".."===e[0];)e.shift(),t.pop();i.pathname=e.join("/")}o="/"+t.join("/")}else{let t=e.length-1;if(l.startsWith("..")){let e=l.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}o=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?v(t):t,o=a?a.startsWith("/")?a:function(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?a.length>1&&a.pop():"."!==t&&a.push(t)})),a.length>1?a.join("/"):"/"}(a,e):e;return{pathname:o,search:W(n),hash:K(i)}}(i,o),m=l&&"/"!==l&&l.endsWith("/"),c=(r||"."===l)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const F=t=>t.join("/").replace(/\/\/+/g,"/"),B=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),W=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",K=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const J=["post","put","patch","delete"],z=(new Set(J),["get",...J]);function $(){return $=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},$.apply(this,arguments)}new Set(z),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const q=e.createContext(null),V=e.createContext(null),Y=e.createContext(null),X=e.createContext(null),Q=e.createContext({outlet:null,matches:[],isDataRoute:!1}),Z=e.createContext(null);function tt(){return null!=e.useContext(X)}function et(){return tt()||_(!1),e.useContext(X).location}function at(t){e.useContext(Y).static||e.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=e.useContext(Q);return t?function(){let{router:t}=function(t){let a=e.useContext(q);return a||_(!1),a}(ct.UseNavigateStable),a=ut(gt.UseNavigateStable),n=e.useRef(!1);return at((()=>{n.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,$({fromRouteId:a},i)))}),[t,a])}():function(){tt()||_(!1);let t=e.useContext(q),{basename:a,future:n,navigator:i}=e.useContext(Y),{matches:o}=e.useContext(Q),{pathname:r}=et(),l=JSON.stringify(j(o,n.v7_relativeSplatPath)),s=e.useRef(!1);return at((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void i.go(e);let o=H(e,JSON.parse(l),r,"path"===n.relative);null==t&&"/"!==a&&(o.pathname="/"===o.pathname?a:F([a,o.pathname])),(n.replace?i.replace:i.push)(o,n.state,n)}),[a,i,l,r,t])}()}function it(t,a){let{relative:n}=void 0===a?{}:a,{future:i}=e.useContext(Y),{matches:o}=e.useContext(Q),{pathname:r}=et(),l=JSON.stringify(j(o,i.v7_relativeSplatPath));return e.useMemo((()=>H(t,JSON.parse(l),r,"path"===n)),[t,l,r,n])}function ot(t,a,n,i){tt()||_(!1);let{navigator:o}=e.useContext(Y),{matches:r}=e.useContext(Q),l=r[r.length-1],s=l?l.params:{},m=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let c,g=et();if(a){var u;let t="string"==typeof a?v(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||_(!1),c=t}else c=g;let d=c.pathname||"/",h=x(t,{pathname:"/"===m?d:d.slice(m.length)||"/"}),k=function(t,a,n,i){var o;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var r;if(null==(r=n)||!r.errors)return null;t=n.matches}let l=t,s=null==(o=n)?void 0:o.errors;if(null!=s){let t=l.findIndex((t=>t.route.id&&(null==s?void 0:s[t.route.id])));t>=0||_(!1),l=l.slice(0,Math.min(l.length,t+1))}let m=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<l.length;t++){let e=l[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.loader&&e.route.id&&void 0===n.loaderData[e.route.id]&&(!n.errors||void 0===n.errors[e.route.id])){m=!0,l=c>=0?l.slice(0,c+1):[l[0]];break}}return l.reduceRight(((t,i,o)=>{let r,g=!1,u=null,d=null;var p;n&&(r=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||lt,m&&(c<0&&0===o?(dt[p="route-fallback"]||(dt[p]=!0),g=!0,d=null):c===o&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(l.slice(0,o+1)),_=()=>{let a;return a=r?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(mt,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===o)?e.createElement(st,{location:n.location,revalidation:n.revalidation,component:u,error:r,children:_(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):_()}),null)}(h&&h.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:F([m,o.encodeLocation?o.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:F([m,o.encodeLocation?o.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),r,n,i);return a&&k?e.createElement(X.Provider,{value:{location:$({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:p.Pop}},k):k}function rt(){let t=function(){var t;let a=e.useContext(Z),n=function(t){let a=e.useContext(V);return a||_(!1),a}(gt.UseRouteError),i=ut(gt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),a=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:i},n):null,null)}const lt=e.createElement(rt,null);class st extends e.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:void 0!==t.error?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return void 0!==this.state.error?e.createElement(Q.Provider,{value:this.props.routeContext},e.createElement(Z.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mt(t){let{routeContext:a,match:n,children:i}=t,o=e.useContext(q);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(Q.Provider,{value:a},i)}var ct=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ct||{}),gt=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(gt||{});function ut(t){let a=function(t){let a=e.useContext(Q);return a||_(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||_(!1),n.route.id}const dt={};function pt(t){let{to:a,replace:n,state:i,relative:o}=t;tt()||_(!1);let{future:r,static:l}=e.useContext(Y),{matches:s}=e.useContext(Q),{pathname:m}=et(),c=nt(),g=H(a,j(s,r.v7_relativeSplatPath),m,"path"===o),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:o})),[c,u,o,n,i]),null}function ht(t){_(!1)}function _t(t){let{basename:a="/",children:n=null,location:i,navigationType:o=p.Pop,navigator:r,static:l=!1,future:s}=t;tt()&&_(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:r,static:l,future:$({v7_relativeSplatPath:!1},s)})),[m,s,r,l]);"string"==typeof i&&(i=v(i));let{pathname:g="/",search:u="",hash:d="",state:h=null,key:k="default"}=i,f=e.useMemo((()=>{let t=U(g,m);return null==t?null:{location:{pathname:t,search:u,hash:d,state:h,key:k},navigationType:o}}),[m,g,u,d,h,k,o]);return null==f?null:e.createElement(Y.Provider,{value:c},e.createElement(X.Provider,{children:n,value:f}))}function kt(t){let{children:e,location:a}=t;return ot(ft(e),a)}function ft(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let o=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,ft(t.props.children,o));t.type!==ht&&_(!1),t.props.index&&t.props.children&&_(!1);let r={id:t.props.id||o.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(r.children=ft(t.props.children,o)),n.push(r)})),n}e.startTransition,new Promise((()=>{})),e.Component;const Et=window.ReactDOM;var bt=t.n(Et);function vt(){return vt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},vt.apply(this,arguments)}function yt(t,e){if(null==t)return{};var a,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)a=o[n],e.indexOf(a)>=0||(i[a]=t[a]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const xt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],wt=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],St=e.createContext({isTransitioning:!1});new Map;const Nt=e.startTransition;function Ct(t){let{basename:a,children:n,future:i,window:o}=t,r=e.useRef();null==r.current&&(r.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,r=i.history,l=p.Pop,s=null,m=c();function c(){return(r.state||{idx:null}).idx}function g(){l=p.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:l,location:k.location,delta:e})}function u(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:b(t);return _(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,r.replaceState(d({},r.state,{idx:m}),""));let k={get action(){return l},get location(){return t(i,r)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(h,g),s=t,()=>{i.removeEventListener(h,g),s=null}},createHref:t=>e(i,t),createURL:u,encodeLocation(t){let e=u(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){l=p.Push;let n=E(k.location,t,e);a&&a(n,t),m=c()+1;let g=f(n,m),u=k.createHref(n);try{r.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}o&&s&&s({action:l,location:k.location,delta:1})},replace:function(t,e){l=p.Replace;let n=E(k.location,t,e);a&&a(n,t),m=c();let i=f(n,m),g=k.createHref(n);r.replaceState(i,"",g),o&&s&&s({action:l,location:k.location,delta:0})},go:t=>r.go(t)};return k}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=v(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),E("",{pathname:a,search:n,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let a=t.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let e=t.location.href,a=e.indexOf("#");n=-1===a?e:e.slice(0,a)}return n+"#"+("string"==typeof e?e:b(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:o,v5Compat:!0}));let l=r.current,[s,m]=e.useState({action:l.action,location:l.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&Nt?Nt((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>l.listen(g)),[l,g]),e.createElement(_t,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:l,future:i})}Et.flushSync;const Tt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Gt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dt=e.forwardRef((function(t,a){let n,{onClick:i,relative:o,reloadDocument:r,replace:l,state:s,target:m,to:c,preventScrollReset:g,unstable_viewTransition:u}=t,d=yt(t,xt),{basename:p}=e.useContext(Y),h=!1;if("string"==typeof c&&Gt.test(c)&&(n=c,Tt))try{let t=new URL(window.location.href),e=c.startsWith("//")?new URL(t.protocol+c):new URL(c),a=U(e.pathname,p);e.origin===t.origin&&null!=a?c=a+e.search+e.hash:h=!0}catch(t){}let k=function(t,a){let{relative:n}=void 0===a?{}:a;tt()||_(!1);let{basename:i,navigator:o}=e.useContext(Y),{hash:r,pathname:l,search:s}=it(t,{relative:n}),m=l;return"/"!==i&&(m="/"===l?i:F([i,l])),o.createHref({pathname:m,search:s,hash:r})}(c,{relative:o}),f=function(t,a){let{target:n,replace:i,state:o,preventScrollReset:r,relative:l,unstable_viewTransition:s}=void 0===a?{}:a,m=nt(),c=et(),g=it(t,{relative:l});return e.useCallback((e=>{if(function(t,e){return!(0!==t.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t))}(e,n)){e.preventDefault();let a=void 0!==i?i:b(c)===b(g);m(t,{replace:a,state:o,preventScrollReset:r,relative:l,unstable_viewTransition:s})}}),[c,m,g,i,o,n,t,r,l,s])}(c,{replace:l,state:s,target:m,preventScrollReset:g,relative:o,unstable_viewTransition:u});return e.createElement("a",vt({},d,{href:n||k,onClick:h||r?i:function(t){i&&i(t),t.defaultPrevented||f(t)},ref:a,target:m}))})),Pt=e.forwardRef((function(t,a){let{"aria-current":n="page",caseSensitive:i=!1,className:o="",end:r=!1,style:l,to:s,unstable_viewTransition:m,children:c}=t,g=yt(t,wt),u=it(s,{relative:g.relative}),d=et(),p=e.useContext(V),{navigator:h}=e.useContext(Y),k=null!=p&&function(t,a){void 0===a&&(a={});let n=e.useContext(St);null==n&&_(!1);let{basename:i}=function(t){let a=e.useContext(q);return a||_(!1),a}(Mt.useViewTransitionState),o=it(t,{relative:a.relative});if(!n.isTransitioning)return!1;let r=U(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=U(n.nextLocation.pathname,i)||n.nextLocation.pathname;return null!=R(o.pathname,l)||null!=R(o.pathname,r)}(u)&&!0===m,f=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,E=d.pathname,b=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(E=E.toLowerCase(),b=b?b.toLowerCase():null,f=f.toLowerCase());const v="/"!==f&&f.endsWith("/")?f.length-1:f.length;let y,x=E===f||!r&&E.startsWith(f)&&"/"===E.charAt(v),w=null!=b&&(b===f||!r&&b.startsWith(f)&&"/"===b.charAt(f.length)),S={isActive:x,isPending:w,isTransitioning:k},N=x?n:void 0;y="function"==typeof o?o(S):[o,x?"active":null,w?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let C="function"==typeof l?l(S):l;return e.createElement(Dt,vt({},g,{"aria-current":N,className:y,ref:a,style:C,to:s,unstable_viewTransition:m}),"function"==typeof c?c(S):c)}));var Mt,It;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Mt||(Mt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(It||(It={}));const Ot=({title:t})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,e.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,e.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,e.createElement)("path",{d:"m88.659 7.002h-49.266c-2.915 0-5.378-.184-9.23 2.596l-18.743 12.752c-4.549 3.292-4.571 6.001 0 9.302l18.743 12.751c3.652 2.646 6.299 2.597 9.23 2.597h15.686 33.58c2.931-.057 5.394-1.784 5.34-3.923v-32.21c-.012-2.134-2.409-3.865-5.34-3.865z",fill:"#3969bb",transform:"matrix(-1 0 0 -1 101.999867 53.999547)"}),(0,e.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,e.createElement)("path",{d:"m18.316 23.086h4.632v6.052c-.75.245-1.459.415-2.121.514-.663.098-1.341.148-2.033.148-1.764 0-3.106-.517-4.035-1.554-.929-1.034-1.395-2.519-1.395-4.457 0-1.886.538-3.356 1.617-4.41 1.078-1.054 2.573-1.579 4.481-1.579 1.2 0 2.357.239 3.469.718l-.823 1.979c-.85-.425-1.737-.637-2.657-.637-1.071 0-1.932.358-2.572 1.077-.645.718-.968 1.685-.968 2.899 0 1.267.26 2.233.78 2.904.516.667 1.271.999 2.262.999.517 0 1.041-.052 1.572-.158v-2.435h-2.209zm11.912 6.555h-2.474v-9.614h-3.173v-2.06h8.816v2.06h-3.169zm9.908 0-2.811-9.158h-.072c.103 1.863.154 3.105.154 3.728v5.43h-2.213v-11.674h3.368l2.764 8.927h.048l2.934-8.927h3.369v11.674h-2.308v-5.525c0-.261 0-.561.009-.903.009-.341.048-1.246.112-2.716h-.074l-3.011 9.144z"}),(0,e.createElement)("path",{d:"m88.883 31.898h-3.811l-4.147-6.67-1.417 1.018v5.652h-3.357v-15.83h3.357v7.242l1.318-1.861 4.293-5.381h3.724l-5.523 7.006zm1.589-15.233c0-1.075.6-1.614 1.8-1.614 1.199 0 1.798.539 1.798 1.614 0 .512-.148.91-.45 1.196-.297.284-.749.429-1.348.429-1.2 0-1.8-.543-1.8-1.625zm3.449 15.233h-3.302v-12.104h3.302zm8.563-2.413c.578 0 1.271-.128 2.077-.38v2.456c-.82.37-1.831.552-3.031.552-1.324 0-2.28-.333-2.885-1.001-.602-.667-.902-1.668-.902-3.003v-5.835h-1.585v-1.399l1.823-1.103.949-2.557h2.115v2.579h3.388v2.48h-3.388v5.835c0 .467.129.815.393 1.041.264.222.614.335 1.046.335z"}))),t)))),Rt=({to:t,title:a})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Pt,{to:t,className:({isActive:t})=>"gtmkit-border-b-4 gtmkit-border-white gtmkit-text-color-grey gtmkit-font-semibold gtmkit-pt-5 gtmkit-pb-[18px] hover:gtmkit-border-color-grey "+(t?"gtmkit-text-color-heading gtmkit-border-b-color-primary ":"")},a)),At=({NavList:t})=>(0,e.createElement)("nav",{className:"gtmkit-flex gtmkit-flex-wrap gtmkit-items-center gtmkit-px-8 gtmkit-border-y gtmkit-bg-white gtmkit-border-color-border gtmkit-text-[15px] gtmkit-space-x-9"},t.map((function(t){return(0,e.createElement)(Rt,{key:t.to,to:t.to,title:t.title})})));function Ut(){return Ut=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},Ut.apply(this,arguments)}function Lt(t,e){if(null==t)return{};var a,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)a=o[n],e.indexOf(a)>=0||(i[a]=t[a]);return i}function jt(t,e){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jt(t,e)}function Ht(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,jt(t,e)}function Ft(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Bt=a().createContext(null);var Wt=function(t){return t.scrollTop},Kt="unmounted",Jt="exited",zt="entering",$t="entered",qt="exiting",Vt=function(t){function e(e,a){var n;n=t.call(this,e,a)||this;var i,o=a&&!a.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?o?(i=Jt,n.appearStatus=zt):i=$t:i=e.unmountOnExit||e.mountOnEnter?Kt:Jt,n.state={status:i},n.nextCallback=null,n}Ht(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Kt?{status:Jt}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var a=this.state.status;this.props.in?a!==zt&&a!==$t&&(e=zt):a!==zt&&a!==$t||(e=qt)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,a,n=this.props.timeout;return t=e=a=n,null!=n&&"number"!=typeof n&&(t=n.exit,e=n.enter,a=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:a}},n.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e)if(this.cancelNextCallback(),e===zt){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this);a&&Wt(a)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jt&&this.setState({status:Kt})},n.performEnter=function(t){var e=this,a=this.props.enter,n=this.context?this.context.isMounting:t,i=this.props.nodeRef?[n]:[bt().findDOMNode(this),n],o=i[0],r=i[1],l=this.getTimeouts(),s=n?l.appear:l.enter;t||a?(this.props.onEnter(o,r),this.safeSetState({status:zt},(function(){e.props.onEntering(o,r),e.onTransitionEnd(s,(function(){e.safeSetState({status:$t},(function(){e.props.onEntered(o,r)}))}))}))):this.safeSetState({status:$t},(function(){e.props.onEntered(o)}))},n.performExit=function(){var t=this,e=this.props.exit,a=this.getTimeouts(),n=this.props.nodeRef?void 0:bt().findDOMNode(this);e?(this.props.onExit(n),this.safeSetState({status:qt},(function(){t.props.onExiting(n),t.onTransitionEnd(a.exit,(function(){t.safeSetState({status:Jt},(function(){t.props.onExited(n)}))}))}))):this.safeSetState({status:Jt},(function(){t.props.onExited(n)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,a=!0;return this.nextCallback=function(n){a&&(a=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var a=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this),n=null==t&&!this.props.addEndListener;if(a&&!n){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],o=i[0],r=i[1];this.props.addEndListener(o,r)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Kt)return null;var e=this.props,n=e.children,i=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,Lt(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a().createElement(Bt.Provider,{value:null},"function"==typeof n?n(t,i):a().cloneElement(a().Children.only(n),i))},e}(a().Component);function Yt(){}Vt.contextType=Bt,Vt.propTypes={},Vt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Yt,onEntering:Yt,onEntered:Yt,onExit:Yt,onExiting:Yt,onExited:Yt},Vt.UNMOUNTED=Kt,Vt.EXITED=Jt,Vt.ENTERING=zt,Vt.ENTERED=$t,Vt.EXITING=qt;const Xt=Vt;var Qt=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return n=e,void((a=t).classList?a.classList.remove(n):"string"==typeof a.className?a.className=Ft(a.className,n):a.setAttribute("class",Ft(a.className&&a.className.baseVal||"",n)));var a,n}))},Zt=function(t){function e(){for(var e,a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,a){var n=e.resolveArguments(t,a),i=n[0],o=n[1];e.removeClasses(i,"exit"),e.addClass(i,o?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,a)},e.onEntering=function(t,a){var n=e.resolveArguments(t,a),i=n[0],o=n[1]?"appear":"enter";e.addClass(i,o,"active"),e.props.onEntering&&e.props.onEntering(t,a)},e.onEntered=function(t,a){var n=e.resolveArguments(t,a),i=n[0],o=n[1]?"appear":"enter";e.removeClasses(i,o),e.addClass(i,o,"done"),e.props.onEntered&&e.props.onEntered(t,a)},e.onExit=function(t){var a=e.resolveArguments(t)[0];e.removeClasses(a,"appear"),e.removeClasses(a,"enter"),e.addClass(a,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var a=e.resolveArguments(t)[0];e.addClass(a,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var a=e.resolveArguments(t)[0];e.removeClasses(a,"exit"),e.addClass(a,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,a){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,a]},e.getClassNames=function(t){var a=e.props.classNames,n="string"==typeof a,i=n?(n&&a?a+"-":"")+t:a[t];return{baseClassName:i,activeClassName:n?i+"-active":a[t+"Active"],doneClassName:n?i+"-done":a[t+"Done"]}},e}Ht(e,t);var n=e.prototype;return n.addClass=function(t,e,a){var n=this.getClassNames(e)[a+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===a&&i&&(n+=" "+i),"active"===a&&t&&Wt(t),n&&(this.appliedClasses[e][a]=n,function(t,e){t&&e&&e.split(" ").forEach((function(e){return n=e,void((a=t).classList?a.classList.add(n):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(a,n)||("string"==typeof a.className?a.className=a.className+" "+n:a.setAttribute("class",(a.className&&a.className.baseVal||"")+" "+n)));var a,n}))}(t,n))},n.removeClasses=function(t,e){var a=this.appliedClasses[e],n=a.base,i=a.active,o=a.done;this.appliedClasses[e]={},n&&Qt(t,n),i&&Qt(t,i),o&&Qt(t,o)},n.render=function(){var t=this.props,e=(t.classNames,Lt(t,["classNames"]));return a().createElement(Xt,Ut({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(a().Component);Zt.defaultProps={classNames:""},Zt.propTypes={};const te=Zt,ee=({title:t=(0,n.__)("Save","gtm-kit"),className:a="gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey"})=>{const{useUpdateSettings:r,useIsPending:l,useCanSave:s}=(0,i.useContext)(g);return(0,e.createElement)(o.Button,{className:a,onClick:()=>r(),variant:"primary",disabled:l||!s},s?(0,n.__)(t,"gtm-kit"):(0,n.__)("Saved","gtm-kit"),l?(0,e.createElement)(o.Spinner,null):"")},ae=()=>{const{useCanSave:t}=(0,i.useContext)(g);return(0,e.createElement)(te,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0},(0,e.createElement)("footer",{className:"gtmkit-fixed gtmkit-bottom-0 gtmkit-w-full gtmkit-z-10 gtmkit-bg-color-grey gtmkit-text-white gtmkit-p-8"},(0,e.createElement)(ee,null)))},ne=({subject:t})=>{const a=!0===t||"on"===t,i=!0===a?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,e.createElement)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase "+i},a?(0,n.__)("Active","gtm-kit"):(0,n.__)("Inactive","gtm-kit"))},ie=(0,i.forwardRef)((({children:t,className:a="",...n},i)=>(0,e.createElement)("div",{...n,className:"gtmkit-flex gtmkit-flex-col gtmkit-min-h-[128px] gtmkit-bg-white gtmkit-border gtmkit-border-color-border gtmkit-mb-6 gtmkit-py-4 gtmkit-px-5 gtmkit-rounded gtmkit-group gtmkit-w-full "+a,ref:i},t)));ie.Header=({as:t="h3",title:a="",children:n,className:i="",...o})=>(0,e.createElement)("div",{...o,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+i},(0,e.createElement)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},a),n),ie.Content=({as:t="div",children:a,className:n="gtmkit-flex-auto",...i})=>(0,e.createElement)(t,{...i,className:n},a),ie.Button=({url:t,destination:a,newTab:n=!1,text:i,group:r="",...l})=>{const s=nt();return(0,e.createElement)("div",{...l,className:"gtmkit-mt-4 gtmkit-mb-0.5"},(0,e.createElement)(o.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full sm:gtmkit-w-auto gtmkit-min-w-[225px]",onClick:()=>{a&&t&&!1===n?window.gtmkitSettings.current_poage===r?s(a,{replace:!0}):window.location.href=t+"#"+a:t?n?window.open(t):window.location.href=t:s(a,{replace:!0})}},(0,e.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},i)))};const oe=ie,re=({title:t,data:a,className:o=""})=>{const{useSettings:r}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},t),(0,e.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px] "+o},a.map(((t,a)=>!1===t.featured?null:(0,e.createElement)(oe,{key:a},(0,e.createElement)(oe.Header,{title:t.title},t.pill?(0,e.createElement)(ne,{subject:r[t.group][t.option]}):null),(0,e.createElement)(oe.Content,null,t.text.map(((t,a)=>(0,e.createElement)("p",{key:a},t)))),(0,e.createElement)(oe.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,n.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group}))))))},le=[{title:"Woocommerce",pill:!0,group:"integrations",option:"woocommerce_integration",text:[(0,n.__)("The #1 open source eCommerce platform built for WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/woocommerce",text:(0,n.__)("Setup integration","gtm-kit")}},{title:"Contact Form 7",pill:!0,group:"integrations",option:"cf7_integration",text:[(0,n.__)("Just another contact form plugin for WordPress. Simple but flexible","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/cf7",text:(0,n.__)("Setup integration","gtm-kit")}},{title:"Easy Digital Downloads",pill:!0,group:"integrations",option:"edd_integration",text:[(0,n.__)("Easy way to sell Digital Products With WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/edd",text:(0,n.__)("Setup integration","gtm-kit")}}],se=[{title:"Getting started with GTM Kit",text:[(0,n.__)("How to get the most out of Google Tag Manager with GTM Kit.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!0},{title:(0,n.__)("WooCommerce integration","gtm-kit"),text:[(0,n.__)("Integrate WooCommerce with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=dashboard-tutorials"},featured:!0},{title:"Contact Form 7 Integration",text:[(0,n.__)("Integrate Contact Form 7 with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/contact-form-7-integration/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Easy Digital Downloads integration",text:[(0,n.__)("Integrate Easy Digital Downloads with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/set-up-easy-digital-downloads-for-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:(0,n.__)("How to setup Google Analytics (GA4) in Google Tag Manager","gtm-kit"),text:[(0,n.__)("Learn how to configure the necessary tags to make Google Analytics collect your data.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=dashboard-tutorials"},featured:!1},{title:"Advanced GTM container implementation",text:[(0,n.__)("Customization of the GTM container implementation and Server Side Tracking.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Settings, actions and filters for developers",text:[(0,n.__)("One of the things that makes GTM Kit a great tool for developers is the ability to override options in wp-config.php.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Delay JavaScript execution in GTM",text:[(0,n.__)("Delaying JavaScript execution is a powerful page speed optimization technique.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1}],me=()=>{const{useSettings:t}=(0,i.useContext)(g),[a,o]=(0,i.useState)(se),r=Boolean(t.general.sgtm_domain&&t.general.sgtm_domain.trim());return(0,i.useEffect)((()=>{o((t=>[...t,{title:(0,n.__)("See all tutorials…","gtm-kit"),text:[(0,n.__)("See all our tutorial and get the most out of GTM Kit","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=documentation&utm_content=dashboard-tutorials",text:(0,n.__)("Read articles","gtm-kit")},featured:!0}]))}),[]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("General","gtm-kit")),(0,e.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 lg:gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px]"},(0,e.createElement)(oe,null,(0,e.createElement)(oe.Header,{title:"Google Tag Manager Container"},(0,e.createElement)(ne,{subject:t.general.gtm_id&&t.general.container_active})),(0,e.createElement)(oe.Content,null,t.general.gtm_id&&t.general.container_active?(0,e.createElement)("p",null,(0,n.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id):(0,e.createElement)("p",null,(0,n.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,e.createElement)(oe.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})),(0,e.createElement)(oe,null,(0,e.createElement)(oe.Header,{title:(0,n.__)("Server-side GTM","gtm-kit")},(0,e.createElement)(ne,{subject:r})),(0,e.createElement)(oe.Content,null,(0,e.createElement)("p",null,(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit"))),(0,e.createElement)(oe.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})),(0,e.createElement)(oe,null,(0,e.createElement)(oe.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")},(0,e.createElement)(ne,{subject:t.general.analytics_active})),(0,e.createElement)(oe.Content,null,(0,e.createElement)("p",null,(0,n.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,e.createElement)(oe.Button,{destination:"/misc",text:(0,n.__)("Share anonymous data","gtm-kit")}))),(0,e.createElement)(re,{title:(0,n.__)("Tutorials","gtm-kit"),data:a}),(0,e.createElement)(re,{title:(0,n.__)("Integrations","gtm-kit"),data:le}))},ce=({title:t,placeholder:a,help:n,className:r="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:l="general",optionName:s,isDisabled:m})=>{const{useSettings:c,useUpdateStateSettings:u}=(0,i.useContext)(g);return(0,e.createElement)(o.TextControl,{label:t,placeholder:a,help:n,className:r,value:c[l][s],onChange:t=>u(l,s,t),disabled:m})},ge=({title:t,label:a,optionGroup:n="general",optionName:r,disabled:l=!1})=>{const{useSettings:s,useUpdateStateSettings:m}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,e.createElement)(o.BaseControl,{label:t},(0,e.createElement)(o.ToggleControl,{label:a,checked:!l&&s[n][r],onChange:()=>{m(n,r,!(s&&s[n][r]))},disabled:l}))))},ue=({title:t,options:a,help:n,className:r="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:s,disabled:m})=>{const{useSettings:c,useUpdateStateSettings:u}=(0,i.useContext)(g);return(0,e.createElement)(o.RadioControl,{label:t,options:a,help:n,className:r,selected:parseInt(c[l][s]),onChange:t=>u(l,s,t),disabled:m})},de=(0,i.forwardRef)((({children:t,className:a="",disabled:n=!1,...i},o)=>(0,e.createElement)("div",{...i,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-w-3/4 gtmkit-border-color-grey "+a+(n?"gtmkit-opacity-60":""),ref:o},t)));de.Header=({as:t="h3",title:a="",children:n,className:i="",...o})=>(0,e.createElement)(t,{...o,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey "+i},a,n),de.Content=({as:t="div",children:a,className:n="",...i})=>(0,e.createElement)(t,{...i,className:"gtmkit-px-8 gtmkit-py-6 "+n},a);const pe=de,he=()=>{const{useSettings:t}=(0,i.useContext)(g),a=!(t.general.sgtm_domain&&t.general.sgtm_domain.trim()&&t.general.sgtm_container_identifier&&t.general.sgtm_container_identifier.trim());return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Google Tag Manager container","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("General Container Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")),(0,e.createElement)(ce,{title:(0,n.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,n.__)("Enter GTM Container ID","gtm-kit")}),(0,e.createElement)(ge,{title:(0,n.__)("Inject Container Code","gtm-kit"),label:(0,n.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active"}),(0,e.createElement)(ge,{title:(0,n.__)("Just the container","gtm-kit"),label:(0,n.__)("Setting this to On will reduce the functionality to just the GTM container code. No additional data will be pushed to the datalayer regardless of any other settings.","gtm-kit"),optionName:"just_the_container"}),(0,e.createElement)(ce,{title:(0,n.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,n.__)("The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do.","gtm-kit")}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,n.__)("Enter domain …","gtm-kit"),help:(0,n.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,n.__)("Enter loader name …","gtm-kit"),help:(0,n.__)("Only use if you are using a custom loader.","gtm-kit")}),(0,e.createElement)(ge,{title:(0,n.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,n.__)("Prolong cookie lifetime in Safari and other browsers with ITP. This only works if you use Stape sGTM hosting and have set up the Cookie Keeper power up.","gtm-kit"),optionName:"sgtm_cookie_keeper",disabled:a})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Google Tag Manager Server-side Tagging","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/guides/google-tag-manager-server-side-tagging/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=sgtm&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))),(0,e.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Hosting server-side GTM containers","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Stape.io is a solution for hosting server-side Google Tag Manager containers, offering a simplified approach that demands less technical expertise than solutions like Google Cloud Platform.","gtm-kit")," ",(0,n.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,e.createElement)("a",{href:"https://stape.io/?pt=tlam&rs=plugin",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more about Stape.io","gtm-kit"))))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Page Speed Optimization","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("load_js event","gtm-kit"),label:(0,n.__)("Setting this to On will push the event 'load_js' om page load.","gtm-kit"),optionName:"load_js_event"})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Delay JavaScript execution","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Page optimization plugins can delay the 'load_js' event and this can be used to delay the triggering og tags in Google Tag Manager.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/guides/delay-javascript-execution-in-gtm/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=delay-js&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Google Tag Manager Environment","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,n.__)("Enter gtm_auth code","gtm-kit"),help:(0,n.__)("Enter your gtm_auth code your GTM environment.","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,n.__)("Enter gtm_preview code","gtm-kit"),help:(0,n.__)("Enter your gtm_preview code your GTM environment.","gtm-kit")})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Environments","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,n.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,n.__)("If left empty the default environment will be used.","gtm-kit")),(0,e.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Override settings in wp-config.php","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("You can override the values of using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=container-settings&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Container Code Implementation","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:(0,n.__)("Container code implementation:","gtm-kit"),options:[{label:(0,n.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,n.__)("Load container when browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,n.__)("Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle.","gtm-kit"),optionName:"script_implementation"}),(0,e.createElement)(ue,{title:(0,n.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,n.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,n.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,n.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,n.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,n.__)('The preferred method to implement the <noscript> container code is just after the opening <body> tag. This requires that your theme uses the "body_open" hook. If your theme does not support this the script can be injected in the footer or you can use the function below.',"gtm-kit"),optionName:"noscript_implementation"}),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,e.createElement)("code",null,"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>")))))},_e=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Post Data","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Post Data Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")),(0,e.createElement)(ge,{title:(0,n.__)("Post type","gtm-kit"),id:"post-type",label:(0,n.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type"}),(0,e.createElement)(ge,{title:(0,n.__)("Page type","gtm-kit"),id:"page-type",label:(0,n.__)('Include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. "campaign".',"gtm-kit"),optionName:"datalayer_page_type"}),(0,e.createElement)(ge,{title:(0,n.__)("Categories","gtm-kit"),id:"categories",label:(0,n.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories"}),(0,e.createElement)(ge,{title:(0,n.__)("Tags","gtm-kit"),id:"tags",label:(0,n.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags"}),(0,e.createElement)(ge,{title:(0,n.__)("Post title","gtm-kit"),id:"post-title",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title"}),(0,e.createElement)(ge,{title:(0,n.__)("Post ID","gtm-kit"),id:"post-id",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id"}),(0,e.createElement)(ge,{title:(0,n.__)("Post data","gtm-kit"),id:"post-date",label:(0,n.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date"}),(0,e.createElement)(ge,{title:(0,n.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,n.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name"}),(0,e.createElement)(ge,{title:(0,n.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,n.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id"})))),ke=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("User Data","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,n.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,e.createElement)("p",null,(0,n.__)("Full page caching will cache user data making it the same for all users. There are ways around this, but it depends on the chosen cache solution and is only for advanced users.","gtm-kit")))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("User Data Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,n.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in"}),(0,e.createElement)(ge,{title:(0,n.__)("User ID","gtm-kit"),id:"user-id",label:(0,n.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id"}),(0,e.createElement)(ge,{title:(0,n.__)("User role","gtm-kit"),id:"user-role",label:(0,n.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role"})))),fe=()=>{const{useSettings:t}=(0,i.useContext)(g),a=!t.general.gcm_default_settings;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Google Consent Mode","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Google Consent Mode Activation","gtm-kit")},(0,e.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,n.__)("Warning!","gtm-kit"))),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,n.__)("Most Consent Management Platforms will handle the Google Consent Mode settings for you and applying the default settings in both GTM Kit and you CMP will lead to unexpected behaviour or errors.","gtm-kit")),(0,e.createElement)("p",null,(0,n.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")),(0,e.createElement)("p",{className:"!gtmkit-mt-4"},(0,n.__)("GTM Kit will only set the default Consent Mode settings and you must update the settings yourself when the user has given consent.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,e.createElement)("a",{href:"https://developers.google.com/tag-platform/security/guides/consent#implementation_example",target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline gtmkit-font-semibold"},(0,n.__)("See an example of how consent is updated","gtm-kit"))),(0,e.createElement)(ge,{title:(0,n.__)("Activate GCM settings","gtm-kit"),label:(0,n.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings"}))),(0,e.createElement)(pe,{disabled:a},(0,e.createElement)(pe.Header,{title:(0,n.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Ad Personalization","gtm-kit"),label:(0,n.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:a}),(0,e.createElement)(ge,{title:(0,n.__)("Ad Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:a}),(0,e.createElement)(ge,{title:(0,n.__)("Ad User Data","gtm-kit"),label:(0,n.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:a}),(0,e.createElement)(ge,{title:(0,n.__)("Analytics Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:a}),(0,e.createElement)(ge,{title:(0,n.__)("Functionality Storage","gtm-kit"),label:(0,n.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:a}),(0,e.createElement)(ge,{title:(0,n.__)("Personalization Storage","gtm-kit"),label:(0,n.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:a}),(0,e.createElement)(ge,{title:(0,n.__)("Security Storage","gtm-kit"),label:(0,n.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:a}))))},Ee=({label:t,value:a,tag:n})=>(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,e.createElement)("strong",null,t)),(0,e.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===n?(0,e.createElement)("code",{className:"gtmkit-text-sm"},a):(0,e.createElement)("em",null,a))),be=()=>{const{useSiteData:t}=(0,i.useContext)(g),a=Object.values(t.shared_data);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,n.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,n.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,e.createElement)("tbody",{className:"gtmkit-py-6"},a.map((function(t,a){return(0,e.createElement)(Ee,{key:a,label:t.label,value:t.value,tag:t.tag})})))))},ve=()=>{const{}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Misc","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(be,null),(0,e.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,n.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,e.createElement)(ge,{title:(0,n.__)("Share anonymous data","gtm-kit"),label:(0,n.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active"}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Logging and debugging","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Console log","gtm-kit"),label:(0,n.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log"}),(0,e.createElement)(ge,{title:(0,n.__)("Debug log","gtm-kit"),label:(0,n.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log"}))))},ye=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(re,{title:(0,n.__)("Integrations","gtm-kit"),data:le})),xe=({pluginName:t})=>(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.sprintf)(
     1(()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(e,a)=>{for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React;var a=t.n(e);const n=window.wp.i18n,i=window.wp.element,r=window.wp.components,o=window.lodash,l=window.wp.apiFetch;var s=t.n(l);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const m=async(t,e,a=null,n=!1)=>{let i={};try{i=await s()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:options},c=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,n.__)("An error occurred.","gtm-kit"),a.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":a.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.isPending=!1,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,n.__)("An error occurred.","gtm-kit"):(0,n.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage}return a},g=(0,i.createContext)(),u=t=>{const[a,n]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),r=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};n({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},l=async t=>{n({type:"UPDATE_STATE",payload:t})};(0,i.useEffect)((()=>{r()}),[]);const s={useDispatch:t=>{n(t)},useUpdateSettings:async()=>{n({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=a.stateSettings,m("gtmkit/v1/set-options","POST",e));var e;n({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:r,useUpdateState:l,useUpdateStateSettings:async(t,e,n)=>{const i=JSON.parse(JSON.stringify(a.stateSettings));let r;i[t][e]=n,r=!(0,o.isEqual)(i,a.fetchedSettings),l({stateSettings:i,canSave:r})},useImportSettings:async(t,e)=>{const n=JSON.parse(JSON.stringify(a.stateSettings));let i;const r={};r.general={...n.general,...e.general},"integrations"in e&&(r.integrations={...n.integrations,...e.integrations}),i=!(0,o.isEqual)(r,a.fetchedSettings),l({stateSettings:r,canSave:i})},useUpdateSupportTicket:async t=>{l({supportTicket:t})},useSendSystemData:async()=>{n({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=a.supportTicket,m("gtmkit/v1/send-support-data","POST",e,!0));var e;n({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useSettings:a.stateSettings,useIsPending:a.isPending,useNotice:a.notice,useHasError:a.hasError,useCanSave:a.canSave,useSiteData:a.siteData,useInstallData:a.installData,useIsSending:a.isSendingSystemData,useSupportTicket:a.supportTicket,useIsSystemDataSent:a.isSystemDataSent,useSystemDataMessage:a.systemDataMessage,isWooAddonActive:!!window.gtmkitSettings.wa&&window.gtmkitSettings.wa};return(0,e.createElement)(g.Provider,{value:s},t.children)};function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},d.apply(this,arguments)}var p;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(p||(p={}));const h="popstate";function _(t,e){if(!1===t||null==t)throw new Error(e)}function k(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function f(t,e){return{usr:t.state,key:t.key,idx:e}}function E(t,e,a,n){return void 0===a&&(a=null),d({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?v(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function b(t){let{pathname:e="/",search:a="",hash:n=""}=t;return a&&"?"!==a&&(e+="?"===a.charAt(0)?a:"?"+a),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function v(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var y;function x(t,e,a){void 0===a&&(a="/");let n=L(("string"==typeof e?v(e):e).pathname||"/",a);if(null==n)return null;let i=S(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(i);let r=null;for(let t=0;null==r&&t<i.length;++t){let e=U(n);r=M(i[t],e)}return r}function S(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let o={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};o.relativePath.startsWith("/")&&(_(o.relativePath.startsWith(n),'Absolute route path "'+o.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(n.length));let l=H([n,o.relativePath]),s=a.concat(o);t.children&&t.children.length>0&&(_(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),S(t.children,e,s,l)),(null!=t.path||t.index)&&e.push({path:l,score:O(l,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of w(t.path))i(t,e,a);else i(t,e)})),e}function w(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return i?[r,""]:[r];let o=w(n.join("/")),l=[];return l.push(...o.map((t=>""===t?r:[r,t].join("/")))),i&&l.push(...o),l.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(y||(y={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const N=/^:[\w-]+$/,C=3,T=2,D=1,P=10,G=-2,I=t=>"*"===t;function O(t,e){let a=t.split("/"),n=a.length;return a.some(I)&&(n+=G),e&&(n+=T),a.filter((t=>!I(t))).reduce(((t,e)=>t+(N.test(e)?C:""===e?D:P)),n)}function M(t,e){let{routesMeta:a}=t,n={},i="/",r=[];for(let t=0;t<a.length;++t){let o=a[t],l=t===a.length-1,s="/"===i?e:e.slice(i.length)||"/",m=R({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},s);if(!m)return null;Object.assign(n,m.params);let c=o.route;r.push({params:n,pathname:H([i,m.pathname]),pathnameBase:B(H([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=H([i,m.pathnameBase]))}return r}function R(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[a,n]=function(t,e,a){void 0===e&&(e=!1),void 0===a&&(a=!0),k("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,a)=>(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let r=i[0],o=r.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=l[a]||"";o=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const s=l[a];return t[n]=i&&!s?void 0:(s||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:o,pattern:t}}function U(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return k(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function L(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function A(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function j(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function F(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=v(t):(i=d({},t),_(!i.pathname||!i.pathname.includes("?"),A("?","pathname","search",i)),_(!i.pathname||!i.pathname.includes("#"),A("#","pathname","hash",i)),_(!i.search||!i.search.includes("#"),A("#","search","hash",i)));let r,o=""===t||""===i.pathname,l=o?"/":i.pathname;if(null==l)r=a;else{let t=e.length-1;if(!n&&l.startsWith("..")){let e=l.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}r=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?v(t):t,r=a?a.startsWith("/")?a:function(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?a.length>1&&a.pop():"."!==t&&a.push(t)})),a.length>1?a.join("/"):"/"}(a,e):e;return{pathname:r,search:W(n),hash:K(i)}}(i,r),m=l&&"/"!==l&&l.endsWith("/"),c=(o||"."===l)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const H=t=>t.join("/").replace(/\/\/+/g,"/"),B=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),W=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",K=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const J=["post","put","patch","delete"],z=(new Set(J),["get",...J]);function $(){return $=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},$.apply(this,arguments)}new Set(z),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const V=e.createContext(null),q=e.createContext(null),Y=e.createContext(null),X=e.createContext(null),Q=e.createContext({outlet:null,matches:[],isDataRoute:!1}),Z=e.createContext(null);function tt(){return null!=e.useContext(X)}function et(){return tt()||_(!1),e.useContext(X).location}function at(t){e.useContext(Y).static||e.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=e.useContext(Q);return t?function(){let{router:t}=function(t){let a=e.useContext(V);return a||_(!1),a}(ct.UseNavigateStable),a=ut(gt.UseNavigateStable),n=e.useRef(!1);return at((()=>{n.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,$({fromRouteId:a},i)))}),[t,a])}():function(){tt()||_(!1);let t=e.useContext(V),{basename:a,future:n,navigator:i}=e.useContext(Y),{matches:r}=e.useContext(Q),{pathname:o}=et(),l=JSON.stringify(j(r,n.v7_relativeSplatPath)),s=e.useRef(!1);return at((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void i.go(e);let r=F(e,JSON.parse(l),o,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:H([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,l,o,t])}()}function it(t,a){let{relative:n}=void 0===a?{}:a,{future:i}=e.useContext(Y),{matches:r}=e.useContext(Q),{pathname:o}=et(),l=JSON.stringify(j(r,i.v7_relativeSplatPath));return e.useMemo((()=>F(t,JSON.parse(l),o,"path"===n)),[t,l,o,n])}function rt(t,a,n,i){tt()||_(!1);let{navigator:r}=e.useContext(Y),{matches:o}=e.useContext(Q),l=o[o.length-1],s=l?l.params:{},m=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let c,g=et();if(a){var u;let t="string"==typeof a?v(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||_(!1),c=t}else c=g;let d=c.pathname||"/",h=d;if("/"!==m){let t=m.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(t.length).join("/")}let k=x(t,{pathname:h}),f=function(t,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var o;if(null==(o=n)||!o.errors)return null;t=n.matches}let l=t,s=null==(r=n)?void 0:r.errors;if(null!=s){let t=l.findIndex((t=>t.route.id&&(null==s?void 0:s[t.route.id])));t>=0||_(!1),l=l.slice(0,Math.min(l.length,t+1))}let m=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<l.length;t++){let e=l[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:a}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||i){m=!0,l=c>=0?l.slice(0,c+1):[l[0]];break}}}return l.reduceRight(((t,i,r)=>{let o,g=!1,u=null,d=null;var p;n&&(o=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||lt,m&&(c<0&&0===r?(dt[p="route-fallback"]||(dt[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(l.slice(0,r+1)),_=()=>{let a;return a=o?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(mt,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(st,{location:n.location,revalidation:n.revalidation,component:u,error:o,children:_(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):_()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:H([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:H([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),o,n,i);return a&&f?e.createElement(X.Provider,{value:{location:$({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:p.Pop}},f):f}function ot(){let t=function(){var t;let a=e.useContext(Z),n=function(t){let a=e.useContext(q);return a||_(!1),a}(gt.UseRouteError),i=ut(gt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),a=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:i},n):null,null)}const lt=e.createElement(ot,null);class st extends e.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:void 0!==t.error?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return void 0!==this.state.error?e.createElement(Q.Provider,{value:this.props.routeContext},e.createElement(Z.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mt(t){let{routeContext:a,match:n,children:i}=t,r=e.useContext(V);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(Q.Provider,{value:a},i)}var ct=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ct||{}),gt=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(gt||{});function ut(t){let a=function(t){let a=e.useContext(Q);return a||_(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||_(!1),n.route.id}const dt={};function pt(t){let{to:a,replace:n,state:i,relative:r}=t;tt()||_(!1);let{future:o,static:l}=e.useContext(Y),{matches:s}=e.useContext(Q),{pathname:m}=et(),c=nt(),g=F(a,j(s,o.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function ht(t){_(!1)}function _t(t){let{basename:a="/",children:n=null,location:i,navigationType:r=p.Pop,navigator:o,static:l=!1,future:s}=t;tt()&&_(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:o,static:l,future:$({v7_relativeSplatPath:!1},s)})),[m,s,o,l]);"string"==typeof i&&(i=v(i));let{pathname:g="/",search:u="",hash:d="",state:h=null,key:k="default"}=i,f=e.useMemo((()=>{let t=L(g,m);return null==t?null:{location:{pathname:t,search:u,hash:d,state:h,key:k},navigationType:r}}),[m,g,u,d,h,k,r]);return null==f?null:e.createElement(Y.Provider,{value:c},e.createElement(X.Provider,{children:n,value:f}))}function kt(t){let{children:e,location:a}=t;return rt(ft(e),a)}function ft(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let r=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,ft(t.props.children,r));t.type!==ht&&_(!1),t.props.index&&t.props.children&&_(!1);let o={id:t.props.id||r.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(o.children=ft(t.props.children,r)),n.push(o)})),n}e.startTransition,new Promise((()=>{})),e.Component;const Et=window.ReactDOM;var bt=t.n(Et);function vt(){return vt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},vt.apply(this,arguments)}function yt(t,e){if(null==t)return{};var a,n,i={},r=Object.keys(t);for(n=0;n<r.length;n++)a=r[n],e.indexOf(a)>=0||(i[a]=t[a]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const xt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],St=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(t){}const wt=e.createContext({isTransitioning:!1});new Map;const Nt=e.startTransition;function Ct(t){let{basename:a,children:n,future:i,window:r}=t,o=e.useRef();null==o.current&&(o.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:r=!1}=n,o=i.history,l=p.Pop,s=null,m=c();function c(){return(o.state||{idx:null}).idx}function g(){l=p.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:l,location:k.location,delta:e})}function u(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:b(t);return a=a.replace(/ $/,"%20"),_(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,o.replaceState(d({},o.state,{idx:m}),""));let k={get action(){return l},get location(){return t(i,o)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(h,g),s=t,()=>{i.removeEventListener(h,g),s=null}},createHref:t=>e(i,t),createURL:u,encodeLocation(t){let e=u(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){l=p.Push;let n=E(k.location,t,e);a&&a(n,t),m=c()+1;let g=f(n,m),u=k.createHref(n);try{o.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&s&&s({action:l,location:k.location,delta:1})},replace:function(t,e){l=p.Replace;let n=E(k.location,t,e);a&&a(n,t),m=c();let i=f(n,m),g=k.createHref(n);o.replaceState(i,"",g),r&&s&&s({action:l,location:k.location,delta:0})},go:t=>o.go(t)};return k}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=v(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),E("",{pathname:a,search:n,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let a=t.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let e=t.location.href,a=e.indexOf("#");n=-1===a?e:e.slice(0,a)}return n+"#"+("string"==typeof e?e:b(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:r,v5Compat:!0}));let l=o.current,[s,m]=e.useState({action:l.action,location:l.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&Nt?Nt((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>l.listen(g)),[l,g]),e.createElement(_t,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:l,future:i})}Et.flushSync,e.useId;const Tt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Dt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pt=e.forwardRef((function(t,a){let n,{onClick:i,relative:r,reloadDocument:o,replace:l,state:s,target:m,to:c,preventScrollReset:g,unstable_viewTransition:u}=t,d=yt(t,xt),{basename:p}=e.useContext(Y),h=!1;if("string"==typeof c&&Dt.test(c)&&(n=c,Tt))try{let t=new URL(window.location.href),e=c.startsWith("//")?new URL(t.protocol+c):new URL(c),a=L(e.pathname,p);e.origin===t.origin&&null!=a?c=a+e.search+e.hash:h=!0}catch(t){}let k=function(t,a){let{relative:n}=void 0===a?{}:a;tt()||_(!1);let{basename:i,navigator:r}=e.useContext(Y),{hash:o,pathname:l,search:s}=it(t,{relative:n}),m=l;return"/"!==i&&(m="/"===l?i:H([i,l])),r.createHref({pathname:m,search:s,hash:o})}(c,{relative:r}),f=function(t,a){let{target:n,replace:i,state:r,preventScrollReset:o,relative:l,unstable_viewTransition:s}=void 0===a?{}:a,m=nt(),c=et(),g=it(t,{relative:l});return e.useCallback((e=>{if(function(t,e){return!(0!==t.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t))}(e,n)){e.preventDefault();let a=void 0!==i?i:b(c)===b(g);m(t,{replace:a,state:r,preventScrollReset:o,relative:l,unstable_viewTransition:s})}}),[c,m,g,i,r,n,t,o,l,s])}(c,{replace:l,state:s,target:m,preventScrollReset:g,relative:r,unstable_viewTransition:u});return e.createElement("a",vt({},d,{href:n||k,onClick:h||o?i:function(t){i&&i(t),t.defaultPrevented||f(t)},ref:a,target:m}))})),Gt=e.forwardRef((function(t,a){let{"aria-current":n="page",caseSensitive:i=!1,className:r="",end:o=!1,style:l,to:s,unstable_viewTransition:m,children:c}=t,g=yt(t,St),u=it(s,{relative:g.relative}),d=et(),p=e.useContext(q),{navigator:h,basename:k}=e.useContext(Y),f=null!=p&&function(t,a){void 0===a&&(a={});let n=e.useContext(wt);null==n&&_(!1);let{basename:i}=function(t){let a=e.useContext(V);return a||_(!1),a}(It.useViewTransitionState),r=it(t,{relative:a.relative});if(!n.isTransitioning)return!1;let o=L(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=L(n.nextLocation.pathname,i)||n.nextLocation.pathname;return null!=R(r.pathname,l)||null!=R(r.pathname,o)}(u)&&!0===m,E=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,b=d.pathname,v=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(b=b.toLowerCase(),v=v?v.toLowerCase():null,E=E.toLowerCase()),v&&k&&(v=L(v,k)||v);const y="/"!==E&&E.endsWith("/")?E.length-1:E.length;let x,S=b===E||!o&&b.startsWith(E)&&"/"===b.charAt(y),w=null!=v&&(v===E||!o&&v.startsWith(E)&&"/"===v.charAt(E.length)),N={isActive:S,isPending:w,isTransitioning:f},C=S?n:void 0;x="function"==typeof r?r(N):[r,S?"active":null,w?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof l?l(N):l;return e.createElement(Pt,vt({},g,{"aria-current":C,className:x,ref:a,style:T,to:s,unstable_viewTransition:m}),"function"==typeof c?c(N):c)}));var It,Ot;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(It||(It={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Ot||(Ot={}));const Mt=({title:t})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,e.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,e.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,e.createElement)("path",{d:"m88.659 7.002h-49.266c-2.915 0-5.378-.184-9.23 2.596l-18.743 12.752c-4.549 3.292-4.571 6.001 0 9.302l18.743 12.751c3.652 2.646 6.299 2.597 9.23 2.597h15.686 33.58c2.931-.057 5.394-1.784 5.34-3.923v-32.21c-.012-2.134-2.409-3.865-5.34-3.865z",fill:"#3969bb",transform:"matrix(-1 0 0 -1 101.999867 53.999547)"}),(0,e.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,e.createElement)("path",{d:"m18.316 23.086h4.632v6.052c-.75.245-1.459.415-2.121.514-.663.098-1.341.148-2.033.148-1.764 0-3.106-.517-4.035-1.554-.929-1.034-1.395-2.519-1.395-4.457 0-1.886.538-3.356 1.617-4.41 1.078-1.054 2.573-1.579 4.481-1.579 1.2 0 2.357.239 3.469.718l-.823 1.979c-.85-.425-1.737-.637-2.657-.637-1.071 0-1.932.358-2.572 1.077-.645.718-.968 1.685-.968 2.899 0 1.267.26 2.233.78 2.904.516.667 1.271.999 2.262.999.517 0 1.041-.052 1.572-.158v-2.435h-2.209zm11.912 6.555h-2.474v-9.614h-3.173v-2.06h8.816v2.06h-3.169zm9.908 0-2.811-9.158h-.072c.103 1.863.154 3.105.154 3.728v5.43h-2.213v-11.674h3.368l2.764 8.927h.048l2.934-8.927h3.369v11.674h-2.308v-5.525c0-.261 0-.561.009-.903.009-.341.048-1.246.112-2.716h-.074l-3.011 9.144z"}),(0,e.createElement)("path",{d:"m88.883 31.898h-3.811l-4.147-6.67-1.417 1.018v5.652h-3.357v-15.83h3.357v7.242l1.318-1.861 4.293-5.381h3.724l-5.523 7.006zm1.589-15.233c0-1.075.6-1.614 1.8-1.614 1.199 0 1.798.539 1.798 1.614 0 .512-.148.91-.45 1.196-.297.284-.749.429-1.348.429-1.2 0-1.8-.543-1.8-1.625zm3.449 15.233h-3.302v-12.104h3.302zm8.563-2.413c.578 0 1.271-.128 2.077-.38v2.456c-.82.37-1.831.552-3.031.552-1.324 0-2.28-.333-2.885-1.001-.602-.667-.902-1.668-.902-3.003v-5.835h-1.585v-1.399l1.823-1.103.949-2.557h2.115v2.579h3.388v2.48h-3.388v5.835c0 .467.129.815.393 1.041.264.222.614.335 1.046.335z"}))),t)))),Rt=({to:t,title:a})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Gt,{to:t,className:({isActive:t})=>"gtmkit-border-b-4 gtmkit-border-white gtmkit-text-color-grey gtmkit-font-semibold gtmkit-pt-5 gtmkit-pb-[18px] hover:gtmkit-border-color-grey "+(t?"gtmkit-text-color-heading gtmkit-border-b-color-primary ":"")},a)),Ut=({NavList:t})=>(0,e.createElement)("nav",{className:"gtmkit-flex gtmkit-flex-wrap gtmkit-items-center gtmkit-px-8 gtmkit-border-y gtmkit-bg-white gtmkit-border-color-border gtmkit-text-[15px] gtmkit-space-x-9"},t.map((function(t){return(0,e.createElement)(Rt,{key:t.to,to:t.to,title:t.title})})));function Lt(){return Lt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},Lt.apply(this,arguments)}function At(t,e){if(null==t)return{};var a,n,i={},r=Object.keys(t);for(n=0;n<r.length;n++)a=r[n],e.indexOf(a)>=0||(i[a]=t[a]);return i}function jt(t,e){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jt(t,e)}function Ft(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,jt(t,e)}function Ht(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Bt=a().createContext(null);var Wt=function(t){return t.scrollTop},Kt="unmounted",Jt="exited",zt="entering",$t="entered",Vt="exiting",qt=function(t){function e(e,a){var n;n=t.call(this,e,a)||this;var i,r=a&&!a.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?r?(i=Jt,n.appearStatus=zt):i=$t:i=e.unmountOnExit||e.mountOnEnter?Kt:Jt,n.state={status:i},n.nextCallback=null,n}Ft(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Kt?{status:Jt}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var a=this.state.status;this.props.in?a!==zt&&a!==$t&&(e=zt):a!==zt&&a!==$t||(e=Vt)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,a,n=this.props.timeout;return t=e=a=n,null!=n&&"number"!=typeof n&&(t=n.exit,e=n.enter,a=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:a}},n.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e)if(this.cancelNextCallback(),e===zt){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this);a&&Wt(a)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jt&&this.setState({status:Kt})},n.performEnter=function(t){var e=this,a=this.props.enter,n=this.context?this.context.isMounting:t,i=this.props.nodeRef?[n]:[bt().findDOMNode(this),n],r=i[0],o=i[1],l=this.getTimeouts(),s=n?l.appear:l.enter;t||a?(this.props.onEnter(r,o),this.safeSetState({status:zt},(function(){e.props.onEntering(r,o),e.onTransitionEnd(s,(function(){e.safeSetState({status:$t},(function(){e.props.onEntered(r,o)}))}))}))):this.safeSetState({status:$t},(function(){e.props.onEntered(r)}))},n.performExit=function(){var t=this,e=this.props.exit,a=this.getTimeouts(),n=this.props.nodeRef?void 0:bt().findDOMNode(this);e?(this.props.onExit(n),this.safeSetState({status:Vt},(function(){t.props.onExiting(n),t.onTransitionEnd(a.exit,(function(){t.safeSetState({status:Jt},(function(){t.props.onExited(n)}))}))}))):this.safeSetState({status:Jt},(function(){t.props.onExited(n)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,a=!0;return this.nextCallback=function(n){a&&(a=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var a=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this),n=null==t&&!this.props.addEndListener;if(a&&!n){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],r=i[0],o=i[1];this.props.addEndListener(r,o)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Kt)return null;var e=this.props,n=e.children,i=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,At(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a().createElement(Bt.Provider,{value:null},"function"==typeof n?n(t,i):a().cloneElement(a().Children.only(n),i))},e}(a().Component);function Yt(){}qt.contextType=Bt,qt.propTypes={},qt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Yt,onEntering:Yt,onEntered:Yt,onExit:Yt,onExiting:Yt,onExited:Yt},qt.UNMOUNTED=Kt,qt.EXITED=Jt,qt.ENTERING=zt,qt.ENTERED=$t,qt.EXITING=Vt;const Xt=qt;var Qt=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return n=e,void((a=t).classList?a.classList.remove(n):"string"==typeof a.className?a.className=Ht(a.className,n):a.setAttribute("class",Ht(a.className&&a.className.baseVal||"",n)));var a,n}))},Zt=function(t){function e(){for(var e,a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,a){var n=e.resolveArguments(t,a),i=n[0],r=n[1];e.removeClasses(i,"exit"),e.addClass(i,r?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,a)},e.onEntering=function(t,a){var n=e.resolveArguments(t,a),i=n[0],r=n[1]?"appear":"enter";e.addClass(i,r,"active"),e.props.onEntering&&e.props.onEntering(t,a)},e.onEntered=function(t,a){var n=e.resolveArguments(t,a),i=n[0],r=n[1]?"appear":"enter";e.removeClasses(i,r),e.addClass(i,r,"done"),e.props.onEntered&&e.props.onEntered(t,a)},e.onExit=function(t){var a=e.resolveArguments(t)[0];e.removeClasses(a,"appear"),e.removeClasses(a,"enter"),e.addClass(a,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var a=e.resolveArguments(t)[0];e.addClass(a,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var a=e.resolveArguments(t)[0];e.removeClasses(a,"exit"),e.addClass(a,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,a){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,a]},e.getClassNames=function(t){var a=e.props.classNames,n="string"==typeof a,i=n?(n&&a?a+"-":"")+t:a[t];return{baseClassName:i,activeClassName:n?i+"-active":a[t+"Active"],doneClassName:n?i+"-done":a[t+"Done"]}},e}Ft(e,t);var n=e.prototype;return n.addClass=function(t,e,a){var n=this.getClassNames(e)[a+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===a&&i&&(n+=" "+i),"active"===a&&t&&Wt(t),n&&(this.appliedClasses[e][a]=n,function(t,e){t&&e&&e.split(" ").forEach((function(e){return n=e,void((a=t).classList?a.classList.add(n):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(a,n)||("string"==typeof a.className?a.className=a.className+" "+n:a.setAttribute("class",(a.className&&a.className.baseVal||"")+" "+n)));var a,n}))}(t,n))},n.removeClasses=function(t,e){var a=this.appliedClasses[e],n=a.base,i=a.active,r=a.done;this.appliedClasses[e]={},n&&Qt(t,n),i&&Qt(t,i),r&&Qt(t,r)},n.render=function(){var t=this.props,e=(t.classNames,At(t,["classNames"]));return a().createElement(Xt,Lt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(a().Component);Zt.defaultProps={classNames:""},Zt.propTypes={};const te=Zt,ee=({title:t=(0,n.__)("Save","gtm-kit"),className:a="gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey"})=>{const{useUpdateSettings:o,useIsPending:l,useCanSave:s}=(0,i.useContext)(g);return(0,e.createElement)(r.Button,{className:a,onClick:()=>o(),variant:"primary",disabled:l||!s},s?(0,n.__)(t,"gtm-kit"):(0,n.__)("Saved","gtm-kit"),l?(0,e.createElement)(r.Spinner,null):"")},ae=()=>{const{useCanSave:t}=(0,i.useContext)(g);return(0,e.createElement)(te,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0},(0,e.createElement)("footer",{className:"gtmkit-fixed gtmkit-bottom-0 gtmkit-w-full gtmkit-z-10 gtmkit-bg-color-grey gtmkit-text-white gtmkit-p-8"},(0,e.createElement)(ee,null)))},ne=({subject:t})=>{const a=!0===t||"on"===t,i=!0===a?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,e.createElement)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase "+i},a?(0,n.__)("Active","gtm-kit"):(0,n.__)("Inactive","gtm-kit"))},ie=(0,i.forwardRef)((({children:t,className:a="",...n},i)=>(0,e.createElement)("div",{...n,className:"gtmkit-flex gtmkit-flex-col gtmkit-min-h-[128px] gtmkit-bg-white gtmkit-border gtmkit-border-color-border gtmkit-mb-6 gtmkit-py-4 gtmkit-px-5 gtmkit-rounded gtmkit-group gtmkit-w-full "+a,ref:i},t)));ie.Header=({as:t="h3",title:a="",children:n,className:i="",...r})=>(0,e.createElement)("div",{...r,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+i},(0,e.createElement)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},a),n),ie.Content=({as:t="div",children:a,className:n="gtmkit-flex-auto",...i})=>(0,e.createElement)(t,{...i,className:n},a),ie.Button=({url:t,destination:a,newTab:n=!1,text:i,group:o="",...l})=>{const s=nt();return(0,e.createElement)("div",{...l,className:"gtmkit-mt-4 gtmkit-mb-0.5"},(0,e.createElement)(r.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full sm:gtmkit-w-auto gtmkit-min-w-[225px]",onClick:()=>{a&&t&&!1===n?window.gtmkitSettings.current_poage===o?s(a,{replace:!0}):window.location.href=t+"#"+a:t?n?window.open(t):window.location.href=t:s(a,{replace:!0})}},(0,e.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},i)))};const re=ie,oe=({title:t,data:a,className:r=""})=>{const{useSettings:o}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},t),(0,e.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px] "+r},a.map(((t,a)=>!1===t.featured?null:(0,e.createElement)(re,{key:a},(0,e.createElement)(re.Header,{title:t.title},t.pill?(0,e.createElement)(ne,{subject:o[t.group][t.option]}):null),(0,e.createElement)(re.Content,null,t.text.map(((t,a)=>(0,e.createElement)("p",{key:a},t)))),(0,e.createElement)(re.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,n.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group}))))))},le=[{title:"Woocommerce",pill:!0,group:"integrations",option:"woocommerce_integration",text:[(0,n.__)("The #1 open source eCommerce platform built for WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/woocommerce",text:(0,n.__)("Setup integration","gtm-kit")}},{title:"Contact Form 7",pill:!0,group:"integrations",option:"cf7_integration",text:[(0,n.__)("Just another contact form plugin for WordPress. Simple but flexible","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/cf7",text:(0,n.__)("Setup integration","gtm-kit")}},{title:"Easy Digital Downloads",pill:!0,group:"integrations",option:"edd_integration",text:[(0,n.__)("Easy way to sell Digital Products With WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/edd",text:(0,n.__)("Setup integration","gtm-kit")}}],se=()=>{const{useSettings:t}=(0,i.useContext)(g),[a,r]=(0,i.useState)(window.gtmkitSettings.tutorials),o=Boolean(t.general.sgtm_domain&&t.general.sgtm_domain.trim());return(0,i.useEffect)((()=>{r((t=>[...t,{title:(0,n.__)("See all tutorials…","gtm-kit"),text:[(0,n.__)("See all our tutorials and get the most out of GTM Kit","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=documentation&utm_content=dashboard-tutorials",text:(0,n.__)("Read articles","gtm-kit")},featured:!0}]))}),[]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("General","gtm-kit")),(0,e.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 lg:gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px]"},(0,e.createElement)(re,null,(0,e.createElement)(re.Header,{title:"Google Tag Manager Container"},(0,e.createElement)(ne,{subject:t.general.gtm_id&&t.general.container_active})),(0,e.createElement)(re.Content,null,t.general.gtm_id&&t.general.container_active?(0,e.createElement)("p",null,(0,n.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id):(0,e.createElement)("p",null,(0,n.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,e.createElement)(re.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})),(0,e.createElement)(re,null,(0,e.createElement)(re.Header,{title:(0,n.__)("Server-side GTM","gtm-kit")},(0,e.createElement)(ne,{subject:o})),(0,e.createElement)(re.Content,null,(0,e.createElement)("p",null,(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit"))),(0,e.createElement)(re.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})),(0,e.createElement)(re,null,(0,e.createElement)(re.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")},(0,e.createElement)(ne,{subject:t.general.analytics_active})),(0,e.createElement)(re.Content,null,(0,e.createElement)("p",null,(0,n.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,e.createElement)(re.Button,{destination:"/misc",text:(0,n.__)("Share anonymous data","gtm-kit")}))),(0,e.createElement)(oe,{title:(0,n.__)("Tutorials","gtm-kit"),data:a}),(0,e.createElement)(oe,{title:(0,n.__)("Integrations","gtm-kit"),data:le}))},me=({title:t,placeholder:a,help:n,className:o="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:l="general",optionName:s,isDisabled:m})=>{const{useSettings:c,useUpdateStateSettings:u}=(0,i.useContext)(g);return(0,e.createElement)(r.TextControl,{label:t,placeholder:a,help:n,className:o,value:c[l][s],onChange:t=>u(l,s,t),disabled:m})},ce=({title:t,label:a,optionGroup:n="general",optionName:o,disabled:l=!1})=>{const{useSettings:s,useUpdateStateSettings:m}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,e.createElement)(r.BaseControl,{label:t},(0,e.createElement)(r.ToggleControl,{label:a,checked:!l&&s[n][o],onChange:()=>{m(n,o,!(s&&s[n][o]))},disabled:l}))))},ge=({title:t,options:a,help:n,className:o="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:s,disabled:m})=>{const{useSettings:c,useUpdateStateSettings:u}=(0,i.useContext)(g);return(0,e.createElement)(r.RadioControl,{label:t,options:a,help:n,className:o,selected:parseInt(c[l][s]),onChange:t=>u(l,s,t),disabled:m})},ue=(0,i.forwardRef)((({children:t,className:a="",disabled:n=!1,...i},r)=>(0,e.createElement)("div",{...i,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-w-3/4 gtmkit-border-color-grey "+a+(n?"gtmkit-opacity-60":""),ref:r},t)));ue.Header=({as:t="h3",title:a="",children:n,className:i="",...r})=>(0,e.createElement)(t,{...r,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey "+i},a,n),ue.Content=({as:t="div",children:a,className:n="",...i})=>(0,e.createElement)(t,{...i,className:"gtmkit-px-8 gtmkit-py-6 "+n},a);const de=ue,pe=()=>{const{useSettings:t}=(0,i.useContext)(g),a=!(t.general.sgtm_domain&&t.general.sgtm_domain.trim()&&t.general.sgtm_container_identifier&&t.general.sgtm_container_identifier.trim());return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Google Tag Manager container","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("General Container Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")),(0,e.createElement)(me,{title:(0,n.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,n.__)("Enter GTM Container ID","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("Inject Container Code","gtm-kit"),label:(0,n.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active"}),(0,e.createElement)(ce,{title:(0,n.__)("Just the container","gtm-kit"),label:(0,n.__)("Setting this to On will reduce the functionality to just the GTM container code. No additional data will be pushed to the datalayer regardless of any other settings.","gtm-kit"),optionName:"just_the_container"}),(0,e.createElement)(me,{title:(0,n.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,n.__)("The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do so.","gtm-kit")}))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(me,{title:(0,n.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,n.__)("Enter domain …","gtm-kit"),help:(0,n.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit")}),(0,e.createElement)(me,{title:(0,n.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,n.__)("Enter loader name …","gtm-kit"),help:(0,n.__)("Only use if you are using a custom loader.","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,n.__)("Prolong cookie lifetime in Safari and other browsers with ITP. This only works if you use Stape sGTM hosting and have set up the Cookie Keeper power up.","gtm-kit"),optionName:"sgtm_cookie_keeper",disabled:a})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Google Tag Manager Server-side Tagging","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/guides/google-tag-manager-server-side-tagging/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=sgtm&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))),(0,e.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Hosting server-side GTM containers","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Stape.io is a solution for hosting server-side Google Tag Manager containers, offering a simplified approach that demands less technical expertise than solutions like Google Cloud Platform.","gtm-kit")," ",(0,n.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,e.createElement)("a",{href:"https://stape.io/?pt=tlam&rs=plugin",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more about Stape.io","gtm-kit"))))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Page Speed Optimization","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("load_js event","gtm-kit"),label:(0,n.__)("Setting this to On will push the event 'load_js' on page load.","gtm-kit"),optionName:"load_js_event"})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Delay JavaScript execution","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Page optimization plugins can delay the 'load_js' event and this can be used to delay the triggering og tags in Google Tag Manager.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/guides/delay-javascript-execution-in-gtm/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=delay-js&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Google Tag Manager Environment","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(me,{title:(0,n.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,n.__)("Enter gtm_auth code","gtm-kit"),help:(0,n.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit")}),(0,e.createElement)(me,{title:(0,n.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,n.__)("Enter gtm_preview code","gtm-kit"),help:(0,n.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit")})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Environments","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,n.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,n.__)("If left empty the default environment will be used.","gtm-kit")),(0,e.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Override settings in wp-config.php","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("You can override the values by using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=container-settings&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Container Code Implementation","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Container code implementation:","gtm-kit"),options:[{label:(0,n.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,n.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,n.__)("Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle.","gtm-kit"),optionName:"script_implementation"}),(0,e.createElement)(ge,{title:(0,n.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,n.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,n.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,n.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,n.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,n.__)('The preferred method to implement the <noscript> container code is just after the opening <body> tag. This requires that your theme uses the "body_open" hook. If your theme does not support this the script can be injected in the footer or you can use the function below.',"gtm-kit"),optionName:"noscript_implementation"}),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,e.createElement)("code",null,"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>")))))},he=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Post Data","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Post Data Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")),(0,e.createElement)(ce,{title:(0,n.__)("Post type","gtm-kit"),id:"post-type",label:(0,n.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type"}),(0,e.createElement)(ce,{title:(0,n.__)("Page type","gtm-kit"),id:"page-type",label:(0,n.__)('Include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. "campaign".',"gtm-kit"),optionName:"datalayer_page_type"}),(0,e.createElement)(ce,{title:(0,n.__)("Categories","gtm-kit"),id:"categories",label:(0,n.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories"}),(0,e.createElement)(ce,{title:(0,n.__)("Tags","gtm-kit"),id:"tags",label:(0,n.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags"}),(0,e.createElement)(ce,{title:(0,n.__)("Post title","gtm-kit"),id:"post-title",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title"}),(0,e.createElement)(ce,{title:(0,n.__)("Post ID","gtm-kit"),id:"post-id",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id"}),(0,e.createElement)(ce,{title:(0,n.__)("Post data","gtm-kit"),id:"post-date",label:(0,n.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date"}),(0,e.createElement)(ce,{title:(0,n.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,n.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name"}),(0,e.createElement)(ce,{title:(0,n.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,n.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id"})))),_e=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("User Data","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,e.createElement)(de.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,n.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,e.createElement)("p",null,(0,n.__)("Full page caching will cache user data making it the same for all users. There are ways around this, but it depends on the chosen cache solution and is only for advanced users.","gtm-kit")))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("User Data Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,n.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in"}),(0,e.createElement)(ce,{title:(0,n.__)("User ID","gtm-kit"),id:"user-id",label:(0,n.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id"}),(0,e.createElement)(ce,{title:(0,n.__)("User role","gtm-kit"),id:"user-role",label:(0,n.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role"})))),ke=()=>{const{useSettings:t}=(0,i.useContext)(g),a=!t.general.gcm_default_settings;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Google Consent Mode","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Google Consent Mode Activation","gtm-kit")},(0,e.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,n.__)("Warning!","gtm-kit"))),(0,e.createElement)(de.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,n.__)("Most Consent Management Platforms will handle the Google Consent Mode settings for you and applying the default settings in both GTM Kit and you CMP will lead to unexpected behaviour or errors.","gtm-kit")),(0,e.createElement)("p",null,(0,n.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")),(0,e.createElement)("p",{className:"!gtmkit-mt-4"},(0,n.__)("GTM Kit will only set the default Consent Mode settings and you must update the settings yourself when the user has given consent.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,e.createElement)("a",{href:"https://developers.google.com/tag-platform/security/guides/consent#implementation_example",target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline gtmkit-font-semibold"},(0,n.__)("See an example of how consent is updated","gtm-kit"))),(0,e.createElement)(ce,{title:(0,n.__)("Activate GCM settings","gtm-kit"),label:(0,n.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings"}))),(0,e.createElement)(de,{disabled:a},(0,e.createElement)(de.Header,{title:(0,n.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Ad Personalization","gtm-kit"),label:(0,n.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Ad Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Ad User Data","gtm-kit"),label:(0,n.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Analytics Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Functionality Storage","gtm-kit"),label:(0,n.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Personalization Storage","gtm-kit"),label:(0,n.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Security Storage","gtm-kit"),label:(0,n.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:a}))))},fe=({label:t,value:a,tag:n})=>(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,e.createElement)("strong",null,t)),(0,e.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===n?(0,e.createElement)("code",{className:"gtmkit-text-sm"},a):(0,e.createElement)("em",null,a))),Ee=()=>{const{useSiteData:t}=(0,i.useContext)(g),a=Object.values(t.shared_data);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,n.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,n.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,e.createElement)("tbody",{className:"gtmkit-py-6"},a.map((function(t,a){return(0,e.createElement)(fe,{key:a,label:t.label,value:t.value,tag:t.tag})})))))},be=()=>{const{}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Misc","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(Ee,null),(0,e.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,n.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,e.createElement)(ce,{title:(0,n.__)("Share anonymous data","gtm-kit"),label:(0,n.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active"}))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Logging and debugging","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Console log","gtm-kit"),label:(0,n.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log"}),(0,e.createElement)(ce,{title:(0,n.__)("Debug log","gtm-kit"),label:(0,n.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log"}))))},ve=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(oe,{title:(0,n.__)("Integrations","gtm-kit"),data:le})),ye=({pluginName:t})=>(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.sprintf)(
    22// translators: %s is the name of the plugin.
    3 (0,n.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,n.sprintf)(
     3(0,n.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,n.sprintf)(
    44// translators: %s is the name of the plugin.
    5 (0,n.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)),(0,e.createElement)(o.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-sm disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.pluginInstallUrl+t}},(0,n.sprintf)(
     5(0,n.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)),(0,e.createElement)(r.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-sm disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.pluginInstallUrl+t}},(0,n.sprintf)(
    66// translators: %s is the name of the plugin.
    7 (0,n.__)("Install %s","gtm-kit"),t)))),we=({title:t,options:a,className:r="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:s,disabled:m=!1,help:c="",notSet:u=!1})=>{const{useSettings:d,useUpdateStateSettings:p}=(0,i.useContext)(g),h=u?[{label:(0,n.__)("(not set)","gtm-kit"),value:""},...a]:a;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o.SelectControl,{label:t,value:d&&d[l][s],options:h,className:r,onChange:t=>p(l,s,t),disabled:m,help:c}))},Se=({pluginName:t,optionName:a,pluginInactive:i})=>(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,n.sprintf)(
     7(0,n.__)("Install %s","gtm-kit"),t)))),xe=({title:t,options:a,className:o="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:s,disabled:m=!1,help:c="",notSet:u=!1})=>{const{useSettings:d,useUpdateStateSettings:p}=(0,i.useContext)(g),h=u?[{label:(0,n.__)("(not set)","gtm-kit"),value:""},...a]:a;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r.SelectControl,{label:t,value:d&&d[l][s],options:h,className:o,onChange:t=>p(l,s,t),disabled:m,help:c}))},Se=({pluginName:t,optionName:a,pluginInactive:i})=>(0,e.createElement)(de,{disabled:i},(0,e.createElement)(de.Header,{title:(0,n.sprintf)(
    88// translators: %s is the name of the plugin.
    9 (0,n.__)("%s Integration","gtm-kit"),t)}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.sprintf)(
     9(0,n.__)("%s Integration","gtm-kit"),t)}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.sprintf)(
    1010// translators: %s is the name of the plugin.
    1111(0,n.__)("Track %s","gtm-kit"),t),label:(0,n.sprintf)(
    1212// translators: %s is the name of the plugin.
    13 (0,n.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:a,disabled:i}))),Ne=[{label:(0,n.__)("Retail","gtm-kit"),value:"retail"},{label:(0,n.__)("Education","gtm-kit"),value:"education"},{label:(0,n.__)("Flights","gtm-kit"),value:"flights"},{label:(0,n.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,n.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,n.__)("Local deals","gtm-kit"),value:"local"},{label:(0,n.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,n.__)("Travel","gtm-kit"),value:"travel"},{label:(0,n.__)("Custom","gtm-kit"),value:"custom"}],Ce=()=>{const{useSettings:t,isWooAddonActive:a}=(0,i.useContext)(g),o="WooCommerce",r=!window.gtmkitSettings.plugins.woocommerce,l=r||!t.integrations.woocommerce_integration,s=l||!a,m=s||!t.general.sgtm_domain,c=m||!t.premium.woocommerce_webhooks;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("WooCommerce","gtm-kit")),r?(0,e.createElement)(xe,{pluginName:o}):null,(0,e.createElement)(Se,{pluginName:o,optionName:"woocommerce_integration",pluginInactive:r}),(0,e.createElement)(pe,{disabled:l},(0,e.createElement)(pe.Header,{title:(0,n.__)("Basic settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(we,{title:(0,n.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,n.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:l}),(0,e.createElement)(ge,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_use_sku",disabled:l}),(0,e.createElement)(ge,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:l}),(0,e.createElement)(ge,{title:(0,n.__)("Exclude shipping from revenue","gtm-kit"),label:(0,n.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:l}),(0,e.createElement)(ge,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_customer_data",disabled:l}))),a?(0,e.createElement)(pe,{disabled:s},(0,e.createElement)(pe.Header,{title:(0,n.__)("Webhooks for server-side tracking","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit")),(0,e.createElement)(ge,{title:(0,n.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,n.__)("This option will allow webhooks to be sent to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:m}),(0,e.createElement)(ge,{title:(0,n.__)("Purchase webhook","gtm-kit"),label:(0,n.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_purchase_webhook",disabled:c}),(0,e.createElement)(ge,{title:(0,n.__)("Refund webhook","gtm-kit"),label:(0,n.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_refund_webhook",disabled:c}))):null,(0,e.createElement)(pe,{disabled:l},(0,e.createElement)(pe.Header,{title:(0,n.__)("Event customization","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:"view_item_list (with product filter)",options:[{label:(0,n.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,n.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,n.__)("Do you what to push the view_item_list event if the list is updated using a filter or just once per page view.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_view_item_list_limit",disabled:l}),(0,e.createElement)(ue,{title:"view_item",options:[{label:(0,n.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,n.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,n.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,n.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:l}),(0,e.createElement)(ue,{title:"add_shipping_info ",options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:l}),(0,e.createElement)(ue,{title:"add_payment_info ",options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:l}))),(0,e.createElement)(pe,{disabled:l},(0,e.createElement)(pe.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(we,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Ne,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,n.__)("Enter prefix …","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:l}))),a?(0,e.createElement)(pe,{disabled:s},(0,e.createElement)(pe.Header,{title:(0,n.__)("Custom CSS Selectors","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")),(0,e.createElement)(ce,{title:(0,n.__)("Single Product (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_single_product_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector …","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector …","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("Product List (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector …","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit")}))):null,(0,e.createElement)(pe,{disabled:l},(0,e.createElement)(pe.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_dequeue_script",disabled:l}),(0,e.createElement)(ge,{title:(0,n.__)("Include permalink structure","gtm-kit"),label:(0,n.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_permalink_structure",disabled:l}),(0,e.createElement)(ge,{title:(0,n.__)("Include path of pages","gtm-kit"),label:(0,n.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_pages",disabled:l}))))},Te=()=>{const{useSettings:t}=(0,i.useContext)(g),a="Contact Form 7",o=!window.gtmkitSettings.plugins.cf7,r=o||!t.integrations.cf7_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Contact Form 7","gtm-kit")),o?(0,e.createElement)(xe,{pluginName:a}):null,(0,e.createElement)(Se,{pluginName:a,optionName:"cf7_integration",pluginInactive:o}),(0,e.createElement)(pe,{disabled:r},(0,e.createElement)(pe.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:(0,n.__)("Load JavaScript","gtm-kit"),options:[{label:(0,n.__)("Only on pages where where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,n.__)("On all pages","gtm-kit"),value:2}],help:(0,n.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:r}))))},Ge=()=>{const t="Easy Digital Downloads",a=!window.gtmkitSettings.plugins.edd,{useSettings:o}=(0,i.useContext)(g),r=a||!o.integrations.edd_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Easy Digital Downloads","gtm-kit")),a?(0,e.createElement)(xe,{pluginName:t}):null,(0,e.createElement)(Se,{pluginName:t,optionName:"edd_integration",pluginInactive:a}),(0,e.createElement)(pe,{disabled:r},(0,e.createElement)(pe.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"edd_use_sku",disabled:r}),(0,e.createElement)(ge,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:r}),(0,e.createElement)(ge,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"edd_include_customer_data",disabled:r}))),(0,e.createElement)(pe,{disabled:r},(0,e.createElement)(pe.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(we,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Ne,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:r}),(0,e.createElement)(ce,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,n.__)("Enter prefix …","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:r}))),(0,e.createElement)(pe,{disabled:a},(0,e.createElement)(pe.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"edd_dequeue_script",disabled:r}))))},De=[{title:"Google Analytics 4",pill:!1,group:"integrations",option:"woocommerce_integration",text:[(0,n.__)("Choose between a basic configuration and an advanced eCommerce configuration","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.templatesUrl,destination:"/ga4-templates",text:(0,n.__)("Get template","gtm-kit")}}],Pe=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Getting Started","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("GTM Kit is sending data to your Google Tag Manger container but you still need to configure Tags, Triggers and Variables in GTM to use the data.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")))),(0,e.createElement)(re,{title:(0,n.__)("Templates","gtm-kit"),data:De})),Me=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Google Analytics 4","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Before you start","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",null,(0,n.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:"https://gtmkit.com/guides/how-to-import-a-google-tag-manager-container/",target:"_blank",rel:"noreferrer"},(0,n.__)("Read the guide","gtm-kit"))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Basic configuration","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("If you don't have eCommerce functionality then this is the right choice for you.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("This template includes the Google Tag, which will send basic events to Google Analytics 4.","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4"},(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("GTM container import files:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,n.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))))),(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("Necessary modifications:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm"},(0,e.createElement)("li",null,(0,n.__)('Edit the variable with the name "constant - GA4 Measurement ID" and enter your Google Analytics 4 Measurement ID.',"gtm-kit"))))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("eCommerce configuration","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("If you have a webshop then this is the right choice for you.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("This template includes the Google Tag and a Google Analytics GA4 event tag, that will catch all eCommerce events and send them to Google Analytics 4.","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4"},(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("GTM container import files:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,n.__)("Google Analytics 4 - eCommerce","gtm-kit"))))),(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("Necessary modifications:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm"},(0,e.createElement)("li",null,(0,n.__)('Edit the variable with the name "constant - GA4 Measurement ID" and enter your Google Analytics 4 Measurement ID.',"gtm-kit")))))))),Ie=()=>{const t=nt();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Help","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Need help?","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("We are here to help if you have any questions.","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{t("/support",{replace:!0})}},(0,n.__)("See support options","gtm-kit"))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Tutorials","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("ul",null,se.map(((t,a)=>(0,e.createElement)("li",{key:a,className:"gtmkit-mb-4"},(0,e.createElement)("a",{href:t.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline"},t.title),t.text.map(((t,a)=>(0,e.createElement)("div",{key:a,className:"gtmkit-text-sm"},t))))))))))},Oe=()=>{const{useIsSending:t,useSiteData:a,useUpdateSupportTicket:r,useSupportTicket:l,useSendSystemData:s,useIsSystemDataSent:m,useSystemDataMessage:c}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Get support","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Support options","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,n.__)("WordPress.org Support Forum","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,n.__)("GITHub repository","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,n.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)")))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,e.createElement)(pe.Content,null,m?(0,e.createElement)("p",{className:"gtmkit-mb-2"},c):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"gtmkit-mb-2"},(0,n.__)("If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:","gtm-kit")),(0,e.createElement)(o.TextControl,{label:(0,e.createElement)("span",{className:"gtmkit-text-red-600"},c," "),placeholder:(0,n.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:l,onChange:t=>r(t)}),(0,e.createElement)(o.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{s()},disabled:!l.toUpperCase().startsWith("FS")},(0,e.createElement)("span",null,(0,n.__)("Send system data","gtm-kit")),t?(0,e.createElement)(o.Spinner,null):"")))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center"},(0,e.createElement)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2"},"(",(0,n.__)("Version:","gtm-kit")," ",a.gtmkit_version,")")),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",null,(0,n.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,e.createElement)("br",null),(0,e.createElement)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer"},(0,n.__)("The changelog","gtm-kit")),(0,e.createElement)("br",null),(0,e.createElement)("a",{className:"gtmkit-text-color-primary  hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,n.__)("The Github repository","gtm-kit"))))))};const Re={integrations:(0,n.__)("Integrations","gtm-kit"),templates:(0,n.__)("Google Tag Manager Templates","gtm-kit"),help:(0,n.__)("Help","gtm-kit")},Ae=()=>{const{useSettings:t}=(0,i.useContext)(g),a=window.gtmkitSettings.currentPage,r=function({page:t}){const e=[{to:"general",title:(0,n.__)("Dashboard","gtm-kit")},{to:"container",title:(0,n.__)("Container","gtm-kit")},{to:"post-data",title:(0,n.__)("Post data","gtm-kit")},{to:"user-data",title:(0,n.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,n.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,n.__)("Misc","gtm-kit")}],a=[{to:"integrations",title:(0,n.__)("Integrations","gtm-kit")},{to:"woocommerce",title:"WooCommerce"},{to:"cf7",title:"Contact Form 7"},{to:"edd",title:"Easy Digital Downloads"}],i=[{to:"templates",title:(0,n.__)("Templates","gtm-kit")},{to:"ga4-templates",title:(0,n.__)("Google Analytics 4","gtm-kit")}],o=[{to:"help",title:(0,n.__)("Help","gtm-kit")},{to:"support",title:(0,n.__)("Support","gtm-kit")}];switch(t){case"general":return e;case"integrations":return a;case"templates":return i;case"help":return o}}({page:a}),l=Re[a]||(0,n.__)("Settings","gtm-kit");return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ot,{title:l}),(0,e.createElement)(At,{NavList:r}),(0,e.createElement)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base"},(0,e.createElement)(kt,null,(0,e.createElement)(ht,{exact:!0,path:"/general",element:(0,e.createElement)(me,null)}),(0,e.createElement)(ht,{exact:!0,path:"/container",element:(0,e.createElement)(he,null)}),(0,e.createElement)(ht,{exact:!0,path:"/post-data",element:(0,e.createElement)(_e,null)}),(0,e.createElement)(ht,{exact:!0,path:"/user-data",element:(0,e.createElement)(ke,null)}),(0,e.createElement)(ht,{exact:!0,path:"/google-consent-mode",element:(0,e.createElement)(fe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/misc",element:(0,e.createElement)(ve,null)}),(0,e.createElement)(ht,{exact:!0,path:"/integrations",element:(0,e.createElement)(ye,null)}),(0,e.createElement)(ht,{exact:!0,path:"/woocommerce",element:(0,e.createElement)(Ce,null)}),(0,e.createElement)(ht,{exact:!0,path:"/cf7",element:(0,e.createElement)(Te,null)}),(0,e.createElement)(ht,{exact:!0,path:"/edd",element:(0,e.createElement)(Ge,null)}),(0,e.createElement)(ht,{exact:!0,path:"/templates",element:(0,e.createElement)(Pe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/ga4-templates",element:(0,e.createElement)(Me,null)}),(0,e.createElement)(ht,{exact:!0,path:"/help",element:(0,e.createElement)(Ie,null)}),(0,e.createElement)(ht,{exact:!0,path:"/support",element:(0,e.createElement)(Oe,null)}),(0,e.createElement)(ht,{path:"/",element:(0,e.createElement)(pt,{replace:!0,to:"/"+a})}))),(0,e.createElement)(ae,null)):(0,e.createElement)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center"},(0,e.createElement)(o.Spinner,null))},Ue=()=>(0,e.createElement)(Ct,{basename:"/"},(0,e.createElement)(u,null,(0,e.createElement)(Ae,null)));document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,i.render)((0,e.createElement)(Ue,null),t)}))})();
     13(0,n.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:a,disabled:i}))),we=[{label:(0,n.__)("Retail","gtm-kit"),value:"retail"},{label:(0,n.__)("Education","gtm-kit"),value:"education"},{label:(0,n.__)("Flights","gtm-kit"),value:"flights"},{label:(0,n.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,n.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,n.__)("Local deals","gtm-kit"),value:"local"},{label:(0,n.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,n.__)("Travel","gtm-kit"),value:"travel"},{label:(0,n.__)("Custom","gtm-kit"),value:"custom"}],Ne=()=>{const{useSettings:t,isWooAddonActive:a}=(0,i.useContext)(g),r="WooCommerce",o=!window.gtmkitSettings.plugins.woocommerce,l=o||!t.integrations.woocommerce_integration,s=l||!a,m=s||!t.general.sgtm_domain,c=m||!t.premium.woocommerce_webhooks;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("WooCommerce","gtm-kit")),o?(0,e.createElement)(ye,{pluginName:r}):null,(0,e.createElement)(Se,{pluginName:r,optionName:"woocommerce_integration",pluginInactive:o}),(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Basic settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(xe,{title:(0,n.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,n.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_use_sku",disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Exclude shipping from revenue","gtm-kit"),label:(0,n.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:l}))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("User Data","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_customer_data",disabled:l})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("User-Provided Data","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://support.google.com/google-ads/answer/13262500?sjid=9465166023214753583-EU#Code_snippet",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),a?(0,e.createElement)(de,{disabled:s},(0,e.createElement)(de.Header,{title:(0,n.__)("Webhooks for server-side tracking","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit")),(0,e.createElement)(ce,{title:(0,n.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,n.__)("This option will allow webhooks to be sent to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:m}),(0,e.createElement)(ce,{title:(0,n.__)("Purchase webhook","gtm-kit"),label:(0,n.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_purchase_webhook",disabled:c}),(0,e.createElement)(ce,{title:(0,n.__)("Refund webhook","gtm-kit"),label:(0,n.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_refund_webhook",disabled:c}))):null,(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Event customization","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ge,{title:"view_item_list (with product filter)",options:[{label:(0,n.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,n.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,n.__)("Do you what to push the view_item_list event if the list is updated using a filter or just once per page view.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_view_item_list_limit",disabled:l}),(0,e.createElement)(ge,{title:"view_item",options:[{label:(0,n.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,n.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,n.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,n.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:l}),(0,e.createElement)(ge,{title:"add_shipping_info ",options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:l}),(0,e.createElement)(ge,{title:"add_payment_info ",options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:l}))),(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(xe,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:we,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:l}),(0,e.createElement)(me,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,n.__)("Enter prefix …","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:l}))),a?(0,e.createElement)(de,{disabled:s},(0,e.createElement)(de.Header,{title:(0,n.__)("Custom CSS Selectors","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")),(0,e.createElement)(me,{title:(0,n.__)("Single Product (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_single_product_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector …","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit")}),(0,e.createElement)(me,{title:(0,n.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector …","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit")}),(0,e.createElement)(me,{title:(0,n.__)("Product List (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector …","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit")}))):null,(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_dequeue_script",disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Include permalink structure","gtm-kit"),label:(0,n.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_permalink_structure",disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Include path of pages","gtm-kit"),label:(0,n.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_pages",disabled:l}))))},Ce=()=>{const{useSettings:t}=(0,i.useContext)(g),a="Contact Form 7",r=!window.gtmkitSettings.plugins.cf7,o=r||!t.integrations.cf7_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Contact Form 7","gtm-kit")),r?(0,e.createElement)(ye,{pluginName:a}):null,(0,e.createElement)(Se,{pluginName:a,optionName:"cf7_integration",pluginInactive:r}),(0,e.createElement)(de,{disabled:o},(0,e.createElement)(de.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Load JavaScript","gtm-kit"),options:[{label:(0,n.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,n.__)("On all pages","gtm-kit"),value:2}],help:(0,n.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:o}))))},Te=()=>{const t="Easy Digital Downloads",a=!window.gtmkitSettings.plugins.edd,{useSettings:r}=(0,i.useContext)(g),o=a||!r.integrations.edd_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Easy Digital Downloads","gtm-kit")),a?(0,e.createElement)(ye,{pluginName:t}):null,(0,e.createElement)(Se,{pluginName:t,optionName:"edd_integration",pluginInactive:a}),(0,e.createElement)(de,{disabled:o},(0,e.createElement)(de.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"edd_use_sku",disabled:o}),(0,e.createElement)(ce,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:o}),(0,e.createElement)(ce,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"edd_include_customer_data",disabled:o}))),(0,e.createElement)(de,{disabled:o},(0,e.createElement)(de.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(xe,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:we,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,e.createElement)(me,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,n.__)("Enter prefix …","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:o}))),(0,e.createElement)(de,{disabled:a},(0,e.createElement)(de.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"edd_dequeue_script",disabled:o}))))},De=window.gtmkitSettings.templates||{},Pe=Object.keys(De).map((function(t){const e=De[t][0];return{title:e.title,to:e.path,pill:!1,text:[e.description],link:{internal:!0,url:window.gtmkitSettings.templatesUrl,destination:"/"+e.path,text:(0,n.__)("Get template","gtm-kit")}}})),Ge=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Getting Started","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("GTM Kit is sending data to your Google Tag Manger container but you still need to configure Tags, Triggers and Variables in GTM to use the data.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")),(0,e.createElement)("p",null,(0,n.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:"https://gtmkit.com/guides/how-to-import-a-google-tag-manager-container/",target:"_blank",rel:"noreferrer"},(0,n.__)("Read the guide","gtm-kit"))))),(0,e.createElement)(oe,{title:(0,n.__)("Templates","gtm-kit"),data:Pe})),Ie=({title:t,description:a,link:i,templates:r})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:t}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},a),i&&i.url&&i.link_text?(0,e.createElement)("div",null,(0,e.createElement)("a",{href:i.url,target:"_blank",className:"gtmkit-text-color-primary gtmkit-text-base dgtmkit-font-semibold hover:gtmkit-underline",rel:"noreferrer"},i.link_text)):null,r&&r.length>0?(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4"},(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("GTM container import files:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},r.map((function(t){return(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:t.link,target:"_blank",rel:"noreferrer"},t.title))})))),(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("Necessary modifications:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm"},r.map((function(t){return(0,e.createElement)("li",null,t.help_text)}))))):null))),Oe=({sectionData:t})=>{const a=t.collections;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},t.title),Object.keys(a).map((function(t){return(0,e.createElement)(Ie,{title:a[t].title,description:a[t].description,link:a[t].link,templates:a[t].templates})})))},Me=()=>{const t=nt(),a=window.gtmkitSettings.tutorials;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Help","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Need help?","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("We are here to help if you have any questions.","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{t("/support",{replace:!0})}},(0,n.__)("See support options","gtm-kit"))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Tutorials","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("ul",null,a.map(((t,a)=>(0,e.createElement)("li",{key:a,className:"gtmkit-mb-4"},(0,e.createElement)("a",{href:t.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline"},t.title),t.text.map(((t,a)=>(0,e.createElement)("div",{key:a,className:"gtmkit-text-sm"},t))))))))))},Re=()=>{const{useIsSending:t,useSiteData:a,useUpdateSupportTicket:o,useSupportTicket:l,useSendSystemData:s,useIsSystemDataSent:m,useSystemDataMessage:c}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Get support","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Support options","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,n.__)("WordPress.org Support Forum","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,n.__)("GITHub repository","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,n.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)")))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,e.createElement)(de.Content,null,m?(0,e.createElement)("p",{className:"gtmkit-mb-2"},c):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"gtmkit-mb-2"},(0,n.__)("If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:","gtm-kit")),(0,e.createElement)(r.TextControl,{label:(0,e.createElement)("span",{className:"gtmkit-text-red-600"},c," "),placeholder:(0,n.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:l,onChange:t=>o(t)}),(0,e.createElement)(r.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{s()},disabled:!l.toUpperCase().startsWith("FS")},(0,e.createElement)("span",null,(0,n.__)("Send system data","gtm-kit")),t?(0,e.createElement)(r.Spinner,null):"")))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center"},(0,e.createElement)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2"},"(",(0,n.__)("Version:","gtm-kit")," ",a.gtmkit_version,")")),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",null,(0,n.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,e.createElement)("br",null),(0,e.createElement)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer"},(0,n.__)("The changelog","gtm-kit")),(0,e.createElement)("br",null),(0,e.createElement)("a",{className:"gtmkit-text-color-primary  hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,n.__)("The Github repository","gtm-kit"))))))};const Ue={integrations:(0,n.__)("Integrations","gtm-kit"),templates:(0,n.__)("Google Tag Manager Templates","gtm-kit"),help:(0,n.__)("Help","gtm-kit")},Le=()=>{const{useSettings:t}=(0,i.useContext)(g),a=window.gtmkitSettings.currentPage,o=function({page:t}){switch(t){case"general":return[{to:"general",title:(0,n.__)("Dashboard","gtm-kit")},{to:"container",title:(0,n.__)("Container","gtm-kit")},{to:"post-data",title:(0,n.__)("Post data","gtm-kit")},{to:"user-data",title:(0,n.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,n.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,n.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,n.__)("Integrations","gtm-kit")},{to:"woocommerce",title:"WooCommerce"},{to:"cf7",title:"Contact Form 7"},{to:"edd",title:"Easy Digital Downloads"}];case"templates":return[{to:"templates",title:(0,n.__)("Templates","gtm-kit")},...Pe];case"help":return[{to:"help",title:(0,n.__)("Help","gtm-kit")},{to:"support",title:(0,n.__)("Support","gtm-kit")}]}}({page:a}),l=window.gtmkitSettings.templates,s=Ue[a]||(0,n.__)("Settings","gtm-kit");return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Mt,{title:s}),(0,e.createElement)(Ut,{NavList:o}),(0,e.createElement)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base"},(0,e.createElement)(kt,null,(0,e.createElement)(ht,{exact:!0,path:"/general",element:(0,e.createElement)(se,null)}),(0,e.createElement)(ht,{exact:!0,path:"/container",element:(0,e.createElement)(pe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/post-data",element:(0,e.createElement)(he,null)}),(0,e.createElement)(ht,{exact:!0,path:"/user-data",element:(0,e.createElement)(_e,null)}),(0,e.createElement)(ht,{exact:!0,path:"/google-consent-mode",element:(0,e.createElement)(ke,null)}),(0,e.createElement)(ht,{exact:!0,path:"/misc",element:(0,e.createElement)(be,null)}),(0,e.createElement)(ht,{exact:!0,path:"/integrations",element:(0,e.createElement)(ve,null)}),(0,e.createElement)(ht,{exact:!0,path:"/woocommerce",element:(0,e.createElement)(Ne,null)}),(0,e.createElement)(ht,{exact:!0,path:"/cf7",element:(0,e.createElement)(Ce,null)}),(0,e.createElement)(ht,{exact:!0,path:"/edd",element:(0,e.createElement)(Te,null)}),(0,e.createElement)(ht,{exact:!0,path:"/templates",element:(0,e.createElement)(Ge,null)}),l&&Object.keys(l).map((function(t){return(0,e.createElement)(ht,{exact:!0,key:t,path:t,element:(0,e.createElement)(Oe,{sectionData:l[t][0]})})})),(0,e.createElement)(ht,{exact:!0,path:"/help",element:(0,e.createElement)(Me,null)}),(0,e.createElement)(ht,{exact:!0,path:"/support",element:(0,e.createElement)(Re,null)}),(0,e.createElement)(ht,{path:"/",element:(0,e.createElement)(pt,{replace:!0,to:"/"+a})}))),(0,e.createElement)(ae,null)):(0,e.createElement)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center"},(0,e.createElement)(r.Spinner,null))},Ae=()=>(0,e.createElement)(Ct,{basename:"/"},(0,e.createElement)(u,null,(0,e.createElement)(Le,null)));document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,i.render)((0,e.createElement)(Ae,null),t)}))})();
  • gtm-kit/tags/1.21/assets/admin/wizard.asset.php

    r3055017 r3070452  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'e7d58fb1352372f542b9');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '91263adafb49e551176e');
  • gtm-kit/tags/1.21/assets/admin/wizard.js

    r3055017 r3070452  
    1 (()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(e,a)=>{for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React,a=window.wp.element,n=window.wp.components,i=window.lodash,r=window.wp.apiFetch;var l=t.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,a=null,n=!1)=>{let i={};try{i=await l()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:options},s=window.wp.i18n,m=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,s.__)("An error occurred.","gtm-kit"),a.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":a.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.isPending=!1,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,s.__)("An error occurred.","gtm-kit"):(0,s.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage}return a},c=(0,a.createContext)(),g=t=>{const[n,r]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),l=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};r({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},s=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{l()}),[]);const g={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,o("gtmkit/v1/set-options","POST",e));var e;r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:l,useUpdateState:s,useUpdateStateSettings:async(t,e,a)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let l;r[t][e]=a,l=!(0,i.isEqual)(r,n.fetchedSettings),s({stateSettings:r,canSave:l})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let r;const l={};l.general={...a.general,...e.general},"integrations"in e&&(l.integrations={...a.integrations,...e.integrations}),r=!(0,i.isEqual)(l,n.fetchedSettings),s({stateSettings:l,canSave:r})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{r({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,o("gtmkit/v1/send-support-data","POST",e,!0));var e;r({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData,useIsSending:n.isSendingSystemData,useSupportTicket:n.supportTicket,useIsSystemDataSent:n.isSystemDataSent,useSystemDataMessage:n.systemDataMessage,isWooAddonActive:!!window.gtmkitSettings.wa&&window.gtmkitSettings.wa};return(0,e.createElement)(c.Provider,{value:g},t.children)};function u(){return u=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},u.apply(this,arguments)}var d;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(d||(d={}));const p="popstate";function h(t,e){if(!1===t||null==t)throw new Error(e)}function k(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function y(t,e){return{usr:t.state,key:t.key,idx:e}}function f(t,e,a,n){return void 0===a&&(a=null),u({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?S(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function E(t){let{pathname:e="/",search:a="",hash:n=""}=t;return a&&"?"!==a&&(e+="?"===a.charAt(0)?a:"?"+a),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function S(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var x;function M(t,e,a){void 0===a&&(a="/");let n=U(("string"==typeof e?S(e):e).pathname||"/",a);if(null==n)return null;let i=N(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(i);let r=null;for(let t=0;null==r&&t<i.length;++t)r=I(i[t],A(n));return r}function N(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let l={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};l.relativePath.startsWith("/")&&(h(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),l.relativePath=l.relativePath.slice(n.length));let o=G([n,l.relativePath]),s=a.concat(l);t.children&&t.children.length>0&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),N(t.children,e,s,o)),(null!=t.path||t.index)&&e.push({path:o,score:C(o,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of v(t.path))i(t,e,a);else i(t,e)})),e}function v(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return i?[r,""]:[r];let l=v(n.join("/")),o=[];return o.push(...l.map((t=>""===t?r:[r,t].join("/")))),i&&o.push(...l),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(x||(x={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const w=/^:\w+$/,_=3,b=2,T=1,j=10,L=-2,D=t=>"*"===t;function C(t,e){let a=t.split("/"),n=a.length;return a.some(D)&&(n+=L),e&&(n+=b),a.filter((t=>!D(t))).reduce(((t,e)=>t+(w.test(e)?_:""===e?T:j)),n)}function I(t,e){let{routesMeta:a}=t,n={},i="/",r=[];for(let t=0;t<a.length;++t){let l=a[t],o=t===a.length-1,s="/"===i?e:e.slice(i.length)||"/",m=O({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},s);if(!m)return null;Object.assign(n,m.params);let c=l.route;r.push({params:n,pathname:G([i,m.pathname]),pathnameBase:B(G([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=G([i,m.pathnameBase]))}return r}function O(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[a,n]=function(t,e,a){void 0===e&&(e=!1),void 0===a&&(a=!0),k("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,((t,e,a)=>(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let r=i[0],l=r.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=o[a]||"";l=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const s=o[a];return t[n]=i&&!s?void 0:function(t,e){try{return decodeURIComponent(t)}catch(a){return k(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+a+")."),t}}(s||"",n),t}),{}),pathname:r,pathnameBase:l,pattern:t}}function A(t){try{return decodeURI(t)}catch(e){return k(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function U(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function z(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function P(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function R(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=S(t):(i=u({},t),h(!i.pathname||!i.pathname.includes("?"),z("?","pathname","search",i)),h(!i.pathname||!i.pathname.includes("#"),z("#","pathname","hash",i)),h(!i.search||!i.search.includes("#"),z("#","search","hash",i)));let r,l=""===t||""===i.pathname,o=l?"/":i.pathname;if(null==o)r=a;else if(n){let t=0===e.length?[]:e[e.length-1].replace(/^\//,"").split("/");if(o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t.pop();i.pathname=e.join("/")}r="/"+t.join("/")}else{let t=e.length-1;if(o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}r=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?S(t):t,r=a?a.startsWith("/")?a:function(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?a.length>1&&a.pop():"."!==t&&a.push(t)})),a.length>1?a.join("/"):"/"}(a,e):e;return{pathname:r,search:W(n),hash:Y(i)}}(i,r),m=o&&"/"!==o&&o.endsWith("/"),c=(l||"."===o)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const G=t=>t.join("/").replace(/\/\/+/g,"/"),B=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),W=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const F=["post","put","patch","delete"],Q=(new Set(F),["get",...F]);function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},J.apply(this,arguments)}new Set(Q),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const H=e.createContext(null),$=e.createContext(null),Z=e.createContext(null),K=e.createContext(null),V=e.createContext({outlet:null,matches:[],isDataRoute:!1}),X=e.createContext(null);function q(){return null!=e.useContext(K)}function tt(){return q()||h(!1),e.useContext(K).location}function et(t){e.useContext(Z).static||e.useLayoutEffect(t)}function at(){let{isDataRoute:t}=e.useContext(V);return t?function(){let{router:t}=function(t){let a=e.useContext(H);return a||h(!1),a}(st.UseNavigateStable),a=ct(mt.UseNavigateStable),n=e.useRef(!1);return et((()=>{n.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,J({fromRouteId:a},i)))}),[t,a])}():function(){q()||h(!1);let t=e.useContext(H),{basename:a,future:n,navigator:i}=e.useContext(Z),{matches:r}=e.useContext(V),{pathname:l}=tt(),o=JSON.stringify(P(r,n.v7_relativeSplatPath)),s=e.useRef(!1);return et((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void i.go(e);let r=R(e,JSON.parse(o),l,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:G([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,o,l,t])}()}function nt(t,a,n,i){q()||h(!1);let{navigator:r}=e.useContext(Z),{matches:l}=e.useContext(V),o=l[l.length-1],s=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,g=tt();if(a){var u;let t="string"==typeof a?S(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||h(!1),c=t}else c=g;let p=c.pathname||"/",k=M(t,{pathname:"/"===m?p:p.slice(m.length)||"/"}),y=function(t,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var l;if(null==(l=n)||!l.errors)return null;t=n.matches}let o=t,s=null==(r=n)?void 0:r.errors;if(null!=s){let t=o.findIndex((t=>t.route.id&&(null==s?void 0:s[t.route.id])));t>=0||h(!1),o=o.slice(0,Math.min(o.length,t+1))}let m=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<o.length;t++){let e=o[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.loader&&e.route.id&&void 0===n.loaderData[e.route.id]&&(!n.errors||void 0===n.errors[e.route.id])){m=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}return o.reduceRight(((t,i,r)=>{let l,g=!1,u=null,d=null;var p;n&&(l=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||rt,m&&(c<0&&0===r?(gt[p="route-fallback"]||(gt[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(o.slice(0,r+1)),k=()=>{let a;return a=l?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(ot,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(lt,{location:n.location,revalidation:n.revalidation,component:u,error:l,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:G([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:G([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),l,n,i);return a&&y?e.createElement(K.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:d.Pop}},y):y}function it(){let t=function(){var t;let a=e.useContext(X),n=function(t){let a=e.useContext($);return a||h(!1),a}(mt.UseRouteError),i=ct(mt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),a=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:i},n):null,null)}const rt=e.createElement(it,null);class lt extends e.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:void 0!==t.error?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return void 0!==this.state.error?e.createElement(V.Provider,{value:this.props.routeContext},e.createElement(X.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ot(t){let{routeContext:a,match:n,children:i}=t,r=e.useContext(H);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(V.Provider,{value:a},i)}var st=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(st||{}),mt=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(mt||{});function ct(t){let a=function(t){let a=e.useContext(V);return a||h(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||h(!1),n.route.id}const gt={};function ut(t){let{to:a,replace:n,state:i,relative:r}=t;q()||h(!1);let{future:l,static:o}=e.useContext(Z),{matches:s}=e.useContext(V),{pathname:m}=tt(),c=at(),g=R(a,P(s,l.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function dt(t){h(!1)}function pt(t){let{basename:a="/",children:n=null,location:i,navigationType:r=d.Pop,navigator:l,static:o=!1,future:s}=t;q()&&h(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:l,static:o,future:J({v7_relativeSplatPath:!1},s)})),[m,s,l,o]);"string"==typeof i&&(i=S(i));let{pathname:g="/",search:u="",hash:p="",state:k=null,key:y="default"}=i,f=e.useMemo((()=>{let t=U(g,m);return null==t?null:{location:{pathname:t,search:u,hash:p,state:k,key:y},navigationType:r}}),[m,g,u,p,k,y,r]);return null==f?null:e.createElement(Z.Provider,{value:c},e.createElement(K.Provider,{children:n,value:f}))}function ht(t){let{children:e,location:a}=t;return nt(kt(e),a)}function kt(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let r=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,kt(t.props.children,r));t.type!==dt&&h(!1),t.props.index&&t.props.children&&h(!1);let l={id:t.props.id||r.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(l.children=kt(t.props.children,r)),n.push(l)})),n}e.startTransition,new Promise((()=>{})),e.Component;const yt=window.ReactDOM;new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]),new Map;const ft=e.startTransition;function Et(t){let{basename:a,children:n,future:i,window:r}=t,l=e.useRef();null==l.current&&(l.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:r=!1}=n,l=i.history,o=d.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function g(){o=d.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:o,location:S.location,delta:e})}function k(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:E(t);return h(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(u({},l.state,{idx:m}),""));let S={get action(){return o},get location(){return t(i,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(p,g),s=t,()=>{i.removeEventListener(p,g),s=null}},createHref:t=>e(i,t),createURL:k,encodeLocation(t){let e=k(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=d.Push;let n=f(S.location,t,e);a&&a(n,t),m=c()+1;let g=y(n,m),u=S.createHref(n);try{l.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&s&&s({action:o,location:S.location,delta:1})},replace:function(t,e){o=d.Replace;let n=f(S.location,t,e);a&&a(n,t),m=c();let i=y(n,m),g=S.createHref(n);l.replaceState(i,"",g),r&&s&&s({action:o,location:S.location,delta:0})},go:t=>l.go(t)};return S}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=S(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),f("",{pathname:a,search:n,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let a=t.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let e=t.location.href,a=e.indexOf("#");n=-1===a?e:e.slice(0,a)}return n+"#"+("string"==typeof e?e:E(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:r,v5Compat:!0}));let o=l.current,[s,m]=e.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&ft?ft((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>o.listen(g)),[o,g]),e.createElement(pt,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:o,future:i})}var St,xt;yt.flushSync,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"}(St||(St={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l}=(0,a.useContext)(c),o=at();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 "},(0,e.createElement)(n.TextControl,{label:(0,s.__)("Container ID","gtm-kit"),placeholder:(0,s.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>i("general","gtm_id",t)})),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),o("/essential-settings",{replace:!0})},disabled:l||!t.general.gtm_id.includes("-")},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):""))),(0,e.createElement)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-left gtmkit-text-color-grey gtmkit-text-center"},(0,e.createElement)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4"},"Need help?"),(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,s.__)("Find your GTM container ID on","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer"},"Google Tag Manager")),(0,e.createElement)("p",null,(0,s.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"))),(0,e.createElement)("div",{className:"gtmkit-mt-3 md:gtmkit-mt-10 gtmkit-text-color-grey gtmkit-text-base"},(0,e.createElement)("span",{className:"gtmkit-block"},(0,s.__)("No thanks. I know what I'm doing.","gtm-kit")),(0,e.createElement)("a",{className:"gtmkit-underline gtmkit-ml-4",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit"))))},Nt=()=>{const{useImportSettings:t,useIsPending:i,useInstallData:r}=(0,a.useContext)(c),[l,o]=(0,a.useState)(!0),m=Object.keys(r.import_data)[0],[g,u]=(0,a.useState)(m),d=[];return Object.keys(r.import_data).forEach((t=>{d.push({value:t,label:r.import_data[t].name})})),l?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-8 gtmkit-my-8"},(0,e.createElement)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold"},(0,s.__)("Would you like to import plugin settings?","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey"},(0,s.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,s.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,e.createElement)(n.RadioControl,{help:(0,s.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:g,options:d,onChange:t=>u(t)}),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(g,r.import_data[g]),o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):""),(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("No","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):"")))):(0,e.createElement)(Mt,null)},vt=()=>{const{useInstallData:t}=(0,a.useContext)(c),{firstInstall:n}=t,{importAvailable:i}=t;return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("You've successfully installed GTM Kit!","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit"))),n&&i?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},wt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useInstallData:o}=(0,a.useContext)(c),m=at();return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("Essential Settings","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("There are a lot of settings in GTM Kit and we recommend that you uses our recommended settings but you can also choose to use the default settings and go through the settings at your convenience.","gtm-kit"))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?","gtm-kit"),checked:t&&t.general.datalayer_page_type,onChange:()=>{i("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),o.woocommerce_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{i("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,o.cf7_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{i("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,o.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{i("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),m("/share-anonymous-data",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},_t=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useSiteData:o}=(0,a.useContext)(c),m=at();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Help improve GTM Kit","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey"},(0,s.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm"},(0,e.createElement)("tbody",null,(0,e.createElement)("tr",{className:""},(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Server type:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.web_server))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"PHP version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.php_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.wordpress_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress multisite:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.multisite?(0,s.__)("Yes","gtm-kit"):(0,s.__)("No","gtm-kit")))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current theme:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.current_theme))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current site language:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.locale))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Active plugins:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Plugin names of all active plugins"))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Anonymized GTM Kit settings:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Which GTM Kit settings are active"))))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto "},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{i("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),m("/getting-started",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},bt=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Your are ready to use GTM Kit!","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto gtmkit-mb-8"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Google Tag Manager templates","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4"},(0,s.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit")," ",(0,e.createElement)("a",{target:"_blank",className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",rel:"noreferrer"},(0,s.__)("Read the guide","gtm-kit"))),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - eCommerce","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Tutorials","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Getting started with GTM Kit","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("WooCommerce Integration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=advanced-container-implementation&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Advanced GTM container implementation","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=settings-actions-and-filters-for-developers&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Settings, actions and filters for developers","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.dashboardUrl}},(0,s.__)("Go to the dashboard","gtm-kit")))),Tt=[{step:1,path:"/welcome",element:"Welcome",title:(0,s.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,s.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,s.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,s.__)("Getting Started","gtm-kit")}],jt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let i="gtmkit-h-0.5 gtmkit-w-full";return i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,e.createElement)("div",{className:i})},Lt=({step:t,currentStep:a})=>t<a?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",className:"gtmkit-w-5 gtmkit-h-5 gtmkit-text-white"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})):t===a?(0,e.createElement)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,Dt=({step:t,currentStep:a,totalSteps:n})=>{if(0===t)return;let i="gtmkit-transition-opacity gtmkit-duration-500 gtmkit-absolute gtmkit-inset-0 gtmkit-border-2 gtmkit-flex gtmkit-items-center gtmkit-justify-center gtmkit-rounded-full gtmkit-opacity-100";return i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-white",i+=t>a?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full"},(0,e.createElement)("span",{className:i},(0,e.createElement)(Lt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))},Ct=()=>{const t=Tt.length-1+Tt[0].step;let a=((t,e)=>{const a=Object.keys(e);return t.filter((function(t){for(let n=0;n<a.length;n++)if(!t.hasOwnProperty(a[n])||t[a[n]]!==e[a[n]])return!1;return!0}))})(Tt,{path:tt().pathname});return a=a.length?a[0].step:0,0===a?(0,e.createElement)("div",{className:"gtmkit-my-16"}):(0,e.createElement)("div",{className:"gtmkit-mt-6 gtmkit-inset-0 gtmkit-mx-auto gtmkit-my-6 gtmkit-flex gtmkit-items-center gtmkit-max-w-xl","aria-hidden":"true"},Tt.map((function(n){return(0,e.createElement)(Dt,{key:n.step,step:n.step,currentStep:a,totalSteps:t})})))},It=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-text-center gtmkit-px-3"},(0,e.createElement)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[225px] gtmkit-inline-block"},(0,e.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,s.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,e.createElement)(Ct,null)),Ot=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey"},(0,e.createElement)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max"},(0,e.createElement)("a",{className:"gtmkit-underline",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit"))))),At=()=>{const{useSettings:t}=(0,a.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(It,null),(0,e.createElement)("main",{className:"gtmkit-max-w-3xl gtmkit-bg-white gtmkit-border-1 gtmkit-border-color-border gtmkit-rounded-md gtmkit-mx-auto gtmkit-py-12 gtmkit-px-16 gtmkit-text-base"},(0,e.createElement)(ht,null,(0,e.createElement)(dt,{exact:!0,path:"/welcome",element:(0,e.createElement)(vt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/essential-settings",element:(0,e.createElement)(wt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/share-anonymous-data",element:(0,e.createElement)(_t,null)}),(0,e.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(bt,null)}),(0,e.createElement)(dt,{path:"/",element:(0,e.createElement)(ut,{replace:!0,to:"/welcome"})}))),(0,e.createElement)(Ot,null)):(0,e.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},Ut=()=>(0,e.createElement)(Et,{basename:"/"},(0,e.createElement)(g,null,(0,e.createElement)(At,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,a.render)((0,e.createElement)(Ut,null),document.getElementById(window.gtmkitSettings.rootId))}))})();
     1(()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(e,a)=>{for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React,a=window.wp.element,n=window.wp.components,i=window.lodash,r=window.wp.apiFetch;var l=t.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,a=null,n=!1)=>{let i={};try{i=await l()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:options},s=window.wp.i18n,m=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,s.__)("An error occurred.","gtm-kit"),a.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":a.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.isPending=!1,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,s.__)("An error occurred.","gtm-kit"):(0,s.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage}return a},c=(0,a.createContext)(),g=t=>{const[n,r]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),l=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};r({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},s=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{l()}),[]);const g={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,o("gtmkit/v1/set-options","POST",e));var e;r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:l,useUpdateState:s,useUpdateStateSettings:async(t,e,a)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let l;r[t][e]=a,l=!(0,i.isEqual)(r,n.fetchedSettings),s({stateSettings:r,canSave:l})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let r;const l={};l.general={...a.general,...e.general},"integrations"in e&&(l.integrations={...a.integrations,...e.integrations}),r=!(0,i.isEqual)(l,n.fetchedSettings),s({stateSettings:l,canSave:r})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{r({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,o("gtmkit/v1/send-support-data","POST",e,!0));var e;r({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData,useIsSending:n.isSendingSystemData,useSupportTicket:n.supportTicket,useIsSystemDataSent:n.isSystemDataSent,useSystemDataMessage:n.systemDataMessage,isWooAddonActive:!!window.gtmkitSettings.wa&&window.gtmkitSettings.wa};return(0,e.createElement)(c.Provider,{value:g},t.children)};function u(){return u=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},u.apply(this,arguments)}var d;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(d||(d={}));const p="popstate";function h(t,e){if(!1===t||null==t)throw new Error(e)}function k(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function y(t,e){return{usr:t.state,key:t.key,idx:e}}function f(t,e,a,n){return void 0===a&&(a=null),u({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?S(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function E(t){let{pathname:e="/",search:a="",hash:n=""}=t;return a&&"?"!==a&&(e+="?"===a.charAt(0)?a:"?"+a),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function S(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var x;function M(t,e,a){void 0===a&&(a="/");let n=z(("string"==typeof e?S(e):e).pathname||"/",a);if(null==n)return null;let i=N(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(i);let r=null;for(let t=0;null==r&&t<i.length;++t){let e=A(n);r=I(i[t],e)}return r}function N(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let l={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};l.relativePath.startsWith("/")&&(h(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),l.relativePath=l.relativePath.slice(n.length));let o=G([n,l.relativePath]),s=a.concat(l);t.children&&t.children.length>0&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),N(t.children,e,s,o)),(null!=t.path||t.index)&&e.push({path:o,score:C(o,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of v(t.path))i(t,e,a);else i(t,e)})),e}function v(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return i?[r,""]:[r];let l=v(n.join("/")),o=[];return o.push(...l.map((t=>""===t?r:[r,t].join("/")))),i&&o.push(...l),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(x||(x={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const _=/^:[\w-]+$/,w=3,b=2,T=1,j=10,L=-2,D=t=>"*"===t;function C(t,e){let a=t.split("/"),n=a.length;return a.some(D)&&(n+=L),e&&(n+=b),a.filter((t=>!D(t))).reduce(((t,e)=>t+(_.test(e)?w:""===e?T:j)),n)}function I(t,e){let{routesMeta:a}=t,n={},i="/",r=[];for(let t=0;t<a.length;++t){let l=a[t],o=t===a.length-1,s="/"===i?e:e.slice(i.length)||"/",m=O({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},s);if(!m)return null;Object.assign(n,m.params);let c=l.route;r.push({params:n,pathname:G([i,m.pathname]),pathnameBase:B(G([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=G([i,m.pathnameBase]))}return r}function O(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[a,n]=function(t,e,a){void 0===e&&(e=!1),void 0===a&&(a=!0),k("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,a)=>(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let r=i[0],l=r.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=o[a]||"";l=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const s=o[a];return t[n]=i&&!s?void 0:(s||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:l,pattern:t}}function A(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return k(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function z(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function U(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function P(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function R(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=S(t):(i=u({},t),h(!i.pathname||!i.pathname.includes("?"),U("?","pathname","search",i)),h(!i.pathname||!i.pathname.includes("#"),U("#","pathname","hash",i)),h(!i.search||!i.search.includes("#"),U("#","search","hash",i)));let r,l=""===t||""===i.pathname,o=l?"/":i.pathname;if(null==o)r=a;else{let t=e.length-1;if(!n&&o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}r=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?S(t):t,r=a?a.startsWith("/")?a:function(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?a.length>1&&a.pop():"."!==t&&a.push(t)})),a.length>1?a.join("/"):"/"}(a,e):e;return{pathname:r,search:W(n),hash:Y(i)}}(i,r),m=o&&"/"!==o&&o.endsWith("/"),c=(l||"."===o)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const G=t=>t.join("/").replace(/\/\/+/g,"/"),B=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),W=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const F=["post","put","patch","delete"],Q=(new Set(F),["get",...F]);function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},J.apply(this,arguments)}new Set(Q),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const H=e.createContext(null),$=e.createContext(null),Z=e.createContext(null),K=e.createContext(null),V=e.createContext({outlet:null,matches:[],isDataRoute:!1}),X=e.createContext(null);function q(){return null!=e.useContext(K)}function tt(){return q()||h(!1),e.useContext(K).location}function et(t){e.useContext(Z).static||e.useLayoutEffect(t)}function at(){let{isDataRoute:t}=e.useContext(V);return t?function(){let{router:t}=function(t){let a=e.useContext(H);return a||h(!1),a}(st.UseNavigateStable),a=ct(mt.UseNavigateStable),n=e.useRef(!1);return et((()=>{n.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,J({fromRouteId:a},i)))}),[t,a])}():function(){q()||h(!1);let t=e.useContext(H),{basename:a,future:n,navigator:i}=e.useContext(Z),{matches:r}=e.useContext(V),{pathname:l}=tt(),o=JSON.stringify(P(r,n.v7_relativeSplatPath)),s=e.useRef(!1);return et((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void i.go(e);let r=R(e,JSON.parse(o),l,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:G([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,o,l,t])}()}function nt(t,a,n,i){q()||h(!1);let{navigator:r}=e.useContext(Z),{matches:l}=e.useContext(V),o=l[l.length-1],s=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,g=tt();if(a){var u;let t="string"==typeof a?S(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||h(!1),c=t}else c=g;let p=c.pathname||"/",k=p;if("/"!==m){let t=m.replace(/^\//,"").split("/");k="/"+p.replace(/^\//,"").split("/").slice(t.length).join("/")}let y=M(t,{pathname:k}),f=function(t,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var l;if(null==(l=n)||!l.errors)return null;t=n.matches}let o=t,s=null==(r=n)?void 0:r.errors;if(null!=s){let t=o.findIndex((t=>t.route.id&&(null==s?void 0:s[t.route.id])));t>=0||h(!1),o=o.slice(0,Math.min(o.length,t+1))}let m=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<o.length;t++){let e=o[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:a}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||i){m=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((t,i,r)=>{let l,g=!1,u=null,d=null;var p;n&&(l=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||rt,m&&(c<0&&0===r?(gt[p="route-fallback"]||(gt[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(o.slice(0,r+1)),k=()=>{let a;return a=l?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(ot,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(lt,{location:n.location,revalidation:n.revalidation,component:u,error:l,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:G([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:G([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),l,n,i);return a&&f?e.createElement(K.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:d.Pop}},f):f}function it(){let t=function(){var t;let a=e.useContext(X),n=function(t){let a=e.useContext($);return a||h(!1),a}(mt.UseRouteError),i=ct(mt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),a=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:i},n):null,null)}const rt=e.createElement(it,null);class lt extends e.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:void 0!==t.error?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return void 0!==this.state.error?e.createElement(V.Provider,{value:this.props.routeContext},e.createElement(X.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ot(t){let{routeContext:a,match:n,children:i}=t,r=e.useContext(H);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(V.Provider,{value:a},i)}var st=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(st||{}),mt=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(mt||{});function ct(t){let a=function(t){let a=e.useContext(V);return a||h(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||h(!1),n.route.id}const gt={};function ut(t){let{to:a,replace:n,state:i,relative:r}=t;q()||h(!1);let{future:l,static:o}=e.useContext(Z),{matches:s}=e.useContext(V),{pathname:m}=tt(),c=at(),g=R(a,P(s,l.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function dt(t){h(!1)}function pt(t){let{basename:a="/",children:n=null,location:i,navigationType:r=d.Pop,navigator:l,static:o=!1,future:s}=t;q()&&h(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:l,static:o,future:J({v7_relativeSplatPath:!1},s)})),[m,s,l,o]);"string"==typeof i&&(i=S(i));let{pathname:g="/",search:u="",hash:p="",state:k=null,key:y="default"}=i,f=e.useMemo((()=>{let t=z(g,m);return null==t?null:{location:{pathname:t,search:u,hash:p,state:k,key:y},navigationType:r}}),[m,g,u,p,k,y,r]);return null==f?null:e.createElement(Z.Provider,{value:c},e.createElement(K.Provider,{children:n,value:f}))}function ht(t){let{children:e,location:a}=t;return nt(kt(e),a)}function kt(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let r=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,kt(t.props.children,r));t.type!==dt&&h(!1),t.props.index&&t.props.children&&h(!1);let l={id:t.props.id||r.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(l.children=kt(t.props.children,r)),n.push(l)})),n}e.startTransition,new Promise((()=>{})),e.Component;const yt=window.ReactDOM;new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(t){}new Map;const ft=e.startTransition;function Et(t){let{basename:a,children:n,future:i,window:r}=t,l=e.useRef();null==l.current&&(l.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:r=!1}=n,l=i.history,o=d.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function g(){o=d.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:o,location:S.location,delta:e})}function k(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:E(t);return a=a.replace(/ $/,"%20"),h(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(u({},l.state,{idx:m}),""));let S={get action(){return o},get location(){return t(i,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(p,g),s=t,()=>{i.removeEventListener(p,g),s=null}},createHref:t=>e(i,t),createURL:k,encodeLocation(t){let e=k(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=d.Push;let n=f(S.location,t,e);a&&a(n,t),m=c()+1;let g=y(n,m),u=S.createHref(n);try{l.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&s&&s({action:o,location:S.location,delta:1})},replace:function(t,e){o=d.Replace;let n=f(S.location,t,e);a&&a(n,t),m=c();let i=y(n,m),g=S.createHref(n);l.replaceState(i,"",g),r&&s&&s({action:o,location:S.location,delta:0})},go:t=>l.go(t)};return S}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=S(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),f("",{pathname:a,search:n,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let a=t.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let e=t.location.href,a=e.indexOf("#");n=-1===a?e:e.slice(0,a)}return n+"#"+("string"==typeof e?e:E(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:r,v5Compat:!0}));let o=l.current,[s,m]=e.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&ft?ft((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>o.listen(g)),[o,g]),e.createElement(pt,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:o,future:i})}var St,xt;yt.flushSync,e.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"}(St||(St={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l}=(0,a.useContext)(c),o=at();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 "},(0,e.createElement)(n.TextControl,{label:(0,s.__)("Container ID","gtm-kit"),placeholder:(0,s.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>i("general","gtm_id",t)})),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),o("/essential-settings",{replace:!0})},disabled:l||!t.general.gtm_id.includes("-")},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):""))),(0,e.createElement)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-left gtmkit-text-color-grey gtmkit-text-center"},(0,e.createElement)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4"},"Need help?"),(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,s.__)("Find your GTM container ID on","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer"},"Google Tag Manager")),(0,e.createElement)("p",null,(0,s.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"))),(0,e.createElement)("div",{className:"gtmkit-mt-3 md:gtmkit-mt-10 gtmkit-text-color-grey gtmkit-text-base"},(0,e.createElement)("span",{className:"gtmkit-block"},(0,s.__)("No thanks. I know what I'm doing.","gtm-kit")),(0,e.createElement)("a",{className:"gtmkit-underline gtmkit-ml-4",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit"))))},Nt=()=>{const{useImportSettings:t,useIsPending:i,useInstallData:r}=(0,a.useContext)(c),[l,o]=(0,a.useState)(!0),m=Object.keys(r.import_data)[0],[g,u]=(0,a.useState)(m),d=[];return Object.keys(r.import_data).forEach((t=>{d.push({value:t,label:r.import_data[t].name})})),l?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-8 gtmkit-my-8"},(0,e.createElement)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold"},(0,s.__)("Would you like to import plugin settings?","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey"},(0,s.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,s.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,e.createElement)(n.RadioControl,{help:(0,s.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:g,options:d,onChange:t=>u(t)}),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(g,r.import_data[g]),o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):""),(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("No","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):"")))):(0,e.createElement)(Mt,null)},vt=()=>{const{useInstallData:t}=(0,a.useContext)(c),{firstInstall:n}=t,{importAvailable:i}=t;return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("You've successfully installed GTM Kit!","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit"))),n&&i?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},_t=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useInstallData:o}=(0,a.useContext)(c),m=at();return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("Essential Settings","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("There are a lot of settings in GTM Kit and we recommend that you uses our recommended settings but you can also choose to use the default settings and go through the settings at your convenience.","gtm-kit"))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?","gtm-kit"),checked:t&&t.general.datalayer_page_type,onChange:()=>{i("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),o.woocommerce_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{i("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,o.cf7_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{i("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,o.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{i("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),m("/share-anonymous-data",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},wt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useSiteData:o}=(0,a.useContext)(c),m=at();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Help improve GTM Kit","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey"},(0,s.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm"},(0,e.createElement)("tbody",null,(0,e.createElement)("tr",{className:""},(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Server type:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.web_server))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"PHP version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.php_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.wordpress_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress multisite:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.multisite?(0,s.__)("Yes","gtm-kit"):(0,s.__)("No","gtm-kit")))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current theme:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.current_theme))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current site language:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.locale))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Active plugins:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Plugin names of all active plugins"))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Anonymized GTM Kit settings:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Which GTM Kit settings are active"))))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto "},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{i("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),m("/getting-started",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},bt=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Your are ready to use GTM Kit!","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto gtmkit-mb-8"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Google Tag Manager templates","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4"},(0,s.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit")," ",(0,e.createElement)("a",{target:"_blank",className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",rel:"noreferrer"},(0,s.__)("Read the guide","gtm-kit"))),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - eCommerce","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Tutorials","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Getting started with GTM Kit","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("WooCommerce Integration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=advanced-container-implementation&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Advanced GTM container implementation","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=settings-actions-and-filters-for-developers&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Settings, actions and filters for developers","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.dashboardUrl}},(0,s.__)("Go to the dashboard","gtm-kit")))),Tt=[{step:1,path:"/welcome",element:"Welcome",title:(0,s.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,s.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,s.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,s.__)("Getting Started","gtm-kit")}],jt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let i="gtmkit-h-0.5 gtmkit-w-full";return i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,e.createElement)("div",{className:i})},Lt=({step:t,currentStep:a})=>t<a?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",className:"gtmkit-w-5 gtmkit-h-5 gtmkit-text-white"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})):t===a?(0,e.createElement)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,Dt=({step:t,currentStep:a,totalSteps:n})=>{if(0===t)return;let i="gtmkit-transition-opacity gtmkit-duration-500 gtmkit-absolute gtmkit-inset-0 gtmkit-border-2 gtmkit-flex gtmkit-items-center gtmkit-justify-center gtmkit-rounded-full gtmkit-opacity-100";return i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-white",i+=t>a?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full"},(0,e.createElement)("span",{className:i},(0,e.createElement)(Lt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))},Ct=()=>{const t=Tt.length-1+Tt[0].step;let a=((t,e)=>{const a=Object.keys(e);return t.filter((function(t){for(let n=0;n<a.length;n++)if(!t.hasOwnProperty(a[n])||t[a[n]]!==e[a[n]])return!1;return!0}))})(Tt,{path:tt().pathname});return a=a.length?a[0].step:0,0===a?(0,e.createElement)("div",{className:"gtmkit-my-16"}):(0,e.createElement)("div",{className:"gtmkit-mt-6 gtmkit-inset-0 gtmkit-mx-auto gtmkit-my-6 gtmkit-flex gtmkit-items-center gtmkit-max-w-xl","aria-hidden":"true"},Tt.map((function(n){return(0,e.createElement)(Dt,{key:n.step,step:n.step,currentStep:a,totalSteps:t})})))},It=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-text-center gtmkit-px-3"},(0,e.createElement)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[225px] gtmkit-inline-block"},(0,e.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,s.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,e.createElement)(Ct,null)),Ot=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey"},(0,e.createElement)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max"},(0,e.createElement)("a",{className:"gtmkit-underline",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit"))))),At=()=>{const{useSettings:t}=(0,a.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(It,null),(0,e.createElement)("main",{className:"gtmkit-max-w-3xl gtmkit-bg-white gtmkit-border-1 gtmkit-border-color-border gtmkit-rounded-md gtmkit-mx-auto gtmkit-py-12 gtmkit-px-16 gtmkit-text-base"},(0,e.createElement)(ht,null,(0,e.createElement)(dt,{exact:!0,path:"/welcome",element:(0,e.createElement)(vt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/essential-settings",element:(0,e.createElement)(_t,null)}),(0,e.createElement)(dt,{exact:!0,path:"/share-anonymous-data",element:(0,e.createElement)(wt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(bt,null)}),(0,e.createElement)(dt,{path:"/",element:(0,e.createElement)(ut,{replace:!0,to:"/welcome"})}))),(0,e.createElement)(Ot,null)):(0,e.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},zt=()=>(0,e.createElement)(Et,{basename:"/"},(0,e.createElement)(g,null,(0,e.createElement)(At,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,a.render)((0,e.createElement)(zt,null),document.getElementById(window.gtmkitSettings.rootId))}))})();
  • gtm-kit/tags/1.21/gtm-kit.php

    r3055017 r3070452  
    44 *
    55 * Plugin Name: GTM Kit
    6  * Version:     1.20
     6 * Version:     1.21
    77 * Plugin URI:  https://gtmkit.com/
    88 * Description: Google Tag Manager implementation focusing on flexibility and pagespeed.
     
    1616 *
    1717 * WC requires at least: 8.0
    18  * WC tested up to: 8.7
     18 * WC tested up to: 8.8
    1919 *
    2020 * @package GTM Kit
     
    2828}
    2929
    30 const GTMKIT_VERSION = '1.20';
     30const GTMKIT_VERSION = '1.21';
    3131
    3232if ( ! defined( 'GTMKIT_FILE' ) ) {
  • gtm-kit/tags/1.21/languages/gtm-kit.pot

    r3055017 r3070452  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: GTM Kit 1.20\n"
     5"Project-Id-Version: GTM Kit 1.21\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/gtm-kit\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-03-18T14:28:44+00:00\n"
     12"POT-Creation-Date: 2024-04-13T13:18:02+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.9.0\n"
     
    6161msgstr ""
    6262
    63 #: src/Admin/AdminAPI.php:135
    64 #: src/Admin/AdminAPI.php:140
     63#: src/Admin/AdminAPI.php:134
     64#: src/Admin/AdminAPI.php:139
    6565msgid "The support ticket was not found. Please check that you have entered the correct ticket."
    6666msgstr ""
    6767
    68 #: src/Admin/AdminAPI.php:137
     68#: src/Admin/AdminAPI.php:136
    6969msgid "Thank you! We have received the data."
    7070msgstr ""
     
    112112msgstr ""
    113113
    114 #: src/Common/Util.php:132
     114#: src/Common/Util.php:152
    115115msgid "Server type:"
    116116msgstr ""
    117117
    118 #: src/Common/Util.php:137
     118#: src/Common/Util.php:157
    119119msgid "PHP version number:"
    120120msgstr ""
    121121
    122 #: src/Common/Util.php:142
     122#: src/Common/Util.php:162
    123123msgid "WordPress version number:"
    124124msgstr ""
    125125
    126 #: src/Common/Util.php:147
     126#: src/Common/Util.php:167
    127127msgid "WordPress multisite:"
    128128msgstr ""
    129129
    130 #: src/Common/Util.php:148
     130#: src/Common/Util.php:168
    131131#: assets/admin/wizard.js:1
    132132msgid "Yes"
    133133msgstr ""
    134134
    135 #: src/Common/Util.php:148
     135#: src/Common/Util.php:168
    136136#: assets/admin/wizard.js:1
    137137msgid "No"
    138138msgstr ""
    139139
    140 #: src/Common/Util.php:152
     140#: src/Common/Util.php:172
    141141msgid "Current theme:"
    142142msgstr ""
    143143
    144 #: src/Common/Util.php:157
     144#: src/Common/Util.php:177
    145145msgid "Current site language:"
    146146msgstr ""
    147147
    148 #: src/Common/Util.php:162
     148#: src/Common/Util.php:182
    149149msgid "Active plugins:"
    150150msgstr ""
    151151
    152 #: src/Common/Util.php:163
     152#: src/Common/Util.php:183
    153153msgid "Plugin name and version of all active plugins"
    154154msgstr ""
    155155
    156 #: src/Common/Util.php:167
     156#: src/Common/Util.php:187
    157157msgid "Anonymized GTM Kit settings:"
    158158msgstr ""
    159159
    160 #: src/Common/Util.php:168
     160#: src/Common/Util.php:188
    161161msgid "Which GTM Kit settings are active"
    162162msgstr ""
     
    176176
    177177#: src/Integration/WooCommerce.php:250
    178 #: src/Integration/WooCommerce.php:966
     178#: src/Integration/WooCommerce.php:967
    179179msgid "Product Category"
    180180msgstr ""
     
    193193
    194194#: src/Integration/WooCommerce.php:254
    195 #: src/Integration/WooCommerce.php:968
     195#: src/Integration/WooCommerce.php:969
    196196msgid "Product Tag"
    197197msgstr ""
     
    205205msgstr ""
    206206
    207 #: src/Integration/WooCommerce.php:825
     207#: src/Integration/WooCommerce.php:826
    208208msgid "Grouped Product"
    209209msgstr ""
    210210
    211 #: src/Integration/WooCommerce.php:859
     211#: src/Integration/WooCommerce.php:860
    212212msgid "Search Results"
    213213msgstr ""
    214214
    215 #: src/Integration/WooCommerce.php:859
    216 #: src/Integration/WooCommerce.php:900
    217 #: src/Integration/WooCommerce.php:933
     215#: src/Integration/WooCommerce.php:860
     216#: src/Integration/WooCommerce.php:901
     217#: src/Integration/WooCommerce.php:934
    218218msgid "General Product List"
    219219msgstr ""
    220220
    221 #: src/Integration/WooCommerce.php:1117
     221#: src/Integration/WooCommerce.php:1118
    222222msgid "GTM Kit data."
    223223msgstr ""
     
    270270
    271271#: assets/admin/settings.js:1
    272 msgid "How to get the most out of Google Tag Manager with GTM Kit."
    273 msgstr ""
    274 
    275 #: assets/admin/settings.js:1
    276 msgid "WooCommerce integration"
    277 msgstr ""
    278 
    279 #: assets/admin/settings.js:1
    280 msgid "Integrate WooCommerce with Google Tag Manager and Google Analytics."
    281 msgstr ""
    282 
    283 #: assets/admin/settings.js:1
    284 msgid "Integrate Contact Form 7 with Google Tag Manager and Google Analytics."
    285 msgstr ""
    286 
    287 #: assets/admin/settings.js:1
    288 msgid "Integrate Easy Digital Downloads with Google Tag Manager and Google Analytics."
    289 msgstr ""
    290 
    291 #: assets/admin/settings.js:1
    292 msgid "How to setup Google Analytics (GA4) in Google Tag Manager"
    293 msgstr ""
    294 
    295 #: assets/admin/settings.js:1
    296 msgid "Learn how to configure the necessary tags to make Google Analytics collect your data."
    297 msgstr ""
    298 
    299 #: assets/admin/settings.js:1
    300 msgid "Customization of the GTM container implementation and Server Side Tracking."
    301 msgstr ""
    302 
    303 #: assets/admin/settings.js:1
    304 msgid "One of the things that makes GTM Kit a great tool for developers is the ability to override options in wp-config.php."
    305 msgstr ""
    306 
    307 #: assets/admin/settings.js:1
    308 msgid "Delaying JavaScript execution is a powerful page speed optimization technique."
    309 msgstr ""
    310 
    311 #: assets/admin/settings.js:1
    312272msgid "See all tutorials…"
    313273msgstr ""
    314274
    315275#: assets/admin/settings.js:1
    316 msgid "See all our tutorial and get the most out of GTM Kit"
     276msgid "See all our tutorials and get the most out of GTM Kit"
    317277msgstr ""
    318278
     
    403363
    404364#: assets/admin/settings.js:1
    405 msgid "The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do."
     365msgid "The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do so."
    406366msgstr ""
    407367
     
    447407
    448408#: assets/admin/settings.js:1
     409#: assets/admin/settings.js:13
    449410msgid "Learn more"
    450411msgstr ""
     
    479440
    480441#: assets/admin/settings.js:1
    481 msgid "Setting this to On will push the event 'load_js' om page load."
     442msgid "Setting this to On will push the event 'load_js' on page load."
    482443msgstr ""
    483444
     
    503464
    504465#: assets/admin/settings.js:1
    505 msgid "Enter your gtm_auth code your GTM environment."
     466msgid "Enter the gtm_auth code for your GTM environment."
    506467msgstr ""
    507468
     
    515476
    516477#: assets/admin/settings.js:1
    517 msgid "Enter your gtm_preview code your GTM environment."
     478msgid "Enter the gtm_preview code for your GTM environment."
    518479msgstr ""
    519480
     
    539500
    540501#: assets/admin/settings.js:1
    541 msgid "You can override the values of using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments."
     502msgid "You can override the values by using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments."
    542503msgstr ""
    543504
     
    555516
    556517#: assets/admin/settings.js:1
    557 msgid "Load container when browser is idle (requestIdleCallback)"
     518msgid "Load container when the browser is idle (requestIdleCallback)"
    558519msgstr ""
    559520
     
    664625
    665626#: assets/admin/settings.js:1
     627#: assets/admin/settings.js:13
    666628msgid "User Data"
    667629msgstr ""
     
    958920
    959921#: assets/admin/settings.js:13
     922msgid "User-Provided Data"
     923msgstr ""
     924
     925#: assets/admin/settings.js:13
     926msgid "The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'."
     927msgstr ""
     928
     929#: assets/admin/settings.js:13
    960930msgid "Webhooks for server-side tracking"
    961931msgstr ""
     
    11381108
    11391109#: assets/admin/settings.js:13
    1140 msgid "Only on pages where where the Contact Form 7 script is registered (recommended)."
     1110msgid "Only on pages where the Contact Form 7 script is registered (recommended)."
    11411111msgstr ""
    11421112
     
    11541124
    11551125#: assets/admin/settings.js:13
    1156 msgid "Choose between a basic configuration and an advanced eCommerce configuration"
    1157 msgstr ""
    1158 
    1159 #: assets/admin/settings.js:13
    11601126msgid "Get template"
    11611127msgstr ""
     
    11791145
    11801146#: assets/admin/settings.js:13
     1147#: assets/admin/wizard.js:1
     1148msgid "Please read the guide on how to use the import files and configure GTM."
     1149msgstr ""
     1150
     1151#: assets/admin/settings.js:13
     1152#: assets/admin/wizard.js:1
     1153msgid "Read the guide"
     1154msgstr ""
     1155
     1156#: assets/admin/settings.js:13
    11811157msgid "Templates"
    11821158msgstr ""
    11831159
    11841160#: assets/admin/settings.js:13
    1185 msgid "Google Analytics 4"
    1186 msgstr ""
    1187 
    1188 #: assets/admin/settings.js:13
    1189 msgid "Before you start"
    1190 msgstr ""
    1191 
    1192 #: assets/admin/settings.js:13
    1193 #: assets/admin/wizard.js:1
    1194 msgid "Please read the guide on how to use the import files and configure GTM."
    1195 msgstr ""
    1196 
    1197 #: assets/admin/settings.js:13
    1198 #: assets/admin/wizard.js:1
    1199 msgid "Read the guide"
    1200 msgstr ""
    1201 
    1202 #: assets/admin/settings.js:13
    1203 msgid "Basic configuration"
    1204 msgstr ""
    1205 
    1206 #: assets/admin/settings.js:13
    1207 msgid "If you don't have eCommerce functionality then this is the right choice for you."
    1208 msgstr ""
    1209 
    1210 #: assets/admin/settings.js:13
    1211 msgid "This template includes the Google Tag, which will send basic events to Google Analytics 4."
    1212 msgstr ""
    1213 
    1214 #: assets/admin/settings.js:13
    12151161msgid "GTM container import files:"
    12161162msgstr ""
    12171163
    12181164#: assets/admin/settings.js:13
     1165msgid "Necessary modifications:"
     1166msgstr ""
     1167
     1168#: assets/admin/settings.js:13
     1169msgid "Need help?"
     1170msgstr ""
     1171
     1172#: assets/admin/settings.js:13
     1173msgid "We are here to help if you have any questions."
     1174msgstr ""
     1175
     1176#: assets/admin/settings.js:13
     1177msgid "See support options"
     1178msgstr ""
     1179
     1180#: assets/admin/settings.js:13
     1181msgid "Get support"
     1182msgstr ""
     1183
     1184#: assets/admin/settings.js:13
     1185msgid "Support options"
     1186msgstr ""
     1187
     1188#: assets/admin/settings.js:13
     1189msgid "WordPress.org Support Forum"
     1190msgstr ""
     1191
     1192#: assets/admin/settings.js:13
     1193msgid "GITHub repository"
     1194msgstr ""
     1195
     1196#: assets/admin/settings.js:13
     1197msgid "Plugin Homepage"
     1198msgstr ""
     1199
     1200#: assets/admin/settings.js:13
     1201msgid "Share system data with the GTM Kit support team"
     1202msgstr ""
     1203
     1204#: assets/admin/settings.js:13
     1205msgid "If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:"
     1206msgstr ""
     1207
     1208#: assets/admin/settings.js:13
     1209msgid "Enter support ticket"
     1210msgstr ""
     1211
     1212#: assets/admin/settings.js:13
     1213msgid "Send system data"
     1214msgstr ""
     1215
     1216#: assets/admin/settings.js:13
     1217msgid "About GTM Kit"
     1218msgstr ""
     1219
     1220#: assets/admin/settings.js:13
     1221msgid "Version:"
     1222msgstr ""
     1223
     1224#: assets/admin/settings.js:13
     1225msgid "Learn about changes and follow the development of GTM Kit:"
     1226msgstr ""
     1227
     1228#: assets/admin/settings.js:13
     1229msgid "The changelog"
     1230msgstr ""
     1231
     1232#: assets/admin/settings.js:13
     1233msgid "The Github repository"
     1234msgstr ""
     1235
     1236#: assets/admin/settings.js:13
     1237msgid "Google Tag Manager Templates"
     1238msgstr ""
     1239
     1240#: assets/admin/settings.js:13
     1241msgid "Dashboard"
     1242msgstr ""
     1243
     1244#: assets/admin/settings.js:13
     1245msgid "Container"
     1246msgstr ""
     1247
     1248#: assets/admin/settings.js:13
     1249msgid "User data"
     1250msgstr ""
     1251
     1252#: assets/admin/settings.js:13
     1253msgid "Support"
     1254msgstr ""
     1255
     1256#: assets/admin/wizard.js:1
     1257msgid "Container ID"
     1258msgstr ""
     1259
     1260#: assets/admin/wizard.js:1
     1261msgid "Enter Container ID"
     1262msgstr ""
     1263
     1264#: assets/admin/wizard.js:1
     1265msgid "Save and continue"
     1266msgstr ""
     1267
     1268#: assets/admin/wizard.js:1
     1269msgid "Find your GTM container ID on"
     1270msgstr ""
     1271
     1272#: assets/admin/wizard.js:1
     1273msgid "It should look something like this:"
     1274msgstr ""
     1275
     1276#: assets/admin/wizard.js:1
     1277msgid "No thanks. I know what I'm doing."
     1278msgstr ""
     1279
     1280#: assets/admin/wizard.js:1
     1281msgid "Go to the dashboard."
     1282msgstr ""
     1283
     1284#: assets/admin/wizard.js:1
     1285msgid "Would you like to import plugin settings?"
     1286msgstr ""
     1287
     1288#: assets/admin/wizard.js:1
     1289msgid "We have found the configuration of other plugins in the database."
     1290msgstr ""
     1291
     1292#: assets/admin/wizard.js:1
     1293msgid "Would you like to import your settings to GTM Kit?"
     1294msgstr ""
     1295
     1296#: assets/admin/wizard.js:1
     1297msgid "Select the plugin you want to import settings from."
     1298msgstr ""
     1299
     1300#: assets/admin/wizard.js:1
     1301msgid "You've successfully installed GTM Kit!"
     1302msgstr ""
     1303
     1304#: assets/admin/wizard.js:1
     1305msgid "Essential Settings"
     1306msgstr ""
     1307
     1308#: assets/admin/wizard.js:1
     1309msgid "There are a lot of settings in GTM Kit and we recommend that you uses our recommended settings but you can also choose to use the default settings and go through the settings at your convenience."
     1310msgstr ""
     1311
     1312#: assets/admin/wizard.js:1
     1313msgid "Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?"
     1314msgstr ""
     1315
     1316#: assets/admin/wizard.js:1
     1317msgid "Track WooCommerce"
     1318msgstr ""
     1319
     1320#: assets/admin/wizard.js:1
     1321msgid "Would you like to track e-commerce data from WooCommerce?"
     1322msgstr ""
     1323
     1324#: assets/admin/wizard.js:1
     1325msgid "Track Contact Form 7"
     1326msgstr ""
     1327
     1328#: assets/admin/wizard.js:1
     1329msgid "Would you like to track form submissions from Contact Form 7?"
     1330msgstr ""
     1331
     1332#: assets/admin/wizard.js:1
     1333msgid "Track Easy Digital Downloads"
     1334msgstr ""
     1335
     1336#: assets/admin/wizard.js:1
     1337msgid "Would you like to track e-commerce data from Easy Digital Downloads?"
     1338msgstr ""
     1339
     1340#: assets/admin/wizard.js:1
     1341msgid "I agree to share anonymous data with the development team to help improve GTM Kit. "
     1342msgstr ""
     1343
     1344#: assets/admin/wizard.js:1
     1345msgid "Your are ready to use GTM Kit!"
     1346msgstr ""
     1347
     1348#: assets/admin/wizard.js:1
     1349msgid "Your Google Tag Manager Container is now sending data to Google Tag Manager."
     1350msgstr ""
     1351
     1352#: assets/admin/wizard.js:1
     1353msgid "Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4."
     1354msgstr ""
     1355
     1356#: assets/admin/wizard.js:1
     1357msgid "Google Tag Manager templates"
     1358msgstr ""
     1359
    12191360#: assets/admin/wizard.js:1
    12201361msgid "Google Analytics 4 - Basic Configuration"
    12211362msgstr ""
    12221363
    1223 #: assets/admin/settings.js:13
    1224 msgid "Necessary modifications:"
    1225 msgstr ""
    1226 
    1227 #: assets/admin/settings.js:13
    1228 msgid "Edit the variable with the name \"constant - GA4 Measurement ID\" and enter your Google Analytics 4 Measurement ID."
    1229 msgstr ""
    1230 
    1231 #: assets/admin/settings.js:13
    1232 msgid "eCommerce configuration"
    1233 msgstr ""
    1234 
    1235 #: assets/admin/settings.js:13
    1236 msgid "If you have a webshop then this is the right choice for you."
    1237 msgstr ""
    1238 
    1239 #: assets/admin/settings.js:13
    1240 msgid "This template includes the Google Tag and a Google Analytics GA4 event tag, that will catch all eCommerce events and send them to Google Analytics 4."
    1241 msgstr ""
    1242 
    1243 #: assets/admin/settings.js:13
    12441364#: assets/admin/wizard.js:1
    12451365msgid "Google Analytics 4 - eCommerce"
    1246 msgstr ""
    1247 
    1248 #: assets/admin/settings.js:13
    1249 msgid "Need help?"
    1250 msgstr ""
    1251 
    1252 #: assets/admin/settings.js:13
    1253 msgid "We are here to help if you have any questions."
    1254 msgstr ""
    1255 
    1256 #: assets/admin/settings.js:13
    1257 msgid "See support options"
    1258 msgstr ""
    1259 
    1260 #: assets/admin/settings.js:13
    1261 msgid "Get support"
    1262 msgstr ""
    1263 
    1264 #: assets/admin/settings.js:13
    1265 msgid "Support options"
    1266 msgstr ""
    1267 
    1268 #: assets/admin/settings.js:13
    1269 msgid "WordPress.org Support Forum"
    1270 msgstr ""
    1271 
    1272 #: assets/admin/settings.js:13
    1273 msgid "GITHub repository"
    1274 msgstr ""
    1275 
    1276 #: assets/admin/settings.js:13
    1277 msgid "Plugin Homepage"
    1278 msgstr ""
    1279 
    1280 #: assets/admin/settings.js:13
    1281 msgid "Share system data with the GTM Kit support team"
    1282 msgstr ""
    1283 
    1284 #: assets/admin/settings.js:13
    1285 msgid "If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:"
    1286 msgstr ""
    1287 
    1288 #: assets/admin/settings.js:13
    1289 msgid "Enter support ticket"
    1290 msgstr ""
    1291 
    1292 #: assets/admin/settings.js:13
    1293 msgid "Send system data"
    1294 msgstr ""
    1295 
    1296 #: assets/admin/settings.js:13
    1297 msgid "About GTM Kit"
    1298 msgstr ""
    1299 
    1300 #: assets/admin/settings.js:13
    1301 msgid "Version:"
    1302 msgstr ""
    1303 
    1304 #: assets/admin/settings.js:13
    1305 msgid "Learn about changes and follow the development of GTM Kit:"
    1306 msgstr ""
    1307 
    1308 #: assets/admin/settings.js:13
    1309 msgid "The changelog"
    1310 msgstr ""
    1311 
    1312 #: assets/admin/settings.js:13
    1313 msgid "The Github repository"
    1314 msgstr ""
    1315 
    1316 #: assets/admin/settings.js:13
    1317 msgid "Google Tag Manager Templates"
    1318 msgstr ""
    1319 
    1320 #: assets/admin/settings.js:13
    1321 msgid "Dashboard"
    1322 msgstr ""
    1323 
    1324 #: assets/admin/settings.js:13
    1325 msgid "Container"
    1326 msgstr ""
    1327 
    1328 #: assets/admin/settings.js:13
    1329 msgid "User data"
    1330 msgstr ""
    1331 
    1332 #: assets/admin/settings.js:13
    1333 msgid "Support"
    1334 msgstr ""
    1335 
    1336 #: assets/admin/wizard.js:1
    1337 msgid "Container ID"
    1338 msgstr ""
    1339 
    1340 #: assets/admin/wizard.js:1
    1341 msgid "Enter Container ID"
    1342 msgstr ""
    1343 
    1344 #: assets/admin/wizard.js:1
    1345 msgid "Save and continue"
    1346 msgstr ""
    1347 
    1348 #: assets/admin/wizard.js:1
    1349 msgid "Find your GTM container ID on"
    1350 msgstr ""
    1351 
    1352 #: assets/admin/wizard.js:1
    1353 msgid "It should look something like this:"
    1354 msgstr ""
    1355 
    1356 #: assets/admin/wizard.js:1
    1357 msgid "No thanks. I know what I'm doing."
    1358 msgstr ""
    1359 
    1360 #: assets/admin/wizard.js:1
    1361 msgid "Go to the dashboard."
    1362 msgstr ""
    1363 
    1364 #: assets/admin/wizard.js:1
    1365 msgid "Would you like to import plugin settings?"
    1366 msgstr ""
    1367 
    1368 #: assets/admin/wizard.js:1
    1369 msgid "We have found the configuration of other plugins in the database."
    1370 msgstr ""
    1371 
    1372 #: assets/admin/wizard.js:1
    1373 msgid "Would you like to import your settings to GTM Kit?"
    1374 msgstr ""
    1375 
    1376 #: assets/admin/wizard.js:1
    1377 msgid "Select the plugin you want to import settings from."
    1378 msgstr ""
    1379 
    1380 #: assets/admin/wizard.js:1
    1381 msgid "You've successfully installed GTM Kit!"
    1382 msgstr ""
    1383 
    1384 #: assets/admin/wizard.js:1
    1385 msgid "Essential Settings"
    1386 msgstr ""
    1387 
    1388 #: assets/admin/wizard.js:1
    1389 msgid "There are a lot of settings in GTM Kit and we recommend that you uses our recommended settings but you can also choose to use the default settings and go through the settings at your convenience."
    1390 msgstr ""
    1391 
    1392 #: assets/admin/wizard.js:1
    1393 msgid "Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?"
    1394 msgstr ""
    1395 
    1396 #: assets/admin/wizard.js:1
    1397 msgid "Track WooCommerce"
    1398 msgstr ""
    1399 
    1400 #: assets/admin/wizard.js:1
    1401 msgid "Would you like to track e-commerce data from WooCommerce?"
    1402 msgstr ""
    1403 
    1404 #: assets/admin/wizard.js:1
    1405 msgid "Track Contact Form 7"
    1406 msgstr ""
    1407 
    1408 #: assets/admin/wizard.js:1
    1409 msgid "Would you like to track form submissions from Contact Form 7?"
    1410 msgstr ""
    1411 
    1412 #: assets/admin/wizard.js:1
    1413 msgid "Track Easy Digital Downloads"
    1414 msgstr ""
    1415 
    1416 #: assets/admin/wizard.js:1
    1417 msgid "Would you like to track e-commerce data from Easy Digital Downloads?"
    1418 msgstr ""
    1419 
    1420 #: assets/admin/wizard.js:1
    1421 msgid "I agree to share anonymous data with the development team to help improve GTM Kit. "
    1422 msgstr ""
    1423 
    1424 #: assets/admin/wizard.js:1
    1425 msgid "Your are ready to use GTM Kit!"
    1426 msgstr ""
    1427 
    1428 #: assets/admin/wizard.js:1
    1429 msgid "Your Google Tag Manager Container is now sending data to Google Tag Manager."
    1430 msgstr ""
    1431 
    1432 #: assets/admin/wizard.js:1
    1433 msgid "Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4."
    1434 msgstr ""
    1435 
    1436 #: assets/admin/wizard.js:1
    1437 msgid "Google Tag Manager templates"
    14381366msgstr ""
    14391367
  • gtm-kit/tags/1.21/readme.txt

    r3055017 r3070452  
    44Tags: google tag manager, gtm, woocommerce, analytics, ga4
    55Tested up to: 6.5
    6 Stable tag: 1.20
     6Stable tag: 1.21
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    8989== Changelog ==
    9090
     91= 1.21 =
     92
     93Release date: 2024-04-15
     94
     95Find out about what's new in our [our release post](https://gtmkit.com/gtm-kit-1-21/).
     96
     97#### Enhancements:
     98* Added user-data in the datalayer containing user data formatted for the User-Provided Data variable so you don't have to map it manually.
     99* Added Google Tag Manager templates for Google Ads and Facebook.
     100* Added dynamic template sections that allows for template updates wíthout updating the plugin.
     101* The tutorial section is now dynamic and based on a feed, so we don't have to update the plugin to include new tutorials.
     102
     103#### Bugfixes:
     104* JavaScript translations was not loaded correct.
     105
     106#### Other:
     107* Tested up to WooCommerce 8.8.
     108
    91109= 1.20 =
    92110
     
    133151* The code has been refactored for extendability.
    134152
    135 = 1.18.1 =
    136 
    137 Release date: 2024-01-08
    138 
    139 #### Bugfixes:
    140 * Added missing flush of the ecommerce object on the select_item event.
    141 * 1.17 introduced a bug that caused item brand to be limited to a product attribute.
    142 
    143 #### Other:
    144 * Tested up to WooCommerce 8.5.
    145 * Minor refactoring.
    146 
    147 = 1.18 =
    148 
    149 Release date: 2024-01-02
    150 
    151 Find out about what's new in our [our release post](https://gtmkit.com/gtm-kit-1-18/).
    152 
    153 #### Enhancements:
    154 * Add support for Google Consent Mode v2
    155 * Added a function to share system data with the GTM Kit support team. If you have registered a support request on WordPress.org and the GTM Kit support team has asked you to send your system data you can now do that in a secure way without posting any private information in the support forum.
    156 * Enhanced support for the select_item event in more WordPress themes. This update significantly improves the compatibility of the select_item event handling in themes such as Woodmart.
    157 
    158 #### Bugfixes:
    159 * When adding a product to the cart from a product category page the quantity was not specified in the add_to_cart event.
    160 * On Single product pages a click on a quantity control would result in an undefined event.
    161 
    162 = Earlier versions =
    163 For the changelog of earlier versions, please refer to [the changelog on gtmkit.com](https://gtmkit.com/changelog/).
    164 
    165 
    166153== Upgrade Notice ==
    167154
  • gtm-kit/tags/1.21/src/Admin/AbstractOptionsPage.php

    r3055017 r3070452  
    160160     * @param string $path The plugin path.
    161161     * @param string $url The plugin URL.
    162      */
    163     protected function enqueue_assets( string $page_slug, string $script_handle, string $path = GTMKIT_PATH, string $url = GTMKIT_URL ) {
     162     * @param string $domain The translation domain.
     163     */
     164    protected function enqueue_assets( string $page_slug, string $script_handle, string $path = GTMKIT_PATH, string $url = GTMKIT_URL, string $domain = 'gtm-kit' ) {
    164165
    165166        $deps_file  = $path . 'assets/admin/' . $script_handle . '.asset.php';
     
    178179
    179180        $this->localize_script( $page_slug, $script_handle );
     181
     182        \wp_set_script_translations( 'gtmkit-' . $script_handle . '-script', $domain );
    180183    }
    181184
  • gtm-kit/tags/1.21/src/Admin/AdminAPI.php

    r3055017 r3070452  
    122122            ];
    123123            $args = [
    124                 'method'    => 'PUT',
    125                 'headers'   => [
     124                'method'  => 'PUT',
     125                'headers' => [
    126126                    'Content-Type' => 'application/json',
    127127                ],
    128                 'body'      => wp_json_encode( $body ),
    129                 'sslverify' => false,
     128                'body'    => wp_json_encode( $body ),
    130129            ];
    131130
  • gtm-kit/tags/1.21/src/Admin/GeneralOptionsPage.php

    r3055017 r3070452  
    112112                'root'            => \esc_url_raw( rest_url() ),
    113113                'nonce'           => \wp_create_nonce( 'wp_rest' ),
     114                'tutorials'       => $this->get_tutorials(),
    114115                'dashboardUrl'    => \menu_page_url( 'gtmkit_general', false ),
    115116                'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ),
     
    119120        );
    120121    }
     122
     123    /**
     124     * Get the templates
     125     *
     126     * @return array
     127     */
     128    private function get_tutorials(): array {
     129        return $this->util->get_data( '/get-tutorials', 'gtmkit_tutorials' );
     130    }
    121131}
  • gtm-kit/tags/1.21/src/Admin/HelpOptionsPage.php

    r3055017 r3070452  
    9090                'root'            => \esc_url_raw( rest_url() ),
    9191                'nonce'           => \wp_create_nonce( 'wp_rest' ),
     92                'tutorials'       => $this->get_tutorials(),
    9293                'dashboardUrl'    => \menu_page_url( 'gtmkit_general', false ),
    9394                'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ),
    9495                'settings'        => $this->options->get_all_raw(),
     96                'site_data'       => [ 'gtmkit_version' => GTMKIT_VERSION ],
    9597            ]
    9698        );
    9799    }
     100
     101    /**
     102     * Get the templates
     103     *
     104     * @return array
     105     */
     106    private function get_tutorials(): array {
     107        return $this->util->get_data( '/get-tutorials', 'gtmkit_tutorials' );
     108    }
    98109}
  • gtm-kit/tags/1.21/src/Admin/TemplatesOptionsPage.php

    r3055017 r3070452  
    9090                'root'            => \esc_url_raw( rest_url() ),
    9191                'nonce'           => \wp_create_nonce( 'wp_rest' ),
     92                'templates'       => $this->get_templates(),
    9293                'dashboardUrl'    => \menu_page_url( 'gtmkit_general', false ),
    9394                'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ),
     
    9798        );
    9899    }
     100
     101    /**
     102     * Get the templates
     103     *
     104     * @return array
     105     */
     106    private function get_templates(): array {
     107        return $this->util->get_data( '/get-templates', 'gtmkit_templates' );
     108    }
    99109}
  • gtm-kit/tags/1.21/src/Common/Util.php

    r3045420 r3070452  
    4545
    4646    /**
     47     * API namespace.
     48     *
     49     * @var string
     50     */
     51    private $api_namespace = '/api/v1';
     52
     53    /**
     54     * API host.
     55     *
     56     * @var string
     57     */
     58    private $api_host;
     59
     60    /**
    4761     * Constructor.
    4862     *
     
    5771        $this->asset_path      = $path . 'assets/';
    5872        $this->asset_url       = $url . 'assets/';
     73
     74        if ( $options->is_const_enabled() && defined( 'GTMKIT_API_HOST' ) ) {
     75            $this->api_host = GTMKIT_API_HOST;
     76        } else {
     77            $this->api_host = 'https://app.gtmkit.com';
     78        }
    5979    }
    6080
     
    314334        \wp_enqueue_script( $handle, $this->asset_url . $script, $deps, $ver, $args );
    315335    }
     336
     337    /**
     338     * Get API data
     339     *
     340     * @param string $endpoint The API endpoint.
     341     * @param string $transient The transient.
     342     *
     343     * @return array
     344     */
     345    public function get_data( string $endpoint, string $transient ): array {
     346        $data = get_transient( $transient );
     347
     348        if ( ! WP_DEBUG && $data !== false ) {
     349            return $data;
     350        }
     351
     352        $url = $this->api_host . $this->api_namespace . $endpoint;
     353
     354        $url = add_query_arg(
     355            'plugins',
     356            [
     357                'woo' => \is_plugin_active( 'woocommerce/woocommerce.php' ),
     358                'cf7' => \is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ),
     359                'edd' => ( \is_plugin_active( 'easy-digital-downloads/easy-digital-downloads.php' ) || \is_plugin_active( 'easy-digital-downloads-pro/easy-digital-downloads.php' ) ),
     360            ],
     361            $url
     362        );
     363
     364        $response = wp_remote_get( $url );
     365
     366        if ( is_wp_error( $response ) ) {
     367            return [];
     368        }
     369
     370        $json = wp_remote_retrieve_body( $response );
     371        $data = json_decode( $json, true );
     372
     373        if ( json_last_error() !== JSON_ERROR_NONE ) {
     374            return [];
     375        }
     376
     377        set_transient( $transient, $data, 12 * HOUR_IN_SECONDS );
     378
     379        return $data;
     380    }
     381
     382    /**
     383     * Normalize and hash a string.
     384     *
     385     * @link https://developers.google.com/google-ads/api/docs/conversions/enhanced-conversions/web#php
     386     *
     387     * @param string $hash_algorithm The hash algorithm.
     388     * @param string $value The string to normalize and hash.
     389     * @param bool   $trim_intermediate_spaces Removes leading, trailing, and intermediate spaces.
     390     *
     391     * @return string The normalized and hashed string.
     392     */
     393    public function normalize_and_hash(
     394        string $hash_algorithm,
     395        string $value,
     396        bool $trim_intermediate_spaces
     397    ): string {
     398        // Normalizes by first converting all characters to lowercase, then trimming spaces.
     399        $normalized = strtolower( $value );
     400        if ( $trim_intermediate_spaces === true ) {
     401            // Removes leading, trailing, and intermediate spaces.
     402            $normalized = str_replace( ' ', '', $normalized );
     403        } else {
     404            // Removes only leading and trailing spaces.
     405            $normalized = trim( $normalized );
     406        }
     407
     408        if ( $normalized === '' ) {
     409            return '';
     410        }
     411
     412        return hash( $hash_algorithm, strtolower( trim( $normalized ) ) );
     413    }
     414
     415    /**
     416     * Returns the result of normalizing and hashing an email address. For this use case, Google
     417     * Ads requires removal of any '.' characters preceding "gmail.com" or "googlemail.com".
     418     *
     419     * @param string $hash_algorithm The hash algorithm to use.
     420     * @param string $email_address The email address to normalize and hash.
     421     * @return string The normalized and hashed email address.
     422     */
     423    public function normalize_and_hash_email_address(
     424        string $hash_algorithm,
     425        string $email_address
     426    ): string {
     427        $normalized_email = strtolower( $email_address );
     428        $email_parts      = explode( '@', $normalized_email );
     429        if (
     430            count( $email_parts ) > 1
     431            && preg_match( '/^(gmail|googlemail)\.com\s*/', $email_parts[1] )
     432        ) {
     433            // Removes any '.' characters from the portion of the email address before the domain
     434            // if the domain is gmail.com or googlemail.com.
     435            $email_parts[0]   = str_replace( '.', '', $email_parts[0] );
     436            $normalized_email = sprintf( '%s@%s', $email_parts[0], $email_parts[1] );
     437        }
     438        return $this->normalize_and_hash( $hash_algorithm, $normalized_email, true );
     439    }
    316440}
  • gtm-kit/tags/1.21/src/Integration/WooCommerce.php

    r3055017 r3070452  
    12141214        $data_layer['ecommerce']['customer']['shipping_state']     = $wc_customer->get_shipping_state();
    12151215
     1216        $data_layer['user_data']['sha256_email_address']         = $this->util->normalize_and_hash_email_address( 'sha256', $wc_customer->get_billing_email() );
     1217        $data_layer['user_data']['sha256_phone_number']          = $this->util->normalize_and_hash( 'sha256', $wc_customer->get_billing_phone(), true );
     1218        $data_layer['user_data']['address']['sha256_first_name'] = $this->util->normalize_and_hash( 'sha256', $wc_customer->get_billing_first_name(), false );
     1219        $data_layer['user_data']['address']['sha256_last_name']  = $this->util->normalize_and_hash( 'sha256', $wc_customer->get_billing_last_name(), false );
     1220        $data_layer['user_data']['address']['street']            = $wc_customer->get_billing_address_1();
     1221        $data_layer['user_data']['address']['city']              = $wc_customer->get_billing_city();
     1222        $data_layer['user_data']['address']['region']            = $wc_customer->get_billing_state();
     1223        $data_layer['user_data']['address']['postal_code']       = $wc_customer->get_billing_postcode();
     1224        $data_layer['user_data']['address']['country']           = $wc_customer->get_billing_country();
     1225
    12161226        return $data_layer;
    12171227    }
  • gtm-kit/tags/1.21/vendor/composer/installed.php

    r3055017 r3070452  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '3cf9422524e24cc9af0cd6960f103f05967060a7',
     6        'reference' => '69fa09250144c7b59d5dd4a710061f83135678f4',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '3cf9422524e24cc9af0cd6960f103f05967060a7',
     16            'reference' => '69fa09250144c7b59d5dd4a710061f83135678f4',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
  • gtm-kit/trunk/assets/admin/settings.asset.php

    r3055017 r3070452  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'a5a3123d0ef3202afc03');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '596c1a7b6bd34fb67624');
  • gtm-kit/trunk/assets/admin/settings.css

    r3055017 r3070452  
    1 :root{--gtmkit-background-white:#fff;--gtmkit-background-grey:#f0f0f1;--gtmkit-border-color:#ddd;--gtmkit-text-color-heading:#454545;--gtmkit-text-color-grey:#777;--gtmkit-color-grey:#888;--gtmkit-color-primary:#3969bb;--gtmkit-color-secondary:#00a32a;--gtmkit-color-button:#3969bb;--gtmkit-color-success:#00a32a;--gtmkit-color-warning:orange;--gtmkit-color-error:red;--gtmkit-space-h:2rem;--gtmkit-space-v:1.5rem;--gtmkit-font-size-l:18px;--gtmkit-font-size-m:16px;--gtmkit-font-size-s:14px;--gtmkit-font-size-xl:22px;--gtmkit-font-size-xs:12px;--gtmkit-font-size-xxl:24px;--gtmkit-button-disabled:#bbb;--gtmkit-button-disabled-bg:#f5f5f5;--gtmkit-button-disabled-border:1px solid #ddd;--gtmkit-button-disabled-text:#bbb;--gtmkit-button-primary-bg:var(--gtmkit-color-primary);--gtmkit-button-primary-bg-hover:#397eeb;--gtmkit-button-primary-text:#fff;--gtmkit-button-primary-text-hover:#fff;--gtmkit-button-secondary-bg:#f8f8f8;--gtmkit-button-secondary-bg-hover:#fff;--gtmkit-button-secondary-border:#ddd;--gtmkit-button-secondary-text:#777;--gtmkit-button-secondary-text-hover:#454545}*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.gtmkit-container{width:100%}@media(min-width:640px){.gtmkit-container{max-width:640px}}@media(min-width:768px){.gtmkit-container{max-width:768px}}@media(min-width:1024px){.gtmkit-container{max-width:1024px}}@media(min-width:1280px){.gtmkit-container{max-width:1280px}}@media(min-width:1536px){.gtmkit-container{max-width:1536px}}.gtmkit-fixed{position:fixed}.gtmkit-absolute{position:absolute}.gtmkit-relative{position:relative}.gtmkit-sticky{position:sticky}.gtmkit-inset-0{inset:0}.gtmkit-bottom-0{bottom:0}.gtmkit-z-10{z-index:10}.gtmkit-m-4{margin:1rem}.\!gtmkit-my-6{margin-bottom:1.5rem!important;margin-top:1.5rem!important}.gtmkit-mx-auto{margin-left:auto;margin-right:auto}.gtmkit-my-16{margin-bottom:4rem;margin-top:4rem}.gtmkit-my-4{margin-bottom:1rem;margin-top:1rem}.gtmkit-my-6{margin-bottom:1.5rem;margin-top:1.5rem}.gtmkit-my-8{margin-bottom:2rem;margin-top:2rem}.\!gtmkit-mt-4{margin-top:1rem!important}.gtmkit-mb-0{margin-bottom:0}.gtmkit-mb-0\.5{margin-bottom:.125rem}.gtmkit-mb-12{margin-bottom:3rem}.gtmkit-mb-14{margin-bottom:3.5rem}.gtmkit-mb-2{margin-bottom:.5rem}.gtmkit-mb-20{margin-bottom:5rem}.gtmkit-mb-4{margin-bottom:1rem}.gtmkit-mb-5{margin-bottom:1.25rem}.gtmkit-mb-6{margin-bottom:1.5rem}.gtmkit-mb-8{margin-bottom:2rem}.gtmkit-ml-2{margin-left:.5rem}.gtmkit-ml-4{margin-left:1rem}.gtmkit-mr-8{margin-right:2rem}.gtmkit-mt-12{margin-top:3rem}.gtmkit-mt-3{margin-top:.75rem}.gtmkit-mt-4{margin-top:1rem}.gtmkit-mt-6{margin-top:1.5rem}.gtmkit-mt-8{margin-top:2rem}.gtmkit-block{display:block}.gtmkit-inline-block{display:inline-block}.gtmkit-flex{display:flex}.gtmkit-grid{display:grid}.gtmkit-h-0{height:0}.gtmkit-h-0\.5{height:.125rem}.gtmkit-h-2{height:.5rem}.gtmkit-h-2\.5{height:.625rem}.gtmkit-h-5{height:1.25rem}.gtmkit-h-8{height:2rem}.gtmkit-h-screen{height:100vh}.gtmkit-min-h-\[128px\]{min-height:128px}.gtmkit-min-h-\[175px\]{min-height:175px}.gtmkit-w-2{width:.5rem}.gtmkit-w-2\.5{width:.625rem}.gtmkit-w-3\/4{width:75%}.gtmkit-w-5{width:1.25rem}.gtmkit-w-8{width:2rem}.gtmkit-w-\[225px\]{width:225px}.gtmkit-w-\[250px\]{width:250px}.gtmkit-w-full{width:100%}.gtmkit-min-w-\[225px\]{min-width:225px}.gtmkit-max-w-3xl{max-width:48rem}.gtmkit-max-w-\[1536px\]{max-width:1536px}.gtmkit-max-w-\[90\%\]{max-width:90%}.gtmkit-max-w-lg{max-width:32rem}.gtmkit-max-w-max{max-width:-moz-max-content;max-width:max-content}.gtmkit-max-w-md{max-width:28rem}.gtmkit-max-w-xl{max-width:36rem}.gtmkit-flex-auto{flex:1 1 auto}.gtmkit-shrink-0{flex-shrink:0}.gtmkit-table-fixed{table-layout:fixed}.gtmkit-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.gtmkit-flex-col{flex-direction:column}.gtmkit-flex-wrap{flex-wrap:wrap}.gtmkit-items-center{align-items:center}.gtmkit-justify-center{justify-content:center}.gtmkit-justify-between{justify-content:space-between}.gtmkit-gap-16{gap:4rem}.gtmkit-gap-4{gap:1rem}.gtmkit-gap-6{gap:1.5rem}.gtmkit-gap-8{gap:2rem}.gtmkit-space-x-9>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2.25rem*var(--tw-space-x-reverse))}.gtmkit-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.gtmkit-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.gtmkit-whitespace-nowrap{white-space:nowrap}.gtmkit-rounded{border-radius:.25rem}.gtmkit-rounded-full{border-radius:9999px}.gtmkit-rounded-md{border-radius:.375rem}.gtmkit-border{border-width:1px}.gtmkit-border-2{border-width:2px}.gtmkit-border-y{border-top-width:1px}.gtmkit-border-b,.gtmkit-border-y{border-bottom-width:1px}.gtmkit-border-b-2{border-bottom-width:2px}.gtmkit-border-b-4{border-bottom-width:4px}.gtmkit-border-t-4{border-top-width:4px}.gtmkit-border-color-border{border-color:var(--gtmkit-border-color)}.gtmkit-border-color-grey{border-color:var(--gtmkit-color-grey)}.gtmkit-border-color-primary{border-color:var(--gtmkit-color-primary)}.gtmkit-border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.gtmkit-border-b-color-primary{border-bottom-color:var(--gtmkit-color-primary)}.gtmkit-bg-color-border{background-color:var(--gtmkit-border-color)}.gtmkit-bg-color-button-disabled{background-color:var(--gtmkit-button-disabled)}.gtmkit-bg-color-grey{background-color:var(--gtmkit-color-grey)}.gtmkit-bg-color-primary{background-color:var(--gtmkit-color-primary)}.gtmkit-bg-color-success{background-color:var(--gtmkit-color-success)}.gtmkit-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.gtmkit-p-3{padding:.75rem}.gtmkit-p-6{padding:1.5rem}.gtmkit-p-8{padding:2rem}.\!gtmkit-px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.\!gtmkit-px-8{padding-left:2rem!important;padding-right:2rem!important}.\!gtmkit-py-4{padding-bottom:1rem!important;padding-top:1rem!important}.\!gtmkit-py-6{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.gtmkit-px-16{padding-left:4rem;padding-right:4rem}.gtmkit-px-2{padding-left:.5rem;padding-right:.5rem}.gtmkit-px-20{padding-left:5rem;padding-right:5rem}.gtmkit-px-3{padding-left:.75rem;padding-right:.75rem}.gtmkit-px-4{padding-left:1rem;padding-right:1rem}.gtmkit-px-5{padding-left:1.25rem;padding-right:1.25rem}.gtmkit-px-6{padding-left:1.5rem;padding-right:1.5rem}.gtmkit-px-8{padding-left:2rem;padding-right:2rem}.gtmkit-py-1{padding-bottom:.25rem;padding-top:.25rem}.gtmkit-py-12{padding-bottom:3rem;padding-top:3rem}.gtmkit-py-2{padding-bottom:.5rem;padding-top:.5rem}.gtmkit-py-4{padding-bottom:1rem;padding-top:1rem}.gtmkit-py-6{padding-top:1.5rem}.gtmkit-pb-6,.gtmkit-py-6{padding-bottom:1.5rem}.gtmkit-pb-\[18px\]{padding-bottom:18px}.gtmkit-pt-3{padding-top:.75rem}.gtmkit-pt-4{padding-top:1rem}.gtmkit-pt-5{padding-top:1.25rem}.gtmkit-pt-8{padding-top:2rem}.gtmkit-text-left{text-align:left}.gtmkit-text-center{text-align:center}.gtmkit-text-2xl{font-size:1.5rem;line-height:2rem}.gtmkit-text-3xl{font-size:1.875rem;line-height:2.25rem}.gtmkit-text-4xl{font-size:2.25rem;line-height:2.5rem}.gtmkit-text-\[15px\]{font-size:15px}.gtmkit-text-base{font-size:1rem;line-height:1.5rem}.gtmkit-text-lg{font-size:1.125rem;line-height:1.75rem}.gtmkit-text-sm{font-size:.875rem;line-height:1.25rem}.gtmkit-text-xl{font-size:1.25rem;line-height:1.75rem}.gtmkit-text-xs{font-size:.75rem;line-height:1rem}.gtmkit-font-bold{font-weight:700}.gtmkit-font-light{font-weight:300}.gtmkit-font-medium{font-weight:500}.gtmkit-font-semibold{font-weight:600}.gtmkit-uppercase{text-transform:uppercase}.gtmkit-leading-5{line-height:1.25rem}.gtmkit-text-color-grey{color:var(--gtmkit-color-grey)}.gtmkit-text-color-heading{color:var(--gtmkit-text-color-heading)}.gtmkit-text-color-primary{color:var(--gtmkit-color-primary)}.gtmkit-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.gtmkit-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.gtmkit-underline{text-decoration-line:underline}.gtmkit-opacity-100{opacity:1}.gtmkit-opacity-60{opacity:.6}.gtmkit-drop-shadow-md{--tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.gtmkit-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.gtmkit-duration-500{transition-duration:.5s}.hover\:gtmkit-border-color-grey:hover{border-color:var(--gtmkit-color-grey)}.hover\:gtmkit-underline:hover{text-decoration-line:underline}.disabled\:\!gtmkit-bg-color-button-disabled:disabled{background-color:var(--gtmkit-button-disabled)!important}.disabled\:\!gtmkit-text-color-grey:disabled{color:var(--gtmkit-color-grey)!important}@media(min-width:640px){.sm\:gtmkit-w-auto{width:auto}}@media(min-width:768px){.md\:gtmkit-mt-10{margin-top:2.5rem}.md\:gtmkit-mt-12{margin-top:3rem}.md\:gtmkit-mt-16{margin-top:4rem}.md\:gtmkit-mt-8{margin-top:2rem}.md\:gtmkit-grid{display:grid}.md\:gtmkit-max-w-xl{max-width:36rem}}@media(min-width:1024px){.lg\:gtmkit-grid{display:grid}.lg\:gtmkit-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:gtmkit-justify-between{justify-content:space-between}}@media(min-width:1280px){.xl\:gtmkit-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.gtmkit #wpcontent{padding-left:0!important}.gtmkit #wpcontent *,.gtmkit #wpcontent :after,.gtmkit #wpcontent :before{box-sizing:border-box}.gtmkit a:focus{box-shadow:none}.gtmkit p{font-size:14px}.gtmkit .components-button.is-primary{background-color:var(--gtmkit-color-button)}.gtmkit .components-button .components-spinner{margin:0 0 0 1rem}.gtmkit-settings-field-wrap .components-base-control.components-toggle-control{line-height:1.5em}.gtmkit-settings-field-wrap .components-base-control__label{font-size:14px;font-weight:600;text-transform:none}.gtmkit .slide-appear,.gtmkit .slide-enter{transform:translateY(100%)}.gtmkit .slide-appear-active,.gtmkit .slide-enter-active{transform:translateY(0);transition:transform .5s ease-in-out}.gtmkit .slide-exit{transform:translateY(0)}.gtmkit .slide-exit-active{transform:translateY(100%);transition:transform .5s ease-in-out}
     1:root{--gtmkit-background-white:#fff;--gtmkit-background-grey:#f0f0f1;--gtmkit-border-color:#ddd;--gtmkit-text-color-heading:#454545;--gtmkit-text-color-grey:#777;--gtmkit-color-grey:#888;--gtmkit-color-primary:#3969bb;--gtmkit-color-secondary:#00a32a;--gtmkit-color-button:#3969bb;--gtmkit-color-success:#00a32a;--gtmkit-color-warning:orange;--gtmkit-color-error:red;--gtmkit-space-h:2rem;--gtmkit-space-v:1.5rem;--gtmkit-font-size-l:18px;--gtmkit-font-size-m:16px;--gtmkit-font-size-s:14px;--gtmkit-font-size-xl:22px;--gtmkit-font-size-xs:12px;--gtmkit-font-size-xxl:24px;--gtmkit-button-disabled:#bbb;--gtmkit-button-disabled-bg:#f5f5f5;--gtmkit-button-disabled-border:1px solid #ddd;--gtmkit-button-disabled-text:#bbb;--gtmkit-button-primary-bg:var(--gtmkit-color-primary);--gtmkit-button-primary-bg-hover:#397eeb;--gtmkit-button-primary-text:#fff;--gtmkit-button-primary-text-hover:#fff;--gtmkit-button-secondary-bg:#f8f8f8;--gtmkit-button-secondary-bg-hover:#fff;--gtmkit-button-secondary-border:#ddd;--gtmkit-button-secondary-text:#777;--gtmkit-button-secondary-text-hover:#454545}*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.gtmkit-container{width:100%}@media(min-width:640px){.gtmkit-container{max-width:640px}}@media(min-width:768px){.gtmkit-container{max-width:768px}}@media(min-width:1024px){.gtmkit-container{max-width:1024px}}@media(min-width:1280px){.gtmkit-container{max-width:1280px}}@media(min-width:1536px){.gtmkit-container{max-width:1536px}}.gtmkit-fixed{position:fixed}.gtmkit-absolute{position:absolute}.gtmkit-relative{position:relative}.gtmkit-sticky{position:sticky}.gtmkit-inset-0{inset:0}.gtmkit-bottom-0{bottom:0}.gtmkit-z-10{z-index:10}.gtmkit-m-4{margin:1rem}.\!gtmkit-my-6{margin-bottom:1.5rem!important;margin-top:1.5rem!important}.gtmkit-mx-auto{margin-left:auto;margin-right:auto}.gtmkit-my-16{margin-bottom:4rem;margin-top:4rem}.gtmkit-my-4{margin-bottom:1rem;margin-top:1rem}.gtmkit-my-6{margin-bottom:1.5rem;margin-top:1.5rem}.gtmkit-my-8{margin-bottom:2rem;margin-top:2rem}.\!gtmkit-mt-4{margin-top:1rem!important}.gtmkit-mb-0{margin-bottom:0}.gtmkit-mb-0\.5{margin-bottom:.125rem}.gtmkit-mb-12{margin-bottom:3rem}.gtmkit-mb-14{margin-bottom:3.5rem}.gtmkit-mb-2{margin-bottom:.5rem}.gtmkit-mb-20{margin-bottom:5rem}.gtmkit-mb-4{margin-bottom:1rem}.gtmkit-mb-5{margin-bottom:1.25rem}.gtmkit-mb-6{margin-bottom:1.5rem}.gtmkit-mb-8{margin-bottom:2rem}.gtmkit-ml-2{margin-left:.5rem}.gtmkit-ml-4{margin-left:1rem}.gtmkit-mr-8{margin-right:2rem}.gtmkit-mt-12{margin-top:3rem}.gtmkit-mt-3{margin-top:.75rem}.gtmkit-mt-4{margin-top:1rem}.gtmkit-mt-6{margin-top:1.5rem}.gtmkit-mt-8{margin-top:2rem}.gtmkit-block{display:block}.gtmkit-inline-block{display:inline-block}.gtmkit-flex{display:flex}.gtmkit-grid{display:grid}.gtmkit-h-0{height:0}.gtmkit-h-0\.5{height:.125rem}.gtmkit-h-2{height:.5rem}.gtmkit-h-2\.5{height:.625rem}.gtmkit-h-5{height:1.25rem}.gtmkit-h-8{height:2rem}.gtmkit-h-screen{height:100vh}.gtmkit-min-h-\[128px\]{min-height:128px}.gtmkit-min-h-\[175px\]{min-height:175px}.gtmkit-w-2{width:.5rem}.gtmkit-w-2\.5{width:.625rem}.gtmkit-w-3\/4{width:75%}.gtmkit-w-5{width:1.25rem}.gtmkit-w-8{width:2rem}.gtmkit-w-\[225px\]{width:225px}.gtmkit-w-\[250px\]{width:250px}.gtmkit-w-full{width:100%}.gtmkit-min-w-\[225px\]{min-width:225px}.gtmkit-max-w-3xl{max-width:48rem}.gtmkit-max-w-\[1536px\]{max-width:1536px}.gtmkit-max-w-\[90\%\]{max-width:90%}.gtmkit-max-w-lg{max-width:32rem}.gtmkit-max-w-max{max-width:-moz-max-content;max-width:max-content}.gtmkit-max-w-md{max-width:28rem}.gtmkit-max-w-xl{max-width:36rem}.gtmkit-flex-auto{flex:1 1 auto}.gtmkit-shrink-0{flex-shrink:0}.gtmkit-table-fixed{table-layout:fixed}.gtmkit-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.gtmkit-flex-col{flex-direction:column}.gtmkit-flex-wrap{flex-wrap:wrap}.gtmkit-items-center{align-items:center}.gtmkit-justify-center{justify-content:center}.gtmkit-justify-between{justify-content:space-between}.gtmkit-gap-16{gap:4rem}.gtmkit-gap-4{gap:1rem}.gtmkit-gap-6{gap:1.5rem}.gtmkit-gap-8{gap:2rem}.gtmkit-space-x-9>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2.25rem*var(--tw-space-x-reverse))}.gtmkit-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.gtmkit-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.gtmkit-whitespace-nowrap{white-space:nowrap}.gtmkit-rounded{border-radius:.25rem}.gtmkit-rounded-full{border-radius:9999px}.gtmkit-rounded-md{border-radius:.375rem}.gtmkit-border{border-width:1px}.gtmkit-border-2{border-width:2px}.gtmkit-border-y{border-top-width:1px}.gtmkit-border-b,.gtmkit-border-y{border-bottom-width:1px}.gtmkit-border-b-2{border-bottom-width:2px}.gtmkit-border-b-4{border-bottom-width:4px}.gtmkit-border-t-4{border-top-width:4px}.gtmkit-border-color-border{border-color:var(--gtmkit-border-color)}.gtmkit-border-color-grey{border-color:var(--gtmkit-color-grey)}.gtmkit-border-color-primary{border-color:var(--gtmkit-color-primary)}.gtmkit-border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.gtmkit-border-b-color-primary{border-bottom-color:var(--gtmkit-color-primary)}.gtmkit-bg-color-border{background-color:var(--gtmkit-border-color)}.gtmkit-bg-color-button-disabled{background-color:var(--gtmkit-button-disabled)}.gtmkit-bg-color-grey{background-color:var(--gtmkit-color-grey)}.gtmkit-bg-color-primary{background-color:var(--gtmkit-color-primary)}.gtmkit-bg-color-success{background-color:var(--gtmkit-color-success)}.gtmkit-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.gtmkit-p-3{padding:.75rem}.gtmkit-p-6{padding:1.5rem}.gtmkit-p-8{padding:2rem}.\!gtmkit-px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.\!gtmkit-px-8{padding-left:2rem!important;padding-right:2rem!important}.\!gtmkit-py-4{padding-bottom:1rem!important;padding-top:1rem!important}.\!gtmkit-py-6{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.gtmkit-px-16{padding-left:4rem;padding-right:4rem}.gtmkit-px-2{padding-left:.5rem;padding-right:.5rem}.gtmkit-px-20{padding-left:5rem;padding-right:5rem}.gtmkit-px-3{padding-left:.75rem;padding-right:.75rem}.gtmkit-px-4{padding-left:1rem;padding-right:1rem}.gtmkit-px-5{padding-left:1.25rem;padding-right:1.25rem}.gtmkit-px-6{padding-left:1.5rem;padding-right:1.5rem}.gtmkit-px-8{padding-left:2rem;padding-right:2rem}.gtmkit-py-1{padding-bottom:.25rem;padding-top:.25rem}.gtmkit-py-12{padding-bottom:3rem;padding-top:3rem}.gtmkit-py-2{padding-bottom:.5rem;padding-top:.5rem}.gtmkit-py-4{padding-bottom:1rem;padding-top:1rem}.gtmkit-py-6{padding-top:1.5rem}.gtmkit-pb-6,.gtmkit-py-6{padding-bottom:1.5rem}.gtmkit-pb-\[18px\]{padding-bottom:18px}.gtmkit-pt-3{padding-top:.75rem}.gtmkit-pt-4{padding-top:1rem}.gtmkit-pt-5{padding-top:1.25rem}.gtmkit-pt-8{padding-top:2rem}.gtmkit-text-left{text-align:left}.gtmkit-text-center{text-align:center}.gtmkit-text-2xl{font-size:1.5rem;line-height:2rem}.gtmkit-text-3xl{font-size:1.875rem;line-height:2.25rem}.gtmkit-text-4xl{font-size:2.25rem;line-height:2.5rem}.gtmkit-text-\[15px\]{font-size:15px}.gtmkit-text-base{font-size:1rem;line-height:1.5rem}.gtmkit-text-lg{font-size:1.125rem;line-height:1.75rem}.gtmkit-text-sm{font-size:.875rem;line-height:1.25rem}.gtmkit-text-xl{font-size:1.25rem;line-height:1.75rem}.gtmkit-text-xs{font-size:.75rem;line-height:1rem}.gtmkit-font-bold{font-weight:700}.gtmkit-font-light{font-weight:300}.gtmkit-font-medium{font-weight:500}.gtmkit-font-semibold{font-weight:600}.gtmkit-uppercase{text-transform:uppercase}.gtmkit-leading-5{line-height:1.25rem}.gtmkit-text-color-grey{color:var(--gtmkit-color-grey)}.gtmkit-text-color-heading{color:var(--gtmkit-text-color-heading)}.gtmkit-text-color-primary{color:var(--gtmkit-color-primary)}.gtmkit-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.gtmkit-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.gtmkit-underline{text-decoration-line:underline}.gtmkit-opacity-100{opacity:1}.gtmkit-opacity-60{opacity:.6}.gtmkit-drop-shadow-md{--tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.gtmkit-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.gtmkit-duration-500{transition-duration:.5s}.hover\:gtmkit-border-color-grey:hover{border-color:var(--gtmkit-color-grey)}.hover\:gtmkit-underline:hover{text-decoration-line:underline}.disabled\:\!gtmkit-bg-color-button-disabled:disabled{background-color:var(--gtmkit-button-disabled)!important}.disabled\:\!gtmkit-text-color-grey:disabled{color:var(--gtmkit-color-grey)!important}@media(min-width:640px){.sm\:gtmkit-w-auto{width:auto}}@media(min-width:768px){.md\:gtmkit-mt-10{margin-top:2.5rem}.md\:gtmkit-mt-12{margin-top:3rem}.md\:gtmkit-mt-16{margin-top:4rem}.md\:gtmkit-mt-8{margin-top:2rem}.md\:gtmkit-grid{display:grid}.md\:gtmkit-max-w-xl{max-width:36rem}}@media(min-width:1024px){.lg\:gtmkit-grid{display:grid}.lg\:gtmkit-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:gtmkit-justify-between{justify-content:space-between}}@media(min-width:1280px){.xl\:gtmkit-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.gtmkit #wpcontent{padding-left:0!important}.gtmkit #wpcontent *,.gtmkit #wpcontent :after,.gtmkit #wpcontent :before{box-sizing:border-box}.gtmkit a{font-size:14px}.gtmkit a:focus{box-shadow:none}.gtmkit p{font-size:14px}.gtmkit .components-button.is-primary{background-color:var(--gtmkit-color-button)}.gtmkit .components-button .components-spinner{margin:0 0 0 1rem}.gtmkit-settings-field-wrap .components-base-control.components-toggle-control{line-height:1.5em}.gtmkit-settings-field-wrap .components-base-control__label{font-size:14px;font-weight:600;text-transform:none}.gtmkit .slide-appear,.gtmkit .slide-enter{transform:translateY(100%)}.gtmkit .slide-appear-active,.gtmkit .slide-enter-active{transform:translateY(0);transition:transform .5s ease-in-out}.gtmkit .slide-exit{transform:translateY(0)}.gtmkit .slide-exit-active{transform:translateY(100%);transition:transform .5s ease-in-out}
  • gtm-kit/trunk/assets/admin/settings.js

    r3055017 r3070452  
    1 (()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(e,a)=>{for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React;var a=t.n(e);const n=window.wp.i18n,i=window.wp.element,o=window.wp.components,r=window.lodash,l=window.wp.apiFetch;var s=t.n(l);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const m=async(t,e,a=null,n=!1)=>{let i={};try{i=await s()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:options},c=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,n.__)("An error occurred.","gtm-kit"),a.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":a.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.isPending=!1,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,n.__)("An error occurred.","gtm-kit"):(0,n.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage}return a},g=(0,i.createContext)(),u=t=>{const[a,n]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),o=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};n({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},l=async t=>{n({type:"UPDATE_STATE",payload:t})};(0,i.useEffect)((()=>{o()}),[]);const s={useDispatch:t=>{n(t)},useUpdateSettings:async()=>{n({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=a.stateSettings,m("gtmkit/v1/set-options","POST",e));var e;n({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:o,useUpdateState:l,useUpdateStateSettings:async(t,e,n)=>{const i=JSON.parse(JSON.stringify(a.stateSettings));let o;i[t][e]=n,o=!(0,r.isEqual)(i,a.fetchedSettings),l({stateSettings:i,canSave:o})},useImportSettings:async(t,e)=>{const n=JSON.parse(JSON.stringify(a.stateSettings));let i;const o={};o.general={...n.general,...e.general},"integrations"in e&&(o.integrations={...n.integrations,...e.integrations}),i=!(0,r.isEqual)(o,a.fetchedSettings),l({stateSettings:o,canSave:i})},useUpdateSupportTicket:async t=>{l({supportTicket:t})},useSendSystemData:async()=>{n({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=a.supportTicket,m("gtmkit/v1/send-support-data","POST",e,!0));var e;n({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useSettings:a.stateSettings,useIsPending:a.isPending,useNotice:a.notice,useHasError:a.hasError,useCanSave:a.canSave,useSiteData:a.siteData,useInstallData:a.installData,useIsSending:a.isSendingSystemData,useSupportTicket:a.supportTicket,useIsSystemDataSent:a.isSystemDataSent,useSystemDataMessage:a.systemDataMessage,isWooAddonActive:!!window.gtmkitSettings.wa&&window.gtmkitSettings.wa};return(0,e.createElement)(g.Provider,{value:s},t.children)};function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},d.apply(this,arguments)}var p;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(p||(p={}));const h="popstate";function _(t,e){if(!1===t||null==t)throw new Error(e)}function k(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function f(t,e){return{usr:t.state,key:t.key,idx:e}}function E(t,e,a,n){return void 0===a&&(a=null),d({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?v(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function b(t){let{pathname:e="/",search:a="",hash:n=""}=t;return a&&"?"!==a&&(e+="?"===a.charAt(0)?a:"?"+a),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function v(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var y;function x(t,e,a){void 0===a&&(a="/");let n=U(("string"==typeof e?v(e):e).pathname||"/",a);if(null==n)return null;let i=w(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(i);let o=null;for(let t=0;null==o&&t<i.length;++t)o=O(i[t],A(n));return o}function w(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,o)=>{let r={relativePath:void 0===o?t.path||"":o,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};r.relativePath.startsWith("/")&&(_(r.relativePath.startsWith(n),'Absolute route path "'+r.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),r.relativePath=r.relativePath.slice(n.length));let l=F([n,r.relativePath]),s=a.concat(r);t.children&&t.children.length>0&&(_(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),w(t.children,e,s,l)),(null!=t.path||t.index)&&e.push({path:l,score:I(l,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of S(t.path))i(t,e,a);else i(t,e)})),e}function S(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),o=a.replace(/\?$/,"");if(0===n.length)return i?[o,""]:[o];let r=S(n.join("/")),l=[];return l.push(...r.map((t=>""===t?o:[o,t].join("/")))),i&&l.push(...r),l.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(y||(y={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const N=/^:\w+$/,C=3,T=2,G=1,D=10,P=-2,M=t=>"*"===t;function I(t,e){let a=t.split("/"),n=a.length;return a.some(M)&&(n+=P),e&&(n+=T),a.filter((t=>!M(t))).reduce(((t,e)=>t+(N.test(e)?C:""===e?G:D)),n)}function O(t,e){let{routesMeta:a}=t,n={},i="/",o=[];for(let t=0;t<a.length;++t){let r=a[t],l=t===a.length-1,s="/"===i?e:e.slice(i.length)||"/",m=R({path:r.relativePath,caseSensitive:r.caseSensitive,end:l},s);if(!m)return null;Object.assign(n,m.params);let c=r.route;o.push({params:n,pathname:F([i,m.pathname]),pathnameBase:B(F([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=F([i,m.pathnameBase]))}return o}function R(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[a,n]=function(t,e,a){void 0===e&&(e=!1),void 0===a&&(a=!0),k("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,((t,e,a)=>(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let o=i[0],r=o.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=l[a]||"";r=o.slice(0,o.length-t.length).replace(/(.)\/+$/,"$1")}const s=l[a];return t[n]=i&&!s?void 0:function(t,e){try{return decodeURIComponent(t)}catch(a){return k(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+a+")."),t}}(s||"",n),t}),{}),pathname:o,pathnameBase:r,pattern:t}}function A(t){try{return decodeURI(t)}catch(e){return k(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function U(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function L(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function j(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function H(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=v(t):(i=d({},t),_(!i.pathname||!i.pathname.includes("?"),L("?","pathname","search",i)),_(!i.pathname||!i.pathname.includes("#"),L("#","pathname","hash",i)),_(!i.search||!i.search.includes("#"),L("#","search","hash",i)));let o,r=""===t||""===i.pathname,l=r?"/":i.pathname;if(null==l)o=a;else if(n){let t=0===e.length?[]:e[e.length-1].replace(/^\//,"").split("/");if(l.startsWith("..")){let e=l.split("/");for(;".."===e[0];)e.shift(),t.pop();i.pathname=e.join("/")}o="/"+t.join("/")}else{let t=e.length-1;if(l.startsWith("..")){let e=l.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}o=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?v(t):t,o=a?a.startsWith("/")?a:function(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?a.length>1&&a.pop():"."!==t&&a.push(t)})),a.length>1?a.join("/"):"/"}(a,e):e;return{pathname:o,search:W(n),hash:K(i)}}(i,o),m=l&&"/"!==l&&l.endsWith("/"),c=(r||"."===l)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const F=t=>t.join("/").replace(/\/\/+/g,"/"),B=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),W=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",K=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const J=["post","put","patch","delete"],z=(new Set(J),["get",...J]);function $(){return $=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},$.apply(this,arguments)}new Set(z),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const q=e.createContext(null),V=e.createContext(null),Y=e.createContext(null),X=e.createContext(null),Q=e.createContext({outlet:null,matches:[],isDataRoute:!1}),Z=e.createContext(null);function tt(){return null!=e.useContext(X)}function et(){return tt()||_(!1),e.useContext(X).location}function at(t){e.useContext(Y).static||e.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=e.useContext(Q);return t?function(){let{router:t}=function(t){let a=e.useContext(q);return a||_(!1),a}(ct.UseNavigateStable),a=ut(gt.UseNavigateStable),n=e.useRef(!1);return at((()=>{n.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,$({fromRouteId:a},i)))}),[t,a])}():function(){tt()||_(!1);let t=e.useContext(q),{basename:a,future:n,navigator:i}=e.useContext(Y),{matches:o}=e.useContext(Q),{pathname:r}=et(),l=JSON.stringify(j(o,n.v7_relativeSplatPath)),s=e.useRef(!1);return at((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void i.go(e);let o=H(e,JSON.parse(l),r,"path"===n.relative);null==t&&"/"!==a&&(o.pathname="/"===o.pathname?a:F([a,o.pathname])),(n.replace?i.replace:i.push)(o,n.state,n)}),[a,i,l,r,t])}()}function it(t,a){let{relative:n}=void 0===a?{}:a,{future:i}=e.useContext(Y),{matches:o}=e.useContext(Q),{pathname:r}=et(),l=JSON.stringify(j(o,i.v7_relativeSplatPath));return e.useMemo((()=>H(t,JSON.parse(l),r,"path"===n)),[t,l,r,n])}function ot(t,a,n,i){tt()||_(!1);let{navigator:o}=e.useContext(Y),{matches:r}=e.useContext(Q),l=r[r.length-1],s=l?l.params:{},m=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let c,g=et();if(a){var u;let t="string"==typeof a?v(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||_(!1),c=t}else c=g;let d=c.pathname||"/",h=x(t,{pathname:"/"===m?d:d.slice(m.length)||"/"}),k=function(t,a,n,i){var o;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var r;if(null==(r=n)||!r.errors)return null;t=n.matches}let l=t,s=null==(o=n)?void 0:o.errors;if(null!=s){let t=l.findIndex((t=>t.route.id&&(null==s?void 0:s[t.route.id])));t>=0||_(!1),l=l.slice(0,Math.min(l.length,t+1))}let m=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<l.length;t++){let e=l[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.loader&&e.route.id&&void 0===n.loaderData[e.route.id]&&(!n.errors||void 0===n.errors[e.route.id])){m=!0,l=c>=0?l.slice(0,c+1):[l[0]];break}}return l.reduceRight(((t,i,o)=>{let r,g=!1,u=null,d=null;var p;n&&(r=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||lt,m&&(c<0&&0===o?(dt[p="route-fallback"]||(dt[p]=!0),g=!0,d=null):c===o&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(l.slice(0,o+1)),_=()=>{let a;return a=r?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(mt,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===o)?e.createElement(st,{location:n.location,revalidation:n.revalidation,component:u,error:r,children:_(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):_()}),null)}(h&&h.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:F([m,o.encodeLocation?o.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:F([m,o.encodeLocation?o.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),r,n,i);return a&&k?e.createElement(X.Provider,{value:{location:$({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:p.Pop}},k):k}function rt(){let t=function(){var t;let a=e.useContext(Z),n=function(t){let a=e.useContext(V);return a||_(!1),a}(gt.UseRouteError),i=ut(gt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),a=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:i},n):null,null)}const lt=e.createElement(rt,null);class st extends e.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:void 0!==t.error?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return void 0!==this.state.error?e.createElement(Q.Provider,{value:this.props.routeContext},e.createElement(Z.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mt(t){let{routeContext:a,match:n,children:i}=t,o=e.useContext(q);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(Q.Provider,{value:a},i)}var ct=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ct||{}),gt=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(gt||{});function ut(t){let a=function(t){let a=e.useContext(Q);return a||_(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||_(!1),n.route.id}const dt={};function pt(t){let{to:a,replace:n,state:i,relative:o}=t;tt()||_(!1);let{future:r,static:l}=e.useContext(Y),{matches:s}=e.useContext(Q),{pathname:m}=et(),c=nt(),g=H(a,j(s,r.v7_relativeSplatPath),m,"path"===o),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:o})),[c,u,o,n,i]),null}function ht(t){_(!1)}function _t(t){let{basename:a="/",children:n=null,location:i,navigationType:o=p.Pop,navigator:r,static:l=!1,future:s}=t;tt()&&_(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:r,static:l,future:$({v7_relativeSplatPath:!1},s)})),[m,s,r,l]);"string"==typeof i&&(i=v(i));let{pathname:g="/",search:u="",hash:d="",state:h=null,key:k="default"}=i,f=e.useMemo((()=>{let t=U(g,m);return null==t?null:{location:{pathname:t,search:u,hash:d,state:h,key:k},navigationType:o}}),[m,g,u,d,h,k,o]);return null==f?null:e.createElement(Y.Provider,{value:c},e.createElement(X.Provider,{children:n,value:f}))}function kt(t){let{children:e,location:a}=t;return ot(ft(e),a)}function ft(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let o=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,ft(t.props.children,o));t.type!==ht&&_(!1),t.props.index&&t.props.children&&_(!1);let r={id:t.props.id||o.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(r.children=ft(t.props.children,o)),n.push(r)})),n}e.startTransition,new Promise((()=>{})),e.Component;const Et=window.ReactDOM;var bt=t.n(Et);function vt(){return vt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},vt.apply(this,arguments)}function yt(t,e){if(null==t)return{};var a,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)a=o[n],e.indexOf(a)>=0||(i[a]=t[a]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const xt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],wt=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],St=e.createContext({isTransitioning:!1});new Map;const Nt=e.startTransition;function Ct(t){let{basename:a,children:n,future:i,window:o}=t,r=e.useRef();null==r.current&&(r.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,r=i.history,l=p.Pop,s=null,m=c();function c(){return(r.state||{idx:null}).idx}function g(){l=p.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:l,location:k.location,delta:e})}function u(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:b(t);return _(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,r.replaceState(d({},r.state,{idx:m}),""));let k={get action(){return l},get location(){return t(i,r)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(h,g),s=t,()=>{i.removeEventListener(h,g),s=null}},createHref:t=>e(i,t),createURL:u,encodeLocation(t){let e=u(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){l=p.Push;let n=E(k.location,t,e);a&&a(n,t),m=c()+1;let g=f(n,m),u=k.createHref(n);try{r.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}o&&s&&s({action:l,location:k.location,delta:1})},replace:function(t,e){l=p.Replace;let n=E(k.location,t,e);a&&a(n,t),m=c();let i=f(n,m),g=k.createHref(n);r.replaceState(i,"",g),o&&s&&s({action:l,location:k.location,delta:0})},go:t=>r.go(t)};return k}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=v(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),E("",{pathname:a,search:n,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let a=t.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let e=t.location.href,a=e.indexOf("#");n=-1===a?e:e.slice(0,a)}return n+"#"+("string"==typeof e?e:b(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:o,v5Compat:!0}));let l=r.current,[s,m]=e.useState({action:l.action,location:l.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&Nt?Nt((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>l.listen(g)),[l,g]),e.createElement(_t,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:l,future:i})}Et.flushSync;const Tt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Gt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dt=e.forwardRef((function(t,a){let n,{onClick:i,relative:o,reloadDocument:r,replace:l,state:s,target:m,to:c,preventScrollReset:g,unstable_viewTransition:u}=t,d=yt(t,xt),{basename:p}=e.useContext(Y),h=!1;if("string"==typeof c&&Gt.test(c)&&(n=c,Tt))try{let t=new URL(window.location.href),e=c.startsWith("//")?new URL(t.protocol+c):new URL(c),a=U(e.pathname,p);e.origin===t.origin&&null!=a?c=a+e.search+e.hash:h=!0}catch(t){}let k=function(t,a){let{relative:n}=void 0===a?{}:a;tt()||_(!1);let{basename:i,navigator:o}=e.useContext(Y),{hash:r,pathname:l,search:s}=it(t,{relative:n}),m=l;return"/"!==i&&(m="/"===l?i:F([i,l])),o.createHref({pathname:m,search:s,hash:r})}(c,{relative:o}),f=function(t,a){let{target:n,replace:i,state:o,preventScrollReset:r,relative:l,unstable_viewTransition:s}=void 0===a?{}:a,m=nt(),c=et(),g=it(t,{relative:l});return e.useCallback((e=>{if(function(t,e){return!(0!==t.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t))}(e,n)){e.preventDefault();let a=void 0!==i?i:b(c)===b(g);m(t,{replace:a,state:o,preventScrollReset:r,relative:l,unstable_viewTransition:s})}}),[c,m,g,i,o,n,t,r,l,s])}(c,{replace:l,state:s,target:m,preventScrollReset:g,relative:o,unstable_viewTransition:u});return e.createElement("a",vt({},d,{href:n||k,onClick:h||r?i:function(t){i&&i(t),t.defaultPrevented||f(t)},ref:a,target:m}))})),Pt=e.forwardRef((function(t,a){let{"aria-current":n="page",caseSensitive:i=!1,className:o="",end:r=!1,style:l,to:s,unstable_viewTransition:m,children:c}=t,g=yt(t,wt),u=it(s,{relative:g.relative}),d=et(),p=e.useContext(V),{navigator:h}=e.useContext(Y),k=null!=p&&function(t,a){void 0===a&&(a={});let n=e.useContext(St);null==n&&_(!1);let{basename:i}=function(t){let a=e.useContext(q);return a||_(!1),a}(Mt.useViewTransitionState),o=it(t,{relative:a.relative});if(!n.isTransitioning)return!1;let r=U(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=U(n.nextLocation.pathname,i)||n.nextLocation.pathname;return null!=R(o.pathname,l)||null!=R(o.pathname,r)}(u)&&!0===m,f=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,E=d.pathname,b=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(E=E.toLowerCase(),b=b?b.toLowerCase():null,f=f.toLowerCase());const v="/"!==f&&f.endsWith("/")?f.length-1:f.length;let y,x=E===f||!r&&E.startsWith(f)&&"/"===E.charAt(v),w=null!=b&&(b===f||!r&&b.startsWith(f)&&"/"===b.charAt(f.length)),S={isActive:x,isPending:w,isTransitioning:k},N=x?n:void 0;y="function"==typeof o?o(S):[o,x?"active":null,w?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let C="function"==typeof l?l(S):l;return e.createElement(Dt,vt({},g,{"aria-current":N,className:y,ref:a,style:C,to:s,unstable_viewTransition:m}),"function"==typeof c?c(S):c)}));var Mt,It;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Mt||(Mt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(It||(It={}));const Ot=({title:t})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,e.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,e.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,e.createElement)("path",{d:"m88.659 7.002h-49.266c-2.915 0-5.378-.184-9.23 2.596l-18.743 12.752c-4.549 3.292-4.571 6.001 0 9.302l18.743 12.751c3.652 2.646 6.299 2.597 9.23 2.597h15.686 33.58c2.931-.057 5.394-1.784 5.34-3.923v-32.21c-.012-2.134-2.409-3.865-5.34-3.865z",fill:"#3969bb",transform:"matrix(-1 0 0 -1 101.999867 53.999547)"}),(0,e.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,e.createElement)("path",{d:"m18.316 23.086h4.632v6.052c-.75.245-1.459.415-2.121.514-.663.098-1.341.148-2.033.148-1.764 0-3.106-.517-4.035-1.554-.929-1.034-1.395-2.519-1.395-4.457 0-1.886.538-3.356 1.617-4.41 1.078-1.054 2.573-1.579 4.481-1.579 1.2 0 2.357.239 3.469.718l-.823 1.979c-.85-.425-1.737-.637-2.657-.637-1.071 0-1.932.358-2.572 1.077-.645.718-.968 1.685-.968 2.899 0 1.267.26 2.233.78 2.904.516.667 1.271.999 2.262.999.517 0 1.041-.052 1.572-.158v-2.435h-2.209zm11.912 6.555h-2.474v-9.614h-3.173v-2.06h8.816v2.06h-3.169zm9.908 0-2.811-9.158h-.072c.103 1.863.154 3.105.154 3.728v5.43h-2.213v-11.674h3.368l2.764 8.927h.048l2.934-8.927h3.369v11.674h-2.308v-5.525c0-.261 0-.561.009-.903.009-.341.048-1.246.112-2.716h-.074l-3.011 9.144z"}),(0,e.createElement)("path",{d:"m88.883 31.898h-3.811l-4.147-6.67-1.417 1.018v5.652h-3.357v-15.83h3.357v7.242l1.318-1.861 4.293-5.381h3.724l-5.523 7.006zm1.589-15.233c0-1.075.6-1.614 1.8-1.614 1.199 0 1.798.539 1.798 1.614 0 .512-.148.91-.45 1.196-.297.284-.749.429-1.348.429-1.2 0-1.8-.543-1.8-1.625zm3.449 15.233h-3.302v-12.104h3.302zm8.563-2.413c.578 0 1.271-.128 2.077-.38v2.456c-.82.37-1.831.552-3.031.552-1.324 0-2.28-.333-2.885-1.001-.602-.667-.902-1.668-.902-3.003v-5.835h-1.585v-1.399l1.823-1.103.949-2.557h2.115v2.579h3.388v2.48h-3.388v5.835c0 .467.129.815.393 1.041.264.222.614.335 1.046.335z"}))),t)))),Rt=({to:t,title:a})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Pt,{to:t,className:({isActive:t})=>"gtmkit-border-b-4 gtmkit-border-white gtmkit-text-color-grey gtmkit-font-semibold gtmkit-pt-5 gtmkit-pb-[18px] hover:gtmkit-border-color-grey "+(t?"gtmkit-text-color-heading gtmkit-border-b-color-primary ":"")},a)),At=({NavList:t})=>(0,e.createElement)("nav",{className:"gtmkit-flex gtmkit-flex-wrap gtmkit-items-center gtmkit-px-8 gtmkit-border-y gtmkit-bg-white gtmkit-border-color-border gtmkit-text-[15px] gtmkit-space-x-9"},t.map((function(t){return(0,e.createElement)(Rt,{key:t.to,to:t.to,title:t.title})})));function Ut(){return Ut=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},Ut.apply(this,arguments)}function Lt(t,e){if(null==t)return{};var a,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)a=o[n],e.indexOf(a)>=0||(i[a]=t[a]);return i}function jt(t,e){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jt(t,e)}function Ht(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,jt(t,e)}function Ft(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Bt=a().createContext(null);var Wt=function(t){return t.scrollTop},Kt="unmounted",Jt="exited",zt="entering",$t="entered",qt="exiting",Vt=function(t){function e(e,a){var n;n=t.call(this,e,a)||this;var i,o=a&&!a.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?o?(i=Jt,n.appearStatus=zt):i=$t:i=e.unmountOnExit||e.mountOnEnter?Kt:Jt,n.state={status:i},n.nextCallback=null,n}Ht(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Kt?{status:Jt}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var a=this.state.status;this.props.in?a!==zt&&a!==$t&&(e=zt):a!==zt&&a!==$t||(e=qt)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,a,n=this.props.timeout;return t=e=a=n,null!=n&&"number"!=typeof n&&(t=n.exit,e=n.enter,a=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:a}},n.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e)if(this.cancelNextCallback(),e===zt){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this);a&&Wt(a)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jt&&this.setState({status:Kt})},n.performEnter=function(t){var e=this,a=this.props.enter,n=this.context?this.context.isMounting:t,i=this.props.nodeRef?[n]:[bt().findDOMNode(this),n],o=i[0],r=i[1],l=this.getTimeouts(),s=n?l.appear:l.enter;t||a?(this.props.onEnter(o,r),this.safeSetState({status:zt},(function(){e.props.onEntering(o,r),e.onTransitionEnd(s,(function(){e.safeSetState({status:$t},(function(){e.props.onEntered(o,r)}))}))}))):this.safeSetState({status:$t},(function(){e.props.onEntered(o)}))},n.performExit=function(){var t=this,e=this.props.exit,a=this.getTimeouts(),n=this.props.nodeRef?void 0:bt().findDOMNode(this);e?(this.props.onExit(n),this.safeSetState({status:qt},(function(){t.props.onExiting(n),t.onTransitionEnd(a.exit,(function(){t.safeSetState({status:Jt},(function(){t.props.onExited(n)}))}))}))):this.safeSetState({status:Jt},(function(){t.props.onExited(n)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,a=!0;return this.nextCallback=function(n){a&&(a=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var a=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this),n=null==t&&!this.props.addEndListener;if(a&&!n){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],o=i[0],r=i[1];this.props.addEndListener(o,r)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Kt)return null;var e=this.props,n=e.children,i=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,Lt(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a().createElement(Bt.Provider,{value:null},"function"==typeof n?n(t,i):a().cloneElement(a().Children.only(n),i))},e}(a().Component);function Yt(){}Vt.contextType=Bt,Vt.propTypes={},Vt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Yt,onEntering:Yt,onEntered:Yt,onExit:Yt,onExiting:Yt,onExited:Yt},Vt.UNMOUNTED=Kt,Vt.EXITED=Jt,Vt.ENTERING=zt,Vt.ENTERED=$t,Vt.EXITING=qt;const Xt=Vt;var Qt=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return n=e,void((a=t).classList?a.classList.remove(n):"string"==typeof a.className?a.className=Ft(a.className,n):a.setAttribute("class",Ft(a.className&&a.className.baseVal||"",n)));var a,n}))},Zt=function(t){function e(){for(var e,a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,a){var n=e.resolveArguments(t,a),i=n[0],o=n[1];e.removeClasses(i,"exit"),e.addClass(i,o?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,a)},e.onEntering=function(t,a){var n=e.resolveArguments(t,a),i=n[0],o=n[1]?"appear":"enter";e.addClass(i,o,"active"),e.props.onEntering&&e.props.onEntering(t,a)},e.onEntered=function(t,a){var n=e.resolveArguments(t,a),i=n[0],o=n[1]?"appear":"enter";e.removeClasses(i,o),e.addClass(i,o,"done"),e.props.onEntered&&e.props.onEntered(t,a)},e.onExit=function(t){var a=e.resolveArguments(t)[0];e.removeClasses(a,"appear"),e.removeClasses(a,"enter"),e.addClass(a,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var a=e.resolveArguments(t)[0];e.addClass(a,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var a=e.resolveArguments(t)[0];e.removeClasses(a,"exit"),e.addClass(a,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,a){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,a]},e.getClassNames=function(t){var a=e.props.classNames,n="string"==typeof a,i=n?(n&&a?a+"-":"")+t:a[t];return{baseClassName:i,activeClassName:n?i+"-active":a[t+"Active"],doneClassName:n?i+"-done":a[t+"Done"]}},e}Ht(e,t);var n=e.prototype;return n.addClass=function(t,e,a){var n=this.getClassNames(e)[a+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===a&&i&&(n+=" "+i),"active"===a&&t&&Wt(t),n&&(this.appliedClasses[e][a]=n,function(t,e){t&&e&&e.split(" ").forEach((function(e){return n=e,void((a=t).classList?a.classList.add(n):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(a,n)||("string"==typeof a.className?a.className=a.className+" "+n:a.setAttribute("class",(a.className&&a.className.baseVal||"")+" "+n)));var a,n}))}(t,n))},n.removeClasses=function(t,e){var a=this.appliedClasses[e],n=a.base,i=a.active,o=a.done;this.appliedClasses[e]={},n&&Qt(t,n),i&&Qt(t,i),o&&Qt(t,o)},n.render=function(){var t=this.props,e=(t.classNames,Lt(t,["classNames"]));return a().createElement(Xt,Ut({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(a().Component);Zt.defaultProps={classNames:""},Zt.propTypes={};const te=Zt,ee=({title:t=(0,n.__)("Save","gtm-kit"),className:a="gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey"})=>{const{useUpdateSettings:r,useIsPending:l,useCanSave:s}=(0,i.useContext)(g);return(0,e.createElement)(o.Button,{className:a,onClick:()=>r(),variant:"primary",disabled:l||!s},s?(0,n.__)(t,"gtm-kit"):(0,n.__)("Saved","gtm-kit"),l?(0,e.createElement)(o.Spinner,null):"")},ae=()=>{const{useCanSave:t}=(0,i.useContext)(g);return(0,e.createElement)(te,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0},(0,e.createElement)("footer",{className:"gtmkit-fixed gtmkit-bottom-0 gtmkit-w-full gtmkit-z-10 gtmkit-bg-color-grey gtmkit-text-white gtmkit-p-8"},(0,e.createElement)(ee,null)))},ne=({subject:t})=>{const a=!0===t||"on"===t,i=!0===a?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,e.createElement)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase "+i},a?(0,n.__)("Active","gtm-kit"):(0,n.__)("Inactive","gtm-kit"))},ie=(0,i.forwardRef)((({children:t,className:a="",...n},i)=>(0,e.createElement)("div",{...n,className:"gtmkit-flex gtmkit-flex-col gtmkit-min-h-[128px] gtmkit-bg-white gtmkit-border gtmkit-border-color-border gtmkit-mb-6 gtmkit-py-4 gtmkit-px-5 gtmkit-rounded gtmkit-group gtmkit-w-full "+a,ref:i},t)));ie.Header=({as:t="h3",title:a="",children:n,className:i="",...o})=>(0,e.createElement)("div",{...o,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+i},(0,e.createElement)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},a),n),ie.Content=({as:t="div",children:a,className:n="gtmkit-flex-auto",...i})=>(0,e.createElement)(t,{...i,className:n},a),ie.Button=({url:t,destination:a,newTab:n=!1,text:i,group:r="",...l})=>{const s=nt();return(0,e.createElement)("div",{...l,className:"gtmkit-mt-4 gtmkit-mb-0.5"},(0,e.createElement)(o.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full sm:gtmkit-w-auto gtmkit-min-w-[225px]",onClick:()=>{a&&t&&!1===n?window.gtmkitSettings.current_poage===r?s(a,{replace:!0}):window.location.href=t+"#"+a:t?n?window.open(t):window.location.href=t:s(a,{replace:!0})}},(0,e.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},i)))};const oe=ie,re=({title:t,data:a,className:o=""})=>{const{useSettings:r}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},t),(0,e.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px] "+o},a.map(((t,a)=>!1===t.featured?null:(0,e.createElement)(oe,{key:a},(0,e.createElement)(oe.Header,{title:t.title},t.pill?(0,e.createElement)(ne,{subject:r[t.group][t.option]}):null),(0,e.createElement)(oe.Content,null,t.text.map(((t,a)=>(0,e.createElement)("p",{key:a},t)))),(0,e.createElement)(oe.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,n.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group}))))))},le=[{title:"Woocommerce",pill:!0,group:"integrations",option:"woocommerce_integration",text:[(0,n.__)("The #1 open source eCommerce platform built for WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/woocommerce",text:(0,n.__)("Setup integration","gtm-kit")}},{title:"Contact Form 7",pill:!0,group:"integrations",option:"cf7_integration",text:[(0,n.__)("Just another contact form plugin for WordPress. Simple but flexible","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/cf7",text:(0,n.__)("Setup integration","gtm-kit")}},{title:"Easy Digital Downloads",pill:!0,group:"integrations",option:"edd_integration",text:[(0,n.__)("Easy way to sell Digital Products With WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/edd",text:(0,n.__)("Setup integration","gtm-kit")}}],se=[{title:"Getting started with GTM Kit",text:[(0,n.__)("How to get the most out of Google Tag Manager with GTM Kit.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!0},{title:(0,n.__)("WooCommerce integration","gtm-kit"),text:[(0,n.__)("Integrate WooCommerce with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=dashboard-tutorials"},featured:!0},{title:"Contact Form 7 Integration",text:[(0,n.__)("Integrate Contact Form 7 with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/contact-form-7-integration/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Easy Digital Downloads integration",text:[(0,n.__)("Integrate Easy Digital Downloads with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/set-up-easy-digital-downloads-for-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:(0,n.__)("How to setup Google Analytics (GA4) in Google Tag Manager","gtm-kit"),text:[(0,n.__)("Learn how to configure the necessary tags to make Google Analytics collect your data.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=dashboard-tutorials"},featured:!1},{title:"Advanced GTM container implementation",text:[(0,n.__)("Customization of the GTM container implementation and Server Side Tracking.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Settings, actions and filters for developers",text:[(0,n.__)("One of the things that makes GTM Kit a great tool for developers is the ability to override options in wp-config.php.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Delay JavaScript execution in GTM",text:[(0,n.__)("Delaying JavaScript execution is a powerful page speed optimization technique.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1}],me=()=>{const{useSettings:t}=(0,i.useContext)(g),[a,o]=(0,i.useState)(se),r=Boolean(t.general.sgtm_domain&&t.general.sgtm_domain.trim());return(0,i.useEffect)((()=>{o((t=>[...t,{title:(0,n.__)("See all tutorials…","gtm-kit"),text:[(0,n.__)("See all our tutorial and get the most out of GTM Kit","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=documentation&utm_content=dashboard-tutorials",text:(0,n.__)("Read articles","gtm-kit")},featured:!0}]))}),[]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("General","gtm-kit")),(0,e.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 lg:gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px]"},(0,e.createElement)(oe,null,(0,e.createElement)(oe.Header,{title:"Google Tag Manager Container"},(0,e.createElement)(ne,{subject:t.general.gtm_id&&t.general.container_active})),(0,e.createElement)(oe.Content,null,t.general.gtm_id&&t.general.container_active?(0,e.createElement)("p",null,(0,n.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id):(0,e.createElement)("p",null,(0,n.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,e.createElement)(oe.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})),(0,e.createElement)(oe,null,(0,e.createElement)(oe.Header,{title:(0,n.__)("Server-side GTM","gtm-kit")},(0,e.createElement)(ne,{subject:r})),(0,e.createElement)(oe.Content,null,(0,e.createElement)("p",null,(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit"))),(0,e.createElement)(oe.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})),(0,e.createElement)(oe,null,(0,e.createElement)(oe.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")},(0,e.createElement)(ne,{subject:t.general.analytics_active})),(0,e.createElement)(oe.Content,null,(0,e.createElement)("p",null,(0,n.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,e.createElement)(oe.Button,{destination:"/misc",text:(0,n.__)("Share anonymous data","gtm-kit")}))),(0,e.createElement)(re,{title:(0,n.__)("Tutorials","gtm-kit"),data:a}),(0,e.createElement)(re,{title:(0,n.__)("Integrations","gtm-kit"),data:le}))},ce=({title:t,placeholder:a,help:n,className:r="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:l="general",optionName:s,isDisabled:m})=>{const{useSettings:c,useUpdateStateSettings:u}=(0,i.useContext)(g);return(0,e.createElement)(o.TextControl,{label:t,placeholder:a,help:n,className:r,value:c[l][s],onChange:t=>u(l,s,t),disabled:m})},ge=({title:t,label:a,optionGroup:n="general",optionName:r,disabled:l=!1})=>{const{useSettings:s,useUpdateStateSettings:m}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,e.createElement)(o.BaseControl,{label:t},(0,e.createElement)(o.ToggleControl,{label:a,checked:!l&&s[n][r],onChange:()=>{m(n,r,!(s&&s[n][r]))},disabled:l}))))},ue=({title:t,options:a,help:n,className:r="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:s,disabled:m})=>{const{useSettings:c,useUpdateStateSettings:u}=(0,i.useContext)(g);return(0,e.createElement)(o.RadioControl,{label:t,options:a,help:n,className:r,selected:parseInt(c[l][s]),onChange:t=>u(l,s,t),disabled:m})},de=(0,i.forwardRef)((({children:t,className:a="",disabled:n=!1,...i},o)=>(0,e.createElement)("div",{...i,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-w-3/4 gtmkit-border-color-grey "+a+(n?"gtmkit-opacity-60":""),ref:o},t)));de.Header=({as:t="h3",title:a="",children:n,className:i="",...o})=>(0,e.createElement)(t,{...o,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey "+i},a,n),de.Content=({as:t="div",children:a,className:n="",...i})=>(0,e.createElement)(t,{...i,className:"gtmkit-px-8 gtmkit-py-6 "+n},a);const pe=de,he=()=>{const{useSettings:t}=(0,i.useContext)(g),a=!(t.general.sgtm_domain&&t.general.sgtm_domain.trim()&&t.general.sgtm_container_identifier&&t.general.sgtm_container_identifier.trim());return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Google Tag Manager container","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("General Container Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")),(0,e.createElement)(ce,{title:(0,n.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,n.__)("Enter GTM Container ID","gtm-kit")}),(0,e.createElement)(ge,{title:(0,n.__)("Inject Container Code","gtm-kit"),label:(0,n.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active"}),(0,e.createElement)(ge,{title:(0,n.__)("Just the container","gtm-kit"),label:(0,n.__)("Setting this to On will reduce the functionality to just the GTM container code. No additional data will be pushed to the datalayer regardless of any other settings.","gtm-kit"),optionName:"just_the_container"}),(0,e.createElement)(ce,{title:(0,n.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,n.__)("The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do.","gtm-kit")}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,n.__)("Enter domain …","gtm-kit"),help:(0,n.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,n.__)("Enter loader name …","gtm-kit"),help:(0,n.__)("Only use if you are using a custom loader.","gtm-kit")}),(0,e.createElement)(ge,{title:(0,n.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,n.__)("Prolong cookie lifetime in Safari and other browsers with ITP. This only works if you use Stape sGTM hosting and have set up the Cookie Keeper power up.","gtm-kit"),optionName:"sgtm_cookie_keeper",disabled:a})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Google Tag Manager Server-side Tagging","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/guides/google-tag-manager-server-side-tagging/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=sgtm&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))),(0,e.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Hosting server-side GTM containers","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Stape.io is a solution for hosting server-side Google Tag Manager containers, offering a simplified approach that demands less technical expertise than solutions like Google Cloud Platform.","gtm-kit")," ",(0,n.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,e.createElement)("a",{href:"https://stape.io/?pt=tlam&rs=plugin",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more about Stape.io","gtm-kit"))))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Page Speed Optimization","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("load_js event","gtm-kit"),label:(0,n.__)("Setting this to On will push the event 'load_js' om page load.","gtm-kit"),optionName:"load_js_event"})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Delay JavaScript execution","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Page optimization plugins can delay the 'load_js' event and this can be used to delay the triggering og tags in Google Tag Manager.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/guides/delay-javascript-execution-in-gtm/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=delay-js&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Google Tag Manager Environment","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,n.__)("Enter gtm_auth code","gtm-kit"),help:(0,n.__)("Enter your gtm_auth code your GTM environment.","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,n.__)("Enter gtm_preview code","gtm-kit"),help:(0,n.__)("Enter your gtm_preview code your GTM environment.","gtm-kit")})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Environments","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,n.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,n.__)("If left empty the default environment will be used.","gtm-kit")),(0,e.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Override settings in wp-config.php","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("You can override the values of using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=container-settings&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Container Code Implementation","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:(0,n.__)("Container code implementation:","gtm-kit"),options:[{label:(0,n.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,n.__)("Load container when browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,n.__)("Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle.","gtm-kit"),optionName:"script_implementation"}),(0,e.createElement)(ue,{title:(0,n.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,n.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,n.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,n.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,n.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,n.__)('The preferred method to implement the <noscript> container code is just after the opening <body> tag. This requires that your theme uses the "body_open" hook. If your theme does not support this the script can be injected in the footer or you can use the function below.',"gtm-kit"),optionName:"noscript_implementation"}),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,e.createElement)("code",null,"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>")))))},_e=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Post Data","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Post Data Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")),(0,e.createElement)(ge,{title:(0,n.__)("Post type","gtm-kit"),id:"post-type",label:(0,n.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type"}),(0,e.createElement)(ge,{title:(0,n.__)("Page type","gtm-kit"),id:"page-type",label:(0,n.__)('Include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. "campaign".',"gtm-kit"),optionName:"datalayer_page_type"}),(0,e.createElement)(ge,{title:(0,n.__)("Categories","gtm-kit"),id:"categories",label:(0,n.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories"}),(0,e.createElement)(ge,{title:(0,n.__)("Tags","gtm-kit"),id:"tags",label:(0,n.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags"}),(0,e.createElement)(ge,{title:(0,n.__)("Post title","gtm-kit"),id:"post-title",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title"}),(0,e.createElement)(ge,{title:(0,n.__)("Post ID","gtm-kit"),id:"post-id",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id"}),(0,e.createElement)(ge,{title:(0,n.__)("Post data","gtm-kit"),id:"post-date",label:(0,n.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date"}),(0,e.createElement)(ge,{title:(0,n.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,n.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name"}),(0,e.createElement)(ge,{title:(0,n.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,n.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id"})))),ke=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("User Data","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,n.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,e.createElement)("p",null,(0,n.__)("Full page caching will cache user data making it the same for all users. There are ways around this, but it depends on the chosen cache solution and is only for advanced users.","gtm-kit")))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("User Data Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,n.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in"}),(0,e.createElement)(ge,{title:(0,n.__)("User ID","gtm-kit"),id:"user-id",label:(0,n.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id"}),(0,e.createElement)(ge,{title:(0,n.__)("User role","gtm-kit"),id:"user-role",label:(0,n.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role"})))),fe=()=>{const{useSettings:t}=(0,i.useContext)(g),a=!t.general.gcm_default_settings;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Google Consent Mode","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Google Consent Mode Activation","gtm-kit")},(0,e.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,n.__)("Warning!","gtm-kit"))),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,n.__)("Most Consent Management Platforms will handle the Google Consent Mode settings for you and applying the default settings in both GTM Kit and you CMP will lead to unexpected behaviour or errors.","gtm-kit")),(0,e.createElement)("p",null,(0,n.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")),(0,e.createElement)("p",{className:"!gtmkit-mt-4"},(0,n.__)("GTM Kit will only set the default Consent Mode settings and you must update the settings yourself when the user has given consent.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,e.createElement)("a",{href:"https://developers.google.com/tag-platform/security/guides/consent#implementation_example",target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline gtmkit-font-semibold"},(0,n.__)("See an example of how consent is updated","gtm-kit"))),(0,e.createElement)(ge,{title:(0,n.__)("Activate GCM settings","gtm-kit"),label:(0,n.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings"}))),(0,e.createElement)(pe,{disabled:a},(0,e.createElement)(pe.Header,{title:(0,n.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Ad Personalization","gtm-kit"),label:(0,n.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:a}),(0,e.createElement)(ge,{title:(0,n.__)("Ad Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:a}),(0,e.createElement)(ge,{title:(0,n.__)("Ad User Data","gtm-kit"),label:(0,n.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:a}),(0,e.createElement)(ge,{title:(0,n.__)("Analytics Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:a}),(0,e.createElement)(ge,{title:(0,n.__)("Functionality Storage","gtm-kit"),label:(0,n.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:a}),(0,e.createElement)(ge,{title:(0,n.__)("Personalization Storage","gtm-kit"),label:(0,n.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:a}),(0,e.createElement)(ge,{title:(0,n.__)("Security Storage","gtm-kit"),label:(0,n.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:a}))))},Ee=({label:t,value:a,tag:n})=>(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,e.createElement)("strong",null,t)),(0,e.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===n?(0,e.createElement)("code",{className:"gtmkit-text-sm"},a):(0,e.createElement)("em",null,a))),be=()=>{const{useSiteData:t}=(0,i.useContext)(g),a=Object.values(t.shared_data);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,n.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,n.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,e.createElement)("tbody",{className:"gtmkit-py-6"},a.map((function(t,a){return(0,e.createElement)(Ee,{key:a,label:t.label,value:t.value,tag:t.tag})})))))},ve=()=>{const{}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Misc","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(be,null),(0,e.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,n.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,e.createElement)(ge,{title:(0,n.__)("Share anonymous data","gtm-kit"),label:(0,n.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active"}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Logging and debugging","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Console log","gtm-kit"),label:(0,n.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log"}),(0,e.createElement)(ge,{title:(0,n.__)("Debug log","gtm-kit"),label:(0,n.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log"}))))},ye=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(re,{title:(0,n.__)("Integrations","gtm-kit"),data:le})),xe=({pluginName:t})=>(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.sprintf)(
     1(()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(e,a)=>{for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React;var a=t.n(e);const n=window.wp.i18n,i=window.wp.element,r=window.wp.components,o=window.lodash,l=window.wp.apiFetch;var s=t.n(l);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const m=async(t,e,a=null,n=!1)=>{let i={};try{i=await s()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:options},c=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,n.__)("An error occurred.","gtm-kit"),a.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":a.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.isPending=!1,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,n.__)("An error occurred.","gtm-kit"):(0,n.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage}return a},g=(0,i.createContext)(),u=t=>{const[a,n]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),r=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};n({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},l=async t=>{n({type:"UPDATE_STATE",payload:t})};(0,i.useEffect)((()=>{r()}),[]);const s={useDispatch:t=>{n(t)},useUpdateSettings:async()=>{n({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=a.stateSettings,m("gtmkit/v1/set-options","POST",e));var e;n({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:r,useUpdateState:l,useUpdateStateSettings:async(t,e,n)=>{const i=JSON.parse(JSON.stringify(a.stateSettings));let r;i[t][e]=n,r=!(0,o.isEqual)(i,a.fetchedSettings),l({stateSettings:i,canSave:r})},useImportSettings:async(t,e)=>{const n=JSON.parse(JSON.stringify(a.stateSettings));let i;const r={};r.general={...n.general,...e.general},"integrations"in e&&(r.integrations={...n.integrations,...e.integrations}),i=!(0,o.isEqual)(r,a.fetchedSettings),l({stateSettings:r,canSave:i})},useUpdateSupportTicket:async t=>{l({supportTicket:t})},useSendSystemData:async()=>{n({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=a.supportTicket,m("gtmkit/v1/send-support-data","POST",e,!0));var e;n({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useSettings:a.stateSettings,useIsPending:a.isPending,useNotice:a.notice,useHasError:a.hasError,useCanSave:a.canSave,useSiteData:a.siteData,useInstallData:a.installData,useIsSending:a.isSendingSystemData,useSupportTicket:a.supportTicket,useIsSystemDataSent:a.isSystemDataSent,useSystemDataMessage:a.systemDataMessage,isWooAddonActive:!!window.gtmkitSettings.wa&&window.gtmkitSettings.wa};return(0,e.createElement)(g.Provider,{value:s},t.children)};function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},d.apply(this,arguments)}var p;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(p||(p={}));const h="popstate";function _(t,e){if(!1===t||null==t)throw new Error(e)}function k(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function f(t,e){return{usr:t.state,key:t.key,idx:e}}function E(t,e,a,n){return void 0===a&&(a=null),d({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?v(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function b(t){let{pathname:e="/",search:a="",hash:n=""}=t;return a&&"?"!==a&&(e+="?"===a.charAt(0)?a:"?"+a),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function v(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var y;function x(t,e,a){void 0===a&&(a="/");let n=L(("string"==typeof e?v(e):e).pathname||"/",a);if(null==n)return null;let i=S(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(i);let r=null;for(let t=0;null==r&&t<i.length;++t){let e=U(n);r=M(i[t],e)}return r}function S(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let o={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};o.relativePath.startsWith("/")&&(_(o.relativePath.startsWith(n),'Absolute route path "'+o.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(n.length));let l=H([n,o.relativePath]),s=a.concat(o);t.children&&t.children.length>0&&(_(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),S(t.children,e,s,l)),(null!=t.path||t.index)&&e.push({path:l,score:O(l,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of w(t.path))i(t,e,a);else i(t,e)})),e}function w(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return i?[r,""]:[r];let o=w(n.join("/")),l=[];return l.push(...o.map((t=>""===t?r:[r,t].join("/")))),i&&l.push(...o),l.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(y||(y={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const N=/^:[\w-]+$/,C=3,T=2,D=1,P=10,G=-2,I=t=>"*"===t;function O(t,e){let a=t.split("/"),n=a.length;return a.some(I)&&(n+=G),e&&(n+=T),a.filter((t=>!I(t))).reduce(((t,e)=>t+(N.test(e)?C:""===e?D:P)),n)}function M(t,e){let{routesMeta:a}=t,n={},i="/",r=[];for(let t=0;t<a.length;++t){let o=a[t],l=t===a.length-1,s="/"===i?e:e.slice(i.length)||"/",m=R({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},s);if(!m)return null;Object.assign(n,m.params);let c=o.route;r.push({params:n,pathname:H([i,m.pathname]),pathnameBase:B(H([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=H([i,m.pathnameBase]))}return r}function R(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[a,n]=function(t,e,a){void 0===e&&(e=!1),void 0===a&&(a=!0),k("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,a)=>(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let r=i[0],o=r.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=l[a]||"";o=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const s=l[a];return t[n]=i&&!s?void 0:(s||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:o,pattern:t}}function U(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return k(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function L(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function A(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function j(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function F(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=v(t):(i=d({},t),_(!i.pathname||!i.pathname.includes("?"),A("?","pathname","search",i)),_(!i.pathname||!i.pathname.includes("#"),A("#","pathname","hash",i)),_(!i.search||!i.search.includes("#"),A("#","search","hash",i)));let r,o=""===t||""===i.pathname,l=o?"/":i.pathname;if(null==l)r=a;else{let t=e.length-1;if(!n&&l.startsWith("..")){let e=l.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}r=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?v(t):t,r=a?a.startsWith("/")?a:function(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?a.length>1&&a.pop():"."!==t&&a.push(t)})),a.length>1?a.join("/"):"/"}(a,e):e;return{pathname:r,search:W(n),hash:K(i)}}(i,r),m=l&&"/"!==l&&l.endsWith("/"),c=(o||"."===l)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const H=t=>t.join("/").replace(/\/\/+/g,"/"),B=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),W=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",K=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const J=["post","put","patch","delete"],z=(new Set(J),["get",...J]);function $(){return $=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},$.apply(this,arguments)}new Set(z),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const V=e.createContext(null),q=e.createContext(null),Y=e.createContext(null),X=e.createContext(null),Q=e.createContext({outlet:null,matches:[],isDataRoute:!1}),Z=e.createContext(null);function tt(){return null!=e.useContext(X)}function et(){return tt()||_(!1),e.useContext(X).location}function at(t){e.useContext(Y).static||e.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=e.useContext(Q);return t?function(){let{router:t}=function(t){let a=e.useContext(V);return a||_(!1),a}(ct.UseNavigateStable),a=ut(gt.UseNavigateStable),n=e.useRef(!1);return at((()=>{n.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,$({fromRouteId:a},i)))}),[t,a])}():function(){tt()||_(!1);let t=e.useContext(V),{basename:a,future:n,navigator:i}=e.useContext(Y),{matches:r}=e.useContext(Q),{pathname:o}=et(),l=JSON.stringify(j(r,n.v7_relativeSplatPath)),s=e.useRef(!1);return at((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void i.go(e);let r=F(e,JSON.parse(l),o,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:H([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,l,o,t])}()}function it(t,a){let{relative:n}=void 0===a?{}:a,{future:i}=e.useContext(Y),{matches:r}=e.useContext(Q),{pathname:o}=et(),l=JSON.stringify(j(r,i.v7_relativeSplatPath));return e.useMemo((()=>F(t,JSON.parse(l),o,"path"===n)),[t,l,o,n])}function rt(t,a,n,i){tt()||_(!1);let{navigator:r}=e.useContext(Y),{matches:o}=e.useContext(Q),l=o[o.length-1],s=l?l.params:{},m=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let c,g=et();if(a){var u;let t="string"==typeof a?v(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||_(!1),c=t}else c=g;let d=c.pathname||"/",h=d;if("/"!==m){let t=m.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(t.length).join("/")}let k=x(t,{pathname:h}),f=function(t,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var o;if(null==(o=n)||!o.errors)return null;t=n.matches}let l=t,s=null==(r=n)?void 0:r.errors;if(null!=s){let t=l.findIndex((t=>t.route.id&&(null==s?void 0:s[t.route.id])));t>=0||_(!1),l=l.slice(0,Math.min(l.length,t+1))}let m=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<l.length;t++){let e=l[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:a}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||i){m=!0,l=c>=0?l.slice(0,c+1):[l[0]];break}}}return l.reduceRight(((t,i,r)=>{let o,g=!1,u=null,d=null;var p;n&&(o=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||lt,m&&(c<0&&0===r?(dt[p="route-fallback"]||(dt[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(l.slice(0,r+1)),_=()=>{let a;return a=o?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(mt,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(st,{location:n.location,revalidation:n.revalidation,component:u,error:o,children:_(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):_()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:H([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:H([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),o,n,i);return a&&f?e.createElement(X.Provider,{value:{location:$({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:p.Pop}},f):f}function ot(){let t=function(){var t;let a=e.useContext(Z),n=function(t){let a=e.useContext(q);return a||_(!1),a}(gt.UseRouteError),i=ut(gt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),a=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:i},n):null,null)}const lt=e.createElement(ot,null);class st extends e.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:void 0!==t.error?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return void 0!==this.state.error?e.createElement(Q.Provider,{value:this.props.routeContext},e.createElement(Z.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mt(t){let{routeContext:a,match:n,children:i}=t,r=e.useContext(V);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(Q.Provider,{value:a},i)}var ct=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ct||{}),gt=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(gt||{});function ut(t){let a=function(t){let a=e.useContext(Q);return a||_(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||_(!1),n.route.id}const dt={};function pt(t){let{to:a,replace:n,state:i,relative:r}=t;tt()||_(!1);let{future:o,static:l}=e.useContext(Y),{matches:s}=e.useContext(Q),{pathname:m}=et(),c=nt(),g=F(a,j(s,o.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function ht(t){_(!1)}function _t(t){let{basename:a="/",children:n=null,location:i,navigationType:r=p.Pop,navigator:o,static:l=!1,future:s}=t;tt()&&_(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:o,static:l,future:$({v7_relativeSplatPath:!1},s)})),[m,s,o,l]);"string"==typeof i&&(i=v(i));let{pathname:g="/",search:u="",hash:d="",state:h=null,key:k="default"}=i,f=e.useMemo((()=>{let t=L(g,m);return null==t?null:{location:{pathname:t,search:u,hash:d,state:h,key:k},navigationType:r}}),[m,g,u,d,h,k,r]);return null==f?null:e.createElement(Y.Provider,{value:c},e.createElement(X.Provider,{children:n,value:f}))}function kt(t){let{children:e,location:a}=t;return rt(ft(e),a)}function ft(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let r=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,ft(t.props.children,r));t.type!==ht&&_(!1),t.props.index&&t.props.children&&_(!1);let o={id:t.props.id||r.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(o.children=ft(t.props.children,r)),n.push(o)})),n}e.startTransition,new Promise((()=>{})),e.Component;const Et=window.ReactDOM;var bt=t.n(Et);function vt(){return vt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},vt.apply(this,arguments)}function yt(t,e){if(null==t)return{};var a,n,i={},r=Object.keys(t);for(n=0;n<r.length;n++)a=r[n],e.indexOf(a)>=0||(i[a]=t[a]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const xt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],St=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(t){}const wt=e.createContext({isTransitioning:!1});new Map;const Nt=e.startTransition;function Ct(t){let{basename:a,children:n,future:i,window:r}=t,o=e.useRef();null==o.current&&(o.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:r=!1}=n,o=i.history,l=p.Pop,s=null,m=c();function c(){return(o.state||{idx:null}).idx}function g(){l=p.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:l,location:k.location,delta:e})}function u(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:b(t);return a=a.replace(/ $/,"%20"),_(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,o.replaceState(d({},o.state,{idx:m}),""));let k={get action(){return l},get location(){return t(i,o)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(h,g),s=t,()=>{i.removeEventListener(h,g),s=null}},createHref:t=>e(i,t),createURL:u,encodeLocation(t){let e=u(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){l=p.Push;let n=E(k.location,t,e);a&&a(n,t),m=c()+1;let g=f(n,m),u=k.createHref(n);try{o.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&s&&s({action:l,location:k.location,delta:1})},replace:function(t,e){l=p.Replace;let n=E(k.location,t,e);a&&a(n,t),m=c();let i=f(n,m),g=k.createHref(n);o.replaceState(i,"",g),r&&s&&s({action:l,location:k.location,delta:0})},go:t=>o.go(t)};return k}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=v(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),E("",{pathname:a,search:n,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let a=t.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let e=t.location.href,a=e.indexOf("#");n=-1===a?e:e.slice(0,a)}return n+"#"+("string"==typeof e?e:b(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:r,v5Compat:!0}));let l=o.current,[s,m]=e.useState({action:l.action,location:l.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&Nt?Nt((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>l.listen(g)),[l,g]),e.createElement(_t,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:l,future:i})}Et.flushSync,e.useId;const Tt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Dt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pt=e.forwardRef((function(t,a){let n,{onClick:i,relative:r,reloadDocument:o,replace:l,state:s,target:m,to:c,preventScrollReset:g,unstable_viewTransition:u}=t,d=yt(t,xt),{basename:p}=e.useContext(Y),h=!1;if("string"==typeof c&&Dt.test(c)&&(n=c,Tt))try{let t=new URL(window.location.href),e=c.startsWith("//")?new URL(t.protocol+c):new URL(c),a=L(e.pathname,p);e.origin===t.origin&&null!=a?c=a+e.search+e.hash:h=!0}catch(t){}let k=function(t,a){let{relative:n}=void 0===a?{}:a;tt()||_(!1);let{basename:i,navigator:r}=e.useContext(Y),{hash:o,pathname:l,search:s}=it(t,{relative:n}),m=l;return"/"!==i&&(m="/"===l?i:H([i,l])),r.createHref({pathname:m,search:s,hash:o})}(c,{relative:r}),f=function(t,a){let{target:n,replace:i,state:r,preventScrollReset:o,relative:l,unstable_viewTransition:s}=void 0===a?{}:a,m=nt(),c=et(),g=it(t,{relative:l});return e.useCallback((e=>{if(function(t,e){return!(0!==t.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t))}(e,n)){e.preventDefault();let a=void 0!==i?i:b(c)===b(g);m(t,{replace:a,state:r,preventScrollReset:o,relative:l,unstable_viewTransition:s})}}),[c,m,g,i,r,n,t,o,l,s])}(c,{replace:l,state:s,target:m,preventScrollReset:g,relative:r,unstable_viewTransition:u});return e.createElement("a",vt({},d,{href:n||k,onClick:h||o?i:function(t){i&&i(t),t.defaultPrevented||f(t)},ref:a,target:m}))})),Gt=e.forwardRef((function(t,a){let{"aria-current":n="page",caseSensitive:i=!1,className:r="",end:o=!1,style:l,to:s,unstable_viewTransition:m,children:c}=t,g=yt(t,St),u=it(s,{relative:g.relative}),d=et(),p=e.useContext(q),{navigator:h,basename:k}=e.useContext(Y),f=null!=p&&function(t,a){void 0===a&&(a={});let n=e.useContext(wt);null==n&&_(!1);let{basename:i}=function(t){let a=e.useContext(V);return a||_(!1),a}(It.useViewTransitionState),r=it(t,{relative:a.relative});if(!n.isTransitioning)return!1;let o=L(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=L(n.nextLocation.pathname,i)||n.nextLocation.pathname;return null!=R(r.pathname,l)||null!=R(r.pathname,o)}(u)&&!0===m,E=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,b=d.pathname,v=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(b=b.toLowerCase(),v=v?v.toLowerCase():null,E=E.toLowerCase()),v&&k&&(v=L(v,k)||v);const y="/"!==E&&E.endsWith("/")?E.length-1:E.length;let x,S=b===E||!o&&b.startsWith(E)&&"/"===b.charAt(y),w=null!=v&&(v===E||!o&&v.startsWith(E)&&"/"===v.charAt(E.length)),N={isActive:S,isPending:w,isTransitioning:f},C=S?n:void 0;x="function"==typeof r?r(N):[r,S?"active":null,w?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof l?l(N):l;return e.createElement(Pt,vt({},g,{"aria-current":C,className:x,ref:a,style:T,to:s,unstable_viewTransition:m}),"function"==typeof c?c(N):c)}));var It,Ot;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(It||(It={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Ot||(Ot={}));const Mt=({title:t})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,e.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,e.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,e.createElement)("path",{d:"m88.659 7.002h-49.266c-2.915 0-5.378-.184-9.23 2.596l-18.743 12.752c-4.549 3.292-4.571 6.001 0 9.302l18.743 12.751c3.652 2.646 6.299 2.597 9.23 2.597h15.686 33.58c2.931-.057 5.394-1.784 5.34-3.923v-32.21c-.012-2.134-2.409-3.865-5.34-3.865z",fill:"#3969bb",transform:"matrix(-1 0 0 -1 101.999867 53.999547)"}),(0,e.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,e.createElement)("path",{d:"m18.316 23.086h4.632v6.052c-.75.245-1.459.415-2.121.514-.663.098-1.341.148-2.033.148-1.764 0-3.106-.517-4.035-1.554-.929-1.034-1.395-2.519-1.395-4.457 0-1.886.538-3.356 1.617-4.41 1.078-1.054 2.573-1.579 4.481-1.579 1.2 0 2.357.239 3.469.718l-.823 1.979c-.85-.425-1.737-.637-2.657-.637-1.071 0-1.932.358-2.572 1.077-.645.718-.968 1.685-.968 2.899 0 1.267.26 2.233.78 2.904.516.667 1.271.999 2.262.999.517 0 1.041-.052 1.572-.158v-2.435h-2.209zm11.912 6.555h-2.474v-9.614h-3.173v-2.06h8.816v2.06h-3.169zm9.908 0-2.811-9.158h-.072c.103 1.863.154 3.105.154 3.728v5.43h-2.213v-11.674h3.368l2.764 8.927h.048l2.934-8.927h3.369v11.674h-2.308v-5.525c0-.261 0-.561.009-.903.009-.341.048-1.246.112-2.716h-.074l-3.011 9.144z"}),(0,e.createElement)("path",{d:"m88.883 31.898h-3.811l-4.147-6.67-1.417 1.018v5.652h-3.357v-15.83h3.357v7.242l1.318-1.861 4.293-5.381h3.724l-5.523 7.006zm1.589-15.233c0-1.075.6-1.614 1.8-1.614 1.199 0 1.798.539 1.798 1.614 0 .512-.148.91-.45 1.196-.297.284-.749.429-1.348.429-1.2 0-1.8-.543-1.8-1.625zm3.449 15.233h-3.302v-12.104h3.302zm8.563-2.413c.578 0 1.271-.128 2.077-.38v2.456c-.82.37-1.831.552-3.031.552-1.324 0-2.28-.333-2.885-1.001-.602-.667-.902-1.668-.902-3.003v-5.835h-1.585v-1.399l1.823-1.103.949-2.557h2.115v2.579h3.388v2.48h-3.388v5.835c0 .467.129.815.393 1.041.264.222.614.335 1.046.335z"}))),t)))),Rt=({to:t,title:a})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Gt,{to:t,className:({isActive:t})=>"gtmkit-border-b-4 gtmkit-border-white gtmkit-text-color-grey gtmkit-font-semibold gtmkit-pt-5 gtmkit-pb-[18px] hover:gtmkit-border-color-grey "+(t?"gtmkit-text-color-heading gtmkit-border-b-color-primary ":"")},a)),Ut=({NavList:t})=>(0,e.createElement)("nav",{className:"gtmkit-flex gtmkit-flex-wrap gtmkit-items-center gtmkit-px-8 gtmkit-border-y gtmkit-bg-white gtmkit-border-color-border gtmkit-text-[15px] gtmkit-space-x-9"},t.map((function(t){return(0,e.createElement)(Rt,{key:t.to,to:t.to,title:t.title})})));function Lt(){return Lt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},Lt.apply(this,arguments)}function At(t,e){if(null==t)return{};var a,n,i={},r=Object.keys(t);for(n=0;n<r.length;n++)a=r[n],e.indexOf(a)>=0||(i[a]=t[a]);return i}function jt(t,e){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jt(t,e)}function Ft(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,jt(t,e)}function Ht(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Bt=a().createContext(null);var Wt=function(t){return t.scrollTop},Kt="unmounted",Jt="exited",zt="entering",$t="entered",Vt="exiting",qt=function(t){function e(e,a){var n;n=t.call(this,e,a)||this;var i,r=a&&!a.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?r?(i=Jt,n.appearStatus=zt):i=$t:i=e.unmountOnExit||e.mountOnEnter?Kt:Jt,n.state={status:i},n.nextCallback=null,n}Ft(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Kt?{status:Jt}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var a=this.state.status;this.props.in?a!==zt&&a!==$t&&(e=zt):a!==zt&&a!==$t||(e=Vt)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,a,n=this.props.timeout;return t=e=a=n,null!=n&&"number"!=typeof n&&(t=n.exit,e=n.enter,a=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:a}},n.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e)if(this.cancelNextCallback(),e===zt){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this);a&&Wt(a)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jt&&this.setState({status:Kt})},n.performEnter=function(t){var e=this,a=this.props.enter,n=this.context?this.context.isMounting:t,i=this.props.nodeRef?[n]:[bt().findDOMNode(this),n],r=i[0],o=i[1],l=this.getTimeouts(),s=n?l.appear:l.enter;t||a?(this.props.onEnter(r,o),this.safeSetState({status:zt},(function(){e.props.onEntering(r,o),e.onTransitionEnd(s,(function(){e.safeSetState({status:$t},(function(){e.props.onEntered(r,o)}))}))}))):this.safeSetState({status:$t},(function(){e.props.onEntered(r)}))},n.performExit=function(){var t=this,e=this.props.exit,a=this.getTimeouts(),n=this.props.nodeRef?void 0:bt().findDOMNode(this);e?(this.props.onExit(n),this.safeSetState({status:Vt},(function(){t.props.onExiting(n),t.onTransitionEnd(a.exit,(function(){t.safeSetState({status:Jt},(function(){t.props.onExited(n)}))}))}))):this.safeSetState({status:Jt},(function(){t.props.onExited(n)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,a=!0;return this.nextCallback=function(n){a&&(a=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var a=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this),n=null==t&&!this.props.addEndListener;if(a&&!n){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],r=i[0],o=i[1];this.props.addEndListener(r,o)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Kt)return null;var e=this.props,n=e.children,i=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,At(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a().createElement(Bt.Provider,{value:null},"function"==typeof n?n(t,i):a().cloneElement(a().Children.only(n),i))},e}(a().Component);function Yt(){}qt.contextType=Bt,qt.propTypes={},qt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Yt,onEntering:Yt,onEntered:Yt,onExit:Yt,onExiting:Yt,onExited:Yt},qt.UNMOUNTED=Kt,qt.EXITED=Jt,qt.ENTERING=zt,qt.ENTERED=$t,qt.EXITING=Vt;const Xt=qt;var Qt=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return n=e,void((a=t).classList?a.classList.remove(n):"string"==typeof a.className?a.className=Ht(a.className,n):a.setAttribute("class",Ht(a.className&&a.className.baseVal||"",n)));var a,n}))},Zt=function(t){function e(){for(var e,a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,a){var n=e.resolveArguments(t,a),i=n[0],r=n[1];e.removeClasses(i,"exit"),e.addClass(i,r?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,a)},e.onEntering=function(t,a){var n=e.resolveArguments(t,a),i=n[0],r=n[1]?"appear":"enter";e.addClass(i,r,"active"),e.props.onEntering&&e.props.onEntering(t,a)},e.onEntered=function(t,a){var n=e.resolveArguments(t,a),i=n[0],r=n[1]?"appear":"enter";e.removeClasses(i,r),e.addClass(i,r,"done"),e.props.onEntered&&e.props.onEntered(t,a)},e.onExit=function(t){var a=e.resolveArguments(t)[0];e.removeClasses(a,"appear"),e.removeClasses(a,"enter"),e.addClass(a,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var a=e.resolveArguments(t)[0];e.addClass(a,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var a=e.resolveArguments(t)[0];e.removeClasses(a,"exit"),e.addClass(a,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,a){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,a]},e.getClassNames=function(t){var a=e.props.classNames,n="string"==typeof a,i=n?(n&&a?a+"-":"")+t:a[t];return{baseClassName:i,activeClassName:n?i+"-active":a[t+"Active"],doneClassName:n?i+"-done":a[t+"Done"]}},e}Ft(e,t);var n=e.prototype;return n.addClass=function(t,e,a){var n=this.getClassNames(e)[a+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===a&&i&&(n+=" "+i),"active"===a&&t&&Wt(t),n&&(this.appliedClasses[e][a]=n,function(t,e){t&&e&&e.split(" ").forEach((function(e){return n=e,void((a=t).classList?a.classList.add(n):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(a,n)||("string"==typeof a.className?a.className=a.className+" "+n:a.setAttribute("class",(a.className&&a.className.baseVal||"")+" "+n)));var a,n}))}(t,n))},n.removeClasses=function(t,e){var a=this.appliedClasses[e],n=a.base,i=a.active,r=a.done;this.appliedClasses[e]={},n&&Qt(t,n),i&&Qt(t,i),r&&Qt(t,r)},n.render=function(){var t=this.props,e=(t.classNames,At(t,["classNames"]));return a().createElement(Xt,Lt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(a().Component);Zt.defaultProps={classNames:""},Zt.propTypes={};const te=Zt,ee=({title:t=(0,n.__)("Save","gtm-kit"),className:a="gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey"})=>{const{useUpdateSettings:o,useIsPending:l,useCanSave:s}=(0,i.useContext)(g);return(0,e.createElement)(r.Button,{className:a,onClick:()=>o(),variant:"primary",disabled:l||!s},s?(0,n.__)(t,"gtm-kit"):(0,n.__)("Saved","gtm-kit"),l?(0,e.createElement)(r.Spinner,null):"")},ae=()=>{const{useCanSave:t}=(0,i.useContext)(g);return(0,e.createElement)(te,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0},(0,e.createElement)("footer",{className:"gtmkit-fixed gtmkit-bottom-0 gtmkit-w-full gtmkit-z-10 gtmkit-bg-color-grey gtmkit-text-white gtmkit-p-8"},(0,e.createElement)(ee,null)))},ne=({subject:t})=>{const a=!0===t||"on"===t,i=!0===a?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,e.createElement)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase "+i},a?(0,n.__)("Active","gtm-kit"):(0,n.__)("Inactive","gtm-kit"))},ie=(0,i.forwardRef)((({children:t,className:a="",...n},i)=>(0,e.createElement)("div",{...n,className:"gtmkit-flex gtmkit-flex-col gtmkit-min-h-[128px] gtmkit-bg-white gtmkit-border gtmkit-border-color-border gtmkit-mb-6 gtmkit-py-4 gtmkit-px-5 gtmkit-rounded gtmkit-group gtmkit-w-full "+a,ref:i},t)));ie.Header=({as:t="h3",title:a="",children:n,className:i="",...r})=>(0,e.createElement)("div",{...r,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+i},(0,e.createElement)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},a),n),ie.Content=({as:t="div",children:a,className:n="gtmkit-flex-auto",...i})=>(0,e.createElement)(t,{...i,className:n},a),ie.Button=({url:t,destination:a,newTab:n=!1,text:i,group:o="",...l})=>{const s=nt();return(0,e.createElement)("div",{...l,className:"gtmkit-mt-4 gtmkit-mb-0.5"},(0,e.createElement)(r.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full sm:gtmkit-w-auto gtmkit-min-w-[225px]",onClick:()=>{a&&t&&!1===n?window.gtmkitSettings.current_poage===o?s(a,{replace:!0}):window.location.href=t+"#"+a:t?n?window.open(t):window.location.href=t:s(a,{replace:!0})}},(0,e.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},i)))};const re=ie,oe=({title:t,data:a,className:r=""})=>{const{useSettings:o}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},t),(0,e.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px] "+r},a.map(((t,a)=>!1===t.featured?null:(0,e.createElement)(re,{key:a},(0,e.createElement)(re.Header,{title:t.title},t.pill?(0,e.createElement)(ne,{subject:o[t.group][t.option]}):null),(0,e.createElement)(re.Content,null,t.text.map(((t,a)=>(0,e.createElement)("p",{key:a},t)))),(0,e.createElement)(re.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,n.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group}))))))},le=[{title:"Woocommerce",pill:!0,group:"integrations",option:"woocommerce_integration",text:[(0,n.__)("The #1 open source eCommerce platform built for WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/woocommerce",text:(0,n.__)("Setup integration","gtm-kit")}},{title:"Contact Form 7",pill:!0,group:"integrations",option:"cf7_integration",text:[(0,n.__)("Just another contact form plugin for WordPress. Simple but flexible","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/cf7",text:(0,n.__)("Setup integration","gtm-kit")}},{title:"Easy Digital Downloads",pill:!0,group:"integrations",option:"edd_integration",text:[(0,n.__)("Easy way to sell Digital Products With WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/edd",text:(0,n.__)("Setup integration","gtm-kit")}}],se=()=>{const{useSettings:t}=(0,i.useContext)(g),[a,r]=(0,i.useState)(window.gtmkitSettings.tutorials),o=Boolean(t.general.sgtm_domain&&t.general.sgtm_domain.trim());return(0,i.useEffect)((()=>{r((t=>[...t,{title:(0,n.__)("See all tutorials…","gtm-kit"),text:[(0,n.__)("See all our tutorials and get the most out of GTM Kit","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=documentation&utm_content=dashboard-tutorials",text:(0,n.__)("Read articles","gtm-kit")},featured:!0}]))}),[]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("General","gtm-kit")),(0,e.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 lg:gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px]"},(0,e.createElement)(re,null,(0,e.createElement)(re.Header,{title:"Google Tag Manager Container"},(0,e.createElement)(ne,{subject:t.general.gtm_id&&t.general.container_active})),(0,e.createElement)(re.Content,null,t.general.gtm_id&&t.general.container_active?(0,e.createElement)("p",null,(0,n.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id):(0,e.createElement)("p",null,(0,n.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,e.createElement)(re.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})),(0,e.createElement)(re,null,(0,e.createElement)(re.Header,{title:(0,n.__)("Server-side GTM","gtm-kit")},(0,e.createElement)(ne,{subject:o})),(0,e.createElement)(re.Content,null,(0,e.createElement)("p",null,(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit"))),(0,e.createElement)(re.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})),(0,e.createElement)(re,null,(0,e.createElement)(re.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")},(0,e.createElement)(ne,{subject:t.general.analytics_active})),(0,e.createElement)(re.Content,null,(0,e.createElement)("p",null,(0,n.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,e.createElement)(re.Button,{destination:"/misc",text:(0,n.__)("Share anonymous data","gtm-kit")}))),(0,e.createElement)(oe,{title:(0,n.__)("Tutorials","gtm-kit"),data:a}),(0,e.createElement)(oe,{title:(0,n.__)("Integrations","gtm-kit"),data:le}))},me=({title:t,placeholder:a,help:n,className:o="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:l="general",optionName:s,isDisabled:m})=>{const{useSettings:c,useUpdateStateSettings:u}=(0,i.useContext)(g);return(0,e.createElement)(r.TextControl,{label:t,placeholder:a,help:n,className:o,value:c[l][s],onChange:t=>u(l,s,t),disabled:m})},ce=({title:t,label:a,optionGroup:n="general",optionName:o,disabled:l=!1})=>{const{useSettings:s,useUpdateStateSettings:m}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,e.createElement)(r.BaseControl,{label:t},(0,e.createElement)(r.ToggleControl,{label:a,checked:!l&&s[n][o],onChange:()=>{m(n,o,!(s&&s[n][o]))},disabled:l}))))},ge=({title:t,options:a,help:n,className:o="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:s,disabled:m})=>{const{useSettings:c,useUpdateStateSettings:u}=(0,i.useContext)(g);return(0,e.createElement)(r.RadioControl,{label:t,options:a,help:n,className:o,selected:parseInt(c[l][s]),onChange:t=>u(l,s,t),disabled:m})},ue=(0,i.forwardRef)((({children:t,className:a="",disabled:n=!1,...i},r)=>(0,e.createElement)("div",{...i,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-w-3/4 gtmkit-border-color-grey "+a+(n?"gtmkit-opacity-60":""),ref:r},t)));ue.Header=({as:t="h3",title:a="",children:n,className:i="",...r})=>(0,e.createElement)(t,{...r,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey "+i},a,n),ue.Content=({as:t="div",children:a,className:n="",...i})=>(0,e.createElement)(t,{...i,className:"gtmkit-px-8 gtmkit-py-6 "+n},a);const de=ue,pe=()=>{const{useSettings:t}=(0,i.useContext)(g),a=!(t.general.sgtm_domain&&t.general.sgtm_domain.trim()&&t.general.sgtm_container_identifier&&t.general.sgtm_container_identifier.trim());return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Google Tag Manager container","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("General Container Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")),(0,e.createElement)(me,{title:(0,n.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,n.__)("Enter GTM Container ID","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("Inject Container Code","gtm-kit"),label:(0,n.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active"}),(0,e.createElement)(ce,{title:(0,n.__)("Just the container","gtm-kit"),label:(0,n.__)("Setting this to On will reduce the functionality to just the GTM container code. No additional data will be pushed to the datalayer regardless of any other settings.","gtm-kit"),optionName:"just_the_container"}),(0,e.createElement)(me,{title:(0,n.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,n.__)("The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do so.","gtm-kit")}))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(me,{title:(0,n.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,n.__)("Enter domain …","gtm-kit"),help:(0,n.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit")}),(0,e.createElement)(me,{title:(0,n.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,n.__)("Enter loader name …","gtm-kit"),help:(0,n.__)("Only use if you are using a custom loader.","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,n.__)("Prolong cookie lifetime in Safari and other browsers with ITP. This only works if you use Stape sGTM hosting and have set up the Cookie Keeper power up.","gtm-kit"),optionName:"sgtm_cookie_keeper",disabled:a})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Google Tag Manager Server-side Tagging","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/guides/google-tag-manager-server-side-tagging/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=sgtm&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))),(0,e.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Hosting server-side GTM containers","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Stape.io is a solution for hosting server-side Google Tag Manager containers, offering a simplified approach that demands less technical expertise than solutions like Google Cloud Platform.","gtm-kit")," ",(0,n.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,e.createElement)("a",{href:"https://stape.io/?pt=tlam&rs=plugin",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more about Stape.io","gtm-kit"))))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Page Speed Optimization","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("load_js event","gtm-kit"),label:(0,n.__)("Setting this to On will push the event 'load_js' on page load.","gtm-kit"),optionName:"load_js_event"})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Delay JavaScript execution","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Page optimization plugins can delay the 'load_js' event and this can be used to delay the triggering og tags in Google Tag Manager.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/guides/delay-javascript-execution-in-gtm/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=delay-js&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Google Tag Manager Environment","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(me,{title:(0,n.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,n.__)("Enter gtm_auth code","gtm-kit"),help:(0,n.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit")}),(0,e.createElement)(me,{title:(0,n.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,n.__)("Enter gtm_preview code","gtm-kit"),help:(0,n.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit")})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Environments","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,n.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,n.__)("If left empty the default environment will be used.","gtm-kit")),(0,e.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Override settings in wp-config.php","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("You can override the values by using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=container-settings&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Container Code Implementation","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Container code implementation:","gtm-kit"),options:[{label:(0,n.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,n.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,n.__)("Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle.","gtm-kit"),optionName:"script_implementation"}),(0,e.createElement)(ge,{title:(0,n.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,n.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,n.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,n.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,n.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,n.__)('The preferred method to implement the <noscript> container code is just after the opening <body> tag. This requires that your theme uses the "body_open" hook. If your theme does not support this the script can be injected in the footer or you can use the function below.',"gtm-kit"),optionName:"noscript_implementation"}),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,e.createElement)("code",null,"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>")))))},he=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Post Data","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Post Data Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")),(0,e.createElement)(ce,{title:(0,n.__)("Post type","gtm-kit"),id:"post-type",label:(0,n.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type"}),(0,e.createElement)(ce,{title:(0,n.__)("Page type","gtm-kit"),id:"page-type",label:(0,n.__)('Include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. "campaign".',"gtm-kit"),optionName:"datalayer_page_type"}),(0,e.createElement)(ce,{title:(0,n.__)("Categories","gtm-kit"),id:"categories",label:(0,n.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories"}),(0,e.createElement)(ce,{title:(0,n.__)("Tags","gtm-kit"),id:"tags",label:(0,n.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags"}),(0,e.createElement)(ce,{title:(0,n.__)("Post title","gtm-kit"),id:"post-title",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title"}),(0,e.createElement)(ce,{title:(0,n.__)("Post ID","gtm-kit"),id:"post-id",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id"}),(0,e.createElement)(ce,{title:(0,n.__)("Post data","gtm-kit"),id:"post-date",label:(0,n.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date"}),(0,e.createElement)(ce,{title:(0,n.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,n.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name"}),(0,e.createElement)(ce,{title:(0,n.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,n.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id"})))),_e=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("User Data","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,e.createElement)(de.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,n.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,e.createElement)("p",null,(0,n.__)("Full page caching will cache user data making it the same for all users. There are ways around this, but it depends on the chosen cache solution and is only for advanced users.","gtm-kit")))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("User Data Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,n.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in"}),(0,e.createElement)(ce,{title:(0,n.__)("User ID","gtm-kit"),id:"user-id",label:(0,n.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id"}),(0,e.createElement)(ce,{title:(0,n.__)("User role","gtm-kit"),id:"user-role",label:(0,n.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role"})))),ke=()=>{const{useSettings:t}=(0,i.useContext)(g),a=!t.general.gcm_default_settings;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Google Consent Mode","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Google Consent Mode Activation","gtm-kit")},(0,e.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,n.__)("Warning!","gtm-kit"))),(0,e.createElement)(de.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,n.__)("Most Consent Management Platforms will handle the Google Consent Mode settings for you and applying the default settings in both GTM Kit and you CMP will lead to unexpected behaviour or errors.","gtm-kit")),(0,e.createElement)("p",null,(0,n.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")),(0,e.createElement)("p",{className:"!gtmkit-mt-4"},(0,n.__)("GTM Kit will only set the default Consent Mode settings and you must update the settings yourself when the user has given consent.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,e.createElement)("a",{href:"https://developers.google.com/tag-platform/security/guides/consent#implementation_example",target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline gtmkit-font-semibold"},(0,n.__)("See an example of how consent is updated","gtm-kit"))),(0,e.createElement)(ce,{title:(0,n.__)("Activate GCM settings","gtm-kit"),label:(0,n.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings"}))),(0,e.createElement)(de,{disabled:a},(0,e.createElement)(de.Header,{title:(0,n.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Ad Personalization","gtm-kit"),label:(0,n.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Ad Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Ad User Data","gtm-kit"),label:(0,n.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Analytics Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Functionality Storage","gtm-kit"),label:(0,n.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Personalization Storage","gtm-kit"),label:(0,n.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Security Storage","gtm-kit"),label:(0,n.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:a}))))},fe=({label:t,value:a,tag:n})=>(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,e.createElement)("strong",null,t)),(0,e.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===n?(0,e.createElement)("code",{className:"gtmkit-text-sm"},a):(0,e.createElement)("em",null,a))),Ee=()=>{const{useSiteData:t}=(0,i.useContext)(g),a=Object.values(t.shared_data);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,n.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,n.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,e.createElement)("tbody",{className:"gtmkit-py-6"},a.map((function(t,a){return(0,e.createElement)(fe,{key:a,label:t.label,value:t.value,tag:t.tag})})))))},be=()=>{const{}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Misc","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(Ee,null),(0,e.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,n.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,e.createElement)(ce,{title:(0,n.__)("Share anonymous data","gtm-kit"),label:(0,n.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active"}))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Logging and debugging","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Console log","gtm-kit"),label:(0,n.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log"}),(0,e.createElement)(ce,{title:(0,n.__)("Debug log","gtm-kit"),label:(0,n.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log"}))))},ve=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(oe,{title:(0,n.__)("Integrations","gtm-kit"),data:le})),ye=({pluginName:t})=>(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.sprintf)(
    22// translators: %s is the name of the plugin.
    3 (0,n.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,n.sprintf)(
     3(0,n.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,n.sprintf)(
    44// translators: %s is the name of the plugin.
    5 (0,n.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)),(0,e.createElement)(o.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-sm disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.pluginInstallUrl+t}},(0,n.sprintf)(
     5(0,n.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)),(0,e.createElement)(r.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-sm disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.pluginInstallUrl+t}},(0,n.sprintf)(
    66// translators: %s is the name of the plugin.
    7 (0,n.__)("Install %s","gtm-kit"),t)))),we=({title:t,options:a,className:r="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:s,disabled:m=!1,help:c="",notSet:u=!1})=>{const{useSettings:d,useUpdateStateSettings:p}=(0,i.useContext)(g),h=u?[{label:(0,n.__)("(not set)","gtm-kit"),value:""},...a]:a;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o.SelectControl,{label:t,value:d&&d[l][s],options:h,className:r,onChange:t=>p(l,s,t),disabled:m,help:c}))},Se=({pluginName:t,optionName:a,pluginInactive:i})=>(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,n.sprintf)(
     7(0,n.__)("Install %s","gtm-kit"),t)))),xe=({title:t,options:a,className:o="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:s,disabled:m=!1,help:c="",notSet:u=!1})=>{const{useSettings:d,useUpdateStateSettings:p}=(0,i.useContext)(g),h=u?[{label:(0,n.__)("(not set)","gtm-kit"),value:""},...a]:a;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r.SelectControl,{label:t,value:d&&d[l][s],options:h,className:o,onChange:t=>p(l,s,t),disabled:m,help:c}))},Se=({pluginName:t,optionName:a,pluginInactive:i})=>(0,e.createElement)(de,{disabled:i},(0,e.createElement)(de.Header,{title:(0,n.sprintf)(
    88// translators: %s is the name of the plugin.
    9 (0,n.__)("%s Integration","gtm-kit"),t)}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.sprintf)(
     9(0,n.__)("%s Integration","gtm-kit"),t)}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.sprintf)(
    1010// translators: %s is the name of the plugin.
    1111(0,n.__)("Track %s","gtm-kit"),t),label:(0,n.sprintf)(
    1212// translators: %s is the name of the plugin.
    13 (0,n.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:a,disabled:i}))),Ne=[{label:(0,n.__)("Retail","gtm-kit"),value:"retail"},{label:(0,n.__)("Education","gtm-kit"),value:"education"},{label:(0,n.__)("Flights","gtm-kit"),value:"flights"},{label:(0,n.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,n.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,n.__)("Local deals","gtm-kit"),value:"local"},{label:(0,n.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,n.__)("Travel","gtm-kit"),value:"travel"},{label:(0,n.__)("Custom","gtm-kit"),value:"custom"}],Ce=()=>{const{useSettings:t,isWooAddonActive:a}=(0,i.useContext)(g),o="WooCommerce",r=!window.gtmkitSettings.plugins.woocommerce,l=r||!t.integrations.woocommerce_integration,s=l||!a,m=s||!t.general.sgtm_domain,c=m||!t.premium.woocommerce_webhooks;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("WooCommerce","gtm-kit")),r?(0,e.createElement)(xe,{pluginName:o}):null,(0,e.createElement)(Se,{pluginName:o,optionName:"woocommerce_integration",pluginInactive:r}),(0,e.createElement)(pe,{disabled:l},(0,e.createElement)(pe.Header,{title:(0,n.__)("Basic settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(we,{title:(0,n.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,n.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:l}),(0,e.createElement)(ge,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_use_sku",disabled:l}),(0,e.createElement)(ge,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:l}),(0,e.createElement)(ge,{title:(0,n.__)("Exclude shipping from revenue","gtm-kit"),label:(0,n.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:l}),(0,e.createElement)(ge,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_customer_data",disabled:l}))),a?(0,e.createElement)(pe,{disabled:s},(0,e.createElement)(pe.Header,{title:(0,n.__)("Webhooks for server-side tracking","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit")),(0,e.createElement)(ge,{title:(0,n.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,n.__)("This option will allow webhooks to be sent to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:m}),(0,e.createElement)(ge,{title:(0,n.__)("Purchase webhook","gtm-kit"),label:(0,n.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_purchase_webhook",disabled:c}),(0,e.createElement)(ge,{title:(0,n.__)("Refund webhook","gtm-kit"),label:(0,n.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_refund_webhook",disabled:c}))):null,(0,e.createElement)(pe,{disabled:l},(0,e.createElement)(pe.Header,{title:(0,n.__)("Event customization","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:"view_item_list (with product filter)",options:[{label:(0,n.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,n.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,n.__)("Do you what to push the view_item_list event if the list is updated using a filter or just once per page view.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_view_item_list_limit",disabled:l}),(0,e.createElement)(ue,{title:"view_item",options:[{label:(0,n.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,n.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,n.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,n.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:l}),(0,e.createElement)(ue,{title:"add_shipping_info ",options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:l}),(0,e.createElement)(ue,{title:"add_payment_info ",options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:l}))),(0,e.createElement)(pe,{disabled:l},(0,e.createElement)(pe.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(we,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Ne,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,n.__)("Enter prefix …","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:l}))),a?(0,e.createElement)(pe,{disabled:s},(0,e.createElement)(pe.Header,{title:(0,n.__)("Custom CSS Selectors","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")),(0,e.createElement)(ce,{title:(0,n.__)("Single Product (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_single_product_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector …","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector …","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("Product List (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector …","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit")}))):null,(0,e.createElement)(pe,{disabled:l},(0,e.createElement)(pe.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_dequeue_script",disabled:l}),(0,e.createElement)(ge,{title:(0,n.__)("Include permalink structure","gtm-kit"),label:(0,n.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_permalink_structure",disabled:l}),(0,e.createElement)(ge,{title:(0,n.__)("Include path of pages","gtm-kit"),label:(0,n.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_pages",disabled:l}))))},Te=()=>{const{useSettings:t}=(0,i.useContext)(g),a="Contact Form 7",o=!window.gtmkitSettings.plugins.cf7,r=o||!t.integrations.cf7_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Contact Form 7","gtm-kit")),o?(0,e.createElement)(xe,{pluginName:a}):null,(0,e.createElement)(Se,{pluginName:a,optionName:"cf7_integration",pluginInactive:o}),(0,e.createElement)(pe,{disabled:r},(0,e.createElement)(pe.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:(0,n.__)("Load JavaScript","gtm-kit"),options:[{label:(0,n.__)("Only on pages where where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,n.__)("On all pages","gtm-kit"),value:2}],help:(0,n.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:r}))))},Ge=()=>{const t="Easy Digital Downloads",a=!window.gtmkitSettings.plugins.edd,{useSettings:o}=(0,i.useContext)(g),r=a||!o.integrations.edd_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Easy Digital Downloads","gtm-kit")),a?(0,e.createElement)(xe,{pluginName:t}):null,(0,e.createElement)(Se,{pluginName:t,optionName:"edd_integration",pluginInactive:a}),(0,e.createElement)(pe,{disabled:r},(0,e.createElement)(pe.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"edd_use_sku",disabled:r}),(0,e.createElement)(ge,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:r}),(0,e.createElement)(ge,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"edd_include_customer_data",disabled:r}))),(0,e.createElement)(pe,{disabled:r},(0,e.createElement)(pe.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(we,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Ne,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:r}),(0,e.createElement)(ce,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,n.__)("Enter prefix …","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:r}))),(0,e.createElement)(pe,{disabled:a},(0,e.createElement)(pe.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"edd_dequeue_script",disabled:r}))))},De=[{title:"Google Analytics 4",pill:!1,group:"integrations",option:"woocommerce_integration",text:[(0,n.__)("Choose between a basic configuration and an advanced eCommerce configuration","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.templatesUrl,destination:"/ga4-templates",text:(0,n.__)("Get template","gtm-kit")}}],Pe=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Getting Started","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("GTM Kit is sending data to your Google Tag Manger container but you still need to configure Tags, Triggers and Variables in GTM to use the data.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")))),(0,e.createElement)(re,{title:(0,n.__)("Templates","gtm-kit"),data:De})),Me=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Google Analytics 4","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Before you start","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",null,(0,n.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:"https://gtmkit.com/guides/how-to-import-a-google-tag-manager-container/",target:"_blank",rel:"noreferrer"},(0,n.__)("Read the guide","gtm-kit"))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Basic configuration","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("If you don't have eCommerce functionality then this is the right choice for you.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("This template includes the Google Tag, which will send basic events to Google Analytics 4.","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4"},(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("GTM container import files:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,n.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))))),(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("Necessary modifications:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm"},(0,e.createElement)("li",null,(0,n.__)('Edit the variable with the name "constant - GA4 Measurement ID" and enter your Google Analytics 4 Measurement ID.',"gtm-kit"))))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("eCommerce configuration","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("If you have a webshop then this is the right choice for you.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("This template includes the Google Tag and a Google Analytics GA4 event tag, that will catch all eCommerce events and send them to Google Analytics 4.","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4"},(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("GTM container import files:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,n.__)("Google Analytics 4 - eCommerce","gtm-kit"))))),(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("Necessary modifications:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm"},(0,e.createElement)("li",null,(0,n.__)('Edit the variable with the name "constant - GA4 Measurement ID" and enter your Google Analytics 4 Measurement ID.',"gtm-kit")))))))),Ie=()=>{const t=nt();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Help","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Need help?","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("We are here to help if you have any questions.","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{t("/support",{replace:!0})}},(0,n.__)("See support options","gtm-kit"))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Tutorials","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("ul",null,se.map(((t,a)=>(0,e.createElement)("li",{key:a,className:"gtmkit-mb-4"},(0,e.createElement)("a",{href:t.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline"},t.title),t.text.map(((t,a)=>(0,e.createElement)("div",{key:a,className:"gtmkit-text-sm"},t))))))))))},Oe=()=>{const{useIsSending:t,useSiteData:a,useUpdateSupportTicket:r,useSupportTicket:l,useSendSystemData:s,useIsSystemDataSent:m,useSystemDataMessage:c}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Get support","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Support options","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,n.__)("WordPress.org Support Forum","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,n.__)("GITHub repository","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,n.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)")))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,e.createElement)(pe.Content,null,m?(0,e.createElement)("p",{className:"gtmkit-mb-2"},c):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"gtmkit-mb-2"},(0,n.__)("If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:","gtm-kit")),(0,e.createElement)(o.TextControl,{label:(0,e.createElement)("span",{className:"gtmkit-text-red-600"},c," "),placeholder:(0,n.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:l,onChange:t=>r(t)}),(0,e.createElement)(o.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{s()},disabled:!l.toUpperCase().startsWith("FS")},(0,e.createElement)("span",null,(0,n.__)("Send system data","gtm-kit")),t?(0,e.createElement)(o.Spinner,null):"")))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,n.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center"},(0,e.createElement)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2"},"(",(0,n.__)("Version:","gtm-kit")," ",a.gtmkit_version,")")),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",null,(0,n.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,e.createElement)("br",null),(0,e.createElement)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer"},(0,n.__)("The changelog","gtm-kit")),(0,e.createElement)("br",null),(0,e.createElement)("a",{className:"gtmkit-text-color-primary  hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,n.__)("The Github repository","gtm-kit"))))))};const Re={integrations:(0,n.__)("Integrations","gtm-kit"),templates:(0,n.__)("Google Tag Manager Templates","gtm-kit"),help:(0,n.__)("Help","gtm-kit")},Ae=()=>{const{useSettings:t}=(0,i.useContext)(g),a=window.gtmkitSettings.currentPage,r=function({page:t}){const e=[{to:"general",title:(0,n.__)("Dashboard","gtm-kit")},{to:"container",title:(0,n.__)("Container","gtm-kit")},{to:"post-data",title:(0,n.__)("Post data","gtm-kit")},{to:"user-data",title:(0,n.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,n.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,n.__)("Misc","gtm-kit")}],a=[{to:"integrations",title:(0,n.__)("Integrations","gtm-kit")},{to:"woocommerce",title:"WooCommerce"},{to:"cf7",title:"Contact Form 7"},{to:"edd",title:"Easy Digital Downloads"}],i=[{to:"templates",title:(0,n.__)("Templates","gtm-kit")},{to:"ga4-templates",title:(0,n.__)("Google Analytics 4","gtm-kit")}],o=[{to:"help",title:(0,n.__)("Help","gtm-kit")},{to:"support",title:(0,n.__)("Support","gtm-kit")}];switch(t){case"general":return e;case"integrations":return a;case"templates":return i;case"help":return o}}({page:a}),l=Re[a]||(0,n.__)("Settings","gtm-kit");return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ot,{title:l}),(0,e.createElement)(At,{NavList:r}),(0,e.createElement)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base"},(0,e.createElement)(kt,null,(0,e.createElement)(ht,{exact:!0,path:"/general",element:(0,e.createElement)(me,null)}),(0,e.createElement)(ht,{exact:!0,path:"/container",element:(0,e.createElement)(he,null)}),(0,e.createElement)(ht,{exact:!0,path:"/post-data",element:(0,e.createElement)(_e,null)}),(0,e.createElement)(ht,{exact:!0,path:"/user-data",element:(0,e.createElement)(ke,null)}),(0,e.createElement)(ht,{exact:!0,path:"/google-consent-mode",element:(0,e.createElement)(fe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/misc",element:(0,e.createElement)(ve,null)}),(0,e.createElement)(ht,{exact:!0,path:"/integrations",element:(0,e.createElement)(ye,null)}),(0,e.createElement)(ht,{exact:!0,path:"/woocommerce",element:(0,e.createElement)(Ce,null)}),(0,e.createElement)(ht,{exact:!0,path:"/cf7",element:(0,e.createElement)(Te,null)}),(0,e.createElement)(ht,{exact:!0,path:"/edd",element:(0,e.createElement)(Ge,null)}),(0,e.createElement)(ht,{exact:!0,path:"/templates",element:(0,e.createElement)(Pe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/ga4-templates",element:(0,e.createElement)(Me,null)}),(0,e.createElement)(ht,{exact:!0,path:"/help",element:(0,e.createElement)(Ie,null)}),(0,e.createElement)(ht,{exact:!0,path:"/support",element:(0,e.createElement)(Oe,null)}),(0,e.createElement)(ht,{path:"/",element:(0,e.createElement)(pt,{replace:!0,to:"/"+a})}))),(0,e.createElement)(ae,null)):(0,e.createElement)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center"},(0,e.createElement)(o.Spinner,null))},Ue=()=>(0,e.createElement)(Ct,{basename:"/"},(0,e.createElement)(u,null,(0,e.createElement)(Ae,null)));document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,i.render)((0,e.createElement)(Ue,null),t)}))})();
     13(0,n.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:a,disabled:i}))),we=[{label:(0,n.__)("Retail","gtm-kit"),value:"retail"},{label:(0,n.__)("Education","gtm-kit"),value:"education"},{label:(0,n.__)("Flights","gtm-kit"),value:"flights"},{label:(0,n.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,n.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,n.__)("Local deals","gtm-kit"),value:"local"},{label:(0,n.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,n.__)("Travel","gtm-kit"),value:"travel"},{label:(0,n.__)("Custom","gtm-kit"),value:"custom"}],Ne=()=>{const{useSettings:t,isWooAddonActive:a}=(0,i.useContext)(g),r="WooCommerce",o=!window.gtmkitSettings.plugins.woocommerce,l=o||!t.integrations.woocommerce_integration,s=l||!a,m=s||!t.general.sgtm_domain,c=m||!t.premium.woocommerce_webhooks;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("WooCommerce","gtm-kit")),o?(0,e.createElement)(ye,{pluginName:r}):null,(0,e.createElement)(Se,{pluginName:r,optionName:"woocommerce_integration",pluginInactive:o}),(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Basic settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(xe,{title:(0,n.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,n.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_use_sku",disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Exclude shipping from revenue","gtm-kit"),label:(0,n.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:l}))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("User Data","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_customer_data",disabled:l})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("User-Provided Data","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://support.google.com/google-ads/answer/13262500?sjid=9465166023214753583-EU#Code_snippet",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),a?(0,e.createElement)(de,{disabled:s},(0,e.createElement)(de.Header,{title:(0,n.__)("Webhooks for server-side tracking","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit")),(0,e.createElement)(ce,{title:(0,n.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,n.__)("This option will allow webhooks to be sent to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:m}),(0,e.createElement)(ce,{title:(0,n.__)("Purchase webhook","gtm-kit"),label:(0,n.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_purchase_webhook",disabled:c}),(0,e.createElement)(ce,{title:(0,n.__)("Refund webhook","gtm-kit"),label:(0,n.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_refund_webhook",disabled:c}))):null,(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Event customization","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ge,{title:"view_item_list (with product filter)",options:[{label:(0,n.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,n.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,n.__)("Do you what to push the view_item_list event if the list is updated using a filter or just once per page view.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_view_item_list_limit",disabled:l}),(0,e.createElement)(ge,{title:"view_item",options:[{label:(0,n.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,n.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,n.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,n.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:l}),(0,e.createElement)(ge,{title:"add_shipping_info ",options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:l}),(0,e.createElement)(ge,{title:"add_payment_info ",options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:l}))),(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(xe,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:we,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:l}),(0,e.createElement)(me,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,n.__)("Enter prefix …","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:l}))),a?(0,e.createElement)(de,{disabled:s},(0,e.createElement)(de.Header,{title:(0,n.__)("Custom CSS Selectors","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")),(0,e.createElement)(me,{title:(0,n.__)("Single Product (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_single_product_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector …","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit")}),(0,e.createElement)(me,{title:(0,n.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector …","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit")}),(0,e.createElement)(me,{title:(0,n.__)("Product List (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector …","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit")}))):null,(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_dequeue_script",disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Include permalink structure","gtm-kit"),label:(0,n.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_permalink_structure",disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Include path of pages","gtm-kit"),label:(0,n.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_pages",disabled:l}))))},Ce=()=>{const{useSettings:t}=(0,i.useContext)(g),a="Contact Form 7",r=!window.gtmkitSettings.plugins.cf7,o=r||!t.integrations.cf7_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Contact Form 7","gtm-kit")),r?(0,e.createElement)(ye,{pluginName:a}):null,(0,e.createElement)(Se,{pluginName:a,optionName:"cf7_integration",pluginInactive:r}),(0,e.createElement)(de,{disabled:o},(0,e.createElement)(de.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Load JavaScript","gtm-kit"),options:[{label:(0,n.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,n.__)("On all pages","gtm-kit"),value:2}],help:(0,n.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:o}))))},Te=()=>{const t="Easy Digital Downloads",a=!window.gtmkitSettings.plugins.edd,{useSettings:r}=(0,i.useContext)(g),o=a||!r.integrations.edd_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Easy Digital Downloads","gtm-kit")),a?(0,e.createElement)(ye,{pluginName:t}):null,(0,e.createElement)(Se,{pluginName:t,optionName:"edd_integration",pluginInactive:a}),(0,e.createElement)(de,{disabled:o},(0,e.createElement)(de.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"edd_use_sku",disabled:o}),(0,e.createElement)(ce,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:o}),(0,e.createElement)(ce,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"edd_include_customer_data",disabled:o}))),(0,e.createElement)(de,{disabled:o},(0,e.createElement)(de.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(xe,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:we,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,e.createElement)(me,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,n.__)("Enter prefix …","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:o}))),(0,e.createElement)(de,{disabled:a},(0,e.createElement)(de.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"edd_dequeue_script",disabled:o}))))},De=window.gtmkitSettings.templates||{},Pe=Object.keys(De).map((function(t){const e=De[t][0];return{title:e.title,to:e.path,pill:!1,text:[e.description],link:{internal:!0,url:window.gtmkitSettings.templatesUrl,destination:"/"+e.path,text:(0,n.__)("Get template","gtm-kit")}}})),Ge=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Getting Started","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("GTM Kit is sending data to your Google Tag Manger container but you still need to configure Tags, Triggers and Variables in GTM to use the data.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")),(0,e.createElement)("p",null,(0,n.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:"https://gtmkit.com/guides/how-to-import-a-google-tag-manager-container/",target:"_blank",rel:"noreferrer"},(0,n.__)("Read the guide","gtm-kit"))))),(0,e.createElement)(oe,{title:(0,n.__)("Templates","gtm-kit"),data:Pe})),Ie=({title:t,description:a,link:i,templates:r})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:t}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},a),i&&i.url&&i.link_text?(0,e.createElement)("div",null,(0,e.createElement)("a",{href:i.url,target:"_blank",className:"gtmkit-text-color-primary gtmkit-text-base dgtmkit-font-semibold hover:gtmkit-underline",rel:"noreferrer"},i.link_text)):null,r&&r.length>0?(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4"},(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("GTM container import files:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},r.map((function(t){return(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:t.link,target:"_blank",rel:"noreferrer"},t.title))})))),(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("Necessary modifications:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm"},r.map((function(t){return(0,e.createElement)("li",null,t.help_text)}))))):null))),Oe=({sectionData:t})=>{const a=t.collections;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},t.title),Object.keys(a).map((function(t){return(0,e.createElement)(Ie,{title:a[t].title,description:a[t].description,link:a[t].link,templates:a[t].templates})})))},Me=()=>{const t=nt(),a=window.gtmkitSettings.tutorials;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Help","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Need help?","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("We are here to help if you have any questions.","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{t("/support",{replace:!0})}},(0,n.__)("See support options","gtm-kit"))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Tutorials","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("ul",null,a.map(((t,a)=>(0,e.createElement)("li",{key:a,className:"gtmkit-mb-4"},(0,e.createElement)("a",{href:t.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline"},t.title),t.text.map(((t,a)=>(0,e.createElement)("div",{key:a,className:"gtmkit-text-sm"},t))))))))))},Re=()=>{const{useIsSending:t,useSiteData:a,useUpdateSupportTicket:o,useSupportTicket:l,useSendSystemData:s,useIsSystemDataSent:m,useSystemDataMessage:c}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Get support","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Support options","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,n.__)("WordPress.org Support Forum","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,n.__)("GITHub repository","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,n.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)")))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,e.createElement)(de.Content,null,m?(0,e.createElement)("p",{className:"gtmkit-mb-2"},c):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"gtmkit-mb-2"},(0,n.__)("If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:","gtm-kit")),(0,e.createElement)(r.TextControl,{label:(0,e.createElement)("span",{className:"gtmkit-text-red-600"},c," "),placeholder:(0,n.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:l,onChange:t=>o(t)}),(0,e.createElement)(r.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{s()},disabled:!l.toUpperCase().startsWith("FS")},(0,e.createElement)("span",null,(0,n.__)("Send system data","gtm-kit")),t?(0,e.createElement)(r.Spinner,null):"")))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center"},(0,e.createElement)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2"},"(",(0,n.__)("Version:","gtm-kit")," ",a.gtmkit_version,")")),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",null,(0,n.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,e.createElement)("br",null),(0,e.createElement)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer"},(0,n.__)("The changelog","gtm-kit")),(0,e.createElement)("br",null),(0,e.createElement)("a",{className:"gtmkit-text-color-primary  hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,n.__)("The Github repository","gtm-kit"))))))};const Ue={integrations:(0,n.__)("Integrations","gtm-kit"),templates:(0,n.__)("Google Tag Manager Templates","gtm-kit"),help:(0,n.__)("Help","gtm-kit")},Le=()=>{const{useSettings:t}=(0,i.useContext)(g),a=window.gtmkitSettings.currentPage,o=function({page:t}){switch(t){case"general":return[{to:"general",title:(0,n.__)("Dashboard","gtm-kit")},{to:"container",title:(0,n.__)("Container","gtm-kit")},{to:"post-data",title:(0,n.__)("Post data","gtm-kit")},{to:"user-data",title:(0,n.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,n.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,n.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,n.__)("Integrations","gtm-kit")},{to:"woocommerce",title:"WooCommerce"},{to:"cf7",title:"Contact Form 7"},{to:"edd",title:"Easy Digital Downloads"}];case"templates":return[{to:"templates",title:(0,n.__)("Templates","gtm-kit")},...Pe];case"help":return[{to:"help",title:(0,n.__)("Help","gtm-kit")},{to:"support",title:(0,n.__)("Support","gtm-kit")}]}}({page:a}),l=window.gtmkitSettings.templates,s=Ue[a]||(0,n.__)("Settings","gtm-kit");return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Mt,{title:s}),(0,e.createElement)(Ut,{NavList:o}),(0,e.createElement)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base"},(0,e.createElement)(kt,null,(0,e.createElement)(ht,{exact:!0,path:"/general",element:(0,e.createElement)(se,null)}),(0,e.createElement)(ht,{exact:!0,path:"/container",element:(0,e.createElement)(pe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/post-data",element:(0,e.createElement)(he,null)}),(0,e.createElement)(ht,{exact:!0,path:"/user-data",element:(0,e.createElement)(_e,null)}),(0,e.createElement)(ht,{exact:!0,path:"/google-consent-mode",element:(0,e.createElement)(ke,null)}),(0,e.createElement)(ht,{exact:!0,path:"/misc",element:(0,e.createElement)(be,null)}),(0,e.createElement)(ht,{exact:!0,path:"/integrations",element:(0,e.createElement)(ve,null)}),(0,e.createElement)(ht,{exact:!0,path:"/woocommerce",element:(0,e.createElement)(Ne,null)}),(0,e.createElement)(ht,{exact:!0,path:"/cf7",element:(0,e.createElement)(Ce,null)}),(0,e.createElement)(ht,{exact:!0,path:"/edd",element:(0,e.createElement)(Te,null)}),(0,e.createElement)(ht,{exact:!0,path:"/templates",element:(0,e.createElement)(Ge,null)}),l&&Object.keys(l).map((function(t){return(0,e.createElement)(ht,{exact:!0,key:t,path:t,element:(0,e.createElement)(Oe,{sectionData:l[t][0]})})})),(0,e.createElement)(ht,{exact:!0,path:"/help",element:(0,e.createElement)(Me,null)}),(0,e.createElement)(ht,{exact:!0,path:"/support",element:(0,e.createElement)(Re,null)}),(0,e.createElement)(ht,{path:"/",element:(0,e.createElement)(pt,{replace:!0,to:"/"+a})}))),(0,e.createElement)(ae,null)):(0,e.createElement)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center"},(0,e.createElement)(r.Spinner,null))},Ae=()=>(0,e.createElement)(Ct,{basename:"/"},(0,e.createElement)(u,null,(0,e.createElement)(Le,null)));document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,i.render)((0,e.createElement)(Ae,null),t)}))})();
  • gtm-kit/trunk/assets/admin/wizard.asset.php

    r3055017 r3070452  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'e7d58fb1352372f542b9');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '91263adafb49e551176e');
  • gtm-kit/trunk/assets/admin/wizard.js

    r3055017 r3070452  
    1 (()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(e,a)=>{for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React,a=window.wp.element,n=window.wp.components,i=window.lodash,r=window.wp.apiFetch;var l=t.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,a=null,n=!1)=>{let i={};try{i=await l()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:options},s=window.wp.i18n,m=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,s.__)("An error occurred.","gtm-kit"),a.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":a.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.isPending=!1,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,s.__)("An error occurred.","gtm-kit"):(0,s.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage}return a},c=(0,a.createContext)(),g=t=>{const[n,r]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),l=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};r({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},s=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{l()}),[]);const g={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,o("gtmkit/v1/set-options","POST",e));var e;r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:l,useUpdateState:s,useUpdateStateSettings:async(t,e,a)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let l;r[t][e]=a,l=!(0,i.isEqual)(r,n.fetchedSettings),s({stateSettings:r,canSave:l})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let r;const l={};l.general={...a.general,...e.general},"integrations"in e&&(l.integrations={...a.integrations,...e.integrations}),r=!(0,i.isEqual)(l,n.fetchedSettings),s({stateSettings:l,canSave:r})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{r({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,o("gtmkit/v1/send-support-data","POST",e,!0));var e;r({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData,useIsSending:n.isSendingSystemData,useSupportTicket:n.supportTicket,useIsSystemDataSent:n.isSystemDataSent,useSystemDataMessage:n.systemDataMessage,isWooAddonActive:!!window.gtmkitSettings.wa&&window.gtmkitSettings.wa};return(0,e.createElement)(c.Provider,{value:g},t.children)};function u(){return u=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},u.apply(this,arguments)}var d;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(d||(d={}));const p="popstate";function h(t,e){if(!1===t||null==t)throw new Error(e)}function k(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function y(t,e){return{usr:t.state,key:t.key,idx:e}}function f(t,e,a,n){return void 0===a&&(a=null),u({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?S(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function E(t){let{pathname:e="/",search:a="",hash:n=""}=t;return a&&"?"!==a&&(e+="?"===a.charAt(0)?a:"?"+a),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function S(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var x;function M(t,e,a){void 0===a&&(a="/");let n=U(("string"==typeof e?S(e):e).pathname||"/",a);if(null==n)return null;let i=N(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(i);let r=null;for(let t=0;null==r&&t<i.length;++t)r=I(i[t],A(n));return r}function N(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let l={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};l.relativePath.startsWith("/")&&(h(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),l.relativePath=l.relativePath.slice(n.length));let o=G([n,l.relativePath]),s=a.concat(l);t.children&&t.children.length>0&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),N(t.children,e,s,o)),(null!=t.path||t.index)&&e.push({path:o,score:C(o,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of v(t.path))i(t,e,a);else i(t,e)})),e}function v(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return i?[r,""]:[r];let l=v(n.join("/")),o=[];return o.push(...l.map((t=>""===t?r:[r,t].join("/")))),i&&o.push(...l),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(x||(x={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const w=/^:\w+$/,_=3,b=2,T=1,j=10,L=-2,D=t=>"*"===t;function C(t,e){let a=t.split("/"),n=a.length;return a.some(D)&&(n+=L),e&&(n+=b),a.filter((t=>!D(t))).reduce(((t,e)=>t+(w.test(e)?_:""===e?T:j)),n)}function I(t,e){let{routesMeta:a}=t,n={},i="/",r=[];for(let t=0;t<a.length;++t){let l=a[t],o=t===a.length-1,s="/"===i?e:e.slice(i.length)||"/",m=O({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},s);if(!m)return null;Object.assign(n,m.params);let c=l.route;r.push({params:n,pathname:G([i,m.pathname]),pathnameBase:B(G([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=G([i,m.pathnameBase]))}return r}function O(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[a,n]=function(t,e,a){void 0===e&&(e=!1),void 0===a&&(a=!0),k("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,((t,e,a)=>(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let r=i[0],l=r.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=o[a]||"";l=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const s=o[a];return t[n]=i&&!s?void 0:function(t,e){try{return decodeURIComponent(t)}catch(a){return k(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+a+")."),t}}(s||"",n),t}),{}),pathname:r,pathnameBase:l,pattern:t}}function A(t){try{return decodeURI(t)}catch(e){return k(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function U(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function z(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function P(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function R(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=S(t):(i=u({},t),h(!i.pathname||!i.pathname.includes("?"),z("?","pathname","search",i)),h(!i.pathname||!i.pathname.includes("#"),z("#","pathname","hash",i)),h(!i.search||!i.search.includes("#"),z("#","search","hash",i)));let r,l=""===t||""===i.pathname,o=l?"/":i.pathname;if(null==o)r=a;else if(n){let t=0===e.length?[]:e[e.length-1].replace(/^\//,"").split("/");if(o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t.pop();i.pathname=e.join("/")}r="/"+t.join("/")}else{let t=e.length-1;if(o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}r=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?S(t):t,r=a?a.startsWith("/")?a:function(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?a.length>1&&a.pop():"."!==t&&a.push(t)})),a.length>1?a.join("/"):"/"}(a,e):e;return{pathname:r,search:W(n),hash:Y(i)}}(i,r),m=o&&"/"!==o&&o.endsWith("/"),c=(l||"."===o)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const G=t=>t.join("/").replace(/\/\/+/g,"/"),B=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),W=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const F=["post","put","patch","delete"],Q=(new Set(F),["get",...F]);function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},J.apply(this,arguments)}new Set(Q),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const H=e.createContext(null),$=e.createContext(null),Z=e.createContext(null),K=e.createContext(null),V=e.createContext({outlet:null,matches:[],isDataRoute:!1}),X=e.createContext(null);function q(){return null!=e.useContext(K)}function tt(){return q()||h(!1),e.useContext(K).location}function et(t){e.useContext(Z).static||e.useLayoutEffect(t)}function at(){let{isDataRoute:t}=e.useContext(V);return t?function(){let{router:t}=function(t){let a=e.useContext(H);return a||h(!1),a}(st.UseNavigateStable),a=ct(mt.UseNavigateStable),n=e.useRef(!1);return et((()=>{n.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,J({fromRouteId:a},i)))}),[t,a])}():function(){q()||h(!1);let t=e.useContext(H),{basename:a,future:n,navigator:i}=e.useContext(Z),{matches:r}=e.useContext(V),{pathname:l}=tt(),o=JSON.stringify(P(r,n.v7_relativeSplatPath)),s=e.useRef(!1);return et((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void i.go(e);let r=R(e,JSON.parse(o),l,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:G([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,o,l,t])}()}function nt(t,a,n,i){q()||h(!1);let{navigator:r}=e.useContext(Z),{matches:l}=e.useContext(V),o=l[l.length-1],s=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,g=tt();if(a){var u;let t="string"==typeof a?S(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||h(!1),c=t}else c=g;let p=c.pathname||"/",k=M(t,{pathname:"/"===m?p:p.slice(m.length)||"/"}),y=function(t,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var l;if(null==(l=n)||!l.errors)return null;t=n.matches}let o=t,s=null==(r=n)?void 0:r.errors;if(null!=s){let t=o.findIndex((t=>t.route.id&&(null==s?void 0:s[t.route.id])));t>=0||h(!1),o=o.slice(0,Math.min(o.length,t+1))}let m=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<o.length;t++){let e=o[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.loader&&e.route.id&&void 0===n.loaderData[e.route.id]&&(!n.errors||void 0===n.errors[e.route.id])){m=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}return o.reduceRight(((t,i,r)=>{let l,g=!1,u=null,d=null;var p;n&&(l=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||rt,m&&(c<0&&0===r?(gt[p="route-fallback"]||(gt[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(o.slice(0,r+1)),k=()=>{let a;return a=l?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(ot,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(lt,{location:n.location,revalidation:n.revalidation,component:u,error:l,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:G([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:G([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),l,n,i);return a&&y?e.createElement(K.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:d.Pop}},y):y}function it(){let t=function(){var t;let a=e.useContext(X),n=function(t){let a=e.useContext($);return a||h(!1),a}(mt.UseRouteError),i=ct(mt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),a=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:i},n):null,null)}const rt=e.createElement(it,null);class lt extends e.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:void 0!==t.error?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return void 0!==this.state.error?e.createElement(V.Provider,{value:this.props.routeContext},e.createElement(X.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ot(t){let{routeContext:a,match:n,children:i}=t,r=e.useContext(H);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(V.Provider,{value:a},i)}var st=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(st||{}),mt=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(mt||{});function ct(t){let a=function(t){let a=e.useContext(V);return a||h(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||h(!1),n.route.id}const gt={};function ut(t){let{to:a,replace:n,state:i,relative:r}=t;q()||h(!1);let{future:l,static:o}=e.useContext(Z),{matches:s}=e.useContext(V),{pathname:m}=tt(),c=at(),g=R(a,P(s,l.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function dt(t){h(!1)}function pt(t){let{basename:a="/",children:n=null,location:i,navigationType:r=d.Pop,navigator:l,static:o=!1,future:s}=t;q()&&h(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:l,static:o,future:J({v7_relativeSplatPath:!1},s)})),[m,s,l,o]);"string"==typeof i&&(i=S(i));let{pathname:g="/",search:u="",hash:p="",state:k=null,key:y="default"}=i,f=e.useMemo((()=>{let t=U(g,m);return null==t?null:{location:{pathname:t,search:u,hash:p,state:k,key:y},navigationType:r}}),[m,g,u,p,k,y,r]);return null==f?null:e.createElement(Z.Provider,{value:c},e.createElement(K.Provider,{children:n,value:f}))}function ht(t){let{children:e,location:a}=t;return nt(kt(e),a)}function kt(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let r=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,kt(t.props.children,r));t.type!==dt&&h(!1),t.props.index&&t.props.children&&h(!1);let l={id:t.props.id||r.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(l.children=kt(t.props.children,r)),n.push(l)})),n}e.startTransition,new Promise((()=>{})),e.Component;const yt=window.ReactDOM;new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]),new Map;const ft=e.startTransition;function Et(t){let{basename:a,children:n,future:i,window:r}=t,l=e.useRef();null==l.current&&(l.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:r=!1}=n,l=i.history,o=d.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function g(){o=d.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:o,location:S.location,delta:e})}function k(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:E(t);return h(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(u({},l.state,{idx:m}),""));let S={get action(){return o},get location(){return t(i,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(p,g),s=t,()=>{i.removeEventListener(p,g),s=null}},createHref:t=>e(i,t),createURL:k,encodeLocation(t){let e=k(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=d.Push;let n=f(S.location,t,e);a&&a(n,t),m=c()+1;let g=y(n,m),u=S.createHref(n);try{l.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&s&&s({action:o,location:S.location,delta:1})},replace:function(t,e){o=d.Replace;let n=f(S.location,t,e);a&&a(n,t),m=c();let i=y(n,m),g=S.createHref(n);l.replaceState(i,"",g),r&&s&&s({action:o,location:S.location,delta:0})},go:t=>l.go(t)};return S}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=S(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),f("",{pathname:a,search:n,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let a=t.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let e=t.location.href,a=e.indexOf("#");n=-1===a?e:e.slice(0,a)}return n+"#"+("string"==typeof e?e:E(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:r,v5Compat:!0}));let o=l.current,[s,m]=e.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&ft?ft((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>o.listen(g)),[o,g]),e.createElement(pt,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:o,future:i})}var St,xt;yt.flushSync,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"}(St||(St={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l}=(0,a.useContext)(c),o=at();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 "},(0,e.createElement)(n.TextControl,{label:(0,s.__)("Container ID","gtm-kit"),placeholder:(0,s.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>i("general","gtm_id",t)})),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),o("/essential-settings",{replace:!0})},disabled:l||!t.general.gtm_id.includes("-")},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):""))),(0,e.createElement)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-left gtmkit-text-color-grey gtmkit-text-center"},(0,e.createElement)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4"},"Need help?"),(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,s.__)("Find your GTM container ID on","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer"},"Google Tag Manager")),(0,e.createElement)("p",null,(0,s.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"))),(0,e.createElement)("div",{className:"gtmkit-mt-3 md:gtmkit-mt-10 gtmkit-text-color-grey gtmkit-text-base"},(0,e.createElement)("span",{className:"gtmkit-block"},(0,s.__)("No thanks. I know what I'm doing.","gtm-kit")),(0,e.createElement)("a",{className:"gtmkit-underline gtmkit-ml-4",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit"))))},Nt=()=>{const{useImportSettings:t,useIsPending:i,useInstallData:r}=(0,a.useContext)(c),[l,o]=(0,a.useState)(!0),m=Object.keys(r.import_data)[0],[g,u]=(0,a.useState)(m),d=[];return Object.keys(r.import_data).forEach((t=>{d.push({value:t,label:r.import_data[t].name})})),l?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-8 gtmkit-my-8"},(0,e.createElement)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold"},(0,s.__)("Would you like to import plugin settings?","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey"},(0,s.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,s.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,e.createElement)(n.RadioControl,{help:(0,s.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:g,options:d,onChange:t=>u(t)}),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(g,r.import_data[g]),o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):""),(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("No","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):"")))):(0,e.createElement)(Mt,null)},vt=()=>{const{useInstallData:t}=(0,a.useContext)(c),{firstInstall:n}=t,{importAvailable:i}=t;return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("You've successfully installed GTM Kit!","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit"))),n&&i?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},wt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useInstallData:o}=(0,a.useContext)(c),m=at();return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("Essential Settings","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("There are a lot of settings in GTM Kit and we recommend that you uses our recommended settings but you can also choose to use the default settings and go through the settings at your convenience.","gtm-kit"))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?","gtm-kit"),checked:t&&t.general.datalayer_page_type,onChange:()=>{i("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),o.woocommerce_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{i("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,o.cf7_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{i("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,o.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{i("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),m("/share-anonymous-data",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},_t=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useSiteData:o}=(0,a.useContext)(c),m=at();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Help improve GTM Kit","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey"},(0,s.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm"},(0,e.createElement)("tbody",null,(0,e.createElement)("tr",{className:""},(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Server type:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.web_server))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"PHP version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.php_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.wordpress_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress multisite:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.multisite?(0,s.__)("Yes","gtm-kit"):(0,s.__)("No","gtm-kit")))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current theme:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.current_theme))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current site language:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.locale))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Active plugins:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Plugin names of all active plugins"))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Anonymized GTM Kit settings:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Which GTM Kit settings are active"))))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto "},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{i("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),m("/getting-started",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},bt=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Your are ready to use GTM Kit!","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto gtmkit-mb-8"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Google Tag Manager templates","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4"},(0,s.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit")," ",(0,e.createElement)("a",{target:"_blank",className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",rel:"noreferrer"},(0,s.__)("Read the guide","gtm-kit"))),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - eCommerce","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Tutorials","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Getting started with GTM Kit","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("WooCommerce Integration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=advanced-container-implementation&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Advanced GTM container implementation","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=settings-actions-and-filters-for-developers&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Settings, actions and filters for developers","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.dashboardUrl}},(0,s.__)("Go to the dashboard","gtm-kit")))),Tt=[{step:1,path:"/welcome",element:"Welcome",title:(0,s.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,s.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,s.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,s.__)("Getting Started","gtm-kit")}],jt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let i="gtmkit-h-0.5 gtmkit-w-full";return i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,e.createElement)("div",{className:i})},Lt=({step:t,currentStep:a})=>t<a?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",className:"gtmkit-w-5 gtmkit-h-5 gtmkit-text-white"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})):t===a?(0,e.createElement)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,Dt=({step:t,currentStep:a,totalSteps:n})=>{if(0===t)return;let i="gtmkit-transition-opacity gtmkit-duration-500 gtmkit-absolute gtmkit-inset-0 gtmkit-border-2 gtmkit-flex gtmkit-items-center gtmkit-justify-center gtmkit-rounded-full gtmkit-opacity-100";return i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-white",i+=t>a?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full"},(0,e.createElement)("span",{className:i},(0,e.createElement)(Lt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))},Ct=()=>{const t=Tt.length-1+Tt[0].step;let a=((t,e)=>{const a=Object.keys(e);return t.filter((function(t){for(let n=0;n<a.length;n++)if(!t.hasOwnProperty(a[n])||t[a[n]]!==e[a[n]])return!1;return!0}))})(Tt,{path:tt().pathname});return a=a.length?a[0].step:0,0===a?(0,e.createElement)("div",{className:"gtmkit-my-16"}):(0,e.createElement)("div",{className:"gtmkit-mt-6 gtmkit-inset-0 gtmkit-mx-auto gtmkit-my-6 gtmkit-flex gtmkit-items-center gtmkit-max-w-xl","aria-hidden":"true"},Tt.map((function(n){return(0,e.createElement)(Dt,{key:n.step,step:n.step,currentStep:a,totalSteps:t})})))},It=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-text-center gtmkit-px-3"},(0,e.createElement)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[225px] gtmkit-inline-block"},(0,e.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,s.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,e.createElement)(Ct,null)),Ot=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey"},(0,e.createElement)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max"},(0,e.createElement)("a",{className:"gtmkit-underline",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit"))))),At=()=>{const{useSettings:t}=(0,a.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(It,null),(0,e.createElement)("main",{className:"gtmkit-max-w-3xl gtmkit-bg-white gtmkit-border-1 gtmkit-border-color-border gtmkit-rounded-md gtmkit-mx-auto gtmkit-py-12 gtmkit-px-16 gtmkit-text-base"},(0,e.createElement)(ht,null,(0,e.createElement)(dt,{exact:!0,path:"/welcome",element:(0,e.createElement)(vt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/essential-settings",element:(0,e.createElement)(wt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/share-anonymous-data",element:(0,e.createElement)(_t,null)}),(0,e.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(bt,null)}),(0,e.createElement)(dt,{path:"/",element:(0,e.createElement)(ut,{replace:!0,to:"/welcome"})}))),(0,e.createElement)(Ot,null)):(0,e.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},Ut=()=>(0,e.createElement)(Et,{basename:"/"},(0,e.createElement)(g,null,(0,e.createElement)(At,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,a.render)((0,e.createElement)(Ut,null),document.getElementById(window.gtmkitSettings.rootId))}))})();
     1(()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(e,a)=>{for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React,a=window.wp.element,n=window.wp.components,i=window.lodash,r=window.wp.apiFetch;var l=t.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,a=null,n=!1)=>{let i={};try{i=await l()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:options},s=window.wp.i18n,m=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,s.__)("An error occurred.","gtm-kit"),a.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":a.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.isPending=!1,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,s.__)("An error occurred.","gtm-kit"):(0,s.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage}return a},c=(0,a.createContext)(),g=t=>{const[n,r]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),l=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};r({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},s=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{l()}),[]);const g={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,o("gtmkit/v1/set-options","POST",e));var e;r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:l,useUpdateState:s,useUpdateStateSettings:async(t,e,a)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let l;r[t][e]=a,l=!(0,i.isEqual)(r,n.fetchedSettings),s({stateSettings:r,canSave:l})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let r;const l={};l.general={...a.general,...e.general},"integrations"in e&&(l.integrations={...a.integrations,...e.integrations}),r=!(0,i.isEqual)(l,n.fetchedSettings),s({stateSettings:l,canSave:r})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{r({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,o("gtmkit/v1/send-support-data","POST",e,!0));var e;r({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData,useIsSending:n.isSendingSystemData,useSupportTicket:n.supportTicket,useIsSystemDataSent:n.isSystemDataSent,useSystemDataMessage:n.systemDataMessage,isWooAddonActive:!!window.gtmkitSettings.wa&&window.gtmkitSettings.wa};return(0,e.createElement)(c.Provider,{value:g},t.children)};function u(){return u=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},u.apply(this,arguments)}var d;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(d||(d={}));const p="popstate";function h(t,e){if(!1===t||null==t)throw new Error(e)}function k(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function y(t,e){return{usr:t.state,key:t.key,idx:e}}function f(t,e,a,n){return void 0===a&&(a=null),u({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?S(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function E(t){let{pathname:e="/",search:a="",hash:n=""}=t;return a&&"?"!==a&&(e+="?"===a.charAt(0)?a:"?"+a),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function S(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var x;function M(t,e,a){void 0===a&&(a="/");let n=z(("string"==typeof e?S(e):e).pathname||"/",a);if(null==n)return null;let i=N(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(i);let r=null;for(let t=0;null==r&&t<i.length;++t){let e=A(n);r=I(i[t],e)}return r}function N(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let l={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};l.relativePath.startsWith("/")&&(h(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),l.relativePath=l.relativePath.slice(n.length));let o=G([n,l.relativePath]),s=a.concat(l);t.children&&t.children.length>0&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),N(t.children,e,s,o)),(null!=t.path||t.index)&&e.push({path:o,score:C(o,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of v(t.path))i(t,e,a);else i(t,e)})),e}function v(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return i?[r,""]:[r];let l=v(n.join("/")),o=[];return o.push(...l.map((t=>""===t?r:[r,t].join("/")))),i&&o.push(...l),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(x||(x={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const _=/^:[\w-]+$/,w=3,b=2,T=1,j=10,L=-2,D=t=>"*"===t;function C(t,e){let a=t.split("/"),n=a.length;return a.some(D)&&(n+=L),e&&(n+=b),a.filter((t=>!D(t))).reduce(((t,e)=>t+(_.test(e)?w:""===e?T:j)),n)}function I(t,e){let{routesMeta:a}=t,n={},i="/",r=[];for(let t=0;t<a.length;++t){let l=a[t],o=t===a.length-1,s="/"===i?e:e.slice(i.length)||"/",m=O({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},s);if(!m)return null;Object.assign(n,m.params);let c=l.route;r.push({params:n,pathname:G([i,m.pathname]),pathnameBase:B(G([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=G([i,m.pathnameBase]))}return r}function O(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[a,n]=function(t,e,a){void 0===e&&(e=!1),void 0===a&&(a=!0),k("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,a)=>(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let r=i[0],l=r.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=o[a]||"";l=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const s=o[a];return t[n]=i&&!s?void 0:(s||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:l,pattern:t}}function A(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return k(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function z(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function U(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function P(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function R(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=S(t):(i=u({},t),h(!i.pathname||!i.pathname.includes("?"),U("?","pathname","search",i)),h(!i.pathname||!i.pathname.includes("#"),U("#","pathname","hash",i)),h(!i.search||!i.search.includes("#"),U("#","search","hash",i)));let r,l=""===t||""===i.pathname,o=l?"/":i.pathname;if(null==o)r=a;else{let t=e.length-1;if(!n&&o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}r=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?S(t):t,r=a?a.startsWith("/")?a:function(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?a.length>1&&a.pop():"."!==t&&a.push(t)})),a.length>1?a.join("/"):"/"}(a,e):e;return{pathname:r,search:W(n),hash:Y(i)}}(i,r),m=o&&"/"!==o&&o.endsWith("/"),c=(l||"."===o)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const G=t=>t.join("/").replace(/\/\/+/g,"/"),B=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),W=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const F=["post","put","patch","delete"],Q=(new Set(F),["get",...F]);function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},J.apply(this,arguments)}new Set(Q),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const H=e.createContext(null),$=e.createContext(null),Z=e.createContext(null),K=e.createContext(null),V=e.createContext({outlet:null,matches:[],isDataRoute:!1}),X=e.createContext(null);function q(){return null!=e.useContext(K)}function tt(){return q()||h(!1),e.useContext(K).location}function et(t){e.useContext(Z).static||e.useLayoutEffect(t)}function at(){let{isDataRoute:t}=e.useContext(V);return t?function(){let{router:t}=function(t){let a=e.useContext(H);return a||h(!1),a}(st.UseNavigateStable),a=ct(mt.UseNavigateStable),n=e.useRef(!1);return et((()=>{n.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,J({fromRouteId:a},i)))}),[t,a])}():function(){q()||h(!1);let t=e.useContext(H),{basename:a,future:n,navigator:i}=e.useContext(Z),{matches:r}=e.useContext(V),{pathname:l}=tt(),o=JSON.stringify(P(r,n.v7_relativeSplatPath)),s=e.useRef(!1);return et((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void i.go(e);let r=R(e,JSON.parse(o),l,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:G([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,o,l,t])}()}function nt(t,a,n,i){q()||h(!1);let{navigator:r}=e.useContext(Z),{matches:l}=e.useContext(V),o=l[l.length-1],s=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,g=tt();if(a){var u;let t="string"==typeof a?S(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||h(!1),c=t}else c=g;let p=c.pathname||"/",k=p;if("/"!==m){let t=m.replace(/^\//,"").split("/");k="/"+p.replace(/^\//,"").split("/").slice(t.length).join("/")}let y=M(t,{pathname:k}),f=function(t,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var l;if(null==(l=n)||!l.errors)return null;t=n.matches}let o=t,s=null==(r=n)?void 0:r.errors;if(null!=s){let t=o.findIndex((t=>t.route.id&&(null==s?void 0:s[t.route.id])));t>=0||h(!1),o=o.slice(0,Math.min(o.length,t+1))}let m=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<o.length;t++){let e=o[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:a}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||i){m=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((t,i,r)=>{let l,g=!1,u=null,d=null;var p;n&&(l=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||rt,m&&(c<0&&0===r?(gt[p="route-fallback"]||(gt[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(o.slice(0,r+1)),k=()=>{let a;return a=l?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(ot,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(lt,{location:n.location,revalidation:n.revalidation,component:u,error:l,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:G([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:G([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),l,n,i);return a&&f?e.createElement(K.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:d.Pop}},f):f}function it(){let t=function(){var t;let a=e.useContext(X),n=function(t){let a=e.useContext($);return a||h(!1),a}(mt.UseRouteError),i=ct(mt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),a=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:i},n):null,null)}const rt=e.createElement(it,null);class lt extends e.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:void 0!==t.error?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return void 0!==this.state.error?e.createElement(V.Provider,{value:this.props.routeContext},e.createElement(X.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ot(t){let{routeContext:a,match:n,children:i}=t,r=e.useContext(H);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(V.Provider,{value:a},i)}var st=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(st||{}),mt=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(mt||{});function ct(t){let a=function(t){let a=e.useContext(V);return a||h(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||h(!1),n.route.id}const gt={};function ut(t){let{to:a,replace:n,state:i,relative:r}=t;q()||h(!1);let{future:l,static:o}=e.useContext(Z),{matches:s}=e.useContext(V),{pathname:m}=tt(),c=at(),g=R(a,P(s,l.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function dt(t){h(!1)}function pt(t){let{basename:a="/",children:n=null,location:i,navigationType:r=d.Pop,navigator:l,static:o=!1,future:s}=t;q()&&h(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:l,static:o,future:J({v7_relativeSplatPath:!1},s)})),[m,s,l,o]);"string"==typeof i&&(i=S(i));let{pathname:g="/",search:u="",hash:p="",state:k=null,key:y="default"}=i,f=e.useMemo((()=>{let t=z(g,m);return null==t?null:{location:{pathname:t,search:u,hash:p,state:k,key:y},navigationType:r}}),[m,g,u,p,k,y,r]);return null==f?null:e.createElement(Z.Provider,{value:c},e.createElement(K.Provider,{children:n,value:f}))}function ht(t){let{children:e,location:a}=t;return nt(kt(e),a)}function kt(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let r=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,kt(t.props.children,r));t.type!==dt&&h(!1),t.props.index&&t.props.children&&h(!1);let l={id:t.props.id||r.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(l.children=kt(t.props.children,r)),n.push(l)})),n}e.startTransition,new Promise((()=>{})),e.Component;const yt=window.ReactDOM;new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(t){}new Map;const ft=e.startTransition;function Et(t){let{basename:a,children:n,future:i,window:r}=t,l=e.useRef();null==l.current&&(l.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:r=!1}=n,l=i.history,o=d.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function g(){o=d.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:o,location:S.location,delta:e})}function k(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:E(t);return a=a.replace(/ $/,"%20"),h(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(u({},l.state,{idx:m}),""));let S={get action(){return o},get location(){return t(i,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(p,g),s=t,()=>{i.removeEventListener(p,g),s=null}},createHref:t=>e(i,t),createURL:k,encodeLocation(t){let e=k(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=d.Push;let n=f(S.location,t,e);a&&a(n,t),m=c()+1;let g=y(n,m),u=S.createHref(n);try{l.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&s&&s({action:o,location:S.location,delta:1})},replace:function(t,e){o=d.Replace;let n=f(S.location,t,e);a&&a(n,t),m=c();let i=y(n,m),g=S.createHref(n);l.replaceState(i,"",g),r&&s&&s({action:o,location:S.location,delta:0})},go:t=>l.go(t)};return S}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=S(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),f("",{pathname:a,search:n,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let a=t.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let e=t.location.href,a=e.indexOf("#");n=-1===a?e:e.slice(0,a)}return n+"#"+("string"==typeof e?e:E(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:r,v5Compat:!0}));let o=l.current,[s,m]=e.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&ft?ft((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>o.listen(g)),[o,g]),e.createElement(pt,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:o,future:i})}var St,xt;yt.flushSync,e.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"}(St||(St={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l}=(0,a.useContext)(c),o=at();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 "},(0,e.createElement)(n.TextControl,{label:(0,s.__)("Container ID","gtm-kit"),placeholder:(0,s.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>i("general","gtm_id",t)})),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),o("/essential-settings",{replace:!0})},disabled:l||!t.general.gtm_id.includes("-")},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):""))),(0,e.createElement)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-left gtmkit-text-color-grey gtmkit-text-center"},(0,e.createElement)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4"},"Need help?"),(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,s.__)("Find your GTM container ID on","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer"},"Google Tag Manager")),(0,e.createElement)("p",null,(0,s.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"))),(0,e.createElement)("div",{className:"gtmkit-mt-3 md:gtmkit-mt-10 gtmkit-text-color-grey gtmkit-text-base"},(0,e.createElement)("span",{className:"gtmkit-block"},(0,s.__)("No thanks. I know what I'm doing.","gtm-kit")),(0,e.createElement)("a",{className:"gtmkit-underline gtmkit-ml-4",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit"))))},Nt=()=>{const{useImportSettings:t,useIsPending:i,useInstallData:r}=(0,a.useContext)(c),[l,o]=(0,a.useState)(!0),m=Object.keys(r.import_data)[0],[g,u]=(0,a.useState)(m),d=[];return Object.keys(r.import_data).forEach((t=>{d.push({value:t,label:r.import_data[t].name})})),l?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-8 gtmkit-my-8"},(0,e.createElement)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold"},(0,s.__)("Would you like to import plugin settings?","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey"},(0,s.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,s.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,e.createElement)(n.RadioControl,{help:(0,s.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:g,options:d,onChange:t=>u(t)}),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(g,r.import_data[g]),o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):""),(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("No","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):"")))):(0,e.createElement)(Mt,null)},vt=()=>{const{useInstallData:t}=(0,a.useContext)(c),{firstInstall:n}=t,{importAvailable:i}=t;return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("You've successfully installed GTM Kit!","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit"))),n&&i?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},_t=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useInstallData:o}=(0,a.useContext)(c),m=at();return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("Essential Settings","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("There are a lot of settings in GTM Kit and we recommend that you uses our recommended settings but you can also choose to use the default settings and go through the settings at your convenience.","gtm-kit"))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?","gtm-kit"),checked:t&&t.general.datalayer_page_type,onChange:()=>{i("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),o.woocommerce_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{i("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,o.cf7_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{i("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,o.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{i("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),m("/share-anonymous-data",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},wt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useSiteData:o}=(0,a.useContext)(c),m=at();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Help improve GTM Kit","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey"},(0,s.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm"},(0,e.createElement)("tbody",null,(0,e.createElement)("tr",{className:""},(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Server type:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.web_server))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"PHP version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.php_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.wordpress_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress multisite:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.multisite?(0,s.__)("Yes","gtm-kit"):(0,s.__)("No","gtm-kit")))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current theme:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.current_theme))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current site language:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.locale))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Active plugins:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Plugin names of all active plugins"))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Anonymized GTM Kit settings:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Which GTM Kit settings are active"))))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto "},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{i("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),m("/getting-started",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},bt=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Your are ready to use GTM Kit!","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto gtmkit-mb-8"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Google Tag Manager templates","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4"},(0,s.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit")," ",(0,e.createElement)("a",{target:"_blank",className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",rel:"noreferrer"},(0,s.__)("Read the guide","gtm-kit"))),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - eCommerce","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Tutorials","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Getting started with GTM Kit","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("WooCommerce Integration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=advanced-container-implementation&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Advanced GTM container implementation","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=settings-actions-and-filters-for-developers&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Settings, actions and filters for developers","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.dashboardUrl}},(0,s.__)("Go to the dashboard","gtm-kit")))),Tt=[{step:1,path:"/welcome",element:"Welcome",title:(0,s.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,s.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,s.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,s.__)("Getting Started","gtm-kit")}],jt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let i="gtmkit-h-0.5 gtmkit-w-full";return i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,e.createElement)("div",{className:i})},Lt=({step:t,currentStep:a})=>t<a?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",className:"gtmkit-w-5 gtmkit-h-5 gtmkit-text-white"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})):t===a?(0,e.createElement)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,Dt=({step:t,currentStep:a,totalSteps:n})=>{if(0===t)return;let i="gtmkit-transition-opacity gtmkit-duration-500 gtmkit-absolute gtmkit-inset-0 gtmkit-border-2 gtmkit-flex gtmkit-items-center gtmkit-justify-center gtmkit-rounded-full gtmkit-opacity-100";return i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-white",i+=t>a?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full"},(0,e.createElement)("span",{className:i},(0,e.createElement)(Lt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))},Ct=()=>{const t=Tt.length-1+Tt[0].step;let a=((t,e)=>{const a=Object.keys(e);return t.filter((function(t){for(let n=0;n<a.length;n++)if(!t.hasOwnProperty(a[n])||t[a[n]]!==e[a[n]])return!1;return!0}))})(Tt,{path:tt().pathname});return a=a.length?a[0].step:0,0===a?(0,e.createElement)("div",{className:"gtmkit-my-16"}):(0,e.createElement)("div",{className:"gtmkit-mt-6 gtmkit-inset-0 gtmkit-mx-auto gtmkit-my-6 gtmkit-flex gtmkit-items-center gtmkit-max-w-xl","aria-hidden":"true"},Tt.map((function(n){return(0,e.createElement)(Dt,{key:n.step,step:n.step,currentStep:a,totalSteps:t})})))},It=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-text-center gtmkit-px-3"},(0,e.createElement)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[225px] gtmkit-inline-block"},(0,e.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,s.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,e.createElement)(Ct,null)),Ot=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey"},(0,e.createElement)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max"},(0,e.createElement)("a",{className:"gtmkit-underline",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit"))))),At=()=>{const{useSettings:t}=(0,a.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(It,null),(0,e.createElement)("main",{className:"gtmkit-max-w-3xl gtmkit-bg-white gtmkit-border-1 gtmkit-border-color-border gtmkit-rounded-md gtmkit-mx-auto gtmkit-py-12 gtmkit-px-16 gtmkit-text-base"},(0,e.createElement)(ht,null,(0,e.createElement)(dt,{exact:!0,path:"/welcome",element:(0,e.createElement)(vt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/essential-settings",element:(0,e.createElement)(_t,null)}),(0,e.createElement)(dt,{exact:!0,path:"/share-anonymous-data",element:(0,e.createElement)(wt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(bt,null)}),(0,e.createElement)(dt,{path:"/",element:(0,e.createElement)(ut,{replace:!0,to:"/welcome"})}))),(0,e.createElement)(Ot,null)):(0,e.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},zt=()=>(0,e.createElement)(Et,{basename:"/"},(0,e.createElement)(g,null,(0,e.createElement)(At,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,a.render)((0,e.createElement)(zt,null),document.getElementById(window.gtmkitSettings.rootId))}))})();
  • gtm-kit/trunk/gtm-kit.php

    r3055017 r3070452  
    44 *
    55 * Plugin Name: GTM Kit
    6  * Version:     1.20
     6 * Version:     1.21
    77 * Plugin URI:  https://gtmkit.com/
    88 * Description: Google Tag Manager implementation focusing on flexibility and pagespeed.
     
    1616 *
    1717 * WC requires at least: 8.0
    18  * WC tested up to: 8.7
     18 * WC tested up to: 8.8
    1919 *
    2020 * @package GTM Kit
     
    2828}
    2929
    30 const GTMKIT_VERSION = '1.20';
     30const GTMKIT_VERSION = '1.21';
    3131
    3232if ( ! defined( 'GTMKIT_FILE' ) ) {
  • gtm-kit/trunk/languages/gtm-kit.pot

    r3055017 r3070452  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: GTM Kit 1.20\n"
     5"Project-Id-Version: GTM Kit 1.21\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/gtm-kit\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-03-18T14:28:44+00:00\n"
     12"POT-Creation-Date: 2024-04-13T13:18:02+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.9.0\n"
     
    6161msgstr ""
    6262
    63 #: src/Admin/AdminAPI.php:135
    64 #: src/Admin/AdminAPI.php:140
     63#: src/Admin/AdminAPI.php:134
     64#: src/Admin/AdminAPI.php:139
    6565msgid "The support ticket was not found. Please check that you have entered the correct ticket."
    6666msgstr ""
    6767
    68 #: src/Admin/AdminAPI.php:137
     68#: src/Admin/AdminAPI.php:136
    6969msgid "Thank you! We have received the data."
    7070msgstr ""
     
    112112msgstr ""
    113113
    114 #: src/Common/Util.php:132
     114#: src/Common/Util.php:152
    115115msgid "Server type:"
    116116msgstr ""
    117117
    118 #: src/Common/Util.php:137
     118#: src/Common/Util.php:157
    119119msgid "PHP version number:"
    120120msgstr ""
    121121
    122 #: src/Common/Util.php:142
     122#: src/Common/Util.php:162
    123123msgid "WordPress version number:"
    124124msgstr ""
    125125
    126 #: src/Common/Util.php:147
     126#: src/Common/Util.php:167
    127127msgid "WordPress multisite:"
    128128msgstr ""
    129129
    130 #: src/Common/Util.php:148
     130#: src/Common/Util.php:168
    131131#: assets/admin/wizard.js:1
    132132msgid "Yes"
    133133msgstr ""
    134134
    135 #: src/Common/Util.php:148
     135#: src/Common/Util.php:168
    136136#: assets/admin/wizard.js:1
    137137msgid "No"
    138138msgstr ""
    139139
    140 #: src/Common/Util.php:152
     140#: src/Common/Util.php:172
    141141msgid "Current theme:"
    142142msgstr ""
    143143
    144 #: src/Common/Util.php:157
     144#: src/Common/Util.php:177
    145145msgid "Current site language:"
    146146msgstr ""
    147147
    148 #: src/Common/Util.php:162
     148#: src/Common/Util.php:182
    149149msgid "Active plugins:"
    150150msgstr ""
    151151
    152 #: src/Common/Util.php:163
     152#: src/Common/Util.php:183
    153153msgid "Plugin name and version of all active plugins"
    154154msgstr ""
    155155
    156 #: src/Common/Util.php:167
     156#: src/Common/Util.php:187
    157157msgid "Anonymized GTM Kit settings:"
    158158msgstr ""
    159159
    160 #: src/Common/Util.php:168
     160#: src/Common/Util.php:188
    161161msgid "Which GTM Kit settings are active"
    162162msgstr ""
     
    176176
    177177#: src/Integration/WooCommerce.php:250
    178 #: src/Integration/WooCommerce.php:966
     178#: src/Integration/WooCommerce.php:967
    179179msgid "Product Category"
    180180msgstr ""
     
    193193
    194194#: src/Integration/WooCommerce.php:254
    195 #: src/Integration/WooCommerce.php:968
     195#: src/Integration/WooCommerce.php:969
    196196msgid "Product Tag"
    197197msgstr ""
     
    205205msgstr ""
    206206
    207 #: src/Integration/WooCommerce.php:825
     207#: src/Integration/WooCommerce.php:826
    208208msgid "Grouped Product"
    209209msgstr ""
    210210
    211 #: src/Integration/WooCommerce.php:859
     211#: src/Integration/WooCommerce.php:860
    212212msgid "Search Results"
    213213msgstr ""
    214214
    215 #: src/Integration/WooCommerce.php:859
    216 #: src/Integration/WooCommerce.php:900
    217 #: src/Integration/WooCommerce.php:933
     215#: src/Integration/WooCommerce.php:860
     216#: src/Integration/WooCommerce.php:901
     217#: src/Integration/WooCommerce.php:934
    218218msgid "General Product List"
    219219msgstr ""
    220220
    221 #: src/Integration/WooCommerce.php:1117
     221#: src/Integration/WooCommerce.php:1118
    222222msgid "GTM Kit data."
    223223msgstr ""
     
    270270
    271271#: assets/admin/settings.js:1
    272 msgid "How to get the most out of Google Tag Manager with GTM Kit."
    273 msgstr ""
    274 
    275 #: assets/admin/settings.js:1
    276 msgid "WooCommerce integration"
    277 msgstr ""
    278 
    279 #: assets/admin/settings.js:1
    280 msgid "Integrate WooCommerce with Google Tag Manager and Google Analytics."
    281 msgstr ""
    282 
    283 #: assets/admin/settings.js:1
    284 msgid "Integrate Contact Form 7 with Google Tag Manager and Google Analytics."
    285 msgstr ""
    286 
    287 #: assets/admin/settings.js:1
    288 msgid "Integrate Easy Digital Downloads with Google Tag Manager and Google Analytics."
    289 msgstr ""
    290 
    291 #: assets/admin/settings.js:1
    292 msgid "How to setup Google Analytics (GA4) in Google Tag Manager"
    293 msgstr ""
    294 
    295 #: assets/admin/settings.js:1
    296 msgid "Learn how to configure the necessary tags to make Google Analytics collect your data."
    297 msgstr ""
    298 
    299 #: assets/admin/settings.js:1
    300 msgid "Customization of the GTM container implementation and Server Side Tracking."
    301 msgstr ""
    302 
    303 #: assets/admin/settings.js:1
    304 msgid "One of the things that makes GTM Kit a great tool for developers is the ability to override options in wp-config.php."
    305 msgstr ""
    306 
    307 #: assets/admin/settings.js:1
    308 msgid "Delaying JavaScript execution is a powerful page speed optimization technique."
    309 msgstr ""
    310 
    311 #: assets/admin/settings.js:1
    312272msgid "See all tutorials…"
    313273msgstr ""
    314274
    315275#: assets/admin/settings.js:1
    316 msgid "See all our tutorial and get the most out of GTM Kit"
     276msgid "See all our tutorials and get the most out of GTM Kit"
    317277msgstr ""
    318278
     
    403363
    404364#: assets/admin/settings.js:1
    405 msgid "The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do."
     365msgid "The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do so."
    406366msgstr ""
    407367
     
    447407
    448408#: assets/admin/settings.js:1
     409#: assets/admin/settings.js:13
    449410msgid "Learn more"
    450411msgstr ""
     
    479440
    480441#: assets/admin/settings.js:1
    481 msgid "Setting this to On will push the event 'load_js' om page load."
     442msgid "Setting this to On will push the event 'load_js' on page load."
    482443msgstr ""
    483444
     
    503464
    504465#: assets/admin/settings.js:1
    505 msgid "Enter your gtm_auth code your GTM environment."
     466msgid "Enter the gtm_auth code for your GTM environment."
    506467msgstr ""
    507468
     
    515476
    516477#: assets/admin/settings.js:1
    517 msgid "Enter your gtm_preview code your GTM environment."
     478msgid "Enter the gtm_preview code for your GTM environment."
    518479msgstr ""
    519480
     
    539500
    540501#: assets/admin/settings.js:1
    541 msgid "You can override the values of using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments."
     502msgid "You can override the values by using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments."
    542503msgstr ""
    543504
     
    555516
    556517#: assets/admin/settings.js:1
    557 msgid "Load container when browser is idle (requestIdleCallback)"
     518msgid "Load container when the browser is idle (requestIdleCallback)"
    558519msgstr ""
    559520
     
    664625
    665626#: assets/admin/settings.js:1
     627#: assets/admin/settings.js:13
    666628msgid "User Data"
    667629msgstr ""
     
    958920
    959921#: assets/admin/settings.js:13
     922msgid "User-Provided Data"
     923msgstr ""
     924
     925#: assets/admin/settings.js:13
     926msgid "The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'."
     927msgstr ""
     928
     929#: assets/admin/settings.js:13
    960930msgid "Webhooks for server-side tracking"
    961931msgstr ""
     
    11381108
    11391109#: assets/admin/settings.js:13
    1140 msgid "Only on pages where where the Contact Form 7 script is registered (recommended)."
     1110msgid "Only on pages where the Contact Form 7 script is registered (recommended)."
    11411111msgstr ""
    11421112
     
    11541124
    11551125#: assets/admin/settings.js:13
    1156 msgid "Choose between a basic configuration and an advanced eCommerce configuration"
    1157 msgstr ""
    1158 
    1159 #: assets/admin/settings.js:13
    11601126msgid "Get template"
    11611127msgstr ""
     
    11791145
    11801146#: assets/admin/settings.js:13
     1147#: assets/admin/wizard.js:1
     1148msgid "Please read the guide on how to use the import files and configure GTM."
     1149msgstr ""
     1150
     1151#: assets/admin/settings.js:13
     1152#: assets/admin/wizard.js:1
     1153msgid "Read the guide"
     1154msgstr ""
     1155
     1156#: assets/admin/settings.js:13
    11811157msgid "Templates"
    11821158msgstr ""
    11831159
    11841160#: assets/admin/settings.js:13
    1185 msgid "Google Analytics 4"
    1186 msgstr ""
    1187 
    1188 #: assets/admin/settings.js:13
    1189 msgid "Before you start"
    1190 msgstr ""
    1191 
    1192 #: assets/admin/settings.js:13
    1193 #: assets/admin/wizard.js:1
    1194 msgid "Please read the guide on how to use the import files and configure GTM."
    1195 msgstr ""
    1196 
    1197 #: assets/admin/settings.js:13
    1198 #: assets/admin/wizard.js:1
    1199 msgid "Read the guide"
    1200 msgstr ""
    1201 
    1202 #: assets/admin/settings.js:13
    1203 msgid "Basic configuration"
    1204 msgstr ""
    1205 
    1206 #: assets/admin/settings.js:13
    1207 msgid "If you don't have eCommerce functionality then this is the right choice for you."
    1208 msgstr ""
    1209 
    1210 #: assets/admin/settings.js:13
    1211 msgid "This template includes the Google Tag, which will send basic events to Google Analytics 4."
    1212 msgstr ""
    1213 
    1214 #: assets/admin/settings.js:13
    12151161msgid "GTM container import files:"
    12161162msgstr ""
    12171163
    12181164#: assets/admin/settings.js:13
     1165msgid "Necessary modifications:"
     1166msgstr ""
     1167
     1168#: assets/admin/settings.js:13
     1169msgid "Need help?"
     1170msgstr ""
     1171
     1172#: assets/admin/settings.js:13
     1173msgid "We are here to help if you have any questions."
     1174msgstr ""
     1175
     1176#: assets/admin/settings.js:13
     1177msgid "See support options"
     1178msgstr ""
     1179
     1180#: assets/admin/settings.js:13
     1181msgid "Get support"
     1182msgstr ""
     1183
     1184#: assets/admin/settings.js:13
     1185msgid "Support options"
     1186msgstr ""
     1187
     1188#: assets/admin/settings.js:13
     1189msgid "WordPress.org Support Forum"
     1190msgstr ""
     1191
     1192#: assets/admin/settings.js:13
     1193msgid "GITHub repository"
     1194msgstr ""
     1195
     1196#: assets/admin/settings.js:13
     1197msgid "Plugin Homepage"
     1198msgstr ""
     1199
     1200#: assets/admin/settings.js:13
     1201msgid "Share system data with the GTM Kit support team"
     1202msgstr ""
     1203
     1204#: assets/admin/settings.js:13
     1205msgid "If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:"
     1206msgstr ""
     1207
     1208#: assets/admin/settings.js:13
     1209msgid "Enter support ticket"
     1210msgstr ""
     1211
     1212#: assets/admin/settings.js:13
     1213msgid "Send system data"
     1214msgstr ""
     1215
     1216#: assets/admin/settings.js:13
     1217msgid "About GTM Kit"
     1218msgstr ""
     1219
     1220#: assets/admin/settings.js:13
     1221msgid "Version:"
     1222msgstr ""
     1223
     1224#: assets/admin/settings.js:13
     1225msgid "Learn about changes and follow the development of GTM Kit:"
     1226msgstr ""
     1227
     1228#: assets/admin/settings.js:13
     1229msgid "The changelog"
     1230msgstr ""
     1231
     1232#: assets/admin/settings.js:13
     1233msgid "The Github repository"
     1234msgstr ""
     1235
     1236#: assets/admin/settings.js:13
     1237msgid "Google Tag Manager Templates"
     1238msgstr ""
     1239
     1240#: assets/admin/settings.js:13
     1241msgid "Dashboard"
     1242msgstr ""
     1243
     1244#: assets/admin/settings.js:13
     1245msgid "Container"
     1246msgstr ""
     1247
     1248#: assets/admin/settings.js:13
     1249msgid "User data"
     1250msgstr ""
     1251
     1252#: assets/admin/settings.js:13
     1253msgid "Support"
     1254msgstr ""
     1255
     1256#: assets/admin/wizard.js:1
     1257msgid "Container ID"
     1258msgstr ""
     1259
     1260#: assets/admin/wizard.js:1
     1261msgid "Enter Container ID"
     1262msgstr ""
     1263
     1264#: assets/admin/wizard.js:1
     1265msgid "Save and continue"
     1266msgstr ""
     1267
     1268#: assets/admin/wizard.js:1
     1269msgid "Find your GTM container ID on"
     1270msgstr ""
     1271
     1272#: assets/admin/wizard.js:1
     1273msgid "It should look something like this:"
     1274msgstr ""
     1275
     1276#: assets/admin/wizard.js:1
     1277msgid "No thanks. I know what I'm doing."
     1278msgstr ""
     1279
     1280#: assets/admin/wizard.js:1
     1281msgid "Go to the dashboard."
     1282msgstr ""
     1283
     1284#: assets/admin/wizard.js:1
     1285msgid "Would you like to import plugin settings?"
     1286msgstr ""
     1287
     1288#: assets/admin/wizard.js:1
     1289msgid "We have found the configuration of other plugins in the database."
     1290msgstr ""
     1291
     1292#: assets/admin/wizard.js:1
     1293msgid "Would you like to import your settings to GTM Kit?"
     1294msgstr ""
     1295
     1296#: assets/admin/wizard.js:1
     1297msgid "Select the plugin you want to import settings from."
     1298msgstr ""
     1299
     1300#: assets/admin/wizard.js:1
     1301msgid "You've successfully installed GTM Kit!"
     1302msgstr ""
     1303
     1304#: assets/admin/wizard.js:1
     1305msgid "Essential Settings"
     1306msgstr ""
     1307
     1308#: assets/admin/wizard.js:1
     1309msgid "There are a lot of settings in GTM Kit and we recommend that you uses our recommended settings but you can also choose to use the default settings and go through the settings at your convenience."
     1310msgstr ""
     1311
     1312#: assets/admin/wizard.js:1
     1313msgid "Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?"
     1314msgstr ""
     1315
     1316#: assets/admin/wizard.js:1
     1317msgid "Track WooCommerce"
     1318msgstr ""
     1319
     1320#: assets/admin/wizard.js:1
     1321msgid "Would you like to track e-commerce data from WooCommerce?"
     1322msgstr ""
     1323
     1324#: assets/admin/wizard.js:1
     1325msgid "Track Contact Form 7"
     1326msgstr ""
     1327
     1328#: assets/admin/wizard.js:1
     1329msgid "Would you like to track form submissions from Contact Form 7?"
     1330msgstr ""
     1331
     1332#: assets/admin/wizard.js:1
     1333msgid "Track Easy Digital Downloads"
     1334msgstr ""
     1335
     1336#: assets/admin/wizard.js:1
     1337msgid "Would you like to track e-commerce data from Easy Digital Downloads?"
     1338msgstr ""
     1339
     1340#: assets/admin/wizard.js:1
     1341msgid "I agree to share anonymous data with the development team to help improve GTM Kit. "
     1342msgstr ""
     1343
     1344#: assets/admin/wizard.js:1
     1345msgid "Your are ready to use GTM Kit!"
     1346msgstr ""
     1347
     1348#: assets/admin/wizard.js:1
     1349msgid "Your Google Tag Manager Container is now sending data to Google Tag Manager."
     1350msgstr ""
     1351
     1352#: assets/admin/wizard.js:1
     1353msgid "Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4."
     1354msgstr ""
     1355
     1356#: assets/admin/wizard.js:1
     1357msgid "Google Tag Manager templates"
     1358msgstr ""
     1359
    12191360#: assets/admin/wizard.js:1
    12201361msgid "Google Analytics 4 - Basic Configuration"
    12211362msgstr ""
    12221363
    1223 #: assets/admin/settings.js:13
    1224 msgid "Necessary modifications:"
    1225 msgstr ""
    1226 
    1227 #: assets/admin/settings.js:13
    1228 msgid "Edit the variable with the name \"constant - GA4 Measurement ID\" and enter your Google Analytics 4 Measurement ID."
    1229 msgstr ""
    1230 
    1231 #: assets/admin/settings.js:13
    1232 msgid "eCommerce configuration"
    1233 msgstr ""
    1234 
    1235 #: assets/admin/settings.js:13
    1236 msgid "If you have a webshop then this is the right choice for you."
    1237 msgstr ""
    1238 
    1239 #: assets/admin/settings.js:13
    1240 msgid "This template includes the Google Tag and a Google Analytics GA4 event tag, that will catch all eCommerce events and send them to Google Analytics 4."
    1241 msgstr ""
    1242 
    1243 #: assets/admin/settings.js:13
    12441364#: assets/admin/wizard.js:1
    12451365msgid "Google Analytics 4 - eCommerce"
    1246 msgstr ""
    1247 
    1248 #: assets/admin/settings.js:13
    1249 msgid "Need help?"
    1250 msgstr ""
    1251 
    1252 #: assets/admin/settings.js:13
    1253 msgid "We are here to help if you have any questions."
    1254 msgstr ""
    1255 
    1256 #: assets/admin/settings.js:13
    1257 msgid "See support options"
    1258 msgstr ""
    1259 
    1260 #: assets/admin/settings.js:13
    1261 msgid "Get support"
    1262 msgstr ""
    1263 
    1264 #: assets/admin/settings.js:13
    1265 msgid "Support options"
    1266 msgstr ""
    1267 
    1268 #: assets/admin/settings.js:13
    1269 msgid "WordPress.org Support Forum"
    1270 msgstr ""
    1271 
    1272 #: assets/admin/settings.js:13
    1273 msgid "GITHub repository"
    1274 msgstr ""
    1275 
    1276 #: assets/admin/settings.js:13
    1277 msgid "Plugin Homepage"
    1278 msgstr ""
    1279 
    1280 #: assets/admin/settings.js:13
    1281 msgid "Share system data with the GTM Kit support team"
    1282 msgstr ""
    1283 
    1284 #: assets/admin/settings.js:13
    1285 msgid "If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:"
    1286 msgstr ""
    1287 
    1288 #: assets/admin/settings.js:13
    1289 msgid "Enter support ticket"
    1290 msgstr ""
    1291 
    1292 #: assets/admin/settings.js:13
    1293 msgid "Send system data"
    1294 msgstr ""
    1295 
    1296 #: assets/admin/settings.js:13
    1297 msgid "About GTM Kit"
    1298 msgstr ""
    1299 
    1300 #: assets/admin/settings.js:13
    1301 msgid "Version:"
    1302 msgstr ""
    1303 
    1304 #: assets/admin/settings.js:13
    1305 msgid "Learn about changes and follow the development of GTM Kit:"
    1306 msgstr ""
    1307 
    1308 #: assets/admin/settings.js:13
    1309 msgid "The changelog"
    1310 msgstr ""
    1311 
    1312 #: assets/admin/settings.js:13
    1313 msgid "The Github repository"
    1314 msgstr ""
    1315 
    1316 #: assets/admin/settings.js:13
    1317 msgid "Google Tag Manager Templates"
    1318 msgstr ""
    1319 
    1320 #: assets/admin/settings.js:13
    1321 msgid "Dashboard"
    1322 msgstr ""
    1323 
    1324 #: assets/admin/settings.js:13
    1325 msgid "Container"
    1326 msgstr ""
    1327 
    1328 #: assets/admin/settings.js:13
    1329 msgid "User data"
    1330 msgstr ""
    1331 
    1332 #: assets/admin/settings.js:13
    1333 msgid "Support"
    1334 msgstr ""
    1335 
    1336 #: assets/admin/wizard.js:1
    1337 msgid "Container ID"
    1338 msgstr ""
    1339 
    1340 #: assets/admin/wizard.js:1
    1341 msgid "Enter Container ID"
    1342 msgstr ""
    1343 
    1344 #: assets/admin/wizard.js:1
    1345 msgid "Save and continue"
    1346 msgstr ""
    1347 
    1348 #: assets/admin/wizard.js:1
    1349 msgid "Find your GTM container ID on"
    1350 msgstr ""
    1351 
    1352 #: assets/admin/wizard.js:1
    1353 msgid "It should look something like this:"
    1354 msgstr ""
    1355 
    1356 #: assets/admin/wizard.js:1
    1357 msgid "No thanks. I know what I'm doing."
    1358 msgstr ""
    1359 
    1360 #: assets/admin/wizard.js:1
    1361 msgid "Go to the dashboard."
    1362 msgstr ""
    1363 
    1364 #: assets/admin/wizard.js:1
    1365 msgid "Would you like to import plugin settings?"
    1366 msgstr ""
    1367 
    1368 #: assets/admin/wizard.js:1
    1369 msgid "We have found the configuration of other plugins in the database."
    1370 msgstr ""
    1371 
    1372 #: assets/admin/wizard.js:1
    1373 msgid "Would you like to import your settings to GTM Kit?"
    1374 msgstr ""
    1375 
    1376 #: assets/admin/wizard.js:1
    1377 msgid "Select the plugin you want to import settings from."
    1378 msgstr ""
    1379 
    1380 #: assets/admin/wizard.js:1
    1381 msgid "You've successfully installed GTM Kit!"
    1382 msgstr ""
    1383 
    1384 #: assets/admin/wizard.js:1
    1385 msgid "Essential Settings"
    1386 msgstr ""
    1387 
    1388 #: assets/admin/wizard.js:1
    1389 msgid "There are a lot of settings in GTM Kit and we recommend that you uses our recommended settings but you can also choose to use the default settings and go through the settings at your convenience."
    1390 msgstr ""
    1391 
    1392 #: assets/admin/wizard.js:1
    1393 msgid "Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?"
    1394 msgstr ""
    1395 
    1396 #: assets/admin/wizard.js:1
    1397 msgid "Track WooCommerce"
    1398 msgstr ""
    1399 
    1400 #: assets/admin/wizard.js:1
    1401 msgid "Would you like to track e-commerce data from WooCommerce?"
    1402 msgstr ""
    1403 
    1404 #: assets/admin/wizard.js:1
    1405 msgid "Track Contact Form 7"
    1406 msgstr ""
    1407 
    1408 #: assets/admin/wizard.js:1
    1409 msgid "Would you like to track form submissions from Contact Form 7?"
    1410 msgstr ""
    1411 
    1412 #: assets/admin/wizard.js:1
    1413 msgid "Track Easy Digital Downloads"
    1414 msgstr ""
    1415 
    1416 #: assets/admin/wizard.js:1
    1417 msgid "Would you like to track e-commerce data from Easy Digital Downloads?"
    1418 msgstr ""
    1419 
    1420 #: assets/admin/wizard.js:1
    1421 msgid "I agree to share anonymous data with the development team to help improve GTM Kit. "
    1422 msgstr ""
    1423 
    1424 #: assets/admin/wizard.js:1
    1425 msgid "Your are ready to use GTM Kit!"
    1426 msgstr ""
    1427 
    1428 #: assets/admin/wizard.js:1
    1429 msgid "Your Google Tag Manager Container is now sending data to Google Tag Manager."
    1430 msgstr ""
    1431 
    1432 #: assets/admin/wizard.js:1
    1433 msgid "Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4."
    1434 msgstr ""
    1435 
    1436 #: assets/admin/wizard.js:1
    1437 msgid "Google Tag Manager templates"
    14381366msgstr ""
    14391367
  • gtm-kit/trunk/readme.txt

    r3055017 r3070452  
    44Tags: google tag manager, gtm, woocommerce, analytics, ga4
    55Tested up to: 6.5
    6 Stable tag: 1.20
     6Stable tag: 1.21
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    8989== Changelog ==
    9090
     91= 1.21 =
     92
     93Release date: 2024-04-15
     94
     95Find out about what's new in our [our release post](https://gtmkit.com/gtm-kit-1-21/).
     96
     97#### Enhancements:
     98* Added user-data in the datalayer containing user data formatted for the User-Provided Data variable so you don't have to map it manually.
     99* Added Google Tag Manager templates for Google Ads and Facebook.
     100* Added dynamic template sections that allows for template updates wíthout updating the plugin.
     101* The tutorial section is now dynamic and based on a feed, so we don't have to update the plugin to include new tutorials.
     102
     103#### Bugfixes:
     104* JavaScript translations was not loaded correct.
     105
     106#### Other:
     107* Tested up to WooCommerce 8.8.
     108
    91109= 1.20 =
    92110
     
    133151* The code has been refactored for extendability.
    134152
    135 = 1.18.1 =
    136 
    137 Release date: 2024-01-08
    138 
    139 #### Bugfixes:
    140 * Added missing flush of the ecommerce object on the select_item event.
    141 * 1.17 introduced a bug that caused item brand to be limited to a product attribute.
    142 
    143 #### Other:
    144 * Tested up to WooCommerce 8.5.
    145 * Minor refactoring.
    146 
    147 = 1.18 =
    148 
    149 Release date: 2024-01-02
    150 
    151 Find out about what's new in our [our release post](https://gtmkit.com/gtm-kit-1-18/).
    152 
    153 #### Enhancements:
    154 * Add support for Google Consent Mode v2
    155 * Added a function to share system data with the GTM Kit support team. If you have registered a support request on WordPress.org and the GTM Kit support team has asked you to send your system data you can now do that in a secure way without posting any private information in the support forum.
    156 * Enhanced support for the select_item event in more WordPress themes. This update significantly improves the compatibility of the select_item event handling in themes such as Woodmart.
    157 
    158 #### Bugfixes:
    159 * When adding a product to the cart from a product category page the quantity was not specified in the add_to_cart event.
    160 * On Single product pages a click on a quantity control would result in an undefined event.
    161 
    162 = Earlier versions =
    163 For the changelog of earlier versions, please refer to [the changelog on gtmkit.com](https://gtmkit.com/changelog/).
    164 
    165 
    166153== Upgrade Notice ==
    167154
  • gtm-kit/trunk/src/Admin/AbstractOptionsPage.php

    r3055017 r3070452  
    160160     * @param string $path The plugin path.
    161161     * @param string $url The plugin URL.
    162      */
    163     protected function enqueue_assets( string $page_slug, string $script_handle, string $path = GTMKIT_PATH, string $url = GTMKIT_URL ) {
     162     * @param string $domain The translation domain.
     163     */
     164    protected function enqueue_assets( string $page_slug, string $script_handle, string $path = GTMKIT_PATH, string $url = GTMKIT_URL, string $domain = 'gtm-kit' ) {
    164165
    165166        $deps_file  = $path . 'assets/admin/' . $script_handle . '.asset.php';
     
    178179
    179180        $this->localize_script( $page_slug, $script_handle );
     181
     182        \wp_set_script_translations( 'gtmkit-' . $script_handle . '-script', $domain );
    180183    }
    181184
  • gtm-kit/trunk/src/Admin/AdminAPI.php

    r3055017 r3070452  
    122122            ];
    123123            $args = [
    124                 'method'    => 'PUT',
    125                 'headers'   => [
     124                'method'  => 'PUT',
     125                'headers' => [
    126126                    'Content-Type' => 'application/json',
    127127                ],
    128                 'body'      => wp_json_encode( $body ),
    129                 'sslverify' => false,
     128                'body'    => wp_json_encode( $body ),
    130129            ];
    131130
  • gtm-kit/trunk/src/Admin/GeneralOptionsPage.php

    r3055017 r3070452  
    112112                'root'            => \esc_url_raw( rest_url() ),
    113113                'nonce'           => \wp_create_nonce( 'wp_rest' ),
     114                'tutorials'       => $this->get_tutorials(),
    114115                'dashboardUrl'    => \menu_page_url( 'gtmkit_general', false ),
    115116                'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ),
     
    119120        );
    120121    }
     122
     123    /**
     124     * Get the templates
     125     *
     126     * @return array
     127     */
     128    private function get_tutorials(): array {
     129        return $this->util->get_data( '/get-tutorials', 'gtmkit_tutorials' );
     130    }
    121131}
  • gtm-kit/trunk/src/Admin/HelpOptionsPage.php

    r3055017 r3070452  
    9090                'root'            => \esc_url_raw( rest_url() ),
    9191                'nonce'           => \wp_create_nonce( 'wp_rest' ),
     92                'tutorials'       => $this->get_tutorials(),
    9293                'dashboardUrl'    => \menu_page_url( 'gtmkit_general', false ),
    9394                'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ),
    9495                'settings'        => $this->options->get_all_raw(),
     96                'site_data'       => [ 'gtmkit_version' => GTMKIT_VERSION ],
    9597            ]
    9698        );
    9799    }
     100
     101    /**
     102     * Get the templates
     103     *
     104     * @return array
     105     */
     106    private function get_tutorials(): array {
     107        return $this->util->get_data( '/get-tutorials', 'gtmkit_tutorials' );
     108    }
    98109}
  • gtm-kit/trunk/src/Admin/TemplatesOptionsPage.php

    r3055017 r3070452  
    9090                'root'            => \esc_url_raw( rest_url() ),
    9191                'nonce'           => \wp_create_nonce( 'wp_rest' ),
     92                'templates'       => $this->get_templates(),
    9293                'dashboardUrl'    => \menu_page_url( 'gtmkit_general', false ),
    9394                'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ),
     
    9798        );
    9899    }
     100
     101    /**
     102     * Get the templates
     103     *
     104     * @return array
     105     */
     106    private function get_templates(): array {
     107        return $this->util->get_data( '/get-templates', 'gtmkit_templates' );
     108    }
    99109}
  • gtm-kit/trunk/src/Common/Util.php

    r3045420 r3070452  
    4545
    4646    /**
     47     * API namespace.
     48     *
     49     * @var string
     50     */
     51    private $api_namespace = '/api/v1';
     52
     53    /**
     54     * API host.
     55     *
     56     * @var string
     57     */
     58    private $api_host;
     59
     60    /**
    4761     * Constructor.
    4862     *
     
    5771        $this->asset_path      = $path . 'assets/';
    5872        $this->asset_url       = $url . 'assets/';
     73
     74        if ( $options->is_const_enabled() && defined( 'GTMKIT_API_HOST' ) ) {
     75            $this->api_host = GTMKIT_API_HOST;
     76        } else {
     77            $this->api_host = 'https://app.gtmkit.com';
     78        }
    5979    }
    6080
     
    314334        \wp_enqueue_script( $handle, $this->asset_url . $script, $deps, $ver, $args );
    315335    }
     336
     337    /**
     338     * Get API data
     339     *
     340     * @param string $endpoint The API endpoint.
     341     * @param string $transient The transient.
     342     *
     343     * @return array
     344     */
     345    public function get_data( string $endpoint, string $transient ): array {
     346        $data = get_transient( $transient );
     347
     348        if ( ! WP_DEBUG && $data !== false ) {
     349            return $data;
     350        }
     351
     352        $url = $this->api_host . $this->api_namespace . $endpoint;
     353
     354        $url = add_query_arg(
     355            'plugins',
     356            [
     357                'woo' => \is_plugin_active( 'woocommerce/woocommerce.php' ),
     358                'cf7' => \is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ),
     359                'edd' => ( \is_plugin_active( 'easy-digital-downloads/easy-digital-downloads.php' ) || \is_plugin_active( 'easy-digital-downloads-pro/easy-digital-downloads.php' ) ),
     360            ],
     361            $url
     362        );
     363
     364        $response = wp_remote_get( $url );
     365
     366        if ( is_wp_error( $response ) ) {
     367            return [];
     368        }
     369
     370        $json = wp_remote_retrieve_body( $response );
     371        $data = json_decode( $json, true );
     372
     373        if ( json_last_error() !== JSON_ERROR_NONE ) {
     374            return [];
     375        }
     376
     377        set_transient( $transient, $data, 12 * HOUR_IN_SECONDS );
     378
     379        return $data;
     380    }
     381
     382    /**
     383     * Normalize and hash a string.
     384     *
     385     * @link https://developers.google.com/google-ads/api/docs/conversions/enhanced-conversions/web#php
     386     *
     387     * @param string $hash_algorithm The hash algorithm.
     388     * @param string $value The string to normalize and hash.
     389     * @param bool   $trim_intermediate_spaces Removes leading, trailing, and intermediate spaces.
     390     *
     391     * @return string The normalized and hashed string.
     392     */
     393    public function normalize_and_hash(
     394        string $hash_algorithm,
     395        string $value,
     396        bool $trim_intermediate_spaces
     397    ): string {
     398        // Normalizes by first converting all characters to lowercase, then trimming spaces.
     399        $normalized = strtolower( $value );
     400        if ( $trim_intermediate_spaces === true ) {
     401            // Removes leading, trailing, and intermediate spaces.
     402            $normalized = str_replace( ' ', '', $normalized );
     403        } else {
     404            // Removes only leading and trailing spaces.
     405            $normalized = trim( $normalized );
     406        }
     407
     408        if ( $normalized === '' ) {
     409            return '';
     410        }
     411
     412        return hash( $hash_algorithm, strtolower( trim( $normalized ) ) );
     413    }
     414
     415    /**
     416     * Returns the result of normalizing and hashing an email address. For this use case, Google
     417     * Ads requires removal of any '.' characters preceding "gmail.com" or "googlemail.com".
     418     *
     419     * @param string $hash_algorithm The hash algorithm to use.
     420     * @param string $email_address The email address to normalize and hash.
     421     * @return string The normalized and hashed email address.
     422     */
     423    public function normalize_and_hash_email_address(
     424        string $hash_algorithm,
     425        string $email_address
     426    ): string {
     427        $normalized_email = strtolower( $email_address );
     428        $email_parts      = explode( '@', $normalized_email );
     429        if (
     430            count( $email_parts ) > 1
     431            && preg_match( '/^(gmail|googlemail)\.com\s*/', $email_parts[1] )
     432        ) {
     433            // Removes any '.' characters from the portion of the email address before the domain
     434            // if the domain is gmail.com or googlemail.com.
     435            $email_parts[0]   = str_replace( '.', '', $email_parts[0] );
     436            $normalized_email = sprintf( '%s@%s', $email_parts[0], $email_parts[1] );
     437        }
     438        return $this->normalize_and_hash( $hash_algorithm, $normalized_email, true );
     439    }
    316440}
  • gtm-kit/trunk/src/Integration/WooCommerce.php

    r3055017 r3070452  
    12141214        $data_layer['ecommerce']['customer']['shipping_state']     = $wc_customer->get_shipping_state();
    12151215
     1216        $data_layer['user_data']['sha256_email_address']         = $this->util->normalize_and_hash_email_address( 'sha256', $wc_customer->get_billing_email() );
     1217        $data_layer['user_data']['sha256_phone_number']          = $this->util->normalize_and_hash( 'sha256', $wc_customer->get_billing_phone(), true );
     1218        $data_layer['user_data']['address']['sha256_first_name'] = $this->util->normalize_and_hash( 'sha256', $wc_customer->get_billing_first_name(), false );
     1219        $data_layer['user_data']['address']['sha256_last_name']  = $this->util->normalize_and_hash( 'sha256', $wc_customer->get_billing_last_name(), false );
     1220        $data_layer['user_data']['address']['street']            = $wc_customer->get_billing_address_1();
     1221        $data_layer['user_data']['address']['city']              = $wc_customer->get_billing_city();
     1222        $data_layer['user_data']['address']['region']            = $wc_customer->get_billing_state();
     1223        $data_layer['user_data']['address']['postal_code']       = $wc_customer->get_billing_postcode();
     1224        $data_layer['user_data']['address']['country']           = $wc_customer->get_billing_country();
     1225
    12161226        return $data_layer;
    12171227    }
  • gtm-kit/trunk/vendor/composer/installed.php

    r3055017 r3070452  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '3cf9422524e24cc9af0cd6960f103f05967060a7',
     6        'reference' => '69fa09250144c7b59d5dd4a710061f83135678f4',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '3cf9422524e24cc9af0cd6960f103f05967060a7',
     16            'reference' => '69fa09250144c7b59d5dd4a710061f83135678f4',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.