@plitzi/plitzi-sdk 0.36.2 → 0.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
- import{n as e,r as t,t as n}from"./rolldown-runtime-CxhCXM28.js";import{$ as r,A as i,B as a,C as o,D as s,E as l,F as c,G as u,H as d,I as p,J as h,K as f,L as m,M as g,N as y,O as b,P as v,Q as x,R as k,S as w,T as S,U as N,V as T,W as C,X as E,Y as I,Z as z,_ as O,a as A,b as _,c as D,d as P,et as M,f as L,g as R,h as j,i as F,j as $,k as q,l as V,m as B,n as U,o as H,p as W,q as G,r as Q,s as J,t as K,u as Y,v as X,w as Z,x as ee,y as te,z as ne}from"./withElement-sT03eGXl.js";import*as re from"react";import ie,{Children as ae,Fragment as oe,cloneElement as se,createContext as le,createElement as ce,forwardRef as ue,isValidElement as de,memo as pe,use as he,useCallback as fe,useContext as me,useEffect as ge,useId as ye,useImperativeHandle as be,useLayoutEffect as ve,useMemo as xe,useReducer as ke,useRef as we,useState as Se,useSyncExternalStore as Ne}from"react";import{createRoot as Te,hydrateRoot as Ce}from"react-dom/client";import{Fragment as Ee,jsx as Ie,jsxs as ze}from"react/jsx-runtime";import{createPortal as Oe}from"react-dom";import{c as Ae}from"react/compiler-runtime";var _e=Object.defineProperty,De=(e,t)=>{let n={};for(var r in e)_e(n,r,{get:e[r],enumerable:!0});return t||_e(n,Symbol.toStringTag,{value:"Module"}),n},Pe={previewMode:!0,debugMode:!1,renderMode:"raw",environment:"main",isHydrating:!1,hydrated:!1,overQuota:!1,testAttributes:!0},Me=()=>{let[[e,t,n,r,i,a,o,s]]=c(["render.previewMode","render.debugMode","render.renderMode","render.environment","render.isHydrating","render.hydrated","render.overQuota","render.testAttributes"]);return xe(()=>({previewMode:e??Pe.previewMode,debugMode:t??Pe.debugMode,renderMode:n??Pe.renderMode,environment:r??Pe.environment,isHydrating:i??Pe.isHydrating,hydrated:a??Pe.hydrated,overQuota:o??Pe.overQuota,testAttributes:s??Pe.testAttributes}),[e,t,n,r,i,a,o,s])},Le=(e,t)=>"string"!=typeof e||e===t||e.length>t.length&&e.startsWith(t)&&"."===e[t.length]||t.length>e.length&&t.startsWith(e)&&"."===t[e.length],Re=(e,t,n=12)=>{if(!Object.is(e,t)){if(n<=0||!z(e)||!z(t))return{path:"",value:t};for(let r of/* @__PURE__ */new Set([...Object.keys(e),...Object.keys(t)])){if(Object.is(e[r],t[r]))continue;let i=Re(e[r],t[r],n-1);if(i)return{path:i.path?`${r}.${i.path}`:r,value:i.value}}}},je=/* @__PURE__ */new WeakMap,Fe=e=>{let t=e?.enabled;return n=>{if(x(t,n.getState()))return;let{handle:r,record:i}=function(e,t={}){let n=t.limit??100,r=t.path,i=t.shouldRecord,a=[{state:e.getState(),timestamp:Date.now()}],o=0,s=!1,l=()=>({entries:a,index:o,canUndo:o>0,canRedo:o<a.length-1}),c=l(),u=/* @__PURE__ */new Set,d=()=>{c=l(),u.forEach(e=>e())},p=t=>{if(t<0||t>=a.length||t===o)return;let n=a[t].state;if(s=!0,r){let t=E(n,r);e.setState(r,()=>t)}else e.setState(void 0,()=>n);s=!1,o=t,d()};return{handle:{getSnapshot:()=>c,subscribe:e=>(u.add(e),()=>u.delete(e)),undo:()=>p(o-1),redo:()=>p(o+1),travelTo:p,clear:()=>{a=[{state:e.getState(),timestamp:Date.now()}],o=0,d()}},record:({path:t})=>{if(s||i&&!i(t)||r&&void 0!==t&&!Le(t,r))return;let l,c=o<a.length-1?a.slice(0,o+1):a,u=c[c.length-1].state,p=e.getState(),h=t??r,f=t??r;if(f)try{let e=Re(E(u,f),E(p,f));e&&(h=e.path?`${f}.${e.path}`:f,l=e.value)}catch{}let m=[...c,{path:h,value:l,state:p,timestamp:Date.now()}];a=m.length>n?m.slice(m.length-n):m,o=a.length-1,d()}}}(n,e);return je.set(n,r),{onChange:i}}},$e=e=>{},qe=e=>{},Ve=(e={})=>{let{filter:t,sink:n=$e,errorSink:r=qe,enabled:i}="function"==typeof e?{sink:e}:e;return e=>{if(!x(i,e.getState()))return{onChange:e=>{(!t||t(e))&&n(e)},onError:r}}},Be=(e="local")=>{if("string"!=typeof e)return e;try{return"session"===e?globalThis.sessionStorage:globalThis.localStorage}catch{return}},Ue=Symbol("@plitzi/nexus/ssr-snapshot");function He(e){return"object"==typeof e&&!!e&&Ue in e}var We,Ge=/* @__PURE__ */new Map,Qe=/* @__PURE__ */new Set,Je=0,Ke=()=>{We=void 0;for(let e of Qe)e()},Ye=(e,t,n)=>{let r=e;return Ge.set(r,{uid:"dev-store-"+ ++Je,store:r,scopeId:t,name:n}),Ke(),()=>{Ge.delete(r),Ke()}},Xe=e=>(Qe.add(e),()=>{Qe.delete(e)}),Ze=()=>(We??=[...Ge.values()],We),et=G({runs:[]},{id:"action-runs"}),tt=0,nt=e=>et.setState("runs",e),rt=/* @__PURE__ */new Map,it=e=>({id:`render-${e.runId}`,actionId:e.actionId,mode:"render",runId:e.runId,status:e.status,steps:e.steps,progress:[],startedAt:e.startedAt,endedAt:e.endedAt,...void 0===e.error?{}:{error:e.error},...void 0===e.elementId?{}:{elementId:e.elementId}}),at=e=>{let{runs:t}=et.getState(),n=new Set(t.map(e=>e.runId)),r=e.filter(e=>!n.has(e.runId)).map(it);0!==r.length&&nt([...r.reverse(),...t].slice(0,100))},ot=(e,t)=>{let{runs:n}=et.getState();n.some(t=>t.id===e)&&nt(n.map(n=>n.id===e?{...n,...t}:n))},st=()=>{let e=new Set(et.getState().runs.filter(e=>e.cancellable).map(e=>e.id));[...rt.keys()].forEach(t=>{e.has(t)||rt.delete(t)}),nt([])},lt=le(void 0);lt.displayName="DevStoreScopeContext";var ct=G,ut=le(void 0),dt=e=>!0===e.cascade,pt=({store:e,id:t,segment:n,isolate:r,path:i,value:a,inherit:o,autoSync:s=!0,middlewares:l,name:c,children:d})=>{let p=me(f),m=me(ut),g=me(C),y=me(lt),b=p?.scopePath??"",v=xe(()=>void 0===n?b:b?`${b}/${n}`:n,[b,n]),x=we(void 0),k="live"===o,w=xe(()=>{let e="snapshot"===o&&p?p.getState():{},t="function"==typeof a?a(e):{...e,...a};return He(t)?function(e){return He(e)?{...e}:e}(t):t},[o,p,a]),S=l??[],N=m?[...m,...S]:S,E=xe(()=>{let e=S.filter(dt);return 0===e.length?m:[...m??[],...e]},[m,l]);x.current||=e??ct(()=>w,{id:t,scopePath:v,exclusive:k?r:void 0,parent:k?p:void 0,middlewares:N.length>0?N:void 0,deferHydrate:!0});let I=xe(()=>t?{id:t,store:x.current,parent:g}:g,[t,g]),z=we(!1);ge(()=>{h&&t&&!z.current&&u(g,t)&&(z.current=!0)},[t,g]),ge(()=>(k&&!e&&x.current?.reconnect?.(),()=>{k&&!e&&x.current?.destroy?.()}),[k,e]),ge(()=>{if(h||void 0!==y)return Ye(x.current,y,c)},[y,c]);let O=we(!1);ge(()=>{!O.current&&x.current?.hydrate&&(x.current.hydrate(),O.current=!0)},[]),T(i,i?a:w,{enabled:!!a&&s,store:x.current});let A=/* @__PURE__ */Ie(f,{value:x.current,children:d});return I!==g&&(A=/* @__PURE__ */Ie(C,{value:I,children:A})),E!==m&&(A=/* @__PURE__ */Ie(ut,{value:E,children:A})),A},ht={entries:[],index:-1,canUndo:!1,canRedo:!1},ft=()=>{},mt=()=>ft,gt=()=>ht,yt=/* @__PURE__ */new WeakSet;function bt(e,t){let n={},r=Array.isArray(t)?t:[t];for(let i of r){let t=b(e,i);void 0!==t&&s(n,i,t)}return n}function vt(e,t=0,n={}){let r,i,a,o,s,l=0,c=n.leading??!1,u=n.trailing??!0,d=n.maxWait,p=()=>Date.now();function h(t){if(!r)return a;l=t;let n=r,o=i;return r=void 0,i=void 0,a=e.apply(o,n),a}function f(e){o=setTimeout(g,e)}function m(e){if(void 0===s)return!0;let n=e-s;return n>=t||n<0||void 0!==d&&e-l>=d}function g(){let e=p();if(m(e))return b(e);f(function(e){let n=e-l,r=t-(e-(s??0));return void 0===d?r:Math.min(r,d-n)}(e))}function y(e){return l=e,f(t),c?h(e):a}function b(e){return o=void 0,u&&r?h(e):(r=i=void 0,a)}function v(...e){let n=p(),l=m(n);if(r=e,i=this,s=n,l){if(!o)return y(n);if(void 0!==d)return clearTimeout(o),f(t),h(n)}return o||f(t),a}return v.cancel=()=>{void 0!==o&&clearTimeout(o),l=0,r=s=i=o=void 0},v.flush=()=>void 0===o?a:b(p()),v.pending=()=>void 0!==o,v}function xt(e,t=0,n={}){return vt(e,t,{leading:n.leading??!0,trailing:n.trailing??!0,maxWait:t})}function kt(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=kt(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=kt(e))&&(r&&(r+=" "),r+=t);return r}var St=/* @__PURE__ */e({cva:()=>Ct,cx:()=>Tt}),Nt=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Tt=wt,Ct=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Tt(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const o=Nt(t)||Nt(r);return i[e][o]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]);return Tt(e,o,l,null==n?void 0:n.class,null==n?void 0:n.className)},{cva:Et}=St,It=/* @__PURE__ */new Set,zt=e=>{for(let t of It)t(e)},Ot=["missing","expired","revoked","inactive","unverified","malformed","outdated","network"],At=(e,t)=>{if(401!==e)return;let n=t?.reason;return"string"==typeof n&&Ot.includes(n)?n:"expired"},_t=e=>/([^.]+\.[^.]+)$/.exec(e)?.[1]??e;function Dt(e){return Pt(e,[])}function Pt(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:Pt(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,i=[];for(let a=0;a<n;++a)i.push(Pt(e[a],t));return 1===r?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);return 0===n.length?"{}":t.length>2?"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]":"{ "+n.map(([e,n])=>e+": "+Pt(n,t)).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}function Mt(e,t){if(!e)throw new Error(t??"Unexpected invariant triggered.")}var Lt=/\r\n|[\n\r]/g;function Rt(e,t){let n=0,r=1;for(const i of e.body.matchAll(Lt)){if("number"!=typeof i.index&&Mt(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function jt(e){return Ft(e.source,Rt(e.source,e.start))}function Ft(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=1===t.line?n:0,l=t.column+s,c=`${e.name}:${o}:${l}\n`,u=r.split(/\r\n|[\n\r]/g),d=u[i];if(d.length>120){const e=Math.floor(l/80),t=l%80,n=[];for(let r=0;r<d.length;r+=80)n.push(d.slice(r,r+80));return c+$t([[`${o} |`,n[0]],...n.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(t)],["|",n[e+1]]])}return c+$t([[o-1+" |",u[i-1]],[`${o} |`,d],["|","^".padStart(l)],[`${o+1} |`,u[i+1]]])}function $t(e){const t=e.filter(([e,t])=>void 0!==t),n=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(n)+(t?" "+t:"")).join("\n")}var qt=class e extends Error{constructor(t,n={}){const{nodes:r,source:i,positions:a,path:o,originalError:s,cause:l,extensions:c}=n,u="cause"in n;super(t,u||null!=s?{cause:u?l:s}:void 0),this.name="GraphQLError",this.path=o??void 0;const d=s??(l instanceof Error?l:void 0);this.originalError=d,this.nodes=Vt(Array.isArray(r)?r:r?[r]:void 0);const p=Vt(this.nodes?.map(e=>e.loc).filter(e=>null!=e));this.source=i??p?.[0]?.source,this.positions=a??p?.map(e=>e.start),this.locations=a&&i?a.map(e=>Rt(i,e)):p?.map(e=>Rt(e.source,e.start));const h=(f=d?.extensions,"object"==typeof f&&null!==f?d.extensions:void 0);var f;this.extensions=c??h??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=s?.stack?Object.defineProperty(this,"stack",{value:s.stack,writable:!0,configurable:!0}):null!=Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const t of this.nodes)t.loc&&(e+="\n\n"+jt(t.loc));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+Ft(this.source,t);return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};function Vt(e){return void 0===e||0===e.length?void 0:e}var Bt=class{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},Ut=class{constructor(e,t,n,r,i,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},Ht={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentArgument:["name","value"],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},Wt=new Set(Object.keys(Ht));function Gt(e){const t=e?.kind;return"string"==typeof t&&Wt.has(t)}var Qt="query",Jt="mutation",Kt="subscription",Yt=/* @__PURE__ */e({ARGUMENT:()=>an,ARGUMENT_COORDINATE:()=>Wn,BOOLEAN:()=>fn,DIRECTIVE:()=>xn,DIRECTIVE_ARGUMENT_COORDINATE:()=>Qn,DIRECTIVE_COORDINATE:()=>Gn,DIRECTIVE_DEFINITION:()=>Mn,DIRECTIVE_EXTENSION:()=>Rn,DOCUMENT:()=>Zt,ENUM:()=>gn,ENUM_TYPE_DEFINITION:()=>_n,ENUM_TYPE_EXTENSION:()=>Vn,ENUM_VALUE_DEFINITION:()=>Dn,FIELD:()=>rn,FIELD_DEFINITION:()=>In,FLOAT:()=>pn,FRAGMENT_ARGUMENT:()=>on,FRAGMENT_DEFINITION:()=>cn,FRAGMENT_SPREAD:()=>sn,INLINE_FRAGMENT:()=>ln,INPUT_OBJECT_TYPE_DEFINITION:()=>Pn,INPUT_OBJECT_TYPE_EXTENSION:()=>Bn,INPUT_VALUE_DEFINITION:()=>zn,INT:()=>dn,INTERFACE_TYPE_DEFINITION:()=>On,INTERFACE_TYPE_EXTENSION:()=>$n,LIST:()=>yn,LIST_TYPE:()=>wn,MEMBER_COORDINATE:()=>Hn,NAME:()=>Xt,NAMED_TYPE:()=>kn,NON_NULL_TYPE:()=>Sn,NULL:()=>mn,OBJECT:()=>bn,OBJECT_FIELD:()=>vn,OBJECT_TYPE_DEFINITION:()=>En,OBJECT_TYPE_EXTENSION:()=>Fn,OPERATION_DEFINITION:()=>en,OPERATION_TYPE_DEFINITION:()=>Tn,SCALAR_TYPE_DEFINITION:()=>Cn,SCALAR_TYPE_EXTENSION:()=>jn,SCHEMA_DEFINITION:()=>Nn,SCHEMA_EXTENSION:()=>Ln,SELECTION_SET:()=>nn,STRING:()=>hn,TYPE_COORDINATE:()=>Un,UNION_TYPE_DEFINITION:()=>An,UNION_TYPE_EXTENSION:()=>qn,VARIABLE:()=>un,VARIABLE_DEFINITION:()=>tn}),Xt="Name",Zt="Document",en="OperationDefinition",tn="VariableDefinition",nn="SelectionSet",rn="Field",an="Argument",on="FragmentArgument",sn="FragmentSpread",ln="InlineFragment",cn="FragmentDefinition",un="Variable",dn="IntValue",pn="FloatValue",hn="StringValue",fn="BooleanValue",mn="NullValue",gn="EnumValue",yn="ListValue",bn="ObjectValue",vn="ObjectField",xn="Directive",kn="NamedType",wn="ListType",Sn="NonNullType",Nn="SchemaDefinition",Tn="OperationTypeDefinition",Cn="ScalarTypeDefinition",En="ObjectTypeDefinition",In="FieldDefinition",zn="InputValueDefinition",On="InterfaceTypeDefinition",An="UnionTypeDefinition",_n="EnumTypeDefinition",Dn="EnumValueDefinition",Pn="InputObjectTypeDefinition",Mn="DirectiveDefinition",Ln="SchemaExtension",Rn="DirectiveExtension",jn="ScalarTypeExtension",Fn="ObjectTypeExtension",$n="InterfaceTypeExtension",qn="UnionTypeExtension",Vn="EnumTypeExtension",Bn="InputObjectTypeExtension",Un="TypeCoordinate",Hn="MemberCoordinate",Wn="ArgumentCoordinate",Gn="DirectiveCoordinate",Qn="DirectiveArgumentCoordinate";function Jn(e,t){if(!e)throw new Error(t)}function Kn(e){return 9===e||32===e}function Yn(e){return e>=48&&e<=57}function Xn(e){return e>=97&&e<=122||e>=65&&e<=90}function Zn(e){return Xn(e)||95===e}function er(e){return Xn(e)||Yn(e)||95===e}function tr(e){let t=Number.MAX_SAFE_INTEGER,n=null,r=-1;for(let i=0;i<e.length;++i){const a=e[i],o=nr(a);o!==a.length&&(n??=i,r=i,0!==i&&o<t&&(t=o))}return e.map((e,n)=>0===n?e:e.slice(t)).slice(n??0,r+1)}function nr(e){let t=0;for(;t<e.length&&Kn(e.charCodeAt(t));)++t;return t}var rr=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function ir(e){return ar[e.charCodeAt(0)]}var ar=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],or=Object.freeze({});function sr(e,t,n=Ht){const r=/* @__PURE__ */new Map;for(const f of Object.values(Yt))r.set(f,lr(t,f));let i,a,o,s=Array.isArray(e),l=[e],c=-1,u=[],d=e;const p=[],h=[];do{c++;const e=c===l.length,f=e&&0!==u.length;if(e){if(a=0===h.length?void 0:p[p.length-1],d=o,o=h.pop(),f)if(s){d=d.slice();let e=0;for(const[t,n]of u){const r=t-e;null===n?(d.splice(r,1),e++):d[r]=n}}else{d={...d};for(const[e,t]of u)d[e]=t}c=i.index,l=i.keys,u=i.edits,s=i.inArray,i=i.prev}else if(null!=o){if(a=s?c:l[c],d=o[a],null==d)continue;p.push(a)}let m;if(!Array.isArray(d)){if(Gt(d)||Jn(!1,`Invalid AST Node: ${Dt(d)}.`),m=(e?r.get(d.kind)?.leave:r.get(d.kind)?.enter)?.call(t,d,a,o,p,h),m===or)break;if(!1===m){if(!e){p.pop();continue}}else if(void 0!==m&&(u.push([a,m]),!e)){if(!Gt(m)){p.pop();continue}d=m}}void 0===m&&f&&u.push([a,d]),e?p.pop():(i={inArray:s,index:c,keys:l,edits:u,prev:i},s=Array.isArray(d),l=s?d:n[d.kind]??[],c=-1,u=[],null!=o&&h.push(o),o=d)}while(void 0!==i);return 0!==u.length?u.at(-1)[1]:e}function lr(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}var cr={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>ur(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=fr(e.variableDefinitions)?pr("(\n",ur(e.variableDefinitions,"\n"),"\n)"):pr("(",ur(e.variableDefinitions,", "),")"),n=pr("",e.description,"\n")+ur([e.operation,ur([e.name,t]),ur(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r,description:i})=>pr("",i,"\n")+e+": "+t+pr(" = ",n)+pr(" ",ur(r," "))},SelectionSet:{leave:({selections:e})=>dr(e)},Field:{leave:({alias:e,name:t,arguments:n,directives:r,selectionSet:i})=>ur([mr(ur([pr("",e,": "),t],""),n),pr(" ",ur(r," ")),pr(" ",i)])},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentArgument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,arguments:t,directives:n})=>mr("..."+e,t)+pr(" ",ur(n," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>ur(["...",pr("on ",e),ur(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i,description:a})=>pr("",a,"\n")+`fragment ${e}${pr("(",ur(n,", "),")")} on ${t} ${pr("",ur(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>!0===t?function(e){const t=e.replaceAll('"""','\\"""'),n=t.split(/\r\n|[\n\r]/g),r=1===n.length,i=n.length>1&&n.slice(1).every(e=>0===e.length||Kn(e.charCodeAt(0))),a=t.endsWith('\\"""'),o=e.endsWith('"')&&!a,s=e.endsWith("\\"),l=o||s,c=!r||e.length>70||l||i||a;let u="";const d=r&&Kn(e.charCodeAt(0));return(c&&!d||i)&&(u+="\n"),u+=t,(c||l)&&(u+="\n"),'"""'+u+'"""'}(e):`"${e.replace(rr,ir)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>{const t="["+ur(e,", ")+"]";return t.length>80?"[\n"+hr(ur(e,"\n"))+"\n]":t}},ObjectValue:{leave:({fields:e})=>{const t="{ "+ur(e,", ")+" }";return t.length>80?dr(e):t}},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+pr("(",ur(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>pr("",e,"\n")+ur(["schema",ur(t," "),dr(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>pr("",e,"\n")+ur(["scalar",t,ur(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>pr("",e,"\n")+ur(["type",t,pr("implements ",ur(n," & ")),ur(r," "),dr(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>pr("",e,"\n")+t+(fr(n)?pr("(\n",hr(ur(n,"\n")),"\n)"):pr("(",ur(n,", "),")"))+": "+r+pr(" ",ur(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>pr("",e,"\n")+ur([t+": "+n,pr("= ",r),ur(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>pr("",e,"\n")+ur(["interface",t,pr("implements ",ur(n," & ")),ur(r," "),dr(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>pr("",e,"\n")+ur(["union",t,ur(n," "),pr("= ",ur(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>pr("",e,"\n")+ur(["enum",t,ur(n," "),dr(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>pr("",e,"\n")+ur([t,ur(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>pr("",e,"\n")+ur(["input",t,ur(n," "),dr(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,directives:r,repeatable:i,locations:a})=>pr("",e,"\n")+"directive @"+t+(fr(n)?pr("(\n",hr(ur(n,"\n")),"\n)"):pr("(",ur(n,", "),")"))+pr(" ",ur(r," "))+(i?" repeatable":"")+" on "+ur(a," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>ur(["extend schema",ur(e," "),dr(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>ur(["extend scalar",e,ur(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ur(["extend type",e,pr("implements ",ur(t," & ")),ur(n," "),dr(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ur(["extend interface",e,pr("implements ",ur(t," & ")),ur(n," "),dr(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>ur(["extend union",e,ur(t," "),pr("= ",ur(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>ur(["extend enum",e,ur(t," "),dr(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>ur(["extend input",e,ur(t," "),dr(n)]," ")},DirectiveExtension:{leave:({name:e,directives:t})=>ur(["extend directive @"+e,ur(t," ")]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>ur([e,pr(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:n})=>ur([e,pr(".",t),pr("(",n,":)")])},DirectiveCoordinate:{leave:({name:e})=>ur(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>ur(["@",e,pr("(",t,":)")])}};function ur(e,t=""){return e?.filter(e=>void 0!==e&&""!==e).join(t)??""}function dr(e){return pr("{\n",hr(ur(e,"\n")),"\n}")}function pr(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function hr(e){return pr(" ",e.replaceAll("\n","\n "))}function fr(e){return e?.some(e=>e.includes("\n"))??!1}function mr(e,t){let n=e+pr("(",ur(t,", "),")");return n.length>80&&(n=e+pr("(\n",hr(ur(t,"\n")),"\n)")),n}var gr={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",FRAGMENT_VARIABLE_DEFINITION:"FRAGMENT_VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION",DIRECTIVE_DEFINITION:"DIRECTIVE_DEFINITION"};function yr(e,t,n){return new qt(`Syntax Error: ${n}`,{source:e,positions:[t]})}var br=function(){let e;try{const t=globalThis.process;"function"==typeof t?.getBuiltinModule&&(e=t.getBuiltinModule("node:diagnostics_channel"))}catch{}return e}(),vr=br?.tracingChannel("graphql:parse"),xr=(br?.tracingChannel("graphql:validate"),br?.tracingChannel("graphql:execute"),br?.tracingChannel("graphql:execute:variableCoercion"),br?.tracingChannel("graphql:execute:rootSelectionSet"),br?.tracingChannel("graphql:subscribe"),br?.tracingChannel("graphql:resolve"),["start","end","asyncStart","asyncEnd","error"]),kr="<SOF>",wr="<EOF>",Sr="$",Nr="(",Tr=")",Cr="...",Er=":",Ir="=",zr="@",Or="[",Ar="]",_r="{",Dr="|",Pr="}",Mr="Name",Lr="Float",Rr="String",jr="BlockString",Fr="Comment",$r=class{constructor(e){const t=new Ut(kr,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==wr)do{if(e.next)e=e.next;else{const t=Gr(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===Fr);return e}};function qr(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Vr(e,t){return Br(e.charCodeAt(t))&&Ur(e.charCodeAt(t+1))}function Br(e){return e>=55296&&e<=56319}function Ur(e){return e>=56320&&e<=57343}function Hr(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return wr;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Wr(e,t,n,r,i){const a=e.line,o=1+n-e.lineStart;return new Ut(t,n,r,a,o,i)}function Gr(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const t=n.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Qr(e,i);case 33:return Wr(e,"!",i,i+1);case 36:return Wr(e,Sr,i,i+1);case 38:return Wr(e,"&",i,i+1);case 40:return Wr(e,Nr,i,i+1);case 41:return Wr(e,Tr,i,i+1);case 46:{const t=n.charCodeAt(i+1);if(46===t&&46===n.charCodeAt(i+2))return Wr(e,Cr,i,i+3);if(46===t)throw yr(e.source,i,'Unexpected "..", did you mean "..."?');if(Yn(t)){const n=e.source.body.slice(i+1,Kr(e,i+1,t));throw yr(e.source,i,`Invalid number, expected digit before ".", did you mean "0.${n}"?`)}break}case 58:return Wr(e,Er,i,i+1);case 61:return Wr(e,Ir,i,i+1);case 64:return Wr(e,zr,i,i+1);case 91:return Wr(e,Or,i,i+1);case 93:return Wr(e,Ar,i,i+1);case 123:return Wr(e,_r,i,i+1);case 124:return Wr(e,Dr,i,i+1);case 125:return Wr(e,Pr,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?ri(e,i):Yr(e,i)}if(Yn(t)||45===t)return Jr(e,i,t);if(Zn(t))return ii(e,i);throw yr(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":qr(t)||Vr(n,i)?`Unexpected character: ${Hr(e,i)}.`:`Invalid character: ${Hr(e,i)}.`)}return Wr(e,wr,r,r)}function Qr(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const e=n.charCodeAt(i);if(10===e||13===e)break;if(qr(e))++i;else{if(!Vr(n,i))break;i+=2}}return Wr(e,Fr,t,i,n.slice(t+1,i))}function Jr(e,t,n){const r=e.source.body;let i=t,a=n,o=!1;if(45===a&&(a=r.charCodeAt(++i)),48===a){if(a=r.charCodeAt(++i),Yn(a))throw yr(e.source,i,`Invalid number, unexpected digit after 0: ${Hr(e,i)}.`)}else i=Kr(e,i,a),a=r.charCodeAt(i);if(46===a&&(o=!0,a=r.charCodeAt(++i),i=Kr(e,i,a),a=r.charCodeAt(i)),69!==a&&101!==a||(o=!0,a=r.charCodeAt(++i),43!==a&&45!==a||(a=r.charCodeAt(++i)),i=Kr(e,i,a),a=r.charCodeAt(i)),46===a||Zn(a))throw yr(e.source,i,`Invalid number, expected digit but got: ${Hr(e,i)}.`);return Wr(e,o?Lr:"Int",t,i,r.slice(t,i))}function Kr(e,t,n){if(!Yn(n))throw yr(e.source,t,`Invalid number, expected digit but got: ${Hr(e,t)}.`);const r=e.source.body;let i=t+1;for(;Yn(r.charCodeAt(i));)++i;return i}function Yr(e,t){const n=e.source.body,r=n.length;let i=t+1,a=i,o="";for(;i<r;){const r=n.charCodeAt(i);if(34===r)return o+=n.slice(a,i),Wr(e,Rr,t,i+1,o);if(92===r){o+=n.slice(a,i);const t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?Xr(e,i):Zr(e,i):ni(e,i);o+=t.value,i+=t.size,a=i;continue}if(10===r||13===r)break;if(qr(r))++i;else{if(!Vr(n,i))throw yr(e.source,i,`Invalid character within String: ${Hr(e,i)}.`);i+=2}}throw yr(e.source,i,"Unterminated string.")}function Xr(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const e=n.charCodeAt(t+i++);if(125===e){if(i<5||!qr(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|ti(e),r<0)break}throw yr(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Zr(e,t){const n=e.source.body,r=ei(n,t+2);if(qr(r))return{value:String.fromCodePoint(r),size:6};if(Br(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=ei(n,t+8);if(Ur(e))return{value:String.fromCodePoint(r,e),size:12}}throw yr(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function ei(e,t){return ti(e.charCodeAt(t))<<12|ti(e.charCodeAt(t+1))<<8|ti(e.charCodeAt(t+2))<<4|ti(e.charCodeAt(t+3))}function ti(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function ni(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw yr(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function ri(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,a=t+3,o=a,s="";const l=[];for(;a<r;){const r=n.charCodeAt(a);if(34===r&&34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2)){s+=n.slice(o,a),l.push(s);const r=Wr(e,jr,t,a+3,tr(l).join("\n"));return e.line+=l.length-1,e.lineStart=i,r}if(92!==r||34!==n.charCodeAt(a+1)||34!==n.charCodeAt(a+2)||34!==n.charCodeAt(a+3))if(10!==r&&13!==r)if(qr(r))++a;else{if(!Vr(n,a))throw yr(e.source,a,`Invalid character within String: ${Hr(e,a)}.`);a+=2}else s+=n.slice(o,a),l.push(s),13===r&&10===n.charCodeAt(a+1)?a+=2:++a,s="",o=a,i=a;else s+=n.slice(o,a),o=a+1,a+=4}throw yr(e.source,a,"Unterminated string.")}function ii(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r&&er(n.charCodeAt(i));)++i;return Wr(e,Mr,t,i,n.slice(t,i))}var ai=Symbol("Source"),oi=class{constructor(e,t="GraphQL request",n={line:1,column:1}){this.__kind=ai,this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||Jn(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Jn(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function si(e,t){const n=new li(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}var li=class{constructor(e,t={}){const{lexer:n,...r}=t;if(n)this._lexer=n;else{const t=function(e){return t=e,n=ai,t?.__kind===n;var t,n}(e)?e:new oi(e);this._lexer=new $r(t)}this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(Mr);return this.node(e,{kind:Xt,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:Zt,definitions:this.many(kr,this.parseDefinition,wr)})}parseDefinition(){if(this.peek(_r))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(e&&t.kind===_r)throw yr(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(t.kind===Mr){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw yr(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if("extend"===t.value)return this.parseTypeSystemExtension()}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(_r))return this.node(e,{kind:en,operation:Qt,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});const t=this.parseDescription(),n=this.parseOperationType();let r;return this.peek(Mr)&&(r=this.parseName()),this.node(e,{kind:en,operation:n,description:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Mr);switch(e.value){case"query":return Qt;case"mutation":return Jt;case"subscription":return Kt}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Nr,this.parseVariableDefinition,Tr)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:tn,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(Er),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Ir)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Sr),this.node(e,{kind:un,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:nn,selections:this.many(_r,this.parseSelection,Pr)})}parseSelection(){return this.peek(Cr)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(Er)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:rn,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(_r)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Nr,t,Tr)}parseFragmentArguments(){const e=this.parseFragmentArgument;return this.optionalMany(Nr,e,Tr)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(Er),this.node(t,{kind:an,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragmentArgument(){const e=this._lexer.token,t=this.parseName();return this.expectToken(Er),this.node(e,{kind:on,name:t,value:this.parseValueLiteral(!1)})}parseFragment(){const e=this._lexer.token;this.expectToken(Cr);const t=this.expectOptionalKeyword("on");if(!t&&this.peek(Mr)){const t=this.parseFragmentName();return this.peek(Nr)&&this._options.experimentalFragmentArguments?this.node(e,{kind:sn,name:t,arguments:this.parseFragmentArguments(),directives:this.parseDirectives(!1)}):this.node(e,{kind:sn,name:t,directives:this.parseDirectives(!1)})}return this.node(e,{kind:ln,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token,t=this.parseDescription();return this.expectKeyword("fragment"),!0===this._options.experimentalFragmentArguments?this.node(e,{kind:cn,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:cn,description:t,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case Or:return this.parseList(e);case _r:return this.parseObject(e);case"Int":return this.advanceLexer(),this.node(t,{kind:dn,value:t.value});case Lr:return this.advanceLexer(),this.node(t,{kind:pn,value:t.value});case Rr:case jr:return this.parseStringLiteral();case Mr:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:fn,value:!0});case"false":return this.node(t,{kind:fn,value:!1});case"null":return this.node(t,{kind:mn});default:return this.node(t,{kind:gn,value:t.value})}case Sr:if(e){if(this.expectToken(Sr),this._lexer.token.kind===Mr){const e=this._lexer.token.value;throw yr(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:hn,value:e.value,block:e.kind===jr})}parseList(e){return this.node(this._lexer.token,{kind:yn,values:this.any(Or,()=>this.parseValueLiteral(e),Ar)})}parseObject(e){return this.node(this._lexer.token,{kind:bn,fields:this.any(_r,()=>this.parseObjectField(e),Pr)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(Er),this.node(t,{kind:vn,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(zr);)t.push(this.parseDirective(e));if(t.length)return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(zr),this.node(t,{kind:xn,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(Or)){const n=this.parseTypeReference();this.expectToken(Ar),t=this.node(e,{kind:wn,type:n})}else t=this.parseNamedType();return this.expectOptionalToken("!")?this.node(e,{kind:Sn,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:kn,name:this.parseName()})}peekDescription(){return this.peek(Rr)||this.peek(jr)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(_r,this.parseOperationTypeDefinition,Pr);return this.node(e,{kind:Nn,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(Er);const n=this.parseNamedType();return this.node(e,{kind:Tn,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:Cn,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:En,description:t,name:n,interfaces:r,directives:i,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany("&",this.parseNamedType):void 0}parseFieldsDefinition(){return this.optionalMany(_r,this.parseFieldDefinition,Pr)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(Er);const i=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:In,description:t,name:n,arguments:r,type:i,directives:a})}parseArgumentDefs(){return this.optionalMany(Nr,this.parseInputValueDef,Tr)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(Er);const r=this.parseTypeReference();let i;this.expectOptionalToken(Ir)&&(i=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(e,{kind:zn,description:t,name:n,type:r,defaultValue:i,directives:a})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:On,description:t,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:An,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(Ir)?this.delimitedMany(Dr,this.parseNamedType):void 0}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:_n,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(_r,this.parseEnumValueDefinition,Pr)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:Dn,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw yr(this._lexer.source,this._lexer.token.start,`${ci(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:Pn,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(_r,this.parseInputValueDef,Pr)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Mr)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":return this.parseDirectiveExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(_r,this.parseOperationTypeDefinition,Pr);if(void 0===t&&void 0===n)throw this.unexpected();return this.node(e,{kind:Ln,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(void 0===n)throw this.unexpected();return this.node(e,{kind:jn,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(void 0===n&&void 0===r&&void 0===i)throw this.unexpected();return this.node(e,{kind:Fn,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(void 0===n&&void 0===r&&void 0===i)throw this.unexpected();return this.node(e,{kind:$n,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(void 0===n&&void 0===r)throw this.unexpected();return this.node(e,{kind:qn,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(void 0===n&&void 0===r)throw this.unexpected();return this.node(e,{kind:Vn,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(void 0===n&&void 0===r)throw this.unexpected();return this.node(e,{kind:Bn,name:t,directives:n,fields:r})}parseDirectiveExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(zr);const t=this.parseName(),n=this.parseConstDirectives();if(void 0===n)throw this.unexpected();return this.node(e,{kind:Rn,name:t,directives:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(zr);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.parseConstDirectives(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:Mn,description:t,name:n,arguments:r,directives:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Dr,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.hasOwn(gr,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){const e=this._lexer.token,t=this.expectOptionalToken(zr),n=this.parseName();let r,i;return!t&&this.expectOptionalToken(".")&&(r=this.parseName()),(t||r)&&this.expectOptionalToken(Nr)&&(i=this.parseName(),this.expectToken(Er),this.expectToken(Tr)),t?i?this.node(e,{kind:Qn,name:n,argumentName:i}):this.node(e,{kind:Gn,name:n}):r?i?this.node(e,{kind:Wn,name:n,fieldName:r,argumentName:i}):this.node(e,{kind:Hn,name:n,memberName:r}):this.node(e,{kind:Un,name:n})}node(e,t){return!0!==this._options.noLocation&&(t.loc=new Bt(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw yr(this._lexer.source,t.start,`Expected ${ui(e)}, found ${ci(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==Mr||t.value!==e)throw yr(this._lexer.source,t.start,`Expected "${e}", found ${ci(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===Mr&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=e??this._lexer.token;return yr(this._lexer.source,t.start,`Unexpected ${ci(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}}many(e,t,n){this.expectToken(e);const r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==wr&&(++this._tokenCounter,void 0!==e&&this._tokenCounter>e))throw yr(this._lexer.source,t.start,`Document contains more than ${e} tokens. Parsing aborted.`)}};function ci(e){const t=e.value;return ui(e.kind)+(null!=t?` "${t}"`:"")}function ui(e){return function(e){return"!"===e||e===Sr||"&"===e||e===Nr||e===Tr||"."===e||e===Cr||e===Er||e===Ir||e===zr||e===Or||e===Ar||e===_r||e===Dr||e===Pr}(e)?`"${e}"`:e}var di=function(e,t){return di=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},di(e,t)};function pi(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}di(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var hi=function(){return hi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},hi.apply(this,arguments)};function fi(e,t){var n,r,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(AL){s=[6,AL],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function mi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function gi(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function yi(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function bi(e){return this instanceof bi?(this.v=e,this):new bi(e)}function vi(e){return"function"==typeof e}function xi(e){var t=e(function(e){Error.call(e),e.stack=/* @__PURE__ */(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var ki=xi(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function wi(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Si=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=mi(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(h){e={error:h}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(vi(l))try{l()}catch(AL){i=AL instanceof ki?AL.errors:[AL]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var u=mi(c),d=u.next();!d.done;d=u.next()){var p=d.value;try{Ci(p)}catch(f){i=null!=i?i:[],f instanceof ki?i=yi(yi([],gi(i)),gi(f.errors)):i.push(f)}}}catch(m){n={error:m}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new ki(i)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Ci(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&wi(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&wi(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Ni=Si.EMPTY;function Ti(e){return e instanceof Si||e&&"closed"in e&&vi(e.remove)&&vi(e.add)&&vi(e.unsubscribe)}function Ci(e){vi(e)?e():e.unsubscribe()}var Ei={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Ei.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,yi([e,t],gi(n))):setTimeout.apply(void 0,yi([e,t],gi(n)))},clearTimeout:function(e){var t=Ei.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Ii(e){Ei.setTimeout(function(){throw e})}function zi(){}var Oi=Ai("C",void 0,void 0);function Ai(e,t,n){return{kind:e,value:t,error:n}}function _i(e){e()}var Di=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Ti(t)&&t.add(n)):n.destination=ji,n}return pi(t,e),t.create=function(e,t,n){return new Mi(e,t,n)},t.prototype.next=function(e){this.isStopped?Ri(function(e){return Ai("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Ri(Ai("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Ri(Oi,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Si);Function.prototype.bind;var Pi=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(n){Li(n)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(n){Li(n)}else Li(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){Li(t)}},e}(),Mi=function(e){function t(t,n,r){var i,a=e.call(this)||this;return i=vi(t)||!t?{next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:t,a.destination=new Pi(i),a}return pi(t,e),t}(Di);function Li(e){Ii(e)}function Ri(e,t){var n=null;n&&Ei.setTimeout(function(){return n(e,t)})}var ji={closed:!0,next:zi,error:function(e){throw e},complete:zi},Fi="function"==typeof Symbol&&Symbol.observable||"@@observable";function $i(e){return e}var qi=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,i=this,a=(r=e)&&r instanceof Di||function(e){return e&&vi(e.next)&&vi(e.error)&&vi(e.complete)}(r)&&Ti(r)?e:new Mi(e,t,n);return _i(function(){var e=i,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Vi(t))(function(t,r){var i=new Mi({next:function(t){try{e(t)}catch(n){r(n),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Fi]=function(){return this},e.prototype.pipe=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(0===(e=t).length?$i:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Vi(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Vi(e){var t;return null!==(t=null!=e?e:void 0)&&void 0!==t?t:Promise}function Bi(e){return function(t){if(function(e){return vi(null==e?void 0:e.lift)}(t))return t.lift(function(t){try{return e(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ui(e,t,n,r,i){return new Hi(e,t,n,r,i)}var Hi=function(e){function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(r){t.error(r)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return pi(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(Di),Wi=xi(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Gi=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return pi(t,e),t.prototype.lift=function(e){var t=new Qi(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Wi},t.prototype.next=function(e){var t=this;_i(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=mi(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(o){n={error:o}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;_i(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;_i(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?Ni:(this.currentObservers=null,a.push(e),new Si(function(){t.currentObservers=null,wi(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new qi;return e.source=this,e},t.create=function(e,t){return new Qi(e,t)},t}(qi),Qi=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return pi(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:Ni},t}(Gi),Ji=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return pi(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Gi),Ki={now:function(){return(Ki.delegate||Date).now()},delegate:void 0},Yi=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=Ki);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return pi(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!e.closed;i+=n?1:2)e.next(r[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,l=1;l<r.length&&r[l]<=o;l+=2)s=l;s&&r.splice(0,s+1)}},t}(Gi),Xi=function(e){function t(t,n){return e.call(this)||this}return pi(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(Si),Zi={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Zi.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,yi([e,t],gi(n))):setInterval.apply(void 0,yi([e,t],gi(n)))},clearInterval:function(e){var t=Zi.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},ea=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return pi(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),Zi.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&Zi.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)/* @__PURE__ */return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(AL){r=!0,n=AL||/* @__PURE__ */new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,wi(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Xi),ta=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=Ki.now,e}(),na=new(function(e){function t(t,n){void 0===n&&(n=ta.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return pi(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(ta))(ea),ra=new qi(function(e){return e.complete()});function ia(e){return e&&vi(e.schedule)}function aa(e){return ia((t=e)[t.length-1])?e.pop():void 0;var t}var oa=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function sa(e){return vi(null==e?void 0:e.then)}function la(e){return vi(e[Fi])}function ca(e){return Symbol.asyncIterator&&vi(null==e?void 0:e[Symbol.asyncIterator])}function ua(e){/* @__PURE__ */
1
+ import{n as e,r as t,t as n}from"./rolldown-runtime-CxhCXM28.js";import{$ as r,A as i,B as a,C as o,D as s,E as l,F as c,G as u,H as d,I as p,J as h,K as f,L as m,M as g,N as y,O as b,P as v,Q as x,R as k,S as w,T as S,U as N,V as T,W as C,X as E,Y as I,Z as z,_ as O,a as A,b as _,c as D,d as P,et as M,f as L,g as R,h as j,i as F,j as $,k as q,l as V,m as B,n as U,o as H,p as W,q as G,r as Q,s as J,t as K,u as Y,v as X,w as Z,x as ee,y as te,z as ne}from"./withElement-DQp0W7sT.js";import*as re from"react";import ie,{Children as ae,Fragment as oe,cloneElement as se,createContext as le,createElement as ce,forwardRef as ue,isValidElement as de,memo as pe,use as he,useCallback as fe,useContext as me,useEffect as ge,useId as ye,useImperativeHandle as be,useLayoutEffect as ve,useMemo as xe,useReducer as ke,useRef as we,useState as Se,useSyncExternalStore as Ne}from"react";import{createRoot as Te,hydrateRoot as Ce}from"react-dom/client";import{Fragment as Ee,jsx as Ie,jsxs as ze}from"react/jsx-runtime";import{createPortal as Oe}from"react-dom";import{c as Ae}from"react/compiler-runtime";var _e=Object.defineProperty,De=(e,t)=>{let n={};for(var r in e)_e(n,r,{get:e[r],enumerable:!0});return t||_e(n,Symbol.toStringTag,{value:"Module"}),n},Pe={previewMode:!0,debugMode:!1,renderMode:"raw",environment:"main",isHydrating:!1,hydrated:!1,overQuota:!1,testAttributes:!0},Me=()=>{let[[e,t,n,r,i,a,o,s]]=c(["render.previewMode","render.debugMode","render.renderMode","render.environment","render.isHydrating","render.hydrated","render.overQuota","render.testAttributes"]);return xe(()=>({previewMode:e??Pe.previewMode,debugMode:t??Pe.debugMode,renderMode:n??Pe.renderMode,environment:r??Pe.environment,isHydrating:i??Pe.isHydrating,hydrated:a??Pe.hydrated,overQuota:o??Pe.overQuota,testAttributes:s??Pe.testAttributes}),[e,t,n,r,i,a,o,s])},Le=(e,t)=>"string"!=typeof e||e===t||e.length>t.length&&e.startsWith(t)&&"."===e[t.length]||t.length>e.length&&t.startsWith(e)&&"."===t[e.length],Re=(e,t,n=12)=>{if(!Object.is(e,t)){if(n<=0||!z(e)||!z(t))return{path:"",value:t};for(let r of/* @__PURE__ */new Set([...Object.keys(e),...Object.keys(t)])){if(Object.is(e[r],t[r]))continue;let i=Re(e[r],t[r],n-1);if(i)return{path:i.path?`${r}.${i.path}`:r,value:i.value}}}},je=/* @__PURE__ */new WeakMap,Fe=e=>{let t=e?.enabled;return n=>{if(x(t,n.getState()))return;let{handle:r,record:i}=function(e,t={}){let n=t.limit??100,r=t.path,i=t.shouldRecord,a=[{state:e.getState(),timestamp:Date.now()}],o=0,s=!1,l=()=>({entries:a,index:o,canUndo:o>0,canRedo:o<a.length-1}),c=l(),u=/* @__PURE__ */new Set,d=()=>{c=l(),u.forEach(e=>e())},p=t=>{if(t<0||t>=a.length||t===o)return;let n=a[t].state;if(s=!0,r){let t=E(n,r);e.setState(r,()=>t)}else e.setState(void 0,()=>n);s=!1,o=t,d()};return{handle:{getSnapshot:()=>c,subscribe:e=>(u.add(e),()=>u.delete(e)),undo:()=>p(o-1),redo:()=>p(o+1),travelTo:p,clear:()=>{a=[{state:e.getState(),timestamp:Date.now()}],o=0,d()}},record:({path:t})=>{if(s||i&&!i(t)||r&&void 0!==t&&!Le(t,r))return;let l,c=o<a.length-1?a.slice(0,o+1):a,u=c[c.length-1].state,p=e.getState(),h=t??r,f=t??r;if(f)try{let e=Re(E(u,f),E(p,f));e&&(h=e.path?`${f}.${e.path}`:f,l=e.value)}catch{}let m=[...c,{path:h,value:l,state:p,timestamp:Date.now()}];a=m.length>n?m.slice(m.length-n):m,o=a.length-1,d()}}}(n,e);return je.set(n,r),{onChange:i}}},$e=e=>{},qe=e=>{},Ve=(e={})=>{let{filter:t,sink:n=$e,errorSink:r=qe,enabled:i}="function"==typeof e?{sink:e}:e;return e=>{if(!x(i,e.getState()))return{onChange:e=>{(!t||t(e))&&n(e)},onError:r}}},Be=(e="local")=>{if("string"!=typeof e)return e;try{return"session"===e?globalThis.sessionStorage:globalThis.localStorage}catch{return}},Ue=Symbol("@plitzi/nexus/ssr-snapshot");function He(e){return"object"==typeof e&&!!e&&Ue in e}var We,Ge=/* @__PURE__ */new Map,Qe=/* @__PURE__ */new Set,Je=0,Ke=()=>{We=void 0;for(let e of Qe)e()},Ye=(e,t,n)=>{let r=e;return Ge.set(r,{uid:"dev-store-"+ ++Je,store:r,scopeId:t,name:n}),Ke(),()=>{Ge.delete(r),Ke()}},Xe=e=>(Qe.add(e),()=>{Qe.delete(e)}),Ze=()=>(We??=[...Ge.values()],We),et=G({runs:[]},{id:"action-runs"}),tt=0,nt=e=>et.setState("runs",e),rt=/* @__PURE__ */new Map,it=e=>({id:`render-${e.runId}`,actionId:e.actionId,mode:"render",runId:e.runId,status:e.status,steps:e.steps,progress:[],startedAt:e.startedAt,endedAt:e.endedAt,...void 0===e.error?{}:{error:e.error},...void 0===e.elementId?{}:{elementId:e.elementId}}),at=e=>{let{runs:t}=et.getState(),n=new Set(t.map(e=>e.runId)),r=e.filter(e=>!n.has(e.runId)).map(it);0!==r.length&&nt([...r.reverse(),...t].slice(0,100))},ot=(e,t)=>{let{runs:n}=et.getState();n.some(t=>t.id===e)&&nt(n.map(n=>n.id===e?{...n,...t}:n))},st=()=>{let e=new Set(et.getState().runs.filter(e=>e.cancellable).map(e=>e.id));[...rt.keys()].forEach(t=>{e.has(t)||rt.delete(t)}),nt([])},lt=le(void 0);lt.displayName="DevStoreScopeContext";var ct=G,ut=le(void 0),dt=e=>!0===e.cascade,pt=({store:e,id:t,segment:n,isolate:r,path:i,value:a,inherit:o,autoSync:s=!0,middlewares:l,name:c,children:d})=>{let p=me(f),m=me(ut),g=me(C),y=me(lt),b=p?.scopePath??"",v=xe(()=>void 0===n?b:b?`${b}/${n}`:n,[b,n]),x=we(void 0),k="live"===o,w=xe(()=>{let e="snapshot"===o&&p?p.getState():{},t="function"==typeof a?a(e):{...e,...a};return He(t)?function(e){return He(e)?{...e}:e}(t):t},[o,p,a]),S=l??[],N=m?[...m,...S]:S,E=xe(()=>{let e=S.filter(dt);return 0===e.length?m:[...m??[],...e]},[m,l]);x.current||=e??ct(()=>w,{id:t,scopePath:v,exclusive:k?r:void 0,parent:k?p:void 0,middlewares:N.length>0?N:void 0,deferHydrate:!0});let I=xe(()=>t?{id:t,store:x.current,parent:g}:g,[t,g]),z=we(!1);ge(()=>{h&&t&&!z.current&&u(g,t)&&(z.current=!0)},[t,g]),ge(()=>(k&&!e&&x.current?.reconnect?.(),()=>{k&&!e&&x.current?.destroy?.()}),[k,e]),ge(()=>{if(h||void 0!==y)return Ye(x.current,y,c)},[y,c]);let O=we(!1);ge(()=>{!O.current&&x.current?.hydrate&&(x.current.hydrate(),O.current=!0)},[]),T(i,i?a:w,{enabled:!!a&&s,store:x.current});let A=/* @__PURE__ */Ie(f,{value:x.current,children:d});return I!==g&&(A=/* @__PURE__ */Ie(C,{value:I,children:A})),E!==m&&(A=/* @__PURE__ */Ie(ut,{value:E,children:A})),A},ht={entries:[],index:-1,canUndo:!1,canRedo:!1},ft=()=>{},mt=()=>ft,gt=()=>ht,yt=/* @__PURE__ */new WeakSet;function bt(e,t){let n={},r=Array.isArray(t)?t:[t];for(let i of r){let t=b(e,i);void 0!==t&&s(n,i,t)}return n}function vt(e,t=0,n={}){let r,i,a,o,s,l=0,c=n.leading??!1,u=n.trailing??!0,d=n.maxWait,p=()=>Date.now();function h(t){if(!r)return a;l=t;let n=r,o=i;return r=void 0,i=void 0,a=e.apply(o,n),a}function f(e){o=setTimeout(g,e)}function m(e){if(void 0===s)return!0;let n=e-s;return n>=t||n<0||void 0!==d&&e-l>=d}function g(){let e=p();if(m(e))return b(e);f(function(e){let n=e-l,r=t-(e-(s??0));return void 0===d?r:Math.min(r,d-n)}(e))}function y(e){return l=e,f(t),c?h(e):a}function b(e){return o=void 0,u&&r?h(e):(r=i=void 0,a)}function v(...e){let n=p(),l=m(n);if(r=e,i=this,s=n,l){if(!o)return y(n);if(void 0!==d)return clearTimeout(o),f(t),h(n)}return o||f(t),a}return v.cancel=()=>{void 0!==o&&clearTimeout(o),l=0,r=s=i=o=void 0},v.flush=()=>void 0===o?a:b(p()),v.pending=()=>void 0!==o,v}function xt(e,t=0,n={}){return vt(e,t,{leading:n.leading??!0,trailing:n.trailing??!0,maxWait:t})}function kt(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=kt(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=kt(e))&&(r&&(r+=" "),r+=t);return r}var St=/* @__PURE__ */e({cva:()=>Ct,cx:()=>Tt}),Nt=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Tt=wt,Ct=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Tt(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const o=Nt(t)||Nt(r);return i[e][o]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]);return Tt(e,o,l,null==n?void 0:n.class,null==n?void 0:n.className)},{cva:Et}=St,It=/* @__PURE__ */new Set,zt=e=>{for(let t of It)t(e)},Ot=["missing","expired","revoked","inactive","unverified","malformed","outdated","network"],At=(e,t)=>{if(401!==e)return;let n=t?.reason;return"string"==typeof n&&Ot.includes(n)?n:"expired"},_t=e=>/([^.]+\.[^.]+)$/.exec(e)?.[1]??e;function Dt(e){return Pt(e,[])}function Pt(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:Pt(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,i=[];for(let a=0;a<n;++a)i.push(Pt(e[a],t));return 1===r?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);return 0===n.length?"{}":t.length>2?"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]":"{ "+n.map(([e,n])=>e+": "+Pt(n,t)).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}function Mt(e,t){if(!e)throw new Error(t??"Unexpected invariant triggered.")}var Lt=/\r\n|[\n\r]/g;function Rt(e,t){let n=0,r=1;for(const i of e.body.matchAll(Lt)){if("number"!=typeof i.index&&Mt(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function jt(e){return Ft(e.source,Rt(e.source,e.start))}function Ft(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=1===t.line?n:0,l=t.column+s,c=`${e.name}:${o}:${l}\n`,u=r.split(/\r\n|[\n\r]/g),d=u[i];if(d.length>120){const e=Math.floor(l/80),t=l%80,n=[];for(let r=0;r<d.length;r+=80)n.push(d.slice(r,r+80));return c+$t([[`${o} |`,n[0]],...n.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(t)],["|",n[e+1]]])}return c+$t([[o-1+" |",u[i-1]],[`${o} |`,d],["|","^".padStart(l)],[`${o+1} |`,u[i+1]]])}function $t(e){const t=e.filter(([e,t])=>void 0!==t),n=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(n)+(t?" "+t:"")).join("\n")}var qt=class e extends Error{constructor(t,n={}){const{nodes:r,source:i,positions:a,path:o,originalError:s,cause:l,extensions:c}=n,u="cause"in n;super(t,u||null!=s?{cause:u?l:s}:void 0),this.name="GraphQLError",this.path=o??void 0;const d=s??(l instanceof Error?l:void 0);this.originalError=d,this.nodes=Vt(Array.isArray(r)?r:r?[r]:void 0);const p=Vt(this.nodes?.map(e=>e.loc).filter(e=>null!=e));this.source=i??p?.[0]?.source,this.positions=a??p?.map(e=>e.start),this.locations=a&&i?a.map(e=>Rt(i,e)):p?.map(e=>Rt(e.source,e.start));const h=(f=d?.extensions,"object"==typeof f&&null!==f?d.extensions:void 0);var f;this.extensions=c??h??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=s?.stack?Object.defineProperty(this,"stack",{value:s.stack,writable:!0,configurable:!0}):null!=Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const t of this.nodes)t.loc&&(e+="\n\n"+jt(t.loc));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+Ft(this.source,t);return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};function Vt(e){return void 0===e||0===e.length?void 0:e}var Bt=class{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},Ut=class{constructor(e,t,n,r,i,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},Ht={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentArgument:["name","value"],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},Wt=new Set(Object.keys(Ht));function Gt(e){const t=e?.kind;return"string"==typeof t&&Wt.has(t)}var Qt="query",Jt="mutation",Kt="subscription",Yt=/* @__PURE__ */e({ARGUMENT:()=>an,ARGUMENT_COORDINATE:()=>Wn,BOOLEAN:()=>fn,DIRECTIVE:()=>xn,DIRECTIVE_ARGUMENT_COORDINATE:()=>Qn,DIRECTIVE_COORDINATE:()=>Gn,DIRECTIVE_DEFINITION:()=>Mn,DIRECTIVE_EXTENSION:()=>Rn,DOCUMENT:()=>Zt,ENUM:()=>gn,ENUM_TYPE_DEFINITION:()=>_n,ENUM_TYPE_EXTENSION:()=>Vn,ENUM_VALUE_DEFINITION:()=>Dn,FIELD:()=>rn,FIELD_DEFINITION:()=>In,FLOAT:()=>pn,FRAGMENT_ARGUMENT:()=>on,FRAGMENT_DEFINITION:()=>cn,FRAGMENT_SPREAD:()=>sn,INLINE_FRAGMENT:()=>ln,INPUT_OBJECT_TYPE_DEFINITION:()=>Pn,INPUT_OBJECT_TYPE_EXTENSION:()=>Bn,INPUT_VALUE_DEFINITION:()=>zn,INT:()=>dn,INTERFACE_TYPE_DEFINITION:()=>On,INTERFACE_TYPE_EXTENSION:()=>$n,LIST:()=>yn,LIST_TYPE:()=>wn,MEMBER_COORDINATE:()=>Hn,NAME:()=>Xt,NAMED_TYPE:()=>kn,NON_NULL_TYPE:()=>Sn,NULL:()=>mn,OBJECT:()=>bn,OBJECT_FIELD:()=>vn,OBJECT_TYPE_DEFINITION:()=>En,OBJECT_TYPE_EXTENSION:()=>Fn,OPERATION_DEFINITION:()=>en,OPERATION_TYPE_DEFINITION:()=>Tn,SCALAR_TYPE_DEFINITION:()=>Cn,SCALAR_TYPE_EXTENSION:()=>jn,SCHEMA_DEFINITION:()=>Nn,SCHEMA_EXTENSION:()=>Ln,SELECTION_SET:()=>nn,STRING:()=>hn,TYPE_COORDINATE:()=>Un,UNION_TYPE_DEFINITION:()=>An,UNION_TYPE_EXTENSION:()=>qn,VARIABLE:()=>un,VARIABLE_DEFINITION:()=>tn}),Xt="Name",Zt="Document",en="OperationDefinition",tn="VariableDefinition",nn="SelectionSet",rn="Field",an="Argument",on="FragmentArgument",sn="FragmentSpread",ln="InlineFragment",cn="FragmentDefinition",un="Variable",dn="IntValue",pn="FloatValue",hn="StringValue",fn="BooleanValue",mn="NullValue",gn="EnumValue",yn="ListValue",bn="ObjectValue",vn="ObjectField",xn="Directive",kn="NamedType",wn="ListType",Sn="NonNullType",Nn="SchemaDefinition",Tn="OperationTypeDefinition",Cn="ScalarTypeDefinition",En="ObjectTypeDefinition",In="FieldDefinition",zn="InputValueDefinition",On="InterfaceTypeDefinition",An="UnionTypeDefinition",_n="EnumTypeDefinition",Dn="EnumValueDefinition",Pn="InputObjectTypeDefinition",Mn="DirectiveDefinition",Ln="SchemaExtension",Rn="DirectiveExtension",jn="ScalarTypeExtension",Fn="ObjectTypeExtension",$n="InterfaceTypeExtension",qn="UnionTypeExtension",Vn="EnumTypeExtension",Bn="InputObjectTypeExtension",Un="TypeCoordinate",Hn="MemberCoordinate",Wn="ArgumentCoordinate",Gn="DirectiveCoordinate",Qn="DirectiveArgumentCoordinate";function Jn(e,t){if(!e)throw new Error(t)}function Kn(e){return 9===e||32===e}function Yn(e){return e>=48&&e<=57}function Xn(e){return e>=97&&e<=122||e>=65&&e<=90}function Zn(e){return Xn(e)||95===e}function er(e){return Xn(e)||Yn(e)||95===e}function tr(e){let t=Number.MAX_SAFE_INTEGER,n=null,r=-1;for(let i=0;i<e.length;++i){const a=e[i],o=nr(a);o!==a.length&&(n??=i,r=i,0!==i&&o<t&&(t=o))}return e.map((e,n)=>0===n?e:e.slice(t)).slice(n??0,r+1)}function nr(e){let t=0;for(;t<e.length&&Kn(e.charCodeAt(t));)++t;return t}var rr=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function ir(e){return ar[e.charCodeAt(0)]}var ar=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],or=Object.freeze({});function sr(e,t,n=Ht){const r=/* @__PURE__ */new Map;for(const f of Object.values(Yt))r.set(f,lr(t,f));let i,a,o,s=Array.isArray(e),l=[e],c=-1,u=[],d=e;const p=[],h=[];do{c++;const e=c===l.length,f=e&&0!==u.length;if(e){if(a=0===h.length?void 0:p[p.length-1],d=o,o=h.pop(),f)if(s){d=d.slice();let e=0;for(const[t,n]of u){const r=t-e;null===n?(d.splice(r,1),e++):d[r]=n}}else{d={...d};for(const[e,t]of u)d[e]=t}c=i.index,l=i.keys,u=i.edits,s=i.inArray,i=i.prev}else if(null!=o){if(a=s?c:l[c],d=o[a],null==d)continue;p.push(a)}let m;if(!Array.isArray(d)){if(Gt(d)||Jn(!1,`Invalid AST Node: ${Dt(d)}.`),m=(e?r.get(d.kind)?.leave:r.get(d.kind)?.enter)?.call(t,d,a,o,p,h),m===or)break;if(!1===m){if(!e){p.pop();continue}}else if(void 0!==m&&(u.push([a,m]),!e)){if(!Gt(m)){p.pop();continue}d=m}}void 0===m&&f&&u.push([a,d]),e?p.pop():(i={inArray:s,index:c,keys:l,edits:u,prev:i},s=Array.isArray(d),l=s?d:n[d.kind]??[],c=-1,u=[],null!=o&&h.push(o),o=d)}while(void 0!==i);return 0!==u.length?u.at(-1)[1]:e}function lr(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}var cr={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>ur(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=fr(e.variableDefinitions)?pr("(\n",ur(e.variableDefinitions,"\n"),"\n)"):pr("(",ur(e.variableDefinitions,", "),")"),n=pr("",e.description,"\n")+ur([e.operation,ur([e.name,t]),ur(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r,description:i})=>pr("",i,"\n")+e+": "+t+pr(" = ",n)+pr(" ",ur(r," "))},SelectionSet:{leave:({selections:e})=>dr(e)},Field:{leave:({alias:e,name:t,arguments:n,directives:r,selectionSet:i})=>ur([mr(ur([pr("",e,": "),t],""),n),pr(" ",ur(r," ")),pr(" ",i)])},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentArgument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,arguments:t,directives:n})=>mr("..."+e,t)+pr(" ",ur(n," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>ur(["...",pr("on ",e),ur(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i,description:a})=>pr("",a,"\n")+`fragment ${e}${pr("(",ur(n,", "),")")} on ${t} ${pr("",ur(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>!0===t?function(e){const t=e.replaceAll('"""','\\"""'),n=t.split(/\r\n|[\n\r]/g),r=1===n.length,i=n.length>1&&n.slice(1).every(e=>0===e.length||Kn(e.charCodeAt(0))),a=t.endsWith('\\"""'),o=e.endsWith('"')&&!a,s=e.endsWith("\\"),l=o||s,c=!r||e.length>70||l||i||a;let u="";const d=r&&Kn(e.charCodeAt(0));return(c&&!d||i)&&(u+="\n"),u+=t,(c||l)&&(u+="\n"),'"""'+u+'"""'}(e):`"${e.replace(rr,ir)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>{const t="["+ur(e,", ")+"]";return t.length>80?"[\n"+hr(ur(e,"\n"))+"\n]":t}},ObjectValue:{leave:({fields:e})=>{const t="{ "+ur(e,", ")+" }";return t.length>80?dr(e):t}},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+pr("(",ur(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>pr("",e,"\n")+ur(["schema",ur(t," "),dr(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>pr("",e,"\n")+ur(["scalar",t,ur(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>pr("",e,"\n")+ur(["type",t,pr("implements ",ur(n," & ")),ur(r," "),dr(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>pr("",e,"\n")+t+(fr(n)?pr("(\n",hr(ur(n,"\n")),"\n)"):pr("(",ur(n,", "),")"))+": "+r+pr(" ",ur(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>pr("",e,"\n")+ur([t+": "+n,pr("= ",r),ur(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>pr("",e,"\n")+ur(["interface",t,pr("implements ",ur(n," & ")),ur(r," "),dr(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>pr("",e,"\n")+ur(["union",t,ur(n," "),pr("= ",ur(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>pr("",e,"\n")+ur(["enum",t,ur(n," "),dr(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>pr("",e,"\n")+ur([t,ur(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>pr("",e,"\n")+ur(["input",t,ur(n," "),dr(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,directives:r,repeatable:i,locations:a})=>pr("",e,"\n")+"directive @"+t+(fr(n)?pr("(\n",hr(ur(n,"\n")),"\n)"):pr("(",ur(n,", "),")"))+pr(" ",ur(r," "))+(i?" repeatable":"")+" on "+ur(a," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>ur(["extend schema",ur(e," "),dr(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>ur(["extend scalar",e,ur(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ur(["extend type",e,pr("implements ",ur(t," & ")),ur(n," "),dr(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ur(["extend interface",e,pr("implements ",ur(t," & ")),ur(n," "),dr(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>ur(["extend union",e,ur(t," "),pr("= ",ur(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>ur(["extend enum",e,ur(t," "),dr(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>ur(["extend input",e,ur(t," "),dr(n)]," ")},DirectiveExtension:{leave:({name:e,directives:t})=>ur(["extend directive @"+e,ur(t," ")]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>ur([e,pr(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:n})=>ur([e,pr(".",t),pr("(",n,":)")])},DirectiveCoordinate:{leave:({name:e})=>ur(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>ur(["@",e,pr("(",t,":)")])}};function ur(e,t=""){return e?.filter(e=>void 0!==e&&""!==e).join(t)??""}function dr(e){return pr("{\n",hr(ur(e,"\n")),"\n}")}function pr(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function hr(e){return pr(" ",e.replaceAll("\n","\n "))}function fr(e){return e?.some(e=>e.includes("\n"))??!1}function mr(e,t){let n=e+pr("(",ur(t,", "),")");return n.length>80&&(n=e+pr("(\n",hr(ur(t,"\n")),"\n)")),n}var gr={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",FRAGMENT_VARIABLE_DEFINITION:"FRAGMENT_VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION",DIRECTIVE_DEFINITION:"DIRECTIVE_DEFINITION"};function yr(e,t,n){return new qt(`Syntax Error: ${n}`,{source:e,positions:[t]})}var br=function(){let e;try{const t=globalThis.process;"function"==typeof t?.getBuiltinModule&&(e=t.getBuiltinModule("node:diagnostics_channel"))}catch{}return e}(),vr=br?.tracingChannel("graphql:parse"),xr=(br?.tracingChannel("graphql:validate"),br?.tracingChannel("graphql:execute"),br?.tracingChannel("graphql:execute:variableCoercion"),br?.tracingChannel("graphql:execute:rootSelectionSet"),br?.tracingChannel("graphql:subscribe"),br?.tracingChannel("graphql:resolve"),["start","end","asyncStart","asyncEnd","error"]),kr="<SOF>",wr="<EOF>",Sr="$",Nr="(",Tr=")",Cr="...",Er=":",Ir="=",zr="@",Or="[",Ar="]",_r="{",Dr="|",Pr="}",Mr="Name",Lr="Float",Rr="String",jr="BlockString",Fr="Comment",$r=class{constructor(e){const t=new Ut(kr,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==wr)do{if(e.next)e=e.next;else{const t=Gr(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===Fr);return e}};function qr(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Vr(e,t){return Br(e.charCodeAt(t))&&Ur(e.charCodeAt(t+1))}function Br(e){return e>=55296&&e<=56319}function Ur(e){return e>=56320&&e<=57343}function Hr(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return wr;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Wr(e,t,n,r,i){const a=e.line,o=1+n-e.lineStart;return new Ut(t,n,r,a,o,i)}function Gr(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const t=n.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Qr(e,i);case 33:return Wr(e,"!",i,i+1);case 36:return Wr(e,Sr,i,i+1);case 38:return Wr(e,"&",i,i+1);case 40:return Wr(e,Nr,i,i+1);case 41:return Wr(e,Tr,i,i+1);case 46:{const t=n.charCodeAt(i+1);if(46===t&&46===n.charCodeAt(i+2))return Wr(e,Cr,i,i+3);if(46===t)throw yr(e.source,i,'Unexpected "..", did you mean "..."?');if(Yn(t)){const n=e.source.body.slice(i+1,Kr(e,i+1,t));throw yr(e.source,i,`Invalid number, expected digit before ".", did you mean "0.${n}"?`)}break}case 58:return Wr(e,Er,i,i+1);case 61:return Wr(e,Ir,i,i+1);case 64:return Wr(e,zr,i,i+1);case 91:return Wr(e,Or,i,i+1);case 93:return Wr(e,Ar,i,i+1);case 123:return Wr(e,_r,i,i+1);case 124:return Wr(e,Dr,i,i+1);case 125:return Wr(e,Pr,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?ri(e,i):Yr(e,i)}if(Yn(t)||45===t)return Jr(e,i,t);if(Zn(t))return ii(e,i);throw yr(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":qr(t)||Vr(n,i)?`Unexpected character: ${Hr(e,i)}.`:`Invalid character: ${Hr(e,i)}.`)}return Wr(e,wr,r,r)}function Qr(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const e=n.charCodeAt(i);if(10===e||13===e)break;if(qr(e))++i;else{if(!Vr(n,i))break;i+=2}}return Wr(e,Fr,t,i,n.slice(t+1,i))}function Jr(e,t,n){const r=e.source.body;let i=t,a=n,o=!1;if(45===a&&(a=r.charCodeAt(++i)),48===a){if(a=r.charCodeAt(++i),Yn(a))throw yr(e.source,i,`Invalid number, unexpected digit after 0: ${Hr(e,i)}.`)}else i=Kr(e,i,a),a=r.charCodeAt(i);if(46===a&&(o=!0,a=r.charCodeAt(++i),i=Kr(e,i,a),a=r.charCodeAt(i)),69!==a&&101!==a||(o=!0,a=r.charCodeAt(++i),43!==a&&45!==a||(a=r.charCodeAt(++i)),i=Kr(e,i,a),a=r.charCodeAt(i)),46===a||Zn(a))throw yr(e.source,i,`Invalid number, expected digit but got: ${Hr(e,i)}.`);return Wr(e,o?Lr:"Int",t,i,r.slice(t,i))}function Kr(e,t,n){if(!Yn(n))throw yr(e.source,t,`Invalid number, expected digit but got: ${Hr(e,t)}.`);const r=e.source.body;let i=t+1;for(;Yn(r.charCodeAt(i));)++i;return i}function Yr(e,t){const n=e.source.body,r=n.length;let i=t+1,a=i,o="";for(;i<r;){const r=n.charCodeAt(i);if(34===r)return o+=n.slice(a,i),Wr(e,Rr,t,i+1,o);if(92===r){o+=n.slice(a,i);const t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?Xr(e,i):Zr(e,i):ni(e,i);o+=t.value,i+=t.size,a=i;continue}if(10===r||13===r)break;if(qr(r))++i;else{if(!Vr(n,i))throw yr(e.source,i,`Invalid character within String: ${Hr(e,i)}.`);i+=2}}throw yr(e.source,i,"Unterminated string.")}function Xr(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const e=n.charCodeAt(t+i++);if(125===e){if(i<5||!qr(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|ti(e),r<0)break}throw yr(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Zr(e,t){const n=e.source.body,r=ei(n,t+2);if(qr(r))return{value:String.fromCodePoint(r),size:6};if(Br(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=ei(n,t+8);if(Ur(e))return{value:String.fromCodePoint(r,e),size:12}}throw yr(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function ei(e,t){return ti(e.charCodeAt(t))<<12|ti(e.charCodeAt(t+1))<<8|ti(e.charCodeAt(t+2))<<4|ti(e.charCodeAt(t+3))}function ti(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function ni(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw yr(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function ri(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,a=t+3,o=a,s="";const l=[];for(;a<r;){const r=n.charCodeAt(a);if(34===r&&34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2)){s+=n.slice(o,a),l.push(s);const r=Wr(e,jr,t,a+3,tr(l).join("\n"));return e.line+=l.length-1,e.lineStart=i,r}if(92!==r||34!==n.charCodeAt(a+1)||34!==n.charCodeAt(a+2)||34!==n.charCodeAt(a+3))if(10!==r&&13!==r)if(qr(r))++a;else{if(!Vr(n,a))throw yr(e.source,a,`Invalid character within String: ${Hr(e,a)}.`);a+=2}else s+=n.slice(o,a),l.push(s),13===r&&10===n.charCodeAt(a+1)?a+=2:++a,s="",o=a,i=a;else s+=n.slice(o,a),o=a+1,a+=4}throw yr(e.source,a,"Unterminated string.")}function ii(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r&&er(n.charCodeAt(i));)++i;return Wr(e,Mr,t,i,n.slice(t,i))}var ai=Symbol("Source"),oi=class{constructor(e,t="GraphQL request",n={line:1,column:1}){this.__kind=ai,this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||Jn(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Jn(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function si(e,t){const n=new li(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}var li=class{constructor(e,t={}){const{lexer:n,...r}=t;if(n)this._lexer=n;else{const t=function(e){return t=e,n=ai,t?.__kind===n;var t,n}(e)?e:new oi(e);this._lexer=new $r(t)}this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(Mr);return this.node(e,{kind:Xt,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:Zt,definitions:this.many(kr,this.parseDefinition,wr)})}parseDefinition(){if(this.peek(_r))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(e&&t.kind===_r)throw yr(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(t.kind===Mr){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw yr(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if("extend"===t.value)return this.parseTypeSystemExtension()}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(_r))return this.node(e,{kind:en,operation:Qt,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});const t=this.parseDescription(),n=this.parseOperationType();let r;return this.peek(Mr)&&(r=this.parseName()),this.node(e,{kind:en,operation:n,description:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Mr);switch(e.value){case"query":return Qt;case"mutation":return Jt;case"subscription":return Kt}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Nr,this.parseVariableDefinition,Tr)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:tn,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(Er),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Ir)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Sr),this.node(e,{kind:un,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:nn,selections:this.many(_r,this.parseSelection,Pr)})}parseSelection(){return this.peek(Cr)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(Er)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:rn,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(_r)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Nr,t,Tr)}parseFragmentArguments(){const e=this.parseFragmentArgument;return this.optionalMany(Nr,e,Tr)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(Er),this.node(t,{kind:an,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragmentArgument(){const e=this._lexer.token,t=this.parseName();return this.expectToken(Er),this.node(e,{kind:on,name:t,value:this.parseValueLiteral(!1)})}parseFragment(){const e=this._lexer.token;this.expectToken(Cr);const t=this.expectOptionalKeyword("on");if(!t&&this.peek(Mr)){const t=this.parseFragmentName();return this.peek(Nr)&&this._options.experimentalFragmentArguments?this.node(e,{kind:sn,name:t,arguments:this.parseFragmentArguments(),directives:this.parseDirectives(!1)}):this.node(e,{kind:sn,name:t,directives:this.parseDirectives(!1)})}return this.node(e,{kind:ln,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token,t=this.parseDescription();return this.expectKeyword("fragment"),!0===this._options.experimentalFragmentArguments?this.node(e,{kind:cn,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:cn,description:t,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case Or:return this.parseList(e);case _r:return this.parseObject(e);case"Int":return this.advanceLexer(),this.node(t,{kind:dn,value:t.value});case Lr:return this.advanceLexer(),this.node(t,{kind:pn,value:t.value});case Rr:case jr:return this.parseStringLiteral();case Mr:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:fn,value:!0});case"false":return this.node(t,{kind:fn,value:!1});case"null":return this.node(t,{kind:mn});default:return this.node(t,{kind:gn,value:t.value})}case Sr:if(e){if(this.expectToken(Sr),this._lexer.token.kind===Mr){const e=this._lexer.token.value;throw yr(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:hn,value:e.value,block:e.kind===jr})}parseList(e){return this.node(this._lexer.token,{kind:yn,values:this.any(Or,()=>this.parseValueLiteral(e),Ar)})}parseObject(e){return this.node(this._lexer.token,{kind:bn,fields:this.any(_r,()=>this.parseObjectField(e),Pr)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(Er),this.node(t,{kind:vn,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(zr);)t.push(this.parseDirective(e));if(t.length)return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(zr),this.node(t,{kind:xn,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(Or)){const n=this.parseTypeReference();this.expectToken(Ar),t=this.node(e,{kind:wn,type:n})}else t=this.parseNamedType();return this.expectOptionalToken("!")?this.node(e,{kind:Sn,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:kn,name:this.parseName()})}peekDescription(){return this.peek(Rr)||this.peek(jr)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(_r,this.parseOperationTypeDefinition,Pr);return this.node(e,{kind:Nn,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(Er);const n=this.parseNamedType();return this.node(e,{kind:Tn,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:Cn,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:En,description:t,name:n,interfaces:r,directives:i,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany("&",this.parseNamedType):void 0}parseFieldsDefinition(){return this.optionalMany(_r,this.parseFieldDefinition,Pr)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(Er);const i=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:In,description:t,name:n,arguments:r,type:i,directives:a})}parseArgumentDefs(){return this.optionalMany(Nr,this.parseInputValueDef,Tr)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(Er);const r=this.parseTypeReference();let i;this.expectOptionalToken(Ir)&&(i=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(e,{kind:zn,description:t,name:n,type:r,defaultValue:i,directives:a})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:On,description:t,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:An,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(Ir)?this.delimitedMany(Dr,this.parseNamedType):void 0}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:_n,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(_r,this.parseEnumValueDefinition,Pr)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:Dn,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw yr(this._lexer.source,this._lexer.token.start,`${ci(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:Pn,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(_r,this.parseInputValueDef,Pr)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Mr)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":return this.parseDirectiveExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(_r,this.parseOperationTypeDefinition,Pr);if(void 0===t&&void 0===n)throw this.unexpected();return this.node(e,{kind:Ln,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(void 0===n)throw this.unexpected();return this.node(e,{kind:jn,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(void 0===n&&void 0===r&&void 0===i)throw this.unexpected();return this.node(e,{kind:Fn,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(void 0===n&&void 0===r&&void 0===i)throw this.unexpected();return this.node(e,{kind:$n,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(void 0===n&&void 0===r)throw this.unexpected();return this.node(e,{kind:qn,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(void 0===n&&void 0===r)throw this.unexpected();return this.node(e,{kind:Vn,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(void 0===n&&void 0===r)throw this.unexpected();return this.node(e,{kind:Bn,name:t,directives:n,fields:r})}parseDirectiveExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(zr);const t=this.parseName(),n=this.parseConstDirectives();if(void 0===n)throw this.unexpected();return this.node(e,{kind:Rn,name:t,directives:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(zr);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.parseConstDirectives(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:Mn,description:t,name:n,arguments:r,directives:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Dr,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.hasOwn(gr,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){const e=this._lexer.token,t=this.expectOptionalToken(zr),n=this.parseName();let r,i;return!t&&this.expectOptionalToken(".")&&(r=this.parseName()),(t||r)&&this.expectOptionalToken(Nr)&&(i=this.parseName(),this.expectToken(Er),this.expectToken(Tr)),t?i?this.node(e,{kind:Qn,name:n,argumentName:i}):this.node(e,{kind:Gn,name:n}):r?i?this.node(e,{kind:Wn,name:n,fieldName:r,argumentName:i}):this.node(e,{kind:Hn,name:n,memberName:r}):this.node(e,{kind:Un,name:n})}node(e,t){return!0!==this._options.noLocation&&(t.loc=new Bt(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw yr(this._lexer.source,t.start,`Expected ${ui(e)}, found ${ci(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==Mr||t.value!==e)throw yr(this._lexer.source,t.start,`Expected "${e}", found ${ci(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===Mr&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=e??this._lexer.token;return yr(this._lexer.source,t.start,`Unexpected ${ci(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}}many(e,t,n){this.expectToken(e);const r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==wr&&(++this._tokenCounter,void 0!==e&&this._tokenCounter>e))throw yr(this._lexer.source,t.start,`Document contains more than ${e} tokens. Parsing aborted.`)}};function ci(e){const t=e.value;return ui(e.kind)+(null!=t?` "${t}"`:"")}function ui(e){return function(e){return"!"===e||e===Sr||"&"===e||e===Nr||e===Tr||"."===e||e===Cr||e===Er||e===Ir||e===zr||e===Or||e===Ar||e===_r||e===Dr||e===Pr}(e)?`"${e}"`:e}var di=function(e,t){return di=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},di(e,t)};function pi(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}di(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var hi=function(){return hi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},hi.apply(this,arguments)};function fi(e,t){var n,r,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(AL){s=[6,AL],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function mi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function gi(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function yi(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function bi(e){return this instanceof bi?(this.v=e,this):new bi(e)}function vi(e){return"function"==typeof e}function xi(e){var t=e(function(e){Error.call(e),e.stack=/* @__PURE__ */(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var ki=xi(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function wi(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Si=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=mi(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(h){e={error:h}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(vi(l))try{l()}catch(AL){i=AL instanceof ki?AL.errors:[AL]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var u=mi(c),d=u.next();!d.done;d=u.next()){var p=d.value;try{Ci(p)}catch(f){i=null!=i?i:[],f instanceof ki?i=yi(yi([],gi(i)),gi(f.errors)):i.push(f)}}}catch(m){n={error:m}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new ki(i)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Ci(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&wi(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&wi(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Ni=Si.EMPTY;function Ti(e){return e instanceof Si||e&&"closed"in e&&vi(e.remove)&&vi(e.add)&&vi(e.unsubscribe)}function Ci(e){vi(e)?e():e.unsubscribe()}var Ei={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Ei.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,yi([e,t],gi(n))):setTimeout.apply(void 0,yi([e,t],gi(n)))},clearTimeout:function(e){var t=Ei.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Ii(e){Ei.setTimeout(function(){throw e})}function zi(){}var Oi=Ai("C",void 0,void 0);function Ai(e,t,n){return{kind:e,value:t,error:n}}function _i(e){e()}var Di=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Ti(t)&&t.add(n)):n.destination=ji,n}return pi(t,e),t.create=function(e,t,n){return new Mi(e,t,n)},t.prototype.next=function(e){this.isStopped?Ri(function(e){return Ai("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Ri(Ai("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Ri(Oi,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Si);Function.prototype.bind;var Pi=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(n){Li(n)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(n){Li(n)}else Li(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){Li(t)}},e}(),Mi=function(e){function t(t,n,r){var i,a=e.call(this)||this;return i=vi(t)||!t?{next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:t,a.destination=new Pi(i),a}return pi(t,e),t}(Di);function Li(e){Ii(e)}function Ri(e,t){var n=null;n&&Ei.setTimeout(function(){return n(e,t)})}var ji={closed:!0,next:zi,error:function(e){throw e},complete:zi},Fi="function"==typeof Symbol&&Symbol.observable||"@@observable";function $i(e){return e}var qi=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,i=this,a=(r=e)&&r instanceof Di||function(e){return e&&vi(e.next)&&vi(e.error)&&vi(e.complete)}(r)&&Ti(r)?e:new Mi(e,t,n);return _i(function(){var e=i,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Vi(t))(function(t,r){var i=new Mi({next:function(t){try{e(t)}catch(n){r(n),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Fi]=function(){return this},e.prototype.pipe=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(0===(e=t).length?$i:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Vi(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Vi(e){var t;return null!==(t=null!=e?e:void 0)&&void 0!==t?t:Promise}function Bi(e){return function(t){if(function(e){return vi(null==e?void 0:e.lift)}(t))return t.lift(function(t){try{return e(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ui(e,t,n,r,i){return new Hi(e,t,n,r,i)}var Hi=function(e){function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(r){t.error(r)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return pi(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(Di),Wi=xi(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Gi=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return pi(t,e),t.prototype.lift=function(e){var t=new Qi(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Wi},t.prototype.next=function(e){var t=this;_i(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=mi(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(o){n={error:o}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;_i(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;_i(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?Ni:(this.currentObservers=null,a.push(e),new Si(function(){t.currentObservers=null,wi(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new qi;return e.source=this,e},t.create=function(e,t){return new Qi(e,t)},t}(qi),Qi=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return pi(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:Ni},t}(Gi),Ji=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return pi(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Gi),Ki={now:function(){return(Ki.delegate||Date).now()},delegate:void 0},Yi=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=Ki);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return pi(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!e.closed;i+=n?1:2)e.next(r[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,l=1;l<r.length&&r[l]<=o;l+=2)s=l;s&&r.splice(0,s+1)}},t}(Gi),Xi=function(e){function t(t,n){return e.call(this)||this}return pi(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(Si),Zi={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Zi.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,yi([e,t],gi(n))):setInterval.apply(void 0,yi([e,t],gi(n)))},clearInterval:function(e){var t=Zi.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},ea=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return pi(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),Zi.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&Zi.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)/* @__PURE__ */return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(AL){r=!0,n=AL||/* @__PURE__ */new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,wi(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Xi),ta=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=Ki.now,e}(),na=new(function(e){function t(t,n){void 0===n&&(n=ta.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return pi(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(ta))(ea),ra=new qi(function(e){return e.complete()});function ia(e){return e&&vi(e.schedule)}function aa(e){return ia((t=e)[t.length-1])?e.pop():void 0;var t}var oa=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function sa(e){return vi(null==e?void 0:e.then)}function la(e){return vi(e[Fi])}function ca(e){return Symbol.asyncIterator&&vi(null==e?void 0:e[Symbol.asyncIterator])}function ua(e){/* @__PURE__ */
2
2
  return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var da,pa="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function ha(e){return vi(null==e?void 0:e[pa])}function fa(e){return function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),r[Symbol.asyncIterator]=function(){return this},r;function o(e,t){i[e]&&(r[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){try{!function(e){e.value instanceof bi?Promise.resolve(e.value.v).then(l,c):u(a[0][2],e)}(i[e](t))}catch(AL){u(a[0][3],AL)}}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}(this,arguments,function(){var t,n,r;return fi(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,bi(t.read())];case 3:return n=i.sent(),r=n.value,n.done?[4,bi(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,bi(r)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function ma(e){return vi(null==e?void 0:e.getReader)}function ga(e){if(e instanceof qi)return e;if(null!=e){if(la(e))return i=e,new qi(function(e){var t=i[Fi]();if(vi(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")});if(oa(e))return r=e,new qi(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()});if(sa(e))return n=e,new qi(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,Ii)});if(ca(e))return ya(e);if(ha(e))return t=e,new qi(function(e){var n,r;try{for(var i=mi(t),a=i.next();!a.done;a=i.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()});if(ma(e))return ya(fa(e))}var t,n,r,i;throw ua(e)}function ya(e){return new qi(function(t){(function(e,t){var n,r,i,a;return function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{l(r.next(e))}catch(AL){a(AL)}}function s(e){try{l(r.throw(e))}catch(AL){a(AL)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}l((r=r.apply(e,t||[])).next())})}(this,void 0,void 0,function(){var o,s;return fi(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=mi(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}(e),l.label=1;case 1:return[4,n.next()];case 2:if((r=l.sent()).done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=l.sent(),i={error:s},[3,11];case 6:return l.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}function ba(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function va(e,t){return void 0===t&&(t=0),Bi(function(n,r){n.subscribe(Ui(r,function(n){return ba(r,e,function(){return r.next(n)},t)},function(){return ba(r,e,function(){return r.complete()},t)},function(n){return ba(r,e,function(){return r.error(n)},t)}))})}function xa(e,t){return void 0===t&&(t=0),Bi(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function ka(e,t){if(!e)throw new Error("Iterable cannot be null");return new qi(function(n){ba(n,t,function(){var r=e[Symbol.asyncIterator]();ba(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function wa(e,t){return t?function(e,t){if(null!=e){if(la(e))return function(e,t){return ga(e).pipe(xa(t),va(t))}(e,t);if(oa(e))return function(e,t){return new qi(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}(e,t);if(sa(e))return function(e,t){return ga(e).pipe(xa(t),va(t))}(e,t);if(ca(e))return ka(e,t);if(ha(e))return function(e,t){return new qi(function(n){var r;return ba(n,t,function(){r=e[pa](),ba(n,t,function(){var e,t,i;try{t=(e=r.next()).value,i=e.done}catch(a){return void n.error(a)}i?n.complete():n.next(t)},0,!0)}),function(){return vi(null==r?void 0:r.return)&&r.return()}})}(e,t);if(ma(e))return function(e,t){return ka(fa(e),t)}(e,t)}throw ua(e)}(e,t):ga(e)}function Sa(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return wa(e,aa(e))}function Na(e,t){var n=vi(e)?e:function(){return e},r=function(e){return e.error(n())};return new qi(t?function(e){return t.schedule(r,0,e)}:r)}!function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"}(da||(da={}));var Ta=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){return function(e,t){var n,r,i,a=e,o=a.kind,s=a.value,l=a.error;if("string"!=typeof o)throw new TypeError('Invalid notification, missing "kind"');"N"===o?null===(n=t.next)||void 0===n||n.call(t,s):"E"===o?null===(r=t.error)||void 0===r||r.call(t,l):null===(i=t.complete)||void 0===i||i.call(t)}(this,e)},e.prototype.do=function(e,t,n){var r=this,i=r.kind,a=r.value,o=r.error;return"N"===i?null==e?void 0:e(a):"E"===i?null==t?void 0:t(o):null==n?void 0:n()},e.prototype.accept=function(e,t,n){var r;return vi(null===(r=e)||void 0===r?void 0:r.next)?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,r=e.error,i="N"===t?Sa(n):"E"===t?Na(function(){return r}):"C"===t?ra:0;if(!i)throw new TypeError("Unexpected notification kind "+t);return i},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();xi(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Ca(e,t){return Bi(function(n,r){var i=0;n.subscribe(Ui(r,function(n){r.next(e.call(t,n,i++))}))})}function Ea(e,t,n){return void 0===n&&(n=1/0),vi(t)?Ea(function(n,r){return Ca(function(e,i){return t(n,e,r,i)})(ga(e(n,r)))},n):("number"==typeof t&&(n=t),Bi(function(t,r){return function(e,t,n,r){var i=[],a=0,o=0,s=!1,l=function(){!s||i.length||a||t.complete()},c=function(e){return a<r?u(e):i.push(e)},u=function(e){a++;var s=!1;ga(n(e,o++)).subscribe(Ui(t,function(e){t.next(e)},function(){s=!0},void 0,function(){if(s)try{a--;for(var e=function(){var e=i.shift();u(e)};i.length&&a<r;)e();l()}catch(n){t.error(n)}}))};return e.subscribe(Ui(t,c,function(){s=!0,l()})),function(){}}(t,r,e,n)}))}function Ia(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(void 0===(n=1)&&(n=1/0),Ea($i,n))(wa(e,aa(e)));var n}function za(e,t){return Bi(function(n,r){var i=0;n.subscribe(Ui(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}function Oa(e){return Bi(function(t,n){var r,i=null,a=!1;i=t.subscribe(Ui(n,void 0,void 0,function(o){r=ga(e(o,Oa(e)(t))),i?(i.unsubscribe(),i=null,r.subscribe(n)):a=!0})),a&&(i.unsubscribe(),i=null,r.subscribe(n))})}function Aa(e,t){return e===t}function _a(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new Gi}:t,r=e.resetOnError,i=void 0===r||r,a=e.resetOnComplete,o=void 0===a||a,s=e.resetOnRefCountZero,l=void 0===s||s;return function(e){var t,r,a,s=0,c=!1,u=!1,d=function(){null==r||r.unsubscribe(),r=void 0},p=function(){d(),t=a=void 0,c=u=!1},h=function(){var e=t;p(),null==e||e.unsubscribe()};return Bi(function(e,f){s++,u||c||d();var m=a=null!=a?a:n();f.add(function(){0!==--s||u||c||(r=Da(h,l))}),m.subscribe(f),!t&&s>0&&(t=new Mi({next:function(e){return m.next(e)},error:function(e){u=!0,d(),r=Da(p,i,e),m.error(e)},complete:function(){c=!0,d(),r=Da(p,o),m.complete()}}),ga(e).subscribe(t))})(e)}}function Da(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!0!==t){if(!1!==t){var i=new Mi({next:function(){i.unsubscribe(),e()}});return ga(t.apply(void 0,yi([],gi(n)))).subscribe(i)}}else e()}function Pa(e,t,n){var r,i,a,o,s=!1;return e&&"object"==typeof e?(r=e.bufferSize,o=void 0===r?1/0:r,i=e.windowTime,t=void 0===i?1/0:i,s=void 0!==(a=e.refCount)&&a,n=e.scheduler):o=null!=e?e:1/0,_a({connector:function(){return new Yi(o,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}function Ma(e,t,n){var r=vi(e)||t||n?{next:e,error:t,complete:n}:e;return r?Bi(function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var i=!0;e.subscribe(Ui(t,function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)},function(){var e;i=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()},function(e){var n;i=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)},function(){var e,t;i&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)}))}):$i}function La(e){try{return e()}catch{}}var Ra=La(()=>globalThis)||La(()=>window)||La(()=>self)||La(()=>global)||La(function(){return La.constructor("return this")()}),ja="4.3.0",Fa=/* @__PURE__ */new Map;function $a(e){const t=Fa.get(e)||1;return Fa.set(e,t+1),`${e}:${t}:${Math.random().toString(36).slice(2)}`}var qa="Invariant Violation",Va=class e extends Error{constructor(t=qa){super(t),this.name=qa,Object.setPrototypeOf(this,e.prototype)}},Ba=["debug","log","warn","error","silent"],Ua=Ba.indexOf("silent");function Ha(e,...t){if(!e)throw Ga(...t)}function Wa(e){return function(t,...n){if(Ba.indexOf(e)>=Ua){const r=console[e]||console.log;if("number"==typeof t){const e=t;(t=Ka(e))||(t=Ya(e,n),n=[])}r(t,...n)}}}function Ga(e,...t){return new Va(Ka(e,t)||Ya(e,t))}Ha.debug=Wa("debug"),Ha.log=Wa("log"),Ha.warn=Wa("warn"),Ha.error=Wa("error");var Qa=Symbol.for("ApolloErrorMessageHandler_"+ja);function Ja(e){if("string"==typeof e)return e;try{return function(e,t=0){const n=$a("stringifyForDisplay");return JSON.stringify(e,(e,t)=>void 0===t?n:t,t).split(JSON.stringify(n)).join("<undefined>")}(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function Ka(e,t=[]){if(e)return Ra[Qa]&&Ra[Qa](e,t.map(Ja))}function Ya(e,t=[]){if(e)return"string"==typeof e?t.reduce((e,t)=>e.replace(/%[sdfo]/,Ja(t)),e):`An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(JSON.stringify({version:ja,message:e,args:t.map(Ja)}))}`}function Xa(e,t,n,r){if("IntValue"===n.kind||"FloatValue"===n.kind)e[t.value]=Number(n.value);else if("BooleanValue"===n.kind||"StringValue"===n.kind)e[t.value]=n.value;else if("ObjectValue"===n.kind){const i={};n.fields.map(e=>Xa(i,e.name,e.value,r)),e[t.value]=i}else if("Variable"===n.kind){const i=(r||{})[n.name.value];e[t.value]=i}else if("ListValue"===n.kind)e[t.value]=n.values.map(e=>{const n={};return Xa(n,t,e,r),n[t.value]});else if("EnumValue"===n.kind)e[t.value]=n.value;else{if("NullValue"!==n.kind)throw Ga(21,t.value,n.kind);e[t.value]=null}}function Za(e,t){if(e.arguments&&e.arguments.length){const n={};return e.arguments.forEach(({name:e,value:r})=>Xa(n,e,r,t)),n}return null}var eo=Symbol.for("apollo.cacheSize"),to={...Ra[eo]};function no(e,t){return e.definitions.find(e=>"OperationDefinition"===e.kind&&!!e.name)?.name.value??t}var ro=()=>Object.create(null),{forEach:io,slice:ao}=Array.prototype,{hasOwnProperty:oo}=Object.prototype,so=class e{constructor(e=!0,t=ro){this.weakness=e,this.makeData=t}lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return io.call(e,e=>t=t.getChildTrie(e)),oo.call(t,"data")?t.data:t.data=this.makeData(ao.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let n=0,r=e.length;t&&n<r;++n){const r=t.mapFor(e[n],!1);t=r&&r.get(e[n])}return t&&t.data}remove(){return this.removeArray(arguments)}removeArray(e){let t;if(e.length){const n=e[0],r=this.mapFor(n,!1),i=r&&r.get(n);i&&(t=i.removeArray(ao.call(e,1)),i.data||i.weak||i.strong&&i.strong.size||r.delete(n))}else t=this.data,delete this.data;return t}getChildTrie(t){const n=this.mapFor(t,!0);let r=n.get(t);return r||n.set(t,r=new e(this.weakness,this.makeData)),r}mapFor(e,t){return this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(e)?this.weak||(t?this.weak=/* @__PURE__ */new WeakMap:void 0):this.strong||(t?this.strong=/* @__PURE__ */new Map:void 0)}};function lo(){}var co=class{constructor(e=1/0,t=lo){this.max=e,this.dispose=t,this.map=/* @__PURE__ */new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:e,newer:n}=t;n&&(n.older=e),e&&(e.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){const t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)}};function uo(){}var po=uo,ho="undefined"!=typeof WeakRef?WeakRef:function(e){return{deref:()=>e}},fo="undefined"!=typeof WeakMap?WeakMap:Map,mo="undefined"!=typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:uo,unregister:uo}},go=class{constructor(e=1/0,t=po){this.max=e,this.dispose=t,this.map=new fo,this.newest=null,this.oldest=null,this.unfinalizedNodes=/* @__PURE__ */new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const e=this.unfinalizedNodes.values();for(let t=0;t<10024;t++){const t=e.next().value;if(!t)break;this.unfinalizedNodes.delete(t);const n=t.key;delete t.key,t.keyRef=new ho(n),this.registry.register(n,t,t)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new mo(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:e,newer:n}=t;n&&(n.older=e),e&&(e.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(e,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;const t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){const t=this.map.get(e);return!!t&&(this.deleteNode(t),!0)}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}},yo=/* @__PURE__ */new WeakSet;function bo(e){e.size<=(e.max||-1)||yo.has(e)||(yo.add(e),setTimeout(()=>{e.clean(),yo.delete(e)},100))}var vo=function(e,t){const n=new go(e,t);return n.set=function(e,t){const n=go.prototype.set.call(this,e,t);return bo(this),n},n},xo=function(e,t){const n=new co(e,t);return n.set=function(e,t){const n=co.prototype.set.call(this,e,t);return bo(this),n},n};function ko(e,{max:t,makeCacheKey:n=e=>e}){const r=new so(!0),i=new vo(t);return(...t)=>{const a=r.lookupArray(n(t)),o=i.get(a);if(o){if(o.error)throw o.error;return o.result}const s=i.set(a,{});try{return s.result=e(...t)}catch(l){throw s.error=l,l}}}var wo=ko((e,t)=>{Ha(e&&"Document"===e.kind,1);const n=e.definitions.filter(e=>"OperationDefinition"===e.kind);t&&Ha(1==n.length&&n[0].operation===t,4,t,t,n[0].operation),sr(e,{Field(t,r,i,a){if(t.alias&&("__typename"===t.alias.value||t.alias.value.startsWith("__ac_"))&&t.alias.value!==t.name.value){let r=e,i=[];for(const e of a)r=r[e],"Field"===r.kind&&i.push(r.alias?.value||r.name.value);throw i.splice(-1,1,t.name.value),Ga(5,t.alias.value,i.join("."),n[0].operation,no(e,"(anonymous)"))}}})},{max:to.checkDocument||2e3}),{toString:So}=Object.prototype;function No(e=[]){const t={};return e.forEach(e=>{t[e.name.value]=e}),t}function To(e){return e.definitions.filter(e=>"FragmentDefinition"===e.kind)}function Co(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{const n=e.name.value;if("function"==typeof t)return t(n);const r=t&&t[n];return Ha(r,11,n),r}default:return null}}function Eo(e){let t;wo(e);for(let n of e.definitions){if("OperationDefinition"===n.kind)return n;"FragmentDefinition"!==n.kind||t||(t=n)}if(t)return t;throw Ga(14)}function Io(e){return wo(e),e.definitions.filter(e=>"OperationDefinition"===e.kind)[0]}function zo(e){return"Field"===e.kind}function Oo(e){return e.match(/^\[(.*)\]$/)}function Ao(e){return e.alias?e.alias.value:e.name.value}function _o(e){return e.replace(/[[\]]/g,"")}function Do(...e){const t={};return e.forEach(e=>{e&&Reflect.ownKeys(e).forEach(n=>{const r=e[n];void 0!==r&&(t[n]=r)})}),t}function Po(e){return null!==e&&"object"==typeof e}var{hasOwnProperty:Mo}=Object.prototype,Lo=function(e,t,n){return this.merge(e[n],t[n])},Ro=e=>isNaN(+e)?{}:[],jo=class{options;reconciler;constructor(e={}){this.options=e,this.reconciler=e.reconciler||Lo}merge(e,t,n={}){const r=n.atPath;if(r?.length){const[i,...a]=r;void 0===e&&(e=Ro(i));let o=e[i];void 0===o&&a.length&&(o=Ro(a[0]));const s=this.merge(o,t,{...n,atPath:a});return o!==s&&((e=this.shallowCopyForMerge(e))[i]=s),e}return Array.isArray(e)&&Array.isArray(t)&&"truncate"===this.options.arrayMerge&&e.length>t.length&&(e=e.slice(0,t.length),this.pastCopies.add(e)),Po(t)&&Po(e)?(Object.keys(t).forEach(n=>{if(Mo.call(e,n)){const r=e[n];if(t[n]!==r){const i=this.reconciler(e,t,n);i!==r&&((e=this.shallowCopyForMerge(e))[n]=i)}}else(e=this.shallowCopyForMerge(e))[n]=t[n]}),e):t}isObject=Po;pastCopies=/* @__PURE__ */new Set;shallowCopyForMerge(e){return Po(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):{__proto__:Object.getPrototypeOf(e),...e},this.pastCopies.add(e))),e}};function Fo(e){const t={},n=e&&e.variableDefinitions;return n&&n.length&&n.forEach(e=>{e.defaultValue&&Xa(t,e.variable.name,e.defaultValue)}),t}function $o(e,t){let n=t;const r=[];return e.definitions.forEach(e=>{if("OperationDefinition"===e.kind)throw Ga(12,e.operation,e.name?` named '${e.name.value}'`:"");"FragmentDefinition"===e.kind&&r.push(e)}),void 0===n&&(Ha(1===r.length,13,r.length),n=r[0].name.value),{...e,definitions:[{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}},...e.definitions]}}var qo,Vo=Object.assign(function(e){return JSON.stringify(e,Bo)},{reset(){qo=new xo(to.canonicalStringify||1e3)}});function Bo(e,t){if(t&&"object"==typeof t){const e=Object.getPrototypeOf(t);if(e===Object.prototype||null===e){const n=Object.keys(t);if(n.every(Uo))return t;const r=JSON.stringify(n);let i=qo.get(r);if(!i){n.sort();const e=JSON.stringify(n);i=qo.get(e)||n,qo.set(r,i),qo.set(e,i)}const a=Object.create(e);return i.forEach(e=>{a[e]=t[e]}),a}}return t}function Uo(e,t,n){return 0===t||n[t-1]<=e}Vo.reset();var Ho=["connection","include","skip","client","rest","export","nonreactive","stream"],Wo=Vo,Go=Object.assign(function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){const e=n.connection.filter?n.connection.filter:[];e.sort();const r={};e.forEach(e=>{r[e]=t[e]});const i=Wo(r);if("{}"!==i)return`${n.connection.key}(${i})`}return n.connection.key}let r=e;if(t){const e=Wo(t);"{}"!==e&&(r+=`(${e})`)}return n&&Object.keys(n).forEach(e=>{-1===Ho.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?r+=`@${e}(${Wo(n[e])})`:r+=`@${e}`)}),r},{setStringify(e){const t=Wo;return Wo=e,t}});function Qo(e){return!!e.errors?.length}function Jo(e,t,n){const r=new Set(e),i=r.size;return sr(t,{Directive(e){if(r.delete(e.name.value)&&(!n||!r.size))return or}}),n?!r.size:r.size<i}function Ko(e){let t=!1;return sr(e,{Directive:{enter(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(e=>"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value),t))return or}}}),t}var Yo=Array.isArray,Xo=ko(function(e,t){return!!e.directives?.some(e=>{if("defer"!==e.name.value)return!1;for(const n of e.arguments??[])if("if"===n.name.value)switch(n.value.kind){case fn:return n.value.value;case un:return!!t?.[n.value.name.value]}return!0})},{max:to.isDeferredFragment||2e3,makeCacheKey:([e,t])=>[e,Vo(t)]});function Zo(e){return Array.isArray(e)&&e.length>0}function es(e){return null!==e&&"object"==typeof e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}var ts=ko(function(e,t){return!!e.directives?.some(e=>{if("stream"!==e.name.value)return!1;for(const n of e.arguments??[])if("if"===n.name.value)switch(n.value.kind){case fn:return n.value.value;case un:return!!t?.[n.value.name.value]}return!0})},{max:to.isStreamField||2e3,makeCacheKey:([e,t])=>[e,Vo(t)]}),ns=null,rs={},is=1;function as(e){try{return e()}catch(t){}}var os="@wry/context:Slot",ss=as(()=>globalThis)||as(()=>global)||Object.create(null),ls=ss[os]||Array[os]||function(e){try{Object.defineProperty(ss,os,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(class{constructor(){this.id=["slot",is++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=ns;e;e=e.parent)if(this.id in e.slots){const t=e.slots[this.id];if(t===rs)break;return e!==ns&&(ns.slots[this.id]=t),!0}return ns&&(ns.slots[this.id]=rs),!1}getValue(){if(this.hasValue())return ns.slots[this.id]}withValue(e,t,n,r){const i={__proto__:null,[this.id]:e},a=ns;ns={parent:a,slots:i};try{return t.apply(r,n)}finally{ns=a}}static bind(e){const t=ns;return function(){const n=ns;try{return ns=t,e.apply(this,arguments)}finally{ns=n}}}static noContext(e,t,n){if(!ns)return e.apply(n,t);{const r=ns;try{return ns=null,e.apply(n,t)}finally{ns=r}}}}),{bind:cs,noContext:us}=ls,ds=new ls,{hasOwnProperty:ps}=Object.prototype,hs=Array.from||function(e){const t=[];return e.forEach(e=>t.push(e)),t};function fs(e){const{unsubscribe:t}=e;"function"==typeof t&&(e.unsubscribe=void 0,t())}var ms=[];function gs(e,t){if(!e)throw new Error(t||"assertion failure")}function ys(e,t){const n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function bs(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function vs(e){return e.slice(0)}var xs=class e{constructor(t){this.fn=t,this.parents=/* @__PURE__ */new Set,this.childValues=/* @__PURE__ */new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}peek(){if(1===this.value.length&&!Ss(this))return ks(this),this.value[0]}recompute(e){return gs(!this.recomputing,"already recomputing"),ks(this),Ss(this)?function(e,t){return Os(e),ds.withValue(e,ws,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{fs(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(AL){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,Ss(e)||Ts(e)}(e),bs(e.value)}(this,e):bs(this.value)}setDirty(){this.dirty||(this.dirty=!0,Ns(this),fs(this))}dispose(){this.setDirty(),Os(this),Cs(this,(e,t)=>{e.setDirty(),As(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=ms.pop()||/* @__PURE__ */new Set),this.deps.add(e)}forgetDeps(){this.deps&&(hs(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),ms.push(this.deps),this.deps=null)}};function ks(e){const t=ds.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Ss(e)?Es(t,e):Is(t,e),t}function ws(e,t){e.recomputing=!0;const{normalizeResult:n}=e;let r;n&&1===e.value.length&&(r=vs(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),n&&r&&!ys(r,e.value))try{e.value[0]=n(e.value[0],r[0])}catch(i){}}catch(AL){e.value[1]=AL}e.recomputing=!1}function Ss(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Ns(e){Cs(e,Es)}function Ts(e){Cs(e,Is)}function Cs(e,t){const n=e.parents.size;if(n){const r=hs(e.parents);for(let i=0;i<n;++i)t(r[i],e)}}function Es(e,t){gs(e.childValues.has(t)),gs(Ss(t));const n=!Ss(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=ms.pop()||/* @__PURE__ */new Set;e.dirtyChildren.add(t),n&&Ns(e)}function Is(e,t){gs(e.childValues.has(t)),gs(!Ss(t));const n=e.childValues.get(t);0===n.length?e.childValues.set(t,vs(t.value)):ys(n,t.value)||e.setDirty(),zs(e,t),Ss(e)||Ts(e)}function zs(e,t){const n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(ms.length<100&&ms.push(n),e.dirtyChildren=null))}function Os(e){e.childValues.size>0&&e.childValues.forEach((t,n)=>{As(e,n)}),e.forgetDeps(),gs(null===e.dirtyChildren)}function As(e,t){t.parents.delete(e),e.childValues.delete(t),zs(e,t)}xs.count=0;var _s,Ds={setDirty:!0,dispose:!0,forget:!0};function Ps(e){const t=/* @__PURE__ */new Map,n=e&&e.subscribe;function r(e){const r=ds.getValue();if(r){let i=t.get(e);i||t.set(e,i=/* @__PURE__ */new Set),r.dependOn(i),"function"==typeof n&&(fs(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){const r=t.get(e);if(r){const i=n&&ps.call(Ds,n)?n:"setDirty";hs(r).forEach(e=>e[i]()),t.delete(e),fs(r)}},r}function Ms(...e){return(_s||(_s=new so("function"==typeof WeakMap))).lookupArray(e)}var Ls=/* @__PURE__ */new Set;function Rs(e,{max:t=Math.pow(2,16),keyArgs:n,makeCacheKey:r=Ms,normalizeResult:i,subscribe:a,cache:o=co}=Object.create(null)){const s="function"==typeof o?new o(t,e=>e.dispose()):o,l=function(){const t=r.apply(null,n?n.apply(null,arguments):arguments);if(void 0===t)return e.apply(null,arguments);let o=s.get(t);o||(s.set(t,o=new xs(e)),o.normalizeResult=i,o.subscribe=a,o.forget=()=>s.delete(t));const l=o.recompute(Array.prototype.slice.call(arguments));return s.set(t,o),Ls.add(s),ds.hasValue()||(Ls.forEach(e=>e.clean()),Ls.clear()),l};function c(e){const t=e&&s.get(e);t&&t.setDirty()}function u(e){const t=e&&s.get(e);if(t)return t.peek()}function d(e){return!!e&&s.delete(e)}return Object.defineProperty(l,"size",{get:()=>s.size,configurable:!1,enumerable:!1}),Object.freeze(l.options={max:t,keyArgs:n,makeCacheKey:r,normalizeResult:i,subscribe:a,cache:s}),l.dirtyKey=c,l.dirty=function(){c(r.apply(null,arguments))},l.peekKey=u,l.peek=function(){return u(r.apply(null,arguments))},l.forgetKey=d,l.forget=function(){return d(r.apply(null,arguments))},l.makeCacheKey=r,l.getKey=n?function(){return r.apply(null,n.apply(null,arguments))}:r,Object.freeze(l)}function js(e){return{__ref:String(e)}}function Fs(e){let t=e[0]||{};const n=e.length;if(n>1){const r=new jo;for(let i=1;i<n;++i)t=r.merge(t,e[i])}return t}function $s(e,t){return Do(e,t,t.variables&&{variables:Do({...e&&e.variables,...t.variables})})}function qs(e){return e.catch(()=>{}),e}function Vs(e,t){wo(t);const n=Bs(""),r=Bs(""),i=e=>{for(let t,i=0;i<e.length&&(t=e[i]);++i)if(!Yo(t)){if("OperationDefinition"===t.kind)return n(t.name&&t.name.value);if("FragmentDefinition"===t.kind)return r(t.name.value)}return Ha.error(16),null};let a=0;for(let m=t.definitions.length-1;m>=0;--m)"OperationDefinition"===t.definitions[m].kind&&++a;const o=function(e){const t=/* @__PURE__ */new Map,n=/* @__PURE__ */new Map;return e.forEach(e=>{e&&(e.name?t.set(e.name,e):e.test&&n.set(e.test,e))}),e=>{let r=t.get(e.name.value);return!r&&n.size&&n.forEach((t,n)=>{n(e)&&(r=t)}),r}}(e),s=e=>Zo(e)&&e.map(o).some(e=>e&&e.remove),l=/* @__PURE__ */new Map;let c=!1;const u={enter(e){if(s(e.directives))return c=!0,null}},d=sr(t,{Field:u,InlineFragment:u,VariableDefinition:{enter:()=>!1},Variable:{enter(e,t,n,r,a){const o=i(a);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter(e,t,n,r,a){if(s(e.directives))return c=!0,null;const o=i(a);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter(e,t,n,r){l.set(JSON.stringify(r),e)},leave:(e,t,n,i)=>e===l.get(JSON.stringify(i))?e:a>0&&e.selectionSet.selections.every(e=>"Field"===e.kind&&"__typename"===e.name.value)?(r(e.name.value).removed=!0,c=!0,null):void 0},Directive:{leave(e){if(o(e))return c=!0,null}}});if(!c)return t;const p=e=>(e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(t=>{p(r(t)).transitiveVars.forEach(t=>{e.transitiveVars.add(t)})})),e),h=/* @__PURE__ */new Set;d.definitions.forEach(e=>{"OperationDefinition"===e.kind?p(n(e.name&&e.name.value)).fragmentSpreads.forEach(e=>{h.add(e)}):"FragmentDefinition"!==e.kind||0!==a||r(e.name.value).removed||h.add(e.name.value)}),h.forEach(e=>{p(r(e)).fragmentSpreads.forEach(e=>{h.add(e)})});const f={enter(e){if(t=e.name.value,!h.has(t)||r(t).removed)return null;var t}};return function(e){return Us(Io(e)||function(e){Ha("Document"===e.kind,8),Ha(e.definitions.length<=1,9);const t=e.definitions[0];return Ha("FragmentDefinition"===t.kind,10),t}(e),No(To(e)))?null:e}(sr(d,{FragmentSpread:f,FragmentDefinition:f,OperationDefinition:{leave(e){if(e.variableDefinitions){const t=p(n(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return{...e,variableDefinitions:e.variableDefinitions.filter(e=>t.has(e.variable.name.value))}}}}}))}function Bs(e){const t=/* @__PURE__ */new Map;return function(n=e){let r=t.get(n);return r||t.set(n,r={variables:/* @__PURE__ */new Set,fragmentSpreads:/* @__PURE__ */new Set}),r}}function Us(e,t){return!e||e.selectionSet.selections.every(e=>"FragmentSpread"===e.kind&&Us(t[e.name.value],t))}function Hs(e){return sr(e,{FragmentSpread(e){if(!e.directives?.some(({name:e})=>"unmask"===e.value))return null}})}function Ws({directives:e},t){return!e||!e.length||function(e){const t=[];return e&&e.length&&e.forEach(e=>{if(!function({name:{value:e}}){return"skip"===e||"include"===e}(e))return;const n=e.arguments,r=e.name.value;Ha(n&&1===n.length,18,r);const i=n[0];Ha(i.name&&"if"===i.name.value,19,r);const a=i.value;Ha(a&&("Variable"===a.kind||"BooleanValue"===a.kind),20,r),t.push({directive:e,ifArgument:i})}),t}(e).every(({directive:e,ifArgument:n})=>{let r=!1;return"Variable"===n.value.kind?(r=t&&t[n.value.name.value],Ha(void 0!==r,17,e.name.value)):r=n.value.value,"skip"===e.name.value?!r:r})}function Gs(e){return"dataState"in e?e:{...e,dataState:e.complete?"complete":null===e.result?"empty":"partial"}}function Qs(e){const t={data:e.data};return e.error&&(t.error=e.error),t}function Js(e,t=()=>{}){return n=>new qi(r=>{let i=t();return n.subscribe({next(t){let n;try{n=e(t,i)}catch(AL){r.error(AL)}void 0!==n&&r.next(n)},error(e){r.error(e)},complete(){r.complete()}})})}var{toString:Ks,hasOwnProperty:Ys}=Object.prototype,Xs=Function.prototype.toString,Zs=/* @__PURE__ */new Map;function el(e,t){try{return tl(e,t)}finally{Zs.clear()}}function tl(e,t){if(e===t)return!0;const n=Ks.call(e);if(n!==Ks.call(t))return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(al(e,t))return!0;const n=nl(e),r=nl(t),i=n.length;if(i!==r.length)return!1;for(let e=0;e<i;++e)if(!Ys.call(t,n[e]))return!1;for(let a=0;a<i;++a){const r=n[a];if(!tl(e[r],t[r]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e===+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(al(e,t))return!0;const r=e.entries(),i="[object Map]"===n;for(;;){const e=r.next();if(e.done)break;const[n,a]=e.value;if(!t.has(n))return!1;if(i&&!tl(a,t.get(n)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let n=e.byteLength;if(n===t.byteLength)for(;n--&&e[n]===t[n];);return-1===n}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const n=Xs.call(e);return n===Xs.call(t)&&!function(e,t){const n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}(n,il)}}return!1}function nl(e){return Object.keys(e).filter(rl,e)}function rl(e){return void 0!==this[e]}var il="{ [native code] }";function al(e,t){let n=Zs.get(e);if(n){if(n.has(t))return!0}else Zs.set(e,n=/* @__PURE__ */new Set);return n.add(t),!1}function ol(e,{data:t,...n},{data:r,...i},a){return el(n,i)&&sl(Eo(e).selectionSet,t,r,{fragmentMap:No(To(e)),variables:a})}function sl(e,t,n,r){if(t===n)return!0;const i=/* @__PURE__ */new Set;return e.selections.every(e=>{if(i.has(e))return!0;if(i.add(e),!Ws(e,r.variables))return!0;if(ll(e))return!0;if(zo(e)){const i=Ao(e),a=t&&t[i],o=n&&n[i],s=e.selectionSet;if(!s)return el(a,o);const l=Array.isArray(a),c=Array.isArray(o);if(l!==c)return!1;if(l&&c){const e=a.length;if(o.length!==e)return!1;for(let t=0;t<e;++t)if(!sl(s,a[t],o[t],r))return!1;return!0}return sl(s,a,o,r)}{const i=Co(e,r.fragmentMap);if(i)return!!ll(i)||sl(i.selectionSet,t,n,r)}})}function ll(e){return!!e.directives&&e.directives.some(cl)}function cl(e){return"nonreactive"===e.name.value}var ul=ko(function(e,t,n){return function(e,t){let n,r;function i(e){return e!==n&&(n=e,r=t(n)),r}return Object.assign(e.pipe(Ca(i),Pa({bufferSize:1,refCount:!0})),{getCurrentResult:()=>i(e.getCurrentResult())})}(e,n)},{max:1,makeCacheKey:e=>e.slice(0,2)}),dl=Symbol.for("apollo.result.extensions"),pl=Symbol.for("apollo.result.streamInfo"),hl=Symbol.for("apollo.observableQuery.variablesUnknown"),fl=Symbol.for("apollo.cache.handleIncremental");function ml(...e){return Ms.bind(null,...e)}var gl=class{isIncrementalResult(e){return!1}prepareRequest(e){return Ha(!Jo(["defer","stream"],e.query),69),e}extractErrors(){}startRequest=void 0};function yl(e){return e}var bl,vl=class e{transform;cached;resultCache=/* @__PURE__ */new WeakSet;getCacheKey(e){return[e]}static identity(){return new e(yl,{cache:!1})}static split(t,n,r=e.identity()){return Object.assign(new e(e=>(t(e)?n:r).transformDocument(e),{cache:!1}),{left:n,right:r})}constructor(e,t={}){this.transform=e,t.getCacheKey&&(this.getCacheKey=t.getCacheKey),this.cached=!1!==t.cache,this.resetCache()}resetCache(){if(this.cached){const t=new so;this.performWork=Rs(e.prototype.performWork.bind(this),{makeCacheKey:e=>{const n=this.getCacheKey(e);if(n)return Ha(Array.isArray(n),22),t.lookupArray(n)},max:to["documentTransform.cache"],cache:go})}}performWork(e){return wo(e),this.transform(e)}transformDocument(e){if(this.resultCache.has(e))return e;const t=this.performWork(e);return this.resultCache.add(t),t}concat(t){return Object.assign(new e(e=>t.transformDocument(this.transformDocument(e)),{cache:!1}),{left:this,right:t})}left;right},xl=Object.assign(e=>{let t=bl.get(e);return t||(t=function(e){return sr(e,cr)}(e),bl.set(e,t)),t},{reset(){bl=new vo(to.print||2e3)}});function kl(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}xl.reset();var wl={kind:rn,name:{kind:Xt,value:"__typename"}},Sl=Object.assign(function(e){return sr(e,{SelectionSet:{enter(e,t,n){if(n&&"OperationDefinition"===n.kind)return;const{selections:r}=e;if(!r)return;if(r.some(e=>"Field"===e.kind&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))))return;const i=n;return"Field"===i.kind&&i.directives&&i.directives.some(e=>"export"===e.name.value)?void 0:{...e,selections:[...r,wl]}}}})},{added:e=>e===wl});function Nl(e,t){return Io(e)?.operation===t}function Tl(e){return 7===e||8===e}function Cl(e){return!Tl(e)}var El=class e{static empty(){return new e(()=>ra)}static from(t){if(0===t.length)return e.empty();const[n,...r]=t;return n.concat(...r)}static split(t,n,r=new e((e,t)=>t(e))){const i=new e((e,i)=>t(e)?n.request(e,i):r.request(e,i));return Object.assign(i,{left:n,right:r})}static execute(e,t,n){return e.request(function(e,{client:t}){const n={query:e.query,variables:e.variables||{},extensions:e.extensions||{},operationName:no(e.query),operationType:Io(e.query).operation};let r={...e.context};const i=()=>Object.freeze({...r});return Object.defineProperty(n,"setContext",{enumerable:!1,value:e=>{r="function"==typeof e?{...r,...e(i())}:{...r,...e}}}),Object.defineProperty(n,"getContext",{enumerable:!1,value:i}),Object.defineProperty(n,"client",{enumerable:!1,value:t}),n}(t,n),()=>ra)}static concat(...t){return e.from(t)}constructor(e){e&&(this.request=e)}split(t,n,r){return this.concat(e.split(t,n,r))}concat(...e){return 0===e.length?this:e.reduce(this.combine.bind(this),this)}combine(t,n){const r=new e((e,r)=>t.request(e,e=>n.request(e,r)));return Object.assign(r,{left:t,right:n})}request(e,t){throw Ga(67)}left;right},Il=El.execute,zl=class{assumeImmutableResults=!1;lookupFragment(e){return null}getRootTypename(e){return(t=e)[0].toUpperCase()+t.slice(1);var t}getScalar(e){}getScalarTypeForField(e,t){}configuresScalars(){return!1}serializeVariables(e,t){return t}batch(e){const t="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;let n;return this.performTransaction(()=>n=e.update(this),t),n}recordOptimisticTransaction(e,t){this.performTransaction(e,t)}transformDocument(e){return e}transformForLink(e){return e}identify(e){}gc(){return[]}modify(e){return!1}readQuery(e,t=!!e.optimistic){return this.read({...e,rootId:e.id||"ROOT_QUERY",optimistic:t})}fragmentWatches=new so(!0);watchFragment(e){const{fragment:t,fragmentName:n,from:r}=e,i=this.getFragmentDoc(t,n),a=(Array.isArray(r)?r:[r]).map(e=>null==e?e:this.toCacheId(e));if(!Array.isArray(r)){const t=this.watchSingleFragment(a[0],i,e);return null===r?t:ul(t,Symbol.for("apollo.transform.individualResult"),e=>({...e,data:e.data??{}}))}let o;function s(e){const t=e.reduce((e,t,n)=>(e.data.push(t.data),e.complete&&=t.complete,e.dataState=e.complete?"complete":"partial",t.missing&&(e.missing||={},e.missing[n]=t.missing),e),{data:[],dataState:"complete",complete:!0});return el(o,t)||(o=t),o}if(0===a.length)return Dl;let l=!1;const c=a.map(t=>this.watchSingleFragment(t,i,e)),u=function(e){return 0===e.length?ra:new qi(t=>{const{length:n}=e,r=new Array(n),i=/* @__PURE__ */new Map;e.forEach((e,t)=>{i.has(e)||i.set(e,/* @__PURE__ */new Set),i.get(e).add(t)});let a,o=i.size,s=i.size;i.forEach((n,i)=>{let l=!1;const c=i.subscribe({next:o=>{n.forEach(e=>r[e]=o),l||(l=!0,s--),s||(a||=new Set(e.filter(e=>e.dirty)),a.delete(i),a.size||(t.next(r.slice()),a=void 0))},complete:()=>{o--,o||t.complete()},error:t.error.bind(t)});t.add(c)})})}(c).pipe(Ca(s),Ma({subscribe:()=>l=!0,unsubscribe:()=>l=!1}),Pa({bufferSize:1,refCount:!0}));return Object.assign(u,{getCurrentResult:()=>l&&o?o:s(c.map(e=>e.getCurrentResult()))})}onAfterBroadcast=e=>e();watchSingleFragment(e,t,n){if(null===e)return Al;const{optimistic:r=!0,variables:i}=n,a=[t,Vo({id:e,optimistic:r,variables:i})],o=this.fragmentWatches.lookupArray(a);if(!o.observable){let c,u=!1;function d(e){const r=e.result;return c&&ol(t,{data:c.data},{data:r},n.variables)||(c={data:r,dataState:e.complete?"complete":"partial",complete:e.complete},e.missing&&(c.missing=e.missing.missing)),c}const p=new qi(n=>{u=!0;const o=this.watch({variables:i,returnPartialData:!0,id:e,query:t,optimistic:r,immediate:!0,callback:e=>{p.dirty=!0,this.onAfterBroadcast(()=>{n.next(d(e)),p.dirty=!1})}});return()=>{u=!1,o(),this.fragmentWatches.removeArray(a)}}).pipe((void 0===l&&(l=$i),s=null!=s?s:Aa,Bi(function(e,t){var n,r=!0;e.subscribe(Ui(t,function(e){var i=l(e);!r&&s(n,i)||(r=!1,n=i,t.next(e))}))})),_a({connector:()=>new Yi(1),resetOnRefCountZero:()=>function(e,t,n){void 0===e&&(e=0),void 0===n&&(n=na);var r=-1;return null!=t&&(ia(t)?n=t:r=t),new qi(function(t){var i,a=(i=e)instanceof Date&&!isNaN(i)?+e-n.now():e;a<0&&(a=0);var o=0;return n.schedule(function(){t.closed||(t.next(o++),0<=r?this.schedule(void 0,r):t.complete())},a)})}(0)}));o.observable=Object.assign(p,{dirty:!1,getCurrentResult:()=>u&&c?c:d(this.diff({id:e,query:t,returnPartialData:!0,optimistic:r,variables:i}))})}var s,l;return o.observable}getFragmentDoc=Rs($o,{max:to["cache.fragmentQueryDocuments"]||1e3,cache:go,makeCacheKey:ml(this)});readFragment(e,t=!!e.optimistic){const n=void 0!==e.from?this.toCacheId(e.from):e.id;return this.read({...e,query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:n,optimistic:t})}writeQuery({id:e,data:t,...n}){return this.write(Object.assign(n,{dataId:e||"ROOT_QUERY",result:t}))}writeFragment({data:e,fragment:t,fragmentName:n,...r}){const i=void 0!==r.from?this.toCacheId(r.from):r.id;return this.write(Object.assign(r,{query:this.getFragmentDoc(t,n),dataId:i,result:e}))}updateQuery(e,t){return this.batch({update(n){const r=n.readQuery(e),i=t(r);return null==i?r:(n.writeQuery({...e,data:i}),i)}})}updateFragment(e,t){return this.batch({update(n){const r=n.readFragment(e),i=t(r);return null==i?r:(n.writeFragment({...e,data:i}),i)}})}toCacheId(e){return"string"==typeof e?e:this.identify(e)}},Ol=Object.freeze({data:null,dataState:"complete",complete:!0}),Al=Object.assign(new qi(e=>{e.next(Ol)}),{dirty:!1,getCurrentResult:()=>Ol}),_l=Object.freeze({data:[],dataState:"complete",complete:!0}),Dl=Object.assign(new qi(e=>{e.next(_l)}),{getCurrentResult:()=>_l}),Pl=class e extends Error{message;path;query;variables;constructor(t,n,r,i){if(super(t),this.message=t,this.path=n,this.query=r,this.variables=i,this.name="MissingFieldError",Array.isArray(this.path)){this.missing=this.message;for(let e=this.path.length-1;e>=0;--e)this.missing={[this.path[e]]:this.missing}}else this.missing=this.path;this.__proto__=e.prototype}missing},{hasOwnProperty:Ml}=Object.prototype;function Ll({__typename:e,id:t,_id:n},r){if("string"==typeof e&&(r&&(r.keyObject=null!=t?{id:t}:null!=n?{_id:n}:void 0),null==t&&null!=n&&(t=n),null!=t))return`${e}:${"number"==typeof t||"string"==typeof t?t:JSON.stringify(t)}`}var Rl={dataIdFromObject:Ll,resultCaching:!0},jl=/^[_a-z][_0-9a-z]*/i;function Fl(e){const t=e.match(jl);return t?t[0]:e}function $l(e,t,n){return!!Po(t)&&(Yo(t)?t.every(t=>$l(e,t,n)):e.selections.every(e=>{if(zo(e)&&Ws(e,n)){const r=Ao(e);return Ml.call(t,r)&&(!e.selectionSet||$l(e.selectionSet,t[r],n))}return!0}))}function ql(e){return Po(e)&&!kl(e)&&!Yo(e)}function Vl(e,t){const n=No(To(e));return{fragmentMap:n,lookupFragment(e){let r=n[e];return!r&&t&&(r=t.lookup(e)),r||null}}}function Bl(e){switch(e.kind){case kn:return e.name.value;case wn:return`[${Bl(e.type)}]`;case Sn:return Bl(e.type)}}var Ul={},Hl=()=>Ul,Wl={},Gl=class{policies;group;data={};constructor(e,t){this.policies=e,this.group=t}toObject(){return{...this.data}}has(e){return void 0!==this.lookup(e,!0)}get(e,t){if(this.group.depend(e,t),Ml.call(this.data,e)){const n=this.data[e];if(n&&Ml.call(n,t))return n[t]}return"__typename"===t&&Ml.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Yl?this.parent.get(e,t):void 0}lookup(e,t){return t&&this.group.depend(e,"__exists"),Ml.call(this.data,e)?this.data[e]:this instanceof Yl?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?{}:void 0}merge(e,t){let n;kl(e)&&(e=e.__ref),kl(t)&&(t=t.__ref);const r="string"==typeof e?this.lookup(n=e):e;let i="string"==typeof t?this.lookup(n=t):t;if(!i)return;Ha("string"==typeof n,108),i=this.coerceStoreObject(i,(e,t)=>e.coerceToParsed(t),i.__typename||r?.__typename||this.policies.rootTypenamesById[n]);const a=new jo({reconciler:Zl}).merge(r,i);if(this.data[n]=a,a!==r&&(delete this.refs[n],this.group.caching)){const e={};r||(e.__exists=1),Object.keys(i).forEach(t=>{if(!r||r[t]!==a[t]){e[t]=1;const n=Fl(t);n===t||this.policies.hasKeyArgs(a.__typename,n)||(e[n]=1),void 0!==a[t]||this instanceof Yl||delete a[t]}}),!e.__typename||r&&r.__typename||this.policies.rootTypenamesById[n]!==a.__typename||delete e.__typename,Object.keys(e).forEach(e=>this.group.dirty(n,e))}}modify(e,t,n){const r=this.lookup(e);if(r){const i={};let a=!1,o=!0;const s={DELETE:Ul,INVALIDATE:Wl,isReference:kl,toReference:this.toReference,canRead:this.canRead,readField:(t,n)=>this.policies.readField("string"==typeof t?{fieldName:t,from:n||js(e)}:t,{store:this})};if(Object.keys(r).forEach(l=>{const c=Fl(l);let u=r[l];if(void 0===u)return;const d="function"==typeof t?t:t[l]||(n?void 0:t[c]);if(d){let t=d===Hl?Ul:d(u,{...s,fieldName:c,storeFieldName:l,storage:this.getStorage(e,l)});t===Wl?this.group.dirty(e,l):(t===Ul&&(t=void 0),t!==u&&(i[l]=t,a=!0,u=t))}void 0!==u&&(o=!1)}),a)return this.merge(e,i),o&&(this instanceof Yl?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1}delete(e,t,n){const r=this.lookup(e);if(r){const i=this.getFieldValue(r,"__typename"),a=t&&n?this.policies.getStoreFieldName({typename:i,fieldName:t,args:n}):t;return this.modify(e,a?{[a]:Hl}:Hl,!!n)}return!1}evict(e,t){let n=!1;return e.id&&(Ml.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof Yl&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n}clear(){this.replace(null)}extract(){let e=this.toObject();this.hasScalarConfig()&&(e=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t&&this.coerceStoreObject(t,(e,t)=>e.coerceToSerialized(t),t?.__typename||this.policies.rootTypenamesById[e])])));const t=[];return this.getRootIdSet().forEach(e=>{Ml.call(this.policies.rootTypenamesById,e)||t.push(e)}),t.length&&(e.__META={extraRootIds:t.sort()}),e}hasScalarConfig(){return!!this.policies.cache.config.scalars}coerceStoreObject(e,t,n=e.__typename){if(!n||!this.hasScalarConfig())return e;let r=!1;const i=Object.entries(e).map(([e,i])=>{const a=Fl(e),o=this.policies.getScalarTypeForField(n,a),s=this.coerceValue(i,t,o,`${n}.${a}`);return r||=s!==i,[e,s]});return r?Object.fromEntries(i):e}coerceValue(e,t,n,r){if(null==e)return e;if(n){const i=Oo(n);if(i&&Array.isArray(e))return e.map(e=>this.coerceValue(e,t,i[1],r));const a=this.policies.cache.getScalar(_o(n));if(a)return t(a,e)}return Array.isArray(e)?e.map(e=>this.coerceValue(e,t,n,r)):es(e)&&"__typename"in e?this.coerceStoreObject(e,t):e}replace(e){if(Object.keys(this.data).forEach(t=>{e&&Ml.call(e,t)||this.delete(t)}),e){const{__META:t,...n}=e;Object.keys(n).forEach(e=>{this.merge(e,n[e])}),t&&t.extraRootIds.forEach(this.retain,this)}}rootIds={};retain(e){return this.rootIds[e]=(this.rootIds[e]||0)+1}release(e){if(this.rootIds[e]>0){const t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0}getRootIdSet(e=/* @__PURE__ */new Set){return Object.keys(this.rootIds).forEach(e.add,e),this instanceof Yl?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e}gc(){const e=this.getRootIdSet(),t=this.toObject();e.forEach(n=>{Ml.call(t,n)&&(Object.keys(this.findChildRefIds(n)).forEach(e.add,e),delete t[n])});const n=Object.keys(t);if(n.length){let e=this;for(;e instanceof Yl;)e=e.parent;n.forEach(t=>e.delete(t))}return n}refs={};findChildRefIds(e){if(!Ml.call(this.refs,e)){const t=this.refs[e]={},n=this.data[e];if(!n)return t;const r=/* @__PURE__ */new Set([n]);r.forEach(e=>{kl(e)&&(t[e.__ref]=!0),Po(e)&&Object.keys(e).forEach(t=>{const n=e[t];Po(n)&&r.add(n)})})}return this.refs[e]}makeCacheKey(){return this.group.keyMaker.lookupArray(arguments)}getFieldValue=(e,t)=>kl(e)?this.get(e.__ref,t):e&&e[t];canRead=e=>kl(e)?this.has(e.__ref):"object"==typeof e;toReference=(e,t)=>{if("string"==typeof e)return js(e);if(kl(e))return e;const[n]=this.policies.identify(e);if(n){const r=js(n);return t&&this.merge(n,e),r}};get supportsResultCaching(){return this.group.caching}},Ql=class{caching;parent;d=null;keyMaker;constructor(e,t=null){this.caching=e,this.parent=t,this.resetCaching()}resetCaching(){this.d=this.caching?Ps():null,this.keyMaker=new so}depend(e,t){if(this.d){this.d(Jl(e,t));const n=Fl(t);n!==t&&this.d(Jl(e,n)),this.parent&&this.parent.depend(e,t)}}dirty(e,t){this.d&&this.d.dirty(Jl(e,t),"__exists"===t?"forget":"setDirty")}};function Jl(e,t){return t+"#"+e}function Kl(e,t){ec(e)&&e.group.depend(t,"__exists")}Gl.Root=class extends Gl{constructor({policies:e,resultCaching:t=!0,seed:n}){super(e,new Ql(t)),n&&this.replace(n)}stump=new Xl(this);addLayer(e,t){return this.stump.addLayer(e,t)}removeLayer(){return this}storageTrie=new so;getStorage(){return this.storageTrie.lookupArray(arguments)}};var Yl=class e extends Gl{id;parent;replay;group;constructor(e,t,n,r){super(t.policies,r),this.id=e,this.parent=t,this.replay=n,this.group=r,n(this)}addLayer(t,n){return new e(t,this,n,this.group)}removeLayer(e){const t=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(e=>{const n=this.data[e],r=t.lookup(e);r?n?n!==r&&Object.keys(n).forEach(t=>{el(n[t],r[t])||this.group.dirty(e,t)}):(this.group.dirty(e,"__exists"),Object.keys(r).forEach(t=>{this.group.dirty(e,t)})):this.delete(e)}),t):t===this.parent?this:t.addLayer(this.id,this.replay)}toObject(){return{...this.parent.toObject(),...this.data}}findChildRefIds(e){const t=this.parent.findChildRefIds(e);return Ml.call(this.data,e)?{...t,...super.findChildRefIds(e)}:t}getStorage(...e){let t=this.parent;for(;t.parent;)t=t.parent;return t.getStorage(...e)}},Xl=class extends Yl{constructor(e){super("EntityStore.Stump",e,()=>{},new Ql(e.group.caching,e.group))}removeLayer(){return this}merge(e,t){return this.parent.merge(e,t)}};function Zl(e,t,n){const r=e[n],i=t[n];return el(r,i)?r:i}function ec(e){return!(!e||!e.supportsResultCaching)}var tc=new ls;function nc(e){const t=e.directives?.find(({name:e})=>"unmask"===e.value);if(!t)return"mask";const n=t.arguments?.find(({name:e})=>"mode"===e.value);return n&&"value"in n.value&&"migrate"===n.value.value?"migrate":"unmask"}function rc(e,t,n){return tc.withValue(!0,()=>{const r=ic(e,t,n,!1);return Object.isFrozen(e),r})}function ic(e,t,n,r,i){const{knownChanged:a}=n,o=function(e,t){if(t.has(e))return t.get(e);const n=Array.isArray(e)?[]:{};return t.set(e,n),n}(e,n.mutableTargets);if(Array.isArray(e)){for(const[i,s]of Array.from(e.entries())){if(null===s){o[i]=null;continue}const e=ic(s,t,n,r,void 0);a.has(e)&&a.add(o),o[i]=e}return a.has(o)?o:e}for(const s of t.selections){let t;if(r&&a.add(o),"Field"===s.kind){const i=Ao(s),l=s.selectionSet;if(t=o[i]||e[i],void 0===t)continue;if(l&&null!==t){const o=ic(e[i],l,n,r,void 0);a.has(o)&&(t=o)}o[i]=t}if("InlineFragment"!==s.kind||s.typeCondition&&!n.cache.fragmentMatches(s,e.__typename)||(t=ic(e,s.selectionSet,n,r,i)),"FragmentSpread"===s.kind){const r=s.name.value,a=n.fragmentMap[r]||(n.fragmentMap[r]=n.cache.lookupFragment(r));Ha(a,41,r);const o=nc(s);"mask"!==o&&(t=ic(e,a.selectionSet,n,"migrate"===o,i))}a.has(t)&&a.add(o)}return"__typename"in e&&!("__typename"in o)&&(o.__typename=e.__typename),Object.keys(o).length!==Object.keys(e).length&&a.add(o),a.has(o)?o:e}var ac={};function oc(e){const t=JSON.stringify(e);return ac[t]||(ac[t]={})}function sc(e){const t=oc(e);return t.keyFieldsFn||(t.keyFieldsFn=(t,n)=>{const r=(e,t)=>n.readField(t,e),i=n.keyObject=cc(e,e=>{let i=pc(n.storeObject,e,r);return void 0===i&&t!==n.storeObject&&Ml.call(t,e[0])&&(i=pc(t,e,dc)),Ha(void 0!==i,113,e.join("."),t),i});return`${n.typename}:${JSON.stringify(i)}`})}function lc(e){const t=oc(e);return t.keyArgsFn||(t.keyArgsFn=(t,{field:n,variables:r,fieldName:i})=>{const a=cc(e,e=>{const i=e[0],a=i.charAt(0);if("@"!==a){if("$"===a){const t=i.slice(1);if(r&&Ml.call(r,t)){const n=e.slice(0);return n[0]=t,pc(r,n)}return}if(t)return pc(t,e)}else if(n&&Zo(n.directives)){const t=i.slice(1),a=n.directives.find(e=>e.name.value===t),o=a&&Za(a,r);return o&&pc(o,e.slice(1))}}),o=JSON.stringify(a);return(t||"{}"!==o)&&(i+=":"+o),i})}function cc(e,t){const n=new jo;return uc(e).reduce((e,r)=>{let i=t(r);if(void 0!==i){for(let e=r.length-1;e>=0;--e)i={[r[e]]:i};e=n.merge(e,i)}return e},{})}function uc(e){const t=oc(e);if(!t.paths){const n=t.paths=[],r=[];e.forEach((t,i)=>{Yo(t)?(uc(t).forEach(e=>n.push(r.concat(e))),r.length=0):(r.push(t),Yo(e[i+1])||(n.push(r.slice(0)),r.length=0))})}return t.paths}function dc(e,t){return e[t]}function pc(e,t,n){return n=n||dc,hc(t.reduce(function e(t,r){return Yo(t)?t.map(t=>e(t,r)):t&&n(t,r)},e))}function hc(e){return Po(e)?Yo(e)?e.map(hc):cc(Object.keys(e).sort(),t=>pc(e,t)):e}var fc=new ls,mc=/* @__PURE__ */new WeakMap;function gc(e){let t=mc.get(e);return t||mc.set(e,t={vars:/* @__PURE__ */new Set,dep:Ps()}),t}function yc(e){gc(e).vars.forEach(t=>t.forgetCache(e))}function bc(e){const t=/* @__PURE__ */new Set,n=/* @__PURE__ */new Set,r=function(a){if(arguments.length>0){if(e!==a){e=a,t.forEach(e=>{gc(e).dep.dirty(r),function(e){e.broadcastWatches&&e.broadcastWatches()}(e)});const i=Array.from(n);n.clear(),i.forEach(t=>t(e))}}else{const e=fc.getValue();e&&(i(e),gc(e).dep(r))}return e};r.onNextChange=e=>(n.add(e),()=>{n.delete(e)});const i=r.attachCache=e=>(t.add(e),gc(e).vars.add(r),r);return r.forgetCache=e=>t.delete(e),r}function vc(e){return void 0!==e.args?e.args:e.field?Za(e.field,e.variables):null}var xc=()=>{},kc=(e,t)=>t.fieldName,wc=(e,t,{mergeObjects:n})=>n(e,t),Sc=(e,t)=>t,Nc=(e,t,{streamFieldInfo:n,existingData:r})=>{if(!e&&!r)return t;const i=[],a=e??r,o=n?.isLastChunk?t.length:Math.max(a.length,t.length);for(let s=0;s<o;s++)i[s]=void 0===t[s]?a[s]:t[s];return i},Tc=class{config;typePolicies={};toBeAdded={};supertypeMap=/* @__PURE__ */new Map;fuzzySubtypes=/* @__PURE__ */new Map;cache;rootIdsByTypename={};rootTypenamesById={};usingPossibleTypes=!1;constructor(e){this.config=e,this.config={dataIdFromObject:Ll,...e},this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}identify(e,t){const n=this,r=t&&(t.typename||t.storeObject?.__typename)||e.__typename;if(r===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];const i=t&&t.storeObject||e,a={...t,typename:r,storeObject:i,readField:t&&t.readField||((...e)=>{const t=Ec(e,i);return n.readField(t,{store:n.cache.data,variables:t.variables})})};let o;const s=r&&this.getTypePolicy(r);let l=s&&s.keyFn||this.config.dataIdFromObject;return tc.withValue(!0,()=>{for(;l;){const t=l({...e,...i},a);if(!Yo(t)){o=t;break}l=sc(t)}}),o=o?String(o):void 0,a.keyObject?[o,a.keyObject]:[o]}addTypePolicies(e){Object.keys(e).forEach(t=>{const{queryType:n,mutationType:r,subscriptionType:i,...a}=e[t];n&&this.setRootTypename("Query",t),r&&this.setRootTypename("Mutation",t),i&&this.setRootTypename("Subscription",t),Ml.call(this.toBeAdded,t)?this.toBeAdded[t].push(a):this.toBeAdded[t]=[a]})}updateTypePolicy(e,t,n){const r=this.getTypePolicy(e),{keyFields:i,fields:a}=t;function o(e,t){e.merge="function"==typeof t?t:!0===t?wc:!1===t?Sc:e.merge}o(r,t.merge),r.keyFn=!1===i?xc:Yo(i)?sc(i):"function"==typeof i?i:r.keyFn,a&&Object.keys(a).forEach(t=>{let r=n[t];r&&r?.typename===e||(r=n[t]={typename:e});const i=a[t];if("function"==typeof i)r.scalar||(r.read=i);else{let{keyArgs:e,read:t,merge:n,scalar:a}=i;a&&(r.scalar=a),r.scalar&&(r.read=t=void 0,r.merge=n=void 0),r.keyFn=!1===e?kc:Yo(e)?lc(e):"function"==typeof e?e:r.keyFn,"function"==typeof t&&(r.read=t),o(r,n)}r.read&&r.merge&&(r.keyFn=r.keyFn||kc)})}setRootTypename(e,t=e){const n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(Ha(!r||r===e,114,e),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)}addPossibleTypes(e){this.usingPossibleTypes=!0,Object.keys(e).forEach(t=>{this.getSupertypeSet(t,!0),e[t].forEach(e=>{this.getSupertypeSet(e,!0).add(t);const n=e.match(jl);n&&n[0]===e||this.fuzzySubtypes.set(e,new RegExp(e))})})}getTypePolicy(e){if(!Ml.call(this.typePolicies,e)){const t=this.typePolicies[e]={};t.fields={};let n=this.supertypeMap.get(e);!n&&this.fuzzySubtypes.size&&(n=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach((t,r)=>{if(t.test(e)){const e=this.supertypeMap.get(r);e&&e.forEach(e=>n.add(e))}})),n&&n.size&&n.forEach(e=>{const{fields:n,...r}=this.getTypePolicy(e);Object.assign(t,r),Object.assign(t.fields,n)})}const t=this.toBeAdded[e];return t&&t.length&&t.splice(0).forEach(t=>{this.updateTypePolicy(e,t,this.typePolicies[e].fields)}),this.typePolicies[e]}getFieldPolicy(e,t){if(e)return this.getTypePolicy(e).fields[t]}getSupertypeSet(e,t){let n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=/* @__PURE__ */new Set),n}fragmentMatches(e,t,n,r){if(!e.typeCondition)return!0;if(!t)return!1;const i=e.typeCondition.name.value;if(t===i)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(i)){const a=this.getSupertypeSet(t,!0),o=[a],s=e=>{const t=this.getSupertypeSet(e,!1);t&&t.size&&o.indexOf(t)<0&&o.push(t)};let l=!(!n||!this.fuzzySubtypes.size),c=!1;for(let u=0;u<o.length;++u){const d=o[u];if(d.has(i))return a.has(i)||a.add(i),!0;d.forEach(s),l&&u===o.length-1&&$l(e.selectionSet,n,r)&&(l=!1,c=!0,this.fuzzySubtypes.forEach((e,n)=>{const r=t.match(e);r&&r[0]===t&&s(n)}))}}return!1}hasKeyArgs(e,t){const n=this.getFieldPolicy(e,t);return!(!n||!n.keyFn)}getStoreFieldName(e){const{typename:t,fieldName:n}=e,r=this.getFieldPolicy(t,n);let i,a=r&&r.keyFn;if(a&&t){const r={typename:t,fieldName:n,field:e.field||null,variables:e.variables},o=vc(e);for(;a;){const e=a(o,r);if(!Yo(e)){i=e||n;break}a=lc(e)}}return void 0===i&&(i=e.field?function(e,t){let n=null;e.directives&&(n={},e.directives.forEach(e=>{n[e.name.value]={},e.arguments&&e.arguments.forEach(({name:r,value:i})=>Xa(n[e.name.value],r,i,t))}));let r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach(({name:e,value:n})=>Xa(r,e,n,t))),Go(e.name.value,r,n)}(e.field,e.variables):Go(n,vc(e))),!1===i?n:n===Fl(i)?i:n+":"+i}getScalarTypeForField(e,t){return this.getFieldPolicy(e,t)?.scalar}readField(e,t){const n=e.from;if(!n)return;if(!e.field&&!e.fieldName)return;if(void 0===e.typename){const r=t.store.getFieldValue(n,"__typename");r&&(e.typename=r)}const r=this.getStoreFieldName(e),i=Fl(r),a=t.store.getFieldValue(n,r),o=this.getFieldPolicy(e.typename,i),s=o&&o.read;if(s){const i=Cc(this,n,e,t,t.store.getStorage(kl(n)?n.__ref:n,r));return fc.withValue(this.cache,s,[a,i])}return a}getReadFunction(e,t){const n=this.getFieldPolicy(e,t);return n&&n.read}getMergeFunction(e,t,n){let r=this.getFieldPolicy(e,t),i=r&&r.merge;return!i&&n&&(r=this.getTypePolicy(n),i=r&&r.merge),i}runMergeFunction(e,t,{field:n,typename:r,merge:i,path:a},o,s){const l=e;if(i===wc)return Ic(o.store)(e,t);if(i===Sc)return t;o.overwrite&&(e=void 0);const c=o.extensions?.[pl]?.deref()?.peekArray(a);if(c){const{current:e,previous:n}=c;if(n&&el(n.incoming,t)&&el(n.streamFieldInfo,e))return n.result}const u=i(e,t,function(e,t,n,r,i,a){const o={...Cc(e,void 0,n,r,i),extensions:r.extensions,existingData:a},s=r.extensions;if(s&&pl in s){const{[pl]:e,...t}=s,r=e?.deref()?.peekArray(n.path);r&&(o.streamFieldInfo=r.current),o.extensions=0===Object.keys(t).length?void 0:t}return o}(this,0,{typename:r,fieldName:n.name.value,field:n,variables:o.variables,path:a},o,s||{},l));return c&&(c.previous={incoming:t,streamFieldInfo:c.current,result:u}),u}};function Cc(e,t,n,r,i){const a=e.getStoreFieldName(n),o=Fl(a),s=n.variables||r.variables,{toReference:l,canRead:c}=r.store;return{args:vc(n),field:n.field||null,fieldName:o,storeFieldName:a,variables:s,isReference:kl,toReference:l,storage:i,cache:e.cache,canRead:c,readField:(...n)=>e.readField(Ec(n,t,s),r),mergeObjects:Ic(r.store)}}function Ec(e,t,n){const{0:r,1:i,length:a}=e;let o;return"string"==typeof r?o={fieldName:r,from:a>1?i:t}:(o={...r},Ml.call(o,"from")||(o.from=t)),void 0===o.variables&&(o.variables=n),o}function Ic(e){return function(t,n){if(Yo(t)||Yo(n))throw Ga(117);if(Po(t)&&Po(n)){const r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(kl(t)&&ql(n))return e.merge(t.__ref,n),t;if(ql(t)&&kl(n))return e.merge(t,n.__ref),n;if(ql(t)&&ql(n))return{...t,...n}}return n}}function zc(e){return[e.selectionSet,e.objectOrReference,e.context]}var Oc=class{executeSelectionSet;executeSubSelectedArray;prunePartialStreamArray;prunePartialBoundaries;config;knownResults=/* @__PURE__ */new WeakMap;keyMaker=new so;constructor(e){this.config=e,this.executeSelectionSet=Rs(e=>{const t=zc(e);return this.executeSelectionSet.peek(...t)||(Kl(e.context.store,e.enclosingRef.__ref),this.execSelectionSetImpl(e))},{max:to["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:zc,makeCacheKey(e,t,n){if(ec(n.store))return n.store.makeCacheKey(e,kl(t)?t.__ref:t,n.varString)}}),this.executeSubSelectedArray=Rs(e=>(Kl(e.context.store,e.enclosingRef.__ref),this.execSubSelectedArrayImpl(e)),{max:to["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey({field:e,array:t,context:n}){if(ec(n.store))return n.store.makeCacheKey(e,t,n.varString)}}),this.prunePartialBoundaries=Rs(e=>this.prunePartialBoundariesImpl(e),{max:to["inMemoryCache.prunePartialBoundaries"]||2e4,makeCacheKey:({boundaries:e,context:t,selectionSet:n})=>{if(ec(t.store))return this.keyMaker.lookup(n,e,t.streamInfo,t.deferInfo)}}),this.prunePartialStreamArray=Rs(e=>{const{field:t,context:n,path:r}=e;return ts(t,n.variables)&&n.streamInfo?.lookupArray(r).state.depend(),this.prunePartialStreamArrayImpl(e)},{max:to["inMemoryCache.prunePartialStreamArray"]||2e4,makeCacheKey:({field:e,context:t,boundaries:n})=>{if(ec(t.store))return this.keyMaker.lookup(e,n,t.streamInfo,t.deferInfo)}})}diffQueryAgainstStore({store:e,query:t,rootId:n="ROOT_QUERY",variables:r,returnPartialData:i=!0,...a}){const o=Object.hasOwn(a,fl),s=this.config.cache.policies;r=Do(Fo(function(e){const t=Io(e);return Ha(t&&"query"===t.operation,15),t}(t)),r);const l=js(n),c={store:e,query:t,policies:s,variables:r,varString:Vo(r),...Vl(t,this.config.fragments),...a[fl]};let u=this.executeSelectionSet({selectionSet:Eo(t).selectionSet,objectOrReference:l,enclosingRef:l,context:c});if(o&&function({dataState:e},t){return"deferPartial"===e||"streamPartial"===e||("complete"===e||"streaming"===e)&&!(!t.streamInfo&&!t.deferInfo)}(u,c)){const e=this.prunePartialBoundaries({selectionSet:Eo(t).selectionSet,data:u.result,boundaries:u.partialBoundaries,context:c,path:[]});u.result!==e.result&&i||(u={result:e.result,partialBoundaries:u.partialBoundaries,dataState:e.dataState})}let{result:d,dataState:p,missing:h}=u;const f=!(!h||"streaming"===p&&o);let m;"streaming"===p&&0===Object.keys(d).length&&(p="empty"),("deferPartial"===p||"streamPartial"===p||"streaming"===p&&!o)&&(p="partial"),"partial"!==p||i||(p="empty");const g="complete"===p,y={result:g||"streaming"===p||i&&Object.keys(d).length?d:null,complete:g,get missing(){return f&&(m||=new Pl(function(e){try{JSON.stringify(e,(e,t)=>{if("string"==typeof t)throw t;return t})}catch(d){return d}}(h),h,t,r)),m}};return o&&(y.dataState=p),y}isFresh(e,t,n,r){if(ec(r.store)&&this.knownResults.get(e)===n){const i=this.executeSelectionSet.peek(n,t,r);if(i&&e===i.result)return!0}return!1}execSelectionSetImpl({selectionSet:e,objectOrReference:t,enclosingRef:n,context:r}){if(kl(t)&&!r.policies.rootTypenamesById[t.__ref]&&!r.store.has(t.__ref))return{result:{},dataState:"empty",missing:`Dangling reference to missing ${t.__ref} object`,partialBoundaries:new Ac};const{variables:i,policies:a,store:o}=r,s=o.getFieldValue(t,"__typename"),l=[];let c,u;const d=new jo,p=new Ac;function h(e,t){return e.missing&&(u=d.merge(u,{[t]:e.missing})),e}"string"!=typeof s||a.rootIdsByTypename[s]||l.push({__typename:s}),new Set(e.selections).forEach(e=>{if(Ws(e,i))if(zo(e)){let i=a.readField({fieldName:e.name.value,field:e,variables:r.variables,from:t},r);const o=Ao(e);if(void 0===i){if(!Sl.added(e)){const n=kl(t)?t.__ref:t?a.identify(t)[0]:void 0;u=d.merge(u,{[o]:`Can't find field '${e.name.value}' on ${n?`${n} object`:`object ${JSON.stringify(t||{},null,2)}`}`}),c=Dc(c,"empty")}}else if(Yo(i))if(i.length>0){const t=h(this.executeSubSelectedArray({field:e,array:i,enclosingRef:n,context:r}),o);i=t.result,c=Dc(c,t.dataState),p.set(o,t.partialBoundaries)}else c=Dc(c,"complete");else if(e.selectionSet){if(null!=i){const t=h(this.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:i,enclosingRef:kl(i)?i:n,context:r}),o);i=t.result,p.set(o,t.partialBoundaries),c=Dc(c,"empty"===t.dataState?"partial":t.dataState)}}else Sl.added(e)||(c=Dc(c,"complete"));void 0!==i&&l.push({[o]:i})}else{const i=Co(e,r.lookupFragment);if(!i&&"FragmentSpread"===e.kind)throw Ga(120,e.name.value);if(i&&a.fragmentMatches(i,s)){const a=Xo(e,r.variables),o=this.execSelectionSetImpl({selectionSet:i.selectionSet,objectOrReference:t,enclosingRef:n,context:r}),{result:s,dataState:h}=o;p.merge(o.partialBoundaries),void 0!==s&&l.push(s),o.missing&&(u=d.merge(u,o.missing)),!a||"partial"!==h&&"empty"!==h||p.add(e),c=Dc(c,a?"empty"===h?"streaming":"partial"===h?"deferPartial":h:h)}}}),c||="complete";const f={result:Fs(l),missing:u,dataState:c,partialBoundaries:p};return f.result&&this.knownResults.set(f.result,e),f}execSubSelectedArrayImpl({field:e,array:t,enclosingRef:n,context:r}){let i,a="complete",o=new jo;const s=new Ac,l=ts(e,r.variables);return e.selectionSet&&(t=t.filter(e=>void 0===e||r.store.canRead(e))),t=t.map((t,c)=>{if(null===t)return null;let u;if(Yo(t)?u=this.executeSubSelectedArray({field:e,array:t,enclosingRef:n,context:r}):e.selectionSet&&(u=this.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:t,enclosingRef:kl(t)?t:n,context:r})),u){const{dataState:t}=u;return s.set(c,"partial"===t?u.partialBoundaries.clone().add(e):u.partialBoundaries),a=Dc(a,l&&"partial"===t?"streamPartial":t),function(e,t){return e.missing&&(i=o.merge(i,{[t]:e.missing})),e.result}(u,c)}return t}),{result:t,dataState:a,missing:i,partialBoundaries:s}}prunePartialBoundariesImpl({boundaries:e,context:t,data:n,path:r,selectionSet:i}){const{variables:a,lookupFragment:o,policies:s}=t;if(null==n||!e)return{result:n,dataState:"complete"};const l=new jo;let c=!1,u="complete";const d={};Object.hasOwn(n,"__typename")&&(d.__typename=n.__typename);const p=new Set(i.selections);return p.forEach(i=>{if(!Ws(i,a))return;if(zo(i)){const a=Ao(i);if(!Object.hasOwn(n,a))return;const o=n[a];if(Array.isArray(o)){const n=this.prunePartialStreamArray({field:i,array:o,boundaries:e.getChild(a),context:t,path:r.concat(a)});c||=n.result!==o,d[a]=n.result,u=Dc(u,n.dataState)}else if(i.selectionSet){const n=this.prunePartialBoundaries({data:o,selectionSet:i.selectionSet,boundaries:e.getChild(a),context:t,path:r.concat(a)});c||=n.result!==o,u=Dc(u,n.dataState),d[a]=Object.hasOwn(d,a)?l.merge(d[a],n.result):n.result}else d[a]=o;return}const h=Co(i,o);let f=!1;if(t.deferInfo&&Xo(i,a)){const e=i.directives?.find(e=>"defer"===e.name.value),n=e&&function(e){const t=e.arguments?.find(e=>"label"===e.name.value);if(t&&"StringValue"===t.value.kind)return t.value.kind===hn?t.value.value:void 0}(e);f=!!t.deferInfo.peekArray(r.concat(n||[]))}h&&s.fragmentMatches(h,n.__typename)&&(e.has(i)||f?u=Dc(u,"streaming"):h.selectionSet.selections.forEach(p.add,p))}),Object.keys(d).length!==Object.keys(n).length?c=!0:c&&e.hasSelections()&&(c=!el(d,n)),{result:c?d:n,dataState:u}}prunePartialStreamArrayImpl({field:e,array:t,boundaries:n,context:r,path:i}){if(!n)return{result:t,dataState:"complete"};let a=!1,o="complete",s=[];const l=r.streamInfo?.peekArray(i)?.state,c=Math.min(t.length,l?.truncate?l.streamPosition:Number.MAX_SAFE_INTEGER);for(let u=0;u<c;u++){const c=t[u];let d={result:c,dataState:"complete"};if(n.getChild(u)?.has(e)){l?(l.truncate=!0,s=s.slice(0,l.streamPosition)):(s=[],o="complete");break}Array.isArray(c)?d=this.prunePartialStreamArray({field:e,array:c,boundaries:n.getChild(u),context:r,path:i.concat(u)}):e.selectionSet&&(d=this.prunePartialBoundaries({data:c,selectionSet:e.selectionSet,boundaries:n.getChild(u),context:r,path:i.concat(u)})),s.push(d.result),a||=d.result!==c,o=Dc(o,d.dataState)}return a||=s.length!==t.length,{result:a?s:t,dataState:o}}},Ac=class e{selections=/* @__PURE__ */new Set;children=/* @__PURE__ */new Map;add(e){return this.selections.add(e),this}has(e){return this.selections.has(e)}hasSelections(){return this.selections.size>0}getChild(e){return this.children.get(e)}clone(){return(new e).merge(this)}set(e,t){const n=this.getChild(e);this.children.set(e,n?n.clone().merge(t):t)}merge(e){return e.selections.forEach(e=>this.add(e)),e.children.forEach((e,t)=>this.set(t,e)),this}},_c={empty:{complete:"partial",deferPartial:"partial",streaming:"partial",streamPartial:"partial"},deferPartial:{empty:"partial"},streamPartial:{deferPartial:"deferPartial",empty:"partial"},streaming:{deferPartial:"deferPartial",empty:"partial",streamPartial:"streamPartial"},complete:{deferPartial:"deferPartial",streaming:"streaming",streamPartial:"streamPartial",empty:"partial"},partial:{}};function Dc(e,t){return"partial"===t?"partial":e&&e!==t?_c[e][t]||e:t}function Pc(e,t,n){const r=`${t}${n}`;let i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:{...e,clientOnly:t,deferred:n}),i}var Mc=class{cache;reader;fragments;constructor(e,t,n){this.cache=e,this.reader=t,this.fragments=n}writeToStore(e,{query:t,result:n,dataId:r,variables:i,overwrite:a,extensions:o}){const s=Io(t),l=new jo;i={...Fo(s),...i};const c={store:e,written:{},merge:(e,t)=>l.merge(e,t),variables:i,varString:Vo(i),...Vl(t,this.fragments),overwrite:!!a,incomingById:/* @__PURE__ */new Map,clientOnly:!1,deferred:!1,flavors:/* @__PURE__ */new Map,extensions:o},u=this.processSelectionSet({result:n||{},dataId:r,selectionSet:s.selectionSet,mergeTree:{map:/* @__PURE__ */new Map},context:c,path:[]});if(!kl(u))throw Ga(122,n);return c.incomingById.forEach(({storeObject:t,mergeTree:n,fieldNodeSet:r},i)=>{const a=js(i);if(n&&n.map.size){const e=this.applyMerges(n,a,t,c);if(kl(e))return;t=e}e.merge(i,t)}),e.retain(u.__ref),u}processSelectionSet({dataId:e,result:t,selectionSet:n,context:r,mergeTree:i,path:a}){const{policies:o}=this.cache;let s={};const l=e&&o.rootTypenamesById[e]||qc(t,n,r.fragmentMap)||e&&r.store.get(e,"__typename");"string"==typeof l&&(s.__typename=l);const c=(...e)=>{const t=Ec(e,s,r.variables);if(kl(t.from)){const e=r.incomingById.get(t.from.__ref);if(e){const n=o.readField({...t,from:e.storeObject},r);if(void 0!==n)return n}}return o.readField(t,r)},u=/* @__PURE__ */new Set;this.flattenFields(n,t,r,l).forEach((e,n)=>{const r=t[Ao(n)],d=[...a,n.name.value];if(u.add(n),void 0!==r){const t=o.getStoreFieldName({typename:l,fieldName:n.name.value,field:n,variables:e.variables}),a=Rc(i,t);let u,p=this.processFieldValue(r,n,n.selectionSet?Pc(e,!1,!1):e,a,d);n.selectionSet&&(kl(p)||ql(p))&&(u=c("__typename",p));const h=o.getMergeFunction(l,n.name.value,u);h?a.info={field:n,typename:l,merge:h,path:d}:e.extensions?.[pl]&&Array.isArray(p)&&ts(n,e.variables)?a.info={field:n,typename:l,merge:Nc,path:d}:$c(i,t),s=e.merge(s,{[t]:p})}});try{const[i,a]=o.identify(t,{typename:l,selectionSet:n,fragmentMap:r.fragmentMap,storeObject:s,readField:c});e=e||i,a&&(s=r.merge(s,a))}catch(AL){if(!e)throw AL}if("string"==typeof e){const a=js(e),o=r.written[e]||(r.written[e]=[]);if(o.indexOf(n)>=0)return a;if(o.push(n),this.reader&&this.reader.isFresh(t,a,n,r))return a;const l=r.incomingById.get(e);return l?(l.storeObject=r.merge(l.storeObject,s),l.mergeTree=jc(l.mergeTree,i),u.forEach(e=>l.fieldNodeSet.add(e))):r.incomingById.set(e,{storeObject:s,mergeTree:Fc(i)?void 0:i,fieldNodeSet:u}),a}return s}processFieldValue(e,t,n,r,i){return t.selectionSet&&null!==e?Yo(e)?e.map((e,a)=>{const o=this.processFieldValue(e,t,n,Rc(r,a),[...i,a]);return $c(r,a),o}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r,path:i}):e}flattenFields(e,t,n,r=qc(t,e,n.fragmentMap)){const i=/* @__PURE__ */new Map,{policies:a}=this.cache,o=new so(!1);return function e(s,l){const c=o.lookup(s,l.clientOnly,l.deferred);c.visited||(c.visited=!0,s.selections.forEach(o=>{if(!Ws(o,n.variables))return;let{clientOnly:s,deferred:c}=l;if(s&&c||!Zo(o.directives)||o.directives.forEach(e=>{const t=e.name.value;if("client"===t&&(s=!0),"defer"===t){const t=Za(e,n.variables);t&&!1===t.if||(c=!0)}}),zo(o)){const e=i.get(o);e&&(s=s&&e.clientOnly,c=c&&e.deferred),i.set(o,Pc(n,s,c))}else{const i=Co(o,n.lookupFragment);if(!i&&"FragmentSpread"===o.kind)throw Ga(124,o.name.value);i&&a.fragmentMatches(i,r,t,n.variables)&&e(i.selectionSet,Pc(n,s,c))}}))}(e,n),i}applyMerges(e,t,n,r,i){if(e.map.size&&!kl(n)){const a=Yo(n)||!kl(t)&&!ql(t)?void 0:t,o=n;let s;a&&!i&&(i=[kl(a)?a.__ref:a]);const l=(e,t)=>Yo(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t));e.map.forEach((e,t)=>{const n=l(a,t),c=l(o,t);if(void 0===c)return;i&&i.push(t);const u=this.applyMerges(e,n,c,r,i);u!==c&&(s=s||/* @__PURE__ */new Map,s.set(t,u)),i&&Ha(i.pop()===t)}),s&&(n=Yo(o)?o.slice(0):{...o},s.forEach((e,t)=>{n[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&r.store.getStorage(...i)):n}},Lc=[];function Rc({map:e},t){return e.has(t)||e.set(t,Lc.pop()||{map:/* @__PURE__ */new Map}),e.get(t)}function jc(e,t){if(e===t||!t||Fc(t))return e;if(!e||Fc(e))return t;const n=e.info&&t.info?{...e.info,...t.info}:e.info||t.info,r=e.map.size&&t.map.size,i={info:n,map:r?/* @__PURE__ */new Map:e.map.size?e.map:t.map};if(r){const n=new Set(t.map.keys());e.map.forEach((e,r)=>{i.map.set(r,jc(e,t.map.get(r))),n.delete(r)}),n.forEach(n=>{i.map.set(n,jc(t.map.get(n),e.map.get(n)))})}return i}function Fc(e){return!e||!(e.info||e.map.size)}function $c({map:e},t){const n=e.get(t);n&&Fc(n)&&(Lc.push(n),e.delete(t))}function qc(e,t,n){let r;for(const i of t.selections)if(zo(i)){if("__typename"===i.name.value)return e[Ao(i)]}else r?r.push(i):r=[i];if("string"==typeof e.__typename)return e.__typename;if(r)for(const i of r){const t=qc(e,Co(i,n).selectionSet,n);if("string"==typeof t)return t}}var Vc=class extends zl{data;optimisticData;config;watches=/* @__PURE__ */new Set;storeReader;storeWriter;addTypenameTransform=new vl(Sl);maybeBroadcastWatch;assumeImmutableResults=!0;policies;makeVar=bc;constructor(...e){var t;super(),this.config=(t=e[0]??{},Do(Rl,t)),this.policies=new Tc({cache:this,dataIdFromObject:this.config.dataIdFromObject,possibleTypes:this.config.possibleTypes,typePolicies:this.config.typePolicies}),this.init()}init(){const e=this.data=new Gl.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()}resetResultCache(){const{fragments:e}=this.config;this.addTypenameTransform.resetCache(),e?.resetCaches(),this.storeWriter=new Mc(this,this.storeReader=new Oc({cache:this,fragments:e}),e),this.maybeBroadcastWatch=Rs((e,t)=>this.broadcastWatch(e,t),{max:to["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:e=>{const t=e.optimistic?this.optimisticData:this.data;if(ec(t)){const{optimistic:n,id:r,variables:i}=e;return t.makeCacheKey(e.query,e.callback,Vo({optimistic:n,id:r,variables:i}))}}}),
3
3
  /* @__PURE__ */new Set([this.data.group,this.optimisticData.group]).forEach(e=>e.resetCaching())}getRootTypename(e){return this.policies.rootTypenamesById[`ROOT_${e.toUpperCase()}`]}getScalar(e){return this.config.scalars?.[e]}getScalarTypeForField(e,t){return this.policies.getScalarTypeForField(e,t)}configuresScalars(){return!!this.config.scalars}serializeVariables(e,t){if(!t||0===Object.keys(t).length||!this.config.scalars&&!this.config.inputObjects)return t;const n=Io(e)?.variableDefinitions?.reduce((e,t)=>(e[t.variable.name.value]=Bl(t.type),e),{});return n&&0!==Object.keys(n).length?this.serializeVariablesValue(t,n):t}serializeVariablesValue(e,t,n,r){if(null==e)return e;if(n){const i=Oo(n);if(i&&Array.isArray(e))return this.serializeInputArray(e,t,i[1],r);const a=this.getScalar(_o(n));if(a)return a.coerceToSerialized(e)}return Array.isArray(e)?this.serializeInputArray(e,t,void 0,r):es(e)?this.serializeInputObject(e,t,r):e}serializeInputArray(e,t,n,r){let i=!1;const a=e.map(e=>{const a=this.serializeVariablesValue(e,t,n,r);return i||=a!==e,a});return i?a:e}serializeInputObject(e,t,n){let r=!1;const i=Object.entries(e).map(([e,i])=>{const a=t[e],o=n?`${n}.${e}`:e;if(!a)return[e,i];const s=this.config.inputObjects?.[_o(a)];if(s){const t=this.serializeVariablesValue(i,s.fields,void 0,o);return r||=t!==i,[e,t]}const l=this.serializeVariablesValue(i,t,a,o);return r||=l!==i,[e,l]});return r?Object.fromEntries(i):e}restore(e){return this.init(),e&&this.data.replace(e),this}extract(e=!1){return(e?this.optimisticData:this.data).extract()}read(e){const{query:t,variables:n,returnPartialData:r=!1}=e;return this.storeReader.diffQueryAgainstStore({...e,variables:this.serializeVariables(t,n),store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:r}).result}write(e){const{query:t,variables:n}=e;try{return++this.txCount,this.storeWriter.writeToStore(this.data,{...e,variables:this.serializeVariables(t,n)})}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}}modify(e){if(Ml.call(e,"id")&&!e.id)return!1;const t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields,!1)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}}diff(e){const{variables:t}=e;return this.storeReader.diffQueryAgainstStore({...e,variables:this.serializeVariables(e.query,t),store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config})}watch(e){var t;return this.watches.size||gc(t=this).vars.forEach(e=>e.attachCache(t)),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),()=>{this.watches.delete(e)&&!this.watches.size&&yc(this),this.maybeBroadcastWatch.forget(e)}}gc(e){Vo.reset(),xl.reset();const t=this.optimisticData.gc();return e&&!this.txCount&&e.resetResultCache&&this.resetResultCache(),t}retain(e,t){return(t?this.optimisticData:this.data).retain(e)}release(e,t){return(t?this.optimisticData:this.data).release(e)}identify(e){if(kl(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(AL){}}evict(e){if(!e.id){if(Ml.call(e,"id"))return!1;e={...e,id:"ROOT_QUERY"}}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}}reset(e){return this.init(),Vo.reset(),e&&e.discardWatches?(this.watches.forEach(e=>this.maybeBroadcastWatch.forget(e)),this.watches.clear(),yc(this)):this.broadcastWatches(),Promise.resolve()}removeOptimistic(e){const t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())}txCount=0;batch(e){const{update:t,optimistic:n=!0,removeOptimistic:r,onWatchUpdated:i}=e;let a;const o=e=>{const{data:n,optimisticData:r}=this;++this.txCount,e&&(this.data=this.optimisticData=e);try{return a=t(this)}finally{--this.txCount,this.data=n,this.optimisticData=r}},s=/* @__PURE__ */new Set;return i&&!this.txCount&&this.broadcastWatches({...e,onWatchUpdated:e=>(s.add(e),!1)}),"string"==typeof n?this.optimisticData=this.optimisticData.addLayer(n,o):!1===n?o(this.data):o(),"string"==typeof r&&(this.optimisticData=this.optimisticData.removeLayer(r)),i&&s.size?(this.broadcastWatches({...e,onWatchUpdated(e,t){const n=i.call(this,e,t);return!1!==n&&s.delete(e),n}}),s.size&&s.forEach(e=>this.maybeBroadcastWatch.dirty(e))):this.broadcastWatches(e),a}performTransaction(e,t){return this.batch({update:e,optimistic:t||null!==t})}transformDocument(e){return this.addTypenameTransform.transformDocument(this.addFragmentsToDocument(e))}fragmentMatches(e,t){return this.policies.fragmentMatches(e,t)}lookupFragment(e){return this.config.fragments?.lookup(e)||null}resolvesClientField(e,t){return!!this.policies.getReadFunction(e,t)}broadcastWatches(e){if(!this.txCount){const t=this.onAfterBroadcast,n=/* @__PURE__ */new Set;this.onAfterBroadcast=e=>{n.add(e)};try{this.watches.forEach(t=>this.maybeBroadcastWatch(t,e)),n.forEach(e=>e())}finally{this.onAfterBroadcast=t}}}addFragmentsToDocument(e){const{fragments:t}=this.config;return t?t.transform(e):e}broadcastWatch(e,t){const{lastDiff:n}=e,r=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,r,n))||n&&el(n.result,r.result)||e.callback(e.lastDiff=r,n)}};function Bc(e,t){return"object"==typeof e&&null!==e&&e[Symbol.for("apollo.error")]===t}function Uc(e){Object.defineProperty(e,Symbol.for("apollo.error"),{value:e.name,enumerable:!1,writable:!1,configurable:!1})}function Hc(e){return e.map(e=>e.message||"Error message not found.").join("\n")}var Wc=class e extends Error{static is(e){return Bc(e,"CombinedProtocolErrors")}static formatMessage=Hc;errors;constructor(t){super(e.formatMessage(t,{defaultFormatMessage:Hc})),this.name="CombinedProtocolErrors",this.errors=t,Uc(this),Object.setPrototypeOf(this,e.prototype)}},Gc=class e extends Error{static is(e){return Bc(e,"UnconventionalError")}constructor(t){super("An error of unexpected shape occurred.",{cause:t}),this.name="UnconventionalError",Uc(this),Object.setPrototypeOf(this,e.prototype)}};function Qc(e){return e.filter(e=>e).map(e=>e.message||"Error message not found.").join("\n")}var Jc=class e extends Error{static is(e){return Bc(e,"CombinedGraphQLErrors")}static formatMessage=Qc;errors;data;extensions;constructor(t,n=t.errors||[]){super(e.formatMessage(n,{result:t,defaultFormatMessage:Qc})),this.errors=n,this.data=t.data,this.extensions=t.extensions,this.name="CombinedGraphQLErrors",Uc(this),Object.setPrototypeOf(this,e.prototype)}},Kc=/* @__PURE__ */new WeakSet,Yc=class e extends Error{static is(e){return Bc(e,"ServerError")}response;statusCode;bodyText;constructor(t,n){super(t),this.name="ServerError",this.response=n.response,this.statusCode=n.response.status,this.bodyText=n.bodyText,Uc(this),Object.setPrototypeOf(this,e.prototype)}},Xc=class e extends Error{static is(e){return Bc(e,"ServerParseError")}response;statusCode;bodyText;constructor(t,n){super(t instanceof Error?t.message:"Could not parse server response",{cause:t}),this.name="ServerParseError",this.response=n.response,this.statusCode=n.response.status,this.bodyText=n.bodyText,Uc(this),Object.setPrototypeOf(this,e.prototype)}},Zc=Symbol();function eu(e){return"extensions"in e&&Wc.is(e.extensions[Zc])}function tu(e){return function(e){return null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name&&("string"==typeof e.stack||void 0===e.stack)}(e)?e:"string"==typeof e?new Error(e,{cause:e}):new Gc(e)}var nu,ru=/* @__PURE__ */new WeakMap;!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error",e[e.streaming=9]="streaming"}(nu||(nu={}));var{assign:iu,hasOwnProperty:au}=Object,ou={loading:!0,networkStatus:nu.loading,data:void 0,dataState:"empty",partial:!0},su={loading:!1,networkStatus:nu.ready,data:void 0,dataState:"empty",partial:!0},lu=/* @__PURE__ */new WeakMap;function cu(e,t){const n=e[t];"function"==typeof n&&(e[t]=function(){return lu.set(e,(lu.get(e)+1)%1e15),n.apply(this,arguments)})}var uu=class{options;queryName;variablesUnknown=!1;didWarnOnFeud=!1;lastMissing;get query(){return this.lastQuery}get variables(){return this.options.variables}unsubscribeFromCache;input;subject;isTornDown;queryManager;subscriptions=/* @__PURE__ */new Set;waitForNetworkResult;lastQuery;linkSubscription;pollingInfo;get networkStatus(){return this.subject.getValue().result.networkStatus}get cache(){return this.queryManager.cache}constructor({queryManager:e,options:t,transformedQuery:n=e.transform(t.query)}){this.queryManager=e;const{cache:r}=e;lu.has(r)||(lu.set(r,0),cu(r,"evict"),cu(r,"modify"),cu(r,"reset")),this.waitForNetworkResult="network-only"===t.fetchPolicy,this.isTornDown=!1,this.subscribeToMore=this.subscribeToMore.bind(this),this.maskResult=this.maskResult.bind(this);const{watchQuery:{fetchPolicy:i="cache-first"}={}}=e.defaultOptions,{fetchPolicy:a=i,initialFetchPolicy:o=("standby"===a?i:a)}=t;t[hl]&&(Ha("standby"===a,84),this.variablesUnknown=!0),this.lastQuery=n,this.options={...t,initialFetchPolicy:o,fetchPolicy:a,variables:this.getVariablesWithDefaults(t.variables)},this.initializeObservablesQueue(),this["@@observable"]=()=>this,Symbol.observable&&(this[Symbol.observable]=()=>this);const s=Io(this.query);this.queryName=s&&s.name&&s.name.value}initializeObservablesQueue(){this.subject=new Ji({query:this.query,variables:this.variables,result:ou,meta:{}});const e=this.subject.pipe(Ma({subscribe:()=>{this.subject.observed||(this.reobserve(),setTimeout(()=>this.updatePolling()))},unsubscribe:()=>{this.subject.observed||this.tearDownQuery()}}),Js(({query:e,variables:t,result:n,meta:r},i)=>{const{shouldEmit:a}=r;if(n===ou&&(i.previous=void 0,i.previousVariables=void 0),"standby"===this.options.fetchPolicy||2===a)return;if(1===a)return l();const{previous:o,previousVariables:s}=i;if(o){const r=this.queryManager.getDocumentInfo(e),i=this.queryManager.dataMasking,a=i?r.nonReactiveQuery:e;if((i||r.hasNonreactiveDirective?ol(a,o,n,t):el(o,n))&&el(s,t))return}if(3!==a||this.options.notifyOnNetworkStatusChange&&!el(o,n))return l();function l(){return i.previous=n,i.previousVariables=t,n}},()=>({})));this.pipe=e.pipe.bind(e),this.subscribe=e.subscribe.bind(e),this.input=new Gi,this.input.complete=()=>{},this.input.pipe(this.operator).subscribe(this.subject)}subscribe;pipe;[Symbol.observable];"@@observable";getCacheDiff({optimistic:e=!0}={}){return Gs(this.cache.diff({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:e,[fl]:void 0}))}getInitialResult(e){let t=e||this.options.fetchPolicy;!this.queryManager.prioritizeCacheValues||"network-only"!==t&&"cache-and-network"!==t||(t="cache-first");const n=()=>{const e=this.getCacheDiff();let{dataState:t}=e;const n=this.options.returnPartialData||e.complete?e.result??void 0:void 0;return void 0===n&&(t="empty"),this.maskResult({data:n,dataState:t,loading:!e.complete,networkStatus:e.complete?nu.ready:nu.loading,partial:!e.complete})};switch(t){case"cache-only":return{...n(),loading:!1,networkStatus:nu.ready};case"cache-first":return n();case"cache-and-network":return{...n(),loading:!0,networkStatus:nu.loading};case"standby":return su;default:return ou}}resubscribeCache(){const{variables:e,fetchPolicy:t}=this.options,n=this.query,r="standby"===t||"no-cache"===t||this.waitForNetworkResult,i=!du({query:n,variables:e},this.unsubscribeFromCache)&&!this.waitForNetworkResult;if((r||i)&&this.unsubscribeFromCache?.(),r||!i)return;const a={query:n,variables:e,optimistic:!0,watcher:this,callback:e=>{const t=this.queryManager.getDocumentInfo(n);if((t.hasClientExports||t.hasForcedResolvers)&&(a.lastDiff=void 0),a.lastOwnDiff===e)return;const{result:r}=this.subject.getValue();(e.complete||!r.error&&r!==ou&&r!==su)&&(el(r.data,e.result)||this.scheduleNotify())}},o=this.cache.watch(a);this.unsubscribeFromCache=Object.assign(()=>{this.unsubscribeFromCache=void 0,o()},{query:n,variables:e})}stableLastResult;getCurrentResult(){const{result:e}=this.subject.getValue();let t=e.networkStatus===nu.error||this.hasObservers()||"no-cache"===this.options.fetchPolicy?e:this.getInitialResult();return t===ou&&(t=this.getInitialResult()),el(this.stableLastResult,t)||(this.stableLastResult=t),this.stableLastResult}refetch(e){const{fetchPolicy:t}=this.options,n={pollInterval:0};return n.fetchPolicy="no-cache"===t?"no-cache":"network-only",e&&!el(this.variables,e)&&(n.variables=this.options.variables=this.getVariablesWithDefaults({...this.variables,...e})),this._reobserve(n,{newNetworkStatus:nu.refetch})}fetchMore({query:e,variables:t,context:n,errorPolicy:r,updateQuery:i}){Ha("cache-only"!==this.options.fetchPolicy,86,no(this.query,"(anonymous)"));const a={...Do(this.options,{errorPolicy:"none"},{query:e,context:n,errorPolicy:r}),variables:e?t:{...this.variables,...t},fetchPolicy:"no-cache",notifyOnNetworkStatusChange:this.options.notifyOnNetworkStatusChange};a.query=this.transformDocument(a.query),this.lastQuery=e?this.transformDocument(this.options.query):a.query;let o=!1;const s="no-cache"!==this.options.fetchPolicy;s||Ha(i,87);const{finalize:l,pushNotification:c}=this.pushOperation(nu.fetchMore);c({source:"newNetworkStatus",kind:"N",value:{}},{shouldEmit:3});const{promise:u,operator:d}=pu(),{observable:p}=this.queryManager.fetchObservableWithInfo(a,{networkStatus:nu.fetchMore,exposeExtensions:!0}),h=p.pipe(d,za(e=>"N"===e.kind&&"network"===e.source)).subscribe({next:e=>{o=!1;const t=e.value,n=t[dl];if(Tl(e.value.networkStatus)&&l(),s){const e=this.getCacheDiff();this.cache.batch({update:e=>{i?e.updateQuery({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:!1,extensions:n},e=>i(e,{fetchMoreResult:t.data,variables:a.variables})):e.writeQuery({query:a.query,variables:a.variables,data:t.data,extensions:n})},onWatchUpdated:(n,r)=>{if(n.watcher===this&&!el(r.result,e.result)){o=!0;const e=this.getCurrentResult();Cl(t.networkStatus)&&c({kind:"N",source:"network",value:{...e,networkStatus:t.networkStatus===nu.error?nu.ready:t.networkStatus,loading:!1,data:r.result,dataState:r.complete?"complete":"streaming"}})}}})}else{const e=this.getCurrentResult(),n=i(e.data,{fetchMoreResult:t.data,variables:a.variables});c({kind:"N",value:{...e,networkStatus:nu.ready,loading:!1,data:n,dataState:"streaming"===e.dataState?"streaming":"complete"},source:"network"})}}});return qs(u.then(e=>Qs(this.maskResult(e))).finally(()=>{if(h.unsubscribe(),l(),s&&!o){const e=this.getCurrentResult();"streaming"===e.dataState?c({kind:"N",source:"network",value:{...e,dataState:"complete",networkStatus:nu.ready}}):c({kind:"N",source:"newNetworkStatus",value:{}},{shouldEmit:1})}}))}subscribeToMore(e){const t=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:t=>{const{updateQuery:n,onError:r}=e,{error:i}=t;i?r?r(i):Ha.error(88,i):n&&this.updateQuery((e,r)=>n(e,{subscriptionData:t,...r}))}});return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)&&t.unsubscribe()}}applyOptions(e){const t=Do(this.options,e||{});iu(this.options,t),this.updatePolling()}async setVariables(e){return e=this.getVariablesWithDefaults(e),el(this.variables,e)?Qs(this.getCurrentResult()):(this.options.variables=e,this.hasObservers()?this._reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},{newNetworkStatus:nu.setVariables}):Qs(this.getCurrentResult()))}updateQuery(e){const{queryManager:t}=this,{result:n,complete:r}=this.getCacheDiff({optimistic:!1}),i=e(n,{variables:this.variables,complete:!!r,previousData:n});i&&(this.cache.writeQuery({query:this.options.query,data:i,variables:this.variables}),t.broadcastQueries())}startPolling(e){this.options.pollInterval=e,this.updatePolling()}stopPolling(){this.options.pollInterval=0,this.updatePolling()}applyNextFetchPolicy(e,t){if(t.nextFetchPolicy){const{fetchPolicy:n="cache-first",initialFetchPolicy:r=n}=t;"standby"===n||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy.call(t,n,{reason:e,options:t,observable:this,initialFetchPolicy:r}):t.fetchPolicy="variables-changed"===e?r:t.nextFetchPolicy)}return t.fetchPolicy}fetch(e,t,n,r){const i=this.options.fetchPolicy;e.context??={};let a=!1,{observable:o,fromLink:s}=this.queryManager.fetchObservableWithInfo(e,{networkStatus:t,query:n,onCacheHit:()=>{a=!0},fetchQueryOperator:e=>new qi(n=>{try{return e.subscribe({next(e){a=!0,n.next(e)},error:e=>n.error(e),complete:()=>n.complete()})}finally{a||(u.override=t,this.input.next({kind:"N",source:"newNetworkStatus",value:{resetError:!0},query:l,variables:c,meta:{shouldEmit:3,fetchPolicy:i}}))}}),observableQuery:this});const{query:l,variables:c}=this,u={abort:()=>{p.unsubscribe()},query:l,variables:c};this.activeOperations.add(u);let d=t==nu.refetch||t==nu.setVariables;o=o.pipe(r,_a());const p=o.pipe(Ma({next:e=>{"newNetworkStatus"===e.source||"N"===e.kind&&e.value.loading?u.override=t:delete u.override},finalize:()=>this.activeOperations.delete(u)})).subscribe({next:e=>{const t={};d&&"N"===e.kind&&"loading"in e.value&&!e.value.loading&&(d=!1,t.shouldEmit=1),this.input.next({...e,query:l,variables:c,meta:t})}});return{fromLink:s,subscription:p,observable:o}}didWarnCacheOnlyPolling=!1;updatePolling(){if(this.queryManager.ssrMode)return;const{pollingInfo:e,options:{fetchPolicy:t,pollInterval:n}}=this,r=()=>{const{options:e}=this;return!e.pollInterval||!this.hasObservers()||"cache-only"===e.fetchPolicy||"standby"===e.fetchPolicy};if(r())return void this.cancelPolling();if(e?.interval===n)return;(e||(this.pollingInfo={})).interval=n;const i=()=>{if(r())return this.cancelPolling();this.pollingInfo&&(Cl(this.networkStatus)||this.options.skipPollAttempt?.()?a():this._reobserve({fetchPolicy:"no-cache"===this.options.initialFetchPolicy?"no-cache":"network-only"},{newNetworkStatus:nu.poll}).then(a,a))},a=()=>{const e=this.pollingInfo;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(i,e.interval))};a()}cancelPolling(){this.pollingInfo&&(clearTimeout(this.pollingInfo.timeout),delete this.pollingInfo)}reobserve(e){return this._reobserve(e)}_reobserve(e,t){this.isTornDown=!1;let{newNetworkStatus:n,keepLastMissing:r}=t||{};r||(this.lastMissing=void 0),this.queryManager.obsQueries.add(this);const i=n===nu.refetch||n===nu.poll,a=this.variables,o=this.options.fetchPolicy,s=Do(this.options,e||{});this.variablesUnknown&&="standby"===s.fetchPolicy;const l=i?s:iu(this.options,s),c=this.transformDocument(l.query);this.lastQuery=c,e&&"variables"in e&&(l.variables=this.getVariablesWithDefaults(e.variables)),i||(this.updatePolling(),!e||!e.variables||el(e.variables,a)||"standby"===l.fetchPolicy||l.fetchPolicy!==o&&"function"!=typeof l.nextFetchPolicy||(this.applyNextFetchPolicy("variables-changed",l),void 0===n&&(n=nu.setVariables)));const u=this.networkStatus;n||(n=nu.loading,u!==nu.loading&&e?.variables&&!el(e.variables,a)&&(n=nu.setVariables),"standby"===l.fetchPolicy&&(n=nu.ready)),"standby"===l.fetchPolicy&&this.cancelPolling(),this.resubscribeCache();const{promise:d,operator:p}=pu("standby"===l.fetchPolicy?{data:void 0}:void 0),{subscription:h,observable:f,fromLink:m}=this.fetch(l,n,c,p);i||!m&&this.linkSubscription||(this.linkSubscription&&this.linkSubscription.unsubscribe(),this.linkSubscription=h);const g=Object.assign(qs(d.then(e=>Qs(this.maskResult(e))).finally(()=>{this.hasObservers()||0!==this.activeOperations.size||this.tearDownQuery()})),{retain:()=>{const e=f.subscribe({}),t=()=>e.unsubscribe();return d.then(t,t),g}});return g}hasObservers(){return this.subject.observed}stop(){this.subject.complete(),this.initializeObservablesQueue(),this.tearDownQuery()}tearDownQuery(){this.isTornDown||(this.resetNotifications(),this.unsubscribeFromCache?.(),this.linkSubscription&&(this.linkSubscription.unsubscribe(),delete this.linkSubscription),this.stopPolling(),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions.clear(),this.queryManager.obsQueries.delete(this),this.isTornDown=!0,this.abortActiveOperations(),this.lastMissing=void 0)}transformDocument(e){return this.queryManager.transform(e)}maskResult(e){const t=this.queryManager.maskOperation({document:this.query,data:e.data,fetchPolicy:this.options.fetchPolicy,cause:this});return t===e.data?e:{...e,data:t}}dirty=!1;notifyTimeout;resetNotifications(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0),this.dirty=!1}scheduleNotify(){this.dirty||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(()=>this.notify(!0),0)))}notify(e=!1){if(!e){const e=this.queryManager.getDocumentInfo(this.query);if(e.hasClientExports||e.hasForcedResolvers)return}const{dirty:t,lastMissing:n}=this,{fetchPolicy:r}=this.options;if(this.resetNotifications(),!t||"cache-only"!==r&&"cache-and-network"!==r&&this.activeOperations.size)return;const i=this.getCacheDiff(),a=this.getCurrentResult();if(el(i.result,this.getCacheDiff({optimistic:!1}).result)&&(i.complete||a.networkStatus!==nu.streaming)){if(i.complete)this.lastMissing=void 0;else if(n&&n.dmCount===lu.get(this.cache)&&el(n.variables,this.variables)&&el(n.missing,i.missing?.missing)){if("cache-only"!==r)return void("partial"===a.dataState&&this.deliverCacheDiff(i))}else this.didWarnOnFeud=!1,this.lastMissing={variables:this.variables,missing:i.missing?.missing,dmCount:lu.get(this.cache)};this.reobserveCacheFirst()}else this.deliverCacheDiff(i)}deliverCacheDiff(e){const t=this.getCurrentResult();this.input.next({kind:"N",value:{data:e.result,dataState:e.dataState,networkStatus:t.networkStatus,loading:t.loading,error:void 0,partial:!e.complete},source:"cache",query:this.query,variables:this.variables,meta:{}})}activeOperations=/* @__PURE__ */new Set;pushOperation(e){let t=!1;const{query:n,variables:r}=this,i=()=>{this.activeOperations.delete(a)},a={override:e,abort:()=>{t=!0,i()},query:n,variables:r};return this.activeOperations.add(a),{finalize:i,pushNotification:(e,i)=>{t||this.input.next({...e,query:n,variables:r,meta:{...i}})}}}calculateNetworkStatus(e){return e===nu.streaming?e:Array.from(this.activeOperations.values()).reverse().find(e=>du(e,this)&&void 0!==e.override)?.override??e}abortActiveOperations(){this.activeOperations.forEach(e=>e.abort())}reset(){const e="cache-only"===this.options.fetchPolicy;this.lastMissing=void 0,this.setResult(e?su:ou,{shouldEmit:e?1:2}),this.abortActiveOperations()}setResult(e,t){this.input.next({source:"setResult",kind:"N",value:e,query:this.query,variables:this.variables,meta:{...t}})}operator=Js(e=>{const{query:t,meta:n}=e;if("setResult"===e.source)return{query:t,variables:this.variables,result:e.value,meta:n};if("C"===e.kind)return;const r="resolvedVariables"in e?e.resolvedVariables:void 0;if(e.query!==this.query)return;if(!el(r,this.variables)){if(!el(e.variables,this.variables))return;r&&(this.options.variables=r,this.resubscribeCache())}const i=this.variables;let a;const o=this.subject.getValue();if("cache"===e.source){if(a=e.value,a.networkStatus===nu.ready&&"partial"===a.dataState&&(!this.options.returnPartialData||o.result.networkStatus===nu.error)&&"cache-only"!==this.options.fetchPolicy)return}else if("network"===e.source)this.waitForNetworkResult&&(this.waitForNetworkResult=!1,this.resubscribeCache()),a="E"===e.kind?{...du(o,e)||r&&el(r,o.variables)?o.result:{data:void 0,dataState:"empty",partial:!0},error:e.error,networkStatus:nu.error,loading:!1}:e.value,"E"===e.kind&&"streaming"===a.dataState&&(a.dataState=ru.get(e.error)??"complete"),a.error&&(n.shouldEmit=1);else if("newNetworkStatus"===e.source){const t=du(o,e)?o.result:this.getInitialResult(n.fetchPolicy),{resetError:r}=e.value,i=r?void 0:t.error,s=i?nu.error:nu.ready;a={...t,error:i,networkStatus:s}}return Ha(a),a.error||delete a.error,a.networkStatus=this.calculateNetworkStatus(a.networkStatus),a.loading=Cl(a.networkStatus),a=this.maskResult(a),void 0!==o.result.data&&a.data!==o.result.data&&el(a.data,o.result.data)&&(a.data=o.result.data),{query:t,variables:i,result:a,meta:n}});reobserveCacheFirst(){const{fetchPolicy:e,nextFetchPolicy:t}=this.options;"cache-and-network"===e||"network-only"===e?this._reobserve({fetchPolicy:"cache-first",nextFetchPolicy(n,r){return this.nextFetchPolicy=t,"function"==typeof this.nextFetchPolicy?this.nextFetchPolicy(n,r):e}},{keepLastMissing:!0}):this._reobserve(void 0,{keepLastMissing:!0})}getVariablesWithDefaults(e){return this.queryManager.getVariables(this.query,e)}};function du(e,t){return!!(e&&t&&e.query===t.query&&el(e.variables,t.variables))}function pu(e){let t,n,r=e;return{promise:new Promise((e,r)=>{t=e,n=r}),operator:Ma({next(e){if("E"===e.kind)return n(e.error);"N"!==e.kind||"newNetworkStatus"===e.source||e.value.loading||(r=e.value)},finalize:()=>{if(r)t(r);else{const e="The operation was aborted.",t="AbortError";n("undefined"!=typeof DOMException?new DOMException(e,t):Object.assign(/* @__PURE__ */new Error(e),{name:t}))}}})}}var hu={},fu=/* @__PURE__ */new WeakMap,mu=class{cache;queryManager;id;observableQuery;incremental;constructor(e,t){this.cache=e.cache;const n=(fu.get(e)||0)+1;fu.set(e,n),this.id=n+"",this.observableQuery=t,this.queryManager=e}get hasNext(){return!!this.incremental&&this.incremental.hasNext}get incrementalHandler(){return this.queryManager.incrementalHandler}maybeHandleIncrementalResult(e,t,n){return this.incrementalHandler.isIncrementalResult(t)?(this.incremental||=this.incrementalHandler.startRequest({query:n}),this.incremental.handle(e,t)):t}markQueryResult(e,{document:t,variables:n,errorPolicy:r,cacheWriteBehavior:i,returnPartialData:a,fetchPolicy:o,networkStatus:s,prunePendingDeferFragments:l}){const c={query:t,variables:n,optimistic:!0};this.observableQuery?.resetNotifications();const u=0===i,d=u?void 0:this.getDiff({...c,returnPartialData:"none"!==r||!this.incrementalHandler.extractErrors(e)?.length},this.getIncrementalInfo({prune:l})),p=this.maybeHandleIncrementalResult(d?.result,e,t);let h={...p,dataState:null==p.data?"empty":"complete"};return(this.incremental?.getPendingWithInfo?.().some(e=>"defer"===e.type&&!e.delivered)||!this.incremental?.getPendingWithInfo&&this.hasNext&&Jo(["defer"],t))&&(h.dataState="streaming"),u||!gu(h,r)||this.cache.batch({onWatchUpdated:(e,t)=>{e.watcher===this.observableQuery&&(e.lastOwnDiff=t)},update:e=>{e.writeQuery({query:t,data:h.data,variables:n,overwrite:1===i,extensions:h.extensions});const{dataState:r,result:u}=this.getDiff({...c,returnPartialData:a&&("network-only"!==o||s===nu.refetch)},this.getIncrementalInfo({prune:l}));("complete"===r||"streaming"===r||a&&"partial"===r)&&(h={...h,data:u,dataState:r})}}),h}getIncrementalInfo({prune:e}){const t=this.incremental?.getPendingWithInfo?.()??[],n=this.incremental?.streamInfo,r={streamInfo:n};if(e)for(const i of t)"defer"!==i.type||i.delivered?n&&"stream"===i.type&&(n.lookupArray(i.path).state.truncate=!0):(r.deferInfo||=new so(!0,()=>!0),r.deferInfo.lookupArray(i.path.concat(i.label||[])));return r}getDiff(e,t){return Gs(this.cache.diff({...e,[fl]:t}))}markMutationResult(e,t,n=this.cache){const r=[],i=0===t.cacheWriteBehavior;let a=this.maybeHandleIncrementalResult(i?void 0:n.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}).result,e,t.document);if("ignore"===t.errorPolicy&&(a={...a,errors:[]}),Qo(a)&&"none"===t.errorPolicy)return Promise.resolve(a);const o=()=>({...a,dataState:this.hasNext?"streaming":"complete"});if(!i&&gu(a,t.errorPolicy)){r.push({result:a.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables,extensions:a.extensions});const{updateQueries:e}=t;e&&this.queryManager.getObservableQueries("all").forEach(t=>{const n=t&&t.queryName;if(!n||!Object.hasOwnProperty.call(e,n))return;const i=e[n],{query:a,variables:s}=t,{result:l,complete:c}=t.getCacheDiff({optimistic:!1});if(c&&l){const e=i(l,{mutationResult:o(),queryName:a&&no(a)||void 0,queryVariables:s});e&&r.push({result:e,dataId:"ROOT_QUERY",query:a,variables:s})}})}let s=t.refetchQueries;if("function"==typeof s&&(s=s(o())),r.length>0||(s||"").length>0||t.update||t.onQueryUpdated||t.removeOptimistic){const e=[];if(this.queryManager.refetchQueries({updateCache:e=>{i||r.forEach(t=>e.write(t));const{update:n}=t;if(!i){const n=e.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});n.complete&&(a={...a,data:n.result})}n&&!this.hasNext&&n(e,a,{context:t.context,variables:t.variables}),i||t.keepRootFields||this.hasNext||e.modify({id:"ROOT_MUTATION",fields:(e,{fieldName:t,DELETE:n})=>"__typename"===t?e:n})},include:s,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(t=>e.push(t)),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(e).then(()=>a)}return Promise.resolve(a)}markMutationOptimistic(e,t){const n="function"==typeof e?e(t.variables,{IGNORE:hu}):e;return n!==hu&&(this.cache.recordOptimisticTransaction(e=>{try{this.markMutationResult({data:n},t,e)}catch(r){Ha.error(r)}},this.id),!0)}markSubscriptionResult(e,{document:t,variables:n,errorPolicy:r,cacheWriteBehavior:i}){if(0!==i){if(gu(e,r)){this.cache.write({query:t,result:e.data,dataId:"ROOT_SUBSCRIPTION",variables:n,extensions:e.extensions});const r=this.cache.diff({query:this.queryManager.getDocumentInfo(t).asQuery,id:"ROOT_SUBSCRIPTION",variables:n,optimistic:!1,returnPartialData:!0});r.complete&&(e.data=r.result)}this.queryManager.broadcastQueries()}}};function gu(e,t="none"){const n="ignore"===t||"all"===t;let r=!Qo(e);return!r&&n&&e.data&&(r=!0),r}var yu=class{defaultOptions;client;clientOptions;assumeImmutableResults;documentTransform;ssrMode;defaultContext;dataMasking;incrementalHandler;localState;queryDeduplication;prioritizeCacheValues=!1;onBroadcast;mutationStore;obsQueries=/* @__PURE__ */new Set;fetchCancelFns=/* @__PURE__ */new Map;constructor(e){const t=new vl(e=>this.cache.transformDocument(e),{cache:!1});this.client=e.client,this.defaultOptions=e.defaultOptions,this.queryDeduplication=e.queryDeduplication,this.clientOptions=e.clientOptions,this.ssrMode=e.ssrMode,this.assumeImmutableResults=e.assumeImmutableResults,this.dataMasking=e.dataMasking,this.localState=e.localState,this.incrementalHandler=e.incrementalHandler;const n=e.documentTransform;this.documentTransform=n?t.concat(n).concat(t):t,this.incrementalHandler.documentTransform&&(this.documentTransform=this.documentTransform.concat(this.incrementalHandler.documentTransform)),this.defaultContext=e.defaultContext||{},(this.onBroadcast=e.onBroadcast)&&(this.mutationStore={})}get link(){return this.client.link}get cache(){return this.client.cache}stop(){this.obsQueries.forEach(e=>e.stop()),this.cancelPendingFetches(Ga(93))}cancelPendingFetches(e){this.fetchCancelFns.forEach(t=>t(e)),this.fetchCancelFns.clear()}async mutate({mutation:e,variables:t,optimisticResponse:n,updateQueries:r,refetchQueries:i=[],awaitRefetchQueries:a=!1,update:o,onQueryUpdated:s,fetchPolicy:l,errorPolicy:c,keepRootFields:u,context:d}){const p=new mu(this);e=this.cache.transformForLink(this.transform(e));const{hasClientExports:h}=this.getDocumentInfo(e);t=this.getVariables(e,t),h&&(t=await this.localState.getExportedVariables({client:this.client,document:e,variables:t,context:d}));const f=this.mutationStore&&(this.mutationStore[p.id]={mutation:e,variables:this.cache.serializeVariables(e,t),loading:!0,error:null}),m=n&&p.markMutationOptimistic(n,{document:e,variables:t,cacheWriteBehavior:"no-cache"===l?0:2,errorPolicy:c,context:d,updateQueries:r,update:o,keepRootFields:u});return this.broadcastQueries(),new Promise((h,g)=>{const y={};return this.getObservableFromLink(e,{...d,optimisticResponse:m?n:void 0},t,l,{},!1).observable.pipe(bu(),Ea(n=>{const h={...n};return wa(p.markMutationResult(h,{document:e,variables:t,cacheWriteBehavior:"no-cache"===l?0:2,errorPolicy:c,context:d,update:o,updateQueries:r,awaitRefetchQueries:a,refetchQueries:i,removeOptimistic:m?p.id:void 0,onQueryUpdated:s,keepRootFields:u}))})).pipe(Ca(e=>{if(Qo(e)&&"none"===c)throw new Jc(xu(e));return f&&(f.loading=!1,f.error=null),e})).subscribe({next:t=>{if(this.broadcastQueries(),!p.hasNext){const n={data:this.maskOperation({document:e,data:t.data,fetchPolicy:l,cause:y})};Qo(t)&&(n.error=new Jc(t)),Object.keys(t.extensions||{}).length&&(n.extensions=t.extensions),h(n)}},error:e=>(f&&(f.loading=!1,f.error=e),m&&this.cache.removeOptimistic(p.id),this.broadcastQueries(),"ignore"===c?h({data:void 0}):"all"===c?h({data:void 0,error:e}):void g(e))})})}fetchQuery(e,t){return wo(e.query,Qt),(async()=>{return n=this.fetchObservableWithInfo(e,{networkStatus:t}).observable.pipe(Js(e=>{switch(e.kind){case"E":throw e.error;case"N":if("newNetworkStatus"!==e.source)return Qs(e.value)}})),r={defaultValue:{data:void 0}},new Promise(function(e,t){var i,a=!1;n.subscribe({next:function(e){i=e,a=!0},error:t,complete:function(){e(a?i:r.defaultValue)}})});var n,r})()}transform(e){return this.documentTransform.transformDocument(e)}transformCache=new vo(to["queryManager.getDocumentInfo"]||2e3);getDocumentInfo(e){const{transformCache:t}=this;if(!t.has(e)){const n=Io(e),r={hasClientExports:Jo(["client","export"],e,!0),hasForcedResolvers:Ko(e),hasNonreactiveDirective:Jo(["nonreactive"],e),hasIncrementalDirective:Jo(["defer"],e),nonReactiveQuery:vu(e),clientQuery:Jo(["client"],e)?e:null,serverQuery:Vs([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],e),operationType:n?.operation,defaultVars:Fo(n),asQuery:{...e,definitions:e.definitions.map(e=>"OperationDefinition"===e.kind&&"query"!==e.operation?{...e,operation:"query"}:e)}};t.set(e,r)}const n=t.get(e);if(n.violation)throw n.violation;return n}getVariables(e,t){const n=this.getDocumentInfo(e).defaultVars,r=Object.entries(t??{}).map(([e,t])=>[e,void 0===t?n[e]:t]);return{...n,...Object.fromEntries(r)}}watchQuery(e){wo(e.query,Qt);const t=this.transform(e.query);return void 0===(e={...e,variables:this.getVariables(t,e.variables)}).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!0),new uu({queryManager:this,options:e,transformedQuery:t})}query(e){const t=this.transform(e.query);return this.fetchQuery({...e,query:t}).then(n=>({...n,data:this.maskOperation({document:t,data:n?.data,fetchPolicy:e.fetchPolicy})}))}clearStore(e={discardWatches:!0}){return this.cancelPendingFetches(Ga(95)),this.obsQueries.forEach(e=>{e.reset()}),this.mutationStore&&(this.mutationStore={}),this.cache.reset(e)}getObservableQueries(e="active"){const t=/* @__PURE__ */new Set,n=/* @__PURE__ */new Map,r=/* @__PURE__ */new Map,i=/* @__PURE__ */new Set;return Array.isArray(e)&&e.forEach(e=>{if("string"==typeof e)n.set(e,e),r.set(e,!1);else if(Po(t=e)&&"Document"===t.kind&&Array.isArray(t.definitions)){const t=xl(this.transform(e));n.set(t,no(e)),r.set(t,!1)}else Po(e)&&e.query&&i.add(e);var t}),this.obsQueries.forEach(n=>{const i=xl(this.transform(n.options.query));if("all"===e)return void t.add(n);const{queryName:a,options:{fetchPolicy:o}}=n;"active"===e&&"standby"===o||("active"===e||a&&r.has(a)||i&&r.has(i))&&(t.add(n),a&&r.set(a,!0),i&&r.set(i,!0))}),i.size&&i.forEach(e=>{const n=new uu({queryManager:this,options:{...$s(this.defaultOptions.watchQuery,e),fetchPolicy:"network-only"}});t.add(n)}),t}refetchObservableQueries(e=!1){const t=[];return this.getObservableQueries(e?"all":"active").forEach(n=>{const{fetchPolicy:r}=n.options;!e&&"standby"===r||"cache-only"===r||t.push(n.refetch())}),this.broadcastQueries(),Promise.all(t)}startGraphQLSubscription(e){let{query:t,variables:n}=e;const{fetchPolicy:r="cache-first",errorPolicy:i="none",context:a={},extensions:o={}}=e;let s;wo(t,Kt),t=this.transform(t),n=this.getVariables(t,n);const l=(this.getDocumentInfo(t).hasClientExports?wa(this.localState.getExportedVariables({client:this.client,document:t,variables:n,context:a})):Sa(n)).pipe(Ea(e=>{const{observable:n,restart:l}=this.getObservableFromLink(t,a,e,r,o),c=new mu(this);return s=l,n.pipe(Ca(n=>{c.markSubscriptionResult(n,{document:t,variables:e,errorPolicy:i,cacheWriteBehavior:"no-cache"===r?0:2});const a={data:n.data??void 0};return Qo(n)?a.error=new Jc(n):eu(n)&&(a.error=n.extensions[Zc],delete n.extensions[Zc]),n.extensions&&Object.keys(n.extensions).length&&(a.extensions=n.extensions),a.error&&"none"===i&&(a.data=void 0),"ignore"===i&&delete a.error,a}),Oa(e=>Sa("ignore"===i?{data:void 0}:{data:void 0,error:e})),za(e=>!(!e.data&&!e.error)))}));return Object.assign(l,{restart:()=>s?.()})}broadcastQueries(){this.onBroadcast&&this.onBroadcast(),this.obsQueries.forEach(e=>e.notify())}inFlightLinkObservables=new so(!1);getObservableFromLink(e,t,n,r,i,a=t?.queryDeduplication??this.queryDeduplication){let o={};const{serverQuery:s,clientQuery:l,operationType:c,hasIncrementalDirective:u}=this.getDocumentInfo(e),d=no(e),p={client:this.client};if(n=this.cache.serializeVariables(e,n),s){const{inFlightLinkObservables:m,link:g}=this;try{const y=this.incrementalHandler.prepareRequest({query:s,variables:n,context:{...this.defaultContext,...t,queryDeduplication:a},extensions:i});function b(e){return new qi(t=>{function n(){return e.subscribe({next:t.next.bind(t),complete:t.complete.bind(t),error:t.error.bind(t)})}let r=n();return o.restart||=()=>{r.unsubscribe(),r=n()},()=>{r.unsubscribe(),o.restart=void 0}})}if(t=y.context,a){const v=xl(s),x=Vo(n);o=m.lookup(v,x),o.observable||(o.observable=Il(g,y,p).pipe(b,(h=()=>{m.peek(v,x)===o&&m.remove(v,x)},Bi(function(e,t){try{e.subscribe(t)}finally{t.add(h)}})),c===Kt?_a():Pa({refCount:!0})))}else o.observable=Il(g,y,p).pipe(b)}catch(f){o.observable=Na(()=>f)}}else o.observable=Sa({data:{}});var h;if(l){const{operation:k}=Io(e);Ha(!u,100,k[0].toUpperCase()+k.slice(1),d??"(anonymous)"),o.observable=o.observable.pipe(Ea(e=>wa(this.localState.execute({client:this.client,document:l,remoteResult:e,context:t,variables:n,fetchPolicy:r}))))}return{restart:()=>o.restart?.(),observable:o.observable.pipe(Oa(e=>{throw function(e){Kc.add(e)}(e=tu(e)),e}))}}getResultsFromLink(e,{queryInfo:t,cacheWriteBehavior:n,observableQuery:r,exposeExtensions:i,prunePendingDeferFragments:a}){const{errorPolicy:o}=e,s=this.cache.transformForLink(e.query);return this.getObservableFromLink(s,e.context,e.variables,e.fetchPolicy).observable.pipe(Ca(l=>{const{dataState:c,...u}=t.markQueryResult(l,{...e,document:s,cacheWriteBehavior:n,returnPartialData:e.returnPartialData,prunePendingDeferFragments:a}),d=Qo(u);if(d&&"none"===o){r?.resetNotifications();const e=new Jc(xu(u));throw ru.set(e,c),e}const p="complete"!==c,h={data:u.data,...t.hasNext?{loading:!0,networkStatus:nu.streaming,dataState:c,partial:p}:{dataState:c,loading:!1,networkStatus:nu.ready,partial:p}};return i&&"extensions"in u&&(h[dl]=u.extensions),d&&"ignore"!==o&&(h.error=new Jc(xu(u)),h.networkStatus!==nu.streaming&&(h.networkStatus=nu.error)),h}),Oa(e=>{if("none"===o)throw r?.resetNotifications(),e;const t={data:void 0,dataState:"empty",loading:!1,networkStatus:nu.ready,partial:!0};return"ignore"!==o&&(t.error=e,t.networkStatus=nu.error),Sa(t)}))}fetchObservableWithInfo(e,{networkStatus:t=nu.loading,query:n=e.query,fetchQueryOperator:r=e=>e,onCacheHit:i=()=>{},observableQuery:a,exposeExtensions:o}){const s=this.getVariables(n,e.variables);let{fetchPolicy:l="cache-first",errorPolicy:c="none",returnPartialData:u=!1,notifyOnNetworkStatusChange:d=!0,context:p={}}=e;!this.prioritizeCacheValues||"network-only"!==l&&"cache-and-network"!==l||(l="cache-first");const h=Object.assign({},e,{query:n,variables:s,fetchPolicy:l,errorPolicy:c,returnPartialData:u,networkStatus:t,notifyOnNetworkStatusChange:d,context:p}),f=new mu(this,a),m=n=>{h.variables=n;const s="no-cache"===l?0:t===nu.refetch&&"merge"!==h.refetchWritePolicy?1:2,c=this.fetchQueryByPolicy(h,{queryInfo:f,cacheWriteBehavior:s,onCacheHit:i,observableQuery:a,exposeExtensions:o});return c.observable=c.observable.pipe(r),"standby"!==h.fetchPolicy&&a?.applyNextFetchPolicy("after-fetch",e),c},g=()=>{this.fetchCancelFns.delete(f.id)};this.fetchCancelFns.set(f.id,e=>{y.next({kind:"E",error:e,source:"network"})});const y=new Gi;let b,v;if(this.getDocumentInfo(h.query).hasClientExports)b=wa(this.localState.getExportedVariables({client:this.client,document:h.query,variables:h.variables,context:h.context})).pipe(Ea(e=>m(e).observable)),v=!0;else{const e=m(h.variables);v=e.fromLink,b=e.observable}return{observable:new qi(e=>{e.add(g),b.subscribe(e),y.subscribe(e)}).pipe(_a()),fromLink:v}}refetchQueries({updateCache:e,include:t,optimistic:n=!1,removeOptimistic:r=(n?$a("refetchQueries"):void 0),onQueryUpdated:i}){const a=/* @__PURE__ */new Map;t&&this.getObservableQueries(t).forEach(e=>{if("cache-only"===e.options.fetchPolicy||e.variablesUnknown)return;const t=e.getCurrentResult();a.set(e,{oq:e,lastDiff:{result:t?.data,complete:!t?.partial}})});const o=/* @__PURE__ */new Map;if(e){const t=/* @__PURE__ */new Set;this.cache.batch({update:e,optimistic:n&&r||!1,removeOptimistic:r,onWatchUpdated(e,n,r){const s=e.watcher;if(s instanceof uu&&!t.has(s)){if(t.add(s),i){a.delete(s);let e=i(s,n,r);return!0===e&&(e=s.refetch().retain()),!1!==e&&o.set(s,e),e}null!==i&&"cache-only"!==s.options.fetchPolicy&&a.set(s,{oq:s,lastDiff:r,diff:n})}}})}return a.size&&a.forEach(({oq:e,lastDiff:t,diff:n})=>{let r;i&&(n||(n=e.getCacheDiff()),r=i(e,n,t)),i&&!0!==r||(r=e.refetch().retain()),!1!==r&&o.set(e,r)}),r&&this.cache.removeOptimistic(r),o}noCacheWarningsByCause=/* @__PURE__ */new WeakSet;maskOperation(e){const{document:t,data:n}=e;return this.dataMasking?function(e,t,n){const r=Io(t);return Ha(r,45),null==e?e:rc(e,r.selectionSet,{operationType:r.operation,operationName:r.name?.value,fragmentMap:No(To(t)),cache:n,mutableTargets:/* @__PURE__ */new WeakMap,knownChanged:/* @__PURE__ */new WeakSet})}(n,t,this.cache):n}maskFragment(e){const{data:t,fragment:n,fragmentName:r}=e;return this.dataMasking?function(e,t,n,r){const i=t.definitions.filter(e=>e.kind===cn);void 0===r&&(Ha(1===i.length,43,i.length),r=i[0].name.value);const a=i.find(e=>e.name.value===r);return Ha(!!a,44,r),null==e||el(e,{})?e:rc(e,a.selectionSet,{operationType:"fragment",operationName:a.name.value,fragmentMap:No(To(t)),cache:n,mutableTargets:/* @__PURE__ */new WeakMap,knownChanged:/* @__PURE__ */new WeakSet})}(t,n,this.cache,r):t}fetchQueryByPolicy({query:e,variables:t,fetchPolicy:n,errorPolicy:r,returnPartialData:i,context:a,networkStatus:o},{cacheWriteBehavior:s,onCacheHit:l,queryInfo:c,observableQuery:u,exposeExtensions:d}){const p=()=>c.getDiff({query:e,variables:t,returnPartialData:!0,optimistic:!0}),h=(o,s)=>{const c=o.result,u=(e,t=o.dataState)=>(o.complete||i||(e=void 0,t="empty"),{data:e,dataState:t,loading:Cl(s),networkStatus:s,partial:!o.complete}),d=e=>Sa({kind:"N",value:u(e),resolvedVariables:t,source:"cache"});return(o.complete||i)&&this.getDocumentInfo(e).hasForcedResolvers?(l(),wa(this.localState.execute({client:this.client,document:e,remoteResult:c?{data:c}:void 0,context:a,variables:t,onlyRunForcedResolvers:!0,returnPartialData:!0,fetchPolicy:n}).then(e=>({kind:"N",value:u(e.data||void 0,o.complete?"complete":e.data?"partial":"empty"),resolvedVariables:t,source:"cache"})))):"none"===r&&s===nu.refetch&&o.missing?d(void 0):d(c||void 0)},f=({prunePendingDeferFragments:l=!0}={})=>this.getResultsFromLink({query:e,variables:t,context:a,fetchPolicy:n,errorPolicy:r,returnPartialData:i,networkStatus:o},{cacheWriteBehavior:s,queryInfo:c,observableQuery:u,exposeExtensions:d,prunePendingDeferFragments:l}).pipe(bu(),Bi(function(e,t){e.subscribe(Ui(t,function(e){t.next(Ta.createNext(e))},function(){t.next(Ta.createComplete()),t.complete()},function(e){t.next(Ta.createError(e)),t.complete()}))}),Ca(e=>({...e,resolvedVariables:t,source:"network"})));switch(n){default:case"cache-first":{const e=p();return e.complete?{fromLink:!1,observable:h(e,nu.ready)}:i?{fromLink:!0,observable:Ia(h(e,nu.loading),f())}:{fromLink:!0,observable:f()}}case"cache-and-network":{const e=p();return e.complete||i?{fromLink:!0,observable:Ia(h(e,nu.loading),f({prunePendingDeferFragments:!1}))}:{fromLink:!0,observable:f()}}case"cache-only":return{fromLink:!1,observable:Ia(h(p(),nu.ready))};case"network-only":return{fromLink:!0,observable:f({prunePendingDeferFragments:o!==nu.refetch})};case"no-cache":return{fromLink:!0,observable:f().pipe(Ca(t=>("N"===t.kind&&null!=t.value.data&&this.cache.configuresScalars()&&(t.value.data=function(e,t,n){const r=Io(t)?.operation,i=No(To(t));function a(e,t,n,r){let i=!1;const a=t.map(t=>{const a=o(e,t,n,r);return i||=a!==t,a});return i?a:t}function o(e,t,r,i){if(Array.isArray(t)&&!i)return a(e,t,r,i);if(e.selectionSet)return s(e.selectionSet,t);if(null===t||!r)return t;if(i){const o=Oo(i);if(o&&Array.isArray(t))return a(e,t,r,o[1]);const s=n.getScalar(_o(i));if(s)return s.coerceToParsed(t)}return t}function s(e,t,r){if(null===t||"object"!=typeof t)return t;const a={...t};let s=!1;Object.hasOwn(t,"__typename")&&(r=t.__typename);const l=new Set(e.selections);return l.forEach(e=>{if(zo(e)){const i=Ao(e);if(!Object.hasOwn(t,i))return;const l=t[i],c=o(e,l,r,r?n.getScalarTypeForField(r,e.name.value):void 0);s||=c!==l,a[i]=c}else{const t=Co(e,i);t&&r&&n.fragmentMatches(t,r)&&t.selectionSet.selections.forEach(e=>l.add(e))}}),s?a:t}return Ha(r,6),s(Eo(t).selectionSet,e,n.getRootTypename(r))}(t.value.data,e,this.cache)),t)))};case"standby":return{fromLink:!1,observable:ra}}}};function bu(){let e=!1;return Ma({next(){e=!0},complete(){Ha(e,104)}})}function vu(e){return sr(e,{FragmentSpread:e=>{if(!e.directives?.some(e=>"unmask"===e.name.value))return{...e,directives:[...e.directives||[],{kind:xn,name:{kind:Xt,value:"nonreactive"}}]}}})}function xu(e){if(null==e.extensions?.[pl])return e;const{extensions:{[pl]:t,...n},...r}=e;return Object.keys(n).length>0&&(r.extensions=n),r}var ku=class{link;cache;disableNetworkFetches;set prioritizeCacheValues(e){this.queryManager.prioritizeCacheValues=e}get prioritizeCacheValues(){return this.queryManager.prioritizeCacheValues}version;queryDeduplication;defaultOptions;devtoolsConfig;refetchEventManager;queryManager;devToolsHookCb;resetStoreCallbacks=[];clearStoreCallbacks=[];constructor(e){const{cache:t,documentTransform:n,ssrMode:r=!1,ssrForceFetchDelay:i=0,queryDeduplication:a=!0,defaultOptions:o,defaultContext:s,assumeImmutableResults:l=t.assumeImmutableResults,localState:c,devtools:u,dataMasking:d,link:p,incrementalHandler:h=new gl,experiments:f=[],refetchEventManager:m}=e;this.link=p,this.cache=t,this.queryDeduplication=a,this.defaultOptions=o||{},this.devtoolsConfig={...u,enabled:u?.enabled??!1},this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.refetchObservableQueries=this.refetchObservableQueries.bind(this),this.version=ja,this.queryManager=new yu({client:this,defaultOptions:this.defaultOptions,defaultContext:s,documentTransform:n,queryDeduplication:a,ssrMode:r,dataMasking:!!d,clientOptions:e,incrementalHandler:h,assumeImmutableResults:l,onBroadcast:this.devtoolsConfig.enabled?()=>{this.devToolsHookCb&&this.devToolsHookCb()}:void 0,localState:c}),this.prioritizeCacheValues=r||i>0,i&&setTimeout(()=>{this.prioritizeCacheValues=!1},i),this.devtoolsConfig.enabled&&this.connectToDevTools(),f.forEach(t=>t.call(this,e)),this.refetchEventManager=m,this.refetchEventManager?.connect(this)}connectToDevTools(){if("undefined"==typeof window)return;const e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this}get documentTransform(){return this.queryManager.documentTransform}get localState(){return this.queryManager.localState}set localState(e){this.queryManager.localState=e}stop(){this.queryManager.stop(),this.refetchEventManager?.disconnect(this)}watchQuery(e){const{refetchOn:t}=e;if(this.defaultOptions.watchQuery){const n=this.defaultOptions.watchQuery.refetchOn;let r;t&&"object"==typeof t&&("object"==typeof n?r={...n,...t}:null!=n&&(r=e=>{const r=t[e.source]??n;return"function"==typeof r?r(e):r})),e=$s(this.defaultOptions.watchQuery,e),r&&(e.refetchOn=r)}return this.queryManager.watchQuery(e)}query=e=>(this.defaultOptions.query&&(e=$s(this.defaultOptions.query,e)),this.queryManager.query(e));mutate=e=>{const t=$s(Do({fetchPolicy:"network-only",errorPolicy:"none"},this.defaultOptions.mutate),e);return wo(t.mutation,Jt),this.queryManager.mutate(t)};subscribe(e){const t={},n=this.queryManager.startGraphQLSubscription(e),r=n.pipe(Ca(n=>({...n,data:this.queryManager.maskOperation({document:e.query,data:n.data,fetchPolicy:e.fetchPolicy,cause:t})})));return Object.assign(r,{restart:n.restart})}readQuery(e,t=!!e.optimistic){return this.cache.readQuery({...e,query:this.transform(e.query)},t)}watchFragment(e){const t=this.queryManager.dataMasking;return this.cache.watchFragment({...e,fragment:this.transform(e.fragment,t)})}readFragment(e,t=!!e.optimistic){return this.cache.readFragment({...e,fragment:this.transform(e.fragment)},t)}writeQuery(e){const t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t}writeFragment(e){const t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t}__actionHookForDevTools(e){this.devToolsHookCb=e}__requestRaw(e){return Il(this.link,e,{client:this})}resetStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!1})).then(()=>Promise.all(this.resetStoreCallbacks.map(e=>e()))).then(()=>this.refetchObservableQueries())}clearStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!0})).then(()=>Promise.all(this.clearStoreCallbacks.map(e=>e())))}onResetStore(e){return this.resetStoreCallbacks.push(e),()=>{this.resetStoreCallbacks=this.resetStoreCallbacks.filter(t=>t!==e)}}onClearStore(e){return this.clearStoreCallbacks.push(e),()=>{this.clearStoreCallbacks=this.clearStoreCallbacks.filter(t=>t!==e)}}reFetchObservableQueries;refetchObservableQueries(e){return this.queryManager.refetchObservableQueries(e)}refetchQueries(e){const t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach((e,t)=>{n.push(t),r.push(e)});const i=Promise.all(r);return i.queries=n,i.results=r,i.catch(e=>{}),i}getObservableQueries(e="active"){return this.queryManager.getObservableQueries(e)}extract(e){return this.cache.extract(e)}restore(e){return this.cache.restore(e)}setLink(e){this.link=e}get defaultContext(){return this.queryManager.defaultContext}maskedFragmentTransform=new vl(Hs);transform(e,t=!1){const n=this.queryManager.transform(e);return t?this.maskedFragmentTransform.transformDocument(n):n}},{hasOwnProperty:wu}=Object.prototype;function Su(e){return Po(e)&&"payload"in e}function Nu(e){const t={};return e.split("\n").forEach(e=>{const n=e.indexOf(":");if(n>-1){const r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();t[r]=i}}),t}function Tu(e,t){if(e.status>=300)throw new Yc(`Response not successful: Received status code ${e.status}`,{response:e,bodyText:t});try{return JSON.parse(t)}catch(n){throw new Xc(n,{response:e,bodyText:t})}}var Cu={http:{includeQuery:!0,includeExtensions:!0,preserveHeaderCase:!1},headers:{accept:"application/graphql-response+json,application/json;q=0.9","content-type":"application/json"},options:{method:"POST"}},Eu=(e,t)=>t(e);function Iu(e,t,...n){let r={},i={};n.forEach(e=>{r={...r,...e.options,headers:{...r.headers,...e.headers}},e.credentials&&(r.credentials=e.credentials),r.headers.accept=(e.http?.accept||[]).concat(r.headers.accept).join(","),i={...i,...e.http}}),r.headers=function(e,t){if(!t){const t={};return Object.keys(Object(e)).forEach(n=>{t[n.toLowerCase()]=e[n]}),t}const n={};Object.keys(Object(e)).forEach(t=>{n[t.toLowerCase()]={originalName:t,value:e[t]}});const r={};return Object.keys(n).forEach(e=>{r[n[e].originalName]=n[e].value}),r}(r.headers,i.preserveHeaderCase);const{operationName:a,extensions:o,variables:s,query:l}=e,c={operationName:a,variables:s};return i.includeExtensions&&Object.keys(o||{}).length&&(c.extensions=o),i.includeQuery&&(c.query=t(l,xl)),{options:r,body:c}}var zu=La(()=>fetch);function Ou(){}var Au=class extends El{constructor(e={}){let{uri:t="/graphql",fetch:n,print:r=Eu,includeExtensions:i,preserveHeaderCase:a,useGETForQueries:o,includeUnusedVariables:s=!1,...l}=e;const c={http:Do({includeExtensions:i,preserveHeaderCase:a}),options:l.fetchOptions,credentials:l.credentials,headers:l.headers};super(e=>{let i=((e,t)=>e.getContext().uri||("function"==typeof t?t(e):t||"/graphql"))(e,t);const a=e.getContext(),l={...a.http};(function(e){return Nl(e,"subscription")})(e.query)&&(l.accept=["multipart/mixed;boundary=graphql;subscriptionSpec=1.0",...l.accept||[]]);const u={http:l,options:a.fetchOptions,credentials:a.credentials,headers:a.headers},{options:d,body:p}=Iu(e,r,Cu,c,u);p.variables&&!s&&(p.variables=function(e,t){const n={...e},r=new Set(Object.keys(e));return sr(t,{Variable(e,t,n){n&&"VariableDefinition"!==n.kind&&r.delete(e.name.value)}}),r.forEach(e=>{delete n[e]}),n}(p.variables,e.query));let h=new AbortController,f=()=>{h=void 0};if(d.signal){const e=d.signal,t=()=>{h?.abort(e.reason)};e.addEventListener("abort",t,{once:!0}),f=()=>{h?.signal.removeEventListener("abort",f),h=void 0,e.removeEventListener("abort",t),f=Ou},h.signal.addEventListener("abort",f,{once:!0})}return d.signal=h.signal,o&&!function(e){return Nl(e,"mutation")}(e.query)&&(d.method="GET"),new qi(t=>{if("GET"===d.method){const{newURI:e,parseError:t}=function(e,n){const r=[],i=(e,t)=>{r.push(`${e}=${encodeURIComponent(t)}`)};if("query"in n&&i("query",n.query),n.operationName&&i("operationName",n.operationName),n.variables){let e;try{e=JSON.stringify(n.variables)}catch(t){return{parseError:t}}i("variables",e)}if(n.extensions){let e;try{e=JSON.stringify(n.extensions)}catch(t){return{parseError:t}}i("extensions",e)}let a="",o=e;const s=e.indexOf("#");-1!==s&&(a=e.substr(s),o=e.substr(0,s));const l=-1===o.indexOf("?")?"?":"&";return{newURI:o+l+r.join("&")+a}}(i,p);if(t)throw t;i=e}else d.body=JSON.stringify(p);const r=n||La(()=>fetch)||zu,a=t.next.bind(t);return r(i,d).then(t=>{e.setContext({response:t});const n=t.headers?.get("content-type");return null!==n&&/^multipart\/mixed/i.test(n)?async function(e,t){for await(const n of async function*(e){const t=new TextDecoder("utf-8"),n=(e.headers?.get("content-type"))?.match(/;\s*boundary=(?:'([^']+)'|"([^"]+)"|([^"'].+?))\s*(?:;|$)/i),r="\r\n--"+(n?n[1]??n[2]??n[3]??"-":"-");let i="";Ha(e.body&&"function"==typeof e.body.getReader,64);const a=e.body.getReader();let o,s=!1,l=!1;const c=()=>l&&"-"==i[0]&&"-"==i[1];try{for(;!s;){({value:o,done:s}=await a.read());const e="string"==typeof o?o:t.decode(o,{stream:!s}),n=i.length-r.length+1;i+=e;let u=i.indexOf(r,n);for(;u>-1&&!c();){let e;l=!0,[e,i]=[i.slice(0,u),i.slice(u+r.length)];const t=e.indexOf("\r\n\r\n"),n=Nu(e.slice(0,t))["content-type"];if(n&&-1===n.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");const a=e.slice(t);a&&(yield a),u=i.indexOf(r)}if(c())return}throw new Error("premature end of multipart body")}finally{a.cancel()}}(e)){const r=Tu(e,n);if(0!=Object.keys(r).length)if(Su(r)){if(1===Object.keys(r).length&&null===r.payload)return;let e={...r.payload};"errors"in r&&(e.extensions={...e.extensions,[Zc]:new Wc(r.errors??[])}),t(e)}else t(r)}}(t,a):(r=e,e=>e.text().then(t=>{const n=function(e,t){return e.headers.get("content-type")?.includes("application/graphql-response+json")?function(e,t){try{return JSON.parse(t)}catch(n){throw new Xc(n,{response:e,bodyText:t})}}(e,t):Tu(e,t)}(e,t);if(!Array.isArray(n)&&!wu.call(n,"data")&&!wu.call(n,"errors"))throw new Yc(`Server response was malformed for query '${Array.isArray(r)?r.map(e=>e.operationName):r.operationName}'.`,{response:e,bodyText:t});return n}))(t).then(a);var r}).then(()=>{f(),t.complete()}).catch(e=>{f(),t.error(e)}),()=>{h&&h.abort()}})})}},_u=class extends El{constructor(e={}){super((t,n)=>{const r=t.client,i=r.queryManager.clientOptions,a=t.getContext();{const{name:n,version:r,transport:o="headers"}=Do({},i.clientAwareness,e.clientAwareness,a.clientAwareness);"headers"===o&&t.setContext(({headers:e})=>({headers:Do({"apollographql-client-name":n,"apollographql-client-version":r},e)}))}{const{transport:n="extensions"}=Do({},i.enhancedClientAwareness,e.enhancedClientAwareness);"extensions"===n&&(t.extensions=Do({clientLibrary:{name:"@apollo/client",version:r.version}},t.extensions)),"headers"===n&&t.setContext(({headers:e})=>({headers:Do({"apollographql-library-name":"@apollo/client","apollographql-library-version":r.version},e)}))}return n(t)})}},Du=class extends El{constructor(e={}){const{left:t,right:n,request:r}=El.from([new _u(e),new Au(e)]);super(r),Object.assign(this,{left:t,right:n})}},Pu=/* @__PURE__ */new Map,Mu=/* @__PURE__ */new Map,Lu=!1;function Ru(e){return e.replace(/[\s,]+/g," ").trim()}function ju(e){var t,n,r,i=Ru(e);if(!Pu.has(i)){var a=function(e,t){return function(e){if(null==e)return!1;const t=e.hasSubscribers;if(void 0!==t)return t;for(const n of xr)if(e[n].hasSubscribers)return!0;return!1}(vr)?vr.traceSync(()=>si(e,t),{source:e}):si(e,t)}(e,{experimentalFragmentVariables:Lu,allowLegacyFragmentVariables:Lu,experimentalFragmentArguments:Lu});if(!a||"Document"!==a.kind)throw new Error("Not a valid GraphQL document.");Pu.set(i,function(e){var t=new Set(e.definitions);t.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}((t=a,n=/* @__PURE__ */new Set,r=[],t.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,i=Ru((o=e.loc).source.body.substring(o.start,o.end)),a=Mu.get(t);a&&!a.has(i)||a||Mu.set(t,a=/* @__PURE__ */new Set),a.add(i),n.has(i)||(n.add(i),r.push(e))}else r.push(e);var o}),hi(hi({},t),{definitions:r}))))}return Pu.get(i)}function Fu(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach(function(t,n){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[n+1]}),ju(r)}var $u,qu=Fu;($u=Fu||(Fu={})).gql=qu,$u.resetCaches=function(){Pu.clear(),Mu.clear()},$u.disableFragmentWarnings=function(){},$u.enableExperimentalFragmentVariables=function(){Lu=!0},$u.disableExperimentalFragmentVariables=function(){Lu=!1},Fu.default=Fu;var Vu=class extends El{constructor(e){super((t,n)=>new qi(r=>{let i,a,o;try{i=n(t).subscribe({next:i=>{const s=t.client.queryManager.incrementalHandler,l=s.isIncrementalResult(i)?s.extractErrors(i):i.errors;l?o=e({error:new Jc(i,l),result:i,operation:t,forward:n}):eu(i)&&(o=e({error:i.extensions[Zc],result:i,operation:t,forward:n})),a=o?.subscribe(r),a||r.next(i)},error:i=>{o=e({operation:t,error:tu(i),forward:n}),a=o?.subscribe(r),a||r.error(i)},complete:()=>{o||r.complete()}})}catch(AL){e({error:tu(AL),operation:t,forward:n}),r.error(AL)}return()=>{i&&i.unsubscribe(),a&&a.unsubscribe()}}))}},Bu=e=>new Vu(({error:t})=>{if(!Yc.is(t))return;let n=At(t.statusCode,(e=>{try{return JSON.parse(e)}catch{return}})(t.bodyText));n&&zt({reason:n,url:e})}),Uu=e=>{let t="number";return/^"/.test(e)?t=/:$/.test(e)?"text-red-700":"text-green-700":/true|false/.test(e)?t="text-blue-700":/null/.test(e)&&(t=""),`<span class="${t}">${e}</span>`},Hu=/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,Wu=e=>e?.replace(Hu,Uu)??e,Gu=(e,t=!1)=>{let{field:n,value:r}=e;return t?{[n]:{$not:{$regex:r,$options:"i"}}}:{[n]:{$regex:r,$options:"i"}}},Qu=(e,t=!1)=>{let{field:n,value:r}=e;return t?{[n]:{$not:{$regex:`^${r}`,$options:"i"}}}:{[n]:{$regex:`^${r}`,$options:"i"}}},Ju=(e,t=!1)=>{let{field:n,value:r}=e;return t?{[n]:{$not:{$regex:`${r}$`,$options:"i"}}}:{[n]:{$regex:`${r}$`,$options:"i"}}},Ku=(e,t=!1)=>{let{field:n}=e;return t?{[n]:{$ne:""}}:{[n]:""}},Yu=(e,t=!1)=>{let{field:n,value:r}=e,i=[];return"string"==typeof r&&r.includes(",")?i=r.split(",").map(e=>e.trim()):("string"==typeof r||"number"==typeof r)&&(i=[r]),t?{[n]:{$nin:i}}:{[n]:{$in:i}}};function Xu(e,t=!1,n={}){if(!e)return{};let{combinator:r,rules:i,enabled:a}=e;if(!Array.isArray(i)||!1===a)return{};let o=i.filter(e=>!1!==e.enabled).map(e=>"rules"in e?Xu(e,t,n):((e,t)=>{if(!e)return{};let{isBinding:n}=e;n&&(e=((e,t)=>{let{isBinding:n}=e;return n?{...e,value:b(t,e.value,e.value)}:e})(e,t));let{operator:r}=e;switch(r){case"=":case"!=":case"<":case">":case"<=":case">=":return(e=>{let{field:t,operator:n,value:r}=e;switch(n){case"=":return{[t]:r};case"!=":return{[t]:{$ne:r}};case"<":return"string"==typeof r&&Y(r)?{[t]:{$lt:parseFloat(r)}}:{[t]:{$lt:r}};case">":return"string"==typeof r&&Y(r)?{[t]:{$gt:parseFloat(r)}}:{[t]:{$gt:r}};case"<=":return"string"==typeof r&&Y(r)?{[t]:{$lte:parseFloat(r)}}:{[t]:{$lte:r}};case">=":return"string"==typeof r&&Y(r)?{[t]:{$gte:parseFloat(r)}}:{[t]:{$gte:r}};default:return{}}})(e);case"contains":return Gu(e);case"doesNotContain":return Gu(e,!0);case"beginsWith":return Qu(e);case"doesNotBeginWith":return Qu(e,!0);case"endsWith":return Ju(e);case"doesNotEndWith":return Ju(e,!0);case"empty":return Ku(e);case"notEmpty":return Ku(e,!0);case"in":return Yu(e);case"notIn":return Yu(e,!0);case"between":return(e=>{let{field:t,value:n}=e,r=[];return"string"==typeof n&&n.includes(",")&&(r=n.split(",").map(e=>e.trim())),r.length<2?{[t]:!1}:Z(r[0])&&Z(r[1])?{[t]:{$gte:new Date(r[0]),$lte:new Date(r[1])}}:{[t]:{$gte:r[0],$lte:r[1]}}})(e);default:return{}}})(e,n));return t?o:o.length?1===o.length?o[0]:{[`$${r}`]:o}:{}}var Zu=(e,t=!1)=>{let{field:n,value:r}=e;return`${n}${t?" not":""} like '%${r}%'`},ed=(e,t=!1)=>{let{field:n,value:r}=e;return`${n}${t?" not":""} like '${r}%'`},td=(e,t=!1)=>{let{field:n,value:r}=e;return`${n}${t?" not":""} like '%${r}'`},nd=(e,t=!1)=>{let{field:n}=e;return`${n} is${t?" not":""} NULL`},rd=(e,t=!1)=>{let{field:n,value:r}=e,i=[];return"string"==typeof r&&r.includes(",")?i=r.split(","):("string"==typeof r||"number"==typeof r)&&(i=[r.toString()]),0!==i.length&&`${n}${t?" not":""} in (${i.map(e=>`'${e.trim()}'`).join(", ")})`},id=(e,t=!1)=>{let{field:n,value:r}=e,i=[];return"string"==typeof r&&(i=r.split(",").map(e=>e.trim())),!(i.length<2)&&(Z(i[0])&&Z(i[1])?`${n}${t?" not":""} between DATE '${i[0]}' and '${i[1]}'`:`${n}${t?" not":""} between '${i[0]}' and '${i[1]}'`)};function ad(e,t=!0,n={}){if(!e)return"";let{combinator:r,rules:i,enabled:a}=e;if(!Array.isArray(i)||!1===a)return"";let o=i.filter(e=>!1!==e.enabled).map(e=>"rules"in e?`(${t?ad(e,t,n).toString():ad(e,t,n)})`:((e,t)=>{if(!e)return{};let{isBinding:n}=e;n&&(e=((e,t)=>e.isBinding?{...e,value:b(t,e.value,e.value)}:e)(e,t));let{operator:r}=e;switch(r){case"=":case"!=":case"<":case">":case"<=":case">=":return(e=>{let{field:t,value:n,operator:r}=e;return"boolean"==typeof n?`${t} ${r} ${n?"TRUE":"FALSE"}`:"string"!=typeof n||Y(n)?"number"==typeof n||Y(n)?`${t} ${r} ${n}`:Z(n)?`${t} ${r} DATE '${n.toString()}'`:`${t} ${r} '${JSON.stringify(n)}'`:`${t} ${r} '${n}'`})(e);case"contains":return Zu(e);case"doesNotContain":return!Zu(e,!0);case"beginsWith":return ed(e);case"doesNotBeginWith":return ed(e,!0);case"endsWith":return td(e);case"doesNotEndWith":return td(e,!0);case"empty":return nd(e);case"notEmpty":return nd(e,!0);case"in":return rd(e);case"notIn":return rd(e,!0);case"between":return id(e);case"notBetween":return id(e,!0);default:return!1}})(e,n));return t?o:o.join(` ${r} `)}function od(e){if(Array.isArray(e)){let t=!1,n=e.map(e=>{let n=od(e);return n!==e&&(t=!0),n});return t?n:e}if("object"==typeof e&&e){let t={},n=!1;for(let r in e){if("__typename"===r){n=!0;continue}let i=e[r],a=od(i);a!==i&&(n=!0),t[r]=a}return n?t:e}return e}var sd=le({theme:{components:{}},colorMode:"light",toggleColorMode:()=>{},setColorMode:()=>{}});sd.displayName="ThemeContext";var ld=(e,t)=>Object.getOwnPropertyDescriptor(e,t)?.enumerable,cd=(e,t,n="soft",r={})=>{let{skip:i=[],skipFunctions:a=!1}=r;if(e===t&&"soft"===n)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;let a,o,s=[];if(Array.isArray(e)){if(a=e.length,a!=t.length)return!1;for(o=a;0!==o--;)if(!cd(e[o],t[o],n,r))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.values())if(!t.has(o))return!1;for(o of e.entries())if(!cd(o[1],t.get(o[0]),n,r))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(a=e.length,a!=t.length)return!1;for(o=a;0!==o--;)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.unicode===t.unicode&&e.lastIndex===t.lastIndex&&e.sticky===t.sticky;if((e.valueOf!==Object.prototype.valueOf||t.valueOf!==Object.prototype.valueOf)&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if((e.toString!==Object.prototype.toString||t.toString!==Object.prototype.toString)&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if(s="soft"===n?Object.keys(e):Object.getOwnPropertyNames(e),a=s.length,a!==("soft"===n?Object.keys(t).length:Object.getOwnPropertyNames(t).length))return!1;for(o=a;0!==o--;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=a;0!==o--;){let a=s[o];if("_owner"===a&&e.$$typeof)continue;let l="soft"===n||ld(e,a)||!i.includes(a);if(!cd(e[a],t[a],n,r)&&l)return!1}return!0}return!!("hard"===n&&e===t||a&&"function"==typeof e&&"function"==typeof t)||e!=e&&t!=t},ud=cd,dd=(e,t="soft",n={})=>{let r=we(e);return ud(r.current,e,t,n)?r.current:(r.current=e,e)},pd=(e=/* @__PURE__ */new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),hd="-",fd=[],md=e=>{const t=bd(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return yd(e);const n=e.split(hd),r=""===n[0]&&n.length>1?1:0;return gd(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],i=n[e];return t?i?((e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(i,t):t:i||fd}return n[e]||fd}}},gd=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],i=n.nextPart.get(r);if(i){const n=gd(e,t+1,i);if(n)return n}const a=n.validators;if(null===a)return;const o=0===t?e.join(hd):e.slice(t).join(hd),s=a.length;for(let l=0;l<s;l++){const e=a[l];if(e.validator(o))return e.classGroupId}},yd=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),bd=e=>{const{theme:t,classGroups:n}=e;return vd(n,t)},vd=(e,t)=>{const n=pd();for(const r in e){const i=e[r];xd(i,n,r,t)}return n},xd=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const i=e[a];kd(i,t,n,r)}},kd=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?Nd(e,t,n,r):Sd(e,t,n,r):wd(e,t,n)},wd=(e,t,n)=>{(""===e?t:Td(t,e)).classGroupId=n},Sd=(e,t,n,r)=>{Cd(e)?xd(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},Nd=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let o=0;o<a;o++){const[e,a]=i[o];xd(a,Td(t,e),n,r)}},Td=(e,t)=>{let n=e;const r=t.split(hd),i=r.length;for(let a=0;a<i;a++){const e=r[a];let t=n.nextPart.get(e);t||(t=pd(),n.nextPart.set(e,t)),n=t}return n},Cd=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,Ed=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(i(e,t),t):void 0},set(e,t){e in n?n[e]=t:i(e,t)}}},Id=[],zd=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Od=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,i=0,a=0;const o=e.length;for(let u=0;u<o;u++){const o=e[u];if(0===r&&0===i){if(":"===o){t.push(e.slice(a,u)),a=u+1;continue}if("/"===o){n=u;continue}}"["===o?r++:"]"===o?r--:"("===o?i++:")"===o&&i--}const s=0===t.length?e:e.slice(a);let l=s,c=!1;return s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0),zd(t,c,l,n&&n>a?n-a:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):zd(Id,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},Ad=e=>{const t=/* @__PURE__ */new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let i=0;i<e.length;i++){const a=e[i],o="["===a[0],s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},_d=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},Dd=/\s+/,Pd=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Pd(e[r]))&&(n&&(n+=" "),n+=t);return n},Md=(e,...t)=>{let n,r,i,a;const o=e=>{const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],l=e.trim().split(Dd);let c="";for(let u=l.length-1;u>=0;u-=1){const e=l[u],{isExternal:t,modifiers:d,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:f}=n(e);if(t){c=e+(c.length>0?" "+c:c);continue}let m,g=!!f;if(g){m=r(h.substring(0,f));const e=m&&o[m]?r(h):void 0;e&&e!==m&&(m=e,g=!1)}else m=r(h);if(!m){if(!g){c=e+(c.length>0?" "+c:c);continue}if(m=r(h),!m){c=e+(c.length>0?" "+c:c);continue}g=!1}const y=0===d.length?"":1===d.length?d[0]:a(d).join(":"),b=p?y+"!":y,v=b+m;if(s.indexOf(v)>-1)continue;s.push(v);const x=i(m,g);for(let n=0;n<x.length;++n){const e=x[n];s.push(b+e)}c=e+(c.length>0?" "+c:c)}return c})(e,n);return i(e,a),a};return a=s=>{const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:Ed(e.cacheSize),parseClassName:Od(e),sortModifiers:Ad(e),postfixLookupClassGroupIds:_d(e),...md(e)}))(l),r=n.cache.get,i=n.cache.set,a=o,o(s)},(...e)=>a(((...e)=>{let t,n,r=0,i="";for(;r<e.length;)(t=e[r++])&&(n=Pd(t))&&(i&&(i+=" "),i+=n);return i})(...e))},Ld=[],Rd=e=>{const t=t=>t[e]||Ld;return t.isThemeGetter=!0,t.themeKey=e,t},jd=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Fd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$d=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,qd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Ud=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wd=e=>$d.test(e),Gd=e=>!!e&&!Number.isNaN(Number(e)),Qd=e=>!!e&&Number.isInteger(Number(e)),Jd=e=>e.endsWith("%")&&Gd(e.slice(0,-1)),Kd=e=>qd.test(e),Yd=()=>!0,Xd=e=>Vd.test(e)&&!Bd.test(e),Zd=()=>!1,ep=e=>Ud.test(e),tp=e=>Hd.test(e),np=e=>!ap(e)&&!hp(e),rp=e=>e.startsWith("@container")&&("/"===e[10]&&void 0!==e[11]||"s"===e[11]&&void 0!==e[16]&&e.startsWith("-size/",10)||"n"===e[11]&&void 0!==e[18]&&e.startsWith("-normal/",10)),ip=e=>kp(e,Tp,Zd),ap=e=>jd.test(e),op=e=>kp(e,Cp,Xd),sp=e=>kp(e,Ep,Gd),lp=e=>kp(e,zp,Yd),cp=e=>kp(e,Ip,Zd),up=e=>kp(e,Sp,Zd),dp=e=>kp(e,Np,tp),pp=e=>kp(e,Op,ep),hp=e=>Fd.test(e),fp=e=>wp(e,Cp),mp=e=>wp(e,Ip),gp=e=>wp(e,Sp),yp=e=>wp(e,Tp),bp=e=>wp(e,Np),vp=e=>wp(e,Op,!0),xp=e=>wp(e,zp,!0),kp=(e,t,n)=>{const r=jd.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},wp=(e,t,n=!1)=>{const r=Fd.exec(e);return!!r&&(r[1]?t(r[1]):n)},Sp=e=>"position"===e||"percentage"===e,Np=e=>"image"===e||"url"===e,Tp=e=>"length"===e||"size"===e||"bg-size"===e,Cp=e=>"length"===e,Ep=e=>"number"===e,Ip=e=>"family-name"===e,zp=e=>"number"===e||"weight"===e,Op=e=>"shadow"===e,Ap=/*#__PURE__*/Md(()=>{const e=Rd("color"),t=Rd("font"),n=Rd("text"),r=Rd("font-weight"),i=Rd("tracking"),a=Rd("leading"),o=Rd("breakpoint"),s=Rd("container"),l=Rd("spacing"),c=Rd("radius"),u=Rd("shadow"),d=Rd("inset-shadow"),p=Rd("text-shadow"),h=Rd("drop-shadow"),f=Rd("blur"),m=Rd("perspective"),g=Rd("aspect"),y=Rd("ease"),b=Rd("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",hp,ap],x=()=>[hp,ap,l],k=()=>[Wd,"full","auto",...x()],w=()=>[Qd,"none","subgrid",hp,ap],S=()=>["auto",{span:["full",Qd,hp,ap]},Qd,hp,ap],N=()=>[Qd,"auto",hp,ap],T=()=>["auto","min","max","fr",hp,ap],C=()=>["auto",...x()],E=()=>[Wd,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],I=()=>[s,Wd,"screen","full","dvw","lvw","svw","min","max","fit",...x()],z=()=>[Wd,"screen","full","lh","dvh","lvh","svh","min","max","fit",...x()],O=()=>[e,hp,ap],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",gp,up,{position:[hp,ap]}],_=()=>["auto","cover","contain",yp,ip,{size:[hp,ap]}],D=()=>[Jd,fp,op],P=()=>["","none","full",c,hp,ap],M=()=>["",Gd,fp,op],L=()=>[Gd,Jd,gp,up],R=()=>["","none",f,hp,ap],j=()=>["none",Gd,hp,ap],F=()=>["none",Gd,hp,ap],$=()=>[Gd,hp,ap],q=()=>[Wd,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Kd],breakpoint:[Kd],color:[Yd],container:[Kd],"drop-shadow":[Kd],ease:["in","out","in-out"],font:[np],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Kd],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Kd],shadow:[Kd],spacing:["px",Gd],text:[Kd],"text-shadow":[Kd],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Wd,ap,hp,g]}],container:["container"],"container-type":[{"@container":["","normal","size",hp,ap]}],"container-named":[rp],columns:[{columns:[Gd,"auto",ap,hp,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{"inset-s":k(),start:k()}],end:[{"inset-e":k(),end:k()}],"inset-bs":[{"inset-bs":k()}],"inset-be":[{"inset-be":k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Qd,"auto",hp,ap]}],basis:[{basis:[Wd,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Gd,Wd,"auto","initial","none",ap]}],grow:[{grow:["",Gd,hp,ap]}],shrink:[{shrink:["",Gd,hp,ap]}],order:[{order:[Qd,"first","last","none",hp,ap]}],"grid-cols":[{"grid-cols":w()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":w()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":T()}],"auto-rows":[{"auto-rows":T()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pbs:[{pbs:x()}],pbe:[{pbe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mbs:[{mbs:C()}],mbe:[{mbe:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:E()}],"inline-size":[{inline:["auto",...I()]}],"min-inline-size":[{"min-inline":["auto",...I()]}],"max-inline-size":[{"max-inline":["none",...I()]}],"block-size":[{block:["auto",...z()]}],"min-block-size":[{"min-block":["auto",...z()]}],"max-block-size":[{"max-block":["none",...z()]}],w:[{w:[s,"screen",...E()]}],"min-w":[{"min-w":[s,"screen","none",...E()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...E()]}],h:[{h:["screen","lh",...E()]}],"min-h":[{"min-h":["screen","lh","none",...E()]}],"max-h":[{"max-h":["screen","lh","none",...E()]}],"font-size":[{text:["base",n,fp,op]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,xp,lp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jd,ap]}],"font-family":[{font:[mp,cp,t]}],"font-features":[{"font-features":[ap]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,hp,ap]}],"line-clamp":[{"line-clamp":[Gd,"none",hp,sp]}],leading:[{leading:["none",a,...x()]}],"list-image":[{"list-image":["none",hp,ap]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",hp,ap]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Gd,"from-font","auto",hp,op]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[Gd,"auto",hp,ap]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"tab-size":[{tab:[Qd,hp,ap]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",hp,ap]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",hp,ap]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qd,hp,ap],radial:["",hp,ap],conic:["",Qd,hp,ap]},bp,dp]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:D()}],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-bs":[{"border-bs":M()}],"border-w-be":[{"border-be":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Gd,hp,ap]}],"outline-w":[{outline:["",Gd,fp,op]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","inner","none",u,vp,pp]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",d,vp,pp]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[Gd,op]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",p,vp,pp]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[Gd,hp,ap]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Gd]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[hp,ap]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Gd]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",hp,ap]}],filter:[{filter:["","none",hp,ap]}],blur:[{blur:R()}],brightness:[{brightness:[Gd,hp,ap]}],contrast:[{contrast:[Gd,hp,ap]}],"drop-shadow":[{"drop-shadow":["","none",h,vp,pp]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",Gd,hp,ap]}],"hue-rotate":[{"hue-rotate":[Gd,hp,ap]}],invert:[{invert:["",Gd,hp,ap]}],saturate:[{saturate:[Gd,hp,ap]}],sepia:[{sepia:["",Gd,hp,ap]}],"backdrop-filter":[{"backdrop-filter":["","none",hp,ap]}],"backdrop-blur":[{"backdrop-blur":R()}],"backdrop-brightness":[{"backdrop-brightness":[Gd,hp,ap]}],"backdrop-contrast":[{"backdrop-contrast":[Gd,hp,ap]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Gd,hp,ap]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Gd,hp,ap]}],"backdrop-invert":[{"backdrop-invert":["",Gd,hp,ap]}],"backdrop-opacity":[{"backdrop-opacity":[Gd,hp,ap]}],"backdrop-saturate":[{"backdrop-saturate":[Gd,hp,ap]}],"backdrop-sepia":[{"backdrop-sepia":["",Gd,hp,ap]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",hp,ap]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Gd,"initial",hp,ap]}],ease:[{ease:["linear","initial",y,hp,ap]}],delay:[{delay:[Gd,hp,ap]}],animate:[{animate:["none",b,hp,ap]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,hp,ap]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:j()}],"rotate-x":[{"rotate-x":j()}],"rotate-y":[{"rotate-y":j()}],"rotate-z":[{"rotate-z":j()}],scale:[{scale:F()}],"scale-x":[{"scale-x":F()}],"scale-y":[{"scale-y":F()}],"scale-z":[{"scale-z":F()}],"scale-3d":["scale-3d"],skew:[{skew:$()}],"skew-x":[{"skew-x":$()}],"skew-y":[{"skew-y":$()}],transform:[{transform:[hp,ap,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:q()}],"translate-x":[{"translate-x":q()}],"translate-y":[{"translate-y":q()}],"translate-z":[{"translate-z":q()}],"translate-none":["translate-none"],zoom:[{zoom:[Qd,hp,ap]}],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",hp,ap]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mbs":[{"scroll-mbs":x()}],"scroll-mbe":[{"scroll-mbe":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pbs":[{"scroll-pbs":x()}],"scroll-pbe":[{"scroll-pbe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",hp,ap]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[Gd,fp,op,sp]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),_p=function(e,{componentKey:t,className:n,variants:r}){let{theme:i}=he(sd);e=dd(e);let a=dd(n),o=fe((t,n={},r="")=>(n={...n,className:r},"string"==typeof e?b(i.components[e],t,void 0)?.(n)??r:e.map(e=>b(i.components[e],t,void 0)?.(n)).filter(Boolean).join(" ")||r),[i.components,e]);return t=xe(()=>void 0!==t?t:e&&"string"==typeof e?Object.keys(i.components[e]):Array.isArray(e)&&e.length>0?e.map(e=>Object.keys(i.components[e])).flat():void 0,[e,i.components]),xe(()=>{if(t&&"string"==typeof t)return Ap(o(t,r,a&&"object"==typeof a?b(a,t,""):a));if(t&&Array.isArray(t)){let e={};return t.forEach((t,n)=>{let i;"object"==typeof a?i=b(a,t):"string"==typeof a&&0===n&&(i=a);let l=Ap(o(t,r,i));t.split(".").length>1?s(e,t.split(".").slice(1).join("."),l):s(e,t,l)}),e}return""},[t,a,o,r])},Dp=({ref:e,className:t,children:n,testId:r,direction:i,wrap:a,items:o,gap:s,justify:l,grow:c,basis:u,alignItems:d,shrink:p,...h})=>(t=_p("Flex",{className:t,componentKey:"root",variants:{direction:i,wrap:a,items:o,gap:s,justify:l,grow:c,basis:u,shrink:p,alignItems:d}}),/* @__PURE__ */Ie("div",{...h,"data-testid":r,className:t,ref:e,children:n})),Pp=(e,t,n="primary")=>e?"disabled":t&&"primary"===n?"primaryActive":t&&"secondary"===n?"secondaryActive":t&&"tertiary"===n?"tertiaryActive":n,Mp=({className:e,children:t,icon:n,active:r=!1,disabled:i=!1,testId:a,intent:o,size:s,cursor:l,title:c,...u})=>{let d=_p("Icon",{className:e,componentKey:"root",variants:{intent:Pp(i,r,o),size:s,cursor:i?"disabled":l}}),{iconChildren:p}=xe(()=>{let e={iconChildren:void 0};return ae.forEach(t,t=>{de(t)&&(e.iconChildren=se(t,{...u,className:wt({"h-[1em] w-[1em]":"custom"!==s},d,t.props.className),title:c}))}),e},[t,d,u,s,c]);return p||/* @__PURE__ */Ie("i",{...u,title:c,"data-testid":a,className:wt(n,d)})},Lp=({ref:e,children:t,testId:n,className:r="",iconPlacement:i="none",loading:a=!1,disabled:o=!1,type:s="button",size:l,intent:c,border:u,justify:d,items:p,aspect:h,...f})=>{let m=_p("Button",{className:r,componentKey:["root","icon"],variants:{intent:c,size:l,border:u,justify:d,items:p,disabled:o,aspect:h}}),{iconChildren:g,contentChildren:y}=xe(()=>{let e={iconChildren:void 0,contentChildren:void 0};return ae.forEach(t,t=>{if("string"!=typeof t){if(de(t))if(t.type===Mp){let r=t.props;e.iconChildren=se(t,{className:wt(m.icon,r.className),size:l,testId:n?`${n}-icon`:void 0,...r,intent:r.intent??"custom"})}else if("i"===t.type){let r=t.props;e.iconChildren=se(t,{className:wt(m.icon,r.className),size:l,"data-testid":n?`${n}-icon`:void 0,...r,intent:r.intent??"custom"})}else e.contentChildren=t}else e.contentChildren=t}),e},[t,m.icon,l,n]);/* @__PURE__ */
4
4
  return ze("button",{ref:e,type:s,"data-testid":n,className:m.root,disabled:o,...f,children:[!a&&y&&/* @__PURE__ */ze(Ee,{children:[("before"===i||"both"===i)&&y&&g,y,("after"===i||"both"===i)&&y&&g]}),!a&&!y&&g,a&&/* @__PURE__ */Ie("i",{className:"fa-solid fa-sync fa-spin text-base"})]})};Lp.Icon=Mp;var Rp={root:Et("flex outline-none select-none border transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-offset-2",{variants:{intent:{primary:["border-transparent bg-primary-500 text-white","hover:bg-primary-600","focus-visible:ring-primary-500","dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus-visible:ring-primary-400"],secondary:["border-gray-300 text-zinc-700 hover:border-gray-400 hover:bg-gray-50 hover:text-zinc-900","focus-visible:ring-gray-400","dark:border-zinc-700 dark:text-zinc-300 dark:hover:border-zinc-400 dark:hover:bg-zinc-700/50 dark:hover:text-white dark:focus-visible:ring-zinc-500"],danger:["border-transparent bg-red-500 text-white hover:bg-red-600","focus-visible:ring-red-500","dark:bg-red-600 dark:hover:bg-red-700"],custom:""},disabled:{true:["disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none"],false:"cursor-pointer"},aspect:{square:"aspect-square",custom:""},size:{md:"py-2 px-4 gap-2 text-sm rounded-lg",sm:"py-1.5 px-3 gap-1.5 text-sm rounded",xs:"py-1 px-2 gap-1 text-xs rounded-sm min-w-6",custom:""},border:{solid:"border-solid",none:"border-none",custom:""},items:{start:"",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},justify:{normal:"justify-normal",start:"",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"}},compoundVariants:[],defaultVariants:{items:"center",justify:"center",intent:"primary",border:"solid",size:"md",disabled:!1,aspect:"custom"}}),icon:Et("shrink-0",{variants:{intent:{default:""},size:{md:"text-sm",sm:"text-xs",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"default",size:"md"}})},jp=Lp,Fp=({className:e,message:t,disabled:n=!1,error:r=!1,intent:i,size:a})=>(e=_p("ErrorMessage",{className:e,componentKey:"root",variants:{intent:i,size:a,error:r,disabled:n}}),/* @__PURE__ */Ie("p",{className:e,children:t})),$p=({className:e,children:t,disabled:n=!1,error:r=!1,intent:i,size:a,...o})=>(e=_p("Label",{className:e,componentKey:"root",variants:{intent:i,size:a,error:r,disabled:n}}),/* @__PURE__ */Ie("label",{className:e,...o,children:t})),qp=({ref:e,className:t,id:n,label:r,error:i,disabled:a,intent:o,size:s,prefix:l,children:c,loading:u,clearable:d,inline:p,value:h,onClear:f,...m})=>{let g=_p("Input",{className:t,componentKey:["root","label","inputContainer","iconFloatingContainer","icon","iconError","iconClear"],variants:{intent:o,size:s,disabled:a||u,error:!!i,inline:p}}),y=fe(e=>f?.(e),[f]),{iconChildren:b,inputChildren:v}=xe(()=>{let e={iconChildren:void 0,inputChildren:[]};return ae.forEach(c,t=>{if(de(t))if(t.type===Mp){let n=t.props;e.iconChildren=se(t,{className:wt(g.icon,n.className),size:s,...n,intent:n.intent??"custom"})}else e.inputChildren.push(t)}),e},[c,g.icon,s]);/* @__PURE__ */
5
5
  return ze("div",{className:g.root,ref:e,...m,children:[r&&!p&&/* @__PURE__ */Ie($p,{error:!!i,disabled:a,intent:o,size:s,htmlFor:n,className:g.label,children:r}),
6
6
  /* @__PURE__ */ze("div",{className:g.inputContainer,children:[b,!!l&&l,!p&&v,p&&/* @__PURE__ */ze($p,{error:!!i,disabled:a,intent:o,size:s,htmlFor:n,className:g.label,children:[v,r]}),!a&&(!!i||u||d&&!!h)&&/* @__PURE__ */ze("div",{className:g.iconFloatingContainer,children:[i&&!u&&/* @__PURE__ */Ie(Mp,{intent:"custom",icon:"fa-solid fa-circle-exclamation",className:g.iconError}),u&&/* @__PURE__ */Ie(Mp,{icon:"fa-solid fa-sync fa-spin",className:g.iconLoading}),!u&&d&&!!h&&/* @__PURE__ */Ie(Mp,{className:g.iconClear,icon:"fa-solid fa-xmark",onClick:y})]})]}),i&&/* @__PURE__ */Ie(Fp,{message:"boolean"==typeof i?"":i,intent:o,size:s,error:!!i})]})},Vp=(e,t,n=!1)=>{let r=we(n),i=we(t);ge(()=>{if(r.current){let n=i.current;return i.current=t,e(n)}r.current=!0,i.current=t},t)},Bp=Object.assign(pe(({ref:e,children:t,className:n="",id:r,label:i="",placeholder:a="",loading:o=!1,disabled:s=!1,clearable:l=!1,inline:c=!1,prefix:u="",type:d="text",size:p,intent:h="primary",value:f="",error:m=!1,containerProps:g,onChange:y,...b})=>{let v=_p("Input",{className:n&&"object"==typeof n?n.input:"",componentKey:"input",variants:{intent:h,size:p,disabled:s||o,error:!!m,inline:c}}),x=fe(e=>y?.(e.target.value),[y]),k=fe(()=>y?.(""),[y]);/* @__PURE__ */
7
- return ze(qp,{className:n,id:r,label:i,loading:o,clearable:l,value:f,prefix:u,disabled:s,error:m,intent:h,size:p,onClear:k,...g,children:[t,/* @__PURE__ */Ie("input",{ref:e,id:r,type:d,placeholder:a,className:v,disabled:s||o,value:f,onChange:x,...b})]})}),{Icon:Mp}),Up={root:Et("flex flex-col",{variants:{intent:{primary:"",custom:""},disabled:{true:"opacity-60 pointer-events-none",false:""},size:{md:"gap-1.5",sm:"gap-1 text-sm",xs:"gap-1 text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),inputContainer:Et("flex items-center border relative transition-colors duration-150 focus-within:ring-2 focus-within:ring-offset-0",{variants:{intent:{primary:"bg-white text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",custom:""},error:{true:"border-red-500 focus-within:ring-red-500/30",false:"border-gray-300 dark:border-zinc-700 focus-within:ring-primary-500/30 dark:focus-within:ring-primary-400/30 hover:border-gray-400 dark:hover:border-zinc-500"},disabled:{true:"cursor-not-allowed opacity-60 pointer-events-none",false:""},size:{md:"py-2 px-3 gap-2 rounded-lg",sm:"py-1.5 px-2.5 gap-1.5 rounded",xs:"py-1 px-2 gap-1 rounded-sm",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",error:!1,disabled:!1,size:"md"}}),input:Et("p-0 border-0 outline-none focus:ring-0 w-full bg-transparent",{variants:{intent:{primary:"text-zinc-900 placeholder:text-zinc-400 dark:text-zinc-200 dark:placeholder:text-zinc-500"},error:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:""},size:{md:"text-sm",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md",disabled:!1,error:!1}}),label:Et("text-sm font-medium text-zinc-700 dark:text-zinc-300",{variants:{inline:{true:"flex select-none items-center",false:""},disabled:{true:"",false:""},size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[{inline:!0,disabled:!0,className:"cursor-not-allowed"},{inline:!0,disabled:!1,className:"cursor-pointer"},{inline:!0,size:"md",className:"gap-2"},{inline:!0,size:"sm",className:"gap-1.5"},{inline:!0,size:"xs",className:"gap-1"}],defaultVariants:{inline:!1,disabled:!1,size:"md"}}),iconFloatingContainer:Et("flex items-center justify-center",{variants:{intent:{primary:""},size:{md:"gap-2",sm:"gap-1.5",xs:"gap-1",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),icon:Et("border-r border-gray-300 dark:border-zinc-700 text-zinc-400 dark:text-zinc-500 shrink-0",{variants:{intent:{primary:""},error:{true:"text-red-500 dark:text-red-400",false:""},size:{md:"pr-2.5 mr-0.5",sm:"pr-2 mr-0.5",xs:"pr-1.5 mr-0.5",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),iconError:Et("",{variants:{intent:{primary:""},error:{true:"text-red-500 dark:text-red-400",false:""}},compoundVariants:[],defaultVariants:{intent:"primary"}}),iconClear:Et("cursor-pointer text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-150"),iconLoading:Et("text-zinc-400 dark:text-zinc-500")},Hp=Bp,Wp=(e,t)=>`${e}_${t}`,Gp=({id:e="",source:t,name:n,fields:r=[]})=>{let{useStoreSetter:i}=a(),o=i(),s=xe(()=>`${e}_${X(8)}`,[e]);ge(()=>{if(t)return o(`sources.${s}`,{id:s,meta:{id:e,source:t,name:n,fields:r}}),()=>o(`sources.${s}`,void 0,{unmount:!0})},[s,t]),ge(()=>{t&&o(`sources.${s}.meta.fields`,r,{raw:!0})},[r,t,s,o])},Qp=(e,t={})=>Array.isArray(e)?e.reduce((e,n)=>{let{name:r,value:i,subValues:a}=n;if(!Array.isArray(a)||0===a.length)return{...e,[r]:i};let o=a.find(e=>V(e.when,t));return{...e,[r]:o?o.value:i}},{}):{},Jp=le({logs:[],providers:{}});Jp.displayName="DevToolsContext";var Kp=new class{callbackInternal;callbackAddProvider;callbackRemoveProvider;pendingLimit=100;logsListenedLimit=1e3;pendingLogs=[];listening=!1;listeningCategory;logsListened=[];listeningParams;#e=[];#t=!1;constructor(e,t=100){this.callbackInternal=e,this.pendingLimit=t}setCallback(e){this.callbackInternal=e}processPendingLogs(){if(this.pendingLogs.length&&this.callbackInternal){for(let e of this.pendingLogs)this.callbackInternal(e.logType,e.category,e.message,e.params,e.time);this.pendingLogs=[]}}setCallbackAddProvider(e){this.callbackAddProvider=e}setCallbackRemoveProvider(e){this.callbackRemoveProvider=e}flush(e=!1){this.logsListened=[],e&&(this.pendingLogs=[])}#n(e,t,n,r){let i=this.getTime(!0);if(!this.callbackInternal)return this.pendingLogs.push({logType:e,category:t,message:n,params:r,time:i}),void(this.pendingLogs.length>this.pendingLimit&&this.pendingLogs.shift());this.listening?this.logsListened.push({logType:e,category:t,message:n,params:r,time:i}):(this.#e.push({logType:e,category:t,message:n,params:r,time:i}),this.#r()),this.logsListened.length>this.logsListenedLimit&&this.logsListened.shift()}#r(){this.#t||(this.#t=!0,queueMicrotask(()=>{this.#t=!1;let e=this.callbackInternal,t=this.#e;if(this.#e=[],e)for(let n of t)e(n.logType,n.category,n.message,n.params,n.time)}))}addProviderMethod(e,t){this.callbackAddProvider?.(e,t)}removeProviderMethod(e){"function"==typeof this.callbackRemoveProvider&&this.callbackRemoveProvider(e)}getTime(e=!1){let t=/* @__PURE__ */new Date;return e?L(t,"HH:mm:ss.SSS"):t}info(e,t,n){this.#n("info",e,t,n)}warning(e,t,n){this.#n("warning",e,t,n)}danger(e,t,n){this.#n("danger",e,t,n)}success(e,t,n){this.#n("success",e,t,n)}begin(e){this.listening=!0,this.listeningParams={category:e}}end(){this.listening=!1,this.listeningCategory&&this.logsListened.length>0&&this.callbackInternal?.("info",this.listeningCategory,`${this.logsListened.length} Log${1===this.logsListened.length?"":"s"}`,{logs:this.logsListened}),this.logsListened=[],this.listeningCategory=void 0}};function Yp(e="store"){return({path:t,prevValue:n,nextValue:r})=>{Kp.info("store",e,{storeName:e,path:t,prev:n,next:r})}}var Xp="data-plitzi-fonts",Zp=e=>{let t=we(e);return t.current!==e&&!ud(t.current,e)&&(t.current=e),t.current},eh={platform:{desktop:{},tablet:{},mobile:{}},mode:"desktop-first",theme:{default:"system",schemes:["light","dark"]},variables:{},fonts:[],cache:""},th=(Object.values({DISPLAY:"display",FLEX_WRAP:"flex-wrap",FLEX_DIRECTION:"flex-direction",ALIGN_ITEMS:"align-items",JUSTIFY_ITEMS:"justify-items",JUSTIFY_CONTENT:"justify-content",ALIGN_CONTENT:"align-content",ROW_GAP:"row-gap",COLUMN_GAP:"column-gap",GRID_ROW_GAP:"grid-row-gap",GRID_COLUMN_GAP:"grid-column-gap",GRID_TEMPLATE_AREAS:"grid-template-areas",GRID_TEMPLATE_COLUMNS:"grid-template-columns",GRID_TEMPLATE_ROWS:"grid-template-rows",GRID_AUTO_FLOW:"grid-auto-flow",GRID_AUTO_ROWS:"grid-auto-rows",GRID_AUTO_COLUMNS:"grid-auto-columns",GRID_ROW_START:"grid-row-start",GRID_COLUMN_START:"grid-column-start",GRID_ROW_END:"grid-row-end",GRID_COLUMN_END:"grid-column-end",ALIGN_SELF:"align-self",JUSTIFY_SELF:"justify-self",ORDER:"order",FLEX_GROW:"flex-grow",FLEX_SHRINK:"flex-shrink",FLEX_BASIS:"flex-basis",LIST_STYLE:"list-style",LIST_STYLE_TYPE:"list-style-type",LIST_STYLE_POSITION:"list-style-position",LIST_STYLE_IMAGE:"list-style-image",BACKGROUND_COLOR:"background-color",BACKGROUND_IMAGE:"background-image",BACKGROUND_POSITION:"background-position",BACKGROUND_SIZE:"background-size",BACKGROUND_REPEAT:"background-repeat",BACKGROUND_ORIGIN:"background-origin",BACKGROUND_CLIP:"background-clip",BACKGROUND_ATTACHMENT:"background-attachment",BACKGROUND_BLEND_MODE:"background-blend-mode",MASK_IMAGE:"mask-image",BORDER_TOP_STYLE:"border-top-style",BORDER_TOP_WIDTH:"border-top-width",BORDER_TOP_COLOR:"border-top-color",BORDER_BOTTOM_STYLE:"border-bottom-style",BORDER_BOTTOM_WIDTH:"border-bottom-width",BORDER_BOTTOM_COLOR:"border-bottom-color",BORDER_LEFT_STYLE:"border-left-style",BORDER_LEFT_WIDTH:"border-left-width",BORDER_LEFT_COLOR:"border-left-color",BORDER_RIGHT_STYLE:"border-right-style",BORDER_RIGHT_WIDTH:"border-right-width",BORDER_RIGHT_COLOR:"border-right-color",BORDER_TOP_LEFT_RADIUS:"border-top-left-radius",BORDER_TOP_RIGHT_RADIUS:"border-top-right-radius",BORDER_BOTTOM_LEFT_RADIUS:"border-bottom-left-radius",BORDER_BOTTOM_RIGHT_RADIUS:"border-bottom-right-radius",BORDER_COLLAPSE:"border-collapse",BORDER_SPACING:"border-spacing",TABLE_LAYOUT:"table-layout",OPACITY:"opacity",VISIBILITY:"visibility",CURSOR:"cursor",TRANSITION:"transition",TRANSITION_PROPERTY:"transition-property",TRANSITION_DURATION:"transition-duration",TRANSITION_TIMING_FUNCTION:"transition-timing-function",TRANSITION_DELAY:"transition-delay",ANIMATION:"animation",ANIMATION_NAME:"animation-name",ANIMATION_DURATION:"animation-duration",ANIMATION_TIMING_FUNCTION:"animation-timing-function",ANIMATION_DELAY:"animation-delay",ANIMATION_ITERATION_COUNT:"animation-iteration-count",ANIMATION_DIRECTION:"animation-direction",ANIMATION_FILL_MODE:"animation-fill-mode",ANIMATION_PLAY_STATE:"animation-play-state",BOX_SHADOW:"box-shadow",FILTER:"filter",BACKDROP_FILTER:"backdrop-filter",MIX_BLEND_MODE:"mix-blend-mode",ISOLATION:"isolation",CLIP_PATH:"clip-path",TRANSFORM:"transform",TRANSFORM_ORIGIN:"transform-origin",PERSPECTIVE:"perspective",WILL_CHANGE:"will-change",OUTLINE_WIDTH:"outline-width",OUTLINE_STYLE:"outline-style",OUTLINE_COLOR:"outline-color",OUTLINE_OFFSET:"outline-offset",POINTER_EVENTS:"pointer-events",USER_SELECT:"user-select",TOUCH_ACTION:"touch-action",RESIZE:"resize",APPEARANCE:"appearance",SCROLL_BEHAVIOR:"scroll-behavior",OVERSCROLL_BEHAVIOR:"overscroll-behavior",ACCENT_COLOR:"accent-color",CARET_COLOR:"caret-color",COLOR_SCHEME:"color-scheme",POSITION:"position",FLOAT:"float",CLEAR:"clear",Z_INDEX:"z-index",TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right",BOX_SIZING:"box-sizing",ASPECT_RATIO:"aspect-ratio",WIDTH:"width",HEIGHT:"height",MIN_WIDTH:"min-width",MIN_HEIGHT:"min-height",MAX_WIDTH:"max-width",MAX_HEIGHT:"max-height",OVERFLOW:"overflow",OVERFLOW_X:"overflow-x",OVERFLOW_Y:"overflow-y",OBJECT_FIT:"object-fit",OBJECT_POSITION:"object-position",COLUMN_WIDTH:"column-width",COLUMN_COUNT:"column-count",MARGIN_TOP:"margin-top",MARGIN_BOTTOM:"margin-bottom",MARGIN_LEFT:"margin-left",MARGIN_RIGHT:"margin-right",PADDING_TOP:"padding-top",PADDING_BOTTOM:"padding-bottom",PADDING_LEFT:"padding-left",PADDING_RIGHT:"padding-right",FONT_FAMILY:"font-family",FONT_WEIGHT:"font-weight",FONT_SIZE:"font-size",LINE_HEIGHT:"line-height",COLOR:"color",TEXT_ALIGN:"text-align",FONT_STYLE:"font-style",FONT_VARIANT:"font-variant",TEXT_DECORATION:"text-decoration",TEXT_DECORATION_LINE:"text-decoration-line",TEXT_DECORATION_COLOR:"text-decoration-color",TEXT_DECORATION_STYLE:"text-decoration-style",TEXT_DECORATION_THICKNESS:"text-decoration-thickness",TEXT_UNDERLINE_OFFSET:"text-underline-offset",LETTER_SPACING:"letter-spacing",WORD_SPACING:"word-spacing",TEXT_INDENT:"text-indent",TEXT_TRANSFORM:"text-transform",DIRECTION:"direction",WHITE_SPACE:"white-space",TEXT_WRAP:"text-wrap",WORD_BREAK:"word-break",OVERFLOW_WRAP:"overflow-wrap",HYPHENS:"hyphens",VERTICAL_ALIGN:"vertical-align",TEXT_OVERFLOW:"text-overflow",TEXT_SHADOW:"text-shadow",LINE_CLAMP:"line-clamp",WEBKIT_LINE_CLAMP:"-webkit-line-clamp",WEBKIT_BOX_ORIENT:"-webkit-box-orient",FILL:"fill",STROKE:"stroke",STROKE_WIDTH:"stroke-width"}).map(e=>({path:e,label:e})),e=>e.links.filter(e=>"stylesheet"===e.rel).reduce((e,t,n)=>{let r=`font-${n}`;return{...e,[r]:{type:"link",id:r,params:{href:t.href,type:"text/css",rel:"stylesheet"}}}},{})),nh="https://fonts.googleapis.com",rh={woff2:"font/woff2",woff:"font/woff"},ih=e=>{try{let t=new URL(e);return"https:"===t.protocol&&!t.username&&!t.password}catch{return!1}},ah=e=>{try{return new URL(e).origin}catch{return}},oh={"<":"\\3c ",">":"\\3e "},sh=e=>`"${e.replace(/[\\"<>]/g,e=>oh[e]??`\\${e}`)}"`,lh=/^U\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?(\s*,\s*U\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?)*$/,ch=e=>encodeURIComponent(e).replace(/%20/g,"+"),uh=(e,t)=>["@font-face{",`font-family:${sh(e.family)};`,`font-style:${"italic"===t.style?"italic":"normal"};`,`font-weight:${Number.parseInt(String(t.weight),10)||400};`,`font-display:${e.display??"swap"};`,`src:url(${sh(t.url)}) format(${sh(t.format)});`,t.unicodeRange&&lh.test(t.unicodeRange)?`unicode-range:${t.unicodeRange};`:"","}"].join(""),dh={definition:{name:"",permanentUrl:""},flat:{},variables:[],settings:{customCss:""},pages:[],pageFolders:[]},ph=(e,t)=>{let n=e?.attributes[t];return"string"==typeof n?n:""},hh=le({mutate:async()=>{},query:async()=>{},subscribe:()=>{},subscriptionManager:{subscribe:()=>{},unsubscribe:()=>{},stop:()=>{}},webKey:"",instanceId:"",server:{},userKey:"",webId:"",environment:"development"});hh.displayName="NetworkContext";var fh=le({});fh.displayName="NetworkInternalContext";var mh={},gh={Init:Fu`
7
+ return ze(qp,{className:n,id:r,label:i,loading:o,clearable:l,value:f,prefix:u,disabled:s,error:m,intent:h,size:p,onClear:k,...g,children:[t,/* @__PURE__ */Ie("input",{ref:e,id:r,type:d,placeholder:a,className:v,disabled:s||o,value:f,onChange:x,...b})]})}),{Icon:Mp}),Up={root:Et("flex flex-col",{variants:{intent:{primary:"",custom:""},disabled:{true:"opacity-60 pointer-events-none",false:""},size:{md:"gap-1.5",sm:"gap-1 text-sm",xs:"gap-1 text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),inputContainer:Et("flex items-center border relative transition-colors duration-150 focus-within:ring-2 focus-within:ring-offset-0",{variants:{intent:{primary:"bg-white text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",custom:""},error:{true:"border-red-500 focus-within:ring-red-500/30",false:"border-gray-300 dark:border-zinc-700 focus-within:ring-primary-500/30 dark:focus-within:ring-primary-400/30 hover:border-gray-400 dark:hover:border-zinc-500"},disabled:{true:"cursor-not-allowed opacity-60 pointer-events-none",false:""},size:{md:"py-2 px-3 gap-2 rounded-lg",sm:"py-1.5 px-2.5 gap-1.5 rounded",xs:"py-1 px-2 gap-1 rounded-sm",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",error:!1,disabled:!1,size:"md"}}),input:Et("p-0 border-0 outline-none focus:ring-0 w-full bg-transparent",{variants:{intent:{primary:"text-zinc-900 placeholder:text-zinc-400 dark:text-zinc-200 dark:placeholder:text-zinc-500"},error:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:""},size:{md:"text-sm",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md",disabled:!1,error:!1}}),label:Et("text-sm font-medium text-zinc-700 dark:text-zinc-300",{variants:{inline:{true:"flex select-none items-center",false:""},disabled:{true:"",false:""},size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[{inline:!0,disabled:!0,className:"cursor-not-allowed"},{inline:!0,disabled:!1,className:"cursor-pointer"},{inline:!0,size:"md",className:"gap-2"},{inline:!0,size:"sm",className:"gap-1.5"},{inline:!0,size:"xs",className:"gap-1"}],defaultVariants:{inline:!1,disabled:!1,size:"md"}}),iconFloatingContainer:Et("flex items-center justify-center",{variants:{intent:{primary:""},size:{md:"gap-2",sm:"gap-1.5",xs:"gap-1",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),icon:Et("border-r border-gray-300 dark:border-zinc-700 text-zinc-400 dark:text-zinc-500 shrink-0",{variants:{intent:{primary:""},error:{true:"text-red-500 dark:text-red-400",false:""},size:{md:"pr-2.5 mr-0.5",sm:"pr-2 mr-0.5",xs:"pr-1.5 mr-0.5",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),iconError:Et("",{variants:{intent:{primary:""},error:{true:"text-red-500 dark:text-red-400",false:""}},compoundVariants:[],defaultVariants:{intent:"primary"}}),iconClear:Et("cursor-pointer text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-150"),iconLoading:Et("text-zinc-400 dark:text-zinc-500")},Hp=Bp,Wp=(e,t)=>`${e}_${t}`,Gp=({id:e="",source:t,name:n,fields:r=[]})=>{let{useStoreSetter:i}=a(),o=i(),s=xe(()=>`${e}_${X(8)}`,[e]);ge(()=>{if(t)return o(`sources.${s}`,{id:s,meta:{id:e,source:t,name:n,fields:r}}),()=>o(`sources.${s}`,void 0,{unmount:!0})},[s,t]),ge(()=>{t&&o(`sources.${s}.meta.fields`,r,{raw:!0})},[r,t,s,o])},Qp=(e,t={})=>Array.isArray(e)?e.reduce((e,n)=>{let{name:r,value:i,subValues:a}=n;if(!Array.isArray(a)||0===a.length)return{...e,[r]:i};let o=a.find(e=>V(e.when,t));return{...e,[r]:o?o.value:i}},{}):{},Jp=le({logs:[],providers:{}});Jp.displayName="DevToolsContext";var Kp=new class{callbackInternal;callbackAddProvider;callbackRemoveProvider;pendingLimit=100;logsListenedLimit=1e3;pendingLogs=[];listening=!1;listeningCategory;logsListened=[];listeningParams;#e=[];#t=!1;constructor(e,t=100){this.callbackInternal=e,this.pendingLimit=t}setCallback(e){this.callbackInternal=e}processPendingLogs(){if(this.pendingLogs.length&&this.callbackInternal){for(let e of this.pendingLogs)this.callbackInternal(e.logType,e.category,e.message,e.params,e.time);this.pendingLogs=[]}}setCallbackAddProvider(e){this.callbackAddProvider=e}setCallbackRemoveProvider(e){this.callbackRemoveProvider=e}flush(e=!1){this.logsListened=[],e&&(this.pendingLogs=[])}#n(e,t,n,r){let i=this.getTime(!0);if(!this.callbackInternal)return this.pendingLogs.push({logType:e,category:t,message:n,params:r,time:i}),void(this.pendingLogs.length>this.pendingLimit&&this.pendingLogs.shift());this.listening?this.logsListened.push({logType:e,category:t,message:n,params:r,time:i}):(this.#e.push({logType:e,category:t,message:n,params:r,time:i}),this.#r()),this.logsListened.length>this.logsListenedLimit&&this.logsListened.shift()}#r(){this.#t||(this.#t=!0,queueMicrotask(()=>{this.#t=!1;let e=this.callbackInternal,t=this.#e;if(this.#e=[],e)for(let n of t)e(n.logType,n.category,n.message,n.params,n.time)}))}addProviderMethod(e,t){this.callbackAddProvider?.(e,t)}removeProviderMethod(e){"function"==typeof this.callbackRemoveProvider&&this.callbackRemoveProvider(e)}getTime(e=!1){let t=/* @__PURE__ */new Date;return e?L(t,"HH:mm:ss.SSS"):t}info(e,t,n){this.#n("info",e,t,n)}warning(e,t,n){this.#n("warning",e,t,n)}danger(e,t,n){this.#n("danger",e,t,n)}success(e,t,n){this.#n("success",e,t,n)}begin(e){this.listening=!0,this.listeningParams={category:e}}end(){this.listening=!1,this.listeningCategory&&this.logsListened.length>0&&this.callbackInternal?.("info",this.listeningCategory,`${this.logsListened.length} Log${1===this.logsListened.length?"":"s"}`,{logs:this.logsListened}),this.logsListened=[],this.listeningCategory=void 0}};function Yp(e="store"){return({path:t,prevValue:n,nextValue:r})=>{Kp.info("store",e,{storeName:e,path:t,prev:n,next:r})}}var Xp="data-plitzi-fonts",Zp=e=>{let t=we(e);return t.current!==e&&!ud(t.current,e)&&(t.current=e),t.current},eh={platform:{desktop:{},tablet:{},mobile:{}},mode:"desktop-first",theme:{default:"system",schemes:["light","dark"]},variables:{},fonts:[],cache:""},th=(Object.values({DISPLAY:"display",FLEX_WRAP:"flex-wrap",FLEX_DIRECTION:"flex-direction",ALIGN_ITEMS:"align-items",JUSTIFY_ITEMS:"justify-items",JUSTIFY_CONTENT:"justify-content",ALIGN_CONTENT:"align-content",ROW_GAP:"row-gap",COLUMN_GAP:"column-gap",GRID_ROW_GAP:"grid-row-gap",GRID_COLUMN_GAP:"grid-column-gap",GRID_TEMPLATE_AREAS:"grid-template-areas",GRID_TEMPLATE_COLUMNS:"grid-template-columns",GRID_TEMPLATE_ROWS:"grid-template-rows",GRID_AUTO_FLOW:"grid-auto-flow",GRID_AUTO_ROWS:"grid-auto-rows",GRID_AUTO_COLUMNS:"grid-auto-columns",GRID_ROW_START:"grid-row-start",GRID_COLUMN_START:"grid-column-start",GRID_ROW_END:"grid-row-end",GRID_COLUMN_END:"grid-column-end",ALIGN_SELF:"align-self",JUSTIFY_SELF:"justify-self",ORDER:"order",FLEX_GROW:"flex-grow",FLEX_SHRINK:"flex-shrink",FLEX_BASIS:"flex-basis",LIST_STYLE:"list-style",LIST_STYLE_TYPE:"list-style-type",LIST_STYLE_POSITION:"list-style-position",LIST_STYLE_IMAGE:"list-style-image",BACKGROUND_COLOR:"background-color",BACKGROUND_IMAGE:"background-image",BACKGROUND_POSITION:"background-position",BACKGROUND_SIZE:"background-size",BACKGROUND_REPEAT:"background-repeat",BACKGROUND_ORIGIN:"background-origin",BACKGROUND_CLIP:"background-clip",BACKGROUND_ATTACHMENT:"background-attachment",BACKGROUND_BLEND_MODE:"background-blend-mode",MASK_IMAGE:"mask-image",BORDER_TOP_STYLE:"border-top-style",BORDER_TOP_WIDTH:"border-top-width",BORDER_TOP_COLOR:"border-top-color",BORDER_BOTTOM_STYLE:"border-bottom-style",BORDER_BOTTOM_WIDTH:"border-bottom-width",BORDER_BOTTOM_COLOR:"border-bottom-color",BORDER_LEFT_STYLE:"border-left-style",BORDER_LEFT_WIDTH:"border-left-width",BORDER_LEFT_COLOR:"border-left-color",BORDER_RIGHT_STYLE:"border-right-style",BORDER_RIGHT_WIDTH:"border-right-width",BORDER_RIGHT_COLOR:"border-right-color",BORDER_TOP_LEFT_RADIUS:"border-top-left-radius",BORDER_TOP_RIGHT_RADIUS:"border-top-right-radius",BORDER_BOTTOM_LEFT_RADIUS:"border-bottom-left-radius",BORDER_BOTTOM_RIGHT_RADIUS:"border-bottom-right-radius",BORDER_COLLAPSE:"border-collapse",BORDER_SPACING:"border-spacing",TABLE_LAYOUT:"table-layout",OPACITY:"opacity",VISIBILITY:"visibility",CURSOR:"cursor",TRANSITION:"transition",TRANSITION_PROPERTY:"transition-property",TRANSITION_DURATION:"transition-duration",TRANSITION_TIMING_FUNCTION:"transition-timing-function",TRANSITION_DELAY:"transition-delay",ANIMATION:"animation",ANIMATION_NAME:"animation-name",ANIMATION_DURATION:"animation-duration",ANIMATION_TIMING_FUNCTION:"animation-timing-function",ANIMATION_DELAY:"animation-delay",ANIMATION_ITERATION_COUNT:"animation-iteration-count",ANIMATION_DIRECTION:"animation-direction",ANIMATION_FILL_MODE:"animation-fill-mode",ANIMATION_PLAY_STATE:"animation-play-state",ANIMATION_TIMELINE:"animation-timeline",ANIMATION_RANGE:"animation-range",BOX_SHADOW:"box-shadow",FILTER:"filter",BACKDROP_FILTER:"backdrop-filter",MIX_BLEND_MODE:"mix-blend-mode",ISOLATION:"isolation",CLIP_PATH:"clip-path",TRANSFORM:"transform",TRANSFORM_ORIGIN:"transform-origin",PERSPECTIVE:"perspective",WILL_CHANGE:"will-change",OUTLINE_WIDTH:"outline-width",OUTLINE_STYLE:"outline-style",OUTLINE_COLOR:"outline-color",OUTLINE_OFFSET:"outline-offset",POINTER_EVENTS:"pointer-events",USER_SELECT:"user-select",TOUCH_ACTION:"touch-action",RESIZE:"resize",APPEARANCE:"appearance",SCROLL_BEHAVIOR:"scroll-behavior",OVERSCROLL_BEHAVIOR:"overscroll-behavior",ACCENT_COLOR:"accent-color",CARET_COLOR:"caret-color",COLOR_SCHEME:"color-scheme",POSITION:"position",FLOAT:"float",CLEAR:"clear",Z_INDEX:"z-index",TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right",BOX_SIZING:"box-sizing",ASPECT_RATIO:"aspect-ratio",WIDTH:"width",HEIGHT:"height",MIN_WIDTH:"min-width",MIN_HEIGHT:"min-height",MAX_WIDTH:"max-width",MAX_HEIGHT:"max-height",OVERFLOW:"overflow",OVERFLOW_X:"overflow-x",OVERFLOW_Y:"overflow-y",SCROLLBAR_WIDTH:"scrollbar-width",SCROLLBAR_COLOR:"scrollbar-color",OBJECT_FIT:"object-fit",OBJECT_POSITION:"object-position",COLUMN_WIDTH:"column-width",COLUMN_COUNT:"column-count",MARGIN_TOP:"margin-top",MARGIN_BOTTOM:"margin-bottom",MARGIN_LEFT:"margin-left",MARGIN_RIGHT:"margin-right",PADDING_TOP:"padding-top",PADDING_BOTTOM:"padding-bottom",PADDING_LEFT:"padding-left",PADDING_RIGHT:"padding-right",FONT_FAMILY:"font-family",FONT_WEIGHT:"font-weight",FONT_SIZE:"font-size",LINE_HEIGHT:"line-height",COLOR:"color",TEXT_ALIGN:"text-align",FONT_STYLE:"font-style",FONT_VARIANT:"font-variant",FONT_VARIANT_NUMERIC:"font-variant-numeric",FONT_FEATURE_SETTINGS:"font-feature-settings",TEXT_DECORATION:"text-decoration",TEXT_DECORATION_LINE:"text-decoration-line",TEXT_DECORATION_COLOR:"text-decoration-color",TEXT_DECORATION_STYLE:"text-decoration-style",TEXT_DECORATION_THICKNESS:"text-decoration-thickness",TEXT_UNDERLINE_OFFSET:"text-underline-offset",LETTER_SPACING:"letter-spacing",WORD_SPACING:"word-spacing",TEXT_INDENT:"text-indent",TEXT_TRANSFORM:"text-transform",DIRECTION:"direction",WHITE_SPACE:"white-space",TEXT_WRAP:"text-wrap",WORD_BREAK:"word-break",OVERFLOW_WRAP:"overflow-wrap",HYPHENS:"hyphens",VERTICAL_ALIGN:"vertical-align",TEXT_OVERFLOW:"text-overflow",TEXT_SHADOW:"text-shadow",LINE_CLAMP:"line-clamp",WEBKIT_LINE_CLAMP:"-webkit-line-clamp",WEBKIT_BOX_ORIENT:"-webkit-box-orient",WEBKIT_TEXT_FILL_COLOR:"-webkit-text-fill-color",FILL:"fill",STROKE:"stroke",STROKE_WIDTH:"stroke-width"}).map(e=>({path:e,label:e})),e=>e.links.filter(e=>"stylesheet"===e.rel).reduce((e,t,n)=>{let r=`font-${n}`;return{...e,[r]:{type:"link",id:r,params:{href:t.href,type:"text/css",rel:"stylesheet"}}}},{})),nh="https://fonts.googleapis.com",rh={woff2:"font/woff2",woff:"font/woff"},ih=e=>{try{let t=new URL(e);return"https:"===t.protocol&&!t.username&&!t.password}catch{return!1}},ah=e=>{try{return new URL(e).origin}catch{return}},oh={"<":"\\3c ",">":"\\3e "},sh=e=>`"${e.replace(/[\\"<>]/g,e=>oh[e]??`\\${e}`)}"`,lh=/^U\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?(\s*,\s*U\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?)*$/,ch=e=>encodeURIComponent(e).replace(/%20/g,"+"),uh=(e,t)=>["@font-face{",`font-family:${sh(e.family)};`,`font-style:${"italic"===t.style?"italic":"normal"};`,`font-weight:${Number.parseInt(String(t.weight),10)||400};`,`font-display:${e.display??"swap"};`,`src:url(${sh(t.url)}) format(${sh(t.format)});`,t.unicodeRange&&lh.test(t.unicodeRange)?`unicode-range:${t.unicodeRange};`:"","}"].join(""),dh={definition:{name:"",permanentUrl:""},flat:{},variables:[],settings:{customCss:""},pages:[],pageFolders:[]},ph=(e,t)=>{let n=e?.attributes[t];return"string"==typeof n?n:""},hh=le({mutate:async()=>{},query:async()=>{},subscribe:()=>{},subscriptionManager:{subscribe:()=>{},unsubscribe:()=>{},stop:()=>{}},webKey:"",instanceId:"",server:{},userKey:"",webId:"",environment:"development"});hh.displayName="NetworkContext";var fh=le({});fh.displayName="NetworkInternalContext";var mh={},gh={Init:Fu`
8
8
  query InitQuery($environment: String!, $revision: Int) {
9
9
  Space(environment: $environment, revision: $revision) {
10
10
  schema {
@@ -194,8 +194,8 @@ e))}catch(e){e instanceof Error&&(n=e.message)}finally{d(n),t&&t.default?c(t):l&
194
194
  return Ie(gf,{ref:e,tag:n,className:wt(`plitzi-component__node-html plitzi-component__node-html-${n}`,t),...o,children:r})}),If=Object.assign(Ef,{type:"nodeHtml",content:{attributes:{subType:"div"},definition:{label:"Html Node",type:"nodeHtml",description:"A single raw HTML tag with custom attributes.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-brands fa-html5"},defaultStyle:{name:"Html Node",displayMode:"desktop",style:{base:{default:{}}},subTypes:{hr:{name:"HR Node",displayMode:"desktop",style:{base:{default:{"border-top-width":"1px"}}}}}},settings:{}}}),zf=pe(({plitziElementLayout:e,type:t="",internalProps:n})=>{let{components:r}=he(o),{contexts:{PluginsContext:i}}=H(),{plugins:a}=he(i);return B({type:t,internalProps:{...n,plitziElementLayout:e},plitziElementLayout:e,components:r.current,plugins:a})}),Of=K(({ref:e,children:t,className:n="",referenceType:r="element",referenceId:i="",referenceContainer:a=""})=>{let{id:o,definition:{rootId:s,styleSelectors:l}}=Xh(),{settings:{previewMode:u,environment:d},contexts:{SegmentsContext:p}}=H(),[[h,f]]=c(["schema","segments"]),{segmentGet:m}=he(p),g=we(h);g.current=h;let y=we(f);y.current=f;let v=fe((e,t)=>{let n,r;switch(t){case"segment":{let t=b(y.current,e);if(!t)return;let i=b(t,"definition.baseElementId");r=b(t,"schema"),n=b(t,`schema.flat.${i}`);break}default:n=b(g.current,`flat.${e}`),r=g.current}if(n)return{element:n,elementType:b(n,"definition.type"),referenceContextData:{schema:r,prevSchema:g.current}}},[]),[x,k]=Se(v(i,r)),w=fe(async(e,t)=>{let n,r,i=v(e,t);if(i)k(i);else{switch(t){case"segment":{let t;if(e&&(t=await m(e)),!t)return;let i=b(t,"definition.baseElementId");r=b(t,"schema"),n=b(t,`schema.flat.${i}`);break}default:n=b(g.current,`flat.${e}`),r=g.current}k(n?{element:n,elementType:b(n,"definition.type"),referenceContextData:{schema:r,prevSchema:g.current}}:void 0)}},[v,m]);ge(()=>{w(i,r)},[w,i,r]);let S=xe(()=>({containerId:a,type:r,rootId:o}),[a,r,o]),N=xe(()=>({id:x?.element?.id??"",rootId:s,className:l.base}),[x?.element?.id,s,l.base]);if(!x)/* @__PURE__ */return Ie(gf,{ref:e,className:wt("plitzi-component__reference",n,{"reference--build-mode":!u}),children:!u&&/* @__PURE__ */ze("div",{className:"reference__label",children:["Element Reference ",/* @__PURE__ */Ie("b",{className:"capitalize",children:r})]})});let{element:T,elementType:C,referenceContextData:E}=x;return u&&T&&"element"===r?/* @__PURE__ */Ie(pt,{name:`Reference:${o}`,value:E,children:/* @__PURE__ */Ie(W,{body:t,children:/* @__PURE__ */Ie(zf,{type:C,internalProps:N,plitziElementLayout:S},`${o}_${i}`)})}):/* @__PURE__ */ze(gf,{ref:e,className:wt("plitzi-component__reference",n,{"reference--build-mode":!u}),children:[
195
195
  /* @__PURE__ */Ie(pt,{name:`Reference:${o}`,value:E,children:T&&/* @__PURE__ */Ie(W,{body:t,children:/* @__PURE__ */Ie(zf,{type:C,internalProps:N,plitziElementLayout:S},`${o}_${i}`)})}),!u&&!T&&/* @__PURE__ */ze("div",{className:"reference__label",children:["Element Reference ",r]}),u&&!T&&"segment"===r&&/* @__PURE__ */ze("div",{children:["Segment ",
196
196
  /* @__PURE__ */Ie("b",{children:i})," not found, publish to ",
197
- /* @__PURE__ */Ie("b",{children:d})," environment"]})]})}),Af=Object.assign(Of,{type:"reference",content:{attributes:{referenceType:"element",referenceId:"",referenceContainer:""},definition:{label:"Reference",type:"reference",description:"Reuses another element or template by id, rendering it in place.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-asterisk"},defaultStyle:{name:"Reference Element",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),_f=K(({ref:e,className:t="",children:n,contentPlacement:r="after",content:i="Button",subType:a="button",disabled:o=!1,ariaExpanded:s,ariaPressed:l})=>{let{definition:{label:c}}=Xh(),{settings:{previewMode:u}}=H(),d=xe(()=>"string"==typeof i?i:c,[i,c]);/* @__PURE__ */
198
- return ze(gf,{ref:e,tag:"button",type:u?a:"button",className:wt("plitzi-component__button",t,{"container--empty--skip":!u&&!n&&i}),disabled:o,"aria-label":d,"aria-expanded":s,"aria-pressed":l,children:["before"===r&&i,n,"after"===r&&i]})}),Df=Object.assign(_f,{type:"button",content:{attributes:{contentPlacement:"after",content:"Button",subType:"button",disabled:!1},definition:{label:"Button",type:"button",description:"A clickable button. On its own it only renders; wire an interaction flow (trigger onClick → callbacks) to make it DO something.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-stop"},defaultStyle:{name:"Button",displayMode:"desktop",style:{base:{default:{}}},subTypes:{button:{name:"Default Button",displayMode:"desktop",style:{base:{default:{"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"24px","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}},reset:{name:"Reset Button",displayMode:"desktop",style:{base:{default:{"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"24px","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}},submit:{name:"Submit Button",displayMode:"desktop",style:{base:{default:{"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"24px","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}}}},settings:{}}}),Pf=le(void 0);Pf.displayName="DropdownContext";var Mf=K(({ref:e,children:t,className:n="",popupPlacement:r="bottom",openPopup:i=!1,backgroundDisabled:a=!1,closeOnClickBackground:o=!0,closeOnClickPopup:s=!0,containerTopOffset:l=5,containerLeftOffset:c=5,disabled:u=!1})=>{let{setElementState:d,definition:{styleSelectors:p}}=Xh(),{settings:{previewMode:h},utils:{getWindow:f}}=H(),m=we(null),g=we(null),y=xe(()=>f(),[f]),b=fe(e=>{o&&(e.stopPropagation(),e.preventDefault(),d(e=>({...e,openPopup:!1})))},[o,d]),v=fe(e=>{d(t=>({...t,openPopup:e}))},[d]),[,,x,k,,w]=(({ref:e,popupRef:t,open:n,placement:r="bottom",disabled:i=!1,loading:a=!1,closeOnClickPopup:o=!0,offsetX:s=0,offsetY:l=0,myWindow:c,onChange:u})=>{let[d,p]=Se(n??!1),[h,f]=Se(()=>e?.current?.getBoundingClientRect()),m=xe(()=>c||(typeof window<"u"?window:null),[c]),g=fe(e=>{if(!i&&!a){if(e.stopPropagation(),e.preventDefault(),void 0!==n)return void u?.(!d,!1);u?.(!d,!0),p(e=>!e)}},[i,a,u,d,n]),y=fe(e=>{if(!i&&!a&&o){if(e.stopPropagation(),e.preventDefault(),void 0!==n)return void u?.(!d,!1);u?.(!d,!0),p(e=>!e)}},[o,i,a,u,d,n]);ge(()=>{let t=e?.current;if(!t||typeof window>"u"||!d)return;let n,r=()=>f(e.current?.getBoundingClientRect());return typeof ResizeObserver<"u"&&(n=new ResizeObserver(r),n.observe(t)),window.addEventListener("scroll",r,!0),window.addEventListener("resize",r),()=>{n?.disconnect(),window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r)}},[d,e]);let b=fe(e=>{"Escape"===e.key&&(u?.(!d,void 0!==n),p(e=>!e))},[u,d,n]);ge(()=>{if(d&&!i)return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}},[d,b,i]);let v=fe(e=>{if(!h||!m)return;let t=m.innerWidth,n=m.innerHeight,i=0,a=0;switch(r){case"top":i=h.top-e.height,a=h.left;break;case"bottom":default:i=h.bottom,a=h.left;break;case"left":i=h.top,a=h.left-e.width;break;case"right":i=h.top,a=h.right}return"bottom"===r?(i+=l,a+=s):"top"===r?(i-=l,a+=s):"left"===r?(i+=l,a-=s):"right"===r&&(i+=l,a+=s),"bottom"===r||"top"===r?(a+e.width>t?a=h.right-e.width:a<0&&(a=h.left),i=Math.max(0,Math.min(n-e.height,i))):"left"===r||"right"===r?(i+e.height>n?i=h.bottom-e.height:i<0&&(i=h.top),a=Math.max(0,Math.min(t-e.width,a))):(i=Math.max(0,Math.min(n-e.height,i)),a=Math.max(0,Math.min(t-e.width,a))),{top:i,left:a}},[h,m,r,l,s]);return Vp(()=>{p(n??!1)},[n]),[d,p,g,y,h,xe(()=>{if(!d||!e?.current||!t?.current)return;let n=t.current.getBoundingClientRect();return v(n)},[d,e,t,v])]})({ref:e,popupRef:m,open:i,disabled:!h||u,closeOnClickPopup:s,placement:r,offsetX:c,offsetY:l,myWindow:y,onChange:v}),S=xe(()=>({popupRef:m,openPopup:i,parameters:w,onClick:k}),[k,i,w]);/* @__PURE__ */
197
+ /* @__PURE__ */Ie("b",{children:d})," environment"]})]})}),Af=Object.assign(Of,{type:"reference",content:{attributes:{referenceType:"element",referenceId:"",referenceContainer:""},definition:{label:"Reference",type:"reference",description:"Reuses another element or template by id, rendering it in place.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-asterisk"},defaultStyle:{name:"Reference Element",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),_f=K(({ref:e,className:t="",children:n,contentPlacement:r="after",content:i="Button",subType:a="button",disabled:o=!1,ariaExpanded:s,ariaPressed:l,title:c})=>{let{settings:{previewMode:u}}=H();/* @__PURE__ */
198
+ return ze(gf,{ref:e,tag:"button",type:u?a:"button",className:wt("plitzi-component__button",t,{"container--empty--skip":!u&&!n&&i}),disabled:o,"aria-label":i||void 0,title:c||void 0,"aria-expanded":s,"aria-pressed":l,children:["before"===r&&i,n,"after"===r&&i]})}),Df=Object.assign(_f,{type:"button",content:{attributes:{contentPlacement:"after",content:"Button",subType:"button",disabled:!1},definition:{label:"Button",type:"button",description:"A clickable button. On its own it only renders; wire an interaction flow (trigger onClick → callbacks) to make it DO something.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-stop"},defaultStyle:{name:"Button",displayMode:"desktop",style:{base:{default:{}}},subTypes:{button:{name:"Default Button",displayMode:"desktop",style:{base:{default:{"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"24px","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}},reset:{name:"Reset Button",displayMode:"desktop",style:{base:{default:{"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"24px","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}},submit:{name:"Submit Button",displayMode:"desktop",style:{base:{default:{"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"24px","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}}}},settings:{}}}),Pf=le(void 0);Pf.displayName="DropdownContext";var Mf=K(({ref:e,children:t,className:n="",popupPlacement:r="bottom",openPopup:i=!1,backgroundDisabled:a=!1,closeOnClickBackground:o=!0,closeOnClickPopup:s=!0,containerTopOffset:l=5,containerLeftOffset:c=5,disabled:u=!1})=>{let{setElementState:d,definition:{styleSelectors:p}}=Xh(),{settings:{previewMode:h},utils:{getWindow:f}}=H(),m=we(null),g=we(null),y=xe(()=>f(),[f]),b=fe(e=>{o&&(e.stopPropagation(),e.preventDefault(),d(e=>({...e,openPopup:!1})))},[o,d]),v=fe(e=>{d(t=>({...t,openPopup:e}))},[d]),[,,x,k,,w]=(({ref:e,popupRef:t,open:n,placement:r="bottom",disabled:i=!1,loading:a=!1,closeOnClickPopup:o=!0,offsetX:s=0,offsetY:l=0,myWindow:c,onChange:u})=>{let[d,p]=Se(n??!1),[h,f]=Se(()=>e?.current?.getBoundingClientRect()),m=xe(()=>c||(typeof window<"u"?window:null),[c]),g=fe(e=>{if(!i&&!a){if(e.stopPropagation(),e.preventDefault(),void 0!==n)return void u?.(!d,!1);u?.(!d,!0),p(e=>!e)}},[i,a,u,d,n]),y=fe(e=>{if(!i&&!a&&o){if(e.stopPropagation(),e.preventDefault(),void 0!==n)return void u?.(!d,!1);u?.(!d,!0),p(e=>!e)}},[o,i,a,u,d,n]);ge(()=>{let t=e?.current;if(!t||typeof window>"u"||!d)return;let n,r=()=>f(e.current?.getBoundingClientRect());return typeof ResizeObserver<"u"&&(n=new ResizeObserver(r),n.observe(t)),window.addEventListener("scroll",r,!0),window.addEventListener("resize",r),()=>{n?.disconnect(),window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r)}},[d,e]);let b=fe(e=>{"Escape"===e.key&&(u?.(!d,void 0!==n),p(e=>!e))},[u,d,n]);ge(()=>{if(d&&!i)return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}},[d,b,i]);let v=fe(e=>{if(!h||!m)return;let t=m.innerWidth,n=m.innerHeight,i=0,a=0;switch(r){case"top":i=h.top-e.height,a=h.left;break;case"bottom":default:i=h.bottom,a=h.left;break;case"left":i=h.top,a=h.left-e.width;break;case"right":i=h.top,a=h.right}return"bottom"===r?(i+=l,a+=s):"top"===r?(i-=l,a+=s):"left"===r?(i+=l,a-=s):"right"===r&&(i+=l,a+=s),"bottom"===r||"top"===r?(a+e.width>t?a=h.right-e.width:a<0&&(a=h.left),i=Math.max(0,Math.min(n-e.height,i))):"left"===r||"right"===r?(i+e.height>n?i=h.bottom-e.height:i<0&&(i=h.top),a=Math.max(0,Math.min(t-e.width,a))):(i=Math.max(0,Math.min(n-e.height,i)),a=Math.max(0,Math.min(t-e.width,a))),{top:i,left:a}},[h,m,r,l,s]);return Vp(()=>{p(n??!1)},[n]),[d,p,g,y,h,xe(()=>{if(!d||!e?.current||!t?.current)return;let n=t.current.getBoundingClientRect();return v(n)},[d,e,t,v])]})({ref:e,popupRef:m,open:i,disabled:!h||u,closeOnClickPopup:s,placement:r,offsetX:c,offsetY:l,myWindow:y,onChange:v}),S=xe(()=>({popupRef:m,openPopup:i,parameters:w,onClick:k}),[k,i,w]);/* @__PURE__ */
199
199
  return ze(gf,{ref:e,className:wt("plitzi-component__dropdown",n,{"container--empty--skip":!h&&!t}),onClick:x,children:[/* @__PURE__ */Ie(Pf,{value:S,children:t}),i&&a&&h&&/* @__PURE__ */Ie("div",{ref:g,className:wt("plitzi-component__dropdown__background-container",p.backgroundContainer),onClick:b})]})}),Lf=K(({ref:e,className:t="",children:n})=>{let{popupRef:r,openPopup:i,parameters:a,onClick:o}=he(Pf);return be(e,()=>r.current??null,[r]),/* @__PURE__ */Ie(gf,{ref:r,className:wt("plitzi-component__dropdown-popup",t,{"popup-container--no-visible":!i||!a}),style:a,onClick:o,children:n})}),Rf=Object.assign(Lf,{type:"dropdownPopup",content:{attributes:{},definition:{label:"Dropdown Popup",type:"dropdownPopup",description:"The floating panel revealed by a dropdown.",items:[],bindings:{},styleSelectors:{base:""},initialState:{}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canTemplate:!1,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:""},defaultStyle:{name:"Dropdown Popup",displayMode:"desktop",style:{base:{default:{"background-color":"white","padding-right":"4px","padding-bottom":"4px","padding-left":"4px","padding-top":"4px",position:"fixed",display:"flex","flex-direction":"column","border-top-right-radius":"4px","border-bottom-right-radius":"4px","border-bottom-left-radius":"4px","border-top-left-radius":"4px","box-shadow":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 4px 11px","z-index":100}}},subTypes:{}},settings:{}},initialItems:[]}),jf=Object.assign(Mf,{type:"dropdown",content:{attributes:{popupPlacement:"bottom",openPopup:!1,backgroundDisabled:!1,closeOnClickBackground:!0,closeOnClickPopup:!0,containerTopOffset:5,containerLeftOffset:5,disabled:!1},definition:{label:"Dropdown",type:"dropdown",description:"A trigger that toggles an attached popup panel (dropdownPopup) — menus, selects, flyouts.",items:[],bindings:{},styleSelectors:{base:"",backgroundContainer:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-angle-down"},defaultStyle:{name:"Dropdown",displayMode:"desktop",style:{base:{default:{cursor:"pointer","user-select":"none"}},backgroundContainer:{default:{top:0,bottom:0,left:0,right:0,position:"fixed",cursor:"default","z-index":50}}}},settings:{}},initialItems:["dropdownPopup"],plugins:{dropdownPopup:Rf}}),Ff={root:Et("",{variants:{size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{size:"md"}})},$f=({className:e="focus-visible:px-1 focus-visible:m-px focus-visible:outline-dashed focus-visible:outline-1",myWindow:t,value:n="",exitOnEnter:r=!0,exitOnEscape:i=!0,updateMode:a="blur",openMode:o="click",size:s,onChange:l,onEditOpen:c,onEditClose:u})=>{e=_p("ContentEditable",{className:e,componentKey:"root",variants:{size:s}});let d=we(null),p=xe(()=>t||(typeof window<"u"?window:void 0),[t]);ge(()=>{d.current&&d.current.textContent!==n&&(d.current.textContent=n)},[n]);let h=fe(e=>{"change"===a&&l?.(e.target.textContent)},[l,a]),f=fe(e=>{if(!p)return;let t=p.document.createRange(),n=p.getSelection();t.setStart(e,e.childNodes.length),t.collapse(!0),n?.removeAllRanges(),n?.addRange(t)},[p]),m=fe(()=>{let e=d.current;e&&(("inherit"===e.contentEditable||"false"===e.contentEditable)&&f(e),"click"===o&&(e.setAttribute("contenteditable","true"),e.focus(),c?.()))},[o,f,c]),g=fe(()=>{let e=d.current;e&&"doubleClick"===o&&(e.setAttribute("contenteditable","true"),e.focus(),c?.())},[o,c]),y=fe(()=>{let e=d.current;e&&(e.setAttribute("contenteditable","false"),"blur"===a&&e.textContent!==n&&l?.(e.textContent),u?.())},[l,a,n,u]),b=fe(e=>{e.stopPropagation(),r&&13===e.keyCode?(e.preventDefault(),e.target.blur()):i&&27===e.keyCode&&(e.preventDefault(),e.target.textContent=n,e.target.blur())},[r,i,n]);/* @__PURE__ */
200
200
  return Ie("div",{className:e,ref:d,onClick:m,onDoubleClick:g,onBlur:y,onInput:h,onKeyDown:b})},qf=K(({ref:e,className:t="",content:n="Heading",subType:r="h1"})=>{let{id:i}=Xh(),{settings:{previewMode:a},contexts:{BuilderContext:o}}=H(),s=o?he(o):void 0,l=xe(()=>"string"!=typeof n&&"number"!=typeof n?JSON.stringify(n):n||""===n||a?n:"Heading",[n,a]),c=fe(e=>!a&&s?.updateElement(i,"content",e),[s?.updateElement,i]);/* @__PURE__ */
201
201
  return ze(gf,{ref:e,tag:a?r:"div",className:wt("plitzi-component__heading",{[`plitzi-component__heading-${r}`]:r},t),children:[a&&l,!a&&/* @__PURE__ */Ie($f,{value:l,onChange:c,openMode:"doubleClick"})]})}),Vf=Object.assign(qf,{type:"heading",content:{attributes:{content:"Heading",subType:"h1"},definition:{label:"Heading",type:"heading",description:"A section heading (<h1>–<h6>) for titles and document hierarchy.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-heading"},defaultStyle:{name:"Heading",displayMode:"desktop",style:{base:{default:{}}},subTypes:{h1:{name:"H1 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"38px","font-weight":700,"line-height":"44px"}}}},h2:{name:"H2 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"32px","font-weight":700,"line-height":"36px"}}}},h3:{name:"H3 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"24px","font-weight":700,"line-height":"30px"}}}},h4:{name:"H4 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"18px","font-weight":700,"line-height":"24px"}}}},h5:{name:"H5 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"14px","font-weight":700,"line-height":"20px"}}}},h6:{name:"H6 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"12px","font-weight":700,"line-height":"18px"}}}}}},settings:{}}}),Bf=K(({ref:e,children:t,className:n="",href:r="#",target:a="self",mode:o="page",label:s=""})=>{let{style:l}=Xh(),{settings:{previewMode:c}}=H(),[[u,d,h,f,m]]=p(["pageDefinitions","schema.pageFolders","navigation.routeParams","navigation.queryParams","navigation.navigate"]),g=xe(()=>{if("external"===o)return r;let e=`/${r}`.replaceAll(/[/]+/gim,"/");if("internal"===o){try{let t=i(e,{...f,...h},!0);return"string"==typeof t?t:e}catch{}return e}return Mh(u,d,r,!0)},[o,r,u,d,f,h]),y=xe(()=>{let t={ref:e,style:l,target:`_${a}`,"aria-label":s||void 0,className:wt("plitzi-component__link",n)};return c?{...t,href:g}:{...t,"href-disabled":g}},[e,l,a,s,n,c,g]);/* @__PURE__ */
@@ -614,7 +614,7 @@ return Ie(aI,{value:a,children:e})},yL={runServerAction:{source:"actions",title:
614
614
  /* @__PURE__ */Ie("b",{children:n})," was refused"]}),{actionId:n,mode:i,runId:f.runId,reason:f.reason,error:f.error,status:String(p.status)}),{status:"failed",reason:f.reason??"failed",runId:f.runId??"",output:{}})},[r,o]),l=fe(async e=>{if(!r||!e.runId)return{cancelled:!1};try{let t=204===(await fetch(`${r}/run/${e.runId}`,{method:"DELETE",credentials:"same-origin"})).status;return Kp.info("actions",/* @__PURE__ */ze("span",{children:["Server action run ",
615
615
  /* @__PURE__ */Ie("b",{children:e.runId})," ",t?"cancelled":"was not cancelled"]}),{actionId:"",mode:"cancel",runId:e.runId,status:t?"aborted":"failed"}),{cancelled:t}}catch{return{cancelled:!1}}},[r]),u=xe(()=>(i??[]).map(e=>({label:`${e.name} (${e.identifier})`,value:e.identifier})),[i]);return t({id:"actions",callbacks:xe(()=>lf(yL,{cancelServerAction:l,runServerAction:s},{runServerAction:{params:e=>{let t=of(yL.runServerAction.params),n=(i??[]).find(t=>t.identifier===e.actionId),r=Object.entries(n?.input??{});return{...t,actionId:{...t.actionId,type:()=>u.length>0?"select":"text",canBind:!0,label:!1===a?"Action — this space has no server to run it":"Action",options:u},input:{...t.input,canBind:!0,label:r.length>0?`Input — ${r.map(([e,t])=>`${e}${t.required?"*":""}: ${t.type}`).join(", ")}`:"Input"}}}}}),[s,l,u,i,a])}),e},SL={login:{source:"auth",title:"Auth Login",strictParams:!0,params:{mode:{type:"select",description:"Credentials to sign in with: a username and password, or a token obtained elsewhere.",default:"normal",options:["normal","token"],optionLabels:{normal:"User and Password",token:"Token"},canBind:!1},username:{type:"text",description:"Username.",default:"",when:e=>"normal"===e.mode},password:{type:"text",description:"Password.",default:"",when:e=>"normal"===e.mode},token:{type:"text",description:"A token to exchange for a session.",default:"",when:e=>"token"===e.mode}},preview:{ok:"",reason:"",errors:{username:"",password:"",token:""},accessToken:"",expiresAt:"",refreshToken:""}},refreshDetails:{source:"auth",title:"Auth Refresh Details",strictParams:!0,params:{},preview:{errors:"",accessToken:"",expiresAt:"",refreshToken:""}},logout:{source:"auth",title:"Auth Logout",strictParams:!0,params:{}}},NL=({children:e,authProvider:t="basic"})=>{let{login:n,refresh:r,logout:i}=he(GE),{useInteractions:a}=he(aI),o=fe(e=>n(e),[n]),s=fe(e=>r(e),[r]),l=fe(()=>i(),[i]);return a({id:"auth",callbacks:xe(()=>""===t?{}:lf(SL,{login:o,refreshDetails:s,logout:l}),[o,l,s,t])}),e},TL={hostAction:{source:"host",title:"Host Action",strictParams:!0,params:{action:{type:"text",description:"The name the host registered the handler under — `openSpace`, `signOut`, whatever it offers.",default:""},value:{type:"scalar",description:"What the action is about: the space to open, the workspace to switch to. Optional.",default:""}}}},CL=({children:e,actions:t})=>{let{useInteractions:n}=he(aI),r=fe(e=>{let{action:n,value:r}=e,i=n?t?.[n]:void 0;i&&i({...e,value:r})},[t]);return n({id:"host",callbacks:xe(()=>lf(TL,{hostAction:r}),[r])}),e},EL={navigate:{source:"navigation",title:"Navigate",strictParams:!0,params:{urlType:{type:"select",description:"Target kind: a space page, an internal space path, or an external URL.",options:["page","internal","external"],optionLabels:{page:"Space Page",internal:"Inside Space",external:"Outside Space"}},url:{type:"text",description:'Destination — a page id when urlType is "page", otherwise a URL/path.',when:e=>!!e.urlType,builderType:e=>"page"===e.urlType?"select":"text"}}}},IL=({children:e,previewMode:t=!1})=>{let{useInteractions:n}=he(aI),[[r,i,a]]=p(["schema.pages","pageDefinitions","navigation.navigate"]),o=xe(()=>{let e=bt(i,r);return Object.keys(e).reduce((t,n)=>{let r=e[n];return[...t,{key:n,label:b(r,"attributes.name",n),defaultPage:b(r,"attributes.default",!1)}]},[])},[i,r]),s=fe(e=>{if(!t)return;let{url:n,urlType:r}=e;"page"===r||"internal"===r?a(n):a(n,!0)},[a,t]);return n({id:"navigation",callbacks:xe(()=>{let{urlType:e,url:t}=of(EL.navigate.params);return lf(EL,{navigate:s},{navigate:{params:{urlType:e,url:{...t,defaultValue:o.find(e=>e.defaultPage)?.key??"",options:o.map(e=>({value:e.key,label:e.label}))}}}})},[s,o])}),e},zL={invalidateQueries:{source:"queries",title:"Invalidate Queries",strictParams:!0,params:{elements:{type:"elementIds",elementType:"apiContainer",description:"The api containers to refresh, by element id — the way to name a request whose URL is a template. Leave both this and `url` empty to refresh every cached request on the page.",default:[],label:"Containers (ids)"},url:{type:"text",description:"Only the requests whose URL starts with this — `/api/orders` covers `/api/orders?page=2`. With `elements` too, a request must match both.",default:"",label:"URL prefix"}},preview:{}}},OL=({children:e})=>{let{useInteractions:t}=he(aI),n=fe(e=>ON({url:e.url??"",elements:IN(e.elements)}),[]);return t({id:"queries",callbacks:xe(()=>lf(zL,{invalidateQueries:n}),[n])}),e},AL={setState:{source:"state",title:"Set State",strictParams:!0,params:{key:{type:"text",description:"The state key/path to set. Stored under `runtime.state.<key>`.",default:""},type:{type:"select",description:'The value type. What is stored is coerced to it — a boolean is a real boolean, not "true".',options:["boolean","number","text"],optionLabels:{boolean:"True / False",number:"Numeric",text:"Text"}},value:{type:"scalar",description:"The value to store — its type follows the `type` param (a real boolean/number, or text).",when:e=>!!e.type,builderType:e=>"boolean"===e.type?"select":"text",options:["true","false"]}}},toggleState:{source:"state",title:"Toggle State",strictParams:!0,params:{key:{type:"text",description:"The state key/path to flip, under `runtime.state.<key>`. Anything not already true is treated as false, so a key that has never been set toggles to true.",default:""}}},appendState:{source:"state",title:"Append To State",strictParams:!0,params:{key:{type:"text",description:"The state key/path holding the list, under `runtime.state.<key>`. Created if it is not there.",default:""},value:{type:"scalar",description:"What to add to the end of the list.",default:""},unique:{type:"boolean",description:"Skip the append when the list already holds this value. For a list whose entries are their own identity — anything referring to one refers to it by value, so a second copy is indistinguishable.",default:!1},withId:{type:"boolean",description:"Store the entry as `{ id, value }` with an id of its own, so two entries that read the same are still two entries. Anything reading one back names `.value`; anything referring to one names `.id`.",default:!1}}},removeState:{source:"state",title:"Remove From State",strictParams:!0,params:{key:{type:"text",description:"The state key/path holding the list, under `runtime.state.<key>`.",default:""},value:{type:"scalar",description:"The entry to drop, by value — every copy of it. Prefer this wherever the list can change under the person: a position is only true until something before it moves.",default:""},by:{type:"text",description:"The FIELD carrying the identity, for a list of records rather than of scalars — `id` for entries appended with `withId`. Without it the whole entry is compared, which never matches a record.",default:""},index:{type:"text",description:"Which entry to drop, by position, when there is no value to go on. Inside a controlled list, `{{ <listSource>.index }}` is the row own position. An index that resolves to nothing removes nothing.",default:""}}},moveState:{source:"state",title:"Move Between Lists",strictParams:!0,params:{from:{type:"text",description:"The list to take it out of, under `runtime.state.<key>`.",default:""},to:{type:"text",description:"The list to put it into. It is not added twice.",default:""},value:{type:"scalar",description:"The entry to move. Absent from `from` means nothing happens.",default:""}}},toggleInState:{source:"state",title:"Toggle In List",strictParams:!0,params:{key:{type:"text",description:"The list to add to or drop from, under `runtime.state.<key>`.",default:""},value:{type:"scalar",description:"The entry the box stands for.",default:""}}},clearState:{source:"state",title:"Clear State",strictParams:!0,params:{key:{type:"text",description:"The list to empty, under `runtime.state.<key>`. Left blank it empties EVERYTHING the space is keeping — which on a page that holds notes beside a list means losing the notes to clear the list.",default:""}}}},_L=0,DL=({children:e})=>{let{useInteractions:t}=he(aI),n=g(),r=fe(e=>{let{key:t,type:r}=e,{value:i}=e;"boolean"===r?i=!0===i||"true"===i:"number"===r&&(i=parseInt(i,10)),n(`runtime.state.${t}`,i)},[n]),i=fe(e=>{let{key:t}=e;t&&n(`runtime.state.${t}`,e=>!0!==e&&"true"!==e)},[n]),a=e=>!0===e||"true"===e,o=fe(e=>{let{key:t,value:r,unique:i,withId:o}=e;t&&n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return a(o)?[...t,{id:typeof crypto<"u"&&"function"==typeof crypto.randomUUID?crypto.randomUUID():`e${++_L}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,value:r}]:a(i)&&t.includes(r)?t:[...t,r]})},[n]),s=fe(e=>{let{key:t,index:r,value:i,by:a}=e;if(!t)return;if(void 0!==i&&""!==i)return void n(`runtime.state.${t}`,e=>Array.isArray(e)?e.filter(e=>a?e?.[a]!==i:e!==i):[]);let o="number"==typeof r?r:parseInt(r??"",10);Number.isNaN(o)||n(`runtime.state.${t}`,e=>Array.isArray(e)?e.filter((e,t)=>t!==o):[])},[n]),l=fe(e=>{let{from:t,to:r,value:i}=e;if(!t||!r||void 0===i||""===i)return;let a={moved:!1};n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return a.moved=t.includes(i),a.moved?t.filter(e=>e!==i):t}),a.moved&&n(`runtime.state.${r}`,e=>{let t=Array.isArray(e)?e:[];return t.includes(i)?t:[...t,i]})},[n]),c=fe(e=>{let{key:t,value:r}=e;t&&void 0!==r&&""!==r&&n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return t.includes(r)?t.filter(e=>e!==r):[...t,r]})},[n]),u=fe(e=>{let{key:t}=e;n(t?`runtime.state.${t}`:"runtime.state",t?[]:{})},[n]);return t({id:"state",callbacks:xe(()=>lf(AL,{setState:r,toggleState:i,appendState:o,removeState:s,moveState:l,toggleInState:c,clearState:u}),[r,i,o,s,l,c,u])}),e},PL=({children:e,hostActions:t})=>{let[[n="basic",r,i,a]]=p(["schema.settings.userProvider","navigation.routeParams","navigation.queryParams","navigation.currentPageId"]),{previewMode:o}=Me();/* @__PURE__ */
616
616
  return Ie(gL,{currentPageId:a,routeParams:r,queryParams:i,children:/* @__PURE__ */Ie(NL,{authProvider:n,children:/* @__PURE__ */Ie(DL,{children:/* @__PURE__ */Ie(wL,{children:/* @__PURE__ */Ie(OL,{children:/* @__PURE__ */Ie(IL,{previewMode:o,children:/* @__PURE__ */Ie(CL,{actions:t,children:e})})})})})})})},ML=le({});ML.displayName="StyleContext";var LL,RL,jL=({children:e,style:t})=>{let{style:n}=he(fh),r=xe(()=>({}),[]);return $("style",t??(n||eh)),/* @__PURE__ */Ie(ML,{value:r,children:e})},FL="/plitzi-sdk.css",$L=({revision:e,webKey:t="",webId:n,environment:r="main",currentPageId:i,server:a,isHydrating:o=!1,offlineMode:s=!1,offlineData:l,offlineDataType:c="json",instanceId:u,renderMode:d=Pe.renderMode,sdkStylePath:p="./plitzi-sdk.css",sdkDevToolsStylePath:h,previewMode:m=!0,debugMode:g=!1,overQuota:y=!1,analytics:b,onInitEventBridge:v,hostData:x,hostActions:w,onInitStateManager:S,...N})=>{const T=he(f),[C,E]=Se(!o);ge(()=>E(!0),[]),k(["render.previewMode","render.debugMode","render.renderMode","render.environment","render.isHydrating","render.hydrated","render.overQuota"],[m,g,d,r,o,C,y]),k(["runtime.host"],[x]);const I=xe(()=>T?.withBase("runtime.state"),[T]),z=xe(()=>({get state(){return I?.getState()??{}},setState:e=>I?.setState(void 0,e),setStateByKey:(e,t)=>I?.setState(e,t),clearState:()=>I?.setState(void 0,{})}),[I]);return ge(()=>{S?.(z)},[S,z]),/* @__PURE__ */Ie(ZE,{webKey:t,webId:n,instanceId:u,server:a,offlineMode:s,offlineData:l,offlineDataType:c,revision:e,children:/* @__PURE__ */Ie(nI,{children:/* @__PURE__ */Ie(tI,{sdkStylePath:FL,children:/* @__PURE__ */Ie(jL,{children:/* @__PURE__ */Ie(JM,{onInit:v,debugMode:g,children:/* @__PURE__ */Ie(gz,{children:/* @__PURE__ */Ie(_z,{server:a,children:/* @__PURE__ */ze(JE,{currentPageId:i,children:[/* @__PURE__ */Ie(WE,{analytics:b}),/* @__PURE__ */Ie(GM,{children:/* @__PURE__ */Ie(PL,{hostActions:w,children:/* @__PURE__ */Ie(WM,{enabled:g,instanceId:u,devToolsStyleLink:h||"/plitzi-sdk-devtools.css",renderMode:"shadow",innerClassName:wt({flex:"iframe"===d}),children:/* @__PURE__ */Ie(mz,{sdkStylePath:FL,server:a,...N})})})})]})})})})})})})})},qL=({className:e,scoped:t=!1,children:n})=>{const{theme:r}=Ah();/* @__PURE__ */
617
- return Ie(iI,{className:wt(e,t&&"system"!==r&&r),children:n})},VL=e=>({apiServer:"https://api.plitzi.com",ssrServer:"https://ssr.plitzi.com",serverUrl:"https://server.plitzi.com",websocketServer:"wss://server.plitzi.com",subscriptionServer:"wss://server.plitzi.com/subscriptions",...e}),BL={Button:Rp,ContentEditable:Ff,Input:Up,Heading:pT,ContainerResizable:CT,ContainerCollapsable:NT,Text:RT,Markdown:Dw,ContainerTabs:DT},UL=({className:e="min-h-screen",children:t,webKey:n="",server:r,renderMode:i=Pe.renderMode,routing:a="browser",debugMode:o=!1,themeScope:s="document",theme:l,state:c,...u})=>{const d=xe(()=>O(n,!0),[n]),p=we(c).current,h=xe(()=>({segments:{},runtime:{sources:{},state:p??{}},render:Pe}),[p]),f=xe(()=>(e=>{let t=e?.split(":")[1];return t?`plitzi_debug_${t}`:"plitzi_debug"})("undefined"==typeof window?void 0:window.location.host),[]),[m,g]=Se(()=>(e=>{if("undefined"==typeof document)return!0;for(const t of document.cookie.split(";")){const n=t.indexOf("=");if(-1!==n&&t.slice(0,n).trim()===e)return"false"!==decodeURIComponent(t.slice(n+1).trim())}return!0})(f)),y=o&&m,v=xe(()=>VL(r),[r]),x=xe(()=>((e,t)=>{const n=new Du({uri:e.serverUrl}),r=new Vc,i=new $E(e=>({headers:{...e.headers,"sdk-version":"0.36.2",authorization:t?`Bearer ${t}`:""}}));return new ku({link:i.concat(Bu(e.serverUrl),new El((e,t)=>new qi(n=>{let r=t(e).subscribe({next:e=>{n.next(e.data?{...e,data:od(e.data)}:e)},error:e=>n.error(e),complete:()=>n.complete()});return()=>{r.unsubscribe()}})),n),cache:r})})(v,n),[v,n]);ge(()=>{},[]);const k=fe(()=>{const e=!m;((e,t)=>{"undefined"!=typeof document&&(document.cookie=`${e}=${JSON.stringify(t)}; path=/; max-age=31536000; samesite=lax`)})(f,e),g(e)},[f,m]);(({authorized:e,onToggle:t})=>{const n=fe(e=>{var n;e.shiftKey&&"F12"===e.key?t():!e.shiftKey||!e.altKey||"KeyD"!==e.code||(n=e.target)instanceof HTMLElement&&(n.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(n.tagName))||(e.preventDefault(),t())},[t]);ge(()=>{if(e)return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,n])})({authorized:o,onToggle:k}),ge(()=>{},[o,m,f]),ge(()=>{u.isHydrating&&U.setHydrated()},[u.isHydrating]);const w=xe(()=>{const e={};return ae.forEach(t,t=>{if(!de(t))return;if(t.type!==uz)return;const{renderType:n,component:r,assets:i=[],...a}=t.props;if(!n||!r)return;const o=r;o.type=n,o.assets=i,o.extraProps=a,e[n]=o}),e},[t]);"undefined"==typeof window&&v.requestUrl;const S="widget"===i?oe:"undefined"==typeof window?LE:"memory"===a?aE:zE,N="widget"===i?{}:{..."memory"===a&&"undefined"!=typeof window?{}:{basename:b(v,"basePath","/"),location:"undefined"==typeof window?v.requestUrl??"":void 0}};/* @__PURE__ */
617
+ return Ie(iI,{className:wt(e,t&&"system"!==r&&r),children:n})},VL=e=>({apiServer:"https://api.plitzi.com",ssrServer:"https://ssr.plitzi.com",serverUrl:"https://server.plitzi.com",websocketServer:"wss://server.plitzi.com",subscriptionServer:"wss://server.plitzi.com/subscriptions",...e}),BL={Button:Rp,ContentEditable:Ff,Input:Up,Heading:pT,ContainerResizable:CT,ContainerCollapsable:NT,Text:RT,Markdown:Dw,ContainerTabs:DT},UL=({className:e="min-h-screen",children:t,webKey:n="",server:r,renderMode:i=Pe.renderMode,routing:a="browser",debugMode:o=!1,themeScope:s="document",theme:l,state:c,...u})=>{const d=xe(()=>O(n,!0),[n]),p=we(c).current,h=xe(()=>({segments:{},runtime:{sources:{},state:p??{}},render:Pe}),[p]),f=xe(()=>(e=>{let t=e?.split(":")[1];return t?`plitzi_debug_${t}`:"plitzi_debug"})("undefined"==typeof window?void 0:window.location.host),[]),[m,g]=Se(()=>(e=>{if("undefined"==typeof document)return!0;for(const t of document.cookie.split(";")){const n=t.indexOf("=");if(-1!==n&&t.slice(0,n).trim()===e)return"false"!==decodeURIComponent(t.slice(n+1).trim())}return!0})(f)),y=o&&m,v=xe(()=>VL(r),[r]),x=xe(()=>((e,t)=>{const n=new Du({uri:e.serverUrl}),r=new Vc,i=new $E(e=>({headers:{...e.headers,"sdk-version":"0.37.1",authorization:t?`Bearer ${t}`:""}}));return new ku({link:i.concat(Bu(e.serverUrl),new El((e,t)=>new qi(n=>{let r=t(e).subscribe({next:e=>{n.next(e.data?{...e,data:od(e.data)}:e)},error:e=>n.error(e),complete:()=>n.complete()});return()=>{r.unsubscribe()}})),n),cache:r})})(v,n),[v,n]);ge(()=>{},[]);const k=fe(()=>{const e=!m;((e,t)=>{"undefined"!=typeof document&&(document.cookie=`${e}=${JSON.stringify(t)}; path=/; max-age=31536000; samesite=lax`)})(f,e),g(e)},[f,m]);(({authorized:e,onToggle:t})=>{const n=fe(e=>{var n;e.shiftKey&&"F12"===e.key?t():!e.shiftKey||!e.altKey||"KeyD"!==e.code||(n=e.target)instanceof HTMLElement&&(n.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(n.tagName))||(e.preventDefault(),t())},[t]);ge(()=>{if(e)return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,n])})({authorized:o,onToggle:k}),ge(()=>{},[o,m,f]),ge(()=>{u.isHydrating&&U.setHydrated()},[u.isHydrating]);const w=xe(()=>{const e={};return ae.forEach(t,t=>{if(!de(t))return;if(t.type!==uz)return;const{renderType:n,component:r,assets:i=[],...a}=t.props;if(!n||!r)return;const o=r;o.type=n,o.assets=i,o.extraProps=a,e[n]=o}),e},[t]);"undefined"==typeof window&&v.requestUrl;const S="widget"===i?oe:"undefined"==typeof window?LE:"memory"===a?aE:zE,N="widget"===i?{}:{..."memory"===a&&"undefined"!=typeof window?{}:{basename:b(v,"basePath","/"),location:"undefined"==typeof window?v.requestUrl??"":void 0}};/* @__PURE__ */
618
618
  return Ie(pt,{value:h,middlewares:[Ve(Yp("sdk")),Uh(d),...y?[()=>({onChange:e=>U.recordStoreChange(e)}),Fe({shouldRecord:e=>!e?.startsWith("runtime.elements")&&!e?.startsWith("rsc")&&!e?.startsWith("theme")})]:[]],children:/* @__PURE__ */Ie(Oh,{defaultTheme:"system",scope:s,theme:l,children:/* @__PURE__ */Ie(LT,{components:BL,children:/* @__PURE__ */Ie(qL,{scoped:"container"===s,className:wt("plitzi-sdk flex",e,{"sdk-debug-mode":y}),children:/* @__PURE__ */Ie(sN,{children:/* @__PURE__ */Ie(S,{...N,children:/* @__PURE__ */Ie(bT,{client:x,children:/* @__PURE__ */Ie(fT,{localCustomComponents:w,localComponents:WL,children:/* @__PURE__ */Ie($L,{server:v,webKey:n,renderMode:i,debugMode:y,webId:d,...u})})})})})})})})})},HL=K(({ref:e,className:t,spaceKey:n,environment:r="main"})=>{const{settings:{previewMode:i},contexts:{NetworkContext:a}}=H(),{server:o}=he(a);/* @__PURE__ */
619
619
  return Ie(gf,{ref:e,className:wt("plitzi-component__plitzi-sdk",t,{"with__plitzi-sdk":!i}),children:n&&/* @__PURE__ */Ie(UL,{webKey:n,environment:r,renderMode:"widget",server:o,className:"h-full w-full"})})}),WL={plitziSdk:Object.assign(HL,{type:"plitziSdk",content:{attributes:{spaceId:"",spaceKey:"",environment:"main"},definition:{label:"Plitzi Sdk",type:"plitziSdk",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:/* @__PURE__ */Ie(mT,{})},defaultStyle:{name:"Plitzi Sdk",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}})};function GL(e,t={},n={},r=!1,i=!1){const{actionRuns:a,...o}=(e=>{if(e.analytics||e.offlineMode||!e.webKey)return e;const{apiServer:t}=VL(e.server);return t?{...e,analytics:{endpoint:`${t.replace(/\/+$/,"")}/v1/collect`,key:e.webKey}}:e})(t),s=o.debugMode??r;s&&a?.length&&at(a);const l=({isHydrating:e=!1})=>{const[t,r]=Se(!e);ge(()=>r(!0),[]);const i=Object.keys(n).filter(e=>t||!n[e].clientOnly);s||(()=>{if(typeof window>"u")return;let e=()=>{},t=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;"object"==typeof t&&Object.keys(t).forEach(n=>{let r=t[n];t[n]="function"==typeof r?e:null})})();const a=fe(e=>{LL=e},[]),l=fe(e=>{RL=e},[]);/* @__PURE__ */
620
- return Ie(UL,{...o,debugMode:s,isHydrating:e,onInitStateManager:a,onInitEventBridge:l,children:i.filter(e=>!!n[e].component).map(e=>/* @__PURE__ */Ie(mz.Plugin,{renderType:e,component:n[e].component,...n[e].props},e))})},c="undefined"!=typeof document?document.getElementById(e):void 0;if(!c)return;const u=i?Ce(c,/* @__PURE__ */Ie(l,{isHydrating:!0})):Te(c);return i||u.render(/* @__PURE__ */Ie(l,{})),{unmount:()=>u.unmount()}}Promise.resolve({ });var QL=({debugMode:e=!1,isHydrating:t=!1,children:n,webKey:r="",environment:i="main",renderMode:a=Pe.renderMode,...o})=>/* @__PURE__ */Ie(UL,{...o,isHydrating:t,renderMode:a,debugMode:e,webKey:r,environment:i,children:n});QL.Plugin=mz.Plugin;var JL=H,KL="0.36.2",YL=()=>LL,XL=()=>RL;export{o as ComponentContext,fT as ComponentProvider,xf as JsxManager,A as PlitziServiceProvider,zf as PluginManager,R as PluginRemote,HN as ReplicaProvider,gf as RootElement,QL as default,XL as getEventBridge,YL as getStateManager,Wh as n,GL as render,WL as sdkComponents,yf as t,HE as track,Xh as useElement,JL as usePlitziServiceContext,Zh as useRscData,Bh as useRscRefresh,p as useStore,KL as version,K as withElement};
620
+ return Ie(UL,{...o,debugMode:s,isHydrating:e,onInitStateManager:a,onInitEventBridge:l,children:i.filter(e=>!!n[e].component).map(e=>/* @__PURE__ */Ie(mz.Plugin,{renderType:e,component:n[e].component,...n[e].props},e))})},c="undefined"!=typeof document?document.getElementById(e):void 0;if(!c)return;const u=i?Ce(c,/* @__PURE__ */Ie(l,{isHydrating:!0})):Te(c);return i||u.render(/* @__PURE__ */Ie(l,{})),{unmount:()=>u.unmount()}}Promise.resolve({ });var QL=({debugMode:e=!1,isHydrating:t=!1,children:n,webKey:r="",environment:i="main",renderMode:a=Pe.renderMode,...o})=>/* @__PURE__ */Ie(UL,{...o,isHydrating:t,renderMode:a,debugMode:e,webKey:r,environment:i,children:n});QL.Plugin=mz.Plugin;var JL=H,KL="0.37.1",YL=()=>LL,XL=()=>RL;export{o as ComponentContext,fT as ComponentProvider,xf as JsxManager,A as PlitziServiceProvider,zf as PluginManager,R as PluginRemote,HN as ReplicaProvider,gf as RootElement,QL as default,XL as getEventBridge,YL as getStateManager,Wh as n,GL as render,WL as sdkComponents,yf as t,HE as track,Xh as useElement,JL as usePlitziServiceContext,Zh as useRscData,Bh as useRscRefresh,p as useStore,KL as version,K as withElement};