@qratilabs/qrati-connect 2.26.0 → 2.27.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 (57) hide show
  1. package/element/{CVdpS1mF2.js → 1eQ9Ef0M2.js} +3 -3
  2. package/element/B0sEsGHn.js +8 -0
  3. package/element/B9ImRAum.js +1 -0
  4. package/element/{DwanMJWW.js → BKENYwOQ.js} +1 -1
  5. package/element/{DpD2Abx9.js → BLeZg2Bz.js} +1 -1
  6. package/element/{BfPopwQu2.js → BdkTKcG52.js} +8 -8
  7. package/element/{CwPz_TbG.js → BmsDSHUi.js} +1 -1
  8. package/element/{CM46pkhP2.js → BqiJLitq2.js} +1 -1
  9. package/element/{DLSVYuRG.js → BspExsK7.js} +2 -2
  10. package/element/Bspyv2wJ2.js +24 -0
  11. package/element/{D6nJgjWV.js → C4DSwLWc.js} +1 -1
  12. package/element/{CMR1TPJ1.js → C6MqLLDX.js} +1 -1
  13. package/element/C6YE4WUG2.js +5 -0
  14. package/element/C8meSsHD.js +1 -0
  15. package/element/CBM5QMn8.js +1 -0
  16. package/element/CKQOToSD.js +41 -0
  17. package/element/{DDyjgYNE.js → CUBxHQ8u.js} +1 -1
  18. package/element/CeHBrY_i.js +1 -0
  19. package/element/{BXZi_HIE.js → CfTdZB8y.js} +1 -1
  20. package/element/{xW6UboQF.js → CgxypkdG.js} +1 -1
  21. package/element/{DBUAmPz_.js → Cl0CwL5p.js} +1 -1
  22. package/element/DGZEznLT2.js +1 -0
  23. package/element/{Cw3szkAB.js → DLF5ysgi.js} +1 -1
  24. package/element/{BBWyJmHC.js → DOOdI-Oh.js} +1 -1
  25. package/element/DRPgs6nu2.js +16 -0
  26. package/element/{CDUjv5F52.js → DSx5wvUb2.js} +1 -1
  27. package/element/{BmU1kgIz2.js → DVFC5Z2L2.js} +14 -14
  28. package/element/{D9UPX_0d2.js → DWqIpaZ02.js} +1 -1
  29. package/element/{Bt5DH8OK.js → DZGp2V2-.js} +1 -1
  30. package/element/{DER_7fjj2.js → D_FNRN5A2.js} +1 -1
  31. package/element/{OGzsLhnG.js → DdYePHxG.js} +1 -1
  32. package/element/{BlD6lUxS.js → DlAI3J0X.js} +1 -1
  33. package/element/{CE4Zhv-W.js → DmIYOIw1.js} +1 -1
  34. package/element/DmpmrPE5.js +1 -0
  35. package/element/{Cqyszkb5.js → DvisvxzJ.js} +1 -1
  36. package/element/{CtWIgfGz.js → DyemeRjE2.js} +1 -1
  37. package/element/MU5QuIq0.js +3 -0
  38. package/element/{nOtAuUm1.js → QDuBhueG.js} +1 -1
  39. package/element/{Bb4v1eCh2.js → SgRzjPnr.js} +11 -11
  40. package/element/{PRmGsKkz2.js → Vk429P022.js} +1 -1
  41. package/element/{uIYtFcCq2.js → aXvUP7X72.js} +4 -4
  42. package/element/{BvrbBj1F.js → p0Q_2x6C.js} +1 -1
  43. package/element/{CzHEb5lR2.js → qBKIp1ZW2.js} +14 -14
  44. package/element/web.es.js +4 -4
  45. package/element/{CCDjXLSf.js → xJZs5Gan.js} +1 -1
  46. package/package.json +1 -1
  47. package/element/2CzUGwUv.js +0 -1
  48. package/element/BlmPmkho.js +0 -41
  49. package/element/CD7ZeUsI2.js +0 -9
  50. package/element/CitgNM58.js +0 -3
  51. package/element/DAjJ8IJf.js +0 -1
  52. package/element/DhbEeiM3.js +0 -8
  53. package/element/DvW8TE7T.js +0 -1
  54. package/element/KcnPb5CZ.js +0 -1
  55. package/element/PVzBLdl-2.js +0 -5
  56. package/element/VF9qDLJE2.js +0 -1
  57. package/element/b3Wjw4T02.js +0 -16
@@ -1,4 +1,4 @@
1
- import{r as e,t}from"./DdACKOZr.js";import{E as r,_ as i,c as n,d as o,f as a,g as s,h as l,o as d,p as c,s as u,t as h,v as p,y as m}from"./DrrpB4Om.js";import{i as g,n as f,s as v}from"./BlmPmkho.js";import{b,i as y,p as w,s as x,x as S,y as T}from"./DpD2Abx9.js";import{c as C,l as F,n as k,u as _}from"./OGzsLhnG.js";import{t as E}from"./CE4Zhv-W.js";import{t as M}from"./BkIDQGIs.js";import{t as U}from"./CAETItHr.js";import{n as R}from"./BBWyJmHC.js";import{r as I}from"./DGGc10Cy.js";import{t as P}from"./2CzUGwUv.js";import{t as N}from"./CtWIgfGz.js";import{t as q}from"./DPg_DKOi2.js";import{a as O,c as A,i as D,o as L,r as j,s as z,t as $}from"./CBLQRRGX2.js";import{a as B,i as H,n as V,o as W,r as G,t as X}from"./PRmGsKkz2.js";import{t as Y}from"./N4HKgEC52.js";import{n as Q,r as K,t as J}from"./DER_7fjj2.js";var Z=/* @__PURE__ */new Uint8Array(16),ee=[];for(let ln=0;ln<256;++ln)ee.push((ln+256).toString(16).slice(1));function te(e,t,r){return t||e||!crypto.randomUUID?function(e,t,r){const i=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(Z);if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){if((r=r||0)<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=i[e];return t}return function(e,t=0){return(ee[e[t+0]]+ee[e[t+1]]+ee[e[t+2]]+ee[e[t+3]]+"-"+ee[e[t+4]]+ee[e[t+5]]+"-"+ee[e[t+6]]+ee[e[t+7]]+"-"+ee[e[t+8]]+ee[e[t+9]]+"-"+ee[e[t+10]]+ee[e[t+11]]+ee[e[t+12]]+ee[e[t+13]]+ee[e[t+14]]+ee[e[t+15]]).toLowerCase()}(i)}(e,t,r):crypto.randomUUID()}function re({checked:e,defaultChecked:t,onChange:r,onBlur:i,label:n,className:o,disabled:a}){const s=e??t??!1,l=s?"checked":"unchecked";/* @__PURE__ */
1
+ import{r as e,t}from"./DdACKOZr.js";import{E as r,_ as i,c as n,d as o,f as a,g as s,h as l,o as d,p as c,s as u,t as h,v as p,y as m}from"./DrrpB4Om.js";import{i as g,n as f}from"./CKQOToSD.js";import{t as v}from"./DmpmrPE5.js";import{b,i as y,p as w,s as x,x as S,y as T}from"./BLeZg2Bz.js";import{c as C,l as F,n as k,u as _}from"./DdYePHxG.js";import{t as E}from"./DmIYOIw1.js";import{t as M}from"./BkIDQGIs.js";import{t as U}from"./CAETItHr.js";import{n as R}from"./DOOdI-Oh.js";import{r as I}from"./DGGc10Cy.js";import{t as P}from"./CBM5QMn8.js";import{t as N}from"./DyemeRjE2.js";import{t as q}from"./DPg_DKOi2.js";import{a as O,c as A,i as D,o as L,r as j,s as z,t as $}from"./CBLQRRGX2.js";import{a as B,i as H,n as V,o as W,r as G,t as X}from"./Vk429P022.js";import{t as Y}from"./N4HKgEC52.js";import{n as Q,r as K,t as J}from"./D_FNRN5A2.js";var Z=/* @__PURE__ */new Uint8Array(16),ee=[];for(let ln=0;ln<256;++ln)ee.push((ln+256).toString(16).slice(1));function te(e,t,r){return t||e||!crypto.randomUUID?function(e,t,r){const i=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(Z);if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){if((r=r||0)<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=i[e];return t}return function(e,t=0){return(ee[e[t+0]]+ee[e[t+1]]+ee[e[t+2]]+ee[e[t+3]]+"-"+ee[e[t+4]]+ee[e[t+5]]+"-"+ee[e[t+6]]+ee[e[t+7]]+"-"+ee[e[t+8]]+ee[e[t+9]]+"-"+ee[e[t+10]]+ee[e[t+11]]+ee[e[t+12]]+ee[e[t+13]]+ee[e[t+14]]+ee[e[t+15]]).toLowerCase()}(i)}(e,t,r):crypto.randomUUID()}function re({checked:e,defaultChecked:t,onChange:r,onBlur:i,label:n,className:o,disabled:a}){const s=e??t??!1,l=s?"checked":"unchecked";/* @__PURE__ */
2
2
  return h("label",{className:g("flex items-center gap-2",a&&"cursor-not-allowed opacity-50",!a&&"cursor-pointer"),children:[/* @__PURE__ */h("button",{type:"button",role:"switch","aria-checked":s,disabled:a,"data-state":l,onBlur:i,onClick:()=>!a&&r?.(!s),className:g("peer relative inline-flex h-6 w-11 shrink-0 items-center rounded-full border-2 transition-colors","border-border bg-muted","focus-visible:ring-2 focus-visible:ring-offset-2","data-[state=checked]:border-primary data-[state=checked]:bg-primary","disabled:cursor-not-allowed disabled:opacity-50",!a&&"cursor-pointer",o),children:/* @__PURE__ */h("span",{"data-state":l,className:g("pointer-events-none block size-5 translate-x-0 rounded-full shadow transition-transform","border-border bg-background border","data-[state=checked]:bg-primary-foreground data-[state=checked]:translate-x-5 data-[state=checked]:border-transparent")})}),n&&/* @__PURE__ */h("span",{className:"text-sm font-medium",children:n})]})}var ie=["jpg","jpeg","png","webp","heic","tiff","bmp","avif"],ne=["mp4","webm","ogg","mov","avi","flv","wmv","mkv","3gp","m4v","mpg","mpeg"];function oe({open:e,oversizedUids:t,onClose:r,onRemoveAndUpload:i}){const n=Object.values(t),o=n.filter(e=>"image"===e).length,a=n.filter(e=>"video"===e).length,s=[];return o>0&&s.push(`${o} image${o>1?"s":""}`),a>0&&s.push(`${a} video${a>1?"s":""}`),/* @__PURE__ */h(X,{open:e,onOpenChange:e=>!e&&r(),children:/* @__PURE__ */h(V,{children:[/* @__PURE__ */h(B,{children:[/* @__PURE__ */h(W,{children:"Some files are too large"}),/* @__PURE__ */h(G,{children:[s.join(" and ")," exceed",1===n.length?"s":""," the size limit (25 MB for images, 250 MB for videos) and won't be uploaded."]})]}),/* @__PURE__ */h(H,{children:/* @__PURE__ */h(N,{onClick:i,children:"Remove and Upload"})})]})})}function ae({open:e,count:t,onResume:r,onDiscard:i}){/* @__PURE__ */
3
3
  return h(X,{open:e,onOpenChange:e=>!e&&i(),children:/* @__PURE__ */h(V,{children:[/* @__PURE__ */h(B,{children:[/* @__PURE__ */h(W,{children:"Resume your upload?"}),/* @__PURE__ */h(G,{children:["We found ",t," unfinished upload",t>1?"s":""," from your last visit. Resume where you left off, or remove ",t>1?"them":"it"," and start over."]})]}),/* @__PURE__ */h(H,{children:[/* @__PURE__ */h(N,{variant:"outlined",onClick:i,children:"Remove All"}),/* @__PURE__ */h(N,{onClick:r,children:"Resume"})]})]})})}var se=["6a385dabb04f4d8783b14fe1","69ada0f82889f080a9ca53df"],le=({open:e,onClose:t,onSuccess:r})=>{const{t:i}=I(),[n,o]=l(!1),a=f(),s=a.props?.organizationId??a.organization?._id,{user:d,updateUser:c}=a,u=!!s&&se.includes(s.trim()),p=u?"https://qrati.com/terms-of-use-wedding-private-events":"https://qrati.com/terms-of-use",m=u?"https://qrati.com/privacy-policy-wedding-private-events":"https://qrati.com/privacy-policy";/* @__PURE__ */
4
4
  return h(X,{open:e,onOpenChange:e=>!e&&t(),children:/* @__PURE__ */h(V,{children:/* @__PURE__ */h("div",{className:"mx-auto max-w-sm p-4 text-center sm:max-w-lg",children:[
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qratilabs/qrati-connect",
3
- "version": "2.26.0",
3
+ "version": "2.27.0",
4
4
  "description": "Qrati Connect - Preact-based embeddable SDK with React wrapper",
5
5
  "author": "Qrati Labs",
6
6
  "license": "UNLICENSED",
@@ -1 +0,0 @@
1
- import{c as r,n as e,s as a}from"./BlmPmkho.js";import{i as t}from"./DpD2Abx9.js";var o=({eventSlug:o})=>{const{props:s}=e(),n=s?.organizationId,{isLoading:i,data:d,isError:g,error:c}=r({queryKey:[`event-data-${n??""}-${o??""}`],queryFn:async()=>{try{const r=await a.get(t.EVENT_DATA,{searchParams:o?{eventSlug:o}:void 0,headers:{"x-org-id":n}}).json();if(r.error)throw new Error(r.error);return r.data}catch(r){throw new Error(r instanceof Error?r.message:String(r)||"Failed to fetch event data")}},enabled:!!n&&!!o,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:"always"});return{loading:i,event:d?.event,ads:d?.ads,gamConfig:d?.gamConfig,parameters:d?.parameters,isError:g,error:c}};export{o as t};
@@ -1,41 +0,0 @@
1
- import{E as e,_ as t,h as r,p as s,r as o,s as n,t as i,v as a,y as c}from"./DrrpB4Om.js";import{S as u,h as l,i as h}from"./DpD2Abx9.js";var d={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},f=new class{#e=d;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},p="undefined"==typeof window||"Deno"in globalThis;function m(){}function y(e,t){return"function"==typeof e?e(t):e}function g(e){return"number"==typeof e&&e>=0&&e!==1/0}function w(e,t){return Math.max(e+(t||0)-Date.now(),0)}function b(e,t){return"function"==typeof e?e(t):e}function v(e,t){return"function"==typeof e?e(t):e}function R(e,t){const{type:r="all",exact:s,fetchStatus:o,predicate:n,queryKey:i,stale:a}=e;if(i)if(s){if(t.queryHash!==T(i,t.options))return!1}else if(!O(t.queryKey,i))return!1;if("all"!==r){const e=t.isActive();if("active"===r&&!e)return!1;if("inactive"===r&&e)return!1}return!("boolean"==typeof a&&t.isStale()!==a||o&&o!==t.state.fetchStatus||n&&!n(t))}function S(e,t){const{exact:r,status:s,predicate:o,mutationKey:n}=e;if(n){if(!t.options.mutationKey)return!1;if(r){if(E(t.options.mutationKey)!==E(n))return!1}else if(!O(t.options.mutationKey,n))return!1}return!(s&&t.state.status!==s||o&&!o(t))}function T(e,t){return(t?.queryKeyHashFn||E)(e)}function E(e){return JSON.stringify(e,(e,t)=>x(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function O(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(r=>O(e[r],t[r]))}var C=Object.prototype.hasOwnProperty;function P(e,t,r=0){if(e===t)return e;if(r>500)return t;const s=A(e)&&A(t);if(!(s||x(e)&&x(t)))return t;const o=(s?e:Object.keys(e)).length,n=s?t:Object.keys(t),i=n.length,a=s?new Array(i):{};let c=0;for(let u=0;u<i;u++){const i=s?u:n[u],l=e[i],h=t[i];if(l===h){a[i]=l,(s?u<o:C.call(e,i))&&c++;continue}if(null===l||null===h||"object"!=typeof l||"object"!=typeof h){a[i]=h;continue}const d=P(l,h,r+1);a[i]=d,d===l&&c++}return o===i&&c===o?e:a}function q(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function A(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function x(e){if(!I(e))return!1;const t=e.constructor;if(void 0===t)return!0;const r=t.prototype;return!!I(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function I(e){return"[object Object]"===Object.prototype.toString.call(e)}function k(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?P(e,t):t}function F(e,t,r=0){const s=[...e,t];return r&&s.length>r?s.slice(1):s}function D(e,t,r=0){const s=[t,...e];return r&&s.length>r?s.slice(0,-1):s}var j=/* @__PURE__ */Symbol();function L(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==j?e.queryFn:()=>Promise.reject(/* @__PURE__ */new Error(`Missing queryFn: '${e.queryHash}'`))}function M(e,t){return"function"==typeof e?e(...t):!!e}var U=/* @__PURE__ */(()=>{let e=()=>p;return{isServer:()=>e(),setIsServer(t){e=t}}})(),N=class{constructor(){this.listeners=/* @__PURE__ */new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},H=new class extends N{#r;#s;#o;constructor(){super(),this.#o=e=>{if("undefined"!=typeof window&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#s||this.setEventListener(this.#o)}onUnsubscribe(){this.hasListeners()||(this.#s?.(),this.#s=void 0)}setEventListener(e){this.#o=e,this.#s?.(),this.#s=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#r!==e&&(this.#r=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#r?this.#r:"hidden"!==globalThis.document?.visibilityState}},Q=function(e){setTimeout(e,0)},_=function(){let e=[],t=0,r=e=>{e()},s=e=>{e()},o=Q;const n=s=>{t?e.push(s):o(()=>{r(s)})};return{batch:n=>{let i;t++;try{i=n()}finally{t--,t||(()=>{const t=e;e=[],t.length&&o(()=>{s(()=>{t.forEach(e=>{r(e)})})})})()}return i},batchCalls:e=>(...t)=>{n(()=>{e(...t)})},schedule:n,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{s=e},setScheduler:e=>{o=e}}}(),$=new class extends N{#n=!0;#s;#o;constructor(){super(),this.#o=e=>{if("undefined"!=typeof window&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#s||this.setEventListener(this.#o)}onUnsubscribe(){this.hasListeners()||(this.#s?.(),this.#s=void 0)}setEventListener(e){this.#o=e,this.#s?.(),this.#s=e(this.setOnline.bind(this))}setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}};function z(){let e,t;const r=new Promise((r,s)=>{e=r,t=s});function s(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{s({status:"fulfilled",value:t}),e(t)},r.reject=e=>{s({status:"rejected",reason:e}),t(e)},r}function B(e){return Math.min(1e3*2**e,3e4)}function V(e){return"online"!==(e??"online")||$.isOnline()}var W=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function G(e){let t,r=!1,s=0;const o=z(),n=()=>"pending"!==o.status,i=()=>H.isFocused()&&("always"===e.networkMode||$.isOnline())&&e.canRun(),a=()=>V(e.networkMode)&&e.canRun(),c=e=>{n()||(t?.(),o.resolve(e))},u=e=>{n()||(t?.(),o.reject(e))},l=()=>new Promise(r=>{t=e=>{(n()||i())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,n()||e.onContinue?.()}),h=()=>{if(n())return;let t;const o=0===s?e.initialPromise:void 0;try{t=o??e.fn()}catch(a){t=Promise.reject(a)}Promise.resolve(t).then(c).catch(t=>{if(n())return;const o=e.retry??(U.isServer()?0:3),a=e.retryDelay??B,c="function"==typeof a?a(s,t):a,d=!0===o||"number"==typeof o&&s<o||"function"==typeof o&&o(s,t);var p;!r&&d?(s++,e.onFail?.(s,t),(p=c,new Promise(e=>{f.setTimeout(e,p)})).then(()=>i()?void 0:l()).then(()=>{r?u(t):h()})):u(t)})};return{promise:o,status:()=>o.status,cancel:t=>{if(!n()){const r=new W(t);u(r),e.onCancel?.(r)}},continue:()=>(t?.(),o),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:a,start:()=>(a()?h():l().then(h),o)}}var Z=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),g(this.gcTime)&&(this.#i=f.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(U.isServer()?1/0:3e5))}clearGcTimeout(){void 0!==this.#i&&(f.clearTimeout(this.#i),this.#i=void 0)}};function J(e){return{onFetch:(t,r)=>{const s=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,n=t.state.data?.pages||[],i=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},c=0;const u=async()=>{let r=!1;const u=e=>{!function(e,r,s){let o,n=!1;Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t.signal,n||(n=!0,o.aborted?s():o.addEventListener("abort",s,{once:!0})),o)})}(e,0,()=>r=!0)},l=L(t.options,t.fetchOptions),h=async(e,s,o)=>{if(r)return Promise.reject(t.signal.reason);if(null==s&&e.pages.length)return Promise.resolve(e);const n=await l((()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:s,direction:o?"backward":"forward",meta:t.options.meta};return u(e),e})()),{maxPages:i}=t.options,a=o?D:F;return{pages:a(e.pages,n,i),pageParams:a(e.pageParams,s,i)}};if(o&&n.length){const e="backward"===o,t=e?X:K,r={pages:n,pageParams:i};a=await h(r,t(s,r),e)}else{const t=e??n.length;do{const e=0===c?i[0]??s.initialPageParam:K(s,a);if(c>0&&null==e)break;a=await h(a,e),c++}while(c<t)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=u}}}function K(e,{pages:t,pageParams:r}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,r[s],r):void 0}function X(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}function Y(e,t){return!!t&&null!=K(e,t)}function ee(e,t){return!(!t||!e.getPreviousPageParam)&&null!=X(e,t)}var te=class extends Z{#a;#c;#u;#l;#h;#d;#f;#p;constructor(e){super(),this.#p=!1,this.#f=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#h=e.client,this.#l=this.#h.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#c=oe(this.options),this.state=e.state??this.#c,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#a}get promise(){return this.#d?.promise}setOptions(e){if(this.options={...this.#f,...e},e?._type&&(this.#a=e._type),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=oe(this.options);void 0!==e.data&&(this.setState(se(e.data,e.dataUpdatedAt)),this.#c=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#l.remove(this)}setData(e,t){const r=k(this.state.data,e,this.options);return this.#m({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e){this.#m({type:"setState",state:e})}cancel(e){const t=this.#d?.promise;return this.#d?.cancel(e),t?t.then(m).catch(m):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#c}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==v(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===j||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===b(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!w(this.state.dataUpdatedAt,e))}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#d?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#d?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#l.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#d&&(this.#p||this.#y()?this.#d.cancel({revert:!0}):this.#d.cancelRetry()),this.scheduleGc()),this.#l.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#y(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#m({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#d?.status())if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#d)return this.#d.continueRetry(),this.#d.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}const r=new AbortController,s=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#p=!0,r.signal)})},o=()=>{const e=L(this.options,t),r=(()=>{const e={client:this.#h,queryKey:this.queryKey,meta:this.meta};return s(e),e})();return this.#p=!1,this.options.persister?this.options.persister(e,r,this):e(r)},n=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#h,state:this.state,fetchFn:o};return s(e),e})();("infinite"===this.#a?J(this.options.pages):this.options.behavior)?.onFetch(n,this),this.#u=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===n.fetchOptions?.meta||this.#m({type:"fetch",meta:n.fetchOptions?.meta}),this.#d=G({initialPromise:t?.initialPromise,fn:n.fetchFn,onCancel:e=>{e instanceof W&&e.revert&&this.setState({...this.#u,fetchStatus:"idle"}),r.abort()},onFail:(e,t)=>{this.#m({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#m({type:"pause"})},onContinue:()=>{this.#m({type:"continue"})},retry:n.options.retry,retryDelay:n.options.retryDelay,networkMode:n.options.networkMode,canRun:()=>!0});try{const e=await this.#d.start();if(void 0===e)throw new Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#l.config.onSuccess?.(e,this),this.#l.config.onSettled?.(e,this.state.error,this),e}catch(i){if(i instanceof W){if(i.silent)return this.#d.promise;if(i.revert){if(void 0===this.state.data)throw i;return this.state.data}}throw this.#m({type:"error",error:i}),this.#l.config.onError?.(i,this),this.#l.config.onSettled?.(this.state.data,i,this),i}finally{this.scheduleGc()}}#m(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...re(t.data,this.options),fetchMeta:e.meta??null};case"success":const r={...t,...se(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#u=e.manual?r:void 0,r;case"error":const s=e.error;return{...t,error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),_.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#l.notify({query:this,type:"updated",action:e})})}};function re(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:V(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function se(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function oe(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,s=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var ne=class extends N{constructor(e,t){super(),this.options=t,this.#h=e,this.#g=null,this.#w=z(),this.bindMethods(),this.setOptions(t)}#h;#b=void 0;#v=void 0;#R=void 0;#S;#T;#w;#g;#E;#O;#C;#P;#q;#A;#x=/* @__PURE__ */new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#b.addObserver(this),ie(this.#b,this.options)?this.#I():this.updateResult(),this.#k())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ae(this.#b,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ae(this.#b,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=/* @__PURE__ */new Set,this.#F(),this.#D(),this.#b.removeObserver(this)}setOptions(e){const t=this.options,r=this.#b;if(this.options=this.#h.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof v(this.options.enabled,this.#b))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#j(),this.#b.setOptions(this.options),t._defaulted&&!q(this.options,t)&&this.#h.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#b,observer:this});const s=this.hasListeners();s&&ce(this.#b,r,this.options,t)&&this.#I(),this.updateResult(),!s||this.#b===r&&v(this.options.enabled,this.#b)===v(t.enabled,this.#b)&&b(this.options.staleTime,this.#b)===b(t.staleTime,this.#b)||this.#L();const o=this.#M();!s||this.#b===r&&v(this.options.enabled,this.#b)===v(t.enabled,this.#b)&&o===this.#A||this.#U(o)}getOptimisticResult(e){const t=this.#h.getQueryCache().build(this.#h,e),r=this.createResult(t,e);var s;return s=r,q(this.getCurrentResult(),s)||(this.#R=r,this.#T=this.options,this.#S=this.#b.state),r}getCurrentResult(){return this.#R}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.#w.status||this.#w.reject(/* @__PURE__ */new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#x.add(e)}getCurrentQuery(){return this.#b}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#h.defaultQueryOptions(e),r=this.#h.getQueryCache().build(this.#h,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#I({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#R))}#I(e){this.#j();let t=this.#b.fetch(this.options,e);return e?.throwOnError||(t=t.catch(m)),t}#L(){this.#F();const e=b(this.options.staleTime,this.#b);if(U.isServer()||this.#R.isStale||!g(e))return;const t=w(this.#R.dataUpdatedAt,e)+1;this.#P=f.setTimeout(()=>{this.#R.isStale||this.updateResult()},t)}#M(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#b):this.options.refetchInterval)??!1}#U(e){this.#D(),this.#A=e,!U.isServer()&&!1!==v(this.options.enabled,this.#b)&&g(this.#A)&&0!==this.#A&&(this.#q=f.setInterval(()=>{(this.options.refetchIntervalInBackground||H.isFocused())&&this.#I()},this.#A))}#k(){this.#L(),this.#U(this.#M())}#F(){void 0!==this.#P&&(f.clearTimeout(this.#P),this.#P=void 0)}#D(){void 0!==this.#q&&(f.clearInterval(this.#q),this.#q=void 0)}createResult(e,t){const r=this.#b,s=this.options,o=this.#R,n=this.#S,i=this.#T,a=e!==r?e.state:this.#v,{state:c}=e;let u,l={...c},h=!1;if(t._optimisticResults){const o=this.hasListeners(),n=!o&&ie(e,t),i=o&&ce(e,r,t,s);(n||i)&&(l={...l,...re(c.data,e.options)}),"isRestoring"===t._optimisticResults&&(l.fetchStatus="idle")}let{error:d,errorUpdatedAt:f,status:p}=l;u=l.data;let m=!1;if(void 0!==t.placeholderData&&void 0===u&&"pending"===p){let e;o?.isPlaceholderData&&t.placeholderData===i?.placeholderData?(e=o.data,m=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#C?.state.data,this.#C):t.placeholderData,void 0!==e&&(p="success",u=k(o?.data,e,t),h=!0)}if(t.select&&void 0!==u&&!m)if(o&&u===n?.data&&t.select===this.#E)u=this.#O;else try{this.#E=t.select,u=t.select(u),u=k(o?.data,u,t),this.#O=u,this.#g=null}catch(T){this.#g=T}this.#g&&(d=this.#g,u=this.#O,f=Date.now(),p="error");const y="fetching"===l.fetchStatus,g="pending"===p,w="error"===p,b=g&&y,R=void 0!==u,S={status:p,fetchStatus:l.fetchStatus,isPending:g,isSuccess:"success"===p,isError:w,isInitialLoading:b,isLoading:b,data:u,dataUpdatedAt:l.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>a.dataUpdateCount||l.errorUpdateCount>a.errorUpdateCount,isFetching:y,isRefetching:y&&!g,isLoadingError:w&&!R,isPaused:"paused"===l.fetchStatus,isPlaceholderData:h,isRefetchError:w&&R,isStale:ue(e,t),refetch:this.refetch,promise:this.#w,isEnabled:!1!==v(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=void 0!==S.data,s="error"===S.status&&!t,o=e=>{s?e.reject(S.error):t&&e.resolve(S.data)},n=()=>{o(this.#w=S.promise=z())},i=this.#w;switch(i.status){case"pending":e.queryHash===r.queryHash&&o(i);break;case"fulfilled":(s||S.data!==i.value)&&n();break;case"rejected":s&&S.error===i.reason||n()}}return S}updateResult(){const e=this.#R,t=this.createResult(this.#b,this.options);this.#S=this.#b.state,this.#T=this.options,void 0!==this.#S.data&&(this.#C=this.#b),q(t,e)||(this.#R=t,this.#N({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#x.size)return!0;const s=new Set(r??this.#x);return this.options.throwOnError&&s.add("error"),Object.keys(this.#R).some(t=>{const r=t;return this.#R[r]!==e[r]&&s.has(r)})})()}))}#j(){const e=this.#h.getQueryCache().build(this.#h,this.options);if(e===this.#b)return;const t=this.#b;this.#b=e,this.#v=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#k()}#N(e){_.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#R)}),this.#h.getQueryCache().notify({query:this.#b,type:"observerResultsUpdated"})})}};function ie(e,t){return function(e,t){return!1!==v(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===v(t.retryOnMount,e))}(e,t)||void 0!==e.state.data&&ae(e,t,t.refetchOnMount)}function ae(e,t,r){if(!1!==v(t.enabled,e)&&"static"!==b(t.staleTime,e)){const s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&ue(e,t)}return!1}function ce(e,t,r,s){return(e!==t||!1===v(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&ue(e,r)}function ue(e,t){return!1!==v(t.enabled,e)&&e.isStaleByTime(b(t.staleTime,e))}var le=e(void 0),he=e=>{const t=c(le);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},de=({client:e,children:r})=>(t(()=>(e.mount(),()=>{e.unmount()}),[e]),/* @__PURE__ */i(le.Provider,{value:e,children:r})),fe=e(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),pe=e(!1),me=(pe.Provider,(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()}));function ye(e,s,n){const i=c(pe),u=c(fe),l=he(n),h=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(h);const d=l.getQueryCache().get(h.queryHash),f=!1!==e.subscribed;h._optimisticResults=i?"isRestoring":f?"optimistic":void 0,(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))}})(h),((e,t,r)=>{const s=r?.state.error&&"function"==typeof e.throwOnError?M(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))})(h,u,d),(e=>{t(()=>{e.clearReset()},[e])})(u);const p=!l.getQueryCache().get(h.queryHash),[y]=r(()=>new s(l,h)),g=y.getOptimisticResult(h),w=!i&&f;if(o(a(e=>{const t=w?y.subscribe(_.batchCalls(e)):m;return y.updateResult(),t},[y,w]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),t(()=>{y.setOptions(h)},[h,y]),((e,t)=>e?.suspense&&t.isPending)(h,g))throw me(h,y,u);if((({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(o&&void 0===e.data||M(r,[e.error,s])))({result:g,errorResetBoundary:u,throwOnError:h.throwOnError,query:d,suspense:h.suspense}))throw g.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(h,g),h.experimental_prefetchInRender&&!U.isServer()&&((e,t)=>e.isLoading&&e.isFetching&&!t)(g,i)&&(p?me(h,y,u):d?.promise)?.catch(m).finally(()=>{y.updateResult()}),h.notifyOnChangeProps?g:y.trackResult(g)}function ge(e,t){return ye(e,ne,t)}var we=class extends Error{name="KyError";get isKyError(){return!0}},be=class extends we{name="HTTPError";response;request;options;data;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.response=e,this.request=t,this.options=r}},ve=class extends we{name="NetworkError";request;constructor(e,t){super(`Request failed due to a network error: ${e.method} ${e.url}`,t),this.request=e}},Re=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}},Se=class extends we{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new Re(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}},Te=class extends Error{name="SchemaValidationError";issues;constructor(e){super("Response schema validation failed"),this.issues=e}},Ee=class extends we{name="TimeoutError";request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.request=e}},Oe=(()=>{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})(),Ce="function"==typeof globalThis.AbortController,Pe="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,qe="function"==typeof globalThis.ReadableStream,Ae="function"==typeof globalThis.FormData,xe=["get","post","put","patch","head","delete"],Ie={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},ke=Symbol("stop"),Fe=class{options;constructor(e){this.options=e}},De=e=>new Fe(e),je={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Le={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},Me=new TextEncoder,Ue=(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,He=Symbol("replaceOption"),Qe=e=>Ne(e)&&!0===e[He]?{isReplace:!0,value:e.value}:{isReplace:!1,value:e},_e=(...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 Ke({},...e)},$e=(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},ze=e=>{if(!Ne(e)||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t},Be=e=>{if(e instanceof URLSearchParams){const t=new URLSearchParams(e),r=e[Ze];return r&&(t[Ze]=new Set(r)),t}return e instanceof globalThis.Headers?new globalThis.Headers(e):Array.isArray(e)?[...e]:ze(e)?{...e}:e},Ve=(e,t)=>{return ze(e)&&ze(t)?(r={...e,...t},Object.fromEntries(Object.entries(r).filter(e=>void 0!==e[1]))):$e(e,t);var r};function We(e,t,r){return Object.hasOwn(t,r)&&void 0===t[r]?[]:Ke(e[r]??[],t[r]??[])}var Ge=(e={},t={})=>({init:We(e,t,"init"),beforeRequest:We(e,t,"beforeRequest"),beforeRetry:We(e,t,"beforeRetry"),beforeError:We(e,t,"beforeError"),afterResponse:We(e,t,"afterResponse")}),Ze=Symbol("deletedParameters"),Je=(e,t)=>{const r=new URLSearchParams,s=/* @__PURE__ */new Set;for(const o of[e,t])if(void 0!==o)if(o instanceof URLSearchParams){for(const[t,n]of o.entries())r.append(t,n),s.delete(t);const e=o[Ze];if(e)for(const t of e)r.delete(t),s.add(t)}else if(Array.isArray(o))for(const e of o){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])),s.delete(String(e[0]))}else if(Ne(o))for(const[e,t]of Object.entries(o))void 0===t?(r.delete(e),s.add(e)):(r.append(e,String(t)),s.delete(e));else{const e=new URLSearchParams(o);for(const[t,o]of e.entries())r.append(t,o),s.delete(t)}return s.size>0&&(r[Ze]=s),r},Ke=(...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);continue}const o=Qe(s),{isReplace:i}=o;if(s=o.value,"context"!==e)"searchParams"!==e?(Ne(s)&&!i&&e in r&&(s=Ke(r[e],s)),r={...r,[e]:s}):t=null==s?void 0:i||void 0===t?s:Je(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?{}:i?{...s}:{...r.context,...s}}}}if(Ne(i.hooks)){const{value:e,isReplace:t}=Qe(i.hooks);o=Ge(t?{}:o,e),r.hooks=o}if(Ne(i.headers)){const{value:e,isReplace:t}=Qe(i.headers);s=t?Be(e):Ve(s,e),r.headers=s}}return void 0!==t&&(r.searchParams=t),n.length>0&&(1===n.length?r.signal=n[0]:r.signal=Pe?AbortSignal.any(n):n.at(-1)),r},Xe=e=>xe.includes(e)?e.toUpperCase():e,Ye={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},et=(e={})=>{if("number"==typeof e)return{...Ye,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");const t=Object.fromEntries(Object.entries({...e,methods:e.methods?.map(e=>e.toLowerCase())}).filter(([,e])=>void 0!==e));return{...Ye,...t}};async function tt(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)})}var rt=Object.prototype.toString,st=/* @__PURE__ */new Set(["network error","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]);var ot=(e,t)=>e instanceof t||e?.name===t.name,nt=Symbol("timedOutResponseData"),it="The `schema` argument must follow the Standard Schema specification",at=Object.prototype.toString,ct=e=>e instanceof globalThis.Request||"[object Request]"===at.call(e),ut=e=>e instanceof globalThis.Response||"[object Response]"===at.call(e),lt=async(e,t)=>{if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError(it);const r=t["~standard"];if("object"!=typeof r||null===r||"function"!=typeof r.validate)throw new TypeError(it);const s=await r.validate(e);if(s.issues)throw new Te(s.issues);return s.value},ht=class e{static create(t,r){const s=r.hooks?.init??[],o=s.length>0?function(e){const t={...e,json:Be(e.json),context:Be(e.context),headers:Be(e.headers),searchParams:(r=e.searchParams,Array.isArray(r)?r.map(e=>[...e]):Be(r))};var r;return void 0!==e.retry&&(t.retry=(e=>"object"!=typeof e?e:{...e,...e.methods&&{methods:[...e.methods]},...e.statusCodes&&{statusCodes:[...e.statusCodes]},...e.afterStatusCodes&&{afterStatusCodes:[...e.afterStatusCodes]}})(e.retry)),t}(r):r;for(const e of s)e(o);const n=new e(t,o),i=(async()=>{try{return await(async()=>{if("number"==typeof n.#H.timeout&&n.#H.timeout>2147483647)throw new RangeError("The `timeout` option cannot be greater than 2147483647");if("number"==typeof n.#H.totalTimeout&&n.#H.totalTimeout>2147483647)throw new RangeError("The `totalTimeout` option cannot be greater than 2147483647");await Promise.resolve();const e=await n.#Q();let t=e??await n.#_(async()=>n.#$()),r=void 0!==e||n.#z();for(;;){if(void 0===t)return t;if(ut(t))try{t=await n.#B(t)}catch(s){if(!(s instanceof Se))throw s;const e=await n.#V(s,async()=>n.#$());if(void 0===e)return e;t=e,r=n.#z();continue}const e=t;if(!e.ok&&"opaque"!==e.type&&("function"==typeof n.#H.throwHttpErrors?n.#H.throwHttpErrors(e.status):n.#H.throwHttpErrors)){const s=new be(e,n.#W(e),n.#G()),o=s;if(s.data=await n.#Z(e),r)throw o;const i=await n.#V(s,async()=>n.#$());if(void 0===i)return i;t=i,r=n.#z();continue}break}if(!ut(t))return t;if(n.#J(t),n.#H.onDownloadProgress){if("function"!=typeof n.#H.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!qe)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const e=t.clone();return n.#K(t),((e,t)=>{if(!e.body)return e;const r={status:e.status,statusText:e.statusText,headers:e.headers};if(204===e.status)return new Response(null,r);const s=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(Ue(e.body,s,t),r)})(e,n.#H.onDownloadProgress)}return t})()}catch(e){if(!(e instanceof Error))throw e;if(n.#X.has(e))throw e;let t=e;for(const r of n.#H.hooks.beforeError){const e=await r({request:n.request,options:n.#G(),error:t,retryCount:n.#Y});e instanceof Error&&(t=e)}throw t}finally{const e=n.#ee;n.#te(e?.body??void 0),n.request!==e&&n.#te(n.request.body??void 0)}})();for(const[e,a]of Object.entries(Ie))"bytes"===e&&"function"!=typeof globalThis.Response?.prototype?.bytes||(i[e]=async t=>{n.request.headers.set("accept",n.request.headers.get("accept")||a);const r=await i;if("json"!==e)return r[e]();const s=await r.text();if(""===s)return void 0!==t?lt(void 0,t):JSON.parse(s);const c=o.parseJson?await o.parseJson(s,{request:n.#W(r),response:r}):JSON.parse(s);return void 0===t?c:lt(c,t)});return i}static#re(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}request;#se;#Y=0;#oe;#H;#ee;#ne;#X=/* @__PURE__ */new WeakSet;#ie;#ae;#ce=!1;#ue=/* @__PURE__ */new WeakMap;constructor(t,r={}){if(this.#oe=t,Object.hasOwn(r,"prefixUrl"))throw new Error("The `prefixUrl` option has been renamed `prefix` in v2 and enhanced to allow slashes in input. See also the new `baseUrl` option for improved flexibility with standard URL resolution: https://github.com/sindresorhus/ky#baseurl");if(this.#H={...r,headers:$e(this.#oe.headers,r.headers),hooks:Ge({},r.hooks),method:Xe(r.method??this.#oe.method??"GET"),prefix:String(r.prefix||""),retry:et(r.retry),throwHttpErrors:r.throwHttpErrors??!0,timeout:r.timeout??1e4,totalTimeout:r.totalTimeout??!1,fetch:r.fetch??globalThis.fetch.bind(globalThis),context:r.context??{}},"string"!=typeof this.#oe&&!(this.#oe instanceof URL||this.#oe instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if("string"==typeof this.#oe){if(this.#H.prefix){const e=this.#H.prefix.replace(/\/+$/,""),t=this.#oe.replace(/^\/+/,"");this.#oe=`${e}/${t}`}if(this.#H.baseUrl){let e;try{e=new URL(this.#oe)}catch{}e||(this.#oe=new URL(this.#oe,new Request(this.#H.baseUrl).url))}}Ce&&Pe&&(this.#ne=this.#H.signal??this.#oe.signal,this.#se=new globalThis.AbortController,this.#H.signal=this.#le()),Oe&&(this.#H.duplex="half"),void 0!==this.#H.json&&(this.#H.body=this.#H.stringifyJson?.(this.#H.json)??JSON.stringify(this.#H.json),this.#H.headers.set("content-type",this.#H.headers.get("content-type")??"application/json"));const s=r.headers&&new globalThis.Headers(r.headers).has("content-type");if(this.#oe instanceof globalThis.Request&&(Ae&&this.#H.body instanceof globalThis.FormData||this.#H.body instanceof URLSearchParams)&&!s&&this.#H.headers.delete("content-type"),this.request=new globalThis.Request(this.#oe,this.#H),void 0!==(o=this.#H.searchParams)&&(Array.isArray(o)?o.length>0:o instanceof URLSearchParams?o.size>0||Boolean(o[Ze]?.size):"object"==typeof o?Object.keys(o).length>0:"string"==typeof o?o.trim().length>0:Boolean(o))){const t=new URL(this.request.url),r=this.#H.searchParams?.[Ze];if(r)for(const e of r)t.searchParams.delete(e);if("string"==typeof this.#H.searchParams){const e=this.#H.searchParams.replace(/^\?/,"");""!==e&&(t.search=t.search?`${t.search}&${e}`:`?${e}`)}else{const r=new URLSearchParams(e.#re(this.#H.searchParams));for(const[e,s]of r.entries())t.searchParams.append(e,s)}if(this.#H.searchParams&&"object"==typeof this.#H.searchParams&&!Array.isArray(this.#H.searchParams)&&!(this.#H.searchParams instanceof URLSearchParams))for(const[e,s]of Object.entries(this.#H.searchParams))void 0===s&&t.searchParams.delete(e);this.request=new globalThis.Request(t,this.#H)}var o;if(this.#H.onUploadProgress&&"function"!=typeof this.#H.onUploadProgress)throw new TypeError("The `onUploadProgress` option must be a function");this.#ae="number"==typeof this.#H.totalTimeout?this.#he():void 0}#de(){const e=this.#H.retry.delay(this.#Y+1);let t=e;return!0===this.#H.retry.jitter?t=Math.random()*e:"function"==typeof this.#H.retry.jitter&&(t=this.#H.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e)),Math.min(this.#H.retry.backoffLimit,t)}async#fe(e){if(this.#Y>=this.#H.retry.limit)throw e;const t=e instanceof Error?e:new Re(e);if(t instanceof Se)return t.customDelay??this.#de();if(!this.#H.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(void 0!==this.#H.retry.shouldRetry){const r=await this.#H.retry.shouldRetry({error:t,retryCount:this.#Y+1});if(!1===r)throw e;if(!0===r)return this.#de()}if(function(e){return ot(e,Ee)}(e)){if(!this.#H.retry.retryOnTimeout)throw e;return this.#de()}if(function(e){return ot(e,be)}(e)){if(!this.#H.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.#H.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(t);return Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now()),Number.isFinite(e)?(e=Math.max(0,e),Math.min(this.#H.retry.maxRetryAfter,e)):Math.min(this.#H.retry.maxRetryAfter,this.#de())}if(413===e.response.status)throw e;return this.#de()}if(!function(e){return ot(e,ve)}(e))throw e;return this.#de()}#J(e){const t=this.#W(e);return this.#H.parseJson&&(e.json=async()=>{const r=await e.text();return""===r?JSON.parse(r):this.#H.parseJson(r,{request:t,response:e})}),e}async#Z(e){const t=await this.#pe(e,this.#me());if(t===nt)return void this.#ye();if(!t)return;if(!this.#ge(e.headers.get("content-type")??""))return t;const r=await this.#we(t,e,this.#me(),this.#W(e));if(r!==nt)return r;this.#ye()}#me(){const e=!1===this.#H.timeout?1e4:this.#H.timeout,t=this.#be();if(void 0===t)return e;if(t<=0)throw new Ee(this.request);return Math.min(e,t)}#ge(e){const t=(e.split(";",1)[0]??"").trim().toLowerCase();return/\/(?:.*[.+-])?json$/.test(t)}async#pe(e,t){const{body:r}=e;if(!r)try{return await e.text()}catch{return}let s;try{s=r.getReader()}catch{return}const o=(e=>{const t=/;\s*charset\s*=\s*(?:"([^"]+)"|([^;,\s]+))/i.exec(e),r=t?.[1]??t?.[2];if(r)try{return new TextDecoder(r)}catch{}return new TextDecoder})(e.headers.get("content-type")??""),n=[];let i=0;const a=(async()=>{try{for(;;){const{done:e,value:t}=await s.read();if(e)break;if(i+=t.byteLength,i>10485760)return void s.cancel().catch(()=>{});n.push(o.decode(t,{stream:!0}))}}catch{return}return n.push(o.decode()),n.join("")})(),c=new Promise(e=>{const r=setTimeout(()=>{e(nt)},t);a.finally(()=>{clearTimeout(r)})}),u=await Promise.race([a,c]);return u===nt&&s.cancel().catch(()=>{}),u}async#we(e,t,r,s){let o;try{return await Promise.race([Promise.resolve().then(()=>this.#H.parseJson?this.#H.parseJson(e,{request:s,response:t}):JSON.parse(e)),new Promise(e=>{o=setTimeout(()=>{e(nt)},r)})])}catch{return}finally{clearTimeout(o)}}#te(e){e&&e.cancel().catch(()=>{})}#K(e){this.#te(e.body??void 0)}#le(){return this.#ne?AbortSignal.any([this.#ne,this.#se.signal]):this.#se.signal}#ye(){const e=this.#be();if(void 0!==e&&e<=0)throw new Ee(this.request)}async#Q(){for(const e of this.#H.hooks.beforeRequest){const t=await e({request:this.request,options:this.#G(),retryCount:0});if(ct(t))this.#ve(t);else if(ut(t))return t}}async#B(e){const t=this.#W(e);for(const s of this.#H.hooks.afterResponse){const o=this.#Re(e.clone(),t);let n;this.#J(o);try{n=await s({request:this.request,options:this.#G(),response:o,retryCount:this.#Y})}catch(r){throw o!==e&&this.#K(o),this.#K(e),r}if(n instanceof Fe)throw o!==e&&this.#K(o),this.#K(e),new Se(n.options);const i=ut(n)?this.#Re(n,t):e;o!==e&&o!==i&&o.body!==i.body&&this.#K(o),e!==i&&e.body!==i.body&&this.#K(e),e=i}return e}async#_(e){try{return await e()}catch(t){return this.#V(t,e)}}async#V(e,t){this.#ce=!1;const r=Math.min(await this.#fe(e),2147483647),s={signal:this.#ne},o=this.#be();if(void 0!==o){if(o<=0)throw new Ee(this.request);if(r>=o)throw await tt(o,s),new Ee(this.request)}if(await tt(r,s),this.#ye(),e instanceof Se&&e.customRequest){const t=new globalThis.Request(e.customRequest,this.#H.signal?{signal:this.#H.signal}:void 0);this.#ve(t)}for(const i of this.#H.hooks.beforeRetry){let t;try{t=await i({request:this.request,options:this.#G(),error:e,retryCount:this.#Y+1})}catch(n){throw n instanceof Error&&n!==e&&this.#X.add(n),n}if(ct(t)){this.#ve(t);break}if(ut(t))return this.#ce=!0,this.#Y++,t;if(t===ke)return}return this.#ye(),this.#Y++,this.#_(t)}#z(){const e=this.#ce;return this.#ce=!1,e}async#$(){this.#se?.signal.aborted&&(this.#se=new globalThis.AbortController,this.#H.signal=this.#le(),this.request=new globalThis.Request(this.request,{signal:this.#H.signal}));const e=(e=>{const t={};for(const r in e)Object.hasOwn(e,r)&&(r in Le||r in je||(t[r]=e[r]));return t})(this.#H),t=this.#H.retry.limit>0?this.request.clone():void 0,r=this.#Se(this.request,this.#H.body??void 0);this.#ee=r,t&&(this.request=t);try{const t=this.#be();if(void 0!==t&&t<=0)throw new Ee(this.request);const s=!1===this.#H.timeout?t:void 0===t?this.#H.timeout:Math.min(this.#H.timeout,t),o=void 0===s?await this.#H.fetch(r,e):await async function(e,t,r,s){return new Promise((o,n)=>{const i=setTimeout(()=>{r&&r.abort(),n(new Ee(e))},s.timeout);s.fetch(e,t).then(o).catch(n).then(()=>{clearTimeout(i)})})}(r,e,this.#se,{timeout:s,fetch:this.#H.fetch});return this.#Re(o,r)}catch(s){if(function(e){if(!e||(t=e,"[object Error]"!==rt.call(t))||"TypeError"!==e.name||"string"!=typeof e.message)return!1;var t;const{message:r,stack:s}=e;return"Load failed"===r?void 0===s||"__sentry_captured__"in e:!!r.startsWith("error sending request for url")||!!("Failed to fetch"===r||r.startsWith("Failed to fetch (")&&r.endsWith(")"))||st.has(r)}(s))throw new ve(this.request,{cause:s});throw s}}#be(){if(void 0===this.#ae)return;const e=this.#he()-this.#ae;return Math.max(0,this.#H.totalTimeout-e)}#he(){return globalThis.performance?.now()??Date.now()}#G(){if(!this.#ie){const{hooks:e,json:t,parseJson:r,stringifyJson:s,searchParams:o,timeout:n,totalTimeout:i,throwHttpErrors:a,fetch:c,...u}=this.#H;this.#ie=Object.freeze(u)}return this.#ie}#ve(e){this.#ie=void 0,this.request=e}#W(e){return this.#ue.get(e)??this.request}#Re(e,t){return this.#ue.set(e,t),e}#Se(e,t){return this.#H.onUploadProgress&&e.body&&Oe?((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+=40,t+=Me.encode(`Content-Disposition: form-data; name="${r}"`).byteLength,t+="string"==typeof s?Me.encode(s).byteLength:s.size;return t}return e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:"string"==typeof e?Me.encode(e).byteLength:e instanceof URLSearchParams?Me.encode(e.toString()).byteLength:0})(r??e.body);return new Request(e,{duplex:"half",body:Ue(e.body,s,t)})})(e,this.#H.onUploadProgress,t??this.#H.body??void 0):e}},dt=e=>{const t=(t,r)=>ht.create(t,_e(e,r));for(const r of xe)t[r]=(t,s)=>ht.create(t,_e(e,s,{method:r}));return t.create=e=>dt(_e(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),dt(_e(e,t))),t.stop=ke,t.retry=De,t},ft=dt();function pt({title:e,children:t}){/* @__PURE__ */
2
- return i("div",{className:"mx-auto mt-24 w-fit max-w-xl space-y-8",children:[/* @__PURE__ */i("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mx-auto h-64 w-fit text-[#ff4800]",width:"800",height:"469.317",viewBox:"0 0 800 469.317",role:"img","aria-label":"Error illustration",children:/* @__PURE__ */i("g",{transform:"translate(-443.142 -257.876)",children:[
3
- /* @__PURE__ */i("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__ */i("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__ */i("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__ */i("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__ */i("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__ */i("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__ */i("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__ */i("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__ */i("ellipse",{cx:"71.849",cy:"89.934",rx:"71.849",ry:"89.934",transform:"translate(928.82 428.806)",fill:"#f2f2f2"}),
12
- /* @__PURE__ */i("path",{d:"M505.77,325.365h.2l3.553,203.7h-7.5Z",transform:"translate(495.097 175.29)",fill:"#ccc"}),
13
- /* @__PURE__ */i("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__ */i("ellipse",{cx:"71.849",cy:"89.934",rx:"71.849",ry:"89.934",transform:"translate(722.256 428.806)",fill:"#f2f2f2"}),
15
- /* @__PURE__ */i("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__ */i("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__ */i("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__ */i("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__ */i("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__ */i("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__ */i("g",{transform:"translate(696.754 297.373)",children:[
22
- /* @__PURE__ */i("ellipse",{cx:"61.798",cy:"61.798",rx:"61.798",ry:"61.798",transform:"translate(215.662 36.955)",fill:"#ff6584"}),
23
- /* @__PURE__ */i("ellipse",{cx:"78.271",cy:"97.971",rx:"78.271",ry:"97.971",transform:"translate(225.025 127.808)",fill:"#e6e6e6"}),
24
- /* @__PURE__ */i("path",{d:"M508.105,323.365h.215l3.87,221.909h-8.171Z",transform:"translate(-204.593 -117.286)",fill:"#ccc"}),
25
- /* @__PURE__ */i("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__ */i("ellipse",{cx:"78.271",cy:"97.971",rx:"78.271",ry:"97.971",transform:"translate(0 127.808)",fill:"#e6e6e6"}),
27
- /* @__PURE__ */i("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__ */i("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__ */i("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__ */i("div",{className:"space-y-4",children:[/* @__PURE__ */i("h4",{className:"text-foreground text-center text-lg font-semibold",children:e}),/* @__PURE__ */i("p",{className:"text-muted-foreground text-center",children:t})]})]})}var mt=({organizationId:e})=>/* @__PURE__ */i("a",{className:"font-medium text-blue-500",href:l.ORGANIZATION_SETTINGS_INTEGRATION(e),target:"_blank",rel:"noreferrer",children:"Guide"});function yt({organizationId:e,errorType:t,errorMessage:r}){/* @__PURE__ */
30
- return i(pt,"custom-auth-invalid"===t?{title:"Setup needed",children:["Custom auth is enabled. Pass ",
31
- /* @__PURE__ */i("code",{children:"uid"}),", ",
32
- /* @__PURE__ */i("code",{children:"fname"}),", and ",
33
- /* @__PURE__ */i("code",{children:"lname"})," as props to QratiConnect to complete setup. See our ",
34
- /* @__PURE__ */i(mt,{organizationId:e})," for details."]}:"service-unavailable"===t?{title:"We'll be right back!",children:["Our service is getting a quick tune-up. Hang tight — great things are coming your way soon! See our"," ",
35
- /* @__PURE__ */i(mt,{organizationId:e})," if you need help in the meantime."]}:"generic-error"===t&&r?{title:"Setup needed",children:[r," See our ",
36
- /* @__PURE__ */i(mt,{organizationId:e})," for details."]}:"page-not-registered"===t?{title:"Page not registered",children:["Add the current page URL in Allowed URLs under"," ",
37
- /* @__PURE__ */i("a",{className:"font-medium text-blue-500",href:l.ORGANIZATION_SETTINGS(e),target:"_blank",rel:"noreferrer",children:"Organization Settings"})," ","⇨ Integration Settings. See our ",
38
- /* @__PURE__ */i(mt,{organizationId:e})," for details."]}:{title:"Heads up",children:["Something needs attention. See our ",
39
- /* @__PURE__ */i(mt,{organizationId:e})," for details or contact Qrati support."]})}var gt='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',wt=e=>e.trim().replace(/\s+/g," "),bt=e=>e?.replace(/\/+$/,"")||"",vt=e=>{if(!e)return gt;const t=wt("string"==typeof e?e:e.fontFamily||""),r="string"==typeof e?void 0:e.customFontName;return t&&"system"!==t?"custom"===t?`"${r||"QratiCustomFont"}", ${gt}`:`"${t}", ${gt}`:"inherit"};function Rt(e){var t,r,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Rt(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function St(){for(var e,t,r=0,s="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Rt(e))&&(s&&(s+=" "),s+=t);return s}var Tt=(...e)=>St(e.filter(Boolean)),Et=e=>{const t=e.replace(/#/g,"");return(299*parseInt(t.slice(0,2),16)+587*parseInt(t.slice(2,4),16)+114*parseInt(t.slice(4,6),16))/1e3>=128?"#000000":"#FFFFFF"},Ot="px",Ct=(e,t="light")=>{const r=e?.themeSettings?.colors??{},s=e?.themeSettings?.border,o=e?.themeSettings?.shadow,n=e?.integrationSettings,i="dark"===t,a=(e,t,s,o)=>{const n=i?o:s;return r[i?t:e]||n},c=a("primaryLight","primaryDark","#ff4800","#ff4800");return{"--background":a("backgroundLight","backgroundDark","#fafafa","#0a0a0a"),"--foreground":a("foregroundLight","foregroundDark","#252629","#f5f5f5"),"--muted":a("mutedLight","mutedDark","#e5e5e5","#171717"),"--muted-foreground":a("mutedForegroundLight","mutedForegroundDark","#484848","#b5b8bb"),"--border":a("borderLight","borderDark","#dddddd","#353538"),"--input":a("inputLight","inputDark","#f5f5f5","#171717"),"--primary":c,"--primary-foreground":Et(c),"--popover":a("popoverLight","popoverDark","#f5f5f5","#171717"),"--popover-foreground":a("popoverForegroundLight","popoverForegroundDark","#252629","#fafafa"),"--info":a("infoLight","infoDark","#2563eb","#5b8def"),"--warning":a("warningLight","warningDark","#f59e0b","#fbbf24"),"--success":a("successLight","successDark","#10b981","#34d399"),"--destructive":a("destructiveLight","destructiveDark","#ef4444","#f87171"),"--border-width":`${s?.width??"1"}${s?.unit??"px"}`,"--radius":`${s?.radius??"10"}${s?.unit??"px"}`,"--shadow-outer-horizontal-offset":`${o?.outerHorizontalOffset??"0"}${o?.unit??Ot}`,"--shadow-outer-vertical-offset":`${o?.outerVerticalOffset??"0"}${o?.unit??Ot}`,"--shadow-outer-blur":`${o?.outerBlur??"0"}${o?.unit??Ot}`,"--shadow-outer-spread":`${o?.outerSpread??"0"}${o?.unit??Ot}`,...n?.fontFamily&&"system"!==n.fontFamily?{"--font-family":vt(n)}:{}}},Pt=async e=>{try{return await e()}catch{return null}},qt=(e,t=1)=>{const r=(new TextEncoder).encode(e),s=3432918353,o=461845907;let n=t>>>0;const i=Math.floor(r.length/4),a=new DataView(r.buffer,r.byteOffset,r.byteLength);for(let h=0;h<i;h++){let e=a.getUint32(4*h,!0);e=Math.imul(e,s),e=e<<15|e>>>17,e=Math.imul(e,o),n^=e,n=n<<13|n>>>19,n=Math.imul(n,5)+3864292196>>>0}let c=0;const u=4*i,l=3&r.length;return 3===l&&(c^=r[u+2]<<16),l>=2&&(c^=r[u+1]<<8),l>=1&&(c^=r[u],c=Math.imul(c,s),c=c<<15|c>>>17,c=Math.imul(c,o),n^=c),n^=r.length,n^=n>>>16,n=Math.imul(n,2246822507)>>>0,n^=n>>>13,n=Math.imul(n,3266489909)>>>0,n^=n>>>16,n.toString(16).padStart(8,"0")},At=e=>{if(null===e||"object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(At).join(",")}]`;const t=Object.keys(e).sort(),r=[];for(const s of t){const t=e[s];void 0!==t&&r.push(`${At(s)}:${At(t)}`)}return`{${r.join(",")}}`},xt=async({debug:e=!1}={})=>{const t=performance.now(),r=await Pt(async()=>window.navigator.userAgentData&&"function"==typeof window.navigator.userAgentData.getHighEntropyValues?At(await window.navigator.userAgentData.getHighEntropyValues(["architecture","bitness","platformVersion","model","fullVersionList"])):null),s=await Pt(()=>(()=>{const e=document.createElement("video"),t=["video/webm","video/mp4","video/ogg","audio/mp4","audio/webm","audio/ogg","audio/mpeg"],r={};for(const s of t){const t=e.canPlayType(s);r[s]=""===t?"no":t}return At(r)})()),o=await Pt(()=>(()=>{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})()),n=await Pt(()=>new Intl.NumberFormat(window.navigator.languages?.[0]||"en").resolvedOptions().numberingSystem),i=window.navigator.languages?Array.from(window.navigator.languages).join(","):window.navigator.language||null,a=Intl.DateTimeFormat().resolvedOptions(),c=a.timeZone,u=/* @__PURE__ */(new Date).getTimezoneOffset(),l=a.calendar||null,h=void 0!==a.hour12?a.hour12?"h12":"h23":a.hourCycle||null,d=window.matchMedia("(prefers-reduced-motion: reduce)").matches?"reduce":"no-preference",f=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",p=window.matchMedia("(prefers-contrast: more)").matches?"more":window.matchMedia("(prefers-contrast: less)").matches?"less":window.matchMedia("(prefers-contrast: custom)").matches?"custom":"no-preference",m=window.matchMedia("(prefers-reduced-transparency: reduce)").matches?"reduce":"no-preference",y=window.matchMedia("(forced-colors: active)").matches?"active":null,g="number"==typeof window.devicePixelRatio?Math.round(100*window.devicePixelRatio)/100:null,{pixelDepth:w,colorDepth:b}=window.screen,v="ontouchstart"in window||window.navigator.maxTouchPoints>0,R=await Pt(()=>(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)),qt(t.toDataURL("image/png"))})(e)),S=await Pt(()=>(async()=>{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl"),r=t.getExtension("WEBGL_debug_renderer_info");return qt(At({vendor:r?t.getParameter(r.UNMASKED_VENDOR_WEBGL):t.getParameter(t.VENDOR),renderer:r?t.getParameter(r.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER)}))})()),T=await Pt(()=>(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 qt(At(r))})(e)),E=await Pt(()=>(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 u=3e3;u<5800;u+=2){const e=n[u];i=31*i+Math.floor(1e5*(e+1))|0,a=Math.imul(a^Math.floor(98765*e),2246822519)}const c=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 qt(c.toString(16))})(e)),O=window.screen.width&&window.screen.height?(window.screen.width/window.screen.height).toFixed(4):null,C=await Pt(()=>window.screen.orientation?.type||null),P=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,q=P&&P.type||null,A=P?.effectiveType||null,x=!0===P?.saveData,I="boolean"==typeof window.navigator.pdfViewerEnabled?window.navigator.pdfViewerEnabled:null,k="boolean"==typeof window.navigator.webdriver?window.navigator.webdriver:null,F=await Pt(()=>"function"!=typeof Intl.supportedValuesOf?null:Intl.supportedValuesOf("calendar").join(",")),D=await Pt(async()=>{if(!window.navigator.permissions||"function"!=typeof window.navigator.permissions.query)return null;const e=["geolocation","notifications"],t={};for(const r of e)try{t[r]=(await window.navigator.permissions.query({name:r})).state}catch{t[r]="unsupported"}return At(t)}),j={vendor:window.navigator.vendor||null,platform:window.navigator.platform||null,userAgentHighEntropy:r||null,mediaCodecs:s||null,fonts:o,numberingSystem:n,languages:i,timezone:c,timezoneOffset:u,intlCalendar:l,hourCycle:h,reducedMotion:d,colorScheme:f,prefersContrast:p,prefersReducedTransparency:m,pdfViewerEnabled:I,webdriver:k,intlSupportedCalendars:F||null,permissionsState:D||null,hardwareConcurrency:window.navigator.hardwareConcurrency||null,deviceMemory:window.navigator.deviceMemory||null,forcedColors:y,devicePixelRatio:g,pixelDepth:w,colorDepth:b,touchSupport:v,screenOrientation:C||null,connectionType:q,effectiveType:A,saveData:x,canvasID:R,webglID:S,webgpuID:T,audioID:E},L={aspectRatio:O,width:window.screen.width,height:window.screen.height,maxTouchPoints:window.navigator.maxTouchPoints};(!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(j,L);const M=qt(At(j)),U=Math.round(performance.now()-t);return{fingerprint:M,...j,elapsedMs:U}};"undefined"!=typeof window&&(window.getBrowserFingerprint=xt);var It=async(e,t)=>{if(e instanceof be){try{const t=e.data;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)},kt=e(void 0),Ft=({props:e={},children:o})=>{const{organizationId:c,uid:l,fname:d,lname:f,theme:p="light"}=e,m=he(),[y,g]=r(null),[w,b]=r(()=>{if("undefined"==typeof window)return null;const e=localStorage.getItem("qrati_token");return e?{token:e}:null}),{isLoading:v,data:R,error:S}=ge({queryKey:[u.QRATI_CONNECT_SESSION,c,l??null,d??null,f??null],queryFn:async()=>{const e=await(async()=>{const e=await xt();return"string"==typeof e?e:e?.fingerprint})();try{return(await ft.post(h.INITIALIZE_SESSION,{json:{uid:l,fname:d,lname:f,browserFingerprint:e},headers:{"x-org-id":c,...!w?.token||l||d||f?{}:{Authorization:`Bearer ${w.token}`}}}).json()).data}catch(t){if(t instanceof be)try{const e=t.data;t.apiMessage=e?.message||e?.error}catch{}throw t}},enabled:!!c});t(()=>{const e=R?.authSession?.session?.token??R?.authSession?.token,t=R?.authSession?.user;t&&e?(b(r=>({...r,...t,token:e,tcAccepted:void 0===t.tcAccepted?r?.tcAccepted:t.tcAccepted})),localStorage.setItem("qrati_token",e)):R?.organization?.customAuth&&l&&d&&b(e=>e??{_id:l,uid:l,name:f?`${d} ${f}`:d,fname:d,lname:f})},[R]);const T=s(()=>{const e=R?.organization?.integrationSettings?.fontFamily,t=((e,t)=>{const r=bt("https://qrati.com"),s=t?wt(t):"";return r&&s?`${r}/api/connect/organization/google-font?family=${encodeURIComponent(s)}`:null})(0,e),r=((e,t)=>{const r=bt("https://qrati.com");return r&&t?`${r}/api/connect/organization/custom-font?organizationId=${encodeURIComponent(t)}`:null})(0,c);return((e,t,r)=>{if(!e?.fontFamily||"system"===e.fontFamily)return"";const s=wt(e.fontFamily);if("custom"===s&&t){const r=e.customFontName||"QratiCustomFont",s=/\.woff2(\?|$)/i.test(t)?"woff2":/\.ttf(\?|$)/i.test(t)?"truetype":"woff";return`@font-face{font-family:"${o=r,o.replace(/"/g,'\\"')}";src:url("${t}") format("${s}");font-weight:400 700;font-style:normal;font-display:swap;}`}var o;const n=r||(e=>{if(!e)return null;const t=wt(e);return t&&"system"!==t.toLowerCase()&&"custom"!==t.toLowerCase()?`https://fonts.googleapis.com/css2?family=${t.replace(/\s+/g,"+")}:wght@400;500;600;700&display=swap`:null})(s);return n?`@import url("${n}");`:""})(R?.organization?.integrationSettings,R?.organization?.customFontUrl?r||R.organization.customFontUrl:void 0,t||void 0)},[R?.organization?.integrationSettings,R?.organization?.customFontUrl,c]);t(()=>{const e=`data-qrati-font-${c}`;if(document.head.querySelector(`[${e}]`)?.remove(),T){if(T.startsWith("@import")){const t=T.match(/@import url\("([^"]+)"\)/);if(!t?.[1])return;const r=document.createElement("link");r.rel="stylesheet",r.href=t[1],r.setAttribute(e,""),document.head.appendChild(r)}else{const t=document.createElement("style");t.textContent=T,t.setAttribute(e,""),document.head.appendChild(t)}return()=>{document.head.querySelector(`[${e}]`)?.remove()}}},[T,c]);const E=a(async e=>{b(t=>({...t,...e}))},[]),O=a(async(e,t,r,s)=>{try{const o=await ft.post(h.REGISTER,{json:{email:e,password:t,fname:r,lname:s},headers:{"x-org-id":c}}).json();return o.error?{error:o.error}:(b({...o.user,token:o.token}),o.token&&localStorage.setItem("qrati_token",o.token),o)}catch(S){return{error:await It(S,"Registration failed")}}},[c]),C=a(async(e,t)=>{try{const r=await ft.post(h.LOGIN,{json:{email:e,password:t},headers:{"x-org-id":c}}).json();return r.error?{error:r.error}:(b({...r.user,token:r.token}),r.token&&localStorage.setItem("qrati_token",r.token),r)}catch(S){return{error:await It(S,"Invalid email or password")}}},[c]),P=a(async e=>{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,c=window.open(n.toString(),"qrati_social_auth",`width=500,height=600,left=${i},top=${a},scrollbars=yes,resizable=yes,status=yes`);if(!c)return void o(/* @__PURE__ */new Error("Failed to open popup window. Please allow popups and try again."));const u=()=>{clearInterval(h),clearTimeout(d),window.removeEventListener("message",l)},l=e=>{try{const t=new URL(r).origin;if(e.origin!==t)return void console.warn("Origin mismatch:",e.origin,"expected:",t)}catch(h){console.warn("Could not parse origin for verification")}const{type:n,data:i,error:a,organizationId:l}=e.data||{};if(l===t)switch(n){case"QRATI_SOCIAL_AUTH_SUCCESS":u(),c.close(),s({user:i.user,session:i.session,token:i.token});break;case"QRATI_SOCIAL_AUTH_ERROR":console.error("Authentication error:",a),u(),c.close(),o(new Error(a||"Social authentication failed"));break;case"QRATI_SOCIAL_AUTH_CANCELLED":u(),c.close(),o(/* @__PURE__ */new Error("Authentication was cancelled"))}else console.warn("Organization ID mismatch:",l,"expected:",t)},h=setInterval(()=>{try{c.closed&&(u(),o(/* @__PURE__ */new Error("Authentication was cancelled")))}catch(e){}},1e3);window.addEventListener("message",l);const d=setTimeout(()=>{u(),c.closed||c.close(),o(/* @__PURE__ */new Error("Authentication timeout. Please try again."))},3e5)}))(e,c??"","https://qrati.com");return t?.user&&t?.token&&(b({...t.user,token:t.token}),localStorage.setItem("qrati_token",t.token)),t},[c]),q=a(async()=>P("google"),[P]),A=a(async()=>P("apple"),[P]),x=a(async e=>{try{const t=await ft.post(h.SEND_PASSWORD_RESET_CODE,{json:{email:e.toLowerCase()},headers:{"x-org-id":c}}).json();return t.error?{error:t.error}:t}catch(S){return{error:await It(S,"Failed to send password reset code")}}},[c]),I=a(async(e,t)=>{try{const r=await ft.post(h.VERIFY_PASSWORD_RESET_CODE,{json:{email:e.toLowerCase(),code:t},headers:{"x-org-id":c}}).json();return r.error?{error:r.error}:r}catch(S){return{error:await It(S,"Invalid code, please check your email")}}},[c]),k=a(async(e,t)=>{try{const r=await ft.post(h.RESET_PASSWORD,{json:{passwordResetCodeId:e,newPassword:t},headers:{"x-org-id":c}}).json();return r.error?{error:r.error}:r}catch(S){return{error:S?.message}}},[c]),F=a(async()=>{try{const e=await ft.post(h.LOGOUT,{headers:{"x-org-id":c,Authorization:`Bearer ${w?.token}`}}).json();return e.error?{error:e.error}:(b(null),localStorage.removeItem("qrati_token"),await m.invalidateQueries({queryKey:[u.QRATI_CONNECT_SESSION]}),e)}catch(S){return{error:S?.message}}},[c,w?.token]),D=s(()=>({props:e,initializing:v,sessionId:R?.sessionId,organization:R?.organization,folders:R?.folders,orgRole:R?.orgRole??null,loadingUser:v,user:w,updateUser:E,registerUsingEmail:O,loginWithGoogle:q,loginWithApple:A,loginUsingEmail:C,sendPasswordResetCode:x,verifyPasswordResetCode:I,resetPassword:k,signout:F,error:S,portalContainer:y}),[e,v,R,w,E,O,q,A,C,x,I,k,F,S,y]);if(S){const e=S,t=401===e?.response?.status?"page-not-registered":e?.response?"generic-error":"service-unavailable";/* @__PURE__ */
40
- return i(n,{fallback:null,children:/* @__PURE__ */i(yt,{organizationId:c??"",errorType:t,errorMessage:"generic-error"===t?e.apiMessage:void 0})})}/* @__PURE__ */
41
- return i(kt.Provider,{value:D,children:/* @__PURE__ */i("div",{ref:g,id:"qrati-connect-container",style:{...Ct(R?.organization,p),fontFamily:R?.organization?.integrationSettings?.fontFamily&&"system"!==R.organization.integrationSettings.fontFamily?"var(--font-family)":"inherit"},className:Tt("bg-background text-foreground relative min-h-[80vh]"),children:o})})},Dt=()=>{const e=c(kt);if(void 0===e)throw new Error("useSession must be used within SessionProvider");return e};export{q as A,E as C,m as D,R as E,j as M,O,y as S,S as T,G as _,Ct as a,H as b,ge as c,he as d,ne as f,Z as g,ee as h,Tt as i,M as j,b as k,ye as l,Y as m,Dt as n,St as o,te as p,xt as r,ft as s,Ft as t,de as u,$ as v,T as w,N as x,_ as y};
@@ -1,9 +0,0 @@
1
- import{t as c}from"./DrrpB4Om.js";function o(c){return`https://www.bing.com/images/search?view=detailv2&iss=sbi&form=SBIVSP&sbisrc=UrlPaste&q=imgurl:${encodeURIComponent(c)}`}function r({className:o}){/* @__PURE__ */
2
- return c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 388",className:o,children:[
3
- /* @__PURE__ */c("defs",{children:[
4
- /* @__PURE__ */c("radialGradient",{id:"bingIconGradA",cx:"93.717%",cy:"77.818%",r:"143.121%",fx:"93.717%",fy:"77.818%",gradientTransform:"matrix(-.65486 -.5438 .75575 -.4712 .963 1.654)",children:[/* @__PURE__ */c("stop",{offset:"0%","stop-color":"#00cacc"}),/* @__PURE__ */c("stop",{offset:"100%","stop-color":"#048fce"})]}),
5
- /* @__PURE__ */c("radialGradient",{id:"bingIconGradB",cx:"13.893%",cy:"71.448%",r:"150.086%",fx:"13.893%",fy:"71.448%",gradientTransform:"matrix(.55155 -.39387 .23634 .91917 -.107 .112)",children:[/* @__PURE__ */c("stop",{offset:"0%","stop-color":"#00bbec"}),/* @__PURE__ */c("stop",{offset:"100%","stop-color":"#2756a9"})]}),
6
- /* @__PURE__ */c("linearGradient",{id:"bingIconGradC",x1:"50%",x2:"50%",y1:"0%",y2:"100%",children:[/* @__PURE__ */c("stop",{offset:"0%","stop-color":"#00bbec"}),/* @__PURE__ */c("stop",{offset:"100%","stop-color":"#2756a9"})]})]}),
7
- /* @__PURE__ */c("path",{fill:"url(#bingIconGradA)",d:"M129.424 122.047c-7.133.829-12.573 6.622-13.079 13.928c-.218 3.147-.15 3.36 6.986 21.722c16.233 41.774 20.166 51.828 20.827 53.243c1.603 3.427 3.856 6.65 6.672 9.544c2.16 2.22 3.585 3.414 5.994 5.024c4.236 2.829 6.337 3.61 22.818 8.49c16.053 4.754 24.824 7.913 32.381 11.664c9.791 4.86 16.623 10.387 20.944 16.946c3.1 4.706 5.846 13.145 7.04 21.64c.468 3.321.47 10.661.006 13.663c-1.008 6.516-3.021 11.976-6.101 16.545c-1.638 2.43-1.068 2.023 1.313-.939c6.74-8.379 13.605-22.7 17.108-35.687c4.24-15.718 4.817-32.596 1.66-48.57c-6.147-31.108-25.786-57.955-53.444-73.06c-1.738-.95-8.357-4.42-17.331-9.085a1633 1633 0 0 1-4.127-2.154c-.907-.477-2.764-1.447-4.126-2.154c-1.362-.708-5.282-2.75-8.711-4.539l-8.528-4.446a6021 6021 0 0 1-8.344-4.357c-8.893-4.655-12.657-6.537-13.73-6.863c-1.125-.343-3.984-.782-4.701-.723c-.152.012-.838.088-1.527.168"}),
8
- /* @__PURE__ */c("path",{fill:"url(#bingIconGradB)",d:"M148.81 277.994c-.493.292-1.184.714-1.537.938c-.354.225-1.137.712-1.743 1.083a8315 8315 0 0 0-13.204 8.137a2848 2848 0 0 0-8.07 4.997a388 388 0 0 1-3.576 2.198c-.454.271-2.393 1.465-4.31 2.654a2652 2652 0 0 1-7.427 4.586a3958 3958 0 0 0-8.62 5.316a3011 3011 0 0 1-7.518 4.637c-1.564.959-3.008 1.885-3.21 2.058c-.3.257-14.205 8.87-21.182 13.121c-5.3 3.228-11.43 5.387-17.705 6.235c-2.921.395-8.45.396-11.363.003c-7.9-1.067-15.176-4.013-21.409-8.666c-2.444-1.826-7.047-6.425-8.806-8.8c-4.147-5.598-6.829-11.602-8.218-18.396c-.32-1.564-.622-2.884-.672-2.935c-.13-.13.105 2.231.528 5.319c.44 3.211 1.377 7.856 2.387 11.829c7.814 30.743 30.05 55.749 60.15 67.646c8.668 3.424 17.415 5.582 26.932 6.64c3.576.4 13.699.56 17.43.276c17.117-1.296 32.02-6.334 47.308-15.996c1.362-.86 3.92-2.474 5.685-3.585a877 877 0 0 0 4.952-3.14c.958-.615 2.114-1.341 2.567-1.614a91 91 0 0 0 2.018-1.268c.656-.424 3.461-2.2 6.235-3.944l11.092-7.006l3.809-2.406l.137-.086l.42-.265l.199-.126l2.804-1.771l9.69-6.121c12.348-7.759 16.03-10.483 21.766-16.102c2.392-2.342 5.997-6.34 6.176-6.848c.037-.104.678-1.092 1.424-2.197c3.036-4.492 5.06-9.995 6.064-16.484c.465-3.002.462-10.342-.005-13.663c-.903-6.42-2.955-13.702-5.167-18.339c-3.627-7.603-11.353-14.512-22.453-20.076c-3.065-1.537-6.23-2.943-6.583-2.924c-.168.009-10.497 6.322-22.954 14.03c-12.457 7.71-23.268 14.4-24.025 14.87s-2.056 1.263-2.888 1.764z"}),
9
- /* @__PURE__ */c("path",{fill:"url(#bingIconGradC)",d:"m.053 241.013l.054 53.689l.695 3.118c2.172 9.747 5.937 16.775 12.482 23.302c3.078 3.07 5.432 4.922 8.768 6.896c7.06 4.177 14.657 6.238 22.978 6.235c8.716-.005 16.256-2.179 24.025-6.928c1.311-.801 6.449-3.964 11.416-7.029l9.032-5.572v-127.4l-.002-58.273c-.002-37.177-.07-59.256-.188-60.988c-.74-10.885-5.293-20.892-12.948-28.461c-2.349-2.323-4.356-3.875-10.336-7.99a25160 25160 0 0 1-12.104-8.336L28.617 5.835C22.838 1.85 22.386 1.574 20.639.949C18.367.136 15.959-.163 13.67.084C6.998.804 1.657 5.622.269 12.171C.053 13.191.013 26.751.01 100.35l-.003 86.975H0z"})]})}export{o as n,r as t};
@@ -1,3 +0,0 @@
1
- import{t}from"./DrrpB4Om.js";import{i as a,n as e}from"./BlmPmkho.js";import{t as i}from"./CE4Zhv-W.js";var r=({title:r,description:s,iconSvg:o,className:l})=>{const{props:n,organization:c}=e(),m=n?.emptyStateImage;/* @__PURE__ */
2
- return t("div",{className:a("mx-auto flex w-full max-w-md flex-col items-center justify-center gap-8",l),children:[c?.integrationSettings?.showLogo?/* @__PURE__ */t("img",{className:"h-44 w-auto",src:c?.logoUrl||"/images/qrati-logo.svg",alt:r}):m?/* @__PURE__ */t("img",{className:"h-44 w-auto",src:m,alt:r}):o?/* @__PURE__ */t("div",{className:"text-primary h-44 w-auto",children:o}):null,/* @__PURE__ */t("div",{className:"space-y-2",children:[
3
- /* @__PURE__ */t(i,{variant:"h4",align:"center",children:r}),"string"==typeof s&&/* @__PURE__ */t(i,{variant:"body2",color:"muted",align:"center",children:s}),"string"!=typeof s&&s]})]})};export{r as t};
@@ -1 +0,0 @@
1
- import{f as e,h as t,l as r,m as s}from"./BlmPmkho.js";var i=class extends e{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,r){const{state:i}=e,a=super.createResult(e,r),{isFetching:c,isRefetching:h,isError:o,isRefetchError:n}=a,P=i.fetchMeta?.fetchMore?.direction,f=o&&"forward"===P,g=c&&"forward"===P,u=o&&"backward"===P,d=c&&"backward"===P;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:s(r,i.data),hasPreviousPage:t(r,i.data),isFetchNextPageError:f,isFetchingNextPage:g,isFetchPreviousPageError:u,isFetchingPreviousPage:d,isRefetchError:n&&!f&&!u,isRefetching:h&&!g&&!d}}};function a(e,t){return r(e,i,t)}var c=e=>e?.meta?.currentPage>1?e.meta.currentPage-1:void 0,h=e=>e?.meta?.currentPage<e?.meta?.totalPages?e.meta.currentPage+1:void 0;export{c as n,a as r,h as t};
@@ -1,8 +0,0 @@
1
- import{h as a,t as s}from"./DrrpB4Om.js";import{n as o}from"./BlmPmkho.js";import{x as e}from"./DpD2Abx9.js";import{c as r,t as l}from"./OGzsLhnG.js";import{t as i}from"./CE4Zhv-W.js";import{n as t}from"./DGGc10Cy.js";import{t as n}from"./CtWIgfGz.js";import{a as d,i as m,o as p,r as c,s as w,t as g}from"./D9UPX_0d2.js";import{n as h,r as f,t as u}from"./DlRUi0u42.js";var b=()=>{const{t:b}=t(),[v,C]=a(""),[P,y]=a(""),[N,j]=a(""),[x,k]=a(""),[z,A]=a(""),[S,F]=a(null),[L,O]=a({}),[W,E]=a(!1),[R,D]=a({google:!1,apple:!1}),[G,H]=a({showPassword:!1,showConfirmPassword:!1}),I=r(),{registerUsingEmail:U,loginWithGoogle:T,loginWithApple:V}=o(),$=a=>{O(s=>s[a]?{...s,[a]:void 0}:s)},_=async(a,s)=>{D(s=>({...s,[a]:!0})),F(null);try{await(s?.())}catch(o){o instanceof Error?F(o.message):F(`Failed to sign up with ${a.charAt(0).toUpperCase()+a.slice(1)}`)}finally{D(s=>({...s,[a]:!1}))}};/* @__PURE__ */
2
- return s("div",{className:"bg-background w-full space-y-8",children:[/* @__PURE__ */s("form",{noValidate:!0,onSubmit:async a=>{a.preventDefault();const s=d(v),o=p(P),e=m(N),r=w(x),l=c(z,x);if(s||o||e||r||l)return void O({fname:s,lname:o,email:e,password:r,confirmPassword:l});O({}),E(!0),F(null);const i=await(U?.(N.toLowerCase(),x,v,P));i?.error&&F(i.error),E(!1)},className:"space-y-4",children:[
3
- /* @__PURE__ */s("div",{className:"grid grid-cols-2 gap-4",children:[/* @__PURE__ */s(g,{label:b("auth.firstName","First name"),name:"fname",disabled:W,type:"text",value:v,onChange:a=>{C(a.target.value),$("fname")},error:L.fname}),/* @__PURE__ */s(g,{label:b("auth.lastName","Last name"),name:"lname",disabled:W,type:"text",value:P,onChange:a=>{y(a.target.value),$("lname")},error:L.lname})]}),
4
- /* @__PURE__ */s(g,{label:b("auth.email","Email address"),name:"email",disabled:W,type:"email",value:N,onChange:a=>{j(a.target.value),$("email")},autoComplete:"email",error:L.email}),
5
- /* @__PURE__ */s(g,{label:b("auth.password","Password"),name:"password",disabled:W,type:G.showPassword?"text":"password",value:x,onChange:a=>{k(a.target.value),$("password")},autoComplete:"new-password",error:L.password,actionLabel:G.showPassword?"Hide password":"Show password",actionIcon:G.showPassword?/* @__PURE__ */s(u,{className:"size-5"}):/* @__PURE__ */s(h,{className:"size-5"}),onActionClick:()=>H(a=>({...a,showPassword:!a.showPassword}))}),
6
- /* @__PURE__ */s(g,{label:b("auth.confirmPassword","Confirm password"),name:"confirmPassword",disabled:W,type:G.showConfirmPassword?"text":"password",value:z,onChange:a=>{A(a.target.value),$("confirmPassword")},autoComplete:"new-password",error:L.confirmPassword,actionLabel:G.showConfirmPassword?"Hide password":"Show password",actionIcon:G.showConfirmPassword?/* @__PURE__ */s(u,{className:"size-5"}):/* @__PURE__ */s(h,{className:"size-5"}),onActionClick:()=>H(a=>({...a,showConfirmPassword:!a.showConfirmPassword}))}),S&&/* @__PURE__ */s(i,{align:"center",color:"error",className:"font-medium",children:S}),
7
- /* @__PURE__ */s("div",{className:"flex justify-end",children:/* @__PURE__ */s(l,{to:e.FORGOT_PASSWORD,state:{from:I.pathname},children:/* @__PURE__ */s(i,{variant:"h6",className:"w-fit",children:b("button.forgotPassword","Forgot Password?")})})}),
8
- /* @__PURE__ */s(n,{type:"submit",color:"primary",className:"w-full",disabled:W,loading:W,children:b("button.register","Register")})]}),/* @__PURE__ */s("div",{className:"grid grid-cols-2 gap-2",children:[/* @__PURE__ */s(f,{disabled:W||R.google||R.apple,loading:R.google,onClick:()=>_("google",T),provider:"google"}),/* @__PURE__ */s(f,{disabled:W||R.google||R.apple,loading:R.apple,onClick:()=>_("apple",V),provider:"apple"})]})]})};export{b as default};
@@ -1 +0,0 @@
1
- import{_ as e,h as n,p as t,v as o}from"./DrrpB4Om.js";import{c as i,n as r,s as a}from"./BlmPmkho.js";import{i as l}from"./DpD2Abx9.js";var d=(e,n)=>e.filter(e=>(e.parentFolderId??null)===n).map(n=>{return{folder:n,children:d(e,n._id),eventCount:n.boundary?.length??0,centroid:(t=n.boundary,t?.length?[t.reduce((e,n)=>e+n.x,0)/t.length,t.reduce((e,n)=>e+n.y,0)/t.length]:null),color:n.color||"#fb8500"};var t}).filter(e=>e.eventCount>0||e.children.length>0),s=e=>e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y),c=()=>{const{folders:c,organization:g}=r(),[m,u]=n(null),h=Boolean(g?.integrationSettings?.enableFolderView),y=t(()=>h?d(c??[],null):[],[c,h]),f=i({queryKey:["map-all-events",g?._id],queryFn:async()=>s((await a.get(l.PUBLIC_EVENTS,{headers:{"x-org-id":g?._id??""},searchParams:{includeAllFolders:!0,limit:500,sort:"-views",contentLimit:3,projection:"connect"}}).json()).data??[]),enabled:Boolean(g?._id)&&(!h||0===y.length),staleTime:3e5,gcTime:6e5,retry:!1}),v=i({queryKey:["map-folder-events",g?._id,m],queryFn:async()=>s((await a.get(l.PUBLIC_EVENTS,{headers:{"x-org-id":g?._id??""},searchParams:{folderId:m,limit:500,sort:"-views",contentLimit:3,projection:"connect"}}).json()).data??[]),enabled:Boolean(g?._id)&&h&&Boolean(m),staleTime:3e5,gcTime:6e5,retry:!1}),p=t(()=>(c??[]).find(e=>e._id===m)??null,[c,m]);e(()=>{h||u(null)},[h]);const _=o(e=>{u(e)},[]),F=h&&y.length>0;return{folderTree:y,activeFolderId:m,activeFolder:p,visibleEvents:F?v.data??[]:f.data??[],setActiveFolderId:_,isLoadingEvents:F?Boolean(m)&&(v.isLoading||v.isFetching):f.isLoading||f.isFetching}};export{c as t};
@@ -1 +0,0 @@
1
- import{C as t,D as e,E as s,M as i,O as r,S as u,T as n,b as a,k as o,p as h,v as c,w as l,x as f,y}from"./BlmPmkho.js";import{t as d}from"./DDyjgYNE.js";var m=class extends f{constructor(t={}){super(),this.config=t,this.#t=/* @__PURE__ */new Map}#t;build(t,e,s){const i=e.queryKey,r=e.queryHash??l(i,e);let u=this.get(r);return u||(u=new h({client:t,queryKey:i,queryHash:r,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(u)),u}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#t.get(t.queryHash);e&&(t.destroy(),e===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){y.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(t=>s(e,t))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(e=>s(t,e)):e}notify(t){y.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){y.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){y.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},p=class extends f{constructor(t={}){super(),this.config=t,this.#e=/* @__PURE__ */new Set,this.#s=/* @__PURE__ */new Map,this.#i=0}#e;#s;#i;build(t,e,s){const i=new d({client:t,mutationCache:this,mutationId:++this.#i,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#e.add(t);const e=q(t);if("string"==typeof e){const s=this.#s.get(e);s?s.push(t):this.#s.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=q(t);if("string"==typeof e){const s=this.#s.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#s.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=q(t);if("string"==typeof e){const s=this.#s.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=q(t);return"string"==typeof e?(this.#s.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){y.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#s.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(t=>n(e,t))}findAll(t={}){return this.getAll().filter(e=>n(t,e))}notify(t){y.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(t=>t.state.isPaused);return y.batch(()=>Promise.all(t.map(t=>t.continue().catch(e))))}};function q(t){return t.options.scope?.id}var g=class{#r;#u;#n;#a;#o;#h;#c;#l;constructor(t={}){this.#r=t.queryCache||new m,this.#u=t.mutationCache||new p,this.#n=t.defaultOptions||{},this.#a=/* @__PURE__ */new Map,this.#o=/* @__PURE__ */new Map,this.#h=0}mount(){this.#h++,1===this.#h&&(this.#c=a.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#r.onFocus())}),this.#l=c.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#r.onOnline())}))}unmount(){this.#h--,0===this.#h&&(this.#c?.(),this.#c=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#r.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#u.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#r.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#r.build(this,e),i=s.state.data;return void 0===i?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(o(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#r.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,s){const i=this.defaultQueryOptions({queryKey:t}),r=this.#r.get(i.queryHash)?.state.data,n=u(e,r);if(void 0!==n)return this.#r.build(this,i).setData(n,{...s,manual:!0})}setQueriesData(t,e,s){return y.batch(()=>this.#r.findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#r.get(e.queryHash)?.state}removeQueries(t){const e=this.#r;y.batch(()=>{e.findAll(t).forEach(t=>{e.remove(t)})})}resetQueries(t,e){const s=this.#r;return y.batch(()=>(s.findAll(t).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,s={}){const i={revert:!0,...s},r=y.batch(()=>this.#r.findAll(t).map(t=>t.cancel(i)));return Promise.all(r).then(e).catch(e)}invalidateQueries(t,e={}){return y.batch(()=>(this.#r.findAll(t).forEach(t=>{t.invalidate()}),"none"===t?.refetchType?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},r=y.batch(()=>this.#r.findAll(t).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let s=t.fetch(void 0,i);return i.throwOnError||(s=s.catch(e)),"paused"===t.state.fetchStatus?Promise.resolve():s}));return Promise.all(r).then(e)}fetchQuery(t){const e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);const s=this.#r.build(this,e);return s.isStaleByTime(o(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(e).catch(e)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(e).catch(e)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return c.isOnline()?this.#u.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#r}getMutationCache(){return this.#u}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(e,s){this.#a.set(t(e),{queryKey:e,defaultOptions:s})}getQueryDefaults(t){const e=[...this.#a.values()],s={};return e.forEach(e=>{r(t,e.queryKey)&&Object.assign(s,e.defaultOptions)}),s}setMutationDefaults(e,s){this.#o.set(t(e),{mutationKey:e,defaultOptions:s})}getMutationDefaults(t){const e=[...this.#o.values()],s={};return e.forEach(e=>{r(t,e.mutationKey)&&Object.assign(s,e.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=l(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===i&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#r.clear(),this.#u.clear()}};export{g as t};
@@ -1,5 +0,0 @@
1
- import{h as a,t as o}from"./DrrpB4Om.js";import{n as e}from"./BlmPmkho.js";import{x as s}from"./DpD2Abx9.js";import{c as r,t as l}from"./OGzsLhnG.js";import{t as i}from"./CE4Zhv-W.js";import{n as t}from"./DGGc10Cy.js";import{t as n}from"./CtWIgfGz.js";import{i as d,s as m,t as p}from"./D9UPX_0d2.js";import{n as c,r as g,t as u}from"./DlRUi0u42.js";var f=()=>{const{t:f}=t(),h=r(),[w,v]=a(""),[b,y]=a(""),[j,C]=a(!1),[N,x]=a(null),[k,A]=a(!1),[O,P]=a({}),{loginUsingEmail:S,loginWithGoogle:W,loginWithApple:E}=e(),[F,L]=a({google:!1,apple:!1}),z=a=>{P(o=>o[a]?{...o,[a]:void 0}:o)},D=async(a,o)=>{L(o=>({...o,[a]:!0})),x(null);try{await(o?.())}catch(e){e instanceof Error?x(e.message):x(`Failed to login with ${a.charAt(0).toUpperCase()+a.slice(1)}`)}finally{L(o=>({...o,[a]:!1}))}};/* @__PURE__ */
2
- return o("div",{className:"bg-background w-full space-y-6",children:[/* @__PURE__ */o("form",{noValidate:!0,onSubmit:async a=>{a.preventDefault();const o=d(w),e=m(b);if(o||e)return void P({email:o,password:e});P({}),C(!0),x(null);const s=await(S?.(w.toLowerCase(),b));s?.error&&x(s.error),C(!1)},className:"space-y-6",children:[
3
- /* @__PURE__ */o("div",{className:"space-y-9",children:[/* @__PURE__ */o(p,{label:f("auth.email","Email address"),name:"email",disabled:j,type:"email",value:w,onChange:a=>{v(a.target.value),z("email")},autoComplete:"email",error:O.email}),/* @__PURE__ */o(p,{label:f("auth.password","Password"),name:"password",disabled:j,type:k?"text":"password",value:b,onChange:a=>{y(a.target.value),z("password")},autoComplete:"current-password",error:O.password,actionLabel:k?"Hide password":"Show password",actionIcon:/* @__PURE__ */o(k?u:c,{className:"size-5"}),onActionClick:()=>A(!k)})]}),N&&/* @__PURE__ */o(i,{align:"center",color:"error",className:"font-medium",children:N}),
4
- /* @__PURE__ */o("div",{className:"flex justify-end",children:/* @__PURE__ */o(l,{to:s.FORGOT_PASSWORD,state:{from:h.pathname},children:/* @__PURE__ */o(i,{variant:"h6",className:"w-fit",children:f("button.forgotPassword","Forgot Password?")})})}),
5
- /* @__PURE__ */o(n,{type:"submit",color:"primary",className:"w-full",loading:j,disabled:j,children:f("button.login","Login")})]}),/* @__PURE__ */o("div",{className:"grid grid-cols-2 gap-4",children:[/* @__PURE__ */o(g,{disabled:j||F.google||F.apple,loading:F.google,onClick:()=>D("google",W),provider:"google"}),/* @__PURE__ */o(g,{disabled:j||F.google||F.apple,loading:F.apple,onClick:()=>D("apple",E),provider:"apple"})]})]})};export{f as default};
@@ -1 +0,0 @@
1
- import{c}from"./DpD2Abx9.js";import{n as t}from"./CD7ZeUsI2.js";var e=class{constructor(c){this.lightbox=c,c.on("init",()=>{this.initPswpEvents(c.pswp)})}initPswpEvents(e){e.on("uiRegister",()=>{e.ui.registerElement({name:"bing-search-button",order:9,isButton:!0,tagName:"button",title:"Search this image on Bing",html:{isCustomSVG:!0,inner:'<div class="flex justify-center items-center"><svg xmlns="http://www.w3.org/2000/svg" width="0.9em" height="2em" viewBox="0 0 256 388"><path d="M0 0h256v388H0z" fill="none"/><defs><radialGradient id="SVGGZQEKcDW" cx="93.717%" cy="77.818%" r="143.121%" fx="93.717%" fy="77.818%" gradientTransform="matrix(-.65486 -.5438 .75575 -.4712 .963 1.654)"><stop offset="0%" stop-color="#00cacc"/><stop offset="100%" stop-color="#048fce"/></radialGradient><radialGradient id="SVG8Pn4lbDv" cx="13.893%" cy="71.448%" r="150.086%" fx="13.893%" fy="71.448%" gradientTransform="matrix(.55155 -.39387 .23634 .91917 -.107 .112)"><stop offset="0%" stop-color="#00bbec"/><stop offset="100%" stop-color="#2756a9"/></radialGradient><linearGradient id="SVGavx67sXC" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0%" stop-color="#00bbec"/><stop offset="100%" stop-color="#2756a9"/></linearGradient></defs><path fill="url(#SVGGZQEKcDW)" d="M129.424 122.047c-7.133.829-12.573 6.622-13.079 13.928c-.218 3.147-.15 3.36 6.986 21.722c16.233 41.774 20.166 51.828 20.827 53.243c1.603 3.427 3.856 6.65 6.672 9.544c2.16 2.22 3.585 3.414 5.994 5.024c4.236 2.829 6.337 3.61 22.818 8.49c16.053 4.754 24.824 7.913 32.381 11.664c9.791 4.86 16.623 10.387 20.944 16.946c3.1 4.706 5.846 13.145 7.04 21.64c.468 3.321.47 10.661.006 13.663c-1.008 6.516-3.021 11.976-6.101 16.545c-1.638 2.43-1.068 2.023 1.313-.939c6.74-8.379 13.605-22.7 17.108-35.687c4.24-15.718 4.817-32.596 1.66-48.57c-6.147-31.108-25.786-57.955-53.444-73.06c-1.738-.95-8.357-4.42-17.331-9.085a1633 1633 0 0 1-4.127-2.154c-.907-.477-2.764-1.447-4.126-2.154c-1.362-.708-5.282-2.75-8.711-4.539l-8.528-4.446a6021 6021 0 0 1-8.344-4.357c-8.893-4.655-12.657-6.537-13.73-6.863c-1.125-.343-3.984-.782-4.701-.723c-.152.012-.838.088-1.527.168"/><path fill="url(#SVG8Pn4lbDv)" d="M148.81 277.994c-.493.292-1.184.714-1.537.938c-.354.225-1.137.712-1.743 1.083a8315 8315 0 0 0-13.204 8.137a2848 2848 0 0 0-8.07 4.997a388 388 0 0 1-3.576 2.198c-.454.271-2.393 1.465-4.31 2.654a2652 2652 0 0 1-7.427 4.586a3958 3958 0 0 0-8.62 5.316a3011 3011 0 0 1-7.518 4.637c-1.564.959-3.008 1.885-3.21 2.058c-.3.257-14.205 8.87-21.182 13.121c-5.3 3.228-11.43 5.387-17.705 6.235c-2.921.395-8.45.396-11.363.003c-7.9-1.067-15.176-4.013-21.409-8.666c-2.444-1.826-7.047-6.425-8.806-8.8c-4.147-5.598-6.829-11.602-8.218-18.396c-.32-1.564-.622-2.884-.672-2.935c-.13-.13.105 2.231.528 5.319c.44 3.211 1.377 7.856 2.387 11.829c7.814 30.743 30.05 55.749 60.15 67.646c8.668 3.424 17.415 5.582 26.932 6.64c3.576.4 13.699.56 17.43.276c17.117-1.296 32.02-6.334 47.308-15.996c1.362-.86 3.92-2.474 5.685-3.585a877 877 0 0 0 4.952-3.14c.958-.615 2.114-1.341 2.567-1.614a91 91 0 0 0 2.018-1.268c.656-.424 3.461-2.2 6.235-3.944l11.092-7.006l3.809-2.406l.137-.086l.42-.265l.199-.126l2.804-1.771l9.69-6.121c12.348-7.759 16.03-10.483 21.766-16.102c2.392-2.342 5.997-6.34 6.176-6.848c.037-.104.678-1.092 1.424-2.197c3.036-4.492 5.06-9.995 6.064-16.484c.465-3.002.462-10.342-.005-13.663c-.903-6.42-2.955-13.702-5.167-18.339c-3.627-7.603-11.353-14.512-22.453-20.076c-3.065-1.537-6.23-2.943-6.583-2.924c-.168.009-10.497 6.322-22.954 14.03c-12.457 7.71-23.268 14.4-24.025 14.87s-2.056 1.263-2.888 1.764z"/><path fill="url(#SVGavx67sXC)" d="m.053 241.013l.054 53.689l.695 3.118c2.172 9.747 5.937 16.775 12.482 23.302c3.078 3.07 5.432 4.922 8.768 6.896c7.06 4.177 14.657 6.238 22.978 6.235c8.716-.005 16.256-2.179 24.025-6.928c1.311-.801 6.449-3.964 11.416-7.029l9.032-5.572v-127.4l-.002-58.273c-.002-37.177-.07-59.256-.188-60.988c-.74-10.885-5.293-20.892-12.948-28.461c-2.349-2.323-4.356-3.875-10.336-7.99a25160 25160 0 0 1-12.104-8.336L28.617 5.835C22.838 1.85 22.386 1.574 20.639.949C18.367.136 15.959-.163 13.67.084C6.998.804 1.657 5.622.269 12.171C.053 13.191.013 26.751.01 100.35l-.003 86.975H0z"/></svg></div>',outlineID:"pswp__icn-bing-search"},onClick:(e,o,r)=>{const s=r.currSlide?.data;s?.type===c.IMAGE.toLowerCase()&&s.src&&window.open(t(s.src),"_blank","noopener,noreferrer")}})})}};export{e as default};
@@ -1,16 +0,0 @@
1
- import{h as e,p as r,t as a}from"./DrrpB4Om.js";import{n as s}from"./BlmPmkho.js";import{x as i}from"./DpD2Abx9.js";import{l}from"./OGzsLhnG.js";import{t}from"./CE4Zhv-W.js";import{n as o}from"./DGGc10Cy.js";import{t as n}from"./CtWIgfGz.js";import{i as d,s as c,t as u}from"./D9UPX_0d2.js";var h=({count:e=1,currentStep:r=0,disabled:s,onStepClick:i})=>{const l=s||!i;/* @__PURE__ */
2
- return a("ol",{className:"flex items-center space-x-6 pl-1.5",children:Array.from({length:e}).map((e,s)=>/* @__PURE__ */a("li",{children:/* @__PURE__ */a("button",s<r?{type:"button",className:"bg-primary block h-3 w-3 rounded-full",disabled:l,onClick:()=>i?.(s)}:s===r?{type:"button",className:"relative flex items-center justify-center","aria-current":"step",disabled:l,onClick:()=>i?.(s),children:[/* @__PURE__ */a("span",{className:"absolute flex size-6 p-px","aria-hidden":"true",children:/* @__PURE__ */a("span",{className:"bg-primary/40 size-full rounded-full"})}),/* @__PURE__ */a("span",{className:"bg-primary relative block size-3 rounded-full","aria-hidden":"true"})]}:{type:"button",className:"bg-muted block size-3 rounded-full",disabled:l,onClick:()=>i?.(s)})},`progress-dot-${s}`))})},m=({onCodeSent:r})=>{const{t:i}=o(),{sendPasswordResetCode:l}=s(),[c,h]=e(""),[m,f]=e(!1),[p,y]=e(null),[v,g]=e(null);/* @__PURE__ */
3
- return a("div",{className:"space-y-4",children:[
4
- /* @__PURE__ */a(t,{variant:"h4",children:i("auth.forgotPassword","Forgot Password")}),
5
- /* @__PURE__ */a(u,{type:"email",name:"email",value:c,onChange:e=>{h(e.target.value),p&&y(null),v&&g(null)},placeholder:i("auth.emailPlaceholder","Enter your email address"),error:p??void 0,disabled:m}),v&&/* @__PURE__ */a(t,{variant:"body2",color:"error",children:v}),
6
- /* @__PURE__ */a("div",{children:/* @__PURE__ */a(n,{onClick:async()=>{y(null),g(null);const e=c.trim().toLowerCase(),a=d(e);if(a)y(a);else{f(!0);try{const a=await l(e);a?.error?g(a.error):r(e)}catch(s){g(s instanceof Error?s.message:String(s))}finally{f(!1)}}},fullWidth:!0,loading:m,disabled:m,children:i("auth.sendVerificationCode","Send verification code")})})]})},f=({email:r,onCodeVerified:i})=>{const{t:l}=o(),{verifyPasswordResetCode:d}=s(),[c,h]=e(""),[m,f]=e(!1),[p,y]=e(null);/* @__PURE__ */
7
- return a("div",{className:"space-y-4 sm:space-y-6",children:[
8
- /* @__PURE__ */a("div",{className:"space-y-2",children:[/* @__PURE__ */a(t,{variant:"h4",children:l("auth.verifyCode","Verify Code")}),/* @__PURE__ */a(t,{variant:"body1",children:[l("auth.enterCodeSentTo","Enter the 6-digit code sent to")," ",r]})]}),
9
- /* @__PURE__ */a(u,{value:c,name:"code",onChange:e=>h(e.target.value),placeholder:l("auth.codePlaceholder","Enter verification code"),disabled:m}),p&&/* @__PURE__ */a(t,{variant:"body2",color:"error",children:p}),
10
- /* @__PURE__ */a("div",{className:"flex gap-2",children:/* @__PURE__ */a(n,{onClick:async()=>{if(y(null),r)if(c.trim()){f(!0);try{const e=await d(r,c.trim());e?.error?y(e.error):e?.data?i(e.data):y(l("auth.codeVerifyFailed","Failed to verify code"))}catch(e){y(e instanceof Error?e.message:String(e))}finally{f(!1)}}else y(l("auth.codeRequired","Please enter the verification code"));else y(l("auth.emailMissing","Email address is missing"))},fullWidth:!0,loading:m,disabled:m,children:l("auth.verify","Verify")})})]})},p=({email:i,passwordResetCodeId:l,onPasswordReset:d})=>{const{t:h}=o(),{resetPassword:m}=s(),[f,p]=e(""),[y,v]=e(""),[g,w]=e(null),[b,C]=e(!1),N=r(()=>c(f),[f]),P=f&&f===y&&!N;/* @__PURE__ */
11
- return a("div",{className:"space-y-4",children:[
12
- /* @__PURE__ */a(t,{variant:"h4",children:h("auth.resetPassword","Reset Password")}),
13
- /* @__PURE__ */a(u,{type:"password",name:"password",value:f,onChange:e=>{p(e.target.value),g&&w(null)},placeholder:h("auth.newPassword","New password"),disabled:b,error:N}),
14
- /* @__PURE__ */a(u,{type:"password",name:"confirmPassword",value:y,onChange:e=>{v(e.target.value),g&&w(null)},placeholder:h("auth.confirmNewPassword","Confirm new password"),disabled:b}),g&&/* @__PURE__ */a(t,{variant:"body2",color:"error",children:g}),
15
- /* @__PURE__ */a("div",{children:/* @__PURE__ */a(n,{onClick:async()=>{if(w(null),i)if(l)if(P){C(!0);try{const e=await m(l,f);e?.error?w(e.error):d()}catch(e){w(e instanceof Error?e.message:String(e))}finally{C(!1)}}else w(h("auth.passwordsDoNotMatch","Passwords do not match"));else w(h("auth.codeIdMissing","Verification code ID is missing"));else w(h("auth.emailMissing","Email address is missing"))},disabled:!P||b,fullWidth:!0,loading:b,children:h("auth.resetPasswordButton","Reset Password")})})]})},y=()=>{const r=l(),[s,t]=e(null),[o,n]=e(null),[d,c]=e(0);/* @__PURE__ */
16
- return a("div",{className:"bg-background min-h-[60vh]",children:[(({index:e})=>{switch(e){case 0:/* @__PURE__ */return a(m,{onCodeSent:e=>{t(e),c(1)}});case 1:/* @__PURE__ */return a(f,{email:s,onCodeVerified:e=>{n(e),c(2)}});case 2:/* @__PURE__ */return a(p,{email:s,passwordResetCodeId:o,onPasswordReset:()=>{r(i.LOGIN)}})}})({index:d}),/* @__PURE__ */a("div",{className:"mt-8 flex justify-center",children:/* @__PURE__ */a(h,{count:3,currentStep:d})})]})};export{y as default};