Plugin Directory

Changeset 3366939


Ignore:
Timestamp:
09/24/2025 06:47:19 AM (6 months ago)
Author:
tlamedia
Message:

Update to version 2.6.0 from GitHub

Location:
gtm-kit
Files:
22 edited
1 copied

Legend:

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

    r3339414 r3366939  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => '13230ade7c7cf4529f36');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => '588f3c026783b88964ef');
  • gtm-kit/tags/2.6.0/assets/admin/settings.js

    r3339414 r3366939  
    1 (()=>{var t={942:(t,e)=>{var i;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var t="",e=0;e<arguments.length;e++){var i=arguments[e];i&&(t=o(t,s(i)))}return t}function s(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return a.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var i in t)n.call(t,i)&&t[i]&&(e=o(e,i));return e}function o(t,e){return e?t?t+" "+e:t+e:t}t.exports?(a.default=a,t.exports=a):void 0===(i=function(){return a}.apply(e,[]))||(t.exports=i)}()}},e={};function i(n){var a=e[n];if(void 0!==a)return a.exports;var s=e[n]={exports:{}};return t[n](s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";const t=window.ReactDOM;var e=i.n(t);const n=window.wp.i18n,a=window.wp.element,s=window.wp.components,o=window.lodash,r=window.wp.apiFetch;var l=i.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const c=async(t,e,i=null,n=!1)=>{let a={};try{a=await l()({path:t,method:e,...i&&{data:i}})}catch(i){return{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?a:!0===a.success?a.data:{}},m=(t,e)=>{const i={...t};switch(e.type){case"FETCH_SETTINGS":i.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},i.stateSettings=e.payload.stateSettings,i.siteData=e.payload.siteData,i.notifications=e.payload.notifications,i.installData=e.payload.installData,i.isPending=!1,i.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(i.notice=(0,n.__)("An error occurred.","gtm-kit"),i.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":i.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":i.fetchedSettings=e.payload.fetchedSettings,i.stateSettings=e.payload.stateSettings,i.isPending=!1,i.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,i.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,n.__)("An error occurred.","gtm-kit"):(0,n.__)("Saved Successfully.","gtm-kit"),i.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":i.fetchedSettings=e.payload.fetchedSettings||i.fetchedSettings,i.stateSettings=e.payload.stateSettings||i.stateSettings,i.isPending=e.payload.isPending||i.isPending,i.notice=e.payload.notice||i.notice,i.hasError=e.payload.hasError||i.hasError,i.canSave=e.payload.canSave||i.canSave,i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData,i.supportTicket=e.payload.supportTicket||i.supportTicket,i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey,i.licenseKey=e.payload.licenseKey||i.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData;break;case"SEND_SUPPORT_DATA":i.isSendingSystemData=!1,i.isSystemDataSent=e.payload.isSystemDataSent||i.isSystemDataSent,i.systemDataMessage=e.payload.systemDataMessage||i.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":i.isSendingLicenseKey=!1,i.isLicenseKeySent=e.payload.isLicenseKeySent||i.isLicenseKeySent,i.licenseKeyMessage=e.payload.licenseKeyMessage||i.licenseKeyMessage;break;case"SEND_NOTIFICATION_STATUS_BEFORE":i.isUpdatingNotifications=e.payload.isUpdatingNotifications||i.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":i.isUpdatingNotifications=!1,i.notifications=e.payload.notifications||i.Notifications}return i},d=window.ReactJSXRuntime,g=(0,a.createContext)(),u=t=>{const[e,i]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),n=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},n=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};i({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:n,installData:a}})},s=async t=>{i({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{n()}),[]);const r={useDispatch:t=>{i(t)},useUpdateSettings:async()=>{i({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(n=e.stateSettings,c("gtmkit/v1/set-options","POST",n));var n;i({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:n,useUpdateState:s,useUpdateStateSettings:async(t,i,n)=>{const a=JSON.parse(JSON.stringify(e.stateSettings));let r;a[t][i]=n,r=!(0,o.isEqual)(a,e.fetchedSettings),s({stateSettings:a,canSave:r})},useImportSettings:async(t,i)=>{const n=JSON.parse(JSON.stringify(e.stateSettings));let a;const r={};r.general={...n.general,...i.general},"integrations"in i&&(r.integrations={...n.integrations,...i.integrations}),a=!(0,o.isEqual)(r,e.fetchedSettings),s({stateSettings:r,canSave:a})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{i({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(n=e.supportTicket,c("gtmkit/v1/send-support-data","POST",n,!0));var n;i({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{s({licenseKey:t})},useSendLicenseKey:async()=>{i({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(n=e.licenseKey,c("gtmkit/v1/send-license-key","POST",n,!0));var n;i({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{i({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:"remove"!==e}});const n={"notification-id":t,action:e},a=await(t=>c("gtmkit/v1/set-notification-status","POST",t,!0))(n),s=a.data.metrics.total,o=document.querySelectorAll("li.toplevel_page_gtmkit_general span.menu-counter");o&&o.forEach((t=>{const e=t.querySelector("span.count");e&&(e.textContent=s),t.className=t.className.replace(/count-\d+/,`count-${s}`)})),i({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,notifications:a.data}})},useSettings:e.stateSettings,useIsPending:e.isPending,useNotice:e.notice,useHasError:e.hasError,useCanSave:e.canSave,useSiteData:e.siteData,useInstallData:e.installData,useIsSending:e.isSendingSystemData,useSupportTicket:e.supportTicket,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage,useIsSendingLicenseKey:e.isSendingLicenseKey,useLicenseKey:e.licenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage,useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,d.jsx)(g.Provider,{value:r,children:t.children})},p=window.React;var h,k=i.n(p);function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},f.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(h||(h={}));const _="popstate";function x(t,e){if(!1===t||null==t)throw new Error(e)}function S(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function b(t,e){return{usr:t.state,key:t.key,idx:e}}function y(t,e,i,n){return void 0===i&&(i=null),f({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?j(e):e,{state:i,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function v(t){let{pathname:e="/",search:i="",hash:n=""}=t;return i&&"?"!==i&&(e+="?"===i.charAt(0)?i:"?"+i),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function j(t){let e={};if(t){let i=t.indexOf("#");i>=0&&(e.hash=t.substr(i),t=t.substr(0,i));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var N;function w(t,e,i){return void 0===i&&(i="/"),function(t,e,i,n){let a=F(("string"==typeof e?j(e):e).pathname||"/",i);if(null==a)return null;let s=E(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,i)=>t===e[i]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(s);let o=null;for(let t=0;null==o&&t<s.length;++t){let e=G(a);o=M(s[t],e,n)}return o}(t,e,i,!1)}function E(t,e,i,n){void 0===e&&(e=[]),void 0===i&&(i=[]),void 0===n&&(n="");let a=(t,a,s)=>{let o={relativePath:void 0===s?t.path||"":s,caseSensitive:!0===t.caseSensitive,childrenIndex:a,route:t};o.relativePath.startsWith("/")&&(x(o.relativePath.startsWith(n),'Absolute route path "'+o.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(n.length));let r=B([n,o.relativePath]),l=i.concat(o);t.children&&t.children.length>0&&(x(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+r+'".'),E(t.children,e,l,r)),(null!=t.path||t.index)&&e.push({path:r,score:R(r,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var i;if(""!==t.path&&null!=(i=t.path)&&i.includes("?"))for(let i of T(t.path))a(t,e,i);else a(t,e)})),e}function T(t){let e=t.split("/");if(0===e.length)return[];let[i,...n]=e,a=i.endsWith("?"),s=i.replace(/\?$/,"");if(0===n.length)return a?[s,""]:[s];let o=T(n.join("/")),r=[];return r.push(...o.map((t=>""===t?s:[s,t].join("/")))),a&&r.push(...o),r.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(N||(N={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const C=/^:[\w-]+$/,D=3,U=2,A=1,I=10,O=-2,L=t=>"*"===t;function R(t,e){let i=t.split("/"),n=i.length;return i.some(L)&&(n+=O),e&&(n+=U),i.filter((t=>!L(t))).reduce(((t,e)=>t+(C.test(e)?D:""===e?A:I)),n)}function M(t,e,i){void 0===i&&(i=!1);let{routesMeta:n}=t,a={},s="/",o=[];for(let t=0;t<n.length;++t){let r=n[t],l=t===n.length-1,c="/"===s?e:e.slice(s.length)||"/",m=P({path:r.relativePath,caseSensitive:r.caseSensitive,end:l},c),d=r.route;if(!m&&l&&i&&!n[n.length-1].route.index&&(m=P({path:r.relativePath,caseSensitive:r.caseSensitive,end:!1},c)),!m)return null;Object.assign(a,m.params),o.push({params:a,pathname:B([s,m.pathname]),pathnameBase:W(B([s,m.pathnameBase])),route:d}),"/"!==m.pathnameBase&&(s=B([s,m.pathnameBase]))}return o}function P(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[i,n]=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0),S("*"===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=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,i)=>(n.push({paramName:e,isOptional:null!=i}),i?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),a+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?a+="\\/*$":""!==t&&"/"!==t&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),a=e.match(i);if(!a)return null;let s=a[0],o=s.replace(/(.)\/+$/,"$1"),r=a.slice(1);return{params:n.reduce(((t,e,i)=>{let{paramName:n,isOptional:a}=e;if("*"===n){let t=r[i]||"";o=s.slice(0,s.length-t.length).replace(/(.)\/+$/,"$1")}const l=r[i];return t[n]=a&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:s,pathnameBase:o,pattern:t}}function G(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return S(!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 F(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let i=e.endsWith("/")?e.length-1:e.length,n=t.charAt(i);return n&&"/"!==n?null:t.slice(i)||"/"}function H(t,e,i,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+i+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function K(t,e){let i=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?i.map(((t,e)=>e===i.length-1?t.pathname:t.pathnameBase)):i.map((t=>t.pathnameBase))}function z(t,e,i,n){let a;void 0===n&&(n=!1),"string"==typeof t?a=j(t):(a=f({},t),x(!a.pathname||!a.pathname.includes("?"),H("?","pathname","search",a)),x(!a.pathname||!a.pathname.includes("#"),H("#","pathname","hash",a)),x(!a.search||!a.search.includes("#"),H("#","search","hash",a)));let s,o=""===t||""===a.pathname,r=o?"/":a.pathname;if(null==r)s=i;else{let t=e.length-1;if(!n&&r.startsWith("..")){let e=r.split("/");for(;".."===e[0];)e.shift(),t-=1;a.pathname=e.join("/")}s=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:i,search:n="",hash:a=""}="string"==typeof t?j(t):t,s=i?i.startsWith("/")?i:function(t,e){let i=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?i.length>1&&i.pop():"."!==t&&i.push(t)})),i.length>1?i.join("/"):"/"}(i,e):e;return{pathname:s,search:$(n),hash:Y(a)}}(a,s),c=r&&"/"!==r&&r.endsWith("/"),m=(o||"."===r)&&i.endsWith("/");return l.pathname.endsWith("/")||!c&&!m||(l.pathname+="/"),l}const B=t=>t.join("/").replace(/\/\/+/g,"/"),W=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),$=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const J=["post","put","patch","delete"],q=(new Set(J),["get",...J]);function V(){return V=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},V.apply(this,arguments)}new Set(q),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const X=p.createContext(null),Z=p.createContext(null),Q=p.createContext(null),tt=p.createContext(null),et=p.createContext({outlet:null,matches:[],isDataRoute:!1}),it=p.createContext(null);function nt(){return null!=p.useContext(tt)}function at(){return nt()||x(!1),p.useContext(tt).location}function st(t){p.useContext(Q).static||p.useLayoutEffect(t)}function ot(){let{isDataRoute:t}=p.useContext(et);return t?function(){let{router:t}=function(){let t=p.useContext(X);return t||x(!1),t}(ut.UseNavigateStable),e=ht(pt.UseNavigateStable),i=p.useRef(!1);return st((()=>{i.current=!0})),p.useCallback((function(n,a){void 0===a&&(a={}),i.current&&("number"==typeof n?t.navigate(n):t.navigate(n,V({fromRouteId:e},a)))}),[t,e])}():function(){nt()||x(!1);let t=p.useContext(X),{basename:e,future:i,navigator:n}=p.useContext(Q),{matches:a}=p.useContext(et),{pathname:s}=at(),o=JSON.stringify(K(a,i.v7_relativeSplatPath)),r=p.useRef(!1);return st((()=>{r.current=!0})),p.useCallback((function(i,a){if(void 0===a&&(a={}),!r.current)return;if("number"==typeof i)return void n.go(i);let l=z(i,JSON.parse(o),s,"path"===a.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:B([e,l.pathname])),(a.replace?n.replace:n.push)(l,a.state,a)}),[e,n,o,s,t])}()}function rt(t,e){let{relative:i}=void 0===e?{}:e,{future:n}=p.useContext(Q),{matches:a}=p.useContext(et),{pathname:s}=at(),o=JSON.stringify(K(a,n.v7_relativeSplatPath));return p.useMemo((()=>z(t,JSON.parse(o),s,"path"===i)),[t,o,s,i])}function lt(t,e,i,n){nt()||x(!1);let{navigator:a,static:s}=p.useContext(Q),{matches:o}=p.useContext(et),r=o[o.length-1],l=r?r.params:{},c=(r&&r.pathname,r?r.pathnameBase:"/");r&&r.route;let m,d=at();if(e){var g;let t="string"==typeof e?j(e):e;"/"===c||(null==(g=t.pathname)?void 0:g.startsWith(c))||x(!1),m=t}else m=d;let u=m.pathname||"/",k=u;if("/"!==c){let t=c.replace(/^\//,"").split("/");k="/"+u.replace(/^\//,"").split("/").slice(t.length).join("/")}let f=!s&&i&&i.matches&&i.matches.length>0?i.matches:w(t,{pathname:k}),_=function(t,e,i,n){var a;if(void 0===e&&(e=[]),void 0===i&&(i=null),void 0===n&&(n=null),null==t){var s;if(!i)return null;if(i.errors)t=i.matches;else{if(!(null!=(s=n)&&s.v7_partialHydration&&0===e.length&&!i.initialized&&i.matches.length>0))return null;t=i.matches}}let o=t,r=null==(a=i)?void 0:a.errors;if(null!=r){let t=o.findIndex((t=>t.route.id&&void 0!==(null==r?void 0:r[t.route.id])));t>=0||x(!1),o=o.slice(0,Math.min(o.length,t+1))}let l=!1,c=-1;if(i&&n&&n.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}=i,a=e.route.loader&&void 0===t[e.route.id]&&(!n||void 0===n[e.route.id]);if(e.route.lazy||a){l=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((t,n,a)=>{let s,m=!1,d=null,g=null;var u;i&&(s=r&&n.route.id?r[n.route.id]:void 0,d=n.route.errorElement||mt,l&&(c<0&&0===a?(kt[u="route-fallback"]||(kt[u]=!0),m=!0,g=null):c===a&&(m=!0,g=n.route.hydrateFallbackElement||null)));let h=e.concat(o.slice(0,a+1)),k=()=>{let e;return e=s?d:m?g:n.route.Component?p.createElement(n.route.Component,null):n.route.element?n.route.element:t,p.createElement(gt,{match:n,routeContext:{outlet:t,matches:h,isDataRoute:null!=i},children:e})};return i&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?p.createElement(dt,{location:i.location,revalidation:i.revalidation,component:d,error:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(f&&f.map((t=>Object.assign({},t,{params:Object.assign({},l,t.params),pathname:B([c,a.encodeLocation?a.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?c:B([c,a.encodeLocation?a.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),o,i,n);return e&&_?p.createElement(tt.Provider,{value:{location:V({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:h.Pop}},_):_}function ct(){let t=function(){var t;let e=p.useContext(it),i=function(){let t=p.useContext(Z);return t||x(!1),t}(pt.UseRouteError),n=ht(pt.UseRouteError);return void 0!==e?e:null==(t=i.errors)?void 0:t[n]}(),e=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),i=t instanceof Error?t.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},e),i?p.createElement("pre",{style:n},i):null,null)}const mt=p.createElement(ct,null);class dt extends p.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?p.createElement(et.Provider,{value:this.props.routeContext},p.createElement(it.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function gt(t){let{routeContext:e,match:i,children:n}=t,a=p.useContext(X);return a&&a.static&&a.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=i.route.id),p.createElement(et.Provider,{value:e},n)}var ut=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ut||{}),pt=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}(pt||{});function ht(t){let e=function(){let t=p.useContext(et);return t||x(!1),t}(),i=e.matches[e.matches.length-1];return i.route.id||x(!1),i.route.id}const kt={};function ft(t){let{to:e,replace:i,state:n,relative:a}=t;nt()||x(!1);let{future:s,static:o}=p.useContext(Q),{matches:r}=p.useContext(et),{pathname:l}=at(),c=ot(),m=z(e,K(r,s.v7_relativeSplatPath),l,"path"===a),d=JSON.stringify(m);return p.useEffect((()=>c(JSON.parse(d),{replace:i,state:n,relative:a})),[c,d,a,i,n]),null}function _t(t){x(!1)}function xt(t){let{basename:e="/",children:i=null,location:n,navigationType:a=h.Pop,navigator:s,static:o=!1,future:r}=t;nt()&&x(!1);let l=e.replace(/^\/*/,"/"),c=p.useMemo((()=>({basename:l,navigator:s,static:o,future:V({v7_relativeSplatPath:!1},r)})),[l,r,s,o]);"string"==typeof n&&(n=j(n));let{pathname:m="/",search:d="",hash:g="",state:u=null,key:k="default"}=n,f=p.useMemo((()=>{let t=F(m,l);return null==t?null:{location:{pathname:t,search:d,hash:g,state:u,key:k},navigationType:a}}),[l,m,d,g,u,k,a]);return null==f?null:p.createElement(Q.Provider,{value:c},p.createElement(tt.Provider,{children:i,value:f}))}function St(t){let{children:e,location:i}=t;return lt(bt(e),i)}function bt(t,e){void 0===e&&(e=[]);let i=[];return p.Children.forEach(t,((t,n)=>{if(!p.isValidElement(t))return;let a=[...e,n];if(t.type===p.Fragment)return void i.push.apply(i,bt(t.props.children,a));t.type!==_t&&x(!1),t.props.index&&t.props.children&&x(!1);let s={id:t.props.id||a.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=bt(t.props.children,a)),i.push(s)})),i}function yt(){return yt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},yt.apply(this,arguments)}function vt(t,e){if(null==t)return{};var i,n,a={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(a[i]=t[i]);return a}p.startTransition,new Promise((()=>{})),p.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const jt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Nt=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"];try{window.__reactRouterVersion="6"}catch(t){}const wt=p.createContext({isTransitioning:!1});new Map;const Et=p.startTransition;function Tt(t){let{basename:e,children:i,future:n,window:a}=t,s=p.useRef();var o;null==s.current&&(s.current=(void 0===(o={window:a,v5Compat:!0})&&(o={}),function(t,e,i,n){void 0===n&&(n={});let{window:a=document.defaultView,v5Compat:s=!1}=n,o=a.history,r=h.Pop,l=null,c=m();function m(){return(o.state||{idx:null}).idx}function d(){r=h.Pop;let t=m(),e=null==t?null:t-c;c=t,l&&l({action:r,location:u.location,delta:e})}function g(t){let e="null"!==a.location.origin?a.location.origin:a.location.href,i="string"==typeof t?t:v(t);return i=i.replace(/ $/,"%20"),x(e,"No window.location.(origin|href) available to create URL for href: "+i),new URL(i,e)}null==c&&(c=0,o.replaceState(f({},o.state,{idx:c}),""));let u={get action(){return r},get location(){return t(a,o)},listen(t){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(_,d),l=t,()=>{a.removeEventListener(_,d),l=null}},createHref:t=>e(a,t),createURL:g,encodeLocation(t){let e=g(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){r=h.Push;let n=y(u.location,t,e);i&&i(n,t),c=m()+1;let d=b(n,c),g=u.createHref(n);try{o.pushState(d,"",g)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;a.location.assign(g)}s&&l&&l({action:r,location:u.location,delta:1})},replace:function(t,e){r=h.Replace;let n=y(u.location,t,e);i&&i(n,t),c=m();let a=b(n,c),d=u.createHref(n);o.replaceState(a,"",d),s&&l&&l({action:r,location:u.location,delta:0})},go:t=>o.go(t)};return u}((function(t,e){let{pathname:i="/",search:n="",hash:a=""}=j(t.location.hash.substr(1));return i.startsWith("/")||i.startsWith(".")||(i="/"+i),y("",{pathname:i,search:n,hash:a},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let i=t.document.querySelector("base"),n="";if(i&&i.getAttribute("href")){let e=t.location.href,i=e.indexOf("#");n=-1===i?e:e.slice(0,i)}return n+"#"+("string"==typeof e?e:v(e))}),(function(t,e){S("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),o)));let r=s.current,[l,c]=p.useState({action:r.action,location:r.location}),{v7_startTransition:m}=n||{},d=p.useCallback((t=>{m&&Et?Et((()=>c(t))):c(t)}),[c,m]);return p.useLayoutEffect((()=>r.listen(d)),[r,d]),p.useEffect((()=>{return null==(t=n)||t.v7_startTransition,void 0!==(null==t?void 0:t.v7_relativeSplatPath)||e&&e.v7_relativeSplatPath,void(e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation));var t,e}),[n]),p.createElement(xt,{basename:e,children:i,location:l.location,navigationType:l.action,navigator:r,future:n})}t.flushSync,p.useId;const Ct="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Dt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ut=p.forwardRef((function(t,e){let i,{onClick:n,relative:a,reloadDocument:s,replace:o,state:r,target:l,to:c,preventScrollReset:m,viewTransition:d}=t,g=vt(t,jt),{basename:u}=p.useContext(Q),h=!1;if("string"==typeof c&&Dt.test(c)&&(i=c,Ct))try{let t=new URL(window.location.href),e=c.startsWith("//")?new URL(t.protocol+c):new URL(c),i=F(e.pathname,u);e.origin===t.origin&&null!=i?c=i+e.search+e.hash:h=!0}catch(t){}let k=function(t,e){let{relative:i}=void 0===e?{}:e;nt()||x(!1);let{basename:n,navigator:a}=p.useContext(Q),{hash:s,pathname:o,search:r}=rt(t,{relative:i}),l=o;return"/"!==n&&(l="/"===o?n:B([n,o])),a.createHref({pathname:l,search:r,hash:s})}(c,{relative:a}),f=function(t,e){let{target:i,replace:n,state:a,preventScrollReset:s,relative:o,viewTransition:r}=void 0===e?{}:e,l=ot(),c=at(),m=rt(t,{relative:o});return p.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,i)){e.preventDefault();let i=void 0!==n?n:v(c)===v(m);l(t,{replace:i,state:a,preventScrollReset:s,relative:o,viewTransition:r})}}),[c,l,m,n,a,i,t,s,o,r])}(c,{replace:o,state:r,target:l,preventScrollReset:m,relative:a,viewTransition:d});return p.createElement("a",yt({},g,{href:i||k,onClick:h||s?n:function(t){n&&n(t),t.defaultPrevented||f(t)},ref:e,target:l}))})),At=p.forwardRef((function(t,e){let{"aria-current":i="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:r,viewTransition:l,children:c}=t,m=vt(t,Nt),d=rt(r,{relative:m.relative}),g=at(),u=p.useContext(Z),{navigator:h,basename:k}=p.useContext(Q),f=null!=u&&function(t,e){void 0===e&&(e={});let i=p.useContext(wt);null==i&&x(!1);let{basename:n}=function(){let t=p.useContext(X);return t||x(!1),t}(It.useViewTransitionState),a=rt(t,{relative:e.relative});if(!i.isTransitioning)return!1;let s=F(i.currentLocation.pathname,n)||i.currentLocation.pathname,o=F(i.nextLocation.pathname,n)||i.nextLocation.pathname;return null!=P(a.pathname,o)||null!=P(a.pathname,s)}(d)&&!0===l,_=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,S=g.pathname,b=u&&u.navigation&&u.navigation.location?u.navigation.location.pathname:null;n||(S=S.toLowerCase(),b=b?b.toLowerCase():null,_=_.toLowerCase()),b&&k&&(b=F(b,k)||b);const y="/"!==_&&_.endsWith("/")?_.length-1:_.length;let v,j=S===_||!s&&S.startsWith(_)&&"/"===S.charAt(y),N=null!=b&&(b===_||!s&&b.startsWith(_)&&"/"===b.charAt(_.length)),w={isActive:j,isPending:N,isTransitioning:f},E=j?i:void 0;v="function"==typeof a?a(w):[a,j?"active":null,N?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof o?o(w):o;return p.createElement(Ut,yt({},m,{"aria-current":E,className:v,ref:e,style:T,to:r,viewTransition:l}),"function"==typeof c?c(w):c)}));var It,Ot;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(It||(It={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Ot||(Ot={}));const Lt=({title:t})=>(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky",children:(0,d.jsx)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between",children:(0,d.jsxs)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl",children:[(0,d.jsxs)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,d.jsx)("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,d.jsxs)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)",children:[(0,d.jsx)("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,d.jsx)("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]})})})});var Rt=i(942),Mt=i.n(Rt);const Pt=({count:t,important:e,nav:i=!1})=>(0,d.jsx)(d.Fragment,{children:t>0&&(0,d.jsx)("span",{className:Mt()("gtmkit-ml-2 gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py-px gtmkit-leading-[1.125rem] gtmkit-uppercase",{"gtmkit-bg-color-error":e},{"gtmkit-bg-color-success":!e},{"gtmkit-px-1.5":i},{"gtmkit-px-2":!i}),children:t})}),Gt=({metrics:t})=>(0,d.jsx)(Pt,{count:t.total,important:t.problem>0,nav:!0}),Ft=Pt,Ht=({to:t,title:e})=>{const{useNotifications:i}=(0,a.useContext)(g);return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(At,{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 ":""),children:[e,"notifications"===t&&(0,d.jsx)(Gt,{metrics:i.metrics})]})})},Kt=({NavList:t})=>(0,d.jsx)("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",children:t.map((function(t){return(0,d.jsx)(Ht,{to:t.to,title:t.title},t.to)}))});function zt(){return zt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)({}).hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},zt.apply(null,arguments)}function Bt(t,e){if(null==t)return{};var i={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;i[n]=t[n]}return i}function Wt(t,e){return Wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wt(t,e)}function $t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Wt(t,e)}function Yt(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Jt=k().createContext(null);var qt=function(t){return t.scrollTop},Vt="unmounted",Xt="exited",Zt="entering",Qt="entered",te="exiting",ee=function(t){function i(e,i){var n;n=t.call(this,e,i)||this;var a,s=i&&!i.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?s?(a=Xt,n.appearStatus=Zt):a=Qt:a=e.unmountOnExit||e.mountOnEnter?Vt:Xt,n.state={status:a},n.nextCallback=null,n}$t(i,t),i.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Vt?{status:Xt}:null};var n=i.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var i=this.state.status;this.props.in?i!==Zt&&i!==Qt&&(e=Zt):i!==Zt&&i!==Qt||(e=te)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,i,n=this.props.timeout;return t=e=i=n,null!=n&&"number"!=typeof n&&(t=n.exit,e=n.enter,i=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:i}},n.updateStatus=function(t,i){if(void 0===t&&(t=!1),null!==i)if(this.cancelNextCallback(),i===Zt){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:e().findDOMNode(this);n&&qt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Xt&&this.setState({status:Vt})},n.performEnter=function(t){var i=this,n=this.props.enter,a=this.context?this.context.isMounting:t,s=this.props.nodeRef?[a]:[e().findDOMNode(this),a],o=s[0],r=s[1],l=this.getTimeouts(),c=a?l.appear:l.enter;t||n?(this.props.onEnter(o,r),this.safeSetState({status:Zt},(function(){i.props.onEntering(o,r),i.onTransitionEnd(c,(function(){i.safeSetState({status:Qt},(function(){i.props.onEntered(o,r)}))}))}))):this.safeSetState({status:Qt},(function(){i.props.onEntered(o)}))},n.performExit=function(){var t=this,i=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:e().findDOMNode(this);i?(this.props.onExit(a),this.safeSetState({status:te},(function(){t.props.onExiting(a),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Xt},(function(){t.props.onExited(a)}))}))}))):this.safeSetState({status:Xt},(function(){t.props.onExited(a)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,i=!0;return this.nextCallback=function(n){i&&(i=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(t,i){this.setNextCallback(i);var n=this.props.nodeRef?this.props.nodeRef.current:e().findDOMNode(this),a=null==t&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=s[0],r=s[1];this.props.addEndListener(o,r)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Vt)return null;var e=this.props,i=e.children,n=(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,Bt(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return k().createElement(Jt.Provider,{value:null},"function"==typeof i?i(t,n):k().cloneElement(k().Children.only(i),n))},i}(k().Component);function ie(){}ee.contextType=Jt,ee.propTypes={},ee.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ie,onEntering:ie,onEntered:ie,onExit:ie,onExiting:ie,onExited:ie},ee.UNMOUNTED=Vt,ee.EXITED=Xt,ee.ENTERING=Zt,ee.ENTERED=Qt,ee.EXITING=te;const ne=ee;var ae=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return n=e,void((i=t).classList?i.classList.remove(n):"string"==typeof i.className?i.className=Yt(i.className,n):i.setAttribute("class",Yt(i.className&&i.className.baseVal||"",n)));var i,n}))},se=function(t){function e(){for(var e,i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return(e=t.call.apply(t,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1];e.removeClasses(a,"exit"),e.addClass(a,s?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,i)},e.onEntering=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1]?"appear":"enter";e.addClass(a,s,"active"),e.props.onEntering&&e.props.onEntering(t,i)},e.onEntered=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1]?"appear":"enter";e.removeClasses(a,s),e.addClass(a,s,"done"),e.props.onEntered&&e.props.onEntered(t,i)},e.onExit=function(t){var i=e.resolveArguments(t)[0];e.removeClasses(i,"appear"),e.removeClasses(i,"enter"),e.addClass(i,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var i=e.resolveArguments(t)[0];e.addClass(i,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var i=e.resolveArguments(t)[0];e.removeClasses(i,"exit"),e.addClass(i,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,i){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,i]},e.getClassNames=function(t){var i=e.props.classNames,n="string"==typeof i,a=n?(n&&i?i+"-":"")+t:i[t];return{baseClassName:a,activeClassName:n?a+"-active":i[t+"Active"],doneClassName:n?a+"-done":i[t+"Done"]}},e}$t(e,t);var i=e.prototype;return i.addClass=function(t,e,i){var n=this.getClassNames(e)[i+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===i&&a&&(n+=" "+a),"active"===i&&t&&qt(t),n&&(this.appliedClasses[e][i]=n,function(t,e){t&&e&&e.split(" ").forEach((function(e){return n=e,void((i=t).classList?i.classList.add(n):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(i,n)||("string"==typeof i.className?i.className=i.className+" "+n:i.setAttribute("class",(i.className&&i.className.baseVal||"")+" "+n)));var i,n}))}(t,n))},i.removeClasses=function(t,e){var i=this.appliedClasses[e],n=i.base,a=i.active,s=i.done;this.appliedClasses[e]={},n&&ae(t,n),a&&ae(t,a),s&&ae(t,s)},i.render=function(){var t=this.props,e=(t.classNames,Bt(t,["classNames"]));return k().createElement(ne,zt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(k().Component);se.defaultProps={classNames:""},se.propTypes={};const oe=se,re=({title:t=(0,n.__)("Save","gtm-kit"),className:e="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:i,useIsPending:o,useCanSave:r}=(0,a.useContext)(g);return(0,d.jsxs)(s.Button,{className:e,onClick:()=>i(),variant:"primary",disabled:o||!r,children:[r?t:(0,n.__)("Saved","gtm-kit"),o?(0,d.jsx)(s.Spinner,{}):""]})},le=()=>{const{useCanSave:t}=(0,a.useContext)(g);return(0,d.jsx)(oe,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0,children:(0,d.jsx)("footer",{className:"gtmkit-fixed gtmkit-bottom-0 gtmkit-w-full gtmkit-z-10 gtmkit-bg-color-grey gtmkit-text-white gtmkit-p-8",children:(0,d.jsx)(re,{})})})},ce=({subject:t})=>{const e=!0===t||"on"===t,i=!0===e?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,d.jsx)("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,children:e?(0,n.__)("Active","gtm-kit"):(0,n.__)("Inactive","gtm-kit")})},me=(0,a.forwardRef)((({children:t,className:e="",...i},n)=>(0,d.jsx)("div",{...i,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 "+e,ref:n,children:t})));me.Header=({as:t="h3",title:e="",children:i,className:n="",...a})=>(0,d.jsxs)("div",{...a,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+n,children:[(0,d.jsx)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading",children:e}),i]}),me.Content=({as:t="div",children:e,className:i="gtmkit-flex-auto",...n})=>(0,d.jsx)(t,{...n,className:i,children:e}),me.Button=({url:t,destination:e,newTab:i=!1,text:n,group:a="",...o})=>{const r=ot();return(0,d.jsx)("div",{...o,className:"gtmkit-mt-4 gtmkit-mb-0.5",children:(0,d.jsx)(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:()=>{e&&t&&!1===i?window.gtmkitSettings.current_page===a?r(e,{replace:!0}):window.location.href=t+"#"+e:t?i?window.open(t):window.location.href=t:r(e,{replace:!0})},children:(0,d.jsx)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold",children:n})})})};const de=me,ge=({title:t,data:e,className:i=""})=>{const{useSettings:s}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6",children:t}),(0,d.jsx)("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] "+i,children:e.map(((t,e)=>!1===t.featured?null:(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:t.title,children:t.pill?(0,d.jsx)(ce,{subject:s[t.group][t.option]}):null}),(0,d.jsx)(de.Content,{children:t.text.map(((t,e)=>(0,d.jsx)("p",{children:t},e)))}),(0,d.jsx)(de.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,n.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group})]},e)))})]})},ue=(t="general",e="")=>{const i=window.gtmkitSettings.adminPageUrl;return e?`${i}${t}#/${e}`:`${i}${t}`},pe=t=>((t,e,i)=>{const n=(t,i)=>({...i,title:t.title,to:t.path,group:t.group||i.group,option:t.option||i.option,text:[t.description],link:{...i.link,url:ue(e,""),destination:"/"+t.path}});return"templates"===e?Object.keys(t).map((e=>n(t[e][0],i))):Object.keys(t).map((e=>n(t[e],i)))})(window.gtmkitSettings[t],t,function(t){switch(t){case"integrations":return{pill:!0,group:"integrations",option:null,link:{internal:!0,text:(0,n.__)("Setup Integration","gtm-kit")}};case"templates":return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,n.__)("Get Template","gtm-kit")}};default:return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,n.__)("Read More","gtm-kit")}}}}(t)),he=()=>{const{useSettings:t,useNotifications:e}=(0,a.useContext)(g),[i,s]=(0,a.useState)(window.gtmkitSettings.tutorials),o=e.metrics;return(0,a.useEffect)((()=>{s((t=>[...t,{title:(0,n.__)("See all tutorials","gtm-kit"),text:[(0,n.__)("See all our tutorials and get the most out of GTM Kit","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=documentation&utm_content=dashboard-tutorials",text:(0,n.__)("Read articles","gtm-kit")},featured:!0}]))}),[]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("General","gtm-kit")}),(0,d.jsxs)("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]",children:[(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:"Google Tag Manager Container",children:(0,d.jsx)(ce,{subject:t.general.gtm_id&&t.general.container_active})}),(0,d.jsx)(de.Content,{children:t.general.gtm_id&&t.general.container_active?(0,d.jsxs)("p",{children:[(0,n.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id]}):(0,d.jsx)("p",{children:(0,n.__)("The container is not active but the datalayer is generated.","gtm-kit")})}),(0,d.jsx)(de.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})]}),(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:(0,n.__)("Notifications","gtm-kit"),className:"!gtmkit-justify-start",children:(0,d.jsx)(Ft,{count:o.total,important:o.problem>0})}),(0,d.jsx)(de.Content,{children:o.total?(0,d.jsx)(d.Fragment,{children:o.problem?(0,d.jsx)("p",{children:(0,n.__)("There are some problems that require your attention.","gtm-kit")}):(0,d.jsx)("p",{children:(0,n.__)("There are some notifications that may require your attention.","gtm-kit")})}):(0,d.jsx)("p",{children:(0,n.__)("No notifications at the moment.","gtm-kit")})}),(0,d.jsx)(de.Button,{destination:"/notifications",text:(0,n.__)("See all notifications","gtm-kit")})]}),(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit"),children:(0,d.jsx)(ce,{subject:t.general.analytics_active})}),(0,d.jsx)(de.Content,{children:(0,d.jsx)("p",{children:(0,n.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit")})}),(0,d.jsx)(de.Button,{destination:"/misc",text:(0,n.__)("Share anonymous data","gtm-kit")})]})]}),(0,d.jsx)(ge,{title:(0,n.__)("Tutorials","gtm-kit"),data:i}),(0,d.jsx)(ge,{title:(0,n.__)("Integrations","gtm-kit"),data:pe("integrations")})]})},ke=({title:t,placeholder:e,help:i,className:n="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:a="general",optionName:o,isDisabled:r,useSettings:l,useUpdateStateSettings:c,useSetNotificationStatus:m,notificationId:g=""})=>(0,d.jsx)(s.TextControl,{label:t,placeholder:e,help:i,className:n,value:l[a][o],onChange:t=>{c(a,o,t),g&&m(g,"remove")},disabled:r}),fe=({title:t,label:e,optionGroup:i="general",optionName:n,disabled:o=!1,useSettings:r,useUpdateStateSettings:l,narrow:c=!1,premium:m=!1,useSetNotificationStatus:g,notificationId:u=""})=>{const p=(0,a.useId)(),h="gtmkit-settings-field-wrap "+(c?"gtmkit-py-2":"gtmkit-py-4");return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("div",{className:h,children:(0,d.jsx)(s.BaseControl,{label:m?(0,d.jsxs)(d.Fragment,{children:[t,(0,d.jsx)("span",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-normal gtmkit-rounded-full gtmkit-py-0.5 gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"})]}):t,id:p,children:(0,d.jsx)(s.ToggleControl,{label:e,checked:!o&&r[i][n],onChange:()=>{l(i,n,!(r&&r[i][n])),u&&g(u,"remove")},disabled:o})})})})},_e=({title:t,options:e,help:i,className:n="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:a="general",optionName:o,disabled:r,useSettings:l,useUpdateStateSettings:c})=>(0,d.jsx)(s.RadioControl,{label:t,options:e,help:i,className:n,selected:parseInt(l[a][o]),onChange:t=>c(a,o,t),disabled:r}),xe=({title:t,help:e,items:i=[],optionGroup:n="general",optionName:o,disabled:r=!1,useSettings:l,useUpdateStateSettings:c})=>{const m=(0,a.useId)(),g=Array.isArray(l[n][o])?l[n][o]:[],[u,p]=(0,a.useState)(g);return(0,a.useEffect)((()=>{const t=Array.isArray(l[n][o])?l[n][o]:[];p(t)}),[l]),(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4",children:(0,d.jsx)(s.BaseControl,{label:t,help:e,id:m,children:i.map((t=>(0,d.jsx)(s.CheckboxControl,{label:t.name,disabled:r,checked:u.includes(t.role),onChange:e=>((t,e)=>{p((i=>{let a;return a=t?[...i,e]:i.filter((t=>t!==e)),c(n,o,a),a}))})(e,t.role)},t.role)))})})})},Se=(0,a.forwardRef)((({children:t,className:e="",disabled:i=!1,...n},a)=>(0,d.jsx)("div",{...n,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-max-w-screen-lg gtmkit-border-color-grey gtmkit-rounded "+e+(i?"gtmkit-opacity-60":""),ref:a,children:t})));Se.Header=({as:t="h3",title:e="",children:i,className:n="",...a})=>(0,d.jsxs)(t,{...a,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 "+n,children:[e,i]}),Se.Content=({as:t="div",children:e,className:i="",...n})=>(0,d.jsx)(t,{...n,className:"gtmkit-px-8 gtmkit-py-6 "+i,children:e});const be=Se,ye=()=>{const{useSettings:t,useUpdateStateSettings:e,useUserRoles:i,useSetNotificationStatus:s}=(0,a.useContext)(g),o=!(t.general.sgtm_domain&&t.general.sgtm_domain.trim()&&t.general.sgtm_container_identifier&&t.general.sgtm_container_identifier.trim()),r=at();return(0,p.useEffect)((()=>{const t=new URLSearchParams(r.search).get("focus");if(t){const e=document.getElementById(t);e&&e.scrollIntoView()}}),[r]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Google Tag Manager container","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("General Container Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")}),(0,d.jsx)(ke,{title:(0,n.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,n.__)("Enter GTM Container ID","gtm-kit"),useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-container-injection"}),(0,d.jsx)(fe,{title:(0,n.__)("Inject Container Code","gtm-kit"),label:(0,n.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-container-injection"}),(0,d.jsx)(fe,{title:(0,n.__)("Just the container","gtm-kit"),label:(0,n.__)("Setting this to On will reduce the functionality to just the GTM container code. No additional data will be pushed to the datalayer regardless of any other settings.","gtm-kit"),optionName:"just_the_container",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,n.__)("The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do so.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsx)("div",{id:"sgtm"}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(ke,{title:(0,n.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,n.__)("Enter domain","gtm-kit"),help:(0,n.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,n.__)("Enter loader name","gtm-kit"),help:(0,n.__)("Only use if you are using a custom loader.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,n.__)("Prolong cookie lifetime in Safari and other browsers with ITP. This only works if you use Stape sGTM hosting and have set up the Cookie Keeper power up.","gtm-kit"),optionName:"sgtm_cookie_keeper",disabled:o,useSettings:t,useUpdateStateSettings:e})]}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Google Tag Manager Server-side Tagging","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,d.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,n.__)("Learn more","gtm-kit")})]}),(0,d.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Hosting server-side GTM containers","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("Stape.io is a solution for hosting server-side Google Tag Manager containers, offering a simplified approach that demands less technical expertise than solutions like Google Cloud Platform.","gtm-kit")," ",(0,n.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")]}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,d.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,n.__)("Learn more about Stape.io","gtm-kit")})})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Page Speed Optimization","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsx)(be.Content,{children:(0,d.jsx)(fe,{title:(0,n.__)("load_delayed_js event","gtm-kit"),label:(0,n.__)("Setting this to On will push the event 'load_delayed_js' on page load.","gtm-kit"),optionName:"load_js_event",useSettings:t,useUpdateStateSettings:e})}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Delay JavaScript execution","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("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,d.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,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Tag Manager Environment","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(ke,{title:(0,n.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,n.__)("Enter gtm_auth code","gtm-kit"),help:(0,n.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,n.__)("Enter gtm_preview code","gtm-kit"),help:(0,n.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Environments","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,n.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,n.__)("If left empty the default environment will be used.","gtm-kit")]}),(0,d.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Override settings in wp-config.php","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("You can override the values by using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments.","gtm-kit")," ",(0,d.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,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Exclude User Roles","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsx)(be.Content,{children:(0,d.jsx)(xe,{title:(0,n.__)("Exclude user roles","gtm-kit"),help:(0,n.__)("Select the roles that you want to exclude from tracking.","gtm-kit"),items:i,optionName:"exclude_user_roles",useSettings:t,useUpdateStateSettings:e})}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold gtmkit-text-red-600",children:(0,n.__)("Warning!","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("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,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Please ensure thorough and proper testing of this.","gtm-kit")})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Container Code Implementation","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(_e,{title:(0,n.__)("Container code implementation:","gtm-kit"),options:[{label:(0,n.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,n.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,n.__)("Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle.","gtm-kit"),optionName:"script_implementation",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,n.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,n.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,n.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,n.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,n.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,n.__)('The preferred method to implement the <noscript> container code is just after the opening <body> tag. This requires that your theme uses the "body_open" hook. If your theme does not support this the script can be injected in the footer or you can use the function below.',"gtm-kit"),optionName:"noscript_implementation",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,d.jsx)("code",{children:"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"})})]})]})]})},ve=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Post Data","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Post Data Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Post type","gtm-kit"),id:"post-type",label:(0,n.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Page type","gtm-kit"),id:"page-type",label:(0,n.__)('Include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. "campaign".',"gtm-kit"),optionName:"datalayer_page_type",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Categories","gtm-kit"),id:"categories",label:(0,n.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Tags","gtm-kit"),id:"tags",label:(0,n.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post title","gtm-kit"),id:"post-title",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post ID","gtm-kit"),id:"post-id",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post data","gtm-kit"),id:"post-date",label:(0,n.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,n.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,n.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id",useSettings:t,useUpdateStateSettings:e})]})]})]})},je=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("User Data","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,d.jsxs)(be.Content,{className:"gtmkit-space-y-2",children:[(0,d.jsx)("p",{children:(0,n.__)("Including user data is not compatible with full page caching.","gtm-kit")}),(0,d.jsx)("p",{children:(0,n.__)("Full page caching will cache user data making it the same for all users. There are ways around this, but it depends on the chosen cache solution and is only for advanced users.","gtm-kit")})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("User Data Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,n.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("User ID","gtm-kit"),id:"user-id",label:(0,n.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("User role","gtm-kit"),id:"user-role",label:(0,n.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role",useSettings:t,useUpdateStateSettings:e})]})]})]})},Ne=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g),i=!t.general.gcm_default_settings;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Google Consent Mode","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Consent Mode Activation","gtm-kit"),children:(0,d.jsx)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2",children:(0,n.__)("Warning!","gtm-kit")})}),(0,d.jsxs)(be.Content,{className:"gtmkit-space-y-2",children:[(0,d.jsx)("p",{children:(0,n.__)("Most Consent Management Platforms will handle the Google Consent Mode settings for you and applying the default settings in both GTM Kit and you CMP will lead to unexpected behaviour or errors.","gtm-kit")}),(0,d.jsx)("p",{children:(0,n.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")}),(0,d.jsx)("p",{className:"!gtmkit-mt-4",children:(0,n.__)("GTM Kit will only set the default Consent Mode settings and you must update the settings yourself when the user has given consent.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6",children:(0,d.jsx)("a",{href:"https://developers.google.com/tag-platform/security/guides/consent#implementation_example",target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline gtmkit-font-semibold",children:(0,n.__)("See an example of how consent is updated","gtm-kit")})}),(0,d.jsx)(fe,{title:(0,n.__)("Activate GCM settings","gtm-kit"),label:(0,n.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings",useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{disabled:i,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Ad Personalization","gtm-kit"),label:(0,n.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Ad Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Ad User Data","gtm-kit"),label:(0,n.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Analytics Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Functionality Storage","gtm-kit"),label:(0,n.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Personalization Storage","gtm-kit"),label:(0,n.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Security Storage","gtm-kit"),label:(0,n.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)("h4",{className:"gtmkit-font-bold gtmkit-pt-8",children:(0,n.__)("Advanced","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Redact Ads Data","gtm-kit"),label:(0,n.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Pass through URL parameters","gtm-kit"),label:(0,n.__)("Pass through ad click, client ID, and session ID information in URLs","gtm-kit"),optionName:"gcm_url_passthrough",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,n.__)("Enter time in milliseconds","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})]})]})},we=({label:t,value:e,tag:i})=>(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2",children:(0,d.jsx)("strong",{children:t})}),(0,d.jsx)("td",{className:"gtmkit-px-4 gtmkit-py-2",children:"code"===i?(0,d.jsx)("code",{className:"gtmkit-text-sm",children:e}):(0,d.jsx)("em",{children:e})})]}),Ee=()=>{const{useSiteData:t}=(0,a.useContext)(g),e=Object.values(t.shared_data);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey",children:(0,n.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey",children:(0,n.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")}),(0,d.jsx)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6",children:(0,d.jsx)("tbody",{className:"gtmkit-py-6",children:e.map((function(t,e){return(0,d.jsx)(we,{label:t.label,value:t.value,tag:t.tag},e)}))})})]})},Te={variant:{section:"gtmkit-feature-upsell--section",single:"gtmkit-feature-upsell--single"}},Ce=({children:t,shouldUpsell:e=!0,single:i=!1,className:a="",variant:o="section",cardLink:r="",cardText:l=(0,n.__)("Unlock with premium","gtm-kit"),...c})=>{if(!e)return t;const m=r||ue("upgrades","upgrades");return(0,d.jsxs)("div",{className:Mt()("gtmkit-feature-upsell gtmkit-relative gtmkit-max-w-screen-lg",Te.variant[o],a),children:[(0,d.jsx)("div",{className:Mt()("gtmkit-opacity-60",{"gtmkit-space-y-8":"section"===o},{"gtmkit-px-4":"single"===o}),children:t}),(0,d.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-ring-1 gtmkit-ring-black gtmkit-ring-opacity-5 gtmkit-shadow-lg gtmkit-rounded-md"}),(0,d.jsx)("div",{className:Mt()("gtmkit-absolute gtmkit-inset-0 gtmkit-flex gtmkit-items-center",{"gtmkit-justify-center":"section"===o},{"gtmkit-justify-end":"single"===o}),children:(0,d.jsx)(s.Button,{as:"a",className:Mt()("gtmkit-shadow-lg gtmkit-rounded is-primary",{"gtmkit-text-lg gtmkit-py-6 gtmkit-px-8":"section"===o},{"gtmkit-text-sm gtmkit-py-0.5 gtmkit-px-4 gtmkit-mr-8":"single"===o}),variant:"upsell",onClick:()=>{window.location.href=m},target:"_blank",rel:"noopener",...c,children:l})})]})},De=()=>{const{useSettings:t,useUpdateStateSettings:e,useSiteData:i,useSetNotificationStatus:s,isPremium:o}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Misc","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Automatic Updates","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-my-4 gtmkit-text-color-grey",children:(0,n.__)("New releases of GTM Kit may contain important updates to comply with changes in Google Tag Manager or analytics in general. We recommend enabling automatic plugin updates for GTM Kit to ensure it is always up to date.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-my-4 gtmkit-text-color-grey",children:(0,n.__)("You can, of course, manually update GTM Kit whenever it suits you, but we highly recommend that you regularly update your plugins and themes to the latest versions to keep your site secure.","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Enable Automatic Updates","gtm-kit"),label:(0,n.__)("Automatically update the GTM Kit plugin when new releases are available.","gtm-kit"),optionGroup:"misc",optionName:"auto_update",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-auto-update"})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Logging and debugging","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("div",{className:"gtmkit-py-2",children:(0,d.jsx)(Ce,{shouldUpsell:!o,variant:"single",children:(0,d.jsx)(fe,{title:(0,n.__)("Event Inspector","gtm-kit"),label:(0,n.__)("The event inspector is placed in the footer of the frontand and allows you to see all the fired GTM events.","gtm-kit"),optionName:"event_inspector",disabled:!o,useSettings:t,useUpdateStateSettings:e,premium:o,narrow:!0})})}),(0,d.jsx)(fe,{title:(0,n.__)("Console log","gtm-kit"),label:(0,n.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-log-active"}),(0,d.jsx)(fe,{title:(0,n.__)("Debug log","gtm-kit"),label:(0,n.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-log-active"})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ee,{}),(0,d.jsx)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey",children:(0,n.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Share anonymous data","gtm-kit"),label:(0,n.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active",useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center",children:(0,d.jsxs)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2",children:["(",(0,n.__)("Version:","gtm-kit")," ",i.gtmkit_version,")"]})}),(0,d.jsx)(be.Content,{children:(0,d.jsxs)("p",{children:[(0,n.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,d.jsx)("br",{}),(0,d.jsx)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer",children:(0,n.__)("The changelog","gtm-kit")}),(0,d.jsx)("br",{}),(0,d.jsx)("a",{className:"gtmkit-text-color-primary  hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,n.__)("The GitHub repository","gtm-kit")})]})})]})]})},Ue=()=>(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ge,{title:(0,n.__)("Integrations","gtm-kit"),data:pe("integrations")})}),Ae=({pluginName:t})=>(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.sprintf)(
     1(()=>{var t={942:(t,e)=>{var i;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var t="",e=0;e<arguments.length;e++){var i=arguments[e];i&&(t=o(t,s(i)))}return t}function s(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return a.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var i in t)n.call(t,i)&&t[i]&&(e=o(e,i));return e}function o(t,e){return e?t?t+" "+e:t+e:t}t.exports?(a.default=a,t.exports=a):void 0===(i=function(){return a}.apply(e,[]))||(t.exports=i)}()}},e={};function i(n){var a=e[n];if(void 0!==a)return a.exports;var s=e[n]={exports:{}};return t[n](s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";const t=window.ReactDOM;var e=i.n(t);const n=window.wp.i18n,a=window.wp.element,s=window.wp.components,o=window.lodash,r=window.wp.apiFetch;var l=i.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const c=async(t,e,i=null,n=!1)=>{let a={};try{a=await l()({path:t,method:e,...i&&{data:i}})}catch(i){return{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?a:!0===a.success?a.data:{}},m=(t,e)=>{const i={...t};switch(e.type){case"FETCH_SETTINGS":i.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},i.stateSettings=e.payload.stateSettings,i.siteData=e.payload.siteData,i.notifications=e.payload.notifications,i.installData=e.payload.installData,i.isPending=!1,i.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(i.notice=(0,n.__)("An error occurred.","gtm-kit"),i.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":i.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":i.fetchedSettings=e.payload.fetchedSettings,i.stateSettings=e.payload.stateSettings,i.isPending=!1,i.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,i.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,n.__)("An error occurred.","gtm-kit"):(0,n.__)("Saved Successfully.","gtm-kit"),i.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":i.fetchedSettings=e.payload.fetchedSettings||i.fetchedSettings,i.stateSettings=e.payload.stateSettings||i.stateSettings,i.isPending=e.payload.isPending||i.isPending,i.notice=e.payload.notice||i.notice,i.hasError=e.payload.hasError||i.hasError,i.canSave=e.payload.canSave||i.canSave,i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData,i.supportTicket=e.payload.supportTicket||i.supportTicket,i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey,i.licenseKey=e.payload.licenseKey||i.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData;break;case"SEND_SUPPORT_DATA":i.isSendingSystemData=!1,i.isSystemDataSent=e.payload.isSystemDataSent||i.isSystemDataSent,i.systemDataMessage=e.payload.systemDataMessage||i.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":i.isSendingLicenseKey=!1,i.isLicenseKeySent=e.payload.isLicenseKeySent||i.isLicenseKeySent,i.licenseKeyMessage=e.payload.licenseKeyMessage||i.licenseKeyMessage;break;case"SEND_NOTIFICATION_STATUS_BEFORE":i.isUpdatingNotifications=e.payload.isUpdatingNotifications||i.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":i.isUpdatingNotifications=!1,i.notifications=e.payload.notifications||i.Notifications}return i},d=window.ReactJSXRuntime,g=(0,a.createContext)(),u=t=>{const[e,i]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),n=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},n=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};i({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:n,installData:a}})},s=async t=>{i({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{n()}),[]);const r={useDispatch:t=>{i(t)},useUpdateSettings:async()=>{i({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(n=e.stateSettings,c("gtmkit/v1/set-options","POST",n));var n;i({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:n,useUpdateState:s,useUpdateStateSettings:async(t,i,n)=>{const a=JSON.parse(JSON.stringify(e.stateSettings));let r;a[t][i]=n,r=!(0,o.isEqual)(a,e.fetchedSettings),s({stateSettings:a,canSave:r})},useImportSettings:async(t,i)=>{const n=JSON.parse(JSON.stringify(e.stateSettings));let a;const r={};r.general={...n.general,...i.general},"integrations"in i&&(r.integrations={...n.integrations,...i.integrations}),a=!(0,o.isEqual)(r,e.fetchedSettings),s({stateSettings:r,canSave:a})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{i({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(n=e.supportTicket,c("gtmkit/v1/send-support-data","POST",n,!0));var n;i({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{s({licenseKey:t})},useSendLicenseKey:async()=>{i({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(n=e.licenseKey,c("gtmkit/v1/send-license-key","POST",n,!0));var n;i({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{i({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:"remove"!==e}});const n={"notification-id":t,action:e},a=await(t=>c("gtmkit/v1/set-notification-status","POST",t,!0))(n),s=a.data.metrics.total,o=document.querySelectorAll("li.toplevel_page_gtmkit_general span.menu-counter");o&&o.forEach((t=>{const e=t.querySelector("span.count");e&&(e.textContent=s),t.className=t.className.replace(/count-\d+/,`count-${s}`)})),i({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,notifications:a.data}})},useSettings:e.stateSettings,useIsPending:e.isPending,useNotice:e.notice,useHasError:e.hasError,useCanSave:e.canSave,useSiteData:e.siteData,useInstallData:e.installData,useIsSending:e.isSendingSystemData,useSupportTicket:e.supportTicket,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage,useIsSendingLicenseKey:e.isSendingLicenseKey,useLicenseKey:e.licenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage,useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,d.jsx)(g.Provider,{value:r,children:t.children})},p=window.React;var h,k=i.n(p);function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},f.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(h||(h={}));const _="popstate";function x(t,e){if(!1===t||null==t)throw new Error(e)}function S(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function b(t,e){return{usr:t.state,key:t.key,idx:e}}function y(t,e,i,n){return void 0===i&&(i=null),f({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?j(e):e,{state:i,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function v(t){let{pathname:e="/",search:i="",hash:n=""}=t;return i&&"?"!==i&&(e+="?"===i.charAt(0)?i:"?"+i),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function j(t){let e={};if(t){let i=t.indexOf("#");i>=0&&(e.hash=t.substr(i),t=t.substr(0,i));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var N;function w(t,e,i){return void 0===i&&(i="/"),function(t,e,i,n){let a=F(("string"==typeof e?j(e):e).pathname||"/",i);if(null==a)return null;let s=E(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,i)=>t===e[i]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(s);let o=null;for(let t=0;null==o&&t<s.length;++t){let e=G(a);o=M(s[t],e,n)}return o}(t,e,i,!1)}function E(t,e,i,n){void 0===e&&(e=[]),void 0===i&&(i=[]),void 0===n&&(n="");let a=(t,a,s)=>{let o={relativePath:void 0===s?t.path||"":s,caseSensitive:!0===t.caseSensitive,childrenIndex:a,route:t};o.relativePath.startsWith("/")&&(x(o.relativePath.startsWith(n),'Absolute route path "'+o.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(n.length));let r=B([n,o.relativePath]),l=i.concat(o);t.children&&t.children.length>0&&(x(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+r+'".'),E(t.children,e,l,r)),(null!=t.path||t.index)&&e.push({path:r,score:R(r,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var i;if(""!==t.path&&null!=(i=t.path)&&i.includes("?"))for(let i of T(t.path))a(t,e,i);else a(t,e)})),e}function T(t){let e=t.split("/");if(0===e.length)return[];let[i,...n]=e,a=i.endsWith("?"),s=i.replace(/\?$/,"");if(0===n.length)return a?[s,""]:[s];let o=T(n.join("/")),r=[];return r.push(...o.map((t=>""===t?s:[s,t].join("/")))),a&&r.push(...o),r.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(N||(N={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const C=/^:[\w-]+$/,D=3,U=2,A=1,I=10,O=-2,L=t=>"*"===t;function R(t,e){let i=t.split("/"),n=i.length;return i.some(L)&&(n+=O),e&&(n+=U),i.filter((t=>!L(t))).reduce(((t,e)=>t+(C.test(e)?D:""===e?A:I)),n)}function M(t,e,i){void 0===i&&(i=!1);let{routesMeta:n}=t,a={},s="/",o=[];for(let t=0;t<n.length;++t){let r=n[t],l=t===n.length-1,c="/"===s?e:e.slice(s.length)||"/",m=P({path:r.relativePath,caseSensitive:r.caseSensitive,end:l},c),d=r.route;if(!m&&l&&i&&!n[n.length-1].route.index&&(m=P({path:r.relativePath,caseSensitive:r.caseSensitive,end:!1},c)),!m)return null;Object.assign(a,m.params),o.push({params:a,pathname:B([s,m.pathname]),pathnameBase:W(B([s,m.pathnameBase])),route:d}),"/"!==m.pathnameBase&&(s=B([s,m.pathnameBase]))}return o}function P(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[i,n]=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0),S("*"===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=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,i)=>(n.push({paramName:e,isOptional:null!=i}),i?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),a+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?a+="\\/*$":""!==t&&"/"!==t&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),a=e.match(i);if(!a)return null;let s=a[0],o=s.replace(/(.)\/+$/,"$1"),r=a.slice(1);return{params:n.reduce(((t,e,i)=>{let{paramName:n,isOptional:a}=e;if("*"===n){let t=r[i]||"";o=s.slice(0,s.length-t.length).replace(/(.)\/+$/,"$1")}const l=r[i];return t[n]=a&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:s,pathnameBase:o,pattern:t}}function G(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return S(!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 F(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let i=e.endsWith("/")?e.length-1:e.length,n=t.charAt(i);return n&&"/"!==n?null:t.slice(i)||"/"}function H(t,e,i,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+i+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function K(t,e){let i=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?i.map(((t,e)=>e===i.length-1?t.pathname:t.pathnameBase)):i.map((t=>t.pathnameBase))}function z(t,e,i,n){let a;void 0===n&&(n=!1),"string"==typeof t?a=j(t):(a=f({},t),x(!a.pathname||!a.pathname.includes("?"),H("?","pathname","search",a)),x(!a.pathname||!a.pathname.includes("#"),H("#","pathname","hash",a)),x(!a.search||!a.search.includes("#"),H("#","search","hash",a)));let s,o=""===t||""===a.pathname,r=o?"/":a.pathname;if(null==r)s=i;else{let t=e.length-1;if(!n&&r.startsWith("..")){let e=r.split("/");for(;".."===e[0];)e.shift(),t-=1;a.pathname=e.join("/")}s=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:i,search:n="",hash:a=""}="string"==typeof t?j(t):t,s=i?i.startsWith("/")?i:function(t,e){let i=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?i.length>1&&i.pop():"."!==t&&i.push(t)})),i.length>1?i.join("/"):"/"}(i,e):e;return{pathname:s,search:$(n),hash:Y(a)}}(a,s),c=r&&"/"!==r&&r.endsWith("/"),m=(o||"."===r)&&i.endsWith("/");return l.pathname.endsWith("/")||!c&&!m||(l.pathname+="/"),l}const B=t=>t.join("/").replace(/\/\/+/g,"/"),W=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),$=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const J=["post","put","patch","delete"],q=(new Set(J),["get",...J]);function V(){return V=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},V.apply(this,arguments)}new Set(q),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const X=p.createContext(null),Z=p.createContext(null),Q=p.createContext(null),tt=p.createContext(null),et=p.createContext({outlet:null,matches:[],isDataRoute:!1}),it=p.createContext(null);function nt(){return null!=p.useContext(tt)}function at(){return nt()||x(!1),p.useContext(tt).location}function st(t){p.useContext(Q).static||p.useLayoutEffect(t)}function ot(){let{isDataRoute:t}=p.useContext(et);return t?function(){let{router:t}=function(){let t=p.useContext(X);return t||x(!1),t}(ut.UseNavigateStable),e=ht(pt.UseNavigateStable),i=p.useRef(!1);return st((()=>{i.current=!0})),p.useCallback((function(n,a){void 0===a&&(a={}),i.current&&("number"==typeof n?t.navigate(n):t.navigate(n,V({fromRouteId:e},a)))}),[t,e])}():function(){nt()||x(!1);let t=p.useContext(X),{basename:e,future:i,navigator:n}=p.useContext(Q),{matches:a}=p.useContext(et),{pathname:s}=at(),o=JSON.stringify(K(a,i.v7_relativeSplatPath)),r=p.useRef(!1);return st((()=>{r.current=!0})),p.useCallback((function(i,a){if(void 0===a&&(a={}),!r.current)return;if("number"==typeof i)return void n.go(i);let l=z(i,JSON.parse(o),s,"path"===a.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:B([e,l.pathname])),(a.replace?n.replace:n.push)(l,a.state,a)}),[e,n,o,s,t])}()}function rt(t,e){let{relative:i}=void 0===e?{}:e,{future:n}=p.useContext(Q),{matches:a}=p.useContext(et),{pathname:s}=at(),o=JSON.stringify(K(a,n.v7_relativeSplatPath));return p.useMemo((()=>z(t,JSON.parse(o),s,"path"===i)),[t,o,s,i])}function lt(t,e,i,n){nt()||x(!1);let{navigator:a}=p.useContext(Q),{matches:s}=p.useContext(et),o=s[s.length-1],r=o?o.params:{},l=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,m=at();if(e){var d;let t="string"==typeof e?j(e):e;"/"===l||(null==(d=t.pathname)?void 0:d.startsWith(l))||x(!1),c=t}else c=m;let g=c.pathname||"/",u=g;if("/"!==l){let t=l.replace(/^\//,"").split("/");u="/"+g.replace(/^\//,"").split("/").slice(t.length).join("/")}let k=w(t,{pathname:u}),f=function(t,e,i,n){var a;if(void 0===e&&(e=[]),void 0===i&&(i=null),void 0===n&&(n=null),null==t){var s;if(!i)return null;if(i.errors)t=i.matches;else{if(!(null!=(s=n)&&s.v7_partialHydration&&0===e.length&&!i.initialized&&i.matches.length>0))return null;t=i.matches}}let o=t,r=null==(a=i)?void 0:a.errors;if(null!=r){let t=o.findIndex((t=>t.route.id&&void 0!==(null==r?void 0:r[t.route.id])));t>=0||x(!1),o=o.slice(0,Math.min(o.length,t+1))}let l=!1,c=-1;if(i&&n&&n.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}=i,a=e.route.loader&&void 0===t[e.route.id]&&(!n||void 0===n[e.route.id]);if(e.route.lazy||a){l=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((t,n,a)=>{let s,m=!1,d=null,g=null;var u;i&&(s=r&&n.route.id?r[n.route.id]:void 0,d=n.route.errorElement||mt,l&&(c<0&&0===a?(kt[u="route-fallback"]||(kt[u]=!0),m=!0,g=null):c===a&&(m=!0,g=n.route.hydrateFallbackElement||null)));let h=e.concat(o.slice(0,a+1)),k=()=>{let e;return e=s?d:m?g:n.route.Component?p.createElement(n.route.Component,null):n.route.element?n.route.element:t,p.createElement(gt,{match:n,routeContext:{outlet:t,matches:h,isDataRoute:null!=i},children:e})};return i&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?p.createElement(dt,{location:i.location,revalidation:i.revalidation,component:d,error:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},r,t.params),pathname:B([l,a.encodeLocation?a.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:B([l,a.encodeLocation?a.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),s,i,n);return e&&f?p.createElement(tt.Provider,{value:{location:V({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:h.Pop}},f):f}function ct(){let t=function(){var t;let e=p.useContext(it),i=function(){let t=p.useContext(Z);return t||x(!1),t}(pt.UseRouteError),n=ht(pt.UseRouteError);return void 0!==e?e:null==(t=i.errors)?void 0:t[n]}(),e=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),i=t instanceof Error?t.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},e),i?p.createElement("pre",{style:n},i):null,null)}const mt=p.createElement(ct,null);class dt extends p.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?p.createElement(et.Provider,{value:this.props.routeContext},p.createElement(it.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function gt(t){let{routeContext:e,match:i,children:n}=t,a=p.useContext(X);return a&&a.static&&a.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=i.route.id),p.createElement(et.Provider,{value:e},n)}var ut=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ut||{}),pt=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}(pt||{});function ht(t){let e=function(){let t=p.useContext(et);return t||x(!1),t}(),i=e.matches[e.matches.length-1];return i.route.id||x(!1),i.route.id}const kt={};function ft(t){let{to:e,replace:i,state:n,relative:a}=t;nt()||x(!1);let{future:s,static:o}=p.useContext(Q),{matches:r}=p.useContext(et),{pathname:l}=at(),c=ot(),m=z(e,K(r,s.v7_relativeSplatPath),l,"path"===a),d=JSON.stringify(m);return p.useEffect((()=>c(JSON.parse(d),{replace:i,state:n,relative:a})),[c,d,a,i,n]),null}function _t(t){x(!1)}function xt(t){let{basename:e="/",children:i=null,location:n,navigationType:a=h.Pop,navigator:s,static:o=!1,future:r}=t;nt()&&x(!1);let l=e.replace(/^\/*/,"/"),c=p.useMemo((()=>({basename:l,navigator:s,static:o,future:V({v7_relativeSplatPath:!1},r)})),[l,r,s,o]);"string"==typeof n&&(n=j(n));let{pathname:m="/",search:d="",hash:g="",state:u=null,key:k="default"}=n,f=p.useMemo((()=>{let t=F(m,l);return null==t?null:{location:{pathname:t,search:d,hash:g,state:u,key:k},navigationType:a}}),[l,m,d,g,u,k,a]);return null==f?null:p.createElement(Q.Provider,{value:c},p.createElement(tt.Provider,{children:i,value:f}))}function St(t){let{children:e,location:i}=t;return lt(bt(e),i)}function bt(t,e){void 0===e&&(e=[]);let i=[];return p.Children.forEach(t,((t,n)=>{if(!p.isValidElement(t))return;let a=[...e,n];if(t.type===p.Fragment)return void i.push.apply(i,bt(t.props.children,a));t.type!==_t&&x(!1),t.props.index&&t.props.children&&x(!1);let s={id:t.props.id||a.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=bt(t.props.children,a)),i.push(s)})),i}function yt(){return yt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},yt.apply(this,arguments)}function vt(t,e){if(null==t)return{};var i,n,a={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(a[i]=t[i]);return a}p.startTransition,new Promise((()=>{})),p.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const jt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Nt=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"];try{window.__reactRouterVersion="6"}catch(t){}const wt=p.createContext({isTransitioning:!1});new Map;const Et=p.startTransition;function Tt(t){let{basename:e,children:i,future:n,window:a}=t,s=p.useRef();var o;null==s.current&&(s.current=(void 0===(o={window:a,v5Compat:!0})&&(o={}),function(t,e,i,n){void 0===n&&(n={});let{window:a=document.defaultView,v5Compat:s=!1}=n,o=a.history,r=h.Pop,l=null,c=m();function m(){return(o.state||{idx:null}).idx}function d(){r=h.Pop;let t=m(),e=null==t?null:t-c;c=t,l&&l({action:r,location:u.location,delta:e})}function g(t){let e="null"!==a.location.origin?a.location.origin:a.location.href,i="string"==typeof t?t:v(t);return i=i.replace(/ $/,"%20"),x(e,"No window.location.(origin|href) available to create URL for href: "+i),new URL(i,e)}null==c&&(c=0,o.replaceState(f({},o.state,{idx:c}),""));let u={get action(){return r},get location(){return t(a,o)},listen(t){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(_,d),l=t,()=>{a.removeEventListener(_,d),l=null}},createHref:t=>e(a,t),createURL:g,encodeLocation(t){let e=g(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){r=h.Push;let n=y(u.location,t,e);i&&i(n,t),c=m()+1;let d=b(n,c),g=u.createHref(n);try{o.pushState(d,"",g)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;a.location.assign(g)}s&&l&&l({action:r,location:u.location,delta:1})},replace:function(t,e){r=h.Replace;let n=y(u.location,t,e);i&&i(n,t),c=m();let a=b(n,c),d=u.createHref(n);o.replaceState(a,"",d),s&&l&&l({action:r,location:u.location,delta:0})},go:t=>o.go(t)};return u}((function(t,e){let{pathname:i="/",search:n="",hash:a=""}=j(t.location.hash.substr(1));return i.startsWith("/")||i.startsWith(".")||(i="/"+i),y("",{pathname:i,search:n,hash:a},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let i=t.document.querySelector("base"),n="";if(i&&i.getAttribute("href")){let e=t.location.href,i=e.indexOf("#");n=-1===i?e:e.slice(0,i)}return n+"#"+("string"==typeof e?e:v(e))}),(function(t,e){S("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),o)));let r=s.current,[l,c]=p.useState({action:r.action,location:r.location}),{v7_startTransition:m}=n||{},d=p.useCallback((t=>{m&&Et?Et((()=>c(t))):c(t)}),[c,m]);return p.useLayoutEffect((()=>r.listen(d)),[r,d]),p.useEffect((()=>{return null==(t=n)||t.v7_startTransition,void 0===(null==t?void 0:t.v7_relativeSplatPath)&&(!e||e.v7_relativeSplatPath),void(e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation));var t,e}),[n]),p.createElement(xt,{basename:e,children:i,location:l.location,navigationType:l.action,navigator:r,future:n})}t.flushSync,p.useId;const Ct="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Dt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ut=p.forwardRef((function(t,e){let i,{onClick:n,relative:a,reloadDocument:s,replace:o,state:r,target:l,to:c,preventScrollReset:m,viewTransition:d}=t,g=vt(t,jt),{basename:u}=p.useContext(Q),h=!1;if("string"==typeof c&&Dt.test(c)&&(i=c,Ct))try{let t=new URL(window.location.href),e=c.startsWith("//")?new URL(t.protocol+c):new URL(c),i=F(e.pathname,u);e.origin===t.origin&&null!=i?c=i+e.search+e.hash:h=!0}catch(t){}let k=function(t,e){let{relative:i}=void 0===e?{}:e;nt()||x(!1);let{basename:n,navigator:a}=p.useContext(Q),{hash:s,pathname:o,search:r}=rt(t,{relative:i}),l=o;return"/"!==n&&(l="/"===o?n:B([n,o])),a.createHref({pathname:l,search:r,hash:s})}(c,{relative:a}),f=function(t,e){let{target:i,replace:n,state:a,preventScrollReset:s,relative:o,viewTransition:r}=void 0===e?{}:e,l=ot(),c=at(),m=rt(t,{relative:o});return p.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,i)){e.preventDefault();let i=void 0!==n?n:v(c)===v(m);l(t,{replace:i,state:a,preventScrollReset:s,relative:o,viewTransition:r})}}),[c,l,m,n,a,i,t,s,o,r])}(c,{replace:o,state:r,target:l,preventScrollReset:m,relative:a,viewTransition:d});return p.createElement("a",yt({},g,{href:i||k,onClick:h||s?n:function(t){n&&n(t),t.defaultPrevented||f(t)},ref:e,target:l}))})),At=p.forwardRef((function(t,e){let{"aria-current":i="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:r,viewTransition:l,children:c}=t,m=vt(t,Nt),d=rt(r,{relative:m.relative}),g=at(),u=p.useContext(Z),{navigator:h,basename:k}=p.useContext(Q),f=null!=u&&function(t,e){void 0===e&&(e={});let i=p.useContext(wt);null==i&&x(!1);let{basename:n}=function(){let t=p.useContext(X);return t||x(!1),t}(It.useViewTransitionState),a=rt(t,{relative:e.relative});if(!i.isTransitioning)return!1;let s=F(i.currentLocation.pathname,n)||i.currentLocation.pathname,o=F(i.nextLocation.pathname,n)||i.nextLocation.pathname;return null!=P(a.pathname,o)||null!=P(a.pathname,s)}(d)&&!0===l,_=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,S=g.pathname,b=u&&u.navigation&&u.navigation.location?u.navigation.location.pathname:null;n||(S=S.toLowerCase(),b=b?b.toLowerCase():null,_=_.toLowerCase()),b&&k&&(b=F(b,k)||b);const y="/"!==_&&_.endsWith("/")?_.length-1:_.length;let v,j=S===_||!s&&S.startsWith(_)&&"/"===S.charAt(y),N=null!=b&&(b===_||!s&&b.startsWith(_)&&"/"===b.charAt(_.length)),w={isActive:j,isPending:N,isTransitioning:f},E=j?i:void 0;v="function"==typeof a?a(w):[a,j?"active":null,N?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof o?o(w):o;return p.createElement(Ut,yt({},m,{"aria-current":E,className:v,ref:e,style:T,to:r,viewTransition:l}),"function"==typeof c?c(w):c)}));var It,Ot;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(It||(It={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Ot||(Ot={}));const Lt=({title:t})=>(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky",children:(0,d.jsx)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between",children:(0,d.jsxs)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl",children:[(0,d.jsxs)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,d.jsx)("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,d.jsxs)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)",children:[(0,d.jsx)("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,d.jsx)("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]})})})});var Rt=i(942),Mt=i.n(Rt);const Pt=({count:t,important:e,nav:i=!1})=>(0,d.jsx)(d.Fragment,{children:t>0&&(0,d.jsx)("span",{className:Mt()("gtmkit-ml-2 gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py-px gtmkit-leading-[1.125rem] gtmkit-uppercase",{"gtmkit-bg-color-error":e},{"gtmkit-bg-color-success":!e},{"gtmkit-px-1.5":i},{"gtmkit-px-2":!i}),children:t})}),Gt=({metrics:t})=>(0,d.jsx)(Pt,{count:t.total,important:t.problem>0,nav:!0}),Ft=Pt,Ht=({to:t,title:e})=>{const{useNotifications:i}=(0,a.useContext)(g);return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(At,{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 ":""),children:[e,"notifications"===t&&(0,d.jsx)(Gt,{metrics:i.metrics})]})})},Kt=({NavList:t})=>(0,d.jsx)("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",children:t.map((function(t){return(0,d.jsx)(Ht,{to:t.to,title:t.title},t.to)}))});function zt(){return zt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)({}).hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},zt.apply(null,arguments)}function Bt(t,e){if(null==t)return{};var i={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;i[n]=t[n]}return i}function Wt(t,e){return Wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wt(t,e)}function $t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Wt(t,e)}function Yt(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Jt=k().createContext(null);var qt=function(t){return t.scrollTop},Vt="unmounted",Xt="exited",Zt="entering",Qt="entered",te="exiting",ee=function(t){function i(e,i){var n;n=t.call(this,e,i)||this;var a,s=i&&!i.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?s?(a=Xt,n.appearStatus=Zt):a=Qt:a=e.unmountOnExit||e.mountOnEnter?Vt:Xt,n.state={status:a},n.nextCallback=null,n}$t(i,t),i.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Vt?{status:Xt}:null};var n=i.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var i=this.state.status;this.props.in?i!==Zt&&i!==Qt&&(e=Zt):i!==Zt&&i!==Qt||(e=te)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,i,n=this.props.timeout;return t=e=i=n,null!=n&&"number"!=typeof n&&(t=n.exit,e=n.enter,i=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:i}},n.updateStatus=function(t,i){if(void 0===t&&(t=!1),null!==i)if(this.cancelNextCallback(),i===Zt){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:e().findDOMNode(this);n&&qt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Xt&&this.setState({status:Vt})},n.performEnter=function(t){var i=this,n=this.props.enter,a=this.context?this.context.isMounting:t,s=this.props.nodeRef?[a]:[e().findDOMNode(this),a],o=s[0],r=s[1],l=this.getTimeouts(),c=a?l.appear:l.enter;t||n?(this.props.onEnter(o,r),this.safeSetState({status:Zt},(function(){i.props.onEntering(o,r),i.onTransitionEnd(c,(function(){i.safeSetState({status:Qt},(function(){i.props.onEntered(o,r)}))}))}))):this.safeSetState({status:Qt},(function(){i.props.onEntered(o)}))},n.performExit=function(){var t=this,i=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:e().findDOMNode(this);i?(this.props.onExit(a),this.safeSetState({status:te},(function(){t.props.onExiting(a),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Xt},(function(){t.props.onExited(a)}))}))}))):this.safeSetState({status:Xt},(function(){t.props.onExited(a)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,i=!0;return this.nextCallback=function(n){i&&(i=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(t,i){this.setNextCallback(i);var n=this.props.nodeRef?this.props.nodeRef.current:e().findDOMNode(this),a=null==t&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=s[0],r=s[1];this.props.addEndListener(o,r)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Vt)return null;var e=this.props,i=e.children,n=(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,Bt(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return k().createElement(Jt.Provider,{value:null},"function"==typeof i?i(t,n):k().cloneElement(k().Children.only(i),n))},i}(k().Component);function ie(){}ee.contextType=Jt,ee.propTypes={},ee.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ie,onEntering:ie,onEntered:ie,onExit:ie,onExiting:ie,onExited:ie},ee.UNMOUNTED=Vt,ee.EXITED=Xt,ee.ENTERING=Zt,ee.ENTERED=Qt,ee.EXITING=te;const ne=ee;var ae=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return n=e,void((i=t).classList?i.classList.remove(n):"string"==typeof i.className?i.className=Yt(i.className,n):i.setAttribute("class",Yt(i.className&&i.className.baseVal||"",n)));var i,n}))},se=function(t){function e(){for(var e,i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return(e=t.call.apply(t,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1];e.removeClasses(a,"exit"),e.addClass(a,s?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,i)},e.onEntering=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1]?"appear":"enter";e.addClass(a,s,"active"),e.props.onEntering&&e.props.onEntering(t,i)},e.onEntered=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1]?"appear":"enter";e.removeClasses(a,s),e.addClass(a,s,"done"),e.props.onEntered&&e.props.onEntered(t,i)},e.onExit=function(t){var i=e.resolveArguments(t)[0];e.removeClasses(i,"appear"),e.removeClasses(i,"enter"),e.addClass(i,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var i=e.resolveArguments(t)[0];e.addClass(i,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var i=e.resolveArguments(t)[0];e.removeClasses(i,"exit"),e.addClass(i,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,i){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,i]},e.getClassNames=function(t){var i=e.props.classNames,n="string"==typeof i,a=n?(n&&i?i+"-":"")+t:i[t];return{baseClassName:a,activeClassName:n?a+"-active":i[t+"Active"],doneClassName:n?a+"-done":i[t+"Done"]}},e}$t(e,t);var i=e.prototype;return i.addClass=function(t,e,i){var n=this.getClassNames(e)[i+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===i&&a&&(n+=" "+a),"active"===i&&t&&qt(t),n&&(this.appliedClasses[e][i]=n,function(t,e){t&&e&&e.split(" ").forEach((function(e){return n=e,void((i=t).classList?i.classList.add(n):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(i,n)||("string"==typeof i.className?i.className=i.className+" "+n:i.setAttribute("class",(i.className&&i.className.baseVal||"")+" "+n)));var i,n}))}(t,n))},i.removeClasses=function(t,e){var i=this.appliedClasses[e],n=i.base,a=i.active,s=i.done;this.appliedClasses[e]={},n&&ae(t,n),a&&ae(t,a),s&&ae(t,s)},i.render=function(){var t=this.props,e=(t.classNames,Bt(t,["classNames"]));return k().createElement(ne,zt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(k().Component);se.defaultProps={classNames:""},se.propTypes={};const oe=se,re=({title:t=(0,n.__)("Save","gtm-kit"),className:e="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:i,useIsPending:o,useCanSave:r}=(0,a.useContext)(g);return(0,d.jsxs)(s.Button,{className:e,onClick:()=>i(),variant:"primary",disabled:o||!r,children:[r?t:(0,n.__)("Saved","gtm-kit"),o?(0,d.jsx)(s.Spinner,{}):""]})},le=()=>{const{useCanSave:t}=(0,a.useContext)(g);return(0,d.jsx)(oe,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0,children:(0,d.jsx)("footer",{className:"gtmkit-fixed gtmkit-bottom-0 gtmkit-w-full gtmkit-z-10 gtmkit-bg-color-grey gtmkit-text-white gtmkit-p-8",children:(0,d.jsx)(re,{})})})},ce=({subject:t})=>{const e=!0===t||"on"===t,i=!0===e?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,d.jsx)("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,children:e?(0,n.__)("Active","gtm-kit"):(0,n.__)("Inactive","gtm-kit")})},me=(0,a.forwardRef)((({children:t,className:e="",...i},n)=>(0,d.jsx)("div",{...i,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 "+e,ref:n,children:t})));me.Header=({as:t="h3",title:e="",children:i,className:n="",...a})=>(0,d.jsxs)("div",{...a,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+n,children:[(0,d.jsx)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading",children:e}),i]}),me.Content=({as:t="div",children:e,className:i="gtmkit-flex-auto",...n})=>(0,d.jsx)(t,{...n,className:i,children:e}),me.Button=({url:t,destination:e,newTab:i=!1,text:n,group:a="",...o})=>{const r=ot();return(0,d.jsx)("div",{...o,className:"gtmkit-mt-4 gtmkit-mb-0.5",children:(0,d.jsx)(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:()=>{e&&t&&!1===i?window.gtmkitSettings.current_page===a?r(e,{replace:!0}):window.location.href=t+"#"+e:t?i?window.open(t):window.location.href=t:r(e,{replace:!0})},children:(0,d.jsx)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold",children:n})})})};const de=me,ge=({title:t,data:e,className:i=""})=>{const{useSettings:s}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6",children:t}),(0,d.jsx)("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] "+i,children:e.map(((t,e)=>!1===t.featured?null:(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:t.title,children:t.pill?(0,d.jsx)(ce,{subject:s[t.group][t.option]}):null}),(0,d.jsx)(de.Content,{children:t.text.map(((t,e)=>(0,d.jsx)("p",{children:t},e)))}),(0,d.jsx)(de.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,n.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group})]},e)))})]})},ue=(t="general",e="")=>{const i=window.gtmkitSettings.adminPageUrl;return e?`${i}${t}#/${e}`:`${i}${t}`},pe=t=>((t,e,i)=>{const n=(t,i)=>({...i,title:t.title,to:t.path,group:t.group||i.group,option:t.option||i.option,text:[t.description],link:{...i.link,url:ue(e,""),destination:"/"+t.path}});return"templates"===e?Object.keys(t).map((e=>n(t[e][0],i))):Object.keys(t).map((e=>n(t[e],i)))})(window.gtmkitSettings[t],t,function(t){switch(t){case"integrations":return{pill:!0,group:"integrations",option:null,link:{internal:!0,text:(0,n.__)("Setup Integration","gtm-kit")}};case"templates":return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,n.__)("Get Template","gtm-kit")}};default:return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,n.__)("Read More","gtm-kit")}}}}(t)),he=()=>{const{useSettings:t,useNotifications:e}=(0,a.useContext)(g),[i,s]=(0,a.useState)(window.gtmkitSettings.tutorials),o=e.metrics;return(0,a.useEffect)((()=>{s((t=>[...t,{title:(0,n.__)("See all tutorials","gtm-kit"),text:[(0,n.__)("See all our tutorials and get the most out of GTM Kit","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=documentation&utm_content=dashboard-tutorials",text:(0,n.__)("Read articles","gtm-kit")},featured:!0}]))}),[]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("General","gtm-kit")}),(0,d.jsxs)("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]",children:[(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:"Google Tag Manager Container",children:(0,d.jsx)(ce,{subject:t.general.gtm_id&&t.general.container_active})}),(0,d.jsx)(de.Content,{children:t.general.gtm_id&&t.general.container_active?(0,d.jsxs)("p",{children:[(0,n.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id]}):(0,d.jsx)("p",{children:(0,n.__)("The container is not active but the datalayer is generated.","gtm-kit")})}),(0,d.jsx)(de.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})]}),(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:(0,n.__)("Notifications","gtm-kit"),className:"!gtmkit-justify-start",children:(0,d.jsx)(Ft,{count:o.total,important:o.problem>0})}),(0,d.jsx)(de.Content,{children:o.total?(0,d.jsx)(d.Fragment,{children:o.problem?(0,d.jsx)("p",{children:(0,n.__)("There are some problems that require your attention.","gtm-kit")}):(0,d.jsx)("p",{children:(0,n.__)("There are some notifications that may require your attention.","gtm-kit")})}):(0,d.jsx)("p",{children:(0,n.__)("No notifications at the moment.","gtm-kit")})}),(0,d.jsx)(de.Button,{destination:"/notifications",text:(0,n.__)("See all notifications","gtm-kit")})]}),(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit"),children:(0,d.jsx)(ce,{subject:t.general.analytics_active})}),(0,d.jsx)(de.Content,{children:(0,d.jsx)("p",{children:(0,n.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit")})}),(0,d.jsx)(de.Button,{destination:"/misc",text:(0,n.__)("Share anonymous data","gtm-kit")})]})]}),(0,d.jsx)(ge,{title:(0,n.__)("Tutorials","gtm-kit"),data:i}),(0,d.jsx)(ge,{title:(0,n.__)("Integrations","gtm-kit"),data:pe("integrations")})]})},ke=({title:t,placeholder:e,help:i,className:n="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:a="general",optionName:o,isDisabled:r,useSettings:l,useUpdateStateSettings:c,useSetNotificationStatus:m,notificationId:g=""})=>(0,d.jsx)(s.TextControl,{label:t,placeholder:e,help:i,className:n,value:l[a][o],onChange:t=>{c(a,o,t),g&&m(g,"remove")},disabled:r}),fe=({title:t,label:e,optionGroup:i="general",optionName:n,disabled:o=!1,useSettings:r,useUpdateStateSettings:l,narrow:c=!1,premium:m=!1,useSetNotificationStatus:g,notificationId:u=""})=>{const p=(0,a.useId)(),h="gtmkit-settings-field-wrap "+(c?"gtmkit-py-2":"gtmkit-py-4");return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("div",{className:h,children:(0,d.jsx)(s.BaseControl,{label:m?(0,d.jsxs)(d.Fragment,{children:[t,(0,d.jsx)("span",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-normal gtmkit-rounded-full gtmkit-py-0.5 gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"})]}):t,id:p,children:(0,d.jsx)(s.ToggleControl,{label:e,checked:!o&&r[i][n],onChange:()=>{l(i,n,!(r&&r[i][n])),u&&g(u,"remove")},disabled:o})})})})},_e=({title:t,options:e,help:i,className:n="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:a="general",optionName:o,disabled:r,useSettings:l,useUpdateStateSettings:c})=>(0,d.jsx)(s.RadioControl,{label:t,options:e,help:i,className:n,selected:parseInt(l[a][o]),onChange:t=>c(a,o,t),disabled:r}),xe=({title:t,help:e,items:i=[],optionGroup:n="general",optionName:o,disabled:r=!1,useSettings:l,useUpdateStateSettings:c})=>{const m=(0,a.useId)(),g=Array.isArray(l[n][o])?l[n][o]:[],[u,p]=(0,a.useState)(g);return(0,a.useEffect)((()=>{const t=Array.isArray(l[n][o])?l[n][o]:[];p(t)}),[l]),(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4",children:(0,d.jsx)(s.BaseControl,{label:t,help:e,id:m,children:i.map((t=>(0,d.jsx)(s.CheckboxControl,{label:t.name,disabled:r,checked:u.includes(t.role),onChange:e=>((t,e)=>{p((i=>{let a;return a=t?[...i,e]:i.filter((t=>t!==e)),c(n,o,a),a}))})(e,t.role)},t.role)))})})})},Se=(0,a.forwardRef)((({children:t,className:e="",disabled:i=!1,...n},a)=>(0,d.jsx)("div",{...n,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-max-w-screen-lg gtmkit-border-color-grey gtmkit-rounded "+e+(i?"gtmkit-opacity-60":""),ref:a,children:t})));Se.Header=({as:t="h3",title:e="",children:i,className:n="",...a})=>(0,d.jsxs)(t,{...a,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 "+n,children:[e,i]}),Se.Content=({as:t="div",children:e,className:i="",...n})=>(0,d.jsx)(t,{...n,className:"gtmkit-px-8 gtmkit-py-6 "+i,children:e});const be=Se,ye=()=>{const{useSettings:t,useUpdateStateSettings:e,useUserRoles:i,useSetNotificationStatus:s}=(0,a.useContext)(g),o=!(t.general.sgtm_domain&&t.general.sgtm_domain.trim()&&t.general.sgtm_container_identifier&&t.general.sgtm_container_identifier.trim()),r=at();return(0,p.useEffect)((()=>{const t=new URLSearchParams(r.search).get("focus");if(t){const e=document.getElementById(t);e&&e.scrollIntoView()}}),[r]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Google Tag Manager container","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("General Container Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")}),(0,d.jsx)(ke,{title:(0,n.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,n.__)("Enter GTM Container ID","gtm-kit"),useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-container-injection"}),(0,d.jsx)(fe,{title:(0,n.__)("Inject Container Code","gtm-kit"),label:(0,n.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-container-injection"}),(0,d.jsx)(fe,{title:(0,n.__)("Just the container","gtm-kit"),label:(0,n.__)("Setting this to On will reduce the functionality to just the GTM container code. No additional data will be pushed to the datalayer regardless of any other settings.","gtm-kit"),optionName:"just_the_container",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,n.__)("The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do so.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsx)("div",{id:"sgtm"}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(ke,{title:(0,n.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,n.__)("Enter domain","gtm-kit"),help:(0,n.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,n.__)("Enter loader name","gtm-kit"),help:(0,n.__)("Only use if you are using a custom loader.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,n.__)("Prolong cookie lifetime in Safari and other browsers with ITP. This only works if you use Stape sGTM hosting and have set up the Cookie Keeper power up.","gtm-kit"),optionName:"sgtm_cookie_keeper",disabled:o,useSettings:t,useUpdateStateSettings:e})]}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Google Tag Manager Server-side Tagging","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,d.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,n.__)("Learn more","gtm-kit")})]}),(0,d.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Hosting server-side GTM containers","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("Stape.io is a solution for hosting server-side Google Tag Manager containers, offering a simplified approach that demands less technical expertise than solutions like Google Cloud Platform.","gtm-kit")," ",(0,n.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")]}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,d.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,n.__)("Learn more about Stape.io","gtm-kit")})})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Page Speed Optimization","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsx)(be.Content,{children:(0,d.jsx)(fe,{title:(0,n.__)("load_delayed_js event","gtm-kit"),label:(0,n.__)("Setting this to On will push the event 'load_delayed_js' on page load.","gtm-kit"),optionName:"load_js_event",useSettings:t,useUpdateStateSettings:e})}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Delay JavaScript execution","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("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,d.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,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Tag Manager Environment","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(ke,{title:(0,n.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,n.__)("Enter gtm_auth code","gtm-kit"),help:(0,n.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,n.__)("Enter gtm_preview code","gtm-kit"),help:(0,n.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Environments","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,n.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,n.__)("If left empty the default environment will be used.","gtm-kit")]}),(0,d.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Override settings in wp-config.php","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("You can override the values by using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments.","gtm-kit")," ",(0,d.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,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Exclude User Roles","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsx)(be.Content,{children:(0,d.jsx)(xe,{title:(0,n.__)("Exclude user roles","gtm-kit"),help:(0,n.__)("Select the roles that you want to exclude from tracking.","gtm-kit"),items:i,optionName:"exclude_user_roles",useSettings:t,useUpdateStateSettings:e})}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold gtmkit-text-red-600",children:(0,n.__)("Warning!","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("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,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Please ensure thorough and proper testing of this.","gtm-kit")})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Container Code Implementation","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(_e,{title:(0,n.__)("Container code implementation:","gtm-kit"),options:[{label:(0,n.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,n.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,n.__)("Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle.","gtm-kit"),optionName:"script_implementation",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,n.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,n.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,n.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,n.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,n.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,n.__)('The preferred method to implement the <noscript> container code is just after the opening <body> tag. This requires that your theme uses the "body_open" hook. If your theme does not support this the script can be injected in the footer or you can use the function below.',"gtm-kit"),optionName:"noscript_implementation",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,d.jsx)("code",{children:"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"})})]})]})]})},ve=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Post Data","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Post Data Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Post type","gtm-kit"),id:"post-type",label:(0,n.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Page type","gtm-kit"),id:"page-type",label:(0,n.__)('Include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. "campaign".',"gtm-kit"),optionName:"datalayer_page_type",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Categories","gtm-kit"),id:"categories",label:(0,n.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Tags","gtm-kit"),id:"tags",label:(0,n.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post title","gtm-kit"),id:"post-title",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post ID","gtm-kit"),id:"post-id",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post data","gtm-kit"),id:"post-date",label:(0,n.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,n.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,n.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id",useSettings:t,useUpdateStateSettings:e})]})]})]})},je=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("User Data","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,d.jsxs)(be.Content,{className:"gtmkit-space-y-2",children:[(0,d.jsx)("p",{children:(0,n.__)("Including user data is not compatible with full page caching.","gtm-kit")}),(0,d.jsx)("p",{children:(0,n.__)("Full page caching will cache user data making it the same for all users. There are ways around this, but it depends on the chosen cache solution and is only for advanced users.","gtm-kit")})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("User Data Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,n.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("User ID","gtm-kit"),id:"user-id",label:(0,n.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("User role","gtm-kit"),id:"user-role",label:(0,n.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role",useSettings:t,useUpdateStateSettings:e})]})]})]})},Ne=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g),i=!t.general.gcm_default_settings;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Google Consent Mode","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Consent Mode Activation","gtm-kit"),children:(0,d.jsx)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2",children:(0,n.__)("Warning!","gtm-kit")})}),(0,d.jsxs)(be.Content,{className:"gtmkit-space-y-2",children:[(0,d.jsx)("p",{children:(0,n.__)("Most Consent Management Platforms will handle the Google Consent Mode settings for you and applying the default settings in both GTM Kit and you CMP will lead to unexpected behaviour or errors.","gtm-kit")}),(0,d.jsx)("p",{children:(0,n.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")}),(0,d.jsx)("p",{className:"!gtmkit-mt-4",children:(0,n.__)("GTM Kit will only set the default Consent Mode settings and you must update the settings yourself when the user has given consent.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6",children:(0,d.jsx)("a",{href:"https://developers.google.com/tag-platform/security/guides/consent#implementation_example",target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline gtmkit-font-semibold",children:(0,n.__)("See an example of how consent is updated","gtm-kit")})}),(0,d.jsx)(fe,{title:(0,n.__)("Activate GCM settings","gtm-kit"),label:(0,n.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings",useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{disabled:i,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Ad Personalization","gtm-kit"),label:(0,n.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Ad Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Ad User Data","gtm-kit"),label:(0,n.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Analytics Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Functionality Storage","gtm-kit"),label:(0,n.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Personalization Storage","gtm-kit"),label:(0,n.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Security Storage","gtm-kit"),label:(0,n.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)("h4",{className:"gtmkit-font-bold gtmkit-pt-8",children:(0,n.__)("Advanced","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Redact Ads Data","gtm-kit"),label:(0,n.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Pass through URL parameters","gtm-kit"),label:(0,n.__)("Pass through ad click, client ID, and session ID information in URLs","gtm-kit"),optionName:"gcm_url_passthrough",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,n.__)("Enter time in milliseconds","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})]})]})},we=({label:t,value:e,tag:i})=>(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2",children:(0,d.jsx)("strong",{children:t})}),(0,d.jsx)("td",{className:"gtmkit-px-4 gtmkit-py-2",children:"code"===i?(0,d.jsx)("code",{className:"gtmkit-text-sm",children:e}):(0,d.jsx)("em",{children:e})})]}),Ee=()=>{const{useSiteData:t}=(0,a.useContext)(g),e=Object.values(t.shared_data);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey",children:(0,n.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey",children:(0,n.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")}),(0,d.jsx)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6",children:(0,d.jsx)("tbody",{className:"gtmkit-py-6",children:e.map((function(t,e){return(0,d.jsx)(we,{label:t.label,value:t.value,tag:t.tag},e)}))})})]})},Te={variant:{section:"gtmkit-feature-upsell--section",single:"gtmkit-feature-upsell--single"}},Ce=({children:t,shouldUpsell:e=!0,single:i=!1,className:a="",variant:o="section",cardLink:r="",cardText:l=(0,n.__)("Unlock with premium","gtm-kit"),...c})=>{if(!e)return t;const m=r||ue("upgrades","upgrades");return(0,d.jsxs)("div",{className:Mt()("gtmkit-feature-upsell gtmkit-relative gtmkit-max-w-screen-lg",Te.variant[o],a),children:[(0,d.jsx)("div",{className:Mt()("gtmkit-opacity-60",{"gtmkit-space-y-8":"section"===o},{"gtmkit-px-4":"single"===o}),children:t}),(0,d.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-ring-1 gtmkit-ring-black gtmkit-ring-opacity-5 gtmkit-shadow-lg gtmkit-rounded-md"}),(0,d.jsx)("div",{className:Mt()("gtmkit-absolute gtmkit-inset-0 gtmkit-flex gtmkit-items-center",{"gtmkit-justify-center":"section"===o},{"gtmkit-justify-end":"single"===o}),children:(0,d.jsx)(s.Button,{as:"a",className:Mt()("gtmkit-shadow-lg gtmkit-rounded is-primary",{"gtmkit-text-lg gtmkit-py-6 gtmkit-px-8":"section"===o},{"gtmkit-text-sm gtmkit-py-0.5 gtmkit-px-4 gtmkit-mr-8":"single"===o}),variant:"upsell",onClick:()=>{window.location.href=m},target:"_blank",rel:"noopener",...c,children:l})})]})},De=()=>{const{useSettings:t,useUpdateStateSettings:e,useSiteData:i,useSetNotificationStatus:s,isPremium:o}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Misc","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Automatic Updates","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-my-4 gtmkit-text-color-grey",children:(0,n.__)("New releases of GTM Kit may contain important updates to comply with changes in Google Tag Manager or analytics in general. We recommend enabling automatic plugin updates for GTM Kit to ensure it is always up to date.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-my-4 gtmkit-text-color-grey",children:(0,n.__)("You can, of course, manually update GTM Kit whenever it suits you, but we highly recommend that you regularly update your plugins and themes to the latest versions to keep your site secure.","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Enable Automatic Updates","gtm-kit"),label:(0,n.__)("Automatically update the GTM Kit plugin when new releases are available.","gtm-kit"),optionGroup:"misc",optionName:"auto_update",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-auto-update"})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Logging and debugging","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("div",{className:"gtmkit-py-2",children:(0,d.jsx)(Ce,{shouldUpsell:!o,variant:"single",children:(0,d.jsx)(fe,{title:(0,n.__)("Event Inspector","gtm-kit"),label:(0,n.__)("The event inspector is placed in the footer of the frontand and allows you to see all the fired GTM events.","gtm-kit"),optionName:"event_inspector",disabled:!o,useSettings:t,useUpdateStateSettings:e,premium:o,narrow:!0})})}),(0,d.jsx)(fe,{title:(0,n.__)("Console log","gtm-kit"),label:(0,n.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-log-active"}),(0,d.jsx)(fe,{title:(0,n.__)("Debug log","gtm-kit"),label:(0,n.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-log-active"})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ee,{}),(0,d.jsx)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey",children:(0,n.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Share anonymous data","gtm-kit"),label:(0,n.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active",useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center",children:(0,d.jsxs)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2",children:["(",(0,n.__)("Version:","gtm-kit")," ",i.gtmkit_version,")"]})}),(0,d.jsx)(be.Content,{children:(0,d.jsxs)("p",{children:[(0,n.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,d.jsx)("br",{}),(0,d.jsx)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer",children:(0,n.__)("The changelog","gtm-kit")}),(0,d.jsx)("br",{}),(0,d.jsx)("a",{className:"gtmkit-text-color-primary  hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,n.__)("The GitHub repository","gtm-kit")})]})})]})]})},Ue=()=>(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ge,{title:(0,n.__)("Integrations","gtm-kit"),data:pe("integrations")})}),Ae=({pluginName:t})=>(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.sprintf)(
    22// translators: %s is the name of the plugin.
    33// translators: %s is the name of the plugin.
     
    1717// translators: %s is the name of the plugin.
    1818// translators: %s is the name of the plugin.
    19 (0,n.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:e,disabled:i,useSettings:s,useUpdateStateSettings:o})})]})},Le=[{label:(0,n.__)("Retail","gtm-kit"),value:"retail"},{label:(0,n.__)("Education","gtm-kit"),value:"education"},{label:(0,n.__)("Flights","gtm-kit"),value:"flights"},{label:(0,n.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,n.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,n.__)("Local deals","gtm-kit"),value:"local"},{label:(0,n.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,n.__)("Travel","gtm-kit"),value:"travel"},{label:(0,n.__)("Custom","gtm-kit"),value:"custom"}],Re=()=>{const{useSettings:t,useUpdateStateSettings:e,isPremium:i}=(0,a.useContext)(g),s="WooCommerce",o=!window.gtmkitSettings.plugins.woocommerce,r=o||!t.integrations.woocommerce_integration,l=r||!i||!t.general.sgtm_domain,c=l||!t.premium.woocommerce_webhooks;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("WooCommerce","gtm-kit")}),o?(0,d.jsx)(Ae,{pluginName:s}):null,(0,d.jsx)(Oe,{pluginName:s,optionName:"woocommerce_integration",pluginInactive:o}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ie,{title:(0,n.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,n.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:r}),(0,d.jsx)(fe,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_use_sku",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Exclude shipping from revenue","gtm-kit"),label:(0,n.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:r,useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("User Data","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsx)(be.Content,{children:(0,d.jsx)(fe,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_customer_data",disabled:r,useSettings:t,useUpdateStateSettings:e})}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("User-Provided Data","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'.","gtm-kit")," ",(0,d.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,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Webhooks for Server-side Tracking","gtm-kit"),children:i?(0,d.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,d.jsx)(Ce,{shouldUpsell:!i,children:(0,d.jsxs)(be.Content,{children:[l?(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,d.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:ue("general","container?focus=sgtm"),children:(0,n.__)("Go to sGTM settings","gtm-kit")})]}):(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,d.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:ue("templates","server-side-tagging"),children:(0,n.__)("Go to GTM Templates","gtm-kit")})]}),(0,d.jsx)(fe,{title:(0,n.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,n.__)("This option will allow you to send GTM events using webhooks to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:l,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)("h3",{className:"gtmkit-pt-3 gtmkit-mb-2 gtmkit-font-bold",children:(0,n.__)("GTM Events Send by Server-Side Webhooks:","gtm-kit")}),(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"purchase"}),label:(0,n.__)("Send an 'purchase' event from the server side when an order is created.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_purchase_webhook",disabled:c,useSettings:t,useUpdateStateSettings:e,narrow:!0}),t.premium.woocommerce_purchase_webhook||!i?(0,d.jsx)("div",{className:"gtmkit-px-8",children:(0,d.jsx)(_e,{options:[{label:(0,n.__)("Send 'purchase' event when an order is created.'","gtm-kit"),value:0},{label:(0,n.__)("Send 'purchase' event when the order has been paid and order status is 'Processing'.","gtm-kit"),value:1}],optionGroup:"premium",optionName:"woocommerce_purchase_webhook_trigger",disabled:c,useSettings:t,useUpdateStateSettings:e,className:"gtmkit-settings-field-wrap gtmkit-pb-6"})}):null,(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"order_paid"}),label:(0,n.__)("Send an 'order_paid' event from the server side when an order has 'Processing' status.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_order_paid_webhook",disabled:c,useSettings:t,useUpdateStateSettings:e,narrow:!0}),(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"refund"}),label:(0,n.__)("Send an 'refund' event from the server side when an order has been refunded or cancelled.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_refund_webhook",disabled:c,useSettings:t,useUpdateStateSettings:e,narrow:!0})]})})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Event Customization","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(_e,{title:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("code",{children:"view_item_list"})," (with product filter)"]}),options:[{label:(0,n.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,n.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,n.__)("Do you what to push the view_item_list event if the list is updated using a filter or just once per page view?","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_view_item_list_limit",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("code",{children:"view_item"})," '(variable product)'"]}),options:[{label:(0,n.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,n.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,n.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,n.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,d.jsx)("code",{children:"add_shipping_info"}),options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,d.jsx)("code",{children:"add_payment_info"}),options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(Ce,{shouldUpsell:!i,variant:"single",children:(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"purchase"}),label:(0,n.__)("Disable the 'purchase' event in frontend an rely on server-side webhook.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_disable_frontend_purchase_event",disabled:c,useSettings:t,useUpdateStateSettings:e,premium:i})})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ie,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Le,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:r}),(0,d.jsx)(ke,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,n.__)("Enter prefix","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:r,useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Custom CSS Selectors","gtm-kit"),children:i?(0,d.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,d.jsx)(Ce,{shouldUpsell:!i,children:(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")}),(0,d.jsx)(ke,{title:(0,n.__)("Single Product (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_single_product_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("Product List (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Advanced Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_dequeue_script",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Include permalink structure","gtm-kit"),label:(0,n.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_permalink_structure",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Include path of pages","gtm-kit"),label:(0,n.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_pages",disabled:r,useSettings:t,useUpdateStateSettings:e})]})]})]})},Me=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g),i="Contact Form 7",s=!window.gtmkitSettings.plugins.cf7,o=s||!t.integrations.cf7_integration;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Contact Form 7","gtm-kit")}),s?(0,d.jsx)(Ae,{pluginName:i}):null,(0,d.jsx)(Oe,{pluginName:i,optionName:"cf7_integration",pluginInactive:s}),(0,d.jsxs)(be,{disabled:o,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsx)(_e,{title:(0,n.__)("Load JavaScript","gtm-kit"),options:[{label:(0,n.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,n.__)("On all pages","gtm-kit"),value:2}],help:(0,n.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:o,useSettings:t,useUpdateStateSettings:e})})]})]})},Pe=()=>{const t="Easy Digital Downloads",e=!window.gtmkitSettings.plugins.edd,{useSettings:i,useUpdateStateSettings:s}=(0,a.useContext)(g),o=e||!i.integrations.edd_integration;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Easy Digital Downloads","gtm-kit")}),e?(0,d.jsx)(Ae,{pluginName:t}):null,(0,d.jsx)(Oe,{pluginName:t,optionName:"edd_integration",pluginInactive:e}),(0,d.jsxs)(be,{disabled:o,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"edd_use_sku",disabled:o,useSettings:i,useUpdateStateSettings:s}),(0,d.jsx)(fe,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:o,useSettings:i,useUpdateStateSettings:s}),(0,d.jsx)(fe,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"edd_include_customer_data",disabled:o,useSettings:i,useUpdateStateSettings:s})]})]}),(0,d.jsxs)(be,{disabled:o,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ie,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Le,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,d.jsx)(ke,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,n.__)("Enter prefix","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:o,useSettings:i,useUpdateStateSettings:s})]})]}),(0,d.jsxs)(be,{disabled:e,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsx)(fe,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"edd_dequeue_script",disabled:o,useSettings:i,useUpdateStateSettings:s})})]})]})},Ge=()=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Getting Started","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("GTM Kit is sending data to your Google Tag Manger container but you still need to configure Tags, Triggers and Variables in GTM to use the data.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")}),(0,d.jsxs)("p",{children:[(0,n.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,d.jsx)("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",children:(0,n.__)("Read the guide","gtm-kit")})]})]})]}),(0,d.jsx)(ge,{title:(0,n.__)("Templates","gtm-kit"),data:pe("templates")})]}),Fe=({title:t,description:e,link:i,templates:a,upsell:s})=>{const o=s?"components-button gtmkit-gap-2 gtmkit-shadow-lg gtmkit-rounded !gtmkit-text-base gtmkit-py-4 gtmkit-px-6 is-primary":"gtmkit-text-color-primary gtmkit-text-base gtmkit-font-semibold hover:gtmkit-underline";return s&&(i.url=ue("upgrades")),(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:t}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:e}),i&&i.url&&i.link_text?(0,d.jsx)("div",{children:(0,d.jsx)("a",{href:i.url,target:"_blank",className:o,rel:"noreferrer",children:i.link_text})}):null,a&&a.length>0?(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h4",{className:"gtmkit-font-bold",children:(0,n.__)("GTM container import files:","gtm-kit")}),(0,d.jsx)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary",children:a.map((function(t){return(0,d.jsx)("li",{children:(0,d.jsx)("a",{className:"hover:gtmkit-underline",href:t.link,target:"_blank",rel:"noreferrer",children:t.title})})}))})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h4",{className:"gtmkit-font-bold",children:(0,n.__)("Necessary modifications:","gtm-kit")}),(0,d.jsx)("ul",{className:"gtmkit-text-sm",children:a.map((function(t){return(0,d.jsx)("li",{children:t.help_text})}))})]})]}):null]})]})})},He=({sectionData:t})=>{const e=t.collections,{isPremium:i}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:t.title}),Object.keys(e).map((function(t){return(0,d.jsx)(Fe,{title:e[t].title,description:e[t].description,link:e[t].link,templates:e[t].templates,upsell:!i})}))]})},Ke=()=>{const t=ot(),e=window.gtmkitSettings.tutorials;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Help","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Need help?","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("We are here to help if you have any questions.","gtm-kit"),(0,d.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{t("/support",{replace:!0})},children:(0,n.__)("See support options","gtm-kit")})]})})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Tutorials","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsx)("ul",{children:e.map(((t,e)=>(0,d.jsxs)("li",{className:"gtmkit-mb-4",children:[(0,d.jsx)("a",{href:t.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline",children:t.title}),t.text.map(((t,e)=>(0,d.jsx)("div",{className:"gtmkit-text-sm",children:t},e)))]},e)))})})]})]})},ze=()=>{const{useIsSending:t,useUpdateSupportTicket:e,useSupportTicket:i,useSendSystemData:o,useIsSystemDataSent:r,useSystemDataMessage:l,isPremium:c}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Get support","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Support options","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsxs)("ul",{className:"gtmkit-text-color-primary",children:[c&&(0,d.jsx)("li",{children:(0,d.jsx)("a",{href:"https://jump.gtmkit.com/link/4-E35E4",target:"_blank",rel:"noreferrer",children:(0,n.__)("WooCommerce Premium Support","gtm-kit")})}),(0,d.jsx)("li",{children:(0,d.jsx)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer",children:(0,n.__)("WordPress.org Support Forum","gtm-kit")})}),(0,d.jsx)("li",{children:(0,d.jsx)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,n.__)("GITHub repository","gtm-kit")})}),(0,d.jsxs)("li",{children:[(0,d.jsx)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer",children:(0,n.__)("Plugin Homepage","gtm-kit")})," ","(gtmkit.com)"]})]})})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,d.jsx)(be.Content,{children:r?(0,d.jsx)("p",{className:"gtmkit-mb-2",children:l}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-2",children:(0,n.__)("If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:","gtm-kit")}),(0,d.jsx)(s.TextControl,{label:(0,d.jsxs)("span",{className:"gtmkit-text-red-600",children:[l," "]}),placeholder:(0,n.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:i,onChange:t=>e(t)}),(0,d.jsxs)(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:()=>{o()},disabled:!i.toUpperCase().startsWith("FS"),children:[(0,d.jsx)("span",{children:(0,n.__)("Send system data","gtm-kit")}),t?(0,d.jsx)(s.Spinner,{}):""]})]})})]})]})},Be=t=>{const{Fill:e,Slot:i}=(0,s.createSlotFill)(t),n=({children:t})=>(0,d.jsx)(e,{children:t});return n.Slot=({fillProps:t})=>(0,d.jsx)(i,{fillProps:t,children:t=>t.length?t:null}),n},We=Be("GravityForms"),$e=Be("LicenseActivation"),Ye=({integrationID:t,pluginName:e})=>{const{useSettings:i,useUpdateStateSettings:n}=(0,a.useContext)(g),s=!window.gtmkitSettings.plugins[t],o=s||!i.integrations[t+"_integration"];return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:e}),s?(0,d.jsx)(Ae,{pluginName:e}):null,(0,d.jsx)(Oe,{pluginName:e,optionName:t+"_integration",pluginInactive:s}),"gf"===t?(0,d.jsx)(We.Slot,{fillProps:{settingsInactive:o,useSettings:i,useUpdateStateSettings:n}}):null]})},Je=window.wp.plugins,qe=(0,a.forwardRef)((({icon:t,size:e=24,...i},n)=>(0,a.cloneElement)(t,{width:e,height:e,...i,ref:n}))),Ve=window.wp.primitives,Xe=(0,d.jsx)(Ve.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(Ve.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Ze=(0,d.jsx)(Ve.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(Ve.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),{entries:Qe,setPrototypeOf:ti,isFrozen:ei,getPrototypeOf:ii,getOwnPropertyDescriptor:ni}=Object;let{freeze:ai,seal:si,create:oi}=Object,{apply:ri,construct:li}="undefined"!=typeof Reflect&&Reflect;ai||(ai=function(t){return t}),si||(si=function(t){return t}),ri||(ri=function(t,e,i){return t.apply(e,i)}),li||(li=function(t,e){return new t(...e)});const ci=ji(Array.prototype.forEach),mi=ji(Array.prototype.lastIndexOf),di=ji(Array.prototype.pop),gi=ji(Array.prototype.push),ui=ji(Array.prototype.splice),pi=ji(String.prototype.toLowerCase),hi=ji(String.prototype.toString),ki=ji(String.prototype.match),fi=ji(String.prototype.replace),_i=ji(String.prototype.indexOf),xi=ji(String.prototype.trim),Si=ji(Object.prototype.hasOwnProperty),bi=ji(RegExp.prototype.test),yi=(vi=TypeError,function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return li(vi,e)});var vi;function ji(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return ri(t,e,n)}}function Ni(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:pi;ti&&ti(t,null);let n=e.length;for(;n--;){let a=e[n];if("string"==typeof a){const t=i(a);t!==a&&(ei(e)||(e[n]=t),a=t)}t[a]=!0}return t}function wi(t){for(let e=0;e<t.length;e++)Si(t,e)||(t[e]=null);return t}function Ei(t){const e=oi(null);for(const[i,n]of Qe(t))Si(t,i)&&(Array.isArray(n)?e[i]=wi(n):n&&"object"==typeof n&&n.constructor===Object?e[i]=Ei(n):e[i]=n);return e}function Ti(t,e){for(;null!==t;){const i=ni(t,e);if(i){if(i.get)return ji(i.get);if("function"==typeof i.value)return ji(i.value)}t=ii(t)}return function(){return null}}const Ci=ai(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Di=ai(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ui=ai(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ai=ai(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ii=ai(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Oi=ai(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Li=ai(["#text"]),Ri=ai(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Mi=ai(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Pi=ai(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Gi=ai(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Fi=si(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Hi=si(/<%[\w\W]*|[\w\W]*%>/gm),Ki=si(/\$\{[\w\W]*/gm),zi=si(/^data-[\-\w.\u00B7-\uFFFF]+$/),Bi=si(/^aria-[\-\w]+$/),Wi=si(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$i=si(/^(?:\w+script|data):/i),Yi=si(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ji=si(/^html$/i),qi=si(/^[a-z][.\w]*(-[.\w]+)+$/i);var Vi=Object.freeze({__proto__:null,ARIA_ATTR:Bi,ATTR_WHITESPACE:Yi,CUSTOM_ELEMENT:qi,DATA_ATTR:zi,DOCTYPE_NAME:Ji,ERB_EXPR:Hi,IS_ALLOWED_URI:Wi,IS_SCRIPT_OR_DATA:$i,MUSTACHE_EXPR:Fi,TMPLIT_EXPR:Ki});const Xi=function(){return"undefined"==typeof window?null:window};var Zi=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xi();const i=e=>t(e);if(i.version="3.2.5",i.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return i.isSupported=!1,i;let{document:n}=e;const a=n,s=a.currentScript,{DocumentFragment:o,HTMLTemplateElement:r,Node:l,Element:c,NodeFilter:m,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:u,trustedTypes:p}=e,h=c.prototype,k=Ti(h,"cloneNode"),f=Ti(h,"remove"),_=Ti(h,"nextSibling"),x=Ti(h,"childNodes"),S=Ti(h,"parentNode");if("function"==typeof r){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let b,y="";const{implementation:v,createNodeIterator:j,createDocumentFragment:N,getElementsByTagName:w}=n,{importNode:E}=a;let T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported="function"==typeof Qe&&"function"==typeof S&&v&&void 0!==v.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:D,TMPLIT_EXPR:U,DATA_ATTR:A,ARIA_ATTR:I,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:R}=Vi;let{IS_ALLOWED_URI:M}=Vi,P=null;const G=Ni({},[...Ci,...Di,...Ui,...Ii,...Li]);let F=null;const H=Ni({},[...Ri,...Mi,...Pi,...Gi]);let K=Object.seal(oi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),z=null,B=null,W=!0,$=!0,Y=!1,J=!0,q=!1,V=!0,X=!1,Z=!1,Q=!1,tt=!1,et=!1,it=!1,nt=!0,at=!1,st=!0,ot=!1,rt={},lt=null;const ct=Ni({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let mt=null;const dt=Ni({},["audio","video","img","source","image","track"]);let gt=null;const ut=Ni({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pt="http://www.w3.org/1998/Math/MathML",ht="http://www.w3.org/2000/svg",kt="http://www.w3.org/1999/xhtml";let ft=kt,_t=!1,xt=null;const St=Ni({},[pt,ht,kt],hi);let bt=Ni({},["mi","mo","mn","ms","mtext"]),yt=Ni({},["annotation-xml"]);const vt=Ni({},["title","style","font","a","script"]);let jt=null;const Nt=["application/xhtml+xml","text/html"];let wt=null,Et=null;const Tt=n.createElement("form"),Ct=function(t){return t instanceof RegExp||t instanceof Function},Dt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Et||Et!==t){if(t&&"object"==typeof t||(t={}),t=Ei(t),jt=-1===Nt.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,wt="application/xhtml+xml"===jt?hi:pi,P=Si(t,"ALLOWED_TAGS")?Ni({},t.ALLOWED_TAGS,wt):G,F=Si(t,"ALLOWED_ATTR")?Ni({},t.ALLOWED_ATTR,wt):H,xt=Si(t,"ALLOWED_NAMESPACES")?Ni({},t.ALLOWED_NAMESPACES,hi):St,gt=Si(t,"ADD_URI_SAFE_ATTR")?Ni(Ei(ut),t.ADD_URI_SAFE_ATTR,wt):ut,mt=Si(t,"ADD_DATA_URI_TAGS")?Ni(Ei(dt),t.ADD_DATA_URI_TAGS,wt):dt,lt=Si(t,"FORBID_CONTENTS")?Ni({},t.FORBID_CONTENTS,wt):ct,z=Si(t,"FORBID_TAGS")?Ni({},t.FORBID_TAGS,wt):{},B=Si(t,"FORBID_ATTR")?Ni({},t.FORBID_ATTR,wt):{},rt=!!Si(t,"USE_PROFILES")&&t.USE_PROFILES,W=!1!==t.ALLOW_ARIA_ATTR,$=!1!==t.ALLOW_DATA_ATTR,Y=t.ALLOW_UNKNOWN_PROTOCOLS||!1,J=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,q=t.SAFE_FOR_TEMPLATES||!1,V=!1!==t.SAFE_FOR_XML,X=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,it=t.RETURN_TRUSTED_TYPE||!1,Q=t.FORCE_BODY||!1,nt=!1!==t.SANITIZE_DOM,at=t.SANITIZE_NAMED_PROPS||!1,st=!1!==t.KEEP_CONTENT,ot=t.IN_PLACE||!1,M=t.ALLOWED_URI_REGEXP||Wi,ft=t.NAMESPACE||kt,bt=t.MATHML_TEXT_INTEGRATION_POINTS||bt,yt=t.HTML_INTEGRATION_POINTS||yt,K=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Ct(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Ct(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(K.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&($=!1),et&&(tt=!0),rt&&(P=Ni({},Li),F=[],!0===rt.html&&(Ni(P,Ci),Ni(F,Ri)),!0===rt.svg&&(Ni(P,Di),Ni(F,Mi),Ni(F,Gi)),!0===rt.svgFilters&&(Ni(P,Ui),Ni(F,Mi),Ni(F,Gi)),!0===rt.mathMl&&(Ni(P,Ii),Ni(F,Pi),Ni(F,Gi))),t.ADD_TAGS&&(P===G&&(P=Ei(P)),Ni(P,t.ADD_TAGS,wt)),t.ADD_ATTR&&(F===H&&(F=Ei(F)),Ni(F,t.ADD_ATTR,wt)),t.ADD_URI_SAFE_ATTR&&Ni(gt,t.ADD_URI_SAFE_ATTR,wt),t.FORBID_CONTENTS&&(lt===ct&&(lt=Ei(lt)),Ni(lt,t.FORBID_CONTENTS,wt)),st&&(P["#text"]=!0),X&&Ni(P,["html","head","body"]),P.table&&(Ni(P,["tbody"]),delete z.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw yi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw yi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');b=t.TRUSTED_TYPES_POLICY,y=b.createHTML("")}else void 0===b&&(b=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(i=e.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(p,s)),null!==b&&"string"==typeof y&&(y=b.createHTML(""));ai&&ai(t),Et=t}},Ut=Ni({},[...Di,...Ui,...Ai]),At=Ni({},[...Ii,...Oi]),It=function(t){gi(i.removed,{element:t});try{S(t).removeChild(t)}catch(e){f(t)}},Ot=function(t,e){try{gi(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){gi(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(tt||et)try{It(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},Lt=function(t){let e=null,i=null;if(Q)t="<remove></remove>"+t;else{const e=ki(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===jt&&ft===kt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const a=b?b.createHTML(t):t;if(ft===kt)try{e=(new u).parseFromString(a,jt)}catch(t){}if(!e||!e.documentElement){e=v.createDocument(ft,"template",null);try{e.documentElement.innerHTML=_t?y:a}catch(t){}}const s=e.body||e.documentElement;return t&&i&&s.insertBefore(n.createTextNode(i),s.childNodes[0]||null),ft===kt?w.call(e,X?"html":"body")[0]:X?e.documentElement:s},Rt=function(t){return j.call(t.ownerDocument||t,t,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},Mt=function(t){return t instanceof g&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof d)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Pt=function(t){return"function"==typeof l&&t instanceof l};function Gt(t,e,n){ci(t,(t=>{t.call(i,e,n,Et)}))}const Ft=function(t){let e=null;if(Gt(T.beforeSanitizeElements,t,null),Mt(t))return It(t),!0;const n=wt(t.nodeName);if(Gt(T.uponSanitizeElement,t,{tagName:n,allowedTags:P}),t.hasChildNodes()&&!Pt(t.firstElementChild)&&bi(/<[/\w!]/g,t.innerHTML)&&bi(/<[/\w!]/g,t.textContent))return It(t),!0;if(7===t.nodeType)return It(t),!0;if(V&&8===t.nodeType&&bi(/<[/\w]/g,t.data))return It(t),!0;if(!P[n]||z[n]){if(!z[n]&&Kt(n)){if(K.tagNameCheck instanceof RegExp&&bi(K.tagNameCheck,n))return!1;if(K.tagNameCheck instanceof Function&&K.tagNameCheck(n))return!1}if(st&&!lt[n]){const e=S(t)||t.parentNode,i=x(t)||t.childNodes;if(i&&e)for(let n=i.length-1;n>=0;--n){const a=k(i[n],!0);a.__removalCount=(t.__removalCount||0)+1,e.insertBefore(a,_(t))}}return It(t),!0}return t instanceof c&&!function(t){let e=S(t);e&&e.tagName||(e={namespaceURI:ft,tagName:"template"});const i=pi(t.tagName),n=pi(e.tagName);return!!xt[t.namespaceURI]&&(t.namespaceURI===ht?e.namespaceURI===kt?"svg"===i:e.namespaceURI===pt?"svg"===i&&("annotation-xml"===n||bt[n]):Boolean(Ut[i]):t.namespaceURI===pt?e.namespaceURI===kt?"math"===i:e.namespaceURI===ht?"math"===i&&yt[n]:Boolean(At[i]):t.namespaceURI===kt?!(e.namespaceURI===ht&&!yt[n])&&!(e.namespaceURI===pt&&!bt[n])&&!At[i]&&(vt[i]||!Ut[i]):!("application/xhtml+xml"!==jt||!xt[t.namespaceURI]))}(t)?(It(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!bi(/<\/no(script|embed|frames)/i,t.innerHTML)?(q&&3===t.nodeType&&(e=t.textContent,ci([C,D,U],(t=>{e=fi(e,t," ")})),t.textContent!==e&&(gi(i.removed,{element:t.cloneNode()}),t.textContent=e)),Gt(T.afterSanitizeElements,t,null),!1):(It(t),!0)},Ht=function(t,e,i){if(nt&&("id"===e||"name"===e)&&(i in n||i in Tt))return!1;if($&&!B[e]&&bi(A,e));else if(W&&bi(I,e));else if(!F[e]||B[e]){if(!(Kt(t)&&(K.tagNameCheck instanceof RegExp&&bi(K.tagNameCheck,t)||K.tagNameCheck instanceof Function&&K.tagNameCheck(t))&&(K.attributeNameCheck instanceof RegExp&&bi(K.attributeNameCheck,e)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(e))||"is"===e&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&bi(K.tagNameCheck,i)||K.tagNameCheck instanceof Function&&K.tagNameCheck(i))))return!1}else if(gt[e]);else if(bi(M,fi(i,L,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==_i(i,"data:")||!mt[t])if(Y&&!bi(O,fi(i,L,"")));else if(i)return!1;return!0},Kt=function(t){return"annotation-xml"!==t&&ki(t,R)},zt=function(t){Gt(T.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Mt(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let a=e.length;for(;a--;){const s=e[a],{name:o,namespaceURI:r,value:l}=s,c=wt(o);let m="value"===o?l:xi(l);if(n.attrName=c,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Gt(T.uponSanitizeAttribute,t,n),m=n.attrValue,!at||"id"!==c&&"name"!==c||(Ot(o,t),m="user-content-"+m),V&&bi(/((--!?|])>)|<\/(style|title)/i,m)){Ot(o,t);continue}if(n.forceKeepAttr)continue;if(Ot(o,t),!n.keepAttr)continue;if(!J&&bi(/\/>/i,m)){Ot(o,t);continue}q&&ci([C,D,U],(t=>{m=fi(m,t," ")}));const d=wt(t.nodeName);if(Ht(d,c,m)){if(b&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(r);else switch(p.getAttributeType(d,c)){case"TrustedHTML":m=b.createHTML(m);break;case"TrustedScriptURL":m=b.createScriptURL(m)}try{r?t.setAttributeNS(r,o,m):t.setAttribute(o,m),Mt(t)?It(t):di(i.removed)}catch(t){}}}Gt(T.afterSanitizeAttributes,t,null)},Bt=function t(e){let i=null;const n=Rt(e);for(Gt(T.beforeSanitizeShadowDOM,e,null);i=n.nextNode();)Gt(T.uponSanitizeShadowNode,i,null),Ft(i),zt(i),i.content instanceof o&&t(i.content);Gt(T.afterSanitizeShadowDOM,e,null)};return i.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,s=null,r=null,c=null;if(_t=!t,_t&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Pt(t)){if("function"!=typeof t.toString)throw yi("toString is not a function");if("string"!=typeof(t=t.toString()))throw yi("dirty is not a string, aborting")}if(!i.isSupported)return t;if(Z||Dt(e),i.removed=[],"string"==typeof t&&(ot=!1),ot){if(t.nodeName){const e=wt(t.nodeName);if(!P[e]||z[e])throw yi("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)n=Lt("\x3c!----\x3e"),s=n.ownerDocument.importNode(t,!0),1===s.nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?n=s:n.appendChild(s);else{if(!tt&&!q&&!X&&-1===t.indexOf("<"))return b&&it?b.createHTML(t):t;if(n=Lt(t),!n)return tt?null:it?y:""}n&&Q&&It(n.firstChild);const m=Rt(ot?t:n);for(;r=m.nextNode();)Ft(r),zt(r),r.content instanceof o&&Bt(r.content);if(ot)return t;if(tt){if(et)for(c=N.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return(F.shadowroot||F.shadowrootmode)&&(c=E.call(a,c,!0)),c}let d=X?n.outerHTML:n.innerHTML;return X&&P["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&bi(Ji,n.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+d),q&&ci([C,D,U],(t=>{d=fi(d,t," ")})),b&&it?b.createHTML(d):d},i.setConfig=function(){Dt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},i.clearConfig=function(){Et=null,Z=!1},i.isValidAttribute=function(t,e,i){Et||Dt({});const n=wt(t),a=wt(e);return Ht(n,a,i)},i.addHook=function(t,e){"function"==typeof e&&gi(T[t],e)},i.removeHook=function(t,e){if(void 0!==e){const i=mi(T[t],e);return-1===i?void 0:ui(T[t],i,1)[0]}return di(T[t])},i.removeHooks=function(t){T[t]=[]},i.removeAllHooks=function(){T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();const Qi=({title:t,type:e,hideEmpty:i=!0})=>{const{useNotifications:o,useSetNotificationStatus:r,useIsUpdatingNotifications:l}=(0,a.useContext)(g),c=o[e],m=Object.entries(c.active),u=Object.entries(c.dismissed);if(0===c.total&&i)return null;const[p,h]=(0,a.useState)(!1),k=(t,e,i)=>(0,d.jsxs)("div",{className:Mt()("gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-border gtmkit-px-4 gtmkit-py-3 gtmkit-gap-x-16",{"gtmkit-border gtmkit-border-t-0":i},{"gtmkit-border-2":!i}),children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"gtmkit-font-bold gtmkit-mr-2",children:e.header}),(0,d.jsx)("span",{className:"gtmkit-text-sm",dangerouslySetInnerHTML:{__html:Zi.sanitize(e.message)}})]}),(0,d.jsxs)(s.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-1 !gtmkit-px-3 gtmkit-h-min",onClick:()=>r(e.id,i?"restore":"dismiss"),children:[(0,d.jsx)("span",{className:"gtmkit-text-sm",children:i?(0,n.__)("Restore","gtm-kit"):(0,n.__)("Dismiss","gtm-kit")}),l?(0,d.jsx)(s.Spinner,{}):null]})]},t);return(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:t,children:(0,d.jsx)(Ft,{count:c.active.length,important:"problem"===e})}),(0,d.jsxs)(be.Content,{className:"gtmkit-space-y-4",children:[m.map((([t,e])=>k(t,e,!1))),u.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-py gtmkit-font-bold gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-cursor-pointer",onClick:()=>h((t=>!t)),children:[(0,d.jsx)("span",{children:(0,n.sprintf)(
     19(0,n.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:e,disabled:i,useSettings:s,useUpdateStateSettings:o})})]})},Le=[{label:(0,n.__)("Retail","gtm-kit"),value:"retail"},{label:(0,n.__)("Education","gtm-kit"),value:"education"},{label:(0,n.__)("Flights","gtm-kit"),value:"flights"},{label:(0,n.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,n.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,n.__)("Local deals","gtm-kit"),value:"local"},{label:(0,n.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,n.__)("Travel","gtm-kit"),value:"travel"},{label:(0,n.__)("Custom","gtm-kit"),value:"custom"}],Re=()=>{const{useSettings:t,useUpdateStateSettings:e,isPremium:i}=(0,a.useContext)(g),s="WooCommerce",o=!window.gtmkitSettings.plugins.woocommerce,r=o||!t.integrations.woocommerce_integration,l=r||!i||!t.general.sgtm_domain,c=l||!t.premium.woocommerce_webhooks;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("WooCommerce","gtm-kit")}),o?(0,d.jsx)(Ae,{pluginName:s}):null,(0,d.jsx)(Oe,{pluginName:s,optionName:"woocommerce_integration",pluginInactive:o}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ie,{title:(0,n.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,n.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:r}),(0,d.jsx)(fe,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_use_sku",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Exclude shipping from revenue","gtm-kit"),label:(0,n.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:r,useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("User Data","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsx)(be.Content,{children:(0,d.jsx)(fe,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_customer_data",disabled:r,useSettings:t,useUpdateStateSettings:e})}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("User-Provided Data","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'.","gtm-kit")," ",(0,d.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,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Webhooks for Server-side Tracking","gtm-kit"),children:i?(0,d.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,d.jsx)(Ce,{shouldUpsell:!i,children:(0,d.jsxs)(be.Content,{children:[l?(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,d.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:ue("general","container?focus=sgtm"),children:(0,n.__)("Go to sGTM settings","gtm-kit")})]}):(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,d.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:ue("templates","server-side-tagging"),children:(0,n.__)("Go to GTM Templates","gtm-kit")})]}),(0,d.jsx)(fe,{title:(0,n.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,n.__)("This option will allow you to send GTM events using webhooks to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:l,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)("h3",{className:"gtmkit-pt-3 gtmkit-mb-2 gtmkit-font-bold",children:(0,n.__)("GTM Events Send by Server-Side Webhooks:","gtm-kit")}),(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"purchase"}),label:(0,n.__)("Send an 'purchase' event from the server side when an order is created.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_purchase_webhook",disabled:c,useSettings:t,useUpdateStateSettings:e,narrow:!0}),t.premium.woocommerce_purchase_webhook||!i?(0,d.jsx)("div",{className:"gtmkit-px-8",children:(0,d.jsx)(_e,{options:[{label:(0,n.__)("Send 'purchase' event when an order is created.'","gtm-kit"),value:0},{label:(0,n.__)("Send 'purchase' event when the order has been paid and order status is 'Processing'.","gtm-kit"),value:1}],optionGroup:"premium",optionName:"woocommerce_purchase_webhook_trigger",disabled:c,useSettings:t,useUpdateStateSettings:e,className:"gtmkit-settings-field-wrap gtmkit-pb-6"})}):null,(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"order_paid"}),label:(0,n.__)("Send an 'order_paid' event from the server side when an order has 'Processing' status.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_order_paid_webhook",disabled:c,useSettings:t,useUpdateStateSettings:e,narrow:!0}),(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"refund"}),label:(0,n.__)("Send an 'refund' event from the server side when an order has been refunded or cancelled.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_refund_webhook",disabled:c,useSettings:t,useUpdateStateSettings:e,narrow:!0})]})})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Event Customization","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(_e,{title:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("code",{children:"view_item_list"})," (with product filter)"]}),options:[{label:(0,n.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,n.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,n.__)("Do you what to push the view_item_list event if the list is updated using a filter or just once per page view?","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_view_item_list_limit",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("code",{children:"view_item"})," '(variable product)'"]}),options:[{label:(0,n.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,n.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,n.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,n.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,d.jsx)("code",{children:"add_shipping_info"}),options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,d.jsx)("code",{children:"add_payment_info"}),options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(Ce,{shouldUpsell:!i,variant:"single",children:(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"purchase"}),label:(0,n.__)("Disable the 'purchase' event in frontend an rely on server-side webhook.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_disable_frontend_purchase_event",disabled:c,useSettings:t,useUpdateStateSettings:e,premium:i})})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ie,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Le,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:r}),(0,d.jsx)(ke,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,n.__)("Enter prefix","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:r,useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Custom CSS Selectors","gtm-kit"),children:i?(0,d.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,d.jsx)(Ce,{shouldUpsell:!i,children:(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")}),(0,d.jsx)(ke,{title:(0,n.__)("Single Product (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_single_product_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("Product List (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Advanced Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_dequeue_script",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Include permalink structure","gtm-kit"),label:(0,n.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_permalink_structure",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Include path of pages","gtm-kit"),label:(0,n.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_pages",disabled:r,useSettings:t,useUpdateStateSettings:e})]})]})]})},Me=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g),i="Contact Form 7",s=!window.gtmkitSettings.plugins.cf7,o=s||!t.integrations.cf7_integration;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Contact Form 7","gtm-kit")}),s?(0,d.jsx)(Ae,{pluginName:i}):null,(0,d.jsx)(Oe,{pluginName:i,optionName:"cf7_integration",pluginInactive:s}),(0,d.jsxs)(be,{disabled:o,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsx)(_e,{title:(0,n.__)("Load JavaScript","gtm-kit"),options:[{label:(0,n.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,n.__)("On all pages","gtm-kit"),value:2}],help:(0,n.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:o,useSettings:t,useUpdateStateSettings:e})})]})]})},Pe=()=>{const t="Easy Digital Downloads",e=!window.gtmkitSettings.plugins.edd,{useSettings:i,useUpdateStateSettings:s}=(0,a.useContext)(g),o=e||!i.integrations.edd_integration;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Easy Digital Downloads","gtm-kit")}),e?(0,d.jsx)(Ae,{pluginName:t}):null,(0,d.jsx)(Oe,{pluginName:t,optionName:"edd_integration",pluginInactive:e}),(0,d.jsxs)(be,{disabled:o,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"edd_use_sku",disabled:o,useSettings:i,useUpdateStateSettings:s}),(0,d.jsx)(fe,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:o,useSettings:i,useUpdateStateSettings:s}),(0,d.jsx)(fe,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"edd_include_customer_data",disabled:o,useSettings:i,useUpdateStateSettings:s})]})]}),(0,d.jsxs)(be,{disabled:o,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ie,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Le,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,d.jsx)(ke,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,n.__)("Enter prefix","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:o,useSettings:i,useUpdateStateSettings:s})]})]}),(0,d.jsxs)(be,{disabled:e,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsx)(fe,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"edd_dequeue_script",disabled:o,useSettings:i,useUpdateStateSettings:s})})]})]})},Ge=()=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Getting Started","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("GTM Kit is sending data to your Google Tag Manger container but you still need to configure Tags, Triggers and Variables in GTM to use the data.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")}),(0,d.jsxs)("p",{children:[(0,n.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,d.jsx)("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",children:(0,n.__)("Read the guide","gtm-kit")})]})]})]}),(0,d.jsx)(ge,{title:(0,n.__)("Templates","gtm-kit"),data:pe("templates")})]}),Fe=({title:t,description:e,link:i,templates:a,upsell:s})=>{const o=s?"components-button gtmkit-gap-2 gtmkit-shadow-lg gtmkit-rounded !gtmkit-text-base gtmkit-py-4 gtmkit-px-6 is-primary":"gtmkit-text-color-primary gtmkit-text-base gtmkit-font-semibold hover:gtmkit-underline";return s&&(i.url=ue("upgrades")),(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:t}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:e}),i&&i.url&&i.link_text?(0,d.jsx)("div",{children:(0,d.jsx)("a",{href:i.url,target:"_blank",className:o,rel:"noreferrer",children:i.link_text})}):null,a&&a.length>0?(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h4",{className:"gtmkit-font-bold",children:(0,n.__)("GTM container import files:","gtm-kit")}),(0,d.jsx)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary",children:a.map((function(t){return(0,d.jsx)("li",{children:(0,d.jsx)("a",{className:"hover:gtmkit-underline",href:t.link,target:"_blank",rel:"noreferrer",children:t.title})})}))})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h4",{className:"gtmkit-font-bold",children:(0,n.__)("Necessary modifications:","gtm-kit")}),(0,d.jsx)("ul",{className:"gtmkit-text-sm",children:a.map((function(t){return(0,d.jsx)("li",{children:t.help_text})}))})]})]}):null]})]})})},He=({sectionData:t})=>{const e=t.collections,{isPremium:i}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:t.title}),Object.keys(e).map((function(t){return(0,d.jsx)(Fe,{title:e[t].title,description:e[t].description,link:e[t].link,templates:e[t].templates,upsell:!i})}))]})},Ke=()=>{const t=ot(),e=window.gtmkitSettings.tutorials;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Help","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Need help?","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("We are here to help if you have any questions.","gtm-kit"),(0,d.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{t("/support",{replace:!0})},children:(0,n.__)("See support options","gtm-kit")})]})})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Tutorials","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsx)("ul",{children:e.map(((t,e)=>(0,d.jsxs)("li",{className:"gtmkit-mb-4",children:[(0,d.jsx)("a",{href:t.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline",children:t.title}),t.text.map(((t,e)=>(0,d.jsx)("div",{className:"gtmkit-text-sm",children:t},e)))]},e)))})})]})]})},ze=()=>{const{useIsSending:t,useUpdateSupportTicket:e,useSupportTicket:i,useSendSystemData:o,useIsSystemDataSent:r,useSystemDataMessage:l,isPremium:c}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Get support","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Support options","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsxs)("ul",{className:"gtmkit-text-color-primary",children:[c&&(0,d.jsx)("li",{children:(0,d.jsx)("a",{href:"https://jump.gtmkit.com/link/4-E35E4",target:"_blank",rel:"noreferrer",children:(0,n.__)("WooCommerce Premium Support","gtm-kit")})}),(0,d.jsx)("li",{children:(0,d.jsx)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer",children:(0,n.__)("WordPress.org Support Forum","gtm-kit")})}),(0,d.jsx)("li",{children:(0,d.jsx)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,n.__)("GITHub repository","gtm-kit")})}),(0,d.jsxs)("li",{children:[(0,d.jsx)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer",children:(0,n.__)("Plugin Homepage","gtm-kit")})," ","(gtmkit.com)"]})]})})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,d.jsx)(be.Content,{children:r?(0,d.jsx)("p",{className:"gtmkit-mb-2",children:l}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-2",children:(0,n.__)("If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:","gtm-kit")}),(0,d.jsx)(s.TextControl,{label:(0,d.jsxs)("span",{className:"gtmkit-text-red-600",children:[l," "]}),placeholder:(0,n.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:i,onChange:t=>e(t)}),(0,d.jsxs)(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:()=>{o()},disabled:!i.toUpperCase().startsWith("FS"),children:[(0,d.jsx)("span",{children:(0,n.__)("Send system data","gtm-kit")}),t?(0,d.jsx)(s.Spinner,{}):""]})]})})]})]})},Be=t=>{const{Fill:e,Slot:i}=(0,s.createSlotFill)(t),n=({children:t})=>(0,d.jsx)(e,{children:t});return n.Slot=({fillProps:t})=>(0,d.jsx)(i,{fillProps:t,children:t=>t.length?t:null}),n},We=Be("GravityForms"),$e=Be("LicenseActivation"),Ye=({integrationID:t,pluginName:e})=>{const{useSettings:i,useUpdateStateSettings:n}=(0,a.useContext)(g),s=!window.gtmkitSettings.plugins[t],o=s||!i.integrations[t+"_integration"];return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:e}),s?(0,d.jsx)(Ae,{pluginName:e}):null,(0,d.jsx)(Oe,{pluginName:e,optionName:t+"_integration",pluginInactive:s}),"gf"===t?(0,d.jsx)(We.Slot,{fillProps:{settingsInactive:o,useSettings:i,useUpdateStateSettings:n}}):null]})},Je=window.wp.plugins,qe=(0,a.forwardRef)((({icon:t,size:e=24,...i},n)=>(0,a.cloneElement)(t,{width:e,height:e,...i,ref:n}))),Ve=window.wp.primitives,Xe=(0,d.jsx)(Ve.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(Ve.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Ze=(0,d.jsx)(Ve.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(Ve.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),{entries:Qe,setPrototypeOf:ti,isFrozen:ei,getPrototypeOf:ii,getOwnPropertyDescriptor:ni}=Object;let{freeze:ai,seal:si,create:oi}=Object,{apply:ri,construct:li}="undefined"!=typeof Reflect&&Reflect;ai||(ai=function(t){return t}),si||(si=function(t){return t}),ri||(ri=function(t,e){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a<i;a++)n[a-2]=arguments[a];return t.apply(e,n)}),li||(li=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return new t(...i)});const ci=ji(Array.prototype.forEach),mi=ji(Array.prototype.lastIndexOf),di=ji(Array.prototype.pop),gi=ji(Array.prototype.push),ui=ji(Array.prototype.splice),pi=ji(String.prototype.toLowerCase),hi=ji(String.prototype.toString),ki=ji(String.prototype.match),fi=ji(String.prototype.replace),_i=ji(String.prototype.indexOf),xi=ji(String.prototype.trim),Si=ji(Object.prototype.hasOwnProperty),bi=ji(RegExp.prototype.test),yi=(vi=TypeError,function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return li(vi,e)});var vi;function ji(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return ri(t,e,n)}}function Ni(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:pi;ti&&ti(t,null);let n=e.length;for(;n--;){let a=e[n];if("string"==typeof a){const t=i(a);t!==a&&(ei(e)||(e[n]=t),a=t)}t[a]=!0}return t}function wi(t){for(let e=0;e<t.length;e++)Si(t,e)||(t[e]=null);return t}function Ei(t){const e=oi(null);for(const[i,n]of Qe(t))Si(t,i)&&(Array.isArray(n)?e[i]=wi(n):n&&"object"==typeof n&&n.constructor===Object?e[i]=Ei(n):e[i]=n);return e}function Ti(t,e){for(;null!==t;){const i=ni(t,e);if(i){if(i.get)return ji(i.get);if("function"==typeof i.value)return ji(i.value)}t=ii(t)}return function(){return null}}const Ci=ai(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Di=ai(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","slot","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ui=ai(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ai=ai(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ii=ai(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Oi=ai(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Li=ai(["#text"]),Ri=ai(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Mi=ai(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Pi=ai(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Gi=ai(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Fi=si(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Hi=si(/<%[\w\W]*|[\w\W]*%>/gm),Ki=si(/\$\{[\w\W]*/gm),zi=si(/^data-[\-\w.\u00B7-\uFFFF]+$/),Bi=si(/^aria-[\-\w]+$/),Wi=si(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$i=si(/^(?:\w+script|data):/i),Yi=si(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ji=si(/^html$/i),qi=si(/^[a-z][.\w]*(-[.\w]+)+$/i);var Vi=Object.freeze({__proto__:null,ARIA_ATTR:Bi,ATTR_WHITESPACE:Yi,CUSTOM_ELEMENT:qi,DATA_ATTR:zi,DOCTYPE_NAME:Ji,ERB_EXPR:Hi,IS_ALLOWED_URI:Wi,IS_SCRIPT_OR_DATA:$i,MUSTACHE_EXPR:Fi,TMPLIT_EXPR:Ki});const Xi=function(){return"undefined"==typeof window?null:window};var Zi=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xi();const i=e=>t(e);if(i.version="3.2.7",i.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return i.isSupported=!1,i;let{document:n}=e;const a=n,s=a.currentScript,{DocumentFragment:o,HTMLTemplateElement:r,Node:l,Element:c,NodeFilter:m,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:u,trustedTypes:p}=e,h=c.prototype,k=Ti(h,"cloneNode"),f=Ti(h,"remove"),_=Ti(h,"nextSibling"),x=Ti(h,"childNodes"),S=Ti(h,"parentNode");if("function"==typeof r){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let b,y="";const{implementation:v,createNodeIterator:j,createDocumentFragment:N,getElementsByTagName:w}=n,{importNode:E}=a;let T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported="function"==typeof Qe&&"function"==typeof S&&v&&void 0!==v.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:D,TMPLIT_EXPR:U,DATA_ATTR:A,ARIA_ATTR:I,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:R}=Vi;let{IS_ALLOWED_URI:M}=Vi,P=null;const G=Ni({},[...Ci,...Di,...Ui,...Ii,...Li]);let F=null;const H=Ni({},[...Ri,...Mi,...Pi,...Gi]);let K=Object.seal(oi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),z=null,B=null,W=!0,$=!0,Y=!1,J=!0,q=!1,V=!0,X=!1,Z=!1,Q=!1,tt=!1,et=!1,it=!1,nt=!0,at=!1,st=!0,ot=!1,rt={},lt=null;const ct=Ni({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let mt=null;const dt=Ni({},["audio","video","img","source","image","track"]);let gt=null;const ut=Ni({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pt="http://www.w3.org/1998/Math/MathML",ht="http://www.w3.org/2000/svg",kt="http://www.w3.org/1999/xhtml";let ft=kt,_t=!1,xt=null;const St=Ni({},[pt,ht,kt],hi);let bt=Ni({},["mi","mo","mn","ms","mtext"]),yt=Ni({},["annotation-xml"]);const vt=Ni({},["title","style","font","a","script"]);let jt=null;const Nt=["application/xhtml+xml","text/html"];let wt=null,Et=null;const Tt=n.createElement("form"),Ct=function(t){return t instanceof RegExp||t instanceof Function},Dt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Et||Et!==t){if(t&&"object"==typeof t||(t={}),t=Ei(t),jt=-1===Nt.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,wt="application/xhtml+xml"===jt?hi:pi,P=Si(t,"ALLOWED_TAGS")?Ni({},t.ALLOWED_TAGS,wt):G,F=Si(t,"ALLOWED_ATTR")?Ni({},t.ALLOWED_ATTR,wt):H,xt=Si(t,"ALLOWED_NAMESPACES")?Ni({},t.ALLOWED_NAMESPACES,hi):St,gt=Si(t,"ADD_URI_SAFE_ATTR")?Ni(Ei(ut),t.ADD_URI_SAFE_ATTR,wt):ut,mt=Si(t,"ADD_DATA_URI_TAGS")?Ni(Ei(dt),t.ADD_DATA_URI_TAGS,wt):dt,lt=Si(t,"FORBID_CONTENTS")?Ni({},t.FORBID_CONTENTS,wt):ct,z=Si(t,"FORBID_TAGS")?Ni({},t.FORBID_TAGS,wt):Ei({}),B=Si(t,"FORBID_ATTR")?Ni({},t.FORBID_ATTR,wt):Ei({}),rt=!!Si(t,"USE_PROFILES")&&t.USE_PROFILES,W=!1!==t.ALLOW_ARIA_ATTR,$=!1!==t.ALLOW_DATA_ATTR,Y=t.ALLOW_UNKNOWN_PROTOCOLS||!1,J=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,q=t.SAFE_FOR_TEMPLATES||!1,V=!1!==t.SAFE_FOR_XML,X=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,it=t.RETURN_TRUSTED_TYPE||!1,Q=t.FORCE_BODY||!1,nt=!1!==t.SANITIZE_DOM,at=t.SANITIZE_NAMED_PROPS||!1,st=!1!==t.KEEP_CONTENT,ot=t.IN_PLACE||!1,M=t.ALLOWED_URI_REGEXP||Wi,ft=t.NAMESPACE||kt,bt=t.MATHML_TEXT_INTEGRATION_POINTS||bt,yt=t.HTML_INTEGRATION_POINTS||yt,K=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Ct(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Ct(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(K.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&($=!1),et&&(tt=!0),rt&&(P=Ni({},Li),F=[],!0===rt.html&&(Ni(P,Ci),Ni(F,Ri)),!0===rt.svg&&(Ni(P,Di),Ni(F,Mi),Ni(F,Gi)),!0===rt.svgFilters&&(Ni(P,Ui),Ni(F,Mi),Ni(F,Gi)),!0===rt.mathMl&&(Ni(P,Ii),Ni(F,Pi),Ni(F,Gi))),t.ADD_TAGS&&(P===G&&(P=Ei(P)),Ni(P,t.ADD_TAGS,wt)),t.ADD_ATTR&&(F===H&&(F=Ei(F)),Ni(F,t.ADD_ATTR,wt)),t.ADD_URI_SAFE_ATTR&&Ni(gt,t.ADD_URI_SAFE_ATTR,wt),t.FORBID_CONTENTS&&(lt===ct&&(lt=Ei(lt)),Ni(lt,t.FORBID_CONTENTS,wt)),st&&(P["#text"]=!0),X&&Ni(P,["html","head","body"]),P.table&&(Ni(P,["tbody"]),delete z.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw yi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw yi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');b=t.TRUSTED_TYPES_POLICY,y=b.createHTML("")}else void 0===b&&(b=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(i=e.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(p,s)),null!==b&&"string"==typeof y&&(y=b.createHTML(""));ai&&ai(t),Et=t}},Ut=Ni({},[...Di,...Ui,...Ai]),At=Ni({},[...Ii,...Oi]),It=function(t){gi(i.removed,{element:t});try{S(t).removeChild(t)}catch(e){f(t)}},Ot=function(t,e){try{gi(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){gi(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(tt||et)try{It(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},Lt=function(t){let e=null,i=null;if(Q)t="<remove></remove>"+t;else{const e=ki(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===jt&&ft===kt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const a=b?b.createHTML(t):t;if(ft===kt)try{e=(new u).parseFromString(a,jt)}catch(t){}if(!e||!e.documentElement){e=v.createDocument(ft,"template",null);try{e.documentElement.innerHTML=_t?y:a}catch(t){}}const s=e.body||e.documentElement;return t&&i&&s.insertBefore(n.createTextNode(i),s.childNodes[0]||null),ft===kt?w.call(e,X?"html":"body")[0]:X?e.documentElement:s},Rt=function(t){return j.call(t.ownerDocument||t,t,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},Mt=function(t){return t instanceof g&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof d)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Pt=function(t){return"function"==typeof l&&t instanceof l};function Gt(t,e,n){ci(t,(t=>{t.call(i,e,n,Et)}))}const Ft=function(t){let e=null;if(Gt(T.beforeSanitizeElements,t,null),Mt(t))return It(t),!0;const n=wt(t.nodeName);if(Gt(T.uponSanitizeElement,t,{tagName:n,allowedTags:P}),V&&t.hasChildNodes()&&!Pt(t.firstElementChild)&&bi(/<[/\w!]/g,t.innerHTML)&&bi(/<[/\w!]/g,t.textContent))return It(t),!0;if(7===t.nodeType)return It(t),!0;if(V&&8===t.nodeType&&bi(/<[/\w]/g,t.data))return It(t),!0;if(!P[n]||z[n]){if(!z[n]&&Kt(n)){if(K.tagNameCheck instanceof RegExp&&bi(K.tagNameCheck,n))return!1;if(K.tagNameCheck instanceof Function&&K.tagNameCheck(n))return!1}if(st&&!lt[n]){const e=S(t)||t.parentNode,i=x(t)||t.childNodes;if(i&&e)for(let n=i.length-1;n>=0;--n){const a=k(i[n],!0);a.__removalCount=(t.__removalCount||0)+1,e.insertBefore(a,_(t))}}return It(t),!0}return t instanceof c&&!function(t){let e=S(t);e&&e.tagName||(e={namespaceURI:ft,tagName:"template"});const i=pi(t.tagName),n=pi(e.tagName);return!!xt[t.namespaceURI]&&(t.namespaceURI===ht?e.namespaceURI===kt?"svg"===i:e.namespaceURI===pt?"svg"===i&&("annotation-xml"===n||bt[n]):Boolean(Ut[i]):t.namespaceURI===pt?e.namespaceURI===kt?"math"===i:e.namespaceURI===ht?"math"===i&&yt[n]:Boolean(At[i]):t.namespaceURI===kt?!(e.namespaceURI===ht&&!yt[n])&&!(e.namespaceURI===pt&&!bt[n])&&!At[i]&&(vt[i]||!Ut[i]):!("application/xhtml+xml"!==jt||!xt[t.namespaceURI]))}(t)?(It(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!bi(/<\/no(script|embed|frames)/i,t.innerHTML)?(q&&3===t.nodeType&&(e=t.textContent,ci([C,D,U],(t=>{e=fi(e,t," ")})),t.textContent!==e&&(gi(i.removed,{element:t.cloneNode()}),t.textContent=e)),Gt(T.afterSanitizeElements,t,null),!1):(It(t),!0)},Ht=function(t,e,i){if(nt&&("id"===e||"name"===e)&&(i in n||i in Tt))return!1;if($&&!B[e]&&bi(A,e));else if(W&&bi(I,e));else if(!F[e]||B[e]){if(!(Kt(t)&&(K.tagNameCheck instanceof RegExp&&bi(K.tagNameCheck,t)||K.tagNameCheck instanceof Function&&K.tagNameCheck(t))&&(K.attributeNameCheck instanceof RegExp&&bi(K.attributeNameCheck,e)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(e,t))||"is"===e&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&bi(K.tagNameCheck,i)||K.tagNameCheck instanceof Function&&K.tagNameCheck(i))))return!1}else if(gt[e]);else if(bi(M,fi(i,L,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==_i(i,"data:")||!mt[t])if(Y&&!bi(O,fi(i,L,"")));else if(i)return!1;return!0},Kt=function(t){return"annotation-xml"!==t&&ki(t,R)},zt=function(t){Gt(T.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Mt(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let a=e.length;for(;a--;){const s=e[a],{name:o,namespaceURI:r,value:l}=s,c=wt(o),m=l;let d="value"===o?m:xi(m);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,Gt(T.uponSanitizeAttribute,t,n),d=n.attrValue,!at||"id"!==c&&"name"!==c||(Ot(o,t),d="user-content-"+d),V&&bi(/((--!?|])>)|<\/(style|title|textarea)/i,d)){Ot(o,t);continue}if("attributename"===c&&ki(d,"href")){Ot(o,t);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Ot(o,t);continue}if(!J&&bi(/\/>/i,d)){Ot(o,t);continue}q&&ci([C,D,U],(t=>{d=fi(d,t," ")}));const g=wt(t.nodeName);if(Ht(g,c,d)){if(b&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(r);else switch(p.getAttributeType(g,c)){case"TrustedHTML":d=b.createHTML(d);break;case"TrustedScriptURL":d=b.createScriptURL(d)}if(d!==m)try{r?t.setAttributeNS(r,o,d):t.setAttribute(o,d),Mt(t)?It(t):di(i.removed)}catch(e){Ot(o,t)}}else Ot(o,t)}Gt(T.afterSanitizeAttributes,t,null)},Bt=function t(e){let i=null;const n=Rt(e);for(Gt(T.beforeSanitizeShadowDOM,e,null);i=n.nextNode();)Gt(T.uponSanitizeShadowNode,i,null),Ft(i),zt(i),i.content instanceof o&&t(i.content);Gt(T.afterSanitizeShadowDOM,e,null)};return i.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,s=null,r=null,c=null;if(_t=!t,_t&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Pt(t)){if("function"!=typeof t.toString)throw yi("toString is not a function");if("string"!=typeof(t=t.toString()))throw yi("dirty is not a string, aborting")}if(!i.isSupported)return t;if(Z||Dt(e),i.removed=[],"string"==typeof t&&(ot=!1),ot){if(t.nodeName){const e=wt(t.nodeName);if(!P[e]||z[e])throw yi("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)n=Lt("\x3c!----\x3e"),s=n.ownerDocument.importNode(t,!0),1===s.nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?n=s:n.appendChild(s);else{if(!tt&&!q&&!X&&-1===t.indexOf("<"))return b&&it?b.createHTML(t):t;if(n=Lt(t),!n)return tt?null:it?y:""}n&&Q&&It(n.firstChild);const m=Rt(ot?t:n);for(;r=m.nextNode();)Ft(r),zt(r),r.content instanceof o&&Bt(r.content);if(ot)return t;if(tt){if(et)for(c=N.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return(F.shadowroot||F.shadowrootmode)&&(c=E.call(a,c,!0)),c}let d=X?n.outerHTML:n.innerHTML;return X&&P["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&bi(Ji,n.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+d),q&&ci([C,D,U],(t=>{d=fi(d,t," ")})),b&&it?b.createHTML(d):d},i.setConfig=function(){Dt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},i.clearConfig=function(){Et=null,Z=!1},i.isValidAttribute=function(t,e,i){Et||Dt({});const n=wt(t),a=wt(e);return Ht(n,a,i)},i.addHook=function(t,e){"function"==typeof e&&gi(T[t],e)},i.removeHook=function(t,e){if(void 0!==e){const i=mi(T[t],e);return-1===i?void 0:ui(T[t],i,1)[0]}return di(T[t])},i.removeHooks=function(t){T[t]=[]},i.removeAllHooks=function(){T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();const Qi=({title:t,type:e,hideEmpty:i=!0})=>{const{useNotifications:o,useSetNotificationStatus:r,useIsUpdatingNotifications:l}=(0,a.useContext)(g),c=o[e],m=Object.entries(c.active),u=Object.entries(c.dismissed);if(0===c.total&&i)return null;const[p,h]=(0,a.useState)(!1),k=(t,e,i)=>(0,d.jsxs)("div",{className:Mt()("gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-border gtmkit-px-4 gtmkit-py-3 gtmkit-gap-x-16",{"gtmkit-border gtmkit-border-t-0":i},{"gtmkit-border-2":!i}),children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"gtmkit-font-bold gtmkit-mr-2",children:e.header}),(0,d.jsx)("span",{className:"gtmkit-text-sm",dangerouslySetInnerHTML:{__html:Zi.sanitize(e.message)}})]}),(0,d.jsxs)(s.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-1 !gtmkit-px-3 gtmkit-h-min",onClick:()=>r(e.id,i?"restore":"dismiss"),children:[(0,d.jsx)("span",{className:"gtmkit-text-sm",children:i?(0,n.__)("Restore","gtm-kit"):(0,n.__)("Dismiss","gtm-kit")}),l?(0,d.jsx)(s.Spinner,{}):null]})]},t);return(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:t,children:(0,d.jsx)(Ft,{count:c.active.length,important:"problem"===e})}),(0,d.jsxs)(be.Content,{className:"gtmkit-space-y-4",children:[m.map((([t,e])=>k(t,e,!1))),u.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-py gtmkit-font-bold gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-cursor-pointer",onClick:()=>h((t=>!t)),children:[(0,d.jsx)("span",{children:(0,n.sprintf)(
    2020// translators: %d is number %s can be either 'problem' or 'notification'.
    2121// translators: %d is number %s can be either 'problem' or 'notification'.
  • gtm-kit/tags/2.6.0/assets/admin/wizard.asset.php

    r3339414 r3366939  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '1d6aacb2e32304340d74');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '71fbbf5db87576bb67b1');
  • gtm-kit/tags/2.6.0/assets/admin/wizard.js

    r3339414 r3366939  
    1 (()=>{"use strict";var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var a in i)t.o(i,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:i[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.ReactDOM,i=window.wp.element,a=window.wp.components,n=window.lodash,s=window.wp.apiFetch;var r=t.n(s);r().use(r().createNonceMiddleware(window.gtmkitSettings.nonce)),r().use(r().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,i=null,a=!1)=>{let n={};try{n=await r()({path:t,method:e,...i&&{data:i}})}catch(i){return{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===a?n:!0===n.success?n.data:{}},l=window.wp.i18n,c=(t,e)=>{const i={...t};switch(e.type){case"FETCH_SETTINGS":i.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},i.stateSettings=e.payload.stateSettings,i.siteData=e.payload.siteData,i.notifications=e.payload.notifications,i.installData=e.payload.installData,i.isPending=!1,i.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(i.notice=(0,l.__)("An error occurred.","gtm-kit"),i.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":i.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":i.fetchedSettings=e.payload.fetchedSettings,i.stateSettings=e.payload.stateSettings,i.isPending=!1,i.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,i.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,l.__)("An error occurred.","gtm-kit"):(0,l.__)("Saved Successfully.","gtm-kit"),i.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":i.fetchedSettings=e.payload.fetchedSettings||i.fetchedSettings,i.stateSettings=e.payload.stateSettings||i.stateSettings,i.isPending=e.payload.isPending||i.isPending,i.notice=e.payload.notice||i.notice,i.hasError=e.payload.hasError||i.hasError,i.canSave=e.payload.canSave||i.canSave,i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData,i.supportTicket=e.payload.supportTicket||i.supportTicket,i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey,i.licenseKey=e.payload.licenseKey||i.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData;break;case"SEND_SUPPORT_DATA":i.isSendingSystemData=!1,i.isSystemDataSent=e.payload.isSystemDataSent||i.isSystemDataSent,i.systemDataMessage=e.payload.systemDataMessage||i.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":i.isSendingLicenseKey=!1,i.isLicenseKeySent=e.payload.isLicenseKeySent||i.isLicenseKeySent,i.licenseKeyMessage=e.payload.licenseKeyMessage||i.licenseKeyMessage;break;case"SEND_NOTIFICATION_STATUS_BEFORE":i.isUpdatingNotifications=e.payload.isUpdatingNotifications||i.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":i.isUpdatingNotifications=!1,i.notifications=e.payload.notifications||i.Notifications}return i},m=window.ReactJSXRuntime,g=(0,i.createContext)(),d=t=>{const[e,a]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),s=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},i=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},n="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};a({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:i,installData:n}})},r=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(i=e.stateSettings,o("gtmkit/v1/set-options","POST",i));var i;a({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:r,useUpdateStateSettings:async(t,i,a)=>{const s=JSON.parse(JSON.stringify(e.stateSettings));let o;s[t][i]=a,o=!(0,n.isEqual)(s,e.fetchedSettings),r({stateSettings:s,canSave:o})},useImportSettings:async(t,i)=>{const a=JSON.parse(JSON.stringify(e.stateSettings));let s;const o={};o.general={...a.general,...i.general},"integrations"in i&&(o.integrations={...a.integrations,...i.integrations}),s=!(0,n.isEqual)(o,e.fetchedSettings),r({stateSettings:o,canSave:s})},useUpdateSupportTicket:async t=>{r({supportTicket:t})},useSendSystemData:async()=>{a({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(i=e.supportTicket,o("gtmkit/v1/send-support-data","POST",i,!0));var i;a({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{r({licenseKey:t})},useSendLicenseKey:async()=>{a({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(i=e.licenseKey,o("gtmkit/v1/send-license-key","POST",i,!0));var i;a({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{a({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:"remove"!==e}});const i={"notification-id":t,action:e},n=await(t=>o("gtmkit/v1/set-notification-status","POST",t,!0))(i),s=n.data.metrics.total,r=document.querySelectorAll("li.toplevel_page_gtmkit_general span.menu-counter");r&&r.forEach((t=>{const e=t.querySelector("span.count");e&&(e.textContent=s),t.className=t.className.replace(/count-\d+/,`count-${s}`)})),a({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,notifications:n.data}})},useSettings:e.stateSettings,useIsPending:e.isPending,useNotice:e.notice,useHasError:e.hasError,useCanSave:e.canSave,useSiteData:e.siteData,useInstallData:e.installData,useIsSending:e.isSendingSystemData,useSupportTicket:e.supportTicket,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage,useIsSendingLicenseKey:e.isSendingLicenseKey,useLicenseKey:e.licenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage,useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,m.jsx)(g.Provider,{value:l,children:t.children})},u=window.React;function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},p.apply(this,arguments)}var h;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(h||(h={}));const k="popstate";function x(t,e){if(!1===t||null==t)throw new Error(e)}function y(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function S(t,e){return{usr:t.state,key:t.key,idx:e}}function f(t,e,i,a){return void 0===i&&(i=null),p({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?N(e):e,{state:i,key:e&&e.key||a||Math.random().toString(36).substr(2,8)})}function j(t){let{pathname:e="/",search:i="",hash:a=""}=t;return i&&"?"!==i&&(e+="?"===i.charAt(0)?i:"?"+i),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function N(t){let e={};if(t){let i=t.indexOf("#");i>=0&&(e.hash=t.substr(i),t=t.substr(0,i));let a=t.indexOf("?");a>=0&&(e.search=t.substr(a),t=t.substr(0,a)),t&&(e.pathname=t)}return e}var M;function v(t,e,i){return void 0===i&&(i="/"),function(t,e,i,a){let n=z(("string"==typeof e?N(e):e).pathname||"/",i);if(null==n)return null;let s=_(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,i)=>t===e[i]))?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=P(n);r=U(s[t],e,a)}return r}(t,e,i,!1)}function _(t,e,i,a){void 0===e&&(e=[]),void 0===i&&(i=[]),void 0===a&&(a="");let n=(t,n,s)=>{let r={relativePath:void 0===s?t.path||"":s,caseSensitive:!0===t.caseSensitive,childrenIndex:n,route:t};r.relativePath.startsWith("/")&&(x(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=K([a,r.relativePath]),l=i.concat(r);t.children&&t.children.length>0&&(x(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),_(t.children,e,l,o)),(null!=t.path||t.index)&&e.push({path:o,score:O(o,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var i;if(""!==t.path&&null!=(i=t.path)&&i.includes("?"))for(let i of w(t.path))n(t,e,i);else n(t,e)})),e}function w(t){let e=t.split("/");if(0===e.length)return[];let[i,...a]=e,n=i.endsWith("?"),s=i.replace(/\?$/,"");if(0===a.length)return n?[s,""]:[s];let r=w(a.join("/")),o=[];return o.push(...r.map((t=>""===t?s:[s,t].join("/")))),n&&o.push(...r),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(M||(M={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const b=/^:[\w-]+$/,T=3,L=2,E=1,D=10,I=-2,C=t=>"*"===t;function O(t,e){let i=t.split("/"),a=i.length;return i.some(C)&&(a+=I),e&&(a+=L),i.filter((t=>!C(t))).reduce(((t,e)=>t+(b.test(e)?T:""===e?E:D)),a)}function U(t,e,i){void 0===i&&(i=!1);let{routesMeta:a}=t,n={},s="/",r=[];for(let t=0;t<a.length;++t){let o=a[t],l=t===a.length-1,c="/"===s?e:e.slice(s.length)||"/",m=A({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},c),g=o.route;if(!m&&l&&i&&!a[a.length-1].route.index&&(m=A({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},c)),!m)return null;Object.assign(n,m.params),r.push({params:n,pathname:K([s,m.pathname]),pathnameBase:F(K([s,m.pathnameBase])),route:g}),"/"!==m.pathnameBase&&(s=K([s,m.pathnameBase]))}return r}function A(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[i,a]=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0),y("*"===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=[],n="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,i)=>(a.push({paramName:e,isOptional:null!=i}),i?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(a.push({paramName:"*"}),n+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?n+="\\/*$":""!==t&&"/"!==t&&(n+="(?:(?=\\/|$))"),[new RegExp(n,e?void 0:"i"),a]}(t.path,t.caseSensitive,t.end),n=e.match(i);if(!n)return null;let s=n[0],r=s.replace(/(.)\/+$/,"$1"),o=n.slice(1);return{params:a.reduce(((t,e,i)=>{let{paramName:a,isOptional:n}=e;if("*"===a){let t=o[i]||"";r=s.slice(0,s.length-t.length).replace(/(.)\/+$/,"$1")}const l=o[i];return t[a]=n&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:s,pathnameBase:r,pattern:t}}function P(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return y(!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 i=e.endsWith("/")?e.length-1:e.length,a=t.charAt(i);return a&&"/"!==a?null:t.slice(i)||"/"}function R(t,e,i,a){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(a)+"].  Please separate it out to the `to."+i+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function G(t,e){let i=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?i.map(((t,e)=>e===i.length-1?t.pathname:t.pathnameBase)):i.map((t=>t.pathnameBase))}function B(t,e,i,a){let n;void 0===a&&(a=!1),"string"==typeof t?n=N(t):(n=p({},t),x(!n.pathname||!n.pathname.includes("?"),R("?","pathname","search",n)),x(!n.pathname||!n.pathname.includes("#"),R("#","pathname","hash",n)),x(!n.search||!n.search.includes("#"),R("#","search","hash",n)));let s,r=""===t||""===n.pathname,o=r?"/":n.pathname;if(null==o)s=i;else{let t=e.length-1;if(!a&&o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;n.pathname=e.join("/")}s=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:i,search:a="",hash:n=""}="string"==typeof t?N(t):t,s=i?i.startsWith("/")?i:function(t,e){let i=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?i.length>1&&i.pop():"."!==t&&i.push(t)})),i.length>1?i.join("/"):"/"}(i,e):e;return{pathname:s,search:Y(a),hash:W(n)}}(n,s),c=o&&"/"!==o&&o.endsWith("/"),m=(r||"."===o)&&i.endsWith("/");return l.pathname.endsWith("/")||!c&&!m||(l.pathname+="/"),l}const K=t=>t.join("/").replace(/\/\/+/g,"/"),F=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Y=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",W=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const Q=["post","put","patch","delete"],$=(new Set(Q),["get",...Q]);function H(){return H=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},H.apply(this,arguments)}new Set($),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const J=u.createContext(null),Z=u.createContext(null),V=u.createContext(null),X=u.createContext(null),q=u.createContext({outlet:null,matches:[],isDataRoute:!1}),tt=u.createContext(null);function et(){return null!=u.useContext(X)}function it(){return et()||x(!1),u.useContext(X).location}function at(t){u.useContext(V).static||u.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=u.useContext(q);return t?function(){let{router:t}=function(){let t=u.useContext(J);return t||x(!1),t}(mt.UseNavigateStable),e=dt(gt.UseNavigateStable),i=u.useRef(!1);return at((()=>{i.current=!0})),u.useCallback((function(a,n){void 0===n&&(n={}),i.current&&("number"==typeof a?t.navigate(a):t.navigate(a,H({fromRouteId:e},n)))}),[t,e])}():function(){et()||x(!1);let t=u.useContext(J),{basename:e,future:i,navigator:a}=u.useContext(V),{matches:n}=u.useContext(q),{pathname:s}=it(),r=JSON.stringify(G(n,i.v7_relativeSplatPath)),o=u.useRef(!1);return at((()=>{o.current=!0})),u.useCallback((function(i,n){if(void 0===n&&(n={}),!o.current)return;if("number"==typeof i)return void a.go(i);let l=B(i,JSON.parse(r),s,"path"===n.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:K([e,l.pathname])),(n.replace?a.replace:a.push)(l,n.state,n)}),[e,a,r,s,t])}()}function st(t,e,i,a){et()||x(!1);let{navigator:n,static:s}=u.useContext(V),{matches:r}=u.useContext(q),o=r[r.length-1],l=o?o.params:{},c=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let m,g=it();if(e){var d;let t="string"==typeof e?N(e):e;"/"===c||(null==(d=t.pathname)?void 0:d.startsWith(c))||x(!1),m=t}else m=g;let p=m.pathname||"/",k=p;if("/"!==c){let t=c.replace(/^\//,"").split("/");k="/"+p.replace(/^\//,"").split("/").slice(t.length).join("/")}let y=!s&&i&&i.matches&&i.matches.length>0?i.matches:v(t,{pathname:k}),S=function(t,e,i,a){var n;if(void 0===e&&(e=[]),void 0===i&&(i=null),void 0===a&&(a=null),null==t){var s;if(!i)return null;if(i.errors)t=i.matches;else{if(!(null!=(s=a)&&s.v7_partialHydration&&0===e.length&&!i.initialized&&i.matches.length>0))return null;t=i.matches}}let r=t,o=null==(n=i)?void 0:n.errors;if(null!=o){let t=r.findIndex((t=>t.route.id&&void 0!==(null==o?void 0:o[t.route.id])));t>=0||x(!1),r=r.slice(0,Math.min(r.length,t+1))}let l=!1,c=-1;if(i&&a&&a.v7_partialHydration)for(let t=0;t<r.length;t++){let e=r[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:a}=i,n=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||n){l=!0,r=c>=0?r.slice(0,c+1):[r[0]];break}}}return r.reduceRight(((t,a,n)=>{let s,m=!1,g=null,d=null;var p;i&&(s=o&&a.route.id?o[a.route.id]:void 0,g=a.route.errorElement||ot,l&&(c<0&&0===n?(ut[p="route-fallback"]||(ut[p]=!0),m=!0,d=null):c===n&&(m=!0,d=a.route.hydrateFallbackElement||null)));let h=e.concat(r.slice(0,n+1)),k=()=>{let e;return e=s?g:m?d:a.route.Component?u.createElement(a.route.Component,null):a.route.element?a.route.element:t,u.createElement(ct,{match:a,routeContext:{outlet:t,matches:h,isDataRoute:null!=i},children:e})};return i&&(a.route.ErrorBoundary||a.route.errorElement||0===n)?u.createElement(lt,{location:i.location,revalidation:i.revalidation,component:g,error:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},l,t.params),pathname:K([c,n.encodeLocation?n.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?c:K([c,n.encodeLocation?n.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),r,i,a);return e&&S?u.createElement(X.Provider,{value:{location:H({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:h.Pop}},S):S}function rt(){let t=function(){var t;let e=u.useContext(tt),i=function(){let t=u.useContext(Z);return t||x(!1),t}(gt.UseRouteError),a=dt(gt.UseRouteError);return void 0!==e?e:null==(t=i.errors)?void 0:t[a]}(),e=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),i=t instanceof Error?t.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return u.createElement(u.Fragment,null,u.createElement("h2",null,"Unexpected Application Error!"),u.createElement("h3",{style:{fontStyle:"italic"}},e),i?u.createElement("pre",{style:a},i):null,null)}const ot=u.createElement(rt,null);class lt extends u.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?u.createElement(q.Provider,{value:this.props.routeContext},u.createElement(tt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ct(t){let{routeContext:e,match:i,children:a}=t,n=u.useContext(J);return n&&n.static&&n.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=i.route.id),u.createElement(q.Provider,{value:e},a)}var mt=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(mt||{}),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 dt(t){let e=function(){let t=u.useContext(q);return t||x(!1),t}(),i=e.matches[e.matches.length-1];return i.route.id||x(!1),i.route.id}const ut={};function pt(t){let{to:e,replace:i,state:a,relative:n}=t;et()||x(!1);let{future:s,static:r}=u.useContext(V),{matches:o}=u.useContext(q),{pathname:l}=it(),c=nt(),m=B(e,G(o,s.v7_relativeSplatPath),l,"path"===n),g=JSON.stringify(m);return u.useEffect((()=>c(JSON.parse(g),{replace:i,state:a,relative:n})),[c,g,n,i,a]),null}function ht(t){x(!1)}function kt(t){let{basename:e="/",children:i=null,location:a,navigationType:n=h.Pop,navigator:s,static:r=!1,future:o}=t;et()&&x(!1);let l=e.replace(/^\/*/,"/"),c=u.useMemo((()=>({basename:l,navigator:s,static:r,future:H({v7_relativeSplatPath:!1},o)})),[l,o,s,r]);"string"==typeof a&&(a=N(a));let{pathname:m="/",search:g="",hash:d="",state:p=null,key:k="default"}=a,y=u.useMemo((()=>{let t=z(m,l);return null==t?null:{location:{pathname:t,search:g,hash:d,state:p,key:k},navigationType:n}}),[l,m,g,d,p,k,n]);return null==y?null:u.createElement(V.Provider,{value:c},u.createElement(X.Provider,{children:i,value:y}))}function xt(t){let{children:e,location:i}=t;return st(yt(e),i)}function yt(t,e){void 0===e&&(e=[]);let i=[];return u.Children.forEach(t,((t,a)=>{if(!u.isValidElement(t))return;let n=[...e,a];if(t.type===u.Fragment)return void i.push.apply(i,yt(t.props.children,n));t.type!==ht&&x(!1),t.props.index&&t.props.children&&x(!1);let s={id:t.props.id||n.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=yt(t.props.children,n)),i.push(s)})),i}u.startTransition,new Promise((()=>{})),u.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(t){}new Map;const St=u.startTransition;function ft(t){let{basename:e,children:i,future:a,window:n}=t,s=u.useRef();var r;null==s.current&&(s.current=(void 0===(r={window:n,v5Compat:!0})&&(r={}),function(t,e,i,a){void 0===a&&(a={});let{window:n=document.defaultView,v5Compat:s=!1}=a,r=n.history,o=h.Pop,l=null,c=m();function m(){return(r.state||{idx:null}).idx}function g(){o=h.Pop;let t=m(),e=null==t?null:t-c;c=t,l&&l({action:o,location:u.location,delta:e})}function d(t){let e="null"!==n.location.origin?n.location.origin:n.location.href,i="string"==typeof t?t:j(t);return i=i.replace(/ $/,"%20"),x(e,"No window.location.(origin|href) available to create URL for href: "+i),new URL(i,e)}null==c&&(c=0,r.replaceState(p({},r.state,{idx:c}),""));let u={get action(){return o},get location(){return t(n,r)},listen(t){if(l)throw new Error("A history only accepts one active listener");return n.addEventListener(k,g),l=t,()=>{n.removeEventListener(k,g),l=null}},createHref:t=>e(n,t),createURL:d,encodeLocation(t){let e=d(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=h.Push;let a=f(u.location,t,e);i&&i(a,t),c=m()+1;let g=S(a,c),d=u.createHref(a);try{r.pushState(g,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;n.location.assign(d)}s&&l&&l({action:o,location:u.location,delta:1})},replace:function(t,e){o=h.Replace;let a=f(u.location,t,e);i&&i(a,t),c=m();let n=S(a,c),g=u.createHref(a);r.replaceState(n,"",g),s&&l&&l({action:o,location:u.location,delta:0})},go:t=>r.go(t)};return u}((function(t,e){let{pathname:i="/",search:a="",hash:n=""}=N(t.location.hash.substr(1));return i.startsWith("/")||i.startsWith(".")||(i="/"+i),f("",{pathname:i,search:a,hash:n},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let i=t.document.querySelector("base"),a="";if(i&&i.getAttribute("href")){let e=t.location.href,i=e.indexOf("#");a=-1===i?e:e.slice(0,i)}return a+"#"+("string"==typeof e?e:j(e))}),(function(t,e){y("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),r)));let o=s.current,[l,c]=u.useState({action:o.action,location:o.location}),{v7_startTransition:m}=a||{},g=u.useCallback((t=>{m&&St?St((()=>c(t))):c(t)}),[c,m]);return u.useLayoutEffect((()=>o.listen(g)),[o,g]),u.useEffect((()=>{return null==(t=a)||t.v7_startTransition,void 0!==(null==t?void 0:t.v7_relativeSplatPath)||e&&e.v7_relativeSplatPath,void(e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation));var t,e}),[a]),u.createElement(kt,{basename:e,children:i,location:l.location,navigationType:l.action,navigator:o,future:a})}var jt,Nt;e.flushSync,u.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"}(jt||(jt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Nt||(Nt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s}=(0,i.useContext)(g),r=nt();return(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-8",children:[(0,m.jsxs)("div",{className:"",children:[(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 ",children:(0,m.jsx)(a.TextControl,{label:(0,l.__)("Container ID","gtm-kit"),placeholder:(0,l.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>e("general","gtm_id",t)})}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),r("/essential-settings",{replace:!0})},disabled:s||!t.general.gtm_id.includes("-"),children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]}),(0,m.jsxs)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-color-grey gtmkit-text-center",children:[(0,m.jsx)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4",children:"Need help?"}),(0,m.jsxs)("p",{className:"gtmkit-mb-6",children:[(0,l.__)("Find your GTM container ID on","gtm-kit"),(0,m.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer",children:"Google Tag Manager"})]}),(0,m.jsxs)("p",{children:[(0,l.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"]})]})]})})},vt=()=>{const{useImportSettings:t,useIsPending:e,useInstallData:n}=(0,i.useContext)(g),[s,r]=(0,i.useState)(!0),o=Object.keys(n.import_data)[0],[c,d]=(0,i.useState)(o),u=[];return Object.keys(n.import_data).forEach((t=>{u.push({value:t,label:n.import_data[t].name})})),s?(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-8 gtmkit-my-8 gtmkit-text-left",children:[(0,m.jsx)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold",children:(0,l.__)("Would you like to import plugin settings?","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey",children:[(0,l.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,l.__)("Would you like to import your settings to GTM Kit?","gtm-kit")]}),(0,m.jsx)(a.RadioControl,{help:(0,l.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:c,options:u,onChange:t=>d(t)}),(0,m.jsxs)("div",{className:"gtmkit-flex gtmkit-mt-12",children:[(0,m.jsxs)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(c,n.import_data[c]),r(!1)},children:[(0,m.jsx)("span",{className:"gtmkit-text-lg gtmkit-font-bold",children:(0,l.__)("Yes","gtm-kit")}),e?(0,m.jsx)(a.Spinner,{}):""]}),(0,m.jsxs)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{r(!1)},children:[(0,m.jsx)("span",{className:"gtmkit-text-lg gtmkit-font-bold",children:(0,l.__)("No","gtm-kit")}),e?(0,m.jsx)(a.Spinner,{}):""]})]})]})}):(0,m.jsx)(Mt,{})},_t=()=>{const{useInstallData:t}=(0,i.useContext)(g),{firstInstall:e}=t,{importAvailable:a}=t;return(0,m.jsxs)("div",{className:"gtmkit-text-center",children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading",children:(0,l.__)("You've successfully installed GTM Kit!","gtm-kit")}),(0,m.jsx)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")})}),e&&a?(0,m.jsx)(vt,{}):(0,m.jsx)(Mt,{})]})},wt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s,useInstallData:r}=(0,i.useContext)(g),o=nt();return(0,m.jsxs)("div",{className:"gtmkit-text-center",children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading",children:(0,l.__)("Essential Settings","gtm-kit")}),(0,m.jsx)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("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,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Page type","gtm-kit"),id:"page-type",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("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:()=>{e("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}})})}),r.woocommerce_integration?(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{e("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}})})}):null,r.cf7_integration?(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{e("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}})})}):null,r.edd_integration?(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{e("integrations","edd_integration",!(t&&t.integrations.edd_integration))}})})}):null,(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),o("/share-anonymous-data",{replace:!0})},disabled:s,children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]})},bt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s,useSiteData:r}=(0,i.useContext)(g),o=nt();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("Help improve GTM Kit","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("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,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey",children:(0,l.__)("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,m.jsx)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm",children:(0,m.jsxs)("tbody",{children:[(0,m.jsxs)("tr",{className:"",children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Server type:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.web_server})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"PHP version number:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.php_version})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"WordPress version number:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.wordpress_version})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"WordPress multisite:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.multisite?(0,l.__)("Yes","gtm-kit"):(0,l.__)("No","gtm-kit")})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Current theme:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.current_theme})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Current site language:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.locale})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Active plugins:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("em",{children:"Plugin names of all active plugins"})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Anonymized GTM Kit settings:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("em",{children:"Which GTM Kit settings are active"})})]})]})}),(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto ",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{e("general","analytics_active",!(t&&t.general.analytics_active))}})})}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),o("/automatic-updates",{replace:!0})},disabled:s,children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]})},Tt=(t="general",e="")=>{const i=window.gtmkitSettings.adminPageUrl;return e?`${i}${t}#/${e}`:`${i}${t}`},Lt=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("You are ready to use GTM Kit!","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center",children:(0,l.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center",children:[(0,l.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "]}),(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-max-w-lg gtmkit-mx-auto gtmkit-mb-8",children:[(0,m.jsx)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2",children:(0,l.__)("Getting Started","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("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,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:Tt("templates"),rel:"noreferrer",children:(0,l.__)("Go to GTM Templates","gtm-kit")})]}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("To get the most out of Google Tag Manager with GTM Kit, you should also review the tutorials.","gtm-kit")," ",(0,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:Tt("help","help"),rel:"noreferrer",children:(0,l.__)("Go to Tutorials","gtm-kit")})]})]}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsx)(a.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=Tt("general")},children:(0,l.__)("Go to the dashboard","gtm-kit")})})]}),Et=[{step:1,path:"/welcome",element:"Welcome",title:(0,l.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,l.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,l.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/automatic-updates",element:"Automatic Updates",title:(0,l.__)("Automatic Updates","gtm-kit")},{step:5,path:"/getting-started",element:"GettingStarted",title:(0,l.__)("Getting Started","gtm-kit")}],Dt=({step:t,currentStep:e,totalSteps:i})=>{if(t===i)return;let a="gtmkit-h-0.5 gtmkit-w-full";return a+=t<e?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,m.jsx)("div",{className:a})},It=({step:t,currentStep:e,totalSteps:i})=>t<e||t===i?(0,m.jsx)("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",children:(0,m.jsx)("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===e?(0,m.jsx)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,Ct=({step:t,currentStep:e,totalSteps:i})=>{if(0===t)return;let a="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 a+=t<e||e===i?" gtmkit-bg-color-primary":" gtmkit-bg-white",a+=t>e?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full",children:(0,m.jsx)("span",{className:a,children:(0,m.jsx)(It,{step:t,currentStep:e,totalSteps:i})})}),(0,m.jsx)(Dt,{step:t,currentStep:e,totalSteps:i})]})},Ot=()=>{const t=Et.length-1+Et[0].step;let e=((t,e)=>{const i=Object.keys(e);return t.filter((function(t){for(let a=0;a<i.length;a++)if(!t.hasOwnProperty(i[a])||t[i[a]]!==e[i[a]])return!1;return!0}))})(Et,{path:it().pathname});return e=e.length?e[0].step:0,0===e?(0,m.jsx)("div",{className:"gtmkit-my-16"}):(0,m.jsx)("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",children:Et.map((function(i){return(0,m.jsx)(Ct,{step:i.step,currentStep:e,totalSteps:t},i.step)}))})},Ut=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("header",{className:"gtmkit-text-center gtmkit-px-3",children:(0,m.jsx)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[200px] gtmkit-inline-block",children:(0,m.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,l.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"})})}),(0,m.jsx)(Ot,{})]}),At=()=>(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey",children:(0,m.jsx)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max",children:(0,m.jsx)("a",{className:"gtmkit-underline",href:Tt(),children:(0,l.__)("Go to the dashboard.","gtm-kit")})})})}),Pt=({title:t,label:e,optionGroup:n="general",optionName:s,disabled:r=!1,useSettings:o,useUpdateStateSettings:l,narrow:c=!1,premium:g=!1,useSetNotificationStatus:d,notificationId:u=""})=>{const p=(0,i.useId)(),h="gtmkit-settings-field-wrap "+(c?"gtmkit-py-2":"gtmkit-py-4");return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("div",{className:h,children:(0,m.jsx)(a.BaseControl,{label:g?(0,m.jsxs)(m.Fragment,{children:[t,(0,m.jsx)("span",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-normal gtmkit-rounded-full gtmkit-py-0.5 gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"})]}):t,id:p,children:(0,m.jsx)(a.ToggleControl,{label:e,checked:!r&&o[n][s],onChange:()=>{l(n,s,!(o&&o[n][s])),u&&d(u,"remove")},disabled:r})})})})},zt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s,useSiteData:r}=(0,i.useContext)(g),o=nt();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("Automatic Updates","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("New releases of GTM Kit may contain important updates to comply with changes in Google Tag Manager or analytics in general. We recommend enabling automatic plugin updates for GTM Kit to ensure it is always up to date.","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey",children:(0,l.__)("You can, of course, manually update GTM Kit whenever it suits you, but we highly recommend that you regularly update your plugins and themes to the latest versions to keep your site secure.","gtm-kit")}),(0,m.jsx)("div",{className:"gtmkit-max-w-max gtmkit-mx-auto gtmkit-mt-12",children:(0,m.jsx)(Pt,{title:(0,l.__)("Enable Automatic Updates","gtm-kit"),label:(0,l.__)("Automatically update the GTM Kit plugin when new releases are available.","gtm-kit"),optionGroup:"misc",optionName:"auto_update",useSettings:t,useUpdateStateSettings:e})}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),o("/getting-started",{replace:!0})},disabled:s,children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]})},Rt=()=>{const{useSettings:t}=(0,i.useContext)(g);return Object.keys(t).length?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Ut,{}),(0,m.jsx)("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",children:(0,m.jsxs)(xt,{children:[(0,m.jsx)(ht,{exact:!0,path:"/welcome",element:(0,m.jsx)(_t,{})}),(0,m.jsx)(ht,{exact:!0,path:"/essential-settings",element:(0,m.jsx)(wt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/share-anonymous-data",element:(0,m.jsx)(bt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/automatic-updates",element:(0,m.jsx)(zt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/getting-started",element:(0,m.jsx)(Lt,{})}),(0,m.jsx)(ht,{path:"/",element:(0,m.jsx)(pt,{replace:!0,to:"/welcome"})})]})}),(0,m.jsx)(At,{})]}):(0,m.jsx)(a.Spinner,{className:"gtm-kit-settings-page-loader"})},Gt=()=>(0,m.jsx)(ft,{basename:"/",children:(0,m.jsx)(d,{children:(0,m.jsx)(Rt,{})})});document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,e.createRoot)(t).render((0,m.jsx)(Gt,{}))}))})();
     1(()=>{"use strict";var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var a in i)t.o(i,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:i[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.ReactDOM,i=window.wp.element,a=window.wp.components,n=window.lodash,s=window.wp.apiFetch;var r=t.n(s);r().use(r().createNonceMiddleware(window.gtmkitSettings.nonce)),r().use(r().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,i=null,a=!1)=>{let n={};try{n=await r()({path:t,method:e,...i&&{data:i}})}catch(i){return{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===a?n:!0===n.success?n.data:{}},l=window.wp.i18n,c=(t,e)=>{const i={...t};switch(e.type){case"FETCH_SETTINGS":i.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},i.stateSettings=e.payload.stateSettings,i.siteData=e.payload.siteData,i.notifications=e.payload.notifications,i.installData=e.payload.installData,i.isPending=!1,i.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(i.notice=(0,l.__)("An error occurred.","gtm-kit"),i.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":i.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":i.fetchedSettings=e.payload.fetchedSettings,i.stateSettings=e.payload.stateSettings,i.isPending=!1,i.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,i.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,l.__)("An error occurred.","gtm-kit"):(0,l.__)("Saved Successfully.","gtm-kit"),i.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":i.fetchedSettings=e.payload.fetchedSettings||i.fetchedSettings,i.stateSettings=e.payload.stateSettings||i.stateSettings,i.isPending=e.payload.isPending||i.isPending,i.notice=e.payload.notice||i.notice,i.hasError=e.payload.hasError||i.hasError,i.canSave=e.payload.canSave||i.canSave,i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData,i.supportTicket=e.payload.supportTicket||i.supportTicket,i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey,i.licenseKey=e.payload.licenseKey||i.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData;break;case"SEND_SUPPORT_DATA":i.isSendingSystemData=!1,i.isSystemDataSent=e.payload.isSystemDataSent||i.isSystemDataSent,i.systemDataMessage=e.payload.systemDataMessage||i.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":i.isSendingLicenseKey=!1,i.isLicenseKeySent=e.payload.isLicenseKeySent||i.isLicenseKeySent,i.licenseKeyMessage=e.payload.licenseKeyMessage||i.licenseKeyMessage;break;case"SEND_NOTIFICATION_STATUS_BEFORE":i.isUpdatingNotifications=e.payload.isUpdatingNotifications||i.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":i.isUpdatingNotifications=!1,i.notifications=e.payload.notifications||i.Notifications}return i},m=window.ReactJSXRuntime,g=(0,i.createContext)(),d=t=>{const[e,a]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),s=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},i=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},n="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};a({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:i,installData:n}})},r=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(i=e.stateSettings,o("gtmkit/v1/set-options","POST",i));var i;a({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:r,useUpdateStateSettings:async(t,i,a)=>{const s=JSON.parse(JSON.stringify(e.stateSettings));let o;s[t][i]=a,o=!(0,n.isEqual)(s,e.fetchedSettings),r({stateSettings:s,canSave:o})},useImportSettings:async(t,i)=>{const a=JSON.parse(JSON.stringify(e.stateSettings));let s;const o={};o.general={...a.general,...i.general},"integrations"in i&&(o.integrations={...a.integrations,...i.integrations}),s=!(0,n.isEqual)(o,e.fetchedSettings),r({stateSettings:o,canSave:s})},useUpdateSupportTicket:async t=>{r({supportTicket:t})},useSendSystemData:async()=>{a({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(i=e.supportTicket,o("gtmkit/v1/send-support-data","POST",i,!0));var i;a({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{r({licenseKey:t})},useSendLicenseKey:async()=>{a({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(i=e.licenseKey,o("gtmkit/v1/send-license-key","POST",i,!0));var i;a({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{a({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:"remove"!==e}});const i={"notification-id":t,action:e},n=await(t=>o("gtmkit/v1/set-notification-status","POST",t,!0))(i),s=n.data.metrics.total,r=document.querySelectorAll("li.toplevel_page_gtmkit_general span.menu-counter");r&&r.forEach((t=>{const e=t.querySelector("span.count");e&&(e.textContent=s),t.className=t.className.replace(/count-\d+/,`count-${s}`)})),a({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,notifications:n.data}})},useSettings:e.stateSettings,useIsPending:e.isPending,useNotice:e.notice,useHasError:e.hasError,useCanSave:e.canSave,useSiteData:e.siteData,useInstallData:e.installData,useIsSending:e.isSendingSystemData,useSupportTicket:e.supportTicket,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage,useIsSendingLicenseKey:e.isSendingLicenseKey,useLicenseKey:e.licenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage,useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,m.jsx)(g.Provider,{value:l,children:t.children})},u=window.React;function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},p.apply(this,arguments)}var h;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(h||(h={}));const k="popstate";function x(t,e){if(!1===t||null==t)throw new Error(e)}function y(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function S(t,e){return{usr:t.state,key:t.key,idx:e}}function f(t,e,i,a){return void 0===i&&(i=null),p({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?N(e):e,{state:i,key:e&&e.key||a||Math.random().toString(36).substr(2,8)})}function j(t){let{pathname:e="/",search:i="",hash:a=""}=t;return i&&"?"!==i&&(e+="?"===i.charAt(0)?i:"?"+i),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function N(t){let e={};if(t){let i=t.indexOf("#");i>=0&&(e.hash=t.substr(i),t=t.substr(0,i));let a=t.indexOf("?");a>=0&&(e.search=t.substr(a),t=t.substr(0,a)),t&&(e.pathname=t)}return e}var M;function v(t,e,i){return void 0===i&&(i="/"),function(t,e,i,a){let n=z(("string"==typeof e?N(e):e).pathname||"/",i);if(null==n)return null;let s=_(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,i)=>t===e[i]))?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=P(n);r=U(s[t],e,a)}return r}(t,e,i,!1)}function _(t,e,i,a){void 0===e&&(e=[]),void 0===i&&(i=[]),void 0===a&&(a="");let n=(t,n,s)=>{let r={relativePath:void 0===s?t.path||"":s,caseSensitive:!0===t.caseSensitive,childrenIndex:n,route:t};r.relativePath.startsWith("/")&&(x(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=K([a,r.relativePath]),l=i.concat(r);t.children&&t.children.length>0&&(x(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),_(t.children,e,l,o)),(null!=t.path||t.index)&&e.push({path:o,score:O(o,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var i;if(""!==t.path&&null!=(i=t.path)&&i.includes("?"))for(let i of w(t.path))n(t,e,i);else n(t,e)})),e}function w(t){let e=t.split("/");if(0===e.length)return[];let[i,...a]=e,n=i.endsWith("?"),s=i.replace(/\?$/,"");if(0===a.length)return n?[s,""]:[s];let r=w(a.join("/")),o=[];return o.push(...r.map((t=>""===t?s:[s,t].join("/")))),n&&o.push(...r),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(M||(M={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const b=/^:[\w-]+$/,T=3,L=2,E=1,D=10,I=-2,C=t=>"*"===t;function O(t,e){let i=t.split("/"),a=i.length;return i.some(C)&&(a+=I),e&&(a+=L),i.filter((t=>!C(t))).reduce(((t,e)=>t+(b.test(e)?T:""===e?E:D)),a)}function U(t,e,i){void 0===i&&(i=!1);let{routesMeta:a}=t,n={},s="/",r=[];for(let t=0;t<a.length;++t){let o=a[t],l=t===a.length-1,c="/"===s?e:e.slice(s.length)||"/",m=A({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},c),g=o.route;if(!m&&l&&i&&!a[a.length-1].route.index&&(m=A({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},c)),!m)return null;Object.assign(n,m.params),r.push({params:n,pathname:K([s,m.pathname]),pathnameBase:F(K([s,m.pathnameBase])),route:g}),"/"!==m.pathnameBase&&(s=K([s,m.pathnameBase]))}return r}function A(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[i,a]=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0),y("*"===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=[],n="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,i)=>(a.push({paramName:e,isOptional:null!=i}),i?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(a.push({paramName:"*"}),n+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?n+="\\/*$":""!==t&&"/"!==t&&(n+="(?:(?=\\/|$))"),[new RegExp(n,e?void 0:"i"),a]}(t.path,t.caseSensitive,t.end),n=e.match(i);if(!n)return null;let s=n[0],r=s.replace(/(.)\/+$/,"$1"),o=n.slice(1);return{params:a.reduce(((t,e,i)=>{let{paramName:a,isOptional:n}=e;if("*"===a){let t=o[i]||"";r=s.slice(0,s.length-t.length).replace(/(.)\/+$/,"$1")}const l=o[i];return t[a]=n&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:s,pathnameBase:r,pattern:t}}function P(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return y(!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 i=e.endsWith("/")?e.length-1:e.length,a=t.charAt(i);return a&&"/"!==a?null:t.slice(i)||"/"}function R(t,e,i,a){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(a)+"].  Please separate it out to the `to."+i+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function G(t,e){let i=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?i.map(((t,e)=>e===i.length-1?t.pathname:t.pathnameBase)):i.map((t=>t.pathnameBase))}function B(t,e,i,a){let n;void 0===a&&(a=!1),"string"==typeof t?n=N(t):(n=p({},t),x(!n.pathname||!n.pathname.includes("?"),R("?","pathname","search",n)),x(!n.pathname||!n.pathname.includes("#"),R("#","pathname","hash",n)),x(!n.search||!n.search.includes("#"),R("#","search","hash",n)));let s,r=""===t||""===n.pathname,o=r?"/":n.pathname;if(null==o)s=i;else{let t=e.length-1;if(!a&&o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;n.pathname=e.join("/")}s=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:i,search:a="",hash:n=""}="string"==typeof t?N(t):t,s=i?i.startsWith("/")?i:function(t,e){let i=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?i.length>1&&i.pop():"."!==t&&i.push(t)})),i.length>1?i.join("/"):"/"}(i,e):e;return{pathname:s,search:Y(a),hash:W(n)}}(n,s),c=o&&"/"!==o&&o.endsWith("/"),m=(r||"."===o)&&i.endsWith("/");return l.pathname.endsWith("/")||!c&&!m||(l.pathname+="/"),l}const K=t=>t.join("/").replace(/\/\/+/g,"/"),F=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Y=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",W=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const Q=["post","put","patch","delete"],$=(new Set(Q),["get",...Q]);function H(){return H=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},H.apply(this,arguments)}new Set($),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const J=u.createContext(null),Z=u.createContext(null),V=u.createContext(null),X=u.createContext(null),q=u.createContext({outlet:null,matches:[],isDataRoute:!1}),tt=u.createContext(null);function et(){return null!=u.useContext(X)}function it(){return et()||x(!1),u.useContext(X).location}function at(t){u.useContext(V).static||u.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=u.useContext(q);return t?function(){let{router:t}=function(){let t=u.useContext(J);return t||x(!1),t}(mt.UseNavigateStable),e=dt(gt.UseNavigateStable),i=u.useRef(!1);return at((()=>{i.current=!0})),u.useCallback((function(a,n){void 0===n&&(n={}),i.current&&("number"==typeof a?t.navigate(a):t.navigate(a,H({fromRouteId:e},n)))}),[t,e])}():function(){et()||x(!1);let t=u.useContext(J),{basename:e,future:i,navigator:a}=u.useContext(V),{matches:n}=u.useContext(q),{pathname:s}=it(),r=JSON.stringify(G(n,i.v7_relativeSplatPath)),o=u.useRef(!1);return at((()=>{o.current=!0})),u.useCallback((function(i,n){if(void 0===n&&(n={}),!o.current)return;if("number"==typeof i)return void a.go(i);let l=B(i,JSON.parse(r),s,"path"===n.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:K([e,l.pathname])),(n.replace?a.replace:a.push)(l,n.state,n)}),[e,a,r,s,t])}()}function st(t,e,i,a){et()||x(!1);let{navigator:n}=u.useContext(V),{matches:s}=u.useContext(q),r=s[s.length-1],o=r?r.params:{},l=(r&&r.pathname,r?r.pathnameBase:"/");r&&r.route;let c,m=it();if(e){var g;let t="string"==typeof e?N(e):e;"/"===l||(null==(g=t.pathname)?void 0:g.startsWith(l))||x(!1),c=t}else c=m;let d=c.pathname||"/",p=d;if("/"!==l){let t=l.replace(/^\//,"").split("/");p="/"+d.replace(/^\//,"").split("/").slice(t.length).join("/")}let k=v(t,{pathname:p}),y=function(t,e,i,a){var n;if(void 0===e&&(e=[]),void 0===i&&(i=null),void 0===a&&(a=null),null==t){var s;if(!i)return null;if(i.errors)t=i.matches;else{if(!(null!=(s=a)&&s.v7_partialHydration&&0===e.length&&!i.initialized&&i.matches.length>0))return null;t=i.matches}}let r=t,o=null==(n=i)?void 0:n.errors;if(null!=o){let t=r.findIndex((t=>t.route.id&&void 0!==(null==o?void 0:o[t.route.id])));t>=0||x(!1),r=r.slice(0,Math.min(r.length,t+1))}let l=!1,c=-1;if(i&&a&&a.v7_partialHydration)for(let t=0;t<r.length;t++){let e=r[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:a}=i,n=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||n){l=!0,r=c>=0?r.slice(0,c+1):[r[0]];break}}}return r.reduceRight(((t,a,n)=>{let s,m=!1,g=null,d=null;var p;i&&(s=o&&a.route.id?o[a.route.id]:void 0,g=a.route.errorElement||ot,l&&(c<0&&0===n?(ut[p="route-fallback"]||(ut[p]=!0),m=!0,d=null):c===n&&(m=!0,d=a.route.hydrateFallbackElement||null)));let h=e.concat(r.slice(0,n+1)),k=()=>{let e;return e=s?g:m?d:a.route.Component?u.createElement(a.route.Component,null):a.route.element?a.route.element:t,u.createElement(ct,{match:a,routeContext:{outlet:t,matches:h,isDataRoute:null!=i},children:e})};return i&&(a.route.ErrorBoundary||a.route.errorElement||0===n)?u.createElement(lt,{location:i.location,revalidation:i.revalidation,component:g,error:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},o,t.params),pathname:K([l,n.encodeLocation?n.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:K([l,n.encodeLocation?n.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),s,i,a);return e&&y?u.createElement(X.Provider,{value:{location:H({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:h.Pop}},y):y}function rt(){let t=function(){var t;let e=u.useContext(tt),i=function(){let t=u.useContext(Z);return t||x(!1),t}(gt.UseRouteError),a=dt(gt.UseRouteError);return void 0!==e?e:null==(t=i.errors)?void 0:t[a]}(),e=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),i=t instanceof Error?t.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return u.createElement(u.Fragment,null,u.createElement("h2",null,"Unexpected Application Error!"),u.createElement("h3",{style:{fontStyle:"italic"}},e),i?u.createElement("pre",{style:a},i):null,null)}const ot=u.createElement(rt,null);class lt extends u.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?u.createElement(q.Provider,{value:this.props.routeContext},u.createElement(tt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ct(t){let{routeContext:e,match:i,children:a}=t,n=u.useContext(J);return n&&n.static&&n.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=i.route.id),u.createElement(q.Provider,{value:e},a)}var mt=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(mt||{}),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 dt(t){let e=function(){let t=u.useContext(q);return t||x(!1),t}(),i=e.matches[e.matches.length-1];return i.route.id||x(!1),i.route.id}const ut={};function pt(t){let{to:e,replace:i,state:a,relative:n}=t;et()||x(!1);let{future:s,static:r}=u.useContext(V),{matches:o}=u.useContext(q),{pathname:l}=it(),c=nt(),m=B(e,G(o,s.v7_relativeSplatPath),l,"path"===n),g=JSON.stringify(m);return u.useEffect((()=>c(JSON.parse(g),{replace:i,state:a,relative:n})),[c,g,n,i,a]),null}function ht(t){x(!1)}function kt(t){let{basename:e="/",children:i=null,location:a,navigationType:n=h.Pop,navigator:s,static:r=!1,future:o}=t;et()&&x(!1);let l=e.replace(/^\/*/,"/"),c=u.useMemo((()=>({basename:l,navigator:s,static:r,future:H({v7_relativeSplatPath:!1},o)})),[l,o,s,r]);"string"==typeof a&&(a=N(a));let{pathname:m="/",search:g="",hash:d="",state:p=null,key:k="default"}=a,y=u.useMemo((()=>{let t=z(m,l);return null==t?null:{location:{pathname:t,search:g,hash:d,state:p,key:k},navigationType:n}}),[l,m,g,d,p,k,n]);return null==y?null:u.createElement(V.Provider,{value:c},u.createElement(X.Provider,{children:i,value:y}))}function xt(t){let{children:e,location:i}=t;return st(yt(e),i)}function yt(t,e){void 0===e&&(e=[]);let i=[];return u.Children.forEach(t,((t,a)=>{if(!u.isValidElement(t))return;let n=[...e,a];if(t.type===u.Fragment)return void i.push.apply(i,yt(t.props.children,n));t.type!==ht&&x(!1),t.props.index&&t.props.children&&x(!1);let s={id:t.props.id||n.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=yt(t.props.children,n)),i.push(s)})),i}u.startTransition,new Promise((()=>{})),u.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(t){}new Map;const St=u.startTransition;function ft(t){let{basename:e,children:i,future:a,window:n}=t,s=u.useRef();var r;null==s.current&&(s.current=(void 0===(r={window:n,v5Compat:!0})&&(r={}),function(t,e,i,a){void 0===a&&(a={});let{window:n=document.defaultView,v5Compat:s=!1}=a,r=n.history,o=h.Pop,l=null,c=m();function m(){return(r.state||{idx:null}).idx}function g(){o=h.Pop;let t=m(),e=null==t?null:t-c;c=t,l&&l({action:o,location:u.location,delta:e})}function d(t){let e="null"!==n.location.origin?n.location.origin:n.location.href,i="string"==typeof t?t:j(t);return i=i.replace(/ $/,"%20"),x(e,"No window.location.(origin|href) available to create URL for href: "+i),new URL(i,e)}null==c&&(c=0,r.replaceState(p({},r.state,{idx:c}),""));let u={get action(){return o},get location(){return t(n,r)},listen(t){if(l)throw new Error("A history only accepts one active listener");return n.addEventListener(k,g),l=t,()=>{n.removeEventListener(k,g),l=null}},createHref:t=>e(n,t),createURL:d,encodeLocation(t){let e=d(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=h.Push;let a=f(u.location,t,e);i&&i(a,t),c=m()+1;let g=S(a,c),d=u.createHref(a);try{r.pushState(g,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;n.location.assign(d)}s&&l&&l({action:o,location:u.location,delta:1})},replace:function(t,e){o=h.Replace;let a=f(u.location,t,e);i&&i(a,t),c=m();let n=S(a,c),g=u.createHref(a);r.replaceState(n,"",g),s&&l&&l({action:o,location:u.location,delta:0})},go:t=>r.go(t)};return u}((function(t,e){let{pathname:i="/",search:a="",hash:n=""}=N(t.location.hash.substr(1));return i.startsWith("/")||i.startsWith(".")||(i="/"+i),f("",{pathname:i,search:a,hash:n},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let i=t.document.querySelector("base"),a="";if(i&&i.getAttribute("href")){let e=t.location.href,i=e.indexOf("#");a=-1===i?e:e.slice(0,i)}return a+"#"+("string"==typeof e?e:j(e))}),(function(t,e){y("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),r)));let o=s.current,[l,c]=u.useState({action:o.action,location:o.location}),{v7_startTransition:m}=a||{},g=u.useCallback((t=>{m&&St?St((()=>c(t))):c(t)}),[c,m]);return u.useLayoutEffect((()=>o.listen(g)),[o,g]),u.useEffect((()=>{return null==(t=a)||t.v7_startTransition,void 0===(null==t?void 0:t.v7_relativeSplatPath)&&(!e||e.v7_relativeSplatPath),void(e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation));var t,e}),[a]),u.createElement(kt,{basename:e,children:i,location:l.location,navigationType:l.action,navigator:o,future:a})}var jt,Nt;e.flushSync,u.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"}(jt||(jt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Nt||(Nt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s}=(0,i.useContext)(g),r=nt();return(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-8",children:[(0,m.jsxs)("div",{className:"",children:[(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 ",children:(0,m.jsx)(a.TextControl,{label:(0,l.__)("Container ID","gtm-kit"),placeholder:(0,l.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>e("general","gtm_id",t)})}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),r("/essential-settings",{replace:!0})},disabled:s||!t.general.gtm_id.includes("-"),children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]}),(0,m.jsxs)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-color-grey gtmkit-text-center",children:[(0,m.jsx)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4",children:"Need help?"}),(0,m.jsxs)("p",{className:"gtmkit-mb-6",children:[(0,l.__)("Find your GTM container ID on","gtm-kit"),(0,m.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer",children:"Google Tag Manager"})]}),(0,m.jsxs)("p",{children:[(0,l.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"]})]})]})})},vt=()=>{const{useImportSettings:t,useIsPending:e,useInstallData:n}=(0,i.useContext)(g),[s,r]=(0,i.useState)(!0),o=Object.keys(n.import_data)[0],[c,d]=(0,i.useState)(o),u=[];return Object.keys(n.import_data).forEach((t=>{u.push({value:t,label:n.import_data[t].name})})),s?(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-8 gtmkit-my-8 gtmkit-text-left",children:[(0,m.jsx)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold",children:(0,l.__)("Would you like to import plugin settings?","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey",children:[(0,l.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,l.__)("Would you like to import your settings to GTM Kit?","gtm-kit")]}),(0,m.jsx)(a.RadioControl,{help:(0,l.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:c,options:u,onChange:t=>d(t)}),(0,m.jsxs)("div",{className:"gtmkit-flex gtmkit-mt-12",children:[(0,m.jsxs)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(c,n.import_data[c]),r(!1)},children:[(0,m.jsx)("span",{className:"gtmkit-text-lg gtmkit-font-bold",children:(0,l.__)("Yes","gtm-kit")}),e?(0,m.jsx)(a.Spinner,{}):""]}),(0,m.jsxs)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{r(!1)},children:[(0,m.jsx)("span",{className:"gtmkit-text-lg gtmkit-font-bold",children:(0,l.__)("No","gtm-kit")}),e?(0,m.jsx)(a.Spinner,{}):""]})]})]})}):(0,m.jsx)(Mt,{})},_t=()=>{const{useInstallData:t}=(0,i.useContext)(g),{firstInstall:e}=t,{importAvailable:a}=t;return(0,m.jsxs)("div",{className:"gtmkit-text-center",children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading",children:(0,l.__)("You've successfully installed GTM Kit!","gtm-kit")}),(0,m.jsx)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")})}),e&&a?(0,m.jsx)(vt,{}):(0,m.jsx)(Mt,{})]})},wt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s,useInstallData:r}=(0,i.useContext)(g),o=nt();return(0,m.jsxs)("div",{className:"gtmkit-text-center",children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading",children:(0,l.__)("Essential Settings","gtm-kit")}),(0,m.jsx)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("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,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Page type","gtm-kit"),id:"page-type",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("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:()=>{e("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}})})}),r.woocommerce_integration?(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{e("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}})})}):null,r.cf7_integration?(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{e("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}})})}):null,r.edd_integration?(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{e("integrations","edd_integration",!(t&&t.integrations.edd_integration))}})})}):null,(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),o("/share-anonymous-data",{replace:!0})},disabled:s,children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]})},bt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s,useSiteData:r}=(0,i.useContext)(g),o=nt();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("Help improve GTM Kit","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("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,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey",children:(0,l.__)("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,m.jsx)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm",children:(0,m.jsxs)("tbody",{children:[(0,m.jsxs)("tr",{className:"",children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Server type:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.web_server})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"PHP version number:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.php_version})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"WordPress version number:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.wordpress_version})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"WordPress multisite:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.multisite?(0,l.__)("Yes","gtm-kit"):(0,l.__)("No","gtm-kit")})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Current theme:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.current_theme})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Current site language:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.locale})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Active plugins:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("em",{children:"Plugin names of all active plugins"})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Anonymized GTM Kit settings:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("em",{children:"Which GTM Kit settings are active"})})]})]})}),(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto ",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{e("general","analytics_active",!(t&&t.general.analytics_active))}})})}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),o("/automatic-updates",{replace:!0})},disabled:s,children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]})},Tt=(t="general",e="")=>{const i=window.gtmkitSettings.adminPageUrl;return e?`${i}${t}#/${e}`:`${i}${t}`},Lt=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("You are ready to use GTM Kit!","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center",children:(0,l.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center",children:[(0,l.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "]}),(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-max-w-lg gtmkit-mx-auto gtmkit-mb-8",children:[(0,m.jsx)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2",children:(0,l.__)("Getting Started","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("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,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:Tt("templates"),rel:"noreferrer",children:(0,l.__)("Go to GTM Templates","gtm-kit")})]}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("To get the most out of Google Tag Manager with GTM Kit, you should also review the tutorials.","gtm-kit")," ",(0,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:Tt("help","help"),rel:"noreferrer",children:(0,l.__)("Go to Tutorials","gtm-kit")})]})]}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsx)(a.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=Tt("general")},children:(0,l.__)("Go to the dashboard","gtm-kit")})})]}),Et=[{step:1,path:"/welcome",element:"Welcome",title:(0,l.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,l.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,l.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/automatic-updates",element:"Automatic Updates",title:(0,l.__)("Automatic Updates","gtm-kit")},{step:5,path:"/getting-started",element:"GettingStarted",title:(0,l.__)("Getting Started","gtm-kit")}],Dt=({step:t,currentStep:e,totalSteps:i})=>{if(t===i)return;let a="gtmkit-h-0.5 gtmkit-w-full";return a+=t<e?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,m.jsx)("div",{className:a})},It=({step:t,currentStep:e,totalSteps:i})=>t<e||t===i?(0,m.jsx)("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",children:(0,m.jsx)("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===e?(0,m.jsx)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,Ct=({step:t,currentStep:e,totalSteps:i})=>{if(0===t)return;let a="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 a+=t<e||e===i?" gtmkit-bg-color-primary":" gtmkit-bg-white",a+=t>e?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full",children:(0,m.jsx)("span",{className:a,children:(0,m.jsx)(It,{step:t,currentStep:e,totalSteps:i})})}),(0,m.jsx)(Dt,{step:t,currentStep:e,totalSteps:i})]})},Ot=()=>{const t=Et.length-1+Et[0].step;let e=((t,e)=>{const i=Object.keys(e);return t.filter((function(t){for(let a=0;a<i.length;a++)if(!t.hasOwnProperty(i[a])||t[i[a]]!==e[i[a]])return!1;return!0}))})(Et,{path:it().pathname});return e=e.length?e[0].step:0,0===e?(0,m.jsx)("div",{className:"gtmkit-my-16"}):(0,m.jsx)("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",children:Et.map((function(i){return(0,m.jsx)(Ct,{step:i.step,currentStep:e,totalSteps:t},i.step)}))})},Ut=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("header",{className:"gtmkit-text-center gtmkit-px-3",children:(0,m.jsx)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[200px] gtmkit-inline-block",children:(0,m.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,l.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"})})}),(0,m.jsx)(Ot,{})]}),At=()=>(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey",children:(0,m.jsx)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max",children:(0,m.jsx)("a",{className:"gtmkit-underline",href:Tt(),children:(0,l.__)("Go to the dashboard.","gtm-kit")})})})}),Pt=({title:t,label:e,optionGroup:n="general",optionName:s,disabled:r=!1,useSettings:o,useUpdateStateSettings:l,narrow:c=!1,premium:g=!1,useSetNotificationStatus:d,notificationId:u=""})=>{const p=(0,i.useId)(),h="gtmkit-settings-field-wrap "+(c?"gtmkit-py-2":"gtmkit-py-4");return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("div",{className:h,children:(0,m.jsx)(a.BaseControl,{label:g?(0,m.jsxs)(m.Fragment,{children:[t,(0,m.jsx)("span",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-normal gtmkit-rounded-full gtmkit-py-0.5 gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"})]}):t,id:p,children:(0,m.jsx)(a.ToggleControl,{label:e,checked:!r&&o[n][s],onChange:()=>{l(n,s,!(o&&o[n][s])),u&&d(u,"remove")},disabled:r})})})})},zt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s,useSiteData:r}=(0,i.useContext)(g),o=nt();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("Automatic Updates","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("New releases of GTM Kit may contain important updates to comply with changes in Google Tag Manager or analytics in general. We recommend enabling automatic plugin updates for GTM Kit to ensure it is always up to date.","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey",children:(0,l.__)("You can, of course, manually update GTM Kit whenever it suits you, but we highly recommend that you regularly update your plugins and themes to the latest versions to keep your site secure.","gtm-kit")}),(0,m.jsx)("div",{className:"gtmkit-max-w-max gtmkit-mx-auto gtmkit-mt-12",children:(0,m.jsx)(Pt,{title:(0,l.__)("Enable Automatic Updates","gtm-kit"),label:(0,l.__)("Automatically update the GTM Kit plugin when new releases are available.","gtm-kit"),optionGroup:"misc",optionName:"auto_update",useSettings:t,useUpdateStateSettings:e})}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),o("/getting-started",{replace:!0})},disabled:s,children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]})},Rt=()=>{const{useSettings:t}=(0,i.useContext)(g);return Object.keys(t).length?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Ut,{}),(0,m.jsx)("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",children:(0,m.jsxs)(xt,{children:[(0,m.jsx)(ht,{exact:!0,path:"/welcome",element:(0,m.jsx)(_t,{})}),(0,m.jsx)(ht,{exact:!0,path:"/essential-settings",element:(0,m.jsx)(wt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/share-anonymous-data",element:(0,m.jsx)(bt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/automatic-updates",element:(0,m.jsx)(zt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/getting-started",element:(0,m.jsx)(Lt,{})}),(0,m.jsx)(ht,{path:"/",element:(0,m.jsx)(pt,{replace:!0,to:"/welcome"})})]})}),(0,m.jsx)(At,{})]}):(0,m.jsx)(a.Spinner,{className:"gtm-kit-settings-page-loader"})},Gt=()=>(0,m.jsx)(ft,{basename:"/",children:(0,m.jsx)(d,{children:(0,m.jsx)(Rt,{})})});document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,e.createRoot)(t).render((0,m.jsx)(Gt,{}))}))})();
  • gtm-kit/tags/2.6.0/changelog.txt

    r3348467 r3366939  
    11*** GTM Kit ***
    22
    3 2025-08-2 - version 2.5.1
     32025-09-24 - version 2.6.0
     4* Add: Add tracking on the product collection block.
     5* Changed: Require WooCommerce 9.2.
     6* Dev: Tested up to WooCommerce 10.2.
     7
     82025-08-22 - version 2.5.1
    49* Fix: Force rounding values to 2 decimal places to fix rounding issues in edge cases.
    510* Fix: In some cases the GTM container would not load after activating and deactivating settings in 'Server-side Tagging (sGTM)'.
  • gtm-kit/tags/2.6.0/gtm-kit.php

    r3348467 r3366939  
    44 *
    55 * Plugin Name: GTM Kit
    6  * Version:     2.5.1
     6 * Version:     2.6.0
    77 * Plugin URI:  https://gtmkit.com/
    88 * Description: Google Tag Manager implementation focusing on flexibility and pagespeed.
     
    1515 * Requires PHP: 7.4
    1616 *
    17  * WC requires at least: 9.0
    18  * WC tested up to: 10.1
     17 * WC requires at least: 9.2
     18 * WC tested up to: 10.2
    1919 *
    2020 * @package GTM Kit
    21  * @copyright Copyright (C) 2021-2024, GTM Kit ApS
     21 * @copyright Copyright (C) 2021-2025, GTM Kit ApS
    2222 */
    2323
     
    2828}
    2929
    30 const GTMKIT_VERSION = '2.5.1';
     30const GTMKIT_VERSION = '2.6.0';
    3131
    3232if ( ! defined( 'GTMKIT_FILE' ) ) {
  • gtm-kit/tags/2.6.0/inc/main.php

    r3230253 r3366939  
    211211    );
    212212
     213    add_action( 'init', 'TLA_Media\GTM_Kit\gtmkit_load_text_domain' );
    213214    if ( is_admin() ) {
    214         add_action( 'plugins_loaded', 'TLA_Media\GTM_Kit\gtmkit_load_text_domain' );
    215215        add_action( 'plugins_loaded', 'TLA_Media\GTM_Kit\gtmkit_admin_init' );
    216216    } elseif ( ! wp_doing_ajax() ) {
  • gtm-kit/tags/2.6.0/languages/gtm-kit.pot

    r3348467 r3366939  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: GTM Kit 2.5.1\n"
     5"Project-Id-Version: GTM Kit 2.6.0\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: 2025-08-21T14:07:08+00:00\n"
     12"POT-Creation-Date: 2025-09-23T19:56:10+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.9.0\n"
  • gtm-kit/tags/2.6.0/readme.txt

    r3348467 r3366939  
    44Tags: google tag manager, gtm, woocommerce, analytics, ga4
    55Tested up to: 6.8
    6 Stable tag: 2.5.1
     6Stable tag: 2.6.0
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    9797== Changelog ==
    9898
     99= 2.6.0 =
     100
     101Release date: 2025-09-24
     102
     103#### Enhancements:
     104* Add tracking on the product collection block.
     105
     106#### Other:
     107* Tested up to WooCommerce 10.2.
     108* Require WooCommerce 9.2.
     109
    99110= 2.5.1 =
    100111
  • gtm-kit/tags/2.6.0/src/Integration/WooCommerce.php

    r3348467 r3366939  
    215215                $this->util->enqueue_script( 'gtmkit-woocommerce-checkout', 'integration/woocommerce-checkout.js', false, [ 'gtmkit-woocommerce' ] );
    216216            }
    217         } elseif ( has_block( 'woocommerce/all-products' ) ) {
     217        } elseif ( has_block( 'woocommerce/all-products' ) || has_block( 'woocommerce/product-collection' ) ) {
    218218
    219219            $this->util->enqueue_script( 'gtmkit-woocommerce-blocks', 'frontend/woocommerce-blocks.js', true );
  • gtm-kit/tags/2.6.0/vendor/composer/installed.php

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

    r3339414 r3366939  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => '13230ade7c7cf4529f36');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => '588f3c026783b88964ef');
  • gtm-kit/trunk/assets/admin/settings.js

    r3339414 r3366939  
    1 (()=>{var t={942:(t,e)=>{var i;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var t="",e=0;e<arguments.length;e++){var i=arguments[e];i&&(t=o(t,s(i)))}return t}function s(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return a.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var i in t)n.call(t,i)&&t[i]&&(e=o(e,i));return e}function o(t,e){return e?t?t+" "+e:t+e:t}t.exports?(a.default=a,t.exports=a):void 0===(i=function(){return a}.apply(e,[]))||(t.exports=i)}()}},e={};function i(n){var a=e[n];if(void 0!==a)return a.exports;var s=e[n]={exports:{}};return t[n](s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";const t=window.ReactDOM;var e=i.n(t);const n=window.wp.i18n,a=window.wp.element,s=window.wp.components,o=window.lodash,r=window.wp.apiFetch;var l=i.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const c=async(t,e,i=null,n=!1)=>{let a={};try{a=await l()({path:t,method:e,...i&&{data:i}})}catch(i){return{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?a:!0===a.success?a.data:{}},m=(t,e)=>{const i={...t};switch(e.type){case"FETCH_SETTINGS":i.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},i.stateSettings=e.payload.stateSettings,i.siteData=e.payload.siteData,i.notifications=e.payload.notifications,i.installData=e.payload.installData,i.isPending=!1,i.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(i.notice=(0,n.__)("An error occurred.","gtm-kit"),i.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":i.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":i.fetchedSettings=e.payload.fetchedSettings,i.stateSettings=e.payload.stateSettings,i.isPending=!1,i.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,i.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,n.__)("An error occurred.","gtm-kit"):(0,n.__)("Saved Successfully.","gtm-kit"),i.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":i.fetchedSettings=e.payload.fetchedSettings||i.fetchedSettings,i.stateSettings=e.payload.stateSettings||i.stateSettings,i.isPending=e.payload.isPending||i.isPending,i.notice=e.payload.notice||i.notice,i.hasError=e.payload.hasError||i.hasError,i.canSave=e.payload.canSave||i.canSave,i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData,i.supportTicket=e.payload.supportTicket||i.supportTicket,i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey,i.licenseKey=e.payload.licenseKey||i.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData;break;case"SEND_SUPPORT_DATA":i.isSendingSystemData=!1,i.isSystemDataSent=e.payload.isSystemDataSent||i.isSystemDataSent,i.systemDataMessage=e.payload.systemDataMessage||i.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":i.isSendingLicenseKey=!1,i.isLicenseKeySent=e.payload.isLicenseKeySent||i.isLicenseKeySent,i.licenseKeyMessage=e.payload.licenseKeyMessage||i.licenseKeyMessage;break;case"SEND_NOTIFICATION_STATUS_BEFORE":i.isUpdatingNotifications=e.payload.isUpdatingNotifications||i.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":i.isUpdatingNotifications=!1,i.notifications=e.payload.notifications||i.Notifications}return i},d=window.ReactJSXRuntime,g=(0,a.createContext)(),u=t=>{const[e,i]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),n=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},n=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};i({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:n,installData:a}})},s=async t=>{i({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{n()}),[]);const r={useDispatch:t=>{i(t)},useUpdateSettings:async()=>{i({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(n=e.stateSettings,c("gtmkit/v1/set-options","POST",n));var n;i({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:n,useUpdateState:s,useUpdateStateSettings:async(t,i,n)=>{const a=JSON.parse(JSON.stringify(e.stateSettings));let r;a[t][i]=n,r=!(0,o.isEqual)(a,e.fetchedSettings),s({stateSettings:a,canSave:r})},useImportSettings:async(t,i)=>{const n=JSON.parse(JSON.stringify(e.stateSettings));let a;const r={};r.general={...n.general,...i.general},"integrations"in i&&(r.integrations={...n.integrations,...i.integrations}),a=!(0,o.isEqual)(r,e.fetchedSettings),s({stateSettings:r,canSave:a})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{i({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(n=e.supportTicket,c("gtmkit/v1/send-support-data","POST",n,!0));var n;i({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{s({licenseKey:t})},useSendLicenseKey:async()=>{i({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(n=e.licenseKey,c("gtmkit/v1/send-license-key","POST",n,!0));var n;i({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{i({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:"remove"!==e}});const n={"notification-id":t,action:e},a=await(t=>c("gtmkit/v1/set-notification-status","POST",t,!0))(n),s=a.data.metrics.total,o=document.querySelectorAll("li.toplevel_page_gtmkit_general span.menu-counter");o&&o.forEach((t=>{const e=t.querySelector("span.count");e&&(e.textContent=s),t.className=t.className.replace(/count-\d+/,`count-${s}`)})),i({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,notifications:a.data}})},useSettings:e.stateSettings,useIsPending:e.isPending,useNotice:e.notice,useHasError:e.hasError,useCanSave:e.canSave,useSiteData:e.siteData,useInstallData:e.installData,useIsSending:e.isSendingSystemData,useSupportTicket:e.supportTicket,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage,useIsSendingLicenseKey:e.isSendingLicenseKey,useLicenseKey:e.licenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage,useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,d.jsx)(g.Provider,{value:r,children:t.children})},p=window.React;var h,k=i.n(p);function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},f.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(h||(h={}));const _="popstate";function x(t,e){if(!1===t||null==t)throw new Error(e)}function S(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function b(t,e){return{usr:t.state,key:t.key,idx:e}}function y(t,e,i,n){return void 0===i&&(i=null),f({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?j(e):e,{state:i,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function v(t){let{pathname:e="/",search:i="",hash:n=""}=t;return i&&"?"!==i&&(e+="?"===i.charAt(0)?i:"?"+i),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function j(t){let e={};if(t){let i=t.indexOf("#");i>=0&&(e.hash=t.substr(i),t=t.substr(0,i));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var N;function w(t,e,i){return void 0===i&&(i="/"),function(t,e,i,n){let a=F(("string"==typeof e?j(e):e).pathname||"/",i);if(null==a)return null;let s=E(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,i)=>t===e[i]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(s);let o=null;for(let t=0;null==o&&t<s.length;++t){let e=G(a);o=M(s[t],e,n)}return o}(t,e,i,!1)}function E(t,e,i,n){void 0===e&&(e=[]),void 0===i&&(i=[]),void 0===n&&(n="");let a=(t,a,s)=>{let o={relativePath:void 0===s?t.path||"":s,caseSensitive:!0===t.caseSensitive,childrenIndex:a,route:t};o.relativePath.startsWith("/")&&(x(o.relativePath.startsWith(n),'Absolute route path "'+o.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(n.length));let r=B([n,o.relativePath]),l=i.concat(o);t.children&&t.children.length>0&&(x(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+r+'".'),E(t.children,e,l,r)),(null!=t.path||t.index)&&e.push({path:r,score:R(r,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var i;if(""!==t.path&&null!=(i=t.path)&&i.includes("?"))for(let i of T(t.path))a(t,e,i);else a(t,e)})),e}function T(t){let e=t.split("/");if(0===e.length)return[];let[i,...n]=e,a=i.endsWith("?"),s=i.replace(/\?$/,"");if(0===n.length)return a?[s,""]:[s];let o=T(n.join("/")),r=[];return r.push(...o.map((t=>""===t?s:[s,t].join("/")))),a&&r.push(...o),r.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(N||(N={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const C=/^:[\w-]+$/,D=3,U=2,A=1,I=10,O=-2,L=t=>"*"===t;function R(t,e){let i=t.split("/"),n=i.length;return i.some(L)&&(n+=O),e&&(n+=U),i.filter((t=>!L(t))).reduce(((t,e)=>t+(C.test(e)?D:""===e?A:I)),n)}function M(t,e,i){void 0===i&&(i=!1);let{routesMeta:n}=t,a={},s="/",o=[];for(let t=0;t<n.length;++t){let r=n[t],l=t===n.length-1,c="/"===s?e:e.slice(s.length)||"/",m=P({path:r.relativePath,caseSensitive:r.caseSensitive,end:l},c),d=r.route;if(!m&&l&&i&&!n[n.length-1].route.index&&(m=P({path:r.relativePath,caseSensitive:r.caseSensitive,end:!1},c)),!m)return null;Object.assign(a,m.params),o.push({params:a,pathname:B([s,m.pathname]),pathnameBase:W(B([s,m.pathnameBase])),route:d}),"/"!==m.pathnameBase&&(s=B([s,m.pathnameBase]))}return o}function P(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[i,n]=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0),S("*"===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=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,i)=>(n.push({paramName:e,isOptional:null!=i}),i?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),a+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?a+="\\/*$":""!==t&&"/"!==t&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),a=e.match(i);if(!a)return null;let s=a[0],o=s.replace(/(.)\/+$/,"$1"),r=a.slice(1);return{params:n.reduce(((t,e,i)=>{let{paramName:n,isOptional:a}=e;if("*"===n){let t=r[i]||"";o=s.slice(0,s.length-t.length).replace(/(.)\/+$/,"$1")}const l=r[i];return t[n]=a&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:s,pathnameBase:o,pattern:t}}function G(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return S(!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 F(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let i=e.endsWith("/")?e.length-1:e.length,n=t.charAt(i);return n&&"/"!==n?null:t.slice(i)||"/"}function H(t,e,i,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+i+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function K(t,e){let i=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?i.map(((t,e)=>e===i.length-1?t.pathname:t.pathnameBase)):i.map((t=>t.pathnameBase))}function z(t,e,i,n){let a;void 0===n&&(n=!1),"string"==typeof t?a=j(t):(a=f({},t),x(!a.pathname||!a.pathname.includes("?"),H("?","pathname","search",a)),x(!a.pathname||!a.pathname.includes("#"),H("#","pathname","hash",a)),x(!a.search||!a.search.includes("#"),H("#","search","hash",a)));let s,o=""===t||""===a.pathname,r=o?"/":a.pathname;if(null==r)s=i;else{let t=e.length-1;if(!n&&r.startsWith("..")){let e=r.split("/");for(;".."===e[0];)e.shift(),t-=1;a.pathname=e.join("/")}s=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:i,search:n="",hash:a=""}="string"==typeof t?j(t):t,s=i?i.startsWith("/")?i:function(t,e){let i=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?i.length>1&&i.pop():"."!==t&&i.push(t)})),i.length>1?i.join("/"):"/"}(i,e):e;return{pathname:s,search:$(n),hash:Y(a)}}(a,s),c=r&&"/"!==r&&r.endsWith("/"),m=(o||"."===r)&&i.endsWith("/");return l.pathname.endsWith("/")||!c&&!m||(l.pathname+="/"),l}const B=t=>t.join("/").replace(/\/\/+/g,"/"),W=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),$=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const J=["post","put","patch","delete"],q=(new Set(J),["get",...J]);function V(){return V=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},V.apply(this,arguments)}new Set(q),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const X=p.createContext(null),Z=p.createContext(null),Q=p.createContext(null),tt=p.createContext(null),et=p.createContext({outlet:null,matches:[],isDataRoute:!1}),it=p.createContext(null);function nt(){return null!=p.useContext(tt)}function at(){return nt()||x(!1),p.useContext(tt).location}function st(t){p.useContext(Q).static||p.useLayoutEffect(t)}function ot(){let{isDataRoute:t}=p.useContext(et);return t?function(){let{router:t}=function(){let t=p.useContext(X);return t||x(!1),t}(ut.UseNavigateStable),e=ht(pt.UseNavigateStable),i=p.useRef(!1);return st((()=>{i.current=!0})),p.useCallback((function(n,a){void 0===a&&(a={}),i.current&&("number"==typeof n?t.navigate(n):t.navigate(n,V({fromRouteId:e},a)))}),[t,e])}():function(){nt()||x(!1);let t=p.useContext(X),{basename:e,future:i,navigator:n}=p.useContext(Q),{matches:a}=p.useContext(et),{pathname:s}=at(),o=JSON.stringify(K(a,i.v7_relativeSplatPath)),r=p.useRef(!1);return st((()=>{r.current=!0})),p.useCallback((function(i,a){if(void 0===a&&(a={}),!r.current)return;if("number"==typeof i)return void n.go(i);let l=z(i,JSON.parse(o),s,"path"===a.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:B([e,l.pathname])),(a.replace?n.replace:n.push)(l,a.state,a)}),[e,n,o,s,t])}()}function rt(t,e){let{relative:i}=void 0===e?{}:e,{future:n}=p.useContext(Q),{matches:a}=p.useContext(et),{pathname:s}=at(),o=JSON.stringify(K(a,n.v7_relativeSplatPath));return p.useMemo((()=>z(t,JSON.parse(o),s,"path"===i)),[t,o,s,i])}function lt(t,e,i,n){nt()||x(!1);let{navigator:a,static:s}=p.useContext(Q),{matches:o}=p.useContext(et),r=o[o.length-1],l=r?r.params:{},c=(r&&r.pathname,r?r.pathnameBase:"/");r&&r.route;let m,d=at();if(e){var g;let t="string"==typeof e?j(e):e;"/"===c||(null==(g=t.pathname)?void 0:g.startsWith(c))||x(!1),m=t}else m=d;let u=m.pathname||"/",k=u;if("/"!==c){let t=c.replace(/^\//,"").split("/");k="/"+u.replace(/^\//,"").split("/").slice(t.length).join("/")}let f=!s&&i&&i.matches&&i.matches.length>0?i.matches:w(t,{pathname:k}),_=function(t,e,i,n){var a;if(void 0===e&&(e=[]),void 0===i&&(i=null),void 0===n&&(n=null),null==t){var s;if(!i)return null;if(i.errors)t=i.matches;else{if(!(null!=(s=n)&&s.v7_partialHydration&&0===e.length&&!i.initialized&&i.matches.length>0))return null;t=i.matches}}let o=t,r=null==(a=i)?void 0:a.errors;if(null!=r){let t=o.findIndex((t=>t.route.id&&void 0!==(null==r?void 0:r[t.route.id])));t>=0||x(!1),o=o.slice(0,Math.min(o.length,t+1))}let l=!1,c=-1;if(i&&n&&n.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}=i,a=e.route.loader&&void 0===t[e.route.id]&&(!n||void 0===n[e.route.id]);if(e.route.lazy||a){l=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((t,n,a)=>{let s,m=!1,d=null,g=null;var u;i&&(s=r&&n.route.id?r[n.route.id]:void 0,d=n.route.errorElement||mt,l&&(c<0&&0===a?(kt[u="route-fallback"]||(kt[u]=!0),m=!0,g=null):c===a&&(m=!0,g=n.route.hydrateFallbackElement||null)));let h=e.concat(o.slice(0,a+1)),k=()=>{let e;return e=s?d:m?g:n.route.Component?p.createElement(n.route.Component,null):n.route.element?n.route.element:t,p.createElement(gt,{match:n,routeContext:{outlet:t,matches:h,isDataRoute:null!=i},children:e})};return i&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?p.createElement(dt,{location:i.location,revalidation:i.revalidation,component:d,error:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(f&&f.map((t=>Object.assign({},t,{params:Object.assign({},l,t.params),pathname:B([c,a.encodeLocation?a.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?c:B([c,a.encodeLocation?a.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),o,i,n);return e&&_?p.createElement(tt.Provider,{value:{location:V({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:h.Pop}},_):_}function ct(){let t=function(){var t;let e=p.useContext(it),i=function(){let t=p.useContext(Z);return t||x(!1),t}(pt.UseRouteError),n=ht(pt.UseRouteError);return void 0!==e?e:null==(t=i.errors)?void 0:t[n]}(),e=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),i=t instanceof Error?t.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},e),i?p.createElement("pre",{style:n},i):null,null)}const mt=p.createElement(ct,null);class dt extends p.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?p.createElement(et.Provider,{value:this.props.routeContext},p.createElement(it.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function gt(t){let{routeContext:e,match:i,children:n}=t,a=p.useContext(X);return a&&a.static&&a.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=i.route.id),p.createElement(et.Provider,{value:e},n)}var ut=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ut||{}),pt=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}(pt||{});function ht(t){let e=function(){let t=p.useContext(et);return t||x(!1),t}(),i=e.matches[e.matches.length-1];return i.route.id||x(!1),i.route.id}const kt={};function ft(t){let{to:e,replace:i,state:n,relative:a}=t;nt()||x(!1);let{future:s,static:o}=p.useContext(Q),{matches:r}=p.useContext(et),{pathname:l}=at(),c=ot(),m=z(e,K(r,s.v7_relativeSplatPath),l,"path"===a),d=JSON.stringify(m);return p.useEffect((()=>c(JSON.parse(d),{replace:i,state:n,relative:a})),[c,d,a,i,n]),null}function _t(t){x(!1)}function xt(t){let{basename:e="/",children:i=null,location:n,navigationType:a=h.Pop,navigator:s,static:o=!1,future:r}=t;nt()&&x(!1);let l=e.replace(/^\/*/,"/"),c=p.useMemo((()=>({basename:l,navigator:s,static:o,future:V({v7_relativeSplatPath:!1},r)})),[l,r,s,o]);"string"==typeof n&&(n=j(n));let{pathname:m="/",search:d="",hash:g="",state:u=null,key:k="default"}=n,f=p.useMemo((()=>{let t=F(m,l);return null==t?null:{location:{pathname:t,search:d,hash:g,state:u,key:k},navigationType:a}}),[l,m,d,g,u,k,a]);return null==f?null:p.createElement(Q.Provider,{value:c},p.createElement(tt.Provider,{children:i,value:f}))}function St(t){let{children:e,location:i}=t;return lt(bt(e),i)}function bt(t,e){void 0===e&&(e=[]);let i=[];return p.Children.forEach(t,((t,n)=>{if(!p.isValidElement(t))return;let a=[...e,n];if(t.type===p.Fragment)return void i.push.apply(i,bt(t.props.children,a));t.type!==_t&&x(!1),t.props.index&&t.props.children&&x(!1);let s={id:t.props.id||a.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=bt(t.props.children,a)),i.push(s)})),i}function yt(){return yt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},yt.apply(this,arguments)}function vt(t,e){if(null==t)return{};var i,n,a={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(a[i]=t[i]);return a}p.startTransition,new Promise((()=>{})),p.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const jt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Nt=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"];try{window.__reactRouterVersion="6"}catch(t){}const wt=p.createContext({isTransitioning:!1});new Map;const Et=p.startTransition;function Tt(t){let{basename:e,children:i,future:n,window:a}=t,s=p.useRef();var o;null==s.current&&(s.current=(void 0===(o={window:a,v5Compat:!0})&&(o={}),function(t,e,i,n){void 0===n&&(n={});let{window:a=document.defaultView,v5Compat:s=!1}=n,o=a.history,r=h.Pop,l=null,c=m();function m(){return(o.state||{idx:null}).idx}function d(){r=h.Pop;let t=m(),e=null==t?null:t-c;c=t,l&&l({action:r,location:u.location,delta:e})}function g(t){let e="null"!==a.location.origin?a.location.origin:a.location.href,i="string"==typeof t?t:v(t);return i=i.replace(/ $/,"%20"),x(e,"No window.location.(origin|href) available to create URL for href: "+i),new URL(i,e)}null==c&&(c=0,o.replaceState(f({},o.state,{idx:c}),""));let u={get action(){return r},get location(){return t(a,o)},listen(t){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(_,d),l=t,()=>{a.removeEventListener(_,d),l=null}},createHref:t=>e(a,t),createURL:g,encodeLocation(t){let e=g(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){r=h.Push;let n=y(u.location,t,e);i&&i(n,t),c=m()+1;let d=b(n,c),g=u.createHref(n);try{o.pushState(d,"",g)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;a.location.assign(g)}s&&l&&l({action:r,location:u.location,delta:1})},replace:function(t,e){r=h.Replace;let n=y(u.location,t,e);i&&i(n,t),c=m();let a=b(n,c),d=u.createHref(n);o.replaceState(a,"",d),s&&l&&l({action:r,location:u.location,delta:0})},go:t=>o.go(t)};return u}((function(t,e){let{pathname:i="/",search:n="",hash:a=""}=j(t.location.hash.substr(1));return i.startsWith("/")||i.startsWith(".")||(i="/"+i),y("",{pathname:i,search:n,hash:a},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let i=t.document.querySelector("base"),n="";if(i&&i.getAttribute("href")){let e=t.location.href,i=e.indexOf("#");n=-1===i?e:e.slice(0,i)}return n+"#"+("string"==typeof e?e:v(e))}),(function(t,e){S("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),o)));let r=s.current,[l,c]=p.useState({action:r.action,location:r.location}),{v7_startTransition:m}=n||{},d=p.useCallback((t=>{m&&Et?Et((()=>c(t))):c(t)}),[c,m]);return p.useLayoutEffect((()=>r.listen(d)),[r,d]),p.useEffect((()=>{return null==(t=n)||t.v7_startTransition,void 0!==(null==t?void 0:t.v7_relativeSplatPath)||e&&e.v7_relativeSplatPath,void(e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation));var t,e}),[n]),p.createElement(xt,{basename:e,children:i,location:l.location,navigationType:l.action,navigator:r,future:n})}t.flushSync,p.useId;const Ct="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Dt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ut=p.forwardRef((function(t,e){let i,{onClick:n,relative:a,reloadDocument:s,replace:o,state:r,target:l,to:c,preventScrollReset:m,viewTransition:d}=t,g=vt(t,jt),{basename:u}=p.useContext(Q),h=!1;if("string"==typeof c&&Dt.test(c)&&(i=c,Ct))try{let t=new URL(window.location.href),e=c.startsWith("//")?new URL(t.protocol+c):new URL(c),i=F(e.pathname,u);e.origin===t.origin&&null!=i?c=i+e.search+e.hash:h=!0}catch(t){}let k=function(t,e){let{relative:i}=void 0===e?{}:e;nt()||x(!1);let{basename:n,navigator:a}=p.useContext(Q),{hash:s,pathname:o,search:r}=rt(t,{relative:i}),l=o;return"/"!==n&&(l="/"===o?n:B([n,o])),a.createHref({pathname:l,search:r,hash:s})}(c,{relative:a}),f=function(t,e){let{target:i,replace:n,state:a,preventScrollReset:s,relative:o,viewTransition:r}=void 0===e?{}:e,l=ot(),c=at(),m=rt(t,{relative:o});return p.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,i)){e.preventDefault();let i=void 0!==n?n:v(c)===v(m);l(t,{replace:i,state:a,preventScrollReset:s,relative:o,viewTransition:r})}}),[c,l,m,n,a,i,t,s,o,r])}(c,{replace:o,state:r,target:l,preventScrollReset:m,relative:a,viewTransition:d});return p.createElement("a",yt({},g,{href:i||k,onClick:h||s?n:function(t){n&&n(t),t.defaultPrevented||f(t)},ref:e,target:l}))})),At=p.forwardRef((function(t,e){let{"aria-current":i="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:r,viewTransition:l,children:c}=t,m=vt(t,Nt),d=rt(r,{relative:m.relative}),g=at(),u=p.useContext(Z),{navigator:h,basename:k}=p.useContext(Q),f=null!=u&&function(t,e){void 0===e&&(e={});let i=p.useContext(wt);null==i&&x(!1);let{basename:n}=function(){let t=p.useContext(X);return t||x(!1),t}(It.useViewTransitionState),a=rt(t,{relative:e.relative});if(!i.isTransitioning)return!1;let s=F(i.currentLocation.pathname,n)||i.currentLocation.pathname,o=F(i.nextLocation.pathname,n)||i.nextLocation.pathname;return null!=P(a.pathname,o)||null!=P(a.pathname,s)}(d)&&!0===l,_=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,S=g.pathname,b=u&&u.navigation&&u.navigation.location?u.navigation.location.pathname:null;n||(S=S.toLowerCase(),b=b?b.toLowerCase():null,_=_.toLowerCase()),b&&k&&(b=F(b,k)||b);const y="/"!==_&&_.endsWith("/")?_.length-1:_.length;let v,j=S===_||!s&&S.startsWith(_)&&"/"===S.charAt(y),N=null!=b&&(b===_||!s&&b.startsWith(_)&&"/"===b.charAt(_.length)),w={isActive:j,isPending:N,isTransitioning:f},E=j?i:void 0;v="function"==typeof a?a(w):[a,j?"active":null,N?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof o?o(w):o;return p.createElement(Ut,yt({},m,{"aria-current":E,className:v,ref:e,style:T,to:r,viewTransition:l}),"function"==typeof c?c(w):c)}));var It,Ot;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(It||(It={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Ot||(Ot={}));const Lt=({title:t})=>(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky",children:(0,d.jsx)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between",children:(0,d.jsxs)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl",children:[(0,d.jsxs)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,d.jsx)("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,d.jsxs)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)",children:[(0,d.jsx)("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,d.jsx)("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]})})})});var Rt=i(942),Mt=i.n(Rt);const Pt=({count:t,important:e,nav:i=!1})=>(0,d.jsx)(d.Fragment,{children:t>0&&(0,d.jsx)("span",{className:Mt()("gtmkit-ml-2 gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py-px gtmkit-leading-[1.125rem] gtmkit-uppercase",{"gtmkit-bg-color-error":e},{"gtmkit-bg-color-success":!e},{"gtmkit-px-1.5":i},{"gtmkit-px-2":!i}),children:t})}),Gt=({metrics:t})=>(0,d.jsx)(Pt,{count:t.total,important:t.problem>0,nav:!0}),Ft=Pt,Ht=({to:t,title:e})=>{const{useNotifications:i}=(0,a.useContext)(g);return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(At,{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 ":""),children:[e,"notifications"===t&&(0,d.jsx)(Gt,{metrics:i.metrics})]})})},Kt=({NavList:t})=>(0,d.jsx)("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",children:t.map((function(t){return(0,d.jsx)(Ht,{to:t.to,title:t.title},t.to)}))});function zt(){return zt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)({}).hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},zt.apply(null,arguments)}function Bt(t,e){if(null==t)return{};var i={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;i[n]=t[n]}return i}function Wt(t,e){return Wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wt(t,e)}function $t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Wt(t,e)}function Yt(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Jt=k().createContext(null);var qt=function(t){return t.scrollTop},Vt="unmounted",Xt="exited",Zt="entering",Qt="entered",te="exiting",ee=function(t){function i(e,i){var n;n=t.call(this,e,i)||this;var a,s=i&&!i.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?s?(a=Xt,n.appearStatus=Zt):a=Qt:a=e.unmountOnExit||e.mountOnEnter?Vt:Xt,n.state={status:a},n.nextCallback=null,n}$t(i,t),i.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Vt?{status:Xt}:null};var n=i.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var i=this.state.status;this.props.in?i!==Zt&&i!==Qt&&(e=Zt):i!==Zt&&i!==Qt||(e=te)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,i,n=this.props.timeout;return t=e=i=n,null!=n&&"number"!=typeof n&&(t=n.exit,e=n.enter,i=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:i}},n.updateStatus=function(t,i){if(void 0===t&&(t=!1),null!==i)if(this.cancelNextCallback(),i===Zt){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:e().findDOMNode(this);n&&qt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Xt&&this.setState({status:Vt})},n.performEnter=function(t){var i=this,n=this.props.enter,a=this.context?this.context.isMounting:t,s=this.props.nodeRef?[a]:[e().findDOMNode(this),a],o=s[0],r=s[1],l=this.getTimeouts(),c=a?l.appear:l.enter;t||n?(this.props.onEnter(o,r),this.safeSetState({status:Zt},(function(){i.props.onEntering(o,r),i.onTransitionEnd(c,(function(){i.safeSetState({status:Qt},(function(){i.props.onEntered(o,r)}))}))}))):this.safeSetState({status:Qt},(function(){i.props.onEntered(o)}))},n.performExit=function(){var t=this,i=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:e().findDOMNode(this);i?(this.props.onExit(a),this.safeSetState({status:te},(function(){t.props.onExiting(a),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Xt},(function(){t.props.onExited(a)}))}))}))):this.safeSetState({status:Xt},(function(){t.props.onExited(a)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,i=!0;return this.nextCallback=function(n){i&&(i=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(t,i){this.setNextCallback(i);var n=this.props.nodeRef?this.props.nodeRef.current:e().findDOMNode(this),a=null==t&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=s[0],r=s[1];this.props.addEndListener(o,r)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Vt)return null;var e=this.props,i=e.children,n=(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,Bt(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return k().createElement(Jt.Provider,{value:null},"function"==typeof i?i(t,n):k().cloneElement(k().Children.only(i),n))},i}(k().Component);function ie(){}ee.contextType=Jt,ee.propTypes={},ee.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ie,onEntering:ie,onEntered:ie,onExit:ie,onExiting:ie,onExited:ie},ee.UNMOUNTED=Vt,ee.EXITED=Xt,ee.ENTERING=Zt,ee.ENTERED=Qt,ee.EXITING=te;const ne=ee;var ae=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return n=e,void((i=t).classList?i.classList.remove(n):"string"==typeof i.className?i.className=Yt(i.className,n):i.setAttribute("class",Yt(i.className&&i.className.baseVal||"",n)));var i,n}))},se=function(t){function e(){for(var e,i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return(e=t.call.apply(t,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1];e.removeClasses(a,"exit"),e.addClass(a,s?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,i)},e.onEntering=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1]?"appear":"enter";e.addClass(a,s,"active"),e.props.onEntering&&e.props.onEntering(t,i)},e.onEntered=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1]?"appear":"enter";e.removeClasses(a,s),e.addClass(a,s,"done"),e.props.onEntered&&e.props.onEntered(t,i)},e.onExit=function(t){var i=e.resolveArguments(t)[0];e.removeClasses(i,"appear"),e.removeClasses(i,"enter"),e.addClass(i,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var i=e.resolveArguments(t)[0];e.addClass(i,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var i=e.resolveArguments(t)[0];e.removeClasses(i,"exit"),e.addClass(i,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,i){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,i]},e.getClassNames=function(t){var i=e.props.classNames,n="string"==typeof i,a=n?(n&&i?i+"-":"")+t:i[t];return{baseClassName:a,activeClassName:n?a+"-active":i[t+"Active"],doneClassName:n?a+"-done":i[t+"Done"]}},e}$t(e,t);var i=e.prototype;return i.addClass=function(t,e,i){var n=this.getClassNames(e)[i+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===i&&a&&(n+=" "+a),"active"===i&&t&&qt(t),n&&(this.appliedClasses[e][i]=n,function(t,e){t&&e&&e.split(" ").forEach((function(e){return n=e,void((i=t).classList?i.classList.add(n):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(i,n)||("string"==typeof i.className?i.className=i.className+" "+n:i.setAttribute("class",(i.className&&i.className.baseVal||"")+" "+n)));var i,n}))}(t,n))},i.removeClasses=function(t,e){var i=this.appliedClasses[e],n=i.base,a=i.active,s=i.done;this.appliedClasses[e]={},n&&ae(t,n),a&&ae(t,a),s&&ae(t,s)},i.render=function(){var t=this.props,e=(t.classNames,Bt(t,["classNames"]));return k().createElement(ne,zt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(k().Component);se.defaultProps={classNames:""},se.propTypes={};const oe=se,re=({title:t=(0,n.__)("Save","gtm-kit"),className:e="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:i,useIsPending:o,useCanSave:r}=(0,a.useContext)(g);return(0,d.jsxs)(s.Button,{className:e,onClick:()=>i(),variant:"primary",disabled:o||!r,children:[r?t:(0,n.__)("Saved","gtm-kit"),o?(0,d.jsx)(s.Spinner,{}):""]})},le=()=>{const{useCanSave:t}=(0,a.useContext)(g);return(0,d.jsx)(oe,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0,children:(0,d.jsx)("footer",{className:"gtmkit-fixed gtmkit-bottom-0 gtmkit-w-full gtmkit-z-10 gtmkit-bg-color-grey gtmkit-text-white gtmkit-p-8",children:(0,d.jsx)(re,{})})})},ce=({subject:t})=>{const e=!0===t||"on"===t,i=!0===e?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,d.jsx)("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,children:e?(0,n.__)("Active","gtm-kit"):(0,n.__)("Inactive","gtm-kit")})},me=(0,a.forwardRef)((({children:t,className:e="",...i},n)=>(0,d.jsx)("div",{...i,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 "+e,ref:n,children:t})));me.Header=({as:t="h3",title:e="",children:i,className:n="",...a})=>(0,d.jsxs)("div",{...a,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+n,children:[(0,d.jsx)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading",children:e}),i]}),me.Content=({as:t="div",children:e,className:i="gtmkit-flex-auto",...n})=>(0,d.jsx)(t,{...n,className:i,children:e}),me.Button=({url:t,destination:e,newTab:i=!1,text:n,group:a="",...o})=>{const r=ot();return(0,d.jsx)("div",{...o,className:"gtmkit-mt-4 gtmkit-mb-0.5",children:(0,d.jsx)(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:()=>{e&&t&&!1===i?window.gtmkitSettings.current_page===a?r(e,{replace:!0}):window.location.href=t+"#"+e:t?i?window.open(t):window.location.href=t:r(e,{replace:!0})},children:(0,d.jsx)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold",children:n})})})};const de=me,ge=({title:t,data:e,className:i=""})=>{const{useSettings:s}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6",children:t}),(0,d.jsx)("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] "+i,children:e.map(((t,e)=>!1===t.featured?null:(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:t.title,children:t.pill?(0,d.jsx)(ce,{subject:s[t.group][t.option]}):null}),(0,d.jsx)(de.Content,{children:t.text.map(((t,e)=>(0,d.jsx)("p",{children:t},e)))}),(0,d.jsx)(de.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,n.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group})]},e)))})]})},ue=(t="general",e="")=>{const i=window.gtmkitSettings.adminPageUrl;return e?`${i}${t}#/${e}`:`${i}${t}`},pe=t=>((t,e,i)=>{const n=(t,i)=>({...i,title:t.title,to:t.path,group:t.group||i.group,option:t.option||i.option,text:[t.description],link:{...i.link,url:ue(e,""),destination:"/"+t.path}});return"templates"===e?Object.keys(t).map((e=>n(t[e][0],i))):Object.keys(t).map((e=>n(t[e],i)))})(window.gtmkitSettings[t],t,function(t){switch(t){case"integrations":return{pill:!0,group:"integrations",option:null,link:{internal:!0,text:(0,n.__)("Setup Integration","gtm-kit")}};case"templates":return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,n.__)("Get Template","gtm-kit")}};default:return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,n.__)("Read More","gtm-kit")}}}}(t)),he=()=>{const{useSettings:t,useNotifications:e}=(0,a.useContext)(g),[i,s]=(0,a.useState)(window.gtmkitSettings.tutorials),o=e.metrics;return(0,a.useEffect)((()=>{s((t=>[...t,{title:(0,n.__)("See all tutorials","gtm-kit"),text:[(0,n.__)("See all our tutorials and get the most out of GTM Kit","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=documentation&utm_content=dashboard-tutorials",text:(0,n.__)("Read articles","gtm-kit")},featured:!0}]))}),[]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("General","gtm-kit")}),(0,d.jsxs)("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]",children:[(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:"Google Tag Manager Container",children:(0,d.jsx)(ce,{subject:t.general.gtm_id&&t.general.container_active})}),(0,d.jsx)(de.Content,{children:t.general.gtm_id&&t.general.container_active?(0,d.jsxs)("p",{children:[(0,n.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id]}):(0,d.jsx)("p",{children:(0,n.__)("The container is not active but the datalayer is generated.","gtm-kit")})}),(0,d.jsx)(de.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})]}),(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:(0,n.__)("Notifications","gtm-kit"),className:"!gtmkit-justify-start",children:(0,d.jsx)(Ft,{count:o.total,important:o.problem>0})}),(0,d.jsx)(de.Content,{children:o.total?(0,d.jsx)(d.Fragment,{children:o.problem?(0,d.jsx)("p",{children:(0,n.__)("There are some problems that require your attention.","gtm-kit")}):(0,d.jsx)("p",{children:(0,n.__)("There are some notifications that may require your attention.","gtm-kit")})}):(0,d.jsx)("p",{children:(0,n.__)("No notifications at the moment.","gtm-kit")})}),(0,d.jsx)(de.Button,{destination:"/notifications",text:(0,n.__)("See all notifications","gtm-kit")})]}),(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit"),children:(0,d.jsx)(ce,{subject:t.general.analytics_active})}),(0,d.jsx)(de.Content,{children:(0,d.jsx)("p",{children:(0,n.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit")})}),(0,d.jsx)(de.Button,{destination:"/misc",text:(0,n.__)("Share anonymous data","gtm-kit")})]})]}),(0,d.jsx)(ge,{title:(0,n.__)("Tutorials","gtm-kit"),data:i}),(0,d.jsx)(ge,{title:(0,n.__)("Integrations","gtm-kit"),data:pe("integrations")})]})},ke=({title:t,placeholder:e,help:i,className:n="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:a="general",optionName:o,isDisabled:r,useSettings:l,useUpdateStateSettings:c,useSetNotificationStatus:m,notificationId:g=""})=>(0,d.jsx)(s.TextControl,{label:t,placeholder:e,help:i,className:n,value:l[a][o],onChange:t=>{c(a,o,t),g&&m(g,"remove")},disabled:r}),fe=({title:t,label:e,optionGroup:i="general",optionName:n,disabled:o=!1,useSettings:r,useUpdateStateSettings:l,narrow:c=!1,premium:m=!1,useSetNotificationStatus:g,notificationId:u=""})=>{const p=(0,a.useId)(),h="gtmkit-settings-field-wrap "+(c?"gtmkit-py-2":"gtmkit-py-4");return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("div",{className:h,children:(0,d.jsx)(s.BaseControl,{label:m?(0,d.jsxs)(d.Fragment,{children:[t,(0,d.jsx)("span",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-normal gtmkit-rounded-full gtmkit-py-0.5 gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"})]}):t,id:p,children:(0,d.jsx)(s.ToggleControl,{label:e,checked:!o&&r[i][n],onChange:()=>{l(i,n,!(r&&r[i][n])),u&&g(u,"remove")},disabled:o})})})})},_e=({title:t,options:e,help:i,className:n="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:a="general",optionName:o,disabled:r,useSettings:l,useUpdateStateSettings:c})=>(0,d.jsx)(s.RadioControl,{label:t,options:e,help:i,className:n,selected:parseInt(l[a][o]),onChange:t=>c(a,o,t),disabled:r}),xe=({title:t,help:e,items:i=[],optionGroup:n="general",optionName:o,disabled:r=!1,useSettings:l,useUpdateStateSettings:c})=>{const m=(0,a.useId)(),g=Array.isArray(l[n][o])?l[n][o]:[],[u,p]=(0,a.useState)(g);return(0,a.useEffect)((()=>{const t=Array.isArray(l[n][o])?l[n][o]:[];p(t)}),[l]),(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4",children:(0,d.jsx)(s.BaseControl,{label:t,help:e,id:m,children:i.map((t=>(0,d.jsx)(s.CheckboxControl,{label:t.name,disabled:r,checked:u.includes(t.role),onChange:e=>((t,e)=>{p((i=>{let a;return a=t?[...i,e]:i.filter((t=>t!==e)),c(n,o,a),a}))})(e,t.role)},t.role)))})})})},Se=(0,a.forwardRef)((({children:t,className:e="",disabled:i=!1,...n},a)=>(0,d.jsx)("div",{...n,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-max-w-screen-lg gtmkit-border-color-grey gtmkit-rounded "+e+(i?"gtmkit-opacity-60":""),ref:a,children:t})));Se.Header=({as:t="h3",title:e="",children:i,className:n="",...a})=>(0,d.jsxs)(t,{...a,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 "+n,children:[e,i]}),Se.Content=({as:t="div",children:e,className:i="",...n})=>(0,d.jsx)(t,{...n,className:"gtmkit-px-8 gtmkit-py-6 "+i,children:e});const be=Se,ye=()=>{const{useSettings:t,useUpdateStateSettings:e,useUserRoles:i,useSetNotificationStatus:s}=(0,a.useContext)(g),o=!(t.general.sgtm_domain&&t.general.sgtm_domain.trim()&&t.general.sgtm_container_identifier&&t.general.sgtm_container_identifier.trim()),r=at();return(0,p.useEffect)((()=>{const t=new URLSearchParams(r.search).get("focus");if(t){const e=document.getElementById(t);e&&e.scrollIntoView()}}),[r]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Google Tag Manager container","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("General Container Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")}),(0,d.jsx)(ke,{title:(0,n.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,n.__)("Enter GTM Container ID","gtm-kit"),useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-container-injection"}),(0,d.jsx)(fe,{title:(0,n.__)("Inject Container Code","gtm-kit"),label:(0,n.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-container-injection"}),(0,d.jsx)(fe,{title:(0,n.__)("Just the container","gtm-kit"),label:(0,n.__)("Setting this to On will reduce the functionality to just the GTM container code. No additional data will be pushed to the datalayer regardless of any other settings.","gtm-kit"),optionName:"just_the_container",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,n.__)("The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do so.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsx)("div",{id:"sgtm"}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(ke,{title:(0,n.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,n.__)("Enter domain","gtm-kit"),help:(0,n.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,n.__)("Enter loader name","gtm-kit"),help:(0,n.__)("Only use if you are using a custom loader.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,n.__)("Prolong cookie lifetime in Safari and other browsers with ITP. This only works if you use Stape sGTM hosting and have set up the Cookie Keeper power up.","gtm-kit"),optionName:"sgtm_cookie_keeper",disabled:o,useSettings:t,useUpdateStateSettings:e})]}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Google Tag Manager Server-side Tagging","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,d.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,n.__)("Learn more","gtm-kit")})]}),(0,d.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Hosting server-side GTM containers","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("Stape.io is a solution for hosting server-side Google Tag Manager containers, offering a simplified approach that demands less technical expertise than solutions like Google Cloud Platform.","gtm-kit")," ",(0,n.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")]}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,d.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,n.__)("Learn more about Stape.io","gtm-kit")})})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Page Speed Optimization","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsx)(be.Content,{children:(0,d.jsx)(fe,{title:(0,n.__)("load_delayed_js event","gtm-kit"),label:(0,n.__)("Setting this to On will push the event 'load_delayed_js' on page load.","gtm-kit"),optionName:"load_js_event",useSettings:t,useUpdateStateSettings:e})}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Delay JavaScript execution","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("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,d.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,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Tag Manager Environment","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(ke,{title:(0,n.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,n.__)("Enter gtm_auth code","gtm-kit"),help:(0,n.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,n.__)("Enter gtm_preview code","gtm-kit"),help:(0,n.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Environments","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,n.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,n.__)("If left empty the default environment will be used.","gtm-kit")]}),(0,d.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Override settings in wp-config.php","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("You can override the values by using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments.","gtm-kit")," ",(0,d.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,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Exclude User Roles","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsx)(be.Content,{children:(0,d.jsx)(xe,{title:(0,n.__)("Exclude user roles","gtm-kit"),help:(0,n.__)("Select the roles that you want to exclude from tracking.","gtm-kit"),items:i,optionName:"exclude_user_roles",useSettings:t,useUpdateStateSettings:e})}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold gtmkit-text-red-600",children:(0,n.__)("Warning!","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("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,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Please ensure thorough and proper testing of this.","gtm-kit")})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Container Code Implementation","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(_e,{title:(0,n.__)("Container code implementation:","gtm-kit"),options:[{label:(0,n.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,n.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,n.__)("Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle.","gtm-kit"),optionName:"script_implementation",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,n.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,n.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,n.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,n.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,n.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,n.__)('The preferred method to implement the <noscript> container code is just after the opening <body> tag. This requires that your theme uses the "body_open" hook. If your theme does not support this the script can be injected in the footer or you can use the function below.',"gtm-kit"),optionName:"noscript_implementation",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,d.jsx)("code",{children:"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"})})]})]})]})},ve=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Post Data","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Post Data Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Post type","gtm-kit"),id:"post-type",label:(0,n.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Page type","gtm-kit"),id:"page-type",label:(0,n.__)('Include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. "campaign".',"gtm-kit"),optionName:"datalayer_page_type",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Categories","gtm-kit"),id:"categories",label:(0,n.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Tags","gtm-kit"),id:"tags",label:(0,n.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post title","gtm-kit"),id:"post-title",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post ID","gtm-kit"),id:"post-id",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post data","gtm-kit"),id:"post-date",label:(0,n.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,n.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,n.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id",useSettings:t,useUpdateStateSettings:e})]})]})]})},je=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("User Data","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,d.jsxs)(be.Content,{className:"gtmkit-space-y-2",children:[(0,d.jsx)("p",{children:(0,n.__)("Including user data is not compatible with full page caching.","gtm-kit")}),(0,d.jsx)("p",{children:(0,n.__)("Full page caching will cache user data making it the same for all users. There are ways around this, but it depends on the chosen cache solution and is only for advanced users.","gtm-kit")})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("User Data Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,n.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("User ID","gtm-kit"),id:"user-id",label:(0,n.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("User role","gtm-kit"),id:"user-role",label:(0,n.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role",useSettings:t,useUpdateStateSettings:e})]})]})]})},Ne=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g),i=!t.general.gcm_default_settings;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Google Consent Mode","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Consent Mode Activation","gtm-kit"),children:(0,d.jsx)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2",children:(0,n.__)("Warning!","gtm-kit")})}),(0,d.jsxs)(be.Content,{className:"gtmkit-space-y-2",children:[(0,d.jsx)("p",{children:(0,n.__)("Most Consent Management Platforms will handle the Google Consent Mode settings for you and applying the default settings in both GTM Kit and you CMP will lead to unexpected behaviour or errors.","gtm-kit")}),(0,d.jsx)("p",{children:(0,n.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")}),(0,d.jsx)("p",{className:"!gtmkit-mt-4",children:(0,n.__)("GTM Kit will only set the default Consent Mode settings and you must update the settings yourself when the user has given consent.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6",children:(0,d.jsx)("a",{href:"https://developers.google.com/tag-platform/security/guides/consent#implementation_example",target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline gtmkit-font-semibold",children:(0,n.__)("See an example of how consent is updated","gtm-kit")})}),(0,d.jsx)(fe,{title:(0,n.__)("Activate GCM settings","gtm-kit"),label:(0,n.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings",useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{disabled:i,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Ad Personalization","gtm-kit"),label:(0,n.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Ad Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Ad User Data","gtm-kit"),label:(0,n.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Analytics Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Functionality Storage","gtm-kit"),label:(0,n.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Personalization Storage","gtm-kit"),label:(0,n.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Security Storage","gtm-kit"),label:(0,n.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)("h4",{className:"gtmkit-font-bold gtmkit-pt-8",children:(0,n.__)("Advanced","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Redact Ads Data","gtm-kit"),label:(0,n.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Pass through URL parameters","gtm-kit"),label:(0,n.__)("Pass through ad click, client ID, and session ID information in URLs","gtm-kit"),optionName:"gcm_url_passthrough",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,n.__)("Enter time in milliseconds","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})]})]})},we=({label:t,value:e,tag:i})=>(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2",children:(0,d.jsx)("strong",{children:t})}),(0,d.jsx)("td",{className:"gtmkit-px-4 gtmkit-py-2",children:"code"===i?(0,d.jsx)("code",{className:"gtmkit-text-sm",children:e}):(0,d.jsx)("em",{children:e})})]}),Ee=()=>{const{useSiteData:t}=(0,a.useContext)(g),e=Object.values(t.shared_data);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey",children:(0,n.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey",children:(0,n.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")}),(0,d.jsx)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6",children:(0,d.jsx)("tbody",{className:"gtmkit-py-6",children:e.map((function(t,e){return(0,d.jsx)(we,{label:t.label,value:t.value,tag:t.tag},e)}))})})]})},Te={variant:{section:"gtmkit-feature-upsell--section",single:"gtmkit-feature-upsell--single"}},Ce=({children:t,shouldUpsell:e=!0,single:i=!1,className:a="",variant:o="section",cardLink:r="",cardText:l=(0,n.__)("Unlock with premium","gtm-kit"),...c})=>{if(!e)return t;const m=r||ue("upgrades","upgrades");return(0,d.jsxs)("div",{className:Mt()("gtmkit-feature-upsell gtmkit-relative gtmkit-max-w-screen-lg",Te.variant[o],a),children:[(0,d.jsx)("div",{className:Mt()("gtmkit-opacity-60",{"gtmkit-space-y-8":"section"===o},{"gtmkit-px-4":"single"===o}),children:t}),(0,d.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-ring-1 gtmkit-ring-black gtmkit-ring-opacity-5 gtmkit-shadow-lg gtmkit-rounded-md"}),(0,d.jsx)("div",{className:Mt()("gtmkit-absolute gtmkit-inset-0 gtmkit-flex gtmkit-items-center",{"gtmkit-justify-center":"section"===o},{"gtmkit-justify-end":"single"===o}),children:(0,d.jsx)(s.Button,{as:"a",className:Mt()("gtmkit-shadow-lg gtmkit-rounded is-primary",{"gtmkit-text-lg gtmkit-py-6 gtmkit-px-8":"section"===o},{"gtmkit-text-sm gtmkit-py-0.5 gtmkit-px-4 gtmkit-mr-8":"single"===o}),variant:"upsell",onClick:()=>{window.location.href=m},target:"_blank",rel:"noopener",...c,children:l})})]})},De=()=>{const{useSettings:t,useUpdateStateSettings:e,useSiteData:i,useSetNotificationStatus:s,isPremium:o}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Misc","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Automatic Updates","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-my-4 gtmkit-text-color-grey",children:(0,n.__)("New releases of GTM Kit may contain important updates to comply with changes in Google Tag Manager or analytics in general. We recommend enabling automatic plugin updates for GTM Kit to ensure it is always up to date.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-my-4 gtmkit-text-color-grey",children:(0,n.__)("You can, of course, manually update GTM Kit whenever it suits you, but we highly recommend that you regularly update your plugins and themes to the latest versions to keep your site secure.","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Enable Automatic Updates","gtm-kit"),label:(0,n.__)("Automatically update the GTM Kit plugin when new releases are available.","gtm-kit"),optionGroup:"misc",optionName:"auto_update",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-auto-update"})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Logging and debugging","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("div",{className:"gtmkit-py-2",children:(0,d.jsx)(Ce,{shouldUpsell:!o,variant:"single",children:(0,d.jsx)(fe,{title:(0,n.__)("Event Inspector","gtm-kit"),label:(0,n.__)("The event inspector is placed in the footer of the frontand and allows you to see all the fired GTM events.","gtm-kit"),optionName:"event_inspector",disabled:!o,useSettings:t,useUpdateStateSettings:e,premium:o,narrow:!0})})}),(0,d.jsx)(fe,{title:(0,n.__)("Console log","gtm-kit"),label:(0,n.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-log-active"}),(0,d.jsx)(fe,{title:(0,n.__)("Debug log","gtm-kit"),label:(0,n.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-log-active"})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ee,{}),(0,d.jsx)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey",children:(0,n.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Share anonymous data","gtm-kit"),label:(0,n.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active",useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center",children:(0,d.jsxs)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2",children:["(",(0,n.__)("Version:","gtm-kit")," ",i.gtmkit_version,")"]})}),(0,d.jsx)(be.Content,{children:(0,d.jsxs)("p",{children:[(0,n.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,d.jsx)("br",{}),(0,d.jsx)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer",children:(0,n.__)("The changelog","gtm-kit")}),(0,d.jsx)("br",{}),(0,d.jsx)("a",{className:"gtmkit-text-color-primary  hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,n.__)("The GitHub repository","gtm-kit")})]})})]})]})},Ue=()=>(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ge,{title:(0,n.__)("Integrations","gtm-kit"),data:pe("integrations")})}),Ae=({pluginName:t})=>(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.sprintf)(
     1(()=>{var t={942:(t,e)=>{var i;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var t="",e=0;e<arguments.length;e++){var i=arguments[e];i&&(t=o(t,s(i)))}return t}function s(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return a.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var i in t)n.call(t,i)&&t[i]&&(e=o(e,i));return e}function o(t,e){return e?t?t+" "+e:t+e:t}t.exports?(a.default=a,t.exports=a):void 0===(i=function(){return a}.apply(e,[]))||(t.exports=i)}()}},e={};function i(n){var a=e[n];if(void 0!==a)return a.exports;var s=e[n]={exports:{}};return t[n](s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";const t=window.ReactDOM;var e=i.n(t);const n=window.wp.i18n,a=window.wp.element,s=window.wp.components,o=window.lodash,r=window.wp.apiFetch;var l=i.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const c=async(t,e,i=null,n=!1)=>{let a={};try{a=await l()({path:t,method:e,...i&&{data:i}})}catch(i){return{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?a:!0===a.success?a.data:{}},m=(t,e)=>{const i={...t};switch(e.type){case"FETCH_SETTINGS":i.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},i.stateSettings=e.payload.stateSettings,i.siteData=e.payload.siteData,i.notifications=e.payload.notifications,i.installData=e.payload.installData,i.isPending=!1,i.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(i.notice=(0,n.__)("An error occurred.","gtm-kit"),i.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":i.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":i.fetchedSettings=e.payload.fetchedSettings,i.stateSettings=e.payload.stateSettings,i.isPending=!1,i.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,i.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,n.__)("An error occurred.","gtm-kit"):(0,n.__)("Saved Successfully.","gtm-kit"),i.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":i.fetchedSettings=e.payload.fetchedSettings||i.fetchedSettings,i.stateSettings=e.payload.stateSettings||i.stateSettings,i.isPending=e.payload.isPending||i.isPending,i.notice=e.payload.notice||i.notice,i.hasError=e.payload.hasError||i.hasError,i.canSave=e.payload.canSave||i.canSave,i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData,i.supportTicket=e.payload.supportTicket||i.supportTicket,i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey,i.licenseKey=e.payload.licenseKey||i.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData;break;case"SEND_SUPPORT_DATA":i.isSendingSystemData=!1,i.isSystemDataSent=e.payload.isSystemDataSent||i.isSystemDataSent,i.systemDataMessage=e.payload.systemDataMessage||i.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":i.isSendingLicenseKey=!1,i.isLicenseKeySent=e.payload.isLicenseKeySent||i.isLicenseKeySent,i.licenseKeyMessage=e.payload.licenseKeyMessage||i.licenseKeyMessage;break;case"SEND_NOTIFICATION_STATUS_BEFORE":i.isUpdatingNotifications=e.payload.isUpdatingNotifications||i.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":i.isUpdatingNotifications=!1,i.notifications=e.payload.notifications||i.Notifications}return i},d=window.ReactJSXRuntime,g=(0,a.createContext)(),u=t=>{const[e,i]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),n=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},n=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};i({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:n,installData:a}})},s=async t=>{i({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{n()}),[]);const r={useDispatch:t=>{i(t)},useUpdateSettings:async()=>{i({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(n=e.stateSettings,c("gtmkit/v1/set-options","POST",n));var n;i({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:n,useUpdateState:s,useUpdateStateSettings:async(t,i,n)=>{const a=JSON.parse(JSON.stringify(e.stateSettings));let r;a[t][i]=n,r=!(0,o.isEqual)(a,e.fetchedSettings),s({stateSettings:a,canSave:r})},useImportSettings:async(t,i)=>{const n=JSON.parse(JSON.stringify(e.stateSettings));let a;const r={};r.general={...n.general,...i.general},"integrations"in i&&(r.integrations={...n.integrations,...i.integrations}),a=!(0,o.isEqual)(r,e.fetchedSettings),s({stateSettings:r,canSave:a})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{i({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(n=e.supportTicket,c("gtmkit/v1/send-support-data","POST",n,!0));var n;i({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{s({licenseKey:t})},useSendLicenseKey:async()=>{i({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(n=e.licenseKey,c("gtmkit/v1/send-license-key","POST",n,!0));var n;i({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{i({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:"remove"!==e}});const n={"notification-id":t,action:e},a=await(t=>c("gtmkit/v1/set-notification-status","POST",t,!0))(n),s=a.data.metrics.total,o=document.querySelectorAll("li.toplevel_page_gtmkit_general span.menu-counter");o&&o.forEach((t=>{const e=t.querySelector("span.count");e&&(e.textContent=s),t.className=t.className.replace(/count-\d+/,`count-${s}`)})),i({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,notifications:a.data}})},useSettings:e.stateSettings,useIsPending:e.isPending,useNotice:e.notice,useHasError:e.hasError,useCanSave:e.canSave,useSiteData:e.siteData,useInstallData:e.installData,useIsSending:e.isSendingSystemData,useSupportTicket:e.supportTicket,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage,useIsSendingLicenseKey:e.isSendingLicenseKey,useLicenseKey:e.licenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage,useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,d.jsx)(g.Provider,{value:r,children:t.children})},p=window.React;var h,k=i.n(p);function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},f.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(h||(h={}));const _="popstate";function x(t,e){if(!1===t||null==t)throw new Error(e)}function S(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function b(t,e){return{usr:t.state,key:t.key,idx:e}}function y(t,e,i,n){return void 0===i&&(i=null),f({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?j(e):e,{state:i,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function v(t){let{pathname:e="/",search:i="",hash:n=""}=t;return i&&"?"!==i&&(e+="?"===i.charAt(0)?i:"?"+i),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function j(t){let e={};if(t){let i=t.indexOf("#");i>=0&&(e.hash=t.substr(i),t=t.substr(0,i));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var N;function w(t,e,i){return void 0===i&&(i="/"),function(t,e,i,n){let a=F(("string"==typeof e?j(e):e).pathname||"/",i);if(null==a)return null;let s=E(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,i)=>t===e[i]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(s);let o=null;for(let t=0;null==o&&t<s.length;++t){let e=G(a);o=M(s[t],e,n)}return o}(t,e,i,!1)}function E(t,e,i,n){void 0===e&&(e=[]),void 0===i&&(i=[]),void 0===n&&(n="");let a=(t,a,s)=>{let o={relativePath:void 0===s?t.path||"":s,caseSensitive:!0===t.caseSensitive,childrenIndex:a,route:t};o.relativePath.startsWith("/")&&(x(o.relativePath.startsWith(n),'Absolute route path "'+o.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(n.length));let r=B([n,o.relativePath]),l=i.concat(o);t.children&&t.children.length>0&&(x(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+r+'".'),E(t.children,e,l,r)),(null!=t.path||t.index)&&e.push({path:r,score:R(r,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var i;if(""!==t.path&&null!=(i=t.path)&&i.includes("?"))for(let i of T(t.path))a(t,e,i);else a(t,e)})),e}function T(t){let e=t.split("/");if(0===e.length)return[];let[i,...n]=e,a=i.endsWith("?"),s=i.replace(/\?$/,"");if(0===n.length)return a?[s,""]:[s];let o=T(n.join("/")),r=[];return r.push(...o.map((t=>""===t?s:[s,t].join("/")))),a&&r.push(...o),r.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(N||(N={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const C=/^:[\w-]+$/,D=3,U=2,A=1,I=10,O=-2,L=t=>"*"===t;function R(t,e){let i=t.split("/"),n=i.length;return i.some(L)&&(n+=O),e&&(n+=U),i.filter((t=>!L(t))).reduce(((t,e)=>t+(C.test(e)?D:""===e?A:I)),n)}function M(t,e,i){void 0===i&&(i=!1);let{routesMeta:n}=t,a={},s="/",o=[];for(let t=0;t<n.length;++t){let r=n[t],l=t===n.length-1,c="/"===s?e:e.slice(s.length)||"/",m=P({path:r.relativePath,caseSensitive:r.caseSensitive,end:l},c),d=r.route;if(!m&&l&&i&&!n[n.length-1].route.index&&(m=P({path:r.relativePath,caseSensitive:r.caseSensitive,end:!1},c)),!m)return null;Object.assign(a,m.params),o.push({params:a,pathname:B([s,m.pathname]),pathnameBase:W(B([s,m.pathnameBase])),route:d}),"/"!==m.pathnameBase&&(s=B([s,m.pathnameBase]))}return o}function P(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[i,n]=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0),S("*"===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=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,i)=>(n.push({paramName:e,isOptional:null!=i}),i?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),a+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?a+="\\/*$":""!==t&&"/"!==t&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),a=e.match(i);if(!a)return null;let s=a[0],o=s.replace(/(.)\/+$/,"$1"),r=a.slice(1);return{params:n.reduce(((t,e,i)=>{let{paramName:n,isOptional:a}=e;if("*"===n){let t=r[i]||"";o=s.slice(0,s.length-t.length).replace(/(.)\/+$/,"$1")}const l=r[i];return t[n]=a&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:s,pathnameBase:o,pattern:t}}function G(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return S(!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 F(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let i=e.endsWith("/")?e.length-1:e.length,n=t.charAt(i);return n&&"/"!==n?null:t.slice(i)||"/"}function H(t,e,i,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+i+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function K(t,e){let i=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?i.map(((t,e)=>e===i.length-1?t.pathname:t.pathnameBase)):i.map((t=>t.pathnameBase))}function z(t,e,i,n){let a;void 0===n&&(n=!1),"string"==typeof t?a=j(t):(a=f({},t),x(!a.pathname||!a.pathname.includes("?"),H("?","pathname","search",a)),x(!a.pathname||!a.pathname.includes("#"),H("#","pathname","hash",a)),x(!a.search||!a.search.includes("#"),H("#","search","hash",a)));let s,o=""===t||""===a.pathname,r=o?"/":a.pathname;if(null==r)s=i;else{let t=e.length-1;if(!n&&r.startsWith("..")){let e=r.split("/");for(;".."===e[0];)e.shift(),t-=1;a.pathname=e.join("/")}s=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:i,search:n="",hash:a=""}="string"==typeof t?j(t):t,s=i?i.startsWith("/")?i:function(t,e){let i=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?i.length>1&&i.pop():"."!==t&&i.push(t)})),i.length>1?i.join("/"):"/"}(i,e):e;return{pathname:s,search:$(n),hash:Y(a)}}(a,s),c=r&&"/"!==r&&r.endsWith("/"),m=(o||"."===r)&&i.endsWith("/");return l.pathname.endsWith("/")||!c&&!m||(l.pathname+="/"),l}const B=t=>t.join("/").replace(/\/\/+/g,"/"),W=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),$=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const J=["post","put","patch","delete"],q=(new Set(J),["get",...J]);function V(){return V=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},V.apply(this,arguments)}new Set(q),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const X=p.createContext(null),Z=p.createContext(null),Q=p.createContext(null),tt=p.createContext(null),et=p.createContext({outlet:null,matches:[],isDataRoute:!1}),it=p.createContext(null);function nt(){return null!=p.useContext(tt)}function at(){return nt()||x(!1),p.useContext(tt).location}function st(t){p.useContext(Q).static||p.useLayoutEffect(t)}function ot(){let{isDataRoute:t}=p.useContext(et);return t?function(){let{router:t}=function(){let t=p.useContext(X);return t||x(!1),t}(ut.UseNavigateStable),e=ht(pt.UseNavigateStable),i=p.useRef(!1);return st((()=>{i.current=!0})),p.useCallback((function(n,a){void 0===a&&(a={}),i.current&&("number"==typeof n?t.navigate(n):t.navigate(n,V({fromRouteId:e},a)))}),[t,e])}():function(){nt()||x(!1);let t=p.useContext(X),{basename:e,future:i,navigator:n}=p.useContext(Q),{matches:a}=p.useContext(et),{pathname:s}=at(),o=JSON.stringify(K(a,i.v7_relativeSplatPath)),r=p.useRef(!1);return st((()=>{r.current=!0})),p.useCallback((function(i,a){if(void 0===a&&(a={}),!r.current)return;if("number"==typeof i)return void n.go(i);let l=z(i,JSON.parse(o),s,"path"===a.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:B([e,l.pathname])),(a.replace?n.replace:n.push)(l,a.state,a)}),[e,n,o,s,t])}()}function rt(t,e){let{relative:i}=void 0===e?{}:e,{future:n}=p.useContext(Q),{matches:a}=p.useContext(et),{pathname:s}=at(),o=JSON.stringify(K(a,n.v7_relativeSplatPath));return p.useMemo((()=>z(t,JSON.parse(o),s,"path"===i)),[t,o,s,i])}function lt(t,e,i,n){nt()||x(!1);let{navigator:a}=p.useContext(Q),{matches:s}=p.useContext(et),o=s[s.length-1],r=o?o.params:{},l=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,m=at();if(e){var d;let t="string"==typeof e?j(e):e;"/"===l||(null==(d=t.pathname)?void 0:d.startsWith(l))||x(!1),c=t}else c=m;let g=c.pathname||"/",u=g;if("/"!==l){let t=l.replace(/^\//,"").split("/");u="/"+g.replace(/^\//,"").split("/").slice(t.length).join("/")}let k=w(t,{pathname:u}),f=function(t,e,i,n){var a;if(void 0===e&&(e=[]),void 0===i&&(i=null),void 0===n&&(n=null),null==t){var s;if(!i)return null;if(i.errors)t=i.matches;else{if(!(null!=(s=n)&&s.v7_partialHydration&&0===e.length&&!i.initialized&&i.matches.length>0))return null;t=i.matches}}let o=t,r=null==(a=i)?void 0:a.errors;if(null!=r){let t=o.findIndex((t=>t.route.id&&void 0!==(null==r?void 0:r[t.route.id])));t>=0||x(!1),o=o.slice(0,Math.min(o.length,t+1))}let l=!1,c=-1;if(i&&n&&n.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}=i,a=e.route.loader&&void 0===t[e.route.id]&&(!n||void 0===n[e.route.id]);if(e.route.lazy||a){l=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((t,n,a)=>{let s,m=!1,d=null,g=null;var u;i&&(s=r&&n.route.id?r[n.route.id]:void 0,d=n.route.errorElement||mt,l&&(c<0&&0===a?(kt[u="route-fallback"]||(kt[u]=!0),m=!0,g=null):c===a&&(m=!0,g=n.route.hydrateFallbackElement||null)));let h=e.concat(o.slice(0,a+1)),k=()=>{let e;return e=s?d:m?g:n.route.Component?p.createElement(n.route.Component,null):n.route.element?n.route.element:t,p.createElement(gt,{match:n,routeContext:{outlet:t,matches:h,isDataRoute:null!=i},children:e})};return i&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?p.createElement(dt,{location:i.location,revalidation:i.revalidation,component:d,error:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},r,t.params),pathname:B([l,a.encodeLocation?a.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:B([l,a.encodeLocation?a.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),s,i,n);return e&&f?p.createElement(tt.Provider,{value:{location:V({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:h.Pop}},f):f}function ct(){let t=function(){var t;let e=p.useContext(it),i=function(){let t=p.useContext(Z);return t||x(!1),t}(pt.UseRouteError),n=ht(pt.UseRouteError);return void 0!==e?e:null==(t=i.errors)?void 0:t[n]}(),e=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),i=t instanceof Error?t.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},e),i?p.createElement("pre",{style:n},i):null,null)}const mt=p.createElement(ct,null);class dt extends p.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?p.createElement(et.Provider,{value:this.props.routeContext},p.createElement(it.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function gt(t){let{routeContext:e,match:i,children:n}=t,a=p.useContext(X);return a&&a.static&&a.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=i.route.id),p.createElement(et.Provider,{value:e},n)}var ut=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ut||{}),pt=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}(pt||{});function ht(t){let e=function(){let t=p.useContext(et);return t||x(!1),t}(),i=e.matches[e.matches.length-1];return i.route.id||x(!1),i.route.id}const kt={};function ft(t){let{to:e,replace:i,state:n,relative:a}=t;nt()||x(!1);let{future:s,static:o}=p.useContext(Q),{matches:r}=p.useContext(et),{pathname:l}=at(),c=ot(),m=z(e,K(r,s.v7_relativeSplatPath),l,"path"===a),d=JSON.stringify(m);return p.useEffect((()=>c(JSON.parse(d),{replace:i,state:n,relative:a})),[c,d,a,i,n]),null}function _t(t){x(!1)}function xt(t){let{basename:e="/",children:i=null,location:n,navigationType:a=h.Pop,navigator:s,static:o=!1,future:r}=t;nt()&&x(!1);let l=e.replace(/^\/*/,"/"),c=p.useMemo((()=>({basename:l,navigator:s,static:o,future:V({v7_relativeSplatPath:!1},r)})),[l,r,s,o]);"string"==typeof n&&(n=j(n));let{pathname:m="/",search:d="",hash:g="",state:u=null,key:k="default"}=n,f=p.useMemo((()=>{let t=F(m,l);return null==t?null:{location:{pathname:t,search:d,hash:g,state:u,key:k},navigationType:a}}),[l,m,d,g,u,k,a]);return null==f?null:p.createElement(Q.Provider,{value:c},p.createElement(tt.Provider,{children:i,value:f}))}function St(t){let{children:e,location:i}=t;return lt(bt(e),i)}function bt(t,e){void 0===e&&(e=[]);let i=[];return p.Children.forEach(t,((t,n)=>{if(!p.isValidElement(t))return;let a=[...e,n];if(t.type===p.Fragment)return void i.push.apply(i,bt(t.props.children,a));t.type!==_t&&x(!1),t.props.index&&t.props.children&&x(!1);let s={id:t.props.id||a.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=bt(t.props.children,a)),i.push(s)})),i}function yt(){return yt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},yt.apply(this,arguments)}function vt(t,e){if(null==t)return{};var i,n,a={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(a[i]=t[i]);return a}p.startTransition,new Promise((()=>{})),p.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const jt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Nt=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"];try{window.__reactRouterVersion="6"}catch(t){}const wt=p.createContext({isTransitioning:!1});new Map;const Et=p.startTransition;function Tt(t){let{basename:e,children:i,future:n,window:a}=t,s=p.useRef();var o;null==s.current&&(s.current=(void 0===(o={window:a,v5Compat:!0})&&(o={}),function(t,e,i,n){void 0===n&&(n={});let{window:a=document.defaultView,v5Compat:s=!1}=n,o=a.history,r=h.Pop,l=null,c=m();function m(){return(o.state||{idx:null}).idx}function d(){r=h.Pop;let t=m(),e=null==t?null:t-c;c=t,l&&l({action:r,location:u.location,delta:e})}function g(t){let e="null"!==a.location.origin?a.location.origin:a.location.href,i="string"==typeof t?t:v(t);return i=i.replace(/ $/,"%20"),x(e,"No window.location.(origin|href) available to create URL for href: "+i),new URL(i,e)}null==c&&(c=0,o.replaceState(f({},o.state,{idx:c}),""));let u={get action(){return r},get location(){return t(a,o)},listen(t){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(_,d),l=t,()=>{a.removeEventListener(_,d),l=null}},createHref:t=>e(a,t),createURL:g,encodeLocation(t){let e=g(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){r=h.Push;let n=y(u.location,t,e);i&&i(n,t),c=m()+1;let d=b(n,c),g=u.createHref(n);try{o.pushState(d,"",g)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;a.location.assign(g)}s&&l&&l({action:r,location:u.location,delta:1})},replace:function(t,e){r=h.Replace;let n=y(u.location,t,e);i&&i(n,t),c=m();let a=b(n,c),d=u.createHref(n);o.replaceState(a,"",d),s&&l&&l({action:r,location:u.location,delta:0})},go:t=>o.go(t)};return u}((function(t,e){let{pathname:i="/",search:n="",hash:a=""}=j(t.location.hash.substr(1));return i.startsWith("/")||i.startsWith(".")||(i="/"+i),y("",{pathname:i,search:n,hash:a},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let i=t.document.querySelector("base"),n="";if(i&&i.getAttribute("href")){let e=t.location.href,i=e.indexOf("#");n=-1===i?e:e.slice(0,i)}return n+"#"+("string"==typeof e?e:v(e))}),(function(t,e){S("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),o)));let r=s.current,[l,c]=p.useState({action:r.action,location:r.location}),{v7_startTransition:m}=n||{},d=p.useCallback((t=>{m&&Et?Et((()=>c(t))):c(t)}),[c,m]);return p.useLayoutEffect((()=>r.listen(d)),[r,d]),p.useEffect((()=>{return null==(t=n)||t.v7_startTransition,void 0===(null==t?void 0:t.v7_relativeSplatPath)&&(!e||e.v7_relativeSplatPath),void(e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation));var t,e}),[n]),p.createElement(xt,{basename:e,children:i,location:l.location,navigationType:l.action,navigator:r,future:n})}t.flushSync,p.useId;const Ct="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Dt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ut=p.forwardRef((function(t,e){let i,{onClick:n,relative:a,reloadDocument:s,replace:o,state:r,target:l,to:c,preventScrollReset:m,viewTransition:d}=t,g=vt(t,jt),{basename:u}=p.useContext(Q),h=!1;if("string"==typeof c&&Dt.test(c)&&(i=c,Ct))try{let t=new URL(window.location.href),e=c.startsWith("//")?new URL(t.protocol+c):new URL(c),i=F(e.pathname,u);e.origin===t.origin&&null!=i?c=i+e.search+e.hash:h=!0}catch(t){}let k=function(t,e){let{relative:i}=void 0===e?{}:e;nt()||x(!1);let{basename:n,navigator:a}=p.useContext(Q),{hash:s,pathname:o,search:r}=rt(t,{relative:i}),l=o;return"/"!==n&&(l="/"===o?n:B([n,o])),a.createHref({pathname:l,search:r,hash:s})}(c,{relative:a}),f=function(t,e){let{target:i,replace:n,state:a,preventScrollReset:s,relative:o,viewTransition:r}=void 0===e?{}:e,l=ot(),c=at(),m=rt(t,{relative:o});return p.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,i)){e.preventDefault();let i=void 0!==n?n:v(c)===v(m);l(t,{replace:i,state:a,preventScrollReset:s,relative:o,viewTransition:r})}}),[c,l,m,n,a,i,t,s,o,r])}(c,{replace:o,state:r,target:l,preventScrollReset:m,relative:a,viewTransition:d});return p.createElement("a",yt({},g,{href:i||k,onClick:h||s?n:function(t){n&&n(t),t.defaultPrevented||f(t)},ref:e,target:l}))})),At=p.forwardRef((function(t,e){let{"aria-current":i="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:r,viewTransition:l,children:c}=t,m=vt(t,Nt),d=rt(r,{relative:m.relative}),g=at(),u=p.useContext(Z),{navigator:h,basename:k}=p.useContext(Q),f=null!=u&&function(t,e){void 0===e&&(e={});let i=p.useContext(wt);null==i&&x(!1);let{basename:n}=function(){let t=p.useContext(X);return t||x(!1),t}(It.useViewTransitionState),a=rt(t,{relative:e.relative});if(!i.isTransitioning)return!1;let s=F(i.currentLocation.pathname,n)||i.currentLocation.pathname,o=F(i.nextLocation.pathname,n)||i.nextLocation.pathname;return null!=P(a.pathname,o)||null!=P(a.pathname,s)}(d)&&!0===l,_=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,S=g.pathname,b=u&&u.navigation&&u.navigation.location?u.navigation.location.pathname:null;n||(S=S.toLowerCase(),b=b?b.toLowerCase():null,_=_.toLowerCase()),b&&k&&(b=F(b,k)||b);const y="/"!==_&&_.endsWith("/")?_.length-1:_.length;let v,j=S===_||!s&&S.startsWith(_)&&"/"===S.charAt(y),N=null!=b&&(b===_||!s&&b.startsWith(_)&&"/"===b.charAt(_.length)),w={isActive:j,isPending:N,isTransitioning:f},E=j?i:void 0;v="function"==typeof a?a(w):[a,j?"active":null,N?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof o?o(w):o;return p.createElement(Ut,yt({},m,{"aria-current":E,className:v,ref:e,style:T,to:r,viewTransition:l}),"function"==typeof c?c(w):c)}));var It,Ot;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(It||(It={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Ot||(Ot={}));const Lt=({title:t})=>(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky",children:(0,d.jsx)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between",children:(0,d.jsxs)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl",children:[(0,d.jsxs)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,d.jsx)("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,d.jsxs)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)",children:[(0,d.jsx)("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,d.jsx)("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]})})})});var Rt=i(942),Mt=i.n(Rt);const Pt=({count:t,important:e,nav:i=!1})=>(0,d.jsx)(d.Fragment,{children:t>0&&(0,d.jsx)("span",{className:Mt()("gtmkit-ml-2 gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py-px gtmkit-leading-[1.125rem] gtmkit-uppercase",{"gtmkit-bg-color-error":e},{"gtmkit-bg-color-success":!e},{"gtmkit-px-1.5":i},{"gtmkit-px-2":!i}),children:t})}),Gt=({metrics:t})=>(0,d.jsx)(Pt,{count:t.total,important:t.problem>0,nav:!0}),Ft=Pt,Ht=({to:t,title:e})=>{const{useNotifications:i}=(0,a.useContext)(g);return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(At,{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 ":""),children:[e,"notifications"===t&&(0,d.jsx)(Gt,{metrics:i.metrics})]})})},Kt=({NavList:t})=>(0,d.jsx)("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",children:t.map((function(t){return(0,d.jsx)(Ht,{to:t.to,title:t.title},t.to)}))});function zt(){return zt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)({}).hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},zt.apply(null,arguments)}function Bt(t,e){if(null==t)return{};var i={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;i[n]=t[n]}return i}function Wt(t,e){return Wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wt(t,e)}function $t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Wt(t,e)}function Yt(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Jt=k().createContext(null);var qt=function(t){return t.scrollTop},Vt="unmounted",Xt="exited",Zt="entering",Qt="entered",te="exiting",ee=function(t){function i(e,i){var n;n=t.call(this,e,i)||this;var a,s=i&&!i.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?s?(a=Xt,n.appearStatus=Zt):a=Qt:a=e.unmountOnExit||e.mountOnEnter?Vt:Xt,n.state={status:a},n.nextCallback=null,n}$t(i,t),i.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Vt?{status:Xt}:null};var n=i.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var i=this.state.status;this.props.in?i!==Zt&&i!==Qt&&(e=Zt):i!==Zt&&i!==Qt||(e=te)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,i,n=this.props.timeout;return t=e=i=n,null!=n&&"number"!=typeof n&&(t=n.exit,e=n.enter,i=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:i}},n.updateStatus=function(t,i){if(void 0===t&&(t=!1),null!==i)if(this.cancelNextCallback(),i===Zt){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:e().findDOMNode(this);n&&qt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Xt&&this.setState({status:Vt})},n.performEnter=function(t){var i=this,n=this.props.enter,a=this.context?this.context.isMounting:t,s=this.props.nodeRef?[a]:[e().findDOMNode(this),a],o=s[0],r=s[1],l=this.getTimeouts(),c=a?l.appear:l.enter;t||n?(this.props.onEnter(o,r),this.safeSetState({status:Zt},(function(){i.props.onEntering(o,r),i.onTransitionEnd(c,(function(){i.safeSetState({status:Qt},(function(){i.props.onEntered(o,r)}))}))}))):this.safeSetState({status:Qt},(function(){i.props.onEntered(o)}))},n.performExit=function(){var t=this,i=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:e().findDOMNode(this);i?(this.props.onExit(a),this.safeSetState({status:te},(function(){t.props.onExiting(a),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Xt},(function(){t.props.onExited(a)}))}))}))):this.safeSetState({status:Xt},(function(){t.props.onExited(a)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,i=!0;return this.nextCallback=function(n){i&&(i=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(t,i){this.setNextCallback(i);var n=this.props.nodeRef?this.props.nodeRef.current:e().findDOMNode(this),a=null==t&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=s[0],r=s[1];this.props.addEndListener(o,r)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Vt)return null;var e=this.props,i=e.children,n=(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,Bt(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return k().createElement(Jt.Provider,{value:null},"function"==typeof i?i(t,n):k().cloneElement(k().Children.only(i),n))},i}(k().Component);function ie(){}ee.contextType=Jt,ee.propTypes={},ee.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ie,onEntering:ie,onEntered:ie,onExit:ie,onExiting:ie,onExited:ie},ee.UNMOUNTED=Vt,ee.EXITED=Xt,ee.ENTERING=Zt,ee.ENTERED=Qt,ee.EXITING=te;const ne=ee;var ae=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return n=e,void((i=t).classList?i.classList.remove(n):"string"==typeof i.className?i.className=Yt(i.className,n):i.setAttribute("class",Yt(i.className&&i.className.baseVal||"",n)));var i,n}))},se=function(t){function e(){for(var e,i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return(e=t.call.apply(t,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1];e.removeClasses(a,"exit"),e.addClass(a,s?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,i)},e.onEntering=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1]?"appear":"enter";e.addClass(a,s,"active"),e.props.onEntering&&e.props.onEntering(t,i)},e.onEntered=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1]?"appear":"enter";e.removeClasses(a,s),e.addClass(a,s,"done"),e.props.onEntered&&e.props.onEntered(t,i)},e.onExit=function(t){var i=e.resolveArguments(t)[0];e.removeClasses(i,"appear"),e.removeClasses(i,"enter"),e.addClass(i,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var i=e.resolveArguments(t)[0];e.addClass(i,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var i=e.resolveArguments(t)[0];e.removeClasses(i,"exit"),e.addClass(i,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,i){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,i]},e.getClassNames=function(t){var i=e.props.classNames,n="string"==typeof i,a=n?(n&&i?i+"-":"")+t:i[t];return{baseClassName:a,activeClassName:n?a+"-active":i[t+"Active"],doneClassName:n?a+"-done":i[t+"Done"]}},e}$t(e,t);var i=e.prototype;return i.addClass=function(t,e,i){var n=this.getClassNames(e)[i+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===i&&a&&(n+=" "+a),"active"===i&&t&&qt(t),n&&(this.appliedClasses[e][i]=n,function(t,e){t&&e&&e.split(" ").forEach((function(e){return n=e,void((i=t).classList?i.classList.add(n):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(i,n)||("string"==typeof i.className?i.className=i.className+" "+n:i.setAttribute("class",(i.className&&i.className.baseVal||"")+" "+n)));var i,n}))}(t,n))},i.removeClasses=function(t,e){var i=this.appliedClasses[e],n=i.base,a=i.active,s=i.done;this.appliedClasses[e]={},n&&ae(t,n),a&&ae(t,a),s&&ae(t,s)},i.render=function(){var t=this.props,e=(t.classNames,Bt(t,["classNames"]));return k().createElement(ne,zt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(k().Component);se.defaultProps={classNames:""},se.propTypes={};const oe=se,re=({title:t=(0,n.__)("Save","gtm-kit"),className:e="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:i,useIsPending:o,useCanSave:r}=(0,a.useContext)(g);return(0,d.jsxs)(s.Button,{className:e,onClick:()=>i(),variant:"primary",disabled:o||!r,children:[r?t:(0,n.__)("Saved","gtm-kit"),o?(0,d.jsx)(s.Spinner,{}):""]})},le=()=>{const{useCanSave:t}=(0,a.useContext)(g);return(0,d.jsx)(oe,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0,children:(0,d.jsx)("footer",{className:"gtmkit-fixed gtmkit-bottom-0 gtmkit-w-full gtmkit-z-10 gtmkit-bg-color-grey gtmkit-text-white gtmkit-p-8",children:(0,d.jsx)(re,{})})})},ce=({subject:t})=>{const e=!0===t||"on"===t,i=!0===e?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,d.jsx)("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,children:e?(0,n.__)("Active","gtm-kit"):(0,n.__)("Inactive","gtm-kit")})},me=(0,a.forwardRef)((({children:t,className:e="",...i},n)=>(0,d.jsx)("div",{...i,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 "+e,ref:n,children:t})));me.Header=({as:t="h3",title:e="",children:i,className:n="",...a})=>(0,d.jsxs)("div",{...a,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+n,children:[(0,d.jsx)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading",children:e}),i]}),me.Content=({as:t="div",children:e,className:i="gtmkit-flex-auto",...n})=>(0,d.jsx)(t,{...n,className:i,children:e}),me.Button=({url:t,destination:e,newTab:i=!1,text:n,group:a="",...o})=>{const r=ot();return(0,d.jsx)("div",{...o,className:"gtmkit-mt-4 gtmkit-mb-0.5",children:(0,d.jsx)(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:()=>{e&&t&&!1===i?window.gtmkitSettings.current_page===a?r(e,{replace:!0}):window.location.href=t+"#"+e:t?i?window.open(t):window.location.href=t:r(e,{replace:!0})},children:(0,d.jsx)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold",children:n})})})};const de=me,ge=({title:t,data:e,className:i=""})=>{const{useSettings:s}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6",children:t}),(0,d.jsx)("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] "+i,children:e.map(((t,e)=>!1===t.featured?null:(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:t.title,children:t.pill?(0,d.jsx)(ce,{subject:s[t.group][t.option]}):null}),(0,d.jsx)(de.Content,{children:t.text.map(((t,e)=>(0,d.jsx)("p",{children:t},e)))}),(0,d.jsx)(de.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,n.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group})]},e)))})]})},ue=(t="general",e="")=>{const i=window.gtmkitSettings.adminPageUrl;return e?`${i}${t}#/${e}`:`${i}${t}`},pe=t=>((t,e,i)=>{const n=(t,i)=>({...i,title:t.title,to:t.path,group:t.group||i.group,option:t.option||i.option,text:[t.description],link:{...i.link,url:ue(e,""),destination:"/"+t.path}});return"templates"===e?Object.keys(t).map((e=>n(t[e][0],i))):Object.keys(t).map((e=>n(t[e],i)))})(window.gtmkitSettings[t],t,function(t){switch(t){case"integrations":return{pill:!0,group:"integrations",option:null,link:{internal:!0,text:(0,n.__)("Setup Integration","gtm-kit")}};case"templates":return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,n.__)("Get Template","gtm-kit")}};default:return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,n.__)("Read More","gtm-kit")}}}}(t)),he=()=>{const{useSettings:t,useNotifications:e}=(0,a.useContext)(g),[i,s]=(0,a.useState)(window.gtmkitSettings.tutorials),o=e.metrics;return(0,a.useEffect)((()=>{s((t=>[...t,{title:(0,n.__)("See all tutorials","gtm-kit"),text:[(0,n.__)("See all our tutorials and get the most out of GTM Kit","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=documentation&utm_content=dashboard-tutorials",text:(0,n.__)("Read articles","gtm-kit")},featured:!0}]))}),[]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("General","gtm-kit")}),(0,d.jsxs)("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]",children:[(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:"Google Tag Manager Container",children:(0,d.jsx)(ce,{subject:t.general.gtm_id&&t.general.container_active})}),(0,d.jsx)(de.Content,{children:t.general.gtm_id&&t.general.container_active?(0,d.jsxs)("p",{children:[(0,n.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id]}):(0,d.jsx)("p",{children:(0,n.__)("The container is not active but the datalayer is generated.","gtm-kit")})}),(0,d.jsx)(de.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})]}),(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:(0,n.__)("Notifications","gtm-kit"),className:"!gtmkit-justify-start",children:(0,d.jsx)(Ft,{count:o.total,important:o.problem>0})}),(0,d.jsx)(de.Content,{children:o.total?(0,d.jsx)(d.Fragment,{children:o.problem?(0,d.jsx)("p",{children:(0,n.__)("There are some problems that require your attention.","gtm-kit")}):(0,d.jsx)("p",{children:(0,n.__)("There are some notifications that may require your attention.","gtm-kit")})}):(0,d.jsx)("p",{children:(0,n.__)("No notifications at the moment.","gtm-kit")})}),(0,d.jsx)(de.Button,{destination:"/notifications",text:(0,n.__)("See all notifications","gtm-kit")})]}),(0,d.jsxs)(de,{children:[(0,d.jsx)(de.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit"),children:(0,d.jsx)(ce,{subject:t.general.analytics_active})}),(0,d.jsx)(de.Content,{children:(0,d.jsx)("p",{children:(0,n.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit")})}),(0,d.jsx)(de.Button,{destination:"/misc",text:(0,n.__)("Share anonymous data","gtm-kit")})]})]}),(0,d.jsx)(ge,{title:(0,n.__)("Tutorials","gtm-kit"),data:i}),(0,d.jsx)(ge,{title:(0,n.__)("Integrations","gtm-kit"),data:pe("integrations")})]})},ke=({title:t,placeholder:e,help:i,className:n="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:a="general",optionName:o,isDisabled:r,useSettings:l,useUpdateStateSettings:c,useSetNotificationStatus:m,notificationId:g=""})=>(0,d.jsx)(s.TextControl,{label:t,placeholder:e,help:i,className:n,value:l[a][o],onChange:t=>{c(a,o,t),g&&m(g,"remove")},disabled:r}),fe=({title:t,label:e,optionGroup:i="general",optionName:n,disabled:o=!1,useSettings:r,useUpdateStateSettings:l,narrow:c=!1,premium:m=!1,useSetNotificationStatus:g,notificationId:u=""})=>{const p=(0,a.useId)(),h="gtmkit-settings-field-wrap "+(c?"gtmkit-py-2":"gtmkit-py-4");return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("div",{className:h,children:(0,d.jsx)(s.BaseControl,{label:m?(0,d.jsxs)(d.Fragment,{children:[t,(0,d.jsx)("span",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-normal gtmkit-rounded-full gtmkit-py-0.5 gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"})]}):t,id:p,children:(0,d.jsx)(s.ToggleControl,{label:e,checked:!o&&r[i][n],onChange:()=>{l(i,n,!(r&&r[i][n])),u&&g(u,"remove")},disabled:o})})})})},_e=({title:t,options:e,help:i,className:n="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:a="general",optionName:o,disabled:r,useSettings:l,useUpdateStateSettings:c})=>(0,d.jsx)(s.RadioControl,{label:t,options:e,help:i,className:n,selected:parseInt(l[a][o]),onChange:t=>c(a,o,t),disabled:r}),xe=({title:t,help:e,items:i=[],optionGroup:n="general",optionName:o,disabled:r=!1,useSettings:l,useUpdateStateSettings:c})=>{const m=(0,a.useId)(),g=Array.isArray(l[n][o])?l[n][o]:[],[u,p]=(0,a.useState)(g);return(0,a.useEffect)((()=>{const t=Array.isArray(l[n][o])?l[n][o]:[];p(t)}),[l]),(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4",children:(0,d.jsx)(s.BaseControl,{label:t,help:e,id:m,children:i.map((t=>(0,d.jsx)(s.CheckboxControl,{label:t.name,disabled:r,checked:u.includes(t.role),onChange:e=>((t,e)=>{p((i=>{let a;return a=t?[...i,e]:i.filter((t=>t!==e)),c(n,o,a),a}))})(e,t.role)},t.role)))})})})},Se=(0,a.forwardRef)((({children:t,className:e="",disabled:i=!1,...n},a)=>(0,d.jsx)("div",{...n,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-max-w-screen-lg gtmkit-border-color-grey gtmkit-rounded "+e+(i?"gtmkit-opacity-60":""),ref:a,children:t})));Se.Header=({as:t="h3",title:e="",children:i,className:n="",...a})=>(0,d.jsxs)(t,{...a,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 "+n,children:[e,i]}),Se.Content=({as:t="div",children:e,className:i="",...n})=>(0,d.jsx)(t,{...n,className:"gtmkit-px-8 gtmkit-py-6 "+i,children:e});const be=Se,ye=()=>{const{useSettings:t,useUpdateStateSettings:e,useUserRoles:i,useSetNotificationStatus:s}=(0,a.useContext)(g),o=!(t.general.sgtm_domain&&t.general.sgtm_domain.trim()&&t.general.sgtm_container_identifier&&t.general.sgtm_container_identifier.trim()),r=at();return(0,p.useEffect)((()=>{const t=new URLSearchParams(r.search).get("focus");if(t){const e=document.getElementById(t);e&&e.scrollIntoView()}}),[r]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Google Tag Manager container","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("General Container Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")}),(0,d.jsx)(ke,{title:(0,n.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,n.__)("Enter GTM Container ID","gtm-kit"),useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-container-injection"}),(0,d.jsx)(fe,{title:(0,n.__)("Inject Container Code","gtm-kit"),label:(0,n.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-container-injection"}),(0,d.jsx)(fe,{title:(0,n.__)("Just the container","gtm-kit"),label:(0,n.__)("Setting this to On will reduce the functionality to just the GTM container code. No additional data will be pushed to the datalayer regardless of any other settings.","gtm-kit"),optionName:"just_the_container",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,n.__)("The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do so.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsx)("div",{id:"sgtm"}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(ke,{title:(0,n.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,n.__)("Enter domain","gtm-kit"),help:(0,n.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,n.__)("Enter loader name","gtm-kit"),help:(0,n.__)("Only use if you are using a custom loader.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,n.__)("Prolong cookie lifetime in Safari and other browsers with ITP. This only works if you use Stape sGTM hosting and have set up the Cookie Keeper power up.","gtm-kit"),optionName:"sgtm_cookie_keeper",disabled:o,useSettings:t,useUpdateStateSettings:e})]}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Google Tag Manager Server-side Tagging","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,d.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,n.__)("Learn more","gtm-kit")})]}),(0,d.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Hosting server-side GTM containers","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("Stape.io is a solution for hosting server-side Google Tag Manager containers, offering a simplified approach that demands less technical expertise than solutions like Google Cloud Platform.","gtm-kit")," ",(0,n.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")]}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,d.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,n.__)("Learn more about Stape.io","gtm-kit")})})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Page Speed Optimization","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsx)(be.Content,{children:(0,d.jsx)(fe,{title:(0,n.__)("load_delayed_js event","gtm-kit"),label:(0,n.__)("Setting this to On will push the event 'load_delayed_js' on page load.","gtm-kit"),optionName:"load_js_event",useSettings:t,useUpdateStateSettings:e})}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Delay JavaScript execution","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("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,d.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,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Tag Manager Environment","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(ke,{title:(0,n.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,n.__)("Enter gtm_auth code","gtm-kit"),help:(0,n.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,n.__)("Enter gtm_preview code","gtm-kit"),help:(0,n.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Environments","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,n.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,n.__)("If left empty the default environment will be used.","gtm-kit")]}),(0,d.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Override settings in wp-config.php","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("You can override the values by using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments.","gtm-kit")," ",(0,d.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,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Exclude User Roles","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsx)(be.Content,{children:(0,d.jsx)(xe,{title:(0,n.__)("Exclude user roles","gtm-kit"),help:(0,n.__)("Select the roles that you want to exclude from tracking.","gtm-kit"),items:i,optionName:"exclude_user_roles",useSettings:t,useUpdateStateSettings:e})}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold gtmkit-text-red-600",children:(0,n.__)("Warning!","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("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,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Please ensure thorough and proper testing of this.","gtm-kit")})]})})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Container Code Implementation","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(_e,{title:(0,n.__)("Container code implementation:","gtm-kit"),options:[{label:(0,n.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,n.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,n.__)("Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle.","gtm-kit"),optionName:"script_implementation",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,n.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,n.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,n.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,n.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,n.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,n.__)('The preferred method to implement the <noscript> container code is just after the opening <body> tag. This requires that your theme uses the "body_open" hook. If your theme does not support this the script can be injected in the footer or you can use the function below.',"gtm-kit"),optionName:"noscript_implementation",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,d.jsx)("code",{children:"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"})})]})]})]})},ve=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Post Data","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Post Data Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Post type","gtm-kit"),id:"post-type",label:(0,n.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Page type","gtm-kit"),id:"page-type",label:(0,n.__)('Include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. "campaign".',"gtm-kit"),optionName:"datalayer_page_type",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Categories","gtm-kit"),id:"categories",label:(0,n.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Tags","gtm-kit"),id:"tags",label:(0,n.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post title","gtm-kit"),id:"post-title",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post ID","gtm-kit"),id:"post-id",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post data","gtm-kit"),id:"post-date",label:(0,n.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,n.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,n.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id",useSettings:t,useUpdateStateSettings:e})]})]})]})},je=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("User Data","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,d.jsxs)(be.Content,{className:"gtmkit-space-y-2",children:[(0,d.jsx)("p",{children:(0,n.__)("Including user data is not compatible with full page caching.","gtm-kit")}),(0,d.jsx)("p",{children:(0,n.__)("Full page caching will cache user data making it the same for all users. There are ways around this, but it depends on the chosen cache solution and is only for advanced users.","gtm-kit")})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("User Data Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,n.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("User ID","gtm-kit"),id:"user-id",label:(0,n.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id",useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("User role","gtm-kit"),id:"user-role",label:(0,n.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role",useSettings:t,useUpdateStateSettings:e})]})]})]})},Ne=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g),i=!t.general.gcm_default_settings;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Google Consent Mode","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Consent Mode Activation","gtm-kit"),children:(0,d.jsx)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2",children:(0,n.__)("Warning!","gtm-kit")})}),(0,d.jsxs)(be.Content,{className:"gtmkit-space-y-2",children:[(0,d.jsx)("p",{children:(0,n.__)("Most Consent Management Platforms will handle the Google Consent Mode settings for you and applying the default settings in both GTM Kit and you CMP will lead to unexpected behaviour or errors.","gtm-kit")}),(0,d.jsx)("p",{children:(0,n.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")}),(0,d.jsx)("p",{className:"!gtmkit-mt-4",children:(0,n.__)("GTM Kit will only set the default Consent Mode settings and you must update the settings yourself when the user has given consent.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6",children:(0,d.jsx)("a",{href:"https://developers.google.com/tag-platform/security/guides/consent#implementation_example",target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline gtmkit-font-semibold",children:(0,n.__)("See an example of how consent is updated","gtm-kit")})}),(0,d.jsx)(fe,{title:(0,n.__)("Activate GCM settings","gtm-kit"),label:(0,n.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings",useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{disabled:i,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Ad Personalization","gtm-kit"),label:(0,n.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Ad Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Ad User Data","gtm-kit"),label:(0,n.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Analytics Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Functionality Storage","gtm-kit"),label:(0,n.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Personalization Storage","gtm-kit"),label:(0,n.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Security Storage","gtm-kit"),label:(0,n.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)("h4",{className:"gtmkit-font-bold gtmkit-pt-8",children:(0,n.__)("Advanced","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Redact Ads Data","gtm-kit"),label:(0,n.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Pass through URL parameters","gtm-kit"),label:(0,n.__)("Pass through ad click, client ID, and session ID information in URLs","gtm-kit"),optionName:"gcm_url_passthrough",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,n.__)("Enter time in milliseconds","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})]})]})},we=({label:t,value:e,tag:i})=>(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2",children:(0,d.jsx)("strong",{children:t})}),(0,d.jsx)("td",{className:"gtmkit-px-4 gtmkit-py-2",children:"code"===i?(0,d.jsx)("code",{className:"gtmkit-text-sm",children:e}):(0,d.jsx)("em",{children:e})})]}),Ee=()=>{const{useSiteData:t}=(0,a.useContext)(g),e=Object.values(t.shared_data);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey",children:(0,n.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey",children:(0,n.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")}),(0,d.jsx)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6",children:(0,d.jsx)("tbody",{className:"gtmkit-py-6",children:e.map((function(t,e){return(0,d.jsx)(we,{label:t.label,value:t.value,tag:t.tag},e)}))})})]})},Te={variant:{section:"gtmkit-feature-upsell--section",single:"gtmkit-feature-upsell--single"}},Ce=({children:t,shouldUpsell:e=!0,single:i=!1,className:a="",variant:o="section",cardLink:r="",cardText:l=(0,n.__)("Unlock with premium","gtm-kit"),...c})=>{if(!e)return t;const m=r||ue("upgrades","upgrades");return(0,d.jsxs)("div",{className:Mt()("gtmkit-feature-upsell gtmkit-relative gtmkit-max-w-screen-lg",Te.variant[o],a),children:[(0,d.jsx)("div",{className:Mt()("gtmkit-opacity-60",{"gtmkit-space-y-8":"section"===o},{"gtmkit-px-4":"single"===o}),children:t}),(0,d.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-ring-1 gtmkit-ring-black gtmkit-ring-opacity-5 gtmkit-shadow-lg gtmkit-rounded-md"}),(0,d.jsx)("div",{className:Mt()("gtmkit-absolute gtmkit-inset-0 gtmkit-flex gtmkit-items-center",{"gtmkit-justify-center":"section"===o},{"gtmkit-justify-end":"single"===o}),children:(0,d.jsx)(s.Button,{as:"a",className:Mt()("gtmkit-shadow-lg gtmkit-rounded is-primary",{"gtmkit-text-lg gtmkit-py-6 gtmkit-px-8":"section"===o},{"gtmkit-text-sm gtmkit-py-0.5 gtmkit-px-4 gtmkit-mr-8":"single"===o}),variant:"upsell",onClick:()=>{window.location.href=m},target:"_blank",rel:"noopener",...c,children:l})})]})},De=()=>{const{useSettings:t,useUpdateStateSettings:e,useSiteData:i,useSetNotificationStatus:s,isPremium:o}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Misc","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Automatic Updates","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-my-4 gtmkit-text-color-grey",children:(0,n.__)("New releases of GTM Kit may contain important updates to comply with changes in Google Tag Manager or analytics in general. We recommend enabling automatic plugin updates for GTM Kit to ensure it is always up to date.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-my-4 gtmkit-text-color-grey",children:(0,n.__)("You can, of course, manually update GTM Kit whenever it suits you, but we highly recommend that you regularly update your plugins and themes to the latest versions to keep your site secure.","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Enable Automatic Updates","gtm-kit"),label:(0,n.__)("Automatically update the GTM Kit plugin when new releases are available.","gtm-kit"),optionGroup:"misc",optionName:"auto_update",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-auto-update"})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Logging and debugging","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("div",{className:"gtmkit-py-2",children:(0,d.jsx)(Ce,{shouldUpsell:!o,variant:"single",children:(0,d.jsx)(fe,{title:(0,n.__)("Event Inspector","gtm-kit"),label:(0,n.__)("The event inspector is placed in the footer of the frontand and allows you to see all the fired GTM events.","gtm-kit"),optionName:"event_inspector",disabled:!o,useSettings:t,useUpdateStateSettings:e,premium:o,narrow:!0})})}),(0,d.jsx)(fe,{title:(0,n.__)("Console log","gtm-kit"),label:(0,n.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-log-active"}),(0,d.jsx)(fe,{title:(0,n.__)("Debug log","gtm-kit"),label:(0,n.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log",useSettings:t,useUpdateStateSettings:e,useSetNotificationStatus:s,notificationId:"gtmkit-log-active"})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ee,{}),(0,d.jsx)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey",children:(0,n.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")}),(0,d.jsx)(fe,{title:(0,n.__)("Share anonymous data","gtm-kit"),label:(0,n.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active",useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center",children:(0,d.jsxs)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2",children:["(",(0,n.__)("Version:","gtm-kit")," ",i.gtmkit_version,")"]})}),(0,d.jsx)(be.Content,{children:(0,d.jsxs)("p",{children:[(0,n.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,d.jsx)("br",{}),(0,d.jsx)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer",children:(0,n.__)("The changelog","gtm-kit")}),(0,d.jsx)("br",{}),(0,d.jsx)("a",{className:"gtmkit-text-color-primary  hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,n.__)("The GitHub repository","gtm-kit")})]})})]})]})},Ue=()=>(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ge,{title:(0,n.__)("Integrations","gtm-kit"),data:pe("integrations")})}),Ae=({pluginName:t})=>(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.sprintf)(
    22// translators: %s is the name of the plugin.
    33// translators: %s is the name of the plugin.
     
    1717// translators: %s is the name of the plugin.
    1818// translators: %s is the name of the plugin.
    19 (0,n.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:e,disabled:i,useSettings:s,useUpdateStateSettings:o})})]})},Le=[{label:(0,n.__)("Retail","gtm-kit"),value:"retail"},{label:(0,n.__)("Education","gtm-kit"),value:"education"},{label:(0,n.__)("Flights","gtm-kit"),value:"flights"},{label:(0,n.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,n.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,n.__)("Local deals","gtm-kit"),value:"local"},{label:(0,n.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,n.__)("Travel","gtm-kit"),value:"travel"},{label:(0,n.__)("Custom","gtm-kit"),value:"custom"}],Re=()=>{const{useSettings:t,useUpdateStateSettings:e,isPremium:i}=(0,a.useContext)(g),s="WooCommerce",o=!window.gtmkitSettings.plugins.woocommerce,r=o||!t.integrations.woocommerce_integration,l=r||!i||!t.general.sgtm_domain,c=l||!t.premium.woocommerce_webhooks;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("WooCommerce","gtm-kit")}),o?(0,d.jsx)(Ae,{pluginName:s}):null,(0,d.jsx)(Oe,{pluginName:s,optionName:"woocommerce_integration",pluginInactive:o}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ie,{title:(0,n.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,n.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:r}),(0,d.jsx)(fe,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_use_sku",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Exclude shipping from revenue","gtm-kit"),label:(0,n.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:r,useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("User Data","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsx)(be.Content,{children:(0,d.jsx)(fe,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_customer_data",disabled:r,useSettings:t,useUpdateStateSettings:e})}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("User-Provided Data","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'.","gtm-kit")," ",(0,d.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,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Webhooks for Server-side Tracking","gtm-kit"),children:i?(0,d.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,d.jsx)(Ce,{shouldUpsell:!i,children:(0,d.jsxs)(be.Content,{children:[l?(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,d.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:ue("general","container?focus=sgtm"),children:(0,n.__)("Go to sGTM settings","gtm-kit")})]}):(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,d.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:ue("templates","server-side-tagging"),children:(0,n.__)("Go to GTM Templates","gtm-kit")})]}),(0,d.jsx)(fe,{title:(0,n.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,n.__)("This option will allow you to send GTM events using webhooks to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:l,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)("h3",{className:"gtmkit-pt-3 gtmkit-mb-2 gtmkit-font-bold",children:(0,n.__)("GTM Events Send by Server-Side Webhooks:","gtm-kit")}),(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"purchase"}),label:(0,n.__)("Send an 'purchase' event from the server side when an order is created.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_purchase_webhook",disabled:c,useSettings:t,useUpdateStateSettings:e,narrow:!0}),t.premium.woocommerce_purchase_webhook||!i?(0,d.jsx)("div",{className:"gtmkit-px-8",children:(0,d.jsx)(_e,{options:[{label:(0,n.__)("Send 'purchase' event when an order is created.'","gtm-kit"),value:0},{label:(0,n.__)("Send 'purchase' event when the order has been paid and order status is 'Processing'.","gtm-kit"),value:1}],optionGroup:"premium",optionName:"woocommerce_purchase_webhook_trigger",disabled:c,useSettings:t,useUpdateStateSettings:e,className:"gtmkit-settings-field-wrap gtmkit-pb-6"})}):null,(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"order_paid"}),label:(0,n.__)("Send an 'order_paid' event from the server side when an order has 'Processing' status.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_order_paid_webhook",disabled:c,useSettings:t,useUpdateStateSettings:e,narrow:!0}),(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"refund"}),label:(0,n.__)("Send an 'refund' event from the server side when an order has been refunded or cancelled.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_refund_webhook",disabled:c,useSettings:t,useUpdateStateSettings:e,narrow:!0})]})})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Event Customization","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(_e,{title:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("code",{children:"view_item_list"})," (with product filter)"]}),options:[{label:(0,n.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,n.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,n.__)("Do you what to push the view_item_list event if the list is updated using a filter or just once per page view?","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_view_item_list_limit",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("code",{children:"view_item"})," '(variable product)'"]}),options:[{label:(0,n.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,n.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,n.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,n.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,d.jsx)("code",{children:"add_shipping_info"}),options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,d.jsx)("code",{children:"add_payment_info"}),options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(Ce,{shouldUpsell:!i,variant:"single",children:(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"purchase"}),label:(0,n.__)("Disable the 'purchase' event in frontend an rely on server-side webhook.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_disable_frontend_purchase_event",disabled:c,useSettings:t,useUpdateStateSettings:e,premium:i})})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ie,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Le,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:r}),(0,d.jsx)(ke,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,n.__)("Enter prefix","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:r,useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Custom CSS Selectors","gtm-kit"),children:i?(0,d.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,d.jsx)(Ce,{shouldUpsell:!i,children:(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")}),(0,d.jsx)(ke,{title:(0,n.__)("Single Product (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_single_product_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("Product List (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Advanced Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_dequeue_script",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Include permalink structure","gtm-kit"),label:(0,n.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_permalink_structure",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Include path of pages","gtm-kit"),label:(0,n.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_pages",disabled:r,useSettings:t,useUpdateStateSettings:e})]})]})]})},Me=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g),i="Contact Form 7",s=!window.gtmkitSettings.plugins.cf7,o=s||!t.integrations.cf7_integration;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Contact Form 7","gtm-kit")}),s?(0,d.jsx)(Ae,{pluginName:i}):null,(0,d.jsx)(Oe,{pluginName:i,optionName:"cf7_integration",pluginInactive:s}),(0,d.jsxs)(be,{disabled:o,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsx)(_e,{title:(0,n.__)("Load JavaScript","gtm-kit"),options:[{label:(0,n.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,n.__)("On all pages","gtm-kit"),value:2}],help:(0,n.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:o,useSettings:t,useUpdateStateSettings:e})})]})]})},Pe=()=>{const t="Easy Digital Downloads",e=!window.gtmkitSettings.plugins.edd,{useSettings:i,useUpdateStateSettings:s}=(0,a.useContext)(g),o=e||!i.integrations.edd_integration;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Easy Digital Downloads","gtm-kit")}),e?(0,d.jsx)(Ae,{pluginName:t}):null,(0,d.jsx)(Oe,{pluginName:t,optionName:"edd_integration",pluginInactive:e}),(0,d.jsxs)(be,{disabled:o,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"edd_use_sku",disabled:o,useSettings:i,useUpdateStateSettings:s}),(0,d.jsx)(fe,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:o,useSettings:i,useUpdateStateSettings:s}),(0,d.jsx)(fe,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"edd_include_customer_data",disabled:o,useSettings:i,useUpdateStateSettings:s})]})]}),(0,d.jsxs)(be,{disabled:o,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ie,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Le,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,d.jsx)(ke,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,n.__)("Enter prefix","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:o,useSettings:i,useUpdateStateSettings:s})]})]}),(0,d.jsxs)(be,{disabled:e,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsx)(fe,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"edd_dequeue_script",disabled:o,useSettings:i,useUpdateStateSettings:s})})]})]})},Ge=()=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Getting Started","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("GTM Kit is sending data to your Google Tag Manger container but you still need to configure Tags, Triggers and Variables in GTM to use the data.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")}),(0,d.jsxs)("p",{children:[(0,n.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,d.jsx)("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",children:(0,n.__)("Read the guide","gtm-kit")})]})]})]}),(0,d.jsx)(ge,{title:(0,n.__)("Templates","gtm-kit"),data:pe("templates")})]}),Fe=({title:t,description:e,link:i,templates:a,upsell:s})=>{const o=s?"components-button gtmkit-gap-2 gtmkit-shadow-lg gtmkit-rounded !gtmkit-text-base gtmkit-py-4 gtmkit-px-6 is-primary":"gtmkit-text-color-primary gtmkit-text-base gtmkit-font-semibold hover:gtmkit-underline";return s&&(i.url=ue("upgrades")),(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:t}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:e}),i&&i.url&&i.link_text?(0,d.jsx)("div",{children:(0,d.jsx)("a",{href:i.url,target:"_blank",className:o,rel:"noreferrer",children:i.link_text})}):null,a&&a.length>0?(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h4",{className:"gtmkit-font-bold",children:(0,n.__)("GTM container import files:","gtm-kit")}),(0,d.jsx)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary",children:a.map((function(t){return(0,d.jsx)("li",{children:(0,d.jsx)("a",{className:"hover:gtmkit-underline",href:t.link,target:"_blank",rel:"noreferrer",children:t.title})})}))})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h4",{className:"gtmkit-font-bold",children:(0,n.__)("Necessary modifications:","gtm-kit")}),(0,d.jsx)("ul",{className:"gtmkit-text-sm",children:a.map((function(t){return(0,d.jsx)("li",{children:t.help_text})}))})]})]}):null]})]})})},He=({sectionData:t})=>{const e=t.collections,{isPremium:i}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:t.title}),Object.keys(e).map((function(t){return(0,d.jsx)(Fe,{title:e[t].title,description:e[t].description,link:e[t].link,templates:e[t].templates,upsell:!i})}))]})},Ke=()=>{const t=ot(),e=window.gtmkitSettings.tutorials;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Help","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Need help?","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("We are here to help if you have any questions.","gtm-kit"),(0,d.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{t("/support",{replace:!0})},children:(0,n.__)("See support options","gtm-kit")})]})})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Tutorials","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsx)("ul",{children:e.map(((t,e)=>(0,d.jsxs)("li",{className:"gtmkit-mb-4",children:[(0,d.jsx)("a",{href:t.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline",children:t.title}),t.text.map(((t,e)=>(0,d.jsx)("div",{className:"gtmkit-text-sm",children:t},e)))]},e)))})})]})]})},ze=()=>{const{useIsSending:t,useUpdateSupportTicket:e,useSupportTicket:i,useSendSystemData:o,useIsSystemDataSent:r,useSystemDataMessage:l,isPremium:c}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Get support","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Support options","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsxs)("ul",{className:"gtmkit-text-color-primary",children:[c&&(0,d.jsx)("li",{children:(0,d.jsx)("a",{href:"https://jump.gtmkit.com/link/4-E35E4",target:"_blank",rel:"noreferrer",children:(0,n.__)("WooCommerce Premium Support","gtm-kit")})}),(0,d.jsx)("li",{children:(0,d.jsx)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer",children:(0,n.__)("WordPress.org Support Forum","gtm-kit")})}),(0,d.jsx)("li",{children:(0,d.jsx)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,n.__)("GITHub repository","gtm-kit")})}),(0,d.jsxs)("li",{children:[(0,d.jsx)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer",children:(0,n.__)("Plugin Homepage","gtm-kit")})," ","(gtmkit.com)"]})]})})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,d.jsx)(be.Content,{children:r?(0,d.jsx)("p",{className:"gtmkit-mb-2",children:l}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-2",children:(0,n.__)("If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:","gtm-kit")}),(0,d.jsx)(s.TextControl,{label:(0,d.jsxs)("span",{className:"gtmkit-text-red-600",children:[l," "]}),placeholder:(0,n.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:i,onChange:t=>e(t)}),(0,d.jsxs)(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:()=>{o()},disabled:!i.toUpperCase().startsWith("FS"),children:[(0,d.jsx)("span",{children:(0,n.__)("Send system data","gtm-kit")}),t?(0,d.jsx)(s.Spinner,{}):""]})]})})]})]})},Be=t=>{const{Fill:e,Slot:i}=(0,s.createSlotFill)(t),n=({children:t})=>(0,d.jsx)(e,{children:t});return n.Slot=({fillProps:t})=>(0,d.jsx)(i,{fillProps:t,children:t=>t.length?t:null}),n},We=Be("GravityForms"),$e=Be("LicenseActivation"),Ye=({integrationID:t,pluginName:e})=>{const{useSettings:i,useUpdateStateSettings:n}=(0,a.useContext)(g),s=!window.gtmkitSettings.plugins[t],o=s||!i.integrations[t+"_integration"];return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:e}),s?(0,d.jsx)(Ae,{pluginName:e}):null,(0,d.jsx)(Oe,{pluginName:e,optionName:t+"_integration",pluginInactive:s}),"gf"===t?(0,d.jsx)(We.Slot,{fillProps:{settingsInactive:o,useSettings:i,useUpdateStateSettings:n}}):null]})},Je=window.wp.plugins,qe=(0,a.forwardRef)((({icon:t,size:e=24,...i},n)=>(0,a.cloneElement)(t,{width:e,height:e,...i,ref:n}))),Ve=window.wp.primitives,Xe=(0,d.jsx)(Ve.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(Ve.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Ze=(0,d.jsx)(Ve.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(Ve.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),{entries:Qe,setPrototypeOf:ti,isFrozen:ei,getPrototypeOf:ii,getOwnPropertyDescriptor:ni}=Object;let{freeze:ai,seal:si,create:oi}=Object,{apply:ri,construct:li}="undefined"!=typeof Reflect&&Reflect;ai||(ai=function(t){return t}),si||(si=function(t){return t}),ri||(ri=function(t,e,i){return t.apply(e,i)}),li||(li=function(t,e){return new t(...e)});const ci=ji(Array.prototype.forEach),mi=ji(Array.prototype.lastIndexOf),di=ji(Array.prototype.pop),gi=ji(Array.prototype.push),ui=ji(Array.prototype.splice),pi=ji(String.prototype.toLowerCase),hi=ji(String.prototype.toString),ki=ji(String.prototype.match),fi=ji(String.prototype.replace),_i=ji(String.prototype.indexOf),xi=ji(String.prototype.trim),Si=ji(Object.prototype.hasOwnProperty),bi=ji(RegExp.prototype.test),yi=(vi=TypeError,function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return li(vi,e)});var vi;function ji(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return ri(t,e,n)}}function Ni(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:pi;ti&&ti(t,null);let n=e.length;for(;n--;){let a=e[n];if("string"==typeof a){const t=i(a);t!==a&&(ei(e)||(e[n]=t),a=t)}t[a]=!0}return t}function wi(t){for(let e=0;e<t.length;e++)Si(t,e)||(t[e]=null);return t}function Ei(t){const e=oi(null);for(const[i,n]of Qe(t))Si(t,i)&&(Array.isArray(n)?e[i]=wi(n):n&&"object"==typeof n&&n.constructor===Object?e[i]=Ei(n):e[i]=n);return e}function Ti(t,e){for(;null!==t;){const i=ni(t,e);if(i){if(i.get)return ji(i.get);if("function"==typeof i.value)return ji(i.value)}t=ii(t)}return function(){return null}}const Ci=ai(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Di=ai(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ui=ai(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ai=ai(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ii=ai(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Oi=ai(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Li=ai(["#text"]),Ri=ai(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Mi=ai(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Pi=ai(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Gi=ai(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Fi=si(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Hi=si(/<%[\w\W]*|[\w\W]*%>/gm),Ki=si(/\$\{[\w\W]*/gm),zi=si(/^data-[\-\w.\u00B7-\uFFFF]+$/),Bi=si(/^aria-[\-\w]+$/),Wi=si(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$i=si(/^(?:\w+script|data):/i),Yi=si(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ji=si(/^html$/i),qi=si(/^[a-z][.\w]*(-[.\w]+)+$/i);var Vi=Object.freeze({__proto__:null,ARIA_ATTR:Bi,ATTR_WHITESPACE:Yi,CUSTOM_ELEMENT:qi,DATA_ATTR:zi,DOCTYPE_NAME:Ji,ERB_EXPR:Hi,IS_ALLOWED_URI:Wi,IS_SCRIPT_OR_DATA:$i,MUSTACHE_EXPR:Fi,TMPLIT_EXPR:Ki});const Xi=function(){return"undefined"==typeof window?null:window};var Zi=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xi();const i=e=>t(e);if(i.version="3.2.5",i.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return i.isSupported=!1,i;let{document:n}=e;const a=n,s=a.currentScript,{DocumentFragment:o,HTMLTemplateElement:r,Node:l,Element:c,NodeFilter:m,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:u,trustedTypes:p}=e,h=c.prototype,k=Ti(h,"cloneNode"),f=Ti(h,"remove"),_=Ti(h,"nextSibling"),x=Ti(h,"childNodes"),S=Ti(h,"parentNode");if("function"==typeof r){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let b,y="";const{implementation:v,createNodeIterator:j,createDocumentFragment:N,getElementsByTagName:w}=n,{importNode:E}=a;let T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported="function"==typeof Qe&&"function"==typeof S&&v&&void 0!==v.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:D,TMPLIT_EXPR:U,DATA_ATTR:A,ARIA_ATTR:I,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:R}=Vi;let{IS_ALLOWED_URI:M}=Vi,P=null;const G=Ni({},[...Ci,...Di,...Ui,...Ii,...Li]);let F=null;const H=Ni({},[...Ri,...Mi,...Pi,...Gi]);let K=Object.seal(oi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),z=null,B=null,W=!0,$=!0,Y=!1,J=!0,q=!1,V=!0,X=!1,Z=!1,Q=!1,tt=!1,et=!1,it=!1,nt=!0,at=!1,st=!0,ot=!1,rt={},lt=null;const ct=Ni({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let mt=null;const dt=Ni({},["audio","video","img","source","image","track"]);let gt=null;const ut=Ni({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pt="http://www.w3.org/1998/Math/MathML",ht="http://www.w3.org/2000/svg",kt="http://www.w3.org/1999/xhtml";let ft=kt,_t=!1,xt=null;const St=Ni({},[pt,ht,kt],hi);let bt=Ni({},["mi","mo","mn","ms","mtext"]),yt=Ni({},["annotation-xml"]);const vt=Ni({},["title","style","font","a","script"]);let jt=null;const Nt=["application/xhtml+xml","text/html"];let wt=null,Et=null;const Tt=n.createElement("form"),Ct=function(t){return t instanceof RegExp||t instanceof Function},Dt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Et||Et!==t){if(t&&"object"==typeof t||(t={}),t=Ei(t),jt=-1===Nt.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,wt="application/xhtml+xml"===jt?hi:pi,P=Si(t,"ALLOWED_TAGS")?Ni({},t.ALLOWED_TAGS,wt):G,F=Si(t,"ALLOWED_ATTR")?Ni({},t.ALLOWED_ATTR,wt):H,xt=Si(t,"ALLOWED_NAMESPACES")?Ni({},t.ALLOWED_NAMESPACES,hi):St,gt=Si(t,"ADD_URI_SAFE_ATTR")?Ni(Ei(ut),t.ADD_URI_SAFE_ATTR,wt):ut,mt=Si(t,"ADD_DATA_URI_TAGS")?Ni(Ei(dt),t.ADD_DATA_URI_TAGS,wt):dt,lt=Si(t,"FORBID_CONTENTS")?Ni({},t.FORBID_CONTENTS,wt):ct,z=Si(t,"FORBID_TAGS")?Ni({},t.FORBID_TAGS,wt):{},B=Si(t,"FORBID_ATTR")?Ni({},t.FORBID_ATTR,wt):{},rt=!!Si(t,"USE_PROFILES")&&t.USE_PROFILES,W=!1!==t.ALLOW_ARIA_ATTR,$=!1!==t.ALLOW_DATA_ATTR,Y=t.ALLOW_UNKNOWN_PROTOCOLS||!1,J=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,q=t.SAFE_FOR_TEMPLATES||!1,V=!1!==t.SAFE_FOR_XML,X=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,it=t.RETURN_TRUSTED_TYPE||!1,Q=t.FORCE_BODY||!1,nt=!1!==t.SANITIZE_DOM,at=t.SANITIZE_NAMED_PROPS||!1,st=!1!==t.KEEP_CONTENT,ot=t.IN_PLACE||!1,M=t.ALLOWED_URI_REGEXP||Wi,ft=t.NAMESPACE||kt,bt=t.MATHML_TEXT_INTEGRATION_POINTS||bt,yt=t.HTML_INTEGRATION_POINTS||yt,K=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Ct(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Ct(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(K.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&($=!1),et&&(tt=!0),rt&&(P=Ni({},Li),F=[],!0===rt.html&&(Ni(P,Ci),Ni(F,Ri)),!0===rt.svg&&(Ni(P,Di),Ni(F,Mi),Ni(F,Gi)),!0===rt.svgFilters&&(Ni(P,Ui),Ni(F,Mi),Ni(F,Gi)),!0===rt.mathMl&&(Ni(P,Ii),Ni(F,Pi),Ni(F,Gi))),t.ADD_TAGS&&(P===G&&(P=Ei(P)),Ni(P,t.ADD_TAGS,wt)),t.ADD_ATTR&&(F===H&&(F=Ei(F)),Ni(F,t.ADD_ATTR,wt)),t.ADD_URI_SAFE_ATTR&&Ni(gt,t.ADD_URI_SAFE_ATTR,wt),t.FORBID_CONTENTS&&(lt===ct&&(lt=Ei(lt)),Ni(lt,t.FORBID_CONTENTS,wt)),st&&(P["#text"]=!0),X&&Ni(P,["html","head","body"]),P.table&&(Ni(P,["tbody"]),delete z.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw yi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw yi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');b=t.TRUSTED_TYPES_POLICY,y=b.createHTML("")}else void 0===b&&(b=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(i=e.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(p,s)),null!==b&&"string"==typeof y&&(y=b.createHTML(""));ai&&ai(t),Et=t}},Ut=Ni({},[...Di,...Ui,...Ai]),At=Ni({},[...Ii,...Oi]),It=function(t){gi(i.removed,{element:t});try{S(t).removeChild(t)}catch(e){f(t)}},Ot=function(t,e){try{gi(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){gi(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(tt||et)try{It(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},Lt=function(t){let e=null,i=null;if(Q)t="<remove></remove>"+t;else{const e=ki(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===jt&&ft===kt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const a=b?b.createHTML(t):t;if(ft===kt)try{e=(new u).parseFromString(a,jt)}catch(t){}if(!e||!e.documentElement){e=v.createDocument(ft,"template",null);try{e.documentElement.innerHTML=_t?y:a}catch(t){}}const s=e.body||e.documentElement;return t&&i&&s.insertBefore(n.createTextNode(i),s.childNodes[0]||null),ft===kt?w.call(e,X?"html":"body")[0]:X?e.documentElement:s},Rt=function(t){return j.call(t.ownerDocument||t,t,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},Mt=function(t){return t instanceof g&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof d)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Pt=function(t){return"function"==typeof l&&t instanceof l};function Gt(t,e,n){ci(t,(t=>{t.call(i,e,n,Et)}))}const Ft=function(t){let e=null;if(Gt(T.beforeSanitizeElements,t,null),Mt(t))return It(t),!0;const n=wt(t.nodeName);if(Gt(T.uponSanitizeElement,t,{tagName:n,allowedTags:P}),t.hasChildNodes()&&!Pt(t.firstElementChild)&&bi(/<[/\w!]/g,t.innerHTML)&&bi(/<[/\w!]/g,t.textContent))return It(t),!0;if(7===t.nodeType)return It(t),!0;if(V&&8===t.nodeType&&bi(/<[/\w]/g,t.data))return It(t),!0;if(!P[n]||z[n]){if(!z[n]&&Kt(n)){if(K.tagNameCheck instanceof RegExp&&bi(K.tagNameCheck,n))return!1;if(K.tagNameCheck instanceof Function&&K.tagNameCheck(n))return!1}if(st&&!lt[n]){const e=S(t)||t.parentNode,i=x(t)||t.childNodes;if(i&&e)for(let n=i.length-1;n>=0;--n){const a=k(i[n],!0);a.__removalCount=(t.__removalCount||0)+1,e.insertBefore(a,_(t))}}return It(t),!0}return t instanceof c&&!function(t){let e=S(t);e&&e.tagName||(e={namespaceURI:ft,tagName:"template"});const i=pi(t.tagName),n=pi(e.tagName);return!!xt[t.namespaceURI]&&(t.namespaceURI===ht?e.namespaceURI===kt?"svg"===i:e.namespaceURI===pt?"svg"===i&&("annotation-xml"===n||bt[n]):Boolean(Ut[i]):t.namespaceURI===pt?e.namespaceURI===kt?"math"===i:e.namespaceURI===ht?"math"===i&&yt[n]:Boolean(At[i]):t.namespaceURI===kt?!(e.namespaceURI===ht&&!yt[n])&&!(e.namespaceURI===pt&&!bt[n])&&!At[i]&&(vt[i]||!Ut[i]):!("application/xhtml+xml"!==jt||!xt[t.namespaceURI]))}(t)?(It(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!bi(/<\/no(script|embed|frames)/i,t.innerHTML)?(q&&3===t.nodeType&&(e=t.textContent,ci([C,D,U],(t=>{e=fi(e,t," ")})),t.textContent!==e&&(gi(i.removed,{element:t.cloneNode()}),t.textContent=e)),Gt(T.afterSanitizeElements,t,null),!1):(It(t),!0)},Ht=function(t,e,i){if(nt&&("id"===e||"name"===e)&&(i in n||i in Tt))return!1;if($&&!B[e]&&bi(A,e));else if(W&&bi(I,e));else if(!F[e]||B[e]){if(!(Kt(t)&&(K.tagNameCheck instanceof RegExp&&bi(K.tagNameCheck,t)||K.tagNameCheck instanceof Function&&K.tagNameCheck(t))&&(K.attributeNameCheck instanceof RegExp&&bi(K.attributeNameCheck,e)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(e))||"is"===e&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&bi(K.tagNameCheck,i)||K.tagNameCheck instanceof Function&&K.tagNameCheck(i))))return!1}else if(gt[e]);else if(bi(M,fi(i,L,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==_i(i,"data:")||!mt[t])if(Y&&!bi(O,fi(i,L,"")));else if(i)return!1;return!0},Kt=function(t){return"annotation-xml"!==t&&ki(t,R)},zt=function(t){Gt(T.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Mt(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let a=e.length;for(;a--;){const s=e[a],{name:o,namespaceURI:r,value:l}=s,c=wt(o);let m="value"===o?l:xi(l);if(n.attrName=c,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Gt(T.uponSanitizeAttribute,t,n),m=n.attrValue,!at||"id"!==c&&"name"!==c||(Ot(o,t),m="user-content-"+m),V&&bi(/((--!?|])>)|<\/(style|title)/i,m)){Ot(o,t);continue}if(n.forceKeepAttr)continue;if(Ot(o,t),!n.keepAttr)continue;if(!J&&bi(/\/>/i,m)){Ot(o,t);continue}q&&ci([C,D,U],(t=>{m=fi(m,t," ")}));const d=wt(t.nodeName);if(Ht(d,c,m)){if(b&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(r);else switch(p.getAttributeType(d,c)){case"TrustedHTML":m=b.createHTML(m);break;case"TrustedScriptURL":m=b.createScriptURL(m)}try{r?t.setAttributeNS(r,o,m):t.setAttribute(o,m),Mt(t)?It(t):di(i.removed)}catch(t){}}}Gt(T.afterSanitizeAttributes,t,null)},Bt=function t(e){let i=null;const n=Rt(e);for(Gt(T.beforeSanitizeShadowDOM,e,null);i=n.nextNode();)Gt(T.uponSanitizeShadowNode,i,null),Ft(i),zt(i),i.content instanceof o&&t(i.content);Gt(T.afterSanitizeShadowDOM,e,null)};return i.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,s=null,r=null,c=null;if(_t=!t,_t&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Pt(t)){if("function"!=typeof t.toString)throw yi("toString is not a function");if("string"!=typeof(t=t.toString()))throw yi("dirty is not a string, aborting")}if(!i.isSupported)return t;if(Z||Dt(e),i.removed=[],"string"==typeof t&&(ot=!1),ot){if(t.nodeName){const e=wt(t.nodeName);if(!P[e]||z[e])throw yi("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)n=Lt("\x3c!----\x3e"),s=n.ownerDocument.importNode(t,!0),1===s.nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?n=s:n.appendChild(s);else{if(!tt&&!q&&!X&&-1===t.indexOf("<"))return b&&it?b.createHTML(t):t;if(n=Lt(t),!n)return tt?null:it?y:""}n&&Q&&It(n.firstChild);const m=Rt(ot?t:n);for(;r=m.nextNode();)Ft(r),zt(r),r.content instanceof o&&Bt(r.content);if(ot)return t;if(tt){if(et)for(c=N.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return(F.shadowroot||F.shadowrootmode)&&(c=E.call(a,c,!0)),c}let d=X?n.outerHTML:n.innerHTML;return X&&P["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&bi(Ji,n.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+d),q&&ci([C,D,U],(t=>{d=fi(d,t," ")})),b&&it?b.createHTML(d):d},i.setConfig=function(){Dt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},i.clearConfig=function(){Et=null,Z=!1},i.isValidAttribute=function(t,e,i){Et||Dt({});const n=wt(t),a=wt(e);return Ht(n,a,i)},i.addHook=function(t,e){"function"==typeof e&&gi(T[t],e)},i.removeHook=function(t,e){if(void 0!==e){const i=mi(T[t],e);return-1===i?void 0:ui(T[t],i,1)[0]}return di(T[t])},i.removeHooks=function(t){T[t]=[]},i.removeAllHooks=function(){T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();const Qi=({title:t,type:e,hideEmpty:i=!0})=>{const{useNotifications:o,useSetNotificationStatus:r,useIsUpdatingNotifications:l}=(0,a.useContext)(g),c=o[e],m=Object.entries(c.active),u=Object.entries(c.dismissed);if(0===c.total&&i)return null;const[p,h]=(0,a.useState)(!1),k=(t,e,i)=>(0,d.jsxs)("div",{className:Mt()("gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-border gtmkit-px-4 gtmkit-py-3 gtmkit-gap-x-16",{"gtmkit-border gtmkit-border-t-0":i},{"gtmkit-border-2":!i}),children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"gtmkit-font-bold gtmkit-mr-2",children:e.header}),(0,d.jsx)("span",{className:"gtmkit-text-sm",dangerouslySetInnerHTML:{__html:Zi.sanitize(e.message)}})]}),(0,d.jsxs)(s.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-1 !gtmkit-px-3 gtmkit-h-min",onClick:()=>r(e.id,i?"restore":"dismiss"),children:[(0,d.jsx)("span",{className:"gtmkit-text-sm",children:i?(0,n.__)("Restore","gtm-kit"):(0,n.__)("Dismiss","gtm-kit")}),l?(0,d.jsx)(s.Spinner,{}):null]})]},t);return(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:t,children:(0,d.jsx)(Ft,{count:c.active.length,important:"problem"===e})}),(0,d.jsxs)(be.Content,{className:"gtmkit-space-y-4",children:[m.map((([t,e])=>k(t,e,!1))),u.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-py gtmkit-font-bold gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-cursor-pointer",onClick:()=>h((t=>!t)),children:[(0,d.jsx)("span",{children:(0,n.sprintf)(
     19(0,n.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:e,disabled:i,useSettings:s,useUpdateStateSettings:o})})]})},Le=[{label:(0,n.__)("Retail","gtm-kit"),value:"retail"},{label:(0,n.__)("Education","gtm-kit"),value:"education"},{label:(0,n.__)("Flights","gtm-kit"),value:"flights"},{label:(0,n.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,n.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,n.__)("Local deals","gtm-kit"),value:"local"},{label:(0,n.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,n.__)("Travel","gtm-kit"),value:"travel"},{label:(0,n.__)("Custom","gtm-kit"),value:"custom"}],Re=()=>{const{useSettings:t,useUpdateStateSettings:e,isPremium:i}=(0,a.useContext)(g),s="WooCommerce",o=!window.gtmkitSettings.plugins.woocommerce,r=o||!t.integrations.woocommerce_integration,l=r||!i||!t.general.sgtm_domain,c=l||!t.premium.woocommerce_webhooks;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("WooCommerce","gtm-kit")}),o?(0,d.jsx)(Ae,{pluginName:s}):null,(0,d.jsx)(Oe,{pluginName:s,optionName:"woocommerce_integration",pluginInactive:o}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ie,{title:(0,n.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,n.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:r}),(0,d.jsx)(fe,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_use_sku",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Exclude shipping from revenue","gtm-kit"),label:(0,n.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:r,useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("User Data","gtm-kit")}),(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,d.jsx)(be.Content,{children:(0,d.jsx)(fe,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_customer_data",disabled:r,useSettings:t,useUpdateStateSettings:e})}),(0,d.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,d.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("User-Provided Data","gtm-kit")}),(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'.","gtm-kit")," ",(0,d.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,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Webhooks for Server-side Tracking","gtm-kit"),children:i?(0,d.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,d.jsx)(Ce,{shouldUpsell:!i,children:(0,d.jsxs)(be.Content,{children:[l?(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,d.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:ue("general","container?focus=sgtm"),children:(0,n.__)("Go to sGTM settings","gtm-kit")})]}):(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,d.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:ue("templates","server-side-tagging"),children:(0,n.__)("Go to GTM Templates","gtm-kit")})]}),(0,d.jsx)(fe,{title:(0,n.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,n.__)("This option will allow you to send GTM events using webhooks to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:l,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)("h3",{className:"gtmkit-pt-3 gtmkit-mb-2 gtmkit-font-bold",children:(0,n.__)("GTM Events Send by Server-Side Webhooks:","gtm-kit")}),(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"purchase"}),label:(0,n.__)("Send an 'purchase' event from the server side when an order is created.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_purchase_webhook",disabled:c,useSettings:t,useUpdateStateSettings:e,narrow:!0}),t.premium.woocommerce_purchase_webhook||!i?(0,d.jsx)("div",{className:"gtmkit-px-8",children:(0,d.jsx)(_e,{options:[{label:(0,n.__)("Send 'purchase' event when an order is created.'","gtm-kit"),value:0},{label:(0,n.__)("Send 'purchase' event when the order has been paid and order status is 'Processing'.","gtm-kit"),value:1}],optionGroup:"premium",optionName:"woocommerce_purchase_webhook_trigger",disabled:c,useSettings:t,useUpdateStateSettings:e,className:"gtmkit-settings-field-wrap gtmkit-pb-6"})}):null,(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"order_paid"}),label:(0,n.__)("Send an 'order_paid' event from the server side when an order has 'Processing' status.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_order_paid_webhook",disabled:c,useSettings:t,useUpdateStateSettings:e,narrow:!0}),(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"refund"}),label:(0,n.__)("Send an 'refund' event from the server side when an order has been refunded or cancelled.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_refund_webhook",disabled:c,useSettings:t,useUpdateStateSettings:e,narrow:!0})]})})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Event Customization","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(_e,{title:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("code",{children:"view_item_list"})," (with product filter)"]}),options:[{label:(0,n.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,n.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,n.__)("Do you what to push the view_item_list event if the list is updated using a filter or just once per page view?","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_view_item_list_limit",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("code",{children:"view_item"})," '(variable product)'"]}),options:[{label:(0,n.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,n.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,n.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,n.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,d.jsx)("code",{children:"add_shipping_info"}),options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(_e,{title:(0,d.jsx)("code",{children:"add_payment_info"}),options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(Ce,{shouldUpsell:!i,variant:"single",children:(0,d.jsx)(fe,{title:(0,d.jsx)("code",{children:"purchase"}),label:(0,n.__)("Disable the 'purchase' event in frontend an rely on server-side webhook.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_disable_frontend_purchase_event",disabled:c,useSettings:t,useUpdateStateSettings:e,premium:i})})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ie,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Le,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:r}),(0,d.jsx)(ke,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,n.__)("Enter prefix","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:r,useSettings:t,useUpdateStateSettings:e})]})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Custom CSS Selectors","gtm-kit"),children:i?(0,d.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,d.jsx)(Ce,{shouldUpsell:!i,children:(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")}),(0,d.jsx)(ke,{title:(0,n.__)("Single Product (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_single_product_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(ke,{title:(0,n.__)("Product List (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:t,useUpdateStateSettings:e})]})})]}),(0,d.jsxs)(be,{disabled:r,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Advanced Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_dequeue_script",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Include permalink structure","gtm-kit"),label:(0,n.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_permalink_structure",disabled:r,useSettings:t,useUpdateStateSettings:e}),(0,d.jsx)(fe,{title:(0,n.__)("Include path of pages","gtm-kit"),label:(0,n.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_pages",disabled:r,useSettings:t,useUpdateStateSettings:e})]})]})]})},Me=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(g),i="Contact Form 7",s=!window.gtmkitSettings.plugins.cf7,o=s||!t.integrations.cf7_integration;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Contact Form 7","gtm-kit")}),s?(0,d.jsx)(Ae,{pluginName:i}):null,(0,d.jsx)(Oe,{pluginName:i,optionName:"cf7_integration",pluginInactive:s}),(0,d.jsxs)(be,{disabled:o,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsx)(_e,{title:(0,n.__)("Load JavaScript","gtm-kit"),options:[{label:(0,n.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,n.__)("On all pages","gtm-kit"),value:2}],help:(0,n.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:o,useSettings:t,useUpdateStateSettings:e})})]})]})},Pe=()=>{const t="Easy Digital Downloads",e=!window.gtmkitSettings.plugins.edd,{useSettings:i,useUpdateStateSettings:s}=(0,a.useContext)(g),o=e||!i.integrations.edd_integration;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Easy Digital Downloads","gtm-kit")}),e?(0,d.jsx)(Ae,{pluginName:t}):null,(0,d.jsx)(Oe,{pluginName:t,optionName:"edd_integration",pluginInactive:e}),(0,d.jsxs)(be,{disabled:o,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(fe,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"edd_use_sku",disabled:o,useSettings:i,useUpdateStateSettings:s}),(0,d.jsx)(fe,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:o,useSettings:i,useUpdateStateSettings:s}),(0,d.jsx)(fe,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"edd_include_customer_data",disabled:o,useSettings:i,useUpdateStateSettings:s})]})]}),(0,d.jsxs)(be,{disabled:o,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)(Ie,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Le,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,d.jsx)(ke,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,n.__)("Enter prefix","gtm-kit"),help:(0,n.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:o,useSettings:i,useUpdateStateSettings:s})]})]}),(0,d.jsxs)(be,{disabled:e,children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsx)(fe,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"edd_dequeue_script",disabled:o,useSettings:i,useUpdateStateSettings:s})})]})]})},Ge=()=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Getting Started","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("GTM Kit is sending data to your Google Tag Manger container but you still need to configure Tags, Triggers and Variables in GTM to use the data.","gtm-kit")}),(0,d.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")}),(0,d.jsxs)("p",{children:[(0,n.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,d.jsx)("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",children:(0,n.__)("Read the guide","gtm-kit")})]})]})]}),(0,d.jsx)(ge,{title:(0,n.__)("Templates","gtm-kit"),data:pe("templates")})]}),Fe=({title:t,description:e,link:i,templates:a,upsell:s})=>{const o=s?"components-button gtmkit-gap-2 gtmkit-shadow-lg gtmkit-rounded !gtmkit-text-base gtmkit-py-4 gtmkit-px-6 is-primary":"gtmkit-text-color-primary gtmkit-text-base gtmkit-font-semibold hover:gtmkit-underline";return s&&(i.url=ue("upgrades")),(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:t}),(0,d.jsxs)(be.Content,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-4",children:e}),i&&i.url&&i.link_text?(0,d.jsx)("div",{children:(0,d.jsx)("a",{href:i.url,target:"_blank",className:o,rel:"noreferrer",children:i.link_text})}):null,a&&a.length>0?(0,d.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h4",{className:"gtmkit-font-bold",children:(0,n.__)("GTM container import files:","gtm-kit")}),(0,d.jsx)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary",children:a.map((function(t){return(0,d.jsx)("li",{children:(0,d.jsx)("a",{className:"hover:gtmkit-underline",href:t.link,target:"_blank",rel:"noreferrer",children:t.title})})}))})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h4",{className:"gtmkit-font-bold",children:(0,n.__)("Necessary modifications:","gtm-kit")}),(0,d.jsx)("ul",{className:"gtmkit-text-sm",children:a.map((function(t){return(0,d.jsx)("li",{children:t.help_text})}))})]})]}):null]})]})})},He=({sectionData:t})=>{const e=t.collections,{isPremium:i}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:t.title}),Object.keys(e).map((function(t){return(0,d.jsx)(Fe,{title:e[t].title,description:e[t].description,link:e[t].link,templates:e[t].templates,upsell:!i})}))]})},Ke=()=>{const t=ot(),e=window.gtmkitSettings.tutorials;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Help","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Need help?","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("We are here to help if you have any questions.","gtm-kit"),(0,d.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{t("/support",{replace:!0})},children:(0,n.__)("See support options","gtm-kit")})]})})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Tutorials","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsx)("ul",{children:e.map(((t,e)=>(0,d.jsxs)("li",{className:"gtmkit-mb-4",children:[(0,d.jsx)("a",{href:t.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline",children:t.title}),t.text.map(((t,e)=>(0,d.jsx)("div",{className:"gtmkit-text-sm",children:t},e)))]},e)))})})]})]})},ze=()=>{const{useIsSending:t,useUpdateSupportTicket:e,useSupportTicket:i,useSendSystemData:o,useIsSystemDataSent:r,useSystemDataMessage:l,isPremium:c}=(0,a.useContext)(g);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Get support","gtm-kit")}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Support options","gtm-kit")}),(0,d.jsx)(be.Content,{children:(0,d.jsxs)("ul",{className:"gtmkit-text-color-primary",children:[c&&(0,d.jsx)("li",{children:(0,d.jsx)("a",{href:"https://jump.gtmkit.com/link/4-E35E4",target:"_blank",rel:"noreferrer",children:(0,n.__)("WooCommerce Premium Support","gtm-kit")})}),(0,d.jsx)("li",{children:(0,d.jsx)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer",children:(0,n.__)("WordPress.org Support Forum","gtm-kit")})}),(0,d.jsx)("li",{children:(0,d.jsx)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,n.__)("GITHub repository","gtm-kit")})}),(0,d.jsxs)("li",{children:[(0,d.jsx)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer",children:(0,n.__)("Plugin Homepage","gtm-kit")})," ","(gtmkit.com)"]})]})})]}),(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:(0,n.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,d.jsx)(be.Content,{children:r?(0,d.jsx)("p",{className:"gtmkit-mb-2",children:l}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"gtmkit-mb-2",children:(0,n.__)("If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:","gtm-kit")}),(0,d.jsx)(s.TextControl,{label:(0,d.jsxs)("span",{className:"gtmkit-text-red-600",children:[l," "]}),placeholder:(0,n.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:i,onChange:t=>e(t)}),(0,d.jsxs)(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:()=>{o()},disabled:!i.toUpperCase().startsWith("FS"),children:[(0,d.jsx)("span",{children:(0,n.__)("Send system data","gtm-kit")}),t?(0,d.jsx)(s.Spinner,{}):""]})]})})]})]})},Be=t=>{const{Fill:e,Slot:i}=(0,s.createSlotFill)(t),n=({children:t})=>(0,d.jsx)(e,{children:t});return n.Slot=({fillProps:t})=>(0,d.jsx)(i,{fillProps:t,children:t=>t.length?t:null}),n},We=Be("GravityForms"),$e=Be("LicenseActivation"),Ye=({integrationID:t,pluginName:e})=>{const{useSettings:i,useUpdateStateSettings:n}=(0,a.useContext)(g),s=!window.gtmkitSettings.plugins[t],o=s||!i.integrations[t+"_integration"];return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:e}),s?(0,d.jsx)(Ae,{pluginName:e}):null,(0,d.jsx)(Oe,{pluginName:e,optionName:t+"_integration",pluginInactive:s}),"gf"===t?(0,d.jsx)(We.Slot,{fillProps:{settingsInactive:o,useSettings:i,useUpdateStateSettings:n}}):null]})},Je=window.wp.plugins,qe=(0,a.forwardRef)((({icon:t,size:e=24,...i},n)=>(0,a.cloneElement)(t,{width:e,height:e,...i,ref:n}))),Ve=window.wp.primitives,Xe=(0,d.jsx)(Ve.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(Ve.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Ze=(0,d.jsx)(Ve.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(Ve.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),{entries:Qe,setPrototypeOf:ti,isFrozen:ei,getPrototypeOf:ii,getOwnPropertyDescriptor:ni}=Object;let{freeze:ai,seal:si,create:oi}=Object,{apply:ri,construct:li}="undefined"!=typeof Reflect&&Reflect;ai||(ai=function(t){return t}),si||(si=function(t){return t}),ri||(ri=function(t,e){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a<i;a++)n[a-2]=arguments[a];return t.apply(e,n)}),li||(li=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return new t(...i)});const ci=ji(Array.prototype.forEach),mi=ji(Array.prototype.lastIndexOf),di=ji(Array.prototype.pop),gi=ji(Array.prototype.push),ui=ji(Array.prototype.splice),pi=ji(String.prototype.toLowerCase),hi=ji(String.prototype.toString),ki=ji(String.prototype.match),fi=ji(String.prototype.replace),_i=ji(String.prototype.indexOf),xi=ji(String.prototype.trim),Si=ji(Object.prototype.hasOwnProperty),bi=ji(RegExp.prototype.test),yi=(vi=TypeError,function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return li(vi,e)});var vi;function ji(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return ri(t,e,n)}}function Ni(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:pi;ti&&ti(t,null);let n=e.length;for(;n--;){let a=e[n];if("string"==typeof a){const t=i(a);t!==a&&(ei(e)||(e[n]=t),a=t)}t[a]=!0}return t}function wi(t){for(let e=0;e<t.length;e++)Si(t,e)||(t[e]=null);return t}function Ei(t){const e=oi(null);for(const[i,n]of Qe(t))Si(t,i)&&(Array.isArray(n)?e[i]=wi(n):n&&"object"==typeof n&&n.constructor===Object?e[i]=Ei(n):e[i]=n);return e}function Ti(t,e){for(;null!==t;){const i=ni(t,e);if(i){if(i.get)return ji(i.get);if("function"==typeof i.value)return ji(i.value)}t=ii(t)}return function(){return null}}const Ci=ai(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Di=ai(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","slot","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ui=ai(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ai=ai(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ii=ai(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Oi=ai(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Li=ai(["#text"]),Ri=ai(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Mi=ai(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Pi=ai(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Gi=ai(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Fi=si(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Hi=si(/<%[\w\W]*|[\w\W]*%>/gm),Ki=si(/\$\{[\w\W]*/gm),zi=si(/^data-[\-\w.\u00B7-\uFFFF]+$/),Bi=si(/^aria-[\-\w]+$/),Wi=si(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$i=si(/^(?:\w+script|data):/i),Yi=si(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ji=si(/^html$/i),qi=si(/^[a-z][.\w]*(-[.\w]+)+$/i);var Vi=Object.freeze({__proto__:null,ARIA_ATTR:Bi,ATTR_WHITESPACE:Yi,CUSTOM_ELEMENT:qi,DATA_ATTR:zi,DOCTYPE_NAME:Ji,ERB_EXPR:Hi,IS_ALLOWED_URI:Wi,IS_SCRIPT_OR_DATA:$i,MUSTACHE_EXPR:Fi,TMPLIT_EXPR:Ki});const Xi=function(){return"undefined"==typeof window?null:window};var Zi=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xi();const i=e=>t(e);if(i.version="3.2.7",i.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return i.isSupported=!1,i;let{document:n}=e;const a=n,s=a.currentScript,{DocumentFragment:o,HTMLTemplateElement:r,Node:l,Element:c,NodeFilter:m,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:u,trustedTypes:p}=e,h=c.prototype,k=Ti(h,"cloneNode"),f=Ti(h,"remove"),_=Ti(h,"nextSibling"),x=Ti(h,"childNodes"),S=Ti(h,"parentNode");if("function"==typeof r){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let b,y="";const{implementation:v,createNodeIterator:j,createDocumentFragment:N,getElementsByTagName:w}=n,{importNode:E}=a;let T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported="function"==typeof Qe&&"function"==typeof S&&v&&void 0!==v.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:D,TMPLIT_EXPR:U,DATA_ATTR:A,ARIA_ATTR:I,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:R}=Vi;let{IS_ALLOWED_URI:M}=Vi,P=null;const G=Ni({},[...Ci,...Di,...Ui,...Ii,...Li]);let F=null;const H=Ni({},[...Ri,...Mi,...Pi,...Gi]);let K=Object.seal(oi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),z=null,B=null,W=!0,$=!0,Y=!1,J=!0,q=!1,V=!0,X=!1,Z=!1,Q=!1,tt=!1,et=!1,it=!1,nt=!0,at=!1,st=!0,ot=!1,rt={},lt=null;const ct=Ni({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let mt=null;const dt=Ni({},["audio","video","img","source","image","track"]);let gt=null;const ut=Ni({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pt="http://www.w3.org/1998/Math/MathML",ht="http://www.w3.org/2000/svg",kt="http://www.w3.org/1999/xhtml";let ft=kt,_t=!1,xt=null;const St=Ni({},[pt,ht,kt],hi);let bt=Ni({},["mi","mo","mn","ms","mtext"]),yt=Ni({},["annotation-xml"]);const vt=Ni({},["title","style","font","a","script"]);let jt=null;const Nt=["application/xhtml+xml","text/html"];let wt=null,Et=null;const Tt=n.createElement("form"),Ct=function(t){return t instanceof RegExp||t instanceof Function},Dt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Et||Et!==t){if(t&&"object"==typeof t||(t={}),t=Ei(t),jt=-1===Nt.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,wt="application/xhtml+xml"===jt?hi:pi,P=Si(t,"ALLOWED_TAGS")?Ni({},t.ALLOWED_TAGS,wt):G,F=Si(t,"ALLOWED_ATTR")?Ni({},t.ALLOWED_ATTR,wt):H,xt=Si(t,"ALLOWED_NAMESPACES")?Ni({},t.ALLOWED_NAMESPACES,hi):St,gt=Si(t,"ADD_URI_SAFE_ATTR")?Ni(Ei(ut),t.ADD_URI_SAFE_ATTR,wt):ut,mt=Si(t,"ADD_DATA_URI_TAGS")?Ni(Ei(dt),t.ADD_DATA_URI_TAGS,wt):dt,lt=Si(t,"FORBID_CONTENTS")?Ni({},t.FORBID_CONTENTS,wt):ct,z=Si(t,"FORBID_TAGS")?Ni({},t.FORBID_TAGS,wt):Ei({}),B=Si(t,"FORBID_ATTR")?Ni({},t.FORBID_ATTR,wt):Ei({}),rt=!!Si(t,"USE_PROFILES")&&t.USE_PROFILES,W=!1!==t.ALLOW_ARIA_ATTR,$=!1!==t.ALLOW_DATA_ATTR,Y=t.ALLOW_UNKNOWN_PROTOCOLS||!1,J=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,q=t.SAFE_FOR_TEMPLATES||!1,V=!1!==t.SAFE_FOR_XML,X=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,it=t.RETURN_TRUSTED_TYPE||!1,Q=t.FORCE_BODY||!1,nt=!1!==t.SANITIZE_DOM,at=t.SANITIZE_NAMED_PROPS||!1,st=!1!==t.KEEP_CONTENT,ot=t.IN_PLACE||!1,M=t.ALLOWED_URI_REGEXP||Wi,ft=t.NAMESPACE||kt,bt=t.MATHML_TEXT_INTEGRATION_POINTS||bt,yt=t.HTML_INTEGRATION_POINTS||yt,K=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Ct(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Ct(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(K.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&($=!1),et&&(tt=!0),rt&&(P=Ni({},Li),F=[],!0===rt.html&&(Ni(P,Ci),Ni(F,Ri)),!0===rt.svg&&(Ni(P,Di),Ni(F,Mi),Ni(F,Gi)),!0===rt.svgFilters&&(Ni(P,Ui),Ni(F,Mi),Ni(F,Gi)),!0===rt.mathMl&&(Ni(P,Ii),Ni(F,Pi),Ni(F,Gi))),t.ADD_TAGS&&(P===G&&(P=Ei(P)),Ni(P,t.ADD_TAGS,wt)),t.ADD_ATTR&&(F===H&&(F=Ei(F)),Ni(F,t.ADD_ATTR,wt)),t.ADD_URI_SAFE_ATTR&&Ni(gt,t.ADD_URI_SAFE_ATTR,wt),t.FORBID_CONTENTS&&(lt===ct&&(lt=Ei(lt)),Ni(lt,t.FORBID_CONTENTS,wt)),st&&(P["#text"]=!0),X&&Ni(P,["html","head","body"]),P.table&&(Ni(P,["tbody"]),delete z.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw yi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw yi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');b=t.TRUSTED_TYPES_POLICY,y=b.createHTML("")}else void 0===b&&(b=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(i=e.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(p,s)),null!==b&&"string"==typeof y&&(y=b.createHTML(""));ai&&ai(t),Et=t}},Ut=Ni({},[...Di,...Ui,...Ai]),At=Ni({},[...Ii,...Oi]),It=function(t){gi(i.removed,{element:t});try{S(t).removeChild(t)}catch(e){f(t)}},Ot=function(t,e){try{gi(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){gi(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(tt||et)try{It(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},Lt=function(t){let e=null,i=null;if(Q)t="<remove></remove>"+t;else{const e=ki(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===jt&&ft===kt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const a=b?b.createHTML(t):t;if(ft===kt)try{e=(new u).parseFromString(a,jt)}catch(t){}if(!e||!e.documentElement){e=v.createDocument(ft,"template",null);try{e.documentElement.innerHTML=_t?y:a}catch(t){}}const s=e.body||e.documentElement;return t&&i&&s.insertBefore(n.createTextNode(i),s.childNodes[0]||null),ft===kt?w.call(e,X?"html":"body")[0]:X?e.documentElement:s},Rt=function(t){return j.call(t.ownerDocument||t,t,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},Mt=function(t){return t instanceof g&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof d)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Pt=function(t){return"function"==typeof l&&t instanceof l};function Gt(t,e,n){ci(t,(t=>{t.call(i,e,n,Et)}))}const Ft=function(t){let e=null;if(Gt(T.beforeSanitizeElements,t,null),Mt(t))return It(t),!0;const n=wt(t.nodeName);if(Gt(T.uponSanitizeElement,t,{tagName:n,allowedTags:P}),V&&t.hasChildNodes()&&!Pt(t.firstElementChild)&&bi(/<[/\w!]/g,t.innerHTML)&&bi(/<[/\w!]/g,t.textContent))return It(t),!0;if(7===t.nodeType)return It(t),!0;if(V&&8===t.nodeType&&bi(/<[/\w]/g,t.data))return It(t),!0;if(!P[n]||z[n]){if(!z[n]&&Kt(n)){if(K.tagNameCheck instanceof RegExp&&bi(K.tagNameCheck,n))return!1;if(K.tagNameCheck instanceof Function&&K.tagNameCheck(n))return!1}if(st&&!lt[n]){const e=S(t)||t.parentNode,i=x(t)||t.childNodes;if(i&&e)for(let n=i.length-1;n>=0;--n){const a=k(i[n],!0);a.__removalCount=(t.__removalCount||0)+1,e.insertBefore(a,_(t))}}return It(t),!0}return t instanceof c&&!function(t){let e=S(t);e&&e.tagName||(e={namespaceURI:ft,tagName:"template"});const i=pi(t.tagName),n=pi(e.tagName);return!!xt[t.namespaceURI]&&(t.namespaceURI===ht?e.namespaceURI===kt?"svg"===i:e.namespaceURI===pt?"svg"===i&&("annotation-xml"===n||bt[n]):Boolean(Ut[i]):t.namespaceURI===pt?e.namespaceURI===kt?"math"===i:e.namespaceURI===ht?"math"===i&&yt[n]:Boolean(At[i]):t.namespaceURI===kt?!(e.namespaceURI===ht&&!yt[n])&&!(e.namespaceURI===pt&&!bt[n])&&!At[i]&&(vt[i]||!Ut[i]):!("application/xhtml+xml"!==jt||!xt[t.namespaceURI]))}(t)?(It(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!bi(/<\/no(script|embed|frames)/i,t.innerHTML)?(q&&3===t.nodeType&&(e=t.textContent,ci([C,D,U],(t=>{e=fi(e,t," ")})),t.textContent!==e&&(gi(i.removed,{element:t.cloneNode()}),t.textContent=e)),Gt(T.afterSanitizeElements,t,null),!1):(It(t),!0)},Ht=function(t,e,i){if(nt&&("id"===e||"name"===e)&&(i in n||i in Tt))return!1;if($&&!B[e]&&bi(A,e));else if(W&&bi(I,e));else if(!F[e]||B[e]){if(!(Kt(t)&&(K.tagNameCheck instanceof RegExp&&bi(K.tagNameCheck,t)||K.tagNameCheck instanceof Function&&K.tagNameCheck(t))&&(K.attributeNameCheck instanceof RegExp&&bi(K.attributeNameCheck,e)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(e,t))||"is"===e&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&bi(K.tagNameCheck,i)||K.tagNameCheck instanceof Function&&K.tagNameCheck(i))))return!1}else if(gt[e]);else if(bi(M,fi(i,L,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==_i(i,"data:")||!mt[t])if(Y&&!bi(O,fi(i,L,"")));else if(i)return!1;return!0},Kt=function(t){return"annotation-xml"!==t&&ki(t,R)},zt=function(t){Gt(T.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Mt(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let a=e.length;for(;a--;){const s=e[a],{name:o,namespaceURI:r,value:l}=s,c=wt(o),m=l;let d="value"===o?m:xi(m);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,Gt(T.uponSanitizeAttribute,t,n),d=n.attrValue,!at||"id"!==c&&"name"!==c||(Ot(o,t),d="user-content-"+d),V&&bi(/((--!?|])>)|<\/(style|title|textarea)/i,d)){Ot(o,t);continue}if("attributename"===c&&ki(d,"href")){Ot(o,t);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Ot(o,t);continue}if(!J&&bi(/\/>/i,d)){Ot(o,t);continue}q&&ci([C,D,U],(t=>{d=fi(d,t," ")}));const g=wt(t.nodeName);if(Ht(g,c,d)){if(b&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(r);else switch(p.getAttributeType(g,c)){case"TrustedHTML":d=b.createHTML(d);break;case"TrustedScriptURL":d=b.createScriptURL(d)}if(d!==m)try{r?t.setAttributeNS(r,o,d):t.setAttribute(o,d),Mt(t)?It(t):di(i.removed)}catch(e){Ot(o,t)}}else Ot(o,t)}Gt(T.afterSanitizeAttributes,t,null)},Bt=function t(e){let i=null;const n=Rt(e);for(Gt(T.beforeSanitizeShadowDOM,e,null);i=n.nextNode();)Gt(T.uponSanitizeShadowNode,i,null),Ft(i),zt(i),i.content instanceof o&&t(i.content);Gt(T.afterSanitizeShadowDOM,e,null)};return i.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,s=null,r=null,c=null;if(_t=!t,_t&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Pt(t)){if("function"!=typeof t.toString)throw yi("toString is not a function");if("string"!=typeof(t=t.toString()))throw yi("dirty is not a string, aborting")}if(!i.isSupported)return t;if(Z||Dt(e),i.removed=[],"string"==typeof t&&(ot=!1),ot){if(t.nodeName){const e=wt(t.nodeName);if(!P[e]||z[e])throw yi("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)n=Lt("\x3c!----\x3e"),s=n.ownerDocument.importNode(t,!0),1===s.nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?n=s:n.appendChild(s);else{if(!tt&&!q&&!X&&-1===t.indexOf("<"))return b&&it?b.createHTML(t):t;if(n=Lt(t),!n)return tt?null:it?y:""}n&&Q&&It(n.firstChild);const m=Rt(ot?t:n);for(;r=m.nextNode();)Ft(r),zt(r),r.content instanceof o&&Bt(r.content);if(ot)return t;if(tt){if(et)for(c=N.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return(F.shadowroot||F.shadowrootmode)&&(c=E.call(a,c,!0)),c}let d=X?n.outerHTML:n.innerHTML;return X&&P["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&bi(Ji,n.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+d),q&&ci([C,D,U],(t=>{d=fi(d,t," ")})),b&&it?b.createHTML(d):d},i.setConfig=function(){Dt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},i.clearConfig=function(){Et=null,Z=!1},i.isValidAttribute=function(t,e,i){Et||Dt({});const n=wt(t),a=wt(e);return Ht(n,a,i)},i.addHook=function(t,e){"function"==typeof e&&gi(T[t],e)},i.removeHook=function(t,e){if(void 0!==e){const i=mi(T[t],e);return-1===i?void 0:ui(T[t],i,1)[0]}return di(T[t])},i.removeHooks=function(t){T[t]=[]},i.removeAllHooks=function(){T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();const Qi=({title:t,type:e,hideEmpty:i=!0})=>{const{useNotifications:o,useSetNotificationStatus:r,useIsUpdatingNotifications:l}=(0,a.useContext)(g),c=o[e],m=Object.entries(c.active),u=Object.entries(c.dismissed);if(0===c.total&&i)return null;const[p,h]=(0,a.useState)(!1),k=(t,e,i)=>(0,d.jsxs)("div",{className:Mt()("gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-border gtmkit-px-4 gtmkit-py-3 gtmkit-gap-x-16",{"gtmkit-border gtmkit-border-t-0":i},{"gtmkit-border-2":!i}),children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"gtmkit-font-bold gtmkit-mr-2",children:e.header}),(0,d.jsx)("span",{className:"gtmkit-text-sm",dangerouslySetInnerHTML:{__html:Zi.sanitize(e.message)}})]}),(0,d.jsxs)(s.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-1 !gtmkit-px-3 gtmkit-h-min",onClick:()=>r(e.id,i?"restore":"dismiss"),children:[(0,d.jsx)("span",{className:"gtmkit-text-sm",children:i?(0,n.__)("Restore","gtm-kit"):(0,n.__)("Dismiss","gtm-kit")}),l?(0,d.jsx)(s.Spinner,{}):null]})]},t);return(0,d.jsxs)(be,{children:[(0,d.jsx)(be.Header,{title:t,children:(0,d.jsx)(Ft,{count:c.active.length,important:"problem"===e})}),(0,d.jsxs)(be.Content,{className:"gtmkit-space-y-4",children:[m.map((([t,e])=>k(t,e,!1))),u.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-py gtmkit-font-bold gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-cursor-pointer",onClick:()=>h((t=>!t)),children:[(0,d.jsx)("span",{children:(0,n.sprintf)(
    2020// translators: %d is number %s can be either 'problem' or 'notification'.
    2121// translators: %d is number %s can be either 'problem' or 'notification'.
  • gtm-kit/trunk/assets/admin/wizard.asset.php

    r3339414 r3366939  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '1d6aacb2e32304340d74');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '71fbbf5db87576bb67b1');
  • gtm-kit/trunk/assets/admin/wizard.js

    r3339414 r3366939  
    1 (()=>{"use strict";var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var a in i)t.o(i,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:i[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.ReactDOM,i=window.wp.element,a=window.wp.components,n=window.lodash,s=window.wp.apiFetch;var r=t.n(s);r().use(r().createNonceMiddleware(window.gtmkitSettings.nonce)),r().use(r().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,i=null,a=!1)=>{let n={};try{n=await r()({path:t,method:e,...i&&{data:i}})}catch(i){return{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===a?n:!0===n.success?n.data:{}},l=window.wp.i18n,c=(t,e)=>{const i={...t};switch(e.type){case"FETCH_SETTINGS":i.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},i.stateSettings=e.payload.stateSettings,i.siteData=e.payload.siteData,i.notifications=e.payload.notifications,i.installData=e.payload.installData,i.isPending=!1,i.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(i.notice=(0,l.__)("An error occurred.","gtm-kit"),i.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":i.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":i.fetchedSettings=e.payload.fetchedSettings,i.stateSettings=e.payload.stateSettings,i.isPending=!1,i.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,i.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,l.__)("An error occurred.","gtm-kit"):(0,l.__)("Saved Successfully.","gtm-kit"),i.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":i.fetchedSettings=e.payload.fetchedSettings||i.fetchedSettings,i.stateSettings=e.payload.stateSettings||i.stateSettings,i.isPending=e.payload.isPending||i.isPending,i.notice=e.payload.notice||i.notice,i.hasError=e.payload.hasError||i.hasError,i.canSave=e.payload.canSave||i.canSave,i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData,i.supportTicket=e.payload.supportTicket||i.supportTicket,i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey,i.licenseKey=e.payload.licenseKey||i.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData;break;case"SEND_SUPPORT_DATA":i.isSendingSystemData=!1,i.isSystemDataSent=e.payload.isSystemDataSent||i.isSystemDataSent,i.systemDataMessage=e.payload.systemDataMessage||i.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":i.isSendingLicenseKey=!1,i.isLicenseKeySent=e.payload.isLicenseKeySent||i.isLicenseKeySent,i.licenseKeyMessage=e.payload.licenseKeyMessage||i.licenseKeyMessage;break;case"SEND_NOTIFICATION_STATUS_BEFORE":i.isUpdatingNotifications=e.payload.isUpdatingNotifications||i.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":i.isUpdatingNotifications=!1,i.notifications=e.payload.notifications||i.Notifications}return i},m=window.ReactJSXRuntime,g=(0,i.createContext)(),d=t=>{const[e,a]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),s=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},i=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},n="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};a({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:i,installData:n}})},r=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(i=e.stateSettings,o("gtmkit/v1/set-options","POST",i));var i;a({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:r,useUpdateStateSettings:async(t,i,a)=>{const s=JSON.parse(JSON.stringify(e.stateSettings));let o;s[t][i]=a,o=!(0,n.isEqual)(s,e.fetchedSettings),r({stateSettings:s,canSave:o})},useImportSettings:async(t,i)=>{const a=JSON.parse(JSON.stringify(e.stateSettings));let s;const o={};o.general={...a.general,...i.general},"integrations"in i&&(o.integrations={...a.integrations,...i.integrations}),s=!(0,n.isEqual)(o,e.fetchedSettings),r({stateSettings:o,canSave:s})},useUpdateSupportTicket:async t=>{r({supportTicket:t})},useSendSystemData:async()=>{a({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(i=e.supportTicket,o("gtmkit/v1/send-support-data","POST",i,!0));var i;a({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{r({licenseKey:t})},useSendLicenseKey:async()=>{a({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(i=e.licenseKey,o("gtmkit/v1/send-license-key","POST",i,!0));var i;a({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{a({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:"remove"!==e}});const i={"notification-id":t,action:e},n=await(t=>o("gtmkit/v1/set-notification-status","POST",t,!0))(i),s=n.data.metrics.total,r=document.querySelectorAll("li.toplevel_page_gtmkit_general span.menu-counter");r&&r.forEach((t=>{const e=t.querySelector("span.count");e&&(e.textContent=s),t.className=t.className.replace(/count-\d+/,`count-${s}`)})),a({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,notifications:n.data}})},useSettings:e.stateSettings,useIsPending:e.isPending,useNotice:e.notice,useHasError:e.hasError,useCanSave:e.canSave,useSiteData:e.siteData,useInstallData:e.installData,useIsSending:e.isSendingSystemData,useSupportTicket:e.supportTicket,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage,useIsSendingLicenseKey:e.isSendingLicenseKey,useLicenseKey:e.licenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage,useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,m.jsx)(g.Provider,{value:l,children:t.children})},u=window.React;function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},p.apply(this,arguments)}var h;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(h||(h={}));const k="popstate";function x(t,e){if(!1===t||null==t)throw new Error(e)}function y(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function S(t,e){return{usr:t.state,key:t.key,idx:e}}function f(t,e,i,a){return void 0===i&&(i=null),p({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?N(e):e,{state:i,key:e&&e.key||a||Math.random().toString(36).substr(2,8)})}function j(t){let{pathname:e="/",search:i="",hash:a=""}=t;return i&&"?"!==i&&(e+="?"===i.charAt(0)?i:"?"+i),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function N(t){let e={};if(t){let i=t.indexOf("#");i>=0&&(e.hash=t.substr(i),t=t.substr(0,i));let a=t.indexOf("?");a>=0&&(e.search=t.substr(a),t=t.substr(0,a)),t&&(e.pathname=t)}return e}var M;function v(t,e,i){return void 0===i&&(i="/"),function(t,e,i,a){let n=z(("string"==typeof e?N(e):e).pathname||"/",i);if(null==n)return null;let s=_(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,i)=>t===e[i]))?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=P(n);r=U(s[t],e,a)}return r}(t,e,i,!1)}function _(t,e,i,a){void 0===e&&(e=[]),void 0===i&&(i=[]),void 0===a&&(a="");let n=(t,n,s)=>{let r={relativePath:void 0===s?t.path||"":s,caseSensitive:!0===t.caseSensitive,childrenIndex:n,route:t};r.relativePath.startsWith("/")&&(x(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=K([a,r.relativePath]),l=i.concat(r);t.children&&t.children.length>0&&(x(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),_(t.children,e,l,o)),(null!=t.path||t.index)&&e.push({path:o,score:O(o,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var i;if(""!==t.path&&null!=(i=t.path)&&i.includes("?"))for(let i of w(t.path))n(t,e,i);else n(t,e)})),e}function w(t){let e=t.split("/");if(0===e.length)return[];let[i,...a]=e,n=i.endsWith("?"),s=i.replace(/\?$/,"");if(0===a.length)return n?[s,""]:[s];let r=w(a.join("/")),o=[];return o.push(...r.map((t=>""===t?s:[s,t].join("/")))),n&&o.push(...r),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(M||(M={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const b=/^:[\w-]+$/,T=3,L=2,E=1,D=10,I=-2,C=t=>"*"===t;function O(t,e){let i=t.split("/"),a=i.length;return i.some(C)&&(a+=I),e&&(a+=L),i.filter((t=>!C(t))).reduce(((t,e)=>t+(b.test(e)?T:""===e?E:D)),a)}function U(t,e,i){void 0===i&&(i=!1);let{routesMeta:a}=t,n={},s="/",r=[];for(let t=0;t<a.length;++t){let o=a[t],l=t===a.length-1,c="/"===s?e:e.slice(s.length)||"/",m=A({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},c),g=o.route;if(!m&&l&&i&&!a[a.length-1].route.index&&(m=A({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},c)),!m)return null;Object.assign(n,m.params),r.push({params:n,pathname:K([s,m.pathname]),pathnameBase:F(K([s,m.pathnameBase])),route:g}),"/"!==m.pathnameBase&&(s=K([s,m.pathnameBase]))}return r}function A(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[i,a]=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0),y("*"===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=[],n="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,i)=>(a.push({paramName:e,isOptional:null!=i}),i?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(a.push({paramName:"*"}),n+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?n+="\\/*$":""!==t&&"/"!==t&&(n+="(?:(?=\\/|$))"),[new RegExp(n,e?void 0:"i"),a]}(t.path,t.caseSensitive,t.end),n=e.match(i);if(!n)return null;let s=n[0],r=s.replace(/(.)\/+$/,"$1"),o=n.slice(1);return{params:a.reduce(((t,e,i)=>{let{paramName:a,isOptional:n}=e;if("*"===a){let t=o[i]||"";r=s.slice(0,s.length-t.length).replace(/(.)\/+$/,"$1")}const l=o[i];return t[a]=n&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:s,pathnameBase:r,pattern:t}}function P(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return y(!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 i=e.endsWith("/")?e.length-1:e.length,a=t.charAt(i);return a&&"/"!==a?null:t.slice(i)||"/"}function R(t,e,i,a){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(a)+"].  Please separate it out to the `to."+i+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function G(t,e){let i=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?i.map(((t,e)=>e===i.length-1?t.pathname:t.pathnameBase)):i.map((t=>t.pathnameBase))}function B(t,e,i,a){let n;void 0===a&&(a=!1),"string"==typeof t?n=N(t):(n=p({},t),x(!n.pathname||!n.pathname.includes("?"),R("?","pathname","search",n)),x(!n.pathname||!n.pathname.includes("#"),R("#","pathname","hash",n)),x(!n.search||!n.search.includes("#"),R("#","search","hash",n)));let s,r=""===t||""===n.pathname,o=r?"/":n.pathname;if(null==o)s=i;else{let t=e.length-1;if(!a&&o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;n.pathname=e.join("/")}s=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:i,search:a="",hash:n=""}="string"==typeof t?N(t):t,s=i?i.startsWith("/")?i:function(t,e){let i=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?i.length>1&&i.pop():"."!==t&&i.push(t)})),i.length>1?i.join("/"):"/"}(i,e):e;return{pathname:s,search:Y(a),hash:W(n)}}(n,s),c=o&&"/"!==o&&o.endsWith("/"),m=(r||"."===o)&&i.endsWith("/");return l.pathname.endsWith("/")||!c&&!m||(l.pathname+="/"),l}const K=t=>t.join("/").replace(/\/\/+/g,"/"),F=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Y=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",W=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const Q=["post","put","patch","delete"],$=(new Set(Q),["get",...Q]);function H(){return H=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},H.apply(this,arguments)}new Set($),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const J=u.createContext(null),Z=u.createContext(null),V=u.createContext(null),X=u.createContext(null),q=u.createContext({outlet:null,matches:[],isDataRoute:!1}),tt=u.createContext(null);function et(){return null!=u.useContext(X)}function it(){return et()||x(!1),u.useContext(X).location}function at(t){u.useContext(V).static||u.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=u.useContext(q);return t?function(){let{router:t}=function(){let t=u.useContext(J);return t||x(!1),t}(mt.UseNavigateStable),e=dt(gt.UseNavigateStable),i=u.useRef(!1);return at((()=>{i.current=!0})),u.useCallback((function(a,n){void 0===n&&(n={}),i.current&&("number"==typeof a?t.navigate(a):t.navigate(a,H({fromRouteId:e},n)))}),[t,e])}():function(){et()||x(!1);let t=u.useContext(J),{basename:e,future:i,navigator:a}=u.useContext(V),{matches:n}=u.useContext(q),{pathname:s}=it(),r=JSON.stringify(G(n,i.v7_relativeSplatPath)),o=u.useRef(!1);return at((()=>{o.current=!0})),u.useCallback((function(i,n){if(void 0===n&&(n={}),!o.current)return;if("number"==typeof i)return void a.go(i);let l=B(i,JSON.parse(r),s,"path"===n.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:K([e,l.pathname])),(n.replace?a.replace:a.push)(l,n.state,n)}),[e,a,r,s,t])}()}function st(t,e,i,a){et()||x(!1);let{navigator:n,static:s}=u.useContext(V),{matches:r}=u.useContext(q),o=r[r.length-1],l=o?o.params:{},c=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let m,g=it();if(e){var d;let t="string"==typeof e?N(e):e;"/"===c||(null==(d=t.pathname)?void 0:d.startsWith(c))||x(!1),m=t}else m=g;let p=m.pathname||"/",k=p;if("/"!==c){let t=c.replace(/^\//,"").split("/");k="/"+p.replace(/^\//,"").split("/").slice(t.length).join("/")}let y=!s&&i&&i.matches&&i.matches.length>0?i.matches:v(t,{pathname:k}),S=function(t,e,i,a){var n;if(void 0===e&&(e=[]),void 0===i&&(i=null),void 0===a&&(a=null),null==t){var s;if(!i)return null;if(i.errors)t=i.matches;else{if(!(null!=(s=a)&&s.v7_partialHydration&&0===e.length&&!i.initialized&&i.matches.length>0))return null;t=i.matches}}let r=t,o=null==(n=i)?void 0:n.errors;if(null!=o){let t=r.findIndex((t=>t.route.id&&void 0!==(null==o?void 0:o[t.route.id])));t>=0||x(!1),r=r.slice(0,Math.min(r.length,t+1))}let l=!1,c=-1;if(i&&a&&a.v7_partialHydration)for(let t=0;t<r.length;t++){let e=r[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:a}=i,n=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||n){l=!0,r=c>=0?r.slice(0,c+1):[r[0]];break}}}return r.reduceRight(((t,a,n)=>{let s,m=!1,g=null,d=null;var p;i&&(s=o&&a.route.id?o[a.route.id]:void 0,g=a.route.errorElement||ot,l&&(c<0&&0===n?(ut[p="route-fallback"]||(ut[p]=!0),m=!0,d=null):c===n&&(m=!0,d=a.route.hydrateFallbackElement||null)));let h=e.concat(r.slice(0,n+1)),k=()=>{let e;return e=s?g:m?d:a.route.Component?u.createElement(a.route.Component,null):a.route.element?a.route.element:t,u.createElement(ct,{match:a,routeContext:{outlet:t,matches:h,isDataRoute:null!=i},children:e})};return i&&(a.route.ErrorBoundary||a.route.errorElement||0===n)?u.createElement(lt,{location:i.location,revalidation:i.revalidation,component:g,error:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},l,t.params),pathname:K([c,n.encodeLocation?n.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?c:K([c,n.encodeLocation?n.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),r,i,a);return e&&S?u.createElement(X.Provider,{value:{location:H({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:h.Pop}},S):S}function rt(){let t=function(){var t;let e=u.useContext(tt),i=function(){let t=u.useContext(Z);return t||x(!1),t}(gt.UseRouteError),a=dt(gt.UseRouteError);return void 0!==e?e:null==(t=i.errors)?void 0:t[a]}(),e=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),i=t instanceof Error?t.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return u.createElement(u.Fragment,null,u.createElement("h2",null,"Unexpected Application Error!"),u.createElement("h3",{style:{fontStyle:"italic"}},e),i?u.createElement("pre",{style:a},i):null,null)}const ot=u.createElement(rt,null);class lt extends u.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?u.createElement(q.Provider,{value:this.props.routeContext},u.createElement(tt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ct(t){let{routeContext:e,match:i,children:a}=t,n=u.useContext(J);return n&&n.static&&n.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=i.route.id),u.createElement(q.Provider,{value:e},a)}var mt=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(mt||{}),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 dt(t){let e=function(){let t=u.useContext(q);return t||x(!1),t}(),i=e.matches[e.matches.length-1];return i.route.id||x(!1),i.route.id}const ut={};function pt(t){let{to:e,replace:i,state:a,relative:n}=t;et()||x(!1);let{future:s,static:r}=u.useContext(V),{matches:o}=u.useContext(q),{pathname:l}=it(),c=nt(),m=B(e,G(o,s.v7_relativeSplatPath),l,"path"===n),g=JSON.stringify(m);return u.useEffect((()=>c(JSON.parse(g),{replace:i,state:a,relative:n})),[c,g,n,i,a]),null}function ht(t){x(!1)}function kt(t){let{basename:e="/",children:i=null,location:a,navigationType:n=h.Pop,navigator:s,static:r=!1,future:o}=t;et()&&x(!1);let l=e.replace(/^\/*/,"/"),c=u.useMemo((()=>({basename:l,navigator:s,static:r,future:H({v7_relativeSplatPath:!1},o)})),[l,o,s,r]);"string"==typeof a&&(a=N(a));let{pathname:m="/",search:g="",hash:d="",state:p=null,key:k="default"}=a,y=u.useMemo((()=>{let t=z(m,l);return null==t?null:{location:{pathname:t,search:g,hash:d,state:p,key:k},navigationType:n}}),[l,m,g,d,p,k,n]);return null==y?null:u.createElement(V.Provider,{value:c},u.createElement(X.Provider,{children:i,value:y}))}function xt(t){let{children:e,location:i}=t;return st(yt(e),i)}function yt(t,e){void 0===e&&(e=[]);let i=[];return u.Children.forEach(t,((t,a)=>{if(!u.isValidElement(t))return;let n=[...e,a];if(t.type===u.Fragment)return void i.push.apply(i,yt(t.props.children,n));t.type!==ht&&x(!1),t.props.index&&t.props.children&&x(!1);let s={id:t.props.id||n.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=yt(t.props.children,n)),i.push(s)})),i}u.startTransition,new Promise((()=>{})),u.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(t){}new Map;const St=u.startTransition;function ft(t){let{basename:e,children:i,future:a,window:n}=t,s=u.useRef();var r;null==s.current&&(s.current=(void 0===(r={window:n,v5Compat:!0})&&(r={}),function(t,e,i,a){void 0===a&&(a={});let{window:n=document.defaultView,v5Compat:s=!1}=a,r=n.history,o=h.Pop,l=null,c=m();function m(){return(r.state||{idx:null}).idx}function g(){o=h.Pop;let t=m(),e=null==t?null:t-c;c=t,l&&l({action:o,location:u.location,delta:e})}function d(t){let e="null"!==n.location.origin?n.location.origin:n.location.href,i="string"==typeof t?t:j(t);return i=i.replace(/ $/,"%20"),x(e,"No window.location.(origin|href) available to create URL for href: "+i),new URL(i,e)}null==c&&(c=0,r.replaceState(p({},r.state,{idx:c}),""));let u={get action(){return o},get location(){return t(n,r)},listen(t){if(l)throw new Error("A history only accepts one active listener");return n.addEventListener(k,g),l=t,()=>{n.removeEventListener(k,g),l=null}},createHref:t=>e(n,t),createURL:d,encodeLocation(t){let e=d(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=h.Push;let a=f(u.location,t,e);i&&i(a,t),c=m()+1;let g=S(a,c),d=u.createHref(a);try{r.pushState(g,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;n.location.assign(d)}s&&l&&l({action:o,location:u.location,delta:1})},replace:function(t,e){o=h.Replace;let a=f(u.location,t,e);i&&i(a,t),c=m();let n=S(a,c),g=u.createHref(a);r.replaceState(n,"",g),s&&l&&l({action:o,location:u.location,delta:0})},go:t=>r.go(t)};return u}((function(t,e){let{pathname:i="/",search:a="",hash:n=""}=N(t.location.hash.substr(1));return i.startsWith("/")||i.startsWith(".")||(i="/"+i),f("",{pathname:i,search:a,hash:n},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let i=t.document.querySelector("base"),a="";if(i&&i.getAttribute("href")){let e=t.location.href,i=e.indexOf("#");a=-1===i?e:e.slice(0,i)}return a+"#"+("string"==typeof e?e:j(e))}),(function(t,e){y("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),r)));let o=s.current,[l,c]=u.useState({action:o.action,location:o.location}),{v7_startTransition:m}=a||{},g=u.useCallback((t=>{m&&St?St((()=>c(t))):c(t)}),[c,m]);return u.useLayoutEffect((()=>o.listen(g)),[o,g]),u.useEffect((()=>{return null==(t=a)||t.v7_startTransition,void 0!==(null==t?void 0:t.v7_relativeSplatPath)||e&&e.v7_relativeSplatPath,void(e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation));var t,e}),[a]),u.createElement(kt,{basename:e,children:i,location:l.location,navigationType:l.action,navigator:o,future:a})}var jt,Nt;e.flushSync,u.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"}(jt||(jt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Nt||(Nt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s}=(0,i.useContext)(g),r=nt();return(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-8",children:[(0,m.jsxs)("div",{className:"",children:[(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 ",children:(0,m.jsx)(a.TextControl,{label:(0,l.__)("Container ID","gtm-kit"),placeholder:(0,l.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>e("general","gtm_id",t)})}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),r("/essential-settings",{replace:!0})},disabled:s||!t.general.gtm_id.includes("-"),children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]}),(0,m.jsxs)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-color-grey gtmkit-text-center",children:[(0,m.jsx)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4",children:"Need help?"}),(0,m.jsxs)("p",{className:"gtmkit-mb-6",children:[(0,l.__)("Find your GTM container ID on","gtm-kit"),(0,m.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer",children:"Google Tag Manager"})]}),(0,m.jsxs)("p",{children:[(0,l.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"]})]})]})})},vt=()=>{const{useImportSettings:t,useIsPending:e,useInstallData:n}=(0,i.useContext)(g),[s,r]=(0,i.useState)(!0),o=Object.keys(n.import_data)[0],[c,d]=(0,i.useState)(o),u=[];return Object.keys(n.import_data).forEach((t=>{u.push({value:t,label:n.import_data[t].name})})),s?(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-8 gtmkit-my-8 gtmkit-text-left",children:[(0,m.jsx)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold",children:(0,l.__)("Would you like to import plugin settings?","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey",children:[(0,l.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,l.__)("Would you like to import your settings to GTM Kit?","gtm-kit")]}),(0,m.jsx)(a.RadioControl,{help:(0,l.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:c,options:u,onChange:t=>d(t)}),(0,m.jsxs)("div",{className:"gtmkit-flex gtmkit-mt-12",children:[(0,m.jsxs)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(c,n.import_data[c]),r(!1)},children:[(0,m.jsx)("span",{className:"gtmkit-text-lg gtmkit-font-bold",children:(0,l.__)("Yes","gtm-kit")}),e?(0,m.jsx)(a.Spinner,{}):""]}),(0,m.jsxs)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{r(!1)},children:[(0,m.jsx)("span",{className:"gtmkit-text-lg gtmkit-font-bold",children:(0,l.__)("No","gtm-kit")}),e?(0,m.jsx)(a.Spinner,{}):""]})]})]})}):(0,m.jsx)(Mt,{})},_t=()=>{const{useInstallData:t}=(0,i.useContext)(g),{firstInstall:e}=t,{importAvailable:a}=t;return(0,m.jsxs)("div",{className:"gtmkit-text-center",children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading",children:(0,l.__)("You've successfully installed GTM Kit!","gtm-kit")}),(0,m.jsx)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")})}),e&&a?(0,m.jsx)(vt,{}):(0,m.jsx)(Mt,{})]})},wt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s,useInstallData:r}=(0,i.useContext)(g),o=nt();return(0,m.jsxs)("div",{className:"gtmkit-text-center",children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading",children:(0,l.__)("Essential Settings","gtm-kit")}),(0,m.jsx)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("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,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Page type","gtm-kit"),id:"page-type",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("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:()=>{e("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}})})}),r.woocommerce_integration?(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{e("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}})})}):null,r.cf7_integration?(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{e("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}})})}):null,r.edd_integration?(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{e("integrations","edd_integration",!(t&&t.integrations.edd_integration))}})})}):null,(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),o("/share-anonymous-data",{replace:!0})},disabled:s,children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]})},bt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s,useSiteData:r}=(0,i.useContext)(g),o=nt();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("Help improve GTM Kit","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("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,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey",children:(0,l.__)("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,m.jsx)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm",children:(0,m.jsxs)("tbody",{children:[(0,m.jsxs)("tr",{className:"",children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Server type:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.web_server})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"PHP version number:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.php_version})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"WordPress version number:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.wordpress_version})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"WordPress multisite:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.multisite?(0,l.__)("Yes","gtm-kit"):(0,l.__)("No","gtm-kit")})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Current theme:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.current_theme})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Current site language:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.locale})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Active plugins:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("em",{children:"Plugin names of all active plugins"})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Anonymized GTM Kit settings:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("em",{children:"Which GTM Kit settings are active"})})]})]})}),(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto ",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{e("general","analytics_active",!(t&&t.general.analytics_active))}})})}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),o("/automatic-updates",{replace:!0})},disabled:s,children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]})},Tt=(t="general",e="")=>{const i=window.gtmkitSettings.adminPageUrl;return e?`${i}${t}#/${e}`:`${i}${t}`},Lt=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("You are ready to use GTM Kit!","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center",children:(0,l.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center",children:[(0,l.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "]}),(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-max-w-lg gtmkit-mx-auto gtmkit-mb-8",children:[(0,m.jsx)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2",children:(0,l.__)("Getting Started","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("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,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:Tt("templates"),rel:"noreferrer",children:(0,l.__)("Go to GTM Templates","gtm-kit")})]}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("To get the most out of Google Tag Manager with GTM Kit, you should also review the tutorials.","gtm-kit")," ",(0,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:Tt("help","help"),rel:"noreferrer",children:(0,l.__)("Go to Tutorials","gtm-kit")})]})]}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsx)(a.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=Tt("general")},children:(0,l.__)("Go to the dashboard","gtm-kit")})})]}),Et=[{step:1,path:"/welcome",element:"Welcome",title:(0,l.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,l.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,l.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/automatic-updates",element:"Automatic Updates",title:(0,l.__)("Automatic Updates","gtm-kit")},{step:5,path:"/getting-started",element:"GettingStarted",title:(0,l.__)("Getting Started","gtm-kit")}],Dt=({step:t,currentStep:e,totalSteps:i})=>{if(t===i)return;let a="gtmkit-h-0.5 gtmkit-w-full";return a+=t<e?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,m.jsx)("div",{className:a})},It=({step:t,currentStep:e,totalSteps:i})=>t<e||t===i?(0,m.jsx)("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",children:(0,m.jsx)("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===e?(0,m.jsx)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,Ct=({step:t,currentStep:e,totalSteps:i})=>{if(0===t)return;let a="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 a+=t<e||e===i?" gtmkit-bg-color-primary":" gtmkit-bg-white",a+=t>e?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full",children:(0,m.jsx)("span",{className:a,children:(0,m.jsx)(It,{step:t,currentStep:e,totalSteps:i})})}),(0,m.jsx)(Dt,{step:t,currentStep:e,totalSteps:i})]})},Ot=()=>{const t=Et.length-1+Et[0].step;let e=((t,e)=>{const i=Object.keys(e);return t.filter((function(t){for(let a=0;a<i.length;a++)if(!t.hasOwnProperty(i[a])||t[i[a]]!==e[i[a]])return!1;return!0}))})(Et,{path:it().pathname});return e=e.length?e[0].step:0,0===e?(0,m.jsx)("div",{className:"gtmkit-my-16"}):(0,m.jsx)("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",children:Et.map((function(i){return(0,m.jsx)(Ct,{step:i.step,currentStep:e,totalSteps:t},i.step)}))})},Ut=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("header",{className:"gtmkit-text-center gtmkit-px-3",children:(0,m.jsx)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[200px] gtmkit-inline-block",children:(0,m.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,l.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"})})}),(0,m.jsx)(Ot,{})]}),At=()=>(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey",children:(0,m.jsx)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max",children:(0,m.jsx)("a",{className:"gtmkit-underline",href:Tt(),children:(0,l.__)("Go to the dashboard.","gtm-kit")})})})}),Pt=({title:t,label:e,optionGroup:n="general",optionName:s,disabled:r=!1,useSettings:o,useUpdateStateSettings:l,narrow:c=!1,premium:g=!1,useSetNotificationStatus:d,notificationId:u=""})=>{const p=(0,i.useId)(),h="gtmkit-settings-field-wrap "+(c?"gtmkit-py-2":"gtmkit-py-4");return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("div",{className:h,children:(0,m.jsx)(a.BaseControl,{label:g?(0,m.jsxs)(m.Fragment,{children:[t,(0,m.jsx)("span",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-normal gtmkit-rounded-full gtmkit-py-0.5 gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"})]}):t,id:p,children:(0,m.jsx)(a.ToggleControl,{label:e,checked:!r&&o[n][s],onChange:()=>{l(n,s,!(o&&o[n][s])),u&&d(u,"remove")},disabled:r})})})})},zt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s,useSiteData:r}=(0,i.useContext)(g),o=nt();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("Automatic Updates","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("New releases of GTM Kit may contain important updates to comply with changes in Google Tag Manager or analytics in general. We recommend enabling automatic plugin updates for GTM Kit to ensure it is always up to date.","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey",children:(0,l.__)("You can, of course, manually update GTM Kit whenever it suits you, but we highly recommend that you regularly update your plugins and themes to the latest versions to keep your site secure.","gtm-kit")}),(0,m.jsx)("div",{className:"gtmkit-max-w-max gtmkit-mx-auto gtmkit-mt-12",children:(0,m.jsx)(Pt,{title:(0,l.__)("Enable Automatic Updates","gtm-kit"),label:(0,l.__)("Automatically update the GTM Kit plugin when new releases are available.","gtm-kit"),optionGroup:"misc",optionName:"auto_update",useSettings:t,useUpdateStateSettings:e})}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),o("/getting-started",{replace:!0})},disabled:s,children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]})},Rt=()=>{const{useSettings:t}=(0,i.useContext)(g);return Object.keys(t).length?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Ut,{}),(0,m.jsx)("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",children:(0,m.jsxs)(xt,{children:[(0,m.jsx)(ht,{exact:!0,path:"/welcome",element:(0,m.jsx)(_t,{})}),(0,m.jsx)(ht,{exact:!0,path:"/essential-settings",element:(0,m.jsx)(wt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/share-anonymous-data",element:(0,m.jsx)(bt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/automatic-updates",element:(0,m.jsx)(zt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/getting-started",element:(0,m.jsx)(Lt,{})}),(0,m.jsx)(ht,{path:"/",element:(0,m.jsx)(pt,{replace:!0,to:"/welcome"})})]})}),(0,m.jsx)(At,{})]}):(0,m.jsx)(a.Spinner,{className:"gtm-kit-settings-page-loader"})},Gt=()=>(0,m.jsx)(ft,{basename:"/",children:(0,m.jsx)(d,{children:(0,m.jsx)(Rt,{})})});document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,e.createRoot)(t).render((0,m.jsx)(Gt,{}))}))})();
     1(()=>{"use strict";var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var a in i)t.o(i,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:i[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.ReactDOM,i=window.wp.element,a=window.wp.components,n=window.lodash,s=window.wp.apiFetch;var r=t.n(s);r().use(r().createNonceMiddleware(window.gtmkitSettings.nonce)),r().use(r().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,i=null,a=!1)=>{let n={};try{n=await r()({path:t,method:e,...i&&{data:i}})}catch(i){return{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===a?n:!0===n.success?n.data:{}},l=window.wp.i18n,c=(t,e)=>{const i={...t};switch(e.type){case"FETCH_SETTINGS":i.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},i.stateSettings=e.payload.stateSettings,i.siteData=e.payload.siteData,i.notifications=e.payload.notifications,i.installData=e.payload.installData,i.isPending=!1,i.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(i.notice=(0,l.__)("An error occurred.","gtm-kit"),i.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":i.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":i.fetchedSettings=e.payload.fetchedSettings,i.stateSettings=e.payload.stateSettings,i.isPending=!1,i.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,i.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,l.__)("An error occurred.","gtm-kit"):(0,l.__)("Saved Successfully.","gtm-kit"),i.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":i.fetchedSettings=e.payload.fetchedSettings||i.fetchedSettings,i.stateSettings=e.payload.stateSettings||i.stateSettings,i.isPending=e.payload.isPending||i.isPending,i.notice=e.payload.notice||i.notice,i.hasError=e.payload.hasError||i.hasError,i.canSave=e.payload.canSave||i.canSave,i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData,i.supportTicket=e.payload.supportTicket||i.supportTicket,i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey,i.licenseKey=e.payload.licenseKey||i.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData;break;case"SEND_SUPPORT_DATA":i.isSendingSystemData=!1,i.isSystemDataSent=e.payload.isSystemDataSent||i.isSystemDataSent,i.systemDataMessage=e.payload.systemDataMessage||i.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":i.isSendingLicenseKey=!1,i.isLicenseKeySent=e.payload.isLicenseKeySent||i.isLicenseKeySent,i.licenseKeyMessage=e.payload.licenseKeyMessage||i.licenseKeyMessage;break;case"SEND_NOTIFICATION_STATUS_BEFORE":i.isUpdatingNotifications=e.payload.isUpdatingNotifications||i.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":i.isUpdatingNotifications=!1,i.notifications=e.payload.notifications||i.Notifications}return i},m=window.ReactJSXRuntime,g=(0,i.createContext)(),d=t=>{const[e,a]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),s=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},i=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},n="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};a({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:i,installData:n}})},r=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(i=e.stateSettings,o("gtmkit/v1/set-options","POST",i));var i;a({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:r,useUpdateStateSettings:async(t,i,a)=>{const s=JSON.parse(JSON.stringify(e.stateSettings));let o;s[t][i]=a,o=!(0,n.isEqual)(s,e.fetchedSettings),r({stateSettings:s,canSave:o})},useImportSettings:async(t,i)=>{const a=JSON.parse(JSON.stringify(e.stateSettings));let s;const o={};o.general={...a.general,...i.general},"integrations"in i&&(o.integrations={...a.integrations,...i.integrations}),s=!(0,n.isEqual)(o,e.fetchedSettings),r({stateSettings:o,canSave:s})},useUpdateSupportTicket:async t=>{r({supportTicket:t})},useSendSystemData:async()=>{a({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(i=e.supportTicket,o("gtmkit/v1/send-support-data","POST",i,!0));var i;a({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{r({licenseKey:t})},useSendLicenseKey:async()=>{a({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(i=e.licenseKey,o("gtmkit/v1/send-license-key","POST",i,!0));var i;a({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{a({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:"remove"!==e}});const i={"notification-id":t,action:e},n=await(t=>o("gtmkit/v1/set-notification-status","POST",t,!0))(i),s=n.data.metrics.total,r=document.querySelectorAll("li.toplevel_page_gtmkit_general span.menu-counter");r&&r.forEach((t=>{const e=t.querySelector("span.count");e&&(e.textContent=s),t.className=t.className.replace(/count-\d+/,`count-${s}`)})),a({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,notifications:n.data}})},useSettings:e.stateSettings,useIsPending:e.isPending,useNotice:e.notice,useHasError:e.hasError,useCanSave:e.canSave,useSiteData:e.siteData,useInstallData:e.installData,useIsSending:e.isSendingSystemData,useSupportTicket:e.supportTicket,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage,useIsSendingLicenseKey:e.isSendingLicenseKey,useLicenseKey:e.licenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage,useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,m.jsx)(g.Provider,{value:l,children:t.children})},u=window.React;function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},p.apply(this,arguments)}var h;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(h||(h={}));const k="popstate";function x(t,e){if(!1===t||null==t)throw new Error(e)}function y(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function S(t,e){return{usr:t.state,key:t.key,idx:e}}function f(t,e,i,a){return void 0===i&&(i=null),p({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?N(e):e,{state:i,key:e&&e.key||a||Math.random().toString(36).substr(2,8)})}function j(t){let{pathname:e="/",search:i="",hash:a=""}=t;return i&&"?"!==i&&(e+="?"===i.charAt(0)?i:"?"+i),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function N(t){let e={};if(t){let i=t.indexOf("#");i>=0&&(e.hash=t.substr(i),t=t.substr(0,i));let a=t.indexOf("?");a>=0&&(e.search=t.substr(a),t=t.substr(0,a)),t&&(e.pathname=t)}return e}var M;function v(t,e,i){return void 0===i&&(i="/"),function(t,e,i,a){let n=z(("string"==typeof e?N(e):e).pathname||"/",i);if(null==n)return null;let s=_(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,i)=>t===e[i]))?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=P(n);r=U(s[t],e,a)}return r}(t,e,i,!1)}function _(t,e,i,a){void 0===e&&(e=[]),void 0===i&&(i=[]),void 0===a&&(a="");let n=(t,n,s)=>{let r={relativePath:void 0===s?t.path||"":s,caseSensitive:!0===t.caseSensitive,childrenIndex:n,route:t};r.relativePath.startsWith("/")&&(x(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=K([a,r.relativePath]),l=i.concat(r);t.children&&t.children.length>0&&(x(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),_(t.children,e,l,o)),(null!=t.path||t.index)&&e.push({path:o,score:O(o,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var i;if(""!==t.path&&null!=(i=t.path)&&i.includes("?"))for(let i of w(t.path))n(t,e,i);else n(t,e)})),e}function w(t){let e=t.split("/");if(0===e.length)return[];let[i,...a]=e,n=i.endsWith("?"),s=i.replace(/\?$/,"");if(0===a.length)return n?[s,""]:[s];let r=w(a.join("/")),o=[];return o.push(...r.map((t=>""===t?s:[s,t].join("/")))),n&&o.push(...r),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(M||(M={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const b=/^:[\w-]+$/,T=3,L=2,E=1,D=10,I=-2,C=t=>"*"===t;function O(t,e){let i=t.split("/"),a=i.length;return i.some(C)&&(a+=I),e&&(a+=L),i.filter((t=>!C(t))).reduce(((t,e)=>t+(b.test(e)?T:""===e?E:D)),a)}function U(t,e,i){void 0===i&&(i=!1);let{routesMeta:a}=t,n={},s="/",r=[];for(let t=0;t<a.length;++t){let o=a[t],l=t===a.length-1,c="/"===s?e:e.slice(s.length)||"/",m=A({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},c),g=o.route;if(!m&&l&&i&&!a[a.length-1].route.index&&(m=A({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},c)),!m)return null;Object.assign(n,m.params),r.push({params:n,pathname:K([s,m.pathname]),pathnameBase:F(K([s,m.pathnameBase])),route:g}),"/"!==m.pathnameBase&&(s=K([s,m.pathnameBase]))}return r}function A(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[i,a]=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0),y("*"===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=[],n="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,i)=>(a.push({paramName:e,isOptional:null!=i}),i?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(a.push({paramName:"*"}),n+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?n+="\\/*$":""!==t&&"/"!==t&&(n+="(?:(?=\\/|$))"),[new RegExp(n,e?void 0:"i"),a]}(t.path,t.caseSensitive,t.end),n=e.match(i);if(!n)return null;let s=n[0],r=s.replace(/(.)\/+$/,"$1"),o=n.slice(1);return{params:a.reduce(((t,e,i)=>{let{paramName:a,isOptional:n}=e;if("*"===a){let t=o[i]||"";r=s.slice(0,s.length-t.length).replace(/(.)\/+$/,"$1")}const l=o[i];return t[a]=n&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:s,pathnameBase:r,pattern:t}}function P(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return y(!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 i=e.endsWith("/")?e.length-1:e.length,a=t.charAt(i);return a&&"/"!==a?null:t.slice(i)||"/"}function R(t,e,i,a){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(a)+"].  Please separate it out to the `to."+i+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function G(t,e){let i=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?i.map(((t,e)=>e===i.length-1?t.pathname:t.pathnameBase)):i.map((t=>t.pathnameBase))}function B(t,e,i,a){let n;void 0===a&&(a=!1),"string"==typeof t?n=N(t):(n=p({},t),x(!n.pathname||!n.pathname.includes("?"),R("?","pathname","search",n)),x(!n.pathname||!n.pathname.includes("#"),R("#","pathname","hash",n)),x(!n.search||!n.search.includes("#"),R("#","search","hash",n)));let s,r=""===t||""===n.pathname,o=r?"/":n.pathname;if(null==o)s=i;else{let t=e.length-1;if(!a&&o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;n.pathname=e.join("/")}s=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:i,search:a="",hash:n=""}="string"==typeof t?N(t):t,s=i?i.startsWith("/")?i:function(t,e){let i=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?i.length>1&&i.pop():"."!==t&&i.push(t)})),i.length>1?i.join("/"):"/"}(i,e):e;return{pathname:s,search:Y(a),hash:W(n)}}(n,s),c=o&&"/"!==o&&o.endsWith("/"),m=(r||"."===o)&&i.endsWith("/");return l.pathname.endsWith("/")||!c&&!m||(l.pathname+="/"),l}const K=t=>t.join("/").replace(/\/\/+/g,"/"),F=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Y=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",W=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const Q=["post","put","patch","delete"],$=(new Set(Q),["get",...Q]);function H(){return H=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},H.apply(this,arguments)}new Set($),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const J=u.createContext(null),Z=u.createContext(null),V=u.createContext(null),X=u.createContext(null),q=u.createContext({outlet:null,matches:[],isDataRoute:!1}),tt=u.createContext(null);function et(){return null!=u.useContext(X)}function it(){return et()||x(!1),u.useContext(X).location}function at(t){u.useContext(V).static||u.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=u.useContext(q);return t?function(){let{router:t}=function(){let t=u.useContext(J);return t||x(!1),t}(mt.UseNavigateStable),e=dt(gt.UseNavigateStable),i=u.useRef(!1);return at((()=>{i.current=!0})),u.useCallback((function(a,n){void 0===n&&(n={}),i.current&&("number"==typeof a?t.navigate(a):t.navigate(a,H({fromRouteId:e},n)))}),[t,e])}():function(){et()||x(!1);let t=u.useContext(J),{basename:e,future:i,navigator:a}=u.useContext(V),{matches:n}=u.useContext(q),{pathname:s}=it(),r=JSON.stringify(G(n,i.v7_relativeSplatPath)),o=u.useRef(!1);return at((()=>{o.current=!0})),u.useCallback((function(i,n){if(void 0===n&&(n={}),!o.current)return;if("number"==typeof i)return void a.go(i);let l=B(i,JSON.parse(r),s,"path"===n.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:K([e,l.pathname])),(n.replace?a.replace:a.push)(l,n.state,n)}),[e,a,r,s,t])}()}function st(t,e,i,a){et()||x(!1);let{navigator:n}=u.useContext(V),{matches:s}=u.useContext(q),r=s[s.length-1],o=r?r.params:{},l=(r&&r.pathname,r?r.pathnameBase:"/");r&&r.route;let c,m=it();if(e){var g;let t="string"==typeof e?N(e):e;"/"===l||(null==(g=t.pathname)?void 0:g.startsWith(l))||x(!1),c=t}else c=m;let d=c.pathname||"/",p=d;if("/"!==l){let t=l.replace(/^\//,"").split("/");p="/"+d.replace(/^\//,"").split("/").slice(t.length).join("/")}let k=v(t,{pathname:p}),y=function(t,e,i,a){var n;if(void 0===e&&(e=[]),void 0===i&&(i=null),void 0===a&&(a=null),null==t){var s;if(!i)return null;if(i.errors)t=i.matches;else{if(!(null!=(s=a)&&s.v7_partialHydration&&0===e.length&&!i.initialized&&i.matches.length>0))return null;t=i.matches}}let r=t,o=null==(n=i)?void 0:n.errors;if(null!=o){let t=r.findIndex((t=>t.route.id&&void 0!==(null==o?void 0:o[t.route.id])));t>=0||x(!1),r=r.slice(0,Math.min(r.length,t+1))}let l=!1,c=-1;if(i&&a&&a.v7_partialHydration)for(let t=0;t<r.length;t++){let e=r[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:a}=i,n=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||n){l=!0,r=c>=0?r.slice(0,c+1):[r[0]];break}}}return r.reduceRight(((t,a,n)=>{let s,m=!1,g=null,d=null;var p;i&&(s=o&&a.route.id?o[a.route.id]:void 0,g=a.route.errorElement||ot,l&&(c<0&&0===n?(ut[p="route-fallback"]||(ut[p]=!0),m=!0,d=null):c===n&&(m=!0,d=a.route.hydrateFallbackElement||null)));let h=e.concat(r.slice(0,n+1)),k=()=>{let e;return e=s?g:m?d:a.route.Component?u.createElement(a.route.Component,null):a.route.element?a.route.element:t,u.createElement(ct,{match:a,routeContext:{outlet:t,matches:h,isDataRoute:null!=i},children:e})};return i&&(a.route.ErrorBoundary||a.route.errorElement||0===n)?u.createElement(lt,{location:i.location,revalidation:i.revalidation,component:g,error:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},o,t.params),pathname:K([l,n.encodeLocation?n.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:K([l,n.encodeLocation?n.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),s,i,a);return e&&y?u.createElement(X.Provider,{value:{location:H({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:h.Pop}},y):y}function rt(){let t=function(){var t;let e=u.useContext(tt),i=function(){let t=u.useContext(Z);return t||x(!1),t}(gt.UseRouteError),a=dt(gt.UseRouteError);return void 0!==e?e:null==(t=i.errors)?void 0:t[a]}(),e=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),i=t instanceof Error?t.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return u.createElement(u.Fragment,null,u.createElement("h2",null,"Unexpected Application Error!"),u.createElement("h3",{style:{fontStyle:"italic"}},e),i?u.createElement("pre",{style:a},i):null,null)}const ot=u.createElement(rt,null);class lt extends u.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?u.createElement(q.Provider,{value:this.props.routeContext},u.createElement(tt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ct(t){let{routeContext:e,match:i,children:a}=t,n=u.useContext(J);return n&&n.static&&n.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=i.route.id),u.createElement(q.Provider,{value:e},a)}var mt=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(mt||{}),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 dt(t){let e=function(){let t=u.useContext(q);return t||x(!1),t}(),i=e.matches[e.matches.length-1];return i.route.id||x(!1),i.route.id}const ut={};function pt(t){let{to:e,replace:i,state:a,relative:n}=t;et()||x(!1);let{future:s,static:r}=u.useContext(V),{matches:o}=u.useContext(q),{pathname:l}=it(),c=nt(),m=B(e,G(o,s.v7_relativeSplatPath),l,"path"===n),g=JSON.stringify(m);return u.useEffect((()=>c(JSON.parse(g),{replace:i,state:a,relative:n})),[c,g,n,i,a]),null}function ht(t){x(!1)}function kt(t){let{basename:e="/",children:i=null,location:a,navigationType:n=h.Pop,navigator:s,static:r=!1,future:o}=t;et()&&x(!1);let l=e.replace(/^\/*/,"/"),c=u.useMemo((()=>({basename:l,navigator:s,static:r,future:H({v7_relativeSplatPath:!1},o)})),[l,o,s,r]);"string"==typeof a&&(a=N(a));let{pathname:m="/",search:g="",hash:d="",state:p=null,key:k="default"}=a,y=u.useMemo((()=>{let t=z(m,l);return null==t?null:{location:{pathname:t,search:g,hash:d,state:p,key:k},navigationType:n}}),[l,m,g,d,p,k,n]);return null==y?null:u.createElement(V.Provider,{value:c},u.createElement(X.Provider,{children:i,value:y}))}function xt(t){let{children:e,location:i}=t;return st(yt(e),i)}function yt(t,e){void 0===e&&(e=[]);let i=[];return u.Children.forEach(t,((t,a)=>{if(!u.isValidElement(t))return;let n=[...e,a];if(t.type===u.Fragment)return void i.push.apply(i,yt(t.props.children,n));t.type!==ht&&x(!1),t.props.index&&t.props.children&&x(!1);let s={id:t.props.id||n.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=yt(t.props.children,n)),i.push(s)})),i}u.startTransition,new Promise((()=>{})),u.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(t){}new Map;const St=u.startTransition;function ft(t){let{basename:e,children:i,future:a,window:n}=t,s=u.useRef();var r;null==s.current&&(s.current=(void 0===(r={window:n,v5Compat:!0})&&(r={}),function(t,e,i,a){void 0===a&&(a={});let{window:n=document.defaultView,v5Compat:s=!1}=a,r=n.history,o=h.Pop,l=null,c=m();function m(){return(r.state||{idx:null}).idx}function g(){o=h.Pop;let t=m(),e=null==t?null:t-c;c=t,l&&l({action:o,location:u.location,delta:e})}function d(t){let e="null"!==n.location.origin?n.location.origin:n.location.href,i="string"==typeof t?t:j(t);return i=i.replace(/ $/,"%20"),x(e,"No window.location.(origin|href) available to create URL for href: "+i),new URL(i,e)}null==c&&(c=0,r.replaceState(p({},r.state,{idx:c}),""));let u={get action(){return o},get location(){return t(n,r)},listen(t){if(l)throw new Error("A history only accepts one active listener");return n.addEventListener(k,g),l=t,()=>{n.removeEventListener(k,g),l=null}},createHref:t=>e(n,t),createURL:d,encodeLocation(t){let e=d(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=h.Push;let a=f(u.location,t,e);i&&i(a,t),c=m()+1;let g=S(a,c),d=u.createHref(a);try{r.pushState(g,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;n.location.assign(d)}s&&l&&l({action:o,location:u.location,delta:1})},replace:function(t,e){o=h.Replace;let a=f(u.location,t,e);i&&i(a,t),c=m();let n=S(a,c),g=u.createHref(a);r.replaceState(n,"",g),s&&l&&l({action:o,location:u.location,delta:0})},go:t=>r.go(t)};return u}((function(t,e){let{pathname:i="/",search:a="",hash:n=""}=N(t.location.hash.substr(1));return i.startsWith("/")||i.startsWith(".")||(i="/"+i),f("",{pathname:i,search:a,hash:n},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let i=t.document.querySelector("base"),a="";if(i&&i.getAttribute("href")){let e=t.location.href,i=e.indexOf("#");a=-1===i?e:e.slice(0,i)}return a+"#"+("string"==typeof e?e:j(e))}),(function(t,e){y("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),r)));let o=s.current,[l,c]=u.useState({action:o.action,location:o.location}),{v7_startTransition:m}=a||{},g=u.useCallback((t=>{m&&St?St((()=>c(t))):c(t)}),[c,m]);return u.useLayoutEffect((()=>o.listen(g)),[o,g]),u.useEffect((()=>{return null==(t=a)||t.v7_startTransition,void 0===(null==t?void 0:t.v7_relativeSplatPath)&&(!e||e.v7_relativeSplatPath),void(e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation));var t,e}),[a]),u.createElement(kt,{basename:e,children:i,location:l.location,navigationType:l.action,navigator:o,future:a})}var jt,Nt;e.flushSync,u.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"}(jt||(jt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Nt||(Nt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s}=(0,i.useContext)(g),r=nt();return(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-8",children:[(0,m.jsxs)("div",{className:"",children:[(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 ",children:(0,m.jsx)(a.TextControl,{label:(0,l.__)("Container ID","gtm-kit"),placeholder:(0,l.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>e("general","gtm_id",t)})}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),r("/essential-settings",{replace:!0})},disabled:s||!t.general.gtm_id.includes("-"),children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]}),(0,m.jsxs)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-color-grey gtmkit-text-center",children:[(0,m.jsx)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4",children:"Need help?"}),(0,m.jsxs)("p",{className:"gtmkit-mb-6",children:[(0,l.__)("Find your GTM container ID on","gtm-kit"),(0,m.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer",children:"Google Tag Manager"})]}),(0,m.jsxs)("p",{children:[(0,l.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"]})]})]})})},vt=()=>{const{useImportSettings:t,useIsPending:e,useInstallData:n}=(0,i.useContext)(g),[s,r]=(0,i.useState)(!0),o=Object.keys(n.import_data)[0],[c,d]=(0,i.useState)(o),u=[];return Object.keys(n.import_data).forEach((t=>{u.push({value:t,label:n.import_data[t].name})})),s?(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-8 gtmkit-my-8 gtmkit-text-left",children:[(0,m.jsx)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold",children:(0,l.__)("Would you like to import plugin settings?","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey",children:[(0,l.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,l.__)("Would you like to import your settings to GTM Kit?","gtm-kit")]}),(0,m.jsx)(a.RadioControl,{help:(0,l.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:c,options:u,onChange:t=>d(t)}),(0,m.jsxs)("div",{className:"gtmkit-flex gtmkit-mt-12",children:[(0,m.jsxs)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(c,n.import_data[c]),r(!1)},children:[(0,m.jsx)("span",{className:"gtmkit-text-lg gtmkit-font-bold",children:(0,l.__)("Yes","gtm-kit")}),e?(0,m.jsx)(a.Spinner,{}):""]}),(0,m.jsxs)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{r(!1)},children:[(0,m.jsx)("span",{className:"gtmkit-text-lg gtmkit-font-bold",children:(0,l.__)("No","gtm-kit")}),e?(0,m.jsx)(a.Spinner,{}):""]})]})]})}):(0,m.jsx)(Mt,{})},_t=()=>{const{useInstallData:t}=(0,i.useContext)(g),{firstInstall:e}=t,{importAvailable:a}=t;return(0,m.jsxs)("div",{className:"gtmkit-text-center",children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading",children:(0,l.__)("You've successfully installed GTM Kit!","gtm-kit")}),(0,m.jsx)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")})}),e&&a?(0,m.jsx)(vt,{}):(0,m.jsx)(Mt,{})]})},wt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s,useInstallData:r}=(0,i.useContext)(g),o=nt();return(0,m.jsxs)("div",{className:"gtmkit-text-center",children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading",children:(0,l.__)("Essential Settings","gtm-kit")}),(0,m.jsx)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("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,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Page type","gtm-kit"),id:"page-type",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("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:()=>{e("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}})})}),r.woocommerce_integration?(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{e("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}})})}):null,r.cf7_integration?(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{e("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}})})}):null,r.edd_integration?(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{e("integrations","edd_integration",!(t&&t.integrations.edd_integration))}})})}):null,(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),o("/share-anonymous-data",{replace:!0})},disabled:s,children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]})},bt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s,useSiteData:r}=(0,i.useContext)(g),o=nt();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("Help improve GTM Kit","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("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,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey",children:(0,l.__)("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,m.jsx)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm",children:(0,m.jsxs)("tbody",{children:[(0,m.jsxs)("tr",{className:"",children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Server type:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.web_server})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"PHP version number:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.php_version})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"WordPress version number:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.wordpress_version})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"WordPress multisite:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.multisite?(0,l.__)("Yes","gtm-kit"):(0,l.__)("No","gtm-kit")})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Current theme:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.current_theme})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Current site language:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("code",{className:"gtmkit-text-sm",children:r.locale})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Active plugins:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("em",{children:"Plugin names of all active plugins"})})]}),(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("strong",{children:"Anonymized GTM Kit settings:"})}),(0,m.jsx)("td",{className:"gtmkit-px-2 gtmkit-py-1",children:(0,m.jsx)("em",{children:"Which GTM Kit settings are active"})})]})]})}),(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto ",children:(0,m.jsx)(a.BaseControl,{label:(0,l.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data",children:(0,m.jsx)(a.ToggleControl,{label:(0,l.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{e("general","analytics_active",!(t&&t.general.analytics_active))}})})}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),o("/automatic-updates",{replace:!0})},disabled:s,children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]})},Tt=(t="general",e="")=>{const i=window.gtmkitSettings.adminPageUrl;return e?`${i}${t}#/${e}`:`${i}${t}`},Lt=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("You are ready to use GTM Kit!","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center",children:(0,l.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center",children:[(0,l.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "]}),(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-max-w-lg gtmkit-mx-auto gtmkit-mb-8",children:[(0,m.jsx)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2",children:(0,l.__)("Getting Started","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("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,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:Tt("templates"),rel:"noreferrer",children:(0,l.__)("Go to GTM Templates","gtm-kit")})]}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("To get the most out of Google Tag Manager with GTM Kit, you should also review the tutorials.","gtm-kit")," ",(0,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:Tt("help","help"),rel:"noreferrer",children:(0,l.__)("Go to Tutorials","gtm-kit")})]})]}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsx)(a.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=Tt("general")},children:(0,l.__)("Go to the dashboard","gtm-kit")})})]}),Et=[{step:1,path:"/welcome",element:"Welcome",title:(0,l.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,l.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,l.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/automatic-updates",element:"Automatic Updates",title:(0,l.__)("Automatic Updates","gtm-kit")},{step:5,path:"/getting-started",element:"GettingStarted",title:(0,l.__)("Getting Started","gtm-kit")}],Dt=({step:t,currentStep:e,totalSteps:i})=>{if(t===i)return;let a="gtmkit-h-0.5 gtmkit-w-full";return a+=t<e?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,m.jsx)("div",{className:a})},It=({step:t,currentStep:e,totalSteps:i})=>t<e||t===i?(0,m.jsx)("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",children:(0,m.jsx)("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===e?(0,m.jsx)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,Ct=({step:t,currentStep:e,totalSteps:i})=>{if(0===t)return;let a="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 a+=t<e||e===i?" gtmkit-bg-color-primary":" gtmkit-bg-white",a+=t>e?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full",children:(0,m.jsx)("span",{className:a,children:(0,m.jsx)(It,{step:t,currentStep:e,totalSteps:i})})}),(0,m.jsx)(Dt,{step:t,currentStep:e,totalSteps:i})]})},Ot=()=>{const t=Et.length-1+Et[0].step;let e=((t,e)=>{const i=Object.keys(e);return t.filter((function(t){for(let a=0;a<i.length;a++)if(!t.hasOwnProperty(i[a])||t[i[a]]!==e[i[a]])return!1;return!0}))})(Et,{path:it().pathname});return e=e.length?e[0].step:0,0===e?(0,m.jsx)("div",{className:"gtmkit-my-16"}):(0,m.jsx)("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",children:Et.map((function(i){return(0,m.jsx)(Ct,{step:i.step,currentStep:e,totalSteps:t},i.step)}))})},Ut=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("header",{className:"gtmkit-text-center gtmkit-px-3",children:(0,m.jsx)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[200px] gtmkit-inline-block",children:(0,m.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,l.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"})})}),(0,m.jsx)(Ot,{})]}),At=()=>(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey",children:(0,m.jsx)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max",children:(0,m.jsx)("a",{className:"gtmkit-underline",href:Tt(),children:(0,l.__)("Go to the dashboard.","gtm-kit")})})})}),Pt=({title:t,label:e,optionGroup:n="general",optionName:s,disabled:r=!1,useSettings:o,useUpdateStateSettings:l,narrow:c=!1,premium:g=!1,useSetNotificationStatus:d,notificationId:u=""})=>{const p=(0,i.useId)(),h="gtmkit-settings-field-wrap "+(c?"gtmkit-py-2":"gtmkit-py-4");return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("div",{className:h,children:(0,m.jsx)(a.BaseControl,{label:g?(0,m.jsxs)(m.Fragment,{children:[t,(0,m.jsx)("span",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-normal gtmkit-rounded-full gtmkit-py-0.5 gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"})]}):t,id:p,children:(0,m.jsx)(a.ToggleControl,{label:e,checked:!r&&o[n][s],onChange:()=>{l(n,s,!(o&&o[n][s])),u&&d(u,"remove")},disabled:r})})})})},zt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:n,useIsPending:s,useSiteData:r}=(0,i.useContext)(g),o=nt();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("Automatic Updates","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey",children:(0,l.__)("New releases of GTM Kit may contain important updates to comply with changes in Google Tag Manager or analytics in general. We recommend enabling automatic plugin updates for GTM Kit to ensure it is always up to date.","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey",children:(0,l.__)("You can, of course, manually update GTM Kit whenever it suits you, but we highly recommend that you regularly update your plugins and themes to the latest versions to keep your site secure.","gtm-kit")}),(0,m.jsx)("div",{className:"gtmkit-max-w-max gtmkit-mx-auto gtmkit-mt-12",children:(0,m.jsx)(Pt,{title:(0,l.__)("Enable Automatic Updates","gtm-kit"),label:(0,l.__)("Automatically update the GTM Kit plugin when new releases are available.","gtm-kit"),optionGroup:"misc",optionName:"auto_update",useSettings:t,useUpdateStateSettings:e})}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(a.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:()=>{n(),o("/getting-started",{replace:!0})},disabled:s,children:[(0,l.__)("Save and continue","gtm-kit"),s?(0,m.jsx)(a.Spinner,{}):""]})})]})},Rt=()=>{const{useSettings:t}=(0,i.useContext)(g);return Object.keys(t).length?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Ut,{}),(0,m.jsx)("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",children:(0,m.jsxs)(xt,{children:[(0,m.jsx)(ht,{exact:!0,path:"/welcome",element:(0,m.jsx)(_t,{})}),(0,m.jsx)(ht,{exact:!0,path:"/essential-settings",element:(0,m.jsx)(wt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/share-anonymous-data",element:(0,m.jsx)(bt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/automatic-updates",element:(0,m.jsx)(zt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/getting-started",element:(0,m.jsx)(Lt,{})}),(0,m.jsx)(ht,{path:"/",element:(0,m.jsx)(pt,{replace:!0,to:"/welcome"})})]})}),(0,m.jsx)(At,{})]}):(0,m.jsx)(a.Spinner,{className:"gtm-kit-settings-page-loader"})},Gt=()=>(0,m.jsx)(ft,{basename:"/",children:(0,m.jsx)(d,{children:(0,m.jsx)(Rt,{})})});document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,e.createRoot)(t).render((0,m.jsx)(Gt,{}))}))})();
  • gtm-kit/trunk/changelog.txt

    r3348467 r3366939  
    11*** GTM Kit ***
    22
    3 2025-08-2 - version 2.5.1
     32025-09-24 - version 2.6.0
     4* Add: Add tracking on the product collection block.
     5* Changed: Require WooCommerce 9.2.
     6* Dev: Tested up to WooCommerce 10.2.
     7
     82025-08-22 - version 2.5.1
    49* Fix: Force rounding values to 2 decimal places to fix rounding issues in edge cases.
    510* Fix: In some cases the GTM container would not load after activating and deactivating settings in 'Server-side Tagging (sGTM)'.
  • gtm-kit/trunk/gtm-kit.php

    r3348467 r3366939  
    44 *
    55 * Plugin Name: GTM Kit
    6  * Version:     2.5.1
     6 * Version:     2.6.0
    77 * Plugin URI:  https://gtmkit.com/
    88 * Description: Google Tag Manager implementation focusing on flexibility and pagespeed.
     
    1515 * Requires PHP: 7.4
    1616 *
    17  * WC requires at least: 9.0
    18  * WC tested up to: 10.1
     17 * WC requires at least: 9.2
     18 * WC tested up to: 10.2
    1919 *
    2020 * @package GTM Kit
    21  * @copyright Copyright (C) 2021-2024, GTM Kit ApS
     21 * @copyright Copyright (C) 2021-2025, GTM Kit ApS
    2222 */
    2323
     
    2828}
    2929
    30 const GTMKIT_VERSION = '2.5.1';
     30const GTMKIT_VERSION = '2.6.0';
    3131
    3232if ( ! defined( 'GTMKIT_FILE' ) ) {
  • gtm-kit/trunk/inc/main.php

    r3230253 r3366939  
    211211    );
    212212
     213    add_action( 'init', 'TLA_Media\GTM_Kit\gtmkit_load_text_domain' );
    213214    if ( is_admin() ) {
    214         add_action( 'plugins_loaded', 'TLA_Media\GTM_Kit\gtmkit_load_text_domain' );
    215215        add_action( 'plugins_loaded', 'TLA_Media\GTM_Kit\gtmkit_admin_init' );
    216216    } elseif ( ! wp_doing_ajax() ) {
  • gtm-kit/trunk/languages/gtm-kit.pot

    r3348467 r3366939  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: GTM Kit 2.5.1\n"
     5"Project-Id-Version: GTM Kit 2.6.0\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: 2025-08-21T14:07:08+00:00\n"
     12"POT-Creation-Date: 2025-09-23T19:56:10+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.9.0\n"
  • gtm-kit/trunk/readme.txt

    r3348467 r3366939  
    44Tags: google tag manager, gtm, woocommerce, analytics, ga4
    55Tested up to: 6.8
    6 Stable tag: 2.5.1
     6Stable tag: 2.6.0
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    9797== Changelog ==
    9898
     99= 2.6.0 =
     100
     101Release date: 2025-09-24
     102
     103#### Enhancements:
     104* Add tracking on the product collection block.
     105
     106#### Other:
     107* Tested up to WooCommerce 10.2.
     108* Require WooCommerce 9.2.
     109
    99110= 2.5.1 =
    100111
  • gtm-kit/trunk/src/Integration/WooCommerce.php

    r3348467 r3366939  
    215215                $this->util->enqueue_script( 'gtmkit-woocommerce-checkout', 'integration/woocommerce-checkout.js', false, [ 'gtmkit-woocommerce' ] );
    216216            }
    217         } elseif ( has_block( 'woocommerce/all-products' ) ) {
     217        } elseif ( has_block( 'woocommerce/all-products' ) || has_block( 'woocommerce/product-collection' ) ) {
    218218
    219219            $this->util->enqueue_script( 'gtmkit-woocommerce-blocks', 'frontend/woocommerce-blocks.js', true );
  • gtm-kit/trunk/vendor/composer/installed.php

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