Plugin Directory

Changeset 3139454


Ignore:
Timestamp:
08/22/2024 06:20:50 AM (19 months ago)
Author:
tlamedia
Message:

Update to version 1.23.3 from GitHub

Location:
gtm-kit
Files:
24 edited
1 copied

Legend:

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

    r3134629 r3139454  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'f7cdabceadad6150f3d4');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => '5675825ba95e3805cc8c');
  • gtm-kit/tags/1.23.3/assets/admin/settings.js

    r3134629 r3139454  
    1 (()=>{"use strict";var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React;var n=t.n(e);const a=window.wp.i18n,i=window.wp.element,s=window.wp.components,r=window.lodash,o=window.wp.apiFetch;var l=t.n(o);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const m=async(t,e,n=null,a=!1)=>{let i={};try{i=await l()({path:t,method:e,...n&&{data:n}})}catch(n){return console.log(`${e} ${t} Errors:`,n),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===a?i:!0===i.success?i.data:options},c=(t,e)=>{const n={...t};switch(e.type){case"FETCH_SETTINGS":n.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},n.stateSettings=e.payload.stateSettings,n.siteData=e.payload.siteData,n.installData=e.payload.installData,n.isPending=!1,n.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(n.notice=(0,a.__)("An error occurred.","gtm-kit"),n.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":n.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":n.fetchedSettings=e.payload.fetchedSettings,n.stateSettings=e.payload.stateSettings,n.isPending=!1,n.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,n.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,a.__)("An error occurred.","gtm-kit"):(0,a.__)("Saved Successfully.","gtm-kit"),n.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":n.fetchedSettings=e.payload.fetchedSettings||n.fetchedSettings,n.stateSettings=e.payload.stateSettings||n.stateSettings,n.isPending=e.payload.isPending||n.isPending,n.notice=e.payload.notice||n.notice,n.hasError=e.payload.hasError||n.hasError,n.canSave=e.payload.canSave||n.canSave,n.isSendingSystemData=e.payload.isSendingSystemData||n.isSendingSystemData,n.supportTicket=e.payload.supportTicket||n.supportTicket,n.isSendingLicenseKey=e.payload.isSendingLicenseKey||n.isSendingLicenseKey,n.licenseKey=e.payload.licenseKey||n.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":n.isSendingSystemData=e.payload.isSendingSystemData||n.isSendingSystemData;break;case"SEND_SUPPORT_DATA":n.isSendingSystemData=!1,n.isSystemDataSent=e.payload.isSystemDataSent||n.isSystemDataSent,n.systemDataMessage=e.payload.systemDataMessage||n.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":n.isSendingLicenseKey=e.payload.isSendingLicenseKey||n.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":n.isSendingLicenseKey=!1,n.isLicenseKeySent=e.payload.isLicenseKeySent||n.isLicenseKeySent,n.licenseKeyMessage=e.payload.licenseKeyMessage||n.licenseKeyMessage}return n},g=(0,i.createContext)(),u=t=>{const[n,a]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:""}),s=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},n="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};a({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:n}})},o=async t=>{a({type:"UPDATE_STATE",payload:t})};(0,i.useEffect)((()=>{s()}),[]);const l={useDispatch:t=>{a(t)},useUpdateSettings:async()=>{a({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,m("gtmkit/v1/set-options","POST",e));var e;a({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:o,useUpdateStateSettings:async(t,e,a)=>{const i=JSON.parse(JSON.stringify(n.stateSettings));let s;i[t][e]=a,s=!(0,r.isEqual)(i,n.fetchedSettings),o({stateSettings:i,canSave:s})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let i;const s={};s.general={...a.general,...e.general},"integrations"in e&&(s.integrations={...a.integrations,...e.integrations}),i=!(0,r.isEqual)(s,n.fetchedSettings),o({stateSettings:s,canSave:i})},useUpdateSupportTicket:async t=>{o({supportTicket:t})},useSendSystemData:async()=>{a({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,m("gtmkit/v1/send-support-data","POST",e,!0));var e;a({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{o({licenseKey:t})},useSendLicenseKey:async()=>{a({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(e=n.licenseKey,m("gtmkit/v1/send-license-key","POST",e,!0));var e;a({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage: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,useIsSendingLicenseKey:n.isSendingLicenseKey,useLicenseKey:n.licenseKey,useIsLicenseKeySent:n.isLicenseKeySent,useLicenseKeyMessage:n.licenseKeyMessage,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,e.createElement)(g.Provider,{value:l},t.children)};function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}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 k(t,e){if(!1===t||null==t)throw new Error(e)}function _(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 S(t,e,n,a){return void 0===n&&(n=null),d({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?E(e):e,{state:n,key:e&&e.key||a||Math.random().toString(36).substr(2,8)})}function b(t){let{pathname:e="/",search:n="",hash:a=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function E(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let a=t.indexOf("?");a>=0&&(e.search=t.substr(a),t=t.substr(0,a)),t&&(e.pathname=t)}return e}var v;function x(t,e,n){return void 0===n&&(n="/"),function(t,e,n,a){let i=R(("string"==typeof e?E(e):e).pathname||"/",n);if(null==i)return null;let s=y(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,n)=>t===e[n]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(s);let r=null;for(let t=0;null==r&&t<s.length;++t){let e=O(i);r=I(s[t],e,a)}return r}(t,e,n,!1)}function y(t,e,n,a){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===a&&(a="");let i=(t,i,s)=>{let r={relativePath:void 0===s?t.path||"":s,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};r.relativePath.startsWith("/")&&(k(r.relativePath.startsWith(a),'Absolute route path "'+r.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),r.relativePath=r.relativePath.slice(a.length));let o=F([a,r.relativePath]),l=n.concat(r);t.children&&t.children.length>0&&(k(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),y(t.children,e,l,o)),(null!=t.path||t.index)&&e.push({path:o,score:G(o,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var n;if(""!==t.path&&null!=(n=t.path)&&n.includes("?"))for(let n of w(t.path))i(t,e,n);else i(t,e)})),e}function w(t){let e=t.split("/");if(0===e.length)return[];let[n,...a]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(0===a.length)return i?[s,""]:[s];let r=w(a.join("/")),o=[];return o.push(...r.map((t=>""===t?s:[s,t].join("/")))),i&&o.push(...r),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(v||(v={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const N=/^:[\w-]+$/,C=3,j=2,T=1,U=10,D=-2,P=t=>"*"===t;function G(t,e){let n=t.split("/"),a=n.length;return n.some(P)&&(a+=D),e&&(a+=j),n.filter((t=>!P(t))).reduce(((t,e)=>t+(N.test(e)?C:""===e?T:U)),a)}function I(t,e,n){void 0===n&&(n=!1);let{routesMeta:a}=t,i={},s="/",r=[];for(let t=0;t<a.length;++t){let o=a[t],l=t===a.length-1,m="/"===s?e:e.slice(s.length)||"/",c=M({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},m),g=o.route;if(!c&&l&&n&&!a[a.length-1].route.index&&(c=M({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},m)),!c)return null;Object.assign(i,c.params),r.push({params:i,pathname:F([s,c.pathname]),pathnameBase:H(F([s,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(s=F([s,c.pathnameBase]))}return r}function M(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[n,a]=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),_("*"===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 a=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,n)=>(a.push({paramName:e,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(a.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),a]}(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],r=s.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:a.reduce(((t,e,n)=>{let{paramName:a,isOptional:i}=e;if("*"===a){let t=o[n]||"";r=s.slice(0,s.length-t.length).replace(/(.)\/+$/,"$1")}const l=o[n];return t[a]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:s,pathnameBase:r,pattern:t}}function O(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return _(!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 R(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,a=t.charAt(n);return a&&"/"!==a?null:t.slice(n)||"/"}function L(t,e,n,a){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(a)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function A(t,e){let n=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?n.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)):n.map((t=>t.pathnameBase))}function K(t,e,n,a){let i;void 0===a&&(a=!1),"string"==typeof t?i=E(t):(i=d({},t),k(!i.pathname||!i.pathname.includes("?"),L("?","pathname","search",i)),k(!i.pathname||!i.pathname.includes("#"),L("#","pathname","hash",i)),k(!i.search||!i.search.includes("#"),L("#","search","hash",i)));let s,r=""===t||""===i.pathname,o=r?"/":i.pathname;if(null==o)s=n;else{let t=e.length-1;if(!a&&o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}s=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:n,search:a="",hash:i=""}="string"==typeof t?E(t):t,s=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)})),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:s,search:B(a),hash:W(i)}}(i,s),m=o&&"/"!==o&&o.endsWith("/"),c=(r||"."===o)&&n.endsWith("/");return l.pathname.endsWith("/")||!m&&!c||(l.pathname+="/"),l}const F=t=>t.join("/").replace(/\/\/+/g,"/"),H=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),B=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",W=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 n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}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()||k(!1),e.useContext(X).location}function nt(t){e.useContext(Y).static||e.useLayoutEffect(t)}function at(){let{isDataRoute:t}=e.useContext(Q);return t?function(){let{router:t}=function(t){let n=e.useContext(V);return n||k(!1),n}(ct.UseNavigateStable),n=ut(gt.UseNavigateStable),a=e.useRef(!1);return nt((()=>{a.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),a.current&&("number"==typeof e?t.navigate(e):t.navigate(e,$({fromRouteId:n},i)))}),[t,n])}():function(){tt()||k(!1);let t=e.useContext(V),{basename:n,future:a,navigator:i}=e.useContext(Y),{matches:s}=e.useContext(Q),{pathname:r}=et(),o=JSON.stringify(A(s,a.v7_relativeSplatPath)),l=e.useRef(!1);return nt((()=>{l.current=!0})),e.useCallback((function(e,a){if(void 0===a&&(a={}),!l.current)return;if("number"==typeof e)return void i.go(e);let s=K(e,JSON.parse(o),r,"path"===a.relative);null==t&&"/"!==n&&(s.pathname="/"===s.pathname?n:F([n,s.pathname])),(a.replace?i.replace:i.push)(s,a.state,a)}),[n,i,o,r,t])}()}function it(t,n){let{relative:a}=void 0===n?{}:n,{future:i}=e.useContext(Y),{matches:s}=e.useContext(Q),{pathname:r}=et(),o=JSON.stringify(A(s,i.v7_relativeSplatPath));return e.useMemo((()=>K(t,JSON.parse(o),r,"path"===a)),[t,o,r,a])}function st(t,n,a,i){tt()||k(!1);let{navigator:s}=e.useContext(Y),{matches:r}=e.useContext(Q),o=r[r.length-1],l=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,g=et();if(n){var u;let t="string"==typeof n?E(n):n;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||k(!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 _=x(t,{pathname:h}),f=function(t,n,a,i){var s;if(void 0===n&&(n=[]),void 0===a&&(a=null),void 0===i&&(i=null),null==t){var r;if(null==(r=a)||!r.errors)return null;t=a.matches}let o=t,l=null==(s=a)?void 0:s.errors;if(null!=l){let t=o.findIndex((t=>t.route.id&&void 0!==(null==l?void 0:l[t.route.id])));t>=0||k(!1),o=o.slice(0,Math.min(o.length,t+1))}let m=!1,c=-1;if(a&&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:n}=a,i=e.route.loader&&void 0===t[e.route.id]&&(!n||void 0===n[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,s)=>{let r,g=!1,u=null,d=null;var p;a&&(r=l&&i.route.id?l[i.route.id]:void 0,u=i.route.errorElement||ot,m&&(c<0&&0===s?(dt[p="route-fallback"]||(dt[p]=!0),g=!0,d=null):c===s&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=n.concat(o.slice(0,s+1)),k=()=>{let n;return n=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!=a},children:n})};return a&&(i.route.ErrorBoundary||i.route.errorElement||0===s)?e.createElement(lt,{location:a.location,revalidation:a.revalidation,component:u,error:r,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(_&&_.map((t=>Object.assign({},t,{params:Object.assign({},l,t.params),pathname:F([m,s.encodeLocation?s.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:F([m,s.encodeLocation?s.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),r,a,i);return n&&f?e.createElement(X.Provider,{value:{location:$({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:p.Pop}},f):f}function rt(){let t=function(){var t;let n=e.useContext(Z),a=function(t){let n=e.useContext(q);return n||k(!1),n}(gt.UseRouteError),i=ut(gt.UseRouteError);return void 0!==n?n:null==(t=a.errors)?void 0:t[i]}(),n=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),a=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"}},n),a?e.createElement("pre",{style:i},a):null,null)}const ot=e.createElement(rt,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(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:n,match:a,children:i}=t,s=e.useContext(V);return s&&s.static&&s.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=a.route.id),e.createElement(Q.Provider,{value:n},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 n=function(t){let n=e.useContext(Q);return n||k(!1),n}(),a=n.matches[n.matches.length-1];return a.route.id||k(!1),a.route.id}const dt={};function pt(t){let{to:n,replace:a,state:i,relative:s}=t;tt()||k(!1);let{future:r,static:o}=e.useContext(Y),{matches:l}=e.useContext(Q),{pathname:m}=et(),c=at(),g=K(n,A(l,r.v7_relativeSplatPath),m,"path"===s),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:a,state:i,relative:s})),[c,u,s,a,i]),null}function ht(t){k(!1)}function kt(t){let{basename:n="/",children:a=null,location:i,navigationType:s=p.Pop,navigator:r,static:o=!1,future:l}=t;tt()&&k(!1);let m=n.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:r,static:o,future:$({v7_relativeSplatPath:!1},l)})),[m,l,r,o]);"string"==typeof i&&(i=E(i));let{pathname:g="/",search:u="",hash:d="",state:h=null,key:_="default"}=i,f=e.useMemo((()=>{let t=R(g,m);return null==t?null:{location:{pathname:t,search:u,hash:d,state:h,key:_},navigationType:s}}),[m,g,u,d,h,_,s]);return null==f?null:e.createElement(Y.Provider,{value:c},e.createElement(X.Provider,{children:a,value:f}))}function _t(t){let{children:e,location:n}=t;return st(ft(e),n)}function ft(t,n){void 0===n&&(n=[]);let a=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let s=[...n,i];if(t.type===e.Fragment)return void a.push.apply(a,ft(t.props.children,s));t.type!==ht&&k(!1),t.props.index&&t.props.children&&k(!1);let r={id:t.props.id||s.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,s)),a.push(r)})),a}e.startTransition,new Promise((()=>{})),e.Component;const St=window.ReactDOM;var bt=t.n(St);function Et(){return Et=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Et.apply(this,arguments)}function vt(t,e){if(null==t)return{};var n,a,i={},s=Object.keys(t);for(a=0;a<s.length;a++)n=s[a],e.indexOf(n)>=0||(i[n]=t[n]);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"],yt=["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:n,children:a,future:i,window:s}=t,r=e.useRef();null==r.current&&(r.current=function(t){return void 0===t&&(t={}),function(t,e,n,a){void 0===a&&(a={});let{window:i=document.defaultView,v5Compat:s=!1}=a,r=i.history,o=p.Pop,l=null,m=c();function c(){return(r.state||{idx:null}).idx}function g(){o=p.Pop;let t=c(),e=null==t?null:t-m;m=t,l&&l({action:o,location:_.location,delta:e})}function u(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof t?t:b(t);return n=n.replace(/ $/,"%20"),k(e,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,e)}null==m&&(m=0,r.replaceState(d({},r.state,{idx:m}),""));let _={get action(){return o},get location(){return t(i,r)},listen(t){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(h,g),l=t,()=>{i.removeEventListener(h,g),l=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){o=p.Push;let a=S(_.location,t,e);n&&n(a,t),m=c()+1;let g=f(a,m),u=_.createHref(a);try{r.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}s&&l&&l({action:o,location:_.location,delta:1})},replace:function(t,e){o=p.Replace;let a=S(_.location,t,e);n&&n(a,t),m=c();let i=f(a,m),g=_.createHref(a);r.replaceState(i,"",g),s&&l&&l({action:o,location:_.location,delta:0})},go:t=>r.go(t)};return _}((function(t,e){let{pathname:n="/",search:a="",hash:i=""}=E(t.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),S("",{pathname:n,search:a,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let n=t.document.querySelector("base"),a="";if(n&&n.getAttribute("href")){let e=t.location.href,n=e.indexOf("#");a=-1===n?e:e.slice(0,n)}return a+"#"+("string"==typeof e?e:b(e))}),(function(t,e){_("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:s,v5Compat:!0}));let o=r.current,[l,m]=e.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&Nt?Nt((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>o.listen(g)),[o,g]),e.createElement(kt,{basename:n,children:a,location:l.location,navigationType:l.action,navigator:o,future:i})}St.flushSync,e.useId;const jt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Tt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ut=e.forwardRef((function(t,n){let a,{onClick:i,relative:s,reloadDocument:r,replace:o,state:l,target:m,to:c,preventScrollReset:g,unstable_viewTransition:u}=t,d=vt(t,xt),{basename:p}=e.useContext(Y),h=!1;if("string"==typeof c&&Tt.test(c)&&(a=c,jt))try{let t=new URL(window.location.href),e=c.startsWith("//")?new URL(t.protocol+c):new URL(c),n=R(e.pathname,p);e.origin===t.origin&&null!=n?c=n+e.search+e.hash:h=!0}catch(t){}let _=function(t,n){let{relative:a}=void 0===n?{}:n;tt()||k(!1);let{basename:i,navigator:s}=e.useContext(Y),{hash:r,pathname:o,search:l}=it(t,{relative:a}),m=o;return"/"!==i&&(m="/"===o?i:F([i,o])),s.createHref({pathname:m,search:l,hash:r})}(c,{relative:s}),f=function(t,n){let{target:a,replace:i,state:s,preventScrollReset:r,relative:o,unstable_viewTransition:l}=void 0===n?{}:n,m=at(),c=et(),g=it(t,{relative:o});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,a)){e.preventDefault();let n=void 0!==i?i:b(c)===b(g);m(t,{replace:n,state:s,preventScrollReset:r,relative:o,unstable_viewTransition:l})}}),[c,m,g,i,s,a,t,r,o,l])}(c,{replace:o,state:l,target:m,preventScrollReset:g,relative:s,unstable_viewTransition:u});return e.createElement("a",Et({},d,{href:a||_,onClick:h||r?i:function(t){i&&i(t),t.defaultPrevented||f(t)},ref:n,target:m}))})),Dt=e.forwardRef((function(t,n){let{"aria-current":a="page",caseSensitive:i=!1,className:s="",end:r=!1,style:o,to:l,unstable_viewTransition:m,children:c}=t,g=vt(t,yt),u=it(l,{relative:g.relative}),d=et(),p=e.useContext(q),{navigator:h,basename:_}=e.useContext(Y),f=null!=p&&function(t,n){void 0===n&&(n={});let a=e.useContext(wt);null==a&&k(!1);let{basename:i}=function(t){let n=e.useContext(V);return n||k(!1),n}(Pt.useViewTransitionState),s=it(t,{relative:n.relative});if(!a.isTransitioning)return!1;let r=R(a.currentLocation.pathname,i)||a.currentLocation.pathname,o=R(a.nextLocation.pathname,i)||a.nextLocation.pathname;return null!=M(s.pathname,o)||null!=M(s.pathname,r)}(u)&&!0===m,S=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,b=d.pathname,E=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(b=b.toLowerCase(),E=E?E.toLowerCase():null,S=S.toLowerCase()),E&&_&&(E=R(E,_)||E);const v="/"!==S&&S.endsWith("/")?S.length-1:S.length;let x,y=b===S||!r&&b.startsWith(S)&&"/"===b.charAt(v),w=null!=E&&(E===S||!r&&E.startsWith(S)&&"/"===E.charAt(S.length)),N={isActive:y,isPending:w,isTransitioning:f},C=y?a:void 0;x="function"==typeof s?s(N):[s,y?"active":null,w?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let j="function"==typeof o?o(N):o;return e.createElement(Ut,Et({},g,{"aria-current":C,className:x,ref:n,style:j,to:l,unstable_viewTransition:m}),"function"==typeof c?c(N):c)}));var Pt,Gt;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Pt||(Pt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Gt||(Gt={}));const It=({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)))),Mt=({to:t,title:n})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Dt,{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 ":"")},n)),Ot=({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)(Mt,{key:t.to,to:t.to,title:t.title})})));function Rt(){return Rt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Rt.apply(this,arguments)}function Lt(t,e){if(null==t)return{};var n,a,i={},s=Object.keys(t);for(a=0;a<s.length;a++)n=s[a],e.indexOf(n)>=0||(i[n]=t[n]);return i}function At(t,e){return At=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},At(t,e)}function Kt(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,At(t,e)}function Ft(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Ht=n().createContext(null);var Bt=function(t){return t.scrollTop},Wt="unmounted",Jt="exited",zt="entering",$t="entered",Vt="exiting",qt=function(t){function e(e,n){var a;a=t.call(this,e,n)||this;var i,s=n&&!n.isMounting?e.enter:e.appear;return a.appearStatus=null,e.in?s?(i=Jt,a.appearStatus=zt):i=$t:i=e.unmountOnExit||e.mountOnEnter?Wt:Jt,a.state={status:i},a.nextCallback=null,a}Kt(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Wt?{status:Jt}:null};var a=e.prototype;return a.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},a.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==zt&&n!==$t&&(e=zt):n!==zt&&n!==$t||(e=Vt)}this.updateStatus(!1,e)},a.componentWillUnmount=function(){this.cancelNextCallback()},a.getTimeouts=function(){var t,e,n,a=this.props.timeout;return t=e=n=a,null!=a&&"number"!=typeof a&&(t=a.exit,e=a.enter,n=void 0!==a.appear?a.appear:e),{exit:t,enter:e,appear:n}},a.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 n=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this);n&&Bt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jt&&this.setState({status:Wt})},a.performEnter=function(t){var e=this,n=this.props.enter,a=this.context?this.context.isMounting:t,i=this.props.nodeRef?[a]:[bt().findDOMNode(this),a],s=i[0],r=i[1],o=this.getTimeouts(),l=a?o.appear:o.enter;t||n?(this.props.onEnter(s,r),this.safeSetState({status:zt},(function(){e.props.onEntering(s,r),e.onTransitionEnd(l,(function(){e.safeSetState({status:$t},(function(){e.props.onEntered(s,r)}))}))}))):this.safeSetState({status:$t},(function(){e.props.onEntered(s)}))},a.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:bt().findDOMNode(this);e?(this.props.onExit(a),this.safeSetState({status:Vt},(function(){t.props.onExiting(a),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Jt},(function(){t.props.onExited(a)}))}))}))):this.safeSetState({status:Jt},(function(){t.props.onExited(a)}))},a.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},a.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},a.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(a){n&&(n=!1,e.nextCallback=null,t(a))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},a.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this),a=null==t&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],s=i[0],r=i[1];this.props.addEndListener(s,r)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},a.render=function(){var t=this.state.status;if(t===Wt)return null;var e=this.props,a=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 n().createElement(Ht.Provider,{value:null},"function"==typeof a?a(t,i):n().cloneElement(n().Children.only(a),i))},e}(n().Component);function Yt(){}qt.contextType=Ht,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=Wt,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 a=e,void((n=t).classList?n.classList.remove(a):"string"==typeof n.className?n.className=Ft(n.className,a):n.setAttribute("class",Ft(n.className&&n.className.baseVal||"",a)));var n,a}))},Zt=function(t){function e(){for(var e,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var a=e.resolveArguments(t,n),i=a[0],s=a[1];e.removeClasses(i,"exit"),e.addClass(i,s?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var a=e.resolveArguments(t,n),i=a[0],s=a[1]?"appear":"enter";e.addClass(i,s,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var a=e.resolveArguments(t,n),i=a[0],s=a[1]?"appear":"enter";e.removeClasses(i,s),e.addClass(i,s,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,a="string"==typeof n,i=a?(a&&n?n+"-":"")+t:n[t];return{baseClassName:i,activeClassName:a?i+"-active":n[t+"Active"],doneClassName:a?i+"-done":n[t+"Done"]}},e}Kt(e,t);var a=e.prototype;return a.addClass=function(t,e,n){var a=this.getClassNames(e)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===n&&i&&(a+=" "+i),"active"===n&&t&&Bt(t),a&&(this.appliedClasses[e][n]=a,function(t,e){t&&e&&e.split(" ").forEach((function(e){return a=e,void((n=t).classList?n.classList.add(a):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(n,a)||("string"==typeof n.className?n.className=n.className+" "+a:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+a)));var n,a}))}(t,a))},a.removeClasses=function(t,e){var n=this.appliedClasses[e],a=n.base,i=n.active,s=n.done;this.appliedClasses[e]={},a&&Qt(t,a),i&&Qt(t,i),s&&Qt(t,s)},a.render=function(){var t=this.props,e=(t.classNames,Lt(t,["classNames"]));return n().createElement(Xt,Rt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(n().Component);Zt.defaultProps={classNames:""},Zt.propTypes={};const te=Zt,ee=({title:t=(0,a.__)("Save","gtm-kit"),className:n="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:o,useCanSave:l}=(0,i.useContext)(g);return(0,e.createElement)(s.Button,{className:n,onClick:()=>r(),variant:"primary",disabled:o||!l},l?(0,a.__)(t,"gtm-kit"):(0,a.__)("Saved","gtm-kit"),o?(0,e.createElement)(s.Spinner,null):"")},ne=()=>{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)))},ae=({subject:t})=>{const n=!0===t||"on"===t,i=!0===n?"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},n?(0,a.__)("Active","gtm-kit"):(0,a.__)("Inactive","gtm-kit"))},ie=(0,i.forwardRef)((({children:t,className:n="",...a},i)=>(0,e.createElement)("div",{...a,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 "+n,ref:i},t)));ie.Header=({as:t="h3",title:n="",children:a,className:i="",...s})=>(0,e.createElement)("div",{...s,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"},n),a),ie.Content=({as:t="div",children:n,className:a="gtmkit-flex-auto",...i})=>(0,e.createElement)(t,{...i,className:a},n),ie.Button=({url:t,destination:n,newTab:a=!1,text:i,group:r="",...o})=>{const l=at();return(0,e.createElement)("div",{...o,className:"gtmkit-mt-4 gtmkit-mb-0.5"},(0,e.createElement)(s.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full sm:gtmkit-w-auto gtmkit-min-w-[225px]",onClick:()=>{n&&t&&!1===a?window.gtmkitSettings.current_poage===r?l(n,{replace:!0}):window.location.href=t+"#"+n:t?a?window.open(t):window.location.href=t:l(n,{replace:!0})}},(0,e.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},i)))};const se=ie,re=({title:t,data:n,className:s=""})=>{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] "+s},n.map(((t,n)=>!1===t.featured?null:(0,e.createElement)(se,{key:n},(0,e.createElement)(se.Header,{title:t.title},t.pill?(0,e.createElement)(ae,{subject:r[t.group][t.option]}):null),(0,e.createElement)(se.Content,null,t.text.map(((t,n)=>(0,e.createElement)("p",{key:n},t)))),(0,e.createElement)(se.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,a.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group}))))))},oe=t=>((t,e,n)=>{const a=(t,n)=>({...n,title:t.title,to:t.path,group:t.group||n.group,option:t.option||n.option,text:[t.description],link:{...n.link,url:window.gtmkitSettings[e+"Url"],destination:"/"+t.path}});return"templates"===e?Object.keys(t).map((e=>a(t[e][0],n))):Object.keys(t).map((e=>a(t[e],n)))})(window.gtmkitSettings[t],t,function(t){switch(t){case"integrations":return{pill:!0,group:"integrations",option:null,link:{internal:!0,text:(0,a.__)("Setup Integration","gtm-kit")}};case"templates":return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,a.__)("Get Template","gtm-kit")}};default:return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,a.__)("Read More","gtm-kit")}}}}(t)),le=()=>{const{useSettings:t}=(0,i.useContext)(g),[n,s]=(0,i.useState)(window.gtmkitSettings.tutorials),r=Boolean(t.general.sgtm_domain&&t.general.sgtm_domain.trim());return(0,i.useEffect)((()=>{s((t=>[...t,{title:(0,a.__)("See all tutorials","gtm-kit"),text:[(0,a.__)("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,a.__)("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,a.__)("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)(se,null,(0,e.createElement)(se.Header,{title:"Google Tag Manager Container"},(0,e.createElement)(ae,{subject:t.general.gtm_id&&t.general.container_active})),(0,e.createElement)(se.Content,null,t.general.gtm_id&&t.general.container_active?(0,e.createElement)("p",null,(0,a.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id):(0,e.createElement)("p",null,(0,a.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,e.createElement)(se.Button,{destination:"/container",text:(0,a.__)("Edit container","gtm-kit")})),(0,e.createElement)(se,null,(0,e.createElement)(se.Header,{title:(0,a.__)("Server-side GTM","gtm-kit")},(0,e.createElement)(ae,{subject:r})),(0,e.createElement)(se.Content,null,(0,e.createElement)("p",null,(0,a.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit"))),(0,e.createElement)(se.Button,{destination:"/container",text:(0,a.__)("Edit container","gtm-kit")})),(0,e.createElement)(se,null,(0,e.createElement)(se.Header,{title:(0,a.__)("Help improve GTM Kit","gtm-kit")},(0,e.createElement)(ae,{subject:t.general.analytics_active})),(0,e.createElement)(se.Content,null,(0,e.createElement)("p",null,(0,a.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,e.createElement)(se.Button,{destination:"/misc",text:(0,a.__)("Share anonymous data","gtm-kit")}))),(0,e.createElement)(re,{title:(0,a.__)("Tutorials","gtm-kit"),data:n}),(0,e.createElement)(re,{title:(0,a.__)("Integrations","gtm-kit"),data:oe("integrations")}))},me=({title:t,placeholder:n,help:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:r="general",optionName:o,isDisabled:l,useSettings:m,useUpdateStateSettings:c})=>(0,e.createElement)(s.TextControl,{label:t,placeholder:n,help:a,className:i,value:m[r][o],onChange:t=>c(r,o,t),disabled:l}),ce=({title:t,label:n,optionGroup:a="general",optionName:i,disabled:r=!1,useSettings:o,useUpdateStateSettings:l})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,e.createElement)(s.BaseControl,{label:t},(0,e.createElement)(s.ToggleControl,{label:n,checked:!r&&o[a][i],onChange:()=>{l(a,i,!(o&&o[a][i]))},disabled:r})))),ge=({title:t,options:n,help:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:r="general",optionName:o,disabled:l,useSettings:m,useUpdateStateSettings:c})=>(0,e.createElement)(s.RadioControl,{label:t,options:n,help:a,className:i,selected:parseInt(m[r][o]),onChange:t=>c(r,o,t),disabled:l}),ue=({title:t,help:n,items:a=[],optionGroup:r="general",optionName:o,disabled:l=!1,useSettings:m,useUpdateStateSettings:c})=>{const g=Array.isArray(m[r][o])?m[r][o]:[],[u,d]=(0,i.useState)(g);return(0,i.useEffect)((()=>{const t=Array.isArray(m[r][o])?m[r][o]:[];d(t)}),[m]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,e.createElement)(s.BaseControl,{label:t,help:n},a.map((t=>(0,e.createElement)(s.CheckboxControl,{key:t.role,label:t.name,disabled:l,checked:u.includes(t.role),onChange:e=>((t,e)=>{d((n=>{let a;return a=t?[...n,e]:n.filter((t=>t!==e)),c(r,o,a),a}))})(e,t.role)}))))))},de=window.ReactJSXRuntime,pe=(0,i.forwardRef)((({children:t,className:e="",disabled:n=!1,...a},i)=>(0,de.jsx)("div",{...a,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-w-3/4 gtmkit-border-color-grey "+e+(n?"gtmkit-opacity-60":""),ref:i,children:t})));pe.Header=({as:t="h3",title:e="",children:n,className:a="",...i})=>(0,de.jsxs)(t,{...i,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey gtmkit-flex gtmkit-items-center "+a,children:[e,n]}),pe.Content=({as:t="div",children:e,className:n="",...a})=>(0,de.jsx)(t,{...a,className:"gtmkit-px-8 gtmkit-py-6 "+n,children:e});const he=pe,ke=()=>{const{useSettings:t,useUpdateStateSettings:n,useUserRoles:s}=(0,i.useContext)(g),r=!(t.general.sgtm_domain&&t.general.sgtm_domain.trim()&&t.general.sgtm_container_identifier&&t.general.sgtm_container_identifier.trim()),o=et();return(0,e.useEffect)((()=>{const t=new URLSearchParams(o.search).get("focus");if(t){const e=document.getElementById(t);e&&e.scrollIntoView()}}),[o]),(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,a.__)("Google Tag Manager container","gtm-kit")}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("General Container Settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")}),(0,de.jsx)(me,{title:(0,a.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,a.__)("Enter GTM Container ID","gtm-kit"),useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)(ce,{title:(0,a.__)("Inject Container Code","gtm-kit"),label:(0,a.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active",useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)(ce,{title:(0,a.__)("Just the container","gtm-kit"),label:(0,a.__)("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",useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)(me,{title:(0,a.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,a.__)("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"),useSettings:t,useUpdateStateSettings:n})]})]}),(0,de.jsx)("div",{id:"sgtm"}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(me,{title:(0,a.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,a.__)("Enter domain","gtm-kit"),help:(0,a.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit"),useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)(me,{title:(0,a.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,a.__)("Enter loader name","gtm-kit"),help:(0,a.__)("Only use if you are using a custom loader.","gtm-kit"),useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)(ce,{title:(0,a.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,a.__)("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:r,useSettings:t,useUpdateStateSettings:n})]}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Google Tag Manager Server-side Tagging","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]}),(0,de.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Hosting server-side GTM containers","gtm-kit")}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("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,a.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")]}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,de.jsx)("a",{href:"https://stape.io/?pt=tlam&rs=plugin",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer",children:(0,a.__)("Learn more about Stape.io","gtm-kit")})})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Page Speed Optimization","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsx)(he.Content,{children:(0,de.jsx)(ce,{title:(0,a.__)("load_delayed_js event","gtm-kit"),label:(0,a.__)("Setting this to On will push the event 'load_delayed_js' on page load.","gtm-kit"),optionName:"load_js_event",useSettings:t,useUpdateStateSettings:n})}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Delay JavaScript execution","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("Page optimization plugins can delay the 'load_delayed_js' event and this can be used to delay the triggering og tags in Google Tag Manager.","gtm-kit")," ",(0,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Google Tag Manager Environment","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(me,{title:(0,a.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,a.__)("Enter gtm_auth code","gtm-kit"),help:(0,a.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit"),useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)(me,{title:(0,a.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,a.__)("Enter gtm_preview code","gtm-kit"),help:(0,a.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit"),useSettings:t,useUpdateStateSettings:n})]}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Environments","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,a.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,a.__)("If left empty the default environment will be used.","gtm-kit")]}),(0,de.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Override settings in wp-config.php","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("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,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Exclude User Roles","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsx)(he.Content,{children:(0,de.jsx)(ue,{title:(0,a.__)("Exclude user roles","gtm-kit"),help:(0,a.__)("Select the roles that you want to exclude from tracking.","gtm-kit"),items:s,optionName:"exclude_user_roles",useSettings:t,useUpdateStateSettings:n})}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold gtmkit-text-red-600",children:(0,a.__)("Warning!","gtm-kit")}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("Excluding user roles is not compatible with all full-page cache solutions. Some full-page cache solutions may cache the page identically for all users, regardless of their user role. This could result in users being excluded who should not be.","gtm-kit")}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("Please ensure thorough and proper testing of this.","gtm-kit")})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Container Code Implementation","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(ge,{title:(0,a.__)("Container code implementation:","gtm-kit"),options:[{label:(0,a.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,a.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,a.__)("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",useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)(ge,{title:(0,a.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,a.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,a.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,a.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,a.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,a.__)('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",useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,de.jsx)("code",{children:"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"})})]})]})]})},_e=()=>{const{useSettings:t,useUpdateStateSettings:n}=(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,a.__)("Post Data","gtm-kit")),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Post Data Settings","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("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,a.__)("Post type","gtm-kit"),id:"post-type",label:(0,a.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Page type","gtm-kit"),id:"page-type",label:(0,a.__)('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",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Categories","gtm-kit"),id:"categories",label:(0,a.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Tags","gtm-kit"),id:"tags",label:(0,a.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Post title","gtm-kit"),id:"post-title",label:(0,a.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Post ID","gtm-kit"),id:"post-id",label:(0,a.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Post data","gtm-kit"),id:"post-date",label:(0,a.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,a.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,a.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id",useSettings:t,useUpdateStateSettings:n}))))},fe=()=>{const{useSettings:t,useUpdateStateSettings:n}=(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,a.__)("User Data","gtm-kit")),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,e.createElement)(he.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,a.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,e.createElement)("p",null,(0,a.__)("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)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("User Data Settings","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(ce,{title:(0,a.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,a.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("User ID","gtm-kit"),id:"user-id",label:(0,a.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("User role","gtm-kit"),id:"user-role",label:(0,a.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role",useSettings:t,useUpdateStateSettings:n}))))},Se=()=>{const{useSettings:t,useUpdateStateSettings:n}=(0,i.useContext)(g),s=!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,a.__)("Google Consent Mode","gtm-kit")),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Google Consent Mode Activation","gtm-kit")},(0,e.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,a.__)("Warning!","gtm-kit"))),(0,e.createElement)(he.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,a.__)("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,a.__)("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,a.__)("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,a.__)("See an example of how consent is updated","gtm-kit"))),(0,e.createElement)(ce,{title:(0,a.__)("Activate GCM settings","gtm-kit"),label:(0,a.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings",useSettings:t,useUpdateStateSettings:n}))),(0,e.createElement)(he,{disabled:s},(0,e.createElement)(he.Header,{title:(0,a.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(ce,{title:(0,a.__)("Ad Personalization","gtm-kit"),label:(0,a.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Ad Storage","gtm-kit"),label:(0,a.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Ad User Data","gtm-kit"),label:(0,a.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Analytics Storage","gtm-kit"),label:(0,a.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Functionality Storage","gtm-kit"),label:(0,a.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Personalization Storage","gtm-kit"),label:(0,a.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Security Storage","gtm-kit"),label:(0,a.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)("h4",{className:"gtmkit-font-bold gtmkit-pt-8"},(0,a.__)("Advanced","gtm-kit")),(0,e.createElement)(ce,{title:(0,a.__)("Redact Ads Data","gtm-kit"),label:(0,a.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Pass through URL parameters","gtm-kit"),label:(0,a.__)("Pass through ad click, client ID, and session ID information in URLs","gtm-kit"),optionName:"gcm_url_passthrough",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(me,{title:(0,a.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,a.__)("Enter time in milliseconds","gtm-kit"),useSettings:t,useUpdateStateSettings:n}))))},be=({label:t,value:n,tag:a})=>(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"===a?(0,e.createElement)("code",{className:"gtmkit-text-sm"},n):(0,e.createElement)("em",null,n))),Ee=()=>{const{useSiteData:t}=(0,i.useContext)(g),n=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,a.__)("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,a.__)("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"},n.map((function(t,n){return(0,e.createElement)(be,{key:n,label:t.label,value:t.value,tag:t.tag})})))))},ve=()=>{const{useSettings:t,useUpdateStateSettings:n}=(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,a.__)("Misc","gtm-kit")),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Help improve GTM Kit","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(Ee,null),(0,e.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,a.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,e.createElement)(ce,{title:(0,a.__)("Share anonymous data","gtm-kit"),label:(0,a.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active",useSettings:t,useUpdateStateSettings:n}))),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Logging and debugging","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(ce,{title:(0,a.__)("Event Inspector","gtm-kit"),label:(0,a.__)("The event inspector is placed in the footer of the front and it allows you to see all the fired GTM events.","gtm-kit"),optionName:"event_inspector",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Console log","gtm-kit"),label:(0,a.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Debug log","gtm-kit"),label:(0,a.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log",useSettings:t,useUpdateStateSettings:n}))))},xe=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(re,{title:(0,a.__)("Integrations","gtm-kit"),data:oe("integrations")})),ye=({pluginName:t})=>(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.sprintf)(
     1(()=>{"use strict";var t={251:(t,e,n)=>{var a=n(196),i=Symbol.for("react.element"),r=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,o=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function m(t,e,n){var a,r={},m=null,c=null;for(a in void 0!==n&&(m=""+n),void 0!==e.key&&(m=""+e.key),void 0!==e.ref&&(c=e.ref),e)s.call(e,a)&&!l.hasOwnProperty(a)&&(r[a]=e[a]);if(t&&t.defaultProps)for(a in e=t.defaultProps)void 0===r[a]&&(r[a]=e[a]);return{$$typeof:i,type:t,key:m,ref:c,props:r,_owner:o.current}}e.Fragment=r,e.jsx=m,e.jsxs=m},893:(t,e,n)=>{t.exports=n(251)},196:t=>{t.exports=window.React}},e={};function n(a){var i=e[a];if(void 0!==i)return i.exports;var r=e[a]={exports:{}};return t[a](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var a in e)n.o(e,a)&&!n.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=n(196),e=n.n(t);const a=window.wp.i18n,i=window.wp.element,r=window.wp.components,s=window.lodash,o=window.wp.apiFetch;var l=n.n(o);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const m=async(t,e,n=null,a=!1)=>{let i={};try{i=await l()({path:t,method:e,...n&&{data:n}})}catch(n){return console.log(`${e} ${t} Errors:`,n),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===a?i:!0===i.success?i.data:options},c=(t,e)=>{const n={...t};switch(e.type){case"FETCH_SETTINGS":n.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},n.stateSettings=e.payload.stateSettings,n.siteData=e.payload.siteData,n.installData=e.payload.installData,n.isPending=!1,n.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(n.notice=(0,a.__)("An error occurred.","gtm-kit"),n.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":n.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":n.fetchedSettings=e.payload.fetchedSettings,n.stateSettings=e.payload.stateSettings,n.isPending=!1,n.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,n.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,a.__)("An error occurred.","gtm-kit"):(0,a.__)("Saved Successfully.","gtm-kit"),n.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":n.fetchedSettings=e.payload.fetchedSettings||n.fetchedSettings,n.stateSettings=e.payload.stateSettings||n.stateSettings,n.isPending=e.payload.isPending||n.isPending,n.notice=e.payload.notice||n.notice,n.hasError=e.payload.hasError||n.hasError,n.canSave=e.payload.canSave||n.canSave,n.isSendingSystemData=e.payload.isSendingSystemData||n.isSendingSystemData,n.supportTicket=e.payload.supportTicket||n.supportTicket,n.isSendingLicenseKey=e.payload.isSendingLicenseKey||n.isSendingLicenseKey,n.licenseKey=e.payload.licenseKey||n.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":n.isSendingSystemData=e.payload.isSendingSystemData||n.isSendingSystemData;break;case"SEND_SUPPORT_DATA":n.isSendingSystemData=!1,n.isSystemDataSent=e.payload.isSystemDataSent||n.isSystemDataSent,n.systemDataMessage=e.payload.systemDataMessage||n.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":n.isSendingLicenseKey=e.payload.isSendingLicenseKey||n.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":n.isSendingLicenseKey=!1,n.isLicenseKeySent=e.payload.isLicenseKeySent||n.isLicenseKeySent,n.licenseKeyMessage=e.payload.licenseKeyMessage||n.licenseKeyMessage}return n},g=(0,i.createContext)(),u=e=>{const[n,a]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:""}),r=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},n="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};a({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:n}})},o=async t=>{a({type:"UPDATE_STATE",payload:t})};(0,i.useEffect)((()=>{r()}),[]);const l={useDispatch:t=>{a(t)},useUpdateSettings:async()=>{a({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,m("gtmkit/v1/set-options","POST",e));var e;a({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:r,useUpdateState:o,useUpdateStateSettings:async(t,e,a)=>{const i=JSON.parse(JSON.stringify(n.stateSettings));let r;i[t][e]=a,r=!(0,s.isEqual)(i,n.fetchedSettings),o({stateSettings:i,canSave:r})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let i;const r={};r.general={...a.general,...e.general},"integrations"in e&&(r.integrations={...a.integrations,...e.integrations}),i=!(0,s.isEqual)(r,n.fetchedSettings),o({stateSettings:r,canSave:i})},useUpdateSupportTicket:async t=>{o({supportTicket:t})},useSendSystemData:async()=>{a({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,m("gtmkit/v1/send-support-data","POST",e,!0));var e;a({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{o({licenseKey:t})},useSendLicenseKey:async()=>{a({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(e=n.licenseKey,m("gtmkit/v1/send-license-key","POST",e,!0));var e;a({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage: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,useIsSendingLicenseKey:n.isSendingLicenseKey,useLicenseKey:n.licenseKey,useIsLicenseKeySent:n.isLicenseKeySent,useLicenseKeyMessage:n.licenseKeyMessage,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,t.createElement)(g.Provider,{value:l},e.children)};function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}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 S(t,e,n,a){return void 0===n&&(n=null),d({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?E(e):e,{state:n,key:e&&e.key||a||Math.random().toString(36).substr(2,8)})}function b(t){let{pathname:e="/",search:n="",hash:a=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function E(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let a=t.indexOf("?");a>=0&&(e.search=t.substr(a),t=t.substr(0,a)),t&&(e.pathname=t)}return e}var v;function y(t,e,n){return void 0===n&&(n="/"),function(t,e,n,a){let i=R(("string"==typeof e?E(e):e).pathname||"/",n);if(null==i)return null;let r=x(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,n)=>t===e[n]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(r);let s=null;for(let t=0;null==s&&t<r.length;++t){let e=M(i);s=G(r[t],e,a)}return s}(t,e,n,!1)}function x(t,e,n,a){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===a&&(a="");let i=(t,i,r)=>{let s={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};s.relativePath.startsWith("/")&&(_(s.relativePath.startsWith(a),'Absolute route path "'+s.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(a.length));let o=K([a,s.relativePath]),l=n.concat(s);t.children&&t.children.length>0&&(_(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),x(t.children,e,l,o)),(null!=t.path||t.index)&&e.push({path:o,score:I(o,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var n;if(""!==t.path&&null!=(n=t.path)&&n.includes("?"))for(let n of w(t.path))i(t,e,n);else i(t,e)})),e}function w(t){let e=t.split("/");if(0===e.length)return[];let[n,...a]=e,i=n.endsWith("?"),r=n.replace(/\?$/,"");if(0===a.length)return i?[r,""]:[r];let s=w(a.join("/")),o=[];return o.push(...s.map((t=>""===t?r:[r,t].join("/")))),i&&o.push(...s),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(v||(v={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const N=/^:[\w-]+$/,C=3,j=2,T=1,U=10,D=-2,P=t=>"*"===t;function I(t,e){let n=t.split("/"),a=n.length;return n.some(P)&&(a+=D),e&&(a+=j),n.filter((t=>!P(t))).reduce(((t,e)=>t+(N.test(e)?C:""===e?T:U)),a)}function G(t,e,n){void 0===n&&(n=!1);let{routesMeta:a}=t,i={},r="/",s=[];for(let t=0;t<a.length;++t){let o=a[t],l=t===a.length-1,m="/"===r?e:e.slice(r.length)||"/",c=O({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},m),g=o.route;if(!c&&l&&n&&!a[a.length-1].route.index&&(c=O({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},m)),!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:K([r,c.pathname]),pathnameBase:H(K([r,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(r=K([r,c.pathnameBase]))}return s}function O(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[n,a]=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!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 a=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,n)=>(a.push({paramName:e,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(a.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),a]}(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let r=i[0],s=r.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:a.reduce(((t,e,n)=>{let{paramName:a,isOptional:i}=e;if("*"===a){let t=o[n]||"";s=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const l=o[n];return t[a]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:s,pattern:t}}function M(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 R(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,a=t.charAt(n);return a&&"/"!==a?null:t.slice(n)||"/"}function L(t,e,n,a){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(a)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function A(t,e){let n=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?n.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)):n.map((t=>t.pathnameBase))}function F(t,e,n,a){let i;void 0===a&&(a=!1),"string"==typeof t?i=E(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 r,s=""===t||""===i.pathname,o=s?"/":i.pathname;if(null==o)r=n;else{let t=e.length-1;if(!a&&o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}r=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:n,search:a="",hash:i=""}="string"==typeof t?E(t):t,r=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)})),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:r,search:B(a),hash:W(i)}}(i,r),m=o&&"/"!==o&&o.endsWith("/"),c=(s||"."===o)&&n.endsWith("/");return l.pathname.endsWith("/")||!m&&!c||(l.pathname+="/"),l}const K=t=>t.join("/").replace(/\/\/+/g,"/"),H=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),B=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",W=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const $=["post","put","patch","delete"],z=(new Set($),["get",...$]);function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},J.apply(this,arguments)}new Set(z),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const V=t.createContext(null),q=t.createContext(null),Y=t.createContext(null),X=t.createContext(null),Q=t.createContext({outlet:null,matches:[],isDataRoute:!1}),Z=t.createContext(null);function tt(){return null!=t.useContext(X)}function et(){return tt()||_(!1),t.useContext(X).location}function nt(e){t.useContext(Y).static||t.useLayoutEffect(e)}function at(){let{isDataRoute:e}=t.useContext(Q);return e?function(){let{router:e}=function(e){let n=t.useContext(V);return n||_(!1),n}(ct.UseNavigateStable),n=ut(gt.UseNavigateStable),a=t.useRef(!1);return nt((()=>{a.current=!0})),t.useCallback((function(t,i){void 0===i&&(i={}),a.current&&("number"==typeof t?e.navigate(t):e.navigate(t,J({fromRouteId:n},i)))}),[e,n])}():function(){tt()||_(!1);let e=t.useContext(V),{basename:n,future:a,navigator:i}=t.useContext(Y),{matches:r}=t.useContext(Q),{pathname:s}=et(),o=JSON.stringify(A(r,a.v7_relativeSplatPath)),l=t.useRef(!1);return nt((()=>{l.current=!0})),t.useCallback((function(t,a){if(void 0===a&&(a={}),!l.current)return;if("number"==typeof t)return void i.go(t);let r=F(t,JSON.parse(o),s,"path"===a.relative);null==e&&"/"!==n&&(r.pathname="/"===r.pathname?n:K([n,r.pathname])),(a.replace?i.replace:i.push)(r,a.state,a)}),[n,i,o,s,e])}()}function it(e,n){let{relative:a}=void 0===n?{}:n,{future:i}=t.useContext(Y),{matches:r}=t.useContext(Q),{pathname:s}=et(),o=JSON.stringify(A(r,i.v7_relativeSplatPath));return t.useMemo((()=>F(e,JSON.parse(o),s,"path"===a)),[e,o,s,a])}function rt(e,n,a,i){tt()||_(!1);let{navigator:r}=t.useContext(Y),{matches:s}=t.useContext(Q),o=s[s.length-1],l=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,g=et();if(n){var u;let t="string"==typeof n?E(n):n;"/"===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=y(e,{pathname:h}),f=function(e,n,a,i){var r;if(void 0===n&&(n=[]),void 0===a&&(a=null),void 0===i&&(i=null),null==e){var s;if(null==(s=a)||!s.errors)return null;e=a.matches}let o=e,l=null==(r=a)?void 0:r.errors;if(null!=l){let t=o.findIndex((t=>t.route.id&&void 0!==(null==l?void 0:l[t.route.id])));t>=0||_(!1),o=o.slice(0,Math.min(o.length,t+1))}let m=!1,c=-1;if(a&&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:n}=a,i=e.route.loader&&void 0===t[e.route.id]&&(!n||void 0===n[e.route.id]);if(e.route.lazy||i){m=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((e,i,r)=>{let s,g=!1,u=null,d=null;var p;a&&(s=l&&i.route.id?l[i.route.id]:void 0,u=i.route.errorElement||ot,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=n.concat(o.slice(0,r+1)),_=()=>{let n;return n=s?u:g?d:i.route.Component?t.createElement(i.route.Component,null):i.route.element?i.route.element:e,t.createElement(mt,{match:i,routeContext:{outlet:e,matches:h,isDataRoute:null!=a},children:n})};return a&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?t.createElement(lt,{location:a.location,revalidation:a.revalidation,component:u,error:s,children:_(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):_()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},l,t.params),pathname:K([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:K([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),s,a,i);return n&&f?t.createElement(X.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:p.Pop}},f):f}function st(){let e=function(){var e;let n=t.useContext(Z),a=function(e){let n=t.useContext(q);return n||_(!1),n}(gt.UseRouteError),i=ut(gt.UseRouteError);return void 0!==n?n:null==(e=a.errors)?void 0:e[i]}(),n=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),a?t.createElement("pre",{style:i},a):null,null)}const ot=t.createElement(st,null);class lt extends t.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?t.createElement(Q.Provider,{value:this.props.routeContext},t.createElement(Z.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mt(e){let{routeContext:n,match:a,children:i}=e,r=t.useContext(V);return r&&r.static&&r.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=a.route.id),t.createElement(Q.Provider,{value:n},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(e){let n=function(e){let n=t.useContext(Q);return n||_(!1),n}(),a=n.matches[n.matches.length-1];return a.route.id||_(!1),a.route.id}const dt={};function pt(e){let{to:n,replace:a,state:i,relative:r}=e;tt()||_(!1);let{future:s,static:o}=t.useContext(Y),{matches:l}=t.useContext(Q),{pathname:m}=et(),c=at(),g=F(n,A(l,s.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return t.useEffect((()=>c(JSON.parse(u),{replace:a,state:i,relative:r})),[c,u,r,a,i]),null}function ht(t){_(!1)}function _t(e){let{basename:n="/",children:a=null,location:i,navigationType:r=p.Pop,navigator:s,static:o=!1,future:l}=e;tt()&&_(!1);let m=n.replace(/^\/*/,"/"),c=t.useMemo((()=>({basename:m,navigator:s,static:o,future:J({v7_relativeSplatPath:!1},l)})),[m,l,s,o]);"string"==typeof i&&(i=E(i));let{pathname:g="/",search:u="",hash:d="",state:h=null,key:k="default"}=i,f=t.useMemo((()=>{let t=R(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:t.createElement(Y.Provider,{value:c},t.createElement(X.Provider,{children:a,value:f}))}function kt(t){let{children:e,location:n}=t;return rt(ft(e),n)}function ft(e,n){void 0===n&&(n=[]);let a=[];return t.Children.forEach(e,((e,i)=>{if(!t.isValidElement(e))return;let r=[...n,i];if(e.type===t.Fragment)return void a.push.apply(a,ft(e.props.children,r));e.type!==ht&&_(!1),e.props.index&&e.props.children&&_(!1);let s={id:e.props.id||r.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=ft(e.props.children,r)),a.push(s)})),a}t.startTransition,new Promise((()=>{})),t.Component;const St=window.ReactDOM;var bt=n.n(St);function Et(){return Et=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Et.apply(this,arguments)}function vt(t,e){if(null==t)return{};var n,a,i={},r=Object.keys(t);for(a=0;a<r.length;a++)n=r[a],e.indexOf(n)>=0||(i[n]=t[n]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const yt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],xt=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(t){}const wt=t.createContext({isTransitioning:!1});new Map;const Nt=t.startTransition;function Ct(e){let{basename:n,children:a,future:i,window:r}=e,s=t.useRef();null==s.current&&(s.current=function(t){return void 0===t&&(t={}),function(t,e,n,a){void 0===a&&(a={});let{window:i=document.defaultView,v5Compat:r=!1}=a,s=i.history,o=p.Pop,l=null,m=c();function c(){return(s.state||{idx:null}).idx}function g(){o=p.Pop;let t=c(),e=null==t?null:t-m;m=t,l&&l({action:o,location:k.location,delta:e})}function u(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof t?t:b(t);return n=n.replace(/ $/,"%20"),_(e,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,e)}null==m&&(m=0,s.replaceState(d({},s.state,{idx:m}),""));let k={get action(){return o},get location(){return t(i,s)},listen(t){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(h,g),l=t,()=>{i.removeEventListener(h,g),l=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){o=p.Push;let a=S(k.location,t,e);n&&n(a,t),m=c()+1;let g=f(a,m),u=k.createHref(a);try{s.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&l&&l({action:o,location:k.location,delta:1})},replace:function(t,e){o=p.Replace;let a=S(k.location,t,e);n&&n(a,t),m=c();let i=f(a,m),g=k.createHref(a);s.replaceState(i,"",g),r&&l&&l({action:o,location:k.location,delta:0})},go:t=>s.go(t)};return k}((function(t,e){let{pathname:n="/",search:a="",hash:i=""}=E(t.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),S("",{pathname:n,search:a,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let n=t.document.querySelector("base"),a="";if(n&&n.getAttribute("href")){let e=t.location.href,n=e.indexOf("#");a=-1===n?e:e.slice(0,n)}return a+"#"+("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 o=s.current,[l,m]=t.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=t.useCallback((t=>{c&&Nt?Nt((()=>m(t))):m(t)}),[m,c]);return t.useLayoutEffect((()=>o.listen(g)),[o,g]),t.createElement(_t,{basename:n,children:a,location:l.location,navigationType:l.action,navigator:o,future:i})}St.flushSync,t.useId;const jt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Tt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ut=t.forwardRef((function(e,n){let a,{onClick:i,relative:r,reloadDocument:s,replace:o,state:l,target:m,to:c,preventScrollReset:g,unstable_viewTransition:u}=e,d=vt(e,yt),{basename:p}=t.useContext(Y),h=!1;if("string"==typeof c&&Tt.test(c)&&(a=c,jt))try{let t=new URL(window.location.href),e=c.startsWith("//")?new URL(t.protocol+c):new URL(c),n=R(e.pathname,p);e.origin===t.origin&&null!=n?c=n+e.search+e.hash:h=!0}catch(t){}let k=function(e,n){let{relative:a}=void 0===n?{}:n;tt()||_(!1);let{basename:i,navigator:r}=t.useContext(Y),{hash:s,pathname:o,search:l}=it(e,{relative:a}),m=o;return"/"!==i&&(m="/"===o?i:K([i,o])),r.createHref({pathname:m,search:l,hash:s})}(c,{relative:r}),f=function(e,n){let{target:a,replace:i,state:r,preventScrollReset:s,relative:o,unstable_viewTransition:l}=void 0===n?{}:n,m=at(),c=et(),g=it(e,{relative:o});return t.useCallback((t=>{if(function(t,e){return!(0!==t.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t))}(t,a)){t.preventDefault();let n=void 0!==i?i:b(c)===b(g);m(e,{replace:n,state:r,preventScrollReset:s,relative:o,unstable_viewTransition:l})}}),[c,m,g,i,r,a,e,s,o,l])}(c,{replace:o,state:l,target:m,preventScrollReset:g,relative:r,unstable_viewTransition:u});return t.createElement("a",Et({},d,{href:a||k,onClick:h||s?i:function(t){i&&i(t),t.defaultPrevented||f(t)},ref:n,target:m}))})),Dt=t.forwardRef((function(e,n){let{"aria-current":a="page",caseSensitive:i=!1,className:r="",end:s=!1,style:o,to:l,unstable_viewTransition:m,children:c}=e,g=vt(e,xt),u=it(l,{relative:g.relative}),d=et(),p=t.useContext(q),{navigator:h,basename:k}=t.useContext(Y),f=null!=p&&function(e,n){void 0===n&&(n={});let a=t.useContext(wt);null==a&&_(!1);let{basename:i}=function(e){let n=t.useContext(V);return n||_(!1),n}(Pt.useViewTransitionState),r=it(e,{relative:n.relative});if(!a.isTransitioning)return!1;let s=R(a.currentLocation.pathname,i)||a.currentLocation.pathname,o=R(a.nextLocation.pathname,i)||a.nextLocation.pathname;return null!=O(r.pathname,o)||null!=O(r.pathname,s)}(u)&&!0===m,S=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,b=d.pathname,E=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(b=b.toLowerCase(),E=E?E.toLowerCase():null,S=S.toLowerCase()),E&&k&&(E=R(E,k)||E);const v="/"!==S&&S.endsWith("/")?S.length-1:S.length;let y,x=b===S||!s&&b.startsWith(S)&&"/"===b.charAt(v),w=null!=E&&(E===S||!s&&E.startsWith(S)&&"/"===E.charAt(S.length)),N={isActive:x,isPending:w,isTransitioning:f},C=x?a:void 0;y="function"==typeof r?r(N):[r,x?"active":null,w?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let j="function"==typeof o?o(N):o;return t.createElement(Ut,Et({},g,{"aria-current":C,className:y,ref:n,style:j,to:l,unstable_viewTransition:m}),"function"==typeof c?c(N):c)}));var Pt,It;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Pt||(Pt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(It||(It={}));const Gt=({title:e})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,t.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,t.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,t.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,t.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,t.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,t.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,t.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"}))),e)))),Ot=({to:e,title:n})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(Dt,{to:e,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 ":"")},n)),Mt=({NavList:e})=>(0,t.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"},e.map((function(e){return(0,t.createElement)(Ot,{key:e.to,to:e.to,title:e.title})})));function Rt(){return Rt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Rt.apply(this,arguments)}function Lt(t,e){if(null==t)return{};var n,a,i={},r=Object.keys(t);for(a=0;a<r.length;a++)n=r[a],e.indexOf(n)>=0||(i[n]=t[n]);return i}function At(t,e){return At=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},At(t,e)}function Ft(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,At(t,e)}function Kt(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Ht=e().createContext(null);var Bt=function(t){return t.scrollTop},Wt="unmounted",$t="exited",zt="entering",Jt="entered",Vt="exiting",qt=function(t){function n(e,n){var a;a=t.call(this,e,n)||this;var i,r=n&&!n.isMounting?e.enter:e.appear;return a.appearStatus=null,e.in?r?(i=$t,a.appearStatus=zt):i=Jt:i=e.unmountOnExit||e.mountOnEnter?Wt:$t,a.state={status:i},a.nextCallback=null,a}Ft(n,t),n.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Wt?{status:$t}:null};var a=n.prototype;return a.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},a.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==zt&&n!==Jt&&(e=zt):n!==zt&&n!==Jt||(e=Vt)}this.updateStatus(!1,e)},a.componentWillUnmount=function(){this.cancelNextCallback()},a.getTimeouts=function(){var t,e,n,a=this.props.timeout;return t=e=n=a,null!=a&&"number"!=typeof a&&(t=a.exit,e=a.enter,n=void 0!==a.appear?a.appear:e),{exit:t,enter:e,appear:n}},a.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 n=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this);n&&Bt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===$t&&this.setState({status:Wt})},a.performEnter=function(t){var e=this,n=this.props.enter,a=this.context?this.context.isMounting:t,i=this.props.nodeRef?[a]:[bt().findDOMNode(this),a],r=i[0],s=i[1],o=this.getTimeouts(),l=a?o.appear:o.enter;t||n?(this.props.onEnter(r,s),this.safeSetState({status:zt},(function(){e.props.onEntering(r,s),e.onTransitionEnd(l,(function(){e.safeSetState({status:Jt},(function(){e.props.onEntered(r,s)}))}))}))):this.safeSetState({status:Jt},(function(){e.props.onEntered(r)}))},a.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:bt().findDOMNode(this);e?(this.props.onExit(a),this.safeSetState({status:Vt},(function(){t.props.onExiting(a),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:$t},(function(){t.props.onExited(a)}))}))}))):this.safeSetState({status:$t},(function(){t.props.onExited(a)}))},a.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},a.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},a.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(a){n&&(n=!1,e.nextCallback=null,t(a))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},a.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this),a=null==t&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=i[0],s=i[1];this.props.addEndListener(r,s)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},a.render=function(){var t=this.state.status;if(t===Wt)return null;var n=this.props,a=n.children,i=(n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef,Lt(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return e().createElement(Ht.Provider,{value:null},"function"==typeof a?a(t,i):e().cloneElement(e().Children.only(a),i))},n}(e().Component);function Yt(){}qt.contextType=Ht,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=Wt,qt.EXITED=$t,qt.ENTERING=zt,qt.ENTERED=Jt,qt.EXITING=Vt;const Xt=qt;var Qt=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return a=e,void((n=t).classList?n.classList.remove(a):"string"==typeof n.className?n.className=Kt(n.className,a):n.setAttribute("class",Kt(n.className&&n.className.baseVal||"",a)));var n,a}))},Zt=function(t){function n(){for(var e,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var a=e.resolveArguments(t,n),i=a[0],r=a[1];e.removeClasses(i,"exit"),e.addClass(i,r?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var a=e.resolveArguments(t,n),i=a[0],r=a[1]?"appear":"enter";e.addClass(i,r,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var a=e.resolveArguments(t,n),i=a[0],r=a[1]?"appear":"enter";e.removeClasses(i,r),e.addClass(i,r,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,a="string"==typeof n,i=a?(a&&n?n+"-":"")+t:n[t];return{baseClassName:i,activeClassName:a?i+"-active":n[t+"Active"],doneClassName:a?i+"-done":n[t+"Done"]}},e}Ft(n,t);var a=n.prototype;return a.addClass=function(t,e,n){var a=this.getClassNames(e)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===n&&i&&(a+=" "+i),"active"===n&&t&&Bt(t),a&&(this.appliedClasses[e][n]=a,function(t,e){t&&e&&e.split(" ").forEach((function(e){return a=e,void((n=t).classList?n.classList.add(a):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(n,a)||("string"==typeof n.className?n.className=n.className+" "+a:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+a)));var n,a}))}(t,a))},a.removeClasses=function(t,e){var n=this.appliedClasses[e],a=n.base,i=n.active,r=n.done;this.appliedClasses[e]={},a&&Qt(t,a),i&&Qt(t,i),r&&Qt(t,r)},a.render=function(){var t=this.props,n=(t.classNames,Lt(t,["classNames"]));return e().createElement(Xt,Rt({},n,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},n}(e().Component);Zt.defaultProps={classNames:""},Zt.propTypes={};const te=Zt,ee=({title:e=(0,a.__)("Save","gtm-kit"),className:n="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:s,useIsPending:o,useCanSave:l}=(0,i.useContext)(g);return(0,t.createElement)(r.Button,{className:n,onClick:()=>s(),variant:"primary",disabled:o||!l},l?(0,a.__)(e,"gtm-kit"):(0,a.__)("Saved","gtm-kit"),o?(0,t.createElement)(r.Spinner,null):"")},ne=()=>{const{useCanSave:e}=(0,i.useContext)(g);return(0,t.createElement)(te,{in:e,timeout:500,classNames:"slide",unmountOnExit:!0},(0,t.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,t.createElement)(ee,null)))},ae=({subject:e})=>{const n=!0===e||"on"===e,i=!0===n?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,t.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},n?(0,a.__)("Active","gtm-kit"):(0,a.__)("Inactive","gtm-kit"))},ie=(0,i.forwardRef)((({children:e,className:n="",...a},i)=>(0,t.createElement)("div",{...a,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 "+n,ref:i},e)));ie.Header=({as:e="h3",title:n="",children:a,className:i="",...r})=>(0,t.createElement)("div",{...r,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+i},(0,t.createElement)(e,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},n),a),ie.Content=({as:e="div",children:n,className:a="gtmkit-flex-auto",...i})=>(0,t.createElement)(e,{...i,className:a},n),ie.Button=({url:e,destination:n,newTab:a=!1,text:i,group:s="",...o})=>{const l=at();return(0,t.createElement)("div",{...o,className:"gtmkit-mt-4 gtmkit-mb-0.5"},(0,t.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:()=>{n&&e&&!1===a?window.gtmkitSettings.current_poage===s?l(n,{replace:!0}):window.location.href=e+"#"+n:e?a?window.open(e):window.location.href=e:l(n,{replace:!0})}},(0,t.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},i)))};const re=ie,se=({title:e,data:n,className:r=""})=>{const{useSettings:s}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},e),(0,t.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},n.map(((e,n)=>!1===e.featured?null:(0,t.createElement)(re,{key:n},(0,t.createElement)(re.Header,{title:e.title},e.pill?(0,t.createElement)(ae,{subject:s[e.group][e.option]}):null),(0,t.createElement)(re.Content,null,e.text.map(((e,n)=>(0,t.createElement)("p",{key:n},e)))),(0,t.createElement)(re.Button,{url:e.link.url,destination:e.link.destination,text:e.link.text?e.link.text:(0,a.__)("Read article","gtm-kit"),newTab:e.link.external,group:e.group}))))))},oe=t=>((t,e,n)=>{const a=(t,n)=>({...n,title:t.title,to:t.path,group:t.group||n.group,option:t.option||n.option,text:[t.description],link:{...n.link,url:window.gtmkitSettings[e+"Url"],destination:"/"+t.path}});return"templates"===e?Object.keys(t).map((e=>a(t[e][0],n))):Object.keys(t).map((e=>a(t[e],n)))})(window.gtmkitSettings[t],t,function(t){switch(t){case"integrations":return{pill:!0,group:"integrations",option:null,link:{internal:!0,text:(0,a.__)("Setup Integration","gtm-kit")}};case"templates":return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,a.__)("Get Template","gtm-kit")}};default:return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,a.__)("Read More","gtm-kit")}}}}(t)),le=()=>{const{useSettings:e}=(0,i.useContext)(g),[n,r]=(0,i.useState)(window.gtmkitSettings.tutorials),s=Boolean(e.general.sgtm_domain&&e.general.sgtm_domain.trim());return(0,i.useEffect)((()=>{r((t=>[...t,{title:(0,a.__)("See all tutorials","gtm-kit"),text:[(0,a.__)("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,a.__)("Read articles","gtm-kit")},featured:!0}]))}),[]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("General","gtm-kit")),(0,t.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,t.createElement)(re,null,(0,t.createElement)(re.Header,{title:"Google Tag Manager Container"},(0,t.createElement)(ae,{subject:e.general.gtm_id&&e.general.container_active})),(0,t.createElement)(re.Content,null,e.general.gtm_id&&e.general.container_active?(0,t.createElement)("p",null,(0,a.__)("Container ID:","gtm-kit")," ",e&&e.general.gtm_id):(0,t.createElement)("p",null,(0,a.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,t.createElement)(re.Button,{destination:"/container",text:(0,a.__)("Edit container","gtm-kit")})),(0,t.createElement)(re,null,(0,t.createElement)(re.Header,{title:(0,a.__)("Server-side GTM","gtm-kit")},(0,t.createElement)(ae,{subject:s})),(0,t.createElement)(re.Content,null,(0,t.createElement)("p",null,(0,a.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit"))),(0,t.createElement)(re.Button,{destination:"/container",text:(0,a.__)("Edit container","gtm-kit")})),(0,t.createElement)(re,null,(0,t.createElement)(re.Header,{title:(0,a.__)("Help improve GTM Kit","gtm-kit")},(0,t.createElement)(ae,{subject:e.general.analytics_active})),(0,t.createElement)(re.Content,null,(0,t.createElement)("p",null,(0,a.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,t.createElement)(re.Button,{destination:"/misc",text:(0,a.__)("Share anonymous data","gtm-kit")}))),(0,t.createElement)(se,{title:(0,a.__)("Tutorials","gtm-kit"),data:n}),(0,t.createElement)(se,{title:(0,a.__)("Integrations","gtm-kit"),data:oe("integrations")}))},me=({title:e,placeholder:n,help:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:s="general",optionName:o,isDisabled:l,useSettings:m,useUpdateStateSettings:c})=>(0,t.createElement)(r.TextControl,{label:e,placeholder:n,help:a,className:i,value:m[s][o],onChange:t=>c(s,o,t),disabled:l}),ce=({title:e,label:n,optionGroup:a="general",optionName:i,disabled:s=!1,useSettings:o,useUpdateStateSettings:l})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,t.createElement)(r.BaseControl,{label:e},(0,t.createElement)(r.ToggleControl,{label:n,checked:!s&&o[a][i],onChange:()=>{l(a,i,!(o&&o[a][i]))},disabled:s})))),ge=({title:e,options:n,help:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:s="general",optionName:o,disabled:l,useSettings:m,useUpdateStateSettings:c})=>(0,t.createElement)(r.RadioControl,{label:e,options:n,help:a,className:i,selected:parseInt(m[s][o]),onChange:t=>c(s,o,t),disabled:l}),ue=({title:e,help:n,items:a=[],optionGroup:s="general",optionName:o,disabled:l=!1,useSettings:m,useUpdateStateSettings:c})=>{const g=Array.isArray(m[s][o])?m[s][o]:[],[u,d]=(0,i.useState)(g);return(0,i.useEffect)((()=>{const t=Array.isArray(m[s][o])?m[s][o]:[];d(t)}),[m]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,t.createElement)(r.BaseControl,{label:e,help:n},a.map((e=>(0,t.createElement)(r.CheckboxControl,{key:e.role,label:e.name,disabled:l,checked:u.includes(e.role),onChange:t=>((t,e)=>{d((n=>{let a;return a=t?[...n,e]:n.filter((t=>t!==e)),c(s,o,a),a}))})(t,e.role)}))))))};var de=n(893);const pe=(0,i.forwardRef)((({children:t,className:e="",disabled:n=!1,...a},i)=>(0,de.jsx)("div",{...a,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-w-3/4 gtmkit-border-color-grey "+e+(n?"gtmkit-opacity-60":""),ref:i,children:t})));pe.Header=({as:t="h3",title:e="",children:n,className:a="",...i})=>(0,de.jsxs)(t,{...i,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey gtmkit-flex gtmkit-items-center "+a,children:[e,n]}),pe.Content=({as:t="div",children:e,className:n="",...a})=>(0,de.jsx)(t,{...a,className:"gtmkit-px-8 gtmkit-py-6 "+n,children:e});const he=pe,_e=()=>{const{useSettings:e,useUpdateStateSettings:n,useUserRoles:r}=(0,i.useContext)(g),s=!(e.general.sgtm_domain&&e.general.sgtm_domain.trim()&&e.general.sgtm_container_identifier&&e.general.sgtm_container_identifier.trim()),o=et();return(0,t.useEffect)((()=>{const t=new URLSearchParams(o.search).get("focus");if(t){const e=document.getElementById(t);e&&e.scrollIntoView()}}),[o]),(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,a.__)("Google Tag Manager container","gtm-kit")}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("General Container Settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")}),(0,de.jsx)(me,{title:(0,a.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,a.__)("Enter GTM Container ID","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)(ce,{title:(0,a.__)("Inject Container Code","gtm-kit"),label:(0,a.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active",useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)(ce,{title:(0,a.__)("Just the container","gtm-kit"),label:(0,a.__)("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",useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)(me,{title:(0,a.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,a.__)("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"),useSettings:e,useUpdateStateSettings:n})]})]}),(0,de.jsx)("div",{id:"sgtm"}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(me,{title:(0,a.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,a.__)("Enter domain","gtm-kit"),help:(0,a.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)(me,{title:(0,a.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,a.__)("Enter loader name","gtm-kit"),help:(0,a.__)("Only use if you are using a custom loader.","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)(ce,{title:(0,a.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,a.__)("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:s,useSettings:e,useUpdateStateSettings:n})]}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Google Tag Manager Server-side Tagging","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]}),(0,de.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Hosting server-side GTM containers","gtm-kit")}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("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,a.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")]}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,de.jsx)("a",{href:"https://jump.gtmkit.com/link/1-AC1E5",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer",children:(0,a.__)("Learn more about Stape.io","gtm-kit")})})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Page Speed Optimization","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsx)(he.Content,{children:(0,de.jsx)(ce,{title:(0,a.__)("load_delayed_js event","gtm-kit"),label:(0,a.__)("Setting this to On will push the event 'load_delayed_js' on page load.","gtm-kit"),optionName:"load_js_event",useSettings:e,useUpdateStateSettings:n})}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Delay JavaScript execution","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("Page optimization plugins can delay the 'load_delayed_js' event and this can be used to delay the triggering og tags in Google Tag Manager.","gtm-kit")," ",(0,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Google Tag Manager Environment","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(me,{title:(0,a.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,a.__)("Enter gtm_auth code","gtm-kit"),help:(0,a.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)(me,{title:(0,a.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,a.__)("Enter gtm_preview code","gtm-kit"),help:(0,a.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit"),useSettings:e,useUpdateStateSettings:n})]}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Environments","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,a.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,a.__)("If left empty the default environment will be used.","gtm-kit")]}),(0,de.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Override settings in wp-config.php","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("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,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Exclude User Roles","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsx)(he.Content,{children:(0,de.jsx)(ue,{title:(0,a.__)("Exclude user roles","gtm-kit"),help:(0,a.__)("Select the roles that you want to exclude from tracking.","gtm-kit"),items:r,optionName:"exclude_user_roles",useSettings:e,useUpdateStateSettings:n})}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold gtmkit-text-red-600",children:(0,a.__)("Warning!","gtm-kit")}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("Excluding user roles is not compatible with all full-page cache solutions. Some full-page cache solutions may cache the page identically for all users, regardless of their user role. This could result in users being excluded who should not be.","gtm-kit")}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("Please ensure thorough and proper testing of this.","gtm-kit")})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Container Code Implementation","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(ge,{title:(0,a.__)("Container code implementation:","gtm-kit"),options:[{label:(0,a.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,a.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,a.__)("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",useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)(ge,{title:(0,a.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,a.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,a.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,a.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,a.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,a.__)('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",useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,de.jsx)("code",{children:"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"})})]})]})]})},ke=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Post Data","gtm-kit")),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Post Data Settings","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")),(0,t.createElement)(ce,{title:(0,a.__)("Post type","gtm-kit"),id:"post-type",label:(0,a.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Page type","gtm-kit"),id:"page-type",label:(0,a.__)('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",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Categories","gtm-kit"),id:"categories",label:(0,a.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Tags","gtm-kit"),id:"tags",label:(0,a.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Post title","gtm-kit"),id:"post-title",label:(0,a.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Post ID","gtm-kit"),id:"post-id",label:(0,a.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Post data","gtm-kit"),id:"post-date",label:(0,a.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,a.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,a.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id",useSettings:e,useUpdateStateSettings:n}))))},fe=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("User Data","gtm-kit")),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,t.createElement)(he.Content,{className:"gtmkit-space-y-2"},(0,t.createElement)("p",null,(0,a.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,t.createElement)("p",null,(0,a.__)("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,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("User Data Settings","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(ce,{title:(0,a.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,a.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("User ID","gtm-kit"),id:"user-id",label:(0,a.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("User role","gtm-kit"),id:"user-role",label:(0,a.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role",useSettings:e,useUpdateStateSettings:n}))))},Se=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g),r=!e.general.gcm_default_settings;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Google Consent Mode","gtm-kit")),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Google Consent Mode Activation","gtm-kit")},(0,t.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,a.__)("Warning!","gtm-kit"))),(0,t.createElement)(he.Content,{className:"gtmkit-space-y-2"},(0,t.createElement)("p",null,(0,a.__)("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,t.createElement)("p",null,(0,a.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")),(0,t.createElement)("p",{className:"!gtmkit-mt-4"},(0,a.__)("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,t.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,t.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,a.__)("See an example of how consent is updated","gtm-kit"))),(0,t.createElement)(ce,{title:(0,a.__)("Activate GCM settings","gtm-kit"),label:(0,a.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings",useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)(he,{disabled:r},(0,t.createElement)(he.Header,{title:(0,a.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(ce,{title:(0,a.__)("Ad Personalization","gtm-kit"),label:(0,a.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Ad Storage","gtm-kit"),label:(0,a.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Ad User Data","gtm-kit"),label:(0,a.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Analytics Storage","gtm-kit"),label:(0,a.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Functionality Storage","gtm-kit"),label:(0,a.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Personalization Storage","gtm-kit"),label:(0,a.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Security Storage","gtm-kit"),label:(0,a.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)("h4",{className:"gtmkit-font-bold gtmkit-pt-8"},(0,a.__)("Advanced","gtm-kit")),(0,t.createElement)(ce,{title:(0,a.__)("Redact Ads Data","gtm-kit"),label:(0,a.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Pass through URL parameters","gtm-kit"),label:(0,a.__)("Pass through ad click, client ID, and session ID information in URLs","gtm-kit"),optionName:"gcm_url_passthrough",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(me,{title:(0,a.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,a.__)("Enter time in milliseconds","gtm-kit"),useSettings:e,useUpdateStateSettings:n}))))},be=({label:e,value:n,tag:a})=>(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,t.createElement)("strong",null,e)),(0,t.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===a?(0,t.createElement)("code",{className:"gtmkit-text-sm"},n):(0,t.createElement)("em",null,n))),Ee=()=>{const{useSiteData:e}=(0,i.useContext)(g),n=Object.values(e.shared_data);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,a.__)("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,t.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,a.__)("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,t.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,t.createElement)("tbody",{className:"gtmkit-py-6"},n.map((function(e,n){return(0,t.createElement)(be,{key:n,label:e.label,value:e.value,tag:e.tag})})))))},ve=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Misc","gtm-kit")),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Help improve GTM Kit","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(Ee,null),(0,t.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,a.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,t.createElement)(ce,{title:(0,a.__)("Share anonymous data","gtm-kit"),label:(0,a.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active",useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Logging and debugging","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(ce,{title:(0,a.__)("Event Inspector","gtm-kit"),label:(0,a.__)("The event inspector is placed in the footer of the front and it allows you to see all the fired GTM events.","gtm-kit"),optionName:"event_inspector",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Console log","gtm-kit"),label:(0,a.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Debug log","gtm-kit"),label:(0,a.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log",useSettings:e,useUpdateStateSettings:n}))))},ye=()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(se,{title:(0,a.__)("Integrations","gtm-kit"),data:oe("integrations")})),xe=({pluginName:e})=>(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.sprintf)(
    22// translators: %s is the name of the plugin.
    3 (0,a.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,e.createElement)(he.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,a.sprintf)(
     3(0,a.__)("%s is not active","gtm-kit"),e),className:"gtmkit-text-red-600"}),(0,t.createElement)(he.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-6"},(0,a.sprintf)(
    44// translators: %s is the name of the plugin.
    5 (0,a.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)),(0,e.createElement)(s.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,a.sprintf)(
     5(0,a.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),e)),(0,t.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+e}},(0,a.sprintf)(
    66// translators: %s is the name of the plugin.
    7 (0,a.__)("Install %s","gtm-kit"),t)))),we=({title:t,options:n,className:r="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:o="general",optionName:l,disabled:m=!1,help:c="",notSet:u=!1})=>{const{useSettings:d,useUpdateStateSettings:p}=(0,i.useContext)(g),h=u?[{label:(0,a.__)("(not set)","gtm-kit"),value:""},...n]:n;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(s.SelectControl,{label:t,value:d&&d[o][l],options:h,className:r,onChange:t=>p(o,l,t),disabled:m,help:c}))},Ne=({pluginName:t,optionName:n,pluginInactive:s})=>{const{useSettings:r,useUpdateStateSettings:o}=(0,i.useContext)(g);return(0,e.createElement)(he,{disabled:s},(0,e.createElement)(he.Header,{title:(0,a.sprintf)(
     7(0,a.__)("Install %s","gtm-kit"),e)))),we=({title:e,options:n,className:s="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:o="general",optionName:l,disabled:m=!1,help:c="",notSet:u=!1})=>{const{useSettings:d,useUpdateStateSettings:p}=(0,i.useContext)(g),h=u?[{label:(0,a.__)("(not set)","gtm-kit"),value:""},...n]:n;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(r.SelectControl,{label:e,value:d&&d[o][l],options:h,className:s,onChange:t=>p(o,l,t),disabled:m,help:c}))},Ne=({pluginName:e,optionName:n,pluginInactive:r})=>{const{useSettings:s,useUpdateStateSettings:o}=(0,i.useContext)(g);return(0,t.createElement)(he,{disabled:r},(0,t.createElement)(he.Header,{title:(0,a.sprintf)(
    88// translators: %s is the name of the plugin.
    9 (0,a.__)("%s Integration","gtm-kit"),t)}),(0,e.createElement)(he.Content,null,(0,e.createElement)(ce,{title:(0,a.sprintf)(
     9(0,a.__)("%s Integration","gtm-kit"),e)}),(0,t.createElement)(he.Content,null,(0,t.createElement)(ce,{title:(0,a.sprintf)(
    1010// translators: %s is the name of the plugin.
    11 (0,a.__)("Track %s","gtm-kit"),t),label:(0,a.sprintf)(
     11(0,a.__)("Track %s","gtm-kit"),e),label:(0,a.sprintf)(
    1212// translators: %s is the name of the plugin.
    13 (0,a.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:n,disabled:s,useSettings:r,useUpdateStateSettings:o})))},Ce=[{label:(0,a.__)("Retail","gtm-kit"),value:"retail"},{label:(0,a.__)("Education","gtm-kit"),value:"education"},{label:(0,a.__)("Flights","gtm-kit"),value:"flights"},{label:(0,a.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,a.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,a.__)("Local deals","gtm-kit"),value:"local"},{label:(0,a.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,a.__)("Travel","gtm-kit"),value:"travel"},{label:(0,a.__)("Custom","gtm-kit"),value:"custom"}],je=()=>{const{useSettings:t,useUpdateStateSettings:e,isPremium:n}=(0,i.useContext)(g),s="WooCommerce",r=!window.gtmkitSettings.plugins.woocommerce,o=r||!t.integrations.woocommerce_integration,l=o||!n||!t.general.sgtm_domain,m=l||!t.premium.woocommerce_webhooks;return(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,a.__)("WooCommerce","gtm-kit")}),r?(0,de.jsx)(ye,{pluginName:s}):null,(0,de.jsx)(Ne,{pluginName:s,optionName:"woocommerce_integration",pluginInactive:r}),(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Basic settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(we,{title:(0,a.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,a.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:o}),(0,de.jsx)(ce,{title:(0,a.__)("Use SKU instead of ID","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Exclude tax","gtm-kit"),label:(0,a.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Exclude shipping from revenue","gtm-kit"),label:(0,a.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:o,useSettings:t,useUpdateStateSettings:e})]})]}),(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("User Data","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsx)(he.Content,{children:(0,de.jsx)(ce,{title:(0,a.__)("Include customer data","gtm-kit"),label:(0,a.__)('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:o,useSettings:t,useUpdateStateSettings:e})}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("User-Provided Data","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("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,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]})]})})]})]}),n?(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Webhooks for server-side tracking","gtm-kit"),children:n?(0,de.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,de.jsxs)(he.Content,{children:[l?(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,de.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.dashboardUrl+"#/container?focus=sgtm",children:(0,a.__)("Go to sGTM settings","gtm-kit")})]}):(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,de.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.templatesUrl+"#/server-side-tagging",children:(0,a.__)("Go to GTM Templates","gtm-kit")})]}),(0,de.jsx)(ce,{title:(0,a.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,a.__)("This option will allow webhooks to be sent to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:l,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Purchase webhook","gtm-kit"),label:(0,a.__)("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:m,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Refund webhook","gtm-kit"),label:(0,a.__)("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:m,useSettings:t,useUpdateStateSettings:e})]})]}):null,(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Event customization","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(ge,{title:"view_item_list (with product filter)",options:[{label:(0,a.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,a.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ge,{title:"view_item (variable product)",options:[{label:(0,a.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,a.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,a.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,a.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ge,{title:"add_shipping_info ",options:[{label:(0,a.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,a.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,a.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,a.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ge,{title:"add_payment_info ",options:[{label:(0,a.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,a.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,a.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,a.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:o,useSettings:t,useUpdateStateSettings:e})]})]}),(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Google Ads Settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(we,{title:(0,a.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Ce,help:(0,a.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,de.jsx)(me,{title:(0,a.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,a.__)("Enter prefix","gtm-kit"),help:(0,a.__)("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,useSettings:t,useUpdateStateSettings:e})]})]}),n?(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Custom CSS Selectors","gtm-kit"),children:n?(0,de.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")}),(0,de.jsx)(me,{title:(0,a.__)("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,a.__)("Enter CSS selector","gtm-kit"),help:(0,a.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(me,{title:(0,a.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,a.__)("Enter CSS selector","gtm-kit"),help:(0,a.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(me,{title:(0,a.__)("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,a.__)("Enter CSS selector","gtm-kit"),help:(0,a.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})]}):null,(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Advanced Settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(ce,{title:(0,a.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Include permalink structure","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Include path of pages","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e})]})]})]})},Te=()=>{const{useSettings:t,useUpdateStateSettings:n}=(0,i.useContext)(g),s="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,a.__)("Contact Form 7","gtm-kit")),r?(0,e.createElement)(ye,{pluginName:s}):null,(0,e.createElement)(Ne,{pluginName:s,optionName:"cf7_integration",pluginInactive:r}),(0,e.createElement)(he,{disabled:o},(0,e.createElement)(he.Header,{title:(0,a.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(ge,{title:(0,a.__)("Load JavaScript","gtm-kit"),options:[{label:(0,a.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,a.__)("On all pages","gtm-kit"),value:2}],help:(0,a.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:o,useSettings:t,useUpdateStateSettings:n}))))},Ue=()=>{const t="Easy Digital Downloads",n=!window.gtmkitSettings.plugins.edd,{useSettings:s,useUpdateStateSettings:r}=(0,i.useContext)(g),o=n||!s.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,a.__)("Easy Digital Downloads","gtm-kit")),n?(0,e.createElement)(ye,{pluginName:t}):null,(0,e.createElement)(Ne,{pluginName:t,optionName:"edd_integration",pluginInactive:n}),(0,e.createElement)(he,{disabled:o},(0,e.createElement)(he.Header,{title:(0,a.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(ce,{title:(0,a.__)("Use SKU instead of ID","gtm-kit"),label:(0,a.__)("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,useSettings:s,useUpdateStateSettings:r}),(0,e.createElement)(ce,{title:(0,a.__)("Exclude tax","gtm-kit"),label:(0,a.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:o,useSettings:s,useUpdateStateSettings:r}),(0,e.createElement)(ce,{title:(0,a.__)("Include customer data","gtm-kit"),label:(0,a.__)('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,useSettings:s,useUpdateStateSettings:r}))),(0,e.createElement)(he,{disabled:o},(0,e.createElement)(he.Header,{title:(0,a.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(we,{title:(0,a.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Ce,help:(0,a.__)("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,a.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,a.__)("Enter prefix","gtm-kit"),help:(0,a.__)("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,useSettings:s,useUpdateStateSettings:r}))),(0,e.createElement)(he,{disabled:n},(0,e.createElement)(he.Header,{title:(0,a.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(ce,{title:(0,a.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,a.__)("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,useSettings:s,useUpdateStateSettings:r}))))},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,a.__)("Get template","gtm-kit")}}})),()=>(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,a.__)("Getting Started","gtm-kit")),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("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,a.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")),(0,e.createElement)("p",null,(0,a.__)("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,a.__)("Read the guide","gtm-kit"))))),(0,e.createElement)(re,{title:(0,a.__)("Templates","gtm-kit"),data:oe("templates")}))),Ge=({title:t,description:n,link:i,templates:s})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:t}),(0,e.createElement)(he.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},n),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,s&&s.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,a.__)("GTM container import files:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},s.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,a.__)("Necessary modifications:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm"},s.map((function(t){return(0,e.createElement)("li",null,t.help_text)}))))):null))),Ie=({sectionData:t})=>{const n=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(n).map((function(t){return(0,e.createElement)(Ge,{title:n[t].title,description:n[t].description,link:n[t].link,templates:n[t].templates})})))},Me=()=>{const t=at(),n=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,a.__)("Help","gtm-kit")),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Need help?","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("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,a.__)("See support options","gtm-kit"))))),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Tutorials","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)("ul",null,n.map(((t,n)=>(0,e.createElement)("li",{key:n,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,n)=>(0,e.createElement)("div",{key:n,className:"gtmkit-text-sm"},t))))))))))},Oe=()=>{const{useIsSending:t,useSiteData:n,useUpdateSupportTicket:r,useSupportTicket:o,useSendSystemData:l,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,a.__)("Get support","gtm-kit")),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Support options","gtm-kit")}),(0,e.createElement)(he.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,a.__)("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,a.__)("GITHub repository","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,a.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)")))),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,e.createElement)(he.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,a.__)("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)(s.TextControl,{label:(0,e.createElement)("span",{className:"gtmkit-text-red-600"},c," "),placeholder:(0,a.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:o,onChange:t=>r(t)}),(0,e.createElement)(s.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:()=>{l()},disabled:!o.toUpperCase().startsWith("FS")},(0,e.createElement)("span",null,(0,a.__)("Send system data","gtm-kit")),t?(0,e.createElement)(s.Spinner,null):"")))),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("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,a.__)("Version:","gtm-kit")," ",n.gtmkit_version,")")),(0,e.createElement)(he.Content,null,(0,e.createElement)("p",null,(0,a.__)("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,a.__)("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,a.__)("The GitHub repository","gtm-kit"))))))};const Re=t=>{const{Fill:n,Slot:a}=(0,s.createSlotFill)(t),i=({children:t})=>(0,e.createElement)(n,null,t);return i.Slot=({fillProps:t})=>(0,e.createElement)(a,{fillProps:t},(t=>t.length?t:null)),i},Le=Re("GravityForms"),Ae=(Re("WooWebhooks"),Re("WooCustomSelectors"),({integrationID:t,pluginName:n})=>{const{useSettings:a,useUpdateStateSettings:s}=(0,i.useContext)(g),r=!window.gtmkitSettings.plugins[t],o=r||!a.integrations[t+"_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"},n),r?(0,e.createElement)(ye,{pluginName:n}):null,(0,e.createElement)(Ne,{pluginName:n,optionName:t+"_integration",pluginInactive:r}),"gf"===t?(0,e.createElement)(Le.Slot,{fillProps:{settingsInactive:o,useSettings:a,useUpdateStateSettings:s}}):null)}),Ke=window.wp.plugins,Fe={integrations:(0,a.__)("Integrations","gtm-kit"),templates:(0,a.__)("Google Tag Manager Templates","gtm-kit"),help:(0,a.__)("Help","gtm-kit")},He=()=>{const{useSettings:t}=(0,i.useContext)(g),n=window.gtmkitSettings,r=n.currentPage,o=function({page:t}){switch(t){case"general":return[{to:"general",title:(0,a.__)("Dashboard","gtm-kit")},{to:"container",title:(0,a.__)("Container","gtm-kit")},{to:"post-data",title:(0,a.__)("Post data","gtm-kit")},{to:"user-data",title:(0,a.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,a.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,a.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,a.__)("Integrations","gtm-kit")},...oe("integrations")];case"templates":return[{to:"templates",title:(0,a.__)("Templates","gtm-kit")},...oe("templates")];case"help":return[{to:"help",title:(0,a.__)("Help","gtm-kit")},{to:"support",title:(0,a.__)("Support","gtm-kit")}]}}({page:r}),l=n.templates,m=n.integrations,c=Fe[r]||(0,a.__)("Settings","gtm-kit");return Object.keys(t).length?(0,e.createElement)(s.SlotFillProvider,null,(0,e.createElement)(It,{title:c}),(0,e.createElement)(Ot,{NavList:o}),(0,e.createElement)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base"},(0,e.createElement)(_t,null,(0,e.createElement)(ht,{exact:!0,path:"/general",element:(0,e.createElement)(le,null)}),(0,e.createElement)(ht,{exact:!0,path:"/container",element:(0,e.createElement)(ke,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)(fe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/google-consent-mode",element:(0,e.createElement)(Se,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)(xe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/woocommerce",element:(0,e.createElement)(je,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)(Ue,null)}),m&&Object.keys(m).map((function(t){if("add-on"===m[t].type)return(0,e.createElement)(ht,{exact:!0,key:t,path:t,element:(0,e.createElement)(Ae,{integrationID:t,pluginName:m[t].title})})})),(0,e.createElement)(ht,{exact:!0,path:"/templates",element:(0,e.createElement)(Pe,null)}),l&&Object.keys(l).map((function(t){return(0,e.createElement)(ht,{exact:!0,key:t,path:t,element:(0,e.createElement)(Ie,{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)(Oe,null)}),(0,e.createElement)(ht,{path:"/",element:(0,e.createElement)(pt,{replace:!0,to:"/"+r})}))),(0,e.createElement)(ne,null),(0,e.createElement)(Ke.PluginArea,null)):(0,e.createElement)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center"},(0,e.createElement)(s.Spinner,null))},Be=()=>(0,e.createElement)(Ct,{basename:"/"},(0,e.createElement)(u,null,(0,e.createElement)(He,null)));document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,i.render)((0,e.createElement)(Be,null),t)}))})();
     13(0,a.__)("Activate the %s integration","gtm-kit"),e),optionGroup:"integrations",optionName:n,disabled:r,useSettings:s,useUpdateStateSettings:o})))},Ce=[{label:(0,a.__)("Retail","gtm-kit"),value:"retail"},{label:(0,a.__)("Education","gtm-kit"),value:"education"},{label:(0,a.__)("Flights","gtm-kit"),value:"flights"},{label:(0,a.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,a.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,a.__)("Local deals","gtm-kit"),value:"local"},{label:(0,a.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,a.__)("Travel","gtm-kit"),value:"travel"},{label:(0,a.__)("Custom","gtm-kit"),value:"custom"}],je=()=>{const{useSettings:t,useUpdateStateSettings:e,isPremium:n}=(0,i.useContext)(g),r="WooCommerce",s=!window.gtmkitSettings.plugins.woocommerce,o=s||!t.integrations.woocommerce_integration,l=o||!n||!t.general.sgtm_domain,m=l||!t.premium.woocommerce_webhooks;return(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,a.__)("WooCommerce","gtm-kit")}),s?(0,de.jsx)(xe,{pluginName:r}):null,(0,de.jsx)(Ne,{pluginName:r,optionName:"woocommerce_integration",pluginInactive:s}),(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Basic settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(we,{title:(0,a.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,a.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:o}),(0,de.jsx)(ce,{title:(0,a.__)("Use SKU instead of ID","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Exclude tax","gtm-kit"),label:(0,a.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Exclude shipping from revenue","gtm-kit"),label:(0,a.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:o,useSettings:t,useUpdateStateSettings:e})]})]}),(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("User Data","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsx)(he.Content,{children:(0,de.jsx)(ce,{title:(0,a.__)("Include customer data","gtm-kit"),label:(0,a.__)('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:o,useSettings:t,useUpdateStateSettings:e})}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("User-Provided Data","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("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,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]})]})})]})]}),n?(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Webhooks for server-side tracking","gtm-kit"),children:n?(0,de.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,de.jsxs)(he.Content,{children:[l?(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,de.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.dashboardUrl+"#/container?focus=sgtm",children:(0,a.__)("Go to sGTM settings","gtm-kit")})]}):(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,de.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.templatesUrl+"#/server-side-tagging",children:(0,a.__)("Go to GTM Templates","gtm-kit")})]}),(0,de.jsx)(ce,{title:(0,a.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,a.__)("This option will allow webhooks to be sent to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:l,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Purchase webhook","gtm-kit"),label:(0,a.__)("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:m,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Refund webhook","gtm-kit"),label:(0,a.__)("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:m,useSettings:t,useUpdateStateSettings:e})]})]}):null,(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Event customization","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(ge,{title:"view_item_list (with product filter)",options:[{label:(0,a.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,a.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ge,{title:"view_item (variable product)",options:[{label:(0,a.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,a.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,a.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,a.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ge,{title:"add_shipping_info ",options:[{label:(0,a.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,a.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,a.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,a.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ge,{title:"add_payment_info ",options:[{label:(0,a.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,a.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,a.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,a.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:o,useSettings:t,useUpdateStateSettings:e})]})]}),(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Google Ads Settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(we,{title:(0,a.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Ce,help:(0,a.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,de.jsx)(me,{title:(0,a.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,a.__)("Enter prefix","gtm-kit"),help:(0,a.__)("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,useSettings:t,useUpdateStateSettings:e})]})]}),n?(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Custom CSS Selectors","gtm-kit"),children:n?(0,de.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")}),(0,de.jsx)(me,{title:(0,a.__)("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,a.__)("Enter CSS selector","gtm-kit"),help:(0,a.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(me,{title:(0,a.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,a.__)("Enter CSS selector","gtm-kit"),help:(0,a.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(me,{title:(0,a.__)("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,a.__)("Enter CSS selector","gtm-kit"),help:(0,a.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})]}):null,(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Advanced Settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(ce,{title:(0,a.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Include permalink structure","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Include path of pages","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e})]})]})]})},Te=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g),r="Contact Form 7",s=!window.gtmkitSettings.plugins.cf7,o=s||!e.integrations.cf7_integration;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Contact Form 7","gtm-kit")),s?(0,t.createElement)(xe,{pluginName:r}):null,(0,t.createElement)(Ne,{pluginName:r,optionName:"cf7_integration",pluginInactive:s}),(0,t.createElement)(he,{disabled:o},(0,t.createElement)(he.Header,{title:(0,a.__)("Basic Settings","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(ge,{title:(0,a.__)("Load JavaScript","gtm-kit"),options:[{label:(0,a.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,a.__)("On all pages","gtm-kit"),value:2}],help:(0,a.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:o,useSettings:e,useUpdateStateSettings:n}))))},Ue=()=>{const e="Easy Digital Downloads",n=!window.gtmkitSettings.plugins.edd,{useSettings:r,useUpdateStateSettings:s}=(0,i.useContext)(g),o=n||!r.integrations.edd_integration;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Easy Digital Downloads","gtm-kit")),n?(0,t.createElement)(xe,{pluginName:e}):null,(0,t.createElement)(Ne,{pluginName:e,optionName:"edd_integration",pluginInactive:n}),(0,t.createElement)(he,{disabled:o},(0,t.createElement)(he.Header,{title:(0,a.__)("Basic Settings","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(ce,{title:(0,a.__)("Use SKU instead of ID","gtm-kit"),label:(0,a.__)("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,useSettings:r,useUpdateStateSettings:s}),(0,t.createElement)(ce,{title:(0,a.__)("Exclude tax","gtm-kit"),label:(0,a.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:o,useSettings:r,useUpdateStateSettings:s}),(0,t.createElement)(ce,{title:(0,a.__)("Include customer data","gtm-kit"),label:(0,a.__)('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,useSettings:r,useUpdateStateSettings:s}))),(0,t.createElement)(he,{disabled:o},(0,t.createElement)(he.Header,{title:(0,a.__)("Google Ads Settings","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(we,{title:(0,a.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Ce,help:(0,a.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,t.createElement)(me,{title:(0,a.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,a.__)("Enter prefix","gtm-kit"),help:(0,a.__)("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,useSettings:r,useUpdateStateSettings:s}))),(0,t.createElement)(he,{disabled:n},(0,t.createElement)(he.Header,{title:(0,a.__)("Advanced settings","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(ce,{title:(0,a.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,a.__)("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,useSettings:r,useUpdateStateSettings:s}))))},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,a.__)("Get template","gtm-kit")}}})),()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Getting Started","gtm-kit")),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("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,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")),(0,t.createElement)("p",null,(0,a.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,t.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,a.__)("Read the guide","gtm-kit"))))),(0,t.createElement)(se,{title:(0,a.__)("Templates","gtm-kit"),data:oe("templates")}))),Ie=({title:e,description:n,link:i,templates:r})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:e}),(0,t.createElement)(he.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},n),i&&i.url&&i.link_text?(0,t.createElement)("div",null,(0,t.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,t.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,t.createElement)("div",null,(0,t.createElement)("h4",{className:"gtmkit-font-bold"},(0,a.__)("GTM container import files:","gtm-kit")),(0,t.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},r.map((function(e){return(0,t.createElement)("li",null,(0,t.createElement)("a",{className:"hover:gtmkit-underline",href:e.link,target:"_blank",rel:"noreferrer"},e.title))})))),(0,t.createElement)("div",null,(0,t.createElement)("h4",{className:"gtmkit-font-bold"},(0,a.__)("Necessary modifications:","gtm-kit")),(0,t.createElement)("ul",{className:"gtmkit-text-sm"},r.map((function(e){return(0,t.createElement)("li",null,e.help_text)}))))):null))),Ge=({sectionData:e})=>{const n=e.collections;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},e.title),Object.keys(n).map((function(e){return(0,t.createElement)(Ie,{title:n[e].title,description:n[e].description,link:n[e].link,templates:n[e].templates})})))},Oe=()=>{const e=at(),n=window.gtmkitSettings.tutorials;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Help","gtm-kit")),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Need help?","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("We are here to help if you have any questions.","gtm-kit"),(0,t.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{e("/support",{replace:!0})}},(0,a.__)("See support options","gtm-kit"))))),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Tutorials","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)("ul",null,n.map(((e,n)=>(0,t.createElement)("li",{key:n,className:"gtmkit-mb-4"},(0,t.createElement)("a",{href:e.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline"},e.title),e.text.map(((e,n)=>(0,t.createElement)("div",{key:n,className:"gtmkit-text-sm"},e))))))))))},Me=()=>{const{useIsSending:e,useSiteData:n,useUpdateSupportTicket:s,useSupportTicket:o,useSendSystemData:l,useIsSystemDataSent:m,useSystemDataMessage:c}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Get support","gtm-kit")),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Support options","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,t.createElement)("li",null,(0,t.createElement)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,a.__)("WordPress.org Support Forum","gtm-kit"))),(0,t.createElement)("li",null,(0,t.createElement)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,a.__)("GITHub repository","gtm-kit"))),(0,t.createElement)("li",null,(0,t.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,a.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)")))),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,t.createElement)(he.Content,null,m?(0,t.createElement)("p",{className:"gtmkit-mb-2"},c):(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",{className:"gtmkit-mb-2"},(0,a.__)("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,t.createElement)(r.TextControl,{label:(0,t.createElement)("span",{className:"gtmkit-text-red-600"},c," "),placeholder:(0,a.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:o,onChange:t=>s(t)}),(0,t.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:()=>{l()},disabled:!o.toUpperCase().startsWith("FS")},(0,t.createElement)("span",null,(0,a.__)("Send system data","gtm-kit")),e?(0,t.createElement)(r.Spinner,null):"")))),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center"},(0,t.createElement)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2"},"(",(0,a.__)("Version:","gtm-kit")," ",n.gtmkit_version,")")),(0,t.createElement)(he.Content,null,(0,t.createElement)("p",null,(0,a.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,t.createElement)("br",null),(0,t.createElement)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer"},(0,a.__)("The changelog","gtm-kit")),(0,t.createElement)("br",null),(0,t.createElement)("a",{className:"gtmkit-text-color-primary  hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,a.__)("The GitHub repository","gtm-kit"))))))};const Re=e=>{const{Fill:n,Slot:a}=(0,r.createSlotFill)(e),i=({children:e})=>(0,t.createElement)(n,null,e);return i.Slot=({fillProps:e})=>(0,t.createElement)(a,{fillProps:e},(t=>t.length?t:null)),i},Le=Re("GravityForms"),Ae=(Re("WooWebhooks"),Re("WooCustomSelectors"),({integrationID:e,pluginName:n})=>{const{useSettings:a,useUpdateStateSettings:r}=(0,i.useContext)(g),s=!window.gtmkitSettings.plugins[e],o=s||!a.integrations[e+"_integration"];return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},n),s?(0,t.createElement)(xe,{pluginName:n}):null,(0,t.createElement)(Ne,{pluginName:n,optionName:e+"_integration",pluginInactive:s}),"gf"===e?(0,t.createElement)(Le.Slot,{fillProps:{settingsInactive:o,useSettings:a,useUpdateStateSettings:r}}):null)}),Fe=window.wp.plugins,Ke={integrations:(0,a.__)("Integrations","gtm-kit"),templates:(0,a.__)("Google Tag Manager Templates","gtm-kit"),help:(0,a.__)("Help","gtm-kit")},He=()=>{const{useSettings:e}=(0,i.useContext)(g),n=window.gtmkitSettings,s=n.currentPage,o=function({page:t}){switch(t){case"general":return[{to:"general",title:(0,a.__)("Dashboard","gtm-kit")},{to:"container",title:(0,a.__)("Container","gtm-kit")},{to:"post-data",title:(0,a.__)("Post data","gtm-kit")},{to:"user-data",title:(0,a.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,a.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,a.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,a.__)("Integrations","gtm-kit")},...oe("integrations")];case"templates":return[{to:"templates",title:(0,a.__)("Templates","gtm-kit")},...oe("templates")];case"help":return[{to:"help",title:(0,a.__)("Help","gtm-kit")},{to:"support",title:(0,a.__)("Support","gtm-kit")}]}}({page:s}),l=n.templates,m=n.integrations,c=Ke[s]||(0,a.__)("Settings","gtm-kit");return Object.keys(e).length?(0,t.createElement)(r.SlotFillProvider,null,(0,t.createElement)(Gt,{title:c}),(0,t.createElement)(Mt,{NavList:o}),(0,t.createElement)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base"},(0,t.createElement)(kt,null,(0,t.createElement)(ht,{exact:!0,path:"/general",element:(0,t.createElement)(le,null)}),(0,t.createElement)(ht,{exact:!0,path:"/container",element:(0,t.createElement)(_e,null)}),(0,t.createElement)(ht,{exact:!0,path:"/post-data",element:(0,t.createElement)(ke,null)}),(0,t.createElement)(ht,{exact:!0,path:"/user-data",element:(0,t.createElement)(fe,null)}),(0,t.createElement)(ht,{exact:!0,path:"/google-consent-mode",element:(0,t.createElement)(Se,null)}),(0,t.createElement)(ht,{exact:!0,path:"/misc",element:(0,t.createElement)(ve,null)}),(0,t.createElement)(ht,{exact:!0,path:"/integrations",element:(0,t.createElement)(ye,null)}),(0,t.createElement)(ht,{exact:!0,path:"/woocommerce",element:(0,t.createElement)(je,null)}),(0,t.createElement)(ht,{exact:!0,path:"/cf7",element:(0,t.createElement)(Te,null)}),(0,t.createElement)(ht,{exact:!0,path:"/edd",element:(0,t.createElement)(Ue,null)}),m&&Object.keys(m).map((function(e){if("add-on"===m[e].type)return(0,t.createElement)(ht,{exact:!0,key:e,path:e,element:(0,t.createElement)(Ae,{integrationID:e,pluginName:m[e].title})})})),(0,t.createElement)(ht,{exact:!0,path:"/templates",element:(0,t.createElement)(Pe,null)}),l&&Object.keys(l).map((function(e){return(0,t.createElement)(ht,{exact:!0,key:e,path:e,element:(0,t.createElement)(Ge,{sectionData:l[e][0]})})})),(0,t.createElement)(ht,{exact:!0,path:"/help",element:(0,t.createElement)(Oe,null)}),(0,t.createElement)(ht,{exact:!0,path:"/support",element:(0,t.createElement)(Me,null)}),(0,t.createElement)(ht,{path:"/",element:(0,t.createElement)(pt,{replace:!0,to:"/"+s})}))),(0,t.createElement)(ne,null),(0,t.createElement)(Fe.PluginArea,null)):(0,t.createElement)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center"},(0,t.createElement)(r.Spinner,null))},Be=()=>(0,t.createElement)(Ct,{basename:"/"},(0,t.createElement)(u,null,(0,t.createElement)(He,null)));document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById(window.gtmkitSettings.rootId);null!=e&&(0,i.render)((0,t.createElement)(Be,null),e)}))})()})();
  • gtm-kit/tags/1.23.3/assets/admin/wizard.asset.php

    r3134629 r3139454  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '4a1f1d4cadc1c2c93cf8');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '78fa6d1fd726260bef13');
  • gtm-kit/tags/1.23.3/assets/admin/wizard.js

    r3134629 r3139454  
    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 s=t.n(r);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const l=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},o=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,o.__)("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,o.__)("An error occurred.","gtm-kit"):(0,o.__)("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,a.isSendingLicenseKey=e.payload.isSendingLicenseKey||a.isSendingLicenseKey,a.licenseKey=e.payload.licenseKey||a.licenseKey;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;break;case"SEND_LICENSE_KEY_BEFORE":a.isSendingLicenseKey=e.payload.isSendingLicenseKey||a.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":a.isSendingLicenseKey=!1,a.isLicenseKeySent=e.payload.isLicenseKeySent||a.isLicenseKeySent,a.licenseKeyMessage=e.payload.licenseKeyMessage||a.licenseKeyMessage}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:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:""}),s=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}})},o=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{s()}),[]);const g={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,l("gtmkit/v1/set-options","POST",e));var e;r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:o,useUpdateStateSettings:async(t,e,a)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let s;r[t][e]=a,s=!(0,i.isEqual)(r,n.fetchedSettings),o({stateSettings:r,canSave:s})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let r;const s={};s.general={...a.general,...e.general},"integrations"in e&&(s.integrations={...a.integrations,...e.integrations}),r=!(0,i.isEqual)(s,n.fetchedSettings),o({stateSettings:s,canSave:r})},useUpdateSupportTicket:async t=>{o({supportTicket:t})},useSendSystemData:async()=>{r({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,l("gtmkit/v1/send-support-data","POST",e,!0));var e;r({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{o({licenseKey:t})},useSendLicenseKey:async()=>{r({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(e=n.licenseKey,l("gtmkit/v1/send-license-key","POST",e,!0));var e;r({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage: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,useIsSendingLicenseKey:n.isSendingLicenseKey,useLicenseKey:n.licenseKey,useIsLicenseKeySent:n.isLicenseKeySent,useLicenseKeyMessage:n.licenseKeyMessage,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};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 S(t,e,a,n){return void 0===a&&(a=null),u({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?f(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 f(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){return void 0===a&&(a="/"),function(t,e,a,n){let i=z(("string"==typeof e?f(e):e).pathname||"/",a);if(null==i)return null;let r=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)))))}(r);let s=null;for(let t=0;null==s&&t<r.length;++t){let e=U(i);s=C(r[t],e,n)}return s}(t,e,a,!1)}function N(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let s={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};s.relativePath.startsWith("/")&&(h(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(n.length));let l=B([n,s.relativePath]),o=a.concat(s);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 "'+l+'".'),N(t.children,e,o,l)),(null!=t.path||t.index)&&e.push({path:l,score:I(l,t.index),routesMeta:o})};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 s=v(n.join("/")),l=[];return l.push(...s.map((t=>""===t?r:[r,t].join("/")))),i&&l.push(...s),l.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-]+$/,b=3,_=2,T=1,L=10,j=-2,D=t=>"*"===t;function I(t,e){let a=t.split("/"),n=a.length;return a.some(D)&&(n+=j),e&&(n+=_),a.filter((t=>!D(t))).reduce(((t,e)=>t+(w.test(e)?b:""===e?T:L)),n)}function C(t,e,a){void 0===a&&(a=!1);let{routesMeta:n}=t,i={},r="/",s=[];for(let t=0;t<n.length;++t){let l=n[t],o=t===n.length-1,m="/"===r?e:e.slice(r.length)||"/",c=O({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},m),g=l.route;if(!c&&o&&a&&!n[n.length-1].route.index&&(c=O({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},m)),!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:B([r,c.pathname]),pathnameBase:G(B([r,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(r=B([r,c.pathnameBase]))}return s}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],s=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]||"";s=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const o=l[a];return t[n]=i&&!o?void 0:(o||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:s,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 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 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 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=f(t):(i=u({},t),h(!i.pathname||!i.pathname.includes("?"),A("?","pathname","search",i)),h(!i.pathname||!i.pathname.includes("#"),A("#","pathname","hash",i)),h(!i.search||!i.search.includes("#"),A("#","search","hash",i)));let r,s=""===t||""===i.pathname,l=s?"/":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 o=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?f(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:K(n),hash:Y(i)}}(i,r),m=l&&"/"!==l&&l.endsWith("/"),c=(s||"."===l)&&a.endsWith("/");return o.pathname.endsWith("/")||!m&&!c||(o.pathname+="/"),o}const B=t=>t.join("/").replace(/\/\/+/g,"/"),G=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),K=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const W=["post","put","patch","delete"],F=(new Set(W),["get",...W]);function Q(){return Q=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},Q.apply(this,arguments)}new Set(F),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const J=e.createContext(null),H=e.createContext(null),$=e.createContext(null),Z=e.createContext(null),V=e.createContext({outlet:null,matches:[],isDataRoute:!1}),X=e.createContext(null);function q(){return null!=e.useContext(Z)}function tt(){return q()||h(!1),e.useContext(Z).location}function et(t){e.useContext($).static||e.useLayoutEffect(t)}function at(){let{isDataRoute:t}=e.useContext(V);return t?function(){let{router:t}=function(t){let a=e.useContext(J);return a||h(!1),a}(ot.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,Q({fromRouteId:a},i)))}),[t,a])}():function(){q()||h(!1);let t=e.useContext(J),{basename:a,future:n,navigator:i}=e.useContext($),{matches:r}=e.useContext(V),{pathname:s}=tt(),l=JSON.stringify(P(r,n.v7_relativeSplatPath)),o=e.useRef(!1);return et((()=>{o.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!o.current)return;if("number"==typeof e)return void i.go(e);let r=R(e,JSON.parse(l),s,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:B([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,l,s,t])}()}function nt(t,a,n,i){q()||h(!1);let{navigator:r}=e.useContext($),{matches:s}=e.useContext(V),l=s[s.length-1],o=l?l.params:{},m=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let c,g=tt();if(a){var u;let t="string"==typeof a?f(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}),S=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 s;if(null==(s=n)||!s.errors)return null;t=n.matches}let l=t,o=null==(r=n)?void 0:r.errors;if(null!=o){let t=l.findIndex((t=>t.route.id&&void 0!==(null==o?void 0:o[t.route.id])));t>=0||h(!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 s,g=!1,u=null,d=null;var p;n&&(s=o&&i.route.id?o[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(l.slice(0,r+1)),k=()=>{let a;return a=s?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(lt,{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:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},o,t.params),pathname:B([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:B([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),s,n,i);return a&&S?e.createElement(Z.Provider,{value:{location:Q({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:d.Pop}},S):S}function it(){let t=function(){var t;let a=e.useContext(X),n=function(t){let a=e.useContext(H);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 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(V.Provider,{value:this.props.routeContext},e.createElement(X.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lt(t){let{routeContext:a,match:n,children:i}=t,r=e.useContext(J);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 ot=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ot||{}),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:s,static:l}=e.useContext($),{matches:o}=e.useContext(V),{pathname:m}=tt(),c=at(),g=R(a,P(o,s.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:s,static:l=!1,future:o}=t;q()&&h(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:s,static:l,future:Q({v7_relativeSplatPath:!1},o)})),[m,o,s,l]);"string"==typeof i&&(i=f(i));let{pathname:g="/",search:u="",hash:p="",state:k=null,key:y="default"}=i,S=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==S?null:e.createElement($.Provider,{value:c},e.createElement(Z.Provider,{children:n,value:S}))}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 s={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&&(s.children=kt(t.props.children,r)),n.push(s)})),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 St=e.startTransition;function Et(t){let{basename:a,children:n,future:i,window:r}=t,s=e.useRef();null==s.current&&(s.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,s=i.history,l=d.Pop,o=null,m=c();function c(){return(s.state||{idx:null}).idx}function g(){l=d.Pop;let t=c(),e=null==t?null:t-m;m=t,o&&o({action:l,location:f.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,s.replaceState(u({},s.state,{idx:m}),""));let f={get action(){return l},get location(){return t(i,s)},listen(t){if(o)throw new Error("A history only accepts one active listener");return i.addEventListener(p,g),o=t,()=>{i.removeEventListener(p,g),o=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){l=d.Push;let n=S(f.location,t,e);a&&a(n,t),m=c()+1;let g=y(n,m),u=f.createHref(n);try{s.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&o&&o({action:l,location:f.location,delta:1})},replace:function(t,e){l=d.Replace;let n=S(f.location,t,e);a&&a(n,t),m=c();let i=y(n,m),g=f.createHref(n);s.replaceState(i,"",g),r&&o&&o({action:l,location:f.location,delta:0})},go:t=>s.go(t)};return f}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=f(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),S("",{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 l=s.current,[o,m]=e.useState({action:l.action,location:l.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&St?St((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>l.listen(g)),[l,g]),e.createElement(pt,{basename:a,children:n,location:o.location,navigationType:o.action,navigator:l,future:i})}var ft,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"}(ft||(ft={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s}=(0,a.useContext)(c),l=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,o.__)("Container ID","gtm-kit"),placeholder:(0,o.__)("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(),l("/essential-settings",{replace:!0})},disabled:s||!t.general.gtm_id.includes("-")},(0,o.__)("Save and continue","gtm-kit"),s?(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,o.__)("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,o.__)("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,o.__)("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,o.__)("Go to the dashboard.","gtm-kit"))))},Nt=()=>{const{useImportSettings:t,useIsPending:i,useInstallData:r}=(0,a.useContext)(c),[s,l]=(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})})),s?(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,o.__)("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,o.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,o.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,e.createElement)(n.RadioControl,{help:(0,o.__)("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]),l(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,o.__)("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:()=>{l(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,o.__)("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,o.__)("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,o.__)("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:s,useInstallData:l}=(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,o.__)("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,o.__)("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,o.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(n.ToggleControl,{label:(0,o.__)("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))}}))),l.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,o.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(n.ToggleControl,{label:(0,o.__)("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,l.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,o.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(n.ToggleControl,{label:(0,o.__)("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,l.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(n.BaseControl,{label:(0,o.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(n.ToggleControl,{label:(0,o.__)("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:s},(0,o.__)("Save and continue","gtm-kit"),s?(0,e.createElement)(n.Spinner,null):"")))},bt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s,useSiteData:l}=(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,o.__)("Help improve GTM Kit","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,o.__)("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,o.__)("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"},l.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"},l.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"},l.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"},l.multisite?(0,o.__)("Yes","gtm-kit"):(0,o.__)("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"},l.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"},l.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,o.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(n.ToggleControl,{label:(0,o.__)("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:s},(0,o.__)("Save and continue","gtm-kit"),s?(0,e.createElement)(n.Spinner,null):"")))},_t=window.ReactJSXRuntime,Tt=()=>(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,o.__)("You are ready to use GTM Kit!","gtm-kit")}),(0,_t.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center",children:(0,o.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")}),(0,_t.jsxs)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center",children:[(0,o.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "]}),(0,_t.jsxs)("div",{className:"gtmkit-border-2 gtmkit-max-w-lg gtmkit-mx-auto gtmkit-mb-8",children:[(0,_t.jsx)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2",children:(0,o.__)("Getting Started","gtm-kit")}),(0,_t.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,o.__)("The next step is to configure your Google Tag Manager container. You will find templates for this in the GTM Templates section.","gtm-kit")," ",(0,_t.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:window.gtmkitSettings.templatesUrl,rel:"noreferrer",children:(0,o.__)("Go to GTM Templates","gtm-kit")})]}),(0,_t.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,o.__)("To get the most out of Google Tag Manager with GTM Kit, you should also review the tutorials.","gtm-kit")," ",(0,_t.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:window.gtmkitSettings.helpUrl+"#/help",rel:"noreferrer",children:(0,o.__)("Go to Tutorials","gtm-kit")})]})]}),(0,_t.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,_t.jsx)(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},children:(0,o.__)("Go to the dashboard","gtm-kit")})})]}),Lt=[{step:1,path:"/welcome",element:"Welcome",title:(0,o.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,o.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,o.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,o.__)("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})},Dt=({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,It=({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)(Dt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))},Ct=()=>{const t=Lt.length-1+Lt[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}))})(Lt,{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"},Lt.map((function(n){return(0,e.createElement)(It,{key:n.step,step:n.step,currentStep:a,totalSteps:t})})))},Ot=()=>(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,o.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,e.createElement)(Ct,null)),Ut=()=>(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,o.__)("Go to the dashboard.","gtm-kit"))))),zt=()=>{const{useSettings:t}=(0,a.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ot,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)(bt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(Tt,null)}),(0,e.createElement)(dt,{path:"/",element:(0,e.createElement)(ut,{replace:!0,to:"/welcome"})}))),(0,e.createElement)(Ut,null)):(0,e.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},At=()=>(0,e.createElement)(Et,{basename:"/"},(0,e.createElement)(g,null,(0,e.createElement)(zt,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,a.render)((0,e.createElement)(At,null),document.getElementById(window.gtmkitSettings.rootId))}))})();
     1(()=>{"use strict";var t={251:(t,e,a)=>{var n=a(196),i=Symbol.for("react.element"),r=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function m(t,e,a){var n,r={},m=null,c=null;for(n in void 0!==a&&(m=""+a),void 0!==e.key&&(m=""+e.key),void 0!==e.ref&&(c=e.ref),e)s.call(e,n)&&!o.hasOwnProperty(n)&&(r[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps)void 0===r[n]&&(r[n]=e[n]);return{$$typeof:i,type:t,key:m,ref:c,props:r,_owner:l.current}}e.Fragment=r,e.jsx=m,e.jsxs=m},893:(t,e,a)=>{t.exports=a(251)},196:t=>{t.exports=window.React}},e={};function a(n){var i=e[n];if(void 0!==i)return i.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,a),r.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=a(196);const e=window.wp.element,n=window.wp.components,i=window.lodash,r=window.wp.apiFetch;var s=a.n(r);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const l=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},o=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,o.__)("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,o.__)("An error occurred.","gtm-kit"):(0,o.__)("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,a.isSendingLicenseKey=e.payload.isSendingLicenseKey||a.isSendingLicenseKey,a.licenseKey=e.payload.licenseKey||a.licenseKey;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;break;case"SEND_LICENSE_KEY_BEFORE":a.isSendingLicenseKey=e.payload.isSendingLicenseKey||a.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":a.isSendingLicenseKey=!1,a.isLicenseKeySent=e.payload.isLicenseKeySent||a.isLicenseKeySent,a.licenseKeyMessage=e.payload.licenseKeyMessage||a.licenseKeyMessage}return a},c=(0,e.createContext)(),g=a=>{const[n,r]=(0,e.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:""}),s=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}})},o=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,e.useEffect)((()=>{s()}),[]);const g={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,l("gtmkit/v1/set-options","POST",e));var e;r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:o,useUpdateStateSettings:async(t,e,a)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let s;r[t][e]=a,s=!(0,i.isEqual)(r,n.fetchedSettings),o({stateSettings:r,canSave:s})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let r;const s={};s.general={...a.general,...e.general},"integrations"in e&&(s.integrations={...a.integrations,...e.integrations}),r=!(0,i.isEqual)(s,n.fetchedSettings),o({stateSettings:s,canSave:r})},useUpdateSupportTicket:async t=>{o({supportTicket:t})},useSendSystemData:async()=>{r({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,l("gtmkit/v1/send-support-data","POST",e,!0));var e;r({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{o({licenseKey:t})},useSendLicenseKey:async()=>{r({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(e=n.licenseKey,l("gtmkit/v1/send-license-key","POST",e,!0));var e;r({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage: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,useIsSendingLicenseKey:n.isSendingLicenseKey,useLicenseKey:n.licenseKey,useIsLicenseKeySent:n.isLicenseKeySent,useLicenseKeyMessage:n.licenseKeyMessage,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,t.createElement)(c.Provider,{value:g},a.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 S(t,e,a,n){return void 0===a&&(a=null),u({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?E(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function f(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 E(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){return void 0===a&&(a="/"),function(t,e,a,n){let i=A(("string"==typeof e?E(e):e).pathname||"/",a);if(null==i)return null;let r=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)))))}(r);let s=null;for(let t=0;null==s&&t<r.length;++t){let e=U(i);s=C(r[t],e,n)}return s}(t,e,a,!1)}function N(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let s={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};s.relativePath.startsWith("/")&&(h(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(n.length));let l=B([n,s.relativePath]),o=a.concat(s);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 "'+l+'".'),N(t.children,e,o,l)),(null!=t.path||t.index)&&e.push({path:l,score:I(l,t.index),routesMeta:o})};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 s=v(n.join("/")),l=[];return l.push(...s.map((t=>""===t?r:[r,t].join("/")))),i&&l.push(...s),l.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,L=10,j=-2,D=t=>"*"===t;function I(t,e){let a=t.split("/"),n=a.length;return a.some(D)&&(n+=j),e&&(n+=b),a.filter((t=>!D(t))).reduce(((t,e)=>t+(w.test(e)?_:""===e?T:L)),n)}function C(t,e,a){void 0===a&&(a=!1);let{routesMeta:n}=t,i={},r="/",s=[];for(let t=0;t<n.length;++t){let l=n[t],o=t===n.length-1,m="/"===r?e:e.slice(r.length)||"/",c=O({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},m),g=l.route;if(!c&&o&&a&&!n[n.length-1].route.index&&(c=O({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},m)),!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:B([r,c.pathname]),pathnameBase:G(B([r,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(r=B([r,c.pathnameBase]))}return s}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],s=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]||"";s=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const o=l[a];return t[n]=i&&!o?void 0:(o||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:s,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 A(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 P(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 z(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=E(t):(i=u({},t),h(!i.pathname||!i.pathname.includes("?"),P("?","pathname","search",i)),h(!i.pathname||!i.pathname.includes("#"),P("#","pathname","hash",i)),h(!i.search||!i.search.includes("#"),P("#","search","hash",i)));let r,s=""===t||""===i.pathname,l=s?"/":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 o=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?E(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:K(n),hash:Y(i)}}(i,r),m=l&&"/"!==l&&l.endsWith("/"),c=(s||"."===l)&&a.endsWith("/");return o.pathname.endsWith("/")||!m&&!c||(o.pathname+="/"),o}const B=t=>t.join("/").replace(/\/\/+/g,"/"),G=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),K=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const W=["post","put","patch","delete"],F=(new Set(W),["get",...W]);function Q(){return Q=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},Q.apply(this,arguments)}new Set(F),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const $=t.createContext(null),J=t.createContext(null),H=t.createContext(null),Z=t.createContext(null),V=t.createContext({outlet:null,matches:[],isDataRoute:!1}),X=t.createContext(null);function q(){return null!=t.useContext(Z)}function tt(){return q()||h(!1),t.useContext(Z).location}function et(e){t.useContext(H).static||t.useLayoutEffect(e)}function at(){let{isDataRoute:e}=t.useContext(V);return e?function(){let{router:e}=function(e){let a=t.useContext($);return a||h(!1),a}(ot.UseNavigateStable),a=ct(mt.UseNavigateStable),n=t.useRef(!1);return et((()=>{n.current=!0})),t.useCallback((function(t,i){void 0===i&&(i={}),n.current&&("number"==typeof t?e.navigate(t):e.navigate(t,Q({fromRouteId:a},i)))}),[e,a])}():function(){q()||h(!1);let e=t.useContext($),{basename:a,future:n,navigator:i}=t.useContext(H),{matches:r}=t.useContext(V),{pathname:s}=tt(),l=JSON.stringify(z(r,n.v7_relativeSplatPath)),o=t.useRef(!1);return et((()=>{o.current=!0})),t.useCallback((function(t,n){if(void 0===n&&(n={}),!o.current)return;if("number"==typeof t)return void i.go(t);let r=R(t,JSON.parse(l),s,"path"===n.relative);null==e&&"/"!==a&&(r.pathname="/"===r.pathname?a:B([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,l,s,e])}()}function nt(e,a,n,i){q()||h(!1);let{navigator:r}=t.useContext(H),{matches:s}=t.useContext(V),l=s[s.length-1],o=l?l.params:{},m=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let c,g=tt();if(a){var u;let t="string"==typeof a?E(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(e,{pathname:k}),S=function(e,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==e){var s;if(null==(s=n)||!s.errors)return null;e=n.matches}let l=e,o=null==(r=n)?void 0:r.errors;if(null!=o){let t=l.findIndex((t=>t.route.id&&void 0!==(null==o?void 0:o[t.route.id])));t>=0||h(!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(((e,i,r)=>{let s,g=!1,u=null,d=null;var p;n&&(s=o&&i.route.id?o[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(l.slice(0,r+1)),k=()=>{let a;return a=s?u:g?d:i.route.Component?t.createElement(i.route.Component,null):i.route.element?i.route.element:e,t.createElement(lt,{match:i,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?t.createElement(st,{location:n.location,revalidation:n.revalidation,component:u,error:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},o,t.params),pathname:B([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:B([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),s,n,i);return a&&S?t.createElement(Z.Provider,{value:{location:Q({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:d.Pop}},S):S}function it(){let e=function(){var e;let a=t.useContext(X),n=function(e){let a=t.useContext(J);return a||h(!1),a}(mt.UseRouteError),i=ct(mt.UseRouteError);return void 0!==a?a:null==(e=n.errors)?void 0:e[i]}(),a=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},a),n?t.createElement("pre",{style:i},n):null,null)}const rt=t.createElement(it,null);class st extends t.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?t.createElement(V.Provider,{value:this.props.routeContext},t.createElement(X.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lt(e){let{routeContext:a,match:n,children:i}=e,r=t.useContext($);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),t.createElement(V.Provider,{value:a},i)}var ot=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ot||{}),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(e){let a=function(e){let a=t.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(e){let{to:a,replace:n,state:i,relative:r}=e;q()||h(!1);let{future:s,static:l}=t.useContext(H),{matches:o}=t.useContext(V),{pathname:m}=tt(),c=at(),g=R(a,z(o,s.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return t.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function dt(t){h(!1)}function pt(e){let{basename:a="/",children:n=null,location:i,navigationType:r=d.Pop,navigator:s,static:l=!1,future:o}=e;q()&&h(!1);let m=a.replace(/^\/*/,"/"),c=t.useMemo((()=>({basename:m,navigator:s,static:l,future:Q({v7_relativeSplatPath:!1},o)})),[m,o,s,l]);"string"==typeof i&&(i=E(i));let{pathname:g="/",search:u="",hash:p="",state:k=null,key:y="default"}=i,S=t.useMemo((()=>{let t=A(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==S?null:t.createElement(H.Provider,{value:c},t.createElement(Z.Provider,{children:n,value:S}))}function ht(t){let{children:e,location:a}=t;return nt(kt(e),a)}function kt(e,a){void 0===a&&(a=[]);let n=[];return t.Children.forEach(e,((e,i)=>{if(!t.isValidElement(e))return;let r=[...a,i];if(e.type===t.Fragment)return void n.push.apply(n,kt(e.props.children,r));e.type!==dt&&h(!1),e.props.index&&e.props.children&&h(!1);let s={id:e.props.id||r.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=kt(e.props.children,r)),n.push(s)})),n}t.startTransition,new Promise((()=>{})),t.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 St=t.startTransition;function ft(e){let{basename:a,children:n,future:i,window:r}=e,s=t.useRef();null==s.current&&(s.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,s=i.history,l=d.Pop,o=null,m=c();function c(){return(s.state||{idx:null}).idx}function g(){l=d.Pop;let t=c(),e=null==t?null:t-m;m=t,o&&o({action:l,location:E.location,delta:e})}function k(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:f(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,s.replaceState(u({},s.state,{idx:m}),""));let E={get action(){return l},get location(){return t(i,s)},listen(t){if(o)throw new Error("A history only accepts one active listener");return i.addEventListener(p,g),o=t,()=>{i.removeEventListener(p,g),o=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){l=d.Push;let n=S(E.location,t,e);a&&a(n,t),m=c()+1;let g=y(n,m),u=E.createHref(n);try{s.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&o&&o({action:l,location:E.location,delta:1})},replace:function(t,e){l=d.Replace;let n=S(E.location,t,e);a&&a(n,t),m=c();let i=y(n,m),g=E.createHref(n);s.replaceState(i,"",g),r&&o&&o({action:l,location:E.location,delta:0})},go:t=>s.go(t)};return E}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=E(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),S("",{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:f(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=s.current,[o,m]=t.useState({action:l.action,location:l.location}),{v7_startTransition:c}=i||{},g=t.useCallback((t=>{c&&St?St((()=>m(t))):m(t)}),[m,c]);return t.useLayoutEffect((()=>l.listen(g)),[l,g]),t.createElement(pt,{basename:a,children:n,location:o.location,navigationType:o.action,navigator:l,future:i})}var Et,xt;yt.flushSync,t.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"}(Et||(Et={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));const Mt=()=>{const{useSettings:a,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s}=(0,e.useContext)(c),l=at();return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20"},(0,t.createElement)("div",{className:""},(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 "},(0,t.createElement)(n.TextControl,{label:(0,o.__)("Container ID","gtm-kit"),placeholder:(0,o.__)("Enter Container ID","gtm-kit"),value:a&&a.general.gtm_id,className:"gtmkit-text-center",onChange:t=>i("general","gtm_id",t)})),(0,t.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,t.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(),l("/essential-settings",{replace:!0})},disabled:s||!a.general.gtm_id.includes("-")},(0,o.__)("Save and continue","gtm-kit"),s?(0,t.createElement)(n.Spinner,null):""))),(0,t.createElement)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-left gtmkit-text-color-grey gtmkit-text-center"},(0,t.createElement)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4"},"Need help?"),(0,t.createElement)("p",{className:"gtmkit-mb-6"},(0,o.__)("Find your GTM container ID on","gtm-kit"),(0,t.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,t.createElement)("p",null,(0,o.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"))),(0,t.createElement)("div",{className:"gtmkit-mt-3 md:gtmkit-mt-10 gtmkit-text-color-grey gtmkit-text-base"},(0,t.createElement)("span",{className:"gtmkit-block"},(0,o.__)("No thanks. I know what I'm doing.","gtm-kit")),(0,t.createElement)("a",{className:"gtmkit-underline gtmkit-ml-4",href:window.gtmkitSettings.dashboardUrl},(0,o.__)("Go to the dashboard.","gtm-kit"))))},Nt=()=>{const{useImportSettings:a,useIsPending:i,useInstallData:r}=(0,e.useContext)(c),[s,l]=(0,e.useState)(!0),m=Object.keys(r.import_data)[0],[g,u]=(0,e.useState)(m),d=[];return Object.keys(r.import_data).forEach((t=>{d.push({value:t,label:r.import_data[t].name})})),s?(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-8 gtmkit-my-8"},(0,t.createElement)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold"},(0,o.__)("Would you like to import plugin settings?","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey"},(0,o.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,o.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,t.createElement)(n.RadioControl,{help:(0,o.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:g,options:d,onChange:t=>u(t)}),(0,t.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,t.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{a(g,r.import_data[g]),l(!1)}},(0,t.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,o.__)("Yes","gtm-kit")),i?(0,t.createElement)(n.Spinner,null):""),(0,t.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{l(!1)}},(0,t.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,o.__)("No","gtm-kit")),i?(0,t.createElement)(n.Spinner,null):"")))):(0,t.createElement)(Mt,null)},vt=()=>{const{useInstallData:a}=(0,e.useContext)(c),{firstInstall:n}=a,{importAvailable:i}=a;return(0,t.createElement)("div",{className:"gtmkit-text-center"},(0,t.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,o.__)("You've successfully installed GTM Kit!","gtm-kit")),(0,t.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,t.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,o.__)("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,t.createElement)(Nt,null):(0,t.createElement)(Mt,null))},wt=()=>{const{useSettings:a,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s,useInstallData:l}=(0,e.useContext)(c),m=at();return(0,t.createElement)("div",{className:"gtmkit-text-center"},(0,t.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,o.__)("Essential Settings","gtm-kit")),(0,t.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,t.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,o.__)("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,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,t.createElement)(n.BaseControl,{label:(0,o.__)("Page type","gtm-kit"),id:"page-type"},(0,t.createElement)(n.ToggleControl,{label:(0,o.__)("Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?","gtm-kit"),checked:a&&a.general.datalayer_page_type,onChange:()=>{i("general","datalayer_page_type",!(a&&a.general.datalayer_page_type))}}))),l.woocommerce_integration?(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,t.createElement)(n.BaseControl,{label:(0,o.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,t.createElement)(n.ToggleControl,{label:(0,o.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:a&&a.integrations.woocommerce_integration,onChange:()=>{i("integrations","woocommerce_integration",!(a&&a.integrations.woocommerce_integration))}}))):null,l.cf7_integration?(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,t.createElement)(n.BaseControl,{label:(0,o.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,t.createElement)(n.ToggleControl,{label:(0,o.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:a&&a.integrations.cf7_integration,onChange:()=>{i("integrations","cf7_integration",!(a&&a.integrations.cf7_integration))}}))):null,l.edd_integration?(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,t.createElement)(n.BaseControl,{label:(0,o.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,t.createElement)(n.ToggleControl,{label:(0,o.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:a&&a.integrations.edd_integration,onChange:()=>{i("integrations","edd_integration",!(a&&a.integrations.edd_integration))}}))):null,(0,t.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,t.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:s},(0,o.__)("Save and continue","gtm-kit"),s?(0,t.createElement)(n.Spinner,null):"")))},_t=()=>{const{useSettings:a,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s,useSiteData:l}=(0,e.useContext)(c),m=at();return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,o.__)("Help improve GTM Kit","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,o.__)("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,t.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey"},(0,o.__)("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,t.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm"},(0,t.createElement)("tbody",null,(0,t.createElement)("tr",{className:""},(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"Server type:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("code",{className:"gtmkit-text-sm"},l.web_server))),(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"PHP version number:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("code",{className:"gtmkit-text-sm"},l.php_version))),(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"WordPress version number:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("code",{className:"gtmkit-text-sm"},l.wordpress_version))),(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"WordPress multisite:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("code",{className:"gtmkit-text-sm"},l.multisite?(0,o.__)("Yes","gtm-kit"):(0,o.__)("No","gtm-kit")))),(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"Current theme:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("code",{className:"gtmkit-text-sm"},l.current_theme))),(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"Current site language:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("code",{className:"gtmkit-text-sm"},l.locale))),(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"Active plugins:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("em",null,"Plugin names of all active plugins"))),(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"Anonymized GTM Kit settings:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("em",null,"Which GTM Kit settings are active"))))),(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto "},(0,t.createElement)(n.BaseControl,{label:(0,o.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,t.createElement)(n.ToggleControl,{label:(0,o.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:a&&a.general.analytics_active,onChange:()=>{i("general","analytics_active",!(a&&a.general.analytics_active))}}))),(0,t.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,t.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:s},(0,o.__)("Save and continue","gtm-kit"),s?(0,t.createElement)(n.Spinner,null):"")))};var bt=a(893);const Tt=()=>(0,bt.jsxs)(bt.Fragment,{children:[(0,bt.jsx)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,o.__)("You are ready to use GTM Kit!","gtm-kit")}),(0,bt.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center",children:(0,o.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")}),(0,bt.jsxs)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center",children:[(0,o.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "]}),(0,bt.jsxs)("div",{className:"gtmkit-border-2 gtmkit-max-w-lg gtmkit-mx-auto gtmkit-mb-8",children:[(0,bt.jsx)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2",children:(0,o.__)("Getting Started","gtm-kit")}),(0,bt.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,o.__)("The next step is to configure your Google Tag Manager container. You will find templates for this in the GTM Templates section.","gtm-kit")," ",(0,bt.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:window.gtmkitSettings.templatesUrl,rel:"noreferrer",children:(0,o.__)("Go to GTM Templates","gtm-kit")})]}),(0,bt.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,o.__)("To get the most out of Google Tag Manager with GTM Kit, you should also review the tutorials.","gtm-kit")," ",(0,bt.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:window.gtmkitSettings.helpUrl+"#/help",rel:"noreferrer",children:(0,o.__)("Go to Tutorials","gtm-kit")})]})]}),(0,bt.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,bt.jsx)(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},children:(0,o.__)("Go to the dashboard","gtm-kit")})})]}),Lt=[{step:1,path:"/welcome",element:"Welcome",title:(0,o.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,o.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,o.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,o.__)("Getting Started","gtm-kit")}],jt=({step:e,currentStep:a,totalSteps:n})=>{if(e===n)return;let i="gtmkit-h-0.5 gtmkit-w-full";return i+=e<a?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,t.createElement)("div",{className:i})},Dt=({step:e,currentStep:a})=>e<a?(0,t.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,t.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"})):e===a?(0,t.createElement)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,It=({step:e,currentStep:a,totalSteps:n})=>{if(0===e)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+=e<a?" gtmkit-bg-color-primary":" gtmkit-bg-white",i+=e>a?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,t.createElement)(t.Fragment,null,(0,t.createElement)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full"},(0,t.createElement)("span",{className:i},(0,t.createElement)(Dt,{step:e,currentStep:a,totalSteps:n}))),(0,t.createElement)(jt,{step:e,currentStep:a,totalSteps:n}))},Ct=()=>{const e=Lt.length-1+Lt[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}))})(Lt,{path:tt().pathname});return a=a.length?a[0].step:0,0===a?(0,t.createElement)("div",{className:"gtmkit-my-16"}):(0,t.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"},Lt.map((function(n){return(0,t.createElement)(It,{key:n.step,step:n.step,currentStep:a,totalSteps:e})})))},Ot=()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("header",{className:"gtmkit-text-center gtmkit-px-3"},(0,t.createElement)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[225px] gtmkit-inline-block"},(0,t.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,o.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,t.createElement)(Ct,null)),Ut=()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey"},(0,t.createElement)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max"},(0,t.createElement)("a",{className:"gtmkit-underline",href:window.gtmkitSettings.dashboardUrl},(0,o.__)("Go to the dashboard.","gtm-kit"))))),At=()=>{const{useSettings:a}=(0,e.useContext)(c);return Object.keys(a).length?(0,t.createElement)(t.Fragment,null,(0,t.createElement)(Ot,null),(0,t.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,t.createElement)(ht,null,(0,t.createElement)(dt,{exact:!0,path:"/welcome",element:(0,t.createElement)(vt,null)}),(0,t.createElement)(dt,{exact:!0,path:"/essential-settings",element:(0,t.createElement)(wt,null)}),(0,t.createElement)(dt,{exact:!0,path:"/share-anonymous-data",element:(0,t.createElement)(_t,null)}),(0,t.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,t.createElement)(Tt,null)}),(0,t.createElement)(dt,{path:"/",element:(0,t.createElement)(ut,{replace:!0,to:"/welcome"})}))),(0,t.createElement)(Ut,null)):(0,t.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},Pt=()=>(0,t.createElement)(ft,{basename:"/"},(0,t.createElement)(g,null,(0,t.createElement)(At,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,e.render)((0,t.createElement)(Pt,null),document.getElementById(window.gtmkitSettings.rootId))}))})()})();
  • gtm-kit/tags/1.23.3/gtm-kit.php

    r3134629 r3139454  
    44 *
    55 * Plugin Name: GTM Kit
    6  * Version:     1.23.2
     6 * Version:     1.23.3
    77 * Plugin URI:  https://gtmkit.com/
    88 * Description: Google Tag Manager implementation focusing on flexibility and pagespeed.
     
    2828}
    2929
    30 const GTMKIT_VERSION = '1.23.2';
     30const GTMKIT_VERSION = '1.23.3';
    3131
    3232if ( ! defined( 'GTMKIT_FILE' ) ) {
  • gtm-kit/tags/1.23.3/languages/gtm-kit.pot

    r3134629 r3139454  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: GTM Kit 1.23.2\n"
     5"Project-Id-Version: GTM Kit 1.23.3\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-08-12T12:55:07+00:00\n"
     12"POT-Creation-Date: 2024-08-21T11:23:44+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.9.0\n"
     
    193193
    194194#: src/Integration/WooCommerce.php:251
    195 #: src/Integration/WooCommerce.php:974
     195#: src/Integration/WooCommerce.php:978
    196196msgid "Product Category"
    197197msgstr ""
     
    210210
    211211#: src/Integration/WooCommerce.php:255
    212 #: src/Integration/WooCommerce.php:976
     212#: src/Integration/WooCommerce.php:980
    213213msgid "Product Tag"
    214214msgstr ""
     
    222222msgstr ""
    223223
    224 #: src/Integration/WooCommerce.php:833
     224#: src/Integration/WooCommerce.php:837
    225225msgid "Grouped Product"
    226226msgstr ""
    227227
    228 #: src/Integration/WooCommerce.php:867
     228#: src/Integration/WooCommerce.php:871
    229229msgid "Search Results"
    230230msgstr ""
    231231
    232 #: src/Integration/WooCommerce.php:867
    233 #: src/Integration/WooCommerce.php:908
    234 #: src/Integration/WooCommerce.php:941
     232#: src/Integration/WooCommerce.php:871
     233#: src/Integration/WooCommerce.php:912
     234#: src/Integration/WooCommerce.php:945
    235235msgid "General Product List"
    236236msgstr ""
    237237
    238 #: src/Integration/WooCommerce.php:1125
     238#: src/Integration/WooCommerce.php:1129
    239239msgid "GTM Kit data."
    240240msgstr ""
  • gtm-kit/tags/1.23.3/readme.txt

    r3134629 r3139454  
    44Tags: google tag manager, gtm, woocommerce, analytics, ga4
    55Tested up to: 6.6
    6 Stable tag: 1.23.2
     6Stable tag: 1.23.3
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    8888
    8989== Changelog ==
     90
     91
     92= 1.23.3 =
     93
     94Release date: 2024-08-22
     95
     96#### Bugfixes:
     97* Prevent fatal errors caused by invalid filter input from third-party plugins.
     98* In WordPress versions prior to 6.6, the options pages fail to load due to a missing dependency.
    9099
    91100= 1.23.2 =
  • gtm-kit/tags/1.23.3/src/Admin/AbstractOptionsPage.php

    r3112163 r3139454  
    9696     * Configure the admin page using the settings API.
    9797     */
    98     abstract public function configure();
     98    abstract public function configure(): void;
    9999
    100100    /**
     
    161161     * @param string $script_handle The script handle.
    162162     */
    163     abstract public function localize_script( string $page_slug, string $script_handle );
     163    abstract public function localize_script( string $page_slug, string $script_handle ): void;
    164164
    165165    /**
  • gtm-kit/tags/1.23.3/src/Admin/MetaBox.php

    r2975488 r3139454  
    4646     * Add "GTM Kit" meta box
    4747     */
    48     public function add_meta_boxes() {
     48    public function add_meta_boxes(): void {
    4949        if ( current_user_can( 'manage_options' ) ) {
    5050            $post_types = get_post_types(
     
    7878     * Displays some checkbox to de/activate some cache options
    7979     */
    80     public function display_meta_boxes() {
     80    public function display_meta_boxes(): void {
    8181        if ( current_user_can( 'manage_options' ) ) {
    8282            wp_nonce_field( 'gtmkit_box_option', '_gtmkitnonce', false );
     
    104104     * Manage the cache options from the meta box.
    105105     */
    106     public function save_meta_box_options() {
     106    public function save_meta_box_options(): void {
    107107        if ( current_user_can( 'manage_options' ) && isset( $_POST['post_ID'], $_POST['_gtmkitnonce'] ) ) {
    108108
  • gtm-kit/tags/1.23.3/src/Admin/SetupWizard.php

    r3118062 r3139454  
    7676     * Maybe redirect to the setup wizard after plugin activation.
    7777     */
    78     public function maybe_redirect_after_activation() {
     78    public function maybe_redirect_after_activation(): void {
    7979
    8080        if ( wp_doing_ajax() || wp_doing_cron() ) {
     
    119119     * @param string $hook The asset hook.
    120120     */
    121     public function enqueue_assets( string $hook ) {
     121    public function enqueue_assets( string $hook ): void {
    122122
    123123        if ( strpos( $hook, self::SLUG ) === false ) {
     
    160160     * Setup Wizard Content
    161161     */
    162     public function setup_wizard_content() {
     162    public function setup_wizard_content(): void {
    163163        $admin_url = is_network_admin() ? network_admin_url() : admin_url();
    164164
  • gtm-kit/tags/1.23.3/src/Integration/WooCommerce.php

    r3094947 r3139454  
    688688     * @return array The item data.
    689689     */
    690     public function get_item_data( WC_Product $product, array $additional_item_attributes = [], string $event_context = '' ): array {
     690    public function get_item_data( $product, array $additional_item_attributes = [], string $event_context = '' ): array {
     691
     692        if ( ! ( $product instanceof WC_Product ) ) {
     693            return [];
     694        }
    691695
    692696        $product_id_to_query = ( $product->get_type() === 'variation' ) ? $product->get_parent_id() : $product->get_id();
     
    10631067     * Registers the actual data into each endpoint.
    10641068     */
    1065     public function extend_store() {
     1069    public function extend_store(): void {
    10661070
    10671071        // Register into `cart/items`.
  • gtm-kit/tags/1.23.3/vendor/composer/installed.php

    r3134629 r3139454  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '2030bdfdc44d8ca203a5e81a8689405c6a289fcf',
     6        'reference' => '44b18f33aef58db2d6ac1b6fa29c4f9b583df746',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '2030bdfdc44d8ca203a5e81a8689405c6a289fcf',
     16            'reference' => '44b18f33aef58db2d6ac1b6fa29c4f9b583df746',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
  • gtm-kit/trunk/assets/admin/settings.asset.php

    r3134629 r3139454  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'f7cdabceadad6150f3d4');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => '5675825ba95e3805cc8c');
  • gtm-kit/trunk/assets/admin/settings.js

    r3134629 r3139454  
    1 (()=>{"use strict";var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React;var n=t.n(e);const a=window.wp.i18n,i=window.wp.element,s=window.wp.components,r=window.lodash,o=window.wp.apiFetch;var l=t.n(o);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const m=async(t,e,n=null,a=!1)=>{let i={};try{i=await l()({path:t,method:e,...n&&{data:n}})}catch(n){return console.log(`${e} ${t} Errors:`,n),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===a?i:!0===i.success?i.data:options},c=(t,e)=>{const n={...t};switch(e.type){case"FETCH_SETTINGS":n.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},n.stateSettings=e.payload.stateSettings,n.siteData=e.payload.siteData,n.installData=e.payload.installData,n.isPending=!1,n.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(n.notice=(0,a.__)("An error occurred.","gtm-kit"),n.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":n.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":n.fetchedSettings=e.payload.fetchedSettings,n.stateSettings=e.payload.stateSettings,n.isPending=!1,n.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,n.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,a.__)("An error occurred.","gtm-kit"):(0,a.__)("Saved Successfully.","gtm-kit"),n.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":n.fetchedSettings=e.payload.fetchedSettings||n.fetchedSettings,n.stateSettings=e.payload.stateSettings||n.stateSettings,n.isPending=e.payload.isPending||n.isPending,n.notice=e.payload.notice||n.notice,n.hasError=e.payload.hasError||n.hasError,n.canSave=e.payload.canSave||n.canSave,n.isSendingSystemData=e.payload.isSendingSystemData||n.isSendingSystemData,n.supportTicket=e.payload.supportTicket||n.supportTicket,n.isSendingLicenseKey=e.payload.isSendingLicenseKey||n.isSendingLicenseKey,n.licenseKey=e.payload.licenseKey||n.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":n.isSendingSystemData=e.payload.isSendingSystemData||n.isSendingSystemData;break;case"SEND_SUPPORT_DATA":n.isSendingSystemData=!1,n.isSystemDataSent=e.payload.isSystemDataSent||n.isSystemDataSent,n.systemDataMessage=e.payload.systemDataMessage||n.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":n.isSendingLicenseKey=e.payload.isSendingLicenseKey||n.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":n.isSendingLicenseKey=!1,n.isLicenseKeySent=e.payload.isLicenseKeySent||n.isLicenseKeySent,n.licenseKeyMessage=e.payload.licenseKeyMessage||n.licenseKeyMessage}return n},g=(0,i.createContext)(),u=t=>{const[n,a]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:""}),s=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},n="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};a({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:n}})},o=async t=>{a({type:"UPDATE_STATE",payload:t})};(0,i.useEffect)((()=>{s()}),[]);const l={useDispatch:t=>{a(t)},useUpdateSettings:async()=>{a({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,m("gtmkit/v1/set-options","POST",e));var e;a({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:o,useUpdateStateSettings:async(t,e,a)=>{const i=JSON.parse(JSON.stringify(n.stateSettings));let s;i[t][e]=a,s=!(0,r.isEqual)(i,n.fetchedSettings),o({stateSettings:i,canSave:s})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let i;const s={};s.general={...a.general,...e.general},"integrations"in e&&(s.integrations={...a.integrations,...e.integrations}),i=!(0,r.isEqual)(s,n.fetchedSettings),o({stateSettings:s,canSave:i})},useUpdateSupportTicket:async t=>{o({supportTicket:t})},useSendSystemData:async()=>{a({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,m("gtmkit/v1/send-support-data","POST",e,!0));var e;a({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{o({licenseKey:t})},useSendLicenseKey:async()=>{a({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(e=n.licenseKey,m("gtmkit/v1/send-license-key","POST",e,!0));var e;a({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage: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,useIsSendingLicenseKey:n.isSendingLicenseKey,useLicenseKey:n.licenseKey,useIsLicenseKeySent:n.isLicenseKeySent,useLicenseKeyMessage:n.licenseKeyMessage,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,e.createElement)(g.Provider,{value:l},t.children)};function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}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 k(t,e){if(!1===t||null==t)throw new Error(e)}function _(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 S(t,e,n,a){return void 0===n&&(n=null),d({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?E(e):e,{state:n,key:e&&e.key||a||Math.random().toString(36).substr(2,8)})}function b(t){let{pathname:e="/",search:n="",hash:a=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function E(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let a=t.indexOf("?");a>=0&&(e.search=t.substr(a),t=t.substr(0,a)),t&&(e.pathname=t)}return e}var v;function x(t,e,n){return void 0===n&&(n="/"),function(t,e,n,a){let i=R(("string"==typeof e?E(e):e).pathname||"/",n);if(null==i)return null;let s=y(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,n)=>t===e[n]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(s);let r=null;for(let t=0;null==r&&t<s.length;++t){let e=O(i);r=I(s[t],e,a)}return r}(t,e,n,!1)}function y(t,e,n,a){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===a&&(a="");let i=(t,i,s)=>{let r={relativePath:void 0===s?t.path||"":s,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};r.relativePath.startsWith("/")&&(k(r.relativePath.startsWith(a),'Absolute route path "'+r.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),r.relativePath=r.relativePath.slice(a.length));let o=F([a,r.relativePath]),l=n.concat(r);t.children&&t.children.length>0&&(k(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),y(t.children,e,l,o)),(null!=t.path||t.index)&&e.push({path:o,score:G(o,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var n;if(""!==t.path&&null!=(n=t.path)&&n.includes("?"))for(let n of w(t.path))i(t,e,n);else i(t,e)})),e}function w(t){let e=t.split("/");if(0===e.length)return[];let[n,...a]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(0===a.length)return i?[s,""]:[s];let r=w(a.join("/")),o=[];return o.push(...r.map((t=>""===t?s:[s,t].join("/")))),i&&o.push(...r),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(v||(v={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const N=/^:[\w-]+$/,C=3,j=2,T=1,U=10,D=-2,P=t=>"*"===t;function G(t,e){let n=t.split("/"),a=n.length;return n.some(P)&&(a+=D),e&&(a+=j),n.filter((t=>!P(t))).reduce(((t,e)=>t+(N.test(e)?C:""===e?T:U)),a)}function I(t,e,n){void 0===n&&(n=!1);let{routesMeta:a}=t,i={},s="/",r=[];for(let t=0;t<a.length;++t){let o=a[t],l=t===a.length-1,m="/"===s?e:e.slice(s.length)||"/",c=M({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},m),g=o.route;if(!c&&l&&n&&!a[a.length-1].route.index&&(c=M({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},m)),!c)return null;Object.assign(i,c.params),r.push({params:i,pathname:F([s,c.pathname]),pathnameBase:H(F([s,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(s=F([s,c.pathnameBase]))}return r}function M(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[n,a]=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),_("*"===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 a=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,n)=>(a.push({paramName:e,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(a.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),a]}(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],r=s.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:a.reduce(((t,e,n)=>{let{paramName:a,isOptional:i}=e;if("*"===a){let t=o[n]||"";r=s.slice(0,s.length-t.length).replace(/(.)\/+$/,"$1")}const l=o[n];return t[a]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:s,pathnameBase:r,pattern:t}}function O(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return _(!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 R(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,a=t.charAt(n);return a&&"/"!==a?null:t.slice(n)||"/"}function L(t,e,n,a){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(a)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function A(t,e){let n=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?n.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)):n.map((t=>t.pathnameBase))}function K(t,e,n,a){let i;void 0===a&&(a=!1),"string"==typeof t?i=E(t):(i=d({},t),k(!i.pathname||!i.pathname.includes("?"),L("?","pathname","search",i)),k(!i.pathname||!i.pathname.includes("#"),L("#","pathname","hash",i)),k(!i.search||!i.search.includes("#"),L("#","search","hash",i)));let s,r=""===t||""===i.pathname,o=r?"/":i.pathname;if(null==o)s=n;else{let t=e.length-1;if(!a&&o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}s=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:n,search:a="",hash:i=""}="string"==typeof t?E(t):t,s=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)})),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:s,search:B(a),hash:W(i)}}(i,s),m=o&&"/"!==o&&o.endsWith("/"),c=(r||"."===o)&&n.endsWith("/");return l.pathname.endsWith("/")||!m&&!c||(l.pathname+="/"),l}const F=t=>t.join("/").replace(/\/\/+/g,"/"),H=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),B=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",W=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 n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}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()||k(!1),e.useContext(X).location}function nt(t){e.useContext(Y).static||e.useLayoutEffect(t)}function at(){let{isDataRoute:t}=e.useContext(Q);return t?function(){let{router:t}=function(t){let n=e.useContext(V);return n||k(!1),n}(ct.UseNavigateStable),n=ut(gt.UseNavigateStable),a=e.useRef(!1);return nt((()=>{a.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),a.current&&("number"==typeof e?t.navigate(e):t.navigate(e,$({fromRouteId:n},i)))}),[t,n])}():function(){tt()||k(!1);let t=e.useContext(V),{basename:n,future:a,navigator:i}=e.useContext(Y),{matches:s}=e.useContext(Q),{pathname:r}=et(),o=JSON.stringify(A(s,a.v7_relativeSplatPath)),l=e.useRef(!1);return nt((()=>{l.current=!0})),e.useCallback((function(e,a){if(void 0===a&&(a={}),!l.current)return;if("number"==typeof e)return void i.go(e);let s=K(e,JSON.parse(o),r,"path"===a.relative);null==t&&"/"!==n&&(s.pathname="/"===s.pathname?n:F([n,s.pathname])),(a.replace?i.replace:i.push)(s,a.state,a)}),[n,i,o,r,t])}()}function it(t,n){let{relative:a}=void 0===n?{}:n,{future:i}=e.useContext(Y),{matches:s}=e.useContext(Q),{pathname:r}=et(),o=JSON.stringify(A(s,i.v7_relativeSplatPath));return e.useMemo((()=>K(t,JSON.parse(o),r,"path"===a)),[t,o,r,a])}function st(t,n,a,i){tt()||k(!1);let{navigator:s}=e.useContext(Y),{matches:r}=e.useContext(Q),o=r[r.length-1],l=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,g=et();if(n){var u;let t="string"==typeof n?E(n):n;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||k(!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 _=x(t,{pathname:h}),f=function(t,n,a,i){var s;if(void 0===n&&(n=[]),void 0===a&&(a=null),void 0===i&&(i=null),null==t){var r;if(null==(r=a)||!r.errors)return null;t=a.matches}let o=t,l=null==(s=a)?void 0:s.errors;if(null!=l){let t=o.findIndex((t=>t.route.id&&void 0!==(null==l?void 0:l[t.route.id])));t>=0||k(!1),o=o.slice(0,Math.min(o.length,t+1))}let m=!1,c=-1;if(a&&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:n}=a,i=e.route.loader&&void 0===t[e.route.id]&&(!n||void 0===n[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,s)=>{let r,g=!1,u=null,d=null;var p;a&&(r=l&&i.route.id?l[i.route.id]:void 0,u=i.route.errorElement||ot,m&&(c<0&&0===s?(dt[p="route-fallback"]||(dt[p]=!0),g=!0,d=null):c===s&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=n.concat(o.slice(0,s+1)),k=()=>{let n;return n=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!=a},children:n})};return a&&(i.route.ErrorBoundary||i.route.errorElement||0===s)?e.createElement(lt,{location:a.location,revalidation:a.revalidation,component:u,error:r,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(_&&_.map((t=>Object.assign({},t,{params:Object.assign({},l,t.params),pathname:F([m,s.encodeLocation?s.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:F([m,s.encodeLocation?s.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),r,a,i);return n&&f?e.createElement(X.Provider,{value:{location:$({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:p.Pop}},f):f}function rt(){let t=function(){var t;let n=e.useContext(Z),a=function(t){let n=e.useContext(q);return n||k(!1),n}(gt.UseRouteError),i=ut(gt.UseRouteError);return void 0!==n?n:null==(t=a.errors)?void 0:t[i]}(),n=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),a=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"}},n),a?e.createElement("pre",{style:i},a):null,null)}const ot=e.createElement(rt,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(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:n,match:a,children:i}=t,s=e.useContext(V);return s&&s.static&&s.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=a.route.id),e.createElement(Q.Provider,{value:n},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 n=function(t){let n=e.useContext(Q);return n||k(!1),n}(),a=n.matches[n.matches.length-1];return a.route.id||k(!1),a.route.id}const dt={};function pt(t){let{to:n,replace:a,state:i,relative:s}=t;tt()||k(!1);let{future:r,static:o}=e.useContext(Y),{matches:l}=e.useContext(Q),{pathname:m}=et(),c=at(),g=K(n,A(l,r.v7_relativeSplatPath),m,"path"===s),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:a,state:i,relative:s})),[c,u,s,a,i]),null}function ht(t){k(!1)}function kt(t){let{basename:n="/",children:a=null,location:i,navigationType:s=p.Pop,navigator:r,static:o=!1,future:l}=t;tt()&&k(!1);let m=n.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:r,static:o,future:$({v7_relativeSplatPath:!1},l)})),[m,l,r,o]);"string"==typeof i&&(i=E(i));let{pathname:g="/",search:u="",hash:d="",state:h=null,key:_="default"}=i,f=e.useMemo((()=>{let t=R(g,m);return null==t?null:{location:{pathname:t,search:u,hash:d,state:h,key:_},navigationType:s}}),[m,g,u,d,h,_,s]);return null==f?null:e.createElement(Y.Provider,{value:c},e.createElement(X.Provider,{children:a,value:f}))}function _t(t){let{children:e,location:n}=t;return st(ft(e),n)}function ft(t,n){void 0===n&&(n=[]);let a=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let s=[...n,i];if(t.type===e.Fragment)return void a.push.apply(a,ft(t.props.children,s));t.type!==ht&&k(!1),t.props.index&&t.props.children&&k(!1);let r={id:t.props.id||s.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,s)),a.push(r)})),a}e.startTransition,new Promise((()=>{})),e.Component;const St=window.ReactDOM;var bt=t.n(St);function Et(){return Et=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Et.apply(this,arguments)}function vt(t,e){if(null==t)return{};var n,a,i={},s=Object.keys(t);for(a=0;a<s.length;a++)n=s[a],e.indexOf(n)>=0||(i[n]=t[n]);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"],yt=["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:n,children:a,future:i,window:s}=t,r=e.useRef();null==r.current&&(r.current=function(t){return void 0===t&&(t={}),function(t,e,n,a){void 0===a&&(a={});let{window:i=document.defaultView,v5Compat:s=!1}=a,r=i.history,o=p.Pop,l=null,m=c();function c(){return(r.state||{idx:null}).idx}function g(){o=p.Pop;let t=c(),e=null==t?null:t-m;m=t,l&&l({action:o,location:_.location,delta:e})}function u(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof t?t:b(t);return n=n.replace(/ $/,"%20"),k(e,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,e)}null==m&&(m=0,r.replaceState(d({},r.state,{idx:m}),""));let _={get action(){return o},get location(){return t(i,r)},listen(t){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(h,g),l=t,()=>{i.removeEventListener(h,g),l=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){o=p.Push;let a=S(_.location,t,e);n&&n(a,t),m=c()+1;let g=f(a,m),u=_.createHref(a);try{r.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}s&&l&&l({action:o,location:_.location,delta:1})},replace:function(t,e){o=p.Replace;let a=S(_.location,t,e);n&&n(a,t),m=c();let i=f(a,m),g=_.createHref(a);r.replaceState(i,"",g),s&&l&&l({action:o,location:_.location,delta:0})},go:t=>r.go(t)};return _}((function(t,e){let{pathname:n="/",search:a="",hash:i=""}=E(t.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),S("",{pathname:n,search:a,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let n=t.document.querySelector("base"),a="";if(n&&n.getAttribute("href")){let e=t.location.href,n=e.indexOf("#");a=-1===n?e:e.slice(0,n)}return a+"#"+("string"==typeof e?e:b(e))}),(function(t,e){_("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:s,v5Compat:!0}));let o=r.current,[l,m]=e.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&Nt?Nt((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>o.listen(g)),[o,g]),e.createElement(kt,{basename:n,children:a,location:l.location,navigationType:l.action,navigator:o,future:i})}St.flushSync,e.useId;const jt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Tt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ut=e.forwardRef((function(t,n){let a,{onClick:i,relative:s,reloadDocument:r,replace:o,state:l,target:m,to:c,preventScrollReset:g,unstable_viewTransition:u}=t,d=vt(t,xt),{basename:p}=e.useContext(Y),h=!1;if("string"==typeof c&&Tt.test(c)&&(a=c,jt))try{let t=new URL(window.location.href),e=c.startsWith("//")?new URL(t.protocol+c):new URL(c),n=R(e.pathname,p);e.origin===t.origin&&null!=n?c=n+e.search+e.hash:h=!0}catch(t){}let _=function(t,n){let{relative:a}=void 0===n?{}:n;tt()||k(!1);let{basename:i,navigator:s}=e.useContext(Y),{hash:r,pathname:o,search:l}=it(t,{relative:a}),m=o;return"/"!==i&&(m="/"===o?i:F([i,o])),s.createHref({pathname:m,search:l,hash:r})}(c,{relative:s}),f=function(t,n){let{target:a,replace:i,state:s,preventScrollReset:r,relative:o,unstable_viewTransition:l}=void 0===n?{}:n,m=at(),c=et(),g=it(t,{relative:o});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,a)){e.preventDefault();let n=void 0!==i?i:b(c)===b(g);m(t,{replace:n,state:s,preventScrollReset:r,relative:o,unstable_viewTransition:l})}}),[c,m,g,i,s,a,t,r,o,l])}(c,{replace:o,state:l,target:m,preventScrollReset:g,relative:s,unstable_viewTransition:u});return e.createElement("a",Et({},d,{href:a||_,onClick:h||r?i:function(t){i&&i(t),t.defaultPrevented||f(t)},ref:n,target:m}))})),Dt=e.forwardRef((function(t,n){let{"aria-current":a="page",caseSensitive:i=!1,className:s="",end:r=!1,style:o,to:l,unstable_viewTransition:m,children:c}=t,g=vt(t,yt),u=it(l,{relative:g.relative}),d=et(),p=e.useContext(q),{navigator:h,basename:_}=e.useContext(Y),f=null!=p&&function(t,n){void 0===n&&(n={});let a=e.useContext(wt);null==a&&k(!1);let{basename:i}=function(t){let n=e.useContext(V);return n||k(!1),n}(Pt.useViewTransitionState),s=it(t,{relative:n.relative});if(!a.isTransitioning)return!1;let r=R(a.currentLocation.pathname,i)||a.currentLocation.pathname,o=R(a.nextLocation.pathname,i)||a.nextLocation.pathname;return null!=M(s.pathname,o)||null!=M(s.pathname,r)}(u)&&!0===m,S=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,b=d.pathname,E=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(b=b.toLowerCase(),E=E?E.toLowerCase():null,S=S.toLowerCase()),E&&_&&(E=R(E,_)||E);const v="/"!==S&&S.endsWith("/")?S.length-1:S.length;let x,y=b===S||!r&&b.startsWith(S)&&"/"===b.charAt(v),w=null!=E&&(E===S||!r&&E.startsWith(S)&&"/"===E.charAt(S.length)),N={isActive:y,isPending:w,isTransitioning:f},C=y?a:void 0;x="function"==typeof s?s(N):[s,y?"active":null,w?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let j="function"==typeof o?o(N):o;return e.createElement(Ut,Et({},g,{"aria-current":C,className:x,ref:n,style:j,to:l,unstable_viewTransition:m}),"function"==typeof c?c(N):c)}));var Pt,Gt;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Pt||(Pt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Gt||(Gt={}));const It=({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)))),Mt=({to:t,title:n})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Dt,{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 ":"")},n)),Ot=({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)(Mt,{key:t.to,to:t.to,title:t.title})})));function Rt(){return Rt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Rt.apply(this,arguments)}function Lt(t,e){if(null==t)return{};var n,a,i={},s=Object.keys(t);for(a=0;a<s.length;a++)n=s[a],e.indexOf(n)>=0||(i[n]=t[n]);return i}function At(t,e){return At=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},At(t,e)}function Kt(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,At(t,e)}function Ft(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Ht=n().createContext(null);var Bt=function(t){return t.scrollTop},Wt="unmounted",Jt="exited",zt="entering",$t="entered",Vt="exiting",qt=function(t){function e(e,n){var a;a=t.call(this,e,n)||this;var i,s=n&&!n.isMounting?e.enter:e.appear;return a.appearStatus=null,e.in?s?(i=Jt,a.appearStatus=zt):i=$t:i=e.unmountOnExit||e.mountOnEnter?Wt:Jt,a.state={status:i},a.nextCallback=null,a}Kt(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Wt?{status:Jt}:null};var a=e.prototype;return a.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},a.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==zt&&n!==$t&&(e=zt):n!==zt&&n!==$t||(e=Vt)}this.updateStatus(!1,e)},a.componentWillUnmount=function(){this.cancelNextCallback()},a.getTimeouts=function(){var t,e,n,a=this.props.timeout;return t=e=n=a,null!=a&&"number"!=typeof a&&(t=a.exit,e=a.enter,n=void 0!==a.appear?a.appear:e),{exit:t,enter:e,appear:n}},a.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 n=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this);n&&Bt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jt&&this.setState({status:Wt})},a.performEnter=function(t){var e=this,n=this.props.enter,a=this.context?this.context.isMounting:t,i=this.props.nodeRef?[a]:[bt().findDOMNode(this),a],s=i[0],r=i[1],o=this.getTimeouts(),l=a?o.appear:o.enter;t||n?(this.props.onEnter(s,r),this.safeSetState({status:zt},(function(){e.props.onEntering(s,r),e.onTransitionEnd(l,(function(){e.safeSetState({status:$t},(function(){e.props.onEntered(s,r)}))}))}))):this.safeSetState({status:$t},(function(){e.props.onEntered(s)}))},a.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:bt().findDOMNode(this);e?(this.props.onExit(a),this.safeSetState({status:Vt},(function(){t.props.onExiting(a),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Jt},(function(){t.props.onExited(a)}))}))}))):this.safeSetState({status:Jt},(function(){t.props.onExited(a)}))},a.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},a.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},a.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(a){n&&(n=!1,e.nextCallback=null,t(a))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},a.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this),a=null==t&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],s=i[0],r=i[1];this.props.addEndListener(s,r)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},a.render=function(){var t=this.state.status;if(t===Wt)return null;var e=this.props,a=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 n().createElement(Ht.Provider,{value:null},"function"==typeof a?a(t,i):n().cloneElement(n().Children.only(a),i))},e}(n().Component);function Yt(){}qt.contextType=Ht,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=Wt,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 a=e,void((n=t).classList?n.classList.remove(a):"string"==typeof n.className?n.className=Ft(n.className,a):n.setAttribute("class",Ft(n.className&&n.className.baseVal||"",a)));var n,a}))},Zt=function(t){function e(){for(var e,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var a=e.resolveArguments(t,n),i=a[0],s=a[1];e.removeClasses(i,"exit"),e.addClass(i,s?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var a=e.resolveArguments(t,n),i=a[0],s=a[1]?"appear":"enter";e.addClass(i,s,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var a=e.resolveArguments(t,n),i=a[0],s=a[1]?"appear":"enter";e.removeClasses(i,s),e.addClass(i,s,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,a="string"==typeof n,i=a?(a&&n?n+"-":"")+t:n[t];return{baseClassName:i,activeClassName:a?i+"-active":n[t+"Active"],doneClassName:a?i+"-done":n[t+"Done"]}},e}Kt(e,t);var a=e.prototype;return a.addClass=function(t,e,n){var a=this.getClassNames(e)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===n&&i&&(a+=" "+i),"active"===n&&t&&Bt(t),a&&(this.appliedClasses[e][n]=a,function(t,e){t&&e&&e.split(" ").forEach((function(e){return a=e,void((n=t).classList?n.classList.add(a):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(n,a)||("string"==typeof n.className?n.className=n.className+" "+a:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+a)));var n,a}))}(t,a))},a.removeClasses=function(t,e){var n=this.appliedClasses[e],a=n.base,i=n.active,s=n.done;this.appliedClasses[e]={},a&&Qt(t,a),i&&Qt(t,i),s&&Qt(t,s)},a.render=function(){var t=this.props,e=(t.classNames,Lt(t,["classNames"]));return n().createElement(Xt,Rt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(n().Component);Zt.defaultProps={classNames:""},Zt.propTypes={};const te=Zt,ee=({title:t=(0,a.__)("Save","gtm-kit"),className:n="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:o,useCanSave:l}=(0,i.useContext)(g);return(0,e.createElement)(s.Button,{className:n,onClick:()=>r(),variant:"primary",disabled:o||!l},l?(0,a.__)(t,"gtm-kit"):(0,a.__)("Saved","gtm-kit"),o?(0,e.createElement)(s.Spinner,null):"")},ne=()=>{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)))},ae=({subject:t})=>{const n=!0===t||"on"===t,i=!0===n?"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},n?(0,a.__)("Active","gtm-kit"):(0,a.__)("Inactive","gtm-kit"))},ie=(0,i.forwardRef)((({children:t,className:n="",...a},i)=>(0,e.createElement)("div",{...a,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 "+n,ref:i},t)));ie.Header=({as:t="h3",title:n="",children:a,className:i="",...s})=>(0,e.createElement)("div",{...s,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"},n),a),ie.Content=({as:t="div",children:n,className:a="gtmkit-flex-auto",...i})=>(0,e.createElement)(t,{...i,className:a},n),ie.Button=({url:t,destination:n,newTab:a=!1,text:i,group:r="",...o})=>{const l=at();return(0,e.createElement)("div",{...o,className:"gtmkit-mt-4 gtmkit-mb-0.5"},(0,e.createElement)(s.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full sm:gtmkit-w-auto gtmkit-min-w-[225px]",onClick:()=>{n&&t&&!1===a?window.gtmkitSettings.current_poage===r?l(n,{replace:!0}):window.location.href=t+"#"+n:t?a?window.open(t):window.location.href=t:l(n,{replace:!0})}},(0,e.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},i)))};const se=ie,re=({title:t,data:n,className:s=""})=>{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] "+s},n.map(((t,n)=>!1===t.featured?null:(0,e.createElement)(se,{key:n},(0,e.createElement)(se.Header,{title:t.title},t.pill?(0,e.createElement)(ae,{subject:r[t.group][t.option]}):null),(0,e.createElement)(se.Content,null,t.text.map(((t,n)=>(0,e.createElement)("p",{key:n},t)))),(0,e.createElement)(se.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,a.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group}))))))},oe=t=>((t,e,n)=>{const a=(t,n)=>({...n,title:t.title,to:t.path,group:t.group||n.group,option:t.option||n.option,text:[t.description],link:{...n.link,url:window.gtmkitSettings[e+"Url"],destination:"/"+t.path}});return"templates"===e?Object.keys(t).map((e=>a(t[e][0],n))):Object.keys(t).map((e=>a(t[e],n)))})(window.gtmkitSettings[t],t,function(t){switch(t){case"integrations":return{pill:!0,group:"integrations",option:null,link:{internal:!0,text:(0,a.__)("Setup Integration","gtm-kit")}};case"templates":return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,a.__)("Get Template","gtm-kit")}};default:return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,a.__)("Read More","gtm-kit")}}}}(t)),le=()=>{const{useSettings:t}=(0,i.useContext)(g),[n,s]=(0,i.useState)(window.gtmkitSettings.tutorials),r=Boolean(t.general.sgtm_domain&&t.general.sgtm_domain.trim());return(0,i.useEffect)((()=>{s((t=>[...t,{title:(0,a.__)("See all tutorials","gtm-kit"),text:[(0,a.__)("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,a.__)("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,a.__)("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)(se,null,(0,e.createElement)(se.Header,{title:"Google Tag Manager Container"},(0,e.createElement)(ae,{subject:t.general.gtm_id&&t.general.container_active})),(0,e.createElement)(se.Content,null,t.general.gtm_id&&t.general.container_active?(0,e.createElement)("p",null,(0,a.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id):(0,e.createElement)("p",null,(0,a.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,e.createElement)(se.Button,{destination:"/container",text:(0,a.__)("Edit container","gtm-kit")})),(0,e.createElement)(se,null,(0,e.createElement)(se.Header,{title:(0,a.__)("Server-side GTM","gtm-kit")},(0,e.createElement)(ae,{subject:r})),(0,e.createElement)(se.Content,null,(0,e.createElement)("p",null,(0,a.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit"))),(0,e.createElement)(se.Button,{destination:"/container",text:(0,a.__)("Edit container","gtm-kit")})),(0,e.createElement)(se,null,(0,e.createElement)(se.Header,{title:(0,a.__)("Help improve GTM Kit","gtm-kit")},(0,e.createElement)(ae,{subject:t.general.analytics_active})),(0,e.createElement)(se.Content,null,(0,e.createElement)("p",null,(0,a.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,e.createElement)(se.Button,{destination:"/misc",text:(0,a.__)("Share anonymous data","gtm-kit")}))),(0,e.createElement)(re,{title:(0,a.__)("Tutorials","gtm-kit"),data:n}),(0,e.createElement)(re,{title:(0,a.__)("Integrations","gtm-kit"),data:oe("integrations")}))},me=({title:t,placeholder:n,help:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:r="general",optionName:o,isDisabled:l,useSettings:m,useUpdateStateSettings:c})=>(0,e.createElement)(s.TextControl,{label:t,placeholder:n,help:a,className:i,value:m[r][o],onChange:t=>c(r,o,t),disabled:l}),ce=({title:t,label:n,optionGroup:a="general",optionName:i,disabled:r=!1,useSettings:o,useUpdateStateSettings:l})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,e.createElement)(s.BaseControl,{label:t},(0,e.createElement)(s.ToggleControl,{label:n,checked:!r&&o[a][i],onChange:()=>{l(a,i,!(o&&o[a][i]))},disabled:r})))),ge=({title:t,options:n,help:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:r="general",optionName:o,disabled:l,useSettings:m,useUpdateStateSettings:c})=>(0,e.createElement)(s.RadioControl,{label:t,options:n,help:a,className:i,selected:parseInt(m[r][o]),onChange:t=>c(r,o,t),disabled:l}),ue=({title:t,help:n,items:a=[],optionGroup:r="general",optionName:o,disabled:l=!1,useSettings:m,useUpdateStateSettings:c})=>{const g=Array.isArray(m[r][o])?m[r][o]:[],[u,d]=(0,i.useState)(g);return(0,i.useEffect)((()=>{const t=Array.isArray(m[r][o])?m[r][o]:[];d(t)}),[m]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,e.createElement)(s.BaseControl,{label:t,help:n},a.map((t=>(0,e.createElement)(s.CheckboxControl,{key:t.role,label:t.name,disabled:l,checked:u.includes(t.role),onChange:e=>((t,e)=>{d((n=>{let a;return a=t?[...n,e]:n.filter((t=>t!==e)),c(r,o,a),a}))})(e,t.role)}))))))},de=window.ReactJSXRuntime,pe=(0,i.forwardRef)((({children:t,className:e="",disabled:n=!1,...a},i)=>(0,de.jsx)("div",{...a,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-w-3/4 gtmkit-border-color-grey "+e+(n?"gtmkit-opacity-60":""),ref:i,children:t})));pe.Header=({as:t="h3",title:e="",children:n,className:a="",...i})=>(0,de.jsxs)(t,{...i,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey gtmkit-flex gtmkit-items-center "+a,children:[e,n]}),pe.Content=({as:t="div",children:e,className:n="",...a})=>(0,de.jsx)(t,{...a,className:"gtmkit-px-8 gtmkit-py-6 "+n,children:e});const he=pe,ke=()=>{const{useSettings:t,useUpdateStateSettings:n,useUserRoles:s}=(0,i.useContext)(g),r=!(t.general.sgtm_domain&&t.general.sgtm_domain.trim()&&t.general.sgtm_container_identifier&&t.general.sgtm_container_identifier.trim()),o=et();return(0,e.useEffect)((()=>{const t=new URLSearchParams(o.search).get("focus");if(t){const e=document.getElementById(t);e&&e.scrollIntoView()}}),[o]),(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,a.__)("Google Tag Manager container","gtm-kit")}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("General Container Settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")}),(0,de.jsx)(me,{title:(0,a.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,a.__)("Enter GTM Container ID","gtm-kit"),useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)(ce,{title:(0,a.__)("Inject Container Code","gtm-kit"),label:(0,a.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active",useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)(ce,{title:(0,a.__)("Just the container","gtm-kit"),label:(0,a.__)("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",useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)(me,{title:(0,a.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,a.__)("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"),useSettings:t,useUpdateStateSettings:n})]})]}),(0,de.jsx)("div",{id:"sgtm"}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(me,{title:(0,a.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,a.__)("Enter domain","gtm-kit"),help:(0,a.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit"),useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)(me,{title:(0,a.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,a.__)("Enter loader name","gtm-kit"),help:(0,a.__)("Only use if you are using a custom loader.","gtm-kit"),useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)(ce,{title:(0,a.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,a.__)("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:r,useSettings:t,useUpdateStateSettings:n})]}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Google Tag Manager Server-side Tagging","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]}),(0,de.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Hosting server-side GTM containers","gtm-kit")}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("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,a.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")]}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,de.jsx)("a",{href:"https://stape.io/?pt=tlam&rs=plugin",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer",children:(0,a.__)("Learn more about Stape.io","gtm-kit")})})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Page Speed Optimization","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsx)(he.Content,{children:(0,de.jsx)(ce,{title:(0,a.__)("load_delayed_js event","gtm-kit"),label:(0,a.__)("Setting this to On will push the event 'load_delayed_js' on page load.","gtm-kit"),optionName:"load_js_event",useSettings:t,useUpdateStateSettings:n})}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Delay JavaScript execution","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("Page optimization plugins can delay the 'load_delayed_js' event and this can be used to delay the triggering og tags in Google Tag Manager.","gtm-kit")," ",(0,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Google Tag Manager Environment","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(me,{title:(0,a.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,a.__)("Enter gtm_auth code","gtm-kit"),help:(0,a.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit"),useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)(me,{title:(0,a.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,a.__)("Enter gtm_preview code","gtm-kit"),help:(0,a.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit"),useSettings:t,useUpdateStateSettings:n})]}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Environments","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,a.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,a.__)("If left empty the default environment will be used.","gtm-kit")]}),(0,de.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Override settings in wp-config.php","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("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,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Exclude User Roles","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsx)(he.Content,{children:(0,de.jsx)(ue,{title:(0,a.__)("Exclude user roles","gtm-kit"),help:(0,a.__)("Select the roles that you want to exclude from tracking.","gtm-kit"),items:s,optionName:"exclude_user_roles",useSettings:t,useUpdateStateSettings:n})}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold gtmkit-text-red-600",children:(0,a.__)("Warning!","gtm-kit")}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("Excluding user roles is not compatible with all full-page cache solutions. Some full-page cache solutions may cache the page identically for all users, regardless of their user role. This could result in users being excluded who should not be.","gtm-kit")}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("Please ensure thorough and proper testing of this.","gtm-kit")})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Container Code Implementation","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(ge,{title:(0,a.__)("Container code implementation:","gtm-kit"),options:[{label:(0,a.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,a.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,a.__)("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",useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)(ge,{title:(0,a.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,a.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,a.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,a.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,a.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,a.__)('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",useSettings:t,useUpdateStateSettings:n}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,de.jsx)("code",{children:"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"})})]})]})]})},_e=()=>{const{useSettings:t,useUpdateStateSettings:n}=(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,a.__)("Post Data","gtm-kit")),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Post Data Settings","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("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,a.__)("Post type","gtm-kit"),id:"post-type",label:(0,a.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Page type","gtm-kit"),id:"page-type",label:(0,a.__)('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",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Categories","gtm-kit"),id:"categories",label:(0,a.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Tags","gtm-kit"),id:"tags",label:(0,a.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Post title","gtm-kit"),id:"post-title",label:(0,a.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Post ID","gtm-kit"),id:"post-id",label:(0,a.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Post data","gtm-kit"),id:"post-date",label:(0,a.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,a.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,a.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id",useSettings:t,useUpdateStateSettings:n}))))},fe=()=>{const{useSettings:t,useUpdateStateSettings:n}=(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,a.__)("User Data","gtm-kit")),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,e.createElement)(he.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,a.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,e.createElement)("p",null,(0,a.__)("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)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("User Data Settings","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(ce,{title:(0,a.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,a.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("User ID","gtm-kit"),id:"user-id",label:(0,a.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("User role","gtm-kit"),id:"user-role",label:(0,a.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role",useSettings:t,useUpdateStateSettings:n}))))},Se=()=>{const{useSettings:t,useUpdateStateSettings:n}=(0,i.useContext)(g),s=!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,a.__)("Google Consent Mode","gtm-kit")),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Google Consent Mode Activation","gtm-kit")},(0,e.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,a.__)("Warning!","gtm-kit"))),(0,e.createElement)(he.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,a.__)("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,a.__)("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,a.__)("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,a.__)("See an example of how consent is updated","gtm-kit"))),(0,e.createElement)(ce,{title:(0,a.__)("Activate GCM settings","gtm-kit"),label:(0,a.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings",useSettings:t,useUpdateStateSettings:n}))),(0,e.createElement)(he,{disabled:s},(0,e.createElement)(he.Header,{title:(0,a.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(ce,{title:(0,a.__)("Ad Personalization","gtm-kit"),label:(0,a.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Ad Storage","gtm-kit"),label:(0,a.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Ad User Data","gtm-kit"),label:(0,a.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Analytics Storage","gtm-kit"),label:(0,a.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Functionality Storage","gtm-kit"),label:(0,a.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Personalization Storage","gtm-kit"),label:(0,a.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Security Storage","gtm-kit"),label:(0,a.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)("h4",{className:"gtmkit-font-bold gtmkit-pt-8"},(0,a.__)("Advanced","gtm-kit")),(0,e.createElement)(ce,{title:(0,a.__)("Redact Ads Data","gtm-kit"),label:(0,a.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Pass through URL parameters","gtm-kit"),label:(0,a.__)("Pass through ad click, client ID, and session ID information in URLs","gtm-kit"),optionName:"gcm_url_passthrough",disabled:s,useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(me,{title:(0,a.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,a.__)("Enter time in milliseconds","gtm-kit"),useSettings:t,useUpdateStateSettings:n}))))},be=({label:t,value:n,tag:a})=>(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"===a?(0,e.createElement)("code",{className:"gtmkit-text-sm"},n):(0,e.createElement)("em",null,n))),Ee=()=>{const{useSiteData:t}=(0,i.useContext)(g),n=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,a.__)("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,a.__)("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"},n.map((function(t,n){return(0,e.createElement)(be,{key:n,label:t.label,value:t.value,tag:t.tag})})))))},ve=()=>{const{useSettings:t,useUpdateStateSettings:n}=(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,a.__)("Misc","gtm-kit")),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Help improve GTM Kit","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(Ee,null),(0,e.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,a.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,e.createElement)(ce,{title:(0,a.__)("Share anonymous data","gtm-kit"),label:(0,a.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active",useSettings:t,useUpdateStateSettings:n}))),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Logging and debugging","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(ce,{title:(0,a.__)("Event Inspector","gtm-kit"),label:(0,a.__)("The event inspector is placed in the footer of the front and it allows you to see all the fired GTM events.","gtm-kit"),optionName:"event_inspector",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Console log","gtm-kit"),label:(0,a.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log",useSettings:t,useUpdateStateSettings:n}),(0,e.createElement)(ce,{title:(0,a.__)("Debug log","gtm-kit"),label:(0,a.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log",useSettings:t,useUpdateStateSettings:n}))))},xe=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(re,{title:(0,a.__)("Integrations","gtm-kit"),data:oe("integrations")})),ye=({pluginName:t})=>(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.sprintf)(
     1(()=>{"use strict";var t={251:(t,e,n)=>{var a=n(196),i=Symbol.for("react.element"),r=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,o=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function m(t,e,n){var a,r={},m=null,c=null;for(a in void 0!==n&&(m=""+n),void 0!==e.key&&(m=""+e.key),void 0!==e.ref&&(c=e.ref),e)s.call(e,a)&&!l.hasOwnProperty(a)&&(r[a]=e[a]);if(t&&t.defaultProps)for(a in e=t.defaultProps)void 0===r[a]&&(r[a]=e[a]);return{$$typeof:i,type:t,key:m,ref:c,props:r,_owner:o.current}}e.Fragment=r,e.jsx=m,e.jsxs=m},893:(t,e,n)=>{t.exports=n(251)},196:t=>{t.exports=window.React}},e={};function n(a){var i=e[a];if(void 0!==i)return i.exports;var r=e[a]={exports:{}};return t[a](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var a in e)n.o(e,a)&&!n.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=n(196),e=n.n(t);const a=window.wp.i18n,i=window.wp.element,r=window.wp.components,s=window.lodash,o=window.wp.apiFetch;var l=n.n(o);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const m=async(t,e,n=null,a=!1)=>{let i={};try{i=await l()({path:t,method:e,...n&&{data:n}})}catch(n){return console.log(`${e} ${t} Errors:`,n),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===a?i:!0===i.success?i.data:options},c=(t,e)=>{const n={...t};switch(e.type){case"FETCH_SETTINGS":n.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},n.stateSettings=e.payload.stateSettings,n.siteData=e.payload.siteData,n.installData=e.payload.installData,n.isPending=!1,n.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(n.notice=(0,a.__)("An error occurred.","gtm-kit"),n.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":n.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":n.fetchedSettings=e.payload.fetchedSettings,n.stateSettings=e.payload.stateSettings,n.isPending=!1,n.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,n.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,a.__)("An error occurred.","gtm-kit"):(0,a.__)("Saved Successfully.","gtm-kit"),n.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":n.fetchedSettings=e.payload.fetchedSettings||n.fetchedSettings,n.stateSettings=e.payload.stateSettings||n.stateSettings,n.isPending=e.payload.isPending||n.isPending,n.notice=e.payload.notice||n.notice,n.hasError=e.payload.hasError||n.hasError,n.canSave=e.payload.canSave||n.canSave,n.isSendingSystemData=e.payload.isSendingSystemData||n.isSendingSystemData,n.supportTicket=e.payload.supportTicket||n.supportTicket,n.isSendingLicenseKey=e.payload.isSendingLicenseKey||n.isSendingLicenseKey,n.licenseKey=e.payload.licenseKey||n.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":n.isSendingSystemData=e.payload.isSendingSystemData||n.isSendingSystemData;break;case"SEND_SUPPORT_DATA":n.isSendingSystemData=!1,n.isSystemDataSent=e.payload.isSystemDataSent||n.isSystemDataSent,n.systemDataMessage=e.payload.systemDataMessage||n.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":n.isSendingLicenseKey=e.payload.isSendingLicenseKey||n.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":n.isSendingLicenseKey=!1,n.isLicenseKeySent=e.payload.isLicenseKeySent||n.isLicenseKeySent,n.licenseKeyMessage=e.payload.licenseKeyMessage||n.licenseKeyMessage}return n},g=(0,i.createContext)(),u=e=>{const[n,a]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:""}),r=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},n="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};a({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:n}})},o=async t=>{a({type:"UPDATE_STATE",payload:t})};(0,i.useEffect)((()=>{r()}),[]);const l={useDispatch:t=>{a(t)},useUpdateSettings:async()=>{a({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,m("gtmkit/v1/set-options","POST",e));var e;a({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:r,useUpdateState:o,useUpdateStateSettings:async(t,e,a)=>{const i=JSON.parse(JSON.stringify(n.stateSettings));let r;i[t][e]=a,r=!(0,s.isEqual)(i,n.fetchedSettings),o({stateSettings:i,canSave:r})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let i;const r={};r.general={...a.general,...e.general},"integrations"in e&&(r.integrations={...a.integrations,...e.integrations}),i=!(0,s.isEqual)(r,n.fetchedSettings),o({stateSettings:r,canSave:i})},useUpdateSupportTicket:async t=>{o({supportTicket:t})},useSendSystemData:async()=>{a({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,m("gtmkit/v1/send-support-data","POST",e,!0));var e;a({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{o({licenseKey:t})},useSendLicenseKey:async()=>{a({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(e=n.licenseKey,m("gtmkit/v1/send-license-key","POST",e,!0));var e;a({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage: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,useIsSendingLicenseKey:n.isSendingLicenseKey,useLicenseKey:n.licenseKey,useIsLicenseKeySent:n.isLicenseKeySent,useLicenseKeyMessage:n.licenseKeyMessage,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,t.createElement)(g.Provider,{value:l},e.children)};function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}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 S(t,e,n,a){return void 0===n&&(n=null),d({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?E(e):e,{state:n,key:e&&e.key||a||Math.random().toString(36).substr(2,8)})}function b(t){let{pathname:e="/",search:n="",hash:a=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function E(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let a=t.indexOf("?");a>=0&&(e.search=t.substr(a),t=t.substr(0,a)),t&&(e.pathname=t)}return e}var v;function y(t,e,n){return void 0===n&&(n="/"),function(t,e,n,a){let i=R(("string"==typeof e?E(e):e).pathname||"/",n);if(null==i)return null;let r=x(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,n)=>t===e[n]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(r);let s=null;for(let t=0;null==s&&t<r.length;++t){let e=M(i);s=G(r[t],e,a)}return s}(t,e,n,!1)}function x(t,e,n,a){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===a&&(a="");let i=(t,i,r)=>{let s={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};s.relativePath.startsWith("/")&&(_(s.relativePath.startsWith(a),'Absolute route path "'+s.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(a.length));let o=K([a,s.relativePath]),l=n.concat(s);t.children&&t.children.length>0&&(_(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),x(t.children,e,l,o)),(null!=t.path||t.index)&&e.push({path:o,score:I(o,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var n;if(""!==t.path&&null!=(n=t.path)&&n.includes("?"))for(let n of w(t.path))i(t,e,n);else i(t,e)})),e}function w(t){let e=t.split("/");if(0===e.length)return[];let[n,...a]=e,i=n.endsWith("?"),r=n.replace(/\?$/,"");if(0===a.length)return i?[r,""]:[r];let s=w(a.join("/")),o=[];return o.push(...s.map((t=>""===t?r:[r,t].join("/")))),i&&o.push(...s),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(v||(v={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const N=/^:[\w-]+$/,C=3,j=2,T=1,U=10,D=-2,P=t=>"*"===t;function I(t,e){let n=t.split("/"),a=n.length;return n.some(P)&&(a+=D),e&&(a+=j),n.filter((t=>!P(t))).reduce(((t,e)=>t+(N.test(e)?C:""===e?T:U)),a)}function G(t,e,n){void 0===n&&(n=!1);let{routesMeta:a}=t,i={},r="/",s=[];for(let t=0;t<a.length;++t){let o=a[t],l=t===a.length-1,m="/"===r?e:e.slice(r.length)||"/",c=O({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},m),g=o.route;if(!c&&l&&n&&!a[a.length-1].route.index&&(c=O({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},m)),!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:K([r,c.pathname]),pathnameBase:H(K([r,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(r=K([r,c.pathnameBase]))}return s}function O(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[n,a]=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!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 a=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,n)=>(a.push({paramName:e,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(a.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),a]}(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let r=i[0],s=r.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:a.reduce(((t,e,n)=>{let{paramName:a,isOptional:i}=e;if("*"===a){let t=o[n]||"";s=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const l=o[n];return t[a]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:s,pattern:t}}function M(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 R(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,a=t.charAt(n);return a&&"/"!==a?null:t.slice(n)||"/"}function L(t,e,n,a){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(a)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function A(t,e){let n=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?n.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)):n.map((t=>t.pathnameBase))}function F(t,e,n,a){let i;void 0===a&&(a=!1),"string"==typeof t?i=E(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 r,s=""===t||""===i.pathname,o=s?"/":i.pathname;if(null==o)r=n;else{let t=e.length-1;if(!a&&o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}r=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:n,search:a="",hash:i=""}="string"==typeof t?E(t):t,r=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)})),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:r,search:B(a),hash:W(i)}}(i,r),m=o&&"/"!==o&&o.endsWith("/"),c=(s||"."===o)&&n.endsWith("/");return l.pathname.endsWith("/")||!m&&!c||(l.pathname+="/"),l}const K=t=>t.join("/").replace(/\/\/+/g,"/"),H=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),B=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",W=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const $=["post","put","patch","delete"],z=(new Set($),["get",...$]);function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},J.apply(this,arguments)}new Set(z),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const V=t.createContext(null),q=t.createContext(null),Y=t.createContext(null),X=t.createContext(null),Q=t.createContext({outlet:null,matches:[],isDataRoute:!1}),Z=t.createContext(null);function tt(){return null!=t.useContext(X)}function et(){return tt()||_(!1),t.useContext(X).location}function nt(e){t.useContext(Y).static||t.useLayoutEffect(e)}function at(){let{isDataRoute:e}=t.useContext(Q);return e?function(){let{router:e}=function(e){let n=t.useContext(V);return n||_(!1),n}(ct.UseNavigateStable),n=ut(gt.UseNavigateStable),a=t.useRef(!1);return nt((()=>{a.current=!0})),t.useCallback((function(t,i){void 0===i&&(i={}),a.current&&("number"==typeof t?e.navigate(t):e.navigate(t,J({fromRouteId:n},i)))}),[e,n])}():function(){tt()||_(!1);let e=t.useContext(V),{basename:n,future:a,navigator:i}=t.useContext(Y),{matches:r}=t.useContext(Q),{pathname:s}=et(),o=JSON.stringify(A(r,a.v7_relativeSplatPath)),l=t.useRef(!1);return nt((()=>{l.current=!0})),t.useCallback((function(t,a){if(void 0===a&&(a={}),!l.current)return;if("number"==typeof t)return void i.go(t);let r=F(t,JSON.parse(o),s,"path"===a.relative);null==e&&"/"!==n&&(r.pathname="/"===r.pathname?n:K([n,r.pathname])),(a.replace?i.replace:i.push)(r,a.state,a)}),[n,i,o,s,e])}()}function it(e,n){let{relative:a}=void 0===n?{}:n,{future:i}=t.useContext(Y),{matches:r}=t.useContext(Q),{pathname:s}=et(),o=JSON.stringify(A(r,i.v7_relativeSplatPath));return t.useMemo((()=>F(e,JSON.parse(o),s,"path"===a)),[e,o,s,a])}function rt(e,n,a,i){tt()||_(!1);let{navigator:r}=t.useContext(Y),{matches:s}=t.useContext(Q),o=s[s.length-1],l=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,g=et();if(n){var u;let t="string"==typeof n?E(n):n;"/"===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=y(e,{pathname:h}),f=function(e,n,a,i){var r;if(void 0===n&&(n=[]),void 0===a&&(a=null),void 0===i&&(i=null),null==e){var s;if(null==(s=a)||!s.errors)return null;e=a.matches}let o=e,l=null==(r=a)?void 0:r.errors;if(null!=l){let t=o.findIndex((t=>t.route.id&&void 0!==(null==l?void 0:l[t.route.id])));t>=0||_(!1),o=o.slice(0,Math.min(o.length,t+1))}let m=!1,c=-1;if(a&&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:n}=a,i=e.route.loader&&void 0===t[e.route.id]&&(!n||void 0===n[e.route.id]);if(e.route.lazy||i){m=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((e,i,r)=>{let s,g=!1,u=null,d=null;var p;a&&(s=l&&i.route.id?l[i.route.id]:void 0,u=i.route.errorElement||ot,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=n.concat(o.slice(0,r+1)),_=()=>{let n;return n=s?u:g?d:i.route.Component?t.createElement(i.route.Component,null):i.route.element?i.route.element:e,t.createElement(mt,{match:i,routeContext:{outlet:e,matches:h,isDataRoute:null!=a},children:n})};return a&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?t.createElement(lt,{location:a.location,revalidation:a.revalidation,component:u,error:s,children:_(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):_()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},l,t.params),pathname:K([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:K([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),s,a,i);return n&&f?t.createElement(X.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:p.Pop}},f):f}function st(){let e=function(){var e;let n=t.useContext(Z),a=function(e){let n=t.useContext(q);return n||_(!1),n}(gt.UseRouteError),i=ut(gt.UseRouteError);return void 0!==n?n:null==(e=a.errors)?void 0:e[i]}(),n=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),a?t.createElement("pre",{style:i},a):null,null)}const ot=t.createElement(st,null);class lt extends t.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?t.createElement(Q.Provider,{value:this.props.routeContext},t.createElement(Z.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mt(e){let{routeContext:n,match:a,children:i}=e,r=t.useContext(V);return r&&r.static&&r.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=a.route.id),t.createElement(Q.Provider,{value:n},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(e){let n=function(e){let n=t.useContext(Q);return n||_(!1),n}(),a=n.matches[n.matches.length-1];return a.route.id||_(!1),a.route.id}const dt={};function pt(e){let{to:n,replace:a,state:i,relative:r}=e;tt()||_(!1);let{future:s,static:o}=t.useContext(Y),{matches:l}=t.useContext(Q),{pathname:m}=et(),c=at(),g=F(n,A(l,s.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return t.useEffect((()=>c(JSON.parse(u),{replace:a,state:i,relative:r})),[c,u,r,a,i]),null}function ht(t){_(!1)}function _t(e){let{basename:n="/",children:a=null,location:i,navigationType:r=p.Pop,navigator:s,static:o=!1,future:l}=e;tt()&&_(!1);let m=n.replace(/^\/*/,"/"),c=t.useMemo((()=>({basename:m,navigator:s,static:o,future:J({v7_relativeSplatPath:!1},l)})),[m,l,s,o]);"string"==typeof i&&(i=E(i));let{pathname:g="/",search:u="",hash:d="",state:h=null,key:k="default"}=i,f=t.useMemo((()=>{let t=R(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:t.createElement(Y.Provider,{value:c},t.createElement(X.Provider,{children:a,value:f}))}function kt(t){let{children:e,location:n}=t;return rt(ft(e),n)}function ft(e,n){void 0===n&&(n=[]);let a=[];return t.Children.forEach(e,((e,i)=>{if(!t.isValidElement(e))return;let r=[...n,i];if(e.type===t.Fragment)return void a.push.apply(a,ft(e.props.children,r));e.type!==ht&&_(!1),e.props.index&&e.props.children&&_(!1);let s={id:e.props.id||r.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=ft(e.props.children,r)),a.push(s)})),a}t.startTransition,new Promise((()=>{})),t.Component;const St=window.ReactDOM;var bt=n.n(St);function Et(){return Et=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Et.apply(this,arguments)}function vt(t,e){if(null==t)return{};var n,a,i={},r=Object.keys(t);for(a=0;a<r.length;a++)n=r[a],e.indexOf(n)>=0||(i[n]=t[n]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const yt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],xt=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(t){}const wt=t.createContext({isTransitioning:!1});new Map;const Nt=t.startTransition;function Ct(e){let{basename:n,children:a,future:i,window:r}=e,s=t.useRef();null==s.current&&(s.current=function(t){return void 0===t&&(t={}),function(t,e,n,a){void 0===a&&(a={});let{window:i=document.defaultView,v5Compat:r=!1}=a,s=i.history,o=p.Pop,l=null,m=c();function c(){return(s.state||{idx:null}).idx}function g(){o=p.Pop;let t=c(),e=null==t?null:t-m;m=t,l&&l({action:o,location:k.location,delta:e})}function u(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof t?t:b(t);return n=n.replace(/ $/,"%20"),_(e,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,e)}null==m&&(m=0,s.replaceState(d({},s.state,{idx:m}),""));let k={get action(){return o},get location(){return t(i,s)},listen(t){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(h,g),l=t,()=>{i.removeEventListener(h,g),l=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){o=p.Push;let a=S(k.location,t,e);n&&n(a,t),m=c()+1;let g=f(a,m),u=k.createHref(a);try{s.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&l&&l({action:o,location:k.location,delta:1})},replace:function(t,e){o=p.Replace;let a=S(k.location,t,e);n&&n(a,t),m=c();let i=f(a,m),g=k.createHref(a);s.replaceState(i,"",g),r&&l&&l({action:o,location:k.location,delta:0})},go:t=>s.go(t)};return k}((function(t,e){let{pathname:n="/",search:a="",hash:i=""}=E(t.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),S("",{pathname:n,search:a,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let n=t.document.querySelector("base"),a="";if(n&&n.getAttribute("href")){let e=t.location.href,n=e.indexOf("#");a=-1===n?e:e.slice(0,n)}return a+"#"+("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 o=s.current,[l,m]=t.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=t.useCallback((t=>{c&&Nt?Nt((()=>m(t))):m(t)}),[m,c]);return t.useLayoutEffect((()=>o.listen(g)),[o,g]),t.createElement(_t,{basename:n,children:a,location:l.location,navigationType:l.action,navigator:o,future:i})}St.flushSync,t.useId;const jt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Tt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ut=t.forwardRef((function(e,n){let a,{onClick:i,relative:r,reloadDocument:s,replace:o,state:l,target:m,to:c,preventScrollReset:g,unstable_viewTransition:u}=e,d=vt(e,yt),{basename:p}=t.useContext(Y),h=!1;if("string"==typeof c&&Tt.test(c)&&(a=c,jt))try{let t=new URL(window.location.href),e=c.startsWith("//")?new URL(t.protocol+c):new URL(c),n=R(e.pathname,p);e.origin===t.origin&&null!=n?c=n+e.search+e.hash:h=!0}catch(t){}let k=function(e,n){let{relative:a}=void 0===n?{}:n;tt()||_(!1);let{basename:i,navigator:r}=t.useContext(Y),{hash:s,pathname:o,search:l}=it(e,{relative:a}),m=o;return"/"!==i&&(m="/"===o?i:K([i,o])),r.createHref({pathname:m,search:l,hash:s})}(c,{relative:r}),f=function(e,n){let{target:a,replace:i,state:r,preventScrollReset:s,relative:o,unstable_viewTransition:l}=void 0===n?{}:n,m=at(),c=et(),g=it(e,{relative:o});return t.useCallback((t=>{if(function(t,e){return!(0!==t.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t))}(t,a)){t.preventDefault();let n=void 0!==i?i:b(c)===b(g);m(e,{replace:n,state:r,preventScrollReset:s,relative:o,unstable_viewTransition:l})}}),[c,m,g,i,r,a,e,s,o,l])}(c,{replace:o,state:l,target:m,preventScrollReset:g,relative:r,unstable_viewTransition:u});return t.createElement("a",Et({},d,{href:a||k,onClick:h||s?i:function(t){i&&i(t),t.defaultPrevented||f(t)},ref:n,target:m}))})),Dt=t.forwardRef((function(e,n){let{"aria-current":a="page",caseSensitive:i=!1,className:r="",end:s=!1,style:o,to:l,unstable_viewTransition:m,children:c}=e,g=vt(e,xt),u=it(l,{relative:g.relative}),d=et(),p=t.useContext(q),{navigator:h,basename:k}=t.useContext(Y),f=null!=p&&function(e,n){void 0===n&&(n={});let a=t.useContext(wt);null==a&&_(!1);let{basename:i}=function(e){let n=t.useContext(V);return n||_(!1),n}(Pt.useViewTransitionState),r=it(e,{relative:n.relative});if(!a.isTransitioning)return!1;let s=R(a.currentLocation.pathname,i)||a.currentLocation.pathname,o=R(a.nextLocation.pathname,i)||a.nextLocation.pathname;return null!=O(r.pathname,o)||null!=O(r.pathname,s)}(u)&&!0===m,S=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,b=d.pathname,E=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(b=b.toLowerCase(),E=E?E.toLowerCase():null,S=S.toLowerCase()),E&&k&&(E=R(E,k)||E);const v="/"!==S&&S.endsWith("/")?S.length-1:S.length;let y,x=b===S||!s&&b.startsWith(S)&&"/"===b.charAt(v),w=null!=E&&(E===S||!s&&E.startsWith(S)&&"/"===E.charAt(S.length)),N={isActive:x,isPending:w,isTransitioning:f},C=x?a:void 0;y="function"==typeof r?r(N):[r,x?"active":null,w?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let j="function"==typeof o?o(N):o;return t.createElement(Ut,Et({},g,{"aria-current":C,className:y,ref:n,style:j,to:l,unstable_viewTransition:m}),"function"==typeof c?c(N):c)}));var Pt,It;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Pt||(Pt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(It||(It={}));const Gt=({title:e})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,t.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,t.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,t.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,t.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,t.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,t.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,t.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"}))),e)))),Ot=({to:e,title:n})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(Dt,{to:e,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 ":"")},n)),Mt=({NavList:e})=>(0,t.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"},e.map((function(e){return(0,t.createElement)(Ot,{key:e.to,to:e.to,title:e.title})})));function Rt(){return Rt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Rt.apply(this,arguments)}function Lt(t,e){if(null==t)return{};var n,a,i={},r=Object.keys(t);for(a=0;a<r.length;a++)n=r[a],e.indexOf(n)>=0||(i[n]=t[n]);return i}function At(t,e){return At=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},At(t,e)}function Ft(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,At(t,e)}function Kt(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Ht=e().createContext(null);var Bt=function(t){return t.scrollTop},Wt="unmounted",$t="exited",zt="entering",Jt="entered",Vt="exiting",qt=function(t){function n(e,n){var a;a=t.call(this,e,n)||this;var i,r=n&&!n.isMounting?e.enter:e.appear;return a.appearStatus=null,e.in?r?(i=$t,a.appearStatus=zt):i=Jt:i=e.unmountOnExit||e.mountOnEnter?Wt:$t,a.state={status:i},a.nextCallback=null,a}Ft(n,t),n.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Wt?{status:$t}:null};var a=n.prototype;return a.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},a.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==zt&&n!==Jt&&(e=zt):n!==zt&&n!==Jt||(e=Vt)}this.updateStatus(!1,e)},a.componentWillUnmount=function(){this.cancelNextCallback()},a.getTimeouts=function(){var t,e,n,a=this.props.timeout;return t=e=n=a,null!=a&&"number"!=typeof a&&(t=a.exit,e=a.enter,n=void 0!==a.appear?a.appear:e),{exit:t,enter:e,appear:n}},a.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 n=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this);n&&Bt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===$t&&this.setState({status:Wt})},a.performEnter=function(t){var e=this,n=this.props.enter,a=this.context?this.context.isMounting:t,i=this.props.nodeRef?[a]:[bt().findDOMNode(this),a],r=i[0],s=i[1],o=this.getTimeouts(),l=a?o.appear:o.enter;t||n?(this.props.onEnter(r,s),this.safeSetState({status:zt},(function(){e.props.onEntering(r,s),e.onTransitionEnd(l,(function(){e.safeSetState({status:Jt},(function(){e.props.onEntered(r,s)}))}))}))):this.safeSetState({status:Jt},(function(){e.props.onEntered(r)}))},a.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:bt().findDOMNode(this);e?(this.props.onExit(a),this.safeSetState({status:Vt},(function(){t.props.onExiting(a),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:$t},(function(){t.props.onExited(a)}))}))}))):this.safeSetState({status:$t},(function(){t.props.onExited(a)}))},a.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},a.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},a.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(a){n&&(n=!1,e.nextCallback=null,t(a))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},a.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this),a=null==t&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=i[0],s=i[1];this.props.addEndListener(r,s)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},a.render=function(){var t=this.state.status;if(t===Wt)return null;var n=this.props,a=n.children,i=(n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef,Lt(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return e().createElement(Ht.Provider,{value:null},"function"==typeof a?a(t,i):e().cloneElement(e().Children.only(a),i))},n}(e().Component);function Yt(){}qt.contextType=Ht,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=Wt,qt.EXITED=$t,qt.ENTERING=zt,qt.ENTERED=Jt,qt.EXITING=Vt;const Xt=qt;var Qt=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return a=e,void((n=t).classList?n.classList.remove(a):"string"==typeof n.className?n.className=Kt(n.className,a):n.setAttribute("class",Kt(n.className&&n.className.baseVal||"",a)));var n,a}))},Zt=function(t){function n(){for(var e,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var a=e.resolveArguments(t,n),i=a[0],r=a[1];e.removeClasses(i,"exit"),e.addClass(i,r?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var a=e.resolveArguments(t,n),i=a[0],r=a[1]?"appear":"enter";e.addClass(i,r,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var a=e.resolveArguments(t,n),i=a[0],r=a[1]?"appear":"enter";e.removeClasses(i,r),e.addClass(i,r,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,a="string"==typeof n,i=a?(a&&n?n+"-":"")+t:n[t];return{baseClassName:i,activeClassName:a?i+"-active":n[t+"Active"],doneClassName:a?i+"-done":n[t+"Done"]}},e}Ft(n,t);var a=n.prototype;return a.addClass=function(t,e,n){var a=this.getClassNames(e)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===n&&i&&(a+=" "+i),"active"===n&&t&&Bt(t),a&&(this.appliedClasses[e][n]=a,function(t,e){t&&e&&e.split(" ").forEach((function(e){return a=e,void((n=t).classList?n.classList.add(a):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(n,a)||("string"==typeof n.className?n.className=n.className+" "+a:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+a)));var n,a}))}(t,a))},a.removeClasses=function(t,e){var n=this.appliedClasses[e],a=n.base,i=n.active,r=n.done;this.appliedClasses[e]={},a&&Qt(t,a),i&&Qt(t,i),r&&Qt(t,r)},a.render=function(){var t=this.props,n=(t.classNames,Lt(t,["classNames"]));return e().createElement(Xt,Rt({},n,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},n}(e().Component);Zt.defaultProps={classNames:""},Zt.propTypes={};const te=Zt,ee=({title:e=(0,a.__)("Save","gtm-kit"),className:n="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:s,useIsPending:o,useCanSave:l}=(0,i.useContext)(g);return(0,t.createElement)(r.Button,{className:n,onClick:()=>s(),variant:"primary",disabled:o||!l},l?(0,a.__)(e,"gtm-kit"):(0,a.__)("Saved","gtm-kit"),o?(0,t.createElement)(r.Spinner,null):"")},ne=()=>{const{useCanSave:e}=(0,i.useContext)(g);return(0,t.createElement)(te,{in:e,timeout:500,classNames:"slide",unmountOnExit:!0},(0,t.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,t.createElement)(ee,null)))},ae=({subject:e})=>{const n=!0===e||"on"===e,i=!0===n?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,t.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},n?(0,a.__)("Active","gtm-kit"):(0,a.__)("Inactive","gtm-kit"))},ie=(0,i.forwardRef)((({children:e,className:n="",...a},i)=>(0,t.createElement)("div",{...a,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 "+n,ref:i},e)));ie.Header=({as:e="h3",title:n="",children:a,className:i="",...r})=>(0,t.createElement)("div",{...r,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+i},(0,t.createElement)(e,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},n),a),ie.Content=({as:e="div",children:n,className:a="gtmkit-flex-auto",...i})=>(0,t.createElement)(e,{...i,className:a},n),ie.Button=({url:e,destination:n,newTab:a=!1,text:i,group:s="",...o})=>{const l=at();return(0,t.createElement)("div",{...o,className:"gtmkit-mt-4 gtmkit-mb-0.5"},(0,t.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:()=>{n&&e&&!1===a?window.gtmkitSettings.current_poage===s?l(n,{replace:!0}):window.location.href=e+"#"+n:e?a?window.open(e):window.location.href=e:l(n,{replace:!0})}},(0,t.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},i)))};const re=ie,se=({title:e,data:n,className:r=""})=>{const{useSettings:s}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},e),(0,t.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},n.map(((e,n)=>!1===e.featured?null:(0,t.createElement)(re,{key:n},(0,t.createElement)(re.Header,{title:e.title},e.pill?(0,t.createElement)(ae,{subject:s[e.group][e.option]}):null),(0,t.createElement)(re.Content,null,e.text.map(((e,n)=>(0,t.createElement)("p",{key:n},e)))),(0,t.createElement)(re.Button,{url:e.link.url,destination:e.link.destination,text:e.link.text?e.link.text:(0,a.__)("Read article","gtm-kit"),newTab:e.link.external,group:e.group}))))))},oe=t=>((t,e,n)=>{const a=(t,n)=>({...n,title:t.title,to:t.path,group:t.group||n.group,option:t.option||n.option,text:[t.description],link:{...n.link,url:window.gtmkitSettings[e+"Url"],destination:"/"+t.path}});return"templates"===e?Object.keys(t).map((e=>a(t[e][0],n))):Object.keys(t).map((e=>a(t[e],n)))})(window.gtmkitSettings[t],t,function(t){switch(t){case"integrations":return{pill:!0,group:"integrations",option:null,link:{internal:!0,text:(0,a.__)("Setup Integration","gtm-kit")}};case"templates":return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,a.__)("Get Template","gtm-kit")}};default:return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,a.__)("Read More","gtm-kit")}}}}(t)),le=()=>{const{useSettings:e}=(0,i.useContext)(g),[n,r]=(0,i.useState)(window.gtmkitSettings.tutorials),s=Boolean(e.general.sgtm_domain&&e.general.sgtm_domain.trim());return(0,i.useEffect)((()=>{r((t=>[...t,{title:(0,a.__)("See all tutorials","gtm-kit"),text:[(0,a.__)("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,a.__)("Read articles","gtm-kit")},featured:!0}]))}),[]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("General","gtm-kit")),(0,t.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,t.createElement)(re,null,(0,t.createElement)(re.Header,{title:"Google Tag Manager Container"},(0,t.createElement)(ae,{subject:e.general.gtm_id&&e.general.container_active})),(0,t.createElement)(re.Content,null,e.general.gtm_id&&e.general.container_active?(0,t.createElement)("p",null,(0,a.__)("Container ID:","gtm-kit")," ",e&&e.general.gtm_id):(0,t.createElement)("p",null,(0,a.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,t.createElement)(re.Button,{destination:"/container",text:(0,a.__)("Edit container","gtm-kit")})),(0,t.createElement)(re,null,(0,t.createElement)(re.Header,{title:(0,a.__)("Server-side GTM","gtm-kit")},(0,t.createElement)(ae,{subject:s})),(0,t.createElement)(re.Content,null,(0,t.createElement)("p",null,(0,a.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit"))),(0,t.createElement)(re.Button,{destination:"/container",text:(0,a.__)("Edit container","gtm-kit")})),(0,t.createElement)(re,null,(0,t.createElement)(re.Header,{title:(0,a.__)("Help improve GTM Kit","gtm-kit")},(0,t.createElement)(ae,{subject:e.general.analytics_active})),(0,t.createElement)(re.Content,null,(0,t.createElement)("p",null,(0,a.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,t.createElement)(re.Button,{destination:"/misc",text:(0,a.__)("Share anonymous data","gtm-kit")}))),(0,t.createElement)(se,{title:(0,a.__)("Tutorials","gtm-kit"),data:n}),(0,t.createElement)(se,{title:(0,a.__)("Integrations","gtm-kit"),data:oe("integrations")}))},me=({title:e,placeholder:n,help:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:s="general",optionName:o,isDisabled:l,useSettings:m,useUpdateStateSettings:c})=>(0,t.createElement)(r.TextControl,{label:e,placeholder:n,help:a,className:i,value:m[s][o],onChange:t=>c(s,o,t),disabled:l}),ce=({title:e,label:n,optionGroup:a="general",optionName:i,disabled:s=!1,useSettings:o,useUpdateStateSettings:l})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,t.createElement)(r.BaseControl,{label:e},(0,t.createElement)(r.ToggleControl,{label:n,checked:!s&&o[a][i],onChange:()=>{l(a,i,!(o&&o[a][i]))},disabled:s})))),ge=({title:e,options:n,help:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:s="general",optionName:o,disabled:l,useSettings:m,useUpdateStateSettings:c})=>(0,t.createElement)(r.RadioControl,{label:e,options:n,help:a,className:i,selected:parseInt(m[s][o]),onChange:t=>c(s,o,t),disabled:l}),ue=({title:e,help:n,items:a=[],optionGroup:s="general",optionName:o,disabled:l=!1,useSettings:m,useUpdateStateSettings:c})=>{const g=Array.isArray(m[s][o])?m[s][o]:[],[u,d]=(0,i.useState)(g);return(0,i.useEffect)((()=>{const t=Array.isArray(m[s][o])?m[s][o]:[];d(t)}),[m]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,t.createElement)(r.BaseControl,{label:e,help:n},a.map((e=>(0,t.createElement)(r.CheckboxControl,{key:e.role,label:e.name,disabled:l,checked:u.includes(e.role),onChange:t=>((t,e)=>{d((n=>{let a;return a=t?[...n,e]:n.filter((t=>t!==e)),c(s,o,a),a}))})(t,e.role)}))))))};var de=n(893);const pe=(0,i.forwardRef)((({children:t,className:e="",disabled:n=!1,...a},i)=>(0,de.jsx)("div",{...a,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-w-3/4 gtmkit-border-color-grey "+e+(n?"gtmkit-opacity-60":""),ref:i,children:t})));pe.Header=({as:t="h3",title:e="",children:n,className:a="",...i})=>(0,de.jsxs)(t,{...i,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey gtmkit-flex gtmkit-items-center "+a,children:[e,n]}),pe.Content=({as:t="div",children:e,className:n="",...a})=>(0,de.jsx)(t,{...a,className:"gtmkit-px-8 gtmkit-py-6 "+n,children:e});const he=pe,_e=()=>{const{useSettings:e,useUpdateStateSettings:n,useUserRoles:r}=(0,i.useContext)(g),s=!(e.general.sgtm_domain&&e.general.sgtm_domain.trim()&&e.general.sgtm_container_identifier&&e.general.sgtm_container_identifier.trim()),o=et();return(0,t.useEffect)((()=>{const t=new URLSearchParams(o.search).get("focus");if(t){const e=document.getElementById(t);e&&e.scrollIntoView()}}),[o]),(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,a.__)("Google Tag Manager container","gtm-kit")}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("General Container Settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")}),(0,de.jsx)(me,{title:(0,a.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,a.__)("Enter GTM Container ID","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)(ce,{title:(0,a.__)("Inject Container Code","gtm-kit"),label:(0,a.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active",useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)(ce,{title:(0,a.__)("Just the container","gtm-kit"),label:(0,a.__)("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",useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)(me,{title:(0,a.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,a.__)("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"),useSettings:e,useUpdateStateSettings:n})]})]}),(0,de.jsx)("div",{id:"sgtm"}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(me,{title:(0,a.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,a.__)("Enter domain","gtm-kit"),help:(0,a.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)(me,{title:(0,a.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,a.__)("Enter loader name","gtm-kit"),help:(0,a.__)("Only use if you are using a custom loader.","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)(ce,{title:(0,a.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,a.__)("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:s,useSettings:e,useUpdateStateSettings:n})]}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Google Tag Manager Server-side Tagging","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]}),(0,de.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Hosting server-side GTM containers","gtm-kit")}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("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,a.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")]}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,de.jsx)("a",{href:"https://jump.gtmkit.com/link/1-AC1E5",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer",children:(0,a.__)("Learn more about Stape.io","gtm-kit")})})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Page Speed Optimization","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsx)(he.Content,{children:(0,de.jsx)(ce,{title:(0,a.__)("load_delayed_js event","gtm-kit"),label:(0,a.__)("Setting this to On will push the event 'load_delayed_js' on page load.","gtm-kit"),optionName:"load_js_event",useSettings:e,useUpdateStateSettings:n})}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Delay JavaScript execution","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("Page optimization plugins can delay the 'load_delayed_js' event and this can be used to delay the triggering og tags in Google Tag Manager.","gtm-kit")," ",(0,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Google Tag Manager Environment","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(me,{title:(0,a.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,a.__)("Enter gtm_auth code","gtm-kit"),help:(0,a.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)(me,{title:(0,a.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,a.__)("Enter gtm_preview code","gtm-kit"),help:(0,a.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit"),useSettings:e,useUpdateStateSettings:n})]}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Environments","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,a.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,a.__)("If left empty the default environment will be used.","gtm-kit")]}),(0,de.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("Override settings in wp-config.php","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("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,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Exclude User Roles","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsx)(he.Content,{children:(0,de.jsx)(ue,{title:(0,a.__)("Exclude user roles","gtm-kit"),help:(0,a.__)("Select the roles that you want to exclude from tracking.","gtm-kit"),items:r,optionName:"exclude_user_roles",useSettings:e,useUpdateStateSettings:n})}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold gtmkit-text-red-600",children:(0,a.__)("Warning!","gtm-kit")}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("Excluding user roles is not compatible with all full-page cache solutions. Some full-page cache solutions may cache the page identically for all users, regardless of their user role. This could result in users being excluded who should not be.","gtm-kit")}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("Please ensure thorough and proper testing of this.","gtm-kit")})]})})]})]}),(0,de.jsxs)(he,{children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Container Code Implementation","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(ge,{title:(0,a.__)("Container code implementation:","gtm-kit"),options:[{label:(0,a.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,a.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,a.__)("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",useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)(ge,{title:(0,a.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,a.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,a.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,a.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,a.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,a.__)('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",useSettings:e,useUpdateStateSettings:n}),(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,de.jsx)("code",{children:"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"})})]})]})]})},ke=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Post Data","gtm-kit")),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Post Data Settings","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")),(0,t.createElement)(ce,{title:(0,a.__)("Post type","gtm-kit"),id:"post-type",label:(0,a.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Page type","gtm-kit"),id:"page-type",label:(0,a.__)('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",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Categories","gtm-kit"),id:"categories",label:(0,a.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Tags","gtm-kit"),id:"tags",label:(0,a.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Post title","gtm-kit"),id:"post-title",label:(0,a.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Post ID","gtm-kit"),id:"post-id",label:(0,a.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Post data","gtm-kit"),id:"post-date",label:(0,a.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,a.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,a.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id",useSettings:e,useUpdateStateSettings:n}))))},fe=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("User Data","gtm-kit")),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,t.createElement)(he.Content,{className:"gtmkit-space-y-2"},(0,t.createElement)("p",null,(0,a.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,t.createElement)("p",null,(0,a.__)("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,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("User Data Settings","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(ce,{title:(0,a.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,a.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("User ID","gtm-kit"),id:"user-id",label:(0,a.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("User role","gtm-kit"),id:"user-role",label:(0,a.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role",useSettings:e,useUpdateStateSettings:n}))))},Se=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g),r=!e.general.gcm_default_settings;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Google Consent Mode","gtm-kit")),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Google Consent Mode Activation","gtm-kit")},(0,t.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,a.__)("Warning!","gtm-kit"))),(0,t.createElement)(he.Content,{className:"gtmkit-space-y-2"},(0,t.createElement)("p",null,(0,a.__)("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,t.createElement)("p",null,(0,a.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")),(0,t.createElement)("p",{className:"!gtmkit-mt-4"},(0,a.__)("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,t.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,t.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,a.__)("See an example of how consent is updated","gtm-kit"))),(0,t.createElement)(ce,{title:(0,a.__)("Activate GCM settings","gtm-kit"),label:(0,a.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings",useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)(he,{disabled:r},(0,t.createElement)(he.Header,{title:(0,a.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(ce,{title:(0,a.__)("Ad Personalization","gtm-kit"),label:(0,a.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Ad Storage","gtm-kit"),label:(0,a.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Ad User Data","gtm-kit"),label:(0,a.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Analytics Storage","gtm-kit"),label:(0,a.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Functionality Storage","gtm-kit"),label:(0,a.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Personalization Storage","gtm-kit"),label:(0,a.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Security Storage","gtm-kit"),label:(0,a.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)("h4",{className:"gtmkit-font-bold gtmkit-pt-8"},(0,a.__)("Advanced","gtm-kit")),(0,t.createElement)(ce,{title:(0,a.__)("Redact Ads Data","gtm-kit"),label:(0,a.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Pass through URL parameters","gtm-kit"),label:(0,a.__)("Pass through ad click, client ID, and session ID information in URLs","gtm-kit"),optionName:"gcm_url_passthrough",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(me,{title:(0,a.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,a.__)("Enter time in milliseconds","gtm-kit"),useSettings:e,useUpdateStateSettings:n}))))},be=({label:e,value:n,tag:a})=>(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,t.createElement)("strong",null,e)),(0,t.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===a?(0,t.createElement)("code",{className:"gtmkit-text-sm"},n):(0,t.createElement)("em",null,n))),Ee=()=>{const{useSiteData:e}=(0,i.useContext)(g),n=Object.values(e.shared_data);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,a.__)("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,t.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,a.__)("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,t.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,t.createElement)("tbody",{className:"gtmkit-py-6"},n.map((function(e,n){return(0,t.createElement)(be,{key:n,label:e.label,value:e.value,tag:e.tag})})))))},ve=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Misc","gtm-kit")),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Help improve GTM Kit","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(Ee,null),(0,t.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,a.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,t.createElement)(ce,{title:(0,a.__)("Share anonymous data","gtm-kit"),label:(0,a.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active",useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Logging and debugging","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(ce,{title:(0,a.__)("Event Inspector","gtm-kit"),label:(0,a.__)("The event inspector is placed in the footer of the front and it allows you to see all the fired GTM events.","gtm-kit"),optionName:"event_inspector",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Console log","gtm-kit"),label:(0,a.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ce,{title:(0,a.__)("Debug log","gtm-kit"),label:(0,a.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log",useSettings:e,useUpdateStateSettings:n}))))},ye=()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(se,{title:(0,a.__)("Integrations","gtm-kit"),data:oe("integrations")})),xe=({pluginName:e})=>(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.sprintf)(
    22// translators: %s is the name of the plugin.
    3 (0,a.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,e.createElement)(he.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,a.sprintf)(
     3(0,a.__)("%s is not active","gtm-kit"),e),className:"gtmkit-text-red-600"}),(0,t.createElement)(he.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-6"},(0,a.sprintf)(
    44// translators: %s is the name of the plugin.
    5 (0,a.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)),(0,e.createElement)(s.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,a.sprintf)(
     5(0,a.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),e)),(0,t.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+e}},(0,a.sprintf)(
    66// translators: %s is the name of the plugin.
    7 (0,a.__)("Install %s","gtm-kit"),t)))),we=({title:t,options:n,className:r="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:o="general",optionName:l,disabled:m=!1,help:c="",notSet:u=!1})=>{const{useSettings:d,useUpdateStateSettings:p}=(0,i.useContext)(g),h=u?[{label:(0,a.__)("(not set)","gtm-kit"),value:""},...n]:n;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(s.SelectControl,{label:t,value:d&&d[o][l],options:h,className:r,onChange:t=>p(o,l,t),disabled:m,help:c}))},Ne=({pluginName:t,optionName:n,pluginInactive:s})=>{const{useSettings:r,useUpdateStateSettings:o}=(0,i.useContext)(g);return(0,e.createElement)(he,{disabled:s},(0,e.createElement)(he.Header,{title:(0,a.sprintf)(
     7(0,a.__)("Install %s","gtm-kit"),e)))),we=({title:e,options:n,className:s="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:o="general",optionName:l,disabled:m=!1,help:c="",notSet:u=!1})=>{const{useSettings:d,useUpdateStateSettings:p}=(0,i.useContext)(g),h=u?[{label:(0,a.__)("(not set)","gtm-kit"),value:""},...n]:n;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(r.SelectControl,{label:e,value:d&&d[o][l],options:h,className:s,onChange:t=>p(o,l,t),disabled:m,help:c}))},Ne=({pluginName:e,optionName:n,pluginInactive:r})=>{const{useSettings:s,useUpdateStateSettings:o}=(0,i.useContext)(g);return(0,t.createElement)(he,{disabled:r},(0,t.createElement)(he.Header,{title:(0,a.sprintf)(
    88// translators: %s is the name of the plugin.
    9 (0,a.__)("%s Integration","gtm-kit"),t)}),(0,e.createElement)(he.Content,null,(0,e.createElement)(ce,{title:(0,a.sprintf)(
     9(0,a.__)("%s Integration","gtm-kit"),e)}),(0,t.createElement)(he.Content,null,(0,t.createElement)(ce,{title:(0,a.sprintf)(
    1010// translators: %s is the name of the plugin.
    11 (0,a.__)("Track %s","gtm-kit"),t),label:(0,a.sprintf)(
     11(0,a.__)("Track %s","gtm-kit"),e),label:(0,a.sprintf)(
    1212// translators: %s is the name of the plugin.
    13 (0,a.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:n,disabled:s,useSettings:r,useUpdateStateSettings:o})))},Ce=[{label:(0,a.__)("Retail","gtm-kit"),value:"retail"},{label:(0,a.__)("Education","gtm-kit"),value:"education"},{label:(0,a.__)("Flights","gtm-kit"),value:"flights"},{label:(0,a.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,a.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,a.__)("Local deals","gtm-kit"),value:"local"},{label:(0,a.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,a.__)("Travel","gtm-kit"),value:"travel"},{label:(0,a.__)("Custom","gtm-kit"),value:"custom"}],je=()=>{const{useSettings:t,useUpdateStateSettings:e,isPremium:n}=(0,i.useContext)(g),s="WooCommerce",r=!window.gtmkitSettings.plugins.woocommerce,o=r||!t.integrations.woocommerce_integration,l=o||!n||!t.general.sgtm_domain,m=l||!t.premium.woocommerce_webhooks;return(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,a.__)("WooCommerce","gtm-kit")}),r?(0,de.jsx)(ye,{pluginName:s}):null,(0,de.jsx)(Ne,{pluginName:s,optionName:"woocommerce_integration",pluginInactive:r}),(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Basic settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(we,{title:(0,a.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,a.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:o}),(0,de.jsx)(ce,{title:(0,a.__)("Use SKU instead of ID","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Exclude tax","gtm-kit"),label:(0,a.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Exclude shipping from revenue","gtm-kit"),label:(0,a.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:o,useSettings:t,useUpdateStateSettings:e})]})]}),(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("User Data","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsx)(he.Content,{children:(0,de.jsx)(ce,{title:(0,a.__)("Include customer data","gtm-kit"),label:(0,a.__)('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:o,useSettings:t,useUpdateStateSettings:e})}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("User-Provided Data","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("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,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]})]})})]})]}),n?(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Webhooks for server-side tracking","gtm-kit"),children:n?(0,de.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,de.jsxs)(he.Content,{children:[l?(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,de.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.dashboardUrl+"#/container?focus=sgtm",children:(0,a.__)("Go to sGTM settings","gtm-kit")})]}):(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,de.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.templatesUrl+"#/server-side-tagging",children:(0,a.__)("Go to GTM Templates","gtm-kit")})]}),(0,de.jsx)(ce,{title:(0,a.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,a.__)("This option will allow webhooks to be sent to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:l,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Purchase webhook","gtm-kit"),label:(0,a.__)("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:m,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Refund webhook","gtm-kit"),label:(0,a.__)("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:m,useSettings:t,useUpdateStateSettings:e})]})]}):null,(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Event customization","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(ge,{title:"view_item_list (with product filter)",options:[{label:(0,a.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,a.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ge,{title:"view_item (variable product)",options:[{label:(0,a.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,a.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,a.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,a.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ge,{title:"add_shipping_info ",options:[{label:(0,a.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,a.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,a.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,a.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ge,{title:"add_payment_info ",options:[{label:(0,a.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,a.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,a.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,a.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:o,useSettings:t,useUpdateStateSettings:e})]})]}),(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Google Ads Settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(we,{title:(0,a.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Ce,help:(0,a.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,de.jsx)(me,{title:(0,a.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,a.__)("Enter prefix","gtm-kit"),help:(0,a.__)("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,useSettings:t,useUpdateStateSettings:e})]})]}),n?(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Custom CSS Selectors","gtm-kit"),children:n?(0,de.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")}),(0,de.jsx)(me,{title:(0,a.__)("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,a.__)("Enter CSS selector","gtm-kit"),help:(0,a.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(me,{title:(0,a.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,a.__)("Enter CSS selector","gtm-kit"),help:(0,a.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(me,{title:(0,a.__)("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,a.__)("Enter CSS selector","gtm-kit"),help:(0,a.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})]}):null,(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Advanced Settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(ce,{title:(0,a.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Include permalink structure","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Include path of pages","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e})]})]})]})},Te=()=>{const{useSettings:t,useUpdateStateSettings:n}=(0,i.useContext)(g),s="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,a.__)("Contact Form 7","gtm-kit")),r?(0,e.createElement)(ye,{pluginName:s}):null,(0,e.createElement)(Ne,{pluginName:s,optionName:"cf7_integration",pluginInactive:r}),(0,e.createElement)(he,{disabled:o},(0,e.createElement)(he.Header,{title:(0,a.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(ge,{title:(0,a.__)("Load JavaScript","gtm-kit"),options:[{label:(0,a.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,a.__)("On all pages","gtm-kit"),value:2}],help:(0,a.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:o,useSettings:t,useUpdateStateSettings:n}))))},Ue=()=>{const t="Easy Digital Downloads",n=!window.gtmkitSettings.plugins.edd,{useSettings:s,useUpdateStateSettings:r}=(0,i.useContext)(g),o=n||!s.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,a.__)("Easy Digital Downloads","gtm-kit")),n?(0,e.createElement)(ye,{pluginName:t}):null,(0,e.createElement)(Ne,{pluginName:t,optionName:"edd_integration",pluginInactive:n}),(0,e.createElement)(he,{disabled:o},(0,e.createElement)(he.Header,{title:(0,a.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(ce,{title:(0,a.__)("Use SKU instead of ID","gtm-kit"),label:(0,a.__)("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,useSettings:s,useUpdateStateSettings:r}),(0,e.createElement)(ce,{title:(0,a.__)("Exclude tax","gtm-kit"),label:(0,a.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:o,useSettings:s,useUpdateStateSettings:r}),(0,e.createElement)(ce,{title:(0,a.__)("Include customer data","gtm-kit"),label:(0,a.__)('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,useSettings:s,useUpdateStateSettings:r}))),(0,e.createElement)(he,{disabled:o},(0,e.createElement)(he.Header,{title:(0,a.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(we,{title:(0,a.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Ce,help:(0,a.__)("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,a.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,a.__)("Enter prefix","gtm-kit"),help:(0,a.__)("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,useSettings:s,useUpdateStateSettings:r}))),(0,e.createElement)(he,{disabled:n},(0,e.createElement)(he.Header,{title:(0,a.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)(ce,{title:(0,a.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,a.__)("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,useSettings:s,useUpdateStateSettings:r}))))},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,a.__)("Get template","gtm-kit")}}})),()=>(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,a.__)("Getting Started","gtm-kit")),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("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,a.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")),(0,e.createElement)("p",null,(0,a.__)("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,a.__)("Read the guide","gtm-kit"))))),(0,e.createElement)(re,{title:(0,a.__)("Templates","gtm-kit"),data:oe("templates")}))),Ge=({title:t,description:n,link:i,templates:s})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:t}),(0,e.createElement)(he.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},n),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,s&&s.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,a.__)("GTM container import files:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},s.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,a.__)("Necessary modifications:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm"},s.map((function(t){return(0,e.createElement)("li",null,t.help_text)}))))):null))),Ie=({sectionData:t})=>{const n=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(n).map((function(t){return(0,e.createElement)(Ge,{title:n[t].title,description:n[t].description,link:n[t].link,templates:n[t].templates})})))},Me=()=>{const t=at(),n=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,a.__)("Help","gtm-kit")),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Need help?","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("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,a.__)("See support options","gtm-kit"))))),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Tutorials","gtm-kit")}),(0,e.createElement)(he.Content,null,(0,e.createElement)("ul",null,n.map(((t,n)=>(0,e.createElement)("li",{key:n,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,n)=>(0,e.createElement)("div",{key:n,className:"gtmkit-text-sm"},t))))))))))},Oe=()=>{const{useIsSending:t,useSiteData:n,useUpdateSupportTicket:r,useSupportTicket:o,useSendSystemData:l,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,a.__)("Get support","gtm-kit")),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Support options","gtm-kit")}),(0,e.createElement)(he.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,a.__)("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,a.__)("GITHub repository","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,a.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)")))),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,e.createElement)(he.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,a.__)("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)(s.TextControl,{label:(0,e.createElement)("span",{className:"gtmkit-text-red-600"},c," "),placeholder:(0,a.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:o,onChange:t=>r(t)}),(0,e.createElement)(s.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:()=>{l()},disabled:!o.toUpperCase().startsWith("FS")},(0,e.createElement)("span",null,(0,a.__)("Send system data","gtm-kit")),t?(0,e.createElement)(s.Spinner,null):"")))),(0,e.createElement)(he,null,(0,e.createElement)(he.Header,{title:(0,a.__)("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,a.__)("Version:","gtm-kit")," ",n.gtmkit_version,")")),(0,e.createElement)(he.Content,null,(0,e.createElement)("p",null,(0,a.__)("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,a.__)("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,a.__)("The GitHub repository","gtm-kit"))))))};const Re=t=>{const{Fill:n,Slot:a}=(0,s.createSlotFill)(t),i=({children:t})=>(0,e.createElement)(n,null,t);return i.Slot=({fillProps:t})=>(0,e.createElement)(a,{fillProps:t},(t=>t.length?t:null)),i},Le=Re("GravityForms"),Ae=(Re("WooWebhooks"),Re("WooCustomSelectors"),({integrationID:t,pluginName:n})=>{const{useSettings:a,useUpdateStateSettings:s}=(0,i.useContext)(g),r=!window.gtmkitSettings.plugins[t],o=r||!a.integrations[t+"_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"},n),r?(0,e.createElement)(ye,{pluginName:n}):null,(0,e.createElement)(Ne,{pluginName:n,optionName:t+"_integration",pluginInactive:r}),"gf"===t?(0,e.createElement)(Le.Slot,{fillProps:{settingsInactive:o,useSettings:a,useUpdateStateSettings:s}}):null)}),Ke=window.wp.plugins,Fe={integrations:(0,a.__)("Integrations","gtm-kit"),templates:(0,a.__)("Google Tag Manager Templates","gtm-kit"),help:(0,a.__)("Help","gtm-kit")},He=()=>{const{useSettings:t}=(0,i.useContext)(g),n=window.gtmkitSettings,r=n.currentPage,o=function({page:t}){switch(t){case"general":return[{to:"general",title:(0,a.__)("Dashboard","gtm-kit")},{to:"container",title:(0,a.__)("Container","gtm-kit")},{to:"post-data",title:(0,a.__)("Post data","gtm-kit")},{to:"user-data",title:(0,a.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,a.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,a.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,a.__)("Integrations","gtm-kit")},...oe("integrations")];case"templates":return[{to:"templates",title:(0,a.__)("Templates","gtm-kit")},...oe("templates")];case"help":return[{to:"help",title:(0,a.__)("Help","gtm-kit")},{to:"support",title:(0,a.__)("Support","gtm-kit")}]}}({page:r}),l=n.templates,m=n.integrations,c=Fe[r]||(0,a.__)("Settings","gtm-kit");return Object.keys(t).length?(0,e.createElement)(s.SlotFillProvider,null,(0,e.createElement)(It,{title:c}),(0,e.createElement)(Ot,{NavList:o}),(0,e.createElement)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base"},(0,e.createElement)(_t,null,(0,e.createElement)(ht,{exact:!0,path:"/general",element:(0,e.createElement)(le,null)}),(0,e.createElement)(ht,{exact:!0,path:"/container",element:(0,e.createElement)(ke,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)(fe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/google-consent-mode",element:(0,e.createElement)(Se,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)(xe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/woocommerce",element:(0,e.createElement)(je,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)(Ue,null)}),m&&Object.keys(m).map((function(t){if("add-on"===m[t].type)return(0,e.createElement)(ht,{exact:!0,key:t,path:t,element:(0,e.createElement)(Ae,{integrationID:t,pluginName:m[t].title})})})),(0,e.createElement)(ht,{exact:!0,path:"/templates",element:(0,e.createElement)(Pe,null)}),l&&Object.keys(l).map((function(t){return(0,e.createElement)(ht,{exact:!0,key:t,path:t,element:(0,e.createElement)(Ie,{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)(Oe,null)}),(0,e.createElement)(ht,{path:"/",element:(0,e.createElement)(pt,{replace:!0,to:"/"+r})}))),(0,e.createElement)(ne,null),(0,e.createElement)(Ke.PluginArea,null)):(0,e.createElement)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center"},(0,e.createElement)(s.Spinner,null))},Be=()=>(0,e.createElement)(Ct,{basename:"/"},(0,e.createElement)(u,null,(0,e.createElement)(He,null)));document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,i.render)((0,e.createElement)(Be,null),t)}))})();
     13(0,a.__)("Activate the %s integration","gtm-kit"),e),optionGroup:"integrations",optionName:n,disabled:r,useSettings:s,useUpdateStateSettings:o})))},Ce=[{label:(0,a.__)("Retail","gtm-kit"),value:"retail"},{label:(0,a.__)("Education","gtm-kit"),value:"education"},{label:(0,a.__)("Flights","gtm-kit"),value:"flights"},{label:(0,a.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,a.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,a.__)("Local deals","gtm-kit"),value:"local"},{label:(0,a.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,a.__)("Travel","gtm-kit"),value:"travel"},{label:(0,a.__)("Custom","gtm-kit"),value:"custom"}],je=()=>{const{useSettings:t,useUpdateStateSettings:e,isPremium:n}=(0,i.useContext)(g),r="WooCommerce",s=!window.gtmkitSettings.plugins.woocommerce,o=s||!t.integrations.woocommerce_integration,l=o||!n||!t.general.sgtm_domain,m=l||!t.premium.woocommerce_webhooks;return(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,a.__)("WooCommerce","gtm-kit")}),s?(0,de.jsx)(xe,{pluginName:r}):null,(0,de.jsx)(Ne,{pluginName:r,optionName:"woocommerce_integration",pluginInactive:s}),(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Basic settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(we,{title:(0,a.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,a.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:o}),(0,de.jsx)(ce,{title:(0,a.__)("Use SKU instead of ID","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Exclude tax","gtm-kit"),label:(0,a.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Exclude shipping from revenue","gtm-kit"),label:(0,a.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:o,useSettings:t,useUpdateStateSettings:e})]})]}),(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("User Data","gtm-kit")}),(0,de.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,de.jsx)(he.Content,{children:(0,de.jsx)(ce,{title:(0,a.__)("Include customer data","gtm-kit"),label:(0,a.__)('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:o,useSettings:t,useUpdateStateSettings:e})}),(0,de.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,de.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,de.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,a.__)("User-Provided Data","gtm-kit")}),(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("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,de.jsx)("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",children:(0,a.__)("Learn more","gtm-kit")})]})]})})]})]}),n?(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Webhooks for server-side tracking","gtm-kit"),children:n?(0,de.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,de.jsxs)(he.Content,{children:[l?(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,de.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.dashboardUrl+"#/container?focus=sgtm",children:(0,a.__)("Go to sGTM settings","gtm-kit")})]}):(0,de.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,a.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,de.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.templatesUrl+"#/server-side-tagging",children:(0,a.__)("Go to GTM Templates","gtm-kit")})]}),(0,de.jsx)(ce,{title:(0,a.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,a.__)("This option will allow webhooks to be sent to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:l,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Purchase webhook","gtm-kit"),label:(0,a.__)("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:m,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Refund webhook","gtm-kit"),label:(0,a.__)("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:m,useSettings:t,useUpdateStateSettings:e})]})]}):null,(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Event customization","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(ge,{title:"view_item_list (with product filter)",options:[{label:(0,a.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,a.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ge,{title:"view_item (variable product)",options:[{label:(0,a.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,a.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,a.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,a.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ge,{title:"add_shipping_info ",options:[{label:(0,a.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,a.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,a.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,a.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ge,{title:"add_payment_info ",options:[{label:(0,a.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,a.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,a.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,a.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:o,useSettings:t,useUpdateStateSettings:e})]})]}),(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Google Ads Settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(we,{title:(0,a.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Ce,help:(0,a.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,de.jsx)(me,{title:(0,a.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,a.__)("Enter prefix","gtm-kit"),help:(0,a.__)("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,useSettings:t,useUpdateStateSettings:e})]})]}),n?(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Custom CSS Selectors","gtm-kit"),children:n?(0,de.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)("p",{className:"gtmkit-mb-4",children:(0,a.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")}),(0,de.jsx)(me,{title:(0,a.__)("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,a.__)("Enter CSS selector","gtm-kit"),help:(0,a.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(me,{title:(0,a.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,a.__)("Enter CSS selector","gtm-kit"),help:(0,a.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(me,{title:(0,a.__)("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,a.__)("Enter CSS selector","gtm-kit"),help:(0,a.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})]}):null,(0,de.jsxs)(he,{disabled:o,children:[(0,de.jsx)(he.Header,{title:(0,a.__)("Advanced Settings","gtm-kit")}),(0,de.jsxs)(he.Content,{children:[(0,de.jsx)(ce,{title:(0,a.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Include permalink structure","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e}),(0,de.jsx)(ce,{title:(0,a.__)("Include path of pages","gtm-kit"),label:(0,a.__)("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:o,useSettings:t,useUpdateStateSettings:e})]})]})]})},Te=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g),r="Contact Form 7",s=!window.gtmkitSettings.plugins.cf7,o=s||!e.integrations.cf7_integration;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Contact Form 7","gtm-kit")),s?(0,t.createElement)(xe,{pluginName:r}):null,(0,t.createElement)(Ne,{pluginName:r,optionName:"cf7_integration",pluginInactive:s}),(0,t.createElement)(he,{disabled:o},(0,t.createElement)(he.Header,{title:(0,a.__)("Basic Settings","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(ge,{title:(0,a.__)("Load JavaScript","gtm-kit"),options:[{label:(0,a.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,a.__)("On all pages","gtm-kit"),value:2}],help:(0,a.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:o,useSettings:e,useUpdateStateSettings:n}))))},Ue=()=>{const e="Easy Digital Downloads",n=!window.gtmkitSettings.plugins.edd,{useSettings:r,useUpdateStateSettings:s}=(0,i.useContext)(g),o=n||!r.integrations.edd_integration;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Easy Digital Downloads","gtm-kit")),n?(0,t.createElement)(xe,{pluginName:e}):null,(0,t.createElement)(Ne,{pluginName:e,optionName:"edd_integration",pluginInactive:n}),(0,t.createElement)(he,{disabled:o},(0,t.createElement)(he.Header,{title:(0,a.__)("Basic Settings","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(ce,{title:(0,a.__)("Use SKU instead of ID","gtm-kit"),label:(0,a.__)("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,useSettings:r,useUpdateStateSettings:s}),(0,t.createElement)(ce,{title:(0,a.__)("Exclude tax","gtm-kit"),label:(0,a.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:o,useSettings:r,useUpdateStateSettings:s}),(0,t.createElement)(ce,{title:(0,a.__)("Include customer data","gtm-kit"),label:(0,a.__)('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,useSettings:r,useUpdateStateSettings:s}))),(0,t.createElement)(he,{disabled:o},(0,t.createElement)(he.Header,{title:(0,a.__)("Google Ads Settings","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(we,{title:(0,a.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Ce,help:(0,a.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,t.createElement)(me,{title:(0,a.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,a.__)("Enter prefix","gtm-kit"),help:(0,a.__)("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,useSettings:r,useUpdateStateSettings:s}))),(0,t.createElement)(he,{disabled:n},(0,t.createElement)(he.Header,{title:(0,a.__)("Advanced settings","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)(ce,{title:(0,a.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,a.__)("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,useSettings:r,useUpdateStateSettings:s}))))},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,a.__)("Get template","gtm-kit")}}})),()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Getting Started","gtm-kit")),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("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,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")),(0,t.createElement)("p",null,(0,a.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,t.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,a.__)("Read the guide","gtm-kit"))))),(0,t.createElement)(se,{title:(0,a.__)("Templates","gtm-kit"),data:oe("templates")}))),Ie=({title:e,description:n,link:i,templates:r})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:e}),(0,t.createElement)(he.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},n),i&&i.url&&i.link_text?(0,t.createElement)("div",null,(0,t.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,t.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,t.createElement)("div",null,(0,t.createElement)("h4",{className:"gtmkit-font-bold"},(0,a.__)("GTM container import files:","gtm-kit")),(0,t.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},r.map((function(e){return(0,t.createElement)("li",null,(0,t.createElement)("a",{className:"hover:gtmkit-underline",href:e.link,target:"_blank",rel:"noreferrer"},e.title))})))),(0,t.createElement)("div",null,(0,t.createElement)("h4",{className:"gtmkit-font-bold"},(0,a.__)("Necessary modifications:","gtm-kit")),(0,t.createElement)("ul",{className:"gtmkit-text-sm"},r.map((function(e){return(0,t.createElement)("li",null,e.help_text)}))))):null))),Ge=({sectionData:e})=>{const n=e.collections;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},e.title),Object.keys(n).map((function(e){return(0,t.createElement)(Ie,{title:n[e].title,description:n[e].description,link:n[e].link,templates:n[e].templates})})))},Oe=()=>{const e=at(),n=window.gtmkitSettings.tutorials;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Help","gtm-kit")),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Need help?","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("We are here to help if you have any questions.","gtm-kit"),(0,t.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{e("/support",{replace:!0})}},(0,a.__)("See support options","gtm-kit"))))),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Tutorials","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)("ul",null,n.map(((e,n)=>(0,t.createElement)("li",{key:n,className:"gtmkit-mb-4"},(0,t.createElement)("a",{href:e.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline"},e.title),e.text.map(((e,n)=>(0,t.createElement)("div",{key:n,className:"gtmkit-text-sm"},e))))))))))},Me=()=>{const{useIsSending:e,useSiteData:n,useUpdateSupportTicket:s,useSupportTicket:o,useSendSystemData:l,useIsSystemDataSent:m,useSystemDataMessage:c}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Get support","gtm-kit")),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Support options","gtm-kit")}),(0,t.createElement)(he.Content,null,(0,t.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,t.createElement)("li",null,(0,t.createElement)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,a.__)("WordPress.org Support Forum","gtm-kit"))),(0,t.createElement)("li",null,(0,t.createElement)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,a.__)("GITHub repository","gtm-kit"))),(0,t.createElement)("li",null,(0,t.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,a.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)")))),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,t.createElement)(he.Content,null,m?(0,t.createElement)("p",{className:"gtmkit-mb-2"},c):(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",{className:"gtmkit-mb-2"},(0,a.__)("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,t.createElement)(r.TextControl,{label:(0,t.createElement)("span",{className:"gtmkit-text-red-600"},c," "),placeholder:(0,a.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:o,onChange:t=>s(t)}),(0,t.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:()=>{l()},disabled:!o.toUpperCase().startsWith("FS")},(0,t.createElement)("span",null,(0,a.__)("Send system data","gtm-kit")),e?(0,t.createElement)(r.Spinner,null):"")))),(0,t.createElement)(he,null,(0,t.createElement)(he.Header,{title:(0,a.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center"},(0,t.createElement)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2"},"(",(0,a.__)("Version:","gtm-kit")," ",n.gtmkit_version,")")),(0,t.createElement)(he.Content,null,(0,t.createElement)("p",null,(0,a.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,t.createElement)("br",null),(0,t.createElement)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer"},(0,a.__)("The changelog","gtm-kit")),(0,t.createElement)("br",null),(0,t.createElement)("a",{className:"gtmkit-text-color-primary  hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,a.__)("The GitHub repository","gtm-kit"))))))};const Re=e=>{const{Fill:n,Slot:a}=(0,r.createSlotFill)(e),i=({children:e})=>(0,t.createElement)(n,null,e);return i.Slot=({fillProps:e})=>(0,t.createElement)(a,{fillProps:e},(t=>t.length?t:null)),i},Le=Re("GravityForms"),Ae=(Re("WooWebhooks"),Re("WooCustomSelectors"),({integrationID:e,pluginName:n})=>{const{useSettings:a,useUpdateStateSettings:r}=(0,i.useContext)(g),s=!window.gtmkitSettings.plugins[e],o=s||!a.integrations[e+"_integration"];return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},n),s?(0,t.createElement)(xe,{pluginName:n}):null,(0,t.createElement)(Ne,{pluginName:n,optionName:e+"_integration",pluginInactive:s}),"gf"===e?(0,t.createElement)(Le.Slot,{fillProps:{settingsInactive:o,useSettings:a,useUpdateStateSettings:r}}):null)}),Fe=window.wp.plugins,Ke={integrations:(0,a.__)("Integrations","gtm-kit"),templates:(0,a.__)("Google Tag Manager Templates","gtm-kit"),help:(0,a.__)("Help","gtm-kit")},He=()=>{const{useSettings:e}=(0,i.useContext)(g),n=window.gtmkitSettings,s=n.currentPage,o=function({page:t}){switch(t){case"general":return[{to:"general",title:(0,a.__)("Dashboard","gtm-kit")},{to:"container",title:(0,a.__)("Container","gtm-kit")},{to:"post-data",title:(0,a.__)("Post data","gtm-kit")},{to:"user-data",title:(0,a.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,a.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,a.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,a.__)("Integrations","gtm-kit")},...oe("integrations")];case"templates":return[{to:"templates",title:(0,a.__)("Templates","gtm-kit")},...oe("templates")];case"help":return[{to:"help",title:(0,a.__)("Help","gtm-kit")},{to:"support",title:(0,a.__)("Support","gtm-kit")}]}}({page:s}),l=n.templates,m=n.integrations,c=Ke[s]||(0,a.__)("Settings","gtm-kit");return Object.keys(e).length?(0,t.createElement)(r.SlotFillProvider,null,(0,t.createElement)(Gt,{title:c}),(0,t.createElement)(Mt,{NavList:o}),(0,t.createElement)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base"},(0,t.createElement)(kt,null,(0,t.createElement)(ht,{exact:!0,path:"/general",element:(0,t.createElement)(le,null)}),(0,t.createElement)(ht,{exact:!0,path:"/container",element:(0,t.createElement)(_e,null)}),(0,t.createElement)(ht,{exact:!0,path:"/post-data",element:(0,t.createElement)(ke,null)}),(0,t.createElement)(ht,{exact:!0,path:"/user-data",element:(0,t.createElement)(fe,null)}),(0,t.createElement)(ht,{exact:!0,path:"/google-consent-mode",element:(0,t.createElement)(Se,null)}),(0,t.createElement)(ht,{exact:!0,path:"/misc",element:(0,t.createElement)(ve,null)}),(0,t.createElement)(ht,{exact:!0,path:"/integrations",element:(0,t.createElement)(ye,null)}),(0,t.createElement)(ht,{exact:!0,path:"/woocommerce",element:(0,t.createElement)(je,null)}),(0,t.createElement)(ht,{exact:!0,path:"/cf7",element:(0,t.createElement)(Te,null)}),(0,t.createElement)(ht,{exact:!0,path:"/edd",element:(0,t.createElement)(Ue,null)}),m&&Object.keys(m).map((function(e){if("add-on"===m[e].type)return(0,t.createElement)(ht,{exact:!0,key:e,path:e,element:(0,t.createElement)(Ae,{integrationID:e,pluginName:m[e].title})})})),(0,t.createElement)(ht,{exact:!0,path:"/templates",element:(0,t.createElement)(Pe,null)}),l&&Object.keys(l).map((function(e){return(0,t.createElement)(ht,{exact:!0,key:e,path:e,element:(0,t.createElement)(Ge,{sectionData:l[e][0]})})})),(0,t.createElement)(ht,{exact:!0,path:"/help",element:(0,t.createElement)(Oe,null)}),(0,t.createElement)(ht,{exact:!0,path:"/support",element:(0,t.createElement)(Me,null)}),(0,t.createElement)(ht,{path:"/",element:(0,t.createElement)(pt,{replace:!0,to:"/"+s})}))),(0,t.createElement)(ne,null),(0,t.createElement)(Fe.PluginArea,null)):(0,t.createElement)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center"},(0,t.createElement)(r.Spinner,null))},Be=()=>(0,t.createElement)(Ct,{basename:"/"},(0,t.createElement)(u,null,(0,t.createElement)(He,null)));document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById(window.gtmkitSettings.rootId);null!=e&&(0,i.render)((0,t.createElement)(Be,null),e)}))})()})();
  • gtm-kit/trunk/assets/admin/wizard.asset.php

    r3134629 r3139454  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '4a1f1d4cadc1c2c93cf8');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '78fa6d1fd726260bef13');
  • gtm-kit/trunk/assets/admin/wizard.js

    r3134629 r3139454  
    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 s=t.n(r);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const l=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},o=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,o.__)("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,o.__)("An error occurred.","gtm-kit"):(0,o.__)("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,a.isSendingLicenseKey=e.payload.isSendingLicenseKey||a.isSendingLicenseKey,a.licenseKey=e.payload.licenseKey||a.licenseKey;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;break;case"SEND_LICENSE_KEY_BEFORE":a.isSendingLicenseKey=e.payload.isSendingLicenseKey||a.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":a.isSendingLicenseKey=!1,a.isLicenseKeySent=e.payload.isLicenseKeySent||a.isLicenseKeySent,a.licenseKeyMessage=e.payload.licenseKeyMessage||a.licenseKeyMessage}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:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:""}),s=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}})},o=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{s()}),[]);const g={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,l("gtmkit/v1/set-options","POST",e));var e;r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:o,useUpdateStateSettings:async(t,e,a)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let s;r[t][e]=a,s=!(0,i.isEqual)(r,n.fetchedSettings),o({stateSettings:r,canSave:s})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let r;const s={};s.general={...a.general,...e.general},"integrations"in e&&(s.integrations={...a.integrations,...e.integrations}),r=!(0,i.isEqual)(s,n.fetchedSettings),o({stateSettings:s,canSave:r})},useUpdateSupportTicket:async t=>{o({supportTicket:t})},useSendSystemData:async()=>{r({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,l("gtmkit/v1/send-support-data","POST",e,!0));var e;r({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{o({licenseKey:t})},useSendLicenseKey:async()=>{r({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(e=n.licenseKey,l("gtmkit/v1/send-license-key","POST",e,!0));var e;r({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage: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,useIsSendingLicenseKey:n.isSendingLicenseKey,useLicenseKey:n.licenseKey,useIsLicenseKeySent:n.isLicenseKeySent,useLicenseKeyMessage:n.licenseKeyMessage,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};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 S(t,e,a,n){return void 0===a&&(a=null),u({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?f(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 f(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){return void 0===a&&(a="/"),function(t,e,a,n){let i=z(("string"==typeof e?f(e):e).pathname||"/",a);if(null==i)return null;let r=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)))))}(r);let s=null;for(let t=0;null==s&&t<r.length;++t){let e=U(i);s=C(r[t],e,n)}return s}(t,e,a,!1)}function N(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let s={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};s.relativePath.startsWith("/")&&(h(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(n.length));let l=B([n,s.relativePath]),o=a.concat(s);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 "'+l+'".'),N(t.children,e,o,l)),(null!=t.path||t.index)&&e.push({path:l,score:I(l,t.index),routesMeta:o})};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 s=v(n.join("/")),l=[];return l.push(...s.map((t=>""===t?r:[r,t].join("/")))),i&&l.push(...s),l.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-]+$/,b=3,_=2,T=1,L=10,j=-2,D=t=>"*"===t;function I(t,e){let a=t.split("/"),n=a.length;return a.some(D)&&(n+=j),e&&(n+=_),a.filter((t=>!D(t))).reduce(((t,e)=>t+(w.test(e)?b:""===e?T:L)),n)}function C(t,e,a){void 0===a&&(a=!1);let{routesMeta:n}=t,i={},r="/",s=[];for(let t=0;t<n.length;++t){let l=n[t],o=t===n.length-1,m="/"===r?e:e.slice(r.length)||"/",c=O({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},m),g=l.route;if(!c&&o&&a&&!n[n.length-1].route.index&&(c=O({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},m)),!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:B([r,c.pathname]),pathnameBase:G(B([r,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(r=B([r,c.pathnameBase]))}return s}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],s=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]||"";s=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const o=l[a];return t[n]=i&&!o?void 0:(o||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:s,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 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 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 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=f(t):(i=u({},t),h(!i.pathname||!i.pathname.includes("?"),A("?","pathname","search",i)),h(!i.pathname||!i.pathname.includes("#"),A("#","pathname","hash",i)),h(!i.search||!i.search.includes("#"),A("#","search","hash",i)));let r,s=""===t||""===i.pathname,l=s?"/":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 o=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?f(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:K(n),hash:Y(i)}}(i,r),m=l&&"/"!==l&&l.endsWith("/"),c=(s||"."===l)&&a.endsWith("/");return o.pathname.endsWith("/")||!m&&!c||(o.pathname+="/"),o}const B=t=>t.join("/").replace(/\/\/+/g,"/"),G=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),K=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const W=["post","put","patch","delete"],F=(new Set(W),["get",...W]);function Q(){return Q=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},Q.apply(this,arguments)}new Set(F),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const J=e.createContext(null),H=e.createContext(null),$=e.createContext(null),Z=e.createContext(null),V=e.createContext({outlet:null,matches:[],isDataRoute:!1}),X=e.createContext(null);function q(){return null!=e.useContext(Z)}function tt(){return q()||h(!1),e.useContext(Z).location}function et(t){e.useContext($).static||e.useLayoutEffect(t)}function at(){let{isDataRoute:t}=e.useContext(V);return t?function(){let{router:t}=function(t){let a=e.useContext(J);return a||h(!1),a}(ot.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,Q({fromRouteId:a},i)))}),[t,a])}():function(){q()||h(!1);let t=e.useContext(J),{basename:a,future:n,navigator:i}=e.useContext($),{matches:r}=e.useContext(V),{pathname:s}=tt(),l=JSON.stringify(P(r,n.v7_relativeSplatPath)),o=e.useRef(!1);return et((()=>{o.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!o.current)return;if("number"==typeof e)return void i.go(e);let r=R(e,JSON.parse(l),s,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:B([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,l,s,t])}()}function nt(t,a,n,i){q()||h(!1);let{navigator:r}=e.useContext($),{matches:s}=e.useContext(V),l=s[s.length-1],o=l?l.params:{},m=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let c,g=tt();if(a){var u;let t="string"==typeof a?f(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}),S=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 s;if(null==(s=n)||!s.errors)return null;t=n.matches}let l=t,o=null==(r=n)?void 0:r.errors;if(null!=o){let t=l.findIndex((t=>t.route.id&&void 0!==(null==o?void 0:o[t.route.id])));t>=0||h(!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 s,g=!1,u=null,d=null;var p;n&&(s=o&&i.route.id?o[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(l.slice(0,r+1)),k=()=>{let a;return a=s?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(lt,{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:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},o,t.params),pathname:B([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:B([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),s,n,i);return a&&S?e.createElement(Z.Provider,{value:{location:Q({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:d.Pop}},S):S}function it(){let t=function(){var t;let a=e.useContext(X),n=function(t){let a=e.useContext(H);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 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(V.Provider,{value:this.props.routeContext},e.createElement(X.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lt(t){let{routeContext:a,match:n,children:i}=t,r=e.useContext(J);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 ot=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ot||{}),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:s,static:l}=e.useContext($),{matches:o}=e.useContext(V),{pathname:m}=tt(),c=at(),g=R(a,P(o,s.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:s,static:l=!1,future:o}=t;q()&&h(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:s,static:l,future:Q({v7_relativeSplatPath:!1},o)})),[m,o,s,l]);"string"==typeof i&&(i=f(i));let{pathname:g="/",search:u="",hash:p="",state:k=null,key:y="default"}=i,S=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==S?null:e.createElement($.Provider,{value:c},e.createElement(Z.Provider,{children:n,value:S}))}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 s={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&&(s.children=kt(t.props.children,r)),n.push(s)})),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 St=e.startTransition;function Et(t){let{basename:a,children:n,future:i,window:r}=t,s=e.useRef();null==s.current&&(s.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,s=i.history,l=d.Pop,o=null,m=c();function c(){return(s.state||{idx:null}).idx}function g(){l=d.Pop;let t=c(),e=null==t?null:t-m;m=t,o&&o({action:l,location:f.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,s.replaceState(u({},s.state,{idx:m}),""));let f={get action(){return l},get location(){return t(i,s)},listen(t){if(o)throw new Error("A history only accepts one active listener");return i.addEventListener(p,g),o=t,()=>{i.removeEventListener(p,g),o=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){l=d.Push;let n=S(f.location,t,e);a&&a(n,t),m=c()+1;let g=y(n,m),u=f.createHref(n);try{s.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&o&&o({action:l,location:f.location,delta:1})},replace:function(t,e){l=d.Replace;let n=S(f.location,t,e);a&&a(n,t),m=c();let i=y(n,m),g=f.createHref(n);s.replaceState(i,"",g),r&&o&&o({action:l,location:f.location,delta:0})},go:t=>s.go(t)};return f}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=f(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),S("",{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 l=s.current,[o,m]=e.useState({action:l.action,location:l.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&St?St((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>l.listen(g)),[l,g]),e.createElement(pt,{basename:a,children:n,location:o.location,navigationType:o.action,navigator:l,future:i})}var ft,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"}(ft||(ft={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s}=(0,a.useContext)(c),l=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,o.__)("Container ID","gtm-kit"),placeholder:(0,o.__)("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(),l("/essential-settings",{replace:!0})},disabled:s||!t.general.gtm_id.includes("-")},(0,o.__)("Save and continue","gtm-kit"),s?(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,o.__)("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,o.__)("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,o.__)("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,o.__)("Go to the dashboard.","gtm-kit"))))},Nt=()=>{const{useImportSettings:t,useIsPending:i,useInstallData:r}=(0,a.useContext)(c),[s,l]=(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})})),s?(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,o.__)("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,o.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,o.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,e.createElement)(n.RadioControl,{help:(0,o.__)("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]),l(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,o.__)("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:()=>{l(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,o.__)("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,o.__)("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,o.__)("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:s,useInstallData:l}=(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,o.__)("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,o.__)("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,o.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(n.ToggleControl,{label:(0,o.__)("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))}}))),l.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,o.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(n.ToggleControl,{label:(0,o.__)("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,l.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,o.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(n.ToggleControl,{label:(0,o.__)("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,l.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(n.BaseControl,{label:(0,o.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(n.ToggleControl,{label:(0,o.__)("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:s},(0,o.__)("Save and continue","gtm-kit"),s?(0,e.createElement)(n.Spinner,null):"")))},bt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s,useSiteData:l}=(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,o.__)("Help improve GTM Kit","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,o.__)("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,o.__)("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"},l.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"},l.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"},l.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"},l.multisite?(0,o.__)("Yes","gtm-kit"):(0,o.__)("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"},l.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"},l.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,o.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(n.ToggleControl,{label:(0,o.__)("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:s},(0,o.__)("Save and continue","gtm-kit"),s?(0,e.createElement)(n.Spinner,null):"")))},_t=window.ReactJSXRuntime,Tt=()=>(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,o.__)("You are ready to use GTM Kit!","gtm-kit")}),(0,_t.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center",children:(0,o.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")}),(0,_t.jsxs)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center",children:[(0,o.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "]}),(0,_t.jsxs)("div",{className:"gtmkit-border-2 gtmkit-max-w-lg gtmkit-mx-auto gtmkit-mb-8",children:[(0,_t.jsx)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2",children:(0,o.__)("Getting Started","gtm-kit")}),(0,_t.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,o.__)("The next step is to configure your Google Tag Manager container. You will find templates for this in the GTM Templates section.","gtm-kit")," ",(0,_t.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:window.gtmkitSettings.templatesUrl,rel:"noreferrer",children:(0,o.__)("Go to GTM Templates","gtm-kit")})]}),(0,_t.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,o.__)("To get the most out of Google Tag Manager with GTM Kit, you should also review the tutorials.","gtm-kit")," ",(0,_t.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:window.gtmkitSettings.helpUrl+"#/help",rel:"noreferrer",children:(0,o.__)("Go to Tutorials","gtm-kit")})]})]}),(0,_t.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,_t.jsx)(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},children:(0,o.__)("Go to the dashboard","gtm-kit")})})]}),Lt=[{step:1,path:"/welcome",element:"Welcome",title:(0,o.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,o.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,o.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,o.__)("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})},Dt=({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,It=({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)(Dt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))},Ct=()=>{const t=Lt.length-1+Lt[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}))})(Lt,{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"},Lt.map((function(n){return(0,e.createElement)(It,{key:n.step,step:n.step,currentStep:a,totalSteps:t})})))},Ot=()=>(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,o.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,e.createElement)(Ct,null)),Ut=()=>(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,o.__)("Go to the dashboard.","gtm-kit"))))),zt=()=>{const{useSettings:t}=(0,a.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ot,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)(bt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(Tt,null)}),(0,e.createElement)(dt,{path:"/",element:(0,e.createElement)(ut,{replace:!0,to:"/welcome"})}))),(0,e.createElement)(Ut,null)):(0,e.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},At=()=>(0,e.createElement)(Et,{basename:"/"},(0,e.createElement)(g,null,(0,e.createElement)(zt,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,a.render)((0,e.createElement)(At,null),document.getElementById(window.gtmkitSettings.rootId))}))})();
     1(()=>{"use strict";var t={251:(t,e,a)=>{var n=a(196),i=Symbol.for("react.element"),r=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function m(t,e,a){var n,r={},m=null,c=null;for(n in void 0!==a&&(m=""+a),void 0!==e.key&&(m=""+e.key),void 0!==e.ref&&(c=e.ref),e)s.call(e,n)&&!o.hasOwnProperty(n)&&(r[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps)void 0===r[n]&&(r[n]=e[n]);return{$$typeof:i,type:t,key:m,ref:c,props:r,_owner:l.current}}e.Fragment=r,e.jsx=m,e.jsxs=m},893:(t,e,a)=>{t.exports=a(251)},196:t=>{t.exports=window.React}},e={};function a(n){var i=e[n];if(void 0!==i)return i.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,a),r.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=a(196);const e=window.wp.element,n=window.wp.components,i=window.lodash,r=window.wp.apiFetch;var s=a.n(r);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const l=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},o=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,o.__)("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,o.__)("An error occurred.","gtm-kit"):(0,o.__)("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,a.isSendingLicenseKey=e.payload.isSendingLicenseKey||a.isSendingLicenseKey,a.licenseKey=e.payload.licenseKey||a.licenseKey;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;break;case"SEND_LICENSE_KEY_BEFORE":a.isSendingLicenseKey=e.payload.isSendingLicenseKey||a.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":a.isSendingLicenseKey=!1,a.isLicenseKeySent=e.payload.isLicenseKeySent||a.isLicenseKeySent,a.licenseKeyMessage=e.payload.licenseKeyMessage||a.licenseKeyMessage}return a},c=(0,e.createContext)(),g=a=>{const[n,r]=(0,e.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:""}),s=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}})},o=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,e.useEffect)((()=>{s()}),[]);const g={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,l("gtmkit/v1/set-options","POST",e));var e;r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:o,useUpdateStateSettings:async(t,e,a)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let s;r[t][e]=a,s=!(0,i.isEqual)(r,n.fetchedSettings),o({stateSettings:r,canSave:s})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let r;const s={};s.general={...a.general,...e.general},"integrations"in e&&(s.integrations={...a.integrations,...e.integrations}),r=!(0,i.isEqual)(s,n.fetchedSettings),o({stateSettings:s,canSave:r})},useUpdateSupportTicket:async t=>{o({supportTicket:t})},useSendSystemData:async()=>{r({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,l("gtmkit/v1/send-support-data","POST",e,!0));var e;r({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{o({licenseKey:t})},useSendLicenseKey:async()=>{r({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(e=n.licenseKey,l("gtmkit/v1/send-license-key","POST",e,!0));var e;r({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage: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,useIsSendingLicenseKey:n.isSendingLicenseKey,useLicenseKey:n.licenseKey,useIsLicenseKeySent:n.isLicenseKeySent,useLicenseKeyMessage:n.licenseKeyMessage,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,t.createElement)(c.Provider,{value:g},a.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 S(t,e,a,n){return void 0===a&&(a=null),u({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?E(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function f(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 E(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){return void 0===a&&(a="/"),function(t,e,a,n){let i=A(("string"==typeof e?E(e):e).pathname||"/",a);if(null==i)return null;let r=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)))))}(r);let s=null;for(let t=0;null==s&&t<r.length;++t){let e=U(i);s=C(r[t],e,n)}return s}(t,e,a,!1)}function N(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let s={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};s.relativePath.startsWith("/")&&(h(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(n.length));let l=B([n,s.relativePath]),o=a.concat(s);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 "'+l+'".'),N(t.children,e,o,l)),(null!=t.path||t.index)&&e.push({path:l,score:I(l,t.index),routesMeta:o})};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 s=v(n.join("/")),l=[];return l.push(...s.map((t=>""===t?r:[r,t].join("/")))),i&&l.push(...s),l.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,L=10,j=-2,D=t=>"*"===t;function I(t,e){let a=t.split("/"),n=a.length;return a.some(D)&&(n+=j),e&&(n+=b),a.filter((t=>!D(t))).reduce(((t,e)=>t+(w.test(e)?_:""===e?T:L)),n)}function C(t,e,a){void 0===a&&(a=!1);let{routesMeta:n}=t,i={},r="/",s=[];for(let t=0;t<n.length;++t){let l=n[t],o=t===n.length-1,m="/"===r?e:e.slice(r.length)||"/",c=O({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},m),g=l.route;if(!c&&o&&a&&!n[n.length-1].route.index&&(c=O({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},m)),!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:B([r,c.pathname]),pathnameBase:G(B([r,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(r=B([r,c.pathnameBase]))}return s}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],s=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]||"";s=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const o=l[a];return t[n]=i&&!o?void 0:(o||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:s,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 A(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 P(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 z(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=E(t):(i=u({},t),h(!i.pathname||!i.pathname.includes("?"),P("?","pathname","search",i)),h(!i.pathname||!i.pathname.includes("#"),P("#","pathname","hash",i)),h(!i.search||!i.search.includes("#"),P("#","search","hash",i)));let r,s=""===t||""===i.pathname,l=s?"/":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 o=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?E(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:K(n),hash:Y(i)}}(i,r),m=l&&"/"!==l&&l.endsWith("/"),c=(s||"."===l)&&a.endsWith("/");return o.pathname.endsWith("/")||!m&&!c||(o.pathname+="/"),o}const B=t=>t.join("/").replace(/\/\/+/g,"/"),G=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),K=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const W=["post","put","patch","delete"],F=(new Set(W),["get",...W]);function Q(){return Q=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},Q.apply(this,arguments)}new Set(F),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const $=t.createContext(null),J=t.createContext(null),H=t.createContext(null),Z=t.createContext(null),V=t.createContext({outlet:null,matches:[],isDataRoute:!1}),X=t.createContext(null);function q(){return null!=t.useContext(Z)}function tt(){return q()||h(!1),t.useContext(Z).location}function et(e){t.useContext(H).static||t.useLayoutEffect(e)}function at(){let{isDataRoute:e}=t.useContext(V);return e?function(){let{router:e}=function(e){let a=t.useContext($);return a||h(!1),a}(ot.UseNavigateStable),a=ct(mt.UseNavigateStable),n=t.useRef(!1);return et((()=>{n.current=!0})),t.useCallback((function(t,i){void 0===i&&(i={}),n.current&&("number"==typeof t?e.navigate(t):e.navigate(t,Q({fromRouteId:a},i)))}),[e,a])}():function(){q()||h(!1);let e=t.useContext($),{basename:a,future:n,navigator:i}=t.useContext(H),{matches:r}=t.useContext(V),{pathname:s}=tt(),l=JSON.stringify(z(r,n.v7_relativeSplatPath)),o=t.useRef(!1);return et((()=>{o.current=!0})),t.useCallback((function(t,n){if(void 0===n&&(n={}),!o.current)return;if("number"==typeof t)return void i.go(t);let r=R(t,JSON.parse(l),s,"path"===n.relative);null==e&&"/"!==a&&(r.pathname="/"===r.pathname?a:B([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,l,s,e])}()}function nt(e,a,n,i){q()||h(!1);let{navigator:r}=t.useContext(H),{matches:s}=t.useContext(V),l=s[s.length-1],o=l?l.params:{},m=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let c,g=tt();if(a){var u;let t="string"==typeof a?E(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(e,{pathname:k}),S=function(e,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==e){var s;if(null==(s=n)||!s.errors)return null;e=n.matches}let l=e,o=null==(r=n)?void 0:r.errors;if(null!=o){let t=l.findIndex((t=>t.route.id&&void 0!==(null==o?void 0:o[t.route.id])));t>=0||h(!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(((e,i,r)=>{let s,g=!1,u=null,d=null;var p;n&&(s=o&&i.route.id?o[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(l.slice(0,r+1)),k=()=>{let a;return a=s?u:g?d:i.route.Component?t.createElement(i.route.Component,null):i.route.element?i.route.element:e,t.createElement(lt,{match:i,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?t.createElement(st,{location:n.location,revalidation:n.revalidation,component:u,error:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},o,t.params),pathname:B([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:B([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),s,n,i);return a&&S?t.createElement(Z.Provider,{value:{location:Q({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:d.Pop}},S):S}function it(){let e=function(){var e;let a=t.useContext(X),n=function(e){let a=t.useContext(J);return a||h(!1),a}(mt.UseRouteError),i=ct(mt.UseRouteError);return void 0!==a?a:null==(e=n.errors)?void 0:e[i]}(),a=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},a),n?t.createElement("pre",{style:i},n):null,null)}const rt=t.createElement(it,null);class st extends t.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?t.createElement(V.Provider,{value:this.props.routeContext},t.createElement(X.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lt(e){let{routeContext:a,match:n,children:i}=e,r=t.useContext($);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),t.createElement(V.Provider,{value:a},i)}var ot=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ot||{}),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(e){let a=function(e){let a=t.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(e){let{to:a,replace:n,state:i,relative:r}=e;q()||h(!1);let{future:s,static:l}=t.useContext(H),{matches:o}=t.useContext(V),{pathname:m}=tt(),c=at(),g=R(a,z(o,s.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return t.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function dt(t){h(!1)}function pt(e){let{basename:a="/",children:n=null,location:i,navigationType:r=d.Pop,navigator:s,static:l=!1,future:o}=e;q()&&h(!1);let m=a.replace(/^\/*/,"/"),c=t.useMemo((()=>({basename:m,navigator:s,static:l,future:Q({v7_relativeSplatPath:!1},o)})),[m,o,s,l]);"string"==typeof i&&(i=E(i));let{pathname:g="/",search:u="",hash:p="",state:k=null,key:y="default"}=i,S=t.useMemo((()=>{let t=A(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==S?null:t.createElement(H.Provider,{value:c},t.createElement(Z.Provider,{children:n,value:S}))}function ht(t){let{children:e,location:a}=t;return nt(kt(e),a)}function kt(e,a){void 0===a&&(a=[]);let n=[];return t.Children.forEach(e,((e,i)=>{if(!t.isValidElement(e))return;let r=[...a,i];if(e.type===t.Fragment)return void n.push.apply(n,kt(e.props.children,r));e.type!==dt&&h(!1),e.props.index&&e.props.children&&h(!1);let s={id:e.props.id||r.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=kt(e.props.children,r)),n.push(s)})),n}t.startTransition,new Promise((()=>{})),t.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 St=t.startTransition;function ft(e){let{basename:a,children:n,future:i,window:r}=e,s=t.useRef();null==s.current&&(s.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,s=i.history,l=d.Pop,o=null,m=c();function c(){return(s.state||{idx:null}).idx}function g(){l=d.Pop;let t=c(),e=null==t?null:t-m;m=t,o&&o({action:l,location:E.location,delta:e})}function k(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:f(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,s.replaceState(u({},s.state,{idx:m}),""));let E={get action(){return l},get location(){return t(i,s)},listen(t){if(o)throw new Error("A history only accepts one active listener");return i.addEventListener(p,g),o=t,()=>{i.removeEventListener(p,g),o=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){l=d.Push;let n=S(E.location,t,e);a&&a(n,t),m=c()+1;let g=y(n,m),u=E.createHref(n);try{s.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&o&&o({action:l,location:E.location,delta:1})},replace:function(t,e){l=d.Replace;let n=S(E.location,t,e);a&&a(n,t),m=c();let i=y(n,m),g=E.createHref(n);s.replaceState(i,"",g),r&&o&&o({action:l,location:E.location,delta:0})},go:t=>s.go(t)};return E}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=E(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),S("",{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:f(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=s.current,[o,m]=t.useState({action:l.action,location:l.location}),{v7_startTransition:c}=i||{},g=t.useCallback((t=>{c&&St?St((()=>m(t))):m(t)}),[m,c]);return t.useLayoutEffect((()=>l.listen(g)),[l,g]),t.createElement(pt,{basename:a,children:n,location:o.location,navigationType:o.action,navigator:l,future:i})}var Et,xt;yt.flushSync,t.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"}(Et||(Et={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));const Mt=()=>{const{useSettings:a,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s}=(0,e.useContext)(c),l=at();return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20"},(0,t.createElement)("div",{className:""},(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 "},(0,t.createElement)(n.TextControl,{label:(0,o.__)("Container ID","gtm-kit"),placeholder:(0,o.__)("Enter Container ID","gtm-kit"),value:a&&a.general.gtm_id,className:"gtmkit-text-center",onChange:t=>i("general","gtm_id",t)})),(0,t.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,t.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(),l("/essential-settings",{replace:!0})},disabled:s||!a.general.gtm_id.includes("-")},(0,o.__)("Save and continue","gtm-kit"),s?(0,t.createElement)(n.Spinner,null):""))),(0,t.createElement)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-left gtmkit-text-color-grey gtmkit-text-center"},(0,t.createElement)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4"},"Need help?"),(0,t.createElement)("p",{className:"gtmkit-mb-6"},(0,o.__)("Find your GTM container ID on","gtm-kit"),(0,t.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,t.createElement)("p",null,(0,o.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"))),(0,t.createElement)("div",{className:"gtmkit-mt-3 md:gtmkit-mt-10 gtmkit-text-color-grey gtmkit-text-base"},(0,t.createElement)("span",{className:"gtmkit-block"},(0,o.__)("No thanks. I know what I'm doing.","gtm-kit")),(0,t.createElement)("a",{className:"gtmkit-underline gtmkit-ml-4",href:window.gtmkitSettings.dashboardUrl},(0,o.__)("Go to the dashboard.","gtm-kit"))))},Nt=()=>{const{useImportSettings:a,useIsPending:i,useInstallData:r}=(0,e.useContext)(c),[s,l]=(0,e.useState)(!0),m=Object.keys(r.import_data)[0],[g,u]=(0,e.useState)(m),d=[];return Object.keys(r.import_data).forEach((t=>{d.push({value:t,label:r.import_data[t].name})})),s?(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-8 gtmkit-my-8"},(0,t.createElement)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold"},(0,o.__)("Would you like to import plugin settings?","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey"},(0,o.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,o.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,t.createElement)(n.RadioControl,{help:(0,o.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:g,options:d,onChange:t=>u(t)}),(0,t.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,t.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{a(g,r.import_data[g]),l(!1)}},(0,t.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,o.__)("Yes","gtm-kit")),i?(0,t.createElement)(n.Spinner,null):""),(0,t.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{l(!1)}},(0,t.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,o.__)("No","gtm-kit")),i?(0,t.createElement)(n.Spinner,null):"")))):(0,t.createElement)(Mt,null)},vt=()=>{const{useInstallData:a}=(0,e.useContext)(c),{firstInstall:n}=a,{importAvailable:i}=a;return(0,t.createElement)("div",{className:"gtmkit-text-center"},(0,t.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,o.__)("You've successfully installed GTM Kit!","gtm-kit")),(0,t.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,t.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,o.__)("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,t.createElement)(Nt,null):(0,t.createElement)(Mt,null))},wt=()=>{const{useSettings:a,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s,useInstallData:l}=(0,e.useContext)(c),m=at();return(0,t.createElement)("div",{className:"gtmkit-text-center"},(0,t.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,o.__)("Essential Settings","gtm-kit")),(0,t.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,t.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,o.__)("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,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,t.createElement)(n.BaseControl,{label:(0,o.__)("Page type","gtm-kit"),id:"page-type"},(0,t.createElement)(n.ToggleControl,{label:(0,o.__)("Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?","gtm-kit"),checked:a&&a.general.datalayer_page_type,onChange:()=>{i("general","datalayer_page_type",!(a&&a.general.datalayer_page_type))}}))),l.woocommerce_integration?(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,t.createElement)(n.BaseControl,{label:(0,o.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,t.createElement)(n.ToggleControl,{label:(0,o.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:a&&a.integrations.woocommerce_integration,onChange:()=>{i("integrations","woocommerce_integration",!(a&&a.integrations.woocommerce_integration))}}))):null,l.cf7_integration?(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,t.createElement)(n.BaseControl,{label:(0,o.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,t.createElement)(n.ToggleControl,{label:(0,o.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:a&&a.integrations.cf7_integration,onChange:()=>{i("integrations","cf7_integration",!(a&&a.integrations.cf7_integration))}}))):null,l.edd_integration?(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,t.createElement)(n.BaseControl,{label:(0,o.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,t.createElement)(n.ToggleControl,{label:(0,o.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:a&&a.integrations.edd_integration,onChange:()=>{i("integrations","edd_integration",!(a&&a.integrations.edd_integration))}}))):null,(0,t.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,t.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:s},(0,o.__)("Save and continue","gtm-kit"),s?(0,t.createElement)(n.Spinner,null):"")))},_t=()=>{const{useSettings:a,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s,useSiteData:l}=(0,e.useContext)(c),m=at();return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,o.__)("Help improve GTM Kit","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,o.__)("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,t.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey"},(0,o.__)("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,t.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm"},(0,t.createElement)("tbody",null,(0,t.createElement)("tr",{className:""},(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"Server type:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("code",{className:"gtmkit-text-sm"},l.web_server))),(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"PHP version number:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("code",{className:"gtmkit-text-sm"},l.php_version))),(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"WordPress version number:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("code",{className:"gtmkit-text-sm"},l.wordpress_version))),(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"WordPress multisite:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("code",{className:"gtmkit-text-sm"},l.multisite?(0,o.__)("Yes","gtm-kit"):(0,o.__)("No","gtm-kit")))),(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"Current theme:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("code",{className:"gtmkit-text-sm"},l.current_theme))),(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"Current site language:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("code",{className:"gtmkit-text-sm"},l.locale))),(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"Active plugins:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("em",null,"Plugin names of all active plugins"))),(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("strong",null,"Anonymized GTM Kit settings:")),(0,t.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,t.createElement)("em",null,"Which GTM Kit settings are active"))))),(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto "},(0,t.createElement)(n.BaseControl,{label:(0,o.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,t.createElement)(n.ToggleControl,{label:(0,o.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:a&&a.general.analytics_active,onChange:()=>{i("general","analytics_active",!(a&&a.general.analytics_active))}}))),(0,t.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,t.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:s},(0,o.__)("Save and continue","gtm-kit"),s?(0,t.createElement)(n.Spinner,null):"")))};var bt=a(893);const Tt=()=>(0,bt.jsxs)(bt.Fragment,{children:[(0,bt.jsx)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,o.__)("You are ready to use GTM Kit!","gtm-kit")}),(0,bt.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center",children:(0,o.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")}),(0,bt.jsxs)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center",children:[(0,o.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "]}),(0,bt.jsxs)("div",{className:"gtmkit-border-2 gtmkit-max-w-lg gtmkit-mx-auto gtmkit-mb-8",children:[(0,bt.jsx)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2",children:(0,o.__)("Getting Started","gtm-kit")}),(0,bt.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,o.__)("The next step is to configure your Google Tag Manager container. You will find templates for this in the GTM Templates section.","gtm-kit")," ",(0,bt.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:window.gtmkitSettings.templatesUrl,rel:"noreferrer",children:(0,o.__)("Go to GTM Templates","gtm-kit")})]}),(0,bt.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,o.__)("To get the most out of Google Tag Manager with GTM Kit, you should also review the tutorials.","gtm-kit")," ",(0,bt.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:window.gtmkitSettings.helpUrl+"#/help",rel:"noreferrer",children:(0,o.__)("Go to Tutorials","gtm-kit")})]})]}),(0,bt.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,bt.jsx)(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},children:(0,o.__)("Go to the dashboard","gtm-kit")})})]}),Lt=[{step:1,path:"/welcome",element:"Welcome",title:(0,o.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,o.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,o.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,o.__)("Getting Started","gtm-kit")}],jt=({step:e,currentStep:a,totalSteps:n})=>{if(e===n)return;let i="gtmkit-h-0.5 gtmkit-w-full";return i+=e<a?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,t.createElement)("div",{className:i})},Dt=({step:e,currentStep:a})=>e<a?(0,t.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,t.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"})):e===a?(0,t.createElement)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,It=({step:e,currentStep:a,totalSteps:n})=>{if(0===e)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+=e<a?" gtmkit-bg-color-primary":" gtmkit-bg-white",i+=e>a?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,t.createElement)(t.Fragment,null,(0,t.createElement)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full"},(0,t.createElement)("span",{className:i},(0,t.createElement)(Dt,{step:e,currentStep:a,totalSteps:n}))),(0,t.createElement)(jt,{step:e,currentStep:a,totalSteps:n}))},Ct=()=>{const e=Lt.length-1+Lt[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}))})(Lt,{path:tt().pathname});return a=a.length?a[0].step:0,0===a?(0,t.createElement)("div",{className:"gtmkit-my-16"}):(0,t.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"},Lt.map((function(n){return(0,t.createElement)(It,{key:n.step,step:n.step,currentStep:a,totalSteps:e})})))},Ot=()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("header",{className:"gtmkit-text-center gtmkit-px-3"},(0,t.createElement)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[225px] gtmkit-inline-block"},(0,t.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,o.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,t.createElement)(Ct,null)),Ut=()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey"},(0,t.createElement)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max"},(0,t.createElement)("a",{className:"gtmkit-underline",href:window.gtmkitSettings.dashboardUrl},(0,o.__)("Go to the dashboard.","gtm-kit"))))),At=()=>{const{useSettings:a}=(0,e.useContext)(c);return Object.keys(a).length?(0,t.createElement)(t.Fragment,null,(0,t.createElement)(Ot,null),(0,t.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,t.createElement)(ht,null,(0,t.createElement)(dt,{exact:!0,path:"/welcome",element:(0,t.createElement)(vt,null)}),(0,t.createElement)(dt,{exact:!0,path:"/essential-settings",element:(0,t.createElement)(wt,null)}),(0,t.createElement)(dt,{exact:!0,path:"/share-anonymous-data",element:(0,t.createElement)(_t,null)}),(0,t.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,t.createElement)(Tt,null)}),(0,t.createElement)(dt,{path:"/",element:(0,t.createElement)(ut,{replace:!0,to:"/welcome"})}))),(0,t.createElement)(Ut,null)):(0,t.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},Pt=()=>(0,t.createElement)(ft,{basename:"/"},(0,t.createElement)(g,null,(0,t.createElement)(At,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,e.render)((0,t.createElement)(Pt,null),document.getElementById(window.gtmkitSettings.rootId))}))})()})();
  • gtm-kit/trunk/gtm-kit.php

    r3134629 r3139454  
    44 *
    55 * Plugin Name: GTM Kit
    6  * Version:     1.23.2
     6 * Version:     1.23.3
    77 * Plugin URI:  https://gtmkit.com/
    88 * Description: Google Tag Manager implementation focusing on flexibility and pagespeed.
     
    2828}
    2929
    30 const GTMKIT_VERSION = '1.23.2';
     30const GTMKIT_VERSION = '1.23.3';
    3131
    3232if ( ! defined( 'GTMKIT_FILE' ) ) {
  • gtm-kit/trunk/languages/gtm-kit.pot

    r3134629 r3139454  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: GTM Kit 1.23.2\n"
     5"Project-Id-Version: GTM Kit 1.23.3\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-08-12T12:55:07+00:00\n"
     12"POT-Creation-Date: 2024-08-21T11:23:44+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.9.0\n"
     
    193193
    194194#: src/Integration/WooCommerce.php:251
    195 #: src/Integration/WooCommerce.php:974
     195#: src/Integration/WooCommerce.php:978
    196196msgid "Product Category"
    197197msgstr ""
     
    210210
    211211#: src/Integration/WooCommerce.php:255
    212 #: src/Integration/WooCommerce.php:976
     212#: src/Integration/WooCommerce.php:980
    213213msgid "Product Tag"
    214214msgstr ""
     
    222222msgstr ""
    223223
    224 #: src/Integration/WooCommerce.php:833
     224#: src/Integration/WooCommerce.php:837
    225225msgid "Grouped Product"
    226226msgstr ""
    227227
    228 #: src/Integration/WooCommerce.php:867
     228#: src/Integration/WooCommerce.php:871
    229229msgid "Search Results"
    230230msgstr ""
    231231
    232 #: src/Integration/WooCommerce.php:867
    233 #: src/Integration/WooCommerce.php:908
    234 #: src/Integration/WooCommerce.php:941
     232#: src/Integration/WooCommerce.php:871
     233#: src/Integration/WooCommerce.php:912
     234#: src/Integration/WooCommerce.php:945
    235235msgid "General Product List"
    236236msgstr ""
    237237
    238 #: src/Integration/WooCommerce.php:1125
     238#: src/Integration/WooCommerce.php:1129
    239239msgid "GTM Kit data."
    240240msgstr ""
  • gtm-kit/trunk/readme.txt

    r3134629 r3139454  
    44Tags: google tag manager, gtm, woocommerce, analytics, ga4
    55Tested up to: 6.6
    6 Stable tag: 1.23.2
     6Stable tag: 1.23.3
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    8888
    8989== Changelog ==
     90
     91
     92= 1.23.3 =
     93
     94Release date: 2024-08-22
     95
     96#### Bugfixes:
     97* Prevent fatal errors caused by invalid filter input from third-party plugins.
     98* In WordPress versions prior to 6.6, the options pages fail to load due to a missing dependency.
    9099
    91100= 1.23.2 =
  • gtm-kit/trunk/src/Admin/AbstractOptionsPage.php

    r3112163 r3139454  
    9696     * Configure the admin page using the settings API.
    9797     */
    98     abstract public function configure();
     98    abstract public function configure(): void;
    9999
    100100    /**
     
    161161     * @param string $script_handle The script handle.
    162162     */
    163     abstract public function localize_script( string $page_slug, string $script_handle );
     163    abstract public function localize_script( string $page_slug, string $script_handle ): void;
    164164
    165165    /**
  • gtm-kit/trunk/src/Admin/MetaBox.php

    r2975488 r3139454  
    4646     * Add "GTM Kit" meta box
    4747     */
    48     public function add_meta_boxes() {
     48    public function add_meta_boxes(): void {
    4949        if ( current_user_can( 'manage_options' ) ) {
    5050            $post_types = get_post_types(
     
    7878     * Displays some checkbox to de/activate some cache options
    7979     */
    80     public function display_meta_boxes() {
     80    public function display_meta_boxes(): void {
    8181        if ( current_user_can( 'manage_options' ) ) {
    8282            wp_nonce_field( 'gtmkit_box_option', '_gtmkitnonce', false );
     
    104104     * Manage the cache options from the meta box.
    105105     */
    106     public function save_meta_box_options() {
     106    public function save_meta_box_options(): void {
    107107        if ( current_user_can( 'manage_options' ) && isset( $_POST['post_ID'], $_POST['_gtmkitnonce'] ) ) {
    108108
  • gtm-kit/trunk/src/Admin/SetupWizard.php

    r3118062 r3139454  
    7676     * Maybe redirect to the setup wizard after plugin activation.
    7777     */
    78     public function maybe_redirect_after_activation() {
     78    public function maybe_redirect_after_activation(): void {
    7979
    8080        if ( wp_doing_ajax() || wp_doing_cron() ) {
     
    119119     * @param string $hook The asset hook.
    120120     */
    121     public function enqueue_assets( string $hook ) {
     121    public function enqueue_assets( string $hook ): void {
    122122
    123123        if ( strpos( $hook, self::SLUG ) === false ) {
     
    160160     * Setup Wizard Content
    161161     */
    162     public function setup_wizard_content() {
     162    public function setup_wizard_content(): void {
    163163        $admin_url = is_network_admin() ? network_admin_url() : admin_url();
    164164
  • gtm-kit/trunk/src/Integration/WooCommerce.php

    r3094947 r3139454  
    688688     * @return array The item data.
    689689     */
    690     public function get_item_data( WC_Product $product, array $additional_item_attributes = [], string $event_context = '' ): array {
     690    public function get_item_data( $product, array $additional_item_attributes = [], string $event_context = '' ): array {
     691
     692        if ( ! ( $product instanceof WC_Product ) ) {
     693            return [];
     694        }
    691695
    692696        $product_id_to_query = ( $product->get_type() === 'variation' ) ? $product->get_parent_id() : $product->get_id();
     
    10631067     * Registers the actual data into each endpoint.
    10641068     */
    1065     public function extend_store() {
     1069    public function extend_store(): void {
    10661070
    10671071        // Register into `cart/items`.
  • gtm-kit/trunk/vendor/composer/installed.php

    r3134629 r3139454  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '2030bdfdc44d8ca203a5e81a8689405c6a289fcf',
     6        'reference' => '44b18f33aef58db2d6ac1b6fa29c4f9b583df746',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '2030bdfdc44d8ca203a5e81a8689405c6a289fcf',
     16            'reference' => '44b18f33aef58db2d6ac1b6fa29c4f9b583df746',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.