@qratilabs/qrati-connect 2.6.0 → 2.7.0

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 (72) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/element/B8jogRzT.js +4 -0
  3. package/element/{wHbQZdly.js → BiQECCnr.js} +1 -1
  4. package/element/{B4-Qw59P.js → BjbDXTeP.js} +3 -3
  5. package/element/{DPOkh0eJ.js → COUnPxHl.js} +1 -1
  6. package/element/{DODG2TX4.js → CkfXzc1_.js} +1 -1
  7. package/element/{B28y50Bi.js → DGeYAYfl.js} +1 -1
  8. package/element/{CUOOhGTj.js → DXPR6JWg.js} +1 -1
  9. package/element/{D4xTzxjA.js → DqOnDVHH.js} +1 -1
  10. package/element/ThtSVXLE.js +32 -0
  11. package/element/{CH2f_afH.js → gajcOMzQ.js} +1 -1
  12. package/element/{Cf1QDu0i.js → ojjN3KY4.js} +1 -1
  13. package/element/web.es.js +192 -183
  14. package/element/xqhGemdL.js +16 -0
  15. package/package.json +1 -1
  16. package/react/{C4TTO8j2.js → B0pbGxj0.js} +1 -1
  17. package/react/B57jvRJw.js +1 -0
  18. package/react/{B8FlrdhF.js → B74JcfT2.js} +1 -1
  19. package/react/{Cs3wia2w.js → BBaYBpSS.js} +1 -1
  20. package/react/{pIx9IeV5.js → BUm8-ZtV.js} +1 -1
  21. package/react/Bran9aUe.js +32 -0
  22. package/react/{BaT1o9UO.js → CDAGXOJa.js} +1 -1
  23. package/react/{aragUG-J.js → CMUYyO6F.js} +1 -1
  24. package/react/CPs8NoX7.js +1 -0
  25. package/react/{DOw70z3P.js → CdZcv5CJ.js} +1 -1
  26. package/react/Ce4GGag_.js +1 -0
  27. package/react/CnRdB6_J.js +16 -0
  28. package/react/{e8YBtYhk.js → CzNVO0Zz.js} +1 -1
  29. package/react/{D7c4q3kj.js → D6h9tRAZ.js} +1 -1
  30. package/react/{DLf4fPpy.js → DCjmEjZr.js} +1 -1
  31. package/react/{BXiO9Rt2.js → DJ-3Sziz.js} +1 -1
  32. package/react/{DB3DJWUI.js → DKvJBrWM.js} +3 -3
  33. package/react/DSAOtDOg.js +4 -0
  34. package/react/{DEIcfk-y.js → DaQR1Bft.js} +1 -1
  35. package/react/{CT_Cvh8-.js → Dbq_PyC6.js} +1 -1
  36. package/react/{sxfIEK17.js → DdmNkEML.js} +1 -1
  37. package/react/{CNAEfadS.js → buiUjKpV.js} +1 -1
  38. package/react/{Czrz88CD.js → dLaHt9rf.js} +1 -1
  39. package/react/index.cjs +1 -1
  40. package/react/index.mjs +419 -410
  41. package/react/{Dljj3ToS.js → zrUJi_8F.js} +1 -1
  42. package/umd/web.umd.js +1 -1
  43. package/element/BKzoEuEi.js +0 -4
  44. package/element/B_TauT26.js +0 -1
  45. package/element/CudAoK3L.js +0 -32
  46. package/element/DHTkVJH6.js +0 -1
  47. package/element/Dc7DVn3n.js +0 -16
  48. package/react/BD2gDjZu.js +0 -1
  49. package/react/BUcttdEL.js +0 -1
  50. package/react/BXe4I1MJ.js +0 -32
  51. package/react/B_TauT26.js +0 -1
  52. package/react/BhU5cdLs.js +0 -1
  53. package/react/C1A9nC-v.js +0 -16
  54. package/react/DDbNaN3e.js +0 -4
  55. package/react/DHTkVJH6.js +0 -1
  56. package/react/DV6DJ1Br.js +0 -1
  57. package/react/QPXxc9eb.js +0 -1
  58. /package/element/{DMDEuqn7.js → BppxGns9.js} +0 -0
  59. /package/element/{Ccwm5LwS.js → C2ydm0ZD.js} +0 -0
  60. /package/element/{DSjmSa7l.js → CjmNvKgB.js} +0 -0
  61. /package/element/{ZShDCNL_.js → CziefUVo.js} +0 -0
  62. /package/element/{DD-DUfz5.js → DUlbZyIi.js} +0 -0
  63. /package/react/{CCCbXwws.js → BT55gXKs.js} +0 -0
  64. /package/react/{CEEUMvOM.js → Bxitmzur.js} +0 -0
  65. /package/react/{Bqe_56Ho.js → CO70kETi.js} +0 -0
  66. /package/react/{CssqM9iA.js → CR2MwRBM.js} +0 -0
  67. /package/react/{DV8H8PH6.js → CtCRzhKd.js} +0 -0
  68. /package/react/{BxS4S1Bm.js → CvLw8owR.js} +0 -0
  69. /package/react/{bYucjLbl.js → D5puLxf7.js} +0 -0
  70. /package/react/{BqRDSbh4.js → DtvJNH06.js} +0 -0
  71. /package/react/{DvZVbBR7.js → LDusNFdQ.js} +0 -0
  72. /package/react/{DYyT8DeU.js → zyOknCLQ.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{At as e,Dt as t,Et as n,Ft as r,I as a,It as o,K as i,L as l,Mt as s,N as u,R as c,Rt as h,Tt as p,W as d,jt as m,t as f,wt as g,z as v,zt as y}from"./wHbQZdly.js";var b="popstate";function w(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function R(e,t){if(!1===e||null==e)throw new Error(t)}function E(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function S(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function x(e,t,n=null,r,a){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?k(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),unstable_mask:a}}function $({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function k(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function T(e,t,n="/"){return function(e,t,n){let r=I(("string"==typeof t?k(t):t).pathname||"/",n);if(null==r)return null;let a=P(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(a);let o=null;for(let i=0;null==o&&i<a.length;++i){let e=F(r);o=U(a[i],e,false)}return o}(e,t,n)}function P(e,t=[],n=[],r="",a=!1){let o=(e,o,i=a,l)=>{let s={relativePath:void 0===l?e.path||"":l,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(r)&&i)return;R(s.relativePath.startsWith(r),`Absolute route path "${s.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(r.length)}let u=K([r,s.relativePath]),c=n.concat(s);e.children&&e.children.length>0&&(R(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),P(e.children,t,c,u,i)),(null!=e.path||e.index)&&t.push({path:u,score:D(u,e.index),routesMeta:c})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of L(e.path))o(e,t,!0,n);else o(e,t)}),t}function L(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return a?[o,""]:[o];let i=L(r.join("/")),l=[];return l.push(...i.map(e=>""===e?o:[o,e].join("/"))),a&&l.push(...i),l.map(t=>e.startsWith("/")&&""===t?"/":t)}var O=/^:[\w-]+$/,C=3,_=2,N=1,M=10,j=-2,A=e=>"*"===e;function D(e,t){let n=e.split("/"),r=n.length;return n.some(A)&&(r+=j),t&&(r+=_),n.filter(e=>!A(e)).reduce((e,t)=>e+(O.test(t)?C:""===t?N:M),r)}function U(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",i=[];for(let l=0;l<r.length;++l){let e=r[l],s=l===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=W({path:e.relativePath,caseSensitive:e.caseSensitive,end:s},u),h=e.route;if(!c&&s&&n&&!r[r.length-1].route.index&&(c=W({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:K([o,c.pathname]),pathnameBase:V(K([o,c.pathnameBase])),route:h}),"/"!==c.pathnameBase&&(o=K([o,c.pathnameBase]))}return i}function W(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t=!1,n=!0){E("*"===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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,a,o)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=o.charAt(a+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=l[r]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const a=l[r];return e[t]=n&&!a?void 0:(a||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function F(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return E(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function I(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)||"/"}var B=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function z(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function H(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 J(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Y(e,t,n,r=!1){let a;"string"==typeof e?a=k(e):(a={...e},R(!a.pathname||!a.pathname.includes("?"),H("?","pathname","search",a)),R(!a.pathname||!a.pathname.includes("#"),H("#","pathname","hash",a)),R(!a.search||!a.search.includes("#"),H("#","search","hash",a)));let o,i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e,t="/"){let n,{pathname:r,search:a="",hash:o=""}="string"==typeof e?k(e):e;return r?(r=r.replace(/\/\/+/g,"/"),n=r.startsWith("/")?z(r.substring(1),"/"):z(r,t)):n=t,{pathname:n,search:X(a),hash:q(o)}}(a,o),u=l&&"/"!==l&&l.endsWith("/"),c=(i||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!u&&!c||(s.pathname+="/"),s}var K=e=>e.join("/").replace(/\/\/+/g,"/"),V=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),X=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",q=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",G=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Q(e){return e.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Z="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ee(e,t){let n=e;if("string"!=typeof n||!B.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(Z)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),o=I(r.pathname,t);r.origin===e.origin&&null!=o?n=o+r.search+r.hash:a=!0}catch(o){E(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var te=["POST","PUT","PATCH","DELETE"],ne=(new Set(te),["GET",...te]),re=(new Set(ne),r(null));re.displayName="DataRouter";var ae=r(null);ae.displayName="DataRouterState";var oe=r(!1),ie=r({isTransitioning:!1});ie.displayName="ViewTransition",r(/* @__PURE__ */new Map).displayName="Fetchers",r(null).displayName="Await";var le=r(null);le.displayName="Navigation";var se=r(null);se.displayName="Location";var ue=r({outlet:null,matches:[],isDataRoute:!1});ue.displayName="Route";var ce=r(null);ce.displayName="RouteError";var he="REACT_ROUTER_ERROR";function pe(){return null!=m(se)}function de(){return R(pe(),"useLocation() may be used only in the context of a <Router> component."),m(se).location}var me="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fe(e){m(le).static||n(e)}function ge(){let{isDataRoute:t}=m(ue);return t?function(){let{router:t}=function(){let e=m(re);return R(e,Te("useNavigate")),e}(),n=Pe("useNavigate"),r=g(!1);return fe(()=>{r.current=!0}),e(async(e,a={})=>{E(r.current,me),r.current&&("number"==typeof e?await t.navigate(e):await t.navigate(e,{fromRouteId:n,...a}))},[t,n])}():function(){R(pe(),"useNavigate() may be used only in the context of a <Router> component.");let t=m(re),{basename:n,navigator:r}=m(le),{matches:a}=m(ue),{pathname:o}=de(),i=JSON.stringify(J(a)),l=g(!1);return fe(()=>{l.current=!0}),e((e,a={})=>{if(E(l.current,me),!l.current)return;if("number"==typeof e)return void r.go(e);let s=Y(e,JSON.parse(i),o,"path"===a.relative);null==t&&"/"!==n&&(s.pathname="/"===s.pathname?n:K([n,s.pathname])),(a.replace?r.replace:r.push)(s,a.state,a)},[n,r,i,o,t])}()}var ve=r(null);function ye(){let{matches:e}=m(ue),t=e[e.length-1];return t?t.params:{}}function be(e,{relative:t}={}){let{matches:n}=m(ue),{pathname:r}=de(),a=JSON.stringify(J(n));return p(()=>Y(e,JSON.parse(a),r,"path"===t),[e,a,r,t])}function we(e,t,n){R(pe(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=m(le),{matches:a}=m(ue),i=a[a.length-1],l=i?i.params:{},s=i?i.pathname:"/",u=i?i.pathnameBase:"/",c=i&&i.route;{let e=c&&c.path||"";Oe(s,!c||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) 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.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let h,p=de();if(t){let e="string"==typeof t?k(t):t;R("/"===u||e.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),h=e}else h=p;let d=h.pathname||"/",f=d;if("/"!==u){let e=u.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=T(e,{pathname:f});E(c||null!=g,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),E(null==g||void 0!==g[g.length-1].route.element||void 0!==g[g.length-1].route.Component||void 0!==g[g.length-1].route.lazy,`Matched leaf route at location "${h.pathname}${h.search}${h.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.`);let v=function(e,t=[],n){let r=n?.state;if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let a=e,i=r?.errors;if(null!=i){let e=a.findIndex(e=>e.route.id&&void 0!==i?.[e.route.id]);R(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let l=!1,s=-1;if(n&&r){l=r.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:o}=r,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||i){n.isStatic&&(l=!0),a=s>=0?a.slice(0,s+1):[a[0]];break}}}}let u=n?.onError,c=r&&u?(e,t)=>{u(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Q(r.matches),errorInfo:t})}:void 0;return a.reduceRight((e,n,u)=>{let h,p=!1,d=null,m=null;r&&(h=i&&n.route.id?i[n.route.id]:void 0,d=n.route.errorElement||Ee,l&&(s<0&&0===u?(Oe("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):s===u&&(p=!0,m=n.route.hydrateFallbackElement||null)));let f=t.concat(a.slice(0,u+1)),g=()=>{let t;return t=h?d:p?m:n.route.Component?/* @__PURE__ */o(n.route.Component,null):n.route.element?n.route.element:e,/* @__PURE__ */o(ke,{match:n,routeContext:{outlet:e,matches:f,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===u)?/* @__PURE__ */o(Se,{location:r.location,revalidation:r.revalidation,component:d,error:h,children:g(),routeContext:{outlet:null,matches:f,isDataRoute:!0},onError:c}):g()},null)}(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:K([u,r.encodeLocation?r.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:K([u,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),a,n);return t&&v?/* @__PURE__ */o(se.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...h},navigationType:"POP"}},v):v}function Re(){let e=function(){let e=m(ce),t=function(e){let t=m(ae);return R(t,Te(e)),t}("useRouteError"),n=Pe("useRouteError");return void 0!==e?e:t.errors?.[n]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(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)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=/* @__PURE__ */o(h,null,/* @__PURE__ */o("p",null,"💿 Hey developer 👋"),/* @__PURE__ */o("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",/* @__PURE__ */o("code",{style:i},"ErrorBoundary")," or"," ",/* @__PURE__ */o("code",{style:i},"errorElement")," prop on your route.")),/* @__PURE__ */o(h,null,/* @__PURE__ */o("h2",null,"Unexpected Application Error!"),/* @__PURE__ */o("h3",{style:{fontStyle:"italic"}},t),n?/* @__PURE__ */o("pre",{style:a},n):null,l)}var Ee=/* @__PURE__ */o(Re,null),Se=class extends y{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${he}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new G(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?/* @__PURE__ */o(ue.Provider,{value:this.props.routeContext},/* @__PURE__ */o(ce.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?/* @__PURE__ */o($e,{error:e},t):t}};Se.contextType=oe;var xe=/* @__PURE__ */new WeakMap;function $e({children:e,error:t}){let{basename:n}=m(le);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${he}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let r=xe.get(t);if(r)throw r;let a=ee(e.location,n);if(Z&&!xe.get(t)){if(!a.isExternal&&!e.reloadDocument){const n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw xe.set(t,n),n}window.location.href=a.absoluteURL||a.to}/* @__PURE__ */
1
+ import{At as e,Dt as t,Et as n,Ft as r,I as a,It as o,K as i,L as l,Mt as s,N as u,R as c,Rt as h,Tt as p,W as d,jt as m,t as f,wt as g,z as v,zt as y}from"./BiQECCnr.js";var b="popstate";function w(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function R(e,t){if(!1===e||null==e)throw new Error(t)}function E(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function S(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function x(e,t,n=null,r,a){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?k(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),unstable_mask:a}}function $({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function k(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function T(e,t,n="/"){return function(e,t,n){let r=I(("string"==typeof t?k(t):t).pathname||"/",n);if(null==r)return null;let a=P(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(a);let o=null;for(let i=0;null==o&&i<a.length;++i){let e=F(r);o=U(a[i],e,false)}return o}(e,t,n)}function P(e,t=[],n=[],r="",a=!1){let o=(e,o,i=a,l)=>{let s={relativePath:void 0===l?e.path||"":l,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(r)&&i)return;R(s.relativePath.startsWith(r),`Absolute route path "${s.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(r.length)}let u=K([r,s.relativePath]),c=n.concat(s);e.children&&e.children.length>0&&(R(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),P(e.children,t,c,u,i)),(null!=e.path||e.index)&&t.push({path:u,score:D(u,e.index),routesMeta:c})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of L(e.path))o(e,t,!0,n);else o(e,t)}),t}function L(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return a?[o,""]:[o];let i=L(r.join("/")),l=[];return l.push(...i.map(e=>""===e?o:[o,e].join("/"))),a&&l.push(...i),l.map(t=>e.startsWith("/")&&""===t?"/":t)}var O=/^:[\w-]+$/,C=3,_=2,N=1,M=10,j=-2,A=e=>"*"===e;function D(e,t){let n=e.split("/"),r=n.length;return n.some(A)&&(r+=j),t&&(r+=_),n.filter(e=>!A(e)).reduce((e,t)=>e+(O.test(t)?C:""===t?N:M),r)}function U(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",i=[];for(let l=0;l<r.length;++l){let e=r[l],s=l===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=W({path:e.relativePath,caseSensitive:e.caseSensitive,end:s},u),h=e.route;if(!c&&s&&n&&!r[r.length-1].route.index&&(c=W({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:K([o,c.pathname]),pathnameBase:V(K([o,c.pathnameBase])),route:h}),"/"!==c.pathnameBase&&(o=K([o,c.pathnameBase]))}return i}function W(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t=!1,n=!0){E("*"===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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,a,o)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=o.charAt(a+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=l[r]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const a=l[r];return e[t]=n&&!a?void 0:(a||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function F(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return E(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function I(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)||"/"}var B=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function z(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function H(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 J(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Y(e,t,n,r=!1){let a;"string"==typeof e?a=k(e):(a={...e},R(!a.pathname||!a.pathname.includes("?"),H("?","pathname","search",a)),R(!a.pathname||!a.pathname.includes("#"),H("#","pathname","hash",a)),R(!a.search||!a.search.includes("#"),H("#","search","hash",a)));let o,i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e,t="/"){let n,{pathname:r,search:a="",hash:o=""}="string"==typeof e?k(e):e;return r?(r=r.replace(/\/\/+/g,"/"),n=r.startsWith("/")?z(r.substring(1),"/"):z(r,t)):n=t,{pathname:n,search:X(a),hash:q(o)}}(a,o),u=l&&"/"!==l&&l.endsWith("/"),c=(i||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!u&&!c||(s.pathname+="/"),s}var K=e=>e.join("/").replace(/\/\/+/g,"/"),V=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),X=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",q=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",G=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Q(e){return e.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Z="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ee(e,t){let n=e;if("string"!=typeof n||!B.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(Z)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),o=I(r.pathname,t);r.origin===e.origin&&null!=o?n=o+r.search+r.hash:a=!0}catch(o){E(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var te=["POST","PUT","PATCH","DELETE"],ne=(new Set(te),["GET",...te]),re=(new Set(ne),r(null));re.displayName="DataRouter";var ae=r(null);ae.displayName="DataRouterState";var oe=r(!1),ie=r({isTransitioning:!1});ie.displayName="ViewTransition",r(/* @__PURE__ */new Map).displayName="Fetchers",r(null).displayName="Await";var le=r(null);le.displayName="Navigation";var se=r(null);se.displayName="Location";var ue=r({outlet:null,matches:[],isDataRoute:!1});ue.displayName="Route";var ce=r(null);ce.displayName="RouteError";var he="REACT_ROUTER_ERROR";function pe(){return null!=m(se)}function de(){return R(pe(),"useLocation() may be used only in the context of a <Router> component."),m(se).location}var me="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fe(e){m(le).static||n(e)}function ge(){let{isDataRoute:t}=m(ue);return t?function(){let{router:t}=function(){let e=m(re);return R(e,Te("useNavigate")),e}(),n=Pe("useNavigate"),r=g(!1);return fe(()=>{r.current=!0}),e(async(e,a={})=>{E(r.current,me),r.current&&("number"==typeof e?await t.navigate(e):await t.navigate(e,{fromRouteId:n,...a}))},[t,n])}():function(){R(pe(),"useNavigate() may be used only in the context of a <Router> component.");let t=m(re),{basename:n,navigator:r}=m(le),{matches:a}=m(ue),{pathname:o}=de(),i=JSON.stringify(J(a)),l=g(!1);return fe(()=>{l.current=!0}),e((e,a={})=>{if(E(l.current,me),!l.current)return;if("number"==typeof e)return void r.go(e);let s=Y(e,JSON.parse(i),o,"path"===a.relative);null==t&&"/"!==n&&(s.pathname="/"===s.pathname?n:K([n,s.pathname])),(a.replace?r.replace:r.push)(s,a.state,a)},[n,r,i,o,t])}()}var ve=r(null);function ye(){let{matches:e}=m(ue),t=e[e.length-1];return t?t.params:{}}function be(e,{relative:t}={}){let{matches:n}=m(ue),{pathname:r}=de(),a=JSON.stringify(J(n));return p(()=>Y(e,JSON.parse(a),r,"path"===t),[e,a,r,t])}function we(e,t,n){R(pe(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=m(le),{matches:a}=m(ue),i=a[a.length-1],l=i?i.params:{},s=i?i.pathname:"/",u=i?i.pathnameBase:"/",c=i&&i.route;{let e=c&&c.path||"";Oe(s,!c||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) 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.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let h,p=de();if(t){let e="string"==typeof t?k(t):t;R("/"===u||e.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),h=e}else h=p;let d=h.pathname||"/",f=d;if("/"!==u){let e=u.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=T(e,{pathname:f});E(c||null!=g,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),E(null==g||void 0!==g[g.length-1].route.element||void 0!==g[g.length-1].route.Component||void 0!==g[g.length-1].route.lazy,`Matched leaf route at location "${h.pathname}${h.search}${h.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.`);let v=function(e,t=[],n){let r=n?.state;if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let a=e,i=r?.errors;if(null!=i){let e=a.findIndex(e=>e.route.id&&void 0!==i?.[e.route.id]);R(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let l=!1,s=-1;if(n&&r){l=r.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:o}=r,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||i){n.isStatic&&(l=!0),a=s>=0?a.slice(0,s+1):[a[0]];break}}}}let u=n?.onError,c=r&&u?(e,t)=>{u(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Q(r.matches),errorInfo:t})}:void 0;return a.reduceRight((e,n,u)=>{let h,p=!1,d=null,m=null;r&&(h=i&&n.route.id?i[n.route.id]:void 0,d=n.route.errorElement||Ee,l&&(s<0&&0===u?(Oe("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):s===u&&(p=!0,m=n.route.hydrateFallbackElement||null)));let f=t.concat(a.slice(0,u+1)),g=()=>{let t;return t=h?d:p?m:n.route.Component?/* @__PURE__ */o(n.route.Component,null):n.route.element?n.route.element:e,/* @__PURE__ */o(ke,{match:n,routeContext:{outlet:e,matches:f,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===u)?/* @__PURE__ */o(Se,{location:r.location,revalidation:r.revalidation,component:d,error:h,children:g(),routeContext:{outlet:null,matches:f,isDataRoute:!0},onError:c}):g()},null)}(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:K([u,r.encodeLocation?r.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:K([u,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),a,n);return t&&v?/* @__PURE__ */o(se.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...h},navigationType:"POP"}},v):v}function Re(){let e=function(){let e=m(ce),t=function(e){let t=m(ae);return R(t,Te(e)),t}("useRouteError"),n=Pe("useRouteError");return void 0!==e?e:t.errors?.[n]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(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)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=/* @__PURE__ */o(h,null,/* @__PURE__ */o("p",null,"💿 Hey developer 👋"),/* @__PURE__ */o("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",/* @__PURE__ */o("code",{style:i},"ErrorBoundary")," or"," ",/* @__PURE__ */o("code",{style:i},"errorElement")," prop on your route.")),/* @__PURE__ */o(h,null,/* @__PURE__ */o("h2",null,"Unexpected Application Error!"),/* @__PURE__ */o("h3",{style:{fontStyle:"italic"}},t),n?/* @__PURE__ */o("pre",{style:a},n):null,l)}var Ee=/* @__PURE__ */o(Re,null),Se=class extends y{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${he}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new G(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?/* @__PURE__ */o(ue.Provider,{value:this.props.routeContext},/* @__PURE__ */o(ce.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?/* @__PURE__ */o($e,{error:e},t):t}};Se.contextType=oe;var xe=/* @__PURE__ */new WeakMap;function $e({children:e,error:t}){let{basename:n}=m(le);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${he}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let r=xe.get(t);if(r)throw r;let a=ee(e.location,n);if(Z&&!xe.get(t)){if(!a.isExternal&&!e.reloadDocument){const n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw xe.set(t,n),n}window.location.href=a.absoluteURL||a.to}/* @__PURE__ */
2
2
  return o("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function ke({routeContext:e,match:t,children:n}){let r=m(re);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),/* @__PURE__ */o(ue.Provider,{value:e},n)}function Te(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pe(e){let t=function(e){let t=m(ue);return R(t,Te(e)),t}(e),n=t.matches[t.matches.length-1];return R(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}var Le={};function Oe(e,t,n){t||Le[e]||(Le[e]=!0,E(!1,n))}function Ce({basename:r,children:a,initialEntries:l,initialIndex:s,unstable_useTransitions:u}){let c=g();null==c.current&&(c.current=function(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:a=!1}=e;t=n.map((e,t)=>c(e,"string"==typeof e?null:e.state,0===t?"default":void 0,"string"==typeof e?void 0:e.unstable_mask));let o=s(null==r?t.length-1:r),i="POP",l=null;function s(e){return Math.min(Math.max(e,0),t.length-1)}function u(){return t[o]}function c(e,n=null,r,a){let o=x(t?u().pathname:"/",e,n,r,a);return E("/"===o.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),o}function h(e){return"string"==typeof e?e:$(e)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:h,createURL:e=>new URL(h(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?k(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){i="PUSH";let r=w(e)?e:c(e,n);o+=1,t.splice(o,t.length,r),a&&l&&l({action:i,location:r,delta:1})},replace(e,n){i="REPLACE";let r=w(e)?e:c(e,n);t[o]=r,a&&l&&l({action:i,location:r,delta:0})},go(e){i="POP";let n=s(o+e),r=t[n];o=n,l&&l({action:i,location:r,delta:e})},listen:e=>(l=e,()=>{l=null})}}({initialEntries:l,initialIndex:s,v5Compat:!0}));let h=c.current,[p,d]=t({action:h.action,location:h.location}),m=e(e=>{!1===u?d(e):i(()=>d(e))},[u]);return n(()=>h.listen(m),[h,m]),/* @__PURE__ */o(je,{basename:r,children:a,location:p.location,navigationType:p.action,navigator:h,unstable_useTransitions:u})}function _e({to:e,replace:t,state:n,relative:r}){R(pe(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=m(le);E(!a,"<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:o}=m(ue),{pathname:i}=de(),l=ge(),u=Y(e,J(o),i,"path"===r),c=JSON.stringify(u);return s(()=>{l(JSON.parse(c),{replace:t,state:n,relative:r})},[l,c,r,t,n]),null}function Ne(e){return function(e){let t=m(ue).outlet;return p(()=>t&&/* @__PURE__ */o(ve.Provider,{value:e},t),[t,e])}(e.context)}function Me(e){R(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function je({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,unstable_useTransitions:l}){R(!pe(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),u=p(()=>({basename:s,navigator:a,static:i,unstable_useTransitions:l,future:{}}),[s,a,i,l]);"string"==typeof n&&(n=k(n));let{pathname:c="/",search:h="",hash:d="",state:m=null,key:f="default",unstable_mask:g}=n,v=p(()=>{let e=I(c,s);return null==e?null:{location:{pathname:e,search:h,hash:d,state:m,key:f,unstable_mask:g},navigationType:r}},[s,c,h,d,m,f,r,g]);return E(null!=v,`<Router basename="${s}"> is not able to match the URL "${c}${h}${d}" because it does not start with the basename, so the <Router> won't render anything.`),null==v?null:/* @__PURE__ */o(le.Provider,{value:u},/* @__PURE__ */o(se.Provider,{children:t,value:v}))}function Ae({children:e,location:t}){return we(De(e),t)}function De(e,t=[]){let n=[];return l.forEach(e,(e,r)=>{if(!d(e))return;let a=[...t,r];if(e.type===h)return void n.push.apply(n,De(e.props.children,a));R(e.type===Me,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),R(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=De(e.props.children,a)),n.push(o)}),n}v(function({routes:e,future:t,state:n,isStatic:r,onError:a}){return we(e,void 0,{state:n,isStatic:r,onError:a,future:t})});var Ue="get",We="application/x-www-form-urlencoded";function Fe(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var Ie=null,Be=/* @__PURE__ */new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ze(e){return null==e||Be.has(e)?e:(E(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${We}"`),null)}function He(e,t){if(!1===e||null==e)throw new Error(t)}function Je(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function Ye(e,t,n,r,a,o){let i=(e,t)=>!n[t]||e.route.id!==n[t].route.id,l=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>i(e,t)||l(e,t)):"data"===o?t.filter((t,o)=>{let s=r.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,o)||l(t,o))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function Ke(){let e=m(re);return He(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ve=r(void 0);function Xe(){let e=m(Ve);return He(e,"You must render this element inside a <HydratedRouter> element"),e}function qe(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ge({page:e,...t}){let{router:n}=Ke(),r=p(()=>T(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?/* @__PURE__ */o(Qe,{page:e,matches:r,...t}):null}function Qe({page:e,matches:n,...r}){let a=de(),{future:i,manifest:l,routeModules:u}=Xe(),{basename:c}=Ke(),{loaderData:d,matches:f}=function(){let e=m(ae);return He(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),g=p(()=>Ye(e,n,f,l,a,"data"),[e,n,f,l,a]),v=p(()=>Ye(e,n,f,l,a,"assets"),[e,n,f,l,a]),y=p(()=>{if(e===a.pathname+a.search+a.hash)return[];let t=/* @__PURE__ */new Set,r=!1;if(n.forEach(e=>{let n=l.routes[e.route.id];n&&n.hasLoader&&(!g.some(t=>t.route.id===e.route.id)&&e.route.id in d&&u[e.route.id]?.shouldRevalidate||n.hasClientLoader?r=!0:t.add(e.route.id))}),0===t.size)return[];let o=function(e,t,n,r){let a="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:"/"===a.pathname?a.pathname=`_root.${r}`:t&&"/"===I(a.pathname,t)?a.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${r}`,a}(e,c,i.unstable_trailingSlashAwareDataRequests,"data");return r&&t.size>0&&o.searchParams.set("_routes",n.filter(e=>t.has(e.route.id)).map(e=>e.route.id).join(",")),[o.pathname+o.search]},[c,i.unstable_trailingSlashAwareDataRequests,d,a,l,g,n,e,u]),b=p(()=>function(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let a=[r.module];return r.clientActionModule&&(a=a.concat(r.clientActionModule)),r.clientLoaderModule&&(a=a.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(a=a.concat(r.hydrateFallbackModule)),r.imports&&(a=a.concat(r.imports)),a}).flat(1),[...new Set(r)];var r}(v,l),[v,l]),w=function(e){let{manifest:n,routeModules:r}=Xe(),[a,o]=t([]);return s(()=>{let t=!1;return async function(e,t,n){return function(e,t){let n=/* @__PURE__ */new Set;return new Set(t),e.reduce((e,t)=>{let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(t));return n.has(r)||(n.add(r),e.push({key:r,link:t})),e},[])}((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Je).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,n,r).then(e=>{t||o(e)}),()=>{t=!0}},[e,n,r]),a}(v);/* @__PURE__ */
3
3
  return o(h,null,y.map(e=>/* @__PURE__ */o("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})),b.map(e=>/* @__PURE__ */o("link",{key:e,rel:"modulepreload",href:e,...r})),w.map(({key:e,link:t})=>/* @__PURE__ */o("link",{key:e,nonce:r.nonce,...t,crossOrigin:t.crossOrigin??r.crossOrigin})))}function Ze(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}Ve.displayName="FrameworkContext";var et="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{et&&(window.__reactRouterVersion="7.13.1")}catch(Nt){}function tt({basename:r,children:a,unstable_useTransitions:l,window:s}){let u=g();null==u.current&&(u.current=function(e={}){return function(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,i=a.history,l="POP",s=null,u=c();function c(){return(i.state||{idx:null}).idx}function h(){l="POP";let e=c(),t=null==e?null:e-u;u=e,s&&s({action:l,location:d.location,delta:t})}function p(e){return function(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),R(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:$(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}(e)}null==u&&(u=0,i.replaceState({...i.state,idx:u},""));let d={get action(){return l},get location(){return e(a,i)},listen(e){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(b,h),s=e,()=>{a.removeEventListener(b,h),s=null}},createHref:e=>t(a,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l="PUSH";let r=w(e)?e:x(d.location,e,t);n&&n(r,e),u=c()+1;let h=S(r,u),p=d.createHref(r.unstable_mask||r);try{i.pushState(h,"",p)}catch(m){if(m instanceof DOMException&&"DataCloneError"===m.name)throw m;a.location.assign(p)}o&&s&&s({action:l,location:d.location,delta:1})},replace:function(e,t){l="REPLACE";let r=w(e)?e:x(d.location,e,t);n&&n(r,e),u=c();let a=S(r,u),h=d.createHref(r.unstable_mask||r);i.replaceState(a,"",h),o&&s&&s({action:l,location:d.location,delta:0})},go:e=>i.go(e)};return d}(function(e,t){let{pathname:n="/",search:r="",hash:a=""}=k(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),x("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:$(t))},function(e,t){E("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)},e)}({window:s,v5Compat:!0}));let c=u.current,[h,p]=t({action:c.action,location:c.location}),d=e(e=>{!1===l?p(e):i(()=>p(e))},[l]);return n(()=>c.listen(d),[c,d]),/* @__PURE__ */o(je,{basename:r,children:a,location:h.location,navigationType:h.action,navigator:c,unstable_useTransitions:l})}var nt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rt=a(function({onClick:n,discover:r="render",prefetch:a="none",relative:l,reloadDocument:u,replace:c,unstable_mask:p,state:d,target:f,to:v,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:w,...E},S){let{basename:x,navigator:k,unstable_useTransitions:T}=m(le),P="string"==typeof v&&nt.test(v),L=ee(v,x),O=function(e,{relative:t}={}){R(pe(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=m(le),{hash:a,pathname:o,search:i}=be(e,{relative:t}),l=o;return"/"!==n&&(l="/"===o?n:K([n,o])),r.createHref({pathname:l,search:i,hash:a})}(v=L.to,{relative:l}),C=de(),_=null;if(p){let e=Y(p,[],C.unstable_mask?C.unstable_mask.pathname:"/",!0);"/"!==x&&(e.pathname="/"===e.pathname?x:K([x,e.pathname])),_=k.createHref(e)}let[N,M,j]=function(e,n){let r=m(Ve),[a,o]=t(!1),[i,l]=t(!1),{onFocus:u,onBlur:c,onMouseEnter:h,onMouseLeave:p,onTouchStart:d}=n,f=g(null);s(()=>{if("render"===e&&l(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{l(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),s(()=>{if(a){let e=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(e)}}},[a]);let v=()=>{o(!0)},y=()=>{o(!1),l(!1)};return r?"intent"!==e?[i,f,{}]:[i,f,{onFocus:qe(u,v),onBlur:qe(c,y),onMouseEnter:qe(h,v),onMouseLeave:qe(p,y),onTouchStart:qe(d,v)}]:[!1,f,{}]}(a,E),A=function(t,{target:n,replace:r,unstable_mask:a,state:o,preventScrollReset:l,relative:s,viewTransition:u,unstable_defaultShouldRevalidate:c,unstable_useTransitions:h}={}){let p=ge(),d=de(),m=be(t,{relative:s});return e(e=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(e,n)){e.preventDefault();let n=void 0!==r?r:$(d)===$(m),f=()=>p(t,{replace:n,unstable_mask:a,state:o,preventScrollReset:l,relative:s,viewTransition:u,unstable_defaultShouldRevalidate:c});h?i(()=>f()):f()}},[d,p,m,r,a,o,n,t,l,s,u,c,h])}(v,{replace:c,unstable_mask:p,state:d,target:f,preventScrollReset:y,relative:l,viewTransition:b,unstable_defaultShouldRevalidate:w,unstable_useTransitions:T}),D=!(L.isExternal||u),U=/* @__PURE__ */o("a",{...E,...j,href:(D?_:void 0)||L.absoluteURL||O,onClick:D?function(e){n&&n(e),e.defaultPrevented||A(e)}:n,ref:Ze(S,M),target:f,"data-discover":P||"render"!==r?void 0:"true"});return N&&!P?/* @__PURE__ */o(h,null,U,/* @__PURE__ */o(Ge,{page:O})):U});rt.displayName="Link";var at=a(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:a,to:i,viewTransition:l,children:s,...u},c){let h=be(i,{relative:u.relative}),p=de(),d=m(ae),{navigator:f,basename:g}=m(le),v=null!=d&&function(e,{relative:t}={}){let n=m(ie);R(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=it("useViewTransitionState"),a=be(e,{relative:t});if(!n.isTransitioning)return!1;let o=I(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=I(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=W(a.pathname,i)||null!=W(a.pathname,o)}(h)&&!0===l,y=f.encodeLocation?f.encodeLocation(h).pathname:h.pathname,b=p.pathname,w=d&&d.navigation&&d.navigation.location?d.navigation.location.pathname:null;t||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&g&&(w=I(w,g)||w);const E="/"!==y&&y.endsWith("/")?y.length-1:y.length;let S,x=b===y||!r&&b.startsWith(y)&&"/"===b.charAt(E),$=null!=w&&(w===y||!r&&w.startsWith(y)&&"/"===w.charAt(y.length)),k={isActive:x,isPending:$,isTransitioning:v},T=x?e:void 0;S="function"==typeof n?n(k):[n,x?"active":null,$?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let P="function"==typeof a?a(k):a;/* @__PURE__ */
4
4
  return o(rt,{...u,"aria-current":T,className:S,ref:c,style:P,to:i,viewTransition:l},"function"==typeof s?s(k):s)});at.displayName="NavLink";var ot=a(({discover:t="render",fetcherKey:n,navigate:r,reloadDocument:a,replace:l,state:s,method:u=Ue,action:c,onSubmit:h,relative:p,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:g,...v},y)=>{let{unstable_useTransitions:b}=m(le),w=function(){let{router:t}=it("useSubmit"),{basename:n}=m(le),r=Pe("useRouteId"),a=t.fetch,o=t.navigate;return e(async(e,t={})=>{let{action:i,method:l,encType:s,formData:u,body:c}=function(e,t){let n,r,a,o,i;if(Fe(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");r=i?I(i,t):null,n=e.getAttribute("method")||Ue,a=ze(e.getAttribute("enctype"))||We,o=new FormData(e)}else if(function(e){return Fe(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Fe(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)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?I(l,t):null,n=e.getAttribute("formmethod")||i.getAttribute("method")||Ue,a=ze(e.getAttribute("formenctype"))||ze(i.getAttribute("enctype"))||We,o=new FormData(i,e),!function(){if(null===Ie)try{new FormData(document.createElement("form"),0),Ie=!1}catch(Nt){Ie=!0}return Ie}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,r)}}else{if(Fe(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ue,r=null,a=We,i=e}var l;return o&&"text/plain"===a&&(i=o,o=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:o,body:i}}(e,n);!1===t.navigate?await a(t.fetcherKey||st(),r,t.action||i,{unstable_defaultShouldRevalidate:t.unstable_defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:u,body:c,formMethod:t.method||l,formEncType:t.encType||s,flushSync:t.flushSync}):await o(t.action||i,{unstable_defaultShouldRevalidate:t.unstable_defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:u,body:c,formMethod:t.method||l,formEncType:t.encType||s,replace:t.replace,state:t.state,fromRouteId:r,flushSync:t.flushSync,viewTransition:t.viewTransition})},[a,o,n,r])}(),E=function(e,{relative:t}={}){let{basename:n}=m(le),r=m(ue);R(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),o={...be(e||".",{relative:t})},i=de();if(null==e){o.search=i.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();o.search=n?`?${n}`:""}}return e&&"."!==e||!a.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(o.pathname="/"===o.pathname?n:K([n,o.pathname])),$(o)}(c,{relative:p}),S="get"===u.toLowerCase()?"get":"post",x="string"==typeof c&&nt.test(c);/* @__PURE__ */
@@ -1 +1 @@
1
- import{r as t}from"./2R3GoXB1.js";import{Mt as o,N as r,Nt as n,j as e,wt as a}from"./wHbQZdly.js";import{t as i}from"./CUOOhGTj.js";import{o as s}from"./DPOkh0eJ.js";import{t as c}from"./B28y50Bi.js";var l=new i,p=(t,o)=>{n(/* @__PURE__ */r(e,{client:l,children:/* @__PURE__ */r(s,{children:/* @__PURE__ */r(c,{event:t})})}),o)},m=({events:n})=>{const e=a(null),i=a(null);return o(()=>{if(!e.current||i.current)return;let o;return(async()=>{const r=await import("./ZShDCNL_.js").then(o=>/* @__PURE__ */t(o.default,1));if(await Promise.resolve({ }),!e.current)return;const a=r.map(e.current,{center:[20,0],zoom:2,zoomControl:!0,worldCopyJump:!0});r.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"&copy; OpenStreetMap contributors",maxZoom:19}).addTo(a),i.current=a;const s=n.filter(t=>"number"==typeof t.location?.x&&"number"==typeof t.location?.y);if(s.length>0){const t=r.latLngBounds([]);for(const o of s){const n=o.location.x,e=o.location.y;t.extend([e,n]);const i=r.divIcon({className:"qrati-leaflet-marker-wrapper",html:'\n <div style="\n width: 28px;\n height: 28px;\n cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n "></div>\n ',iconSize:[28,28],iconAnchor:[14,28],popupAnchor:[0,-28]}),s=r.marker([e,n],{icon:i}).addTo(a),c=document.createElement("div");p(o,c),s.bindPopup(c,{closeButton:!0,maxWidth:220})}t.isValid()&&a.fitBounds(t,{padding:[60,60],maxZoom:14})}o=()=>{a.remove(),i.current=null}})(),()=>{o?.()}},[n]),/* @__PURE__ */r("div",{ref:e,class:"size-full"})};export{m as default};
1
+ import{r as t}from"./2R3GoXB1.js";import{Mt as o,N as r,Nt as n,j as e,wt as a}from"./BiQECCnr.js";import{t as i}from"./DXPR6JWg.js";import{o as s}from"./COUnPxHl.js";import{t as c}from"./DGeYAYfl.js";var l=new i,p=(t,o)=>{n(/* @__PURE__ */r(e,{client:l,children:/* @__PURE__ */r(s,{children:/* @__PURE__ */r(c,{event:t})})}),o)},m=({events:n})=>{const e=a(null),i=a(null);return o(()=>{if(!e.current||i.current)return;let o;return(async()=>{const r=await import("./CziefUVo.js").then(o=>/* @__PURE__ */t(o.default,1));if(await Promise.resolve({ }),!e.current)return;const a=r.map(e.current,{center:[20,0],zoom:2,zoomControl:!0,worldCopyJump:!0});r.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"&copy; OpenStreetMap contributors",maxZoom:19}).addTo(a),i.current=a;const s=n.filter(t=>"number"==typeof t.location?.x&&"number"==typeof t.location?.y);if(s.length>0){const t=r.latLngBounds([]);for(const o of s){const n=o.location.x,e=o.location.y;t.extend([e,n]);const i=r.divIcon({className:"qrati-leaflet-marker-wrapper",html:'\n <div style="\n width: 28px;\n height: 28px;\n cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n "></div>\n ',iconSize:[28,28],iconAnchor:[14,28],popupAnchor:[0,-28]}),s=r.marker([e,n],{icon:i}).addTo(a),c=document.createElement("div");p(o,c),s.bindPopup(c,{closeButton:!0,maxWidth:220})}t.isValid()&&a.fitBounds(t,{padding:[60,60],maxZoom:14})}o=()=>{a.remove(),i.current=null}})(),()=>{o?.()}},[n]),/* @__PURE__ */r("div",{ref:e,class:"size-full"})};export{m as default};
@@ -1,3 +1,3 @@
1
- import{Dt as e,Mt as l,N as t,T as r,wt as n}from"./wHbQZdly.js";import{p as s,t as a}from"./DPOkh0eJ.js";var i=({event:i})=>{const o=s(),[c,d]=e(0),u=n(null),h=(i.contents??[]).filter(e=>e.thumbnailUrl||e.url);return l(()=>{if(!(h.length<=1))return u.current=setInterval(()=>{d(e=>(e+1)%h.length)},3e3),()=>{u.current&&clearInterval(u.current)}},[h.length]),/* @__PURE__ */t("div",{class:"w-44 overflow-hidden",children:[h.length>0?/* @__PURE__ */t("div",{class:"relative h-28 w-full overflow-hidden",children:[/* @__PURE__ */t(a,{src:h[c]?.thumbnailUrl||h[c]?.url,blurhash:h[c]?.blurHash,containerClassName:"size-full",imgClassName:"rounded-none"}),h.length>1&&/* @__PURE__ */t("div",{class:"absolute right-0 bottom-1.5 left-0 flex justify-center gap-1",children:h.map((e,l)=>/* @__PURE__ */t("button",{onClick:()=>d(l),class:"size-1.5 rounded-full transition-all "+(l===c?"bg-white":"bg-white/50"),"aria-label":`Go to image ${l+1}`},l))})]}):/* @__PURE__ */t("div",{class:"bg-muted flex h-28 w-full items-center justify-center",children:/* @__PURE__ */t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:/* @__PURE__ */t("path",{d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M9 12.75a2.25 2.25 0 100-4.5 2.25 2.25 0 000 4.5z"})})}),/* @__PURE__ */t("div",{class:"",children:[
1
+ import{Dt as e,Mt as l,N as t,T as r,wt as n}from"./BiQECCnr.js";import{p as s,t as a}from"./COUnPxHl.js";var i=({event:i})=>{const o=s(),[c,d]=e(0),u=n(null),h=(i.contents??[]).filter(e=>e.thumbnailUrl||e.url);return l(()=>{if(!(h.length<=1))return u.current=setInterval(()=>{d(e=>(e+1)%h.length)},3e3),()=>{u.current&&clearInterval(u.current)}},[h.length]),/* @__PURE__ */t("div",{class:"w-44 overflow-hidden",children:[h.length>0?/* @__PURE__ */t("div",{class:"relative h-28 w-full overflow-hidden",children:[/* @__PURE__ */t(a,{src:h[c]?.thumbnailUrl||h[c]?.url,blurhash:h[c]?.blurHash,containerClassName:"size-full",imgClassName:"rounded-none"}),h.length>1&&/* @__PURE__ */t("div",{class:"absolute right-0 bottom-1.5 left-0 flex justify-center gap-1",children:h.map((e,l)=>/* @__PURE__ */t("button",{onClick:()=>d(l),class:"size-1.5 rounded-full transition-all "+(l===c?"bg-white":"bg-white/50"),"aria-label":`Go to image ${l+1}`},l))})]}):/* @__PURE__ */t("div",{class:"bg-muted flex h-28 w-full items-center justify-center",children:/* @__PURE__ */t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:/* @__PURE__ */t("path",{d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M9 12.75a2.25 2.25 0 100-4.5 2.25 2.25 0 000 4.5z"})})}),/* @__PURE__ */t("div",{class:"",children:[
2
2
  /* @__PURE__ */t("p",{class:"line-clamp-2 text-sm leading-tight font-medium",children:i.name}),i.location?.label&&/* @__PURE__ */t("p",{class:"text-foreground line-clamp-1 text-xs",children:i.location.label}),
3
3
  /* @__PURE__ */t("button",{onClick:()=>{o(r.GALLERY(i.slug))},class:"bg-background text-foreground mt-2 w-full rounded py-1 text-xs font-medium transition-opacity hover:opacity-90",children:"Explore"})]})]})};export{i as t};
@@ -1 +1 @@
1
- import{$ as t,Ct as e,J as s,Q as i,St as a,X as r,Z as n,at as o,ct as u,dt as h,ft as c,gt as l,it as d,nt as f,ot as y,pt as p,rt as m,st as g,ut as v,yt as b}from"./wHbQZdly.js";function q(t){return{onFetch:(e,s)=>{const i=e.options,a=e.fetchOptions?.meta?.fetchMore?.direction,r=e.state.data?.pages||[],n=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},h=0;const c=async()=>{let s=!1;const c=o(e.options,e.fetchOptions),l=async(t,i,a)=>{if(s)return Promise.reject();if(null==i&&t.pages.length)return Promise.resolve(t);const r=await c((()=>{const t={client:e.client,queryKey:e.queryKey,pageParam:i,direction:a?"backward":"forward",meta:e.options.meta};return f(t,()=>e.signal,()=>s=!0),t})()),{maxPages:n}=e.options,o=a?d:m;return{pages:o(t.pages,r,n),pageParams:o(t.pageParams,i,n)}};if(a&&r.length){const t="backward"===a,e=t?P:C,s={pages:r,pageParams:n};u=await l(s,e(i,s),t)}else{const e=t??r.length;do{const t=0===h?n[0]??i.initialPageParam:C(i,u);if(h>0&&null==t)break;u=await l(u,t),h++}while(h<e)}return u};e.options.persister?e.fetchFn=()=>e.options.persister?.(c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=c}}}function C(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function P(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function O(t,e){return!!e&&null!=C(t,e)}function w(t,e){return!(!e||!t.getPreviousPageParam)&&null!=P(t,e)}var Q=class extends r{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#a({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=n({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(/* @__PURE__ */new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const i="pending"===this.state.status,a=!this.#i.canStart();try{if(i)e();else{this.#a({type:"pending",variables:t,isPaused:a}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);const e=await(this.options.onMutate?.(t,s));e!==this.state.context&&this.#a({type:"pending",context:e,variables:t,isPaused:a})}const r=await this.#i.start();return await(this.#s.config.onSuccess?.(r,t,this.state.context,this,s)),await(this.options.onSuccess?.(r,t,this.state.context,s)),await(this.#s.config.onSettled?.(r,null,this.state.variables,this.state.context,this,s)),await(this.options.onSettled?.(r,null,t,this.state.context,s)),this.#a({type:"success",data:r}),r}catch(r){try{await(this.#s.config.onError?.(r,t,this.state.context,this,s))}catch(o){Promise.reject(o)}try{await(this.options.onError?.(r,t,this.state.context,s))}catch(o){Promise.reject(o)}try{await(this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,s))}catch(o){Promise.reject(o)}try{await(this.options.onSettled?.(void 0,r,t,this.state.context,s))}catch(o){Promise.reject(o)}throw this.#a({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}},D=class extends e{constructor(t={}){super(),this.config=t,this.#r=/* @__PURE__ */new Set,this.#n=/* @__PURE__ */new Map,this.#o=0}#r;#n;#o;build(t,e,s){const i=new Q({client:t,mutationCache:this,mutationId:++this.#o,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#r.add(t);const e=x(t);if("string"==typeof e){const s=this.#n.get(e);s?s.push(t):this.#n.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#r.delete(t)){const e=x(t);if("string"==typeof e){const s=this.#n.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#n.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=x(t);if("string"==typeof e){const s=this.#n.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=x(t);return"string"==typeof e?(this.#n.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){t.batch(()=>{this.#r.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#r.clear(),this.#n.clear()})}getAll(){return Array.from(this.#r)}find(t){const e={exact:!0,...t};return this.getAll().find(t=>v(e,t))}findAll(t={}){return this.getAll().filter(e=>v(t,e))}notify(e){t.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return t.batch(()=>Promise.all(e.map(t=>t.continue().catch(c))))}};function x(t){return t.options.scope?.id}var M=class extends e{constructor(t={}){super(),this.config=t,this.#u=/* @__PURE__ */new Map}#u;build(t,e,i){const a=e.queryKey,r=e.queryHash??u(a,e);let n=this.get(r);return n||(n=new s({client:t,queryKey:a,queryHash:r,options:t.defaultQueryOptions(e),state:i,defaultOptions:t.getQueryDefaults(a)}),this.add(n)),n}add(t){this.#u.has(t.queryHash)||(this.#u.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#u.get(t.queryHash);e&&(t.destroy(),e===t&&this.#u.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){t.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#u.get(t)}getAll(){return[...this.#u.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(t=>h(e,t))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(e=>h(t,e)):e}notify(e){t.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){t.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){t.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},A=class{#h;#s;#c;#l;#d;#f;#y;#p;constructor(t={}){this.#h=t.queryCache||new M,this.#s=t.mutationCache||new D,this.#c=t.defaultOptions||{},this.#l=/* @__PURE__ */new Map,this.#d=/* @__PURE__ */new Map,this.#f=0}mount(){this.#f++,1===this.#f&&(this.#y=a.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onFocus())}),this.#p=i.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onOnline())}))}unmount(){this.#f--,0===this.#f&&(this.#y?.(),this.#y=void 0,this.#p?.(),this.#p=void 0)}isFetching(t){return this.#h.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#s.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#h.build(this,e),i=s.state.data;return void 0===i?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(l(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#h.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,s){const i=this.defaultQueryOptions({queryKey:t}),a=this.#h.get(i.queryHash)?.state.data,r=y(e,a);if(void 0!==r)return this.#h.build(this,i).setData(r,{...s,manual:!0})}setQueriesData(e,s,i){return t.batch(()=>this.#h.findAll(e).map(({queryKey:t})=>[t,this.setQueryData(t,s,i)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state}removeQueries(e){const s=this.#h;t.batch(()=>{s.findAll(e).forEach(t=>{s.remove(t)})})}resetQueries(e,s){const i=this.#h;return t.batch(()=>(i.findAll(e).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...e},s)))}cancelQueries(e,s={}){const i={revert:!0,...s},a=t.batch(()=>this.#h.findAll(e).map(t=>t.cancel(i)));return Promise.all(a).then(c).catch(c)}invalidateQueries(e,s={}){return t.batch(()=>(this.#h.findAll(e).forEach(t=>{t.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},s)))}refetchQueries(e,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},a=t.batch(()=>this.#h.findAll(e).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let e=t.fetch(void 0,i);return i.throwOnError||(e=e.catch(c)),"paused"===t.state.fetchStatus?Promise.resolve():e}));return Promise.all(a).then(c)}fetchQuery(t){const e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);const s=this.#h.build(this,e);return s.isStaleByTime(l(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(c).catch(c)}fetchInfiniteQuery(t){return t.behavior=q(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(c).catch(c)}ensureInfiniteQueryData(t){return t.behavior=q(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return i.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#h}getMutationCache(){return this.#s}getDefaultOptions(){return this.#c}setDefaultOptions(t){this.#c=t}setQueryDefaults(t,e){this.#l.set(g(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#l.values()],s={};return e.forEach(e=>{p(t,e.queryKey)&&Object.assign(s,e.defaultOptions)}),s}setMutationDefaults(t,e){this.#d.set(g(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#d.values()],s={};return e.forEach(e=>{p(t,e.mutationKey)&&Object.assign(s,e.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#c.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=u(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===b&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#c.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#h.clear(),this.#s.clear()}};export{q as i,O as n,w as r,A as t};
1
+ import{$ as t,Ct as e,J as s,Q as i,St as a,X as r,Z as n,at as o,ct as u,dt as h,ft as c,gt as l,it as d,nt as f,ot as y,pt as p,rt as m,st as g,ut as v,yt as b}from"./BiQECCnr.js";function q(t){return{onFetch:(e,s)=>{const i=e.options,a=e.fetchOptions?.meta?.fetchMore?.direction,r=e.state.data?.pages||[],n=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},h=0;const c=async()=>{let s=!1;const c=o(e.options,e.fetchOptions),l=async(t,i,a)=>{if(s)return Promise.reject();if(null==i&&t.pages.length)return Promise.resolve(t);const r=await c((()=>{const t={client:e.client,queryKey:e.queryKey,pageParam:i,direction:a?"backward":"forward",meta:e.options.meta};return f(t,()=>e.signal,()=>s=!0),t})()),{maxPages:n}=e.options,o=a?d:m;return{pages:o(t.pages,r,n),pageParams:o(t.pageParams,i,n)}};if(a&&r.length){const t="backward"===a,e=t?P:C,s={pages:r,pageParams:n};u=await l(s,e(i,s),t)}else{const e=t??r.length;do{const t=0===h?n[0]??i.initialPageParam:C(i,u);if(h>0&&null==t)break;u=await l(u,t),h++}while(h<e)}return u};e.options.persister?e.fetchFn=()=>e.options.persister?.(c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=c}}}function C(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function P(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function O(t,e){return!!e&&null!=C(t,e)}function w(t,e){return!(!e||!t.getPreviousPageParam)&&null!=P(t,e)}var Q=class extends r{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#a({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=n({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(/* @__PURE__ */new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const i="pending"===this.state.status,a=!this.#i.canStart();try{if(i)e();else{this.#a({type:"pending",variables:t,isPaused:a}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);const e=await(this.options.onMutate?.(t,s));e!==this.state.context&&this.#a({type:"pending",context:e,variables:t,isPaused:a})}const r=await this.#i.start();return await(this.#s.config.onSuccess?.(r,t,this.state.context,this,s)),await(this.options.onSuccess?.(r,t,this.state.context,s)),await(this.#s.config.onSettled?.(r,null,this.state.variables,this.state.context,this,s)),await(this.options.onSettled?.(r,null,t,this.state.context,s)),this.#a({type:"success",data:r}),r}catch(r){try{await(this.#s.config.onError?.(r,t,this.state.context,this,s))}catch(o){Promise.reject(o)}try{await(this.options.onError?.(r,t,this.state.context,s))}catch(o){Promise.reject(o)}try{await(this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,s))}catch(o){Promise.reject(o)}try{await(this.options.onSettled?.(void 0,r,t,this.state.context,s))}catch(o){Promise.reject(o)}throw this.#a({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}},D=class extends e{constructor(t={}){super(),this.config=t,this.#r=/* @__PURE__ */new Set,this.#n=/* @__PURE__ */new Map,this.#o=0}#r;#n;#o;build(t,e,s){const i=new Q({client:t,mutationCache:this,mutationId:++this.#o,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#r.add(t);const e=x(t);if("string"==typeof e){const s=this.#n.get(e);s?s.push(t):this.#n.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#r.delete(t)){const e=x(t);if("string"==typeof e){const s=this.#n.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#n.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=x(t);if("string"==typeof e){const s=this.#n.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=x(t);return"string"==typeof e?(this.#n.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){t.batch(()=>{this.#r.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#r.clear(),this.#n.clear()})}getAll(){return Array.from(this.#r)}find(t){const e={exact:!0,...t};return this.getAll().find(t=>v(e,t))}findAll(t={}){return this.getAll().filter(e=>v(t,e))}notify(e){t.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return t.batch(()=>Promise.all(e.map(t=>t.continue().catch(c))))}};function x(t){return t.options.scope?.id}var M=class extends e{constructor(t={}){super(),this.config=t,this.#u=/* @__PURE__ */new Map}#u;build(t,e,i){const a=e.queryKey,r=e.queryHash??u(a,e);let n=this.get(r);return n||(n=new s({client:t,queryKey:a,queryHash:r,options:t.defaultQueryOptions(e),state:i,defaultOptions:t.getQueryDefaults(a)}),this.add(n)),n}add(t){this.#u.has(t.queryHash)||(this.#u.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#u.get(t.queryHash);e&&(t.destroy(),e===t&&this.#u.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){t.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#u.get(t)}getAll(){return[...this.#u.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(t=>h(e,t))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(e=>h(t,e)):e}notify(e){t.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){t.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){t.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},A=class{#h;#s;#c;#l;#d;#f;#y;#p;constructor(t={}){this.#h=t.queryCache||new M,this.#s=t.mutationCache||new D,this.#c=t.defaultOptions||{},this.#l=/* @__PURE__ */new Map,this.#d=/* @__PURE__ */new Map,this.#f=0}mount(){this.#f++,1===this.#f&&(this.#y=a.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onFocus())}),this.#p=i.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onOnline())}))}unmount(){this.#f--,0===this.#f&&(this.#y?.(),this.#y=void 0,this.#p?.(),this.#p=void 0)}isFetching(t){return this.#h.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#s.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#h.build(this,e),i=s.state.data;return void 0===i?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(l(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#h.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,s){const i=this.defaultQueryOptions({queryKey:t}),a=this.#h.get(i.queryHash)?.state.data,r=y(e,a);if(void 0!==r)return this.#h.build(this,i).setData(r,{...s,manual:!0})}setQueriesData(e,s,i){return t.batch(()=>this.#h.findAll(e).map(({queryKey:t})=>[t,this.setQueryData(t,s,i)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state}removeQueries(e){const s=this.#h;t.batch(()=>{s.findAll(e).forEach(t=>{s.remove(t)})})}resetQueries(e,s){const i=this.#h;return t.batch(()=>(i.findAll(e).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...e},s)))}cancelQueries(e,s={}){const i={revert:!0,...s},a=t.batch(()=>this.#h.findAll(e).map(t=>t.cancel(i)));return Promise.all(a).then(c).catch(c)}invalidateQueries(e,s={}){return t.batch(()=>(this.#h.findAll(e).forEach(t=>{t.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},s)))}refetchQueries(e,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},a=t.batch(()=>this.#h.findAll(e).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let e=t.fetch(void 0,i);return i.throwOnError||(e=e.catch(c)),"paused"===t.state.fetchStatus?Promise.resolve():e}));return Promise.all(a).then(c)}fetchQuery(t){const e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);const s=this.#h.build(this,e);return s.isStaleByTime(l(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(c).catch(c)}fetchInfiniteQuery(t){return t.behavior=q(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(c).catch(c)}ensureInfiniteQueryData(t){return t.behavior=q(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return i.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#h}getMutationCache(){return this.#s}getDefaultOptions(){return this.#c}setDefaultOptions(t){this.#c=t}setQueryDefaults(t,e){this.#l.set(g(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#l.values()],s={};return e.forEach(e=>{p(t,e.queryKey)&&Object.assign(s,e.defaultOptions)}),s}setMutationDefaults(t,e){this.#d.set(g(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#d.values()],s={};return e.forEach(e=>{p(t,e.mutationKey)&&Object.assign(s,e.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#c.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=u(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===b&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#c.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#h.clear(),this.#s.clear()}};export{q as i,O as n,w as r,A as t};
@@ -1 +1 @@
1
- import{r as e}from"./2R3GoXB1.js";import{Mt as t,N as n,Nt as r,j as o,wt as i}from"./wHbQZdly.js";import{t as a}from"./CUOOhGTj.js";import{o as s}from"./DPOkh0eJ.js";import{t as l}from"./B28y50Bi.js";var c=new a,u=(e,t)=>{r(/* @__PURE__ */n(o,{client:c,children:/* @__PURE__ */n(s,{children:/* @__PURE__ */n(l,{event:e})})}),t)},d=({events:r,apiKey:o,is3D:a})=>{const s=i(null),l=i(null),c=i(a);return t(()=>{if(!s.current||l.current)return;let t;return(async()=>{const n=(await import("./Ccwm5LwS.js").then(t=>/* @__PURE__ */e(t.default,1))).default;if(await Promise.resolve({ }),!s.current)return;n.accessToken=o;const i=new n.Map({container:s.current,style:"mapbox://styles/mapbox/streets-v12",center:[0,20],zoom:2,pitch:c.current?60:0,bearing:c.current?-20:0,antialias:!0});l.current=i,i.on("style.load",()=>{i.getLayer("3d-buildings")||i.addLayer({id:"3d-buildings",source:"composite","source-layer":"building",filter:["==","extrude","true"],type:"fill-extrusion",minzoom:14,paint:{"fill-extrusion-color":"#aaa","fill-extrusion-height":["interpolate",["linear"],["zoom"],14,0,14.05,["get","height"]],"fill-extrusion-base":["interpolate",["linear"],["zoom"],14,0,14.05,["get","min_height"]],"fill-extrusion-opacity":.6}})}),i.on("load",()=>{const e=r.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===e.length)return;const t=new n.LngLatBounds;for(const r of e){const e=r.location.x,o=r.location.y;t.extend([e,o]);const a=document.createElement("div");a.style.cssText="\n width: 28px; height: 28px; cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n ";const s=document.createElement("div");u(r,s);const l=new n.Popup({closeButton:!0,closeOnClick:!1,maxWidth:"none",offset:[0,-20]}).setDOMContent(s);new n.Marker({element:a}).setLngLat([e,o]).setPopup(l).addTo(i)}t.isEmpty()||i.fitBounds(t,{padding:60,maxZoom:14,duration:1200})}),t=()=>{i.remove(),l.current=null}})(),()=>{t?.()}},[o]),t(()=>{l.current&&(c.current=a,l.current.easeTo({pitch:a?60:0,bearing:a?-20:0,duration:800}))},[a]),/* @__PURE__ */n("div",{ref:s,class:"size-full"})};export{d as default};
1
+ import{r as e}from"./2R3GoXB1.js";import{Mt as t,N as n,Nt as r,j as o,wt as i}from"./BiQECCnr.js";import{t as a}from"./DXPR6JWg.js";import{o as s}from"./COUnPxHl.js";import{t as l}from"./DGeYAYfl.js";var c=new a,u=(e,t)=>{r(/* @__PURE__ */n(o,{client:c,children:/* @__PURE__ */n(s,{children:/* @__PURE__ */n(l,{event:e})})}),t)},d=({events:r,apiKey:o,is3D:a})=>{const s=i(null),l=i(null),c=i(a);return t(()=>{if(!s.current||l.current)return;let t;return(async()=>{const n=(await import("./C2ydm0ZD.js").then(t=>/* @__PURE__ */e(t.default,1))).default;if(await Promise.resolve({ }),!s.current)return;n.accessToken=o;const i=new n.Map({container:s.current,style:"mapbox://styles/mapbox/streets-v12",center:[0,20],zoom:2,pitch:c.current?60:0,bearing:c.current?-20:0,antialias:!0});l.current=i,i.on("style.load",()=>{i.getLayer("3d-buildings")||i.addLayer({id:"3d-buildings",source:"composite","source-layer":"building",filter:["==","extrude","true"],type:"fill-extrusion",minzoom:14,paint:{"fill-extrusion-color":"#aaa","fill-extrusion-height":["interpolate",["linear"],["zoom"],14,0,14.05,["get","height"]],"fill-extrusion-base":["interpolate",["linear"],["zoom"],14,0,14.05,["get","min_height"]],"fill-extrusion-opacity":.6}})}),i.on("load",()=>{const e=r.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===e.length)return;const t=new n.LngLatBounds;for(const r of e){const e=r.location.x,o=r.location.y;t.extend([e,o]);const a=document.createElement("div");a.style.cssText="\n width: 28px; height: 28px; cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n ";const s=document.createElement("div");u(r,s);const l=new n.Popup({closeButton:!0,closeOnClick:!1,maxWidth:"none",offset:[0,-20]}).setDOMContent(s);new n.Marker({element:a}).setLngLat([e,o]).setPopup(l).addTo(i)}t.isEmpty()||i.fitBounds(t,{padding:60,maxZoom:14,duration:1200})}),t=()=>{i.remove(),l.current=null}})(),()=>{t?.()}},[o]),t(()=>{l.current&&(c.current=a,l.current.easeTo({pitch:a?60:0,bearing:a?-20:0,duration:800}))},[a]),/* @__PURE__ */n("div",{ref:s,class:"size-full"})};export{d as default};
@@ -0,0 +1,32 @@
1
+ import{$ as e,At as t,B as r,Ct as s,Dt as o,E as n,F as i,Ft as a,M as l,Mt as c,N as h,S as u,St as d,Tt as f,Y as p,_t as m,bt as y,et as g,ft as w,gt as b,ht as R,i as v,jt as S,l as T,lt as x,mt as A,n as E,t as I,tt as C,vt as O,xt as P}from"./BiQECCnr.js";var q=class extends s{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=g(),this.bindMethods(),this.setOptions(t)}#e;#s=void 0;#o=void 0;#n=void 0;#i;#a;#r;#t;#l;#c;#h;#u;#d;#f;#p=/* @__PURE__ */new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#s.addObserver(this),k(this.#s,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return D(this.#s,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return D(this.#s,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=/* @__PURE__ */new Set,this.#g(),this.#w(),this.#s.removeObserver(this)}setOptions(e){const t=this.options,r=this.#s;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof R(this.options.enabled,this.#s))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#s.setOptions(this.options),t._defaulted&&!m(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#s,observer:this});const s=this.hasListeners();s&&N(this.#s,r,this.options,t)&&this.#m(),this.updateResult(),!s||this.#s===r&&R(this.options.enabled,this.#s)===R(t.enabled,this.#s)&&b(this.options.staleTime,this.#s)===b(t.staleTime,this.#s)||this.#R();const o=this.#v();!s||this.#s===r&&R(this.options.enabled,this.#s)===R(t.enabled,this.#s)&&o===this.#f||this.#S(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);var s;return s=r,m(this.getCurrentResult(),s)||(this.#n=r,this.#a=this.options,this.#i=this.#s.state),r}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(/* @__PURE__ */new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#s}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#m(e){this.#b();let t=this.#s.fetch(this.options,e);return e?.throwOnError||(t=t.catch(w)),t}#R(){this.#g();const e=b(this.options.staleTime,this.#s);if(C.isServer()||this.#n.isStale||!x(e))return;const t=y(this.#n.dataUpdatedAt,e)+1;this.#u=P.setTimeout(()=>{this.#n.isStale||this.updateResult()},t)}#v(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#s):this.options.refetchInterval)??!1}#S(e){this.#w(),this.#f=e,!C.isServer()&&!1!==R(this.options.enabled,this.#s)&&x(this.#f)&&0!==this.#f&&(this.#d=P.setInterval(()=>{(this.options.refetchIntervalInBackground||d.isFocused())&&this.#m()},this.#f))}#y(){this.#R(),this.#S(this.#v())}#g(){this.#u&&(P.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#d&&(P.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){const r=this.#s,s=this.options,o=this.#n,n=this.#i,i=this.#a,a=e!==r?e.state:this.#o,{state:l}=e;let c,h={...l},u=!1;if(t._optimisticResults){const o=this.hasListeners(),n=!o&&k(e,t),i=o&&N(e,r,t,s);(n||i)&&(h={...h,...p(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(h.fetchStatus="idle")}let{error:d,errorUpdatedAt:f,status:m}=h;c=h.data;let y=!1;if(void 0!==t.placeholderData&&void 0===c&&"pending"===m){let e;o?.isPlaceholderData&&t.placeholderData===i?.placeholderData?(e=o.data,y=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,void 0!==e&&(m="success",c=A(o?.data,e,t),u=!0)}if(t.select&&void 0!==c&&!y)if(o&&c===n?.data&&t.select===this.#l)c=this.#c;else try{this.#l=t.select,c=t.select(c),c=A(o?.data,c,t),this.#c=c,this.#t=null}catch(E){this.#t=E}this.#t&&(d=this.#t,c=this.#c,f=Date.now(),m="error");const w="fetching"===h.fetchStatus,b="pending"===m,v="error"===m,S=b&&w,T=void 0!==c,x={status:m,fetchStatus:h.fetchStatus,isPending:b,isSuccess:"success"===m,isError:v,isInitialLoading:S,isLoading:S,data:c,dataUpdatedAt:h.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:h.dataUpdateCount>a.dataUpdateCount||h.errorUpdateCount>a.errorUpdateCount,isFetching:w,isRefetching:w&&!b,isLoadingError:v&&!T,isPaused:"paused"===h.fetchStatus,isPlaceholderData:u,isRefetchError:v&&T,isStale:M(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==R(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=void 0!==x.data,s="error"===x.status&&!t,o=e=>{s?e.reject(x.error):t&&e.resolve(x.data)},n=()=>{o(this.#r=x.promise=g())},i=this.#r;switch(i.status){case"pending":e.queryHash===r.queryHash&&o(i);break;case"fulfilled":(s||x.data!==i.value)&&n();break;case"rejected":s&&x.error===i.reason||n()}}return x}updateResult(){const e=this.#n,t=this.createResult(this.#s,this.options);this.#i=this.#s.state,this.#a=this.options,void 0!==this.#i.data&&(this.#h=this.#s),m(t,e)||(this.#n=t,this.#T({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#p.size)return!0;const s=new Set(r??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#n).some(t=>{const r=t;return this.#n[r]!==e[r]&&s.has(r)})})()}))}#b(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#s)return;const t=this.#s;this.#s=e,this.#o=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#T(t){e.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#e.getQueryCache().notify({query:this.#s,type:"observerResultsUpdated"})})}};function k(e,t){return function(e,t){return!1!==R(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&D(e,t,t.refetchOnMount)}function D(e,t,r){if(!1!==R(t.enabled,e)&&"static"!==b(t.staleTime,e)){const s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&M(e,t)}return!1}function N(e,t,r,s){return(e!==t||!1===R(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&M(e,r)}function M(e,t){return!1!==R(t.enabled,e)&&e.isStaleByTime(b(t.staleTime,e))}var U=a(!1);U.Provider;var L=a(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),Q=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function _(r,s,n){const a=S(U),h=S(L),u=l(n),d=u.defaultQueryOptions(r);u.getDefaultOptions().queries?._experimental_beforeQuery?.(d);const f=u.getQueryCache().get(d.queryHash);d._optimisticResults=a?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,r=e=>"static"===e?e:Math.max(e??t,t),s=e.staleTime;e.staleTime="function"==typeof s?(...e)=>r(s(...e)):r(s),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(d),((e,t,r)=>{const s=r?.state.error&&"function"==typeof e.throwOnError?O(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))})(d,h,f),(e=>{c(()=>{e.clearReset()},[e])})(h);const p=!u.getQueryCache().get(d.queryHash),[m]=o(()=>new s(u,d)),y=m.getOptimisticResult(d),g=!a&&!1!==r.subscribed;if(i(t(t=>{const r=g?m.subscribe(e.batchCalls(t)):w;return m.updateResult(),r},[m,g]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),c(()=>{m.setOptions(d)},[d,m]),((e,t)=>e?.suspense&&t.isPending)(d,y))throw Q(d,m,h);if((({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(o&&void 0===e.data||O(r,[e.error,s])))({result:y,errorResetBoundary:h,throwOnError:d.throwOnError,query:f,suspense:d.suspense}))throw y.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(d,y),d.experimental_prefetchInRender&&!C.isServer()&&((e,t)=>e.isLoading&&e.isFetching&&!t)(y,a)&&(p?Q(d,m,h):f?.promise)?.catch(w).finally(()=>{m.updateResult()}),d.notifyOnChangeProps?y:m.trackResult(y)}function j(e,t){return _(e,q,t)}var F=class extends Error{response;request;options;constructor(e,t,r){const s=`${e.status||0===e.status?e.status:""} ${e.statusText??""}`.trim();super(`Request failed with ${s?`status code ${s}`:"an unknown error"}: ${t.method} ${t.url}`),this.name="HTTPError",this.response=e,this.request=t,this.options=r}},z=class extends Error{name="NonError";value;constructor(e){let t="Non-error value was thrown";try{"string"==typeof e?t=e:e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message&&(t=e.message)}catch{}super(t),this.value=e}},H=class extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new z(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:"Forced retry",t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}},B=(()=>{let e=!1,t=!1;const r="function"==typeof globalThis.ReadableStream,s="function"==typeof globalThis.Request;if(r&&s)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(o){if(o instanceof Error&&"unsupported BodyInit type"===o.message)return!1;throw o}return e&&!t})(),W="function"==typeof globalThis.AbortController,V="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,Z="function"==typeof globalThis.ReadableStream,$="function"==typeof globalThis.FormData,G=["get","post","put","patch","head","delete"],J={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},Y=(new TextEncoder).encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,K=Symbol("stop"),X=class{options;constructor(e){this.options=e}},ee=e=>new X(e),te={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},re={next:!0},se={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},oe=(e,t,r)=>{let s,o=0;return e.pipeThrough(new TransformStream({transform(e,n){if(n.enqueue(e),s){o+=s.byteLength;let e=0===t?0:o/t;e>=1&&(e=1-Number.EPSILON),r?.({percent:e,totalBytes:Math.max(t,o),transferredBytes:o},s)}s=e},flush(){s&&(o+=s.byteLength,r?.({percent:1,totalBytes:Math.max(t,o),transferredBytes:o},s))}}))},ne=e=>null!==e&&"object"==typeof e,ie=(...e)=>{for(const t of e)if((!ne(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return ue({},...e)},ae=(e={},t={})=>{const r=new globalThis.Headers(e),s=t instanceof globalThis.Headers,o=new globalThis.Headers(t);for(const[n,i]of o.entries())s&&"undefined"===i||void 0===i?r.delete(n):r.set(n,i);return r};function le(e,t,r){return Object.hasOwn(t,r)&&void 0===t[r]?[]:ue(e[r]??[],t[r]??[])}var ce=(e={},t={})=>({beforeRequest:le(e,t,"beforeRequest"),beforeRetry:le(e,t,"beforeRetry"),afterResponse:le(e,t,"afterResponse"),beforeError:le(e,t,"beforeError")}),he=(e,t)=>{const r=new URLSearchParams;for(const s of[e,t])if(void 0!==s)if(s instanceof URLSearchParams)for(const[e,t]of s.entries())r.append(e,t);else if(Array.isArray(s))for(const e of s){if(!Array.isArray(e)||2!==e.length)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");r.append(String(e[0]),String(e[1]))}else if(ne(s))for(const[e,t]of Object.entries(s))void 0!==t&&r.append(e,String(t));else{const e=new URLSearchParams(s);for(const[t,s]of e.entries())r.append(t,s)}return r},ue=(...e)=>{let t,r={},s={},o={};const n=[];for(const i of e)if(Array.isArray(i))Array.isArray(r)||(r=[]),r=[...r,...i];else if(ne(i)){for(let[e,s]of Object.entries(i))if("signal"===e&&s instanceof globalThis.AbortSignal)n.push(s);else if("context"!==e)"searchParams"!==e?(ne(s)&&e in r&&(s=ue(r[e],s)),r={...r,[e]:s}):t=null==s?void 0:void 0===t?s:he(t,s);else{if(null!=s&&(!ne(s)||Array.isArray(s)))throw new TypeError("The `context` option must be an object");r={...r,context:null==s?{}:{...r.context,...s}}}ne(i.hooks)&&(o=ce(o,i.hooks),r.hooks=o),ne(i.headers)&&(s=ae(s,i.headers),r.headers=s)}return void 0!==t&&(r.searchParams=t),n.length>0&&(1===n.length?r.signal=n[0]:r.signal=V?AbortSignal.any(n):n.at(-1)),r},de=e=>G.includes(e)?e.toUpperCase():e,fe={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},pe=(e={})=>{if("number"==typeof e)return{...fe,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.methods&&=e.methods.map(e=>e.toLowerCase()),e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");const t=Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e));return{...fe,...t}},me=class extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}},ye=class e{static create(t,r){const s=new e(t,r),o=s.#x(async()=>{if("number"==typeof s.#A.timeout&&s.#A.timeout>2147483647)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await s.#E();for(const r of s.#A.hooks.afterResponse){const o=s.#I(e.clone());let n;try{n=await r(s.request,s.#C(),o,{retryCount:s.#O})}catch(t){throw s.#P(o),s.#P(e),t}if(n instanceof X)throw s.#P(o),s.#P(e),new H(n.options);const i=n instanceof globalThis.Response?n:e;o!==i&&s.#P(o),e!==i&&s.#P(e),e=i}if(s.#I(e),!e.ok&&("function"==typeof s.#A.throwHttpErrors?s.#A.throwHttpErrors(e.status):s.#A.throwHttpErrors)){let t=new F(e,s.request,s.#C());for(const e of s.#A.hooks.beforeError)t=await e(t,{retryCount:s.#O});throw t}if(s.#A.onDownloadProgress){if("function"!=typeof s.#A.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!Z)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const t=e.clone();return s.#P(e),((e,t)=>{if(!e.body)return e;if(204===e.status)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});const r=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(oe(e.body,r,t),{status:e.status,statusText:e.statusText,headers:e.headers})})(t,s.#A.onDownloadProgress)}return e}).finally(()=>{const e=s.#q;s.#k(e?.body??void 0),s.#k(s.request.body??void 0)});for(const[e,n]of Object.entries(J))"bytes"===e&&"function"!=typeof globalThis.Response?.prototype?.bytes||(o[e]=async()=>{s.request.headers.set("accept",s.request.headers.get("accept")||n);const t=await o;if("json"===e){if(204===t.status)return"";const e=await t.text();return""===e?"":r.parseJson?r.parseJson(e):JSON.parse(e)}return t[e]()});return o}static#D(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}request;#N;#O=0;#M;#A;#q;#U;#L;constructor(t,r={}){if(this.#M=t,this.#A={...r,headers:ae(this.#M.headers,r.headers),hooks:ce({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:de(r.method??this.#M.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:pe(r.retry),throwHttpErrors:r.throwHttpErrors??!0,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis),context:r.context??{}},"string"!=typeof this.#M&&!(this.#M instanceof URL||this.#M instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this.#A.prefixUrl&&"string"==typeof this.#M){if(this.#M.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this.#A.prefixUrl.endsWith("/")||(this.#A.prefixUrl+="/"),this.#M=this.#A.prefixUrl+this.#M}W&&V&&(this.#U=this.#A.signal??this.#M.signal,this.#N=new globalThis.AbortController,this.#A.signal=this.#U?AbortSignal.any([this.#U,this.#N.signal]):this.#N.signal),B&&(this.#A.duplex="half"),void 0!==this.#A.json&&(this.#A.body=this.#A.stringifyJson?.(this.#A.json)??JSON.stringify(this.#A.json),this.#A.headers.set("content-type",this.#A.headers.get("content-type")??"application/json"));const s=r.headers&&new globalThis.Headers(r.headers).has("content-type");if(this.#M instanceof globalThis.Request&&($&&this.#A.body instanceof globalThis.FormData||this.#A.body instanceof URLSearchParams)&&!s&&this.#A.headers.delete("content-type"),this.request=new globalThis.Request(this.#M,this.#A),void 0!==(o=this.#A.searchParams)&&(Array.isArray(o)?o.length>0:o instanceof URLSearchParams?o.size>0:"object"==typeof o?Object.keys(o).length>0:"string"==typeof o?o.trim().length>0:Boolean(o))){const t="?"+("string"==typeof this.#A.searchParams?this.#A.searchParams.replace(/^\?/,""):new URLSearchParams(e.#D(this.#A.searchParams)).toString()),r=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);this.request=new globalThis.Request(r,this.#A)}var o;if(this.#A.onUploadProgress){if("function"!=typeof this.#A.onUploadProgress)throw new TypeError("The `onUploadProgress` option must be a function");if(!B)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#Q(this.request,this.#A.body??void 0)}}#_(){const e=this.#A.retry.delay(this.#O);let t=e;!0===this.#A.retry.jitter?t=Math.random()*e:"function"==typeof this.#A.retry.jitter&&(t=this.#A.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e));const r=this.#A.retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(r,t)}async#j(e){if(this.#O++,this.#O>this.#A.retry.limit)throw e;const t=e instanceof Error?e:new z(e);if(t instanceof H)return t.customDelay??this.#_();if(!this.#A.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(void 0!==this.#A.retry.shouldRetry){const r=await this.#A.retry.shouldRetry({error:t,retryCount:this.#O});if(!1===r)throw e;if(!0===r)return this.#_()}if(function(e){return e instanceof me||e?.name===me.name}(e)&&!this.#A.retry.retryOnTimeout)throw e;if(function(e){return e instanceof F||e?.name===F.name}(e)){if(!this.#A.retry.statusCodes.includes(e.response.status))throw e;const t=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(t&&this.#A.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(t);Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now());const r=this.#A.retry.maxRetryAfter??e;return e<r?e:r}if(413===e.response.status)throw e}return this.#_()}#I(e){return this.#A.parseJson&&(e.json=async()=>this.#A.parseJson(await e.text())),e}#k(e){e&&e.cancel().catch(()=>{})}#P(e){this.#k(e.body??void 0)}async#x(e){try{return await e()}catch(t){const r=Math.min(await this.#j(t),2147483647);if(this.#O<1)throw t;if(await async function(e,{signal:t}){return new Promise((r,s)=>{function o(){clearTimeout(n),s(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));const n=setTimeout(()=>{t?.removeEventListener("abort",o),r()},e)})}(r,this.#U?{signal:this.#U}:{}),t instanceof H&&t.customRequest){const e=this.#A.signal?new globalThis.Request(t.customRequest,{signal:this.#A.signal}):new globalThis.Request(t.customRequest);this.#F(e)}for(const e of this.#A.hooks.beforeRetry){const r=await e({request:this.request,options:this.#C(),error:t,retryCount:this.#O});if(r instanceof globalThis.Request){this.#F(r);break}if(r instanceof globalThis.Response)return r;if(r===K)return}return this.#x(e)}}async#E(){this.#N?.signal.aborted&&(this.#N=new globalThis.AbortController,this.#A.signal=this.#U?AbortSignal.any([this.#U,this.#N.signal]):this.#N.signal,this.request=new globalThis.Request(this.request,{signal:this.#A.signal}));for(const t of this.#A.hooks.beforeRequest){const e=await t(this.request,this.#C(),{retryCount:this.#O});if(e instanceof Response)return e;if(e instanceof globalThis.Request){this.#F(e);break}}const e=((e,t)=>{const r={};for(const s in t)Object.hasOwn(t,s)&&(s in se||s in te||s in e&&!(s in re)||(r[s]=t[s]));return r})(this.request,this.#A);return this.#q=this.request,this.request=this.#q.clone(),!1===this.#A.timeout?this.#A.fetch(this.#q,e):async function(e,t,r,s){return new Promise((o,n)=>{const i=setTimeout(()=>{r&&r.abort(),n(new me(e))},s.timeout);s.fetch(e,t).then(o).catch(n).then(()=>{clearTimeout(i)})})}(this.#q,e,this.#N,this.#A)}#C(){if(!this.#L){const{hooks:e,...t}=this.#A;this.#L=Object.freeze(t)}return this.#L}#F(e){this.#L=void 0,this.request=this.#Q(e)}#Q(e,t){return this.#A.onUploadProgress&&e.body?((e,t,r)=>{if(!e.body)return e;const s=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[r,s]of e)t+=Y,t+=(new TextEncoder).encode(`Content-Disposition: form-data; name="${r}"`).length,t+="string"==typeof s?(new TextEncoder).encode(s).length:s.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if("string"==typeof e)return(new TextEncoder).encode(e).length;if(e instanceof URLSearchParams)return(new TextEncoder).encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if("object"==typeof e&&null!==e)try{const t=JSON.stringify(e);return(new TextEncoder).encode(t).length}catch{return 0}return 0})(r??e.body);return new Request(e,{duplex:"half",body:oe(e.body,s,t)})})(e,this.#A.onUploadProgress,t??this.#A.body??void 0):e}},ge=e=>{const t=(t,r)=>ye.create(t,ie(e,r));for(const r of G)t[r]=(t,s)=>ye.create(t,ie(e,s,{method:r}));return t.create=e=>ge(ie(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),ge(ie(e,t))),t.stop=K,t.retry=ee,t},we=ge();function be({title:e,children:t}){/* @__PURE__ */
2
+ return h("div",{className:"mx-auto mt-24 w-fit max-w-xl space-y-8",children:[/* @__PURE__ */h("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mx-auto h-64 w-fit",width:"800",height:"469.317",viewBox:"0 0 800 469.317",role:"img","aria-label":"Error illustration",children:/* @__PURE__ */h("g",{transform:"translate(-443.142 -257.876)",children:[
3
+ /* @__PURE__ */h("path",{d:"M898.247,664.1H371.155a30.276,30.276,0,0,1-30.241-30.241V352.525a30.276,30.276,0,0,1,30.241-30.241H898.247a30.276,30.276,0,0,1,30.241,30.241V633.862A30.276,30.276,0,0,1,898.247,664.1Z",transform:"translate(308.867 25.517)",fill:"#fff"}),
4
+ /* @__PURE__ */h("path",{d:"M557.334,341.82H30.241A30.276,30.276,0,0,1,0,311.578V30.241A30.276,30.276,0,0,1,30.241,0H557.334a30.276,30.276,0,0,1,30.241,30.241V311.578A30.276,30.276,0,0,1,557.334,341.82ZM30.241,1.833A28.441,28.441,0,0,0,1.833,30.241V311.578a28.441,28.441,0,0,0,28.409,28.409H557.334a28.441,28.441,0,0,0,28.409-28.409V30.241A28.441,28.441,0,0,0,557.334,1.833Z",transform:"matrix(0.999, -0.035, 0.035, 0.999, 643.995, 358.158)",fill:"#d6d6e3"}),
5
+ /* @__PURE__ */h("path",{d:"M754.171,630.2l-509.5-135.058a30.276,30.276,0,0,1-21.483-36.981L295.28,186.212a30.276,30.276,0,0,1,36.981-21.483l509.5,135.058a30.276,30.276,0,0,1,21.483,36.981L791.152,608.712A30.276,30.276,0,0,1,754.171,630.2Z",transform:"translate(220.958 94.156)",fill:"#f2f2f2"}),
6
+ /* @__PURE__ */h("path",{d:"M775.247,705.1H248.155a30.276,30.276,0,0,1-30.241-30.241V393.525a30.276,30.276,0,0,1,30.241-30.241H775.247a30.276,30.276,0,0,1,30.241,30.242V674.862A30.275,30.275,0,0,1,775.247,705.1Z",transform:"translate(319.149 22.09)",fill:"#fff"}),
7
+ /* @__PURE__ */h("path",{d:"M638.653,701.841H298.272c-.426,0-.852-.009-1.272-.033l160.985-90.663c3.065-1.762,9.943-2.382,15.361-1.385a13.912,13.912,0,0,1,4.26,1.385l108.041,60.842,5.176,2.911Z",transform:"translate(312.538 1.526)",fill:"#e6e6e6"}),
8
+ /* @__PURE__ */h("path",{d:"M760.145,704.279h-294.4l57.049-26.943L526.9,675.4l74.341-35.111c4.874-2.3,16.6-2.445,22.328-.434q.577.206,1.071.434Z",transform:"translate(298.432 -0.912)",fill:"#e6e6e6"}),
9
+ /* @__PURE__ */h("path",{d:"M248.322,365.284a28.441,28.441,0,0,0-28.409,28.409V675.03a28.441,28.441,0,0,0,28.409,28.409H775.415a28.441,28.441,0,0,0,28.409-28.409V393.693a28.441,28.441,0,0,0-28.409-28.409Z",transform:"translate(318.982 21.923)",fill:"#3f3d56"}),
10
+ /* @__PURE__ */h("path",{d:"M777.254,685.116H250.161a8.257,8.257,0,0,1-8.248-8.248V395.532a8.257,8.257,0,0,1,8.248-8.248H777.254a8.257,8.257,0,0,1,8.248,8.248V676.869a8.257,8.257,0,0,1-8.248,8.248Zm-527.092-296a6.422,6.422,0,0,0-6.415,6.415V676.869a6.422,6.422,0,0,0,6.415,6.415H777.254a6.422,6.422,0,0,0,6.415-6.415V395.532a6.422,6.422,0,0,0-6.415-6.415Z",transform:"translate(317.143 20.083)",fill:"#ccc"}),
11
+ /* @__PURE__ */h("ellipse",{cx:"71.849",cy:"89.934",rx:"71.849",ry:"89.934",transform:"translate(928.82 428.806)",fill:"#f2f2f2"}),
12
+ /* @__PURE__ */h("path",{d:"M505.77,325.365h.2l3.553,203.7h-7.5Z",transform:"translate(495.097 175.29)",fill:"#ccc"}),
13
+ /* @__PURE__ */h("path",{d:"M736.239,636.154h0a1.776,1.776,0,0,1-.744,2.4l-10.3,5.425-1.655-3.144,10.3-5.425A1.776,1.776,0,0,1,736.239,636.154Z",transform:"translate(276.882 -0.641)",fill:"#ccc"}),
14
+ /* @__PURE__ */h("ellipse",{cx:"71.849",cy:"89.934",rx:"71.849",ry:"89.934",transform:"translate(722.256 428.806)",fill:"#f2f2f2"}),
15
+ /* @__PURE__ */h("path",{d:"M510.532,627.307h0a1.777,1.777,0,0,0-2.4-.744l-7.194,3.788-2.464-141.27h-.2l-3.75,203.7h7.5l-1.02-58.456,8.78-4.622A1.777,1.777,0,0,0,510.532,627.307Z",transform:"translate(296.026 11.574)",fill:"#ccc"}),
16
+ /* @__PURE__ */h("path",{d:"M626.318,603.854a2.25,2.25,0,0,0-3.04-.943l-9.116,4.8-3.122-179h-.25l-4.752,258.115h9.5l-1.292-74.07,11.125-5.857a2.251,2.251,0,0,0,.943-3.04Z",transform:"translate(286.704 16.621)",fill:"#3f3d56"}),
17
+ /* @__PURE__ */h("path",{d:"M777.247,703.1H250.155a30.276,30.276,0,0,1-30.241-30.241V391.525a30.276,30.276,0,0,1,30.241-30.241H777.247a30.276,30.276,0,0,1,30.241,30.241V672.862A30.276,30.276,0,0,1,777.247,703.1Z",transform:"translate(318.982 22.257)",fill:"#fff"}),
18
+ /* @__PURE__ */h("path",{d:"M671.188,708.113h-370.8c-.464,0-.928-.01-1.386-.036l175.372-98.766c3.339-1.919,10.831-2.595,16.734-1.509a15.16,15.16,0,0,1,4.641,1.509l117.7,66.28,5.639,3.172Z",transform:"translate(288.046 16.168)",fill:"#f2f2f2"}),
19
+ /* @__PURE__ */h("path",{d:"M788.457,708.163H467.743l62.148-29.351,4.472-2.114,80.984-38.25c5.309-2.507,18.082-2.663,24.324-.473q.629.224,1.166.473Z",transform:"translate(287.761 16.118)",fill:"#f2f2f2"}),
20
+ /* @__PURE__ */h("path",{d:"M777.247,703.1H250.155a30.276,30.276,0,0,1-30.241-30.241V391.525a30.276,30.276,0,0,1,30.241-30.241H777.247a30.276,30.276,0,0,1,30.241,30.241V672.862A30.276,30.276,0,0,1,777.247,703.1ZM250.155,363.117a28.441,28.441,0,0,0-28.409,28.409V672.862a28.441,28.441,0,0,0,28.409,28.409H777.247a28.441,28.441,0,0,0,28.409-28.409V391.525a28.441,28.441,0,0,0-28.409-28.409Z",transform:"translate(318.982 22.257)",fill:"#3f3d56"}),
21
+ /* @__PURE__ */h("g",{transform:"translate(696.754 297.373)",children:[
22
+ /* @__PURE__ */h("ellipse",{cx:"61.798",cy:"61.798",rx:"61.798",ry:"61.798",transform:"translate(215.662 36.955)",fill:"#ff6584"}),
23
+ /* @__PURE__ */h("ellipse",{cx:"78.271",cy:"97.971",rx:"78.271",ry:"97.971",transform:"translate(225.025 127.808)",fill:"#e6e6e6"}),
24
+ /* @__PURE__ */h("path",{d:"M508.105,323.365h.215l3.87,221.909h-8.171Z",transform:"translate(-204.593 -117.286)",fill:"#ccc"}),
25
+ /* @__PURE__ */h("path",{d:"M739.374,634.239h0a1.935,1.935,0,0,1-.811,2.614l-11.226,5.91-1.8-3.425,11.226-5.91A1.935,1.935,0,0,1,739.374,634.239Z",transform:"translate(-422.513 -281.249)",fill:"#ccc"}),
26
+ /* @__PURE__ */h("ellipse",{cx:"78.271",cy:"97.971",rx:"78.271",ry:"97.971",transform:"translate(0 127.808)",fill:"#e6e6e6"}),
27
+ /* @__PURE__ */h("path",{d:"M513.962,637.661h0a1.936,1.936,0,0,0-2.614-.811l-7.837,4.126-2.684-153.9h-.215l-4.085,221.91H504.7l-1.111-63.68,9.565-5.036A1.936,1.936,0,0,0,513.962,637.661Z",transform:"translate(-422.126 -281.002)",fill:"#ccc"}),
28
+ /* @__PURE__ */h("path",{d:"M612.666,280.653c54.774,0,99.294,103.207,99.294,171.768s-44.4,124.14-99.177,124.14-99.177-55.579-99.177-124.14S557.892,280.653,612.666,280.653Z",transform:"translate(-422.155 -280.653)",fill:"currentColor"}),
29
+ /* @__PURE__ */h("path",{d:"M630.131,617.508a2.452,2.452,0,0,0-3.312-1.027l-9.931,5.228-3.4-195h-.272L608.039,707.89h10.353l-1.408-80.69,12.119-6.38A2.452,2.452,0,0,0,630.131,617.508Z",transform:"translate(-422.315 -280.9)",fill:"#3f3d56"})]})]})}),/* @__PURE__ */h("div",{className:"space-y-4",children:[/* @__PURE__ */h("h4",{className:"text-foreground text-center text-lg font-semibold",children:e}),/* @__PURE__ */h("p",{className:"text-muted-foreground text-center",children:t})]})]})}function Re({organizationId:e,errorType:t}){/* @__PURE__ */
30
+ return h(be,"custom-auth-invalid"===t?{title:"Invalid input",children:"Custom auth mode requires uid, fname, lname. For more details please contact Qrati support."}:{title:"page-not-registered"===t?"Page not registered":"Something went wrong",children:["If you are an admin of this organization, please add the current page URL in Allowed URLs under"," ",
31
+ /* @__PURE__ */h("a",{className:"font-medium text-blue-500",href:u.ORGANIZATION_SETTINGS(e),target:"_blank",rel:"noreferrer",children:"Organization Settings"})," ","⇨"," ",
32
+ /* @__PURE__ */h("a",{className:"font-medium text-blue-500",href:u.ORGANIZATION_SETTINGS_INTEGRATION(e),target:"_blank",rel:"noreferrer",children:"Integration Settings"}),". For more details please contact Qrati support."]})}var ve=e=>({google:"Google",apple:"Apple"}[e]||e.charAt(0).toUpperCase()+e.slice(1)),Se=(e,t=0)=>{let r=t^e.length,s=0;const o=e.length;for(;s+3<o;){let t=255&e.charCodeAt(s)|(255&e.charCodeAt(s+1))<<8|(255&e.charCodeAt(s+2))<<16|(255&e.charCodeAt(s+3))<<24;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),r^=t,r=r<<13|r>>>19,r=Math.imul(r,5)+3864292196,s+=4}let n=0;switch(o-s){case 3:n^=(255&e.charCodeAt(s+2))<<16;case 2:n^=(255&e.charCodeAt(s+1))<<8;case 1:n^=255&e.charCodeAt(s),n=Math.imul(n,3432918353),n=n<<15|n>>>17,n=Math.imul(n,461845907),r^=n}return r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),r^=r>>>16,r>>>=0,r.toString(16).padStart(8,"0")},Te=async e=>{try{return await e()}catch{return null}},xe=e=>{if(null===e||"object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(xe).join(",")}]`;const t=Object.keys(e).sort(),r=[];for(const s of t){const t=e[s];void 0!==t&&r.push(`${xe(s)}:${xe(t)}`)}return`{${r.join(",")}}`},Ae=async({debug:e=!1}={})=>{const t=await Te(()=>Pe()),r=await Te(()=>new Intl.NumberFormat(window.navigator.languages?.[0]||"en").resolvedOptions().numberingSystem),s=window.navigator.languages?Array.from(window.navigator.languages).join(","):window.navigator.language||null,o=Intl.DateTimeFormat().resolvedOptions().timeZone,n=/* @__PURE__ */(new Date).getTimezoneOffset(),i=window.matchMedia("(prefers-reduced-motion: reduce)").matches?"reduce":"no-preference",a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",l=window.matchMedia("(forced-colors: active)").matches?"active":null,{pixelDepth:c,colorDepth:h}=window.screen,u="ontouchstart"in window||window.navigator.maxTouchPoints>0,d=await Te(()=>Ee(e)),f=await Te(()=>Ie()),p=await Te(()=>Ce(e)),m=await Te(()=>Oe(e)),y=window.screen.width&&window.screen.height?(window.screen.width/window.screen.height).toFixed(4):null,g={vendor:window.navigator.vendor||null,platform:window.navigator.platform||null,fonts:t,numberingSystem:r,languages:s,timezone:o,timezoneOffset:n,reducedMotion:i,colorScheme:a,hardwareConcurrency:window.navigator.hardwareConcurrency||null,deviceMemory:window.navigator.deviceMemory||null,forcedColors:l,pixelDepth:c,colorDepth:h,touchSupport:u,canvasID:d,webglID:f,webgpuID:p,audioID:m},w={aspectRatio:y,width:window.screen.width,height:window.screen.height,maxTouchPoints:window.navigator.maxTouchPoints};return(!0===navigator.userAgentData?.mobile||/Mobi|Android|iPhone|iPad|iPod|webOS|BlackBerry|Windows Phone/i.test(navigator.userAgent)||navigator.maxTouchPoints>0&&matchMedia("(pointer:coarse)").matches&&innerWidth<=1024)&&Object.assign(g,w),{fingerprint:Se(xe(g)),...g}},Ee=async e=>{const t=document.createElement("canvas");t.width=280,t.height=100;const r=t.getContext("2d"),s=r.createLinearGradient(0,0,280,100);return s.addColorStop(0,"#f60"),s.addColorStop(.4,"#09f"),s.addColorStop(.7,"#f09"),s.addColorStop(1,"#0f9"),r.fillStyle=s,r.fillRect(0,0,280,100),r.font='18px "Arial","Helvetica","DejaVu Sans",sans-serif',r.fillStyle="#000",r.textBaseline="alphabetic",r.fillText("Fingerprint ¼½¾™©®∆π∑€¶§",12,45),r.font='bold 22px "Georgia","Times New Roman",serif',r.fillStyle="#222",r.fillText("🦊🐱🚀 2026",12,78),r.globalAlpha=.7,r.fillStyle="rgba(255, 80, 0, 0.35)",r.fillRect(180,20,80,60),r.beginPath(),r.arc(220,50,32,0,2*Math.PI),r.strokeStyle="#fff",r.lineWidth=4,r.stroke(),r.beginPath(),r.moveTo(30,85),r.quadraticCurveTo(140,20,240,85),r.strokeStyle="#00f",r.lineWidth=3,r.stroke(),e&&(t.style.border="1px solid #444",document.body.appendChild(t)),Se(t.toDataURL("image/png"))},Ie=()=>{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl"),r=t.getExtension("WEBGL_debug_renderer_info");return Se(xe({vendor:r?t.getParameter(r.UNMASKED_VENDOR_WEBGL):t.getParameter(t.VENDOR),renderer:r?t.getParameter(r.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER)}))},Ce=async e=>{const t=await navigator.gpu.requestAdapter({powerPreference:"high-performance"}),r={vendor:t.info?.vendor??"",architecture:t.info?.architecture??"",description:t.info?.description??"",features:Array.from(t.features).sort(),limits:Array.from(t.limits).sort()};if(e){const e=document.createElement("pre");e.style.margin="10px 0",e.style.padding="10px",e.style.border="1px solid #444",e.style.background="#111",e.style.color="#0f8",e.style.fontFamily="monospace",e.textContent=`WebGPU:\n${JSON.stringify(r,null,2)}`,document.body.appendChild(e)}return Se(xe(r))},Oe=async e=>{const t=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,6e3,44100),r=t.createOscillator();r.type="sawtooth",r.frequency.value=8800;const s=t.createDynamicsCompressor();s.threshold.value=-48,s.knee.value=30,s.ratio.value=14,s.attack.value=0,s.release.value=.3;const o=t.createGain();o.gain.value=.4,r.connect(s),s.connect(o),o.connect(t.destination),r.start(0);const n=(await t.startRendering()).getChannelData(0);let i=0,a=0;for(let c=3e3;c<5800;c+=2){const e=n[c];i=31*i+Math.floor(1e5*(e+1))|0,a=Math.imul(a^Math.floor(98765*e),2246822519)}const l=i>>>0^a>>>0;if(e){const e=document.createElement("canvas");e.width=500,e.height=120,e.style.border="1px solid #444",e.style.margin="10px 0",e.title="Audio buffer snippet (4500–5000 samples)";const t=e.getContext("2d");t.fillStyle="#111",t.fillRect(0,0,e.width,e.height),t.font="14px monospace",t.fillStyle="#0f8",t.textAlign="left",t.fillText("AudioID",10,20),t.strokeStyle="#0f8",t.lineWidth=1.5,t.beginPath();const r=Array.from(n.slice(4500,5e3)),s=e.width/r.length;for(let o=0;o<r.length;o++){const n=o*s,i=(r[o]+1)/2*e.height;0===o?t.moveTo(n,i):t.lineTo(n,i)}t.stroke(),document.body.appendChild(e)}return Se(l.toString(16))},Pe=()=>{const e=["monospace","serif","sans-serif"],t=["Arial","Helvetica","Verdana","Trebuchet MS","Comic Sans MS","Georgia","Times New Roman","Courier New","Segoe UI","Roboto","Open Sans","Noto Sans","system-ui","-apple-system","BlinkMacSystemFont"],r=document.createElement("span");r.style.fontSize="72px",r.style.position="absolute",r.style.visibility="hidden",r.style.whiteSpace="nowrap",r.textContent="mmmmmmmmmwwwwwww",document.body.appendChild(r);const s={};for(const n of e)r.style.fontFamily=n,s[n]=r.offsetWidth;const o=[];for(const n of t){let t=!1;for(const i of e)if(r.style.fontFamily=`"${n}", ${i}`,r.offsetWidth!==s[i]){o.push(n),t=!0;break}t||(r.style.fontFamily=`"${n}"`,r.offsetWidth!==s.monospace&&r.offsetWidth!==s.serif&&o.push(n))}return document.body.removeChild(r),o.length?o.sort().join(","):null};"undefined"!=typeof window&&(window.getBrowserFingerprint=Ae);var qe=async(e,t)=>{if(e instanceof F){try{const t=await e.response.json();if(t?.error)return t.error;if(t?.message)return t.message;if("INVALID_EMAIL_OR_PASSWORD"===t?.code)return"Invalid email or password"}catch{return t||e.message}return t||e.message}return e instanceof Error?t||e.message:t||String(e)},ke=a(void 0),De=({props:e={},children:t})=>{const{organizationId:s,uid:i,fname:a,lname:l,theme:u="light"}=e,[d,p]=o(()=>{if("undefined"==typeof window)return null;if(i||a||l)return null;const e=localStorage.getItem("qrati_token");return e?{token:e}:null}),{isLoading:m,data:y,error:g}=j({queryKey:[n.QRATI_CONNECT_SESSION,s,i??null,a??null,l??null],queryFn:async()=>{const e=await(async()=>{const e=await Ae();return"string"==typeof e?e:e?.fingerprint})();return(await we.post(T.INITIALIZE_SESSION,{json:{uid:i,fname:a,lname:l,browserFingerprint:e},headers:{"x-org-id":s,Authorization:i||a||l||!localStorage.getItem("qrati_token")?void 0:`Bearer ${localStorage.getItem("qrati_token")}`}}).json()).data},enabled:!!s});c(()=>{const e=y?.authSession?.session?.token,t=y?.authSession?.user;t&&e?(p({...t,token:e}),y?.organization?.customAuth||localStorage.setItem("qrati_token",e)):y?.organization?.customAuth&&i&&a&&l&&p(e=>e??{uid:i,name:`${a} ${l}`,fname:a,lname:l})},[y]);const w=f(()=>v(y?.organization?.integrationSettings,y?.organization?.customFontUrl),[y?.organization?.integrationSettings,y?.organization?.customFontUrl]),b=async e=>{try{const t=await((e,t,r)=>new Promise((s,o)=>{if(!e)return void o(/* @__PURE__ */new Error("Provider is required"));if(!t)return void o(/* @__PURE__ */new Error("Organization ID is required"));const n=new URL(`${r}/qc-social-auth`);n.searchParams.set("provider",e),n.searchParams.set("organizationId",t),n.searchParams.set("origin",window.location.origin);const i=(window.screen.width-500)/2,a=(window.screen.height-600)/2,l=window.open(n.toString(),"qrati_social_auth",`width=500,height=600,left=${i},top=${a},scrollbars=yes,resizable=yes,status=yes`);if(!l)return void o(/* @__PURE__ */new Error("Failed to open popup window. Please allow popups and try again."));const c=()=>{clearInterval(u),clearTimeout(d),window.removeEventListener("message",h)},h=e=>{try{const t=new URL(r).origin;if(e.origin!==t)return void console.warn("Origin mismatch:",e.origin,"expected:",t)}catch(u){console.warn("Could not parse origin for verification")}const{type:n,data:i,error:a,organizationId:h}=e.data||{};if(h===t)switch(n){case"QRATI_SOCIAL_AUTH_SUCCESS":c(),l.close(),s({user:i.user,session:i.session,token:i.token});break;case"QRATI_SOCIAL_AUTH_ERROR":console.error("Authentication error:",a),c(),l.close(),o(new Error(a||"Social authentication failed"));break;case"QRATI_SOCIAL_AUTH_CANCELLED":c(),l.close(),o(/* @__PURE__ */new Error("Authentication was cancelled"))}else console.warn("Organization ID mismatch:",h,"expected:",t)},u=setInterval(()=>{try{l.closed&&(c(),o(/* @__PURE__ */new Error("Authentication was cancelled")))}catch(e){}},1e3);window.addEventListener("message",h);const d=setTimeout(()=>{c(),l.closed||l.close(),o(/* @__PURE__ */new Error("Authentication timeout. Please try again."))},3e5)}))(e,s??"","https://qrati.com");return t?.user&&t?.token&&(p({...t.user,token:t.token}),localStorage.setItem("qrati_token",t.token)),t}catch(g){throw console.error("Social login error:",g),g}};return g?/* @__PURE__ */h(r,{fallback:null,children:/* @__PURE__ */h(Re,{organizationId:s??"",errorType:401===g?.response?.status?"page-not-registered":"generic-error"})}):!y?.organization?.customAuth||i&&a&&l?/* @__PURE__ */h(ke.Provider,{value:{props:e,initializing:m,sessionId:y?.sessionId,organization:y?.organization,folders:y?.folders,loadingUser:m,user:d,updateUser:async e=>{p(t=>{const r={...t,...e};return r?.token&&localStorage.setItem("qrati_token",r.token),r})},registerUsingEmail:async(e,t,r,o)=>{try{const n=await we.post(T.REGISTER,{json:{email:e,password:t,fname:r,lname:o},headers:{"x-org-id":s}}).json();return n.error?{error:n.error}:(p({...n.user,token:n.token}),localStorage.setItem("qrati_token",n.token),n)}catch(g){return{error:await qe(g,"Registration failed")}}},loginWithGoogle:async()=>{try{return await b("google")}catch(g){throw console.error("Google login error:",g),g}},loginWithApple:async()=>{try{return await b("apple")}catch(g){throw console.error("Apple login error:",g),g}},loginUsingEmail:async(e,t)=>{try{const r=await we.post(T.LOGIN,{json:{email:e,password:t},headers:{"x-org-id":s}}).json();return r.error?{error:r.error}:(p({...r.user,token:r.token}),localStorage.setItem("qrati_token",r.token),r)}catch(g){return{error:await qe(g,"Invalid email or password")}}},sendPasswordResetCode:async e=>{try{const t=await we.post(T.SEND_PASSWORD_RESET_CODE,{json:{email:e.toLowerCase()},headers:{"x-org-id":s}}).json();return t.error?{error:t.error}:t}catch(g){return{error:await qe(g,"Failed to send password reset code")}}},verifyPasswordResetCode:async(e,t)=>{try{const r=await we.post(T.VERIFY_PASSWORD_RESET_CODE,{json:{email:e.toLowerCase(),code:t},headers:{"x-org-id":s}}).json();return r.error?{error:r.error}:r}catch(g){return{error:await qe(g,"Invalid code, please check your email")}}},resetPassword:async(e,t)=>{try{const r=await we.post(T.RESET_PASSWORD,{json:{passwordResetCodeId:e,newPassword:t},headers:{"x-org-id":s}}).json();return r.error?{error:r.error}:r}catch(g){return{error:g?.message}}},signout:async()=>{try{const e=await we.post(T.LOGOUT,{headers:{"x-org-id":s,Authorization:`Bearer ${d?.token}`}}).json();return e.error?{error:e.error}:(localStorage.removeItem("qrati_token"),p(null),e)}catch(g){return console.error(g),{error:g?.message}}},error:g},children:/* @__PURE__ */h("div",{id:"qrati-connect-container",style:{...E(y?.organization,u),fontFamily:"var(--font-family)"},className:I("bg-background text-foreground relative min-h-[80vh]"),children:[w?/* @__PURE__ */h("style",{children:w}):null,t]})}):/* @__PURE__ */h(r,{fallback:null,children:/* @__PURE__ */h(Re,{organizationId:s??"",errorType:"custom-auth-invalid"})})},Ne=()=>{const e=S(ke);if(void 0===e)throw new Error("useSession must be used within SessionProvider");return e};export{we as a,q as c,ve as i,Ne as n,j as o,Ae as r,_ as s,De as t};
@@ -1 +1 @@
1
- import{Mt as e,N as n,Nt as t,j as r,wt as o}from"./wHbQZdly.js";import{t as a}from"./CUOOhGTj.js";import{o as s}from"./DPOkh0eJ.js";import{t as i}from"./B28y50Bi.js";var l=new a,c=(e,o)=>{t(/* @__PURE__ */n(r,{client:l,children:/* @__PURE__ */n(s,{children:/* @__PURE__ */n(i,{event:e})})}),o)},d=({events:t,apiKey:r})=>{const a=o(null),s=o(null);return e(()=>{if(a.current&&!s.current)return(async()=>{const{setOptions:e,importLibrary:n}=await import("./DSjmSa7l.js");e({key:r,v:"weekly"}),await Promise.all([n("maps"),n("marker")]);const o=window.google.maps;if(!a.current)return;const i=new o.Map(a.current,{mapId:"DEMO_MAP_ID",renderingType:"VECTOR",mapTypeId:"roadmap",center:{lat:20,lng:0},zoom:2,mapTypeControl:!1,streetViewControl:!1});o.event.addListenerOnce(i,"idle",()=>{i.getRenderingType?.()!==o.RenderingType?.VECTOR&&console.warn("Google Maps fell back to raster rendering; globe view is unavailable in raster mode.")}),s.current=i;const l=t.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===l.length)return;const d=new o.LatLngBounds,p=new o.InfoWindow({maxWidth:200});for(const t of l){const e=t.location.x,n={lat:t.location.y,lng:e};d.extend(n);const r=document.createElement("div");r.style.cssText="\n width: 28px; height: 28px; cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n ";const a=new o.marker.AdvancedMarkerElement({map:i,position:n,content:r});a.addEventListener("gmp-click",()=>{const e=document.createElement("div");c(t,e),p.setContent(e),p.open({anchor:a,map:i})})}i.fitBounds(d)})(),()=>{s.current=null}},[r]),/* @__PURE__ */n("div",{ref:a,class:"size-full"})};export{d as default};
1
+ import{Mt as e,N as n,Nt as t,j as r,wt as o}from"./BiQECCnr.js";import{t as a}from"./DXPR6JWg.js";import{o as s}from"./COUnPxHl.js";import{t as i}from"./DGeYAYfl.js";var l=new a,c=(e,o)=>{t(/* @__PURE__ */n(r,{client:l,children:/* @__PURE__ */n(s,{children:/* @__PURE__ */n(i,{event:e})})}),o)},d=({events:t,apiKey:r})=>{const a=o(null),s=o(null);return e(()=>{if(a.current&&!s.current)return(async()=>{const{setOptions:e,importLibrary:n}=await import("./CjmNvKgB.js");e({key:r,v:"weekly"}),await Promise.all([n("maps"),n("marker")]);const o=window.google.maps;if(!a.current)return;const i=new o.Map(a.current,{mapId:"DEMO_MAP_ID",renderingType:"VECTOR",mapTypeId:"roadmap",center:{lat:20,lng:0},zoom:2,mapTypeControl:!1,streetViewControl:!1});o.event.addListenerOnce(i,"idle",()=>{i.getRenderingType?.()!==o.RenderingType?.VECTOR&&console.warn("Google Maps fell back to raster rendering; globe view is unavailable in raster mode.")}),s.current=i;const l=t.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===l.length)return;const d=new o.LatLngBounds,p=new o.InfoWindow({maxWidth:200});for(const t of l){const e=t.location.x,n={lat:t.location.y,lng:e};d.extend(n);const r=document.createElement("div");r.style.cssText="\n width: 28px; height: 28px; cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n ";const a=new o.marker.AdvancedMarkerElement({map:i,position:n,content:r});a.addEventListener("gmp-click",()=>{const e=document.createElement("div");c(t,e),p.setContent(e),p.open({anchor:a,map:i})})}i.fitBounds(d)})(),()=>{s.current=null}},[r]),/* @__PURE__ */n("div",{ref:a,class:"size-full"})};export{d as default};
@@ -1 +1 @@
1
- import{r as e}from"./2R3GoXB1.js";import{Mt as t,N as r,Nt as n,j as o,wt as i}from"./wHbQZdly.js";import{t as a}from"./CUOOhGTj.js";import{o as s}from"./DPOkh0eJ.js";import{t as l}from"./B28y50Bi.js";var c=new a,u=(e,t)=>{n(/* @__PURE__ */r(o,{client:c,children:/* @__PURE__ */r(s,{children:/* @__PURE__ */r(l,{event:e})})}),t)},d=({events:n,apiKey:o,is3D:a})=>{const s=i(null),l=i(null),c=i(a);return t(()=>{if(!s.current||l.current)return;let t;return(async()=>{const r=(await import("./DMDEuqn7.js").then(t=>/* @__PURE__ */e(t.default,1))).default;if(await Promise.resolve({ }),!s.current)return;const i=new r.Map({container:s.current,style:`https://api.maptiler.com/maps/streets-v2/style.json?key=${o}`,center:[0,20],zoom:2,pitch:0,bearing:0,projection:c.current?{type:"globe"}:{type:"mercator"},canvasContextAttributes:{antialias:!0}});l.current=i,i.on("load",()=>{const e=i.getStyle()?.layers??[];let t,o;for(const r of e){const e=r;"symbol"===e.type&&e.layout?.["text-field"]&&!t&&(t=r.id),"building"!==e["source-layer"]||o||(o=e.source)}o&&!i.getLayer("3d-buildings")&&i.addLayer({id:"3d-buildings",source:o,"source-layer":"building",filter:["has","render_height"],type:"fill-extrusion",minzoom:14,paint:{"fill-extrusion-color":["interpolate",["linear"],["get","render_height"],0,"lightgray",200,"royalblue",400,"lightblue"],"fill-extrusion-height":["interpolate",["linear"],["zoom"],14,0,15,["get","render_height"]],"fill-extrusion-base":["case",["has","render_min_height"],["get","render_min_height"],0],"fill-extrusion-opacity":.6}},t);const a=n.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===a.length)return;const s=new r.LngLatBounds;for(const n of a){const e=n.location.x,t=n.location.y;s.extend([e,t]);const o=document.createElement("div");o.className="qrati-map-marker",o.style.cssText="\n width: 32px; height: 32px; cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n ";const a=document.createElement("div");u(n,a);const l=new r.Popup({closeButton:!0,closeOnClick:!1,maxWidth:"none",offset:[0,-34]}).setDOMContent(a);new r.Marker({element:o}).setLngLat([e,t]).setPopup(l).addTo(i)}s.isEmpty()||i.fitBounds(s,{padding:{top:60,bottom:60,left:60,right:60},maxZoom:14,animate:!0,duration:1200})}),t=()=>{i.remove(),l.current=null}})(),()=>{t?.()}},[o]),t(()=>{l.current&&(c.current=a,l.current.setProjection(a?{type:"globe"}:{type:"mercator"}),l.current.easeTo({pitch:0,bearing:0,duration:600}))},[a]),/* @__PURE__ */r("div",{ref:s,class:"size-full"})};export{d as default};
1
+ import{r as e}from"./2R3GoXB1.js";import{Mt as t,N as r,Nt as n,j as o,wt as i}from"./BiQECCnr.js";import{t as a}from"./DXPR6JWg.js";import{o as s}from"./COUnPxHl.js";import{t as l}from"./DGeYAYfl.js";var c=new a,u=(e,t)=>{n(/* @__PURE__ */r(o,{client:c,children:/* @__PURE__ */r(s,{children:/* @__PURE__ */r(l,{event:e})})}),t)},d=({events:n,apiKey:o,is3D:a})=>{const s=i(null),l=i(null),c=i(a);return t(()=>{if(!s.current||l.current)return;let t;return(async()=>{const r=(await import("./BppxGns9.js").then(t=>/* @__PURE__ */e(t.default,1))).default;if(await Promise.resolve({ }),!s.current)return;const i=new r.Map({container:s.current,style:`https://api.maptiler.com/maps/streets-v2/style.json?key=${o}`,center:[0,20],zoom:2,pitch:0,bearing:0,projection:c.current?{type:"globe"}:{type:"mercator"},canvasContextAttributes:{antialias:!0}});l.current=i,i.on("load",()=>{const e=i.getStyle()?.layers??[];let t,o;for(const r of e){const e=r;"symbol"===e.type&&e.layout?.["text-field"]&&!t&&(t=r.id),"building"!==e["source-layer"]||o||(o=e.source)}o&&!i.getLayer("3d-buildings")&&i.addLayer({id:"3d-buildings",source:o,"source-layer":"building",filter:["has","render_height"],type:"fill-extrusion",minzoom:14,paint:{"fill-extrusion-color":["interpolate",["linear"],["get","render_height"],0,"lightgray",200,"royalblue",400,"lightblue"],"fill-extrusion-height":["interpolate",["linear"],["zoom"],14,0,15,["get","render_height"]],"fill-extrusion-base":["case",["has","render_min_height"],["get","render_min_height"],0],"fill-extrusion-opacity":.6}},t);const a=n.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===a.length)return;const s=new r.LngLatBounds;for(const n of a){const e=n.location.x,t=n.location.y;s.extend([e,t]);const o=document.createElement("div");o.className="qrati-map-marker",o.style.cssText="\n width: 32px; height: 32px; cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n ";const a=document.createElement("div");u(n,a);const l=new r.Popup({closeButton:!0,closeOnClick:!1,maxWidth:"none",offset:[0,-34]}).setDOMContent(a);new r.Marker({element:o}).setLngLat([e,t]).setPopup(l).addTo(i)}s.isEmpty()||i.fitBounds(s,{padding:{top:60,bottom:60,left:60,right:60},maxZoom:14,animate:!0,duration:1200})}),t=()=>{i.remove(),l.current=null}})(),()=>{t?.()}},[o]),t(()=>{l.current&&(c.current=a,l.current.setProjection(a?{type:"globe"}:{type:"mercator"}),l.current.easeTo({pitch:0,bearing:0,duration:600}))},[a]),/* @__PURE__ */r("div",{ref:s,class:"size-full"})};export{d as default};