From 7eae84de605314d9cdbb640f3d3b4d975cb3161d Mon Sep 17 00:00:00 2001 From: Torben Lundsgaard Date: Fri, 15 Mar 2024 14:05:56 +0100 Subject: [PATCH] Improved the pagespeed of the control panel --- assets/admin/settings.asset.php | 2 +- assets/admin/settings.css | 2 +- assets/admin/settings.js | 4 +- assets/admin/wizard.asset.php | 2 +- assets/admin/wizard.css | 2 +- assets/admin/wizard.js | 2 +- inc/main.php | 10 ++--- readme.txt | 1 + src/Admin/AbstractOptionsPage.php | 30 +++++++++++++-- src/Admin/AdminAPI.php | 53 --------------------------- src/Admin/GeneralOptionsPage.php | 2 + src/Admin/HelpOptionsPage.php | 1 + src/Admin/IntegrationsOptionsPage.php | 1 + src/Admin/SetupWizard.php | 37 +++++++++++++++++-- src/Admin/TemplatesOptionsPage.php | 1 + 15 files changed, 78 insertions(+), 72 deletions(-) diff --git a/assets/admin/settings.asset.php b/assets/admin/settings.asset.php index 025cbbb..050b305 100644 --- a/assets/admin/settings.asset.php +++ b/assets/admin/settings.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'baa09cc5199cdd5a4c88'); + array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'b0e6f10569c2ee812f9e'); diff --git a/assets/admin/settings.css b/assets/admin/settings.css index 586efe9..23992b7 100644 --- a/assets/admin/settings.css +++ b/assets/admin/settings.css @@ -1 +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-screen-md{max-width:768px}.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-p-4{padding:1rem}.\!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-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-bottom:1.5rem;padding-top:1.5rem}.gtmkit-px-6{padding-left:1.5rem;padding-right:1.5rem}.gtmkit-pb-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} +: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} diff --git a/assets/admin/settings.js b/assets/admin/settings.js index f250e80..3dba2f0 100644 --- a/assets/admin/settings.js +++ b/assets/admin/settings.js @@ -1,4 +1,4 @@ -(()=>{"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,e]=await Promise.all([m("gtmkit/v1/get-options","GET"),m("gtmkit/v1/get-site-data","GET")]),a="wizard"===window.gtmkitSettings.currentPage?await m("gtmkit/v1/get-install-data","GET"):{};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=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{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(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 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{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=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=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=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{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:!0},{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 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