@billgangcom/theme-lib 1.121.1 → 1.122.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/{builder-CEuUvIOl.cjs → builder-BP2NF8ba.cjs} +10 -10
  2. package/dist/{builder-BLJW4r2I.js → builder-DLbxHcGl.js} +8 -6
  3. package/dist/{builder-components-B5VitaYF.js → builder-components-CvwzjRgz.js} +4 -4
  4. package/dist/{builder-components-Bxh6HqE7.cjs → builder-components-Dc6wkxdX.cjs} +1 -1
  5. package/dist/builder.cjs.js +1 -1
  6. package/dist/builder.es.js +23 -23
  7. package/dist/charge-BHOPMu9B.cjs +115 -0
  8. package/dist/{charge-BJBo-Ac6.js → charge-D4NUd_5K.js} +8604 -8263
  9. package/dist/{checkout-DJRMAUFt.js → checkout-Be8X_4uK.js} +5 -5
  10. package/dist/{checkout-C0yD2KNO.cjs → checkout-DDFInBAH.cjs} +1 -1
  11. package/dist/exports.cjs.js +1 -1
  12. package/dist/exports.es.js +6 -6
  13. package/dist/{index-BwkJb9iY.js → index-An-uLEwq.js} +5 -5
  14. package/dist/{index-BVgZHPmL.js → index-BFpaF1oT.js} +1 -1
  15. package/dist/{index-DHu9EjiI.js → index-BNnvygcY.js} +2 -2
  16. package/dist/{index-3ooWNOdm.cjs → index-CpusUNuE.cjs} +1 -1
  17. package/dist/{index-BYph4R_R.cjs → index-DC5b0ag7.cjs} +1 -1
  18. package/dist/{index-DkCtdfUs.js → index-DdeE8DtM.js} +5 -5
  19. package/dist/{index-0pbQYR0W.cjs → index-Dh-QXL4z.cjs} +1 -1
  20. package/dist/{index-Cy04C1Ft.cjs → index-DtmPPvyI.cjs} +1 -1
  21. package/dist/{index-DznvnZMn.js → index-WepRctI4.js} +5 -5
  22. package/dist/{index-C4RdZsKS.js → index-nMMf5rX0.js} +5 -5
  23. package/dist/{index-WUENht00.cjs → index-qS6eq-cu.cjs} +1 -1
  24. package/dist/{index-DOq8Ex8r.cjs → index-x85KH7TY.cjs} +1 -1
  25. package/dist/index.cjs.js +1 -1
  26. package/dist/index.es.js +6 -6
  27. package/dist/{order-DImEf9Qd.cjs → order-DgGQVpIG.cjs} +1 -1
  28. package/dist/{order-DjqVEizs.js → order-DnWNBSt4.js} +5 -5
  29. package/dist/src/pages/api/index.d.ts +2 -0
  30. package/dist/src/storefront/api/apiKey.d.ts +2 -0
  31. package/dist/src/storefront/api/index.d.ts +1 -0
  32. package/dist/src/storefront/components/Sidebar/nav-list.d.ts +1 -0
  33. package/dist/src/storefront/constants/routes.d.ts +4 -2
  34. package/dist/src/storefront/store/useCustomerDashboardStore.d.ts +17 -0
  35. package/dist/style.css +1 -1
  36. package/dist/{subscription-DRM99xSt.cjs → subscription-CU8xIJMY.cjs} +1 -1
  37. package/dist/{subscription-Dy4VkIUb.js → subscription-DnmKIrml.js} +5 -5
  38. package/dist/{ticket-DfRwG42e.cjs → ticket-B6IYS1Cm.cjs} +1 -1
  39. package/dist/{ticket-UF6olQ4f.js → ticket-DWbUjROU.js} +5 -5
  40. package/dist/{top-up-BrN49_Uk.cjs → top-up-CMYplLen.cjs} +1 -1
  41. package/dist/{top-up-BifI2B0D.js → top-up-DwN1AWtR.js} +5 -5
  42. package/dist/{ui-components-BkVsTiHC.cjs → ui-components-BmZEF6MK.cjs} +1 -1
  43. package/dist/{ui-components-C6LT11Nu.js → ui-components-C-vKKPue.js} +4 -4
  44. package/dist/ui.cjs.js +1 -1
  45. package/dist/ui.es.js +1 -1
  46. package/dist/{validation-Cy2VBGwW.js → validation-AShv6XKA.js} +5 -5
  47. package/dist/{validation-B54ivxep.cjs → validation-CHMZxQ3t.cjs} +1 -1
  48. package/package.json +1 -1
  49. package/dist/charge-C3aekkW0.cjs +0 -109
@@ -1,4 +1,4 @@
1
- "use strict";const we=require("react"),$a=require("react-dom"),L=require("react/jsx-runtime"),je=require("./ui-components-BkVsTiHC.cjs"),Ft=require("./builder-components-Bxh6HqE7.cjs");require("./charge-C3aekkW0.cjs");require("./ticket-DfRwG42e.cjs");function Oo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const E=Oo(we),za=Oo($a);/**
1
+ "use strict";const we=require("react"),$a=require("react-dom"),L=require("react/jsx-runtime"),je=require("./ui-components-BmZEF6MK.cjs"),Ft=require("./builder-components-Dc6wkxdX.cjs");require("./charge-BHOPMu9B.cjs");require("./ticket-B6IYS1Cm.cjs");function Oo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const E=Oo(we),za=Oo($a);/**
2
2
  * @remix-run/router v1.23.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
@@ -7,8 +7,8 @@
7
7
  * LICENSE.md file in the root directory of this source tree.
8
8
  *
9
9
  * @license MIT
10
- */function fe(){return fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fe.apply(this,arguments)}var ye;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ye||(ye={}));const Jr="popstate";function Ja(e){e===void 0&&(e={});function t(r,o){let{pathname:a,search:s,hash:i}=r.location;return Wt("",{pathname:a,search:s,hash:i},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:ct(o)}return Wa(t,n,null,e)}function I(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function be(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function qa(){return Math.random().toString(36).substr(2,8)}function qr(e,t){return{usr:e.state,key:e.key,idx:t}}function Wt(e,t,n,r){return n===void 0&&(n=null),fe({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?dt(t):t,{state:n,key:t&&t.key||r||qa()})}function ct(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function dt(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Wa(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:a=!1}=r,s=o.history,i=ye.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(fe({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){i=ye.Pop;let v=u(),R=v==null?null:v-c;c=v,l&&l({action:i,location:p.location,delta:R})}function h(v,R){i=ye.Push;let b=Wt(p.location,v,R);c=u()+1;let k=qr(b,c),_=p.createHref(b);try{s.pushState(k,"",_)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;o.location.assign(_)}a&&l&&l({action:i,location:p.location,delta:1})}function y(v,R){i=ye.Replace;let b=Wt(p.location,v,R);c=u();let k=qr(b,c),_=p.createHref(b);s.replaceState(k,"",_),a&&l&&l({action:i,location:p.location,delta:0})}function m(v){let R=o.location.origin!=="null"?o.location.origin:o.location.href,b=typeof v=="string"?v:ct(v);return b=b.replace(/ $/,"%20"),I(R,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,R)}let p={get action(){return i},get location(){return e(o,s)},listen(v){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Jr,d),l=v,()=>{o.removeEventListener(Jr,d),l=null}},createHref(v){return t(o,v)},createURL:m,encodeLocation(v){let R=m(v);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:h,replace:y,go(v){return s.go(v)}};return p}var oe;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(oe||(oe={}));const Za=new Set(["lazy","caseSensitive","path","id","index","children"]);function Ga(e){return e.index===!0}function Rn(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,a)=>{let s=[...n,String(a)],i=typeof o.id=="string"?o.id:s.join("-");if(I(o.index!==!0||!o.children,"Cannot specify children on an index route"),I(!r[i],'Found a route id collision on id "'+i+`". Route id's must be globally unique within Data Router usages`),Ga(o)){let l=fe({},o,t(o),{id:i});return r[i]=l,l}else{let l=fe({},o,t(o),{id:i,children:void 0});return r[i]=l,o.children&&(l.children=Rn(o.children,t,s,r)),l}})}function mt(e,t,n){return n===void 0&&(n="/"),wn(e,t,n,!1)}function wn(e,t,n,r){let o=typeof t=="string"?dt(t):t,a=Je(o.pathname||"/",n);if(a==null)return null;let s=Mo(e);Ya(s);let i=null;for(let l=0;i==null&&l<s.length;++l){let c=ls(a);i=ss(s[l],c,r)}return i}function Ka(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function Mo(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(a,s,i)=>{let l={relativePath:i===void 0?a.path||"":i,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};l.relativePath.startsWith("/")&&(I(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Qe([r,l.relativePath]),u=n.concat(l);a.children&&a.children.length>0&&(I(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Mo(a.children,t,u,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:os(c,a.index),routesMeta:u})};return e.forEach((a,s)=>{var i;if(a.path===""||!((i=a.path)!=null&&i.includes("?")))o(a,s);else for(let l of Ao(a.path))o(a,s,l)}),t}function Ao(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return o?[a,""]:[a];let s=Ao(r.join("/")),i=[];return i.push(...s.map(l=>l===""?a:[a,l].join("/"))),o&&i.push(...s),i.map(l=>e.startsWith("/")&&l===""?"/":l)}function Ya(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:as(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Xa=/^:[\w-]+$/,Qa=3,es=2,ts=1,ns=10,rs=-2,Wr=e=>e==="*";function os(e,t){let n=e.split("/"),r=n.length;return n.some(Wr)&&(r+=rs),t&&(r+=es),n.filter(o=>!Wr(o)).reduce((o,a)=>o+(Xa.test(a)?Qa:a===""?ts:ns),r)}function as(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function ss(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,o={},a="/",s=[];for(let i=0;i<r.length;++i){let l=r[i],c=i===r.length-1,u=a==="/"?t:t.slice(a.length)||"/",d=kn({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),h=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=kn({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;Object.assign(o,d.params),s.push({params:o,pathname:Qe([a,d.pathname]),pathnameBase:ds(Qe([a,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(a=Qe([a,d.pathnameBase]))}return s}function kn(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=is(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],s=a.replace(/(.)\/+$/,"$1"),i=o.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:h,isOptional:y}=u;if(h==="*"){let p=i[d]||"";s=a.slice(0,a.length-p.length).replace(/(.)\/+$/,"$1")}const m=i[d];return y&&!m?c[h]=void 0:c[h]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:s,pattern:e}}function is(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),be(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,i,l)=>(r.push({paramName:i,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function ls(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return be(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Je(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function cs(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?dt(e):e;return{pathname:n?n.startsWith("/")?n:us(n,t):t,search:fs(r),hash:hs(o)}}function us(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Kn(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Do(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function An(e,t){let n=Do(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Dn(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=dt(e):(o=fe({},e),I(!o.pathname||!o.pathname.includes("?"),Kn("?","pathname","search",o)),I(!o.pathname||!o.pathname.includes("#"),Kn("#","pathname","hash",o)),I(!o.search||!o.search.includes("#"),Kn("#","search","hash",o)));let a=e===""||o.pathname==="",s=a?"/":o.pathname,i;if(s==null)i=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;o.pathname=h.join("/")}i=d>=0?t[d]:"/"}let l=cs(o,i),c=s&&s!=="/"&&s.endsWith("/"),u=(a||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Qe=e=>e.join("/").replace(/\/\/+/g,"/"),ds=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),fs=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,hs=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Ln{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Zt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Fo=["post","put","patch","delete"],ps=new Set(Fo),ms=["get",...Fo],gs=new Set(ms),vs=new Set([301,302,303,307,308]),ys=new Set([307,308]),Yn={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ws={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},It={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Cr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bs=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Io="remix-router-transitions";function Ss(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;I(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let f=e.detectErrorBoundary;o=g=>({hasErrorBoundary:f(g)})}else o=bs;let a={},s=Rn(e.routes,o,void 0,a),i,l=e.basename||"/",c=e.dataStrategy||Rs,u=e.patchRoutesOnNavigation,d=fe({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,y=new Set,m=null,p=null,v=null,R=e.hydrationData!=null,b=mt(s,e.history.location,l),k=!1,_=null;if(b==null&&!u){let f=Ae(404,{pathname:e.history.location.pathname}),{matches:g,route:S}=oo(s);b=g,_={[S.id]:f}}b&&!e.hydrationData&&un(b,s,e.history.location.pathname).active&&(b=null);let T;if(b)if(b.some(f=>f.route.lazy))T=!1;else if(!b.some(f=>f.route.loader))T=!0;else if(d.v7_partialHydration){let f=e.hydrationData?e.hydrationData.loaderData:null,g=e.hydrationData?e.hydrationData.errors:null;if(g){let S=b.findIndex(x=>g[x.route.id]!==void 0);T=b.slice(0,S+1).every(x=>!cr(x.route,f,g))}else T=b.every(S=>!cr(S.route,f,g))}else T=e.hydrationData!=null;else if(T=!1,b=[],d.v7_partialHydration){let f=un(null,s,e.history.location.pathname);f.active&&f.matches&&(k=!0,b=f.matches)}let H,w={historyAction:e.history.action,location:e.history.location,matches:b,initialized:T,navigation:Yn,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||_,fetchers:new Map,blockers:new Map},P=ye.Pop,G=!1,B,ae=!1,ee=new Map,te=null,he=!1,Oe=!1,Te=[],Ze=new Set,ue=new Map,Re=0,Ce=-1,Se=new Map,_e=new Set,Ue=new Map,se=new Map,pe=new Set,Me=new Map,Ee=new Map,ft;function rn(){if(h=e.history.listen(f=>{let{action:g,location:S,delta:x}=f;if(ft){ft(),ft=void 0;return}be(Ee.size===0||x!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let N=Ur({currentLocation:w.location,nextLocation:S,historyAction:g});if(N&&x!=null){let F=new Promise(j=>{ft=j});e.history.go(x*-1),cn(N,{state:"blocked",location:S,proceed(){cn(N,{state:"proceeding",proceed:void 0,reset:void 0,location:S}),F.then(()=>e.history.go(x))},reset(){let j=new Map(w.blockers);j.set(N,It),xe({blockers:j})}});return}return Ge(g,S)}),n){js(t,ee);let f=()=>Hs(t,ee);t.addEventListener("pagehide",f),te=()=>t.removeEventListener("pagehide",f)}return w.initialized||Ge(ye.Pop,w.location,{initialHydration:!0}),H}function qn(){h&&h(),te&&te(),y.clear(),B&&B.abort(),w.fetchers.forEach((f,g)=>ln(g)),w.blockers.forEach((f,g)=>Hr(g))}function on(f){return y.add(f),()=>y.delete(f)}function xe(f,g){g===void 0&&(g={}),w=fe({},w,f);let S=[],x=[];d.v7_fetcherPersist&&w.fetchers.forEach((N,F)=>{N.state==="idle"&&(pe.has(F)?x.push(F):S.push(F))}),pe.forEach(N=>{!w.fetchers.has(N)&&!ue.has(N)&&x.push(N)}),[...y].forEach(N=>N(w,{deletedFetchers:x,viewTransitionOpts:g.viewTransitionOpts,flushSync:g.flushSync===!0})),d.v7_fetcherPersist?(S.forEach(N=>w.fetchers.delete(N)),x.forEach(N=>ln(N))):x.forEach(N=>pe.delete(N))}function et(f,g,S){var x,N;let{flushSync:F}=S===void 0?{}:S,j=w.actionData!=null&&w.navigation.formMethod!=null&&ze(w.navigation.formMethod)&&w.navigation.state==="loading"&&((x=f.state)==null?void 0:x._isRedirect)!==!0,M;g.actionData?Object.keys(g.actionData).length>0?M=g.actionData:M=null:j?M=w.actionData:M=null;let A=g.loaderData?no(w.loaderData,g.loaderData,g.matches||[],g.errors):w.loaderData,O=w.blockers;O.size>0&&(O=new Map(O),O.forEach((Y,ke)=>O.set(ke,It)));let D=G===!0||w.navigation.formMethod!=null&&ze(w.navigation.formMethod)&&((N=f.state)==null?void 0:N._isRedirect)!==!0;i&&(s=i,i=void 0),he||P===ye.Pop||(P===ye.Push?e.history.push(f,f.state):P===ye.Replace&&e.history.replace(f,f.state));let J;if(P===ye.Pop){let Y=ee.get(w.location.pathname);Y&&Y.has(f.pathname)?J={currentLocation:w.location,nextLocation:f}:ee.has(f.pathname)&&(J={currentLocation:f,nextLocation:w.location})}else if(ae){let Y=ee.get(w.location.pathname);Y?Y.add(f.pathname):(Y=new Set([f.pathname]),ee.set(w.location.pathname,Y)),J={currentLocation:w.location,nextLocation:f}}xe(fe({},g,{actionData:M,loaderData:A,historyAction:P,location:f,initialized:!0,navigation:Yn,revalidation:"idle",restoreScrollPosition:$r(f,g.matches||w.matches),preventScrollReset:D,blockers:O}),{viewTransitionOpts:J,flushSync:F===!0}),P=ye.Pop,G=!1,ae=!1,he=!1,Oe=!1,Te=[]}async function an(f,g){if(typeof f=="number"){e.history.go(f);return}let S=lr(w.location,w.matches,l,d.v7_prependBasename,f,d.v7_relativeSplatPath,g==null?void 0:g.fromRouteId,g==null?void 0:g.relative),{path:x,submission:N,error:F}=Zr(d.v7_normalizeFormMethod,!1,S,g),j=w.location,M=Wt(w.location,x,g&&g.state);M=fe({},M,e.history.encodeLocation(M));let A=g&&g.replace!=null?g.replace:void 0,O=ye.Push;A===!0?O=ye.Replace:A===!1||N!=null&&ze(N.formMethod)&&N.formAction===w.location.pathname+w.location.search&&(O=ye.Replace);let D=g&&"preventScrollReset"in g?g.preventScrollReset===!0:void 0,J=(g&&g.flushSync)===!0,Y=Ur({currentLocation:j,nextLocation:M,historyAction:O});if(Y){cn(Y,{state:"blocked",location:M,proceed(){cn(Y,{state:"proceeding",proceed:void 0,reset:void 0,location:M}),an(f,g)},reset(){let ke=new Map(w.blockers);ke.set(Y,It),xe({blockers:ke})}});return}return await Ge(O,M,{submission:N,pendingError:F,preventScrollReset:D,replace:g&&g.replace,enableViewTransition:g&&g.viewTransition,flushSync:J})}function sn(){if(ht(),xe({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){Ge(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}Ge(P||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:ae===!0})}}async function Ge(f,g,S){B&&B.abort(),B=null,P=f,he=(S&&S.startUninterruptedRevalidation)===!0,ja(w.location,w.matches),G=(S&&S.preventScrollReset)===!0,ae=(S&&S.enableViewTransition)===!0;let x=i||s,N=S&&S.overrideNavigation,F=S!=null&&S.initialHydration&&w.matches&&w.matches.length>0&&!k?w.matches:mt(x,g,l),j=(S&&S.flushSync)===!0;if(F&&w.initialized&&!Oe&&Ps(w.location,g)&&!(S&&S.submission&&ze(S.submission.formMethod))){et(g,{matches:F},{flushSync:j});return}let M=un(F,x,g.pathname);if(M.active&&M.matches&&(F=M.matches),!F){let{error:le,notFoundMatches:Q,route:me}=Wn(g.pathname);et(g,{matches:Q,loaderData:{},errors:{[me.id]:le}},{flushSync:j});return}B=new AbortController;let A=xt(e.history,g,B.signal,S&&S.submission),O;if(S&&S.pendingError)O=[gt(F).route.id,{type:oe.error,error:S.pendingError}];else if(S&&S.submission&&ze(S.submission.formMethod)){let le=await V(A,g,S.submission,F,M.active,{replace:S.replace,flushSync:j});if(le.shortCircuited)return;if(le.pendingActionResult){let[Q,me]=le.pendingActionResult;if(Ie(me)&&Zt(me.error)&&me.error.status===404){B=null,et(g,{matches:le.matches,loaderData:{},errors:{[Q]:me.error}});return}}F=le.matches||F,O=le.pendingActionResult,N=Xn(g,S.submission),j=!1,M.active=!1,A=xt(e.history,A.url,A.signal)}let{shortCircuited:D,matches:J,loaderData:Y,errors:ke}=await U(A,g,F,M.active,N,S&&S.submission,S&&S.fetcherSubmission,S&&S.replace,S&&S.initialHydration===!0,j,O);D||(B=null,et(g,fe({matches:J||F},ro(O),{loaderData:Y,errors:ke})))}async function V(f,g,S,x,N,F){F===void 0&&(F={}),ht();let j=Is(g,S);if(xe({navigation:j},{flushSync:F.flushSync===!0}),N){let O=await dn(x,g.pathname,f.signal);if(O.type==="aborted")return{shortCircuited:!0};if(O.type==="error"){let D=gt(O.partialMatches).route.id;return{matches:O.partialMatches,pendingActionResult:[D,{type:oe.error,error:O.error}]}}else if(O.matches)x=O.matches;else{let{notFoundMatches:D,error:J,route:Y}=Wn(g.pathname);return{matches:D,pendingActionResult:[Y.id,{type:oe.error,error:J}]}}}let M,A=zt(x,g);if(!A.route.action&&!A.route.lazy)M={type:oe.error,error:Ae(405,{method:f.method,pathname:g.pathname,routeId:A.route.id})};else if(M=(await de("action",w,f,[A],x,null))[A.route.id],f.signal.aborted)return{shortCircuited:!0};if(vt(M)){let O;return F&&F.replace!=null?O=F.replace:O=Qr(M.response.headers.get("Location"),new URL(f.url),l)===w.location.pathname+w.location.search,await Z(f,M,!0,{submission:S,replace:O}),{shortCircuited:!0}}if(lt(M))throw Ae(400,{type:"defer-action"});if(Ie(M)){let O=gt(x,A.route.id);return(F&&F.replace)!==!0&&(P=ye.Push),{matches:x,pendingActionResult:[O.route.id,M]}}return{matches:x,pendingActionResult:[A.route.id,M]}}async function U(f,g,S,x,N,F,j,M,A,O,D){let J=N||Xn(g,F),Y=F||j||so(J),ke=!he&&(!d.v7_partialHydration||!A);if(x){if(ke){let ge=ne(D);xe(fe({navigation:J},ge!==void 0?{actionData:ge}:{}),{flushSync:O})}let X=await dn(S,g.pathname,f.signal);if(X.type==="aborted")return{shortCircuited:!0};if(X.type==="error"){let ge=gt(X.partialMatches).route.id;return{matches:X.partialMatches,loaderData:{},errors:{[ge]:X.error}}}else if(X.matches)S=X.matches;else{let{error:ge,notFoundMatches:Ct,route:Dt}=Wn(g.pathname);return{matches:Ct,loaderData:{},errors:{[Dt.id]:ge}}}}let le=i||s,[Q,me]=Kr(e.history,w,S,Y,g,d.v7_partialHydration&&A===!0,d.v7_skipActionErrorRevalidation,Oe,Te,Ze,pe,Ue,_e,le,l,D);if(Zn(X=>!(S&&S.some(ge=>ge.route.id===X))||Q&&Q.some(ge=>ge.route.id===X)),Ce=++Re,Q.length===0&&me.length===0){let X=Br();return et(g,fe({matches:S,loaderData:{},errors:D&&Ie(D[1])?{[D[0]]:D[1].error}:null},ro(D),X?{fetchers:new Map(w.fetchers)}:{}),{flushSync:O}),{shortCircuited:!0}}if(ke){let X={};if(!x){X.navigation=J;let ge=ne(D);ge!==void 0&&(X.actionData=ge)}me.length>0&&(X.fetchers=z(me)),xe(X,{flushSync:O})}me.forEach(X=>{st(X.key),X.controller&&ue.set(X.key,X.controller)});let St=()=>me.forEach(X=>st(X.key));B&&B.signal.addEventListener("abort",St);let{loaderResults:Mt,fetcherResults:rt}=await tt(w,S,Q,me,f);if(f.signal.aborted)return{shortCircuited:!0};B&&B.signal.removeEventListener("abort",St),me.forEach(X=>ue.delete(X.key));let Ye=pn(Mt);if(Ye)return await Z(f,Ye.result,!0,{replace:M}),{shortCircuited:!0};if(Ye=pn(rt),Ye)return _e.add(Ye.key),await Z(f,Ye.result,!0,{replace:M}),{shortCircuited:!0};let{loaderData:Gn,errors:At}=to(w,S,Mt,D,me,rt,Me);Me.forEach((X,ge)=>{X.subscribe(Ct=>{(Ct||X.done)&&Me.delete(ge)})}),d.v7_partialHydration&&A&&w.errors&&(At=fe({},w.errors,At));let pt=Br(),fn=jr(Ce),hn=pt||fn||me.length>0;return fe({matches:S,loaderData:Gn,errors:At},hn?{fetchers:new Map(w.fetchers)}:{})}function ne(f){if(f&&!Ie(f[1]))return{[f[0]]:f[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function z(f){return f.forEach(g=>{let S=w.fetchers.get(g.key),x=Bt(void 0,S?S.data:void 0);w.fetchers.set(g.key,x)}),new Map(w.fetchers)}function K(f,g,S,x){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");st(f);let N=(x&&x.flushSync)===!0,F=i||s,j=lr(w.location,w.matches,l,d.v7_prependBasename,S,d.v7_relativeSplatPath,g,x==null?void 0:x.relative),M=mt(F,j,l),A=un(M,F,j);if(A.active&&A.matches&&(M=A.matches),!M){nt(f,g,Ae(404,{pathname:j}),{flushSync:N});return}let{path:O,submission:D,error:J}=Zr(d.v7_normalizeFormMethod,!0,j,x);if(J){nt(f,g,J,{flushSync:N});return}let Y=zt(M,O),ke=(x&&x.preventScrollReset)===!0;if(D&&ze(D.formMethod)){q(f,g,O,Y,M,A.active,N,ke,D);return}Ue.set(f,{routeId:g,path:O}),re(f,g,O,Y,M,A.active,N,ke,D)}async function q(f,g,S,x,N,F,j,M,A){ht(),Ue.delete(f);function O(ve){if(!ve.route.action&&!ve.route.lazy){let Et=Ae(405,{method:A.formMethod,pathname:S,routeId:g});return nt(f,g,Et,{flushSync:j}),!0}return!1}if(!F&&O(x))return;let D=w.fetchers.get(f);Ke(f,Bs(A,D),{flushSync:j});let J=new AbortController,Y=xt(e.history,S,J.signal,A);if(F){let ve=await dn(N,new URL(Y.url).pathname,Y.signal,f);if(ve.type==="aborted")return;if(ve.type==="error"){nt(f,g,ve.error,{flushSync:j});return}else if(ve.matches){if(N=ve.matches,x=zt(N,S),O(x))return}else{nt(f,g,Ae(404,{pathname:S}),{flushSync:j});return}}ue.set(f,J);let ke=Re,Q=(await de("action",w,Y,[x],N,f))[x.route.id];if(Y.signal.aborted){ue.get(f)===J&&ue.delete(f);return}if(d.v7_fetcherPersist&&pe.has(f)){if(vt(Q)||Ie(Q)){Ke(f,it(void 0));return}}else{if(vt(Q))if(ue.delete(f),Ce>ke){Ke(f,it(void 0));return}else return _e.add(f),Ke(f,Bt(A)),Z(Y,Q,!1,{fetcherSubmission:A,preventScrollReset:M});if(Ie(Q)){nt(f,g,Q.error);return}}if(lt(Q))throw Ae(400,{type:"defer-action"});let me=w.navigation.location||w.location,St=xt(e.history,me,J.signal),Mt=i||s,rt=w.navigation.state!=="idle"?mt(Mt,w.navigation.location,l):w.matches;I(rt,"Didn't find any matches after fetcher action");let Ye=++Re;Se.set(f,Ye);let Gn=Bt(A,Q.data);w.fetchers.set(f,Gn);let[At,pt]=Kr(e.history,w,rt,A,me,!1,d.v7_skipActionErrorRevalidation,Oe,Te,Ze,pe,Ue,_e,Mt,l,[x.route.id,Q]);pt.filter(ve=>ve.key!==f).forEach(ve=>{let Et=ve.key,zr=w.fetchers.get(Et),Va=Bt(void 0,zr?zr.data:void 0);w.fetchers.set(Et,Va),st(Et),ve.controller&&ue.set(Et,ve.controller)}),xe({fetchers:new Map(w.fetchers)});let fn=()=>pt.forEach(ve=>st(ve.key));J.signal.addEventListener("abort",fn);let{loaderResults:hn,fetcherResults:X}=await tt(w,rt,At,pt,St);if(J.signal.aborted)return;J.signal.removeEventListener("abort",fn),Se.delete(f),ue.delete(f),pt.forEach(ve=>ue.delete(ve.key));let ge=pn(hn);if(ge)return Z(St,ge.result,!1,{preventScrollReset:M});if(ge=pn(X),ge)return _e.add(ge.key),Z(St,ge.result,!1,{preventScrollReset:M});let{loaderData:Ct,errors:Dt}=to(w,rt,hn,void 0,pt,X,Me);if(w.fetchers.has(f)){let ve=it(Q.data);w.fetchers.set(f,ve)}jr(Ye),w.navigation.state==="loading"&&Ye>Ce?(I(P,"Expected pending action"),B&&B.abort(),et(w.navigation.location,{matches:rt,loaderData:Ct,errors:Dt,fetchers:new Map(w.fetchers)})):(xe({errors:Dt,loaderData:no(w.loaderData,Ct,rt,Dt),fetchers:new Map(w.fetchers)}),Oe=!1)}async function re(f,g,S,x,N,F,j,M,A){let O=w.fetchers.get(f);Ke(f,Bt(A,O?O.data:void 0),{flushSync:j});let D=new AbortController,J=xt(e.history,S,D.signal);if(F){let Q=await dn(N,new URL(J.url).pathname,J.signal,f);if(Q.type==="aborted")return;if(Q.type==="error"){nt(f,g,Q.error,{flushSync:j});return}else if(Q.matches)N=Q.matches,x=zt(N,S);else{nt(f,g,Ae(404,{pathname:S}),{flushSync:j});return}}ue.set(f,D);let Y=Re,le=(await de("loader",w,J,[x],N,f))[x.route.id];if(lt(le)&&(le=await Er(le,J.signal,!0)||le),ue.get(f)===D&&ue.delete(f),!J.signal.aborted){if(pe.has(f)){Ke(f,it(void 0));return}if(vt(le))if(Ce>Y){Ke(f,it(void 0));return}else{_e.add(f),await Z(J,le,!1,{preventScrollReset:M});return}if(Ie(le)){nt(f,g,le.error);return}I(!lt(le),"Unhandled fetcher deferred data"),Ke(f,it(le.data))}}async function Z(f,g,S,x){let{submission:N,fetcherSubmission:F,preventScrollReset:j,replace:M}=x===void 0?{}:x;g.response.headers.has("X-Remix-Revalidate")&&(Oe=!0);let A=g.response.headers.get("Location");I(A,"Expected a Location header on the redirect Response"),A=Qr(A,new URL(f.url),l);let O=Wt(w.location,A,{_isRedirect:!0});if(n){let Q=!1;if(g.response.headers.has("X-Remix-Reload-Document"))Q=!0;else if(Cr.test(A)){const me=e.history.createURL(A);Q=me.origin!==t.location.origin||Je(me.pathname,l)==null}if(Q){M?t.location.replace(A):t.location.assign(A);return}}B=null;let D=M===!0||g.response.headers.has("X-Remix-Replace")?ye.Replace:ye.Push,{formMethod:J,formAction:Y,formEncType:ke}=w.navigation;!N&&!F&&J&&Y&&ke&&(N=so(w.navigation));let le=N||F;if(ys.has(g.response.status)&&le&&ze(le.formMethod))await Ge(D,O,{submission:fe({},le,{formAction:A}),preventScrollReset:j||G,enableViewTransition:S?ae:void 0});else{let Q=Xn(O,N);await Ge(D,O,{overrideNavigation:Q,fetcherSubmission:F,preventScrollReset:j||G,enableViewTransition:S?ae:void 0})}}async function de(f,g,S,x,N,F){let j,M={};try{j=await ks(c,f,g,S,x,N,F,a,o)}catch(A){return x.forEach(O=>{M[O.route.id]={type:oe.error,error:A}}),M}for(let[A,O]of Object.entries(j))if(Os(O)){let D=O.result;M[A]={type:oe.redirect,response:Ts(D,S,A,N,l,d.v7_relativeSplatPath)}}else M[A]=await Ns(O);return M}async function tt(f,g,S,x,N){let F=f.matches,j=de("loader",f,N,S,g,null),M=Promise.all(x.map(async D=>{if(D.matches&&D.match&&D.controller){let Y=(await de("loader",f,xt(e.history,D.path,D.controller.signal),[D.match],D.matches,D.key))[D.match.route.id];return{[D.key]:Y}}else return Promise.resolve({[D.key]:{type:oe.error,error:Ae(404,{pathname:D.path})}})})),A=await j,O=(await M).reduce((D,J)=>Object.assign(D,J),{});return await Promise.all([Ds(g,A,N.signal,F,f.loaderData),Fs(g,O,x)]),{loaderResults:A,fetcherResults:O}}function ht(){Oe=!0,Te.push(...Zn()),Ue.forEach((f,g)=>{ue.has(g)&&Ze.add(g),st(g)})}function Ke(f,g,S){S===void 0&&(S={}),w.fetchers.set(f,g),xe({fetchers:new Map(w.fetchers)},{flushSync:(S&&S.flushSync)===!0})}function nt(f,g,S,x){x===void 0&&(x={});let N=gt(w.matches,g);ln(f),xe({errors:{[N.route.id]:S},fetchers:new Map(w.fetchers)},{flushSync:(x&&x.flushSync)===!0})}function Fr(f){return se.set(f,(se.get(f)||0)+1),pe.has(f)&&pe.delete(f),w.fetchers.get(f)||ws}function ln(f){let g=w.fetchers.get(f);ue.has(f)&&!(g&&g.state==="loading"&&Se.has(f))&&st(f),Ue.delete(f),Se.delete(f),_e.delete(f),d.v7_fetcherPersist&&pe.delete(f),Ze.delete(f),w.fetchers.delete(f)}function Fa(f){let g=(se.get(f)||0)-1;g<=0?(se.delete(f),pe.add(f),d.v7_fetcherPersist||ln(f)):se.set(f,g),xe({fetchers:new Map(w.fetchers)})}function st(f){let g=ue.get(f);g&&(g.abort(),ue.delete(f))}function Ir(f){for(let g of f){let S=Fr(g),x=it(S.data);w.fetchers.set(g,x)}}function Br(){let f=[],g=!1;for(let S of _e){let x=w.fetchers.get(S);I(x,"Expected fetcher: "+S),x.state==="loading"&&(_e.delete(S),f.push(S),g=!0)}return Ir(f),g}function jr(f){let g=[];for(let[S,x]of Se)if(x<f){let N=w.fetchers.get(S);I(N,"Expected fetcher: "+S),N.state==="loading"&&(st(S),Se.delete(S),g.push(S))}return Ir(g),g.length>0}function Ia(f,g){let S=w.blockers.get(f)||It;return Ee.get(f)!==g&&Ee.set(f,g),S}function Hr(f){w.blockers.delete(f),Ee.delete(f)}function cn(f,g){let S=w.blockers.get(f)||It;I(S.state==="unblocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="proceeding"||S.state==="blocked"&&g.state==="unblocked"||S.state==="proceeding"&&g.state==="unblocked","Invalid blocker state transition: "+S.state+" -> "+g.state);let x=new Map(w.blockers);x.set(f,g),xe({blockers:x})}function Ur(f){let{currentLocation:g,nextLocation:S,historyAction:x}=f;if(Ee.size===0)return;Ee.size>1&&be(!1,"A router only supports one blocker at a time");let N=Array.from(Ee.entries()),[F,j]=N[N.length-1],M=w.blockers.get(F);if(!(M&&M.state==="proceeding")&&j({currentLocation:g,nextLocation:S,historyAction:x}))return F}function Wn(f){let g=Ae(404,{pathname:f}),S=i||s,{matches:x,route:N}=oo(S);return Zn(),{notFoundMatches:x,route:N,error:g}}function Zn(f){let g=[];return Me.forEach((S,x)=>{(!f||f(x))&&(S.cancel(),g.push(x),Me.delete(x))}),g}function Ba(f,g,S){if(m=f,v=g,p=S||null,!R&&w.navigation===Yn){R=!0;let x=$r(w.location,w.matches);x!=null&&xe({restoreScrollPosition:x})}return()=>{m=null,v=null,p=null}}function Vr(f,g){return p&&p(f,g.map(x=>Ka(x,w.loaderData)))||f.key}function ja(f,g){if(m&&v){let S=Vr(f,g);m[S]=v()}}function $r(f,g){if(m){let S=Vr(f,g),x=m[S];if(typeof x=="number")return x}return null}function un(f,g,S){if(u)if(f){if(Object.keys(f[0].params).length>0)return{active:!0,matches:wn(g,S,l,!0)}}else return{active:!0,matches:wn(g,S,l,!0)||[]};return{active:!1,matches:null}}async function dn(f,g,S,x){if(!u)return{type:"success",matches:f};let N=f;for(;;){let F=i==null,j=i||s,M=a;try{await u({signal:S,path:g,matches:N,fetcherKey:x,patch:(D,J)=>{S.aborted||Xr(D,J,j,M,o)}})}catch(D){return{type:"error",error:D,partialMatches:N}}finally{F&&!S.aborted&&(s=[...s])}if(S.aborted)return{type:"aborted"};let A=mt(j,g,l);if(A)return{type:"success",matches:A};let O=wn(j,g,l,!0);if(!O||N.length===O.length&&N.every((D,J)=>D.route.id===O[J].route.id))return{type:"success",matches:null};N=O}}function Ha(f){a={},i=Rn(f,o,void 0,a)}function Ua(f,g){let S=i==null;Xr(f,g,i||s,a,o),S&&(s=[...s],xe({}))}return H={get basename(){return l},get future(){return d},get state(){return w},get routes(){return s},get window(){return t},initialize:rn,subscribe:on,enableScrollRestoration:Ba,navigate:an,fetch:K,revalidate:sn,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:Fr,deleteFetcher:Fa,dispose:qn,getBlocker:Ia,deleteBlocker:Hr,patchRoutes:Ua,_internalFetchControllers:ue,_internalActiveDeferreds:Me,_internalSetRoutes:Ha},H}function Cs(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function lr(e,t,n,r,o,a,s,i){let l,c;if(s){l=[];for(let d of t)if(l.push(d),d.route.id===s){c=d;break}}else l=t,c=t[t.length-1];let u=Dn(o||".",An(l,a),Je(e.pathname,n)||e.pathname,i==="path");if(o==null&&(u.search=e.search,u.hash=e.hash),(o==null||o===""||o===".")&&c){let d=xr(u.search);if(c.route.index&&!d)u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&d){let h=new URLSearchParams(u.search),y=h.getAll("index");h.delete("index"),y.filter(p=>p).forEach(p=>h.append("index",p));let m=h.toString();u.search=m?"?"+m:""}}return r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Qe([n,u.pathname])),ct(u)}function Zr(e,t,n,r){if(!r||!Cs(r))return{path:n};if(r.formMethod&&!As(r.formMethod))return{path:n,error:Ae(405,{method:r.formMethod})};let o=()=>({path:n,error:Ae(400,{type:"invalid-body"})}),a=r.formMethod||"get",s=e?a.toUpperCase():a.toLowerCase(),i=Ho(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ze(s))return o();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,m)=>{let[p,v]=m;return""+y+p+"="+v+`
11
- `},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!ze(s))return o();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:i,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return o()}}}I(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=ur(r.formData),c=r.formData;else if(r.body instanceof FormData)l=ur(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=eo(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=eo(l)}catch{return o()}let u={formMethod:s,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(ze(u.formMethod))return{path:n,submission:u};let d=dt(n);return t&&d.search&&xr(d.search)&&l.append("index",""),d.search="?"+l,{path:ct(d),submission:u}}function Gr(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(o=>o.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function Kr(e,t,n,r,o,a,s,i,l,c,u,d,h,y,m,p){let v=p?Ie(p[1])?p[1].error:p[1].data:void 0,R=e.createURL(t.location),b=e.createURL(o),k=n;a&&t.errors?k=Gr(n,Object.keys(t.errors)[0],!0):p&&Ie(p[1])&&(k=Gr(n,p[0]));let _=p?p[1].statusCode:void 0,T=s&&_&&_>=400,H=k.filter((P,G)=>{let{route:B}=P;if(B.lazy)return!0;if(B.loader==null)return!1;if(a)return cr(B,t.loaderData,t.errors);if(Es(t.loaderData,t.matches[G],P)||l.some(te=>te===P.route.id))return!0;let ae=t.matches[G],ee=P;return Yr(P,fe({currentUrl:R,currentParams:ae.params,nextUrl:b,nextParams:ee.params},r,{actionResult:v,actionStatus:_,defaultShouldRevalidate:T?!1:i||R.pathname+R.search===b.pathname+b.search||R.search!==b.search||Bo(ae,ee)}))}),w=[];return d.forEach((P,G)=>{if(a||!n.some(he=>he.route.id===P.routeId)||u.has(G))return;let B=mt(y,P.path,m);if(!B){w.push({key:G,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let ae=t.fetchers.get(G),ee=zt(B,P.path),te=!1;h.has(G)?te=!1:c.has(G)?(c.delete(G),te=!0):ae&&ae.state!=="idle"&&ae.data===void 0?te=i:te=Yr(ee,fe({currentUrl:R,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:n[n.length-1].params},r,{actionResult:v,actionStatus:_,defaultShouldRevalidate:T?!1:i})),te&&w.push({key:G,routeId:P.routeId,path:P.path,matches:B,match:ee,controller:new AbortController})}),[H,w]}function cr(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,o=n!=null&&n[e.id]!==void 0;return!r&&o?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!o}function Es(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function Bo(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Yr(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function Xr(e,t,n,r,o){var a;let s;if(e){let c=r[e];I(c,"No route found to patch children into: routeId = "+e),c.children||(c.children=[]),s=c.children}else s=n;let i=t.filter(c=>!s.some(u=>jo(c,u))),l=Rn(i,o,[e||"_","patch",String(((a=s)==null?void 0:a.length)||"0")],r);s.push(...l)}function jo(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var o;return(o=t.children)==null?void 0:o.some(a=>jo(n,a))}):!1}async function xs(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];I(o,"No route found in manifest");let a={};for(let s in r){let l=o[s]!==void 0&&s!=="hasErrorBoundary";be(!l,'Route "'+o.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!Za.has(s)&&(a[s]=r[s])}Object.assign(o,a),Object.assign(o,fe({},t(o),{lazy:void 0}))}async function Rs(e){let{matches:t}=e,n=t.filter(o=>o.shouldLoad);return(await Promise.all(n.map(o=>o.resolve()))).reduce((o,a,s)=>Object.assign(o,{[n[s].route.id]:a}),{})}async function ks(e,t,n,r,o,a,s,i,l,c){let u=a.map(y=>y.route.lazy?xs(y.route,l,i):void 0),d=a.map((y,m)=>{let p=u[m],v=o.some(b=>b.route.id===y.route.id);return fe({},y,{shouldLoad:v,resolve:async b=>(b&&r.method==="GET"&&(y.route.lazy||y.route.loader)&&(v=!0),v?Ls(t,r,y,p,b,c):Promise.resolve({type:oe.data,result:void 0}))})}),h=await e({matches:d,request:r,params:a[0].params,fetcherKey:s,context:c});try{await Promise.all(u)}catch{}return h}async function Ls(e,t,n,r,o,a){let s,i,l=c=>{let u,d=new Promise((m,p)=>u=p);i=()=>u(),t.signal.addEventListener("abort",i);let h=m=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):c({request:t,params:n.params,context:a},...m!==void 0?[m]:[]),y=(async()=>{try{return{type:"data",result:await(o?o(p=>h(p)):h())}}catch(m){return{type:"error",result:m}}})();return Promise.race([y,d])};try{let c=n.route[e];if(r)if(c){let u,[d]=await Promise.all([l(c).catch(h=>{u=h}),r]);if(u!==void 0)throw u;s=d}else if(await r,c=n.route[e],c)s=await l(c);else if(e==="action"){let u=new URL(t.url),d=u.pathname+u.search;throw Ae(405,{method:t.method,pathname:d,routeId:n.route.id})}else return{type:oe.data,result:void 0};else if(c)s=await l(c);else{let u=new URL(t.url),d=u.pathname+u.search;throw Ae(404,{pathname:d})}I(s.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:oe.error,result:c}}finally{i&&t.signal.removeEventListener("abort",i)}return s}async function Ns(e){let{result:t,type:n}=e;if(Uo(t)){let d;try{let h=t.headers.get("Content-Type");h&&/\bapplication\/json\b/.test(h)?t.body==null?d=null:d=await t.json():d=await t.text()}catch(h){return{type:oe.error,error:h}}return n===oe.error?{type:oe.error,error:new Ln(t.status,t.statusText,d),statusCode:t.status,headers:t.headers}:{type:oe.data,data:d,statusCode:t.status,headers:t.headers}}if(n===oe.error){if(ao(t)){var r,o;if(t.data instanceof Error){var a,s;return{type:oe.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:oe.error,error:new Ln(((r=t.init)==null?void 0:r.status)||500,void 0,t.data),statusCode:Zt(t)?t.status:void 0,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}}return{type:oe.error,error:t,statusCode:Zt(t)?t.status:void 0}}if(Ms(t)){var i,l;return{type:oe.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}if(ao(t)){var c,u;return{type:oe.data,data:t.data,statusCode:(c=t.init)==null?void 0:c.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:oe.data,data:t}}function Ts(e,t,n,r,o,a){let s=e.headers.get("Location");if(I(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Cr.test(s)){let i=r.slice(0,r.findIndex(l=>l.route.id===n)+1);s=lr(new URL(t.url),i,o,!0,s,a),e.headers.set("Location",s)}return e}function Qr(e,t,n){if(Cr.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),a=Je(o.pathname,n)!=null;if(o.origin===t.origin&&a)return o.pathname+o.search+o.hash}return e}function xt(e,t,n,r){let o=e.createURL(Ho(t)).toString(),a={signal:n};if(r&&ze(r.formMethod)){let{formMethod:s,formEncType:i}=r;a.method=s.toUpperCase(),i==="application/json"?(a.headers=new Headers({"Content-Type":i}),a.body=JSON.stringify(r.json)):i==="text/plain"?a.body=r.text:i==="application/x-www-form-urlencoded"&&r.formData?a.body=ur(r.formData):a.body=r.formData}return new Request(o,a)}function ur(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function eo(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function _s(e,t,n,r,o){let a={},s=null,i,l=!1,c={},u=n&&Ie(n[1])?n[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let h=d.route.id,y=t[h];if(I(!vt(y),"Cannot handle redirect results in processLoaderData"),Ie(y)){let m=y.error;u!==void 0&&(m=u,u=void 0),s=s||{};{let p=gt(e,h);s[p.route.id]==null&&(s[p.route.id]=m)}a[h]=void 0,l||(l=!0,i=Zt(y.error)?y.error.status:500),y.headers&&(c[h]=y.headers)}else lt(y)?(r.set(h,y.deferredData),a[h]=y.deferredData.data,y.statusCode!=null&&y.statusCode!==200&&!l&&(i=y.statusCode),y.headers&&(c[h]=y.headers)):(a[h]=y.data,y.statusCode&&y.statusCode!==200&&!l&&(i=y.statusCode),y.headers&&(c[h]=y.headers))}),u!==void 0&&n&&(s={[n[0]]:u},a[n[0]]=void 0),{loaderData:a,errors:s,statusCode:i||200,loaderHeaders:c}}function to(e,t,n,r,o,a,s){let{loaderData:i,errors:l}=_s(t,n,r,s);return o.forEach(c=>{let{key:u,match:d,controller:h}=c,y=a[u];if(I(y,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(Ie(y)){let m=gt(e.matches,d==null?void 0:d.route.id);l&&l[m.route.id]||(l=fe({},l,{[m.route.id]:y.error})),e.fetchers.delete(u)}else if(vt(y))I(!1,"Unhandled fetcher revalidation redirect");else if(lt(y))I(!1,"Unhandled fetcher deferred data");else{let m=it(y.data);e.fetchers.set(u,m)}}),{loaderData:i,errors:l}}function no(e,t,n,r){let o=fe({},t);for(let a of n){let s=a.route.id;if(t.hasOwnProperty(s)?t[s]!==void 0&&(o[s]=t[s]):e[s]!==void 0&&a.route.loader&&(o[s]=e[s]),r&&r.hasOwnProperty(s))break}return o}function ro(e){return e?Ie(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function gt(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function oo(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ae(e,t){let{pathname:n,routeId:r,method:o,type:a,message:s}=t===void 0?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="Bad Request",o&&n&&r?l="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":a==="defer-action"?l="defer() is not supported in actions":a==="invalid-body"&&(l="Unable to encode submission body")):e===403?(i="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):e===404?(i="Not Found",l='No route matches URL "'+n+'"'):e===405&&(i="Method Not Allowed",o&&n&&r?l="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new Ln(e||500,i,new Error(l),!0)}function pn(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,o]=t[n];if(vt(o))return{key:r,result:o}}}function Ho(e){let t=typeof e=="string"?dt(e):e;return ct(fe({},t,{hash:""}))}function Ps(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Os(e){return Uo(e.result)&&vs.has(e.result.status)}function lt(e){return e.type===oe.deferred}function Ie(e){return e.type===oe.error}function vt(e){return(e&&e.type)===oe.redirect}function ao(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Ms(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Uo(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function As(e){return gs.has(e.toLowerCase())}function ze(e){return ps.has(e.toLowerCase())}async function Ds(e,t,n,r,o){let a=Object.entries(t);for(let s=0;s<a.length;s++){let[i,l]=a[s],c=e.find(h=>(h==null?void 0:h.route.id)===i);if(!c)continue;let u=r.find(h=>h.route.id===c.route.id),d=u!=null&&!Bo(u,c)&&(o&&o[c.route.id])!==void 0;lt(l)&&d&&await Er(l,n,!1).then(h=>{h&&(t[i]=h)})}}async function Fs(e,t,n){for(let r=0;r<n.length;r++){let{key:o,routeId:a,controller:s}=n[r],i=t[o];e.find(c=>(c==null?void 0:c.route.id)===a)&&lt(i)&&(I(s,"Expected an AbortController for revalidating fetcher deferred result"),await Er(i,s.signal,!0).then(c=>{c&&(t[o]=c)}))}}async function Er(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:oe.data,data:e.deferredData.unwrappedData}}catch(o){return{type:oe.error,error:o}}return{type:oe.data,data:e.deferredData.data}}}function xr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function zt(e,t){let n=typeof t=="string"?dt(t).search:t.search;if(e[e.length-1].route.index&&xr(n||""))return e[e.length-1];let r=Do(e);return r[r.length-1]}function so(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:a,json:s}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function Xn(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Is(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Bt(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Bs(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function it(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function js(e,t){try{let n=e.sessionStorage.getItem(Io);if(n){let r=JSON.parse(n);for(let[o,a]of Object.entries(r||{}))a&&Array.isArray(a)&&t.set(o,new Set(a||[]))}}catch{}}function Hs(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(Io,JSON.stringify(n))}catch(r){be(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
10
+ */function fe(){return fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fe.apply(this,arguments)}var ye;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ye||(ye={}));const Jr="popstate";function Ja(e){e===void 0&&(e={});function t(r,o){let{pathname:a,search:s,hash:i}=r.location;return Wt("",{pathname:a,search:s,hash:i},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:ct(o)}return Wa(t,n,null,e)}function I(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function be(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function qa(){return Math.random().toString(36).substr(2,8)}function qr(e,t){return{usr:e.state,key:e.key,idx:t}}function Wt(e,t,n,r){return n===void 0&&(n=null),fe({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?dt(t):t,{state:n,key:t&&t.key||r||qa()})}function ct(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function dt(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Wa(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:a=!1}=r,s=o.history,i=ye.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(fe({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){i=ye.Pop;let v=u(),R=v==null?null:v-c;c=v,l&&l({action:i,location:p.location,delta:R})}function h(v,R){i=ye.Push;let b=Wt(p.location,v,R);c=u()+1;let k=qr(b,c),P=p.createHref(b);try{s.pushState(k,"",P)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;o.location.assign(P)}a&&l&&l({action:i,location:p.location,delta:1})}function y(v,R){i=ye.Replace;let b=Wt(p.location,v,R);c=u();let k=qr(b,c),P=p.createHref(b);s.replaceState(k,"",P),a&&l&&l({action:i,location:p.location,delta:0})}function m(v){let R=o.location.origin!=="null"?o.location.origin:o.location.href,b=typeof v=="string"?v:ct(v);return b=b.replace(/ $/,"%20"),I(R,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,R)}let p={get action(){return i},get location(){return e(o,s)},listen(v){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Jr,d),l=v,()=>{o.removeEventListener(Jr,d),l=null}},createHref(v){return t(o,v)},createURL:m,encodeLocation(v){let R=m(v);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:h,replace:y,go(v){return s.go(v)}};return p}var oe;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(oe||(oe={}));const Za=new Set(["lazy","caseSensitive","path","id","index","children"]);function Ga(e){return e.index===!0}function Rn(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,a)=>{let s=[...n,String(a)],i=typeof o.id=="string"?o.id:s.join("-");if(I(o.index!==!0||!o.children,"Cannot specify children on an index route"),I(!r[i],'Found a route id collision on id "'+i+`". Route id's must be globally unique within Data Router usages`),Ga(o)){let l=fe({},o,t(o),{id:i});return r[i]=l,l}else{let l=fe({},o,t(o),{id:i,children:void 0});return r[i]=l,o.children&&(l.children=Rn(o.children,t,s,r)),l}})}function mt(e,t,n){return n===void 0&&(n="/"),wn(e,t,n,!1)}function wn(e,t,n,r){let o=typeof t=="string"?dt(t):t,a=Je(o.pathname||"/",n);if(a==null)return null;let s=Mo(e);Ya(s);let i=null;for(let l=0;i==null&&l<s.length;++l){let c=ls(a);i=ss(s[l],c,r)}return i}function Ka(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function Mo(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(a,s,i)=>{let l={relativePath:i===void 0?a.path||"":i,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};l.relativePath.startsWith("/")&&(I(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Qe([r,l.relativePath]),u=n.concat(l);a.children&&a.children.length>0&&(I(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Mo(a.children,t,u,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:os(c,a.index),routesMeta:u})};return e.forEach((a,s)=>{var i;if(a.path===""||!((i=a.path)!=null&&i.includes("?")))o(a,s);else for(let l of Ao(a.path))o(a,s,l)}),t}function Ao(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return o?[a,""]:[a];let s=Ao(r.join("/")),i=[];return i.push(...s.map(l=>l===""?a:[a,l].join("/"))),o&&i.push(...s),i.map(l=>e.startsWith("/")&&l===""?"/":l)}function Ya(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:as(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Xa=/^:[\w-]+$/,Qa=3,es=2,ts=1,ns=10,rs=-2,Wr=e=>e==="*";function os(e,t){let n=e.split("/"),r=n.length;return n.some(Wr)&&(r+=rs),t&&(r+=es),n.filter(o=>!Wr(o)).reduce((o,a)=>o+(Xa.test(a)?Qa:a===""?ts:ns),r)}function as(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function ss(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,o={},a="/",s=[];for(let i=0;i<r.length;++i){let l=r[i],c=i===r.length-1,u=a==="/"?t:t.slice(a.length)||"/",d=kn({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),h=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=kn({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;Object.assign(o,d.params),s.push({params:o,pathname:Qe([a,d.pathname]),pathnameBase:ds(Qe([a,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(a=Qe([a,d.pathnameBase]))}return s}function kn(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=is(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],s=a.replace(/(.)\/+$/,"$1"),i=o.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:h,isOptional:y}=u;if(h==="*"){let p=i[d]||"";s=a.slice(0,a.length-p.length).replace(/(.)\/+$/,"$1")}const m=i[d];return y&&!m?c[h]=void 0:c[h]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:s,pattern:e}}function is(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),be(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,i,l)=>(r.push({paramName:i,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function ls(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return be(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Je(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function cs(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?dt(e):e;return{pathname:n?n.startsWith("/")?n:us(n,t):t,search:fs(r),hash:hs(o)}}function us(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Kn(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Do(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function An(e,t){let n=Do(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Dn(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=dt(e):(o=fe({},e),I(!o.pathname||!o.pathname.includes("?"),Kn("?","pathname","search",o)),I(!o.pathname||!o.pathname.includes("#"),Kn("#","pathname","hash",o)),I(!o.search||!o.search.includes("#"),Kn("#","search","hash",o)));let a=e===""||o.pathname==="",s=a?"/":o.pathname,i;if(s==null)i=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;o.pathname=h.join("/")}i=d>=0?t[d]:"/"}let l=cs(o,i),c=s&&s!=="/"&&s.endsWith("/"),u=(a||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Qe=e=>e.join("/").replace(/\/\/+/g,"/"),ds=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),fs=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,hs=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Ln{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Zt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Fo=["post","put","patch","delete"],ps=new Set(Fo),ms=["get",...Fo],gs=new Set(ms),vs=new Set([301,302,303,307,308]),ys=new Set([307,308]),Yn={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ws={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},It={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Cr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bs=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Io="remix-router-transitions";function Ss(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;I(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let f=e.detectErrorBoundary;o=g=>({hasErrorBoundary:f(g)})}else o=bs;let a={},s=Rn(e.routes,o,void 0,a),i,l=e.basename||"/",c=e.dataStrategy||Rs,u=e.patchRoutesOnNavigation,d=fe({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,y=new Set,m=null,p=null,v=null,R=e.hydrationData!=null,b=mt(s,e.history.location,l),k=!1,P=null;if(b==null&&!u){let f=Ae(404,{pathname:e.history.location.pathname}),{matches:g,route:S}=oo(s);b=g,P={[S.id]:f}}b&&!e.hydrationData&&un(b,s,e.history.location.pathname).active&&(b=null);let T;if(b)if(b.some(f=>f.route.lazy))T=!1;else if(!b.some(f=>f.route.loader))T=!0;else if(d.v7_partialHydration){let f=e.hydrationData?e.hydrationData.loaderData:null,g=e.hydrationData?e.hydrationData.errors:null;if(g){let S=b.findIndex(x=>g[x.route.id]!==void 0);T=b.slice(0,S+1).every(x=>!cr(x.route,f,g))}else T=b.every(S=>!cr(S.route,f,g))}else T=e.hydrationData!=null;else if(T=!1,b=[],d.v7_partialHydration){let f=un(null,s,e.history.location.pathname);f.active&&f.matches&&(k=!0,b=f.matches)}let H,w={historyAction:e.history.action,location:e.history.location,matches:b,initialized:T,navigation:Yn,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||P,fetchers:new Map,blockers:new Map},_=ye.Pop,G=!1,B,ae=!1,ee=new Map,te=null,he=!1,Oe=!1,Te=[],Ze=new Set,ue=new Map,Re=0,Ce=-1,Se=new Map,Pe=new Set,Ue=new Map,se=new Map,pe=new Set,Me=new Map,Ee=new Map,ft;function rn(){if(h=e.history.listen(f=>{let{action:g,location:S,delta:x}=f;if(ft){ft(),ft=void 0;return}be(Ee.size===0||x!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let N=Ur({currentLocation:w.location,nextLocation:S,historyAction:g});if(N&&x!=null){let F=new Promise(j=>{ft=j});e.history.go(x*-1),cn(N,{state:"blocked",location:S,proceed(){cn(N,{state:"proceeding",proceed:void 0,reset:void 0,location:S}),F.then(()=>e.history.go(x))},reset(){let j=new Map(w.blockers);j.set(N,It),xe({blockers:j})}});return}return Ge(g,S)}),n){js(t,ee);let f=()=>Hs(t,ee);t.addEventListener("pagehide",f),te=()=>t.removeEventListener("pagehide",f)}return w.initialized||Ge(ye.Pop,w.location,{initialHydration:!0}),H}function qn(){h&&h(),te&&te(),y.clear(),B&&B.abort(),w.fetchers.forEach((f,g)=>ln(g)),w.blockers.forEach((f,g)=>Hr(g))}function on(f){return y.add(f),()=>y.delete(f)}function xe(f,g){g===void 0&&(g={}),w=fe({},w,f);let S=[],x=[];d.v7_fetcherPersist&&w.fetchers.forEach((N,F)=>{N.state==="idle"&&(pe.has(F)?x.push(F):S.push(F))}),pe.forEach(N=>{!w.fetchers.has(N)&&!ue.has(N)&&x.push(N)}),[...y].forEach(N=>N(w,{deletedFetchers:x,viewTransitionOpts:g.viewTransitionOpts,flushSync:g.flushSync===!0})),d.v7_fetcherPersist?(S.forEach(N=>w.fetchers.delete(N)),x.forEach(N=>ln(N))):x.forEach(N=>pe.delete(N))}function et(f,g,S){var x,N;let{flushSync:F}=S===void 0?{}:S,j=w.actionData!=null&&w.navigation.formMethod!=null&&ze(w.navigation.formMethod)&&w.navigation.state==="loading"&&((x=f.state)==null?void 0:x._isRedirect)!==!0,M;g.actionData?Object.keys(g.actionData).length>0?M=g.actionData:M=null:j?M=w.actionData:M=null;let A=g.loaderData?no(w.loaderData,g.loaderData,g.matches||[],g.errors):w.loaderData,O=w.blockers;O.size>0&&(O=new Map(O),O.forEach((Y,ke)=>O.set(ke,It)));let D=G===!0||w.navigation.formMethod!=null&&ze(w.navigation.formMethod)&&((N=f.state)==null?void 0:N._isRedirect)!==!0;i&&(s=i,i=void 0),he||_===ye.Pop||(_===ye.Push?e.history.push(f,f.state):_===ye.Replace&&e.history.replace(f,f.state));let J;if(_===ye.Pop){let Y=ee.get(w.location.pathname);Y&&Y.has(f.pathname)?J={currentLocation:w.location,nextLocation:f}:ee.has(f.pathname)&&(J={currentLocation:f,nextLocation:w.location})}else if(ae){let Y=ee.get(w.location.pathname);Y?Y.add(f.pathname):(Y=new Set([f.pathname]),ee.set(w.location.pathname,Y)),J={currentLocation:w.location,nextLocation:f}}xe(fe({},g,{actionData:M,loaderData:A,historyAction:_,location:f,initialized:!0,navigation:Yn,revalidation:"idle",restoreScrollPosition:$r(f,g.matches||w.matches),preventScrollReset:D,blockers:O}),{viewTransitionOpts:J,flushSync:F===!0}),_=ye.Pop,G=!1,ae=!1,he=!1,Oe=!1,Te=[]}async function an(f,g){if(typeof f=="number"){e.history.go(f);return}let S=lr(w.location,w.matches,l,d.v7_prependBasename,f,d.v7_relativeSplatPath,g==null?void 0:g.fromRouteId,g==null?void 0:g.relative),{path:x,submission:N,error:F}=Zr(d.v7_normalizeFormMethod,!1,S,g),j=w.location,M=Wt(w.location,x,g&&g.state);M=fe({},M,e.history.encodeLocation(M));let A=g&&g.replace!=null?g.replace:void 0,O=ye.Push;A===!0?O=ye.Replace:A===!1||N!=null&&ze(N.formMethod)&&N.formAction===w.location.pathname+w.location.search&&(O=ye.Replace);let D=g&&"preventScrollReset"in g?g.preventScrollReset===!0:void 0,J=(g&&g.flushSync)===!0,Y=Ur({currentLocation:j,nextLocation:M,historyAction:O});if(Y){cn(Y,{state:"blocked",location:M,proceed(){cn(Y,{state:"proceeding",proceed:void 0,reset:void 0,location:M}),an(f,g)},reset(){let ke=new Map(w.blockers);ke.set(Y,It),xe({blockers:ke})}});return}return await Ge(O,M,{submission:N,pendingError:F,preventScrollReset:D,replace:g&&g.replace,enableViewTransition:g&&g.viewTransition,flushSync:J})}function sn(){if(ht(),xe({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){Ge(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}Ge(_||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:ae===!0})}}async function Ge(f,g,S){B&&B.abort(),B=null,_=f,he=(S&&S.startUninterruptedRevalidation)===!0,ja(w.location,w.matches),G=(S&&S.preventScrollReset)===!0,ae=(S&&S.enableViewTransition)===!0;let x=i||s,N=S&&S.overrideNavigation,F=S!=null&&S.initialHydration&&w.matches&&w.matches.length>0&&!k?w.matches:mt(x,g,l),j=(S&&S.flushSync)===!0;if(F&&w.initialized&&!Oe&&_s(w.location,g)&&!(S&&S.submission&&ze(S.submission.formMethod))){et(g,{matches:F},{flushSync:j});return}let M=un(F,x,g.pathname);if(M.active&&M.matches&&(F=M.matches),!F){let{error:le,notFoundMatches:Q,route:me}=Wn(g.pathname);et(g,{matches:Q,loaderData:{},errors:{[me.id]:le}},{flushSync:j});return}B=new AbortController;let A=xt(e.history,g,B.signal,S&&S.submission),O;if(S&&S.pendingError)O=[gt(F).route.id,{type:oe.error,error:S.pendingError}];else if(S&&S.submission&&ze(S.submission.formMethod)){let le=await V(A,g,S.submission,F,M.active,{replace:S.replace,flushSync:j});if(le.shortCircuited)return;if(le.pendingActionResult){let[Q,me]=le.pendingActionResult;if(Ie(me)&&Zt(me.error)&&me.error.status===404){B=null,et(g,{matches:le.matches,loaderData:{},errors:{[Q]:me.error}});return}}F=le.matches||F,O=le.pendingActionResult,N=Xn(g,S.submission),j=!1,M.active=!1,A=xt(e.history,A.url,A.signal)}let{shortCircuited:D,matches:J,loaderData:Y,errors:ke}=await U(A,g,F,M.active,N,S&&S.submission,S&&S.fetcherSubmission,S&&S.replace,S&&S.initialHydration===!0,j,O);D||(B=null,et(g,fe({matches:J||F},ro(O),{loaderData:Y,errors:ke})))}async function V(f,g,S,x,N,F){F===void 0&&(F={}),ht();let j=Is(g,S);if(xe({navigation:j},{flushSync:F.flushSync===!0}),N){let O=await dn(x,g.pathname,f.signal);if(O.type==="aborted")return{shortCircuited:!0};if(O.type==="error"){let D=gt(O.partialMatches).route.id;return{matches:O.partialMatches,pendingActionResult:[D,{type:oe.error,error:O.error}]}}else if(O.matches)x=O.matches;else{let{notFoundMatches:D,error:J,route:Y}=Wn(g.pathname);return{matches:D,pendingActionResult:[Y.id,{type:oe.error,error:J}]}}}let M,A=zt(x,g);if(!A.route.action&&!A.route.lazy)M={type:oe.error,error:Ae(405,{method:f.method,pathname:g.pathname,routeId:A.route.id})};else if(M=(await de("action",w,f,[A],x,null))[A.route.id],f.signal.aborted)return{shortCircuited:!0};if(vt(M)){let O;return F&&F.replace!=null?O=F.replace:O=Qr(M.response.headers.get("Location"),new URL(f.url),l)===w.location.pathname+w.location.search,await Z(f,M,!0,{submission:S,replace:O}),{shortCircuited:!0}}if(lt(M))throw Ae(400,{type:"defer-action"});if(Ie(M)){let O=gt(x,A.route.id);return(F&&F.replace)!==!0&&(_=ye.Push),{matches:x,pendingActionResult:[O.route.id,M]}}return{matches:x,pendingActionResult:[A.route.id,M]}}async function U(f,g,S,x,N,F,j,M,A,O,D){let J=N||Xn(g,F),Y=F||j||so(J),ke=!he&&(!d.v7_partialHydration||!A);if(x){if(ke){let ge=ne(D);xe(fe({navigation:J},ge!==void 0?{actionData:ge}:{}),{flushSync:O})}let X=await dn(S,g.pathname,f.signal);if(X.type==="aborted")return{shortCircuited:!0};if(X.type==="error"){let ge=gt(X.partialMatches).route.id;return{matches:X.partialMatches,loaderData:{},errors:{[ge]:X.error}}}else if(X.matches)S=X.matches;else{let{error:ge,notFoundMatches:Ct,route:Dt}=Wn(g.pathname);return{matches:Ct,loaderData:{},errors:{[Dt.id]:ge}}}}let le=i||s,[Q,me]=Kr(e.history,w,S,Y,g,d.v7_partialHydration&&A===!0,d.v7_skipActionErrorRevalidation,Oe,Te,Ze,pe,Ue,Pe,le,l,D);if(Zn(X=>!(S&&S.some(ge=>ge.route.id===X))||Q&&Q.some(ge=>ge.route.id===X)),Ce=++Re,Q.length===0&&me.length===0){let X=Br();return et(g,fe({matches:S,loaderData:{},errors:D&&Ie(D[1])?{[D[0]]:D[1].error}:null},ro(D),X?{fetchers:new Map(w.fetchers)}:{}),{flushSync:O}),{shortCircuited:!0}}if(ke){let X={};if(!x){X.navigation=J;let ge=ne(D);ge!==void 0&&(X.actionData=ge)}me.length>0&&(X.fetchers=z(me)),xe(X,{flushSync:O})}me.forEach(X=>{st(X.key),X.controller&&ue.set(X.key,X.controller)});let St=()=>me.forEach(X=>st(X.key));B&&B.signal.addEventListener("abort",St);let{loaderResults:Mt,fetcherResults:rt}=await tt(w,S,Q,me,f);if(f.signal.aborted)return{shortCircuited:!0};B&&B.signal.removeEventListener("abort",St),me.forEach(X=>ue.delete(X.key));let Ye=pn(Mt);if(Ye)return await Z(f,Ye.result,!0,{replace:M}),{shortCircuited:!0};if(Ye=pn(rt),Ye)return Pe.add(Ye.key),await Z(f,Ye.result,!0,{replace:M}),{shortCircuited:!0};let{loaderData:Gn,errors:At}=to(w,S,Mt,D,me,rt,Me);Me.forEach((X,ge)=>{X.subscribe(Ct=>{(Ct||X.done)&&Me.delete(ge)})}),d.v7_partialHydration&&A&&w.errors&&(At=fe({},w.errors,At));let pt=Br(),fn=jr(Ce),hn=pt||fn||me.length>0;return fe({matches:S,loaderData:Gn,errors:At},hn?{fetchers:new Map(w.fetchers)}:{})}function ne(f){if(f&&!Ie(f[1]))return{[f[0]]:f[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function z(f){return f.forEach(g=>{let S=w.fetchers.get(g.key),x=Bt(void 0,S?S.data:void 0);w.fetchers.set(g.key,x)}),new Map(w.fetchers)}function K(f,g,S,x){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");st(f);let N=(x&&x.flushSync)===!0,F=i||s,j=lr(w.location,w.matches,l,d.v7_prependBasename,S,d.v7_relativeSplatPath,g,x==null?void 0:x.relative),M=mt(F,j,l),A=un(M,F,j);if(A.active&&A.matches&&(M=A.matches),!M){nt(f,g,Ae(404,{pathname:j}),{flushSync:N});return}let{path:O,submission:D,error:J}=Zr(d.v7_normalizeFormMethod,!0,j,x);if(J){nt(f,g,J,{flushSync:N});return}let Y=zt(M,O),ke=(x&&x.preventScrollReset)===!0;if(D&&ze(D.formMethod)){q(f,g,O,Y,M,A.active,N,ke,D);return}Ue.set(f,{routeId:g,path:O}),re(f,g,O,Y,M,A.active,N,ke,D)}async function q(f,g,S,x,N,F,j,M,A){ht(),Ue.delete(f);function O(ve){if(!ve.route.action&&!ve.route.lazy){let Et=Ae(405,{method:A.formMethod,pathname:S,routeId:g});return nt(f,g,Et,{flushSync:j}),!0}return!1}if(!F&&O(x))return;let D=w.fetchers.get(f);Ke(f,Bs(A,D),{flushSync:j});let J=new AbortController,Y=xt(e.history,S,J.signal,A);if(F){let ve=await dn(N,new URL(Y.url).pathname,Y.signal,f);if(ve.type==="aborted")return;if(ve.type==="error"){nt(f,g,ve.error,{flushSync:j});return}else if(ve.matches){if(N=ve.matches,x=zt(N,S),O(x))return}else{nt(f,g,Ae(404,{pathname:S}),{flushSync:j});return}}ue.set(f,J);let ke=Re,Q=(await de("action",w,Y,[x],N,f))[x.route.id];if(Y.signal.aborted){ue.get(f)===J&&ue.delete(f);return}if(d.v7_fetcherPersist&&pe.has(f)){if(vt(Q)||Ie(Q)){Ke(f,it(void 0));return}}else{if(vt(Q))if(ue.delete(f),Ce>ke){Ke(f,it(void 0));return}else return Pe.add(f),Ke(f,Bt(A)),Z(Y,Q,!1,{fetcherSubmission:A,preventScrollReset:M});if(Ie(Q)){nt(f,g,Q.error);return}}if(lt(Q))throw Ae(400,{type:"defer-action"});let me=w.navigation.location||w.location,St=xt(e.history,me,J.signal),Mt=i||s,rt=w.navigation.state!=="idle"?mt(Mt,w.navigation.location,l):w.matches;I(rt,"Didn't find any matches after fetcher action");let Ye=++Re;Se.set(f,Ye);let Gn=Bt(A,Q.data);w.fetchers.set(f,Gn);let[At,pt]=Kr(e.history,w,rt,A,me,!1,d.v7_skipActionErrorRevalidation,Oe,Te,Ze,pe,Ue,Pe,Mt,l,[x.route.id,Q]);pt.filter(ve=>ve.key!==f).forEach(ve=>{let Et=ve.key,zr=w.fetchers.get(Et),Va=Bt(void 0,zr?zr.data:void 0);w.fetchers.set(Et,Va),st(Et),ve.controller&&ue.set(Et,ve.controller)}),xe({fetchers:new Map(w.fetchers)});let fn=()=>pt.forEach(ve=>st(ve.key));J.signal.addEventListener("abort",fn);let{loaderResults:hn,fetcherResults:X}=await tt(w,rt,At,pt,St);if(J.signal.aborted)return;J.signal.removeEventListener("abort",fn),Se.delete(f),ue.delete(f),pt.forEach(ve=>ue.delete(ve.key));let ge=pn(hn);if(ge)return Z(St,ge.result,!1,{preventScrollReset:M});if(ge=pn(X),ge)return Pe.add(ge.key),Z(St,ge.result,!1,{preventScrollReset:M});let{loaderData:Ct,errors:Dt}=to(w,rt,hn,void 0,pt,X,Me);if(w.fetchers.has(f)){let ve=it(Q.data);w.fetchers.set(f,ve)}jr(Ye),w.navigation.state==="loading"&&Ye>Ce?(I(_,"Expected pending action"),B&&B.abort(),et(w.navigation.location,{matches:rt,loaderData:Ct,errors:Dt,fetchers:new Map(w.fetchers)})):(xe({errors:Dt,loaderData:no(w.loaderData,Ct,rt,Dt),fetchers:new Map(w.fetchers)}),Oe=!1)}async function re(f,g,S,x,N,F,j,M,A){let O=w.fetchers.get(f);Ke(f,Bt(A,O?O.data:void 0),{flushSync:j});let D=new AbortController,J=xt(e.history,S,D.signal);if(F){let Q=await dn(N,new URL(J.url).pathname,J.signal,f);if(Q.type==="aborted")return;if(Q.type==="error"){nt(f,g,Q.error,{flushSync:j});return}else if(Q.matches)N=Q.matches,x=zt(N,S);else{nt(f,g,Ae(404,{pathname:S}),{flushSync:j});return}}ue.set(f,D);let Y=Re,le=(await de("loader",w,J,[x],N,f))[x.route.id];if(lt(le)&&(le=await Er(le,J.signal,!0)||le),ue.get(f)===D&&ue.delete(f),!J.signal.aborted){if(pe.has(f)){Ke(f,it(void 0));return}if(vt(le))if(Ce>Y){Ke(f,it(void 0));return}else{Pe.add(f),await Z(J,le,!1,{preventScrollReset:M});return}if(Ie(le)){nt(f,g,le.error);return}I(!lt(le),"Unhandled fetcher deferred data"),Ke(f,it(le.data))}}async function Z(f,g,S,x){let{submission:N,fetcherSubmission:F,preventScrollReset:j,replace:M}=x===void 0?{}:x;g.response.headers.has("X-Remix-Revalidate")&&(Oe=!0);let A=g.response.headers.get("Location");I(A,"Expected a Location header on the redirect Response"),A=Qr(A,new URL(f.url),l);let O=Wt(w.location,A,{_isRedirect:!0});if(n){let Q=!1;if(g.response.headers.has("X-Remix-Reload-Document"))Q=!0;else if(Cr.test(A)){const me=e.history.createURL(A);Q=me.origin!==t.location.origin||Je(me.pathname,l)==null}if(Q){M?t.location.replace(A):t.location.assign(A);return}}B=null;let D=M===!0||g.response.headers.has("X-Remix-Replace")?ye.Replace:ye.Push,{formMethod:J,formAction:Y,formEncType:ke}=w.navigation;!N&&!F&&J&&Y&&ke&&(N=so(w.navigation));let le=N||F;if(ys.has(g.response.status)&&le&&ze(le.formMethod))await Ge(D,O,{submission:fe({},le,{formAction:A}),preventScrollReset:j||G,enableViewTransition:S?ae:void 0});else{let Q=Xn(O,N);await Ge(D,O,{overrideNavigation:Q,fetcherSubmission:F,preventScrollReset:j||G,enableViewTransition:S?ae:void 0})}}async function de(f,g,S,x,N,F){let j,M={};try{j=await ks(c,f,g,S,x,N,F,a,o)}catch(A){return x.forEach(O=>{M[O.route.id]={type:oe.error,error:A}}),M}for(let[A,O]of Object.entries(j))if(Os(O)){let D=O.result;M[A]={type:oe.redirect,response:Ts(D,S,A,N,l,d.v7_relativeSplatPath)}}else M[A]=await Ns(O);return M}async function tt(f,g,S,x,N){let F=f.matches,j=de("loader",f,N,S,g,null),M=Promise.all(x.map(async D=>{if(D.matches&&D.match&&D.controller){let Y=(await de("loader",f,xt(e.history,D.path,D.controller.signal),[D.match],D.matches,D.key))[D.match.route.id];return{[D.key]:Y}}else return Promise.resolve({[D.key]:{type:oe.error,error:Ae(404,{pathname:D.path})}})})),A=await j,O=(await M).reduce((D,J)=>Object.assign(D,J),{});return await Promise.all([Ds(g,A,N.signal,F,f.loaderData),Fs(g,O,x)]),{loaderResults:A,fetcherResults:O}}function ht(){Oe=!0,Te.push(...Zn()),Ue.forEach((f,g)=>{ue.has(g)&&Ze.add(g),st(g)})}function Ke(f,g,S){S===void 0&&(S={}),w.fetchers.set(f,g),xe({fetchers:new Map(w.fetchers)},{flushSync:(S&&S.flushSync)===!0})}function nt(f,g,S,x){x===void 0&&(x={});let N=gt(w.matches,g);ln(f),xe({errors:{[N.route.id]:S},fetchers:new Map(w.fetchers)},{flushSync:(x&&x.flushSync)===!0})}function Fr(f){return se.set(f,(se.get(f)||0)+1),pe.has(f)&&pe.delete(f),w.fetchers.get(f)||ws}function ln(f){let g=w.fetchers.get(f);ue.has(f)&&!(g&&g.state==="loading"&&Se.has(f))&&st(f),Ue.delete(f),Se.delete(f),Pe.delete(f),d.v7_fetcherPersist&&pe.delete(f),Ze.delete(f),w.fetchers.delete(f)}function Fa(f){let g=(se.get(f)||0)-1;g<=0?(se.delete(f),pe.add(f),d.v7_fetcherPersist||ln(f)):se.set(f,g),xe({fetchers:new Map(w.fetchers)})}function st(f){let g=ue.get(f);g&&(g.abort(),ue.delete(f))}function Ir(f){for(let g of f){let S=Fr(g),x=it(S.data);w.fetchers.set(g,x)}}function Br(){let f=[],g=!1;for(let S of Pe){let x=w.fetchers.get(S);I(x,"Expected fetcher: "+S),x.state==="loading"&&(Pe.delete(S),f.push(S),g=!0)}return Ir(f),g}function jr(f){let g=[];for(let[S,x]of Se)if(x<f){let N=w.fetchers.get(S);I(N,"Expected fetcher: "+S),N.state==="loading"&&(st(S),Se.delete(S),g.push(S))}return Ir(g),g.length>0}function Ia(f,g){let S=w.blockers.get(f)||It;return Ee.get(f)!==g&&Ee.set(f,g),S}function Hr(f){w.blockers.delete(f),Ee.delete(f)}function cn(f,g){let S=w.blockers.get(f)||It;I(S.state==="unblocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="proceeding"||S.state==="blocked"&&g.state==="unblocked"||S.state==="proceeding"&&g.state==="unblocked","Invalid blocker state transition: "+S.state+" -> "+g.state);let x=new Map(w.blockers);x.set(f,g),xe({blockers:x})}function Ur(f){let{currentLocation:g,nextLocation:S,historyAction:x}=f;if(Ee.size===0)return;Ee.size>1&&be(!1,"A router only supports one blocker at a time");let N=Array.from(Ee.entries()),[F,j]=N[N.length-1],M=w.blockers.get(F);if(!(M&&M.state==="proceeding")&&j({currentLocation:g,nextLocation:S,historyAction:x}))return F}function Wn(f){let g=Ae(404,{pathname:f}),S=i||s,{matches:x,route:N}=oo(S);return Zn(),{notFoundMatches:x,route:N,error:g}}function Zn(f){let g=[];return Me.forEach((S,x)=>{(!f||f(x))&&(S.cancel(),g.push(x),Me.delete(x))}),g}function Ba(f,g,S){if(m=f,v=g,p=S||null,!R&&w.navigation===Yn){R=!0;let x=$r(w.location,w.matches);x!=null&&xe({restoreScrollPosition:x})}return()=>{m=null,v=null,p=null}}function Vr(f,g){return p&&p(f,g.map(x=>Ka(x,w.loaderData)))||f.key}function ja(f,g){if(m&&v){let S=Vr(f,g);m[S]=v()}}function $r(f,g){if(m){let S=Vr(f,g),x=m[S];if(typeof x=="number")return x}return null}function un(f,g,S){if(u)if(f){if(Object.keys(f[0].params).length>0)return{active:!0,matches:wn(g,S,l,!0)}}else return{active:!0,matches:wn(g,S,l,!0)||[]};return{active:!1,matches:null}}async function dn(f,g,S,x){if(!u)return{type:"success",matches:f};let N=f;for(;;){let F=i==null,j=i||s,M=a;try{await u({signal:S,path:g,matches:N,fetcherKey:x,patch:(D,J)=>{S.aborted||Xr(D,J,j,M,o)}})}catch(D){return{type:"error",error:D,partialMatches:N}}finally{F&&!S.aborted&&(s=[...s])}if(S.aborted)return{type:"aborted"};let A=mt(j,g,l);if(A)return{type:"success",matches:A};let O=wn(j,g,l,!0);if(!O||N.length===O.length&&N.every((D,J)=>D.route.id===O[J].route.id))return{type:"success",matches:null};N=O}}function Ha(f){a={},i=Rn(f,o,void 0,a)}function Ua(f,g){let S=i==null;Xr(f,g,i||s,a,o),S&&(s=[...s],xe({}))}return H={get basename(){return l},get future(){return d},get state(){return w},get routes(){return s},get window(){return t},initialize:rn,subscribe:on,enableScrollRestoration:Ba,navigate:an,fetch:K,revalidate:sn,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:Fr,deleteFetcher:Fa,dispose:qn,getBlocker:Ia,deleteBlocker:Hr,patchRoutes:Ua,_internalFetchControllers:ue,_internalActiveDeferreds:Me,_internalSetRoutes:Ha},H}function Cs(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function lr(e,t,n,r,o,a,s,i){let l,c;if(s){l=[];for(let d of t)if(l.push(d),d.route.id===s){c=d;break}}else l=t,c=t[t.length-1];let u=Dn(o||".",An(l,a),Je(e.pathname,n)||e.pathname,i==="path");if(o==null&&(u.search=e.search,u.hash=e.hash),(o==null||o===""||o===".")&&c){let d=xr(u.search);if(c.route.index&&!d)u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&d){let h=new URLSearchParams(u.search),y=h.getAll("index");h.delete("index"),y.filter(p=>p).forEach(p=>h.append("index",p));let m=h.toString();u.search=m?"?"+m:""}}return r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Qe([n,u.pathname])),ct(u)}function Zr(e,t,n,r){if(!r||!Cs(r))return{path:n};if(r.formMethod&&!As(r.formMethod))return{path:n,error:Ae(405,{method:r.formMethod})};let o=()=>({path:n,error:Ae(400,{type:"invalid-body"})}),a=r.formMethod||"get",s=e?a.toUpperCase():a.toLowerCase(),i=Ho(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ze(s))return o();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,m)=>{let[p,v]=m;return""+y+p+"="+v+`
11
+ `},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!ze(s))return o();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:i,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return o()}}}I(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=ur(r.formData),c=r.formData;else if(r.body instanceof FormData)l=ur(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=eo(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=eo(l)}catch{return o()}let u={formMethod:s,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(ze(u.formMethod))return{path:n,submission:u};let d=dt(n);return t&&d.search&&xr(d.search)&&l.append("index",""),d.search="?"+l,{path:ct(d),submission:u}}function Gr(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(o=>o.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function Kr(e,t,n,r,o,a,s,i,l,c,u,d,h,y,m,p){let v=p?Ie(p[1])?p[1].error:p[1].data:void 0,R=e.createURL(t.location),b=e.createURL(o),k=n;a&&t.errors?k=Gr(n,Object.keys(t.errors)[0],!0):p&&Ie(p[1])&&(k=Gr(n,p[0]));let P=p?p[1].statusCode:void 0,T=s&&P&&P>=400,H=k.filter((_,G)=>{let{route:B}=_;if(B.lazy)return!0;if(B.loader==null)return!1;if(a)return cr(B,t.loaderData,t.errors);if(Es(t.loaderData,t.matches[G],_)||l.some(te=>te===_.route.id))return!0;let ae=t.matches[G],ee=_;return Yr(_,fe({currentUrl:R,currentParams:ae.params,nextUrl:b,nextParams:ee.params},r,{actionResult:v,actionStatus:P,defaultShouldRevalidate:T?!1:i||R.pathname+R.search===b.pathname+b.search||R.search!==b.search||Bo(ae,ee)}))}),w=[];return d.forEach((_,G)=>{if(a||!n.some(he=>he.route.id===_.routeId)||u.has(G))return;let B=mt(y,_.path,m);if(!B){w.push({key:G,routeId:_.routeId,path:_.path,matches:null,match:null,controller:null});return}let ae=t.fetchers.get(G),ee=zt(B,_.path),te=!1;h.has(G)?te=!1:c.has(G)?(c.delete(G),te=!0):ae&&ae.state!=="idle"&&ae.data===void 0?te=i:te=Yr(ee,fe({currentUrl:R,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:n[n.length-1].params},r,{actionResult:v,actionStatus:P,defaultShouldRevalidate:T?!1:i})),te&&w.push({key:G,routeId:_.routeId,path:_.path,matches:B,match:ee,controller:new AbortController})}),[H,w]}function cr(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,o=n!=null&&n[e.id]!==void 0;return!r&&o?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!o}function Es(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function Bo(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Yr(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function Xr(e,t,n,r,o){var a;let s;if(e){let c=r[e];I(c,"No route found to patch children into: routeId = "+e),c.children||(c.children=[]),s=c.children}else s=n;let i=t.filter(c=>!s.some(u=>jo(c,u))),l=Rn(i,o,[e||"_","patch",String(((a=s)==null?void 0:a.length)||"0")],r);s.push(...l)}function jo(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var o;return(o=t.children)==null?void 0:o.some(a=>jo(n,a))}):!1}async function xs(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];I(o,"No route found in manifest");let a={};for(let s in r){let l=o[s]!==void 0&&s!=="hasErrorBoundary";be(!l,'Route "'+o.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!Za.has(s)&&(a[s]=r[s])}Object.assign(o,a),Object.assign(o,fe({},t(o),{lazy:void 0}))}async function Rs(e){let{matches:t}=e,n=t.filter(o=>o.shouldLoad);return(await Promise.all(n.map(o=>o.resolve()))).reduce((o,a,s)=>Object.assign(o,{[n[s].route.id]:a}),{})}async function ks(e,t,n,r,o,a,s,i,l,c){let u=a.map(y=>y.route.lazy?xs(y.route,l,i):void 0),d=a.map((y,m)=>{let p=u[m],v=o.some(b=>b.route.id===y.route.id);return fe({},y,{shouldLoad:v,resolve:async b=>(b&&r.method==="GET"&&(y.route.lazy||y.route.loader)&&(v=!0),v?Ls(t,r,y,p,b,c):Promise.resolve({type:oe.data,result:void 0}))})}),h=await e({matches:d,request:r,params:a[0].params,fetcherKey:s,context:c});try{await Promise.all(u)}catch{}return h}async function Ls(e,t,n,r,o,a){let s,i,l=c=>{let u,d=new Promise((m,p)=>u=p);i=()=>u(),t.signal.addEventListener("abort",i);let h=m=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):c({request:t,params:n.params,context:a},...m!==void 0?[m]:[]),y=(async()=>{try{return{type:"data",result:await(o?o(p=>h(p)):h())}}catch(m){return{type:"error",result:m}}})();return Promise.race([y,d])};try{let c=n.route[e];if(r)if(c){let u,[d]=await Promise.all([l(c).catch(h=>{u=h}),r]);if(u!==void 0)throw u;s=d}else if(await r,c=n.route[e],c)s=await l(c);else if(e==="action"){let u=new URL(t.url),d=u.pathname+u.search;throw Ae(405,{method:t.method,pathname:d,routeId:n.route.id})}else return{type:oe.data,result:void 0};else if(c)s=await l(c);else{let u=new URL(t.url),d=u.pathname+u.search;throw Ae(404,{pathname:d})}I(s.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:oe.error,result:c}}finally{i&&t.signal.removeEventListener("abort",i)}return s}async function Ns(e){let{result:t,type:n}=e;if(Uo(t)){let d;try{let h=t.headers.get("Content-Type");h&&/\bapplication\/json\b/.test(h)?t.body==null?d=null:d=await t.json():d=await t.text()}catch(h){return{type:oe.error,error:h}}return n===oe.error?{type:oe.error,error:new Ln(t.status,t.statusText,d),statusCode:t.status,headers:t.headers}:{type:oe.data,data:d,statusCode:t.status,headers:t.headers}}if(n===oe.error){if(ao(t)){var r,o;if(t.data instanceof Error){var a,s;return{type:oe.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:oe.error,error:new Ln(((r=t.init)==null?void 0:r.status)||500,void 0,t.data),statusCode:Zt(t)?t.status:void 0,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}}return{type:oe.error,error:t,statusCode:Zt(t)?t.status:void 0}}if(Ms(t)){var i,l;return{type:oe.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}if(ao(t)){var c,u;return{type:oe.data,data:t.data,statusCode:(c=t.init)==null?void 0:c.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:oe.data,data:t}}function Ts(e,t,n,r,o,a){let s=e.headers.get("Location");if(I(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Cr.test(s)){let i=r.slice(0,r.findIndex(l=>l.route.id===n)+1);s=lr(new URL(t.url),i,o,!0,s,a),e.headers.set("Location",s)}return e}function Qr(e,t,n){if(Cr.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),a=Je(o.pathname,n)!=null;if(o.origin===t.origin&&a)return o.pathname+o.search+o.hash}return e}function xt(e,t,n,r){let o=e.createURL(Ho(t)).toString(),a={signal:n};if(r&&ze(r.formMethod)){let{formMethod:s,formEncType:i}=r;a.method=s.toUpperCase(),i==="application/json"?(a.headers=new Headers({"Content-Type":i}),a.body=JSON.stringify(r.json)):i==="text/plain"?a.body=r.text:i==="application/x-www-form-urlencoded"&&r.formData?a.body=ur(r.formData):a.body=r.formData}return new Request(o,a)}function ur(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function eo(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Ps(e,t,n,r,o){let a={},s=null,i,l=!1,c={},u=n&&Ie(n[1])?n[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let h=d.route.id,y=t[h];if(I(!vt(y),"Cannot handle redirect results in processLoaderData"),Ie(y)){let m=y.error;u!==void 0&&(m=u,u=void 0),s=s||{};{let p=gt(e,h);s[p.route.id]==null&&(s[p.route.id]=m)}a[h]=void 0,l||(l=!0,i=Zt(y.error)?y.error.status:500),y.headers&&(c[h]=y.headers)}else lt(y)?(r.set(h,y.deferredData),a[h]=y.deferredData.data,y.statusCode!=null&&y.statusCode!==200&&!l&&(i=y.statusCode),y.headers&&(c[h]=y.headers)):(a[h]=y.data,y.statusCode&&y.statusCode!==200&&!l&&(i=y.statusCode),y.headers&&(c[h]=y.headers))}),u!==void 0&&n&&(s={[n[0]]:u},a[n[0]]=void 0),{loaderData:a,errors:s,statusCode:i||200,loaderHeaders:c}}function to(e,t,n,r,o,a,s){let{loaderData:i,errors:l}=Ps(t,n,r,s);return o.forEach(c=>{let{key:u,match:d,controller:h}=c,y=a[u];if(I(y,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(Ie(y)){let m=gt(e.matches,d==null?void 0:d.route.id);l&&l[m.route.id]||(l=fe({},l,{[m.route.id]:y.error})),e.fetchers.delete(u)}else if(vt(y))I(!1,"Unhandled fetcher revalidation redirect");else if(lt(y))I(!1,"Unhandled fetcher deferred data");else{let m=it(y.data);e.fetchers.set(u,m)}}),{loaderData:i,errors:l}}function no(e,t,n,r){let o=fe({},t);for(let a of n){let s=a.route.id;if(t.hasOwnProperty(s)?t[s]!==void 0&&(o[s]=t[s]):e[s]!==void 0&&a.route.loader&&(o[s]=e[s]),r&&r.hasOwnProperty(s))break}return o}function ro(e){return e?Ie(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function gt(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function oo(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ae(e,t){let{pathname:n,routeId:r,method:o,type:a,message:s}=t===void 0?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="Bad Request",o&&n&&r?l="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":a==="defer-action"?l="defer() is not supported in actions":a==="invalid-body"&&(l="Unable to encode submission body")):e===403?(i="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):e===404?(i="Not Found",l='No route matches URL "'+n+'"'):e===405&&(i="Method Not Allowed",o&&n&&r?l="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new Ln(e||500,i,new Error(l),!0)}function pn(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,o]=t[n];if(vt(o))return{key:r,result:o}}}function Ho(e){let t=typeof e=="string"?dt(e):e;return ct(fe({},t,{hash:""}))}function _s(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Os(e){return Uo(e.result)&&vs.has(e.result.status)}function lt(e){return e.type===oe.deferred}function Ie(e){return e.type===oe.error}function vt(e){return(e&&e.type)===oe.redirect}function ao(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Ms(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Uo(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function As(e){return gs.has(e.toLowerCase())}function ze(e){return ps.has(e.toLowerCase())}async function Ds(e,t,n,r,o){let a=Object.entries(t);for(let s=0;s<a.length;s++){let[i,l]=a[s],c=e.find(h=>(h==null?void 0:h.route.id)===i);if(!c)continue;let u=r.find(h=>h.route.id===c.route.id),d=u!=null&&!Bo(u,c)&&(o&&o[c.route.id])!==void 0;lt(l)&&d&&await Er(l,n,!1).then(h=>{h&&(t[i]=h)})}}async function Fs(e,t,n){for(let r=0;r<n.length;r++){let{key:o,routeId:a,controller:s}=n[r],i=t[o];e.find(c=>(c==null?void 0:c.route.id)===a)&&lt(i)&&(I(s,"Expected an AbortController for revalidating fetcher deferred result"),await Er(i,s.signal,!0).then(c=>{c&&(t[o]=c)}))}}async function Er(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:oe.data,data:e.deferredData.unwrappedData}}catch(o){return{type:oe.error,error:o}}return{type:oe.data,data:e.deferredData.data}}}function xr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function zt(e,t){let n=typeof t=="string"?dt(t).search:t.search;if(e[e.length-1].route.index&&xr(n||""))return e[e.length-1];let r=Do(e);return r[r.length-1]}function so(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:a,json:s}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function Xn(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Is(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Bt(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Bs(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function it(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function js(e,t){try{let n=e.sessionStorage.getItem(Io);if(n){let r=JSON.parse(n);for(let[o,a]of Object.entries(r||{}))a&&Array.isArray(a)&&t.set(o,new Set(a||[]))}}catch{}}function Hs(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(Io,JSON.stringify(n))}catch(r){be(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
12
12
  * React Router v6.30.0
13
13
  *
14
14
  * Copyright (c) Remix Software Inc.
@@ -17,9 +17,9 @@
17
17
  * LICENSE.md file in the root directory of this source tree.
18
18
  *
19
19
  * @license MIT
20
- */function Nn(){return Nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nn.apply(this,arguments)}const Tt=E.createContext(null);process.env.NODE_ENV!=="production"&&(Tt.displayName="DataRouter");const Fn=E.createContext(null);process.env.NODE_ENV!=="production"&&(Fn.displayName="DataRouterState");const Us=E.createContext(null);process.env.NODE_ENV!=="production"&&(Us.displayName="Await");const Ve=E.createContext(null);process.env.NODE_ENV!=="production"&&(Ve.displayName="Navigation");const In=E.createContext(null);process.env.NODE_ENV!=="production"&&(In.displayName="Location");const $e=E.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&($e.displayName="Route");const Rr=E.createContext(null);process.env.NODE_ENV!=="production"&&(Rr.displayName="RouteError");function Vs(e,t){let{relative:n}=t===void 0?{}:t;_t()||(process.env.NODE_ENV!=="production"?I(!1,"useHref() may be used only in the context of a <Router> component."):I(!1));let{basename:r,navigator:o}=E.useContext(Ve),{hash:a,pathname:s,search:i}=Qt(e,{relative:n}),l=s;return r!=="/"&&(l=s==="/"?r:Qe([r,s])),o.createHref({pathname:l,search:i,hash:a})}function _t(){return E.useContext(In)!=null}function qe(){return _t()||(process.env.NODE_ENV!=="production"?I(!1,"useLocation() may be used only in the context of a <Router> component."):I(!1)),E.useContext(In).location}const Vo="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function $o(e){E.useContext(Ve).static||E.useLayoutEffect(e)}function Xt(){let{isDataRoute:e}=E.useContext($e);return e?ri():$s()}function $s(){_t()||(process.env.NODE_ENV!=="production"?I(!1,"useNavigate() may be used only in the context of a <Router> component."):I(!1));let e=E.useContext(Tt),{basename:t,future:n,navigator:r}=E.useContext(Ve),{matches:o}=E.useContext($e),{pathname:a}=qe(),s=JSON.stringify(An(o,n.v7_relativeSplatPath)),i=E.useRef(!1);return $o(()=>{i.current=!0}),E.useCallback(function(c,u){if(u===void 0&&(u={}),process.env.NODE_ENV!=="production"&&be(i.current,Vo),!i.current)return;if(typeof c=="number"){r.go(c);return}let d=Dn(c,JSON.parse(s),a,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Qe([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,s,a,e])}const zs=E.createContext(null);function Js(e){let t=E.useContext($e).outlet;return t&&E.createElement(zs.Provider,{value:e},t)}function qs(){let{matches:e}=E.useContext($e),t=e[e.length-1];return t?t.params:{}}function Qt(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=E.useContext(Ve),{matches:o}=E.useContext($e),{pathname:a}=qe(),s=JSON.stringify(An(o,r.v7_relativeSplatPath));return E.useMemo(()=>Dn(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function Ws(e,t,n,r){_t()||(process.env.NODE_ENV!=="production"?I(!1,"useRoutes() may be used only in the context of a <Router> component."):I(!1));let{navigator:o,static:a}=E.useContext(Ve),{matches:s}=E.useContext($e),i=s[s.length-1],l=i?i.params:{},c=i?i.pathname:"/",u=i?i.pathnameBase:"/",d=i&&i.route;if(process.env.NODE_ENV!=="production"){let b=d&&d.path||"";qo(c,!d||b.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+c+'" (under <Route path="'+b+'">) but the ')+`parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
20
+ */function Nn(){return Nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nn.apply(this,arguments)}const Tt=E.createContext(null);process.env.NODE_ENV!=="production"&&(Tt.displayName="DataRouter");const Fn=E.createContext(null);process.env.NODE_ENV!=="production"&&(Fn.displayName="DataRouterState");const Us=E.createContext(null);process.env.NODE_ENV!=="production"&&(Us.displayName="Await");const Ve=E.createContext(null);process.env.NODE_ENV!=="production"&&(Ve.displayName="Navigation");const In=E.createContext(null);process.env.NODE_ENV!=="production"&&(In.displayName="Location");const $e=E.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&($e.displayName="Route");const Rr=E.createContext(null);process.env.NODE_ENV!=="production"&&(Rr.displayName="RouteError");function Vs(e,t){let{relative:n}=t===void 0?{}:t;Pt()||(process.env.NODE_ENV!=="production"?I(!1,"useHref() may be used only in the context of a <Router> component."):I(!1));let{basename:r,navigator:o}=E.useContext(Ve),{hash:a,pathname:s,search:i}=Qt(e,{relative:n}),l=s;return r!=="/"&&(l=s==="/"?r:Qe([r,s])),o.createHref({pathname:l,search:i,hash:a})}function Pt(){return E.useContext(In)!=null}function qe(){return Pt()||(process.env.NODE_ENV!=="production"?I(!1,"useLocation() may be used only in the context of a <Router> component."):I(!1)),E.useContext(In).location}const Vo="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function $o(e){E.useContext(Ve).static||E.useLayoutEffect(e)}function Xt(){let{isDataRoute:e}=E.useContext($e);return e?ri():$s()}function $s(){Pt()||(process.env.NODE_ENV!=="production"?I(!1,"useNavigate() may be used only in the context of a <Router> component."):I(!1));let e=E.useContext(Tt),{basename:t,future:n,navigator:r}=E.useContext(Ve),{matches:o}=E.useContext($e),{pathname:a}=qe(),s=JSON.stringify(An(o,n.v7_relativeSplatPath)),i=E.useRef(!1);return $o(()=>{i.current=!0}),E.useCallback(function(c,u){if(u===void 0&&(u={}),process.env.NODE_ENV!=="production"&&be(i.current,Vo),!i.current)return;if(typeof c=="number"){r.go(c);return}let d=Dn(c,JSON.parse(s),a,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Qe([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,s,a,e])}const zs=E.createContext(null);function Js(e){let t=E.useContext($e).outlet;return t&&E.createElement(zs.Provider,{value:e},t)}function qs(){let{matches:e}=E.useContext($e),t=e[e.length-1];return t?t.params:{}}function Qt(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=E.useContext(Ve),{matches:o}=E.useContext($e),{pathname:a}=qe(),s=JSON.stringify(An(o,r.v7_relativeSplatPath));return E.useMemo(()=>Dn(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function Ws(e,t,n,r){Pt()||(process.env.NODE_ENV!=="production"?I(!1,"useRoutes() may be used only in the context of a <Router> component."):I(!1));let{navigator:o,static:a}=E.useContext(Ve),{matches:s}=E.useContext($e),i=s[s.length-1],l=i?i.params:{},c=i?i.pathname:"/",u=i?i.pathnameBase:"/",d=i&&i.route;if(process.env.NODE_ENV!=="production"){let b=d&&d.path||"";qo(c,!d||b.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+c+'" (under <Route path="'+b+'">) but the ')+`parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
21
21
 
22
- `+('Please change the parent <Route path="'+b+'"> to <Route ')+('path="'+(b==="/"?"*":b+"/*")+'">.'))}let h=qe(),y;y=h;let m=y.pathname||"/",p=m;if(u!=="/"){let b=u.replace(/^\//,"").split("/");p="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=!a&&n&&n.matches&&n.matches.length>0?n.matches:mt(e,{pathname:p});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&be(d||v!=null,'No routes matched location "'+y.pathname+y.search+y.hash+'" '),process.env.NODE_ENV!=="production"&&be(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,'Matched leaf route at location "'+y.pathname+y.search+y.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.')),Xs(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:Qe([u,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:Qe([u,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r)}function Zs(){let e=Jo(),t=Zt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:a},"ErrorBoundary")," or"," ",E.createElement("code",{style:a},"errorElement")," prop on your route."))),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:o},n):null,s)}const Gs=E.createElement(Zs,null);class Ks extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?E.createElement($e.Provider,{value:this.props.routeContext},E.createElement(Rr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ys(e){let{routeContext:t,match:n,children:r}=e,o=E.useContext(Tt);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),E.createElement($e.Provider,{value:t},r)}function Xs(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,i=(o=n)==null?void 0:o.errors;if(i!=null){let u=s.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);u>=0||(process.env.NODE_ENV!=="production"?I(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(i).join(",")):I(!1)),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<s.length;u++){let d=s[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:h,errors:y}=n,m=d.route.loader&&h[d.route.id]===void 0&&(!y||y[d.route.id]===void 0);if(d.route.lazy||m){l=!0,c>=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,d,h)=>{let y,m=!1,p=null,v=null;n&&(y=i&&d.route.id?i[d.route.id]:void 0,p=d.route.errorElement||Gs,l&&(c<0&&h===0?(qo("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,v=null):c===h&&(m=!0,v=d.route.hydrateFallbackElement||null)));let R=t.concat(s.slice(0,h+1)),b=()=>{let k;return y?k=p:m?k=v:d.route.Component?k=E.createElement(d.route.Component,null):d.route.element?k=d.route.element:k=u,E.createElement(Ys,{match:d,routeContext:{outlet:u,matches:R,isDataRoute:n!=null},children:k})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?E.createElement(Ks,{location:n.location,revalidation:n.revalidation,component:p,error:y,children:b(),routeContext:{outlet:null,matches:R,isDataRoute:!0}}):b()},null)}var zo=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(zo||{}),Gt=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Gt||{});function kr(e){return e+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function Qs(e){let t=E.useContext(Tt);return t||(process.env.NODE_ENV!=="production"?I(!1,kr(e)):I(!1)),t}function ei(e){let t=E.useContext(Fn);return t||(process.env.NODE_ENV!=="production"?I(!1,kr(e)):I(!1)),t}function ti(e){let t=E.useContext($e);return t||(process.env.NODE_ENV!=="production"?I(!1,kr(e)):I(!1)),t}function Lr(e){let t=ti(e),n=t.matches[t.matches.length-1];return n.route.id||(process.env.NODE_ENV!=="production"?I(!1,e+' can only be used on routes that contain a unique "id"'):I(!1)),n.route.id}function ni(){return Lr(Gt.UseRouteId)}function Jo(){var e;let t=E.useContext(Rr),n=ei(Gt.UseRouteError),r=Lr(Gt.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function ri(){let{router:e}=Qs(zo.UseNavigateStable),t=Lr(Gt.UseNavigateStable),n=E.useRef(!1);return $o(()=>{n.current=!0}),E.useCallback(function(o,a){a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&be(n.current,Vo),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Nn({fromRouteId:t},a)))},[e,t])}const io={};function qo(e,t,n){!t&&!io[e]&&(io[e]=!0,process.env.NODE_ENV!=="production"&&be(!1,n))}const lo={};function oi(e,t){process.env.NODE_ENV!=="production"&&!lo[t]&&(lo[t]=!0,console.warn(t))}const Rt=(e,t,n)=>oi(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function ai(e,t){(e==null?void 0:e.v7_startTransition)===void 0&&Rt("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||!t.v7_relativeSplatPath)&&Rt("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist===void 0&&Rt("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&Rt("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration===void 0&&Rt("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&Rt("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function si(e){let{to:t,replace:n,state:r,relative:o}=e;_t()||(process.env.NODE_ENV!=="production"?I(!1,"<Navigate> may be used only in the context of a <Router> component."):I(!1));let{future:a,static:s}=E.useContext(Ve);process.env.NODE_ENV!=="production"&&be(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=E.useContext($e),{pathname:l}=qe(),c=Xt(),u=Dn(t,An(i,a.v7_relativeSplatPath),l,o==="path"),d=JSON.stringify(u);return E.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:o}),[c,d,o,n,r]),null}function ii(e){return Js(e.context)}function li(e){let{basename:t="/",children:n=null,location:r,navigationType:o=ye.Pop,navigator:a,static:s=!1,future:i}=e;_t()&&(process.env.NODE_ENV!=="production"?I(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):I(!1));let l=t.replace(/^\/*/,"/"),c=E.useMemo(()=>({basename:l,navigator:a,static:s,future:Nn({v7_relativeSplatPath:!1},i)}),[l,i,a,s]);typeof r=="string"&&(r=dt(r));let{pathname:u="/",search:d="",hash:h="",state:y=null,key:m="default"}=r,p=E.useMemo(()=>{let v=Je(u,l);return v==null?null:{location:{pathname:v,search:d,hash:h,state:y,key:m},navigationType:o}},[l,u,d,h,y,m,o]);return process.env.NODE_ENV!=="production"&&be(p!=null,'<Router basename="'+l+'"> is not able to match the URL '+('"'+u+d+h+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),p==null?null:E.createElement(Ve.Provider,{value:c},E.createElement(In.Provider,{children:n,value:p}))}new Promise(()=>{});function ci(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&be(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:E.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&be(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:E.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&be(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:E.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}/**
22
+ `+('Please change the parent <Route path="'+b+'"> to <Route ')+('path="'+(b==="/"?"*":b+"/*")+'">.'))}let h=qe(),y;y=h;let m=y.pathname||"/",p=m;if(u!=="/"){let b=u.replace(/^\//,"").split("/");p="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=!a&&n&&n.matches&&n.matches.length>0?n.matches:mt(e,{pathname:p});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&be(d||v!=null,'No routes matched location "'+y.pathname+y.search+y.hash+'" '),process.env.NODE_ENV!=="production"&&be(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,'Matched leaf route at location "'+y.pathname+y.search+y.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.')),Xs(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:Qe([u,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:Qe([u,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r)}function Zs(){let e=Jo(),t=Zt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:a},"ErrorBoundary")," or"," ",E.createElement("code",{style:a},"errorElement")," prop on your route."))),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:o},n):null,s)}const Gs=E.createElement(Zs,null);class Ks extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?E.createElement($e.Provider,{value:this.props.routeContext},E.createElement(Rr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ys(e){let{routeContext:t,match:n,children:r}=e,o=E.useContext(Tt);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),E.createElement($e.Provider,{value:t},r)}function Xs(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,i=(o=n)==null?void 0:o.errors;if(i!=null){let u=s.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);u>=0||(process.env.NODE_ENV!=="production"?I(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(i).join(",")):I(!1)),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<s.length;u++){let d=s[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:h,errors:y}=n,m=d.route.loader&&h[d.route.id]===void 0&&(!y||y[d.route.id]===void 0);if(d.route.lazy||m){l=!0,c>=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,d,h)=>{let y,m=!1,p=null,v=null;n&&(y=i&&d.route.id?i[d.route.id]:void 0,p=d.route.errorElement||Gs,l&&(c<0&&h===0?(qo("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,v=null):c===h&&(m=!0,v=d.route.hydrateFallbackElement||null)));let R=t.concat(s.slice(0,h+1)),b=()=>{let k;return y?k=p:m?k=v:d.route.Component?k=E.createElement(d.route.Component,null):d.route.element?k=d.route.element:k=u,E.createElement(Ys,{match:d,routeContext:{outlet:u,matches:R,isDataRoute:n!=null},children:k})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?E.createElement(Ks,{location:n.location,revalidation:n.revalidation,component:p,error:y,children:b(),routeContext:{outlet:null,matches:R,isDataRoute:!0}}):b()},null)}var zo=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(zo||{}),Gt=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Gt||{});function kr(e){return e+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function Qs(e){let t=E.useContext(Tt);return t||(process.env.NODE_ENV!=="production"?I(!1,kr(e)):I(!1)),t}function ei(e){let t=E.useContext(Fn);return t||(process.env.NODE_ENV!=="production"?I(!1,kr(e)):I(!1)),t}function ti(e){let t=E.useContext($e);return t||(process.env.NODE_ENV!=="production"?I(!1,kr(e)):I(!1)),t}function Lr(e){let t=ti(e),n=t.matches[t.matches.length-1];return n.route.id||(process.env.NODE_ENV!=="production"?I(!1,e+' can only be used on routes that contain a unique "id"'):I(!1)),n.route.id}function ni(){return Lr(Gt.UseRouteId)}function Jo(){var e;let t=E.useContext(Rr),n=ei(Gt.UseRouteError),r=Lr(Gt.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function ri(){let{router:e}=Qs(zo.UseNavigateStable),t=Lr(Gt.UseNavigateStable),n=E.useRef(!1);return $o(()=>{n.current=!0}),E.useCallback(function(o,a){a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&be(n.current,Vo),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Nn({fromRouteId:t},a)))},[e,t])}const io={};function qo(e,t,n){!t&&!io[e]&&(io[e]=!0,process.env.NODE_ENV!=="production"&&be(!1,n))}const lo={};function oi(e,t){process.env.NODE_ENV!=="production"&&!lo[t]&&(lo[t]=!0,console.warn(t))}const Rt=(e,t,n)=>oi(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function ai(e,t){(e==null?void 0:e.v7_startTransition)===void 0&&Rt("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||!t.v7_relativeSplatPath)&&Rt("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist===void 0&&Rt("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&Rt("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration===void 0&&Rt("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&Rt("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function si(e){let{to:t,replace:n,state:r,relative:o}=e;Pt()||(process.env.NODE_ENV!=="production"?I(!1,"<Navigate> may be used only in the context of a <Router> component."):I(!1));let{future:a,static:s}=E.useContext(Ve);process.env.NODE_ENV!=="production"&&be(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=E.useContext($e),{pathname:l}=qe(),c=Xt(),u=Dn(t,An(i,a.v7_relativeSplatPath),l,o==="path"),d=JSON.stringify(u);return E.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:o}),[c,d,o,n,r]),null}function ii(e){return Js(e.context)}function li(e){let{basename:t="/",children:n=null,location:r,navigationType:o=ye.Pop,navigator:a,static:s=!1,future:i}=e;Pt()&&(process.env.NODE_ENV!=="production"?I(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):I(!1));let l=t.replace(/^\/*/,"/"),c=E.useMemo(()=>({basename:l,navigator:a,static:s,future:Nn({v7_relativeSplatPath:!1},i)}),[l,i,a,s]);typeof r=="string"&&(r=dt(r));let{pathname:u="/",search:d="",hash:h="",state:y=null,key:m="default"}=r,p=E.useMemo(()=>{let v=Je(u,l);return v==null?null:{location:{pathname:v,search:d,hash:h,state:y,key:m},navigationType:o}},[l,u,d,h,y,m,o]);return process.env.NODE_ENV!=="production"&&be(p!=null,'<Router basename="'+l+'"> is not able to match the URL '+('"'+u+d+h+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),p==null?null:E.createElement(Ve.Provider,{value:c},E.createElement(In.Provider,{children:n,value:p}))}new Promise(()=>{});function ci(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&be(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:E.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&be(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:E.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&be(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:E.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}/**
23
23
  * React Router DOM v6.30.0
24
24
  *
25
25
  * Copyright (c) Remix Software Inc.
@@ -28,16 +28,16 @@
28
28
  * LICENSE.md file in the root directory of this source tree.
29
29
  *
30
30
  * @license MIT
31
- */function ut(){return ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ut.apply(this,arguments)}function Nr(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const bn="get",Sn="application/x-www-form-urlencoded";function Bn(e){return e!=null&&typeof e.tagName=="string"}function ui(e){return Bn(e)&&e.tagName.toLowerCase()==="button"}function di(e){return Bn(e)&&e.tagName.toLowerCase()==="form"}function fi(e){return Bn(e)&&e.tagName.toLowerCase()==="input"}function hi(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function pi(e,t){return e.button===0&&(!t||t==="_self")&&!hi(e)}function dr(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function mi(e,t){let n=dr(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(a=>{n.append(o,a)})}),n}let mn=null;function gi(){if(mn===null)try{new FormData(document.createElement("form"),0),mn=!1}catch{mn=!0}return mn}const vi=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Qn(e){return e!=null&&!vi.has(e)?(process.env.NODE_ENV!=="production"&&be(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+Sn+'"')),null):e}function yi(e,t){let n,r,o,a,s;if(di(e)){let i=e.getAttribute("action");r=i?Je(i,t):null,n=e.getAttribute("method")||bn,o=Qn(e.getAttribute("enctype"))||Sn,a=new FormData(e)}else if(ui(e)||fi(e)&&(e.type==="submit"||e.type==="image")){let i=e.form;if(i==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(r=l?Je(l,t):null,n=e.getAttribute("formmethod")||i.getAttribute("method")||bn,o=Qn(e.getAttribute("formenctype"))||Qn(i.getAttribute("enctype"))||Sn,a=new FormData(i,e),!gi()){let{name:c,type:u,value:d}=e;if(u==="image"){let h=c?c+".":"";a.append(h+"x","0"),a.append(h+"y","0")}else c&&a.append(c,d)}}else{if(Bn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=bn,r=null,o=Sn,s=e}return a&&o==="text/plain"&&(s=a,a=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:a,body:s}}const wi=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],bi=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Si=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"],Ci="6";try{window.__reactRouterVersion=Ci}catch{}function Ei(e,t){return Ss({basename:void 0,future:ut({},void 0,{v7_prependBasename:!0}),history:Ja({window:void 0}),hydrationData:xi(),routes:e,mapRouteProperties:ci,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function xi(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ut({},t,{errors:Ri(t.errors)})),t}function Ri(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new Ln(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let a=window[o.__subType];if(typeof a=="function")try{let s=new a(o.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let a=new Error(o.message);a.stack="",n[r]=a}}else n[r]=o;return n}const Tr=E.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(Tr.displayName="ViewTransition");const Wo=E.createContext(new Map);process.env.NODE_ENV!=="production"&&(Wo.displayName="Fetchers");const ki="startTransition",co=E[ki],Li="flushSync",uo=za[Li];function Ni(e){co?co(e):e()}function jt(e){uo?uo(e):e()}class Ti{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function _i(e){let{fallbackElement:t,router:n,future:r}=e,[o,a]=E.useState(n.state),[s,i]=E.useState(),[l,c]=E.useState({isTransitioning:!1}),[u,d]=E.useState(),[h,y]=E.useState(),[m,p]=E.useState(),v=E.useRef(new Map),{v7_startTransition:R}=r||{},b=E.useCallback(P=>{R?Ni(P):P()},[R]),k=E.useCallback((P,G)=>{let{deletedFetchers:B,flushSync:ae,viewTransitionOpts:ee}=G;P.fetchers.forEach((he,Oe)=>{he.data!==void 0&&v.current.set(Oe,he.data)}),B.forEach(he=>v.current.delete(he));let te=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!ee||te){ae?jt(()=>a(P)):b(()=>a(P));return}if(ae){jt(()=>{h&&(u&&u.resolve(),h.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})});let he=n.window.document.startViewTransition(()=>{jt(()=>a(P))});he.finished.finally(()=>{jt(()=>{d(void 0),y(void 0),i(void 0),c({isTransitioning:!1})})}),jt(()=>y(he));return}h?(u&&u.resolve(),h.skipTransition(),p({state:P,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})):(i(P),c({isTransitioning:!0,flushSync:!1,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation}))},[n.window,h,u,v,b]);E.useLayoutEffect(()=>n.subscribe(k),[n,k]),E.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new Ti)},[l]),E.useEffect(()=>{if(u&&s&&n.window){let P=s,G=u.promise,B=n.window.document.startViewTransition(async()=>{b(()=>a(P)),await G});B.finished.finally(()=>{d(void 0),y(void 0),i(void 0),c({isTransitioning:!1})}),y(B)}},[b,s,u,n.window]),E.useEffect(()=>{u&&s&&o.location.key===s.location.key&&u.resolve()},[u,h,o.location,s]),E.useEffect(()=>{!l.isTransitioning&&m&&(i(m.state),c({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),p(void 0))},[l.isTransitioning,m]),E.useEffect(()=>{process.env.NODE_ENV!=="production"&&be(t==null||!n.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let _=E.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:P=>n.navigate(P),push:(P,G,B)=>n.navigate(P,{state:G,preventScrollReset:B==null?void 0:B.preventScrollReset}),replace:(P,G,B)=>n.navigate(P,{replace:!0,state:G,preventScrollReset:B==null?void 0:B.preventScrollReset})}),[n]),T=n.basename||"/",H=E.useMemo(()=>({router:n,navigator:_,static:!1,basename:T}),[n,_,T]),w=E.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return E.useEffect(()=>ai(r,n.future),[r,n.future]),E.createElement(E.Fragment,null,E.createElement(Tt.Provider,{value:H},E.createElement(Fn.Provider,{value:o},E.createElement(Wo.Provider,{value:v.current},E.createElement(Tr.Provider,{value:l},E.createElement(li,{basename:T,location:o.location,navigationType:o.historyAction,navigator:_,future:w},o.initialized||n.future.v7_partialHydration?E.createElement(Pi,{routes:n.routes,future:n.future,state:o}):t))))),null)}const Pi=E.memo(Oi);function Oi(e){let{routes:t,future:n,state:r}=e;return Ws(t,void 0,r,n)}process.env.NODE_ENV;const Mi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ai=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zo=E.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:a,replace:s,state:i,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,h=Nr(t,wi),{basename:y}=E.useContext(Ve),m,p=!1;if(typeof c=="string"&&Ai.test(c)&&(m=c,Mi))try{let k=new URL(window.location.href),_=c.startsWith("//")?new URL(k.protocol+c):new URL(c),T=Je(_.pathname,y);_.origin===k.origin&&T!=null?c=T+_.search+_.hash:p=!0}catch{process.env.NODE_ENV!=="production"&&be(!1,'<Link to="'+c+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let v=Vs(c,{relative:o}),R=Ii(c,{replace:s,state:i,target:l,preventScrollReset:u,relative:o,viewTransition:d});function b(k){r&&r(k),k.defaultPrevented||R(k)}return E.createElement("a",ut({},h,{href:m||v,onClick:p||a?r:b,ref:n,target:l}))});process.env.NODE_ENV!=="production"&&(Zo.displayName="Link");const Go=E.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:s=!1,style:i,to:l,viewTransition:c,children:u}=t,d=Nr(t,bi),h=Qt(l,{relative:d.relative}),y=qe(),m=E.useContext(Fn),{navigator:p,basename:v}=E.useContext(Ve),R=m!=null&&zi(h)&&c===!0,b=p.encodeLocation?p.encodeLocation(h).pathname:h.pathname,k=y.pathname,_=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;o||(k=k.toLowerCase(),_=_?_.toLowerCase():null,b=b.toLowerCase()),_&&v&&(_=Je(_,v)||_);const T=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let H=k===b||!s&&k.startsWith(b)&&k.charAt(T)==="/",w=_!=null&&(_===b||!s&&_.startsWith(b)&&_.charAt(b.length)==="/"),P={isActive:H,isPending:w,isTransitioning:R},G=H?r:void 0,B;typeof a=="function"?B=a(P):B=[a,H?"active":null,w?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let ae=typeof i=="function"?i(P):i;return E.createElement(Zo,ut({},d,{"aria-current":G,className:B,ref:n,style:ae,to:l,viewTransition:c}),typeof u=="function"?u(P):u)});process.env.NODE_ENV!=="production"&&(Go.displayName="NavLink");const Di=E.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:o,replace:a,state:s,method:i=bn,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:h}=e,y=Nr(e,Si),m=Vi(),p=$i(l,{relative:u}),v=i.toLowerCase()==="get"?"get":"post",R=b=>{if(c&&c(b),b.defaultPrevented)return;b.preventDefault();let k=b.nativeEvent.submitter,_=(k==null?void 0:k.getAttribute("formmethod"))||i;m(k||b.currentTarget,{fetcherKey:n,method:_,navigate:r,replace:a,state:s,relative:u,preventScrollReset:d,viewTransition:h})};return E.createElement("form",ut({ref:t,method:v,action:p,onSubmit:o?c:R},y))});process.env.NODE_ENV!=="production"&&(Di.displayName="Form");process.env.NODE_ENV;var Tn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Tn||(Tn={}));var fo;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fo||(fo={}));function Fi(e){return e+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function Ko(e){let t=E.useContext(Tt);return t||(process.env.NODE_ENV!=="production"?I(!1,Fi(e)):I(!1)),t}function Ii(e,t){let{target:n,replace:r,state:o,preventScrollReset:a,relative:s,viewTransition:i}=t===void 0?{}:t,l=Xt(),c=qe(),u=Qt(e,{relative:s});return E.useCallback(d=>{if(pi(d,n)){d.preventDefault();let h=r!==void 0?r:ct(c)===ct(u);l(e,{replace:h,state:o,preventScrollReset:a,relative:s,viewTransition:i})}},[c,l,u,r,o,n,e,a,s,i])}function Bi(e){process.env.NODE_ENV!=="production"&&be(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=E.useRef(dr(e)),n=E.useRef(!1),r=qe(),o=E.useMemo(()=>mi(r.search,n.current?null:t.current),[r.search]),a=Xt(),s=E.useCallback((i,l)=>{const c=dr(typeof i=="function"?i(o):i);n.current=!0,a("?"+c,l)},[a,o]);return[o,s]}function ji(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let Hi=0,Ui=()=>"__"+String(++Hi)+"__";function Vi(){let{router:e}=Ko(Tn.UseSubmit),{basename:t}=E.useContext(Ve),n=ni();return E.useCallback(function(r,o){o===void 0&&(o={}),ji();let{action:a,method:s,encType:i,formData:l,body:c}=yi(r,t);if(o.navigate===!1){let u=o.fetcherKey||Ui();e.fetch(u,n,o.action||a,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||s,formEncType:o.encType||i,flushSync:o.flushSync})}else e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||s,formEncType:o.encType||i,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,n])}function $i(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=E.useContext(Ve),o=E.useContext($e);o||(process.env.NODE_ENV!=="production"?I(!1,"useFormAction must be used inside a RouteContext"):I(!1));let[a]=o.matches.slice(-1),s=ut({},Qt(e||".",{relative:n})),i=qe();if(e==null){s.search=i.search;let l=new URLSearchParams(s.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(h=>h).forEach(h=>l.append("index",h));let d=l.toString();s.search=d?"?"+d:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Qe([r,s.pathname])),ct(s)}function zi(e,t){t===void 0&&(t={});let n=E.useContext(Tr);n==null&&(process.env.NODE_ENV!=="production"?I(!1,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):I(!1));let{basename:r}=Ko(Tn.useViewTransitionState),o=Qt(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=Je(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Je(n.nextLocation.pathname,r)||n.nextLocation.pathname;return kn(o.pathname,s)!=null||kn(o.pathname,a)!=null}var _r=(e=>(e.Home="Home",e.Orders="Orders",e.Rewards="Rewards",e.Balance="Balance",e.Subscriptions="Subscriptions",e.Tickets="Tickets",e))(_r||{}),Yo=(e=>(e.Home="Home",e.Orders="Orders",e.Rewards="Rewards",e.Balance="Balance",e.Tickets="Tickets",e))(Yo||{});const Ji=[{caption:"Share link",description:"Send the link to your friends in all convenient ways"},{caption:"Purchase",description:"They buy a product from our store"},{caption:"Percentages",description:"You get rewards"}],ho=e=>{let t;const n=new Set,r=(c,u)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const h=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(y=>y(t,h))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,o,i);return i},qi=e=>e?ho(e):ho,Wi=e=>e;function Zi(e,t=Wi){const n=we.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return we.useDebugValue(n),n}const po=e=>{const t=qi(e),n=r=>Zi(t,r);return Object.assign(n,t),n},ie=e=>e?po(e):po,Gi=ie(e=>({action:null,setAction:t=>e(()=>({action:t})),route:_r.Home,setRoute:t=>e(()=>({route:t})),dashInfo:null,setDashInfo:t=>e(()=>({dashInfo:t})),balance:null,setBalance:t=>e(()=>({balance:t})),otpRequest:{requested:!1,email:""},setOtpRequest:t=>e(()=>({otpRequest:t})),balanceSettings:null,setBalanceSettings:t=>e(()=>({balanceSettings:t})),gatewaysDetail:null,setGatewaysDetail:t=>e(()=>({gatewaysDetail:t})),isBalanceModalOpen:!1,setIsBalanceModalOpen:t=>e(()=>({isBalanceModalOpen:t}))})),Ki=ie(e=>({token:localStorage.getItem("token")||null,setToken:t=>e(()=>({token:t})),shopDomain:"",setShopDomain:t=>e(()=>({shopDomain:t})),shopId:"",setShopId:t=>e(()=>({shopId:t})),shopLogo:null,setShopLogo:t=>e(()=>({shopLogo:t})),shopPassword:localStorage.getItem("shopPassword")||"",setShopPassword:t=>e(()=>({shopPassword:t})),shopGeneral:null,setShopGeneral:t=>e(()=>({shopGeneral:t})),shopTerms:null,setShopTerms:t=>e(()=>({shopTerms:t})),shopPrivacyPolicy:null,setShopPrivacyPolicy:t=>e(()=>({shopPrivacyPolicy:t})),shopRefundPolicy:null,setShopRefundPolicy:t=>e(()=>({shopRefundPolicy:t}))}));class Jt extends Error{}Jt.prototype.name="InvalidTokenError";function Yi(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function Xi(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Yi(t)}catch{return atob(t)}}function Xo(e,t){if(typeof e!="string")throw new Jt("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new Jt(`Invalid token specified: missing part #${n+1}`);let o;try{o=Xi(r)}catch(a){throw new Jt(`Invalid token specified: invalid base64 for part #${n+1} (${a.message})`)}try{return JSON.parse(o)}catch(a){throw new Jt(`Invalid token specified: invalid json for part #${n+1} (${a.message})`)}}function Qo(e,t){return function(){return e.apply(t,arguments)}}const{toString:Qi}=Object.prototype,{getPrototypeOf:Pr}=Object,jn=(e=>t=>{const n=Qi.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),We=e=>(e=e.toLowerCase(),t=>jn(t)===e),Hn=e=>t=>typeof t===e,{isArray:Pt}=Array,Kt=Hn("undefined");function el(e){return e!==null&&!Kt(e)&&e.constructor!==null&&!Kt(e.constructor)&&He(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ea=We("ArrayBuffer");function tl(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ea(e.buffer),t}const nl=Hn("string"),He=Hn("function"),ta=Hn("number"),Un=e=>e!==null&&typeof e=="object",rl=e=>e===!0||e===!1,Cn=e=>{if(jn(e)!=="object")return!1;const t=Pr(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ol=We("Date"),al=We("File"),sl=We("Blob"),il=We("FileList"),ll=e=>Un(e)&&He(e.pipe),cl=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||He(e.append)&&((t=jn(e))==="formdata"||t==="object"&&He(e.toString)&&e.toString()==="[object FormData]"))},ul=We("URLSearchParams"),[dl,fl,hl,pl]=["ReadableStream","Request","Response","Headers"].map(We),ml=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function en(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Pt(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let i;for(r=0;r<s;r++)i=a[r],t.call(null,e[i],i,e)}}function na(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const yt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ra=e=>!Kt(e)&&e!==yt;function fr(){const{caseless:e}=ra(this)&&this||{},t={},n=(r,o)=>{const a=e&&na(t,o)||o;Cn(t[a])&&Cn(r)?t[a]=fr(t[a],r):Cn(r)?t[a]=fr({},r):Pt(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&en(arguments[r],n);return t}const gl=(e,t,n,{allOwnKeys:r}={})=>(en(t,(o,a)=>{n&&He(o)?e[a]=Qo(o,n):e[a]=o},{allOwnKeys:r}),e),vl=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yl=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},wl=(e,t,n,r)=>{let o,a,s;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!r||r(s,e,t))&&!i[s]&&(t[s]=e[s],i[s]=!0);e=n!==!1&&Pr(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},bl=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Sl=e=>{if(!e)return null;if(Pt(e))return e;let t=e.length;if(!ta(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Cl=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Pr(Uint8Array)),El=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},xl=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Rl=We("HTMLFormElement"),kl=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),mo=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ll=We("RegExp"),oa=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};en(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},Nl=e=>{oa(e,(t,n)=>{if(He(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(He(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Tl=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return Pt(e)?r(e):r(String(e).split(t)),n},_l=()=>{},Pl=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ol(e){return!!(e&&He(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Ml=e=>{const t=new Array(10),n=(r,o)=>{if(Un(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=Pt(r)?[]:{};return en(r,(s,i)=>{const l=n(s,o+1);!Kt(l)&&(a[i]=l)}),t[o]=void 0,a}}return r};return n(e,0)},Al=We("AsyncFunction"),Dl=e=>e&&(Un(e)||He(e))&&He(e.then)&&He(e.catch),aa=((e,t)=>e?setImmediate:t?((n,r)=>(yt.addEventListener("message",({source:o,data:a})=>{o===yt&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),yt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",He(yt.postMessage)),Fl=typeof queueMicrotask<"u"?queueMicrotask.bind(yt):typeof process<"u"&&process.nextTick||aa,C={isArray:Pt,isArrayBuffer:ea,isBuffer:el,isFormData:cl,isArrayBufferView:tl,isString:nl,isNumber:ta,isBoolean:rl,isObject:Un,isPlainObject:Cn,isReadableStream:dl,isRequest:fl,isResponse:hl,isHeaders:pl,isUndefined:Kt,isDate:ol,isFile:al,isBlob:sl,isRegExp:Ll,isFunction:He,isStream:ll,isURLSearchParams:ul,isTypedArray:Cl,isFileList:il,forEach:en,merge:fr,extend:gl,trim:ml,stripBOM:vl,inherits:yl,toFlatObject:wl,kindOf:jn,kindOfTest:We,endsWith:bl,toArray:Sl,forEachEntry:El,matchAll:xl,isHTMLForm:Rl,hasOwnProperty:mo,hasOwnProp:mo,reduceDescriptors:oa,freezeMethods:Nl,toObjectSet:Tl,toCamelCase:kl,noop:_l,toFiniteNumber:Pl,findKey:na,global:yt,isContextDefined:ra,isSpecCompliantForm:Ol,toJSONObject:Ml,isAsyncFn:Al,isThenable:Dl,setImmediate:aa,asap:Fl};function $(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}C.inherits($,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:C.toJSONObject(this.config),code:this.code,status:this.status}}});const sa=$.prototype,ia={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ia[e]={value:e}});Object.defineProperties($,ia);Object.defineProperty(sa,"isAxiosError",{value:!0});$.from=(e,t,n,r,o,a)=>{const s=Object.create(sa);return C.toFlatObject(e,s,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),$.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const Il=null;function hr(e){return C.isPlainObject(e)||C.isArray(e)}function la(e){return C.endsWith(e,"[]")?e.slice(0,-2):e}function go(e,t,n){return e?e.concat(t).map(function(o,a){return o=la(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Bl(e){return C.isArray(e)&&!e.some(hr)}const jl=C.toFlatObject(C,{},null,function(t){return/^is[A-Z]/.test(t)});function Vn(e,t,n){if(!C.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=C.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,v){return!C.isUndefined(v[p])});const r=n.metaTokens,o=n.visitor||u,a=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&C.isSpecCompliantForm(t);if(!C.isFunction(o))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(C.isDate(m))return m.toISOString();if(!l&&C.isBlob(m))throw new $("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(m)||C.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,p,v){let R=m;if(m&&!v&&typeof m=="object"){if(C.endsWith(p,"{}"))p=r?p:p.slice(0,-2),m=JSON.stringify(m);else if(C.isArray(m)&&Bl(m)||(C.isFileList(m)||C.endsWith(p,"[]"))&&(R=C.toArray(m)))return p=la(p),R.forEach(function(k,_){!(C.isUndefined(k)||k===null)&&t.append(s===!0?go([p],_,a):s===null?p:p+"[]",c(k))}),!1}return hr(m)?!0:(t.append(go(v,p,a),c(m)),!1)}const d=[],h=Object.assign(jl,{defaultVisitor:u,convertValue:c,isVisitable:hr});function y(m,p){if(!C.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(m),C.forEach(m,function(R,b){(!(C.isUndefined(R)||R===null)&&o.call(t,R,C.isString(b)?b.trim():b,p,h))===!0&&y(R,p?p.concat(b):[b])}),d.pop()}}if(!C.isObject(e))throw new TypeError("data must be an object");return y(e),t}function vo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Or(e,t){this._pairs=[],e&&Vn(e,this,t)}const ca=Or.prototype;ca.append=function(t,n){this._pairs.push([t,n])};ca.toString=function(t){const n=t?function(r){return t.call(this,r,vo)}:vo;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Hl(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ua(e,t,n){if(!t)return e;const r=n&&n.encode||Hl;C.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=C.isURLSearchParams(t)?t.toString():new Or(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class yo{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){C.forEach(this.handlers,function(r){r!==null&&t(r)})}}const da={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ul=typeof URLSearchParams<"u"?URLSearchParams:Or,Vl=typeof FormData<"u"?FormData:null,$l=typeof Blob<"u"?Blob:null,zl={isBrowser:!0,classes:{URLSearchParams:Ul,FormData:Vl,Blob:$l},protocols:["http","https","file","blob","url","data"]},Mr=typeof window<"u"&&typeof document<"u",pr=typeof navigator=="object"&&navigator||void 0,Jl=Mr&&(!pr||["ReactNative","NativeScript","NS"].indexOf(pr.product)<0),ql=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wl=Mr&&window.location.href||"http://localhost",Zl=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Mr,hasStandardBrowserEnv:Jl,hasStandardBrowserWebWorkerEnv:ql,navigator:pr,origin:Wl},Symbol.toStringTag,{value:"Module"})),Ne={...Zl,...zl};function Gl(e,t){return Vn(e,new Ne.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return Ne.isNode&&C.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Kl(e){return C.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Yl(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function fa(e){function t(n,r,o,a){let s=n[a++];if(s==="__proto__")return!0;const i=Number.isFinite(+s),l=a>=n.length;return s=!s&&C.isArray(o)?o.length:s,l?(C.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!i):((!o[s]||!C.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],a)&&C.isArray(o[s])&&(o[s]=Yl(o[s])),!i)}if(C.isFormData(e)&&C.isFunction(e.entries)){const n={};return C.forEachEntry(e,(r,o)=>{t(Kl(r),o,n,0)}),n}return null}function Xl(e,t,n){if(C.isString(e))try{return(t||JSON.parse)(e),C.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const tn={transitional:da,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=C.isObject(t);if(a&&C.isHTMLForm(t)&&(t=new FormData(t)),C.isFormData(t))return o?JSON.stringify(fa(t)):t;if(C.isArrayBuffer(t)||C.isBuffer(t)||C.isStream(t)||C.isFile(t)||C.isBlob(t)||C.isReadableStream(t))return t;if(C.isArrayBufferView(t))return t.buffer;if(C.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Gl(t,this.formSerializer).toString();if((i=C.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Vn(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Xl(t)):t}],transformResponse:[function(t){const n=this.transitional||tn.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(C.isResponse(t)||C.isReadableStream(t))return t;if(t&&C.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(s)throw i.name==="SyntaxError"?$.from(i,$.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ne.classes.FormData,Blob:Ne.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],e=>{tn.headers[e]={}});const Ql=C.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ec=e=>{const t={};let n,r,o;return e&&e.split(`
31
+ */function ut(){return ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ut.apply(this,arguments)}function Nr(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const bn="get",Sn="application/x-www-form-urlencoded";function Bn(e){return e!=null&&typeof e.tagName=="string"}function ui(e){return Bn(e)&&e.tagName.toLowerCase()==="button"}function di(e){return Bn(e)&&e.tagName.toLowerCase()==="form"}function fi(e){return Bn(e)&&e.tagName.toLowerCase()==="input"}function hi(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function pi(e,t){return e.button===0&&(!t||t==="_self")&&!hi(e)}function dr(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function mi(e,t){let n=dr(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(a=>{n.append(o,a)})}),n}let mn=null;function gi(){if(mn===null)try{new FormData(document.createElement("form"),0),mn=!1}catch{mn=!0}return mn}const vi=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Qn(e){return e!=null&&!vi.has(e)?(process.env.NODE_ENV!=="production"&&be(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+Sn+'"')),null):e}function yi(e,t){let n,r,o,a,s;if(di(e)){let i=e.getAttribute("action");r=i?Je(i,t):null,n=e.getAttribute("method")||bn,o=Qn(e.getAttribute("enctype"))||Sn,a=new FormData(e)}else if(ui(e)||fi(e)&&(e.type==="submit"||e.type==="image")){let i=e.form;if(i==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(r=l?Je(l,t):null,n=e.getAttribute("formmethod")||i.getAttribute("method")||bn,o=Qn(e.getAttribute("formenctype"))||Qn(i.getAttribute("enctype"))||Sn,a=new FormData(i,e),!gi()){let{name:c,type:u,value:d}=e;if(u==="image"){let h=c?c+".":"";a.append(h+"x","0"),a.append(h+"y","0")}else c&&a.append(c,d)}}else{if(Bn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=bn,r=null,o=Sn,s=e}return a&&o==="text/plain"&&(s=a,a=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:a,body:s}}const wi=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],bi=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Si=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"],Ci="6";try{window.__reactRouterVersion=Ci}catch{}function Ei(e,t){return Ss({basename:void 0,future:ut({},void 0,{v7_prependBasename:!0}),history:Ja({window:void 0}),hydrationData:xi(),routes:e,mapRouteProperties:ci,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function xi(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ut({},t,{errors:Ri(t.errors)})),t}function Ri(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new Ln(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let a=window[o.__subType];if(typeof a=="function")try{let s=new a(o.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let a=new Error(o.message);a.stack="",n[r]=a}}else n[r]=o;return n}const Tr=E.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(Tr.displayName="ViewTransition");const Wo=E.createContext(new Map);process.env.NODE_ENV!=="production"&&(Wo.displayName="Fetchers");const ki="startTransition",co=E[ki],Li="flushSync",uo=za[Li];function Ni(e){co?co(e):e()}function jt(e){uo?uo(e):e()}class Ti{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function Pi(e){let{fallbackElement:t,router:n,future:r}=e,[o,a]=E.useState(n.state),[s,i]=E.useState(),[l,c]=E.useState({isTransitioning:!1}),[u,d]=E.useState(),[h,y]=E.useState(),[m,p]=E.useState(),v=E.useRef(new Map),{v7_startTransition:R}=r||{},b=E.useCallback(_=>{R?Ni(_):_()},[R]),k=E.useCallback((_,G)=>{let{deletedFetchers:B,flushSync:ae,viewTransitionOpts:ee}=G;_.fetchers.forEach((he,Oe)=>{he.data!==void 0&&v.current.set(Oe,he.data)}),B.forEach(he=>v.current.delete(he));let te=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!ee||te){ae?jt(()=>a(_)):b(()=>a(_));return}if(ae){jt(()=>{h&&(u&&u.resolve(),h.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})});let he=n.window.document.startViewTransition(()=>{jt(()=>a(_))});he.finished.finally(()=>{jt(()=>{d(void 0),y(void 0),i(void 0),c({isTransitioning:!1})})}),jt(()=>y(he));return}h?(u&&u.resolve(),h.skipTransition(),p({state:_,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})):(i(_),c({isTransitioning:!0,flushSync:!1,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation}))},[n.window,h,u,v,b]);E.useLayoutEffect(()=>n.subscribe(k),[n,k]),E.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new Ti)},[l]),E.useEffect(()=>{if(u&&s&&n.window){let _=s,G=u.promise,B=n.window.document.startViewTransition(async()=>{b(()=>a(_)),await G});B.finished.finally(()=>{d(void 0),y(void 0),i(void 0),c({isTransitioning:!1})}),y(B)}},[b,s,u,n.window]),E.useEffect(()=>{u&&s&&o.location.key===s.location.key&&u.resolve()},[u,h,o.location,s]),E.useEffect(()=>{!l.isTransitioning&&m&&(i(m.state),c({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),p(void 0))},[l.isTransitioning,m]),E.useEffect(()=>{process.env.NODE_ENV!=="production"&&be(t==null||!n.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let P=E.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:_=>n.navigate(_),push:(_,G,B)=>n.navigate(_,{state:G,preventScrollReset:B==null?void 0:B.preventScrollReset}),replace:(_,G,B)=>n.navigate(_,{replace:!0,state:G,preventScrollReset:B==null?void 0:B.preventScrollReset})}),[n]),T=n.basename||"/",H=E.useMemo(()=>({router:n,navigator:P,static:!1,basename:T}),[n,P,T]),w=E.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return E.useEffect(()=>ai(r,n.future),[r,n.future]),E.createElement(E.Fragment,null,E.createElement(Tt.Provider,{value:H},E.createElement(Fn.Provider,{value:o},E.createElement(Wo.Provider,{value:v.current},E.createElement(Tr.Provider,{value:l},E.createElement(li,{basename:T,location:o.location,navigationType:o.historyAction,navigator:P,future:w},o.initialized||n.future.v7_partialHydration?E.createElement(_i,{routes:n.routes,future:n.future,state:o}):t))))),null)}const _i=E.memo(Oi);function Oi(e){let{routes:t,future:n,state:r}=e;return Ws(t,void 0,r,n)}process.env.NODE_ENV;const Mi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ai=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zo=E.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:a,replace:s,state:i,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,h=Nr(t,wi),{basename:y}=E.useContext(Ve),m,p=!1;if(typeof c=="string"&&Ai.test(c)&&(m=c,Mi))try{let k=new URL(window.location.href),P=c.startsWith("//")?new URL(k.protocol+c):new URL(c),T=Je(P.pathname,y);P.origin===k.origin&&T!=null?c=T+P.search+P.hash:p=!0}catch{process.env.NODE_ENV!=="production"&&be(!1,'<Link to="'+c+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let v=Vs(c,{relative:o}),R=Ii(c,{replace:s,state:i,target:l,preventScrollReset:u,relative:o,viewTransition:d});function b(k){r&&r(k),k.defaultPrevented||R(k)}return E.createElement("a",ut({},h,{href:m||v,onClick:p||a?r:b,ref:n,target:l}))});process.env.NODE_ENV!=="production"&&(Zo.displayName="Link");const Go=E.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:s=!1,style:i,to:l,viewTransition:c,children:u}=t,d=Nr(t,bi),h=Qt(l,{relative:d.relative}),y=qe(),m=E.useContext(Fn),{navigator:p,basename:v}=E.useContext(Ve),R=m!=null&&zi(h)&&c===!0,b=p.encodeLocation?p.encodeLocation(h).pathname:h.pathname,k=y.pathname,P=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;o||(k=k.toLowerCase(),P=P?P.toLowerCase():null,b=b.toLowerCase()),P&&v&&(P=Je(P,v)||P);const T=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let H=k===b||!s&&k.startsWith(b)&&k.charAt(T)==="/",w=P!=null&&(P===b||!s&&P.startsWith(b)&&P.charAt(b.length)==="/"),_={isActive:H,isPending:w,isTransitioning:R},G=H?r:void 0,B;typeof a=="function"?B=a(_):B=[a,H?"active":null,w?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let ae=typeof i=="function"?i(_):i;return E.createElement(Zo,ut({},d,{"aria-current":G,className:B,ref:n,style:ae,to:l,viewTransition:c}),typeof u=="function"?u(_):u)});process.env.NODE_ENV!=="production"&&(Go.displayName="NavLink");const Di=E.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:o,replace:a,state:s,method:i=bn,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:h}=e,y=Nr(e,Si),m=Vi(),p=$i(l,{relative:u}),v=i.toLowerCase()==="get"?"get":"post",R=b=>{if(c&&c(b),b.defaultPrevented)return;b.preventDefault();let k=b.nativeEvent.submitter,P=(k==null?void 0:k.getAttribute("formmethod"))||i;m(k||b.currentTarget,{fetcherKey:n,method:P,navigate:r,replace:a,state:s,relative:u,preventScrollReset:d,viewTransition:h})};return E.createElement("form",ut({ref:t,method:v,action:p,onSubmit:o?c:R},y))});process.env.NODE_ENV!=="production"&&(Di.displayName="Form");process.env.NODE_ENV;var Tn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Tn||(Tn={}));var fo;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fo||(fo={}));function Fi(e){return e+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function Ko(e){let t=E.useContext(Tt);return t||(process.env.NODE_ENV!=="production"?I(!1,Fi(e)):I(!1)),t}function Ii(e,t){let{target:n,replace:r,state:o,preventScrollReset:a,relative:s,viewTransition:i}=t===void 0?{}:t,l=Xt(),c=qe(),u=Qt(e,{relative:s});return E.useCallback(d=>{if(pi(d,n)){d.preventDefault();let h=r!==void 0?r:ct(c)===ct(u);l(e,{replace:h,state:o,preventScrollReset:a,relative:s,viewTransition:i})}},[c,l,u,r,o,n,e,a,s,i])}function Bi(e){process.env.NODE_ENV!=="production"&&be(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=E.useRef(dr(e)),n=E.useRef(!1),r=qe(),o=E.useMemo(()=>mi(r.search,n.current?null:t.current),[r.search]),a=Xt(),s=E.useCallback((i,l)=>{const c=dr(typeof i=="function"?i(o):i);n.current=!0,a("?"+c,l)},[a,o]);return[o,s]}function ji(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let Hi=0,Ui=()=>"__"+String(++Hi)+"__";function Vi(){let{router:e}=Ko(Tn.UseSubmit),{basename:t}=E.useContext(Ve),n=ni();return E.useCallback(function(r,o){o===void 0&&(o={}),ji();let{action:a,method:s,encType:i,formData:l,body:c}=yi(r,t);if(o.navigate===!1){let u=o.fetcherKey||Ui();e.fetch(u,n,o.action||a,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||s,formEncType:o.encType||i,flushSync:o.flushSync})}else e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||s,formEncType:o.encType||i,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,n])}function $i(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=E.useContext(Ve),o=E.useContext($e);o||(process.env.NODE_ENV!=="production"?I(!1,"useFormAction must be used inside a RouteContext"):I(!1));let[a]=o.matches.slice(-1),s=ut({},Qt(e||".",{relative:n})),i=qe();if(e==null){s.search=i.search;let l=new URLSearchParams(s.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(h=>h).forEach(h=>l.append("index",h));let d=l.toString();s.search=d?"?"+d:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Qe([r,s.pathname])),ct(s)}function zi(e,t){t===void 0&&(t={});let n=E.useContext(Tr);n==null&&(process.env.NODE_ENV!=="production"?I(!1,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):I(!1));let{basename:r}=Ko(Tn.useViewTransitionState),o=Qt(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=Je(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Je(n.nextLocation.pathname,r)||n.nextLocation.pathname;return kn(o.pathname,s)!=null||kn(o.pathname,a)!=null}var Pr=(e=>(e.Home="Home",e.Orders="Orders",e.Rewards="Rewards",e.Balance="Balance",e.Subscriptions="Subscriptions",e.Tickets="Tickets",e.Api="API",e))(Pr||{}),Yo=(e=>(e.Home="Home",e.Orders="Orders",e.Rewards="Rewards",e.Balance="Balance",e.Tickets="Tickets",e.Api="API",e))(Yo||{});const Ji=[{caption:"Share link",description:"Send the link to your friends in all convenient ways"},{caption:"Purchase",description:"They buy a product from our store"},{caption:"Percentages",description:"You get rewards"}],ho=e=>{let t;const n=new Set,r=(c,u)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const h=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(y=>y(t,h))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,o,i);return i},qi=e=>e?ho(e):ho,Wi=e=>e;function Zi(e,t=Wi){const n=we.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return we.useDebugValue(n),n}const po=e=>{const t=qi(e),n=r=>Zi(t,r);return Object.assign(n,t),n},ie=e=>e?po(e):po,Gi=ie(e=>({action:null,setAction:t=>e(()=>({action:t})),route:Pr.Home,setRoute:t=>e(()=>({route:t})),dashInfo:null,setDashInfo:t=>e(()=>({dashInfo:t})),dashboardSettings:null,setDashboardSettings:t=>e(()=>({dashboardSettings:t})),balance:null,setBalance:t=>e(()=>({balance:t})),otpRequest:{requested:!1,email:""},setOtpRequest:t=>e(()=>({otpRequest:t})),balanceSettings:null,setBalanceSettings:t=>e(()=>({balanceSettings:t})),gatewaysDetail:null,setGatewaysDetail:t=>e(()=>({gatewaysDetail:t})),isBalanceModalOpen:!1,setIsBalanceModalOpen:t=>e(()=>({isBalanceModalOpen:t}))})),Ki=ie(e=>({token:localStorage.getItem("token")||null,setToken:t=>e(()=>({token:t})),shopDomain:"",setShopDomain:t=>e(()=>({shopDomain:t})),shopId:"",setShopId:t=>e(()=>({shopId:t})),shopLogo:null,setShopLogo:t=>e(()=>({shopLogo:t})),shopPassword:localStorage.getItem("shopPassword")||"",setShopPassword:t=>e(()=>({shopPassword:t})),shopGeneral:null,setShopGeneral:t=>e(()=>({shopGeneral:t})),shopTerms:null,setShopTerms:t=>e(()=>({shopTerms:t})),shopPrivacyPolicy:null,setShopPrivacyPolicy:t=>e(()=>({shopPrivacyPolicy:t})),shopRefundPolicy:null,setShopRefundPolicy:t=>e(()=>({shopRefundPolicy:t}))}));class Jt extends Error{}Jt.prototype.name="InvalidTokenError";function Yi(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function Xi(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Yi(t)}catch{return atob(t)}}function Xo(e,t){if(typeof e!="string")throw new Jt("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new Jt(`Invalid token specified: missing part #${n+1}`);let o;try{o=Xi(r)}catch(a){throw new Jt(`Invalid token specified: invalid base64 for part #${n+1} (${a.message})`)}try{return JSON.parse(o)}catch(a){throw new Jt(`Invalid token specified: invalid json for part #${n+1} (${a.message})`)}}function Qo(e,t){return function(){return e.apply(t,arguments)}}const{toString:Qi}=Object.prototype,{getPrototypeOf:_r}=Object,jn=(e=>t=>{const n=Qi.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),We=e=>(e=e.toLowerCase(),t=>jn(t)===e),Hn=e=>t=>typeof t===e,{isArray:_t}=Array,Kt=Hn("undefined");function el(e){return e!==null&&!Kt(e)&&e.constructor!==null&&!Kt(e.constructor)&&He(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ea=We("ArrayBuffer");function tl(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ea(e.buffer),t}const nl=Hn("string"),He=Hn("function"),ta=Hn("number"),Un=e=>e!==null&&typeof e=="object",rl=e=>e===!0||e===!1,Cn=e=>{if(jn(e)!=="object")return!1;const t=_r(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ol=We("Date"),al=We("File"),sl=We("Blob"),il=We("FileList"),ll=e=>Un(e)&&He(e.pipe),cl=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||He(e.append)&&((t=jn(e))==="formdata"||t==="object"&&He(e.toString)&&e.toString()==="[object FormData]"))},ul=We("URLSearchParams"),[dl,fl,hl,pl]=["ReadableStream","Request","Response","Headers"].map(We),ml=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function en(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),_t(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let i;for(r=0;r<s;r++)i=a[r],t.call(null,e[i],i,e)}}function na(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const yt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ra=e=>!Kt(e)&&e!==yt;function fr(){const{caseless:e}=ra(this)&&this||{},t={},n=(r,o)=>{const a=e&&na(t,o)||o;Cn(t[a])&&Cn(r)?t[a]=fr(t[a],r):Cn(r)?t[a]=fr({},r):_t(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&en(arguments[r],n);return t}const gl=(e,t,n,{allOwnKeys:r}={})=>(en(t,(o,a)=>{n&&He(o)?e[a]=Qo(o,n):e[a]=o},{allOwnKeys:r}),e),vl=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yl=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},wl=(e,t,n,r)=>{let o,a,s;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!r||r(s,e,t))&&!i[s]&&(t[s]=e[s],i[s]=!0);e=n!==!1&&_r(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},bl=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Sl=e=>{if(!e)return null;if(_t(e))return e;let t=e.length;if(!ta(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Cl=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_r(Uint8Array)),El=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},xl=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Rl=We("HTMLFormElement"),kl=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),mo=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ll=We("RegExp"),oa=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};en(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},Nl=e=>{oa(e,(t,n)=>{if(He(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(He(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Tl=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return _t(e)?r(e):r(String(e).split(t)),n},Pl=()=>{},_l=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ol(e){return!!(e&&He(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Ml=e=>{const t=new Array(10),n=(r,o)=>{if(Un(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=_t(r)?[]:{};return en(r,(s,i)=>{const l=n(s,o+1);!Kt(l)&&(a[i]=l)}),t[o]=void 0,a}}return r};return n(e,0)},Al=We("AsyncFunction"),Dl=e=>e&&(Un(e)||He(e))&&He(e.then)&&He(e.catch),aa=((e,t)=>e?setImmediate:t?((n,r)=>(yt.addEventListener("message",({source:o,data:a})=>{o===yt&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),yt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",He(yt.postMessage)),Fl=typeof queueMicrotask<"u"?queueMicrotask.bind(yt):typeof process<"u"&&process.nextTick||aa,C={isArray:_t,isArrayBuffer:ea,isBuffer:el,isFormData:cl,isArrayBufferView:tl,isString:nl,isNumber:ta,isBoolean:rl,isObject:Un,isPlainObject:Cn,isReadableStream:dl,isRequest:fl,isResponse:hl,isHeaders:pl,isUndefined:Kt,isDate:ol,isFile:al,isBlob:sl,isRegExp:Ll,isFunction:He,isStream:ll,isURLSearchParams:ul,isTypedArray:Cl,isFileList:il,forEach:en,merge:fr,extend:gl,trim:ml,stripBOM:vl,inherits:yl,toFlatObject:wl,kindOf:jn,kindOfTest:We,endsWith:bl,toArray:Sl,forEachEntry:El,matchAll:xl,isHTMLForm:Rl,hasOwnProperty:mo,hasOwnProp:mo,reduceDescriptors:oa,freezeMethods:Nl,toObjectSet:Tl,toCamelCase:kl,noop:Pl,toFiniteNumber:_l,findKey:na,global:yt,isContextDefined:ra,isSpecCompliantForm:Ol,toJSONObject:Ml,isAsyncFn:Al,isThenable:Dl,setImmediate:aa,asap:Fl};function $(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}C.inherits($,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:C.toJSONObject(this.config),code:this.code,status:this.status}}});const sa=$.prototype,ia={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ia[e]={value:e}});Object.defineProperties($,ia);Object.defineProperty(sa,"isAxiosError",{value:!0});$.from=(e,t,n,r,o,a)=>{const s=Object.create(sa);return C.toFlatObject(e,s,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),$.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const Il=null;function hr(e){return C.isPlainObject(e)||C.isArray(e)}function la(e){return C.endsWith(e,"[]")?e.slice(0,-2):e}function go(e,t,n){return e?e.concat(t).map(function(o,a){return o=la(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Bl(e){return C.isArray(e)&&!e.some(hr)}const jl=C.toFlatObject(C,{},null,function(t){return/^is[A-Z]/.test(t)});function Vn(e,t,n){if(!C.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=C.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,v){return!C.isUndefined(v[p])});const r=n.metaTokens,o=n.visitor||u,a=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&C.isSpecCompliantForm(t);if(!C.isFunction(o))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(C.isDate(m))return m.toISOString();if(!l&&C.isBlob(m))throw new $("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(m)||C.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,p,v){let R=m;if(m&&!v&&typeof m=="object"){if(C.endsWith(p,"{}"))p=r?p:p.slice(0,-2),m=JSON.stringify(m);else if(C.isArray(m)&&Bl(m)||(C.isFileList(m)||C.endsWith(p,"[]"))&&(R=C.toArray(m)))return p=la(p),R.forEach(function(k,P){!(C.isUndefined(k)||k===null)&&t.append(s===!0?go([p],P,a):s===null?p:p+"[]",c(k))}),!1}return hr(m)?!0:(t.append(go(v,p,a),c(m)),!1)}const d=[],h=Object.assign(jl,{defaultVisitor:u,convertValue:c,isVisitable:hr});function y(m,p){if(!C.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(m),C.forEach(m,function(R,b){(!(C.isUndefined(R)||R===null)&&o.call(t,R,C.isString(b)?b.trim():b,p,h))===!0&&y(R,p?p.concat(b):[b])}),d.pop()}}if(!C.isObject(e))throw new TypeError("data must be an object");return y(e),t}function vo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Or(e,t){this._pairs=[],e&&Vn(e,this,t)}const ca=Or.prototype;ca.append=function(t,n){this._pairs.push([t,n])};ca.toString=function(t){const n=t?function(r){return t.call(this,r,vo)}:vo;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Hl(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ua(e,t,n){if(!t)return e;const r=n&&n.encode||Hl;C.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=C.isURLSearchParams(t)?t.toString():new Or(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class yo{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){C.forEach(this.handlers,function(r){r!==null&&t(r)})}}const da={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ul=typeof URLSearchParams<"u"?URLSearchParams:Or,Vl=typeof FormData<"u"?FormData:null,$l=typeof Blob<"u"?Blob:null,zl={isBrowser:!0,classes:{URLSearchParams:Ul,FormData:Vl,Blob:$l},protocols:["http","https","file","blob","url","data"]},Mr=typeof window<"u"&&typeof document<"u",pr=typeof navigator=="object"&&navigator||void 0,Jl=Mr&&(!pr||["ReactNative","NativeScript","NS"].indexOf(pr.product)<0),ql=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wl=Mr&&window.location.href||"http://localhost",Zl=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Mr,hasStandardBrowserEnv:Jl,hasStandardBrowserWebWorkerEnv:ql,navigator:pr,origin:Wl},Symbol.toStringTag,{value:"Module"})),Ne={...Zl,...zl};function Gl(e,t){return Vn(e,new Ne.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return Ne.isNode&&C.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Kl(e){return C.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Yl(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function fa(e){function t(n,r,o,a){let s=n[a++];if(s==="__proto__")return!0;const i=Number.isFinite(+s),l=a>=n.length;return s=!s&&C.isArray(o)?o.length:s,l?(C.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!i):((!o[s]||!C.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],a)&&C.isArray(o[s])&&(o[s]=Yl(o[s])),!i)}if(C.isFormData(e)&&C.isFunction(e.entries)){const n={};return C.forEachEntry(e,(r,o)=>{t(Kl(r),o,n,0)}),n}return null}function Xl(e,t,n){if(C.isString(e))try{return(t||JSON.parse)(e),C.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const tn={transitional:da,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=C.isObject(t);if(a&&C.isHTMLForm(t)&&(t=new FormData(t)),C.isFormData(t))return o?JSON.stringify(fa(t)):t;if(C.isArrayBuffer(t)||C.isBuffer(t)||C.isStream(t)||C.isFile(t)||C.isBlob(t)||C.isReadableStream(t))return t;if(C.isArrayBufferView(t))return t.buffer;if(C.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Gl(t,this.formSerializer).toString();if((i=C.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Vn(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Xl(t)):t}],transformResponse:[function(t){const n=this.transitional||tn.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(C.isResponse(t)||C.isReadableStream(t))return t;if(t&&C.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(s)throw i.name==="SyntaxError"?$.from(i,$.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ne.classes.FormData,Blob:Ne.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],e=>{tn.headers[e]={}});const Ql=C.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ec=e=>{const t={};let n,r,o;return e&&e.split(`
32
32
  `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&Ql[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},wo=Symbol("internals");function Ht(e){return e&&String(e).trim().toLowerCase()}function En(e){return e===!1||e==null?e:C.isArray(e)?e.map(En):String(e)}function tc(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const nc=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function er(e,t,n,r,o){if(C.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!C.isString(t)){if(C.isString(r))return t.indexOf(r)!==-1;if(C.isRegExp(r))return r.test(t)}}function rc(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function oc(e,t){const n=C.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,s){return this[r].call(this,t,o,a,s)},configurable:!0})})}let De=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(i,l,c){const u=Ht(l);if(!u)throw new Error("header name must be a non-empty string");const d=C.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=En(i))}const s=(i,l)=>C.forEach(i,(c,u)=>a(c,u,l));if(C.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(C.isString(t)&&(t=t.trim())&&!nc(t))s(ec(t),n);else if(C.isHeaders(t))for(const[i,l]of t.entries())a(l,i,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=Ht(t),t){const r=C.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return tc(o);if(C.isFunction(n))return n.call(this,o,r);if(C.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ht(t),t){const r=C.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||er(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(s){if(s=Ht(s),s){const i=C.findKey(r,s);i&&(!n||er(r,r[i],i,n))&&(delete r[i],o=!0)}}return C.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||er(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return C.forEach(this,(o,a)=>{const s=C.findKey(r,a);if(s){n[s]=En(o),delete n[a];return}const i=t?rc(a):String(a).trim();i!==a&&delete n[a],n[i]=En(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return C.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&C.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
33
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[wo]=this[wo]={accessors:{}}).accessors,o=this.prototype;function a(s){const i=Ht(s);r[i]||(oc(o,s),r[i]=!0)}return C.isArray(t)?t.forEach(a):a(t),this}};De.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);C.reduceDescriptors(De.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});C.freezeMethods(De);function tr(e,t){const n=this||tn,r=t||n,o=De.from(r.headers);let a=r.data;return C.forEach(e,function(i){a=i.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function ha(e){return!!(e&&e.__CANCEL__)}function Ot(e,t,n){$.call(this,e??"canceled",$.ERR_CANCELED,t,n),this.name="CanceledError"}C.inherits(Ot,$,{__CANCEL__:!0});function pa(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new $("Request failed with status code "+n.status,[$.ERR_BAD_REQUEST,$.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ac(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function sc(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[a];s||(s=c),n[o]=l,r[o]=c;let d=a,h=0;for(;d!==o;)h+=n[d++],d=d%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-s<t)return;const y=u&&c-u;return y?Math.round(h*1e3/y):void 0}}function ic(e,t){let n=0,r=1e3/t,o,a;const s=(c,u=Date.now())=>{n=u,o=null,a&&(clearTimeout(a),a=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?s(c,u):(o=c,a||(a=setTimeout(()=>{a=null,s(o)},r-d)))},()=>o&&s(o)]}const _n=(e,t,n=3)=>{let r=0;const o=sc(50,250);return ic(a=>{const s=a.loaded,i=a.lengthComputable?a.total:void 0,l=s-r,c=o(l),u=s<=i;r=s;const d={loaded:s,total:i,progress:i?s/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-s)/c:void 0,event:a,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},n)},bo=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},So=e=>(...t)=>C.asap(()=>e(...t)),lc=Ne.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ne.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ne.origin),Ne.navigator&&/(msie|trident)/i.test(Ne.navigator.userAgent)):()=>!0,cc=Ne.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const s=[e+"="+encodeURIComponent(t)];C.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),C.isString(r)&&s.push("path="+r),C.isString(o)&&s.push("domain="+o),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function uc(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function dc(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ma(e,t,n){let r=!uc(t);return e&&r||n==!1?dc(e,t):t}const Co=e=>e instanceof De?{...e}:e;function bt(e,t){t=t||{};const n={};function r(c,u,d,h){return C.isPlainObject(c)&&C.isPlainObject(u)?C.merge.call({caseless:h},c,u):C.isPlainObject(u)?C.merge({},u):C.isArray(u)?u.slice():u}function o(c,u,d,h){if(C.isUndefined(u)){if(!C.isUndefined(c))return r(void 0,c,d,h)}else return r(c,u,d,h)}function a(c,u){if(!C.isUndefined(u))return r(void 0,u)}function s(c,u){if(C.isUndefined(u)){if(!C.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function i(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(c,u,d)=>o(Co(c),Co(u),d,!0)};return C.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||o,h=d(e[u],t[u],u);C.isUndefined(h)&&d!==i||(n[u]=h)}),n}const ga=e=>{const t=bt({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:i}=t;t.headers=s=De.from(s),t.url=ua(ma(t.baseURL,t.url),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let l;if(C.isFormData(n)){if(Ne.hasStandardBrowserEnv||Ne.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Ne.hasStandardBrowserEnv&&(r&&C.isFunction(r)&&(r=r(t)),r||r!==!1&&lc(t.url))){const c=o&&a&&cc.read(a);c&&s.set(o,c)}return t},fc=typeof XMLHttpRequest<"u",hc=fc&&function(e){return new Promise(function(n,r){const o=ga(e);let a=o.data;const s=De.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=o,u,d,h,y,m;function p(){y&&y(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function R(){if(!v)return;const k=De.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!i||i==="text"||i==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:k,config:e,request:v};pa(function(w){n(w),p()},function(w){r(w),p()},T),v=null}"onloadend"in v?v.onloadend=R:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(R)},v.onabort=function(){v&&(r(new $("Request aborted",$.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new $("Network Error",$.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let _=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||da;o.timeoutErrorMessage&&(_=o.timeoutErrorMessage),r(new $(_,T.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,e,v)),v=null},a===void 0&&s.setContentType(null),"setRequestHeader"in v&&C.forEach(s.toJSON(),function(_,T){v.setRequestHeader(T,_)}),C.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),i&&i!=="json"&&(v.responseType=o.responseType),c&&([h,m]=_n(c,!0),v.addEventListener("progress",h)),l&&v.upload&&([d,y]=_n(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(u=k=>{v&&(r(!k||k.type?new Ot(null,e,v):k),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const b=ac(o.url);if(b&&Ne.protocols.indexOf(b)===-1){r(new $("Unsupported protocol "+b+":",$.ERR_BAD_REQUEST,e));return}v.send(a||null)})},pc=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(c){if(!o){o=!0,i();const u=c instanceof Error?c:this.reason;r.abort(u instanceof $?u:new Ot(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,a(new $(`timeout ${t} of ms exceeded`,$.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:l}=r;return l.unsubscribe=()=>C.asap(i),l}},mc=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},gc=async function*(e,t){for await(const n of vc(e))yield*mc(n,t)},vc=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Eo=(e,t,n,r)=>{const o=gc(e,t);let a=0,s,i=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){i(),l.close();return}let d=u.byteLength;if(n){let h=a+=d;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw i(c),c}},cancel(l){return i(l),o.return()}},{highWaterMark:2})},$n=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",va=$n&&typeof ReadableStream=="function",yc=$n&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ya=(e,...t)=>{try{return!!e(...t)}catch{return!1}},wc=va&&ya(()=>{let e=!1;const t=new Request(Ne.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),xo=64*1024,mr=va&&ya(()=>C.isReadableStream(new Response("").body)),Pn={stream:mr&&(e=>e.body)};$n&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Pn[t]&&(Pn[t]=C.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new $(`Response type '${t}' is not supported`,$.ERR_NOT_SUPPORT,r)})})})(new Response);const bc=async e=>{if(e==null)return 0;if(C.isBlob(e))return e.size;if(C.isSpecCompliantForm(e))return(await new Request(Ne.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(C.isArrayBufferView(e)||C.isArrayBuffer(e))return e.byteLength;if(C.isURLSearchParams(e)&&(e=e+""),C.isString(e))return(await yc(e)).byteLength},Sc=async(e,t)=>{const n=C.toFiniteNumber(e.getContentLength());return n??bc(t)},Cc=$n&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:s,onDownloadProgress:i,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=ga(e);c=c?(c+"").toLowerCase():"text";let y=pc([o,a&&a.toAbortSignal()],s),m;const p=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let v;try{if(l&&wc&&n!=="get"&&n!=="head"&&(v=await Sc(u,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),H;if(C.isFormData(r)&&(H=T.headers.get("content-type"))&&u.setContentType(H),T.body){const[w,P]=bo(v,_n(So(l)));r=Eo(T.body,xo,w,P)}}C.isString(d)||(d=d?"include":"omit");const R="credentials"in Request.prototype;m=new Request(t,{...h,signal:y,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:R?d:void 0});let b=await fetch(m);const k=mr&&(c==="stream"||c==="response");if(mr&&(i||k&&p)){const T={};["status","statusText","headers"].forEach(G=>{T[G]=b[G]});const H=C.toFiniteNumber(b.headers.get("content-length")),[w,P]=i&&bo(H,_n(So(i),!0))||[];b=new Response(Eo(b.body,xo,w,()=>{P&&P(),p&&p()}),T)}c=c||"text";let _=await Pn[C.findKey(Pn,c)||"text"](b,e);return!k&&p&&p(),await new Promise((T,H)=>{pa(T,H,{data:_,headers:De.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:m})})}catch(R){throw p&&p(),R&&R.name==="TypeError"&&/fetch/i.test(R.message)?Object.assign(new $("Network Error",$.ERR_NETWORK,e,m),{cause:R.cause||R}):$.from(R,R&&R.code,e,m)}}),gr={http:Il,xhr:hc,fetch:Cc};C.forEach(gr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ro=e=>`- ${e}`,Ec=e=>C.isFunction(e)||e===null||e===!1,wa={getAdapter:e=>{e=C.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let s;if(r=n,!Ec(n)&&(r=gr[(s=String(n)).toLowerCase()],r===void 0))throw new $(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+a]=r}if(!r){const a=Object.entries(o).map(([i,l])=>`adapter ${i} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
33
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[wo]=this[wo]={accessors:{}}).accessors,o=this.prototype;function a(s){const i=Ht(s);r[i]||(oc(o,s),r[i]=!0)}return C.isArray(t)?t.forEach(a):a(t),this}};De.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);C.reduceDescriptors(De.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});C.freezeMethods(De);function tr(e,t){const n=this||tn,r=t||n,o=De.from(r.headers);let a=r.data;return C.forEach(e,function(i){a=i.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function ha(e){return!!(e&&e.__CANCEL__)}function Ot(e,t,n){$.call(this,e??"canceled",$.ERR_CANCELED,t,n),this.name="CanceledError"}C.inherits(Ot,$,{__CANCEL__:!0});function pa(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new $("Request failed with status code "+n.status,[$.ERR_BAD_REQUEST,$.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ac(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function sc(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[a];s||(s=c),n[o]=l,r[o]=c;let d=a,h=0;for(;d!==o;)h+=n[d++],d=d%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-s<t)return;const y=u&&c-u;return y?Math.round(h*1e3/y):void 0}}function ic(e,t){let n=0,r=1e3/t,o,a;const s=(c,u=Date.now())=>{n=u,o=null,a&&(clearTimeout(a),a=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?s(c,u):(o=c,a||(a=setTimeout(()=>{a=null,s(o)},r-d)))},()=>o&&s(o)]}const Pn=(e,t,n=3)=>{let r=0;const o=sc(50,250);return ic(a=>{const s=a.loaded,i=a.lengthComputable?a.total:void 0,l=s-r,c=o(l),u=s<=i;r=s;const d={loaded:s,total:i,progress:i?s/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-s)/c:void 0,event:a,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},n)},bo=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},So=e=>(...t)=>C.asap(()=>e(...t)),lc=Ne.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ne.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ne.origin),Ne.navigator&&/(msie|trident)/i.test(Ne.navigator.userAgent)):()=>!0,cc=Ne.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const s=[e+"="+encodeURIComponent(t)];C.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),C.isString(r)&&s.push("path="+r),C.isString(o)&&s.push("domain="+o),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function uc(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function dc(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ma(e,t,n){let r=!uc(t);return e&&r||n==!1?dc(e,t):t}const Co=e=>e instanceof De?{...e}:e;function bt(e,t){t=t||{};const n={};function r(c,u,d,h){return C.isPlainObject(c)&&C.isPlainObject(u)?C.merge.call({caseless:h},c,u):C.isPlainObject(u)?C.merge({},u):C.isArray(u)?u.slice():u}function o(c,u,d,h){if(C.isUndefined(u)){if(!C.isUndefined(c))return r(void 0,c,d,h)}else return r(c,u,d,h)}function a(c,u){if(!C.isUndefined(u))return r(void 0,u)}function s(c,u){if(C.isUndefined(u)){if(!C.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function i(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(c,u,d)=>o(Co(c),Co(u),d,!0)};return C.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||o,h=d(e[u],t[u],u);C.isUndefined(h)&&d!==i||(n[u]=h)}),n}const ga=e=>{const t=bt({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:i}=t;t.headers=s=De.from(s),t.url=ua(ma(t.baseURL,t.url),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let l;if(C.isFormData(n)){if(Ne.hasStandardBrowserEnv||Ne.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Ne.hasStandardBrowserEnv&&(r&&C.isFunction(r)&&(r=r(t)),r||r!==!1&&lc(t.url))){const c=o&&a&&cc.read(a);c&&s.set(o,c)}return t},fc=typeof XMLHttpRequest<"u",hc=fc&&function(e){return new Promise(function(n,r){const o=ga(e);let a=o.data;const s=De.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=o,u,d,h,y,m;function p(){y&&y(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function R(){if(!v)return;const k=De.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!i||i==="text"||i==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:k,config:e,request:v};pa(function(w){n(w),p()},function(w){r(w),p()},T),v=null}"onloadend"in v?v.onloadend=R:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(R)},v.onabort=function(){v&&(r(new $("Request aborted",$.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new $("Network Error",$.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let P=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||da;o.timeoutErrorMessage&&(P=o.timeoutErrorMessage),r(new $(P,T.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,e,v)),v=null},a===void 0&&s.setContentType(null),"setRequestHeader"in v&&C.forEach(s.toJSON(),function(P,T){v.setRequestHeader(T,P)}),C.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),i&&i!=="json"&&(v.responseType=o.responseType),c&&([h,m]=Pn(c,!0),v.addEventListener("progress",h)),l&&v.upload&&([d,y]=Pn(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(u=k=>{v&&(r(!k||k.type?new Ot(null,e,v):k),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const b=ac(o.url);if(b&&Ne.protocols.indexOf(b)===-1){r(new $("Unsupported protocol "+b+":",$.ERR_BAD_REQUEST,e));return}v.send(a||null)})},pc=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(c){if(!o){o=!0,i();const u=c instanceof Error?c:this.reason;r.abort(u instanceof $?u:new Ot(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,a(new $(`timeout ${t} of ms exceeded`,$.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:l}=r;return l.unsubscribe=()=>C.asap(i),l}},mc=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},gc=async function*(e,t){for await(const n of vc(e))yield*mc(n,t)},vc=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Eo=(e,t,n,r)=>{const o=gc(e,t);let a=0,s,i=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){i(),l.close();return}let d=u.byteLength;if(n){let h=a+=d;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw i(c),c}},cancel(l){return i(l),o.return()}},{highWaterMark:2})},$n=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",va=$n&&typeof ReadableStream=="function",yc=$n&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ya=(e,...t)=>{try{return!!e(...t)}catch{return!1}},wc=va&&ya(()=>{let e=!1;const t=new Request(Ne.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),xo=64*1024,mr=va&&ya(()=>C.isReadableStream(new Response("").body)),_n={stream:mr&&(e=>e.body)};$n&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_n[t]&&(_n[t]=C.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new $(`Response type '${t}' is not supported`,$.ERR_NOT_SUPPORT,r)})})})(new Response);const bc=async e=>{if(e==null)return 0;if(C.isBlob(e))return e.size;if(C.isSpecCompliantForm(e))return(await new Request(Ne.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(C.isArrayBufferView(e)||C.isArrayBuffer(e))return e.byteLength;if(C.isURLSearchParams(e)&&(e=e+""),C.isString(e))return(await yc(e)).byteLength},Sc=async(e,t)=>{const n=C.toFiniteNumber(e.getContentLength());return n??bc(t)},Cc=$n&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:s,onDownloadProgress:i,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=ga(e);c=c?(c+"").toLowerCase():"text";let y=pc([o,a&&a.toAbortSignal()],s),m;const p=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let v;try{if(l&&wc&&n!=="get"&&n!=="head"&&(v=await Sc(u,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),H;if(C.isFormData(r)&&(H=T.headers.get("content-type"))&&u.setContentType(H),T.body){const[w,_]=bo(v,Pn(So(l)));r=Eo(T.body,xo,w,_)}}C.isString(d)||(d=d?"include":"omit");const R="credentials"in Request.prototype;m=new Request(t,{...h,signal:y,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:R?d:void 0});let b=await fetch(m);const k=mr&&(c==="stream"||c==="response");if(mr&&(i||k&&p)){const T={};["status","statusText","headers"].forEach(G=>{T[G]=b[G]});const H=C.toFiniteNumber(b.headers.get("content-length")),[w,_]=i&&bo(H,Pn(So(i),!0))||[];b=new Response(Eo(b.body,xo,w,()=>{_&&_(),p&&p()}),T)}c=c||"text";let P=await _n[C.findKey(_n,c)||"text"](b,e);return!k&&p&&p(),await new Promise((T,H)=>{pa(T,H,{data:P,headers:De.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:m})})}catch(R){throw p&&p(),R&&R.name==="TypeError"&&/fetch/i.test(R.message)?Object.assign(new $("Network Error",$.ERR_NETWORK,e,m),{cause:R.cause||R}):$.from(R,R&&R.code,e,m)}}),gr={http:Il,xhr:hc,fetch:Cc};C.forEach(gr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ro=e=>`- ${e}`,Ec=e=>C.isFunction(e)||e===null||e===!1,wa={getAdapter:e=>{e=C.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let s;if(r=n,!Ec(n)&&(r=gr[(s=String(n)).toLowerCase()],r===void 0))throw new $(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+a]=r}if(!r){const a=Object.entries(o).map(([i,l])=>`adapter ${i} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
34
34
  `+a.map(Ro).join(`
35
35
  `):" "+Ro(a[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:gr};function nr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ot(null,e)}function ko(e){return nr(e),e.headers=De.from(e.headers),e.data=tr.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),wa.getAdapter(e.adapter||tn.adapter)(e).then(function(r){return nr(e),r.data=tr.call(e,e.transformResponse,r),r.headers=De.from(r.headers),r},function(r){return ha(r)||(nr(e),r&&r.response&&(r.response.data=tr.call(e,e.transformResponse,r.response),r.response.headers=De.from(r.response.headers))),Promise.reject(r)})}const ba="1.8.1",zn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{zn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Lo={};zn.transitional=function(t,n,r){function o(a,s){return"[Axios v"+ba+"] Transitional option '"+a+"'"+s+(r?". "+r:"")}return(a,s,i)=>{if(t===!1)throw new $(o(s," has been removed"+(n?" in "+n:"")),$.ERR_DEPRECATED);return n&&!Lo[s]&&(Lo[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,s,i):!0}};zn.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function xc(e,t,n){if(typeof e!="object")throw new $("options must be an object",$.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],s=t[a];if(s){const i=e[a],l=i===void 0||s(i,a,e);if(l!==!0)throw new $("option "+a+" must be "+l,$.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new $("Unknown option "+a,$.ERR_BAD_OPTION)}}const xn={assertOptions:xc,validators:zn},Xe=xn.validators;let wt=class{constructor(t){this.defaults=t,this.interceptors={request:new yo,response:new yo}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
36
- `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=bt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&xn.assertOptions(r,{silentJSONParsing:Xe.transitional(Xe.boolean),forcedJSONParsing:Xe.transitional(Xe.boolean),clarifyTimeoutError:Xe.transitional(Xe.boolean)},!1),o!=null&&(C.isFunction(o)?n.paramsSerializer={serialize:o}:xn.assertOptions(o,{encode:Xe.function,serialize:Xe.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),xn.assertOptions(n,{baseUrl:Xe.spelling("baseURL"),withXsrfToken:Xe.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&C.merge(a.common,a[n.method]);a&&C.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=De.concat(s,a);const i=[];let l=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(l=l&&p.synchronous,i.unshift(p.fulfilled,p.rejected))});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let u,d=0,h;if(!l){const m=[ko.bind(this),void 0];for(m.unshift.apply(m,i),m.push.apply(m,c),h=m.length,u=Promise.resolve(n);d<h;)u=u.then(m[d++],m[d++]);return u}h=i.length;let y=n;for(d=0;d<h;){const m=i[d++],p=i[d++];try{y=m(y)}catch(v){p.call(this,v);break}}try{u=ko.call(this,y)}catch(m){return Promise.reject(m)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=bt(this.defaults,t);const n=ma(t.baseURL,t.url,t.allowAbsoluteUrls);return ua(n,t.params,t.paramsSerializer)}};C.forEach(["delete","get","head","options"],function(t){wt.prototype[t]=function(n,r){return this.request(bt(r||{},{method:t,url:n,data:(r||{}).data}))}});C.forEach(["post","put","patch"],function(t){function n(r){return function(a,s,i){return this.request(bt(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}wt.prototype[t]=n(),wt.prototype[t+"Form"]=n(!0)});let Rc=class Sa{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const s=new Promise(i=>{r.subscribe(i),a=i}).then(o);return s.cancel=function(){r.unsubscribe(a)},s},t(function(a,s,i){r.reason||(r.reason=new Ot(a,s,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Sa(function(o){t=o}),cancel:t}}};function kc(e){return function(n){return e.apply(null,n)}}function Lc(e){return C.isObject(e)&&e.isAxiosError===!0}const vr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vr).forEach(([e,t])=>{vr[t]=e});function Ca(e){const t=new wt(e),n=Qo(wt.prototype.request,t);return C.extend(n,wt.prototype,t,{allOwnKeys:!0}),C.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ca(bt(e,o))},n}const ce=Ca(tn);ce.Axios=wt;ce.CanceledError=Ot;ce.CancelToken=Rc;ce.isCancel=ha;ce.VERSION=ba;ce.toFormData=Vn;ce.AxiosError=$;ce.Cancel=ce.CanceledError;ce.all=function(t){return Promise.all(t)};ce.spread=kc;ce.isAxiosError=Lc;ce.mergeConfig=bt;ce.AxiosHeaders=De;ce.formToJSON=e=>fa(C.isHTMLForm(e)?new FormData(e):e);ce.getAdapter=wa.getAdapter;ce.HttpStatusCode=vr;ce.default=ce;const{Axios:a0,AxiosError:Nc,CanceledError:s0,isCancel:i0,CancelToken:l0,VERSION:c0,all:u0,Cancel:d0,isAxiosError:f0,spread:h0,toFormData:p0,AxiosHeaders:m0,HttpStatusCode:g0,formToJSON:v0,getAdapter:y0,mergeConfig:w0}=ce,gn="https://localhost:5043",at=async e=>{var h,y;const{url:t,withToken:n,method:r,body:o,contentType:a,typeToken:s="seller"}=e,i=n?localStorage.getItem("sellerAccessToken"):null,l=n?localStorage.getItem("token"):null,c=s==="seller"?i:l,u=localStorage.getItem("dv"),d={};a&&!(o instanceof FormData)?d["Content-Type"]=a:o instanceof FormData||(d["Content-Type"]="application/json"),n&&c&&(d.Authorization=`Bearer ${c}`);try{let m=null;switch(r){case"get":m=await ce.get(u?gn:t,{headers:d});break;case"post":m=await ce.post(u?gn:t,o,{headers:d});break;case"put":m=await ce.put(u?gn:t,o,{headers:d});break;case"delete":m=await ce.delete(u?gn:t,{headers:d});break}return{data:m==null?void 0:m.data,status:m==null?void 0:m.status,headers:m==null?void 0:m.headers}}catch(m){const p=m,v=(h=p.response)==null?void 0:h.data;let R="Something Went Wrong";v&&(R=v.errors[0]);const b=(y=p.response)==null?void 0:y.status;if(b===401)try{const _=await Promise.resolve().then(()=>require("./charge-C3aekkW0.cjs")).then(T=>T.auth);_&&_.logoutCustomer?await _.logoutCustomer():localStorage.removeItem("token"),window.location.reload()}catch(_){console.error("Failed to import logoutCustomer:",_),localStorage.removeItem("token"),window.location.reload()}const k=new Nc(R,(b==null?void 0:b.toString())||"400");throw k.response=p.response,k}},Tc="https://g-api.billgang.com",_c="https://www.googleapis.com/webfonts/v1/webfonts",Pc="https://stores-api.billgang.com",Oc="https://sl-api.billgang.com",Mc="https://customers-api.billgang.com",Ac="https://cashapp-api.billgang.com",Dc={api:Tc,googleFonts:_c,storeApi:Pc,slApi:Oc,customersApi:Mc,cashappApi:Ac},Fc=(e,t="300")=>e==="not found"?"empty":`https://imagedelivery.net/${e}/w=${t}`,Ic=e=>{const t=new Intl.NumberFormat("en-US",{style:"currency",currency:e.currency||"USD"});let n=e.amount;return e.quantity&&(n=n*e.quantity),t.format(n)},Bc=(e,t)=>{if(e===0)throw new Error("Old value cannot be zero, as it would result in division by zero.");return(t-e)/Math.abs(e)*100},jc=e=>{if(Math.abs(e-365)<=15){const a=Math.round(e/365);return a===1?"year":`${a} years`}else if(Math.abs(e-30)<=5){const a=Math.round(e/30);return a===1?"month":`${a} months`}else return`${e} days`},Hc=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),Uc=e=>{const t=new Date(e),n={day:"2-digit",month:"2-digit",year:"numeric"},r={hour:"2-digit",minute:"2-digit"},o=t.toLocaleString("en-US",n),a=t.toLocaleString("en-US",r);return[o,a]},yr=e=>{const t=window.localStorage.getItem(e);if(t===null)return null;try{return JSON.parse(t)}catch{return t}},No=(e,t)=>{(t===null||typeof t!="object")&&window.localStorage.setItem(e,String(t));const n=JSON.stringify(t);window.localStorage.setItem(e,n)},rr="f10120ab-7ebb-4785-b240-7428edaa3c4e",Ut="https://t-api.billgang.com",Vt="https://internal-t-api.antistock.io",qt="I",Vc=10*1e3,$c=15*1e3,zc=15*60*1e3,Ea=()=>{var t;const e=yr(qt);return((t=e==null?void 0:e.s)==null?void 0:t.i)||null},Jc=(e,t="production",n)=>{const{pathname:r}=qe(),o=we.useRef(),a=we.useRef(document.visibilityState);we.useEffect(()=>{if(!e)return;const s=()=>Date.now(),i=async()=>(await at({url:`${n?Vt:Ut}/${e}/t/p`,method:"post",withToken:!1})).data.data.id,l=async m=>(await at({url:`${n?Vt:Ut}/${e}/t/p/${t==="development"?rr:m}/s`,method:"post",withToken:!1})).data.data.id,c=async(m,p,v,R)=>{const b=t==="development"?rr:m;try{return(await at({url:`${n?Vt:Ut}/${e}/t/p/${b}/s/${p}/e`,method:"post",withToken:!1,body:{url:v,oldEventId:R},contentType:"application/json"})).data.data.id}catch{return p=await l(m),(await at({url:`${n?Vt:Ut}/${e}/t/p/${b}/s/${p}/e`,method:"post",withToken:!1,body:{url:v},contentType:"application/json"})).data.data.id}},u=async(m,p,v)=>{await at({url:`${n?Vt:Ut}/${e}/t/p/${t==="development"?rr:m}/s/${p}/e/${v}/h`,method:"post",withToken:!1});const b=yr(qt);b&&(b.s.u=s().toString(),b.lu=s().toString(),No(qt,b))},d=(m,p,v)=>{o.current&&clearInterval(o.current),o.current=setInterval(async()=>{if(document.visibilityState==="visible")try{await u(m,p,v)}catch{await h()}},Vc)},h=async()=>{var R,b,k,_;const m=`${window.location.hostname}${r}`,p=yr(qt),v=s();try{let T=p==null?void 0:p.p;T||(T=await i());let H=(R=p==null?void 0:p.s)==null?void 0:R.i;const w=Number(((b=p==null?void 0:p.s)==null?void 0:b.u)||((k=p==null?void 0:p.s)==null?void 0:k.c)),P=!H||v-w>zc;(!H||P)&&(H=await l(T));const G=Number((p==null?void 0:p.lu)||0),B=v-G>$c,ae=await c(T,H,m,p!=null&&p.l&&!B?p.l:void 0),ee={p:T,s:{i:H,c:((_=p==null?void 0:p.s)==null?void 0:_.c)??v.toString(),u:v.toString()},l:ae,lu:v.toString()};No(qt,ee),d(T,H,ae)}catch(T){console.error("[TrackingAnalytics] error",T)}};h();const y=()=>{document.visibilityState==="visible"&&a.current!=="visible"&&h(),a.current=document.visibilityState};return document.addEventListener("visibilitychange",y),()=>{o.current&&clearInterval(o.current),document.removeEventListener("visibilitychange",y)}},[r,e,t])},qc={customerEmail:"",recaptcha:"",gateway:"",paymentMethod:"",parts:[],customFields:{},discordSocialConnectId:null,coupon:null,tsId:Ea()};let Nt=null;const To=localStorage.getItem("token");if(To)try{Nt=Xo(JSON.parse(To)||"")}catch{Nt=null}const Wc=ie(e=>({cart:{...qc,customerEmail:Nt?Nt.email:""},products:[],coupon:null,pending:!1,applyCouponPending:!1,customerEmail:Nt?Nt.email:"",recaptcha:"",priceAdjustment:null,serviceFee:null,replacementConfig:null,setCart:t=>e(n=>({cart:typeof t=="function"?t(n.cart):t})),setProducts:t=>e(n=>({products:typeof t=="function"?t(n.products):t})),setRecaptcha:t=>e({recaptcha:t}),setCoupon:t=>e({coupon:t}),setPending:t=>e({pending:t}),setApplyCouponPending:t=>e({applyCouponPending:t}),setCustomerEmail:t=>e({customerEmail:t}),setPriceAdjustment:t=>e({priceAdjustment:t}),setServiceFee:t=>e({serviceFee:t}),setReplacementConfig:t=>e({replacementConfig:t}),setUsePriorityReplacement:t=>e(n=>({cart:{...n.cart,usePriorityReplacement:t}}))})),Zc=ie(e=>({page:1,setPage:t=>e(()=>({page:t})),resetPage:()=>e(()=>({page:1}))})),Gc=ie(e=>({discordInfo:null,setDiscordInfo:t=>e(()=>({discordInfo:t}))})),Kc=ie(e=>({subscription:null,setSubscription:t=>e({subscription:t})})),nn=ie(e=>({apiUrls:Dc,setApiUrls:t=>e(()=>({apiUrls:t}))})),xa=ie(e=>({header:null,footer:null,announcement:null,setHeader:t=>e(()=>({header:t})),setFooter:t=>e(()=>({footer:t})),setAnnouncement:t=>e(()=>({announcement:t})),blocks:null,setBlocks:t=>e(()=>({blocks:t})),activeBlock:null,setActiveBlock:t=>e(()=>({activeBlock:t})),sourceBlocks:{},setSourceBlocks:t=>e(()=>({sourceBlocks:t})),currentInstance:null,setCurrentInstance:t=>e(()=>({currentInstance:t})),settings:null,setSettings:t=>e(()=>({settings:t})),settingsInstance:null,setSettingsInstance:t=>e(()=>({settingsInstance:t}))})),Ra=ie(e=>({general:null,setGeneral:t=>e(()=>({general:t})),isAntistock:!1,setIsAntistock:t=>e(()=>({isAntistock:t}))})),wr=ie(e=>({settings:null,setSettings:t=>{e(()=>({settings:t}))},isLoadingSettings:!0,setIsLoadingSettings:t=>e(()=>({isLoadingSettings:t}))})),On=ie((e,t)=>({activeBlock:null,setActiveBlock:n=>e(()=>({activeBlock:n})),activeFont:null,setActiveFont:n=>e(()=>({activeFont:n})),setThemeSettings:n=>e(()=>({themeSettings:n})),activeColorCategory:null,setActiveColorCategory:n=>e(()=>({activeColorCategory:n})),themeSettings:{colors:{text:{primary:"#252525",secondary:"#757575",tertiary:"#C2C2C2",inverted:"#FFFFFF",action:"#FF3F19",actionHover:"#DA2400",disabled:"#C2C2C2",warning:"#C1972A",error:"#C12A2A",success:"#338B13",information:"#3683F7",link:"#3683F7"},icon:{primary:"#252525",secondary:"#555555",tertiary:"#C2C2C2",inverted:"#FFFFFF",action:"#FF3F19",actionHover:"#DA2400",disabled:"#C2C2C2",warning:"#C1972A",error:"#C12A2A",success:"#338B13",information:"#3683F7",link:"#3683F7"},border:{primary:"#C2C2C2",secondary:"#E6E6E6",action:"#FF3F19",actionHover:"#DA2400",disabled:"#E6E6E6",warning:"#C1972A",error:"#C12A2A",success:"#338B13",information:"#3683F7",focus:"#FF3F19"},surface:{primary:"#FFFFFF",secondary:"#F8F8F8",action1:"#FF3F19",action1Hover:"#DA2400",action2:"#FFFFFF",action2Hover:"#F8F8F8",disabled:"#C2C2C2",warning:"#FAF4E6",error:"#FAE6E6",success:"#E5FADD",information:"#E9F1FE",modal:"rgba(1, 1, 4, 0.4)"}},fonts:{mobile:{fontSizePercentage:30},tablet:{fontSizePercentage:50},desktop:{heading:{h1:{font:"Archivo",weight:"700",size:48,boldWeight:"900",case:"normal"},h2:{font:"Archivo",weight:"700",size:32,boldWeight:"800",case:"normal"},h3:{font:"Archivo",weight:"600",size:24,boldWeight:"700",case:"normal"},h4:{font:"Archivo",weight:"500",size:20,boldWeight:"700",case:"normal"},h5:{font:"Archivo",weight:"400",size:16,boldWeight:"700",case:"normal"},h6:{font:"Archivo",weight:"400",size:14,boldWeight:"700",case:"uppercase"},h7:{font:"Archivo",weight:"400",size:14,boldWeight:"700",case:"normal"}},body:{lg:{font:"Archivo",size:16,weight:"400",boldWeight:"700",case:"normal"},md:{font:"Archivo",size:14,weight:"400",boldWeight:"700",case:"normal"},sm:{font:"Archivo",size:12,weight:"400",boldWeight:"700",case:"normal"}}}},borders:{radius:"var(--radius-lg)",thickness:"var(--border-none)"},buttons:{primary:{size:26,alignment:"left",radius:32,height:40,background:"#ff3f19",hover:!0,font:"Archivo",boxShadow:{left:0,top:0,blur:0,spread:0,color:"#000000"},color:"#ffffff",colorHover:"#ffffff",backgroundHover:"#ff3f19"},secondary:{size:26,alignment:"left",radius:10,height:20,background:"#c2c2c2",hover:!1,font:"Archivo",boxShadow:{left:0,top:4,blur:10,spread:0,color:"#000000"},color:"#757575",colorHover:"#757575",backgroundHover:"#c2c2c2"},tertiary:{size:12,alignment:"left",radius:30,height:30,background:"#c2c2c2",hover:!0,font:"Archivo",boxShadow:{left:0,top:4,blur:10,spread:0,color:"#000000"},color:"#757575",colorHover:"#757575",backgroundHover:"#c2c2c2"}},inputs:{field:{color:"#f3f3f3",active:!0,opacity:40},label:{size:14,color:"#555555",height:40,alignment:"left"},border:{color:"#f3f3f3",style:"solid",active:!0,radius:14,thickness:0},general:{size:14,color:"#252525",height:40},placeholder:{color:"#C2C2C2"}}},updateColor:(n,r,o)=>e(a=>{const s=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:s});const i={...a.themeSettings.colors,[n]:{...a.themeSettings.colors[n],[r]:o}};return{themeSettings:{...a.themeSettings,colors:i}}}),updateFont:(n,r,o,a,s)=>e(i=>{const l=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:l});const c={...i.themeSettings.fonts,[n]:{...i.themeSettings.fonts[n],[r]:{...i.themeSettings.fonts[n][r],[o]:{...i.themeSettings.fonts[n][r][o],[a]:s}}}};return{themeSettings:{...i.themeSettings,fonts:c}}}),updateFontSizePercentage:(n,r)=>e(o=>{const a=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:a});const s={...o.themeSettings.fonts,[n]:{...o.themeSettings.fonts[n],fontSizePercentage:r}};return{themeSettings:{...o.themeSettings,fonts:s}}}),updateBorder:(n,r)=>e(o=>{const a=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:a});const s={...o.themeSettings.borders,[n]:r};return{themeSettings:{...o.themeSettings,borders:s}}}),updateButton:(n,r,o)=>e(a=>{const s=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:s});const i={...a.themeSettings.buttons[n],[r]:o},l={...a.themeSettings.buttons,[n]:i};return{themeSettings:{...a.themeSettings,buttons:l}}}),updateInput:(n,r,o)=>e(a=>{const s=JSON.parse(JSON.stringify(t().themeSettings));return Pe.getState().addHistory({themeSettings:s}),{themeSettings:{...a.themeSettings,inputs:{...a.themeSettings.inputs,[n]:{...a.themeSettings.inputs[n],[o]:r}}}}}),isLoadingThemeSettings:!1,setIsLoadingThemeSettings:n=>e(()=>({isLoadingThemeSettings:n}))})),Fe=ie(e=>({notifications:[],setNotifications:t=>e(()=>({notifications:t}))})),Yc=ie(e=>({isOpen:!0,setIsOpen:t=>e(()=>({isOpen:t}))}));var Le=[];for(var or=0;or<256;++or)Le.push((or+256).toString(16).slice(1));function Xc(e,t=0){return(Le[e[t+0]]+Le[e[t+1]]+Le[e[t+2]]+Le[e[t+3]]+"-"+Le[e[t+4]]+Le[e[t+5]]+"-"+Le[e[t+6]]+Le[e[t+7]]+"-"+Le[e[t+8]]+Le[e[t+9]]+"-"+Le[e[t+10]]+Le[e[t+11]]+Le[e[t+12]]+Le[e[t+13]]+Le[e[t+14]]+Le[e[t+15]]).toLowerCase()}var vn,Qc=new Uint8Array(16);function eu(){if(!vn&&(vn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vn(Qc)}var tu=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const _o={randomUUID:tu};function ot(e,t,n){if(_o.randomUUID&&!e)return _o.randomUUID();e=e||{};var r=e.random||(e.rng||eu)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Xc(r)}function nu(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var a;const s=l=>l===null?null:JSON.parse(l,void 0),i=(a=n.getItem(o))!=null?a:null;return i instanceof Promise?i.then(s):s(i)},setItem:(o,a)=>n.setItem(o,JSON.stringify(a,void 0)),removeItem:o=>n.removeItem(o)}}const br=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return br(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return br(r)(n)}}}},ru=(e,t)=>(n,r,o)=>{let a={storage:nu(()=>localStorage),partialize:p=>p,version:0,merge:(p,v)=>({...v,...p}),...t},s=!1;const i=new Set,l=new Set;let c=a.storage;if(!c)return e((...p)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...p)},r,o);const u=()=>{const p=a.partialize({...r()});return c.setItem(a.name,{state:p,version:a.version})},d=o.setState;o.setState=(p,v)=>{d(p,v),u()};const h=e((...p)=>{n(...p),u()},r,o);o.getInitialState=()=>h;let y;const m=()=>{var p,v;if(!c)return;s=!1,i.forEach(b=>{var k;return b((k=r())!=null?k:h)});const R=((v=a.onRehydrateStorage)==null?void 0:v.call(a,(p=r())!=null?p:h))||void 0;return br(c.getItem.bind(c))(a.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==a.version){if(a.migrate)return[!0,a.migrate(b.state,b.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var k;const[_,T]=b;if(y=a.merge(T,(k=r())!=null?k:h),n(y,!0),_)return u()}).then(()=>{R==null||R(y,void 0),y=r(),s=!0,l.forEach(b=>b(y))}).catch(b=>{R==null||R(void 0,b)})};return o.persist={setOptions:p=>{a={...a,...p},p.storage&&(c=p.storage)},clearStorage:()=>{c==null||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:p=>(i.add(p),()=>{i.delete(p)}),onFinishHydration:p=>(l.add(p),()=>{l.delete(p)})},a.skipHydration||m(),y||h},Jn=ru,Yt=ie(Jn((e,t)=>({pages:null,currentPage:"",setPages:n=>e(()=>({pages:n})),pageContext:{listings:null,products:null,reviews:null,categories:null,faqs:null,general:null,fullPosts:null,posts:null,preserveContent:!1,vouches:null},isOpenModal:!1,isOpenSelectModal:!1,isEdit:!1,editedPage:null,setEditedPage:n=>e(()=>({editedPage:n})),setCurrentPage:n=>e(()=>({currentPage:n})),setPageContext:n=>e(()=>({pageContext:n})),setIsOpenModal:n=>e(()=>({isOpenModal:n})),setIsOpenSelectModal:n=>e(()=>({isOpenSelectModal:n})),setIsEdit:n=>e(()=>({isEdit:n})),createPage:n=>{const r=t().pages,o=ot();if(r)r[o]=n,e({pages:r});else{const a=t().setPages;a({});const s=t().pages;s[o]=n,e({pages:s})}},updatePage:(n,r)=>{const o=t().pages;o&&(o[n]={...r},e({pages:o}))},deletePage:n=>{const r=t().pages;r&&(delete r[n],e({pages:r}))}}),{name:"pages-storage",partialize:e=>{const{pages:t,pageContext:n}=e;return{pages:t,pageContext:n}}})),ou=ie(e=>({isOpenModal:!1,setIsOpenModal:t=>e(()=>({isOpenModal:t}))})),Mn=ie(Jn((e,t)=>({header:null,blocks:{},announcement:null,footer:null,currentBlock:null,positionBlock:null,setBlocks:n=>{e({blocks:n})},setHeader:(n,r=!0)=>{const o=JSON.parse(JSON.stringify(t().header)),a=JSON.parse(JSON.stringify(n));JSON.stringify(o)!==JSON.stringify(a)&&r&&Pe.getState().addHistory({header:o}),e({header:a})},setFooter:(n,r=!0)=>{const o=JSON.parse(JSON.stringify(t().footer)),a=JSON.parse(JSON.stringify(n));JSON.stringify(o)!==JSON.stringify(a)&&r&&Pe.getState().addHistory({footer:o}),e({footer:a})},setAnnouncement:(n,r=!0)=>{const o=JSON.parse(JSON.stringify(t().announcement)),a=JSON.parse(JSON.stringify(n));JSON.stringify(o)!==JSON.stringify(a)&&r&&Pe.getState().addHistory({announcement:o}),e({announcement:a})},createPage:n=>{const r=t().blocks;r[n]={data:{},order:[]},e({blocks:r})},deletePage:n=>{const r=t().blocks;delete r[n],e({blocks:r})},updatePage:(n,r)=>{const o=t().blocks;if(o[r])return;const a=o[n];delete o[n],o[r]=a,e({blocks:o})},setCurrentBlock:n=>{e({currentBlock:n})},setPositionBlock:(n,r=!1)=>{const{blocks:o}=t(),{currentPage:a,pages:s}=Yt.getState();if(!a||!s||!s[a]||!o[s[a].path]){console.error("Cannot set position: invalid page or block data");return}const i=s[a].path,l=o[i],c=n?l.order.indexOf(n):-1;if(c===-1&&n){console.error(`Block with ID "${n}" not found in page "${i}"`);return}const u=c!==-1?c+(r?1:0):l.order.length;e({positionBlock:u})},addBlock:(n,r)=>{const o=JSON.parse(JSON.stringify(t().blocks));Pe.getState().addHistory({layers:o});const a={...t().blocks},s=a[n]||{data:{},order:[]},i=t().positionBlock,l=ot(),c={name:r.name,value:r.value};return s.data[l]=c,i===null||i>=s.order.length?s.order.push(l):s.order.splice(i,0,l),e({blocks:{...a,[n]:{data:s.data,order:s.order}},currentBlock:l,positionBlock:null}),Fe.getState().setNotifications([...Fe.getState().notifications,{id:ot(),message:"Block successfully added",status:"success"}]),l},editBlock:(n,r,o)=>{const a=JSON.parse(JSON.stringify(t().blocks));Pe.getState().addHistory({layers:a});const s=t().blocks,i=s[n]||{};i.data[r]={name:o.name,value:{...o.value}},e({blocks:{...s,[n]:i}})},removeBlock:(n,r)=>{const o=JSON.parse(JSON.stringify(t().blocks));Pe.getState().addHistory({layers:o});const a=JSON.parse(JSON.stringify(t().blocks)),s=a[n];if(!s){console.error(`Page at path "${n}" does not exist.`);return}delete s.data[r],s.order=s.order.filter(i=>i!==r),e({blocks:{...a,[n]:s}}),Fe.getState().setNotifications([...Fe.getState().notifications,{id:ot(),message:"Block successfully deleted",status:"success"}])},moveBlock:(n,r,o)=>e(a=>{const s=JSON.parse(JSON.stringify(t().blocks));if(Pe.getState().addHistory({layers:s}),!a.blocks[n])return console.error(`Path ${n} does not exist in blocks`),a;const i={...a.blocks[n]},l=[...i.order];if(r<0||o<0||r>=l.length||o>=l.length)return console.error(`Invalid indices: fromIndex=${r}, toIndex=${o}`),a;const[c]=l.splice(r,1);return l.splice(o,0,c),Fe.getState().setNotifications([...Fe.getState().notifications,{id:ot(),message:"Block successfully moved",status:"success"}]),{blocks:{...a.blocks,[n]:{...i,order:l}}}}),duplicateBlock:(n,r)=>{const o=JSON.parse(JSON.stringify(t().blocks));Pe.getState().addHistory({layers:o});const a=JSON.parse(JSON.stringify(t().blocks)),s=a[n];if(!s||!s.data[r]){console.error(`Block with ID "${r}" not found in page "${n}"`);return}const i=ot(),l=s.data[r],c={name:l.name,value:JSON.parse(JSON.stringify({...l.value}))};s.data[i]={...c};const u=s.order.indexOf(r);if(u===-1){console.error(`Block ID "${r}" not found in order array`);return}s.order.splice(u+1,0,i),e({blocks:{...a,[n]:s},currentBlock:i}),ka.getState().setActiveBlock({id:i,neededScroll:!0}),Fe.getState().setNotifications([...Fe.getState().notifications,{id:ot(),message:"Block successfully duplicated",status:"success"}])},isLoadingLayers:!1,setIsLoadingLayers:n=>e(()=>({isLoadingLayers:n}))}),{name:"layers-storage",partialize:e=>{const{blocks:t,header:n,footer:r,announcement:o}=e;return{blocks:t,header:n,footer:r,announcement:o}}})),Pe=ie((e,t)=>({past:[],future:[],addHistory:n=>{e(r=>{const o=r.past[r.past.length-1];return o&&JSON.stringify(o)===JSON.stringify(n)?r:{past:[...r.past,n],future:[]}})},undo:()=>{const{past:n,future:r}=t();if(n.length===0)return;const o=n[n.length-1],a=n.slice(0,-1),{blocks:s,header:i,footer:l,announcement:c,setBlocks:u,setHeader:d,setFooter:h,setAnnouncement:y}=Mn.getState(),{themeSettings:m,setThemeSettings:p}=On.getState(),v={themeSettings:JSON.parse(JSON.stringify(m)),layers:JSON.parse(JSON.stringify(s)),header:JSON.parse(JSON.stringify(i)),footer:JSON.parse(JSON.stringify(l)),announcement:JSON.parse(JSON.stringify(c))};e({past:a,future:[v,...r]}),o.themeSettings&&p(o.themeSettings),o.layers&&u(o.layers),o.header&&d(o.header,!1),o.footer&&h(o.footer,!1),o.announcement&&y(o.announcement,!1)},redo:()=>{const{past:n,future:r}=t();if(r.length===0)return;const{blocks:o,header:a,footer:s,announcement:i,setBlocks:l,setHeader:c,setFooter:u,setAnnouncement:d}=Mn.getState(),{themeSettings:h,setThemeSettings:y}=On.getState(),m=r[0],p=r.slice(1),v={themeSettings:JSON.parse(JSON.stringify(h)),layers:JSON.parse(JSON.stringify(o)),header:JSON.parse(JSON.stringify(a)),footer:JSON.parse(JSON.stringify(s)),announcement:JSON.parse(JSON.stringify(i))};e({past:[...n,v],future:p}),m.themeSettings&&y(m.themeSettings),m.layers&&l(m.layers),m.header&&c(m.header,!1),m.footer&&u(m.footer,!1),m.announcement&&d(m.announcement,!1)}})),ka=ie(Jn(e=>({onPreview:!0,setOnPreview:t=>e(()=>({onPreview:t})),activeBlock:{id:null,neededScroll:!1},setActiveBlock:t=>e(()=>({activeBlock:t})),zoomLevel:1,setZoomLevel:t=>e(()=>({zoomLevel:t}))}),{name:"preview-storage",partialize:e=>{const{onPreview:t}=e;return{onPreview:t}}})),La=[{icon:"TreeStructure",name:"Layers"},{icon:"Plus",name:"Add"},{icon:"Palette",name:"Theme"},{icon:"Gear",name:"Settings"}],au=[{icon:"Desktop",value:"desktop"},{icon:"DeviceTabletCamera",value:"tablet"},{icon:"DeviceMobileCamera",value:"mobile"}],su=[{icon:"PaintBrushBroad",name:"Colors"},{icon:"TextAa",name:"Fonts"},{icon:"CornersOut",name:"Borders"},{icon:"ArrowSquareIn",name:"Buttons"},{icon:"Textbox",name:"Inputs"}],iu=[12,14,16,18,20,24,28,32,40,48].map(e=>String(e)),lu=["/","/reviews","/faqs","/contact","/products","/ticket","/login"],$t={"/":{path:"/",name:"Home",icon:"HouseSimple",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/products":{path:"/products",name:"Products",icon:"SquaresFour",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/faqs":{path:"/faqs",name:"Faqs",icon:"SealQuestion",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/reviews":{path:"/reviews",name:"Reviews",icon:"Star",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/contact":{path:"/contact",name:"Contact",icon:"ChatCentered",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/ticket":{path:"/ticket",name:"Ticket",icon:"Ticket",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/login":{path:"/login",name:"Login",icon:"UserCircleGear",seo:{pageDescription:"",pageTitle:""},visibility:"public"}},cu=typeof window<"u"&&(window.location.hostname.includes("localhost")||window.location.hostname.includes("192")||window.location.hostname.includes("local-rst.sp-internal.work")),uu={None:"var(--radius-none)",4:"var(--radius-xs)",8:"var(--radius-sm)",12:"var(--radius-md)",16:"var(--radius-lg)",20:"var(--radius-xl)",24:"var(--radius-2xl)"},du={None:"var(--border-none)",1:"var(--border-sm)",2:"var(--border-md)",4:"var(--border-lg)"},fu={"1:1":"1:1","4:3":"4:3","16:9":"16:9","9:16":"9:16"},hu=[{value:"4:3",addon:L.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:L.jsx("div",{style:{width:18.5,height:14.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"16:9",addon:L.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:L.jsx("div",{style:{width:20.5,height:12.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"9:16",addon:L.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:L.jsx("div",{style:{width:14.5,height:18.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"1:1",addon:L.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:L.jsx("div",{style:{width:16.5,height:16.5,border:"1.5px solid #252525",borderRadius:3}})})}],pu={h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",h7:"Heading 7",lg:"Paragraph Large",md:"Paragraph Medium",sm:"Paragraph Small"},mu=ie(e=>({activeBlock:La[0],setActiveBlock:t=>e(()=>({activeBlock:t}))})),Na=ie(e=>({openModal:!1,setOpenModal:t=>e(()=>({openModal:t})),onChange:null,setOnChange:t=>e(()=>({onChange:t})),tip:"",setTip:t=>e(()=>({tip:t}))})),gu=ie(e=>({error:null,setError:t=>e(()=>({error:t}))})),Ta=ie(e=>({title:null,description:null,onConfirm:null,setTitle:t=>e(()=>({title:t})),setDescription:t=>e(()=>({description:t})),setOnConfirm:t=>e(()=>({onConfirm:t}))}));var vu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pa={exports:{}};/*!
36
+ `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=bt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&xn.assertOptions(r,{silentJSONParsing:Xe.transitional(Xe.boolean),forcedJSONParsing:Xe.transitional(Xe.boolean),clarifyTimeoutError:Xe.transitional(Xe.boolean)},!1),o!=null&&(C.isFunction(o)?n.paramsSerializer={serialize:o}:xn.assertOptions(o,{encode:Xe.function,serialize:Xe.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),xn.assertOptions(n,{baseUrl:Xe.spelling("baseURL"),withXsrfToken:Xe.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&C.merge(a.common,a[n.method]);a&&C.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=De.concat(s,a);const i=[];let l=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(l=l&&p.synchronous,i.unshift(p.fulfilled,p.rejected))});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let u,d=0,h;if(!l){const m=[ko.bind(this),void 0];for(m.unshift.apply(m,i),m.push.apply(m,c),h=m.length,u=Promise.resolve(n);d<h;)u=u.then(m[d++],m[d++]);return u}h=i.length;let y=n;for(d=0;d<h;){const m=i[d++],p=i[d++];try{y=m(y)}catch(v){p.call(this,v);break}}try{u=ko.call(this,y)}catch(m){return Promise.reject(m)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=bt(this.defaults,t);const n=ma(t.baseURL,t.url,t.allowAbsoluteUrls);return ua(n,t.params,t.paramsSerializer)}};C.forEach(["delete","get","head","options"],function(t){wt.prototype[t]=function(n,r){return this.request(bt(r||{},{method:t,url:n,data:(r||{}).data}))}});C.forEach(["post","put","patch"],function(t){function n(r){return function(a,s,i){return this.request(bt(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}wt.prototype[t]=n(),wt.prototype[t+"Form"]=n(!0)});let Rc=class Sa{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const s=new Promise(i=>{r.subscribe(i),a=i}).then(o);return s.cancel=function(){r.unsubscribe(a)},s},t(function(a,s,i){r.reason||(r.reason=new Ot(a,s,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Sa(function(o){t=o}),cancel:t}}};function kc(e){return function(n){return e.apply(null,n)}}function Lc(e){return C.isObject(e)&&e.isAxiosError===!0}const vr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vr).forEach(([e,t])=>{vr[t]=e});function Ca(e){const t=new wt(e),n=Qo(wt.prototype.request,t);return C.extend(n,wt.prototype,t,{allOwnKeys:!0}),C.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ca(bt(e,o))},n}const ce=Ca(tn);ce.Axios=wt;ce.CanceledError=Ot;ce.CancelToken=Rc;ce.isCancel=ha;ce.VERSION=ba;ce.toFormData=Vn;ce.AxiosError=$;ce.Cancel=ce.CanceledError;ce.all=function(t){return Promise.all(t)};ce.spread=kc;ce.isAxiosError=Lc;ce.mergeConfig=bt;ce.AxiosHeaders=De;ce.formToJSON=e=>fa(C.isHTMLForm(e)?new FormData(e):e);ce.getAdapter=wa.getAdapter;ce.HttpStatusCode=vr;ce.default=ce;const{Axios:a0,AxiosError:Nc,CanceledError:s0,isCancel:i0,CancelToken:l0,VERSION:c0,all:u0,Cancel:d0,isAxiosError:f0,spread:h0,toFormData:p0,AxiosHeaders:m0,HttpStatusCode:g0,formToJSON:v0,getAdapter:y0,mergeConfig:w0}=ce,gn="https://localhost:5043",at=async e=>{var h,y;const{url:t,withToken:n,method:r,body:o,contentType:a,typeToken:s="seller"}=e,i=n?localStorage.getItem("sellerAccessToken"):null,l=n?localStorage.getItem("token"):null,c=s==="seller"?i:l,u=localStorage.getItem("dv"),d={};a&&!(o instanceof FormData)?d["Content-Type"]=a:o instanceof FormData||(d["Content-Type"]="application/json"),n&&c&&(d.Authorization=`Bearer ${c}`);try{let m=null;switch(r){case"get":m=await ce.get(u?gn:t,{headers:d});break;case"post":m=await ce.post(u?gn:t,o,{headers:d});break;case"put":m=await ce.put(u?gn:t,o,{headers:d});break;case"delete":m=await ce.delete(u?gn:t,{headers:d});break}return{data:m==null?void 0:m.data,status:m==null?void 0:m.status,headers:m==null?void 0:m.headers}}catch(m){const p=m,v=(h=p.response)==null?void 0:h.data;let R="Something Went Wrong";v&&(R=v.errors[0]);const b=(y=p.response)==null?void 0:y.status;if(b===401)try{const P=await Promise.resolve().then(()=>require("./charge-BHOPMu9B.cjs")).then(T=>T.auth);P&&P.logoutCustomer?await P.logoutCustomer():localStorage.removeItem("token"),window.location.reload()}catch(P){console.error("Failed to import logoutCustomer:",P),localStorage.removeItem("token"),window.location.reload()}const k=new Nc(R,(b==null?void 0:b.toString())||"400");throw k.response=p.response,k}},Tc="https://g-api.billgang.com",Pc="https://www.googleapis.com/webfonts/v1/webfonts",_c="https://stores-api.billgang.com",Oc="https://sl-api.billgang.com",Mc="https://customers-api.billgang.com",Ac="https://cashapp-api.billgang.com",Dc={api:Tc,googleFonts:Pc,storeApi:_c,slApi:Oc,customersApi:Mc,cashappApi:Ac},Fc=(e,t="300")=>e==="not found"?"empty":`https://imagedelivery.net/${e}/w=${t}`,Ic=e=>{const t=new Intl.NumberFormat("en-US",{style:"currency",currency:e.currency||"USD"});let n=e.amount;return e.quantity&&(n=n*e.quantity),t.format(n)},Bc=(e,t)=>{if(e===0)throw new Error("Old value cannot be zero, as it would result in division by zero.");return(t-e)/Math.abs(e)*100},jc=e=>{if(Math.abs(e-365)<=15){const a=Math.round(e/365);return a===1?"year":`${a} years`}else if(Math.abs(e-30)<=5){const a=Math.round(e/30);return a===1?"month":`${a} months`}else return`${e} days`},Hc=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),Uc=e=>{const t=new Date(e),n={day:"2-digit",month:"2-digit",year:"numeric"},r={hour:"2-digit",minute:"2-digit"},o=t.toLocaleString("en-US",n),a=t.toLocaleString("en-US",r);return[o,a]},yr=e=>{const t=window.localStorage.getItem(e);if(t===null)return null;try{return JSON.parse(t)}catch{return t}},No=(e,t)=>{(t===null||typeof t!="object")&&window.localStorage.setItem(e,String(t));const n=JSON.stringify(t);window.localStorage.setItem(e,n)},rr="f10120ab-7ebb-4785-b240-7428edaa3c4e",Ut="https://t-api.billgang.com",Vt="https://internal-t-api.antistock.io",qt="I",Vc=10*1e3,$c=15*1e3,zc=15*60*1e3,Ea=()=>{var t;const e=yr(qt);return((t=e==null?void 0:e.s)==null?void 0:t.i)||null},Jc=(e,t="production",n)=>{const{pathname:r}=qe(),o=we.useRef(),a=we.useRef(document.visibilityState);we.useEffect(()=>{if(!e)return;const s=()=>Date.now(),i=async()=>(await at({url:`${n?Vt:Ut}/${e}/t/p`,method:"post",withToken:!1})).data.data.id,l=async m=>(await at({url:`${n?Vt:Ut}/${e}/t/p/${t==="development"?rr:m}/s`,method:"post",withToken:!1})).data.data.id,c=async(m,p,v,R)=>{const b=t==="development"?rr:m;try{return(await at({url:`${n?Vt:Ut}/${e}/t/p/${b}/s/${p}/e`,method:"post",withToken:!1,body:{url:v,oldEventId:R},contentType:"application/json"})).data.data.id}catch{return p=await l(m),(await at({url:`${n?Vt:Ut}/${e}/t/p/${b}/s/${p}/e`,method:"post",withToken:!1,body:{url:v},contentType:"application/json"})).data.data.id}},u=async(m,p,v)=>{await at({url:`${n?Vt:Ut}/${e}/t/p/${t==="development"?rr:m}/s/${p}/e/${v}/h`,method:"post",withToken:!1});const b=yr(qt);b&&(b.s.u=s().toString(),b.lu=s().toString(),No(qt,b))},d=(m,p,v)=>{o.current&&clearInterval(o.current),o.current=setInterval(async()=>{if(document.visibilityState==="visible")try{await u(m,p,v)}catch{await h()}},Vc)},h=async()=>{var R,b,k,P;const m=`${window.location.hostname}${r}`,p=yr(qt),v=s();try{let T=p==null?void 0:p.p;T||(T=await i());let H=(R=p==null?void 0:p.s)==null?void 0:R.i;const w=Number(((b=p==null?void 0:p.s)==null?void 0:b.u)||((k=p==null?void 0:p.s)==null?void 0:k.c)),_=!H||v-w>zc;(!H||_)&&(H=await l(T));const G=Number((p==null?void 0:p.lu)||0),B=v-G>$c,ae=await c(T,H,m,p!=null&&p.l&&!B?p.l:void 0),ee={p:T,s:{i:H,c:((P=p==null?void 0:p.s)==null?void 0:P.c)??v.toString(),u:v.toString()},l:ae,lu:v.toString()};No(qt,ee),d(T,H,ae)}catch(T){console.error("[TrackingAnalytics] error",T)}};h();const y=()=>{document.visibilityState==="visible"&&a.current!=="visible"&&h(),a.current=document.visibilityState};return document.addEventListener("visibilitychange",y),()=>{o.current&&clearInterval(o.current),document.removeEventListener("visibilitychange",y)}},[r,e,t])},qc={customerEmail:"",recaptcha:"",gateway:"",paymentMethod:"",parts:[],customFields:{},discordSocialConnectId:null,coupon:null,tsId:Ea()};let Nt=null;const To=localStorage.getItem("token");if(To)try{Nt=Xo(JSON.parse(To)||"")}catch{Nt=null}const Wc=ie(e=>({cart:{...qc,customerEmail:Nt?Nt.email:""},products:[],coupon:null,pending:!1,applyCouponPending:!1,customerEmail:Nt?Nt.email:"",recaptcha:"",priceAdjustment:null,serviceFee:null,replacementConfig:null,setCart:t=>e(n=>({cart:typeof t=="function"?t(n.cart):t})),setProducts:t=>e(n=>({products:typeof t=="function"?t(n.products):t})),setRecaptcha:t=>e({recaptcha:t}),setCoupon:t=>e({coupon:t}),setPending:t=>e({pending:t}),setApplyCouponPending:t=>e({applyCouponPending:t}),setCustomerEmail:t=>e({customerEmail:t}),setPriceAdjustment:t=>e({priceAdjustment:t}),setServiceFee:t=>e({serviceFee:t}),setReplacementConfig:t=>e({replacementConfig:t}),setUsePriorityReplacement:t=>e(n=>({cart:{...n.cart,usePriorityReplacement:t}}))})),Zc=ie(e=>({page:1,setPage:t=>e(()=>({page:t})),resetPage:()=>e(()=>({page:1}))})),Gc=ie(e=>({discordInfo:null,setDiscordInfo:t=>e(()=>({discordInfo:t}))})),Kc=ie(e=>({subscription:null,setSubscription:t=>e({subscription:t})})),nn=ie(e=>({apiUrls:Dc,setApiUrls:t=>e(()=>({apiUrls:t}))})),xa=ie(e=>({header:null,footer:null,announcement:null,setHeader:t=>e(()=>({header:t})),setFooter:t=>e(()=>({footer:t})),setAnnouncement:t=>e(()=>({announcement:t})),blocks:null,setBlocks:t=>e(()=>({blocks:t})),activeBlock:null,setActiveBlock:t=>e(()=>({activeBlock:t})),sourceBlocks:{},setSourceBlocks:t=>e(()=>({sourceBlocks:t})),currentInstance:null,setCurrentInstance:t=>e(()=>({currentInstance:t})),settings:null,setSettings:t=>e(()=>({settings:t})),settingsInstance:null,setSettingsInstance:t=>e(()=>({settingsInstance:t}))})),Ra=ie(e=>({general:null,setGeneral:t=>e(()=>({general:t})),isAntistock:!1,setIsAntistock:t=>e(()=>({isAntistock:t}))})),wr=ie(e=>({settings:null,setSettings:t=>{e(()=>({settings:t}))},isLoadingSettings:!0,setIsLoadingSettings:t=>e(()=>({isLoadingSettings:t}))})),On=ie((e,t)=>({activeBlock:null,setActiveBlock:n=>e(()=>({activeBlock:n})),activeFont:null,setActiveFont:n=>e(()=>({activeFont:n})),setThemeSettings:n=>e(()=>({themeSettings:n})),activeColorCategory:null,setActiveColorCategory:n=>e(()=>({activeColorCategory:n})),themeSettings:{colors:{text:{primary:"#252525",secondary:"#757575",tertiary:"#C2C2C2",inverted:"#FFFFFF",action:"#FF3F19",actionHover:"#DA2400",disabled:"#C2C2C2",warning:"#C1972A",error:"#C12A2A",success:"#338B13",information:"#3683F7",link:"#3683F7"},icon:{primary:"#252525",secondary:"#555555",tertiary:"#C2C2C2",inverted:"#FFFFFF",action:"#FF3F19",actionHover:"#DA2400",disabled:"#C2C2C2",warning:"#C1972A",error:"#C12A2A",success:"#338B13",information:"#3683F7",link:"#3683F7"},border:{primary:"#C2C2C2",secondary:"#E6E6E6",action:"#FF3F19",actionHover:"#DA2400",disabled:"#E6E6E6",warning:"#C1972A",error:"#C12A2A",success:"#338B13",information:"#3683F7",focus:"#FF3F19"},surface:{primary:"#FFFFFF",secondary:"#F8F8F8",action1:"#FF3F19",action1Hover:"#DA2400",action2:"#FFFFFF",action2Hover:"#F8F8F8",disabled:"#C2C2C2",warning:"#FAF4E6",error:"#FAE6E6",success:"#E5FADD",information:"#E9F1FE",modal:"rgba(1, 1, 4, 0.4)"}},fonts:{mobile:{fontSizePercentage:30},tablet:{fontSizePercentage:50},desktop:{heading:{h1:{font:"Archivo",weight:"700",size:48,boldWeight:"900",case:"normal"},h2:{font:"Archivo",weight:"700",size:32,boldWeight:"800",case:"normal"},h3:{font:"Archivo",weight:"600",size:24,boldWeight:"700",case:"normal"},h4:{font:"Archivo",weight:"500",size:20,boldWeight:"700",case:"normal"},h5:{font:"Archivo",weight:"400",size:16,boldWeight:"700",case:"normal"},h6:{font:"Archivo",weight:"400",size:14,boldWeight:"700",case:"uppercase"},h7:{font:"Archivo",weight:"400",size:14,boldWeight:"700",case:"normal"}},body:{lg:{font:"Archivo",size:16,weight:"400",boldWeight:"700",case:"normal"},md:{font:"Archivo",size:14,weight:"400",boldWeight:"700",case:"normal"},sm:{font:"Archivo",size:12,weight:"400",boldWeight:"700",case:"normal"}}}},borders:{radius:"var(--radius-lg)",thickness:"var(--border-none)"},buttons:{primary:{size:26,alignment:"left",radius:32,height:40,background:"#ff3f19",hover:!0,font:"Archivo",boxShadow:{left:0,top:0,blur:0,spread:0,color:"#000000"},color:"#ffffff",colorHover:"#ffffff",backgroundHover:"#ff3f19"},secondary:{size:26,alignment:"left",radius:10,height:20,background:"#c2c2c2",hover:!1,font:"Archivo",boxShadow:{left:0,top:4,blur:10,spread:0,color:"#000000"},color:"#757575",colorHover:"#757575",backgroundHover:"#c2c2c2"},tertiary:{size:12,alignment:"left",radius:30,height:30,background:"#c2c2c2",hover:!0,font:"Archivo",boxShadow:{left:0,top:4,blur:10,spread:0,color:"#000000"},color:"#757575",colorHover:"#757575",backgroundHover:"#c2c2c2"}},inputs:{field:{color:"#f3f3f3",active:!0,opacity:40},label:{size:14,color:"#555555",height:40,alignment:"left"},border:{color:"#f3f3f3",style:"solid",active:!0,radius:14,thickness:0},general:{size:14,color:"#252525",height:40},placeholder:{color:"#C2C2C2"}}},updateColor:(n,r,o)=>e(a=>{const s=JSON.parse(JSON.stringify(t().themeSettings));_e.getState().addHistory({themeSettings:s});const i={...a.themeSettings.colors,[n]:{...a.themeSettings.colors[n],[r]:o}};return{themeSettings:{...a.themeSettings,colors:i}}}),updateFont:(n,r,o,a,s)=>e(i=>{const l=JSON.parse(JSON.stringify(t().themeSettings));_e.getState().addHistory({themeSettings:l});const c={...i.themeSettings.fonts,[n]:{...i.themeSettings.fonts[n],[r]:{...i.themeSettings.fonts[n][r],[o]:{...i.themeSettings.fonts[n][r][o],[a]:s}}}};return{themeSettings:{...i.themeSettings,fonts:c}}}),updateFontSizePercentage:(n,r)=>e(o=>{const a=JSON.parse(JSON.stringify(t().themeSettings));_e.getState().addHistory({themeSettings:a});const s={...o.themeSettings.fonts,[n]:{...o.themeSettings.fonts[n],fontSizePercentage:r}};return{themeSettings:{...o.themeSettings,fonts:s}}}),updateBorder:(n,r)=>e(o=>{const a=JSON.parse(JSON.stringify(t().themeSettings));_e.getState().addHistory({themeSettings:a});const s={...o.themeSettings.borders,[n]:r};return{themeSettings:{...o.themeSettings,borders:s}}}),updateButton:(n,r,o)=>e(a=>{const s=JSON.parse(JSON.stringify(t().themeSettings));_e.getState().addHistory({themeSettings:s});const i={...a.themeSettings.buttons[n],[r]:o},l={...a.themeSettings.buttons,[n]:i};return{themeSettings:{...a.themeSettings,buttons:l}}}),updateInput:(n,r,o)=>e(a=>{const s=JSON.parse(JSON.stringify(t().themeSettings));return _e.getState().addHistory({themeSettings:s}),{themeSettings:{...a.themeSettings,inputs:{...a.themeSettings.inputs,[n]:{...a.themeSettings.inputs[n],[o]:r}}}}}),isLoadingThemeSettings:!1,setIsLoadingThemeSettings:n=>e(()=>({isLoadingThemeSettings:n}))})),Fe=ie(e=>({notifications:[],setNotifications:t=>e(()=>({notifications:t}))})),Yc=ie(e=>({isOpen:!0,setIsOpen:t=>e(()=>({isOpen:t}))}));var Le=[];for(var or=0;or<256;++or)Le.push((or+256).toString(16).slice(1));function Xc(e,t=0){return(Le[e[t+0]]+Le[e[t+1]]+Le[e[t+2]]+Le[e[t+3]]+"-"+Le[e[t+4]]+Le[e[t+5]]+"-"+Le[e[t+6]]+Le[e[t+7]]+"-"+Le[e[t+8]]+Le[e[t+9]]+"-"+Le[e[t+10]]+Le[e[t+11]]+Le[e[t+12]]+Le[e[t+13]]+Le[e[t+14]]+Le[e[t+15]]).toLowerCase()}var vn,Qc=new Uint8Array(16);function eu(){if(!vn&&(vn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vn(Qc)}var tu=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Po={randomUUID:tu};function ot(e,t,n){if(Po.randomUUID&&!e)return Po.randomUUID();e=e||{};var r=e.random||(e.rng||eu)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Xc(r)}function nu(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var a;const s=l=>l===null?null:JSON.parse(l,void 0),i=(a=n.getItem(o))!=null?a:null;return i instanceof Promise?i.then(s):s(i)},setItem:(o,a)=>n.setItem(o,JSON.stringify(a,void 0)),removeItem:o=>n.removeItem(o)}}const br=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return br(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return br(r)(n)}}}},ru=(e,t)=>(n,r,o)=>{let a={storage:nu(()=>localStorage),partialize:p=>p,version:0,merge:(p,v)=>({...v,...p}),...t},s=!1;const i=new Set,l=new Set;let c=a.storage;if(!c)return e((...p)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...p)},r,o);const u=()=>{const p=a.partialize({...r()});return c.setItem(a.name,{state:p,version:a.version})},d=o.setState;o.setState=(p,v)=>{d(p,v),u()};const h=e((...p)=>{n(...p),u()},r,o);o.getInitialState=()=>h;let y;const m=()=>{var p,v;if(!c)return;s=!1,i.forEach(b=>{var k;return b((k=r())!=null?k:h)});const R=((v=a.onRehydrateStorage)==null?void 0:v.call(a,(p=r())!=null?p:h))||void 0;return br(c.getItem.bind(c))(a.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==a.version){if(a.migrate)return[!0,a.migrate(b.state,b.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var k;const[P,T]=b;if(y=a.merge(T,(k=r())!=null?k:h),n(y,!0),P)return u()}).then(()=>{R==null||R(y,void 0),y=r(),s=!0,l.forEach(b=>b(y))}).catch(b=>{R==null||R(void 0,b)})};return o.persist={setOptions:p=>{a={...a,...p},p.storage&&(c=p.storage)},clearStorage:()=>{c==null||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:p=>(i.add(p),()=>{i.delete(p)}),onFinishHydration:p=>(l.add(p),()=>{l.delete(p)})},a.skipHydration||m(),y||h},Jn=ru,Yt=ie(Jn((e,t)=>({pages:null,currentPage:"",setPages:n=>e(()=>({pages:n})),pageContext:{listings:null,products:null,reviews:null,categories:null,faqs:null,general:null,fullPosts:null,posts:null,preserveContent:!1,vouches:null},isOpenModal:!1,isOpenSelectModal:!1,isEdit:!1,editedPage:null,setEditedPage:n=>e(()=>({editedPage:n})),setCurrentPage:n=>e(()=>({currentPage:n})),setPageContext:n=>e(()=>({pageContext:n})),setIsOpenModal:n=>e(()=>({isOpenModal:n})),setIsOpenSelectModal:n=>e(()=>({isOpenSelectModal:n})),setIsEdit:n=>e(()=>({isEdit:n})),createPage:n=>{const r=t().pages,o=ot();if(r)r[o]=n,e({pages:r});else{const a=t().setPages;a({});const s=t().pages;s[o]=n,e({pages:s})}},updatePage:(n,r)=>{const o=t().pages;o&&(o[n]={...r},e({pages:o}))},deletePage:n=>{const r=t().pages;r&&(delete r[n],e({pages:r}))}}),{name:"pages-storage",partialize:e=>{const{pages:t,pageContext:n}=e;return{pages:t,pageContext:n}}})),ou=ie(e=>({isOpenModal:!1,setIsOpenModal:t=>e(()=>({isOpenModal:t}))})),Mn=ie(Jn((e,t)=>({header:null,blocks:{},announcement:null,footer:null,currentBlock:null,positionBlock:null,setBlocks:n=>{e({blocks:n})},setHeader:(n,r=!0)=>{const o=JSON.parse(JSON.stringify(t().header)),a=JSON.parse(JSON.stringify(n));JSON.stringify(o)!==JSON.stringify(a)&&r&&_e.getState().addHistory({header:o}),e({header:a})},setFooter:(n,r=!0)=>{const o=JSON.parse(JSON.stringify(t().footer)),a=JSON.parse(JSON.stringify(n));JSON.stringify(o)!==JSON.stringify(a)&&r&&_e.getState().addHistory({footer:o}),e({footer:a})},setAnnouncement:(n,r=!0)=>{const o=JSON.parse(JSON.stringify(t().announcement)),a=JSON.parse(JSON.stringify(n));JSON.stringify(o)!==JSON.stringify(a)&&r&&_e.getState().addHistory({announcement:o}),e({announcement:a})},createPage:n=>{const r=t().blocks;r[n]={data:{},order:[]},e({blocks:r})},deletePage:n=>{const r=t().blocks;delete r[n],e({blocks:r})},updatePage:(n,r)=>{const o=t().blocks;if(o[r])return;const a=o[n];delete o[n],o[r]=a,e({blocks:o})},setCurrentBlock:n=>{e({currentBlock:n})},setPositionBlock:(n,r=!1)=>{const{blocks:o}=t(),{currentPage:a,pages:s}=Yt.getState();if(!a||!s||!s[a]||!o[s[a].path]){console.error("Cannot set position: invalid page or block data");return}const i=s[a].path,l=o[i],c=n?l.order.indexOf(n):-1;if(c===-1&&n){console.error(`Block with ID "${n}" not found in page "${i}"`);return}const u=c!==-1?c+(r?1:0):l.order.length;e({positionBlock:u})},addBlock:(n,r)=>{const o=JSON.parse(JSON.stringify(t().blocks));_e.getState().addHistory({layers:o});const a={...t().blocks},s=a[n]||{data:{},order:[]},i=t().positionBlock,l=ot(),c={name:r.name,value:r.value};return s.data[l]=c,i===null||i>=s.order.length?s.order.push(l):s.order.splice(i,0,l),e({blocks:{...a,[n]:{data:s.data,order:s.order}},currentBlock:l,positionBlock:null}),Fe.getState().setNotifications([...Fe.getState().notifications,{id:ot(),message:"Block successfully added",status:"success"}]),l},editBlock:(n,r,o)=>{const a=JSON.parse(JSON.stringify(t().blocks));_e.getState().addHistory({layers:a});const s=t().blocks,i=s[n]||{};i.data[r]={name:o.name,value:{...o.value}},e({blocks:{...s,[n]:i}})},removeBlock:(n,r)=>{const o=JSON.parse(JSON.stringify(t().blocks));_e.getState().addHistory({layers:o});const a=JSON.parse(JSON.stringify(t().blocks)),s=a[n];if(!s){console.error(`Page at path "${n}" does not exist.`);return}delete s.data[r],s.order=s.order.filter(i=>i!==r),e({blocks:{...a,[n]:s}}),Fe.getState().setNotifications([...Fe.getState().notifications,{id:ot(),message:"Block successfully deleted",status:"success"}])},moveBlock:(n,r,o)=>e(a=>{const s=JSON.parse(JSON.stringify(t().blocks));if(_e.getState().addHistory({layers:s}),!a.blocks[n])return console.error(`Path ${n} does not exist in blocks`),a;const i={...a.blocks[n]},l=[...i.order];if(r<0||o<0||r>=l.length||o>=l.length)return console.error(`Invalid indices: fromIndex=${r}, toIndex=${o}`),a;const[c]=l.splice(r,1);return l.splice(o,0,c),Fe.getState().setNotifications([...Fe.getState().notifications,{id:ot(),message:"Block successfully moved",status:"success"}]),{blocks:{...a.blocks,[n]:{...i,order:l}}}}),duplicateBlock:(n,r)=>{const o=JSON.parse(JSON.stringify(t().blocks));_e.getState().addHistory({layers:o});const a=JSON.parse(JSON.stringify(t().blocks)),s=a[n];if(!s||!s.data[r]){console.error(`Block with ID "${r}" not found in page "${n}"`);return}const i=ot(),l=s.data[r],c={name:l.name,value:JSON.parse(JSON.stringify({...l.value}))};s.data[i]={...c};const u=s.order.indexOf(r);if(u===-1){console.error(`Block ID "${r}" not found in order array`);return}s.order.splice(u+1,0,i),e({blocks:{...a,[n]:s},currentBlock:i}),ka.getState().setActiveBlock({id:i,neededScroll:!0}),Fe.getState().setNotifications([...Fe.getState().notifications,{id:ot(),message:"Block successfully duplicated",status:"success"}])},isLoadingLayers:!1,setIsLoadingLayers:n=>e(()=>({isLoadingLayers:n}))}),{name:"layers-storage",partialize:e=>{const{blocks:t,header:n,footer:r,announcement:o}=e;return{blocks:t,header:n,footer:r,announcement:o}}})),_e=ie((e,t)=>({past:[],future:[],addHistory:n=>{e(r=>{const o=r.past[r.past.length-1];return o&&JSON.stringify(o)===JSON.stringify(n)?r:{past:[...r.past,n],future:[]}})},undo:()=>{const{past:n,future:r}=t();if(n.length===0)return;const o=n[n.length-1],a=n.slice(0,-1),{blocks:s,header:i,footer:l,announcement:c,setBlocks:u,setHeader:d,setFooter:h,setAnnouncement:y}=Mn.getState(),{themeSettings:m,setThemeSettings:p}=On.getState(),v={themeSettings:JSON.parse(JSON.stringify(m)),layers:JSON.parse(JSON.stringify(s)),header:JSON.parse(JSON.stringify(i)),footer:JSON.parse(JSON.stringify(l)),announcement:JSON.parse(JSON.stringify(c))};e({past:a,future:[v,...r]}),o.themeSettings&&p(o.themeSettings),o.layers&&u(o.layers),o.header&&d(o.header,!1),o.footer&&h(o.footer,!1),o.announcement&&y(o.announcement,!1)},redo:()=>{const{past:n,future:r}=t();if(r.length===0)return;const{blocks:o,header:a,footer:s,announcement:i,setBlocks:l,setHeader:c,setFooter:u,setAnnouncement:d}=Mn.getState(),{themeSettings:h,setThemeSettings:y}=On.getState(),m=r[0],p=r.slice(1),v={themeSettings:JSON.parse(JSON.stringify(h)),layers:JSON.parse(JSON.stringify(o)),header:JSON.parse(JSON.stringify(a)),footer:JSON.parse(JSON.stringify(s)),announcement:JSON.parse(JSON.stringify(i))};e({past:[...n,v],future:p}),m.themeSettings&&y(m.themeSettings),m.layers&&l(m.layers),m.header&&c(m.header,!1),m.footer&&u(m.footer,!1),m.announcement&&d(m.announcement,!1)}})),ka=ie(Jn(e=>({onPreview:!0,setOnPreview:t=>e(()=>({onPreview:t})),activeBlock:{id:null,neededScroll:!1},setActiveBlock:t=>e(()=>({activeBlock:t})),zoomLevel:1,setZoomLevel:t=>e(()=>({zoomLevel:t}))}),{name:"preview-storage",partialize:e=>{const{onPreview:t}=e;return{onPreview:t}}})),La=[{icon:"TreeStructure",name:"Layers"},{icon:"Plus",name:"Add"},{icon:"Palette",name:"Theme"},{icon:"Gear",name:"Settings"}],au=[{icon:"Desktop",value:"desktop"},{icon:"DeviceTabletCamera",value:"tablet"},{icon:"DeviceMobileCamera",value:"mobile"}],su=[{icon:"PaintBrushBroad",name:"Colors"},{icon:"TextAa",name:"Fonts"},{icon:"CornersOut",name:"Borders"},{icon:"ArrowSquareIn",name:"Buttons"},{icon:"Textbox",name:"Inputs"}],iu=[12,14,16,18,20,24,28,32,40,48].map(e=>String(e)),lu=["/","/reviews","/faqs","/contact","/products","/ticket","/login"],$t={"/":{path:"/",name:"Home",icon:"HouseSimple",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/products":{path:"/products",name:"Products",icon:"SquaresFour",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/faqs":{path:"/faqs",name:"Faqs",icon:"SealQuestion",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/reviews":{path:"/reviews",name:"Reviews",icon:"Star",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/contact":{path:"/contact",name:"Contact",icon:"ChatCentered",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/ticket":{path:"/ticket",name:"Ticket",icon:"Ticket",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/login":{path:"/login",name:"Login",icon:"UserCircleGear",seo:{pageDescription:"",pageTitle:""},visibility:"public"}},cu=typeof window<"u"&&(window.location.hostname.includes("localhost")||window.location.hostname.includes("192")||window.location.hostname.includes("local-rst.sp-internal.work")),uu={None:"var(--radius-none)",4:"var(--radius-xs)",8:"var(--radius-sm)",12:"var(--radius-md)",16:"var(--radius-lg)",20:"var(--radius-xl)",24:"var(--radius-2xl)"},du={None:"var(--border-none)",1:"var(--border-sm)",2:"var(--border-md)",4:"var(--border-lg)"},fu={"1:1":"1:1","4:3":"4:3","16:9":"16:9","9:16":"9:16"},hu=[{value:"4:3",addon:L.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:L.jsx("div",{style:{width:18.5,height:14.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"16:9",addon:L.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:L.jsx("div",{style:{width:20.5,height:12.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"9:16",addon:L.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:L.jsx("div",{style:{width:14.5,height:18.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"1:1",addon:L.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:L.jsx("div",{style:{width:16.5,height:16.5,border:"1.5px solid #252525",borderRadius:3}})})}],pu={h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",h7:"Heading 7",lg:"Paragraph Large",md:"Paragraph Medium",sm:"Paragraph Small"},mu=ie(e=>({activeBlock:La[0],setActiveBlock:t=>e(()=>({activeBlock:t}))})),Na=ie(e=>({openModal:!1,setOpenModal:t=>e(()=>({openModal:t})),onChange:null,setOnChange:t=>e(()=>({onChange:t})),tip:"",setTip:t=>e(()=>({tip:t}))})),gu=ie(e=>({error:null,setError:t=>e(()=>({error:t}))})),Ta=ie(e=>({title:null,description:null,onConfirm:null,setTitle:t=>e(()=>({title:t})),setDescription:t=>e(()=>({description:t})),setOnConfirm:t=>e(()=>({onConfirm:t}))}));var vu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _a={exports:{}};/*!
37
37
  Copyright (c) 2018 Jed Watson.
38
38
  Licensed under the MIT License (MIT), see
39
39
  http://jedwatson.github.io/classnames
40
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",s=0;s<arguments.length;s++){var i=arguments[s];i&&(a=o(a,r(i)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var i in a)t.call(a,i)&&a[i]&&(s=o(s,i));return s}function o(a,s){return s?a?a+" "+s:a+s:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Pa);var yu=Pa.exports;const Be=_a(yu),wu=ie(e=>({currentDevice:{icon:"Desktop",value:"desktop"},setCurrentDevice:t=>e(()=>({currentDevice:t}))}));ie(e=>({pageData:null,setPageData:t=>e(()=>({pageData:t}))}));const Ar=ie((e,t)=>({isModalVisible:!1,hoverBlockId:null,isMouseOverModal:!1,hideTimeout:null,setHoverBlockId:n=>{e({hoverBlockId:n})},showModal:(n,r="hoverBlockId")=>{t().hideTimeout&&clearTimeout(t().hideTimeout),e({isModalVisible:!0,[r]:n})},hideModal:(n="hoverBlockId")=>{e({isModalVisible:!1,[n]:null})},startHideTimeout:()=>{if(!t().isMouseOverModal){const n=setTimeout(()=>{e({isModalVisible:!1,hoverBlockId:null,keyBlock:null})},500);e({hideTimeout:n})}},clearHideTimeout:()=>{t().hideTimeout&&(clearTimeout(t().hideTimeout),e({hideTimeout:null}))},setMouseOverModal:n=>{e({isMouseOverModal:n})},isPreviewVisible:!1,showPreview:(n,r="hoverBlockId")=>{e({isPreviewVisible:!0,[r]:n})},hidePreview:(n="hoverBlockId")=>{e({isPreviewVisible:!1,[n]:null})},keyBlock:null,setKeyBlock:n=>{e({keyBlock:n})},hoverBlockTopPosition:null,setHoverBlockTopPosition:n=>{e({hoverBlockTopPosition:n})}})),Oa=ie(Jn(e=>({fonts:[],setFonts:t=>e(()=>({fonts:t}))}),{name:"fonts-storage"})),Dr=ie()(e=>({color:"default",initialColor:"",setInitialColor:t=>e(()=>({initialColor:t})),colorChange:()=>{},update:()=>{},activeLabel:null,modalPosition:{left:0,top:0},showModal:!1,dragging:!1,hue:0,saturation:100,brightness:100,alpha:100,isGradientActive:!0,isBlockSettings:!1,isGradient:!1,setIsGradient:t=>e(()=>({isGradient:t})),gradientDirection:"vertical",setGradientDirection:t=>e(()=>({gradientDirection:t})),hue2:0,saturation2:100,brightness2:100,alpha2:100,setHue2:t=>e(()=>({hue2:t})),setSaturation2:t=>e(()=>({saturation2:t})),setBrightness2:t=>e(()=>({brightness2:t})),setAlpha2:t=>e(()=>({alpha2:t})),activeColorIndex:1,setActiveColorIndex:t=>e(()=>({activeColorIndex:t})),setModalPosition:t=>e(()=>({modalPosition:t})),setHue:t=>e(()=>({hue:t})),setSaturation:t=>e(()=>({saturation:t})),setBrightness:t=>e(()=>({brightness:t})),setIsBlockSettings:t=>e(()=>({isBlockSettings:t})),setShowModal:t=>e({isBlockSettings:!1,showModal:t}),setDragging:t=>e(()=>({dragging:t})),setActiveLabel:t=>e(()=>({activeLabel:t})),setColor:t=>e(()=>({color:t})),setUpdate:t=>e(()=>({update:t})),setColorChange:t=>e(()=>({colorChange:t})),setAlpha:t=>e(()=>({alpha:t})),setIsGradientActive:t=>e(()=>({isGradientActive:t})),resetColors:()=>e(()=>({color:"default",initialColor:"",activeLabel:null,modalPosition:{left:0,top:0},showModal:!1,dragging:!1,hue:0,saturation:100,brightness:100,alpha:100,isGradient:!1,gradientDirection:"vertical",hue2:0,saturation2:100,brightness2:100,alpha2:100,activeColorIndex:1,isGradientActive:!0}))})),Ma=ie(e=>({showTooltip:!1,setShowTooltip:t=>e({showTooltip:t})})),bu="_loader_jr7a4_1",Su={loader:bu},Cu=()=>L.jsx("div",{className:Su.loader}),Eu="_tooltip_4hruj_1",xu={tooltip:Eu},Ru=e=>{const{text:t}=e,{setShowTooltip:n}=Ma();return we.useEffect(()=>(n(!0),()=>{n(!1)}),[]),L.jsx("div",{className:xu.tooltip,children:t})},ku=e=>e?e.replace(/_/g," ").split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" and "):"";function Lu(e,t){if(!t||!t[e])return"unknown name";const n=new t[e];return!n.blockSettings||!n.blockSettings.displayName?"unknown name":n.blockSettings.displayName}const Aa=(e,t,n,r,o,a,s)=>{const i=e.currentTarget.getBoundingClientRect(),l=window.innerHeight-i.bottom,c=i.top,u=window.innerWidth-i.right,d=i.left;let h,y;return h=i.bottom+r+window.scrollY,y=i.left,(l<t||l<o)&&(c>=t+s?h=i.top-t-r+window.scrollY:h=window.scrollY+s),h-window.scrollY<s&&(h=window.scrollY+s),(u<n||u<a)&&(d>=n?y=i.right-n:y=(window.innerWidth-n)/2),y<i.right+a&&(y=i.right+a),y<i.right&&y+n>i.left&&h<i.bottom&&h+t>i.top&&(u>=n+a?y=i.right+r+a:l>=t?h=i.bottom+r+window.scrollY:(h=window.scrollY+s,y=(window.innerWidth-n)/2)),{top:h,left:y}},Nu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.25%2015.45V8.55C20.25%206.86984%2020.25%206.02976%2019.923%205.38803C19.6354%204.82354%2019.1765%204.3646%2018.612%204.07698C17.9702%203.75%2017.1302%203.75%2015.45%203.75H8.55C6.86984%203.75%206.02976%203.75%205.38803%204.07698C4.82354%204.3646%204.3646%204.82354%204.07698%205.38803C3.75%206.02976%203.75%206.86984%203.75%208.55V15.45C3.75%2017.1302%203.75%2017.9702%204.07698%2018.612C4.3646%2019.1765%204.82354%2019.6354%205.38803%2019.923C6.02976%2020.25%206.86984%2020.25%208.55%2020.25H15.45C17.1302%2020.25%2017.9702%2020.25%2018.612%2019.923C19.1765%2019.6354%2019.6354%2019.1765%2019.923%2018.612C20.25%2017.9702%2020.25%2017.1302%2020.25%2015.45Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Tu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.0002%2012V20.5M12.0002%2012L4.5%207.78125M12.0002%2012L19.2627%207.91474M20.25%209.11392V14.8861C20.25%2015.9699%2019.6654%2016.9695%2018.7208%2017.5008L13.4708%2020.4539C12.5575%2020.9676%2011.4425%2020.9676%2010.5292%2020.4539L5.27922%2017.5008C4.33459%2016.9695%203.75%2015.9699%203.75%2014.8861V9.11392C3.75%208.0301%204.33459%207.03055%205.27922%206.49919L10.5292%203.54607C11.4425%203.03237%2012.5575%203.03237%2013.4708%203.54607L18.7208%206.4992C19.6654%207.03055%2020.25%208.0301%2020.25%209.11392Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",_u="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.25%2020.25H6.75C5.09315%2020.25%203.75%2018.9069%203.75%2017.25V15.75M15.75%2020.25H17.25C18.9069%2020.25%2020.25%2018.9069%2020.25%2017.25V15.75M3.75%208.25V6.75C3.75%205.09315%205.09315%203.75%206.75%203.75H8.25M15.75%203.75H17.25C18.9069%203.75%2020.25%205.09315%2020.25%206.75V8.25M15.25%2010.3571L12%2011.9999M12%2011.9999L8.75%2010.3571M12%2011.9999V15.2856M11.0077%208.28125L9.25772%209.28125C8.63457%209.63733%208.25%2010.3%208.25%2011.0177V12.9822C8.25%2013.6999%208.63457%2014.3626%209.25772%2014.7186L11.0077%2015.7186C11.6226%2016.07%2012.3774%2016.07%2012.9923%2015.7186L14.7423%2014.7186C15.3654%2014.3626%2015.75%2013.6999%2015.75%2012.9822V11.0177C15.75%2010.3%2015.3654%209.63733%2014.7423%209.28125L12.9923%208.28125C12.3774%207.9299%2011.6226%207.9299%2011.0077%208.28125Z'%20stroke='%23252525'%20stroke-width='1.40625'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Pu="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.125%203.125H16.875'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.9167%205.625C12.1113%205.625%2011.4583%206.27792%2011.4583%207.08333V12.0833C11.4583%2012.8887%2012.1113%2013.5417%2012.9167%2013.5417C13.7221%2013.5417%2014.375%2012.8887%2014.375%2012.0833V7.08333C14.375%206.27792%2013.7221%205.625%2012.9167%205.625Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.08333%205.625C6.27792%205.625%205.625%206.27792%205.625%207.08333V15.4167C5.625%2016.2221%206.27792%2016.875%207.08333%2016.875C7.88875%2016.875%208.54167%2016.2221%208.54167%2015.4167V7.08333C8.54167%206.27792%207.88875%205.625%207.08333%205.625Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Ou="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.1073%2017.1577C17.1073%2018.8655%2015.7213%2020.25%2014.0116%2020.25C12.3019%2020.25%2010.9159%2018.8655%2010.9159%2017.1577C10.9159%2015.4499%2012.3019%2014.0654%2014.0116%2014.0654C15.7213%2014.0654%2017.1073%2015.4499%2017.1073%2017.1577Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.99145%206.98598L10.4681%2011.5764L3.75%2014.0189L4.99145%206.98598Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.0106%204.46532C14.1536%203.9321%2014.7017%203.61567%2015.235%203.75841L19.2835%204.842C19.8172%204.98485%2020.1339%205.53345%2019.9908%206.06708L18.9065%2010.1093C18.7635%2010.6425%2018.2154%2010.9589%2017.6821%2010.8162L13.6336%209.73258C13.0999%209.58973%2012.7832%209.04113%2012.9263%208.50749L14.0106%204.46532Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3c/svg%3e",Mu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.25%2014.75H10C10%2014.3358%209.66421%2014%209.25%2014V14.75ZM3.75%2020.25H3V21H3.75V20.25ZM14.75%209.25H15.5C15.5%208.83579%2015.1642%208.5%2014.75%208.5V9.25ZM20.25%2020.25V21H21V20.25H20.25ZM1.75%2019.5C1.33579%2019.5%201%2019.8358%201%2020.25C1%2020.6642%201.33579%2021%201.75%2021V19.5ZM22.25%2021C22.6642%2021%2023%2020.6642%2023%2020.25C23%2019.8358%2022.6642%2019.5%2022.25%2019.5V21ZM5.25%2015.5H9.25V14H5.25V15.5ZM8.5%2014.75V20.25H10V14.75H8.5ZM9.25%2019.5H3.75V21H9.25V19.5ZM4.5%2020.25V16.25H3V20.25H4.5ZM5.25%2014C4.00736%2014%203%2015.0074%203%2016.25H4.5C4.5%2015.8358%204.83579%2015.5%205.25%2015.5V14ZM10.75%2010H14.75V8.5H10.75V10ZM14%209.25V20.25H15.5V9.25H14ZM14.75%2019.5H9.25V21H14.75V19.5ZM10%2020.25V10.75H8.5V20.25H10ZM10.75%208.5C9.50736%208.5%208.5%209.50736%208.5%2010.75H10C10%2010.3358%2010.3358%2010%2010.75%2010V8.5ZM16.25%204.5H18.75V3H16.25V4.5ZM19.5%205.25V20.25H21V5.25H19.5ZM20.25%2019.5H14.75V21H20.25V19.5ZM15.5%2020.25V5.25H14V20.25H15.5ZM18.75%204.5C19.1642%204.5%2019.5%204.83579%2019.5%205.25H21C21%204.00736%2019.9926%203%2018.75%203V4.5ZM16.25%203C15.0074%203%2014%204.00736%2014%205.25H15.5C15.5%204.83579%2015.8358%204.5%2016.25%204.5V3ZM1.75%2021H22.25V19.5H1.75V21Z'%20fill='%23252525'/%3e%3c/svg%3e",Au="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2014.2105L6.84488%2012.0821C7.66137%2011.5378%208.75215%2011.6663%209.41987%2012.3853C10.9123%2013.9926%2012.6426%2015.4538%2015%2015.4538C17.1727%2015.4538%2018.6125%2014.6485%2020%2013.261M6.75%2020.25H17.25C18.9069%2020.25%2020.25%2018.9069%2020.25%2017.25V6.75C20.25%205.09315%2018.9069%203.75%2017.25%203.75H6.75C5.09315%203.75%203.75%205.09315%203.75%206.75V17.25C3.75%2018.9069%205.09315%2020.25%206.75%2020.25ZM17.25%208.75C17.25%209.85457%2016.3546%2010.75%2015.25%2010.75C14.1454%2010.75%2013.25%209.85457%2013.25%208.75C13.25%207.64543%2014.1454%206.75%2015.25%206.75C16.3546%206.75%2017.25%207.64543%2017.25%208.75Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/svg%3e",Du="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.252%2019.25H6.74803C5.26465%2019.25%204.29985%2017.6884%204.96324%2016.3611L10.2152%205.85345C10.9506%204.38218%2013.0494%204.38218%2013.7848%205.85345L19.0368%2016.3611C19.7001%2017.6884%2018.7354%2019.25%2017.252%2019.25Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3c/svg%3e",Fu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%202.75V4.5M16.9069%205.09326L15.5962%206.40392M6.40381%2015.5962L5.09315%2016.9069M4.5%2011H2.75M6.40381%206.40381L5.09315%205.09315M14.1323%2020.999L10.5777%2011.3226C10.3542%2010.7143%2010.9552%2010.1281%2011.5577%2010.3666L21.0397%2014.1199C21.4283%2014.2737%2021.4679%2014.8081%2021.1062%2015.0175L17.4231%2017.1498C17.3097%2017.2155%2017.2155%2017.3097%2017.1498%2017.4231L15.0343%2021.0771C14.822%2021.4438%2014.2784%2021.3967%2014.1323%2020.999Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Iu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.38803%2019.923L5.72852%2019.2548H5.72852L5.38803%2019.923ZM4.07698%2018.612L3.40873%2018.9525H3.40873L4.07698%2018.612ZM19.923%2018.612L19.2548%2018.2715V18.2715L19.923%2018.612ZM18.612%2019.923L18.2715%2019.2548H18.2715L18.612%2019.923ZM19.923%205.38803L19.2548%205.72852V5.72852L19.923%205.38803ZM18.612%204.07698L18.9525%203.40873V3.40873L18.612%204.07698ZM4.07698%205.38803L4.74524%205.72852L4.07698%205.38803ZM5.38803%204.07698L5.72852%204.74524L5.38803%204.07698ZM19.5%208.55V15.45H21V8.55H19.5ZM15.45%2019.5H8.55V21H15.45V19.5ZM4.5%2015.45V8.55H3V15.45H4.5ZM8.55%204.5H15.45V3H8.55V4.5ZM8.55%2019.5C7.69755%2019.5%207.10331%2019.4994%206.64068%2019.4616C6.1868%2019.4245%205.92604%2019.3554%205.72852%2019.2548L5.04754%2020.5913C5.49175%2020.8176%205.97189%2020.912%206.51853%2020.9566C7.05641%2021.0006%207.7223%2021%208.55%2021V19.5ZM3%2015.45C3%2016.2777%202.99942%2016.9436%203.04336%2017.4815C3.08803%2018.0281%203.18238%2018.5082%203.40873%2018.9525L4.74524%2018.2715C4.6446%2018.074%204.57546%2017.8132%204.53838%2017.3593C4.50058%2016.8967%204.5%2016.3025%204.5%2015.45H3ZM5.72852%2019.2548C5.30516%2019.039%204.96095%2018.6948%204.74524%2018.2715L3.40873%2018.9525C3.76825%2019.6581%204.34193%2020.2317%205.04754%2020.5913L5.72852%2019.2548ZM19.5%2015.45C19.5%2016.3025%2019.4994%2016.8967%2019.4616%2017.3593C19.4245%2017.8132%2019.3554%2018.074%2019.2548%2018.2715L20.5913%2018.9525C20.8176%2018.5082%2020.912%2018.0281%2020.9566%2017.4815C21.0006%2016.9436%2021%2016.2777%2021%2015.45H19.5ZM15.45%2021C16.2777%2021%2016.9436%2021.0006%2017.4815%2020.9566C18.0281%2020.912%2018.5082%2020.8176%2018.9525%2020.5913L18.2715%2019.2548C18.074%2019.3554%2017.8132%2019.4245%2017.3593%2019.4616C16.8967%2019.4994%2016.3025%2019.5%2015.45%2019.5V21ZM19.2548%2018.2715C19.0391%2018.6948%2018.6948%2019.039%2018.2715%2019.2548L18.9525%2020.5913C19.6581%2020.2317%2020.2318%2019.6581%2020.5913%2018.9525L19.2548%2018.2715ZM21%208.55C21%207.7223%2021.0006%207.05641%2020.9566%206.51853C20.912%205.97189%2020.8176%205.49175%2020.5913%205.04754L19.2548%205.72852C19.3554%205.92604%2019.4245%206.1868%2019.4616%206.64068C19.4994%207.10331%2019.5%207.69755%2019.5%208.55H21ZM15.45%204.5C16.3025%204.5%2016.8967%204.50058%2017.3593%204.53838C17.8132%204.57546%2018.074%204.6446%2018.2715%204.74524L18.9525%203.40873C18.5082%203.18238%2018.0281%203.08803%2017.4815%203.04336C16.9436%202.99942%2016.2777%203%2015.45%203V4.5ZM20.5913%205.04754C20.2318%204.34193%2019.6581%203.76825%2018.9525%203.40873L18.2715%204.74524C18.6948%204.96095%2019.0391%205.30516%2019.2548%205.72852L20.5913%205.04754ZM4.5%208.55C4.5%207.69755%204.50058%207.10331%204.53838%206.64068C4.57546%206.1868%204.6446%205.92604%204.74524%205.72852L3.40873%205.04754C3.18238%205.49175%203.08803%205.97189%203.04336%206.51853C2.99942%207.05641%203%207.7223%203%208.55H4.5ZM8.55%203C7.7223%203%207.05641%202.99942%206.51853%203.04336C5.97189%203.08803%205.49175%203.18238%205.04754%203.40873L5.72852%204.74524C5.92604%204.6446%206.1868%204.57546%206.64068%204.53838C7.10331%204.50058%207.69755%204.5%208.55%204.5V3ZM4.74524%205.72852C4.96095%205.30516%205.30516%204.96095%205.72852%204.74524L5.04754%203.40873C4.34193%203.76825%203.76825%204.34193%203.40873%205.04754L4.74524%205.72852Z'%20fill='%23252525'/%3e%3cpath%20d='M20.25%2015H21V13.5H20.25V15ZM3.75%2013.5H3V15H3.75V13.5ZM3.75%2015H20.25V13.5H3.75V15Z'%20fill='%23252525'/%3e%3c/svg%3e",Bu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.0858%202.32272C11.4533%201.55909%2012.5467%201.55909%2012.9142%202.32272L15.0872%206.83907C15.2351%207.14651%2015.5293%207.35876%2015.8692%207.40319L20.8676%208.05664C21.7134%208.16721%2022.0517%209.20388%2021.4322%209.78704L17.779%2013.2263C17.5295%2013.4612%2017.4167%2013.8058%2017.4795%2014.1417L18.3971%2019.0563C18.5526%2019.8892%2017.6676%2020.5294%2016.9183%2020.1261L12.4825%2017.7385C12.1815%2017.5764%2011.8185%2017.5764%2011.5175%2017.7385L7.08174%2020.1261C6.33244%2020.5294%205.44743%2019.8892%205.60294%2019.0563L6.52054%2014.1417C6.58325%2013.8058%206.47048%2013.4612%206.22097%2013.2263L2.56776%209.78704C1.94833%209.20388%202.28661%208.16721%203.13241%208.05664L8.13078%207.40319C8.47066%207.35876%208.7649%207.14651%208.91282%206.83907L11.0858%202.32272Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ju="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.25%204.75H5.75C4.09315%204.75%202.75%206.09315%202.75%207.75V8.25M17.75%204.75H18.25C19.9069%204.75%2021.25%206.09315%2021.25%207.75V8.25M21.25%2015.75V16.25C21.25%2017.9069%2019.9069%2019.25%2018.25%2019.25H17.75M6.25%2019.25H5.75C4.09315%2019.25%202.75%2017.9069%202.75%2016.25V15.75'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.75%209.75H16.25'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.75%2014.25H14.25'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Hu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.25%2010.75V6.75C20.25%205.09315%2018.9069%203.75%2017.25%203.75H6.75C5.09315%203.75%203.75%205.09315%203.75%206.75V17.25C3.75%2018.9069%205.09315%2020.25%206.75%2020.25H10.75M14.1879%2020.8366L12.0869%2013.0056C11.9372%2012.4478%2012.4478%2011.9372%2013.0056%2012.0869L20.8366%2014.1879C21.2665%2014.3032%2021.3428%2014.8805%2020.9576%2015.1035L17.4231%2017.1498C17.3097%2017.2155%2017.2155%2017.3097%2017.1498%2017.4231L15.1035%2020.9576C14.8805%2021.3428%2014.3032%2021.2665%2014.1879%2020.8366Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Uu="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.125%2016.875H16.875'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.9167%206.45833C12.1113%206.45833%2011.4583%207.11125%2011.4583%207.91667V12.9167C11.4583%2013.7221%2012.1113%2014.375%2012.9167%2014.375C13.7221%2014.375%2014.375%2013.7221%2014.375%2012.9167V7.91667C14.375%207.11125%2013.7221%206.45833%2012.9167%206.45833Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.08333%203.125C6.27792%203.125%205.625%203.77792%205.625%204.58333V12.9167C5.625%2013.7221%206.27792%2014.375%207.08333%2014.375C7.88875%2014.375%208.54167%2013.7221%208.54167%2012.9167V4.58333C8.54167%203.77792%207.88875%203.125%207.08333%203.125Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Vu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.75%2018.25H7.25M3.75%2012H9.25M3.75%205.75H20.25M17%2010.5L18.5%2013.5L21.5%2015L18.5%2016.5L17%2019.5L15.5%2016.5L12.5%2015L15.5%2013.5L17%2010.5Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",$u="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.9016%209.48786L10.3899%203.2788C8.39443%201.97623%205.75%203.40798%205.75%205.79094V18.2091C5.75%2020.592%208.39442%2022.0238%2010.3899%2020.7212L19.9016%2014.5121C21.7151%2013.3283%2021.7151%2010.6717%2019.9016%209.48786Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3c/svg%3e",zu={Header:Pu,Announcement:Vu,PrimaryHero:Hu,ProductHero:Nu,Items:Tu,FeaturedItems:_u,Content:Ou,Stats:Mu,ImageGallery:Au,Logos:Du,CTA:Fu,FAQ:Iu,Reviews:Bu,ContactUs:ju,Footer:Uu,Video:$u},Ju="_wrapper_1k1cr_1",qu="_submodal_1k1cr_14",Sr={wrapper:Ju,submodal:qu},Wu=({children:e,positionTop:t,positionLeft:n})=>{const{keyBlock:r,startHideTimeout:o,clearHideTimeout:a,setMouseOverModal:s}=Ar();return r?L.jsx("div",{className:Sr.wrapper,style:t?{top:t,left:n||void 0}:{},onMouseEnter:()=>{a(),s(!0)},onMouseLeave:()=>{s(!1),o()},children:e}):null},Zu=({children:e})=>{const{hoverBlockId:t,startHideTimeout:n,clearHideTimeout:r,setMouseOverModal:o}=Ar();return t?L.jsx("div",{className:Be(Sr.wrapper,Sr.submodal),onMouseEnter:()=>{r(),o(!0)},onMouseLeave:()=>{o(!1),n()},children:e}):null},Gu="_applyButton_1a9kh_2",Ku="_content_1a9kh_7",Yu="_title_1a9kh_14",Xu="_label_1a9kh_21",Qu="_colorValue_1a9kh_40",ed="_colorMap_1a9kh_48",td="_indicator_1a9kh_57",nd="_hueSlider_1a9kh_66",rd="_slider_1a9kh_97",od="_buttons_1a9kh_102",ad="_name_1a9kh_109",sd="_secondary_1a9kh_114",id="_input_1a9kh_122",ld="_modal_1a9kh_160",cd="_alphaSlider_1a9kh_249",ud="_alphaBackground_1a9kh_257",dd="_alphaGradient_1a9kh_268",fd="_chargeTypes_1a9kh_297",hd="_charge_1a9kh_297",pd="_chargeActive_1a9kh_326",md="_gradient_1a9kh_334",gd="_color_1a9kh_40",vd="_colorActive_1a9kh_355",yd="_gradientWrapper_1a9kh_362",wd="_subtitle_1a9kh_368",bd="_colorTypes_1a9kh_375",Sd="_colorType_1a9kh_375",Cd="_colorTypeActive_1a9kh_399",Ed="_colorsWrapper_1a9kh_404",xd="_colors_1a9kh_404",W={applyButton:Gu,content:Ku,title:Yu,label:Xu,colorValue:Qu,colorMap:ed,indicator:td,hueSlider:nd,slider:rd,buttons:od,name:ad,secondary:sd,input:id,modal:ld,alphaSlider:cd,alphaBackground:ud,alphaGradient:dd,chargeTypes:fd,charge:hd,chargeActive:pd,gradient:md,color:gd,colorActive:vd,gradientWrapper:yd,subtitle:wd,colorTypes:bd,colorType:Sd,colorTypeActive:Cd,colorsWrapper:Ed,colors:xd};function ar(e){return(e.includes("linear-gradient")||e.includes("radial-gradient"))&&/^linear-gradient\(\d+deg,\s*#[A-Fa-f0-9]{8}\s+\d+%,\s*#[A-Fa-f0-9]{8}\s+\d+%\)$/.test(e)?!0:/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e)}const Da=e=>{const{initialColor:t,onChange:n,title:r,labelStyle:o="primary",isGradientActive:a=!0,isBlockSettings:s}=e,[i,l]=we.useState(t);we.useEffect(()=>{l(t)},[t]);const{setActiveLabel:c,setModalPosition:u,setInitialColor:d,setShowModal:h,setUpdate:y,setColor:m,setColorChange:p,setIsGradientActive:v,colorChange:R}=Dr();we.useEffect(()=>{const T=()=>{h(!1),c(null),d(t),y(()=>{}),m(t),p(()=>{})};return document.body.addEventListener("click",T),()=>{document.body.removeEventListener("click",T)}},[t]);const b=T=>{T.stopPropagation(),h(!0),p(l),y(n),d(t),m(i),v(a);const{top:H,left:w}=Aa(T,600,288,10,20,230,80);u({top:H,left:w})},k=T=>{const H=T.target.value;l(H),ar(H)&&(n(H),m(H),p(R))},_=()=>{ar(i)||l(t)};return L.jsxs("div",{className:W.content,children:[L.jsx("span",{className:Be(W.name,{[W.secondary]:o==="secondary"}),children:r}),L.jsxs("label",{className:W.label,onClick:T=>T.stopPropagation(),children:[L.jsx("div",{className:W.colorValue,style:{background:ar(i)?i:t},onClick:s?void 0:b}),L.jsx("input",{type:"text",value:i.includes("linear-gradient")?i:i.toUpperCase(),onChange:k,onBlur:_,className:W.input,style:{textTransform:i.includes("linear-gradient")?"none":"uppercase"}})]})]})},Rd=()=>{const{modalPosition:e,color:t,initialColor:n,setShowModal:r,hue:o,saturation:a,brightness:s,alpha:i,dragging:l,setDragging:c,setHue:u,setSaturation:d,setBrightness:h,setAlpha:y,colorChange:m,setColor:p,update:v,isGradient:R,setIsGradient:b,gradientDirection:k,setGradientDirection:_,hue2:T,saturation2:H,brightness2:w,alpha2:P,setHue2:G,setSaturation2:B,setBrightness2:ae,setAlpha2:ee,activeColorIndex:te,setActiveColorIndex:he,isGradientActive:Oe,isBlockSettings:Te}=Dr(),Ze=(V,U,ne)=>{U/=100,ne/=100;const z=de=>(de+V/60)%6,K=de=>ne*(1-U*Math.max(0,Math.min(z(de),4-z(de),1))),q=Math.round(255*K(5)),re=Math.round(255*K(3)),Z=Math.round(255*K(1));return{r:q,g:re,b:Z}},ue=V=>V.toString(16).padStart(2,"0"),Re=(V,U,ne,z)=>{const{r:K,g:q,b:re}=Ze(V,U,ne),Z=Math.round(z/100*255);return`#${ue(K)}${ue(q)}${ue(re)}${ue(Z)}`},Ce=(V,U,ne,z)=>{if(R)if(te===1){u(V),d(U),h(ne),y(z);const K=Re(V,U,ne,z),q=Re(T,H,w,P),Z=`linear-gradient(${k==="vertical"?"0deg":"90deg"}, ${K} 0%, ${q} 100%)`;m(Z),p(Z)}else{G(V),B(U),ae(ne),ee(z);const K=Re(V,U,ne,z),q=Re(o,a,s,i),Z=`linear-gradient(${k==="vertical"?"0deg":"90deg"}, ${q} 0%, ${K} 100%)`;m(Z),p(Z)}else{const K=Re(V,U,ne,z);m(K),p(K)}},Se=(V,U,ne)=>{const{width:z,height:K}=ne.getBoundingClientRect(),q=Math.max(0,Math.min(V/z*100,100)),re=Math.max(0,Math.min(100-U/K*100,100));R?te===1?(d(q),h(re),Ce(o,q,re,i)):(B(q),ae(re),Ce(T,q,re,P)):(d(q),h(re),Ce(o,q,re,i))},_e=V=>{const{offsetX:U,offsetY:ne}=V.nativeEvent;c(!0),Se(U,ne,V.currentTarget)},Ue=V=>{if(l){const U=document.querySelector(`.${W.colorMap}`),{left:ne,top:z}=U.getBoundingClientRect(),K=V.clientX-ne,q=V.clientY-z;Se(K,q,U)}},se=()=>{c(!1)};we.useEffect(()=>{function V(z){const K=/linear-gradient\((\d+deg),\s*(#[0-9a-fA-F]{8})\s*0%,\s*(#[0-9a-fA-F]{8})\s*100%\)/,q=z.match(K);if(q){const re=q[1],Z=q[2],de=q[3];return{angle:re,col1:Z,col2:de}}return null}function U(z){const K=parseInt(z.slice(1,3),16),q=parseInt(z.slice(3,5),16),re=parseInt(z.slice(5,7),16),Z=parseInt(z.slice(7,9),16)/255*100,{h:de,s:tt,b:ht}=ne(K,q,re);return{h:de,s:tt,b:ht,a:Z}}function ne(z,K,q){z/=255,K/=255,q/=255;const re=Math.max(z,K,q),Z=Math.min(z,K,q);let de=0;const tt=re-Z,ht=(re===0?0:tt/re)*100,Ke=re*100;if(re===Z)de=0;else switch(re){case z:de=((K-q)/tt+(K<q?6:0))*60;break;case K:de=((q-z)/tt+2)*60;break;case q:de=((z-K)/tt+4)*60;break}return{h:de,s:ht,b:Ke}}if(n&&n.startsWith("linear-gradient")){const z=V(n);if(z){const{angle:K,col1:q,col2:re}=z,Z=U(q),de=U(re);b(!0),_(K==="0deg"?"vertical":"horizontal"),u(Z.h),d(Z.s),h(Z.b),y(Z.a),G(de.h),B(de.s),ae(de.b),ee(de.a),he(1)}}else if(n){const K=function(re){let Z=re;return Z.length===7?Z+"ff":Z.length===9?Z:Z.length===4?Z[0]+Z[1].repeat(2)+Z[2].repeat(2)+Z[3].repeat(2)+"ff":"#000000ff"}(n),q=U(K);b(!1),u(q.h),d(q.s),h(q.b),y(q.a)}},[n,b,_,u,d,h,y,G,B,ae,ee,he]),we.useEffect(()=>{let V,U,ne,z;R?te===1?(V=o,U=a,ne=s,z=i):(V=T,U=H,ne=w,z=P):(V=o,U=a,ne=s,z=i),Ce(V,U,ne,z)},[R,k,te,o,a,s,i,T,H,w,P]),we.useEffect(()=>{const V=ne=>Ue(ne),U=()=>se();return l?(document.addEventListener("mousemove",V),document.addEventListener("mouseup",U)):(document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",U)),()=>{document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",U)}},[l,R,k]);function pe(){if(!R)v(t);else{const V=Re(o,a,s,i),U=Re(T,H,w,P),z=`linear-gradient(${k==="vertical"?"0deg":"90deg"}, ${V} 0%, ${U} 100%)`;v(z)}r(!1)}function Me(){r(!1),m(n)}const Ee=R?te===1?o:T:o,ft=R?te===1?a:H:a,rn=R?te===1?s:w:s,qn=R?te===1?i:P:i,{r:on,g:xe,b:et}=Ze(Ee,ft,rn),an=`linear-gradient(to right, rgba(${on}, ${xe}, ${et}, 0), rgba(${on}, ${xe}, ${et}, 1))`,sn=Re(o,a,s,i),Ge=Re(T,H,w,P);return L.jsxs("div",{className:W.modal,onClick:V=>V.stopPropagation(),style:{top:`${e.top}px`,left:`${e.left}px`},children:[L.jsx("h2",{className:W.title,children:"Color"}),Oe&&L.jsxs("div",{className:W.colorTypes,children:[L.jsxs("div",{className:Be(W.colorType,{[W.colorTypeActive]:!R}),onClick:()=>b(!1),children:[L.jsx("div",{style:{background:"#757575",width:"16px",height:"16px",borderRadius:"50%"}}),"Solid"]}),L.jsxs("div",{className:Be(W.colorType,{[W.colorTypeActive]:R}),onClick:()=>b(!0),children:[L.jsx("div",{style:{background:"linear-gradient(to bottom, #757575 0%, #DBDBDB 100%)",width:"16px",height:"16px",borderRadius:"50%"}}),"Linear"]})]}),R&&Oe&&L.jsxs("div",{className:W.colorsWrapper,children:[L.jsx("div",{className:W.colors,style:{background:`linear-gradient(90deg, ${sn} 0%, ${Ge} 100%)`}}),L.jsx("div",{className:Be(W.color,{[W.colorActive]:te===1}),onClick:()=>he(1),style:{background:sn}}),L.jsx("div",{className:Be(W.color,{[W.colorActive]:te===2}),onClick:()=>he(2),style:{background:Ge}})]}),L.jsx("div",{className:W.colorMap,onMouseDown:_e,style:{background:`
40
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",s=0;s<arguments.length;s++){var i=arguments[s];i&&(a=o(a,r(i)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var i in a)t.call(a,i)&&a[i]&&(s=o(s,i));return s}function o(a,s){return s?a?a+" "+s:a+s:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(_a);var yu=_a.exports;const Be=Pa(yu),wu=ie(e=>({currentDevice:{icon:"Desktop",value:"desktop"},setCurrentDevice:t=>e(()=>({currentDevice:t}))}));ie(e=>({pageData:null,setPageData:t=>e(()=>({pageData:t}))}));const Ar=ie((e,t)=>({isModalVisible:!1,hoverBlockId:null,isMouseOverModal:!1,hideTimeout:null,setHoverBlockId:n=>{e({hoverBlockId:n})},showModal:(n,r="hoverBlockId")=>{t().hideTimeout&&clearTimeout(t().hideTimeout),e({isModalVisible:!0,[r]:n})},hideModal:(n="hoverBlockId")=>{e({isModalVisible:!1,[n]:null})},startHideTimeout:()=>{if(!t().isMouseOverModal){const n=setTimeout(()=>{e({isModalVisible:!1,hoverBlockId:null,keyBlock:null})},500);e({hideTimeout:n})}},clearHideTimeout:()=>{t().hideTimeout&&(clearTimeout(t().hideTimeout),e({hideTimeout:null}))},setMouseOverModal:n=>{e({isMouseOverModal:n})},isPreviewVisible:!1,showPreview:(n,r="hoverBlockId")=>{e({isPreviewVisible:!0,[r]:n})},hidePreview:(n="hoverBlockId")=>{e({isPreviewVisible:!1,[n]:null})},keyBlock:null,setKeyBlock:n=>{e({keyBlock:n})},hoverBlockTopPosition:null,setHoverBlockTopPosition:n=>{e({hoverBlockTopPosition:n})}})),Oa=ie(Jn(e=>({fonts:[],setFonts:t=>e(()=>({fonts:t}))}),{name:"fonts-storage"})),Dr=ie()(e=>({color:"default",initialColor:"",setInitialColor:t=>e(()=>({initialColor:t})),colorChange:()=>{},update:()=>{},activeLabel:null,modalPosition:{left:0,top:0},showModal:!1,dragging:!1,hue:0,saturation:100,brightness:100,alpha:100,isGradientActive:!0,isBlockSettings:!1,isGradient:!1,setIsGradient:t=>e(()=>({isGradient:t})),gradientDirection:"vertical",setGradientDirection:t=>e(()=>({gradientDirection:t})),hue2:0,saturation2:100,brightness2:100,alpha2:100,setHue2:t=>e(()=>({hue2:t})),setSaturation2:t=>e(()=>({saturation2:t})),setBrightness2:t=>e(()=>({brightness2:t})),setAlpha2:t=>e(()=>({alpha2:t})),activeColorIndex:1,setActiveColorIndex:t=>e(()=>({activeColorIndex:t})),setModalPosition:t=>e(()=>({modalPosition:t})),setHue:t=>e(()=>({hue:t})),setSaturation:t=>e(()=>({saturation:t})),setBrightness:t=>e(()=>({brightness:t})),setIsBlockSettings:t=>e(()=>({isBlockSettings:t})),setShowModal:t=>e({isBlockSettings:!1,showModal:t}),setDragging:t=>e(()=>({dragging:t})),setActiveLabel:t=>e(()=>({activeLabel:t})),setColor:t=>e(()=>({color:t})),setUpdate:t=>e(()=>({update:t})),setColorChange:t=>e(()=>({colorChange:t})),setAlpha:t=>e(()=>({alpha:t})),setIsGradientActive:t=>e(()=>({isGradientActive:t})),resetColors:()=>e(()=>({color:"default",initialColor:"",activeLabel:null,modalPosition:{left:0,top:0},showModal:!1,dragging:!1,hue:0,saturation:100,brightness:100,alpha:100,isGradient:!1,gradientDirection:"vertical",hue2:0,saturation2:100,brightness2:100,alpha2:100,activeColorIndex:1,isGradientActive:!0}))})),Ma=ie(e=>({showTooltip:!1,setShowTooltip:t=>e({showTooltip:t})})),bu="_loader_jr7a4_1",Su={loader:bu},Cu=()=>L.jsx("div",{className:Su.loader}),Eu="_tooltip_4hruj_1",xu={tooltip:Eu},Ru=e=>{const{text:t}=e,{setShowTooltip:n}=Ma();return we.useEffect(()=>(n(!0),()=>{n(!1)}),[]),L.jsx("div",{className:xu.tooltip,children:t})},ku=e=>e?e.replace(/_/g," ").split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" and "):"";function Lu(e,t){if(!t||!t[e])return"unknown name";const n=new t[e];return!n.blockSettings||!n.blockSettings.displayName?"unknown name":n.blockSettings.displayName}const Aa=(e,t,n,r,o,a,s)=>{const i=e.currentTarget.getBoundingClientRect(),l=window.innerHeight-i.bottom,c=i.top,u=window.innerWidth-i.right,d=i.left;let h,y;return h=i.bottom+r+window.scrollY,y=i.left,(l<t||l<o)&&(c>=t+s?h=i.top-t-r+window.scrollY:h=window.scrollY+s),h-window.scrollY<s&&(h=window.scrollY+s),(u<n||u<a)&&(d>=n?y=i.right-n:y=(window.innerWidth-n)/2),y<i.right+a&&(y=i.right+a),y<i.right&&y+n>i.left&&h<i.bottom&&h+t>i.top&&(u>=n+a?y=i.right+r+a:l>=t?h=i.bottom+r+window.scrollY:(h=window.scrollY+s,y=(window.innerWidth-n)/2)),{top:h,left:y}},Nu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.25%2015.45V8.55C20.25%206.86984%2020.25%206.02976%2019.923%205.38803C19.6354%204.82354%2019.1765%204.3646%2018.612%204.07698C17.9702%203.75%2017.1302%203.75%2015.45%203.75H8.55C6.86984%203.75%206.02976%203.75%205.38803%204.07698C4.82354%204.3646%204.3646%204.82354%204.07698%205.38803C3.75%206.02976%203.75%206.86984%203.75%208.55V15.45C3.75%2017.1302%203.75%2017.9702%204.07698%2018.612C4.3646%2019.1765%204.82354%2019.6354%205.38803%2019.923C6.02976%2020.25%206.86984%2020.25%208.55%2020.25H15.45C17.1302%2020.25%2017.9702%2020.25%2018.612%2019.923C19.1765%2019.6354%2019.6354%2019.1765%2019.923%2018.612C20.25%2017.9702%2020.25%2017.1302%2020.25%2015.45Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Tu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.0002%2012V20.5M12.0002%2012L4.5%207.78125M12.0002%2012L19.2627%207.91474M20.25%209.11392V14.8861C20.25%2015.9699%2019.6654%2016.9695%2018.7208%2017.5008L13.4708%2020.4539C12.5575%2020.9676%2011.4425%2020.9676%2010.5292%2020.4539L5.27922%2017.5008C4.33459%2016.9695%203.75%2015.9699%203.75%2014.8861V9.11392C3.75%208.0301%204.33459%207.03055%205.27922%206.49919L10.5292%203.54607C11.4425%203.03237%2012.5575%203.03237%2013.4708%203.54607L18.7208%206.4992C19.6654%207.03055%2020.25%208.0301%2020.25%209.11392Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Pu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.25%2020.25H6.75C5.09315%2020.25%203.75%2018.9069%203.75%2017.25V15.75M15.75%2020.25H17.25C18.9069%2020.25%2020.25%2018.9069%2020.25%2017.25V15.75M3.75%208.25V6.75C3.75%205.09315%205.09315%203.75%206.75%203.75H8.25M15.75%203.75H17.25C18.9069%203.75%2020.25%205.09315%2020.25%206.75V8.25M15.25%2010.3571L12%2011.9999M12%2011.9999L8.75%2010.3571M12%2011.9999V15.2856M11.0077%208.28125L9.25772%209.28125C8.63457%209.63733%208.25%2010.3%208.25%2011.0177V12.9822C8.25%2013.6999%208.63457%2014.3626%209.25772%2014.7186L11.0077%2015.7186C11.6226%2016.07%2012.3774%2016.07%2012.9923%2015.7186L14.7423%2014.7186C15.3654%2014.3626%2015.75%2013.6999%2015.75%2012.9822V11.0177C15.75%2010.3%2015.3654%209.63733%2014.7423%209.28125L12.9923%208.28125C12.3774%207.9299%2011.6226%207.9299%2011.0077%208.28125Z'%20stroke='%23252525'%20stroke-width='1.40625'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",_u="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.125%203.125H16.875'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.9167%205.625C12.1113%205.625%2011.4583%206.27792%2011.4583%207.08333V12.0833C11.4583%2012.8887%2012.1113%2013.5417%2012.9167%2013.5417C13.7221%2013.5417%2014.375%2012.8887%2014.375%2012.0833V7.08333C14.375%206.27792%2013.7221%205.625%2012.9167%205.625Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.08333%205.625C6.27792%205.625%205.625%206.27792%205.625%207.08333V15.4167C5.625%2016.2221%206.27792%2016.875%207.08333%2016.875C7.88875%2016.875%208.54167%2016.2221%208.54167%2015.4167V7.08333C8.54167%206.27792%207.88875%205.625%207.08333%205.625Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Ou="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.1073%2017.1577C17.1073%2018.8655%2015.7213%2020.25%2014.0116%2020.25C12.3019%2020.25%2010.9159%2018.8655%2010.9159%2017.1577C10.9159%2015.4499%2012.3019%2014.0654%2014.0116%2014.0654C15.7213%2014.0654%2017.1073%2015.4499%2017.1073%2017.1577Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.99145%206.98598L10.4681%2011.5764L3.75%2014.0189L4.99145%206.98598Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.0106%204.46532C14.1536%203.9321%2014.7017%203.61567%2015.235%203.75841L19.2835%204.842C19.8172%204.98485%2020.1339%205.53345%2019.9908%206.06708L18.9065%2010.1093C18.7635%2010.6425%2018.2154%2010.9589%2017.6821%2010.8162L13.6336%209.73258C13.0999%209.58973%2012.7832%209.04113%2012.9263%208.50749L14.0106%204.46532Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3c/svg%3e",Mu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.25%2014.75H10C10%2014.3358%209.66421%2014%209.25%2014V14.75ZM3.75%2020.25H3V21H3.75V20.25ZM14.75%209.25H15.5C15.5%208.83579%2015.1642%208.5%2014.75%208.5V9.25ZM20.25%2020.25V21H21V20.25H20.25ZM1.75%2019.5C1.33579%2019.5%201%2019.8358%201%2020.25C1%2020.6642%201.33579%2021%201.75%2021V19.5ZM22.25%2021C22.6642%2021%2023%2020.6642%2023%2020.25C23%2019.8358%2022.6642%2019.5%2022.25%2019.5V21ZM5.25%2015.5H9.25V14H5.25V15.5ZM8.5%2014.75V20.25H10V14.75H8.5ZM9.25%2019.5H3.75V21H9.25V19.5ZM4.5%2020.25V16.25H3V20.25H4.5ZM5.25%2014C4.00736%2014%203%2015.0074%203%2016.25H4.5C4.5%2015.8358%204.83579%2015.5%205.25%2015.5V14ZM10.75%2010H14.75V8.5H10.75V10ZM14%209.25V20.25H15.5V9.25H14ZM14.75%2019.5H9.25V21H14.75V19.5ZM10%2020.25V10.75H8.5V20.25H10ZM10.75%208.5C9.50736%208.5%208.5%209.50736%208.5%2010.75H10C10%2010.3358%2010.3358%2010%2010.75%2010V8.5ZM16.25%204.5H18.75V3H16.25V4.5ZM19.5%205.25V20.25H21V5.25H19.5ZM20.25%2019.5H14.75V21H20.25V19.5ZM15.5%2020.25V5.25H14V20.25H15.5ZM18.75%204.5C19.1642%204.5%2019.5%204.83579%2019.5%205.25H21C21%204.00736%2019.9926%203%2018.75%203V4.5ZM16.25%203C15.0074%203%2014%204.00736%2014%205.25H15.5C15.5%204.83579%2015.8358%204.5%2016.25%204.5V3ZM1.75%2021H22.25V19.5H1.75V21Z'%20fill='%23252525'/%3e%3c/svg%3e",Au="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2014.2105L6.84488%2012.0821C7.66137%2011.5378%208.75215%2011.6663%209.41987%2012.3853C10.9123%2013.9926%2012.6426%2015.4538%2015%2015.4538C17.1727%2015.4538%2018.6125%2014.6485%2020%2013.261M6.75%2020.25H17.25C18.9069%2020.25%2020.25%2018.9069%2020.25%2017.25V6.75C20.25%205.09315%2018.9069%203.75%2017.25%203.75H6.75C5.09315%203.75%203.75%205.09315%203.75%206.75V17.25C3.75%2018.9069%205.09315%2020.25%206.75%2020.25ZM17.25%208.75C17.25%209.85457%2016.3546%2010.75%2015.25%2010.75C14.1454%2010.75%2013.25%209.85457%2013.25%208.75C13.25%207.64543%2014.1454%206.75%2015.25%206.75C16.3546%206.75%2017.25%207.64543%2017.25%208.75Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/svg%3e",Du="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.252%2019.25H6.74803C5.26465%2019.25%204.29985%2017.6884%204.96324%2016.3611L10.2152%205.85345C10.9506%204.38218%2013.0494%204.38218%2013.7848%205.85345L19.0368%2016.3611C19.7001%2017.6884%2018.7354%2019.25%2017.252%2019.25Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3c/svg%3e",Fu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%202.75V4.5M16.9069%205.09326L15.5962%206.40392M6.40381%2015.5962L5.09315%2016.9069M4.5%2011H2.75M6.40381%206.40381L5.09315%205.09315M14.1323%2020.999L10.5777%2011.3226C10.3542%2010.7143%2010.9552%2010.1281%2011.5577%2010.3666L21.0397%2014.1199C21.4283%2014.2737%2021.4679%2014.8081%2021.1062%2015.0175L17.4231%2017.1498C17.3097%2017.2155%2017.2155%2017.3097%2017.1498%2017.4231L15.0343%2021.0771C14.822%2021.4438%2014.2784%2021.3967%2014.1323%2020.999Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Iu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.38803%2019.923L5.72852%2019.2548H5.72852L5.38803%2019.923ZM4.07698%2018.612L3.40873%2018.9525H3.40873L4.07698%2018.612ZM19.923%2018.612L19.2548%2018.2715V18.2715L19.923%2018.612ZM18.612%2019.923L18.2715%2019.2548H18.2715L18.612%2019.923ZM19.923%205.38803L19.2548%205.72852V5.72852L19.923%205.38803ZM18.612%204.07698L18.9525%203.40873V3.40873L18.612%204.07698ZM4.07698%205.38803L4.74524%205.72852L4.07698%205.38803ZM5.38803%204.07698L5.72852%204.74524L5.38803%204.07698ZM19.5%208.55V15.45H21V8.55H19.5ZM15.45%2019.5H8.55V21H15.45V19.5ZM4.5%2015.45V8.55H3V15.45H4.5ZM8.55%204.5H15.45V3H8.55V4.5ZM8.55%2019.5C7.69755%2019.5%207.10331%2019.4994%206.64068%2019.4616C6.1868%2019.4245%205.92604%2019.3554%205.72852%2019.2548L5.04754%2020.5913C5.49175%2020.8176%205.97189%2020.912%206.51853%2020.9566C7.05641%2021.0006%207.7223%2021%208.55%2021V19.5ZM3%2015.45C3%2016.2777%202.99942%2016.9436%203.04336%2017.4815C3.08803%2018.0281%203.18238%2018.5082%203.40873%2018.9525L4.74524%2018.2715C4.6446%2018.074%204.57546%2017.8132%204.53838%2017.3593C4.50058%2016.8967%204.5%2016.3025%204.5%2015.45H3ZM5.72852%2019.2548C5.30516%2019.039%204.96095%2018.6948%204.74524%2018.2715L3.40873%2018.9525C3.76825%2019.6581%204.34193%2020.2317%205.04754%2020.5913L5.72852%2019.2548ZM19.5%2015.45C19.5%2016.3025%2019.4994%2016.8967%2019.4616%2017.3593C19.4245%2017.8132%2019.3554%2018.074%2019.2548%2018.2715L20.5913%2018.9525C20.8176%2018.5082%2020.912%2018.0281%2020.9566%2017.4815C21.0006%2016.9436%2021%2016.2777%2021%2015.45H19.5ZM15.45%2021C16.2777%2021%2016.9436%2021.0006%2017.4815%2020.9566C18.0281%2020.912%2018.5082%2020.8176%2018.9525%2020.5913L18.2715%2019.2548C18.074%2019.3554%2017.8132%2019.4245%2017.3593%2019.4616C16.8967%2019.4994%2016.3025%2019.5%2015.45%2019.5V21ZM19.2548%2018.2715C19.0391%2018.6948%2018.6948%2019.039%2018.2715%2019.2548L18.9525%2020.5913C19.6581%2020.2317%2020.2318%2019.6581%2020.5913%2018.9525L19.2548%2018.2715ZM21%208.55C21%207.7223%2021.0006%207.05641%2020.9566%206.51853C20.912%205.97189%2020.8176%205.49175%2020.5913%205.04754L19.2548%205.72852C19.3554%205.92604%2019.4245%206.1868%2019.4616%206.64068C19.4994%207.10331%2019.5%207.69755%2019.5%208.55H21ZM15.45%204.5C16.3025%204.5%2016.8967%204.50058%2017.3593%204.53838C17.8132%204.57546%2018.074%204.6446%2018.2715%204.74524L18.9525%203.40873C18.5082%203.18238%2018.0281%203.08803%2017.4815%203.04336C16.9436%202.99942%2016.2777%203%2015.45%203V4.5ZM20.5913%205.04754C20.2318%204.34193%2019.6581%203.76825%2018.9525%203.40873L18.2715%204.74524C18.6948%204.96095%2019.0391%205.30516%2019.2548%205.72852L20.5913%205.04754ZM4.5%208.55C4.5%207.69755%204.50058%207.10331%204.53838%206.64068C4.57546%206.1868%204.6446%205.92604%204.74524%205.72852L3.40873%205.04754C3.18238%205.49175%203.08803%205.97189%203.04336%206.51853C2.99942%207.05641%203%207.7223%203%208.55H4.5ZM8.55%203C7.7223%203%207.05641%202.99942%206.51853%203.04336C5.97189%203.08803%205.49175%203.18238%205.04754%203.40873L5.72852%204.74524C5.92604%204.6446%206.1868%204.57546%206.64068%204.53838C7.10331%204.50058%207.69755%204.5%208.55%204.5V3ZM4.74524%205.72852C4.96095%205.30516%205.30516%204.96095%205.72852%204.74524L5.04754%203.40873C4.34193%203.76825%203.76825%204.34193%203.40873%205.04754L4.74524%205.72852Z'%20fill='%23252525'/%3e%3cpath%20d='M20.25%2015H21V13.5H20.25V15ZM3.75%2013.5H3V15H3.75V13.5ZM3.75%2015H20.25V13.5H3.75V15Z'%20fill='%23252525'/%3e%3c/svg%3e",Bu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.0858%202.32272C11.4533%201.55909%2012.5467%201.55909%2012.9142%202.32272L15.0872%206.83907C15.2351%207.14651%2015.5293%207.35876%2015.8692%207.40319L20.8676%208.05664C21.7134%208.16721%2022.0517%209.20388%2021.4322%209.78704L17.779%2013.2263C17.5295%2013.4612%2017.4167%2013.8058%2017.4795%2014.1417L18.3971%2019.0563C18.5526%2019.8892%2017.6676%2020.5294%2016.9183%2020.1261L12.4825%2017.7385C12.1815%2017.5764%2011.8185%2017.5764%2011.5175%2017.7385L7.08174%2020.1261C6.33244%2020.5294%205.44743%2019.8892%205.60294%2019.0563L6.52054%2014.1417C6.58325%2013.8058%206.47048%2013.4612%206.22097%2013.2263L2.56776%209.78704C1.94833%209.20388%202.28661%208.16721%203.13241%208.05664L8.13078%207.40319C8.47066%207.35876%208.7649%207.14651%208.91282%206.83907L11.0858%202.32272Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ju="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.25%204.75H5.75C4.09315%204.75%202.75%206.09315%202.75%207.75V8.25M17.75%204.75H18.25C19.9069%204.75%2021.25%206.09315%2021.25%207.75V8.25M21.25%2015.75V16.25C21.25%2017.9069%2019.9069%2019.25%2018.25%2019.25H17.75M6.25%2019.25H5.75C4.09315%2019.25%202.75%2017.9069%202.75%2016.25V15.75'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.75%209.75H16.25'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.75%2014.25H14.25'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Hu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.25%2010.75V6.75C20.25%205.09315%2018.9069%203.75%2017.25%203.75H6.75C5.09315%203.75%203.75%205.09315%203.75%206.75V17.25C3.75%2018.9069%205.09315%2020.25%206.75%2020.25H10.75M14.1879%2020.8366L12.0869%2013.0056C11.9372%2012.4478%2012.4478%2011.9372%2013.0056%2012.0869L20.8366%2014.1879C21.2665%2014.3032%2021.3428%2014.8805%2020.9576%2015.1035L17.4231%2017.1498C17.3097%2017.2155%2017.2155%2017.3097%2017.1498%2017.4231L15.1035%2020.9576C14.8805%2021.3428%2014.3032%2021.2665%2014.1879%2020.8366Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Uu="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.125%2016.875H16.875'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.9167%206.45833C12.1113%206.45833%2011.4583%207.11125%2011.4583%207.91667V12.9167C11.4583%2013.7221%2012.1113%2014.375%2012.9167%2014.375C13.7221%2014.375%2014.375%2013.7221%2014.375%2012.9167V7.91667C14.375%207.11125%2013.7221%206.45833%2012.9167%206.45833Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.08333%203.125C6.27792%203.125%205.625%203.77792%205.625%204.58333V12.9167C5.625%2013.7221%206.27792%2014.375%207.08333%2014.375C7.88875%2014.375%208.54167%2013.7221%208.54167%2012.9167V4.58333C8.54167%203.77792%207.88875%203.125%207.08333%203.125Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Vu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.75%2018.25H7.25M3.75%2012H9.25M3.75%205.75H20.25M17%2010.5L18.5%2013.5L21.5%2015L18.5%2016.5L17%2019.5L15.5%2016.5L12.5%2015L15.5%2013.5L17%2010.5Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",$u="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.9016%209.48786L10.3899%203.2788C8.39443%201.97623%205.75%203.40798%205.75%205.79094V18.2091C5.75%2020.592%208.39442%2022.0238%2010.3899%2020.7212L19.9016%2014.5121C21.7151%2013.3283%2021.7151%2010.6717%2019.9016%209.48786Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3c/svg%3e",zu={Header:_u,Announcement:Vu,PrimaryHero:Hu,ProductHero:Nu,Items:Tu,FeaturedItems:Pu,Content:Ou,Stats:Mu,ImageGallery:Au,Logos:Du,CTA:Fu,FAQ:Iu,Reviews:Bu,ContactUs:ju,Footer:Uu,Video:$u},Ju="_wrapper_1k1cr_1",qu="_submodal_1k1cr_14",Sr={wrapper:Ju,submodal:qu},Wu=({children:e,positionTop:t,positionLeft:n})=>{const{keyBlock:r,startHideTimeout:o,clearHideTimeout:a,setMouseOverModal:s}=Ar();return r?L.jsx("div",{className:Sr.wrapper,style:t?{top:t,left:n||void 0}:{},onMouseEnter:()=>{a(),s(!0)},onMouseLeave:()=>{s(!1),o()},children:e}):null},Zu=({children:e})=>{const{hoverBlockId:t,startHideTimeout:n,clearHideTimeout:r,setMouseOverModal:o}=Ar();return t?L.jsx("div",{className:Be(Sr.wrapper,Sr.submodal),onMouseEnter:()=>{r(),o(!0)},onMouseLeave:()=>{o(!1),n()},children:e}):null},Gu="_applyButton_1a9kh_2",Ku="_content_1a9kh_7",Yu="_title_1a9kh_14",Xu="_label_1a9kh_21",Qu="_colorValue_1a9kh_40",ed="_colorMap_1a9kh_48",td="_indicator_1a9kh_57",nd="_hueSlider_1a9kh_66",rd="_slider_1a9kh_97",od="_buttons_1a9kh_102",ad="_name_1a9kh_109",sd="_secondary_1a9kh_114",id="_input_1a9kh_122",ld="_modal_1a9kh_160",cd="_alphaSlider_1a9kh_249",ud="_alphaBackground_1a9kh_257",dd="_alphaGradient_1a9kh_268",fd="_chargeTypes_1a9kh_297",hd="_charge_1a9kh_297",pd="_chargeActive_1a9kh_326",md="_gradient_1a9kh_334",gd="_color_1a9kh_40",vd="_colorActive_1a9kh_355",yd="_gradientWrapper_1a9kh_362",wd="_subtitle_1a9kh_368",bd="_colorTypes_1a9kh_375",Sd="_colorType_1a9kh_375",Cd="_colorTypeActive_1a9kh_399",Ed="_colorsWrapper_1a9kh_404",xd="_colors_1a9kh_404",W={applyButton:Gu,content:Ku,title:Yu,label:Xu,colorValue:Qu,colorMap:ed,indicator:td,hueSlider:nd,slider:rd,buttons:od,name:ad,secondary:sd,input:id,modal:ld,alphaSlider:cd,alphaBackground:ud,alphaGradient:dd,chargeTypes:fd,charge:hd,chargeActive:pd,gradient:md,color:gd,colorActive:vd,gradientWrapper:yd,subtitle:wd,colorTypes:bd,colorType:Sd,colorTypeActive:Cd,colorsWrapper:Ed,colors:xd};function ar(e){return(e.includes("linear-gradient")||e.includes("radial-gradient"))&&/^linear-gradient\(\d+deg,\s*#[A-Fa-f0-9]{8}\s+\d+%,\s*#[A-Fa-f0-9]{8}\s+\d+%\)$/.test(e)?!0:/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e)}const Da=e=>{const{initialColor:t,onChange:n,title:r,labelStyle:o="primary",isGradientActive:a=!0,isBlockSettings:s}=e,[i,l]=we.useState(t);we.useEffect(()=>{l(t)},[t]);const{setActiveLabel:c,setModalPosition:u,setInitialColor:d,setShowModal:h,setUpdate:y,setColor:m,setColorChange:p,setIsGradientActive:v,colorChange:R}=Dr();we.useEffect(()=>{const T=()=>{h(!1),c(null),d(t),y(()=>{}),m(t),p(()=>{})};return document.body.addEventListener("click",T),()=>{document.body.removeEventListener("click",T)}},[t]);const b=T=>{T.stopPropagation(),h(!0),p(l),y(n),d(t),m(i),v(a);const{top:H,left:w}=Aa(T,600,288,10,20,230,80);u({top:H,left:w})},k=T=>{const H=T.target.value;l(H),ar(H)&&(n(H),m(H),p(R))},P=()=>{ar(i)||l(t)};return L.jsxs("div",{className:W.content,children:[L.jsx("span",{className:Be(W.name,{[W.secondary]:o==="secondary"}),children:r}),L.jsxs("label",{className:W.label,onClick:T=>T.stopPropagation(),children:[L.jsx("div",{className:W.colorValue,style:{background:ar(i)?i:t},onClick:s?void 0:b}),L.jsx("input",{type:"text",value:i.includes("linear-gradient")?i:i.toUpperCase(),onChange:k,onBlur:P,className:W.input,style:{textTransform:i.includes("linear-gradient")?"none":"uppercase"}})]})]})},Rd=()=>{const{modalPosition:e,color:t,initialColor:n,setShowModal:r,hue:o,saturation:a,brightness:s,alpha:i,dragging:l,setDragging:c,setHue:u,setSaturation:d,setBrightness:h,setAlpha:y,colorChange:m,setColor:p,update:v,isGradient:R,setIsGradient:b,gradientDirection:k,setGradientDirection:P,hue2:T,saturation2:H,brightness2:w,alpha2:_,setHue2:G,setSaturation2:B,setBrightness2:ae,setAlpha2:ee,activeColorIndex:te,setActiveColorIndex:he,isGradientActive:Oe,isBlockSettings:Te}=Dr(),Ze=(V,U,ne)=>{U/=100,ne/=100;const z=de=>(de+V/60)%6,K=de=>ne*(1-U*Math.max(0,Math.min(z(de),4-z(de),1))),q=Math.round(255*K(5)),re=Math.round(255*K(3)),Z=Math.round(255*K(1));return{r:q,g:re,b:Z}},ue=V=>V.toString(16).padStart(2,"0"),Re=(V,U,ne,z)=>{const{r:K,g:q,b:re}=Ze(V,U,ne),Z=Math.round(z/100*255);return`#${ue(K)}${ue(q)}${ue(re)}${ue(Z)}`},Ce=(V,U,ne,z)=>{if(R)if(te===1){u(V),d(U),h(ne),y(z);const K=Re(V,U,ne,z),q=Re(T,H,w,_),Z=`linear-gradient(${k==="vertical"?"0deg":"90deg"}, ${K} 0%, ${q} 100%)`;m(Z),p(Z)}else{G(V),B(U),ae(ne),ee(z);const K=Re(V,U,ne,z),q=Re(o,a,s,i),Z=`linear-gradient(${k==="vertical"?"0deg":"90deg"}, ${q} 0%, ${K} 100%)`;m(Z),p(Z)}else{const K=Re(V,U,ne,z);m(K),p(K)}},Se=(V,U,ne)=>{const{width:z,height:K}=ne.getBoundingClientRect(),q=Math.max(0,Math.min(V/z*100,100)),re=Math.max(0,Math.min(100-U/K*100,100));R?te===1?(d(q),h(re),Ce(o,q,re,i)):(B(q),ae(re),Ce(T,q,re,_)):(d(q),h(re),Ce(o,q,re,i))},Pe=V=>{const{offsetX:U,offsetY:ne}=V.nativeEvent;c(!0),Se(U,ne,V.currentTarget)},Ue=V=>{if(l){const U=document.querySelector(`.${W.colorMap}`),{left:ne,top:z}=U.getBoundingClientRect(),K=V.clientX-ne,q=V.clientY-z;Se(K,q,U)}},se=()=>{c(!1)};we.useEffect(()=>{function V(z){const K=/linear-gradient\((\d+deg),\s*(#[0-9a-fA-F]{8})\s*0%,\s*(#[0-9a-fA-F]{8})\s*100%\)/,q=z.match(K);if(q){const re=q[1],Z=q[2],de=q[3];return{angle:re,col1:Z,col2:de}}return null}function U(z){const K=parseInt(z.slice(1,3),16),q=parseInt(z.slice(3,5),16),re=parseInt(z.slice(5,7),16),Z=parseInt(z.slice(7,9),16)/255*100,{h:de,s:tt,b:ht}=ne(K,q,re);return{h:de,s:tt,b:ht,a:Z}}function ne(z,K,q){z/=255,K/=255,q/=255;const re=Math.max(z,K,q),Z=Math.min(z,K,q);let de=0;const tt=re-Z,ht=(re===0?0:tt/re)*100,Ke=re*100;if(re===Z)de=0;else switch(re){case z:de=((K-q)/tt+(K<q?6:0))*60;break;case K:de=((q-z)/tt+2)*60;break;case q:de=((z-K)/tt+4)*60;break}return{h:de,s:ht,b:Ke}}if(n&&n.startsWith("linear-gradient")){const z=V(n);if(z){const{angle:K,col1:q,col2:re}=z,Z=U(q),de=U(re);b(!0),P(K==="0deg"?"vertical":"horizontal"),u(Z.h),d(Z.s),h(Z.b),y(Z.a),G(de.h),B(de.s),ae(de.b),ee(de.a),he(1)}}else if(n){const K=function(re){let Z=re;return Z.length===7?Z+"ff":Z.length===9?Z:Z.length===4?Z[0]+Z[1].repeat(2)+Z[2].repeat(2)+Z[3].repeat(2)+"ff":"#000000ff"}(n),q=U(K);b(!1),u(q.h),d(q.s),h(q.b),y(q.a)}},[n,b,P,u,d,h,y,G,B,ae,ee,he]),we.useEffect(()=>{let V,U,ne,z;R?te===1?(V=o,U=a,ne=s,z=i):(V=T,U=H,ne=w,z=_):(V=o,U=a,ne=s,z=i),Ce(V,U,ne,z)},[R,k,te,o,a,s,i,T,H,w,_]),we.useEffect(()=>{const V=ne=>Ue(ne),U=()=>se();return l?(document.addEventListener("mousemove",V),document.addEventListener("mouseup",U)):(document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",U)),()=>{document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",U)}},[l,R,k]);function pe(){if(!R)v(t);else{const V=Re(o,a,s,i),U=Re(T,H,w,_),z=`linear-gradient(${k==="vertical"?"0deg":"90deg"}, ${V} 0%, ${U} 100%)`;v(z)}r(!1)}function Me(){r(!1),m(n)}const Ee=R?te===1?o:T:o,ft=R?te===1?a:H:a,rn=R?te===1?s:w:s,qn=R?te===1?i:_:i,{r:on,g:xe,b:et}=Ze(Ee,ft,rn),an=`linear-gradient(to right, rgba(${on}, ${xe}, ${et}, 0), rgba(${on}, ${xe}, ${et}, 1))`,sn=Re(o,a,s,i),Ge=Re(T,H,w,_);return L.jsxs("div",{className:W.modal,onClick:V=>V.stopPropagation(),style:{top:`${e.top}px`,left:`${e.left}px`},children:[L.jsx("h2",{className:W.title,children:"Color"}),Oe&&L.jsxs("div",{className:W.colorTypes,children:[L.jsxs("div",{className:Be(W.colorType,{[W.colorTypeActive]:!R}),onClick:()=>b(!1),children:[L.jsx("div",{style:{background:"#757575",width:"16px",height:"16px",borderRadius:"50%"}}),"Solid"]}),L.jsxs("div",{className:Be(W.colorType,{[W.colorTypeActive]:R}),onClick:()=>b(!0),children:[L.jsx("div",{style:{background:"linear-gradient(to bottom, #757575 0%, #DBDBDB 100%)",width:"16px",height:"16px",borderRadius:"50%"}}),"Linear"]})]}),R&&Oe&&L.jsxs("div",{className:W.colorsWrapper,children:[L.jsx("div",{className:W.colors,style:{background:`linear-gradient(90deg, ${sn} 0%, ${Ge} 100%)`}}),L.jsx("div",{className:Be(W.color,{[W.colorActive]:te===1}),onClick:()=>he(1),style:{background:sn}}),L.jsx("div",{className:Be(W.color,{[W.colorActive]:te===2}),onClick:()=>he(2),style:{background:Ge}})]}),L.jsx("div",{className:W.colorMap,onMouseDown:Pe,style:{background:`
41
41
  linear-gradient(to top, black, transparent),
42
42
  linear-gradient(to right, hsl(${Ee}, 100%, 100%), hsl(${Ee}, 100%, 50%))
43
- `},children:L.jsx("div",{className:W.indicator,style:{position:"absolute",left:`${ft}%`,top:`${100-rn}%`,transform:"translate(-50%, -50%)"}})}),L.jsx("div",{className:W.hueSlider,style:{bottom:Te?R?"225px":"150px":R?"175px":"100px"},children:L.jsx("input",{type:"range",min:"0",max:"360",value:Ee,onChange:V=>{const U=Number(V.target.value);R?te===1?Ce(U,a,s,i):Ce(U,H,w,P):(u(U),Ce(U,a,s,i))},className:W.slider})}),L.jsxs("div",{className:W.alphaSlider,style:{bottom:Te?R?"200px":"125px":R?"150px":"75px"},children:[L.jsx("div",{className:W.alphaBackground}),L.jsx("div",{className:W.alphaGradient,style:{background:an}}),L.jsx("input",{type:"range",min:"0",max:"100",value:qn,onChange:V=>{const U=Number(V.target.value);R?te===1?Ce(o,a,s,U):Ce(T,H,w,U):(y(U),Ce(o,a,s,U))},className:W.slider})]}),R&&Oe&&L.jsxs("div",{className:W.gradientWrapper,children:[L.jsx("h3",{className:W.subtitle,children:"Rotation"}),L.jsx("div",{className:W.gradient,children:L.jsxs("div",{className:W.chargeTypes,children:[L.jsxs("div",{className:Be(W.charge,{[W.chargeActive]:k==="horizontal"}),onClick:()=>_("horizontal"),children:[L.jsx(je.Icon,{name:"ArrowsHorizontal",width:20,height:20}),"Horizontal"]}),L.jsxs("div",{className:Be(W.charge,{[W.chargeActive]:k==="vertical"}),onClick:()=>_("vertical"),children:[L.jsx(je.Icon,{name:"ArrowsVertical",width:20,height:20}),"Vertical"]})]})})]}),Te&&L.jsx(Da,{initialColor:t,onChange:V=>p(V),title:"",isBlockSettings:Te}),L.jsxs("div",{className:W.buttons,children:[L.jsx(je.ButtonSettings,{onClick:Me,className:Be(W.applyButton,W.cancelButton),type:"Secondary",children:"Cancel"}),L.jsx(je.ButtonSettings,{onClick:pe,className:W.applyButton,type:"Primary",children:"Apply"})]})]})},kd="_wrapper_kzokw_1",Ld="_open_kzokw_16",Nd="_close_kzokw_20",sr={wrapper:kd,open:Ld,close:Nd},Td=e=>{const{isOpen:t,isClose:n,children:r}=e;return L.jsx("div",{className:Be(sr.wrapper,{[sr.open]:t,[sr.close]:n}),children:r})},_d="_blocks_emecf_1",Pd="_block_emecf_1",Od="_active_emecf_21",ir={blocks:_d,block:Pd,active:Od},Md=e=>{const{items:t,selectedItem:n,onSelect:r,getIconName:o}=e;return L.jsx("div",{className:ir.blocks,children:t.map(a=>L.jsx("div",{className:Be(ir.block,{[ir.active]:n===a}),onClick:()=>r(a),children:L.jsx(je.Icon,{name:o(a),fill:n===a?"#252525":"#757575"})},String(a)))})},Ad="_layout_1pjho_1",Dd="_main_1pjho_10",Fd="_content_1pjho_18",Id="_notifications_1pjho_26",yn={layout:Ad,main:Dd,content:Fd,notifications:Id},Bd="_notification_2jmah_1",jd="_text_2jmah_22",Hd="_timer_2jmah_27",Ud="_warning_2jmah_32",Vd="_error_2jmah_37",$d="_success_2jmah_42",kt={notification:Bd,text:jd,timer:Hd,warning:Ud,error:Vd,success:$d},Po={warning:"#C1972A",error:"#FF3F19",success:"#338B13"},zd=e=>{const{type:t,message:n,style:r,padding:o,timer:a,id:s,element:i}=e,[l,c]=we.useState(a),{setNotifications:u}=Fe();function d(){const y=Fe.getState().notifications.filter(m=>m.id!==s);u([...y])}return we.useEffect(()=>{const h=setTimeout(()=>{d()},a*1e3);return()=>clearTimeout(h)},[a]),we.useEffect(()=>{const h=setInterval(()=>c(y=>y-1),1e3);return()=>clearInterval(h)},[l]),i?i({type:t,message:n,style:r,padding:o,timer:a,id:s}):L.jsx("div",{style:{padding:o,position:"relative"},children:L.jsxs("div",{className:Be(kt.notification,{[kt.warning]:t==="warning",[kt.error]:t==="error",[kt.success]:t==="success"}),style:r,children:[L.jsx("div",{children:L.jsx(je.Icon,{name:"Info",fill:Po[t],width:20,height:20})}),L.jsx("div",{className:kt.text,children:n}),a&&L.jsx("div",{className:kt.timer,children:l}),L.jsx("div",{style:{display:"flex"},children:L.jsx(je.Icon,{name:"X",fill:Po[t],width:20,height:20,hoverable:!0,onClick:()=>d()})})]})})},Jd=()=>{const{isOpenModal:e,setIsOpenModal:t}=Yt(),{openModal:n,setOpenModal:r}=Na(),{notifications:o}=Fe(),{title:a,description:s,setTitle:i,setDescription:l,setOnConfirm:c}=Ta();return L.jsxs("div",{id:"builder",children:[L.jsxs("div",{className:yn.layout,children:[L.jsx(Ft.Navbar,{}),L.jsxs("main",{className:yn.main,children:[L.jsx(Ft.Header,{}),L.jsxs("div",{className:yn.content,children:[L.jsx(Ft.Sidebar,{}),L.jsx(Ft.Preview,{})]})]})]}),a&&s&&L.jsx(je.BuilderModal,{close:()=>{i(null),l(null),c(null)},children:L.jsx(je.ConfirmationModal,{})}),e&&L.jsx(je.BuilderModal,{close:t,children:L.jsx(Ft.ModifyPage,{})}),n&&L.jsx(je.BuilderModal,{close:r,children:L.jsx(je.ChooseImageModal,{})}),o.length>0&&L.jsx("div",{className:yn.notifications,children:o.map(u=>L.jsx(zd,{type:u.status,message:u.message,timer:u.timer||10,id:u.id,element:u.component},u.id))})]})};async function Lt(e,t){const n=localStorage.getItem("shopId")||void 0,o=`${nn.getState().apiUrls.api}/${e}/builder/shops/${n}/${t}`;return(await at({url:o,withToken:!0,method:"get"})).data}async function qd(){try{const[e,t,n,r,o,a,s,i,l]=await Promise.allSettled([Lt("v1","general"),Lt("v1","faqs"),Lt("v1","listings"),Lt("v1","products"),Lt("v1","reviews"),Lt("v1","categories"),{data:null},{data:null},{data:null}]);return{general:e,faqs:t,listings:n,products:r,reviews:o,categories:a,fullPosts:s,posts:i,vouches:l}}catch(e){throw console.error("Error fetching page data:",e),e}}async function Wd(){const e=nn.getState().apiUrls;try{const{data:t}=await ce.get(`${e.googleFonts}?key=AIzaSyAEsTbjAPUz_TeuFCq4z4LPK9w_vst0Pfw`);return t.items}catch(t){throw console.error("Error fetching page data:",t),t}}async function Zd(){var o;const e=localStorage.getItem("shopId"),t=localStorage.getItem("draftId"),r=`${nn.getState().apiUrls.api}/v2/builder/shops/${e}/drafts/${t}/pages`;try{return(await at({url:r,withToken:!0,method:"get"})).data}catch(a){return{data:[],status:(o=a.response)==null?void 0:o.status}}}async function Gd(){const e=localStorage.getItem("shopId")||void 0,t=localStorage.getItem("draftId")||void 0,r=`${nn.getState().apiUrls.api}/v2/builder/shops/${e}/drafts/${t}/all`;return(await at({url:r,withToken:!0,method:"get"})).data}const Kd=e=>{const{blocks:t,settings:n,header:r,footer:o,announcement:a}=e,{setBlocks:s,setSourceBlocks:i,setHeader:l,setFooter:c,setAnnouncement:u,setSettings:d}=xa(),{fonts:h,setFonts:y}=Oa(),{setSettings:m}=wr(),{setPageContext:p}=Yt(),{setThemeSettings:v,setIsLoadingThemeSettings:R}=On(),{setIsLoadingSettings:b}=wr(),{notifications:k,setNotifications:_}=Fe(),{setBlocks:T,blocks:H,createPage:w,setIsLoadingLayers:P,setHeader:G,setAnnouncement:B,setFooter:ae}=Mn(),{setPages:ee,setCurrentPage:te}=Yt();return we.useEffect(()=>{R(!0),P(!0),b(!0);const he={};Object.keys(t).forEach(Te=>{he[Te]=t[Te]}),i(he),s(he),l(r),c(o),u(a),d(n),(async()=>{const Te={listings:null,products:null,reviews:null,categories:null,faqs:null,general:null,fullPosts:null,posts:null,preserveContent:!1,vouches:null},Ze=await qd();Object.keys(Ze).map(se=>{const pe=se;Te[pe]=Ze[pe].value.data}),p(Te);const{data:ue}=await Gd(),{themeSettings:Re,layers:Ce,settings:Se}=ue||{};if(Se){if(Se.settings){const se=new n;se.blockSettings={displayName:"Settings",isAddable:!1,...Se.settings},m(se.blockSettings)}Se.header&&G(Se.header),Se.footer&&ae(Se.footer),Se.announcement&&B(Se.announcement)}else{const se=new n;m(se.blockSettings)}Re&&v(Re);const _e=await Zd(),Ue={};if(_e.status>=400&&_([...k,{id:ot(),message:"Error fetching pages",status:"error"}]),_e.data.length>0?(_e.data.forEach(se=>{var pe,Me;H[se.path]||w(se.path),Ue[se.id||se.path]={...se,icon:$t[se.path]?$t[se.path].icon:"File",name:se.name||((pe=se.seo)==null?void 0:pe.pageTitle)||((Me=$t[se.path])==null?void 0:Me.name)||se.path}}),ee(Ue),te(Object.keys(Ue)[0])):(ee($t),te(Object.keys($t)[0])),h.length===0){const se=await Wd();y([...se.map(pe=>{const Me=pe.variants.map(Ee=>{if(!Ee.includes("italic"))return Ee==="regular"?"400":Ee}).filter(Ee=>Ee!==void 0);return{name:pe.family,weights:Me}})])}T(Ce),R(!1),P(!1),b(!1)})()},[]),L.jsx(Jd,{})};function Yd(){const e=new URL(window.location.href);window.history.replaceState(null,"",e.pathname+e.hash)}function Xd(){const e=new URLSearchParams(document.location.search),t=e.get("shopId")||localStorage.getItem("shopId"),n=e.get("sellerAccessToken")||localStorage.getItem("sellerAccessToken"),r=e.get("draftId")||localStorage.getItem("draftId");return Yd(),n&&localStorage.setItem("sellerAccessToken",n),t&&localStorage.setItem("shopId",t),r&&localStorage.setItem("draftId",r),!!(n&&t&&r)}const Qd="data:image/svg+xml,%3csvg%20width='204'%20height='241'%20viewBox='0%200%20204%20241'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M204%200V118.282L154.174%20134.707V69.0074L49.7111%20102.77V43.5716L204%200Z'%20fill='%23FF3F19'/%3e%3cpath%20d='M154.174%20134.694V191.155L0%20241V117.471L49.7114%20102.757V169.597L154.174%20134.694Z'%20fill='%23FF3F19'/%3e%3c/svg%3e",e0="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2019%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.0103662%2023.5362C0.0538052%2022.4425%200.370173%2021.4309%201.08058%2020.6127C1.92699%2019.6379%202.91375%2019.2329%204.14841%2019.1732C4.162%2020.1401%204.15111%2021.1085%204.15091%2022.0756L4.70583%2022.0747L7.42027%2022.0755C7.95952%2022.0752%208.50027%2022.0844%209.03933%2022.0742L9.17755%2022.0731L10.6132%2022.0759C10.8265%2022.0759%2011.0767%2022.1021%2011.2852%2022.0658C11.3052%2022.0703%2011.3534%2022.0735%2011.3625%2022.0928C11.3917%2022.1543%2011.3688%2031.0517%2011.3725%2031.9631C11.1563%2032.0856%2010.2676%2031.8701%2010.0303%2031.7947C9.89866%2031.7528%209.644%2031.6914%209.54946%2031.5874L9.51914%2031.584C9.46943%2031.5736%209.44171%2031.5537%209.40126%2031.5222C9.30218%2031.5131%209.14954%2031.4132%209.07718%2031.343C9.00129%2031.3163%208.92757%2031.2576%208.85921%2031.2134L8.85617%2031.2002C8.5748%2031.0715%208.14929%2030.6244%207.94318%2030.376C7.35205%2029.6639%206.93892%2028.7659%206.83493%2027.8203C6.78763%2027.3904%206.7994%2026.9595%206.80055%2026.5277C6.80084%2026.4202%206.82996%2026.126%206.78242%2026.0387L6.71237%2026.023C6.54382%2026.0528%206.34316%2026.0328%206.17124%2026.0324L1.0194%2026.0325L0.942306%2026.0307C0.74237%2026.0326%200.173082%2026.0689%200.0224192%2026.0192L0.00848581%2026.0029C0.022853%2025.8597%200.0136924%2025.7065%200.013837%2025.562L0.0113299%2024.6651L0.0117161%2024.5253C0.0150266%2024.1956%200.0145767%2023.8659%200.0103662%2023.5362Z'%20fill='currentColor'/%3e%3cpath%20d='M6.79824%200.00127802C6.88001%20-0.000781892%206.96176%20-0.000351703%207.04349%200.00256876C7.12523%200.00549261%207.20682%200.0108998%207.28827%200.0187905C7.36968%200.0266845%207.45082%200.0370518%207.53169%200.0498924C7.61259%200.0627296%207.69305%200.078018%207.77309%200.0957576C7.85312%200.113501%207.93259%200.133663%208.0115%200.156244C8.09044%200.178828%208.16868%200.203796%208.24624%200.231148C8.3238%200.258499%208.40053%200.28819%208.47645%200.32022C8.55237%200.352247%208.62736%200.386559%208.70141%200.423156L8.71428%200.423492C8.76476%200.450874%208.815%200.479135%208.8661%200.50516C8.947%200.550491%209.03065%200.593185%209.10687%200.646856L9.24939%200.733144C9.31674%200.78126%209.38361%200.83049%209.45202%200.87695C10.462%201.67615%2011.1434%202.77146%2011.325%204.10211C11.4076%204.70784%2011.3729%205.34243%2011.372%205.9541C11.4625%205.96599%2011.5526%205.9664%2011.6436%205.96762C12.6033%205.93794%2013.5708%205.96289%2014.5314%205.96294C15.459%205.96305%2016.3927%205.93758%2017.3195%205.9633C17.5874%205.96523%2017.9062%206.00101%2018.1677%205.95273C18.1496%206.13096%2018.1583%206.31472%2018.1585%206.49401L18.1598%207.38388L18.1595%207.51855C18.1591%207.83084%2018.14%208.15609%2018.1607%208.46685C18.109%209.73893%2017.6972%2010.8198%2016.8003%2011.6891C15.9969%2012.4676%2015.0894%2012.76%2014.0228%2012.8194L14.021%2010.9083C14.0209%2010.5892%2014.0389%2010.2573%2014.0163%209.93952C14.0002%209.92849%2013.9879%209.91884%2013.9692%209.9133C13.7941%209.93418%2013.6055%209.92148%2013.4293%209.92133H9.15258L9.04077%209.92082L7.56664%209.92209C7.31676%209.92224%207.04528%209.94526%206.79858%209.90893L6.79824%200.00127802Z'%20fill='currentColor'/%3e%3cpath%20d='M4.13987%205.96279C4.65941%205.9653%205.17894%205.96467%205.69847%205.96091C5.70059%207.27995%205.71757%208.60219%205.69833%209.92082L4.15072%209.92046L4.15106%2011.4065C4.15096%2011.6783%204.1406%2011.9555%204.15443%2012.2266C4.73799%2012.8393%205.31307%2013.4655%205.90921%2014.0644L5.98321%2014.0407C6.25311%2014.0833%206.6928%2014.0501%206.97981%2014.0499L12.7386%2014.0492L13.5943%2014.0482C13.7363%2014.0479%2013.9068%2014.0286%2014.0457%2014.0577L15.8019%2015.9078L15.8915%2015.997L15.9615%2016.0784L15.9955%2016.1093L17.4221%2017.6163C17.6528%2017.8599%2017.9077%2018.0979%2018.1211%2018.3569C18.1463%2018.3875%2018.1599%2018.4086%2018.1691%2018.4477C18.1415%2018.6757%2018.1577%2018.9211%2018.1579%2019.1514L18.1594%2020.4531C18.1597%2021.8112%2018.142%2023.1721%2018.1599%2024.5297L18.1589%2024.6625L18.158%2025.5556C18.158%2025.7089%2018.1437%2025.8808%2018.1676%2026.0315L18.0995%2026.031L17.2568%2026.0329L17.2101%2026.0308C16.2512%2026.0486%2015.2892%2026.0305%2014.3299%2026.0308C13.7488%2026.031%2013.0694%2026.064%2012.4959%2026.0258L12.4831%2026.0202C12.4481%2025.9239%2012.4717%2022.4806%2012.47%2022.075L14.0216%2022.0744C14.0024%2021.3241%2014.0324%2020.5711%2014.0173%2019.8203C13.4629%2019.2116%2012.887%2018.6041%2012.3052%2018.0244L12.293%2017.9978C12.0554%2018.0392%2011.5401%2018.0054%2011.2777%2018.0053L8.9362%2018.0074C7.75375%2017.9793%206.56306%2018.0065%205.37994%2018.0069C5.13497%2018.007%204.32737%2018.0401%204.13472%2017.9962L2.36331%2016.1262L2.29219%2016.0566L2.21959%2015.9758L2.15074%2015.9102C1.93803%2015.6694%201.70849%2015.441%201.48797%2015.2079L0%2013.631C0.0383768%2013.4512%200.014078%2013.2231%200.013837%2013.0369L0.0121494%2011.9198L0.0113299%207.52017L0.0122943%207.34622C0.0134032%206.9143%200.0453199%206.37479%200.00371286%205.95329C0.115854%205.96772%200.229056%205.9664%200.341872%205.96777C0.589393%205.96198%200.836946%205.96042%201.08453%205.9631L3.10905%205.96548C3.44789%205.96554%203.80282%205.98825%204.13987%205.96279Z'%20fill='currentColor'/%3e%3c/svg%3e",t0=e=>{const{blocks:t,settings:n,header:r,footer:o,announcement:a}=e,{isAntistock:s}=Ra(),[i,l]=we.useState(!0),c=Xt(),u=qe();return we.useEffect(()=>{const d=u.pathname;if(d.startsWith("/admin/builder")){d==="/admin/builder/add"?document.title="Add Section | Builder":d==="/admin/builder/theme"?document.title="Theme Settings | Builder":d==="/admin/builder/settings"?document.title="Settings | Builder":document.title=`Builder | ${s?"Antistock":"Billgang "}`;let h=document.querySelector("link[rel~='icon']");h||(h=document.createElement("link"),h.rel="icon",document.head.appendChild(h)),h&&(h.href=s?e0:Qd)}},[u]),we.useEffect(()=>{l(!0),Xd()?l(!1):c("/")},[]),L.jsx(L.Fragment,{children:i?L.jsx(je.LoaderBuilder,{}):L.jsx(Kd,{blocks:t,settings:n,header:r,footer:o,announcement:a})})},n0=Object.freeze(Object.defineProperty({__proto__:null,BuilderPage:t0},Symbol.toStringTag,{value:"Module"}));exports.AddSectionSubmodal=Zu;exports.AnimatedPanel=Td;exports.AntistockRoutes=Yo;exports.ColorPicker=Da;exports.ColorPickerModal=Rd;exports.IS_LOCAL_HOST=cu;exports.Loader=Cu;exports.NavLink=Go;exports.Navigate=si;exports.Outlet=ii;exports.Picker=Md;exports.RadiusVariables=uu;exports.RouterProvider=_i;exports.Routes=_r;exports.Submodal=Wu;exports.ThicknessVariables=du;exports.Tooltip=Ru;exports.aspectRatio=fu;exports.aspectRatioOptions=hu;exports.axios=ce;exports.blockIcons=zu;exports.clx=Be;exports.commonjsGlobal=vu;exports.convertCfImageIdToUrl=Fc;exports.createBrowserRouter=Ei;exports.defaultPagePaths=lu;exports.devices=au;exports.extractDateAndTime=Uc;exports.formatLabel=ku;exports.formatPrice=Ic;exports.formatTimestamp=Hc;exports.getDefaultExportFromCjs=_a;exports.getDisplayName=Lu;exports.getModalPosition=Aa;exports.index=n0;exports.jwtDecode=Xo;exports.navbarBlocks=La;exports.normalizeInterval=jc;exports.percentageDifference=Bc;exports.referralSteps=Ji;exports.request=at;exports.sizeOptions=iu;exports.themeSettingsBlocks=su;exports.typeFontOptions=pu;exports.useApiStore=nn;exports.useBlocksStore=xa;exports.useCartStore=Wc;exports.useChooseImageStore=Na;exports.useColorPickerStore=Dr;exports.useConfirmationModalStore=Ta;exports.useCustomerDashboardStore=Gi;exports.useDeviceStore=wu;exports.useDiscordStore=Gc;exports.useErrorStore=gu;exports.useFontsStore=Oa;exports.useGeneralStore=Ra;exports.useGetTsId=Ea;exports.useHistoryStore=Pe;exports.useLayersStore=Mn;exports.useLocation=qe;exports.useModalStore=Yc;exports.useNavbarStore=mu;exports.useNavigate=Xt;exports.useNotificationStore=Fe;exports.usePagesStore=Yt;exports.usePaginationPagesStore=Zc;exports.useParams=qs;exports.usePreviewStore=ka;exports.useRouteError=Jo;exports.useSearchParams=Bi;exports.useSettingsStore=wr;exports.useShareLinkStore=ou;exports.useStorefrontStore=Ki;exports.useSubmodalStore=Ar;exports.useSubscriptionStore=Kc;exports.useThemeSettingsStore=On;exports.useTooltipStore=Ma;exports.useTrackingAnalytics=Jc;exports.v4=ot;
43
+ `},children:L.jsx("div",{className:W.indicator,style:{position:"absolute",left:`${ft}%`,top:`${100-rn}%`,transform:"translate(-50%, -50%)"}})}),L.jsx("div",{className:W.hueSlider,style:{bottom:Te?R?"225px":"150px":R?"175px":"100px"},children:L.jsx("input",{type:"range",min:"0",max:"360",value:Ee,onChange:V=>{const U=Number(V.target.value);R?te===1?Ce(U,a,s,i):Ce(U,H,w,_):(u(U),Ce(U,a,s,i))},className:W.slider})}),L.jsxs("div",{className:W.alphaSlider,style:{bottom:Te?R?"200px":"125px":R?"150px":"75px"},children:[L.jsx("div",{className:W.alphaBackground}),L.jsx("div",{className:W.alphaGradient,style:{background:an}}),L.jsx("input",{type:"range",min:"0",max:"100",value:qn,onChange:V=>{const U=Number(V.target.value);R?te===1?Ce(o,a,s,U):Ce(T,H,w,U):(y(U),Ce(o,a,s,U))},className:W.slider})]}),R&&Oe&&L.jsxs("div",{className:W.gradientWrapper,children:[L.jsx("h3",{className:W.subtitle,children:"Rotation"}),L.jsx("div",{className:W.gradient,children:L.jsxs("div",{className:W.chargeTypes,children:[L.jsxs("div",{className:Be(W.charge,{[W.chargeActive]:k==="horizontal"}),onClick:()=>P("horizontal"),children:[L.jsx(je.Icon,{name:"ArrowsHorizontal",width:20,height:20}),"Horizontal"]}),L.jsxs("div",{className:Be(W.charge,{[W.chargeActive]:k==="vertical"}),onClick:()=>P("vertical"),children:[L.jsx(je.Icon,{name:"ArrowsVertical",width:20,height:20}),"Vertical"]})]})})]}),Te&&L.jsx(Da,{initialColor:t,onChange:V=>p(V),title:"",isBlockSettings:Te}),L.jsxs("div",{className:W.buttons,children:[L.jsx(je.ButtonSettings,{onClick:Me,className:Be(W.applyButton,W.cancelButton),type:"Secondary",children:"Cancel"}),L.jsx(je.ButtonSettings,{onClick:pe,className:W.applyButton,type:"Primary",children:"Apply"})]})]})},kd="_wrapper_kzokw_1",Ld="_open_kzokw_16",Nd="_close_kzokw_20",sr={wrapper:kd,open:Ld,close:Nd},Td=e=>{const{isOpen:t,isClose:n,children:r}=e;return L.jsx("div",{className:Be(sr.wrapper,{[sr.open]:t,[sr.close]:n}),children:r})},Pd="_blocks_emecf_1",_d="_block_emecf_1",Od="_active_emecf_21",ir={blocks:Pd,block:_d,active:Od},Md=e=>{const{items:t,selectedItem:n,onSelect:r,getIconName:o}=e;return L.jsx("div",{className:ir.blocks,children:t.map(a=>L.jsx("div",{className:Be(ir.block,{[ir.active]:n===a}),onClick:()=>r(a),children:L.jsx(je.Icon,{name:o(a),fill:n===a?"#252525":"#757575"})},String(a)))})},Ad="_layout_1pjho_1",Dd="_main_1pjho_10",Fd="_content_1pjho_18",Id="_notifications_1pjho_26",yn={layout:Ad,main:Dd,content:Fd,notifications:Id},Bd="_notification_2jmah_1",jd="_text_2jmah_22",Hd="_timer_2jmah_27",Ud="_warning_2jmah_32",Vd="_error_2jmah_37",$d="_success_2jmah_42",kt={notification:Bd,text:jd,timer:Hd,warning:Ud,error:Vd,success:$d},_o={warning:"#C1972A",error:"#FF3F19",success:"#338B13"},zd=e=>{const{type:t,message:n,style:r,padding:o,timer:a,id:s,element:i}=e,[l,c]=we.useState(a),{setNotifications:u}=Fe();function d(){const y=Fe.getState().notifications.filter(m=>m.id!==s);u([...y])}return we.useEffect(()=>{const h=setTimeout(()=>{d()},a*1e3);return()=>clearTimeout(h)},[a]),we.useEffect(()=>{const h=setInterval(()=>c(y=>y-1),1e3);return()=>clearInterval(h)},[l]),i?i({type:t,message:n,style:r,padding:o,timer:a,id:s}):L.jsx("div",{style:{padding:o,position:"relative"},children:L.jsxs("div",{className:Be(kt.notification,{[kt.warning]:t==="warning",[kt.error]:t==="error",[kt.success]:t==="success"}),style:r,children:[L.jsx("div",{children:L.jsx(je.Icon,{name:"Info",fill:_o[t],width:20,height:20})}),L.jsx("div",{className:kt.text,children:n}),a&&L.jsx("div",{className:kt.timer,children:l}),L.jsx("div",{style:{display:"flex"},children:L.jsx(je.Icon,{name:"X",fill:_o[t],width:20,height:20,hoverable:!0,onClick:()=>d()})})]})})},Jd=()=>{const{isOpenModal:e,setIsOpenModal:t}=Yt(),{openModal:n,setOpenModal:r}=Na(),{notifications:o}=Fe(),{title:a,description:s,setTitle:i,setDescription:l,setOnConfirm:c}=Ta();return L.jsxs("div",{id:"builder",children:[L.jsxs("div",{className:yn.layout,children:[L.jsx(Ft.Navbar,{}),L.jsxs("main",{className:yn.main,children:[L.jsx(Ft.Header,{}),L.jsxs("div",{className:yn.content,children:[L.jsx(Ft.Sidebar,{}),L.jsx(Ft.Preview,{})]})]})]}),a&&s&&L.jsx(je.BuilderModal,{close:()=>{i(null),l(null),c(null)},children:L.jsx(je.ConfirmationModal,{})}),e&&L.jsx(je.BuilderModal,{close:t,children:L.jsx(Ft.ModifyPage,{})}),n&&L.jsx(je.BuilderModal,{close:r,children:L.jsx(je.ChooseImageModal,{})}),o.length>0&&L.jsx("div",{className:yn.notifications,children:o.map(u=>L.jsx(zd,{type:u.status,message:u.message,timer:u.timer||10,id:u.id,element:u.component},u.id))})]})};async function Lt(e,t){const n=localStorage.getItem("shopId")||void 0,o=`${nn.getState().apiUrls.api}/${e}/builder/shops/${n}/${t}`;return(await at({url:o,withToken:!0,method:"get"})).data}async function qd(){try{const[e,t,n,r,o,a,s,i,l]=await Promise.allSettled([Lt("v1","general"),Lt("v1","faqs"),Lt("v1","listings"),Lt("v1","products"),Lt("v1","reviews"),Lt("v1","categories"),{data:null},{data:null},{data:null}]);return{general:e,faqs:t,listings:n,products:r,reviews:o,categories:a,fullPosts:s,posts:i,vouches:l}}catch(e){throw console.error("Error fetching page data:",e),e}}async function Wd(){const e=nn.getState().apiUrls;try{const{data:t}=await ce.get(`${e.googleFonts}?key=AIzaSyAEsTbjAPUz_TeuFCq4z4LPK9w_vst0Pfw`);return t.items}catch(t){throw console.error("Error fetching page data:",t),t}}async function Zd(){var o;const e=localStorage.getItem("shopId"),t=localStorage.getItem("draftId"),r=`${nn.getState().apiUrls.api}/v2/builder/shops/${e}/drafts/${t}/pages`;try{return(await at({url:r,withToken:!0,method:"get"})).data}catch(a){return{data:[],status:(o=a.response)==null?void 0:o.status}}}async function Gd(){const e=localStorage.getItem("shopId")||void 0,t=localStorage.getItem("draftId")||void 0,r=`${nn.getState().apiUrls.api}/v2/builder/shops/${e}/drafts/${t}/all`;return(await at({url:r,withToken:!0,method:"get"})).data}const Kd=e=>{const{blocks:t,settings:n,header:r,footer:o,announcement:a}=e,{setBlocks:s,setSourceBlocks:i,setHeader:l,setFooter:c,setAnnouncement:u,setSettings:d}=xa(),{fonts:h,setFonts:y}=Oa(),{setSettings:m}=wr(),{setPageContext:p}=Yt(),{setThemeSettings:v,setIsLoadingThemeSettings:R}=On(),{setIsLoadingSettings:b}=wr(),{notifications:k,setNotifications:P}=Fe(),{setBlocks:T,blocks:H,createPage:w,setIsLoadingLayers:_,setHeader:G,setAnnouncement:B,setFooter:ae}=Mn(),{setPages:ee,setCurrentPage:te}=Yt();return we.useEffect(()=>{R(!0),_(!0),b(!0);const he={};Object.keys(t).forEach(Te=>{he[Te]=t[Te]}),i(he),s(he),l(r),c(o),u(a),d(n),(async()=>{const Te={listings:null,products:null,reviews:null,categories:null,faqs:null,general:null,fullPosts:null,posts:null,preserveContent:!1,vouches:null},Ze=await qd();Object.keys(Ze).map(se=>{const pe=se;Te[pe]=Ze[pe].value.data}),p(Te);const{data:ue}=await Gd(),{themeSettings:Re,layers:Ce,settings:Se}=ue||{};if(Se){if(Se.settings){const se=new n;se.blockSettings={displayName:"Settings",isAddable:!1,...Se.settings},m(se.blockSettings)}Se.header&&G(Se.header),Se.footer&&ae(Se.footer),Se.announcement&&B(Se.announcement)}else{const se=new n;m(se.blockSettings)}Re&&v(Re);const Pe=await Zd(),Ue={};if(Pe.status>=400&&P([...k,{id:ot(),message:"Error fetching pages",status:"error"}]),Pe.data.length>0?(Pe.data.forEach(se=>{var pe,Me;H[se.path]||w(se.path),Ue[se.id||se.path]={...se,icon:$t[se.path]?$t[se.path].icon:"File",name:se.name||((pe=se.seo)==null?void 0:pe.pageTitle)||((Me=$t[se.path])==null?void 0:Me.name)||se.path}}),ee(Ue),te(Object.keys(Ue)[0])):(ee($t),te(Object.keys($t)[0])),h.length===0){const se=await Wd();y([...se.map(pe=>{const Me=pe.variants.map(Ee=>{if(!Ee.includes("italic"))return Ee==="regular"?"400":Ee}).filter(Ee=>Ee!==void 0);return{name:pe.family,weights:Me}})])}T(Ce),R(!1),_(!1),b(!1)})()},[]),L.jsx(Jd,{})};function Yd(){const e=new URL(window.location.href);window.history.replaceState(null,"",e.pathname+e.hash)}function Xd(){const e=new URLSearchParams(document.location.search),t=e.get("shopId")||localStorage.getItem("shopId"),n=e.get("sellerAccessToken")||localStorage.getItem("sellerAccessToken"),r=e.get("draftId")||localStorage.getItem("draftId");return Yd(),n&&localStorage.setItem("sellerAccessToken",n),t&&localStorage.setItem("shopId",t),r&&localStorage.setItem("draftId",r),!!(n&&t&&r)}const Qd="data:image/svg+xml,%3csvg%20width='204'%20height='241'%20viewBox='0%200%20204%20241'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M204%200V118.282L154.174%20134.707V69.0074L49.7111%20102.77V43.5716L204%200Z'%20fill='%23FF3F19'/%3e%3cpath%20d='M154.174%20134.694V191.155L0%20241V117.471L49.7114%20102.757V169.597L154.174%20134.694Z'%20fill='%23FF3F19'/%3e%3c/svg%3e",e0="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2019%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.0103662%2023.5362C0.0538052%2022.4425%200.370173%2021.4309%201.08058%2020.6127C1.92699%2019.6379%202.91375%2019.2329%204.14841%2019.1732C4.162%2020.1401%204.15111%2021.1085%204.15091%2022.0756L4.70583%2022.0747L7.42027%2022.0755C7.95952%2022.0752%208.50027%2022.0844%209.03933%2022.0742L9.17755%2022.0731L10.6132%2022.0759C10.8265%2022.0759%2011.0767%2022.1021%2011.2852%2022.0658C11.3052%2022.0703%2011.3534%2022.0735%2011.3625%2022.0928C11.3917%2022.1543%2011.3688%2031.0517%2011.3725%2031.9631C11.1563%2032.0856%2010.2676%2031.8701%2010.0303%2031.7947C9.89866%2031.7528%209.644%2031.6914%209.54946%2031.5874L9.51914%2031.584C9.46943%2031.5736%209.44171%2031.5537%209.40126%2031.5222C9.30218%2031.5131%209.14954%2031.4132%209.07718%2031.343C9.00129%2031.3163%208.92757%2031.2576%208.85921%2031.2134L8.85617%2031.2002C8.5748%2031.0715%208.14929%2030.6244%207.94318%2030.376C7.35205%2029.6639%206.93892%2028.7659%206.83493%2027.8203C6.78763%2027.3904%206.7994%2026.9595%206.80055%2026.5277C6.80084%2026.4202%206.82996%2026.126%206.78242%2026.0387L6.71237%2026.023C6.54382%2026.0528%206.34316%2026.0328%206.17124%2026.0324L1.0194%2026.0325L0.942306%2026.0307C0.74237%2026.0326%200.173082%2026.0689%200.0224192%2026.0192L0.00848581%2026.0029C0.022853%2025.8597%200.0136924%2025.7065%200.013837%2025.562L0.0113299%2024.6651L0.0117161%2024.5253C0.0150266%2024.1956%200.0145767%2023.8659%200.0103662%2023.5362Z'%20fill='currentColor'/%3e%3cpath%20d='M6.79824%200.00127802C6.88001%20-0.000781892%206.96176%20-0.000351703%207.04349%200.00256876C7.12523%200.00549261%207.20682%200.0108998%207.28827%200.0187905C7.36968%200.0266845%207.45082%200.0370518%207.53169%200.0498924C7.61259%200.0627296%207.69305%200.078018%207.77309%200.0957576C7.85312%200.113501%207.93259%200.133663%208.0115%200.156244C8.09044%200.178828%208.16868%200.203796%208.24624%200.231148C8.3238%200.258499%208.40053%200.28819%208.47645%200.32022C8.55237%200.352247%208.62736%200.386559%208.70141%200.423156L8.71428%200.423492C8.76476%200.450874%208.815%200.479135%208.8661%200.50516C8.947%200.550491%209.03065%200.593185%209.10687%200.646856L9.24939%200.733144C9.31674%200.78126%209.38361%200.83049%209.45202%200.87695C10.462%201.67615%2011.1434%202.77146%2011.325%204.10211C11.4076%204.70784%2011.3729%205.34243%2011.372%205.9541C11.4625%205.96599%2011.5526%205.9664%2011.6436%205.96762C12.6033%205.93794%2013.5708%205.96289%2014.5314%205.96294C15.459%205.96305%2016.3927%205.93758%2017.3195%205.9633C17.5874%205.96523%2017.9062%206.00101%2018.1677%205.95273C18.1496%206.13096%2018.1583%206.31472%2018.1585%206.49401L18.1598%207.38388L18.1595%207.51855C18.1591%207.83084%2018.14%208.15609%2018.1607%208.46685C18.109%209.73893%2017.6972%2010.8198%2016.8003%2011.6891C15.9969%2012.4676%2015.0894%2012.76%2014.0228%2012.8194L14.021%2010.9083C14.0209%2010.5892%2014.0389%2010.2573%2014.0163%209.93952C14.0002%209.92849%2013.9879%209.91884%2013.9692%209.9133C13.7941%209.93418%2013.6055%209.92148%2013.4293%209.92133H9.15258L9.04077%209.92082L7.56664%209.92209C7.31676%209.92224%207.04528%209.94526%206.79858%209.90893L6.79824%200.00127802Z'%20fill='currentColor'/%3e%3cpath%20d='M4.13987%205.96279C4.65941%205.9653%205.17894%205.96467%205.69847%205.96091C5.70059%207.27995%205.71757%208.60219%205.69833%209.92082L4.15072%209.92046L4.15106%2011.4065C4.15096%2011.6783%204.1406%2011.9555%204.15443%2012.2266C4.73799%2012.8393%205.31307%2013.4655%205.90921%2014.0644L5.98321%2014.0407C6.25311%2014.0833%206.6928%2014.0501%206.97981%2014.0499L12.7386%2014.0492L13.5943%2014.0482C13.7363%2014.0479%2013.9068%2014.0286%2014.0457%2014.0577L15.8019%2015.9078L15.8915%2015.997L15.9615%2016.0784L15.9955%2016.1093L17.4221%2017.6163C17.6528%2017.8599%2017.9077%2018.0979%2018.1211%2018.3569C18.1463%2018.3875%2018.1599%2018.4086%2018.1691%2018.4477C18.1415%2018.6757%2018.1577%2018.9211%2018.1579%2019.1514L18.1594%2020.4531C18.1597%2021.8112%2018.142%2023.1721%2018.1599%2024.5297L18.1589%2024.6625L18.158%2025.5556C18.158%2025.7089%2018.1437%2025.8808%2018.1676%2026.0315L18.0995%2026.031L17.2568%2026.0329L17.2101%2026.0308C16.2512%2026.0486%2015.2892%2026.0305%2014.3299%2026.0308C13.7488%2026.031%2013.0694%2026.064%2012.4959%2026.0258L12.4831%2026.0202C12.4481%2025.9239%2012.4717%2022.4806%2012.47%2022.075L14.0216%2022.0744C14.0024%2021.3241%2014.0324%2020.5711%2014.0173%2019.8203C13.4629%2019.2116%2012.887%2018.6041%2012.3052%2018.0244L12.293%2017.9978C12.0554%2018.0392%2011.5401%2018.0054%2011.2777%2018.0053L8.9362%2018.0074C7.75375%2017.9793%206.56306%2018.0065%205.37994%2018.0069C5.13497%2018.007%204.32737%2018.0401%204.13472%2017.9962L2.36331%2016.1262L2.29219%2016.0566L2.21959%2015.9758L2.15074%2015.9102C1.93803%2015.6694%201.70849%2015.441%201.48797%2015.2079L0%2013.631C0.0383768%2013.4512%200.014078%2013.2231%200.013837%2013.0369L0.0121494%2011.9198L0.0113299%207.52017L0.0122943%207.34622C0.0134032%206.9143%200.0453199%206.37479%200.00371286%205.95329C0.115854%205.96772%200.229056%205.9664%200.341872%205.96777C0.589393%205.96198%200.836946%205.96042%201.08453%205.9631L3.10905%205.96548C3.44789%205.96554%203.80282%205.98825%204.13987%205.96279Z'%20fill='currentColor'/%3e%3c/svg%3e",t0=e=>{const{blocks:t,settings:n,header:r,footer:o,announcement:a}=e,{isAntistock:s}=Ra(),[i,l]=we.useState(!0),c=Xt(),u=qe();return we.useEffect(()=>{const d=u.pathname;if(d.startsWith("/admin/builder")){d==="/admin/builder/add"?document.title="Add Section | Builder":d==="/admin/builder/theme"?document.title="Theme Settings | Builder":d==="/admin/builder/settings"?document.title="Settings | Builder":document.title=`Builder | ${s?"Antistock":"Billgang "}`;let h=document.querySelector("link[rel~='icon']");h||(h=document.createElement("link"),h.rel="icon",document.head.appendChild(h)),h&&(h.href=s?e0:Qd)}},[u]),we.useEffect(()=>{l(!0),Xd()?l(!1):c("/")},[]),L.jsx(L.Fragment,{children:i?L.jsx(je.LoaderBuilder,{}):L.jsx(Kd,{blocks:t,settings:n,header:r,footer:o,announcement:a})})},n0=Object.freeze(Object.defineProperty({__proto__:null,BuilderPage:t0},Symbol.toStringTag,{value:"Module"}));exports.AddSectionSubmodal=Zu;exports.AnimatedPanel=Td;exports.AntistockRoutes=Yo;exports.ColorPicker=Da;exports.ColorPickerModal=Rd;exports.IS_LOCAL_HOST=cu;exports.Loader=Cu;exports.NavLink=Go;exports.Navigate=si;exports.Outlet=ii;exports.Picker=Md;exports.RadiusVariables=uu;exports.RouterProvider=Pi;exports.Routes=Pr;exports.Submodal=Wu;exports.ThicknessVariables=du;exports.Tooltip=Ru;exports.aspectRatio=fu;exports.aspectRatioOptions=hu;exports.axios=ce;exports.blockIcons=zu;exports.clx=Be;exports.commonjsGlobal=vu;exports.convertCfImageIdToUrl=Fc;exports.createBrowserRouter=Ei;exports.defaultPagePaths=lu;exports.devices=au;exports.extractDateAndTime=Uc;exports.formatLabel=ku;exports.formatPrice=Ic;exports.formatTimestamp=Hc;exports.getDefaultExportFromCjs=Pa;exports.getDisplayName=Lu;exports.getModalPosition=Aa;exports.index=n0;exports.jwtDecode=Xo;exports.navbarBlocks=La;exports.normalizeInterval=jc;exports.percentageDifference=Bc;exports.referralSteps=Ji;exports.request=at;exports.sizeOptions=iu;exports.themeSettingsBlocks=su;exports.typeFontOptions=pu;exports.useApiStore=nn;exports.useBlocksStore=xa;exports.useCartStore=Wc;exports.useChooseImageStore=Na;exports.useColorPickerStore=Dr;exports.useConfirmationModalStore=Ta;exports.useCustomerDashboardStore=Gi;exports.useDeviceStore=wu;exports.useDiscordStore=Gc;exports.useErrorStore=gu;exports.useFontsStore=Oa;exports.useGeneralStore=Ra;exports.useGetTsId=Ea;exports.useHistoryStore=_e;exports.useLayersStore=Mn;exports.useLocation=qe;exports.useModalStore=Yc;exports.useNavbarStore=mu;exports.useNavigate=Xt;exports.useNotificationStore=Fe;exports.usePagesStore=Yt;exports.usePaginationPagesStore=Zc;exports.useParams=qs;exports.usePreviewStore=ka;exports.useRouteError=Jo;exports.useSearchParams=Bi;exports.useSettingsStore=wr;exports.useShareLinkStore=ou;exports.useStorefrontStore=Ki;exports.useSubmodalStore=Ar;exports.useSubscriptionStore=Kc;exports.useThemeSettingsStore=On;exports.useTooltipStore=Ma;exports.useTrackingAnalytics=Jc;exports.v4=ot;