/home/bonphmya/liebeszauber-magie.de/wp-content/plugins/gtm-kit/assets/admin/wizard.js
(()=>{var t,e,i={5588:(t,e,i)=>{"use strict";function a(){return a=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},a.apply(this,arguments)}var r;i.d(e,{Gh:()=>C,HS:()=>_,Oi:()=>o,Rr:()=>m,TM:()=>s,pX:()=>B,pb:()=>T,rc:()=>r,tH:()=>U,ue:()=>h,yD:()=>A}),function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(r||(r={}));const n="popstate";function s(t){return void 0===t&&(t={}),function(t,e,i,s){void 0===s&&(s={});let{window:l=document.defaultView,v5Compat:m=!1}=s,g=l.history,h=r.Pop,p=null,y=f();function f(){return(g.state||{idx:null}).idx}function k(){h=r.Pop;let t=f(),e=null==t?null:t-y;y=t,p&&p({action:h,location:x.location,delta:e})}function v(t){let e="null"!==l.location.origin?l.location.origin:l.location.href,i="string"==typeof t?t:d(t);return i=i.replace(/ $/,"%20"),o(e,"No window.location.(origin|href) available to create URL for href: "+i),new URL(i,e)}null==y&&(y=0,g.replaceState(a({},g.state,{idx:y}),""));let x={get action(){return h},get location(){return t(l,g)},listen(t){if(p)throw new Error("A history only accepts one active listener");return l.addEventListener(n,k),p=t,()=>{l.removeEventListener(n,k),p=null}},createHref:t=>e(l,t),createURL:v,encodeLocation(t){let e=v(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){h=r.Push;let a=u(x.location,t,e);i&&i(a,t),y=f()+1;let n=c(a,y),s=x.createHref(a);try{g.pushState(n,"",s)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;l.location.assign(s)}m&&p&&p({action:h,location:x.location,delta:1})},replace:function(t,e){h=r.Replace;let a=u(x.location,t,e);i&&i(a,t),y=f();let n=c(a,y),s=x.createHref(a);g.replaceState(n,"",s),m&&p&&p({action:h,location:x.location,delta:0})},go:t=>g.go(t)};return x}((function(t,e){let{pathname:i="/",search:a="",hash:r=""}=m(t.location.hash.substr(1));return i.startsWith("/")||i.startsWith(".")||(i="/"+i),u("",{pathname:i,search:a,hash:r},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:d(e))}),(function(t,e){l("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}function o(t,e){if(!1===t||null==t)throw new Error(e)}function l(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function c(t,e){return{usr:t.state,key:t.key,idx:e}}function u(t,e,i,r){return void 0===i&&(i=null),a({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?m(e):e,{state:i,key:e&&e.key||r||Math.random().toString(36).substr(2,8)})}function d(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 m(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 g;function h(t,e,i){return void 0===i&&(i="/"),function(t,e,i,a){let r=T(("string"==typeof e?m(e):e).pathname||"/",i);if(null==r)return null;let n=p(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)))))}(n);let s=null;for(let t=0;null==s&&t<n.length;++t){let e=L(r);s=w(n[t],e,a)}return s}(t,e,i,!1)}function p(t,e,i,a){void 0===e&&(e=[]),void 0===i&&(i=[]),void 0===a&&(a="");let r=(t,r,n)=>{let s={relativePath:void 0===n?t.path||"":n,caseSensitive:!0===t.caseSensitive,childrenIndex:r,route:t};s.relativePath.startsWith("/")&&(o(s.relativePath.startsWith(a),'Absolute route path "'+s.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(a.length));let l=_([a,s.relativePath]),c=i.concat(s);t.children&&t.children.length>0&&(o(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),p(t.children,e,c,l)),(null!=t.path||t.index)&&e.push({path:l,score:N(l,t.index),routesMeta:c})};return t.forEach(((t,e)=>{var i;if(""!==t.path&&null!=(i=t.path)&&i.includes("?"))for(let i of y(t.path))r(t,e,i);else r(t,e)})),e}function y(t){let e=t.split("/");if(0===e.length)return[];let[i,...a]=e,r=i.endsWith("?"),n=i.replace(/\?$/,"");if(0===a.length)return r?[n,""]:[n];let s=y(a.join("/")),o=[];return o.push(...s.map((t=>""===t?n:[n,t].join("/")))),r&&o.push(...s),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(g||(g={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const f=/^:[\w-]+$/,k=3,v=2,x=1,S=10,j=-2,M=t=>"*"===t;function N(t,e){let i=t.split("/"),a=i.length;return i.some(M)&&(a+=j),e&&(a+=v),i.filter((t=>!M(t))).reduce(((t,e)=>t+(f.test(e)?k:""===e?x:S)),a)}function w(t,e,i){void 0===i&&(i=!1);let{routesMeta:a}=t,r={},n="/",s=[];for(let t=0;t<a.length;++t){let o=a[t],l=t===a.length-1,c="/"===n?e:e.slice(n.length)||"/",u=b({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},c),d=o.route;if(!u&&l&&i&&!a[a.length-1].route.index&&(u=b({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},c)),!u)return null;Object.assign(r,u.params),s.push({params:r,pathname:_([n,u.pathname]),pathnameBase:P(_([n,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(n=_([n,u.pathnameBase]))}return s}function b(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),l("*"===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=[],r="^"+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:"*"}),r+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?r+="\\/*$":""!==t&&"/"!==t&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),a]}(t.path,t.caseSensitive,t.end),r=e.match(i);if(!r)return null;let n=r[0],s=n.replace(/(.)\/+$/,"$1"),o=r.slice(1);return{params:a.reduce(((t,e,i)=>{let{paramName:a,isOptional:r}=e;if("*"===a){let t=o[i]||"";s=n.slice(0,n.length-t.length).replace(/(.)\/+$/,"$1")}const l=o[i];return t[a]=r&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:n,pathnameBase:s,pattern:t}}function L(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return l(!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 T(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)||"/"}const E=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,I=t=>E.test(t);function D(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("/"):"/"}function O(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 A(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 C(t,e,i,r){let n;void 0===r&&(r=!1),"string"==typeof t?n=m(t):(n=a({},t),o(!n.pathname||!n.pathname.includes("?"),O("?","pathname","search",n)),o(!n.pathname||!n.pathname.includes("#"),O("#","pathname","hash",n)),o(!n.search||!n.search.includes("#"),O("#","search","hash",n)));let s,c=""===t||""===n.pathname,u=c?"/":n.pathname;if(null==u)s=i;else{let t=e.length-1;if(!r&&u.startsWith("..")){let e=u.split("/");for(;".."===e[0];)e.shift(),t-=1;n.pathname=e.join("/")}s=t>=0?e[t]:"/"}let d=function(t,e){void 0===e&&(e="/");let i,{pathname:a,search:r="",hash:n=""}="string"==typeof t?m(t):t;if(a)if(I(a))i=a;else{if(a.includes("//")){let t=a;a=a.replace(/\/\/+/g,"/"),l(!1,"Pathnames cannot have embedded double slashes - normalizing "+t+" -> "+a)}i=a.startsWith("/")?D(a.substring(1),"/"):D(a,e)}else i=e;return{pathname:i,search:z(r),hash:R(n)}}(n,s),g=u&&"/"!==u&&u.endsWith("/"),h=(c||"."===u)&&i.endsWith("/");return d.pathname.endsWith("/")||!g&&!h||(d.pathname+="/"),d}const _=t=>t.join("/").replace(/\/\/+/g,"/"),P=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),z=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",R=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";class U extends Error{}function B(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}const F=["post","put","patch","delete"],K=(new Set(F),["get",...F]);new Set(K),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred")},7449:(t,e,i)=>{"use strict";i.d(e,{a:()=>r});var a=i(8621);const r=(t="general",e="")=>{const i=a.A.getAdminPageUrl();return e?`${i}${t}#/${e}`:`${i}${t}`}},4085:(t,e,i)=>{"use strict";i.d(e,{yD:()=>m,Hz:()=>d,wi:()=>g,yZ:()=>u,Xx:()=>c});const a=window.wp.apiFetch;var r=i.n(a),n=i(8621),s=i(6555),o=i(4882);r().use(r().createNonceMiddleware(n.A.getNonce())),r().use(r().createRootURLMiddleware(n.A.getRestRoot()));const l=async(t,e,i=null,a=!1)=>{try{const n=await r()({path:t,method:e,...i&&{data:i}});if(!0===a)return n;if(!0===n.success)return n.data;throw new s.LG(n.message||"API request failed",n)}catch(a){if((0,o.vV)(a,{path:t,method:e,data:i}),a.message?.includes("NetworkError")||a.message?.includes("Failed to fetch"))throw new s.Dr(`Network error while calling ${t}`);if("rest_invalid_param"===a.code||400===a.data?.status)throw new s.yI(a.message||"Validation failed",a.data?.params);if(a instanceof s.LG||a instanceof s.Dr||a instanceof s.yI)throw a;throw new s.LG(a.message||`API request failed: ${t}`,a)}},c=t=>l("gtmkit/v1/set-options","POST",t),u=t=>l("gtmkit/v1/send-support-data","POST",t,!0),d=t=>l("gtmkit/v1/send-license-key","POST",t,!0),m=()=>l("gtmkit/v1/deactivate-license","POST",null,!0),g=t=>l("gtmkit/v1/set-notification-status","POST",t,!0)},9257:(t,e,i)=>{"use strict";i.d(e,{$E:()=>u,Ab:()=>l,E5:()=>n,FI:()=>a,I_:()=>s,Ls:()=>h,YU:()=>m,a1:()=>g,cT:()=>d,ev:()=>o,tx:()=>c,wO:()=>r});const a="FETCH_SETTINGS",r="UPDATE_SETTINGS_BEFORE",n="UPDATE_SETTINGS",s="UPDATE_STATE",o="SEND_SUPPORT_DATA_BEFORE",l="SEND_SUPPORT_DATA",c="SEND_LICENSE_KEY_BEFORE",u="SEND_LICENSE_KEY",d="SEND_NOTIFICATION_STATUS_BEFORE",m="SEND_NOTIFICATION_STATUS",g="OPTIMISTIC_NOTIFICATION_UPDATE",h="NOTIFICATION_UPDATE_ROLLBACK"},282:(t,e,i)=>{"use strict";i.d(e,{V2:()=>l,ph:()=>d});var a=i(6087),r=i(4085),n=i(8621),s=i(9257);var o=i(790);const l=(0,a.createContext)(),c={notifications:{metrics:{total:0,problem:0}},isUpdatingNotifications:!1,previousNotifications:null},u=(t,e)=>{const i={...t};switch(e.type){case s.FI:i.notifications=e.payload.notifications;break;case s.cT:i.isUpdatingNotifications=!0;break;case s.YU:i.isUpdatingNotifications=!1,i.notifications=e.payload.notifications||t.notifications,i.previousNotifications=null;break;case s.a1:i.previousNotifications=t.notifications,i.notifications=e.payload.notifications;break;case s.Ls:i.notifications=t.previousNotifications||t.notifications,i.previousNotifications=null,i.isUpdatingNotifications=!1;break;default:return t}return i},d=({children:t})=>{const[e,i]=(0,a.useReducer)(u,c);(0,a.useEffect)((()=>{(()=>{const t=n.A.getNotifications();i({type:s.FI,payload:{notifications:t}})})()}),[]),(0,a.useEffect)((()=>{void 0!==e.notifications?.metrics?.total&&(t=>{if("undefined"==typeof document)return;const e=document.querySelectorAll("li.toplevel_page_gtmkit_general span.menu-counter");e&&0!==e.length&&e.forEach((e=>{const i=e.querySelector("span.count");i&&(i.textContent=t),e.className=e.className.replace(/count-\d+/,`count-${t}`)}))})(e.notifications.metrics.total)}),[e.notifications?.metrics?.total]);const d={notifications:e.notifications,isUpdatingNotifications:e.isUpdatingNotifications,setNotificationStatus:async(t,a)=>{const n=((t,e,i)=>{const a=JSON.parse(JSON.stringify(t));let r=null,n=null;for(const t in a)if("metrics"!==t&&a[t].active?.[e]){r=t,n=a[t].active[e];break}return r&&n?("dismiss"===i?(delete a[r].active[e],a[r].dismissed[e]=n,a.metrics?.total&&(a.metrics.total=Math.max(0,a.metrics.total-1))):"remove"===i&&delete a[r].dismissed[e],a):a})(e.notifications,t,a);i({type:s.a1,payload:{notifications:n}}),i({type:s.cT});try{const e={"notification-id":t,action:a},n=await(0,r.wi)(e);i({type:s.YU,payload:{notifications:n.data}})}catch(t){i({type:s.Ls})}},useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications};return(0,o.jsx)(l.Provider,{value:d,children:t})}},3951:(t,e,i)=>{"use strict";i.d(e,{ph:()=>d,xi:()=>p});var a=i(6087),r=i(7723);const n=window.lodash;var s=i(4085),o=i(8621),l=i(9257),c=i(4882),u=i(790);const d=(0,a.createContext)(),m={fetchedSettings:{},stateSettings:{},isPending:!0,canSave:!1,notice:"",hasError:!1},g=t=>({...t,general:t.general||{},integrations:t.integrations||{},premium:t.premium||{}}),h=(t,e)=>{const i={...t};switch(e.type){case l.FI:i.fetchedSettings=g(e.payload.fetchedSettings),i.stateSettings=g(e.payload.stateSettings),i.isPending=!1,i.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(i.notice="An error occurred.",i.hasError=!0);break;case l.wO:i.isPending=!0,i.notice="";break;case l.E5:i.fetchedSettings=g(e.payload.fetchedSettings),i.stateSettings=g(e.payload.stateSettings),i.isPending=!1,i.canSave=!1,i.notice=(0,r.__)("Settings saved successfully.","gtm-kit"),i.hasError=!1;break;case l.I_:void 0!==e.payload.fetchedSettings&&(i.fetchedSettings=e.payload.fetchedSettings),void 0!==e.payload.stateSettings&&(i.stateSettings=e.payload.stateSettings),void 0!==e.payload.canSave&&(i.canSave=e.payload.canSave),void 0!==e.payload.notice&&(i.notice=e.payload.notice),void 0!==e.payload.hasError&&(i.hasError=e.payload.hasError);break;default:return t}return i},p=({children:t})=>{const[e,i]=(0,a.useReducer)(h,m),r=()=>{const t=o.A.getSettings();i({type:l.FI,payload:{fetchedSettings:t,stateSettings:t}})};(0,a.useEffect)((()=>{r()}),[]);const g={settings:e.stateSettings,fetchedSettings:e.fetchedSettings,isPending:e.isPending,canSave:e.canSave,notice:e.notice,hasError:e.hasError,updateSettings:async()=>{i({type:l.wO});try{const t=await(0,s.Xx)(e.stateSettings);i({type:l.E5,payload:{fetchedSettings:t,stateSettings:t}})}catch(t){const e=(0,c.Qk)(t);i({type:l.I_,payload:{isPending:!1,hasError:!0,notice:e}})}},updateStateSettings:(t,a,r)=>{const s={...e.stateSettings,[t]:{...e.stateSettings[t]||{},[a]:r}},o=!(0,n.isEqual)(s,e.fetchedSettings);i({type:l.I_,payload:{stateSettings:s,canSave:o}})},importSettings:t=>{const a={...e.stateSettings,general:{...e.stateSettings.general||{},...t.general||{}}};"integrations"in t&&(a.integrations={...e.stateSettings.integrations||{},...t.integrations||{}});const r=!(0,n.isEqual)(a,e.fetchedSettings);i({type:l.I_,payload:{stateSettings:a,canSave:r}})},fetchSettings:r,useSettings:e.stateSettings};return(0,u.jsx)(d.Provider,{value:g,children:t})}},9730:(t,e,i)=>{"use strict";i.d(e,{hh:()=>o,p6:()=>s});var a=i(6087),r=i(8621),n=i(790);const s=(0,a.createContext)(),o=({children:t})=>{const e={siteData:r.A.getSiteData(),installData:"wizard"===r.A.getCurrentPage()?r.A.getInstallData():{},userRoles:r.A.getUserRoles(),useSiteData:r.A.getSiteData(),useInstallData:"wizard"===r.A.getCurrentPage()?r.A.getInstallData():{},useUserRoles:r.A.getUserRoles()};return(0,n.jsx)(s.Provider,{value:e,children:t})}},8621:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});const a=new class{constructor(){this.data=window.gtmkitSettings||{}}getSettings(){return this.data.settings||{}}getSiteData(){return this.data.site_data||{}}getInstallData(){return this.data.install_data||{}}getNotifications(){return this.data.notifications||{metrics:{total:0,problem:0}}}getCurrentPage(){return this.data.currentPage||""}isPremium(){return Boolean(this.data.isPremium)}hasValidLicense(){return Boolean(this.data.hasValidLicense)}getUserRoles(){return this.data.user_roles||[]}getPlugins(){return this.data.plugins||{}}isPluginActive(t){return Boolean(this.data.plugins?.[t])}getTaxonomyOptions(){return this.data.taxonomyOptions||[]}getTemplates(){return this.data.templates||{}}getRestRoot(){return this.data.root||""}getNonce(){return this.data.nonce||""}getRootId(){return this.data.rootId||"gtmkit-settings"}getAdminPageUrl(){return this.data.adminPageUrl||""}getPluginUrl(){return this.data.pluginUrl||""}getOpportunities(){return this.data.opportunities||[]}getPluginInstallUrl(){return this.data.pluginInstallUrl||""}getCurrentPageAlias(){return this.data.current_page||""}getPageOptions(){return this.data.pageOptions||[]}getTutorials(){return this.data.tutorials||[]}getGeneratorUrl(){return this.data.generatorUrl||""}getRaw(t){return this.data[t]}}},4882:(t,e,i)=>{"use strict";i.d(e,{Qk:()=>n,vV:()=>s});var a=i(7723),r=i(6555);const n=t=>t instanceof r.yI?t.message:t instanceof r.gG?(0,a.__)("License validation failed. Please check your license key.","gtm-kit"):t instanceof r.Dr?(0,a.__)("Network error. Please check your connection and try again.","gtm-kit"):t instanceof r.LG?(0,a.__)("Server error. Please try again later.","gtm-kit"):(0,a.__)("An unexpected error occurred. Please try again.","gtm-kit"),s=(t,e={})=>{}},6555:(t,e,i)=>{"use strict";i.d(e,{Dr:()=>o,LG:()=>r,gG:()=>s,yI:()=>n});class a extends Error{constructor(t,e="GTMKIT_ERROR"){super(t),this.name="GTMKitError",this.code=e,Error.captureStackTrace&&Error.captureStackTrace(this,a)}}class r extends a{constructor(t,e=null){super(t,"API_ERROR"),this.name="APIError",this.response=e,Error.captureStackTrace&&Error.captureStackTrace(this,r)}}class n extends a{constructor(t,e=null){super(t,"VALIDATION_ERROR"),this.name="ValidationError",this.field=e,Error.captureStackTrace&&Error.captureStackTrace(this,n)}}class s extends a{constructor(t){super(t,"LICENSE_ERROR"),this.name="LicenseError",Error.captureStackTrace&&Error.captureStackTrace(this,s)}}class o extends a{constructor(t){super(t,"NETWORK_ERROR"),this.name="NetworkError",Error.captureStackTrace&&Error.captureStackTrace(this,o)}}},7767:(t,e,i)=>{"use strict";i.d(e,{BV:()=>I,C5:()=>L,Ix:()=>E,V8:()=>b,Zp:()=>p,qh:()=>T,zy:()=>g});var a=i(1609),r=i(5588);function n(){return n=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},n.apply(this,arguments)}const s=a.createContext(null),o=a.createContext(null),l=a.createContext(null),c=a.createContext(null),u=a.createContext({outlet:null,matches:[],isDataRoute:!1}),d=a.createContext(null);function m(){return null!=a.useContext(c)}function g(){return m()||(0,r.Oi)(!1),a.useContext(c).location}function h(t){a.useContext(l).static||a.useLayoutEffect(t)}function p(){let{isDataRoute:t}=a.useContext(u);return t?function(){let{router:t}=function(){let t=a.useContext(s);return t||(0,r.Oi)(!1),t}(S.UseNavigateStable),e=M(j.UseNavigateStable),i=a.useRef(!1);return h((()=>{i.current=!0})),a.useCallback((function(a,r){void 0===r&&(r={}),i.current&&("number"==typeof a?t.navigate(a):t.navigate(a,n({fromRouteId:e},r)))}),[t,e])}():function(){m()||(0,r.Oi)(!1);let t=a.useContext(s),{basename:e,future:i,navigator:n}=a.useContext(l),{matches:o}=a.useContext(u),{pathname:c}=g(),d=JSON.stringify((0,r.yD)(o,i.v7_relativeSplatPath)),p=a.useRef(!1);return h((()=>{p.current=!0})),a.useCallback((function(i,a){if(void 0===a&&(a={}),!p.current)return;if("number"==typeof i)return void n.go(i);let s=(0,r.Gh)(i,JSON.parse(d),c,"path"===a.relative);null==t&&"/"!==e&&(s.pathname="/"===s.pathname?e:(0,r.HS)([e,s.pathname])),(a.replace?n.replace:n.push)(s,a.state,a)}),[e,n,d,c,t])}()}function y(t,e,i,s){m()||(0,r.Oi)(!1);let{navigator:o}=a.useContext(l),{matches:d}=a.useContext(u),h=d[d.length-1],p=h?h.params:{},y=(h&&h.pathname,h?h.pathnameBase:"/");h&&h.route;let f,S=g();if(e){var j;let t="string"==typeof e?(0,r.Rr)(e):e;"/"===y||(null==(j=t.pathname)?void 0:j.startsWith(y))||(0,r.Oi)(!1),f=t}else f=S;let M=f.pathname||"/",w=M;if("/"!==y){let t=y.replace(/^\//,"").split("/");w="/"+M.replace(/^\//,"").split("/").slice(t.length).join("/")}let b=(0,r.ue)(t,{pathname:w}),L=function(t,e,i,n){var s;if(void 0===e&&(e=[]),void 0===i&&(i=null),void 0===n&&(n=null),null==t){var o;if(!i)return null;if(i.errors)t=i.matches;else{if(!(null!=(o=n)&&o.v7_partialHydration&&0===e.length&&!i.initialized&&i.matches.length>0))return null;t=i.matches}}let l=t,c=null==(s=i)?void 0:s.errors;if(null!=c){let t=l.findIndex((t=>t.route.id&&void 0!==(null==c?void 0:c[t.route.id])));t>=0||(0,r.Oi)(!1),l=l.slice(0,Math.min(l.length,t+1))}let u=!1,d=-1;if(i&&n&&n.v7_partialHydration)for(let t=0;t<l.length;t++){let e=l[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(d=t),e.route.id){let{loaderData:t,errors:a}=i,r=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||r){u=!0,l=d>=0?l.slice(0,d+1):[l[0]];break}}}return l.reduceRight(((t,r,n)=>{let s,o=!1,m=null,g=null;var h;i&&(s=c&&r.route.id?c[r.route.id]:void 0,m=r.route.errorElement||k,u&&(d<0&&0===n?(N[h="route-fallback"]||(N[h]=!0),o=!0,g=null):d===n&&(o=!0,g=r.route.hydrateFallbackElement||null)));let p=e.concat(l.slice(0,n+1)),y=()=>{let e;return e=s?m:o?g:r.route.Component?a.createElement(r.route.Component,null):r.route.element?r.route.element:t,a.createElement(x,{match:r,routeContext:{outlet:t,matches:p,isDataRoute:null!=i},children:e})};return i&&(r.route.ErrorBoundary||r.route.errorElement||0===n)?a.createElement(v,{location:i.location,revalidation:i.revalidation,component:m,error:s,children:y(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):y()}),null)}(b&&b.map((t=>Object.assign({},t,{params:Object.assign({},p,t.params),pathname:(0,r.HS)([y,o.encodeLocation?o.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?y:(0,r.HS)([y,o.encodeLocation?o.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),d,i,s);return e&&L?a.createElement(c.Provider,{value:{location:n({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:r.rc.Pop}},L):L}function f(){let t=function(){var t;let e=a.useContext(d),i=function(){let t=a.useContext(o);return t||(0,r.Oi)(!1),t}(j.UseRouteError),n=M(j.UseRouteError);return void 0!==e?e:null==(t=i.errors)?void 0:t[n]}(),e=(0,r.pX)(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 a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},e),i?a.createElement("pre",{style:n},i):null,null)}const k=a.createElement(f,null);class v extends a.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?a.createElement(u.Provider,{value:this.props.routeContext},a.createElement(d.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function x(t){let{routeContext:e,match:i,children:r}=t,n=a.useContext(s);return n&&n.static&&n.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=i.route.id),a.createElement(u.Provider,{value:e},r)}var S=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(S||{}),j=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}(j||{});function M(t){let e=function(){let t=a.useContext(u);return t||(0,r.Oi)(!1),t}(),i=e.matches[e.matches.length-1];return i.route.id||(0,r.Oi)(!1),i.route.id}const N={},w=(t,e,i)=>{};function b(t,e){void 0===(null==t?void 0:t.v7_startTransition)&&w("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),void 0!==(null==t?void 0:t.v7_relativeSplatPath)||e&&void 0!==e.v7_relativeSplatPath||w("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),e&&(void 0===e.v7_fetcherPersist&&w("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),void 0===e.v7_normalizeFormMethod&&w("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),void 0===e.v7_partialHydration&&w("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),void 0===e.v7_skipActionErrorRevalidation&&w("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function L(t){let{to:e,replace:i,state:n,relative:s}=t;m()||(0,r.Oi)(!1);let{future:o,static:c}=a.useContext(l),{matches:d}=a.useContext(u),{pathname:h}=g(),y=p(),f=(0,r.Gh)(e,(0,r.yD)(d,o.v7_relativeSplatPath),h,"path"===s),k=JSON.stringify(f);return a.useEffect((()=>y(JSON.parse(k),{replace:i,state:n,relative:s})),[y,k,s,i,n]),null}function T(t){(0,r.Oi)(!1)}function E(t){let{basename:e="/",children:i=null,location:s,navigationType:o=r.rc.Pop,navigator:u,static:d=!1,future:g}=t;m()&&(0,r.Oi)(!1);let h=e.replace(/^\/*/,"/"),p=a.useMemo((()=>({basename:h,navigator:u,static:d,future:n({v7_relativeSplatPath:!1},g)})),[h,g,u,d]);"string"==typeof s&&(s=(0,r.Rr)(s));let{pathname:y="/",search:f="",hash:k="",state:v=null,key:x="default"}=s,S=a.useMemo((()=>{let t=(0,r.pb)(y,h);return null==t?null:{location:{pathname:t,search:f,hash:k,state:v,key:x},navigationType:o}}),[h,y,f,k,v,x,o]);return null==S?null:a.createElement(l.Provider,{value:p},a.createElement(c.Provider,{children:i,value:S}))}function I(t){let{children:e,location:i}=t;return y(D(e),i)}function D(t,e){void 0===e&&(e=[]);let i=[];return a.Children.forEach(t,((t,n)=>{if(!a.isValidElement(t))return;let s=[...e,n];if(t.type===a.Fragment)return void i.push.apply(i,D(t.props.children,s));t.type!==T&&(0,r.Oi)(!1),t.props.index&&t.props.children&&(0,r.Oi)(!1);let o={id:t.props.id||s.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(o.children=D(t.props.children,s)),i.push(o)})),i}a.startTransition,new Promise((()=>{})),a.Component},1609:t=>{"use strict";t.exports=window.React},790:t=>{"use strict";t.exports=window.ReactJSXRuntime},6427:t=>{"use strict";t.exports=window.wp.components},6087:t=>{"use strict";t.exports=window.wp.element},7723:t=>{"use strict";t.exports=window.wp.i18n},5573:t=>{"use strict";t.exports=window.wp.primitives},6942:(t,e)=>{var i;!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var t="",e=0;e<arguments.length;e++){var i=arguments[e];i&&(t=s(t,n(i)))}return t}function n(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return r.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)a.call(t,i)&&t[i]&&(e=s(e,i));return e}function s(t,e){return e?t?t+" "+e:t+e:t}t.exports?(r.default=r,t.exports=r):void 0===(i=function(){return r}.apply(e,[]))||(t.exports=i)}()}},a={};function r(t){var e=a[t];if(void 0!==e)return e.exports;var n=a[t]={exports:{}};return i[t](n,n.exports,r),n.exports}r.m=i,r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.f={},r.e=t=>Promise.all(Object.keys(r.f).reduce(((e,i)=>(r.f[i](t,e),e)),[])),r.u=t=>t+".js?ver="+{563:"eb66a121f1117f80bc1b",767:"a156d4d1a122bfc72e95",809:"9492e4226ec098c34964",837:"c6b22c23e10d6e4b6963",923:"cf76414afaf470888a54"}[t],r.miniCssF=t=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="gtm-kit-settings:",r.l=(i,a,n,s)=>{if(t[i])t[i].push(a);else{var o,l;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==i||d.getAttribute("data-webpack")==e+n){o=d;break}}o||(l=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,r.nc&&o.setAttribute("nonce",r.nc),o.setAttribute("data-webpack",e+n),o.src=i),t[i]=[a];var m=(e,a)=>{o.onerror=o.onload=null,clearTimeout(g);var r=t[i];if(delete t[i],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach((t=>t(a))),e)return e(a)},g=setTimeout(m.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=m.bind(null,o.onerror),o.onload=m.bind(null,o.onload),l&&document.head.appendChild(o)}},r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var i=e.getElementsByTagName("script");if(i.length)for(var a=i.length-1;a>-1&&(!t||!/^http(s?):/.test(t));)t=i[a--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t})(),(()=>{var t={678:0};r.f.j=(e,i)=>{var a=r.o(t,e)?t[e]:void 0;if(0!==a)if(a)i.push(a[2]);else{var n=new Promise(((i,r)=>a=t[e]=[i,r]));i.push(a[2]=n);var s=r.p+r.u(e),o=new Error;r.l(s,(i=>{if(r.o(t,e)&&(0!==(a=t[e])&&(t[e]=void 0),a)){var n=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;o.message="Loading chunk "+e+" failed.\n("+n+": "+s+")",o.name="ChunkLoadError",o.type=n,o.request=s,a[1](o)}}),"chunk-"+e,e)}};var e=(e,i)=>{var a,n,[s,o,l]=i,c=0;if(s.some((e=>0!==t[e]))){for(a in o)r.o(o,a)&&(r.m[a]=o[a]);l&&l(r)}for(e&&e(i);c<s.length;c++)n=s[c],r.o(t,n)&&t[n]&&t[n][0](),t[n]=0},i=globalThis.webpackChunkgtm_kit_settings=globalThis.webpackChunkgtm_kit_settings||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})(),(()=>{"use strict";var t={};r.r(t);const e=window.ReactDOM;var i=r(7723),a=r(6087),n=r(3951),s=r(282),o=r(4085),l=r(8621),c=r(9257),u=r(4882),d=r(6555),m=r(790);const g=(0,a.createContext)(),h={licenseKey:"",isSendingLicenseKey:!1,isLicenseKeySent:!1,licenseKeyMessage:"",isPremium:!1,hasValidLicense:!1},p=(t,e)=>{const i={...t};switch(e.type){case c.tx:i.isSendingLicenseKey=!0;break;case c.$E:i.isSendingLicenseKey=!1,i.isLicenseKeySent=e.payload.isLicenseKeySent||!1,i.licenseKeyMessage=e.payload.licenseKeyMessage||"";break;case c.I_:void 0!==e.payload.licenseKey&&(i.licenseKey=e.payload.licenseKey),void 0!==e.payload.isSendingLicenseKey&&(i.isSendingLicenseKey=e.payload.isSendingLicenseKey);break;default:return t}return i},y=({children:t})=>{const[e,i]=(0,a.useReducer)(p,{...h,isPremium:l.A.isPremium(),hasValidLicense:l.A.hasValidLicense()}),r={licenseKey:e.licenseKey,isSendingLicenseKey:e.isSendingLicenseKey,isLicenseKeySent:e.isLicenseKeySent,licenseKeyMessage:e.licenseKeyMessage,isPremium:e.isPremium,hasValidLicense:e.hasValidLicense,updateLicenseKey:t=>{i({type:c.I_,payload:{licenseKey:t}})},sendLicenseKey:async()=>{i({type:c.tx});try{const t=await(0,o.Hz)(e.licenseKey);i({type:c.$E,payload:{isLicenseKeySent:t.success,licenseKeyMessage:t.data}})}catch(t){const e=t instanceof d.gG?t:new d.gG(t.message),a=(0,u.Qk)(e);i({type:c.$E,payload:{isLicenseKeySent:!1,licenseKeyMessage:a}})}},deactivateLicense:async()=>await(0,o.yD)(),useLicenseKey:e.licenseKey,useIsSendingLicenseKey:e.isSendingLicenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage};return(0,m.jsx)(g.Provider,{value:r,children:t})},f=(0,a.createContext)(),k={supportTicket:"",isSendingSystemData:!1,isSystemDataSent:!1,systemDataMessage:""},v=(t,e)=>{const i={...t};switch(e.type){case c.ev:i.isSendingSystemData=!0;break;case c.Ab:i.isSendingSystemData=!1,i.isSystemDataSent=e.payload.isSystemDataSent||!1,i.systemDataMessage=e.payload.systemDataMessage||"";break;case c.I_:void 0!==e.payload.supportTicket&&(i.supportTicket=e.payload.supportTicket),void 0!==e.payload.isSendingSystemData&&(i.isSendingSystemData=e.payload.isSendingSystemData);break;default:return t}return i},x=({children:t})=>{const[e,i]=(0,a.useReducer)(v,k),r={supportTicket:e.supportTicket,isSendingSystemData:e.isSendingSystemData,isSystemDataSent:e.isSystemDataSent,systemDataMessage:e.systemDataMessage,updateSupportTicket:t=>{i({type:c.I_,payload:{supportTicket:t}})},sendSystemData:async()=>{i({type:c.ev});try{const t=await(0,o.yZ)(e.supportTicket);i({type:c.Ab,payload:{isSystemDataSent:t.success,systemDataMessage:t.data}})}catch(t){i({type:c.Ab,payload:{isSystemDataSent:!1,systemDataMessage:t.message||"Failed to send system data"}})}},useSupportTicket:e.supportTicket,useIsSendingSystemData:e.isSendingSystemData,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage};return(0,m.jsx)(f.Provider,{value:r,children:t})};var S=r(9730);const j=(0,a.createContext)();let M=1;const N=({children:t})=>{const[e,i]=(0,a.useState)([]),r=(0,a.useCallback)((t=>{i((e=>e.filter((e=>e.id!==t))))}),[]),n=(0,a.useCallback)(((t,e="info",a=3e3)=>{const n=M++,s={id:n,message:t,type:e,duration:a};return i((t=>[...t,s])),a>0&&setTimeout((()=>{r(n)}),a),n}),[r]),s=(0,a.useCallback)(((t,e=3e3)=>n(t,"success",e)),[n]),o=(0,a.useCallback)(((t,e=5e3)=>n(t,"error",e)),[n]),l=(0,a.useCallback)((t=>n(t,"loading",0)),[n]),c=(0,a.useCallback)(((t,e=3e3)=>n(t,"info",e)),[n]),u={toasts:e,addToast:n,removeToast:r,success:s,error:o,loading:l,info:c};return(0,m.jsx)(j.Provider,{value:u,children:t})};var w=r(7767),b=r(1609),L=r(5588);new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(t){}new Map;const T=b.startTransition;function E(t){let{basename:e,children:i,future:a,window:r}=t,n=b.useRef();null==n.current&&(n.current=(0,L.TM)({window:r,v5Compat:!0}));let s=n.current,[o,l]=b.useState({action:s.action,location:s.location}),{v7_startTransition:c}=a||{},u=b.useCallback((t=>{c&&T?T((()=>l(t))):l(t)}),[l,c]);return b.useLayoutEffect((()=>s.listen(u)),[s,u]),b.useEffect((()=>(0,w.V8)(a)),[a]),b.createElement(w.Ix,{basename:e,children:i,location:o.location,navigationType:o.action,navigator:s,future:a})}var I,D;e.flushSync,b.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"}(I||(I={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(D||(D={}));const O=[{step:1,path:"/welcome",element:"Welcome",title:(0,i.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,i.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,i.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/automatic-updates",element:"Automatic Updates",title:(0,i.__)("Automatic Updates","gtm-kit")},{step:5,path:"/getting-started",element:"GettingStarted",title:(0,i.__)("Getting Started","gtm-kit")}],A=(0,a.memo)((({step:t,currentStep:e,totalSteps:i})=>{if(t===i)return null;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})})),C=A,_=(0,a.memo)((({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"}):null)),P=_,z=(0,a.memo)((({step:t,currentStep:e,totalSteps:i})=>{if(0===t)return null;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)(P,{step:t,currentStep:e,totalSteps:i})})}),(0,m.jsx)(C,{step:t,currentStep:e,totalSteps:i})]})})),R=z,U=(0,a.memo)((()=>{const t=O.length-1+O[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}))})(O,{path:(0,w.zy)().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:O.map((function(i){return(0,m.jsx)(R,{step:i.step,currentStep:e,totalSteps:t},i.step)}))})})),B=()=>(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,i.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"})})}),(0,m.jsx)(U,{})]});var F=r(7449);const K=()=>(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:(0,F.a)(),children:(0,i.__)("Go to the dashboard.","gtm-kit")})})})});class Y extends a.Component{constructor(t){super(t),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,e){this.setState({error:t,errorInfo:e})}handleReset=()=>{this.setState({hasError:!1,error:null,errorInfo:null}),this.props.reloadOnReset&&window.location.reload()};render(){return this.state.hasError?(0,m.jsxs)("div",{className:"gtmkit-error-boundary gtmkit-p-8 gtmkit-bg-red-50 gtmkit-border gtmkit-border-red-200 gtmkit-rounded-lg gtmkit-max-w-4xl gtmkit-mx-auto gtmkit-my-8",children:[(0,m.jsx)("h2",{className:"gtmkit-text-xl gtmkit-font-bold gtmkit-text-red-600 gtmkit-mb-4",children:this.props.title||(0,i.__)("Something went wrong","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-mb-4 gtmkit-text-gray-700",children:this.props.message||(0,i.__)("An unexpected error occurred. Please try refreshing the page.","gtm-kit")}),!1,(0,m.jsxs)("div",{className:"gtmkit-flex gtmkit-gap-4",children:[(0,m.jsx)("button",{onClick:this.handleReset,className:"gtmkit-px-4 gtmkit-py-2 gtmkit-bg-red-600 gtmkit-text-white gtmkit-rounded hover:gtmkit-bg-red-700 gtmkit-transition-colors",children:(0,i.__)("Try Again","gtm-kit")}),(0,m.jsx)("button",{onClick:()=>window.location.reload(),className:"gtmkit-px-4 gtmkit-py-2 gtmkit-bg-gray-600 gtmkit-text-white gtmkit-rounded hover:gtmkit-bg-gray-700 gtmkit-transition-colors",children:(0,i.__)("Reload Page","gtm-kit")})]})]}):this.props.children}}const Q=Y,G=({children:t,sectionName:e})=>{const a=e?`${e} - ${(0,i.__)("Section Error","gtm-kit")}`:(0,i.__)("Section Error","gtm-kit"),r=e?`${(0,i.__)("The","gtm-kit")} "${e}" ${(0,i.__)("section encountered an error. Other sections may still work normally.","gtm-kit")}`:(0,i.__)("This section encountered an error. Other sections may still work normally.","gtm-kit");return(0,m.jsx)(Q,{title:a,message:r,children:t})};var $=r(6942),W=r.n($);const V=(0,a.memo)((({className:t="",width:e,height:i,circle:a=!1})=>{const r=a?"gtmkit-rounded-full":"",n={width:e||"100%",height:i||"1rem"};return(0,m.jsx)("div",{className:W()("gtmkit-animate-pulse gtmkit-bg-color-border gtmkit-rounded",r,t),style:n,"aria-hidden":"true"})})),H=(0,a.memo)((({lines:t=3})=>(0,m.jsx)("div",{className:"gtmkit-space-y-2",children:Array.from({length:t},((e,i)=>(0,m.jsx)(V,{height:"1rem",width:i===t-1?"70%":"100%"},i)))}))),J=(0,a.memo)((()=>(0,m.jsxs)("div",{className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-max-w-screen-lg gtmkit-border-color-grey gtmkit-rounded",children:[(0,m.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey",children:(0,m.jsx)(V,{height:"1.5rem",width:"200px"})}),(0,m.jsxs)("div",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-space-y-4",children:[(0,m.jsx)(H,{lines:2}),(0,m.jsx)(V,{height:"2.5rem",width:"300px"})]})]}))),Z=((0,a.memo)((()=>(0,m.jsxs)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4",children:[(0,m.jsx)(V,{height:"1.25rem",width:"150px",className:"gtmkit-mb-2"}),(0,m.jsx)(V,{height:"2.5rem",width:"100%"})]}))),(0,a.memo)((()=>(0,m.jsxs)("div",{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",children:[(0,m.jsxs)("div",{className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5",children:[(0,m.jsx)(V,{height:"2rem",width:"200px"}),(0,m.jsx)(V,{height:"1.5rem",width:"60px",circle:!1})]}),(0,m.jsx)("div",{className:"gtmkit-flex-auto gtmkit-mb-4",children:(0,m.jsx)(H,{lines:2})}),(0,m.jsx)(V,{height:"3rem",width:"225px"})]}))),(0,a.memo)((({sections:t=3,showTitle:e=!0})=>(0,m.jsxs)("div",{children:[e&&(0,m.jsx)("div",{className:"gtmkit-mb-8",style:{height:"2rem"},"aria-hidden":"true"}),Array.from({length:t},((t,e)=>(0,m.jsx)(J,{},e)))]}))));(0,a.memo)((({count:t=3})=>(0,m.jsx)("div",{className:"gtmkit-space-y-4",children:Array.from({length:t},((t,e)=>(0,m.jsxs)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-border-2 gtmkit-px-4 gtmkit-py-3",children:[(0,m.jsxs)("div",{className:"gtmkit-flex-1",children:[(0,m.jsx)(V,{height:"1.25rem",width:"150px"}),(0,m.jsx)(V,{height:"1rem",width:"80%",className:"gtmkit-mt-2"})]}),(0,m.jsx)(V,{height:"2rem",width:"80px"})]},e)))})));var q=(0,a.forwardRef)((({icon:t,size:e=24,...i},r)=>(0,a.cloneElement)(t,{width:e,height:e,...i,ref:r}))),X=r(5573),tt=(0,m.jsx)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(X.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})}),et=(0,m.jsx)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)(X.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})}),it=(0,m.jsx)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(X.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),at=r(6427);const rt=(0,a.memo)((({message:e,type:i="info",onClose:a=null,duration:r=0})=>(r>0&&a&&setTimeout(a,r),(0,m.jsxs)("div",{className:W()("gtmkit-fixed gtmkit-bottom-8 gtmkit-right-8 gtmkit-z-50 gtmkit-flex gtmkit-items-center gtmkit-gap-3 gtmkit-px-4 gtmkit-py-3 gtmkit-rounded-lg gtmkit-shadow-lg gtmkit-min-w-[300px] gtmkit-max-w-md gtmkit-animate-slide-up",{info:"gtmkit-bg-blue-50 gtmkit-text-blue-900 gtmkit-border gtmkit-border-blue-200",success:"gtmkit-bg-green-50 gtmkit-text-green-900 gtmkit-border gtmkit-border-green-200",error:"gtmkit-bg-red-50 gtmkit-text-red-900 gtmkit-border gtmkit-border-red-200",loading:"gtmkit-bg-gray-50 gtmkit-text-gray-900 gtmkit-border gtmkit-border-gray-200"}[i]),children:[(0,m.jsx)("div",{className:"gtmkit-flex-shrink-0",children:(()=>{switch(i){case"success":return(0,m.jsx)(q,{icon:tt});case"error":return(0,m.jsx)(q,{icon:t.warning});case"loading":return(0,m.jsx)(at.Spinner,{});default:return(0,m.jsx)(q,{icon:et})}})()}),(0,m.jsx)("div",{className:"gtmkit-flex-grow gtmkit-text-sm gtmkit-font-medium",children:e}),a&&(0,m.jsx)("button",{onClick:a,className:"gtmkit-flex-shrink-0 gtmkit-p-1 gtmkit-rounded gtmkit-hover:bg-black gtmkit-hover:bg-opacity-10 gtmkit-transition-colors","aria-label":"Close",children:(0,m.jsx)(q,{icon:it,size:20})})]}))));rt.displayName="Toast";const nt=(0,a.memo)((({toasts:t=[]})=>t.length?(0,m.jsx)("div",{className:"gtmkit-fixed gtmkit-bottom-0 gtmkit-right-0 gtmkit-p-8 gtmkit-z-50 gtmkit-pointer-events-none",children:(0,m.jsx)("div",{className:"gtmkit-space-y-2",children:t.map((t=>(0,m.jsx)("div",{className:"gtmkit-pointer-events-auto",children:(0,m.jsx)(rt,{...t})},t.id)))})}):null));nt.displayName="ToastContainer";const st=(0,a.lazy)((()=>r.e(767).then(r.bind(r,5767)))),ot=(0,a.lazy)((()=>r.e(563).then(r.bind(r,8563)))),lt=(0,a.lazy)((()=>r.e(923).then(r.bind(r,5923)))),ct=(0,a.lazy)((()=>r.e(809).then(r.bind(r,2809)))),ut=(0,a.lazy)((()=>r.e(837).then(r.bind(r,9837)))),dt=()=>{const{useSettings:t}=(0,a.useContext)(n.ph),{toasts:e}=(0,a.useContext)(j);return Object.keys(t).length?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(B,{}),(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.jsx)(a.Suspense,{fallback:(0,m.jsx)(Z,{sections:1,showTitle:!1}),children:(0,m.jsxs)(w.BV,{children:[(0,m.jsx)(w.qh,{exact:!0,path:"/welcome",element:(0,m.jsx)(G,{sectionName:(0,i.__)("Welcome","gtm-kit"),children:(0,m.jsx)(st,{})})}),(0,m.jsx)(w.qh,{exact:!0,path:"/essential-settings",element:(0,m.jsx)(G,{sectionName:(0,i.__)("Essential Settings","gtm-kit"),children:(0,m.jsx)(ot,{})})}),(0,m.jsx)(w.qh,{exact:!0,path:"/share-anonymous-data",element:(0,m.jsx)(G,{sectionName:(0,i.__)("Share Anonymous Data","gtm-kit"),children:(0,m.jsx)(lt,{})})}),(0,m.jsx)(w.qh,{exact:!0,path:"/automatic-updates",element:(0,m.jsx)(G,{sectionName:(0,i.__)("Automatic Updates","gtm-kit"),children:(0,m.jsx)(ut,{})})}),(0,m.jsx)(w.qh,{exact:!0,path:"/getting-started",element:(0,m.jsx)(G,{sectionName:(0,i.__)("Getting Started","gtm-kit"),children:(0,m.jsx)(ct,{})})}),(0,m.jsx)(w.qh,{path:"/",element:(0,m.jsx)(w.C5,{replace:!0,to:"/welcome"})})]})})}),(0,m.jsx)(K,{}),(0,m.jsx)(nt,{toasts:e})]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(B,{}),(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.jsx)(Z,{sections:1,showTitle:!1})}),(0,m.jsx)(K,{})]})},mt=()=>(0,m.jsx)(E,{basename:"/",children:(0,m.jsx)(N,{children:(0,m.jsx)(n.xi,{children:(0,m.jsx)(s.ph,{children:(0,m.jsx)(y,{children:(0,m.jsx)(x,{children:(0,m.jsx)(S.hh,{children:(0,m.jsx)(dt,{})})})})})})})});document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(l.A.getRootId());null!=t&&(0,e.createRoot)(t).render((0,m.jsx)(mt,{}))}))})()})();