@tscircuit/runframe 0.0.974 → 0.0.976
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.
|
@@ -319,7 +319,7 @@ You might need to use a local HTTP server (instead of file://): https://react.de
|
|
|
319
319
|
root.render(<App />);`),S.unstable_strictMode===!0&&(O=!0),S.identifierPrefix!==void 0&&(Y=S.identifierPrefix),S.onUncaughtError!==void 0&&(ne=S.onUncaughtError),S.onCaughtError!==void 0&&(le=S.onCaughtError),S.onRecoverableError!==void 0&&(je=S.onRecoverableError),S.unstable_transitionCallbacks!==void 0&&(et=S.unstable_transitionCallbacks)),S=kt(x,1,!1,null,null,O,Y,ne,le,je,et,null),x[Vs]=S.current,ux(x),new Rh(S)},eR.hydrateRoot=function(x,S,O){if(!b(x))throw Error("Target container is not a DOM element.");rl(x),S===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var Y=!1,ne="",le=ox,je=bu,et=em,Rt=null,Dt=null;return O!=null&&(O.unstable_strictMode===!0&&(Y=!0),O.identifierPrefix!==void 0&&(ne=O.identifierPrefix),O.onUncaughtError!==void 0&&(le=O.onUncaughtError),O.onCaughtError!==void 0&&(je=O.onCaughtError),O.onRecoverableError!==void 0&&(et=O.onRecoverableError),O.unstable_transitionCallbacks!==void 0&&(Rt=O.unstable_transitionCallbacks),O.formState!==void 0&&(Dt=O.formState)),S=kt(x,1,!0,S,O??null,Y,ne,le,je,et,Rt,Dt),S.context=qt(null),O=S.current,Y=nh(O),Y=Et(Y),ne=ko(Y),ne.callback=null,mo(O,ne,Y),O=Y,S.current.lanes=O,Ke(S,O),Rd(S),x[Vs]=S.current,ux(x),new Gu(S)},eR.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),eR}var X5e;function xmt(){if(X5e)return $O.exports;X5e=1;var t={env:{}};function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(t.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}}return t.env.NODE_ENV==="production"?(e(),$O.exports=gmt()):$O.exports=bmt(),$O.exports}var vmt=xmt(),Ce=g9();const ts=u2(Ce),W5e=W7({__proto__:null,default:ts},[Ce]);function qa(t,e,{checkForDefaultPrevented:n=!0}={}){return function(r){if(t?.(r),n===!1||!r.defaultPrevented)return e?.(r)}}function wmt(t,e){const n=Ce.createContext(e),i=o=>{const{children:s,...a}=o,c=Ce.useMemo(()=>a,Object.values(a));return ye.jsx(n.Provider,{value:c,children:s})};i.displayName=t+"Provider";function r(o){const s=Ce.useContext(n);if(s)return s;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[i,r]}function bS(t,e=[]){let n=[];function i(o,s){const a=Ce.createContext(s),c=n.length;n=[...n,s];const l=d=>{const{scope:h,children:f,...m}=d,y=h?.[t]?.[c]||a,g=Ce.useMemo(()=>m,Object.values(m));return ye.jsx(y.Provider,{value:g,children:f})};l.displayName=o+"Provider";function u(d,h){const f=h?.[t]?.[c]||a,m=Ce.useContext(f);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[l,u]}const r=()=>{const o=n.map(s=>Ce.createContext(s));return function(a){const c=a?.[t]||o;return Ce.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return r.scopeName=t,[i,Smt(r,...e)]}function Smt(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const i=t.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(o){const s=i.reduce((a,{useScope:c,scopeName:l})=>{const d=c(o)[`__scope${l}`];return{...a,...d}},{});return Ce.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return n.scopeName=e.scopeName,n}function Z5e(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function GO(...t){return e=>{let n=!1;const i=t.map(r=>{const o=Z5e(r,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let r=0;r<i.length;r++){const o=i[r];typeof o=="function"?o():Z5e(t[r],null)}}}}function Gy(...t){return Ce.useCallback(GO(...t),t)}function v8(t){const e=Tmt(t),n=Ce.forwardRef((i,r)=>{const{children:o,...s}=i,a=Ce.Children.toArray(o),c=a.find(Amt);if(c){const l=c.props.children,u=a.map(d=>d===c?Ce.Children.count(l)>1?Ce.Children.only(null):Ce.isValidElement(l)?l.props.children:null:d);return ye.jsx(e,{...s,ref:r,children:Ce.isValidElement(l)?Ce.cloneElement(l,void 0,u):null})}return ye.jsx(e,{...s,ref:r,children:o})});return n.displayName=`${t}.Slot`,n}var Emt=v8("Slot");function Tmt(t){const e=Ce.forwardRef((n,i)=>{const{children:r,...o}=n;if(Ce.isValidElement(r)){const s=Rmt(r),a=Cmt(o,r.props);return r.type!==Ce.Fragment&&(a.ref=i?GO(i,s):s),Ce.cloneElement(r,a)}return Ce.Children.count(r)>1?Ce.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var K5e=Symbol("radix.slottable");function Mmt(t){const e=({children:n})=>ye.jsx(ye.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=K5e,e}function Amt(t){return Ce.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===K5e}function Cmt(t,e){const n={...e};for(const i in e){const r=t[i],o=e[i];/^on[A-Z]/.test(i)?r&&o?n[i]=(...a)=>{const c=o(...a);return r(...a),c}:r&&(n[i]=r):i==="style"?n[i]={...r,...o}:i==="className"&&(n[i]=[r,o].filter(Boolean).join(" "))}return{...t,...n}}function Rmt(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Q5e(t){const e=t+"CollectionProvider",[n,i]=bS(e),[r,o]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=y=>{const{scope:g,children:b}=y,v=ts.useRef(null),w=ts.useRef(new Map).current;return ye.jsx(r,{scope:g,itemMap:w,collectionRef:v,children:b})};s.displayName=e;const a=t+"CollectionSlot",c=v8(a),l=ts.forwardRef((y,g)=>{const{scope:b,children:v}=y,w=o(a,b),T=Gy(g,w.collectionRef);return ye.jsx(c,{ref:T,children:v})});l.displayName=a;const u=t+"CollectionItemSlot",d="data-radix-collection-item",h=v8(u),f=ts.forwardRef((y,g)=>{const{scope:b,children:v,...w}=y,T=ts.useRef(null),N=Gy(g,T),R=o(u,b);return ts.useEffect(()=>(R.itemMap.set(T,{ref:T,...w}),()=>void R.itemMap.delete(T))),ye.jsx(h,{[d]:"",ref:N,children:v})});f.displayName=u;function m(y){const g=o(t+"CollectionConsumer",y);return ts.useCallback(()=>{const v=g.collectionRef.current;if(!v)return[];const w=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((R,P)=>w.indexOf(R.ref.current)-w.indexOf(P.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:s,Slot:l,ItemSlot:f},m,i]}var K3=globalThis?.document?Ce.useLayoutEffect:()=>{},Pmt=W5e[" useId ".trim().toString()]||(()=>{}),Imt=0;function xS(t){const[e,n]=Ce.useState(Pmt());return K3(()=>{n(i=>i??String(Imt++))},[t]),e?`radix-${e}`:""}var UW=BW();const $W=u2(UW);var Nmt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],l0=Nmt.reduce((t,e)=>{const n=v8(`Primitive.${e}`),i=Ce.forwardRef((r,o)=>{const{asChild:s,...a}=r,c=s?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),ye.jsx(c,{...a,ref:o})});return i.displayName=`Primitive.${e}`,{...t,[e]:i}},{});function J5e(t,e){t&&UW.flushSync(()=>t.dispatchEvent(e))}function K5(t){const e=Ce.useRef(t);return Ce.useEffect(()=>{e.current=t}),Ce.useMemo(()=>(...n)=>e.current?.(...n),[])}var kmt=W5e[" useInsertionEffect ".trim().toString()]||K3;function w8({prop:t,defaultProp:e,onChange:n=()=>{},caller:i}){const[r,o,s]=Omt({defaultProp:e,onChange:n}),a=t!==void 0,c=a?t:r;{const u=Ce.useRef(t!==void 0);Ce.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${i} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,i])}const l=Ce.useCallback(u=>{if(a){const d=Lmt(u)?u(t):u;d!==t&&s.current?.(d)}else o(u)},[a,t,o,s]);return[c,l]}function Omt({defaultProp:t,onChange:e}){const[n,i]=Ce.useState(t),r=Ce.useRef(n),o=Ce.useRef(e);return kmt(()=>{o.current=e},[e]),Ce.useEffect(()=>{r.current!==n&&(o.current?.(n),r.current=n)},[n,r]),[n,i,o]}function Lmt(t){return typeof t=="function"}var Dmt=Ce.createContext(void 0);function jW(t){const e=Ce.useContext(Dmt);return t||e||"ltr"}var HW="rovingFocusGroup.onEntryFocus",zmt={bubbles:!1,cancelable:!0},tR="RovingFocusGroup",[VW,ewe,Fmt]=Q5e(tR),[Bmt,YO]=bS(tR,[Fmt]),[Umt,$mt]=Bmt(tR),twe=Ce.forwardRef((t,e)=>ye.jsx(VW.Provider,{scope:t.__scopeRovingFocusGroup,children:ye.jsx(VW.Slot,{scope:t.__scopeRovingFocusGroup,children:ye.jsx(jmt,{...t,ref:e})})}));twe.displayName=tR;var jmt=Ce.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:r=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=t,h=Ce.useRef(null),f=Gy(e,h),m=jW(o),[y,g]=w8({prop:s,defaultProp:a??null,onChange:c,caller:tR}),[b,v]=Ce.useState(!1),w=K5(l),T=ewe(n),N=Ce.useRef(!1),[R,P]=Ce.useState(0);return Ce.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(HW,w),()=>M.removeEventListener(HW,w)},[w]),ye.jsx(Umt,{scope:n,orientation:i,dir:m,loop:r,currentTabStopId:y,onItemFocus:Ce.useCallback(M=>g(M),[g]),onItemShiftTab:Ce.useCallback(()=>v(!0),[]),onFocusableItemAdd:Ce.useCallback(()=>P(M=>M+1),[]),onFocusableItemRemove:Ce.useCallback(()=>P(M=>M-1),[]),children:ye.jsx(l0.div,{tabIndex:b||R===0?-1:0,"data-orientation":i,...d,ref:f,style:{outline:"none",...t.style},onMouseDown:qa(t.onMouseDown,()=>{N.current=!0}),onFocus:qa(t.onFocus,M=>{const I=!N.current;if(M.target===M.currentTarget&&I&&!b){const A=new CustomEvent(HW,zmt);if(M.currentTarget.dispatchEvent(A),!A.defaultPrevented){const $=T().filter(K=>K.focusable),k=$.find(K=>K.active),V=$.find(K=>K.id===y),W=[k,V,...$].filter(Boolean).map(K=>K.ref.current);rwe(W,u)}}N.current=!1}),onBlur:qa(t.onBlur,()=>v(!1))})})}),nwe="RovingFocusGroupItem",iwe=Ce.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:r=!1,tabStopId:o,children:s,...a}=t,c=xS(),l=o||c,u=$mt(nwe,n),d=u.currentTabStopId===l,h=ewe(n),{onFocusableItemAdd:f,onFocusableItemRemove:m,currentTabStopId:y}=u;return Ce.useEffect(()=>{if(i)return f(),()=>m()},[i,f,m]),ye.jsx(VW.ItemSlot,{scope:n,id:l,focusable:i,active:r,children:ye.jsx(l0.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...a,ref:e,onMouseDown:qa(t.onMouseDown,g=>{i?u.onItemFocus(l):g.preventDefault()}),onFocus:qa(t.onFocus,()=>u.onItemFocus(l)),onKeyDown:qa(t.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const b=Gmt(g,u.orientation,u.dir);if(b!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=h().filter(T=>T.focusable).map(T=>T.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const T=w.indexOf(g.currentTarget);w=u.loop?Ymt(w,T+1):w.slice(T+1)}setTimeout(()=>rwe(w))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:y!=null}):s})})});iwe.displayName=nwe;var Hmt={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Vmt(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function Gmt(t,e,n){const i=Vmt(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return Hmt[i]}function rwe(t,e=!1){const n=document.activeElement;for(const i of t)if(i===n||(i.focus({preventScroll:e}),document.activeElement!==n))return}function Ymt(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var owe=twe,swe=iwe;function qmt(t,e){return Ce.useReducer((n,i)=>e[n][i]??n,t)}var Q5=t=>{const{present:e,children:n}=t,i=Xmt(e),r=typeof n=="function"?n({present:i.isPresent}):Ce.Children.only(n),o=Gy(i.ref,Wmt(r));return typeof n=="function"||i.isPresent?Ce.cloneElement(r,{ref:o}):null};Q5.displayName="Presence";function Xmt(t){const[e,n]=Ce.useState(),i=Ce.useRef(null),r=Ce.useRef(t),o=Ce.useRef("none"),s=t?"mounted":"unmounted",[a,c]=qmt(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Ce.useEffect(()=>{const l=qO(i.current);o.current=a==="mounted"?l:"none"},[a]),K3(()=>{const l=i.current,u=r.current;if(u!==t){const h=o.current,f=qO(l);t?c("MOUNT"):f==="none"||l?.display==="none"?c("UNMOUNT"):c(u&&h!==f?"ANIMATION_OUT":"UNMOUNT"),r.current=t}},[t,c]),K3(()=>{if(e){let l;const u=e.ownerDocument.defaultView??window,d=f=>{const y=qO(i.current).includes(CSS.escape(f.animationName));if(f.target===e&&y&&(c("ANIMATION_END"),!r.current)){const g=e.style.animationFillMode;e.style.animationFillMode="forwards",l=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=g)})}},h=f=>{f.target===e&&(o.current=qO(i.current))};return e.addEventListener("animationstart",h),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{u.clearTimeout(l),e.removeEventListener("animationstart",h),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:Ce.useCallback(l=>{i.current=l?getComputedStyle(l):null,n(l)},[])}}function qO(t){return t?.animationName||"none"}function Wmt(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var XO="Tabs",[Zmt,JJn]=bS(XO,[YO]),awe=YO(),[Kmt,GW]=Zmt(XO),cwe=Ce.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,onValueChange:r,defaultValue:o,orientation:s="horizontal",dir:a,activationMode:c="automatic",...l}=t,u=jW(a),[d,h]=w8({prop:i,onChange:r,defaultProp:o??"",caller:XO});return ye.jsx(Kmt,{scope:n,baseId:xS(),value:d,onValueChange:h,orientation:s,dir:u,activationMode:c,children:ye.jsx(l0.div,{dir:u,"data-orientation":s,...l,ref:e})})});cwe.displayName=XO;var lwe="TabsList",uwe=Ce.forwardRef((t,e)=>{const{__scopeTabs:n,loop:i=!0,...r}=t,o=GW(lwe,n),s=awe(n);return ye.jsx(owe,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:i,children:ye.jsx(l0.div,{role:"tablist","aria-orientation":o.orientation,...r,ref:e})})});uwe.displayName=lwe;var dwe="TabsTrigger",hwe=Ce.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,disabled:r=!1,...o}=t,s=GW(dwe,n),a=awe(n),c=mwe(s.baseId,i),l=_we(s.baseId,i),u=i===s.value;return ye.jsx(swe,{asChild:!0,...a,focusable:!r,active:u,children:ye.jsx(l0.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:c,...o,ref:e,onMouseDown:qa(t.onMouseDown,d=>{!r&&d.button===0&&d.ctrlKey===!1?s.onValueChange(i):d.preventDefault()}),onKeyDown:qa(t.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(i)}),onFocus:qa(t.onFocus,()=>{const d=s.activationMode!=="manual";!u&&!r&&d&&s.onValueChange(i)})})})});hwe.displayName=dwe;var pwe="TabsContent",fwe=Ce.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,forceMount:r,children:o,...s}=t,a=GW(pwe,n),c=mwe(a.baseId,i),l=_we(a.baseId,i),u=i===a.value,d=Ce.useRef(u);return Ce.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),ye.jsx(Q5,{present:r||u,children:({present:h})=>ye.jsx(l0.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:l,tabIndex:0,...s,ref:e,style:{...t.style,animationDuration:d.current?"0s":void 0},children:h&&o})})});fwe.displayName=pwe;function mwe(t,e){return`${t}-trigger-${e}`}function _we(t,e){return`${t}-content-${e}`}var Qmt=cwe,ywe=uwe,gwe=hwe,bwe=fwe;function xwe(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=xwe(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function J5(){for(var t,e,n=0,i="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=xwe(t))&&(i&&(i+=" "),i+=e);return i}const YW="-",Jmt=t=>{const e=t_t(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:s=>{const a=s.split(YW);return a[0]===""&&a.length!==1&&a.shift(),vwe(a,e)||e_t(s)},getConflictingClassGroupIds:(s,a)=>{const c=n[s]||[];return a&&i[s]?[...c,...i[s]]:c}}},vwe=(t,e)=>{if(t.length===0)return e.classGroupId;const n=t[0],i=e.nextPart.get(n),r=i?vwe(t.slice(1),i):void 0;if(r)return r;if(e.validators.length===0)return;const o=t.join(YW);return e.validators.find(({validator:s})=>s(o))?.classGroupId},wwe=/^\[(.+)\]$/,e_t=t=>{if(wwe.test(t)){const e=wwe.exec(t)[1],n=e?.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},t_t=t=>{const{theme:e,prefix:n}=t,i={nextPart:new Map,validators:[]};return i_t(Object.entries(t.classGroups),n).forEach(([o,s])=>{qW(s,i,o,e)}),i},qW=(t,e,n,i)=>{t.forEach(r=>{if(typeof r=="string"){const o=r===""?e:Swe(e,r);o.classGroupId=n;return}if(typeof r=="function"){if(n_t(r)){qW(r(i),e,n,i);return}e.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([o,s])=>{qW(s,Swe(e,o),n,i)})})},Swe=(t,e)=>{let n=t;return e.split(YW).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},n_t=t=>t.isThemeGetter,i_t=(t,e)=>e?t.map(([n,i])=>{const r=i.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,a])=>[e+s,a])):o);return[n,r]}):t,r_t=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,i=new Map;const r=(o,s)=>{n.set(o,s),e++,e>t&&(e=0,i=n,n=new Map)};return{get(o){let s=n.get(o);if(s!==void 0)return s;if((s=i.get(o))!==void 0)return r(o,s),s},set(o,s){n.has(o)?n.set(o,s):r(o,s)}}},Ewe="!",o_t=t=>{const{separator:e,experimentalParseClassName:n}=t,i=e.length===1,r=e[0],o=e.length,s=a=>{const c=[];let l=0,u=0,d;for(let g=0;g<a.length;g++){let b=a[g];if(l===0){if(b===r&&(i||a.slice(g,g+o)===e)){c.push(a.slice(u,g)),u=g+o;continue}if(b==="/"){d=g;continue}}b==="["?l++:b==="]"&&l--}const h=c.length===0?a:a.substring(u),f=h.startsWith(Ewe),m=f?h.substring(1):h,y=d&&d>u?d-u:void 0;return{modifiers:c,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:s}):s},s_t=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(i=>{i[0]==="["?(e.push(...n.sort(),i),n=[]):n.push(i)}),e.push(...n.sort()),e},a_t=t=>({cache:r_t(t.cacheSize),parseClassName:o_t(t),...Jmt(t)}),c_t=/\s+/,l_t=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r}=e,o=[],s=t.trim().split(c_t);let a="";for(let c=s.length-1;c>=0;c-=1){const l=s[c],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=n(l);let m=!!f,y=i(m?h.substring(0,f):h);if(!y){if(!m){a=l+(a.length>0?" "+a:a);continue}if(y=i(h),!y){a=l+(a.length>0?" "+a:a);continue}m=!1}const g=s_t(u).join(":"),b=d?g+Ewe:g,v=b+y;if(o.includes(v))continue;o.push(v);const w=r(y,m);for(let T=0;T<w.length;++T){const N=w[T];o.push(b+N)}a=l+(a.length>0?" "+a:a)}return a};function u_t(){let t=0,e,n,i="";for(;t<arguments.length;)(e=arguments[t++])&&(n=Twe(e))&&(i&&(i+=" "),i+=n);return i}const Twe=t=>{if(typeof t=="string")return t;let e,n="";for(let i=0;i<t.length;i++)t[i]&&(e=Twe(t[i]))&&(n&&(n+=" "),n+=e);return n};function d_t(t,...e){let n,i,r,o=s;function s(c){const l=e.reduce((u,d)=>d(u),t());return n=a_t(l),i=n.cache.get,r=n.cache.set,o=a,a(c)}function a(c){const l=i(c);if(l)return l;const u=l_t(c,n);return r(c,u),u}return function(){return o(u_t.apply(null,arguments))}}const fm=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},Mwe=/^\[(?:([a-z-]+):)?(.+)\]$/i,h_t=/^\d+\/\d+$/,p_t=new Set(["px","full","screen"]),f_t=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,m_t=/\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$/,__t=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,y_t=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,g_t=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vS=t=>S8(t)||p_t.has(t)||h_t.test(t),Q3=t=>E8(t,"length",M_t),S8=t=>!!t&&!Number.isNaN(Number(t)),XW=t=>E8(t,"number",S8),nR=t=>!!t&&Number.isInteger(Number(t)),b_t=t=>t.endsWith("%")&&S8(t.slice(0,-1)),qc=t=>Mwe.test(t),J3=t=>f_t.test(t),x_t=new Set(["length","size","percentage"]),v_t=t=>E8(t,x_t,Awe),w_t=t=>E8(t,"position",Awe),S_t=new Set(["image","url"]),E_t=t=>E8(t,S_t,C_t),T_t=t=>E8(t,"",A_t),iR=()=>!0,E8=(t,e,n)=>{const i=Mwe.exec(t);return i?i[1]?typeof e=="string"?i[1]===e:e.has(i[1]):n(i[2]):!1},M_t=t=>m_t.test(t)&&!__t.test(t),Awe=()=>!1,A_t=t=>y_t.test(t),C_t=t=>g_t.test(t),R_t=d_t(()=>{const t=fm("colors"),e=fm("spacing"),n=fm("blur"),i=fm("brightness"),r=fm("borderColor"),o=fm("borderRadius"),s=fm("borderSpacing"),a=fm("borderWidth"),c=fm("contrast"),l=fm("grayscale"),u=fm("hueRotate"),d=fm("invert"),h=fm("gap"),f=fm("gradientColorStops"),m=fm("gradientColorStopPositions"),y=fm("inset"),g=fm("margin"),b=fm("opacity"),v=fm("padding"),w=fm("saturate"),T=fm("scale"),N=fm("sepia"),R=fm("skew"),P=fm("space"),M=fm("translate"),I=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",qc,e],k=()=>[qc,e],V=()=>["",vS,Q3],X=()=>["auto",S8,qc],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>["start","end","center","between","around","evenly","stretch"],de=()=>["","0",qc],be=()=>["auto","avoid","all","avoid-page","page","left","right","column"],re=()=>[S8,qc];return{cacheSize:500,separator:":",theme:{colors:[iR],spacing:[vS,Q3],blur:["none","",J3,qc],brightness:re(),borderColor:[t],borderRadius:["none","","full",J3,qc],borderSpacing:k(),borderWidth:V(),contrast:re(),grayscale:de(),hueRotate:re(),invert:de(),gap:k(),gradientColorStops:[t],gradientColorStopPositions:[b_t,Q3],inset:$(),margin:$(),opacity:re(),padding:k(),saturate:re(),scale:re(),sepia:de(),skew:re(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",qc]}],container:["container"],columns:[{columns:[J3]}],"break-after":[{"break-after":be()}],"break-before":[{"break-before":be()}],"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"],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:[...W(),qc]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nR,qc]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qc]}],grow:[{grow:de()}],shrink:[{shrink:de()}],order:[{order:["first","last","none",nR,qc]}],"grid-cols":[{"grid-cols":[iR]}],"col-start-end":[{col:["auto",{span:["full",nR,qc]},qc]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[iR]}],"row-start-end":[{row:["auto",{span:[nR,qc]},qc]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qc]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qc]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...se()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...se(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...se(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qc,e]}],"min-w":[{"min-w":[qc,e,"min","max","fit"]}],"max-w":[{"max-w":[qc,e,"none","full","min","max","fit","prose",{screen:[J3]},J3]}],h:[{h:[qc,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qc,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qc,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qc,e,"auto","min","max","fit"]}],"font-size":[{text:["base",J3,Q3]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",XW]}],"font-family":[{font:[iR]}],"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:["tighter","tight","normal","wide","wider","widest",qc]}],"line-clamp":[{"line-clamp":["none",S8,XW]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vS,qc]}],"list-image":[{"list-image":["none",qc]}],"list-style-type":[{list:["none","disc","decimal",qc]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vS,Q3]}],"underline-offset":[{"underline-offset":["auto",vS,qc]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qc]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qc]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),w_t]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",v_t]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},E_t]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:K()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...K()]}],"outline-offset":[{"outline-offset":[vS,qc]}],"outline-w":[{outline:[vS,Q3]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[vS,Q3]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",J3,T_t]}],"shadow-color":[{shadow:[iR]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",J3,qc]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qc]}],duration:[{duration:re()}],ease:[{ease:["linear","in","out","in-out",qc]}],delay:[{delay:re()}],animate:[{animate:["none","spin","ping","pulse","bounce",qc]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[nR,qc]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qc]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],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",qc]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",qc]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[vS,Q3,XW]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["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-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});var qn=typeof window<"u"?window:void 0,Dv=typeof globalThis<"u"?globalThis:qn,Cwe=Array.prototype,Rwe=Cwe.forEach,Pwe=Cwe.indexOf,b9=Dv?.navigator,Zr=Dv?.document,zv=Dv?.location,WW=Dv?.fetch,ZW=Dv!=null&&Dv.XMLHttpRequest&&"withCredentials"in new Dv.XMLHttpRequest?Dv.XMLHttpRequest:void 0,Iwe=Dv?.AbortController,Fv=b9?.userAgent,Bs=qn??{},wS={DEBUG:!1,LIB_VERSION:"1.261.7"};function Kr(){return Kr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Kr.apply(null,arguments)}function Nwe(t,e){if(t==null)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;n[i]=t[i]}return n}var P_t=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function zl(t,e){return t.indexOf(e)!==-1}var WO=function(t){return t.trim()},KW=function(t){return t.replace(/^\$/,"")},I_t=Array.isArray,kwe=Object.prototype,Owe=kwe.hasOwnProperty,ZO=kwe.toString,mm=I_t||function(t){return ZO.call(t)==="[object Array]"},d2=t=>typeof t=="function",ay=t=>t===Object(t)&&!mm(t),T8=t=>{if(ay(t)){for(var e in t)if(Owe.call(t,e))return!1;return!0}return!1},br=t=>t===void 0,cy=t=>ZO.call(t)=="[object String]",QW=t=>cy(t)&&t.trim().length===0,e4=t=>t===null,Lh=t=>br(t)||e4(t),vx=t=>ZO.call(t)=="[object Number]",ew=t=>ZO.call(t)==="[object Boolean]",N_t=t=>t instanceof FormData,k_t=t=>zl(P_t,t),O_t=[!0,"true",1,"1","yes"],JW=t=>zl(O_t,t),L_t=[!1,"false",0,"0","no"];function x9(t,e,n,i,r){return e>n&&(i.warn("min cannot be greater than max."),e=n),vx(t)?t>n?(i.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t<e?(i.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(i.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+r),x9(r||n,e,n,i))}let Lwe=class{stop(){this.t&&(clearInterval(this.t),this.t=void 0)}constructor(e){this.i=e,this.o={},this.h=()=>{Object.keys(this.o).forEach((n=>{var i=this.m(n)+this.S;i>=this.$?delete this.o[n]:this.k(n,i)}))},this.m=n=>this.o[String(n)],this.k=(n,i)=>{this.o[String(n)]=i},this.consumeRateLimit=n=>{var i,r=(i=this.m(n))!=null?i:this.$;if((r=Math.max(r-1,0))===0)return!0;this.k(n,r);var o,s=r===0;return s&&((o=this.I)==null||o.call(this,n)),s},this.I=this.i.I,this.$=x9(this.i.bucketSize,0,100,this.i.R),this.S=x9(this.i.refillRate,0,this.$,this.i.R),this.P=x9(this.i.refillInterval,0,864e5,this.i.R),this.t=setInterval((()=>{this.h()}),this.P)}};var Dwe=t=>{var e={T:function(n){if(qn&&(wS.DEBUG||Bs.POSTHOG_DEBUG)&&!br(qn.console)&&qn.console){for(var i=("__rrweb_original__"in qn.console[n])?qn.console[n].__rrweb_original__:qn.console[n],r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];i(t,...o)}},info:function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];e.T("log",...i)},warn:function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];e.T("warn",...i)},error:function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];e.T("error",...i)},critical:function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];console.error(t,...i)},uninitializedWarning:n=>{e.error("You must initialize PostHog before calling "+n)},createLogger:n=>Dwe(t+" "+n)};return e},Yr=Dwe("[PostHog.js]"),g1=Yr.createLogger,D_t=g1("[ExternalScriptsLoader]"),zwe=(t,e,n)=>{if(t.config.disable_external_dependency_loading)return D_t.warn(e+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var i=Zr?.querySelectorAll("script");if(i){for(var r,o=function(){if(i[s].src===e){var c=i[s];return c.__posthog_loading_callback_fired?{v:n()}:(c.addEventListener("load",(l=>{c.__posthog_loading_callback_fired=!0,n(void 0,l)})),c.onerror=l=>n(l),{v:void 0})}},s=0;s<i.length;s++)if(r=o())return r.v}var a=()=>{if(!Zr)return n("document not found");var c=Zr.createElement("script");if(c.type="text/javascript",c.crossOrigin="anonymous",c.src=e,c.onload=d=>{c.__posthog_loading_callback_fired=!0,n(void 0,d)},c.onerror=d=>n(d),t.config.prepare_external_dependency_script&&(c=t.config.prepare_external_dependency_script(c)),!c)return n("prepare_external_dependency_script returned null");var l,u=Zr.querySelectorAll("body > script");u.length>0?(l=u[0].parentNode)==null||l.insertBefore(c,u[0]):Zr.body.appendChild(c)};Zr!=null&&Zr.body?a():Zr?.addEventListener("DOMContentLoaded",a)};Bs.__PosthogExtensions__=Bs.__PosthogExtensions__||{},Bs.__PosthogExtensions__.loadExternalDependency=(t,e,n)=>{var i="/static/"+e+".js?v="+t.version;if(e==="remote-config"&&(i="/array/"+t.config.token+"/config.js"),e==="toolbar"){var r=3e5;i=i+"&t="+Math.floor(Date.now()/r)*r}var o=t.requestRouter.endpointFor("assets",i);zwe(t,o,n)},Bs.__PosthogExtensions__.loadSiteApp=(t,e,n)=>{var i=t.requestRouter.endpointFor("api",e);zwe(t,i,n)};var KO={};function t4(t,e,n){if(mm(t)){if(Rwe&&t.forEach===Rwe)t.forEach(e,n);else if("length"in t&&t.length===+t.length){for(var i=0,r=t.length;i<r;i++)if(i in t&&e.call(n,t[i],i)===KO)return}}}function vf(t,e,n){if(!Lh(t)){if(mm(t))return t4(t,e,n);if(N_t(t)){for(var i of t.entries())if(e.call(n,i[1],i[0])===KO)return}else for(var r in t)if(Owe.call(t,r)&&e.call(n,t[r],r)===KO)return}}var Yy=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return t4(n,(function(r){for(var o in r)r[o]!==void 0&&(t[o]=r[o])})),t},QO=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return t4(n,(function(r){t4(r,(function(o){t.push(o)}))})),t};function JO(t){for(var e=Object.keys(t),n=e.length,i=new Array(n);n--;)i[n]=[e[n],t[e[n]]];return i}var Fwe=function(t){try{return t()}catch{return}},z_t=function(t){return function(){try{for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.apply(this,n)}catch(r){Yr.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),Yr.critical(r)}}},eZ=function(t){var e={};return vf(t,(function(n,i){(cy(n)&&n.length>0||vx(n))&&(e[i]=n)})),e};function F_t(t,e){return n=t,i=o=>cy(o)&&!e4(e)?o.slice(0,e):o,r=new Set,(function o(s,a){return s!==Object(s)?i?i(s,a):s:r.has(s)?void 0:(r.add(s),mm(s)?(c=[],t4(s,(l=>{c.push(o(l))}))):(c={},vf(s,((l,u)=>{r.has(l)||(c[u]=o(l,u))}))),c);var c})(n);var n,i,r}var B_t=["herokuapp.com","vercel.app","netlify.app"];function U_t(t){var e=t?.hostname;if(!cy(e))return!1;var n=e.split(".").slice(-2).join(".");for(var i of B_t)if(n===i)return!1;return!0}function Bwe(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n]}function M_(t,e,n,i){var{capture:r=!1,passive:o=!0}=i??{};t?.addEventListener(e,n,{capture:r,passive:o})}var Uwe="$people_distinct_id",rR="__alias",oR="__timers",$we="$autocapture_disabled_server_side",tZ="$heatmaps_enabled_server_side",jwe="$exception_capture_enabled_server_side",nZ="$error_tracking_suppression_rules",Hwe="$error_tracking_capture_extension_exceptions",Vwe="$web_vitals_enabled_server_side",Gwe="$dead_clicks_enabled_server_side",Ywe="$web_vitals_allowed_metrics",sR="$session_recording_enabled_server_side",qwe="$console_log_recording_enabled_server_side",Xwe="$session_recording_network_payload_capture",Wwe="$session_recording_masking",Zwe="$session_recording_canvas_recording",Kwe="$replay_sample_rate",Qwe="$replay_minimum_duration",eL="$replay_script_config",tL="$sesid",aR="$session_is_sampled",iZ="$session_recording_url_trigger_activated_session",rZ="$session_recording_event_trigger_activated_session",M8="$enabled_feature_flags",cR="$early_access_features",oZ="$feature_flag_details",lR="$stored_person_properties",rT="$stored_group_properties",sZ="$surveys",nL="$surveys_activated",iL="$flag_call_reported",SS="$user_state",aZ="$client_session_props",cZ="$capture_rate_limit",lZ="$initial_campaign_params",uZ="$initial_referrer_info",rL="$initial_person_info",oL="$epp",Jwe="__POSTHOG_TOOLBAR__",uR="$posthog_cookieless",$_t=[Uwe,rR,"__cmpns",oR,sR,tZ,tL,M8,nZ,SS,cR,oZ,rT,lR,sZ,iL,aZ,cZ,lZ,uZ,oL,rL];function eSe(t){return t instanceof Element&&(t.id===Jwe||!(t.closest==null||!t.closest(".toolbar-global-fade-container")))}function sL(t){return!!t&&t.nodeType===1}function n4(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function tSe(t){return!!t&&t.nodeType===3}function nSe(t){return!!t&&t.nodeType===11}function dZ(t){return t?WO(t).split(/\s+/):[]}function iSe(t){var e=qn?.location.href;return!!(e&&t&&t.some((n=>e.match(n))))}function aL(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return dZ(e)}function rSe(t){return Lh(t)?null:WO(t).split(/(\s+)/).filter((e=>A8(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function cL(t){var e="";return pZ(t)&&!aSe(t)&&t.childNodes&&t.childNodes.length&&vf(t.childNodes,(function(n){var i;tSe(n)&&n.textContent&&(e+=(i=rSe(n.textContent))!==null&&i!==void 0?i:"")})),WO(e)}function oSe(t){return br(t.target)?t.srcElement||null:(e=t.target)!=null&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e}var hZ=["a","button","form","input","select","textarea","label"];function sSe(t){var e=t.parentNode;return!(!e||!sL(e))&&e}function j_t(t,e,n,i,r){var o,s,a;if(n===void 0&&(n=void 0),!qn||!t||n4(t,"html")||!sL(t)||(o=n)!=null&&o.url_allowlist&&!iSe(n.url_allowlist)||(s=n)!=null&&s.url_ignorelist&&iSe(n.url_ignorelist))return!1;if((a=n)!=null&&a.dom_event_allowlist){var c=n.dom_event_allowlist;if(c&&!c.some((g=>e.type===g)))return!1}for(var l=!1,u=[t],d=!0,h=t;h.parentNode&&!n4(h,"body");)if(nSe(h.parentNode))u.push(h.parentNode.host),h=h.parentNode.host;else{if(!(d=sSe(h)))break;if(i||hZ.indexOf(d.tagName.toLowerCase())>-1)l=!0;else{var f=qn.getComputedStyle(d);f&&f.getPropertyValue("cursor")==="pointer"&&(l=!0)}u.push(d),h=d}if(!(function(g,b){var v=b?.element_allowlist;if(br(v))return!0;var w,T=function(R){if(v.some((P=>R.tagName.toLowerCase()===P)))return{v:!0}};for(var N of g)if(w=T(N))return w.v;return!1})(u,n)||!(function(g,b){var v=b?.css_selector_allowlist;if(br(v))return!0;var w,T=function(R){if(v.some((P=>R.matches(P))))return{v:!0}};for(var N of g)if(w=T(N))return w.v;return!1})(u,n))return!1;var m=qn.getComputedStyle(t);if(m&&m.getPropertyValue("cursor")==="pointer"&&e.type==="click")return!0;var y=t.tagName.toLowerCase();switch(y){case"html":return!1;case"form":return(r||["submit"]).indexOf(e.type)>=0;case"input":case"select":case"textarea":return(r||["change","click"]).indexOf(e.type)>=0;default:return l?(r||["click"]).indexOf(e.type)>=0:(r||["click"]).indexOf(e.type)>=0&&(hZ.indexOf(y)>-1||t.getAttribute("contenteditable")==="true")}}function pZ(t){for(var e=t;e.parentNode&&!n4(e,"body");e=e.parentNode){var n=aL(e);if(zl(n,"ph-sensitive")||zl(n,"ph-no-capture"))return!1}if(zl(aL(t),"ph-include"))return!0;var i=t.type||"";if(cy(i))switch(i.toLowerCase()){case"hidden":case"password":return!1}var r=t.name||t.id||"";return!(cy(r)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(r.replace(/[^a-zA-Z0-9]/g,"")))}function aSe(t){return!!(n4(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||n4(t,"select")||n4(t,"textarea")||t.getAttribute("contenteditable")==="true")}var cSe="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",H_t=new RegExp("^(?:"+cSe+")$"),V_t=new RegExp(cSe),lSe="\\d{3}-?\\d{2}-?\\d{4}",G_t=new RegExp("^("+lSe+")$"),Y_t=new RegExp("("+lSe+")");function A8(t,e){return e===void 0&&(e=!0),!(Lh(t)||cy(t)&&(t=WO(t),(e?H_t:V_t).test((t||"").replace(/[- ]/g,""))||(e?G_t:Y_t).test(t)))}function uSe(t){var e=cL(t);return A8(e=(e+" "+dSe(t)).trim())?e:""}function dSe(t){var e="";return t&&t.childNodes&&t.childNodes.length&&vf(t.childNodes,(function(n){var i;if(n&&((i=n.tagName)==null?void 0:i.toLowerCase())==="span")try{var r=cL(n);e=(e+" "+r).trim(),n.childNodes&&n.childNodes.length&&(e=(e+" "+dSe(n)).trim())}catch(o){Yr.error("[AutoCapture]",o)}})),e}function q_t(t){return(function(e){var n=e.map((i=>{var r,o,s="";if(i.tag_name&&(s+=i.tag_name),i.attr_class)for(var a of(i.attr_class.sort(),i.attr_class))s+="."+a.replace(/"/g,"");var c=Kr({},i.text?{text:i.text}:{},{"nth-child":(r=i.nth_child)!==null&&r!==void 0?r:0,"nth-of-type":(o=i.nth_of_type)!==null&&o!==void 0?o:0},i.href?{href:i.href}:{},i.attr_id?{attr_id:i.attr_id}:{},i.attributes),l={};return JO(c).sort(((u,d)=>{var[h]=u,[f]=d;return h.localeCompare(f)})).forEach((u=>{var[d,h]=u;return l[hSe(d.toString())]=hSe(h.toString())})),s+=":",s+=JO(l).map((u=>{var[d,h]=u;return d+'="'+h+'"'})).join("")}));return n.join(";")})((function(e){return e.map((n=>{var i,r,o={text:(i=n.$el_text)==null?void 0:i.slice(0,400),tag_name:n.tag_name,href:(r=n.attr__href)==null?void 0:r.slice(0,2048),attr_class:X_t(n),attr_id:n.attr__id,nth_child:n.nth_child,nth_of_type:n.nth_of_type,attributes:{}};return JO(n).filter((s=>{var[a]=s;return a.indexOf("attr__")===0})).forEach((s=>{var[a,c]=s;return o.attributes[a]=c})),o}))})(t))}function hSe(t){return t.replace(/"|\\"/g,'\\"')}function X_t(t){var e=t.attr__class;return e?mm(e)?e:dZ(e):void 0}let pSe=class{constructor(){this.clicks=[]}isRageClick(e,n,i){var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(n-r.y)<30&&i-r.timestamp<1e3){if(this.clicks.push({x:e,y:n,timestamp:i}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:n,timestamp:i}];return!1}};var fZ="$copy_autocapture",ES=(function(t){return t.GZipJS="gzip-js",t.Base64="base64",t})({}),W_t=["fatal","error","warning","log","info","debug"],Z_t=["localhost","127.0.0.1"],C8=t=>{var e=Zr?.createElement("a");return br(e)?null:(e.href=t,e)},K_t=function(t,e){var n,i;e===void 0&&(e="&");var r=[];return vf(t,(function(o,s){br(o)||br(s)||s==="undefined"||(n=encodeURIComponent((a=>a instanceof File)(o)?o.name:o.toString()),i=encodeURIComponent(s),r[r.length]=i+"="+n)})),r.join(e)},lL=function(t,e){for(var n,i=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;r<i.length;r++){var o=i[r].split("=");if(o[0]===e){n=o;break}}if(!mm(n)||n.length<2)return"";var s=n[1];try{s=decodeURIComponent(s)}catch{Yr.error("Skipping decoding for malformed query param: "+s)}return s.replace(/\+/g," ")},mZ=function(t,e,n){if(!t||!e||!e.length)return t;for(var i=t.split("#"),r=i[0]||"",o=i[1],s=r.split("?"),a=s[1],c=s[0],l=(a||"").split("&"),u=[],d=0;d<l.length;d++){var h=l[d].split("=");mm(h)&&(e.includes(h[0])?u.push(h[0]+"="+n):u.push(l[d]))}var f=c;return a!=null&&(f+="?"+u.join("&")),o!=null&&(f+="#"+o),f},uL=function(t,e){var n=t.match(new RegExp(e+"=([^&]*)"));return n?n[1]:null},fSe=g1("[AutoCapture]");function _Z(t,e){return e.length>t?e.slice(0,t)+"...":e}function Q_t(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!sL(e));return e}function J_t(t,e,n,i){var r=t.tagName.toLowerCase(),o={tag_name:r};hZ.indexOf(r)>-1&&!n&&(r.toLowerCase()==="a"||r.toLowerCase()==="button"?o.$el_text=_Z(1024,uSe(t)):o.$el_text=_Z(1024,cL(t)));var s=aL(t);s.length>0&&(o.classes=s.filter((function(u){return u!==""}))),vf(t.attributes,(function(u){var d;if((!aSe(t)||["name","id","class","aria-label"].indexOf(u.name)!==-1)&&(i==null||!i.includes(u.name))&&!e&&A8(u.value)&&(d=u.name,!cy(d)||d.substring(0,10)!=="_ngcontent"&&d.substring(0,7)!=="_nghost")){var h=u.value;u.name==="class"&&(h=dZ(h).join(" ")),o["attr__"+u.name]=_Z(1024,h)}}));for(var a=1,c=1,l=t;l=Q_t(l);)a++,l.tagName===t.tagName&&c++;return o.nth_child=a,o.nth_of_type=c,o}function eyt(t,e){for(var n,i,{e:r,maskAllElementAttributes:o,maskAllText:s,elementAttributeIgnoreList:a,elementsChainAsString:c}=e,l=[t],u=t;u.parentNode&&!n4(u,"body");)nSe(u.parentNode)?(l.push(u.parentNode.host),u=u.parentNode.host):(l.push(u.parentNode),u=u.parentNode);var d,h=[],f={},m=!1,y=!1;if(vf(l,(T=>{var N=pZ(T);T.tagName.toLowerCase()==="a"&&(m=T.getAttribute("href"),m=N&&m&&A8(m)&&m),zl(aL(T),"ph-no-capture")&&(y=!0),h.push(J_t(T,o,s,a));var R=(function(P){if(!pZ(P))return{};var M={};return vf(P.attributes,(function(I){if(I.name&&I.name.indexOf("data-ph-capture-attribute")===0){var A=I.name.replace("data-ph-capture-attribute-",""),$=I.value;A&&$&&A8($)&&(M[A]=$)}})),M})(T);Yy(f,R)})),y)return{props:{},explicitNoCapture:y};if(s||(t.tagName.toLowerCase()==="a"||t.tagName.toLowerCase()==="button"?h[0].$el_text=uSe(t):h[0].$el_text=cL(t)),m){var g,b;h[0].attr__href=m;var v=(g=C8(m))==null?void 0:g.host,w=qn==null||(b=qn.location)==null?void 0:b.host;v&&w&&v!==w&&(d=m)}return{props:Yy({$event_type:r.type,$ce_version:1},c?{}:{$elements:h},{$elements_chain:q_t(h)},(n=h[0])!=null&&n.$el_text?{$el_text:(i=h[0])==null?void 0:i.$el_text}:{},d&&r.type==="click"?{$external_click_url:d}:{},f)}}let tyt=class{constructor(e){this.C=!1,this.M=null,this.rageclicks=new pSe,this.O=!1,this.instance=e,this.F=null}get A(){var e,n,i=ay(this.instance.config.autocapture)?this.instance.config.autocapture:{};return i.url_allowlist=(e=i.url_allowlist)==null?void 0:e.map((r=>new RegExp(r))),i.url_ignorelist=(n=i.url_ignorelist)==null?void 0:n.map((r=>new RegExp(r))),i}D(){if(this.isBrowserSupported()){if(qn&&Zr){var e=i=>{i=i||qn?.event;try{this.j(i)}catch(r){fSe.error("Failed to capture event",r)}};if(M_(Zr,"submit",e,{capture:!0}),M_(Zr,"change",e,{capture:!0}),M_(Zr,"click",e,{capture:!0}),this.A.capture_copied_text){var n=i=>{i=i||qn?.event,this.j(i,fZ)};M_(Zr,"copy",n,{capture:!0}),M_(Zr,"cut",n,{capture:!0})}}}else fSe.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.C&&(this.D(),this.C=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.O=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[$we]:!!e.autocapture_opt_out}),this.M=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.F=e}getElementSelectors(e){var n,i=[];return(n=this.F)==null||n.forEach((r=>{var o=Zr?.querySelectorAll(r);o?.forEach((s=>{e===s&&i.push(r)}))})),i}get isEnabled(){var e,n,i=(e=this.instance.persistence)==null?void 0:e.props[$we],r=this.M;if(e4(r)&&!ew(i)&&!this.instance.L())return!1;var o=(n=this.M)!==null&&n!==void 0?n:!!i;return!!this.instance.config.autocapture&&!o}j(e,n){if(n===void 0&&(n="$autocapture"),this.isEnabled){var i,r=oSe(e);tSe(r)&&(r=r.parentNode||null),n==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(i=this.rageclicks)!=null&&i.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.j(e,"$rageclick");var o=n===fZ;if(r&&j_t(r,e,this.A,o,o?["copy","cut"]:void 0)){var{props:s,explicitNoCapture:a}=eyt(r,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.A.element_attribute_ignorelist,elementsChainAsString:this.O});if(a)return!1;var c=this.getElementSelectors(r);if(c&&c.length>0&&(s.$element_selectors=c),n===fZ){var l,u=rSe(qn==null||(l=qn.getSelection())==null?void 0:l.toString()),d=e.type||"clipboard";if(!u)return!1;s.$selected_content=u,s.$copy_type=d}return this.instance.capture(n,s),!0}}}isBrowserSupported(){return d2(Zr?.querySelectorAll)}};Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return vx(t)&&isFinite(t)&&Math.floor(t)===t});var mSe="0123456789abcdef";let nyt=class p5e{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,n,i,r){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(i)||!Number.isInteger(r)||e<0||n<0||i<0||r<0||e>0xffffffffffff||n>4095||i>1073741823||r>4294967295)throw new RangeError("invalid field value");var o=new Uint8Array(16);return o[0]=e/Math.pow(2,40),o[1]=e/Math.pow(2,32),o[2]=e/Math.pow(2,24),o[3]=e/Math.pow(2,16),o[4]=e/Math.pow(2,8),o[5]=e,o[6]=112|n>>>8,o[7]=n,o[8]=128|i>>>24,o[9]=i>>>16,o[10]=i>>>8,o[11]=i,o[12]=r>>>24,o[13]=r>>>16,o[14]=r>>>8,o[15]=r,new p5e(o)}toString(){for(var e="",n=0;n<this.bytes.length;n++)e=e+mSe.charAt(this.bytes[n]>>>4)+mSe.charAt(15&this.bytes[n]),n!==3&&n!==5&&n!==7&&n!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new p5e(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var n=0;n<16;n++){var i=this.bytes[n]-e.bytes[n];if(i!==0)return Math.sign(i)}return 0}},iyt=class{constructor(){this.N=0,this.U=0,this.q=new ryt}generate(){var e=this.generateOrAbort();if(br(e)){this.N=0;var n=this.generateOrAbort();if(br(n))throw new Error("Could not generate UUID after timestamp reset");return n}return e}generateOrAbort(){var e=Date.now();if(e>this.N)this.N=e,this.B();else{if(!(e+1e4>this.N))return;this.U++,this.U>4398046511103&&(this.N++,this.B())}return nyt.fromFieldsV7(this.N,Math.trunc(this.U/Math.pow(2,30)),this.U&Math.pow(2,30)-1,this.q.nextUint32())}B(){this.U=1024*this.q.nextUint32()+(1023&this.q.nextUint32())}};var _Se,ySe=t=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;e<t.length;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};qn&&!br(qn.crypto)&&crypto.getRandomValues&&(ySe=t=>crypto.getRandomValues(t));let ryt=class{constructor(){this.H=new Uint32Array(8),this.W=1/0}nextUint32(){return this.W>=this.H.length&&(ySe(this.H),this.W=0),this.H[this.W++]}};var i4=()=>oyt().toString(),oyt=()=>(_Se||(_Se=new iyt)).generate(),dR="",syt=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function ayt(t,e){if(e){var n=(function(r,o){if(o===void 0&&(o=Zr),dR)return dR;if(!o||["localhost","127.0.0.1"].includes(r))return"";for(var s=r.split("."),a=Math.min(s.length,8),c="dmn_chk_"+i4();!dR&&a--;){var l=s.slice(a).join("."),u=c+"=1;domain=."+l+";path=/";o.cookie=u+";max-age=3",o.cookie.includes(c)&&(o.cookie=u+";max-age=0",dR=l)}return dR})(t);if(!n){var i=(r=>{var o=r.match(syt);return o?o[0]:""})(t);i!==n&&Yr.info("Warning: cookie subdomain discovery mismatch",i,n),n=i}return n?"; domain=."+n:""}return""}var tw={G:()=>!!Zr,J:function(t){Yr.error("cookieStore error: "+t)},V:function(t){if(Zr){try{for(var e=t+"=",n=Zr.cookie.split(";").filter((o=>o.length)),i=0;i<n.length;i++){for(var r=n[i];r.charAt(0)==" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return decodeURIComponent(r.substring(e.length,r.length))}}catch{}return null}},K:function(t){var e;try{e=JSON.parse(tw.V(t))||{}}catch{}return e},Y:function(t,e,n,i,r){if(Zr)try{var o="",s="",a=ayt(Zr.location.hostname,i);if(n){var c=new Date;c.setTime(c.getTime()+24*n*60*60*1e3),o="; expires="+c.toUTCString()}r&&(s="; secure");var l=t+"="+encodeURIComponent(JSON.stringify(e))+o+"; SameSite=Lax; path=/"+a+s;return l.length>3686.4&&Yr.warn("cookieStore warning: large cookie, len="+l.length),Zr.cookie=l,l}catch{return}},X:function(t,e){if(Zr!=null&&Zr.cookie)try{tw.Y(t,"",-1,e)}catch{return}}},yZ=null,b1={G:function(){if(!e4(yZ))return yZ;var t=!0;if(br(qn))t=!1;else try{var e="__mplssupport__";b1.Y(e,"xyz"),b1.V(e)!=='"xyz"'&&(t=!1),b1.X(e)}catch{t=!1}return t||Yr.error("localStorage unsupported; falling back to cookie store"),yZ=t,t},J:function(t){Yr.error("localStorage error: "+t)},V:function(t){try{return qn?.localStorage.getItem(t)}catch(e){b1.J(e)}return null},K:function(t){try{return JSON.parse(b1.V(t))||{}}catch{}return null},Y:function(t,e){try{qn?.localStorage.setItem(t,JSON.stringify(e))}catch(n){b1.J(n)}},X:function(t){try{qn?.localStorage.removeItem(t)}catch(e){b1.J(e)}}},cyt=["distinct_id",tL,aR,oL,rL],dL=Kr({},b1,{K:function(t){try{var e={};try{e=tw.K(t)||{}}catch{}var n=Yy(e,JSON.parse(b1.V(t)||"{}"));return b1.Y(t,n),n}catch{}return null},Y:function(t,e,n,i,r,o){try{b1.Y(t,e,void 0,void 0,o);var s={};cyt.forEach((a=>{e[a]&&(s[a]=e[a])})),Object.keys(s).length&&tw.Y(t,s,n,i,r,o)}catch(a){b1.J(a)}},X:function(t,e){try{qn?.localStorage.removeItem(t),tw.X(t,e)}catch(n){b1.J(n)}}}),hL={},lyt={G:function(){return!0},J:function(t){Yr.error("memoryStorage error: "+t)},V:function(t){return hL[t]||null},K:function(t){return hL[t]||null},Y:function(t,e){hL[t]=e},X:function(t){delete hL[t]}},oT=null,qb={G:function(){if(!e4(oT))return oT;if(oT=!0,br(qn))oT=!1;else try{var t="__support__";qb.Y(t,"xyz"),qb.V(t)!=='"xyz"'&&(oT=!1),qb.X(t)}catch{oT=!1}return oT},J:function(t){Yr.error("sessionStorage error: ",t)},V:function(t){try{return qn?.sessionStorage.getItem(t)}catch(e){qb.J(e)}return null},K:function(t){try{return JSON.parse(qb.V(t))||null}catch{}return null},Y:function(t,e){try{qn?.sessionStorage.setItem(t,JSON.stringify(e))}catch(n){qb.J(n)}},X:function(t){try{qn?.sessionStorage.removeItem(t)}catch(e){qb.J(e)}}},TS=(function(t){return t[t.PENDING=-1]="PENDING",t[t.DENIED=0]="DENIED",t[t.GRANTED=1]="GRANTED",t})({});let uyt=class{constructor(e){this._instance=e}get A(){return this._instance.config}get consent(){return this.Z()?TS.DENIED:this.tt}isOptedOut(){return this.A.cookieless_mode==="always"||this.consent===TS.DENIED||this.consent===TS.PENDING&&(this.A.opt_out_capturing_by_default||this.A.cookieless_mode==="on_reject")}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===TS.DENIED}optInOut(e){this.it.Y(this.et,e?1:0,this.A.cookie_expiration,this.A.cross_subdomain_cookie,this.A.secure_cookie)}reset(){this.it.X(this.et,this.A.cross_subdomain_cookie)}get et(){var{token:e,opt_out_capturing_cookie_prefix:n,consent_persistence_name:i}=this._instance.config;return i||(n?n+e:"__ph_opt_in_out_"+e)}get tt(){var e=this.it.V(this.et);return JW(e)?TS.GRANTED:zl(L_t,e)?TS.DENIED:TS.PENDING}get it(){if(!this.rt){var e=this.A.opt_out_capturing_persistence_type;this.rt=e==="localStorage"?b1:tw;var n=e==="localStorage"?tw:b1;n.V(this.et)&&(this.rt.V(this.et)||this.optInOut(JW(n.V(this.et))),n.X(this.et,this.A.cross_subdomain_cookie))}return this.rt}Z(){return!!this.A.respect_dnt&&!!Bwe([b9?.doNotTrack,b9?.msDoNotTrack,Bs.doNotTrack],(e=>JW(e)))}};var pL=g1("[Dead Clicks]"),dyt=()=>!0,hyt=t=>{var e,n=!((e=t.instance.persistence)==null||!e.get_property(Gwe)),i=t.instance.config.capture_dead_clicks;return ew(i)?i:n};let gSe=class{get lazyLoadedDeadClicksAutocapture(){return this.st}constructor(e,n,i){this.instance=e,this.isEnabled=n,this.onCapture=i,this.startIfEnabled()}onRemoteConfig(e){this.instance.persistence&&this.instance.persistence.register({[Gwe]:e?.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.nt((()=>{this.ot()}))}nt(e){var n,i;(n=Bs.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture&&e(),(i=Bs.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",(r=>{r?pL.error("failed to load script",r):e()}))}ot(){var e;if(Zr){if(!this.st&&(e=Bs.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var n=ay(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.st=Bs.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.st.start(Zr),pL.info("starting...")}}else pL.error("`document` not found. Cannot start.")}stop(){this.st&&(this.st.stop(),this.st=void 0,pL.info("stopping..."))}};var hR=g1("[ExceptionAutocapture]");let pyt=class{constructor(e){var n,i,r;this.lt=()=>{var o;if(qn&&this.isEnabled&&(o=Bs.__PosthogExtensions__)!=null&&o.errorWrappingFunctions){var s=Bs.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,a=Bs.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,c=Bs.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ht&&this.A.capture_unhandled_errors&&(this.ht=s(this.captureException.bind(this))),!this.ut&&this.A.capture_unhandled_rejections&&(this.ut=a(this.captureException.bind(this))),!this.dt&&this.A.capture_console_errors&&(this.dt=c(this.captureException.bind(this)))}catch(l){hR.error("failed to start",l),this.vt()}}},this._instance=e,this.ct=!((n=this._instance.persistence)==null||!n.props[jwe]),this.A=this.ft(),this.gt=new Lwe({refillRate:(i=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&i!==void 0?i:1,bucketSize:(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&r!==void 0?r:10,refillInterval:1e4,R:hR}),this.startIfEnabled()}ft(){var e=this._instance.config.capture_exceptions,n={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return ay(e)?n=Kr({},n,e):(br(e)?this.ct:e)&&(n=Kr({},n,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),n}get isEnabled(){return this.A.capture_console_errors||this.A.capture_unhandled_errors||this.A.capture_unhandled_rejections}startIfEnabled(){this.isEnabled&&(hR.info("enabled"),this.nt(this.lt))}nt(e){var n,i;(n=Bs.__PosthogExtensions__)!=null&&n.errorWrappingFunctions&&e(),(i=Bs.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this._instance,"exception-autocapture",(r=>{if(r)return hR.error("failed to load script",r);e()}))}vt(){var e,n,i;(e=this.ht)==null||e.call(this),this.ht=void 0,(n=this.ut)==null||n.call(this),this.ut=void 0,(i=this.dt)==null||i.call(this),this.dt=void 0}onRemoteConfig(e){var n=e.autocaptureExceptions;this.ct=!!n||!1,this.A=this.ft(),this._instance.persistence&&this._instance.persistence.register({[jwe]:this.ct}),this.startIfEnabled()}captureException(e){var n,i=this._instance.requestRouter.endpointFor("ui");e.$exception_personURL=i+"/project/"+this._instance.config.token+"/person/"+this._instance.get_distinct_id();var r=(n=e.$exception_list[0].type)!==null&&n!==void 0?n:"Exception";this.gt.consumeRateLimit(r)?hR.info("Skipping exception capture because of client rate limiting.",{exception:e.$exception_list[0].type}):this._instance.exceptions.sendExceptionEvent(e)}};function bSe(t){return!br(Event)&&xSe(t,Event)}function xSe(t,e){try{return t instanceof e}catch{return!1}}function vSe(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return xSe(t,Error)}}function fL(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"}function gZ(t){return fL(t,"DOMError")}var wSe=/\(error: (.*)\)/,SSe=50,R8="?";function bZ(t,e,n,i){var r={platform:"web:javascript",filename:t,function:e==="<anonymous>"?R8:e,in_app:!0};return br(n)||(r.lineno=n),br(i)||(r.colno=i),r}var fyt=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,myt=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,_yt=/\((\S*)(?::(\d+))(?::(\d+))\)/,yyt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,gyt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,byt=(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=e.sort(((r,o)=>r[0]-o[0])).map((r=>r[1]));return function(r,o){o===void 0&&(o=0);for(var s=[],a=r.split(`
|
|
320
320
|
`),c=o;c<a.length;c++){var l=a[c];if(!(l.length>1024)){var u=wSe.test(l)?l.replace(wSe,"$1"):l;if(!u.match(/\S*Error: /)){for(var d of i){var h=d(u);if(h){s.push(h);break}}if(s.length>=SSe)break}}}return(function(f){if(!f.length)return[];var m=Array.from(f);return m.reverse(),m.slice(0,SSe).map((y=>Kr({},y,{filename:y.filename||xyt(m).filename,function:y.function||R8})))})(s)}})([30,t=>{var e=fyt.exec(t);if(e){var[,n,i,r]=e;return bZ(n,R8,+i,+r)}var o=myt.exec(t);if(o){if(o[2]&&o[2].indexOf("eval")===0){var s=_yt.exec(o[2]);s&&(o[2]=s[1],o[3]=s[2],o[4]=s[3])}var[a,c]=TSe(o[1]||R8,o[2]);return bZ(c,a,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}}],[50,t=>{var e=yyt.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){var n=gyt.exec(e[3]);n&&(e[1]=e[1]||"eval",e[3]=n[1],e[4]=n[2],e[5]="")}var i=e[3],r=e[1]||R8;return[r,i]=TSe(r,i),bZ(i,r,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}]);function xyt(t){return t[t.length-1]||{}}var mL,ESe,xZ,TSe=(t,e)=>{var n=t.indexOf("safari-extension")!==-1,i=t.indexOf("safari-web-extension")!==-1;return n||i?[t.indexOf("@")!==-1?t.split("@")[0]:R8,n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]},vyt=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function vZ(t,e){e===void 0&&(e=0);var n=t.stacktrace||t.stack||"",i=(function(s){return s&&wyt.test(s.message)?1:0})(t);try{var r=byt,o=(function(s,a){var c=(function(l){var u=globalThis._posthogChunkIds;if(!u)return{};var d=Object.keys(u);return xZ&&d.length===ESe||(ESe=d.length,xZ=d.reduce(((h,f)=>{mL||(mL={});var m=mL[f];if(m)h[m[0]]=m[1];else for(var y=l(f),g=y.length-1;g>=0;g--){var b=y[g],v=b?.filename,w=u[f];if(v&&w){h[v]=w,mL[f]=[v,w];break}}return h}),{})),xZ})(a);return s.forEach((l=>{l.filename&&(l.chunk_id=c[l.filename])})),s})(r(n,i),r);return o.slice(0,o.length-e)}catch{}return[]}var wyt=/Minified React error #\d+;/i;function Syt(t,e){var n,i,r=vZ(t),o=(n=e?.handled)===null||n===void 0||n,s=(i=e?.synthetic)!==null&&i!==void 0&&i;return{type:e!=null&&e.overrideExceptionType?e.overrideExceptionType:t.name,value:(function(a){var c=a.message;return c.error&&typeof c.error.message=="string"?String(c.error.message):String(c)})(t),stacktrace:{frames:r,type:"raw"},mechanism:{handled:o,synthetic:s}}}function MSe(t,e){var n=Syt(t,e);return t.cause&&vSe(t.cause)&&t.cause!==t?[n,...MSe(t.cause,{handled:e?.handled,synthetic:e?.synthetic})]:[n]}function wZ(t,e){return{$exception_list:MSe(t,e),$exception_level:"error"}}function SZ(t,e){var n,i,r,o=(n=e?.handled)===null||n===void 0||n,s=(i=e?.synthetic)===null||i===void 0||i,a={type:e!=null&&e.overrideExceptionType?e.overrideExceptionType:(r=e?.defaultExceptionType)!==null&&r!==void 0?r:"Error",value:t||e?.defaultExceptionMessage,mechanism:{handled:o,synthetic:s}};if(e!=null&&e.syntheticException){var c=vZ(e.syntheticException,1);c.length&&(a.stacktrace={frames:c,type:"raw"})}return{$exception_list:[a],$exception_level:"error"}}function Eyt(t){return cy(t)&&!QW(t)&&W_t.indexOf(t)>=0}function Tyt(t,e){var n,i,r=(n=e?.handled)===null||n===void 0||n,o=(i=e?.synthetic)===null||i===void 0||i,s=e!=null&&e.overrideExceptionType?e.overrideExceptionType:bSe(t)?t.constructor.name:"Error",a="Non-Error 'exception' captured with keys: "+(function(u,d){d===void 0&&(d=40);var h=Object.keys(u);if(h.sort(),!h.length)return"[object has no keys]";for(var f=h.length;f>0;f--){var m=h.slice(0,f).join(", ");if(!(m.length>d))return f===h.length||m.length<=d?m:m.slice(0,d)+"..."}return""})(t),c={type:s,value:a,mechanism:{handled:r,synthetic:o}};if(e!=null&&e.syntheticException){var l=vZ(e?.syntheticException,1);l.length&&(c.stacktrace={frames:l,type:"raw"})}return{$exception_list:[c],$exception_level:Eyt(t.level)?t.level:"error"}}function Myt(t,e){var{error:n,event:i}=t,r={$exception_list:[]},o=n||i;if(gZ(o)||(function(h){return fL(h,"DOMException")})(o)){var s=o;if((function(h){return"stack"in h})(o))r=wZ(o,e);else{var a=s.name||(gZ(s)?"DOMError":"DOMException"),c=s.message?a+": "+s.message:a;r=SZ(c,Kr({},e,{overrideExceptionType:gZ(s)?"DOMError":"DOMException",defaultExceptionMessage:c}))}return"code"in s&&(r.$exception_DOMException_code=""+s.code),r}if((function(h){return fL(h,"ErrorEvent")})(o)&&o.error)return wZ(o.error,e);if(vSe(o))return wZ(o,e);if((function(h){return fL(h,"Object")})(o)||bSe(o))return Tyt(o,e);if(br(n)&&cy(i)){var l="Error",u=i,d=i.match(vyt);return d&&(l=d[1],u=d[2]),SZ(u,Kr({},e,{overrideExceptionType:l,defaultExceptionMessage:u}))}return SZ(o,e)}function ASe(t,e,n){try{if(!(e in t))return()=>{};var i=t[e],r=n(i);return d2(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=r,()=>{t[e]=i}}catch{return()=>{}}}let Ayt=class{constructor(e){var n;this._instance=e,this._t=(qn==null||(n=qn.location)==null?void 0:n.pathname)||""}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(Yr.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.bt&&this.bt(),this.bt=void 0,Yr.info("History API monitoring stopped")}monitorHistoryChanges(){var e,n;if(qn&&qn.history){var i=this;(e=qn.history.pushState)!=null&&e.__posthog_wrapped__||ASe(qn.history,"pushState",(r=>function(o,s,a){r.call(this,o,s,a),i.yt("pushState")})),(n=qn.history.replaceState)!=null&&n.__posthog_wrapped__||ASe(qn.history,"replaceState",(r=>function(o,s,a){r.call(this,o,s,a),i.yt("replaceState")})),this.wt()}}yt(e){try{var n,i=qn==null||(n=qn.location)==null?void 0:n.pathname;if(!i)return;i!==this._t&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this._t=i}catch(r){Yr.error("Error capturing "+e+" pageview",r)}}wt(){if(!this.bt){var e=()=>{this.yt("popstate")};M_(qn,"popstate",e),this.bt=()=>{qn&&qn.removeEventListener("popstate",e)}}}};function _L(t){var e,n;return((e=JSON.stringify(t,(n=[],function(i,r){if(ay(r)){for(;n.length>0&&n[n.length-1]!==this;)n.pop();return n.includes(r)?"[Circular]":(n.push(r),r)}return r})))==null?void 0:e.length)||0}function EZ(t,e){if(e===void 0&&(e=66060288e-1),t.size>=e&&t.data.length>1){var n=Math.floor(t.data.length/2),i=t.data.slice(0,n),r=t.data.slice(n);return[EZ({size:_L(i),data:i,sessionId:t.sessionId,windowId:t.windowId}),EZ({size:_L(r),data:r,sessionId:t.sessionId,windowId:t.windowId})].flatMap((o=>o))}return[t]}var MS=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(MS||{}),e5=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(e5||{}),TZ="[SessionRecording]",MZ="redacted",yL={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:t=>t,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},Cyt=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],Ryt=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],Pyt=["/s/","/e/","/i/"];function CSe(t,e,n,i){if(Lh(t))return t;var r=e?.["content-length"]||(function(o){return new Blob([o]).size})(t);return cy(r)&&(r=parseInt(r)),r>n?TZ+" "+i+" body too large to record ("+r+" bytes)":t}function RSe(t,e){if(Lh(t))return t;var n=t;return A8(n,!1)||(n=TZ+" "+e+" body "+MZ),vf(Ryt,(i=>{var r,o;(r=n)!=null&&r.length&&((o=n)==null?void 0:o.indexOf(i))!==-1&&(n=TZ+" "+e+" body "+MZ+" as might contain: "+i)})),n}var Iyt=(t,e)=>{var n,i,r,o={payloadSizeLimitBytes:yL.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...yL.performanceEntryTypeToObserve],payloadHostDenyList:[...e.payloadHostDenyList||[],...yL.payloadHostDenyList]},s=t.session_recording.recordHeaders!==!1&&e.recordHeaders,a=t.session_recording.recordBody!==!1&&e.recordBody,c=t.capture_performance!==!1&&e.recordPerformance,l=(n=o,r=Math.min(1e6,(i=n.payloadSizeLimitBytes)!==null&&i!==void 0?i:1e6),h=>(h!=null&&h.requestBody&&(h.requestBody=CSe(h.requestBody,h.requestHeaders,r,"Request")),h!=null&&h.responseBody&&(h.responseBody=CSe(h.responseBody,h.responseHeaders,r,"Response")),h)),u=h=>{return l(((y,g)=>{var b,v=C8(y.name),w=g.indexOf("http")===0?(b=C8(g))==null?void 0:b.pathname:g;w==="/"&&(w="");var T=v?.pathname.replace(w||"","");if(!(v&&T&&Pyt.some((N=>T.indexOf(N)===0))))return y})((m=(f=h).requestHeaders,Lh(m)||vf(Object.keys(m??{}),(y=>{Cyt.includes(y.toLowerCase())&&(m[y]=MZ)})),f),t.api_host));var f,m},d=d2(t.session_recording.maskNetworkRequestFn);return d&&d2(t.session_recording.maskCapturedNetworkRequestFn)&&Yr.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),d&&(t.session_recording.maskCapturedNetworkRequestFn=h=>{var f=t.session_recording.maskNetworkRequestFn({url:h.name});return Kr({},h,{name:f?.url})}),o.maskRequestFn=d2(t.session_recording.maskCapturedNetworkRequestFn)?h=>{var f,m=u(h);return m&&(f=t.session_recording.maskCapturedNetworkRequestFn==null?void 0:t.session_recording.maskCapturedNetworkRequestFn(m))!==null&&f!==void 0?f:void 0}:h=>(function(f){if(!br(f))return f.requestBody=RSe(f.requestBody,"Request"),f.responseBody=RSe(f.responseBody,"Response"),f})(u(h)),Kr({},yL,o,{recordHeaders:s,recordBody:a,recordPerformance:c,recordInitialRequests:c})};let Nyt=class{constructor(e,n){var i,r;n===void 0&&(n={}),this.St={},this.$t=o=>{if(!this.St[o]){var s,a;this.St[o]=!0;var c=this.kt(o);(s=(a=this.i).onBlockedNode)==null||s.call(a,o,c)}},this.xt=o=>{var s=this.kt(o);if(s?.nodeName!=="svg"&&s instanceof Element){var a=s.closest("svg");if(a)return[this._rrweb.mirror.getId(a),a]}return[o,s]},this.kt=o=>this._rrweb.mirror.getNode(o),this.Et=o=>{var s,a,c,l,u,d,h,f;return((s=(a=o.removes)==null?void 0:a.length)!==null&&s!==void 0?s:0)+((c=(l=o.attributes)==null?void 0:l.length)!==null&&c!==void 0?c:0)+((u=(d=o.texts)==null?void 0:d.length)!==null&&u!==void 0?u:0)+((h=(f=o.adds)==null?void 0:f.length)!==null&&h!==void 0?h:0)},this.throttleMutations=o=>{if(o.type!==3||o.data.source!==0)return o;var s=o.data,a=this.Et(s);s.attributes&&(s.attributes=s.attributes.filter((l=>{var[u]=this.xt(l.id);return!this.gt.consumeRateLimit(u)&&l})));var c=this.Et(s);return c!==0||a===c?o:void 0},this._rrweb=e,this.i=n,this.gt=new Lwe({bucketSize:(i=this.i.bucketSize)!==null&&i!==void 0?i:100,refillRate:(r=this.i.refillRate)!==null&&r!==void 0?r:10,refillInterval:1e3,I:this.$t,R:Yr})}};var h2=Uint8Array,Bv=Uint16Array,P8=Uint32Array,AZ=new h2([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),CZ=new h2([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),PSe=new h2([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ISe=function(t,e){for(var n=new Bv(31),i=0;i<31;++i)n[i]=e+=1<<t[i-1];var r=new P8(n[30]);for(i=1;i<30;++i)for(var o=n[i];o<n[i+1];++o)r[o]=o-n[i]<<5|i;return[n,r]},NSe=ISe(AZ,2),kyt=NSe[0],RZ=NSe[1];kyt[28]=258,RZ[258]=28;for(var kSe=ISe(CZ,0)[1],OSe=new Bv(32768),_m=0;_m<32768;++_m){var sT=(43690&_m)>>>1|(21845&_m)<<1;sT=(61680&(sT=(52428&sT)>>>2|(13107&sT)<<2))>>>4|(3855&sT)<<4,OSe[_m]=((65280&sT)>>>8|(255&sT)<<8)>>>1}var pR=function(t,e,n){for(var i=t.length,r=0,o=new Bv(e);r<i;++r)++o[t[r]-1];var s,a=new Bv(e);for(r=0;r<e;++r)a[r]=a[r-1]+o[r-1]<<1;for(s=new Bv(i),r=0;r<i;++r)s[r]=OSe[a[t[r]-1]++]>>>15-t[r];return s},aT=new h2(288);for(_m=0;_m<144;++_m)aT[_m]=8;for(_m=144;_m<256;++_m)aT[_m]=9;for(_m=256;_m<280;++_m)aT[_m]=7;for(_m=280;_m<288;++_m)aT[_m]=8;var gL=new h2(32);for(_m=0;_m<32;++_m)gL[_m]=5;var Oyt=pR(aT,9),Lyt=pR(gL,5),LSe=function(t){return(t/8>>0)+(7&t&&1)},DSe=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var i=new(t instanceof Bv?Bv:t instanceof P8?P8:h2)(n-e);return i.set(t.subarray(e,n)),i},AS=function(t,e,n){n<<=7&e;var i=e/8>>0;t[i]|=n,t[i+1]|=n>>>8},fR=function(t,e,n){n<<=7&e;var i=e/8>>0;t[i]|=n,t[i+1]|=n>>>8,t[i+2]|=n>>>16},PZ=function(t,e){for(var n=[],i=0;i<t.length;++i)t[i]&&n.push({s:i,f:t[i]});var r=n.length,o=n.slice();if(!r)return[new h2(0),0];if(r==1){var s=new h2(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(N,R){return N.f-R.f})),n.push({s:-1,f:25001});var a=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=r-1;)a=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:a.f+c.f,l:a,r:c};var h=o[0].s;for(i=1;i<r;++i)o[i].s>h&&(h=o[i].s);var f=new Bv(h+1),m=IZ(n[u-1],f,0);if(m>e){i=0;var y=0,g=m-e,b=1<<g;for(o.sort((function(N,R){return f[R.s]-f[N.s]||N.f-R.f}));i<r;++i){var v=o[i].s;if(!(f[v]>e))break;y+=b-(1<<m-f[v]),f[v]=e}for(y>>>=g;y>0;){var w=o[i].s;f[w]<e?y-=1<<e-f[w]++-1:++i}for(;i>=0&&y;--i){var T=o[i].s;f[T]==e&&(--f[T],++y)}m=e}return[new h2(f),m]},IZ=function(t,e,n){return t.s==-1?Math.max(IZ(t.l,e,n+1),IZ(t.r,e,n+1)):e[t.s]=n},zSe=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new Bv(++e),i=0,r=t[0],o=1,s=function(c){n[i++]=c},a=1;a<=e;++a)if(t[a]==r&&a!=e)++o;else{if(!r&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(r),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(r);o=1,r=t[a]}return[n.subarray(0,i),e]},mR=function(t,e){for(var n=0,i=0;i<e.length;++i)n+=t[i]*e[i];return n},NZ=function(t,e,n){var i=n.length,r=LSe(e+2);t[r]=255&i,t[r+1]=i>>>8,t[r+2]=255^t[r],t[r+3]=255^t[r+1];for(var o=0;o<i;++o)t[r+o+4]=n[o];return 8*(r+4+i)},FSe=function(t,e,n,i,r,o,s,a,c,l,u){AS(e,u++,n),++r[256];for(var d=PZ(r,15),h=d[0],f=d[1],m=PZ(o,15),y=m[0],g=m[1],b=zSe(h),v=b[0],w=b[1],T=zSe(y),N=T[0],R=T[1],P=new Bv(19),M=0;M<v.length;++M)P[31&v[M]]++;for(M=0;M<N.length;++M)P[31&N[M]]++;for(var I=PZ(P,7),A=I[0],$=I[1],k=19;k>4&&!A[PSe[k-1]];--k);var V,X,W,K,ee=l+5<<3,se=mR(r,aT)+mR(o,gL)+s,de=mR(r,h)+mR(o,y)+s+14+3*k+mR(P,A)+(2*P[16]+3*P[17]+7*P[18]);if(ee<=se&&ee<=de)return NZ(e,u,t.subarray(c,c+l));if(AS(e,u,1+(de<se)),u+=2,de<se){V=pR(h,f),X=h,W=pR(y,g),K=y;var be=pR(A,$);for(AS(e,u,w-257),AS(e,u+5,R-1),AS(e,u+10,k-4),u+=14,M=0;M<k;++M)AS(e,u+3*M,A[PSe[M]]);u+=3*k;for(var re=[v,N],ue=0;ue<2;++ue){var he=re[ue];for(M=0;M<he.length;++M){var Te=31&he[M];AS(e,u,be[Te]),u+=A[Te],Te>15&&(AS(e,u,he[M]>>>5&127),u+=he[M]>>>12)}}}else V=Oyt,X=aT,W=Lyt,K=gL;for(M=0;M<a;++M)if(i[M]>255){Te=i[M]>>>18&31,fR(e,u,V[Te+257]),u+=X[Te+257],Te>7&&(AS(e,u,i[M]>>>23&31),u+=AZ[Te]);var Ie=31&i[M];fR(e,u,W[Ie]),u+=K[Ie],Ie>3&&(fR(e,u,i[M]>>>5&8191),u+=CZ[Ie])}else fR(e,u,V[i[M]]),u+=X[i[M]];return fR(e,u,V[256]),u+X[256]},Dyt=new P8([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),zyt=(function(){for(var t=new P8(256),e=0;e<256;++e){for(var n=e,i=9;--i;)n=(1&n&&3988292384)^n>>>1;t[e]=n}return t})(),Fyt=function(){var t=4294967295;return{p:function(e){for(var n=t,i=0;i<e.length;++i)n=zyt[255&n^e[i]]^n>>>8;t=n},d:function(){return 4294967295^t}}},Byt=function(t,e,n,i,r){return(function(o,s,a,c,l,u){var d=o.length,h=new h2(c+d+5*(1+Math.floor(d/7e3))+l),f=h.subarray(c,h.length-l),m=0;if(!s||d<8)for(var y=0;y<=d;y+=65535){var g=y+65535;g<d?m=NZ(f,m,o.subarray(y,g)):(f[y]=u,m=NZ(f,m,o.subarray(y,d)))}else{for(var b=Dyt[s-1],v=b>>>13,w=8191&b,T=(1<<a)-1,N=new Bv(32768),R=new Bv(T+1),P=Math.ceil(a/3),M=2*P,I=function(Ze){return(o[Ze]^o[Ze+1]<<P^o[Ze+2]<<M)&T},A=new P8(25e3),$=new Bv(288),k=new Bv(32),V=0,X=0,W=(y=0,0),K=0,ee=0;y<d;++y){var se=I(y),de=32767&y,be=R[se];if(N[de]=be,R[se]=de,K<=y){var re=d-y;if((V>7e3||W>24576)&&re>423){m=FSe(o,f,0,A,$,k,X,W,ee,y-ee,m),W=V=X=0,ee=y;for(var ue=0;ue<286;++ue)$[ue]=0;for(ue=0;ue<30;++ue)k[ue]=0}var he=2,Te=0,Ie=w,De=de-be&32767;if(re>2&&se==I(y-De))for(var Ge=Math.min(v,re)-1,ke=Math.min(32767,y),ce=Math.min(258,re);De<=ke&&--Ie&&de!=be;){if(o[y+he]==o[y+he-De]){for(var we=0;we<ce&&o[y+we]==o[y+we-De];++we);if(we>he){if(he=we,Te=De,we>Ge)break;var xe=Math.min(De,we-2),qe=0;for(ue=0;ue<xe;++ue){var Je=y-De+ue+32768&32767,at=Je-N[Je]+32768&32767;at>qe&&(qe=at,be=Je)}}}De+=(de=be)-(be=N[de])+32768&32767}if(Te){A[W++]=268435456|RZ[he]<<18|kSe[Te];var Se=31&RZ[he],dt=31&kSe[Te];X+=AZ[Se]+CZ[dt],++$[257+Se],++k[dt],K=y+he,++V}else A[W++]=o[y],++$[o[y]]}}m=FSe(o,f,u,A,$,k,X,W,ee,y-ee,m)}return DSe(h,0,c+LSe(m)+l)})(t,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,n,i,!0)},kZ=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8},Uyt=function(t,e){var n=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&kZ(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),n){t[3]=8;for(var i=0;i<=n.length;++i)t[i+10]=n.charCodeAt(i)}},$yt=function(t){return 10+(t.filename&&t.filename.length+1||0)};function BSe(t,e){e===void 0&&(e={});var n=Fyt(),i=t.length;n.p(t);var r=Byt(t,e,$yt(e),8),o=r.length;return Uyt(r,e),kZ(r,o-8,n.d()),kZ(r,o-4,i),r}function USe(t,e){var n=t.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(t);for(var i=new h2(t.length+(t.length>>>1)),r=0,o=function(l){i[r++]=l},s=0;s<n;++s){if(r+5>i.length){var a=new h2(r+8+(n-s<<1));a.set(i),i=a}var c=t.charCodeAt(s);c<128||e?o(c):c<2048?(o(192|c>>>6),o(128|63&c)):c>55295&&c<57344?(o(240|(c=65536+(1047552&c)|1023&t.charCodeAt(++s))>>>18),o(128|c>>>12&63),o(128|c>>>6&63),o(128|63&c)):(o(224|c>>>12),o(128|c>>>6&63),o(128|63&c))}return DSe(i,0,r)}function jyt(t,e){return(function(n){for(var i=0,r=0;r<n.length;r++)i=(i<<5)-i+n.charCodeAt(r),i|=0;return Math.abs(i)})(t)%100<x9(100*e,0,100,Yr)}var CS="disabled",OZ="sampled",bL="active",cT="buffering",LZ="paused",DZ="trigger",nw=DZ+"_activated",wx=DZ+"_pending",iw=DZ+"_"+CS;function $Se(t,e){return e.some((n=>n.matching==="regex"&&new RegExp(n.url).test(t)))}let jSe=class{constructor(e){this.It=e}triggerStatus(e){var n=this.It.map((i=>i.triggerStatus(e)));return n.includes(nw)?nw:n.includes(wx)?wx:iw}stop(){this.It.forEach((e=>e.stop()))}},HSe=class{constructor(e){this.It=e}triggerStatus(e){var n=new Set;for(var i of this.It)n.add(i.triggerStatus(e));switch(n.delete(iw),n.size){case 0:return iw;case 1:return Array.from(n)[0];default:return wx}}stop(){this.It.forEach((e=>e.stop()))}},Hyt=class{triggerStatus(){return wx}stop(){}},Vyt=class{constructor(e){this.Rt=[],this.Pt=[],this.urlBlocked=!1,this._instance=e}onRemoteConfig(e){var n,i;this.Rt=((n=e.sessionRecording)==null?void 0:n.urlTriggers)||[],this.Pt=((i=e.sessionRecording)==null?void 0:i.urlBlocklist)||[]}Tt(e){var n;return this.Rt.length===0?iw:((n=this._instance)==null?void 0:n.get_property(iZ))===e?nw:wx}triggerStatus(e){var n=this.Tt(e),i=n===nw?nw:n===wx?wx:iw;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:i}),i}checkUrlTriggerConditions(e,n,i){if(qn!==void 0&&qn.location.href){var r=qn.location.href,o=this.urlBlocked,s=$Se(r,this.Pt);o&&s||(s&&!o?e():!s&&o&&n(),$Se(r,this.Rt)&&i("url"))}}stop(){}},Gyt=class{constructor(e){this.linkedFlag=null,this.linkedFlagSeen=!1,this.Ct=()=>{},this._instance=e}triggerStatus(){var e=wx;return Lh(this.linkedFlag)&&(e=iw),this.linkedFlagSeen&&(e=nw),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:e}),e}onRemoteConfig(e,n){var i;if(this.linkedFlag=((i=e.sessionRecording)==null?void 0:i.linkedFlag)||null,!Lh(this.linkedFlag)&&!this.linkedFlagSeen){var r=cy(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,o=cy(this.linkedFlag)?null:this.linkedFlag.variant;this.Ct=this._instance.onFeatureFlags(((s,a)=>{var c=!1;if(ay(a)&&r in a){var l=a[r];c=ew(l)?l===!0:o?l===o:!!l}this.linkedFlagSeen=c,c&&n(r,o)}))}}stop(){this.Ct()}},Yyt=class{constructor(e){this.Mt=[],this._instance=e}onRemoteConfig(e){var n;this.Mt=((n=e.sessionRecording)==null?void 0:n.eventTriggers)||[]}Ot(e){var n;return this.Mt.length===0?iw:((n=this._instance)==null?void 0:n.get_property(rZ))===e?nw:wx}triggerStatus(e){var n=this.Ot(e),i=n===nw?nw:n===wx?wx:iw;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:i}),i}stop(){}};function qyt(t){return t.isRecordingEnabled?cT:CS}function Xyt(t){if(!t.receivedFlags)return cT;if(!t.isRecordingEnabled)return CS;if(t.urlTriggerMatching.urlBlocked)return LZ;var e=t.isSampled===!0,n=new jSe([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId);return e?OZ:n===nw?bL:n===wx?cT:t.isSampled===!1?CS:bL}function Wyt(t){if(!t.receivedFlags)return cT;if(!t.isRecordingEnabled)return CS;if(t.urlTriggerMatching.urlBlocked)return LZ;var e=new HSe([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId),n=e!==iw,i=ew(t.isSampled);return n&&e===wx?cT:n&&e===iw||i&&!t.isSampled?CS:t.isSampled===!0?OZ:bL}var _R="[SessionRecording]",ob=g1(_R);function xL(){var t;return Bs==null||(t=Bs.__PosthogExtensions__)==null||(t=t.rrweb)==null?void 0:t.record}var Zyt=3e5,Kyt=[e5.MouseMove,e5.MouseInteraction,e5.Scroll,e5.ViewportResize,e5.Input,e5.TouchMove,e5.MediaInteraction,e5.Drag],VSe=t=>({rrwebMethod:t,enqueuedAt:Date.now(),attempt:1});function lT(t){return(function(e,n){for(var i="",r=0;r<e.length;){var o=e[r++];i+=String.fromCharCode(o)}return i})(BSe(USe(JSON.stringify(t))))}function GSe(t){return t.type===MS.Custom&&t.data.tag==="sessionIdle"}let YSe=class{get sessionId(){return this.Ft}get At(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get started(){return this.Dt}get jt(){if(!this._instance.sessionManager)throw new Error(_R+" must be started with a valid sessionManager.");return this._instance.sessionManager}get Lt(){var e,n;return this.Nt.triggerStatus(this.sessionId)===wx?6e4:(e=(n=this._instance.config.session_recording)==null?void 0:n.full_snapshot_interval_millis)!==null&&e!==void 0?e:Zyt}get zt(){var e=this._instance.get_property(aR);return ew(e)?e:null}get Ut(){var e,n,i=(e=this.H)==null?void 0:e.data[((n=this.H)==null?void 0:n.data.length)-1],{sessionStartTimestamp:r}=this.jt.checkAndGetSessionAndWindowId(!0);return i?i.timestamp-r:null}get qt(){var e=!!this._instance.get_property(sR),n=!this._instance.config.disable_session_recording;return qn&&e&&n}get Bt(){var e=!!this._instance.get_property(qwe),n=this._instance.config.enable_recording_console_log;return n??e}get Ht(){var e,n,i,r,o,s,a=this._instance.config.session_recording.captureCanvas,c=this._instance.get_property(Zwe),l=(e=(n=a?.recordCanvas)!==null&&n!==void 0?n:c?.enabled)!==null&&e!==void 0&&e,u=(i=(r=a?.canvasFps)!==null&&r!==void 0?r:c?.fps)!==null&&i!==void 0?i:4,d=(o=(s=a?.canvasQuality)!==null&&s!==void 0?s:c?.quality)!==null&&o!==void 0?o:.4;if(typeof d=="string"){var h=parseFloat(d);d=isNaN(h)?.4:h}return{enabled:l,fps:x9(u,0,12,ob.createLogger("canvas recording fps"),4),quality:x9(d,0,1,ob.createLogger("canvas recording quality"),.4)}}get Wt(){var e,n,i=this._instance.get_property(Xwe),r={recordHeaders:(e=this._instance.config.session_recording)==null?void 0:e.recordHeaders,recordBody:(n=this._instance.config.session_recording)==null?void 0:n.recordBody},o=r?.recordHeaders||i?.recordHeaders,s=r?.recordBody||i?.recordBody,a=ay(this._instance.config.capture_performance)?this._instance.config.capture_performance.network_timing:this._instance.config.capture_performance,c=!!(ew(a)?a:i?.capturePerformance);return o||s||c?{recordHeaders:o,recordBody:s,recordPerformance:c}:void 0}get Gt(){var e,n,i,r,o,s,a=this._instance.get_property(Wwe),c={maskAllInputs:(e=this._instance.config.session_recording)==null?void 0:e.maskAllInputs,maskTextSelector:(n=this._instance.config.session_recording)==null?void 0:n.maskTextSelector,blockSelector:(i=this._instance.config.session_recording)==null?void 0:i.blockSelector},l=(r=c?.maskAllInputs)!==null&&r!==void 0?r:a?.maskAllInputs,u=(o=c?.maskTextSelector)!==null&&o!==void 0?o:a?.maskTextSelector,d=(s=c?.blockSelector)!==null&&s!==void 0?s:a?.blockSelector;return br(l)&&br(u)&&br(d)?void 0:{maskAllInputs:l==null||l,maskTextSelector:u,blockSelector:d}}get Jt(){var e=this._instance.get_property(Kwe);return vx(e)?e:null}get Vt(){var e=this._instance.get_property(Qwe);return vx(e)?e:null}get status(){return this.Kt?this.Yt({receivedFlags:this.Kt,isRecordingEnabled:this.qt,isSampled:this.zt,urlTriggerMatching:this.Xt,eventTriggerMatching:this.Qt,linkedFlagMatching:this.Zt,sessionId:this.sessionId}):cT}constructor(e){if(this.Yt=qyt,this.Kt=!1,this.ti=[],this.ii="unknown",this.ei=Date.now(),this.Nt=new Hyt,this.ri=void 0,this.si=void 0,this.ni=void 0,this.oi=void 0,this.ai=void 0,this._forceAllowLocalhostNetworkCapture=!1,this.li=()=>{this.hi()},this.ui=()=>{this.di("browser offline",{})},this.vi=()=>{this.di("browser online",{})},this.ci=()=>{if(Zr!=null&&Zr.visibilityState){var r="window "+Zr.visibilityState;this.di(r,{})}},this._instance=e,this.Dt=!1,this.fi="/s/",this.pi=void 0,this.Kt=!1,!this._instance.sessionManager)throw ob.error("started without valid sessionManager"),new Error(_R+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(_R+' cannot be used with cookieless_mode="always"');this.Zt=new Gyt(this._instance),this.Xt=new Vyt(this._instance),this.Qt=new Yyt(this._instance);var{sessionId:n,windowId:i}=this.jt.checkAndGetSessionAndWindowId();this.Ft=n,this.gi=i,this.H=this.mi(),this.At>=this.jt.sessionTimeoutMs&&ob.warn("session_idle_threshold_ms ("+this.At+") is greater than the session timeout ("+this.jt.sessionTimeoutMs+"). Session will never be detected as idle")}startIfEnabledOrStop(e){this.qt?(this.bi(e),M_(qn,"beforeunload",this.li),M_(qn,"offline",this.ui),M_(qn,"online",this.vi),M_(qn,"visibilitychange",this.ci),this.yi(),this.wi(),Lh(this.ri)&&(this.ri=this._instance.on("eventCaptured",(n=>{try{if(n.event==="$pageview"){var i=n!=null&&n.properties.$current_url?this.Si(n?.properties.$current_url):"";if(!i)return;this.di("$pageview",{href:i})}}catch(r){ob.error("Could not add $pageview to rrweb session",r)}}))),this.si||(this.si=this.jt.onSessionId(((n,i,r)=>{var o,s;r&&(this.di("$session_id_change",{sessionId:n,windowId:i,changeReason:r}),(o=this._instance)==null||(o=o.persistence)==null||o.unregister(rZ),(s=this._instance)==null||(s=s.persistence)==null||s.unregister(iZ))})))):this.stopRecording()}stopRecording(){var e,n,i,r;this.Dt&&this.pi&&(this.pi(),this.pi=void 0,this.Dt=!1,qn?.removeEventListener("beforeunload",this.li),qn?.removeEventListener("offline",this.ui),qn?.removeEventListener("online",this.vi),qn?.removeEventListener("visibilitychange",this.ci),this.mi(),clearInterval(this.$i),(e=this.ri)==null||e.call(this),this.ri=void 0,(n=this.ai)==null||n.call(this),this.ai=void 0,(i=this.si)==null||i.call(this),this.si=void 0,(r=this.oi)==null||r.call(this),this.oi=void 0,this.Qt.stop(),this.Xt.stop(),this.Zt.stop(),ob.info("stopped"))}ki(){var e;(e=this._instance.persistence)==null||e.unregister(aR)}xi(e){var n,i=this.Ft!==e,r=this.Jt;if(vx(r)){var o=this.zt,s=i||!ew(o),a=s?jyt(e,r):o;s&&(a?this.Ei(OZ):ob.warn("Sample rate ("+r+") has determined that this sessionId ("+e+") will not be sent to the server."),this.di("samplingDecisionMade",{sampleRate:r,isSampled:a})),(n=this._instance.persistence)==null||n.register({[aR]:a})}else this.ki()}onRemoteConfig(e){var n,i,r,o;this.di("$remote_config_received",e),this.Ii(e),(n=e.sessionRecording)!=null&&n.endpoint&&(this.fi=(o=e.sessionRecording)==null?void 0:o.endpoint),this.yi(),((i=e.sessionRecording)==null?void 0:i.triggerMatchType)==="any"?(this.Yt=Xyt,this.Nt=new jSe([this.Qt,this.Xt])):(this.Yt=Wyt,this.Nt=new HSe([this.Qt,this.Xt])),this._instance.register_for_session({$sdk_debug_replay_remote_trigger_matching_config:(r=e.sessionRecording)==null?void 0:r.triggerMatchType}),this.Xt.onRemoteConfig(e),this.Qt.onRemoteConfig(e),this.Zt.onRemoteConfig(e,((s,a)=>{this.Ei("linked_flag_matched",{flag:s,variant:a})})),this.Kt=!0,this.startIfEnabledOrStop()}yi(){vx(this.Jt)&&Lh(this.oi)&&(this.oi=this.jt.onSessionId((e=>{this.xi(e)})))}Ii(e){if(this._instance.persistence){var n,i=this._instance.persistence,r=()=>{var o,s,a,c,l,u,d,h,f,m=(o=e.sessionRecording)==null?void 0:o.sampleRate,y=Lh(m)?null:parseFloat(m);Lh(y)&&this.ki();var g=(s=e.sessionRecording)==null?void 0:s.minimumDurationMilliseconds;i.register({[sR]:!!e.sessionRecording,[qwe]:(a=e.sessionRecording)==null?void 0:a.consoleLogRecordingEnabled,[Xwe]:Kr({capturePerformance:e.capturePerformance},(c=e.sessionRecording)==null?void 0:c.networkPayloadCapture),[Wwe]:(l=e.sessionRecording)==null?void 0:l.masking,[Zwe]:{enabled:(u=e.sessionRecording)==null?void 0:u.recordCanvas,fps:(d=e.sessionRecording)==null?void 0:d.canvasFps,quality:(h=e.sessionRecording)==null?void 0:h.canvasQuality},[Kwe]:y,[Qwe]:br(g)?null:g,[eL]:(f=e.sessionRecording)==null?void 0:f.scriptConfig})};r(),(n=this.ni)==null||n.call(this),this.ni=this.jt.onSessionId(r)}}log(e,n){var i;n===void 0&&(n="log"),(i=this._instance.sessionRecording)==null||i.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:n,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}bi(e){if(!br(Object.assign)&&!br(Array.from)&&!(this.Dt||this._instance.config.disable_session_recording||this._instance.consent.isOptedOut())){var n;this.Dt=!0,this.jt.checkAndGetSessionAndWindowId(),xL()?this.Ri():(n=Bs.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.Pi,(i=>{if(i)return ob.error("could not load recorder",i);this.Ri()})),ob.info("starting"),this.status===bL&&this.Ei(e||"recording_initialized")}}get Pi(){var e;return((e=this._instance)==null||(e=e.persistence)==null||(e=e.get_property(eL))==null?void 0:e.script)||"recorder"}Ti(e){var n;return e.type===3&&Kyt.indexOf((n=e.data)==null?void 0:n.source)!==-1}Ci(e){var n=this.Ti(e);n||this.ii||e.timestamp-this.ei>this.At&&(this.ii=!0,clearInterval(this.$i),this.di("sessionIdle",{eventTimestamp:e.timestamp,lastActivityTimestamp:this.ei,threshold:this.At,bufferLength:this.H.data.length,bufferSize:this.H.size}),this.hi());var i=!1;if(n&&(this.ei=e.timestamp,this.ii)){var r=this.ii==="unknown";this.ii=!1,r||(this.di("sessionNoLongerIdle",{reason:"user activity",type:e.type}),i=!0)}if(!this.ii){var{windowId:o,sessionId:s}=this.jt.checkAndGetSessionAndWindowId(!n,e.timestamp),a=this.Ft!==s,c=this.gi!==o;this.gi=o,this.Ft=s,a||c?(this.stopRecording(),this.startIfEnabledOrStop("session_id_changed")):i&&this.Mi()}}Oi(e){try{return e.rrwebMethod(),!0}catch(n){return this.ti.length<10?this.ti.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt++,rrwebMethod:e.rrwebMethod}):ob.warn("could not emit queued rrweb event.",n,e),!1}}di(e,n){return this.Oi(VSe((()=>xL().addCustomEvent(e,n))))}Fi(){return this.Oi(VSe((()=>xL().takeFullSnapshot())))}Ri(){var e,n,i,r,o={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},s=this._instance.config.session_recording;for(var[a,c]of Object.entries(s||{}))a in o&&(a==="maskInputOptions"?o.maskInputOptions=Kr({password:!0},c):o[a]=c);this.Ht&&this.Ht.enabled&&(o.recordCanvas=!0,o.sampling={canvas:this.Ht.fps},o.dataURLOptions={type:"image/webp",quality:this.Ht.quality}),this.Gt&&(o.maskAllInputs=(n=this.Gt.maskAllInputs)===null||n===void 0||n,o.maskTextSelector=(i=this.Gt.maskTextSelector)!==null&&i!==void 0?i:void 0,o.blockSelector=(r=this.Gt.blockSelector)!==null&&r!==void 0?r:void 0);var l=xL();if(l){this.Ai=(e=this.Ai)!==null&&e!==void 0?e:new Nyt(l,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(d,h)=>{var f="Too many mutations on node '"+d+"'. Rate limiting. This could be due to SVG animations or something similar";ob.info(f,{node:h}),this.log(_R+" "+f,"warn")}});var u=this.Di();this.pi=l(Kr({emit:d=>{this.onRRwebEmit(d)},plugins:u},o)),this.ei=Date.now(),this.ii=ew(this.ii)?this.ii:"unknown",this.di("$session_options",{sessionRecordingOptions:o,activePlugins:u.map((d=>d?.name))}),this.di("$posthog_config",{config:this._instance.config})}else ob.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}Mi(){if(this.$i&&clearInterval(this.$i),this.ii!==!0){var e=this.Lt;e&&(this.$i=setInterval((()=>{this.Fi()}),e))}}Di(){var e,n,i=[],r=(e=Bs.__PosthogExtensions__)==null||(e=e.rrwebPlugins)==null?void 0:e.getRecordConsolePlugin;r&&this.Bt&&i.push(r());var o=(n=Bs.__PosthogExtensions__)==null||(n=n.rrwebPlugins)==null?void 0:n.getRecordNetworkPlugin;return this.Wt&&d2(o)&&(!Z_t.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?i.push(o(Iyt(this._instance.config,this.Wt))):ob.info("NetworkCapture not started because we are on localhost.")),i}onRRwebEmit(e){var n;if(this.ji(),e&&ay(e)){if(e.type===MS.Meta){var i=this.Si(e.data.href);if(this.Li=i,!i)return;e.data.href=i}else this.Ni();if(this.Xt.checkUrlTriggerConditions((()=>this.zi()),(()=>this.Ui()),(h=>this.qi(h))),!this.Xt.urlBlocked||(r=e).type===MS.Custom&&r.data.tag==="recording paused"){var r;e.type===MS.FullSnapshot&&this.Mi(),e.type===MS.FullSnapshot&&this.Kt&&this.Nt.triggerStatus(this.sessionId)===wx&&this.mi();var o=this.Ai?this.Ai.throttleMutations(e):e;if(o){var s=(function(h){var f=h;if(f&&ay(f)&&f.type===6&&ay(f.data)&&f.data.plugin==="rrweb/console@1"){f.data.payload.payload.length>10&&(f.data.payload.payload=f.data.payload.payload.slice(0,10),f.data.payload.payload.push("...[truncated]"));for(var m=[],y=0;y<f.data.payload.payload.length;y++)f.data.payload.payload[y]&&f.data.payload.payload[y].length>2e3?m.push(f.data.payload.payload[y].slice(0,2e3)+"...[truncated]"):m.push(f.data.payload.payload[y]);return f.data.payload.payload=m,h}return h})(o);if(this.Ci(s),this.ii!==!0||GSe(s)){if(GSe(s)){var a=s.data.payload;if(a){var c=a.lastActivityTimestamp,l=a.threshold;s.timestamp=c+l}}var u=(n=this._instance.config.session_recording.compress_events)===null||n===void 0||n?(function(h){if(_L(h)<1024)return h;try{if(h.type===MS.FullSnapshot)return Kr({},h,{data:lT(h.data),cv:"2024-10"});if(h.type===MS.IncrementalSnapshot&&h.data.source===e5.Mutation)return Kr({},h,{cv:"2024-10",data:Kr({},h.data,{texts:lT(h.data.texts),attributes:lT(h.data.attributes),removes:lT(h.data.removes),adds:lT(h.data.adds)})});if(h.type===MS.IncrementalSnapshot&&h.data.source===e5.StyleSheetRule)return Kr({},h,{cv:"2024-10",data:Kr({},h.data,{adds:h.data.adds?lT(h.data.adds):void 0,removes:h.data.removes?lT(h.data.removes):void 0})})}catch(f){ob.error("could not compress event - will use uncompressed event",f)}return h})(s):s,d={$snapshot_bytes:_L(u),$snapshot_data:u,$session_id:this.Ft,$window_id:this.gi};this.status!==CS?this.Bi(d):this.mi()}}}}}Ni(){if(!this._instance.config.capture_pageview&&qn){var e=this.Si(qn.location.href);this.Li!==e&&(this.di("$url_changed",{href:e}),this.Li=e)}}ji(){if(this.ti.length){var e=[...this.ti];this.ti=[],e.forEach((n=>{Date.now()-n.enqueuedAt<=2e3&&this.Oi(n)}))}}Si(e){var n=this._instance.config.session_recording;if(n.maskNetworkRequestFn){var i,r={url:e};return(i=r=n.maskNetworkRequestFn(r))==null?void 0:i.url}return e}mi(){return this.H={size:0,data:[],sessionId:this.Ft,windowId:this.gi},this.H}hi(){this.Hi&&(clearTimeout(this.Hi),this.Hi=void 0);var e=this.Vt,n=this.Ut,i=vx(n)&&n>=0,r=vx(e)&&i&&n<e;return this.status===cT||this.status===LZ||this.status===CS||r?(this.Hi=setTimeout((()=>{this.hi()}),2e3),this.H):(this.H.data.length>0&&EZ(this.H).forEach((o=>{this.Wi({$snapshot_bytes:o.size,$snapshot_data:o.data,$session_id:o.sessionId,$window_id:o.windowId,$lib:"web",$lib_version:wS.LIB_VERSION})})),this.mi())}Bi(e){var n,i=2+(((n=this.H)==null?void 0:n.data.length)||0);!this.ii&&(this.H.size+e.$snapshot_bytes+i>943718.4||this.H.sessionId!==this.Ft)&&(this.H=this.hi()),this.H.size+=e.$snapshot_bytes,this.H.data.push(e.$snapshot_data),this.Hi||this.ii||(this.Hi=setTimeout((()=>{this.hi()}),2e3))}Wi(e){this._instance.capture("$snapshot",e,{_url:this._instance.requestRouter.endpointFor("api",this.fi),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}qi(e){var n;this.Nt.triggerStatus(this.sessionId)===wx&&((n=this._instance)==null||(n=n.persistence)==null||n.register({[e==="url"?iZ:rZ]:this.Ft}),this.hi(),this.Ei(e+"_trigger_matched"))}zi(){this.Xt.urlBlocked||(this.Xt.urlBlocked=!0,clearInterval(this.$i),ob.info("recording paused due to URL blocker"),this.di("recording paused",{reason:"url blocker"}))}Ui(){this.Xt.urlBlocked&&(this.Xt.urlBlocked=!1,this.Fi(),this.Mi(),this.di("recording resumed",{reason:"left blocked url"}),ob.info("recording resumed"))}wi(){this.Qt.Mt.length!==0&&Lh(this.ai)&&(this.ai=this._instance.on("eventCaptured",(e=>{try{this.Qt.Mt.includes(e.event)&&this.qi("event")}catch(n){ob.error("Could not activate event trigger",n)}})))}overrideLinkedFlag(){this.Zt.linkedFlagSeen=!0,this.Fi(),this.Ei("linked_flag_overridden")}overrideSampling(){var e;(e=this._instance.persistence)==null||e.register({[aR]:!0}),this.Fi(),this.Ei("sampling_overridden")}overrideTrigger(e){this.qi(e)}Ei(e,n){this._instance.register_for_session({$session_recording_start_reason:e}),ob.info(e.replace("_"," "),n),zl(["recording_initialized","session_id_changed"],e)||this.di(e,n)}get sdkDebugProperties(){var{sessionStartTimestamp:e}=this.jt.checkAndGetSessionAndWindowId(!0);return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this.H.data.length,$sdk_debug_replay_internal_buffer_size:this.H.size,$sdk_debug_current_session_duration:this.Ut,$sdk_debug_session_start:e}}};var zZ=g1("[SegmentIntegration]");function Qyt(t,e){var n=t.config.segment;if(!n)return e();(function(i,r){var o=i.config.segment;if(!o)return r();var s=c=>{var l=()=>c.anonymousId()||i4();i.config.get_device_id=l,c.id()&&(i.register({distinct_id:c.id(),$device_id:l()}),i.persistence.set_property(SS,"identified")),r()},a=o.user();"then"in a&&d2(a.then)?a.then((c=>s(c))):s(a)})(t,(()=>{n.register((i=>{Promise&&Promise.resolve||zZ.warn("This browser does not have Promise support, and can not use the segment integration");var r=(o,s)=>{if(!s)return o;o.event.userId||o.event.anonymousId===i.get_distinct_id()||(zZ.info("No userId set, resetting PostHog"),i.reset()),o.event.userId&&o.event.userId!==i.get_distinct_id()&&(zZ.info("UserId set, identifying with PostHog"),i.identify(o.event.userId));var a=i.calculateEventProperties(s,o.event.properties);return o.event.properties=Object.assign({},a,o.event.properties),o};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:o=>r(o,o.event.event),page:o=>r(o,"$pageview"),identify:o=>r(o,"$identify"),screen:o=>r(o,"$screen")}})(t)).then((()=>{e()}))}))}var qSe="posthog-js";function XSe(t,e){var{organization:n,projectId:i,prefix:r,severityAllowList:o=["error"]}=e===void 0?{}:e;return s=>{var a,c,l,u,d;if(!(o==="*"||o.includes(s.level))||!t.__loaded)return s;s.tags||(s.tags={});var h=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/person/"+t.get_distinct_id());s.tags["PostHog Person URL"]=h,t.sessionRecordingStarted()&&(s.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var f=((a=s.exception)==null?void 0:a.values)||[],m=f.map((g=>Kr({},g,{stacktrace:g.stacktrace?Kr({},g.stacktrace,{type:"raw",frames:(g.stacktrace.frames||[]).map((b=>Kr({},b,{platform:"web:javascript"})))}):void 0}))),y={$exception_message:((c=f[0])==null?void 0:c.value)||s.message,$exception_type:(l=f[0])==null?void 0:l.type,$exception_personURL:h,$exception_level:s.level,$exception_list:m,$sentry_event_id:s.event_id,$sentry_exception:s.exception,$sentry_exception_message:((u=f[0])==null?void 0:u.value)||s.message,$sentry_exception_type:(d=f[0])==null?void 0:d.type,$sentry_tags:s.tags};return n&&i&&(y.$sentry_url=(r||"https://sentry.io/organizations/")+n+"/issues/?project="+i+"&query="+s.event_id),t.exceptions.sendExceptionEvent(y),s}}let Jyt=class{constructor(e,n,i,r,o){this.name=qSe,this.setupOnce=function(s){s(XSe(e,{organization:n,projectId:i,prefix:r,severityAllowList:o}))}}};var egt=qn!=null&&qn.location?uL(qn.location.hash,"__posthog")||uL(location.hash,"state"):null,WSe="_postHogToolbarParams",ZSe=g1("[Toolbar]"),r4=(function(t){return t[t.UNINITIALIZED=0]="UNINITIALIZED",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED",t})(r4||{});let tgt=class{constructor(e){this.instance=e}Gi(e){Bs.ph_toolbar_state=e}Ji(){var e;return(e=Bs.ph_toolbar_state)!==null&&e!==void 0?e:r4.UNINITIALIZED}maybeLoadToolbar(e,n,i){if(e===void 0&&(e=void 0),n===void 0&&(n=void 0),i===void 0&&(i=void 0),!qn||!Zr)return!1;e=e??qn.location,i=i??qn.history;try{if(!n){try{qn.localStorage.setItem("test","test"),qn.localStorage.removeItem("test")}catch{return!1}n=qn?.localStorage}var r,o=egt||uL(e.hash,"__posthog")||uL(e.hash,"state"),s=o?Fwe((()=>JSON.parse(atob(decodeURIComponent(o)))))||Fwe((()=>JSON.parse(decodeURIComponent(o)))):null;return s&&s.action==="ph_authorize"?((r=s).source="url",r&&Object.keys(r).length>0&&(s.desiredHash?e.hash=s.desiredHash:i?i.replaceState(i.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(n.getItem(WSe)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token)&&(this.loadToolbar(r),!0)}catch{return!1}}Vi(e){var n=Bs.ph_load_toolbar||Bs.ph_load_editor;!Lh(n)&&d2(n)?n(e,this.instance):ZSe.warn("No toolbar load function found")}loadToolbar(e){var n=!(Zr==null||!Zr.getElementById(Jwe));if(!qn||n)return!1;var i=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,r=Kr({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},i?{instrument:!1}:{});if(qn.localStorage.setItem(WSe,JSON.stringify(Kr({},r,{source:void 0}))),this.Ji()===r4.LOADED)this.Vi(r);else if(this.Ji()===r4.UNINITIALIZED){var o;this.Gi(r4.LOADING),(o=Bs.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this.instance,"toolbar",(s=>{if(s)return ZSe.error("[Toolbar] Failed to load",s),void this.Gi(r4.UNINITIALIZED);this.Gi(r4.LOADED),this.Vi(r)})),M_(qn,"turbolinks:load",(()=>{this.Gi(r4.UNINITIALIZED),this.loadToolbar(r)}))}return!0}Ki(e){return this.loadToolbar(e)}maybeLoadEditor(e,n,i){return e===void 0&&(e=void 0),n===void 0&&(n=void 0),i===void 0&&(i=void 0),this.maybeLoadToolbar(e,n,i)}};var ngt=g1("[TracingHeaders]");let igt=class{constructor(e){this.Yi=void 0,this.Xi=void 0,this.lt=()=>{var n,i;br(this.Yi)&&((n=Bs.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),br(this.Xi)&&((i=Bs.__PosthogExtensions__)==null||(i=i.tracingHeadersPatchFns)==null||i._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}nt(e){var n,i;(n=Bs.__PosthogExtensions__)!=null&&n.tracingHeadersPatchFns&&e(),(i=Bs.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this._instance,"tracing-headers",(r=>{if(r)return ngt.error("failed to load script",r);e()}))}startIfEnabledOrStop(){var e,n;this._instance.config.__add_tracing_headers?this.nt(this.lt):((e=this.Yi)==null||e.call(this),(n=this.Xi)==null||n.call(this),this.Yi=void 0,this.Xi=void 0)}};var o4=g1("[Web Vitals]"),KSe=9e5;let rgt=class{constructor(e){var n;this.Qi=!1,this.C=!1,this.H={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Zi=()=>{clearTimeout(this.te),this.H.metrics.length!==0&&(this._instance.capture("$web_vitals",this.H.metrics.reduce(((i,r)=>Kr({},i,{["$web_vitals_"+r.name+"_event"]:Kr({},r),["$web_vitals_"+r.name+"_value"]:r.value})),{})),this.H={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ie=i=>{var r,o=(r=this._instance.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0);if(br(o))o4.error("Could not read session ID. Dropping metrics!");else{this.H=this.H||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var s=this.ee();br(s)||(Lh(i?.name)||Lh(i?.value)?o4.error("Invalid metric received",i):this.re&&i.value>=this.re?o4.error("Ignoring metric with value >= "+this.re,i):(this.H.url!==s&&(this.Zi(),this.te=setTimeout(this.Zi,this.flushToCaptureTimeoutMs)),br(this.H.url)&&(this.H.url=s),this.H.firstMetricTimestamp=br(this.H.firstMetricTimestamp)?Date.now():this.H.firstMetricTimestamp,i.attribution&&i.attribution.interactionTargetElement&&(i.attribution.interactionTargetElement=void 0),this.H.metrics.push(Kr({},i,{$current_url:s,$session_id:o.sessionId,$window_id:o.windowId,timestamp:Date.now()})),this.H.metrics.length===this.allowedMetrics.length&&this.Zi()))}},this.lt=()=>{var i,r,o,s,a=Bs.__PosthogExtensions__;br(a)||br(a.postHogWebVitalsCallbacks)||({onLCP:i,onCLS:r,onFCP:o,onINP:s}=a.postHogWebVitalsCallbacks),i&&r&&o&&s?(this.allowedMetrics.indexOf("LCP")>-1&&i(this.ie.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&r(this.ie.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&o(this.ie.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.ie.bind(this)),this.C=!0):o4.error("web vitals callbacks not loaded - not starting")},this._instance=e,this.Qi=!((n=this._instance.persistence)==null||!n.props[Vwe]),this.startIfEnabled()}get allowedMetrics(){var e,n,i=ay(this._instance.config.capture_performance)?(e=this._instance.config.capture_performance)==null?void 0:e.web_vitals_allowed_metrics:void 0;return br(i)?((n=this._instance.persistence)==null?void 0:n.props[Ywe])||["CLS","FCP","INP","LCP"]:i}get flushToCaptureTimeoutMs(){return(ay(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get re(){var e=ay(this._instance.config.capture_performance)&&vx(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:KSe;return 0<e&&e<=6e4?KSe:e}get isEnabled(){var e=zv?.protocol;if(e!=="http:"&&e!=="https:")return o4.info("Web Vitals are disabled on non-http/https protocols"),!1;var n=ay(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:ew(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return ew(n)?n:this.Qi}startIfEnabled(){this.isEnabled&&!this.C&&(o4.info("enabled, starting..."),this.nt(this.lt))}onRemoteConfig(e){var n=ay(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=ay(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[Vwe]:n}),this._instance.persistence.register({[Ywe]:i})),this.Qi=n,this.startIfEnabled()}nt(e){var n,i;(n=Bs.__PosthogExtensions__)!=null&&n.postHogWebVitalsCallbacks&&e(),(i=Bs.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this._instance,"web-vitals",(r=>{r?o4.error("failed to load script",r):e()}))}ee(){var e=qn?qn.location.href:void 0;return e||o4.error("Could not determine current URL"),e}};var ogt=g1("[Heatmaps]");function QSe(t){return ay(t)&&"clientX"in t&&"clientY"in t&&vx(t.clientX)&&vx(t.clientY)}let sgt=class{constructor(e){var n;this.rageclicks=new pSe,this.Qi=!1,this.C=!1,this.se=null,this.instance=e,this.Qi=!((n=this.instance.persistence)==null||!n.props[tZ])}get flushIntervalMilliseconds(){var e=5e3;return ay(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return br(this.instance.config.capture_heatmaps)?br(this.instance.config.enable_heatmaps)?this.Qi:this.instance.config.enable_heatmaps:this.instance.config.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.C)return;ogt.info("starting..."),this.ne(),this.se=setInterval(this.oe.bind(this),this.flushIntervalMilliseconds)}else{var e,n;clearInterval((e=this.se)!==null&&e!==void 0?e:void 0),(n=this.ae)==null||n.stop(),this.getAndClearBuffer()}}onRemoteConfig(e){var n=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[tZ]:n}),this.Qi=n,this.startIfEnabled()}getAndClearBuffer(){var e=this.H;return this.H=void 0,e}le(e){this.he(e.originalEvent,"deadclick")}ne(){qn&&Zr&&(M_(qn,"beforeunload",this.oe.bind(this)),M_(Zr,"click",(e=>this.he(e||qn?.event)),{capture:!0}),M_(Zr,"mousemove",(e=>this.ue(e||qn?.event)),{capture:!0}),this.ae=new gSe(this.instance,dyt,this.le.bind(this)),this.ae.startIfEnabled(),this.C=!0)}de(e,n){var i=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),o=this.instance.scrollManager.scrollElement(),s=(function(a,c,l){for(var u=a;u&&sL(u)&&!n4(u,"body");){if(u===l)return!1;if(zl(c,qn?.getComputedStyle(u).position))return!0;u=sSe(u)}return!1})(oSe(e),["fixed","sticky"],o);return{x:e.clientX+(s?0:r),y:e.clientY+(s?0:i),target_fixed:s,type:n}}he(e,n){var i;if(n===void 0&&(n="click"),!eSe(e.target)&&QSe(e)){var r=this.de(e,n);(i=this.rageclicks)!=null&&i.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.ve(Kr({},r,{type:"rageclick"})),this.ve(r)}}ue(e){!eSe(e.target)&&QSe(e)&&(clearTimeout(this.ce),this.ce=setTimeout((()=>{this.ve(this.de(e,"mousemove"))}),500))}ve(e){if(qn){var n=qn.location.href;this.H=this.H||{},this.H[n]||(this.H[n]=[]),this.H[n].push(e)}}oe(){this.H&&!T8(this.H)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},agt=class{constructor(e){this._instance=e}doPageView(e,n){var i,r=this.fe(e,n);return this.pe={pathname:(i=qn?.location.pathname)!==null&&i!==void 0?i:"",pageViewId:n,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var n;return this.fe(e,(n=this.pe)==null?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.pe)==null?void 0:e.pageViewId}}fe(e,n){var i=this.pe;if(!i)return{$pageview_id:n};var r={$pageview_id:n,$prev_pageview_id:i.pageViewId},o=this._instance.scrollManager.getContext();if(o&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:s,lastScrollY:a,maxScrollY:c,maxContentHeight:l,lastContentY:u,maxContentY:d}=o;if(!(br(s)||br(a)||br(c)||br(l)||br(u)||br(d))){s=Math.ceil(s),a=Math.ceil(a),c=Math.ceil(c),l=Math.ceil(l),u=Math.ceil(u),d=Math.ceil(d);var h=s<=1?1:x9(a/s,0,1,Yr),f=s<=1?1:x9(c/s,0,1,Yr),m=l<=1?1:x9(u/l,0,1,Yr),y=l<=1?1:x9(d/l,0,1,Yr);r=Yy(r,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:h,$prev_pageview_max_scroll:c,$prev_pageview_max_scroll_percentage:f,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:m,$prev_pageview_max_content:d,$prev_pageview_max_content_percentage:y})}}return i.pathname&&(r.$prev_pageview_pathname=i.pathname),i.timestamp&&(r.$prev_pageview_duration=(e.getTime()-i.timestamp.getTime())/1e3),r}};var cgt=function(t){var e,n,i,r,o="";for(e=n=0,i=(t=(t+"").replace(/\r\n/g,`
|
|
321
321
|
`).replace(/\r/g,`
|
|
322
|
-
`)).length,r=0;r<i;r++){var s=t.charCodeAt(r),a=null;s<128?n++:a=s>127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),e4(a)||(n>e&&(o+=t.substring(e,n)),o+=a,e=n=r+1)}return n>e&&(o+=t.substring(e,t.length)),o},lgt=!!ZW||!!WW,JSe="text/plain",vL=(t,e)=>{var[n,i]=t.split("?"),r=Kr({},e);i?.split("&").forEach((s=>{var[a]=s.split("=");delete r[a]}));var o=K_t(r);return n+"?"+(o=o?(i?i+"&":"")+o:i)},yR=(t,e)=>JSON.stringify(t,((n,i)=>typeof i=="bigint"?i.toString():i),e),FZ=t=>{var{data:e,compression:n}=t;if(e){if(n===ES.GZipJS){var i=BSe(USe(yR(e)),{mtime:0}),r=new Blob([i],{type:JSe});return{contentType:JSe,body:r,estimatedSize:r.size}}if(n===ES.Base64){var o=(function(c){var l,u,d,h,f,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",y=0,g=0,b="",v=[];if(!c)return c;c=cgt(c);do l=(f=c.charCodeAt(y++)<<16|c.charCodeAt(y++)<<8|c.charCodeAt(y++))>>18&63,u=f>>12&63,d=f>>6&63,h=63&f,v[g++]=m.charAt(l)+m.charAt(u)+m.charAt(d)+m.charAt(h);while(y<c.length);switch(b=v.join(""),c.length%3){case 1:b=b.slice(0,-2)+"==";break;case 2:b=b.slice(0,-1)+"="}return b})(yR(e)),s=(c=>"data="+encodeURIComponent(typeof c=="string"?c:yR(c)))(o);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var a=yR(e);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},gR=[];WW&&gR.push({transport:"fetch",method:t=>{var e,n,{contentType:i,body:r,estimatedSize:o}=(e=FZ(t))!==null&&e!==void 0?e:{},s=new Headers;vf(t.headers,(function(u,d){s.append(d,u)})),i&&s.append("Content-Type",i);var a=t.url,c=null;if(Iwe){var l=new Iwe;c={signal:l.signal,timeout:setTimeout((()=>l.abort()),t.timeout)}}WW(a,Kr({method:t?.method||"GET",headers:s,keepalive:t.method==="POST"&&(o||0)<52428.8,body:r,signal:(n=c)==null?void 0:n.signal},t.fetchOptions)).then((u=>u.text().then((d=>{var h={statusCode:u.status,text:d};if(u.status===200)try{h.json=JSON.parse(d)}catch(f){Yr.error(f)}t.callback==null||t.callback(h)})))).catch((u=>{Yr.error(u),t.callback==null||t.callback({statusCode:0,text:u})})).finally((()=>c?clearTimeout(c.timeout):null))}}),ZW&&gR.push({transport:"XHR",method:t=>{var e,n=new ZW;n.open(t.method||"GET",t.url,!0);var{contentType:i,body:r}=(e=FZ(t))!==null&&e!==void 0?e:{};vf(t.headers,(function(o,s){n.setRequestHeader(s,o)})),i&&n.setRequestHeader("Content-Type",i),t.timeout&&(n.timeout=t.timeout),n.withCredentials=!0,n.onreadystatechange=()=>{if(n.readyState===4){var o={statusCode:n.status,text:n.responseText};if(n.status===200)try{o.json=JSON.parse(n.responseText)}catch{}t.callback==null||t.callback(o)}},n.send(r)}}),b9!=null&&b9.sendBeacon&&gR.push({transport:"sendBeacon",method:t=>{var e=vL(t.url,{beacon:"1"});try{var n,{contentType:i,body:r}=(n=FZ(t))!==null&&n!==void 0?n:{},o=typeof r=="string"?new Blob([r],{type:i}):r;b9.sendBeacon(e,o)}catch{}}});var I8=function(t,e){if(!(function(n){try{new RegExp(n)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}};function e3e(t,e,n){return yR({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}var ugt={exact:(t,e)=>e.some((n=>t.some((i=>n===i)))),is_not:(t,e)=>e.every((n=>t.every((i=>n!==i)))),regex:(t,e)=>e.some((n=>t.some((i=>I8(n,i))))),not_regex:(t,e)=>e.every((n=>t.every((i=>!I8(n,i))))),icontains:(t,e)=>e.map(wL).some((n=>t.map(wL).some((i=>n.includes(i))))),not_icontains:(t,e)=>e.map(wL).every((n=>t.map(wL).every((i=>!n.includes(i)))))},wL=t=>t.toLowerCase(),t3e=g1("[Error tracking]");let dgt=class{constructor(e){var n,i;this.ge=[],this._instance=e,this.ge=(n=(i=this._instance.persistence)==null?void 0:i.get_property(nZ))!==null&&n!==void 0?n:[]}onRemoteConfig(e){var n,i,r,o=(n=(i=e.errorTracking)==null?void 0:i.suppressionRules)!==null&&n!==void 0?n:[],s=(r=e.errorTracking)==null?void 0:r.captureExtensionExceptions;this.ge=o,this._instance.persistence&&this._instance.persistence.register({[nZ]:this.ge,[Hwe]:s})}get _e(){var e,n=!!this._instance.get_property(Hwe),i=this._instance.config.error_tracking.captureExtensionExceptions;return(e=i??n)!==null&&e!==void 0&&e}sendExceptionEvent(e){if(this.me(e))t3e.info("Skipping exception capture because a suppression rule matched");else{if(this._e||!this.be(e))return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"});t3e.info("Skipping exception capture because it was thrown by an extension")}}me(e){var n=e.$exception_list;if(!n||!mm(n)||n.length===0)return!1;var i=n.reduce(((r,o)=>{var{type:s,value:a}=o;return cy(s)&&s.length>0&&r.$exception_types.push(s),cy(a)&&a.length>0&&r.$exception_values.push(a),r}),{$exception_types:[],$exception_values:[]});return this.ge.some((r=>{var o=r.values.map((s=>{var a,c=ugt[s.operator],l=mm(s.value)?s.value:[s.value],u=(a=i[s.key])!==null&&a!==void 0?a:[];return l.length>0&&c(l,u)}));return r.type==="OR"?o.some(Boolean):o.every(Boolean)}))}be(e){var n=e.$exception_list;return!(!n||!mm(n))&&n.flatMap((i=>{var r,o;return(r=(o=i.stacktrace)==null?void 0:o.frames)!==null&&r!==void 0?r:[]})).some((i=>i.filename&&i.filename.startsWith("chrome-extension://")))}};var p2="Mobile",SL="iOS",rw="Android",bR="Tablet",n3e=rw+" "+bR,i3e="iPad",r3e="Apple",o3e=r3e+" Watch",xR="Safari",N8="BlackBerry",s3e="Samsung",a3e=s3e+"Browser",c3e=s3e+" Internet",uT="Chrome",hgt=uT+" OS",l3e=uT+" "+SL,BZ="Internet Explorer",u3e=BZ+" "+p2,UZ="Opera",pgt=UZ+" Mini",$Z="Edge",d3e="Microsoft "+$Z,k8="Firefox",h3e=k8+" "+SL,vR="Nintendo",wR="PlayStation",O8="Xbox",p3e=rw+" "+p2,f3e=p2+" "+xR,SR="Windows",jZ=SR+" Phone",m3e="Nokia",HZ="Ouya",_3e="Generic",fgt=_3e+" "+p2.toLowerCase(),y3e=_3e+" "+bR.toLowerCase(),VZ="Konqueror",rv="(\\d+(\\.\\d+)?)",GZ=new RegExp("Version/"+rv),mgt=new RegExp(O8,"i"),_gt=new RegExp(wR+" \\w+","i"),ygt=new RegExp(vR+" \\w+","i"),YZ=new RegExp(N8+"|PlayBook|BB10","i"),ggt={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},bgt=(t,e)=>e&&zl(e,r3e)||(function(n){return zl(n,xR)&&!zl(n,uT)&&!zl(n,rw)})(t),g3e=function(t,e){return e=e||"",zl(t," OPR/")&&zl(t,"Mini")?pgt:zl(t," OPR/")?UZ:YZ.test(t)?N8:zl(t,"IE"+p2)||zl(t,"WPDesktop")?u3e:zl(t,a3e)?c3e:zl(t,$Z)||zl(t,"Edg/")?d3e:zl(t,"FBIOS")?"Facebook "+p2:zl(t,"UCWEB")||zl(t,"UCBrowser")?"UC Browser":zl(t,"CriOS")?l3e:zl(t,"CrMo")||zl(t,uT)?uT:zl(t,rw)&&zl(t,xR)?p3e:zl(t,"FxiOS")?h3e:zl(t.toLowerCase(),VZ.toLowerCase())?VZ:bgt(t,e)?zl(t,p2)?f3e:xR:zl(t,k8)?k8:zl(t,"MSIE")||zl(t,"Trident/")?BZ:zl(t,"Gecko")?k8:""},xgt={[u3e]:[new RegExp("rv:"+rv)],[d3e]:[new RegExp($Z+"?\\/"+rv)],[uT]:[new RegExp("("+uT+"|CrMo)\\/"+rv)],[l3e]:[new RegExp("CriOS\\/"+rv)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+rv)],[xR]:[GZ],[f3e]:[GZ],[UZ]:[new RegExp("(Opera|OPR)\\/"+rv)],[k8]:[new RegExp(k8+"\\/"+rv)],[h3e]:[new RegExp("FxiOS\\/"+rv)],[VZ]:[new RegExp("Konqueror[:/]?"+rv,"i")],[N8]:[new RegExp(N8+" "+rv),GZ],[p3e]:[new RegExp("android\\s"+rv,"i")],[c3e]:[new RegExp(a3e+"\\/"+rv)],[BZ]:[new RegExp("(rv:|MSIE )"+rv)],Mozilla:[new RegExp("rv:"+rv)]},vgt=function(t,e){var n=g3e(t,e),i=xgt[n];if(br(i))return null;for(var r=0;r<i.length;r++){var o=i[r],s=t.match(o);if(s)return parseFloat(s[s.length-2])}return null},b3e=[[new RegExp(O8+"; "+O8+" (.*?)[);]","i"),t=>[O8,t&&t[1]||""]],[new RegExp(vR,"i"),[vR,""]],[new RegExp(wR,"i"),[wR,""]],[YZ,[N8,""]],[new RegExp(SR,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[jZ,""];if(new RegExp(p2).test(e)&&!/IEMobile\b/.test(e))return[SR+" "+p2,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var i=n[1],r=ggt[i]||"";return/arm/i.test(e)&&(r="RT"),[SR,r]}return[SR,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>{if(t&&t[3]){var e=[t[3],t[4],t[5]||"0"];return[SL,e.join(".")]}return[SL,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=br(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+rw+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+rw+")","i"),t=>{if(t&&t[2]){var e=[t[2],t[3],t[4]||"0"];return[rw,e.join(".")]}return[rw,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];if(t&&t[1]){var n=[t[1],t[2],t[3]||"0"];e[1]=n.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[hgt,""]],[/Linux|debian/i,["Linux",""]]],x3e=function(t){return ygt.test(t)?vR:_gt.test(t)?wR:mgt.test(t)?O8:new RegExp(HZ,"i").test(t)?HZ:new RegExp("("+jZ+"|WPDesktop)","i").test(t)?jZ:/iPad/.test(t)?i3e:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?o3e:YZ.test(t)?N8:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(m3e,"i").test(t)?m3e:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?!new RegExp(p2).test(t)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)?/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?rw:n3e:rw:new RegExp("(pda|"+p2+")","i").test(t)?fgt:new RegExp(bR,"i").test(t)&&!new RegExp(bR+" pc","i").test(t)?y3e:""},EL="https?://(.*)",TL=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],wgt=QO(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],TL),qZ="<masked>",Sgt=["li_fat_id"];function v3e(t,e,n){if(!Zr)return{};var i,r=e?QO([],TL,n||[]):[],o=w3e(mZ(Zr.URL,r,qZ),t),s=(i={},vf(Sgt,(function(a){var c=tw.V(a);i[a]=c||null})),i);return Yy(s,o)}function w3e(t,e){var n=wgt.concat(e||[]),i={};return vf(n,(function(r){var o=lL(t,r);i[r]=o||null})),i}function S3e(t){var e=(function(o){return o?o.search(EL+"google.([^/?]*)")===0?"google":o.search(EL+"bing.com")===0?"bing":o.search(EL+"yahoo.com")===0?"yahoo":o.search(EL+"duckduckgo.com")===0?"duckduckgo":null:null})(t),n=e!="yahoo"?"q":"p",i={};if(!e4(e)){i.$search_engine=e;var r=Zr?lL(Zr.referrer,n):"";r.length&&(i.ph_keyword=r)}return i}function E3e(){return navigator.language||navigator.userLanguage}function T3e(){return Zr?.referrer||"$direct"}function M3e(t,e){var n=t?QO([],TL,e||[]):[],i=zv?.href.substring(0,1e3);return{r:T3e().substring(0,1e3),u:i?mZ(i,n,qZ):void 0}}function A3e(t){var e,{r:n,u:i}=t,r={$referrer:n,$referring_domain:n==null?void 0:n=="$direct"?"$direct":(e=C8(n))==null?void 0:e.host};if(i){r.$current_url=i;var o=C8(i);r.$host=o?.host,r.$pathname=o?.pathname;var s=w3e(i);Yy(r,s)}if(n){var a=S3e(n);Yy(r,a)}return r}function C3e(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function Egt(){try{return new Date().getTimezoneOffset()}catch{return}}function Tgt(t,e){if(!Fv)return{};var n,i,r,o=t?QO([],TL,e||[]):[],[s,a]=(function(c){for(var l=0;l<b3e.length;l++){var[u,d]=b3e[l],h=u.exec(c),f=h&&(d2(d)?d(h,c):d);if(f)return f}return["",""]})(Fv);return Yy(eZ({$os:s,$os_version:a,$browser:g3e(Fv,navigator.vendor),$device:x3e(Fv),$device_type:(i=Fv,r=x3e(i),r===i3e||r===n3e||r==="Kobo"||r==="Kindle Fire"||r===y3e?bR:r===vR||r===O8||r===wR||r===HZ?"Console":r===o3e?"Wearable":r?p2:"Desktop"),$timezone:C3e(),$timezone_offset:Egt()}),{$current_url:mZ(zv?.href,o,qZ),$host:zv?.host,$pathname:zv?.pathname,$raw_user_agent:Fv.length>1e3?Fv.substring(0,997)+"...":Fv,$browser_version:vgt(Fv,navigator.vendor),$browser_language:E3e(),$browser_language_prefix:(n=E3e(),typeof n=="string"?n.split("-")[0]:void 0),$screen_height:qn?.screen.height,$screen_width:qn?.screen.width,$viewport_height:qn?.innerHeight,$viewport_width:qn?.innerWidth,$lib:"web",$lib_version:wS.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var ow=g1("[FeatureFlags]"),XZ="$active_feature_flags",L8="$override_feature_flags",R3e="$feature_flag_payloads",ER="$override_feature_flag_payloads",P3e="$feature_flag_request_id",I3e=t=>{var e={};for(var[n,i]of JO(t||{}))i&&(e[n]=i);return e},Mgt=t=>{var e=t.flags;return e?(t.featureFlags=Object.fromEntries(Object.keys(e).map((n=>{var i;return[n,(i=e[n].variant)!==null&&i!==void 0?i:e[n].enabled]}))),t.featureFlagPayloads=Object.fromEntries(Object.keys(e).filter((n=>e[n].enabled)).filter((n=>{var i;return(i=e[n].metadata)==null?void 0:i.payload})).map((n=>{var i;return[n,(i=e[n].metadata)==null?void 0:i.payload]})))):ow.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),t},Agt=(function(t){return t.FeatureFlags="feature_flags",t.Recordings="recordings",t})({});let Cgt=class{constructor(e){this.ye=!1,this.we=!1,this.Se=!1,this.$e=!1,this.ke=!1,this.xe=!1,this.Ee=!1,this._instance=e,this.featureFlagEventHandlers=[]}flags(){if(this._instance.config.__preview_remote_config)this.xe=!0;else{var e=!this.Ie&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.Re({disableFlags:e})}}get hasLoadedFlags(){return this.we}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(oZ),n=this._instance.get_property(L8),i=this._instance.get_property(ER);if(!i&&!n)return e||{};var r=Yy({},e||{}),o=[...new Set([...Object.keys(i||{}),...Object.keys(n||{})])];for(var s of o){var a,c,l=r[s],u=n?.[s],d=br(u)?(a=l?.enabled)!==null&&a!==void 0&&a:!!u,h=br(u)?l.variant:typeof u=="string"?u:void 0,f=i?.[s],m=Kr({},l,{enabled:d,variant:d?h??l?.variant:void 0});d!==l?.enabled&&(m.original_enabled=l?.enabled),h!==l?.variant&&(m.original_variant=l?.variant),f&&(m.metadata=Kr({},l?.metadata,{payload:f,original_payload:l==null||(c=l.metadata)==null?void 0:c.payload})),r[s]=m}return this.ye||(ow.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:r}),this.ye=!0),r}getFlagVariants(){var e=this._instance.get_property(M8),n=this._instance.get_property(L8);if(!n)return e||{};for(var i=Yy({},e),r=Object.keys(n),o=0;o<r.length;o++)i[r[o]]=n[r[o]];return this.ye||(ow.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:n,finalFlags:i}),this.ye=!0),i}getFlagPayloads(){var e=this._instance.get_property(R3e),n=this._instance.get_property(ER);if(!n)return e||{};for(var i=Yy({},e||{}),r=Object.keys(n),o=0;o<r.length;o++)i[r[o]]=n[r[o]];return this.ye||(ow.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:n,finalPayloads:i}),this.ye=!0),i}reloadFeatureFlags(){this.$e||this._instance.config.advanced_disable_feature_flags||this.Ie||(this.Ie=setTimeout((()=>{this.Re()}),5))}Pe(){clearTimeout(this.Ie),this.Ie=void 0}ensureFlagsLoaded(){this.we||this.Se||this.Ie||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.$e=e}Re(e){var n;if(this.Pe(),!this._instance.L())if(this.Se)this.ke=!0;else{var i={token:this._instance.config.token,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Kr({},((n=this._instance.persistence)==null?void 0:n.get_initial_props())||{},this._instance.get_property(lR)||{}),group_properties:this._instance.get_property(rT)};(e!=null&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(i.disable_flags=!0);var r=this._instance.config.__preview_remote_config,o=r?"/flags/?v=2":"/flags/?v=2&config=true",s=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",a=this._instance.requestRouter.endpointFor("api",o+s);r&&(i.timezone=C3e()),this.Se=!0,this._instance.Te({method:"POST",url:a,data:i,compression:this._instance.config.disable_compression?void 0:ES.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:c=>{var l,u,d=!0;if(c.statusCode===200&&(this.ke||(this.$anon_distinct_id=void 0),d=!1),this.Se=!1,this.xe||(this.xe=!0,this._instance.Ce((u=c.json)!==null&&u!==void 0?u:{})),!i.disable_flags||this.ke)if(this.Ee=!d,c.json&&(l=c.json.quotaLimited)!=null&&l.includes(Agt.FeatureFlags))ow.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else{var h;i.disable_flags||this.receivedFeatureFlags((h=c.json)!==null&&h!==void 0?h:{},d),this.ke&&(this.ke=!1,this.Re())}}})}}getFeatureFlag(e,n){if(n===void 0&&(n={}),this.we||this.getFlags()&&this.getFlags().length>0){var i=this.getFlagVariants()[e],r=""+i,o=this._instance.get_property(P3e)||void 0,s=this._instance.get_property(iL)||{};if((n.send_event||!("send_event"in n))&&(!(e in s)||!s[e].includes(r))){var a,c,l,u,d,h,f,m,y;mm(s[e])?s[e].push(r):s[e]=[r],(a=this._instance.persistence)==null||a.register({[iL]:s});var g=this.getFeatureFlagDetails(e),b={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_request_id:o,$feature_flag_bootstrapped_response:((c=this._instance.config.bootstrap)==null||(c=c.featureFlags)==null?void 0:c[e])||null,$feature_flag_bootstrapped_payload:((l=this._instance.config.bootstrap)==null||(l=l.featureFlagPayloads)==null?void 0:l[e])||null,$used_bootstrap_value:!this.Ee};br(g==null||(u=g.metadata)==null?void 0:u.version)||(b.$feature_flag_version=g.metadata.version);var v,w=(d=g==null||(h=g.reason)==null?void 0:h.description)!==null&&d!==void 0?d:g==null||(f=g.reason)==null?void 0:f.code;w&&(b.$feature_flag_reason=w),g!=null&&(m=g.metadata)!=null&&m.id&&(b.$feature_flag_id=g.metadata.id),br(g?.original_variant)&&br(g?.original_enabled)||(b.$feature_flag_original_response=br(g.original_variant)?g.original_enabled:g.original_variant),g!=null&&(y=g.metadata)!=null&&y.original_payload&&(b.$feature_flag_original_payload=g==null||(v=g.metadata)==null?void 0:v.original_payload),this._instance.capture("$feature_flag_called",b)}return i}ow.warn('getFeatureFlag for key "'+e+`" failed. Feature flags didn't load in time.`)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){return this.getFlagPayloads()[e]}getRemoteConfigPayload(e,n){var i=this._instance.config.token;this._instance.Te({method:"POST",url:this._instance.requestRouter.endpointFor("api","/flags/?v=2&config=true"),data:{distinct_id:this._instance.get_distinct_id(),token:i},compression:this._instance.config.disable_compression?void 0:ES.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:r=>{var o,s=(o=r.json)==null?void 0:o.featureFlagPayloads;n(s?.[e]||void 0)}})}isFeatureEnabled(e,n){if(n===void 0&&(n={}),this.we||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(e,n);ow.warn('isFeatureEnabled for key "'+e+`" failed. Feature flags didn't load in time.`)}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((n=>n!==e))}receivedFeatureFlags(e,n){if(this._instance.persistence){this.we=!0;var i=this.getFlagVariants(),r=this.getFlagPayloads(),o=this.getFlagsWithDetails();(function(s,a,c,l,u){c===void 0&&(c={}),l===void 0&&(l={}),u===void 0&&(u={});var d=Mgt(s),h=d.flags,f=d.featureFlags,m=d.featureFlagPayloads;if(f){var y=s.requestId;if(mm(f)){ow.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var g={};if(f)for(var b=0;b<f.length;b++)g[f[b]]=!0;a&&a.register({[XZ]:f,[M8]:g})}else{var v=f,w=m,T=h;s.errorsWhileComputingFlags&&(v=Kr({},c,v),w=Kr({},l,w),T=Kr({},u,T)),a&&a.register(Kr({[XZ]:Object.keys(I3e(v)),[M8]:v||{},[R3e]:w||{},[oZ]:T||{}},y?{[P3e]:y}:{}))}}})(e,this._instance.persistence,i,r,o),this.Me(n)}}override(e,n){n===void 0&&(n=!1),ow.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:n})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return ow.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this._instance.persistence.unregister(L8),this._instance.persistence.unregister(ER),void this.Me();if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var n,i=e;if(this.ye=!!((n=i.suppressWarning)!==null&&n!==void 0&&n),"flags"in i){if(i.flags===!1)this._instance.persistence.unregister(L8);else if(i.flags)if(mm(i.flags)){for(var r={},o=0;o<i.flags.length;o++)r[i.flags[o]]=!0;this._instance.persistence.register({[L8]:r})}else this._instance.persistence.register({[L8]:i.flags})}return"payloads"in i&&(i.payloads===!1?this._instance.persistence.unregister(ER):i.payloads&&this._instance.persistence.register({[ER]:i.payloads})),void this.Me()}this.Me()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.we){var{flags:n,flagVariants:i}=this.Oe();e(n,i)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,n,i){var r,o=(this._instance.get_property(cR)||[]).find((l=>l.flagKey===e)),s={["$feature_enrollment/"+e]:n},a={$feature_flag:e,$feature_enrollment:n,$set:s};o&&(a.$early_access_feature_name=o.name),i&&(a.$feature_enrollment_stage=i),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(s,!1);var c=Kr({},this.getFlagVariants(),{[e]:n});(r=this._instance.persistence)==null||r.register({[XZ]:Object.keys(I3e(c)),[M8]:c}),this.Me()}getEarlyAccessFeatures(e,n,i){n===void 0&&(n=!1);var r=this._instance.get_property(cR),o=i?"&"+i.map((s=>"stage="+s)).join("&"):"";if(r&&!n)return e(r);this._instance.Te({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+o),method:"GET",callback:s=>{var a,c;if(s.json){var l=s.json.earlyAccessFeatures;return(a=this._instance.persistence)==null||a.unregister(cR),(c=this._instance.persistence)==null||c.register({[cR]:l}),e(l)}}})}Oe(){var e=this.getFlags(),n=this.getFlagVariants();return{flags:e.filter((i=>n[i])),flagVariants:Object.keys(n).filter((i=>n[i])).reduce(((i,r)=>(i[r]=n[r],i)),{})}}Me(e){var{flags:n,flagVariants:i}=this.Oe();this.featureFlagEventHandlers.forEach((r=>r(n,i,{errorsLoading:e})))}setPersonPropertiesForFlags(e,n){n===void 0&&(n=!0);var i=this._instance.get_property(lR)||{};this._instance.register({[lR]:Kr({},i,e)}),n&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(lR)}setGroupPropertiesForFlags(e,n){n===void 0&&(n=!0);var i=this._instance.get_property(rT)||{};Object.keys(i).length!==0&&Object.keys(i).forEach((r=>{i[r]=Kr({},i[r],e[r]),delete e[r]})),this._instance.register({[rT]:Kr({},i,e)}),n&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var n=this._instance.get_property(rT)||{};this._instance.register({[rT]:Kr({},n,{[e]:{}})})}else this._instance.unregister(rT)}reset(){this.we=!1,this.Se=!1,this.$e=!1,this.ke=!1,this.xe=!1,this.Ee=!1,this.$anon_distinct_id=void 0,this.Pe(),this.ye=!1}};var Rgt=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];let WZ=class{constructor(e,n){this.A=e,this.props={},this.Fe=!1,this.Ae=(i=>{var r="";return i.token&&(r=i.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),i.persistence_name?"ph_"+i.persistence_name:"ph_"+r+"_posthog"})(e),this.it=this.De(e),this.load(),e.debug&&Yr.info("Persistence loaded",e.persistence,Kr({},this.props)),this.update_config(e,e,n),this.save()}isDisabled(){return!!this.je}De(e){Rgt.indexOf(e.persistence.toLowerCase())===-1&&(Yr.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var n=e.persistence.toLowerCase();return n==="localstorage"&&b1.G()?b1:n==="localstorage+cookie"&&dL.G()?dL:n==="sessionstorage"&&qb.G()?qb:n==="memory"?lyt:n==="cookie"?tw:dL.G()?dL:tw}properties(){var e={};return vf(this.props,(function(n,i){if(i===M8&&ay(n))for(var r=Object.keys(n),o=0;o<r.length;o++)e["$feature/"+r[o]]=n[r[o]];else a=i,c=!1,(e4(s=$_t)?c:Pwe&&s.indexOf===Pwe?s.indexOf(a)!=-1:(vf(s,(function(l){if(c||(c=l===a))return KO})),c))||(e[i]=n);var s,a,c})),e}load(){if(!this.je){var e=this.it.K(this.Ae);e&&(this.props=Yy({},e))}}save(){this.je||this.it.Y(this.Ae,this.props,this.Le,this.Ne,this.ze,this.A.debug)}remove(){this.it.X(this.Ae,!1),this.it.X(this.Ae,!0)}clear(){this.remove(),this.props={}}register_once(e,n,i){if(ay(e)){br(n)&&(n="None"),this.Le=br(i)?this.Ue:i;var r=!1;if(vf(e,((o,s)=>{this.props.hasOwnProperty(s)&&this.props[s]!==n||(this.props[s]=o,r=!0)})),r)return this.save(),!0}return!1}register(e,n){if(ay(e)){this.Le=br(n)?this.Ue:n;var i=!1;if(vf(e,((r,o)=>{e.hasOwnProperty(o)&&this.props[o]!==r&&(this.props[o]=r,i=!0)})),i)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.Fe){var e=v3e(this.A.custom_campaign_params,this.A.mask_personal_data_properties,this.A.custom_personal_data_properties);T8(eZ(e))||this.register(e),this.Fe=!0}}update_search_keyword(){var e;this.register((e=Zr?.referrer)?S3e(e):{})}update_referrer_info(){var e;this.register_once({$referrer:T3e(),$referring_domain:Zr!=null&&Zr.referrer&&((e=C8(Zr.referrer))==null?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[lZ]||this.props[uZ]||this.register_once({[rL]:M3e(this.A.mask_personal_data_properties,this.A.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};vf([uZ,lZ],(s=>{var a=this.props[s];a&&vf(a,(function(c,l){e["$initial_"+KW(l)]=c}))}));var n,i,r=this.props[rL];if(r){var o=(n=A3e(r),i={},vf(n,(function(s,a){i["$initial_"+KW(a)]=s})),i);Yy(e,o)}return e}safe_merge(e){return vf(this.props,(function(n,i){i in e||(e[i]=n)})),e}update_config(e,n,i){if(this.Ue=this.Le=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!i),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==n.persistence){var r=this.De(e),o=this.props;this.clear(),this.it=r,this.props=o,this.save()}}set_disabled(e){this.je=e,this.je?this.remove():this.save()}set_cross_subdomain(e){e!==this.Ne&&(this.Ne=e,this.remove(),this.save())}set_secure(e){e!==this.ze&&(this.ze=e,this.remove(),this.save())}set_event_timer(e,n){var i=this.props[oR]||{};i[e]=n,this.props[oR]=i,this.save()}remove_event_timer(e){var n=(this.props[oR]||{})[e];return br(n)||(delete this.props[oR][e],this.save()),n}get_property(e){return this.props[e]}set_property(e,n){this.props[e]=n,this.save()}},N3e=class{constructor(){this.qe={},this.qe={}}on(e,n){return this.qe[e]||(this.qe[e]=[]),this.qe[e].push(n),()=>{this.qe[e]=this.qe[e].filter((i=>i!==n))}}emit(e,n){for(var i of this.qe[e]||[])i(n);for(var r of this.qe["*"]||[])r(e,n)}},Pgt=class $7{constructor(e){this.Be=new N3e,this.He=(n,i)=>this.We(n,i)&&this.Ge(n,i)&&this.Je(n,i),this.We=(n,i)=>i==null||!i.event||n?.event===i?.event,this._instance=e,this.Ve=new Set,this.Ke=new Set}init(){var e;if(!br((e=this._instance)==null?void 0:e.Ye)){var n;(n=this._instance)==null||n.Ye(((i,r)=>{this.on(i,r)}))}}register(e){var n,i;if(!br((n=this._instance)==null?void 0:n.Ye)&&(e.forEach((s=>{var a,c;(a=this.Ke)==null||a.add(s),(c=s.steps)==null||c.forEach((l=>{var u;(u=this.Ve)==null||u.add(l?.event||"")}))})),(i=this._instance)!=null&&i.autocapture)){var r,o=new Set;e.forEach((s=>{var a;(a=s.steps)==null||a.forEach((c=>{c!=null&&c.selector&&o.add(c?.selector)}))})),(r=this._instance)==null||r.autocapture.setElementSelectors(o)}}on(e,n){var i;n!=null&&e.length!=0&&(this.Ve.has(e)||this.Ve.has(n?.event))&&this.Ke&&((i=this.Ke)==null?void 0:i.size)>0&&this.Ke.forEach((r=>{this.Xe(n,r)&&this.Be.emit("actionCaptured",r.name)}))}Qe(e){this.onAction("actionCaptured",(n=>e(n)))}Xe(e,n){if(n?.steps==null)return!1;for(var i of n.steps)if(this.He(e,i))return!0;return!1}onAction(e,n){return this.Be.on(e,n)}Ge(e,n){if(n!=null&&n.url){var i,r=e==null||(i=e.properties)==null?void 0:i.$current_url;if(!r||typeof r!="string"||!$7.Ze(r,n?.url,n?.url_matching||"contains"))return!1}return!0}static Ze(e,n,i){switch(i){case"regex":return!!qn&&I8(e,n);case"exact":return n===e;case"contains":var r=$7.tr(n).replace(/_/g,".").replace(/%/g,".*");return I8(e,r);default:return!1}}static tr(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Je(e,n){if((n!=null&&n.href||n!=null&&n.tag_name||n!=null&&n.text)&&!this.ir(e).some((o=>!(n!=null&&n.href&&!$7.Ze(o.href||"",n?.href,n?.href_matching||"exact"))&&(n==null||!n.tag_name||o.tag_name===n?.tag_name)&&!(n!=null&&n.text&&!$7.Ze(o.text||"",n?.text,n?.text_matching||"exact")&&!$7.Ze(o.$el_text||"",n?.text,n?.text_matching||"exact")))))return!1;if(n!=null&&n.selector){var i,r=e==null||(i=e.properties)==null?void 0:i.$element_selectors;if(!r||!r.includes(n?.selector))return!1}return!0}ir(e){return e?.properties.$elements==null?[]:e?.properties.$elements}};(function(t){return t.Button="button",t.Tab="tab",t.Selector="selector",t})({}),(function(t){return t.TopLeft="top_left",t.TopRight="top_right",t.TopCenter="top_center",t.MiddleLeft="middle_left",t.MiddleRight="middle_right",t.MiddleCenter="middle_center",t.Left="left",t.Center="center",t.Right="right",t.NextToTrigger="next_to_trigger",t})({});var ZZ=(function(t){return t.Popover="popover",t.API="api",t.Widget="widget",t.ExternalSurvey="external_survey",t})({});(function(t){return t.Open="open",t.MultipleChoice="multiple_choice",t.SingleChoice="single_choice",t.Rating="rating",t.Link="link",t})({}),(function(t){return t.NextQuestion="next_question",t.End="end",t.ResponseBased="response_based",t.SpecificQuestion="specific_question",t})({}),(function(t){return t.Once="once",t.Recurring="recurring",t.Always="always",t})({});var KZ=(function(t){return t.SHOWN="survey shown",t.DISMISSED="survey dismissed",t.SENT="survey sent",t})({}),k3e=(function(t){return t.SURVEY_ID="$survey_id",t.SURVEY_NAME="$survey_name",t.SURVEY_RESPONSE="$survey_response",t.SURVEY_ITERATION="$survey_iteration",t.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",t.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",t.SURVEY_SUBMISSION_ID="$survey_submission_id",t.SURVEY_QUESTIONS="$survey_questions",t.SURVEY_COMPLETED="$survey_completed",t})({}),Pg=g1("[Surveys]"),QZ="seenSurvey_",Igt=(t,e)=>{var n="$survey_"+e+"/"+t.id;return t.current_iteration&&t.current_iteration>0&&(n="$survey_"+e+"/"+t.id+"/"+t.current_iteration),n},O3e=t=>{var e=""+QZ+t.id;return t.current_iteration&&t.current_iteration>0&&(e=""+QZ+t.id+"_"+t.current_iteration),e},Ngt=[ZZ.Popover,ZZ.Widget,ZZ.API];let kgt=class{constructor(e){this._instance=e,this.er=new Map,this.rr=new Map}register(e){var n;br((n=this._instance)==null?void 0:n.Ye)||(this.sr(e),this.nr(e))}nr(e){var n=e.filter((i=>{var r,o;return((r=i.conditions)==null?void 0:r.actions)&&((o=i.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0}));n.length!==0&&(this.ar==null&&(this.ar=new Pgt(this._instance),this.ar.init(),this.ar.Qe((i=>{this.onAction(i)}))),n.forEach((i=>{var r,o,s,a,c;i.conditions&&(r=i.conditions)!=null&&r.actions&&(o=i.conditions)!=null&&(o=o.actions)!=null&&o.values&&((s=i.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0&&((a=this.ar)==null||a.register(i.conditions.actions.values),(c=i.conditions)==null||(c=c.actions)==null||(c=c.values)==null||c.forEach((l=>{if(l&&l.name){var u=this.rr.get(l.name);u&&u.push(i.id),this.rr.set(l.name,u||[i.id])}})))})))}sr(e){var n;e.filter((i=>{var r,o;return((r=i.conditions)==null?void 0:r.events)&&((o=i.conditions)==null||(o=o.events)==null||(o=o.values)==null?void 0:o.length)>0})).length!==0&&((n=this._instance)==null||n.Ye(((i,r)=>{this.onEvent(i,r)})),e.forEach((i=>{var r;(r=i.conditions)==null||(r=r.events)==null||(r=r.values)==null||r.forEach((o=>{if(o&&o.name){var s=this.er.get(o.name);s&&s.push(i.id),this.er.set(o.name,s||[i.id])}}))})))}onEvent(e,n){var i,r=((i=this._instance)==null||(i=i.persistence)==null?void 0:i.props[nL])||[];if(e==="survey shown"&&n&&r.length>0){var o;Pg.info("survey event matched, removing survey from activated surveys",{event:e,eventPayload:n,existingActivatedSurveys:r});var s=n==null||(o=n.properties)==null?void 0:o.$survey_id;if(s){var a=r.indexOf(s);a>=0&&(r.splice(a,1),this.lr(r))}}else this.er.has(e)&&(Pg.info("survey event matched, updating activated surveys",{event:e,surveys:this.er.get(e)}),this.lr(r.concat(this.er.get(e)||[])))}onAction(e){var n,i=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[nL])||[];this.rr.has(e)&&this.lr(i.concat(this.rr.get(e)||[]))}lr(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[nL]:[...new Set(e)]})}getSurveys(){var e,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[nL];return n||[]}getEventToSurveys(){return this.er}hr(){return this.ar}},Ogt=class{constructor(e){this.ur=void 0,this._surveyManager=null,this.dr=!1,this.vr=!1,this.cr=[],this._instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var n=e.surveys;if(Lh(n))return Pg.warn("Flags not loaded yet. Not loading surveys.");var i=mm(n);this.ur=i?n.length>0:n,Pg.info("flags response received, isSurveysEnabled: "+this.ur),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],n=0;n<localStorage.length;n++){var i=localStorage.key(n);(i!=null&&i.startsWith(QZ)||i!=null&&i.startsWith("inProgressSurvey_"))&&e.push(i)}e.forEach((r=>localStorage.removeItem(r)))}loadIfEnabled(){if(!this._surveyManager)if(this.vr)Pg.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)Pg.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode)Pg.info("Not loading surveys in cookieless mode.");else{var e=Bs?.__PosthogExtensions__;if(e){if(!br(this.ur)||this._instance.config.advanced_enable_surveys){var n=this.ur||this._instance.config.advanced_enable_surveys;this.vr=!0;try{var i=e.generateSurveys;if(i)return void this.pr(i,n);var r=e.loadExternalDependency;if(!r)return void this.gr("PostHog loadExternalDependency extension not found.");r(this._instance,"surveys",(o=>{o||!e.generateSurveys?this.gr("Could not load surveys script",o):this.pr(e.generateSurveys,n)}))}catch(o){throw this.gr("Error initializing surveys",o),o}finally{this.vr=!1}}}else Pg.error("PostHog Extensions not found.")}}pr(e,n){this._surveyManager=e(this._instance,n),this._surveyEventReceiver=new kgt(this._instance),Pg.info("Surveys loaded successfully"),this._r({isLoaded:!0})}gr(e,n){Pg.error(e,n),this._r({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.cr.push(e),this._surveyManager&&this._r({isLoaded:!0}),()=>{this.cr=this.cr.filter((n=>n!==e))}}getSurveys(e,n){if(n===void 0&&(n=!1),this._instance.config.disable_surveys)return Pg.info("Disabled. Not loading surveys."),e([]);var i=this._instance.get_property(sZ);if(i&&!n)return e(i,{isLoaded:!0});if(this.dr)return e([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.dr=!0,this._instance.Te({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:r=>{var o;this.dr=!1;var s=r.statusCode;if(s!==200||!r.json){var a="Surveys API could not be loaded, status: "+s;return Pg.error(a),e([],{isLoaded:!1,error:a})}var c,l=r.json.surveys||[],u=l.filter((d=>(function(h){return!(!h.start_date||h.end_date)})(d)&&((function(h){var f;return!((f=h.conditions)==null||(f=f.events)==null||(f=f.values)==null||!f.length)})(d)||(function(h){var f;return!((f=h.conditions)==null||(f=f.actions)==null||(f=f.values)==null||!f.length)})(d))));return u.length>0&&((c=this._surveyEventReceiver)==null||c.register(u)),(o=this._instance.persistence)==null||o.register({[sZ]:l}),e(l,{isLoaded:!0})}})}catch(r){throw this.dr=!1,r}}_r(e){for(var n of this.cr)try{if(!e.isLoaded)return n([],e);this.getSurveys(n)}catch(i){Pg.error("Error in survey callback",i)}}getActiveMatchingSurveys(e,n){if(n===void 0&&(n=!1),!Lh(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,n);Pg.warn("init was not called")}mr(e){var n=null;return this.getSurveys((i=>{var r;n=(r=i.find((o=>o.id===e)))!==null&&r!==void 0?r:null})),n}br(e){if(Lh(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var n=typeof e=="string"?this.mr(e):e;return n?this._surveyManager.checkSurveyEligibility(n):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(Lh(this._surveyManager))return Pg.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var n=this.br(e);return{visible:n.eligible,disabledReason:n.reason}}canRenderSurveyAsync(e,n){return Lh(this._surveyManager)?(Pg.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise((i=>{this.getSurveys((r=>{var o,s=(o=r.find((c=>c.id===e)))!==null&&o!==void 0?o:null;if(s){var a=this.br(s);i({visible:a.eligible,disabledReason:a.reason})}else i({visible:!1,disabledReason:"Survey not found"})}),n)}))}renderSurvey(e,n){if(Lh(this._surveyManager))Pg.warn("init was not called");else{var i=this.mr(e);if(i)if(Ngt.includes(i.type)){var r=Zr?.querySelector(n);r?this._surveyManager.renderSurvey(i,r):Pg.warn("Survey element not found")}else Pg.warn("Surveys of type "+i.type+" cannot be rendered in the app");else Pg.warn("Survey not found")}}};var L3e=g1("[RateLimiter]");let Lgt=class{constructor(e){var n,i;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=r=>{var o=r.text;if(o&&o.length)try{(JSON.parse(o).quota_limited||[]).forEach((s=>{L3e.info((s||"events")+" is quota limited."),this.serverLimits[s]=new Date().getTime()+6e4}))}catch(s){return void L3e.warn('could not rate limit - continuing. Error: "'+s?.message+'"',{text:o})}},this.instance=e,this.captureEventsPerSecond=((n=e.config.rate_limiting)==null?void 0:n.events_per_second)||10,this.captureEventsBurstLimit=Math.max(((i=e.config.rate_limiting)==null?void 0:i.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(e){var n,i,r;e===void 0&&(e=!1);var o=new Date().getTime(),s=(n=(i=this.instance.persistence)==null?void 0:i.get_property(cZ))!==null&&n!==void 0?n:{tokens:this.captureEventsBurstLimit,last:o};s.tokens+=(o-s.last)/1e3*this.captureEventsPerSecond,s.last=o,s.tokens>this.captureEventsBurstLimit&&(s.tokens=this.captureEventsBurstLimit);var a=s.tokens<1;return a||e||(s.tokens=Math.max(0,s.tokens-1)),!a||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+this.captureEventsPerSecond+" events per second and "+this.captureEventsBurstLimit+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=a,(r=this.instance.persistence)==null||r.set_property(cZ,s),{isRateLimited:a,remainingTokens:s.tokens}}isServerRateLimited(e){var n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}};var dT=g1("[RemoteConfig]");let Dgt=class{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=Bs._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}yr(e){var n,i;(n=Bs.__PosthogExtensions__)!=null&&n.loadExternalDependency?(i=Bs.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):(dT.error("PostHog Extensions not found. Cannot load remote config."),e())}wr(e){this._instance.Te({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:n=>{e(n.json)}})}load(){try{if(this.remoteConfig)return dT.info("Using preloaded remote config",this.remoteConfig),void this.Ce(this.remoteConfig);if(this._instance.L())return void dT.warn("Remote config is disabled. Falling back to local config.");this.yr((e=>{if(!e)return dT.info("No config found after loading remote JS config. Falling back to JSON."),void this.wr((n=>{this.Ce(n)}));this.Ce(e)}))}catch(e){dT.error("Error loading remote config",e)}}Ce(e){e?this._instance.config.__preview_remote_config?(this._instance.Ce(e),e.hasFeatureFlags!==!1&&this._instance.featureFlags.ensureFlagsLoaded()):dT.info("__preview_remote_config is disabled. Logging config instead",e):dT.error("Failed to fetch remote config from PostHog.")}};var JZ=3e3;let zgt=class{constructor(e,n){this.Sr=!0,this.$r=[],this.kr=x9(n?.flush_interval_ms||JZ,250,5e3,Yr.createLogger("flush interval"),JZ),this.Er=e}enqueue(e){this.$r.push(e),this.Ir||this.Rr()}unload(){this.Pr();var e=this.$r.length>0?this.Tr():{},n=Object.values(e);[...n.filter((i=>i.url.indexOf("/e")===0)),...n.filter((i=>i.url.indexOf("/e")!==0))].map((i=>{this.Er(Kr({},i,{transport:"sendBeacon"}))}))}enable(){this.Sr=!1,this.Rr()}Rr(){var e=this;this.Sr||(this.Ir=setTimeout((()=>{if(this.Pr(),this.$r.length>0){var n=this.Tr(),i=function(){var o=n[r],s=new Date().getTime();o.data&&mm(o.data)&&vf(o.data,(a=>{a.offset=Math.abs(a.timestamp-s),delete a.timestamp})),e.Er(o)};for(var r in n)i()}}),this.kr))}Pr(){clearTimeout(this.Ir),this.Ir=void 0}Tr(){var e={};return vf(this.$r,(n=>{var i,r=n,o=(r?r.batchKey:null)||r.url;br(e[o])&&(e[o]=Kr({},r,{data:[]})),(i=e[o].data)==null||i.push(r.data)})),this.$r=[],e}};var Fgt=["retriesPerformedSoFar"];let Bgt=class{constructor(e){this.Cr=!1,this.Mr=3e3,this.$r=[],this._instance=e,this.$r=[],this.Or=!0,!br(qn)&&"onLine"in qn.navigator&&(this.Or=qn.navigator.onLine,M_(qn,"online",(()=>{this.Or=!0,this.oe()})),M_(qn,"offline",(()=>{this.Or=!1})))}get length(){return this.$r.length}retriableRequest(e){var{retriesPerformedSoFar:n}=e,i=Nwe(e,Fgt);vx(n)&&n>0&&(i.url=vL(i.url,{retry_count:n})),this._instance.Te(Kr({},i,{callback:r=>{r.statusCode!==200&&(r.statusCode<400||r.statusCode>=500)&&(n??0)<10?this.Fr(Kr({retriesPerformedSoFar:n},i)):i.callback==null||i.callback(r)}}))}Fr(e){var n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;var i=(function(s){var a=3e3*Math.pow(2,s),c=a/2,l=Math.min(18e5,a),u=(Math.random()-.5)*(l-c);return Math.ceil(l+u)})(n),r=Date.now()+i;this.$r.push({retryAt:r,requestOptions:e});var o="Enqueued failed request for retry in "+i;navigator.onLine||(o+=" (Browser is offline)"),Yr.warn(o),this.Cr||(this.Cr=!0,this.Ar())}Ar(){this.Dr&&clearTimeout(this.Dr),this.Dr=setTimeout((()=>{this.Or&&this.$r.length>0&&this.oe(),this.Ar()}),this.Mr)}oe(){var e=Date.now(),n=[],i=this.$r.filter((o=>o.retryAt<e||(n.push(o),!1)));if(this.$r=n,i.length>0)for(var{requestOptions:r}of i)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.Dr&&(clearTimeout(this.Dr),this.Dr=void 0),this.$r))try{this._instance.Te(Kr({},e,{transport:"sendBeacon"}))}catch(n){Yr.error(n)}this.$r=[]}},Ugt=class{constructor(e){this.jr=()=>{var n,i,r,o;this.Lr||(this.Lr={});var s=this.scrollElement(),a=this.scrollY(),c=s?Math.max(0,s.scrollHeight-s.clientHeight):0,l=a+(s?.clientHeight||0),u=s?.scrollHeight||0;this.Lr.lastScrollY=Math.ceil(a),this.Lr.maxScrollY=Math.max(a,(n=this.Lr.maxScrollY)!==null&&n!==void 0?n:0),this.Lr.maxScrollHeight=Math.max(c,(i=this.Lr.maxScrollHeight)!==null&&i!==void 0?i:0),this.Lr.lastContentY=l,this.Lr.maxContentY=Math.max(l,(r=this.Lr.maxContentY)!==null&&r!==void 0?r:0),this.Lr.maxContentHeight=Math.max(u,(o=this.Lr.maxContentHeight)!==null&&o!==void 0?o:0)},this._instance=e}getContext(){return this.Lr}resetContext(){var e=this.Lr;return setTimeout(this.jr,0),e}startMeasuringScrollPosition(){M_(qn,"scroll",this.jr,{capture:!0}),M_(qn,"scrollend",this.jr,{capture:!0}),M_(qn,"resize",this.jr)}scrollElement(){if(!this._instance.config.scroll_root_selector)return qn?.document.documentElement;var e=mm(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var n of e){var i=qn?.document.querySelector(n);if(i)return i}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return qn&&(qn.scrollY||qn.pageYOffset||qn.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return qn&&(qn.scrollX||qn.pageXOffset||qn.document.documentElement.scrollLeft)||0}};var $gt=t=>M3e(t?.config.mask_personal_data_properties,t?.config.custom_personal_data_properties);let D3e=class{constructor(e,n,i,r){this.Nr=o=>{var s=this.zr();if(!s||s.sessionId!==o){var a={sessionId:o,props:this.Ur(this._instance)};this.qr.register({[aZ]:a})}},this._instance=e,this.Br=n,this.qr=i,this.Ur=r||$gt,this.Br.onSessionId(this.Nr)}zr(){return this.qr.props[aZ]}getSetOnceProps(){var e,n=(e=this.zr())==null?void 0:e.props;return n?"r"in n?A3e(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var e={};return vf(eZ(this.getSetOnceProps()),((n,i)=>{i==="$current_url"&&(i="url"),e["$session_entry_"+KW(i)]=n})),e}};var eK=g1("[SessionId]");let z3e=class{constructor(e,n,i){var r;if(this.Hr=[],this.Wr=(u,d)=>Math.abs(u-d)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode==="always")throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.A=e.config,this.qr=e.persistence,this.gi=void 0,this.Ft=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Gr=n||i4,this.Jr=i||i4;var o=this.A.persistence_name||this.A.token,s=this.A.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*x9(s,60,36e3,eK.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Vr(),this.Kr="ph_"+o+"_window_id",this.Yr="ph_"+o+"_primary_window_exists",this.Xr()){var a=qb.K(this.Kr),c=qb.K(this.Yr);a&&!c?this.gi=a:qb.X(this.Kr),qb.Y(this.Yr,!0)}if((r=this.A.bootstrap)!=null&&r.sessionID)try{var l=(u=>{var d=u.replace(/-/g,"");if(d.length!==32)throw new Error("Not a valid UUID");if(d[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(d.substring(0,12),16)})(this.A.bootstrap.sessionID);this.Qr(this.A.bootstrap.sessionID,new Date().getTime(),l)}catch(u){eK.error("Invalid sessionID in bootstrap",u)}this.Zr()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return br(this.Hr)&&(this.Hr=[]),this.Hr.push(e),this.Ft&&e(this.Ft,this.gi),()=>{this.Hr=this.Hr.filter((n=>n!==e))}}Xr(){return this.A.persistence!=="memory"&&!this.qr.je&&qb.G()}ts(e){e!==this.gi&&(this.gi=e,this.Xr()&&qb.Y(this.Kr,e))}es(){return this.gi?this.gi:this.Xr()?qb.K(this.Kr):null}Qr(e,n,i){e===this.Ft&&n===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=n,this.Ft=e,this.qr.register({[tL]:[n,e,i]}))}rs(){if(this.Ft&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this.Ft,this._sessionStartTimestamp];var e=this.qr.props[tL];return mm(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Qr(null,null,null)}Zr(){M_(qn,"beforeunload",(()=>{this.Xr()&&qb.X(this.Yr)}),{capture:!1})}checkAndGetSessionAndWindowId(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=null),this.A.cookieless_mode==="always")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=n||new Date().getTime(),[r,o,s]=this.rs(),a=this.es(),c=vx(s)&&s>0&&Math.abs(i-s)>864e5,l=!1,u=!o,d=!e&&this.Wr(i,r);u||d||c?(o=this.Gr(),a=this.Jr(),eK.info("new session ID generated",{sessionId:o,windowId:a,changeReason:{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:c}}),s=i,l=!0):a||(a=this.Jr(),l=!0);var h=r===0||!e||c?i:r,f=s===0?new Date().getTime():s;return this.ts(a),this.Qr(o,h,f),e||this.Vr(),l&&this.Hr.forEach((m=>m(o,a,l?{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:c}:void 0))),{sessionId:o,windowId:a,sessionStartTimestamp:f,changeReason:l?{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:c}:void 0,lastActivityTimestamp:r}}Vr(){clearTimeout(this.ss),this.ss=setTimeout((()=>{var[e]=this.rs();this.Wr(new Date().getTime(),e)&&this.resetSessionId()}),1.1*this.sessionTimeoutMs)}};var jgt=["$set_once","$set"],s4=g1("[SiteApps]");let Hgt=class{constructor(e){this._instance=e,this.ns=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}os(e,n){if(n){var i=this.globalsForEvent(n);this.ns.push(i),this.ns.length>1e3&&(this.ns=this.ns.slice(10))}}get siteAppLoaders(){var e;return(e=Bs._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance.Ye(this.os.bind(this));this.ls=()=>{e(),this.ns=[],this.ls=void 0}}}globalsForEvent(e){var n,i,r,o,s,a,c;if(!e)throw new Error("Event payload is required");var l={},u=this._instance.get_property("$groups")||[],d=this._instance.get_property("$stored_group_properties")||{};for(var[h,f]of Object.entries(d))l[h]={id:u[h],type:h,properties:f};var{$set_once:m,$set:y}=e;return{event:Kr({},Nwe(e,jgt),{properties:Kr({},e.properties,y?{$set:Kr({},(n=(i=e.properties)==null?void 0:i.$set)!==null&&n!==void 0?n:{},y)}:{},m?{$set_once:Kr({},(r=(o=e.properties)==null?void 0:o.$set_once)!==null&&r!==void 0?r:{},m)}:{}),elements_chain:(s=(a=e.properties)==null?void 0:a.$elements_chain)!==null&&s!==void 0?s:"",distinct_id:(c=e.properties)==null?void 0:c.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(e){var n=this.apps[e.id],i=()=>{var a;!n.errored&&this.ns.length&&(s4.info("Processing "+this.ns.length+" events for site app with id "+e.id),this.ns.forEach((c=>n.processEvent==null?void 0:n.processEvent(c))),n.processedBuffer=!0),Object.values(this.apps).every((c=>c.processedBuffer||c.errored))&&((a=this.ls)==null||a.call(this))},r=!1,o=a=>{n.errored=!a,n.loaded=!0,s4.info("Site app with id "+e.id+" "+(a?"loaded":"errored")),r&&i()};try{var{processEvent:s}=e.init({posthog:this._instance,callback:a=>{o(a)}});s&&(n.processEvent=s),r=!0}catch(a){s4.error("Error while initializing PostHog app with config id "+e.id,a),o(!1)}if(r&&n.loaded)try{i()}catch(a){s4.error("Error while processing buffered events PostHog app with config id "+e.id,a),n.errored=!0}}hs(){var e=this.siteAppLoaders||[];for(var n of e)this.apps[n.id]={id:n.id,loaded:!1,errored:!1,processedBuffer:!1};for(var i of e)this.setupSiteApp(i)}us(e){if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(e);for(var i of Object.values(this.apps))try{i.processEvent==null||i.processEvent(n)}catch(r){s4.error("Error while processing event "+e.event+" for site app "+i.id,r)}}}onRemoteConfig(e){var n,i,r,o=this;if((n=this.siteAppLoaders)!=null&&n.length)return this.isEnabled?(this.hs(),void this._instance.on("eventCaptured",(l=>this.us(l)))):void s4.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((i=this.ls)==null||i.call(this),(r=e.siteApps)!=null&&r.length)if(this.isEnabled){var s=function(l){var u;Bs["__$$ph_site_app_"+l]=o._instance,(u=Bs.__PosthogExtensions__)==null||u.loadSiteApp==null||u.loadSiteApp(o._instance,c,(d=>{if(d)return s4.error("Error while initializing PostHog app with config id "+l,d)}))};for(var{id:a,url:c}of e.siteApps)s(a)}else s4.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}};var Vgt=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],F3e=function(t,e){if(!t)return!1;var n=t.toLowerCase();return Vgt.concat(e||[]).some((i=>{var r=i.toLowerCase();return n.indexOf(r)!==-1}))},B3e=function(t,e){if(!t)return!1;var n=t.userAgent;if(n&&F3e(n,e))return!0;try{var i=t?.userAgentData;if(i!=null&&i.brands&&i.brands.some((r=>F3e(r?.brand,e))))return!0}catch{}return!!t.webdriver},TR=(function(t){return t.US="us",t.EU="eu",t.CUSTOM="custom",t})({}),U3e="i.posthog.com";let Ggt=class{constructor(e){this.ds={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get uiHost(){var e,n=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+U3e,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.ds[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.ds[this.apiHost]=TR.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.ds[this.apiHost]=TR.EU:this.ds[this.apiHost]=TR.CUSTOM),this.ds[this.apiHost]}endpointFor(e,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),e==="ui")return this.uiHost+n;if(this.region===TR.CUSTOM)return this.apiHost+n;var i=U3e+n;switch(e){case"assets":return"https://"+this.region+"-assets."+i;case"api":return"https://"+this.region+"."+i}}};var Ygt={icontains:(t,e)=>!!qn&&e.href.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>!!qn&&e.href.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>!!qn&&I8(e.href,t),not_regex:(t,e)=>!!qn&&!I8(e.href,t),exact:(t,e)=>e.href===t,is_not:(t,e)=>e.href!==t};let qgt=class Lv{constructor(e){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(i){i===void 0&&(i=!1),n.getWebExperiments((r=>{Lv.vs("retrieved web experiments from the server"),n.cs=new Map,r.forEach((o=>{if(o.feature_flag_key){var s;n.cs&&(Lv.vs("setting flag key ",o.feature_flag_key," to web experiment ",o),(s=n.cs)==null||s.set(o.feature_flag_key,o));var a=n._instance.getFeatureFlag(o.feature_flag_key);cy(a)&&o.variants[a]&&n.fs(o.name,a,o.variants[a].transforms)}else if(o.variants)for(var c in o.variants){var l=o.variants[c];Lv.ps(l)&&n.fs(o.name,c,l.transforms)}}))}),i)},this._instance=e,this._instance.onFeatureFlags((i=>{this.onFeatureFlags(i)}))}onFeatureFlags(e){if(this._is_bot())Lv.vs("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(Lh(this.cs))return this.cs=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Lv.vs("applying feature flags",e),e.forEach((n=>{var i;if(this.cs&&(i=this.cs)!=null&&i.has(n)){var r,o=this._instance.getFeatureFlag(n),s=(r=this.cs)==null?void 0:r.get(n);o&&s!=null&&s.variants[o]&&this.fs(s.name,o,s.variants[o].transforms)}}))}}previewWebExperiment(){var e=Lv.getWindowLocation();if(e!=null&&e.search){var n=lL(e?.search,"__experiment_id"),i=lL(e?.search,"__experiment_variant");n&&i&&(Lv.vs("previewing web experiments "+n+" && "+i),this.getWebExperiments((r=>{this.gs(parseInt(n),i,r)}),!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,i){if(this._instance.config.disable_web_experiments&&!i)return e([]);var r=this._instance.get_property("$web_experiments");if(r&&!n)return e(r);this._instance.Te({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:o=>{if(o.statusCode!==200||!o.json)return e([]);var s=o.json.experiments||[];return e(s)}})}gs(e,n,i){var r=i.filter((o=>o.id===e));r&&r.length>0&&(Lv.vs("Previewing web experiment ["+r[0].name+"] with variant ["+n+"]"),this.fs(r[0].name,n,r[0].variants[n].transforms))}static ps(e){return!Lh(e.conditions)&&Lv._s(e)&&Lv.bs(e)}static _s(e){var n;if(Lh(e.conditions)||Lh((n=e.conditions)==null?void 0:n.url))return!0;var i,r,o,s=Lv.getWindowLocation();return!!s&&((i=e.conditions)==null||!i.url||Ygt[(r=(o=e.conditions)==null?void 0:o.urlMatchType)!==null&&r!==void 0?r:"icontains"](e.conditions.url,s))}static getWindowLocation(){return qn?.location}static bs(e){var n;if(Lh(e.conditions)||Lh((n=e.conditions)==null?void 0:n.utm))return!0;var i=v3e();if(i.utm_source){var r,o,s,a,c,l,u,d,h=(r=e.conditions)==null||(r=r.utm)==null||!r.utm_campaign||((o=e.conditions)==null||(o=o.utm)==null?void 0:o.utm_campaign)==i.utm_campaign,f=(s=e.conditions)==null||(s=s.utm)==null||!s.utm_source||((a=e.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==i.utm_source,m=(c=e.conditions)==null||(c=c.utm)==null||!c.utm_medium||((l=e.conditions)==null||(l=l.utm)==null?void 0:l.utm_medium)==i.utm_medium,y=(u=e.conditions)==null||(u=u.utm)==null||!u.utm_term||((d=e.conditions)==null||(d=d.utm)==null?void 0:d.utm_term)==i.utm_term;return h&&m&&y&&f}return!1}static vs(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];Yr.info("[WebExperiments] "+e,i)}fs(e,n,i){this._is_bot()?Lv.vs("Refusing to render web experiment since the viewer is a likely bot"):n!=="control"?i.forEach((r=>{if(r.selector){var o;Lv.vs("applying transform of variant "+n+" for experiment "+e+" ",r);var s=(o=document)==null?void 0:o.querySelectorAll(r.selector);s?.forEach((a=>{var c=a;r.html&&(c.innerHTML=r.html),r.css&&c.setAttribute("style",r.css)}))}})):Lv.vs("Control variants leave the page unmodified.")}_is_bot(){return b9&&this._instance?B3e(b9,this._instance.config.custom_blocked_useragents):void 0}};var Xgt=g1("[PostHog ExternalIntegrations]"),Wgt={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};let Zgt=class{constructor(e){this._instance=e}nt(e,n){var i;(i=Bs.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this._instance,e,(r=>{if(r)return Xgt.error("failed to load script",r);n()}))}startIfEnabledOrStop(){var e=this,n=function(s){var a,c,l;!r||(a=Bs.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[s]||e.nt(Wgt[s],(()=>{var u;(u=Bs.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[s])==null||u.start(e._instance)})),!r&&(c=Bs.__PosthogExtensions__)!=null&&(c=c.integrations)!=null&&c[s]&&((l=Bs.__PosthogExtensions__)==null||(l=l.integrations)==null||(l=l[s])==null||l.stop())};for(var[i,r]of Object.entries((o=this._instance.config.integrations)!==null&&o!==void 0?o:{})){var o;n(i)}}};var tK="[SessionRecording]",ML=g1(tK);let Kgt=class{get started(){var e;return!((e=this.ys)==null||!e.isStarted)}get status(){var e;return this.qt?((e=this.ys)==null?void 0:e.status)||"lazy_loading":CS}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this._instance=e,!this._instance.sessionManager)throw ML.error("started without valid sessionManager"),new Error(tK+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(tK+' cannot be used with cookieless_mode="always"')}get qt(){var e=!!this._instance.get_property(sR),n=!this._instance.config.disable_session_recording,i=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return qn&&e&&n&&!i}startIfEnabledOrStop(e){var n;if(!this.qt||(n=this.ys)==null||!n.isStarted){var i=!br(Object.assign)&&!br(Array.from);this.qt&&i?(this.ws(e),ML.info("starting")):this.stopRecording()}}ws(e){var n,i,r;this.qt&&(Bs!=null&&(n=Bs.__PosthogExtensions__)!=null&&(n=n.rrweb)!=null&&n.record&&(i=Bs.__PosthogExtensions__)!=null&&i.initSessionRecording?this.Ri(e):(r=Bs.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.Pi,(o=>{if(o)return ML.error("could not load recorder",o);this.Ri(e)})))}stopRecording(){var e;(e=this.ys)==null||e.stop()}onRemoteConfig(e){this.Ss=e;var n,i=this._instance.persistence;i&&i.register({[sR]:!!e.sessionRecording,[eL]:(n=e.sessionRecording)==null?void 0:n.scriptConfig}),this.ys?(this.ys.onRemoteConfig(e),this.Ss=void 0):this.ws(),this.startIfEnabledOrStop()}log(e,n){var i;n===void 0&&(n="log"),(i=this.ys)!=null&&i.log?this.ys.log(e,n):ML.warn("log called before recorder was ready")}get Pi(){var e;return((e=this._instance)==null||(e=e.persistence)==null||(e=e.get_property(eL))==null?void 0:e.script)||"lazy-recorder"}Ri(e){var n,i;if((n=Bs.__PosthogExtensions__)==null||!n.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.ys||(this.ys=(i=Bs.__PosthogExtensions__)==null?void 0:i.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture,this.Ss&&(this.ys.onRemoteConfig(this.Ss),this.Ss=void 0)),this.ys.start(e)}onRRwebEmit(e){var n;(n=this.ys)==null||n.onRRwebEmit==null||n.onRRwebEmit(e)}overrideLinkedFlag(){var e;(e=this.ys)==null||e.overrideLinkedFlag()}overrideSampling(){var e;(e=this.ys)==null||e.overrideSampling()}overrideTrigger(e){var n;(n=this.ys)==null||n.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.ys)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}};var MR={},nK=()=>{},D8="posthog",$3e=!lgt&&Fv?.indexOf("MSIE")===-1&&Fv?.indexOf("Mozilla")===-1,j3e=t=>{var e;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:U_t(Zr?.location),persistence:"localStorage+cookie",persistence_name:"",loaded:nK,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:t!=="2025-05-24"||"history_change",capture_pageleave:"if_capture_pageview",defaults:t??"unset",debug:zv&&cy(zv?.search)&&zv.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(qn==null||(e=qn.location)==null?void 0:e.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:n=>{var i="Bad HTTP status: "+n.statusCode+" "+n.text;Yr.error(i)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:JZ},error_tracking:{},_onCapture:nK}},H3e=t=>{var e={};br(t.process_person)||(e.person_profiles=t.process_person),br(t.xhr_headers)||(e.request_headers=t.xhr_headers),br(t.cookie_name)||(e.persistence_name=t.cookie_name),br(t.disable_cookie)||(e.disable_persistence=t.disable_cookie),br(t.store_google)||(e.save_campaign_params=t.store_google),br(t.verbose)||(e.debug=t.verbose);var n=Yy({},e,t);return mm(t.property_blacklist)&&(br(t.property_denylist)?n.property_denylist=t.property_blacklist:mm(t.property_denylist)?n.property_denylist=[...t.property_blacklist,...t.property_denylist]:Yr.error("Invalid value for property_denylist config: "+t.property_denylist)),n};let Qgt=class{constructor(){this.__forceAllowLocalhost=!1}get $s(){return this.__forceAllowLocalhost}set $s(e){Yr.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}},V3e=class P0t{get decideEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){this.webPerformance=new Qgt,this.ks=!1,this.version=wS.LIB_VERSION,this.xs=new N3e,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=j3e(),this.SentryIntegration=Jyt,this.sentryIntegration=e=>(function(n,i){var r=XSe(n,i);return{name:qSe,processEvent:o=>r(o)}})(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Es=!1,this.Is=null,this.Rs=null,this.Ps=null,this.featureFlags=new Cgt(this),this.toolbar=new tgt(this),this.scrollManager=new Ugt(this),this.pageViewManager=new agt(this),this.surveys=new Ogt(this),this.experiments=new qgt(this),this.exceptions=new dgt(this),this.rateLimiter=new Lgt(this),this.requestRouter=new Ggt(this),this.consent=new uyt(this),this.externalIntegrations=new Zgt(this),this.people={set:(e,n,i)=>{var r=cy(e)?{[e]:n}:e;this.setPersonProperties(r),i?.({})},set_once:(e,n,i)=>{var r=cy(e)?{[e]:n}:e;this.setPersonProperties(void 0,r),i?.({})}},this.on("eventCaptured",(e=>Yr.info('send "'+e?.event+'"',e)))}init(e,n,i){if(i&&i!==D8){var r,o=(r=MR[i])!==null&&r!==void 0?r:new P0t;return o._init(e,n,i),MR[i]=o,MR[D8][i]=o,o}return this._init(e,n,i)}_init(e,n,i){var r,o;if(n===void 0&&(n={}),br(e)||QW(e))return Yr.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return Yr.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},this.Ts=n,this.Cs=[],n.person_profiles&&(this.Rs=n.person_profiles),this.set_config(Yy({},j3e(n.defaults),H3e(n),{name:i,token:e})),this.config.on_xhr_error&&Yr.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:ES.GZipJS;var s=this.Ms();this.persistence=new WZ(this.config,s),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new WZ(Kr({},this.config,{persistence:"sessionStorage"}),s);var a=Kr({},this.persistence.props),c=Kr({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Os=new zgt((w=>this.Fs(w)),this.config.request_queue_config),this.As=new Bgt(this),this.__request_queue=[];var l=this.config.cookieless_mode==="always"||this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut();if(l||(this.sessionManager=new z3e(this),this.sessionPropsManager=new D3e(this,this.sessionManager,this.persistence)),new igt(this).startIfEnabledOrStop(),this.siteApps=new Hgt(this),(r=this.siteApps)==null||r.init(),l||(this.config.__preview_lazy_load_replay?this.sessionRecording=new Kgt(this):this.sessionRecording=new YSe(this),this.sessionRecording.startIfEnabledOrStop()),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new tyt(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new sgt(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new rgt(this),this.exceptionObserver=new pyt(this),this.exceptionObserver.startIfEnabled(),this.deadClicksAutocapture=new gSe(this,hyt),this.deadClicksAutocapture.startIfEnabled(),this.historyAutocapture=new Ayt(this),this.historyAutocapture.startIfEnabled(),wS.DEBUG=wS.DEBUG||this.config.debug,wS.DEBUG&&Yr.info("Starting in debug mode",{this:this,config:n,thisC:Kr({},this.config),p:a,s:c}),((o=n.bootstrap)==null?void 0:o.distinctID)!==void 0){var u,d,h=this.config.get_device_id(i4()),f=(u=n.bootstrap)!=null&&u.isIdentifiedID?h:n.bootstrap.distinctID;this.persistence.set_property(SS,(d=n.bootstrap)!=null&&d.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:n.bootstrap.distinctID,$device_id:f})}if(this.Ds()){var m,y,g=Object.keys(((m=n.bootstrap)==null?void 0:m.featureFlags)||{}).filter((w=>{var T;return!((T=n.bootstrap)==null||(T=T.featureFlags)==null||!T[w])})).reduce(((w,T)=>{var N;return w[T]=((N=n.bootstrap)==null||(N=N.featureFlags)==null?void 0:N[T])||!1,w}),{}),b=Object.keys(((y=n.bootstrap)==null?void 0:y.featureFlagPayloads)||{}).filter((w=>g[w])).reduce(((w,T)=>{var N,R;return(N=n.bootstrap)!=null&&(N=N.featureFlagPayloads)!=null&&N[T]&&(w[T]=(R=n.bootstrap)==null||(R=R.featureFlagPayloads)==null?void 0:R[T]),w}),{});this.featureFlags.receivedFeatureFlags({featureFlags:g,featureFlagPayloads:b})}if(l)this.register_once({distinct_id:uR,$device_id:null},"");else if(!this.get_distinct_id()){var v=this.config.get_device_id(i4());this.register_once({distinct_id:v,$device_id:v},""),this.persistence.set_property(SS,"anonymous")}return M_(qn,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),n.segment?Qyt(this,(()=>this.js())):this.js(),d2(this.config._onCapture)&&this.config._onCapture!==nK&&(Yr.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(w=>this.config._onCapture(w.event,w)))),this.config.ip&&Yr.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Ce(e){var n,i,r,o,s,a,c,l;if(!Zr||!Zr.body)return Yr.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Ce(e)}),500);this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=zl(e.supportedCompression,ES.GZipJS)?ES.GZipJS:zl(e.supportedCompression,ES.Base64)?ES.Base64:void 0),(n=e.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Rs?this.Rs:"identified_only"}),(i=this.siteApps)==null||i.onRemoteConfig(e),(r=this.sessionRecording)==null||r.onRemoteConfig(e),(o=this.autocapture)==null||o.onRemoteConfig(e),(s=this.heatmaps)==null||s.onRemoteConfig(e),this.surveys.onRemoteConfig(e),(a=this.webVitalsAutocapture)==null||a.onRemoteConfig(e),(c=this.exceptionObserver)==null||c.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),(l=this.deadClicksAutocapture)==null||l.onRemoteConfig(e)}js(){try{this.config.loaded(this)}catch(e){Yr.critical("`loaded` function failed",e)}this.Ls(),this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.config.cookieless_mode==="always")&&this.Ns()}),1),new Dgt(this).load(),this.featureFlags.flags()}Ls(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.Os)==null||e.enable())}_dom_loaded(){this.is_capturing()&&t4(this.__request_queue,(e=>this.Fs(e))),this.__request_queue=[],this.Ls()}_handle_unload(){var e,n;this.config.request_batching?(this.zs()&&this.capture("$pageleave"),(e=this.Os)==null||e.unload(),(n=this.As)==null||n.unload()):this.zs()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}Te(e){this.__loaded&&($3e?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=vL(e.url,{ip:this.config.ip?1:0}),e.headers=Kr({},this.config.request_headers),e.compression=e.compression==="best-available"?this.compression:e.compression,e.fetchOptions=e.fetchOptions||this.config.fetch_options,(n=>{var i,r,o,s=Kr({},n);s.timeout=s.timeout||6e4,s.url=vL(s.url,{_:new Date().getTime().toString(),ver:wS.LIB_VERSION,compression:s.compression});var a=(i=s.transport)!==null&&i!==void 0?i:"fetch",c=(r=(o=Bwe(gR,(l=>l.transport===a)))==null?void 0:o.method)!==null&&r!==void 0?r:gR[0].method;if(!c)throw new Error("No available transport method");c(s)})(Kr({},e,{callback:n=>{var i,r;this.rateLimiter.checkForLimiting(n),n.statusCode>=400&&((i=(r=this.config).on_request_error)==null||i.call(r,n)),e.callback==null||e.callback(n)}}))))}Fs(e){this.As?this.As.retriableRequest(e):this.Te(e)}_execute_array(e){var n,i=[],r=[],o=[];t4(e,(a=>{a&&(n=a[0],mm(n)?o.push(a):d2(a)?a.call(this):mm(a)&&n==="alias"?i.push(a):mm(a)&&n.indexOf("capture")!==-1&&d2(this[n])?o.push(a):r.push(a))}));var s=function(a,c){t4(a,(function(l){if(mm(l[0])){var u=c;vf(l,(function(d){u=u[d[0]].apply(u,d.slice(1))}))}else this[l[0]].apply(this,l.slice(1))}),c)};s(i,this),s(r,this),s(o,this)}Ds(){var e,n;return((e=this.config.bootstrap)==null?void 0:e.featureFlags)&&Object.keys((n=this.config.bootstrap)==null?void 0:n.featureFlags).length>0||!1}push(e){this._execute_array([e])}capture(e,n,i){var r;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Os){if(this.is_capturing())if(!br(e)&&cy(e)){if(this.config.opt_out_useragent_filter||!this._is_bot()){var o=i!=null&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(o==null||!o.isRateLimited){n!=null&&n.$current_url&&!cy(n?.$current_url)&&(Yr.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var s=new Date,a=i?.timestamp||s,c=i4(),l={uuid:c,event:e,properties:this.calculateEventProperties(e,n||{},a,c)};o&&(l.properties.$lib_rate_limit_remaining_tokens=o.remainingTokens),i?.$set&&(l.$set=i?.$set);var u,d=this.Us(i?.$set_once);if(d&&(l.$set_once=d),(l=F_t(l,i!=null&&i._noTruncate?null:this.config.properties_string_max_length)).timestamp=a,br(i?.timestamp)||(l.properties.$event_time_override_provided=!0,l.properties.$event_time_override_system_time=s),e===KZ.DISMISSED||e===KZ.SENT){var h=n?.[k3e.SURVEY_ID],f=n?.[k3e.SURVEY_ITERATION];u={id:h,current_iteration:f},localStorage.getItem(O3e(u))||localStorage.setItem(O3e(u),"true"),l.$set=Kr({},l.$set,{[Igt({id:h,current_iteration:f},e===KZ.SENT?"responded":"dismissed")]:!0})}var m=Kr({},l.properties.$set,l.$set);if(T8(m)||this.setPersonPropertiesForFlags(m),!Lh(this.config.before_send)){var y=this.qs(l);if(!y)return;l=y}this.xs.emit("eventCaptured",l);var g={method:"POST",url:(r=i?._url)!==null&&r!==void 0?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:l,compression:"best-available",batchKey:i?._batchKey};return!this.config.request_batching||i&&(i==null||!i._batchKey)||i!=null&&i.send_instantly?this.Fs(g):this.Os.enqueue(g),l}Yr.critical("This capture call is ignored due to client rate limiting.")}}else Yr.error("No event name provided to posthog.capture")}else Yr.uninitializedWarning("posthog.capture")}Ye(e){return this.on("eventCaptured",(n=>e(n.event,n)))}calculateEventProperties(e,n,i,r,o){if(i=i||new Date,!this.persistence||!this.sessionPersistence)return n;var s=o?void 0:this.persistence.remove_event_timer(e),a=Kr({},n);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,(this.config.cookieless_mode=="always"||this.config.cookieless_mode=="on_reject"&&this.consent.isExplicitlyOptedOut())&&(a.$cookieless_mode=!0),e==="$snapshot"){var c=Kr({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=c.distinct_id,(!cy(a.distinct_id)&&!vx(a.distinct_id)||QW(a.distinct_id))&&Yr.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var l,u=Tgt(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:d,windowId:h}=this.sessionManager.checkAndGetSessionAndWindowId(o,i.getTime());a.$session_id=d,a.$window_id=h}this.sessionPropsManager&&Yy(a,this.sessionPropsManager.getSessionProps());try{var f;this.sessionRecording&&Yy(a,this.sessionRecording.sdkDebugProperties),a.$sdk_debug_retry_queue_size=(f=this.As)==null?void 0:f.length}catch(b){a.$sdk_debug_error_capturing_properties=String(b)}if(this.requestRouter.region===TR.CUSTOM&&(a.$lib_custom_api_host=this.config.api_host),l=e!=="$pageview"||o?e!=="$pageleave"||o?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(i):this.pageViewManager.doPageView(i,r),a=Yy(a,l),e==="$pageview"&&Zr&&(a.title=Zr.title),!br(s)){var m=i.getTime()-s;a.$duration=parseFloat((m/1e3).toFixed(3))}Fv&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=Yy({},u,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),mm(this.config.property_denylist)?vf(this.config.property_denylist,(function(b){delete a[b]})):Yr.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var y=this.config.sanitize_properties;y&&(Yr.error("sanitize_properties is deprecated. Use before_send instead"),a=y(a,e));var g=this.Bs();return a.$process_person_profile=g,g&&!o&&this.Hs("_calculate_event_properties"),a}Us(e){var n;if(!this.persistence||!this.Bs()||this.ks)return e;var i=this.persistence.get_initial_props(),r=(n=this.sessionPropsManager)==null?void 0:n.getSetOnceProps(),o=Yy({},i,r||{},e||{}),s=this.config.sanitize_properties;return s&&(Yr.error("sanitize_properties is deprecated. Use before_send instead"),o=s(o,"$set_once")),this.ks=!0,T8(o)?void 0:o}register(e,n){var i;(i=this.persistence)==null||i.register(e,n)}register_once(e,n,i){var r;(r=this.persistence)==null||r.register_once(e,n,i)}register_for_session(e){var n;(n=this.sessionPersistence)==null||n.register(e)}unregister(e){var n;(n=this.persistence)==null||n.unregister(e)}unregister_for_session(e){var n;(n=this.sessionPersistence)==null||n.unregister(e)}Ws(e,n){this.register({[e]:n})}getFeatureFlag(e,n){return this.featureFlags.getFeatureFlag(e,n)}getFeatureFlagPayload(e){var n=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(n)}catch{return n}}isFeatureEnabled(e,n){return this.featureFlags.isFeatureEnabled(e,n)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(e,n,i){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,n,i)}getEarlyAccessFeatures(e,n,i){return n===void 0&&(n=!1),this.featureFlags.getEarlyAccessFeatures(e,n,i)}on(e,n){return this.xs.on(e,n)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSurveysLoaded(e){return this.surveys.onSurveysLoaded(e)}onSessionId(e){var n,i;return(n=(i=this.sessionManager)==null?void 0:i.onSessionId(e))!==null&&n!==void 0?n:()=>{}}getSurveys(e,n){n===void 0&&(n=!1),this.surveys.getSurveys(e,n)}getActiveMatchingSurveys(e,n){n===void 0&&(n=!1),this.surveys.getActiveMatchingSurveys(e,n)}renderSurvey(e,n){this.surveys.renderSurvey(e,n)}canRenderSurvey(e){return this.surveys.canRenderSurvey(e)}canRenderSurveyAsync(e,n){return n===void 0&&(n=!1),this.surveys.canRenderSurveyAsync(e,n)}identify(e,n,i){if(!this.__loaded||!this.persistence)return Yr.uninitializedWarning("posthog.identify");if(vx(e)&&(e=e.toString(),Yr.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e)if(["distinct_id","distinctid"].includes(e.toLowerCase()))Yr.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if(e!==uR){if(this.Hs("posthog.identify")){var r=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var o=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:o},"")}e!==r&&e!==this.get_property(rR)&&(this.unregister(rR),this.register({distinct_id:e}));var s=(this.persistence.get_property(SS)||"anonymous")==="anonymous";e!==r&&s?(this.persistence.set_property(SS,"identified"),this.setPersonPropertiesForFlags(Kr({},i||{},n||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:n||{},$set_once:i||{}}),this.Ps=e3e(e,n,i),this.featureFlags.setAnonymousDistinctId(r)):(n||i)&&this.setPersonProperties(n,i),e!==r&&(this.reloadFeatureFlags(),this.unregister(iL))}}else Yr.critical('The string "'+uR+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else Yr.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,n){if((e||n)&&this.Hs("posthog.setPersonProperties")){var i=e3e(this.get_distinct_id(),e,n);this.Ps!==i?(this.setPersonPropertiesForFlags(Kr({},n||{},e||{})),this.capture("$set",{$set:e||{},$set_once:n||{}}),this.Ps=i):Yr.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,n,i){if(e&&n){if(this.Hs("posthog.group")){var r=this.getGroups();r[e]!==n&&this.resetGroupPropertiesForFlags(e),this.register({$groups:Kr({},r,{[e]:n})}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:n,$group_set:i}),this.setGroupPropertiesForFlags({[e]:i})),r[e]===n||i||this.reloadFeatureFlags()}}else Yr.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n){n===void 0&&(n=!0),this.featureFlags.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,n){n===void 0&&(n=!0),this.Hs("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,n)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){var n,i,r,o;if(Yr.info("reset"),!this.__loaded)return Yr.uninitializedWarning("posthog.reset");var s=this.get_property("$device_id");if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(i=this.sessionPersistence)==null||i.clear(),this.surveys.reset(),this.featureFlags.reset(),(r=this.persistence)==null||r.set_property(SS,"anonymous"),(o=this.sessionManager)==null||o.resetSessionId(),this.Ps=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:uR,$device_id:null},"");else{var a=this.config.get_device_id(i4());this.register_once({distinct_id:a,$device_id:e?a:s},"")}this.register({$last_posthog_reset:new Date().toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,n;return(e=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:i}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(e!=null&&e.withTimestamp&&i){var o,s=(o=e.timestampLookBack)!==null&&o!==void 0?o:10;if(!i)return r;r+="?t="+Math.max(Math.floor((new Date().getTime()-i)/1e3)-s,0)}return r}alias(e,n){return e===this.get_property(Uwe)?(Yr.critical("Attempting to create alias for existing People user - aborting."),-2):this.Hs("posthog.alias")?(br(n)&&(n=this.get_distinct_id()),e!==n?(this.Ws(rR,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(Yr.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var n=Kr({},this.config);if(ay(e)){var i,r,o,s,a;Yy(this.config,H3e(e));var c=this.Ms();(i=this.persistence)==null||i.update_config(this.config,n,c),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new WZ(Kr({},this.config,{persistence:"sessionStorage"}),c),b1.G()&&b1.V("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(wS.DEBUG=!0,Yr.info("set_config",{config:e,oldConfig:n,newConfig:Kr({},this.config)})),(r=this.sessionRecording)==null||r.startIfEnabledOrStop(),(o=this.autocapture)==null||o.startIfEnabled(),(s=this.heatmaps)==null||s.startIfEnabled(),this.surveys.loadIfEnabled(),this.Gs(),(a=this.externalIntegrations)==null||a.startIfEnabledOrStop()}}startSessionRecording(e){var n=e===!0,i={sampling:n||!(e==null||!e.sampling),linked_flag:n||!(e==null||!e.linked_flag),url_trigger:n||!(e==null||!e.url_trigger),event_trigger:n||!(e==null||!e.event_trigger)};if(Object.values(i).some(Boolean)){var r,o,s,a,c;(r=this.sessionManager)==null||r.checkAndGetSessionAndWindowId(),i.sampling&&((o=this.sessionRecording)==null||o.overrideSampling()),i.linked_flag&&((s=this.sessionRecording)==null||s.overrideLinkedFlag()),i.url_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger("url")),i.event_trigger&&((c=this.sessionRecording)==null||c.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,n){var i=new Error("PostHog syntheticException");return this.exceptions.sendExceptionEvent(Kr({},Myt((r=>r instanceof Error)(e)?{error:e,event:e.message}:{event:e},{syntheticException:i}),n))}loadToolbar(e){return this.toolbar.loadToolbar(e)}get_property(e){var n;return(n=this.persistence)==null?void 0:n.props[e]}getSessionProperty(e){var n;return(n=this.sessionPersistence)==null?void 0:n.props[e]}toString(){var e,n=(e=this.config.name)!==null&&e!==void 0?e:D8;return n!==D8&&(n=D8+"."+n),n}_isIdentified(){var e,n;return((e=this.persistence)==null?void 0:e.get_property(SS))==="identified"||((n=this.sessionPersistence)==null?void 0:n.get_property(SS))==="identified"}Bs(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&T8(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[rR])&&((n=this.persistence)==null||(n=n.props)==null||!n[oL]))}zs(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Bs()||this.Hs("posthog.createPersonProfile")&&this.setPersonProperties({},{})}Hs(e){return this.config.person_profiles==="never"?(Yr.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Ws(oL,!0),!0)}Ms(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut(),n=this.config.opt_out_persistence_by_default||this.config.cookieless_mode==="on_reject";return this.config.disable_persistence||e&&!!n}Gs(){var e,n,i,r,o=this.Ms();return((e=this.persistence)==null?void 0:e.je)!==o&&((i=this.persistence)==null||i.set_disabled(o)),((n=this.sessionPersistence)==null?void 0:n.je)!==o&&((r=this.sessionPersistence)==null||r.set_disabled(o)),o}opt_in_capturing(e){if(this.config.cookieless_mode!=="always"){var n;this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),this.sessionManager=new z3e(this),this.persistence&&(this.sessionPropsManager=new D3e(this,this.sessionManager,this.persistence)),this.sessionRecording=new YSe(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.Gs(),(br(e?.captureEventName)||e!=null&&e.captureEventName)&&this.capture((n=e?.captureEventName)!==null&&n!==void 0?n:"$opt_in",e?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ns()}else Yr.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e;this.config.cookieless_mode!=="always"?(this.config.cookieless_mode==="on_reject"&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Gs(),this.config.cookieless_mode==="on_reject"&&(this.register({distinct_id:uR,$device_id:null}),this.sessionManager=void 0,this.sessionPropsManager=void 0,(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,this.Ns())):Yr.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===TS.GRANTED?"granted":e===TS.DENIED?"denied":"pending"}is_capturing(){return this.config.cookieless_mode==="always"||(this.config.cookieless_mode==="on_reject"?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Gs()}_is_bot(){return b9?B3e(b9,this.config.custom_blocked_useragents):void 0}Ns(){Zr&&(Zr.visibilityState==="visible"?this.Es||(this.Es=!0,this.capture("$pageview",{title:Zr.title},{send_instantly:!0}),this.Is&&(Zr.removeEventListener("visibilitychange",this.Is),this.Is=null)):this.Is||(this.Is=this.Ns.bind(this),M_(Zr,"visibilitychange",this.Is)))}debug(e){e===!1?(qn?.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(qn?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}L(){var e,n,i,r,o,s,a,c=this.Ts||{};return"advanced_disable_flags"in c?!!c.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(Yr.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(i="advanced_disable_decide",r=!1,o=Yr,s=(n="advanced_disable_flags")in(e=c)&&!br(e[n]),a=i in e&&!br(e[i]),s?e[n]:a?(o&&o.warn("Config field '"+i+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),e[i]):r)}qs(e){if(Lh(this.config.before_send))return e;var n=mm(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var r of n){if(i=r(i),Lh(i)){var o="Event '"+e.event+"' was rejected in beforeSend function";return k_t(e.event)?Yr.warn(o+". This can cause unexpected behavior."):Yr.info(o),null}i.properties&&!T8(i.properties)||Yr.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;return(e=this.pageViewManager.pe)==null?void 0:e.pageViewId}captureTraceFeedback(e,n){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:n})}captureTraceMetric(e,n,i){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:n,$ai_metric_value:String(i)})}};(function(t,e){for(var n=0;n<e.length;n++)t.prototype[e[n]]=z_t(t.prototype[e[n]])})(V3e,["identify"]);var G3e,AL=(G3e=MR[D8]=new V3e,(function(){function t(){t.done||(t.done=!0,$3e=!1,vf(MR,(function(e){e._dom_loaded()})))}Zr!=null&&Zr.addEventListener?Zr.readyState==="complete"?t():M_(Zr,"DOMContentLoaded",t,{capture:!1}):qn&&Yr.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),G3e);!window.location.hostname.includes("localhost")&&!window.location.hostname.includes("127.0.0.1")&&(AL.__loaded||AL.init("phc_htd8AQjSfVEsFCLQMAiUooG4Q0DKBCjqYuQglc9V3Wo",{api_host:"https://postpig.tscircuit.com",person_profiles:"always"}));function Jgt(t){const e=String.fromCodePoint(...t);return btoa(e)}var v9=Uint8Array,w9=Uint16Array,iK=Int32Array,rK=new v9([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),oK=new v9([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Y3e=new v9([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),q3e=function(t,e){for(var n=new w9(31),i=0;i<31;++i)n[i]=e+=1<<t[i-1];for(var r=new iK(n[30]),i=1;i<30;++i)for(var o=n[i];o<n[i+1];++o)r[o]=o-n[i]<<5|i;return{b:n,r}},X3e=q3e(rK,2),e1t=X3e.b,sK=X3e.r;e1t[28]=258,sK[258]=28;for(var t1t=q3e(oK,0),W3e=t1t.r,aK=new w9(32768),ym=0;ym<32768;++ym){var a4=(ym&43690)>>1|(ym&21845)<<1;a4=(a4&52428)>>2|(a4&13107)<<2,a4=(a4&61680)>>4|(a4&3855)<<4,aK[ym]=((a4&65280)>>8|(a4&255)<<8)>>1}for(var AR=(function(t,e,n){for(var i=t.length,r=0,o=new w9(e);r<i;++r)t[r]&&++o[t[r]-1];var s=new w9(e);for(r=1;r<e;++r)s[r]=s[r-1]+o[r-1]<<1;var a;if(n){a=new w9(1<<e);var c=15-e;for(r=0;r<i;++r)if(t[r])for(var l=r<<4|t[r],u=e-t[r],d=s[t[r]-1]++<<u,h=d|(1<<u)-1;d<=h;++d)a[aK[d]>>c]=l}else for(a=new w9(i),r=0;r<i;++r)t[r]&&(a[r]=aK[s[t[r]-1]++]>>15-t[r]);return a}),hT=new v9(288),ym=0;ym<144;++ym)hT[ym]=8;for(var ym=144;ym<256;++ym)hT[ym]=9;for(var ym=256;ym<280;++ym)hT[ym]=7;for(var ym=280;ym<288;++ym)hT[ym]=8;for(var CL=new v9(32),ym=0;ym<32;++ym)CL[ym]=5;var n1t=AR(hT,9,0),i1t=AR(CL,5,0),Z3e=function(t){return(t+7)/8|0},K3e=function(t,e,n){return(n==null||n>t.length)&&(n=t.length),new v9(t.subarray(e,n))},RS=function(t,e,n){n<<=e&7;var i=e/8|0;t[i]|=n,t[i+1]|=n>>8},CR=function(t,e,n){n<<=e&7;var i=e/8|0;t[i]|=n,t[i+1]|=n>>8,t[i+2]|=n>>16},cK=function(t,e){for(var n=[],i=0;i<t.length;++i)t[i]&&n.push({s:i,f:t[i]});var r=n.length,o=n.slice();if(!r)return{t:t4e,l:0};if(r==1){var s=new v9(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort(function(N,R){return N.f-R.f}),n.push({s:-1,f:25001});var a=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=r-1;)a=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:a.f+c.f,l:a,r:c};for(var h=o[0].s,i=1;i<r;++i)o[i].s>h&&(h=o[i].s);var f=new w9(h+1),m=lK(n[u-1],f,0);if(m>e){var i=0,y=0,g=m-e,b=1<<g;for(o.sort(function(R,P){return f[P.s]-f[R.s]||R.f-P.f});i<r;++i){var v=o[i].s;if(f[v]>e)y+=b-(1<<m-f[v]),f[v]=e;else break}for(y>>=g;y>0;){var w=o[i].s;f[w]<e?y-=1<<e-f[w]++-1:++i}for(;i>=0&&y;--i){var T=o[i].s;f[T]==e&&(--f[T],++y)}m=e}return{t:new v9(f),l:m}},lK=function(t,e,n){return t.s==-1?Math.max(lK(t.l,e,n+1),lK(t.r,e,n+1)):e[t.s]=n},Q3e=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new w9(++e),i=0,r=t[0],o=1,s=function(c){n[i++]=c},a=1;a<=e;++a)if(t[a]==r&&a!=e)++o;else{if(!r&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(r),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(r);o=1,r=t[a]}return{c:n.subarray(0,i),n:e}},RR=function(t,e){for(var n=0,i=0;i<e.length;++i)n+=t[i]*e[i];return n},J3e=function(t,e,n){var i=n.length,r=Z3e(e+2);t[r]=i&255,t[r+1]=i>>8,t[r+2]=t[r]^255,t[r+3]=t[r+1]^255;for(var o=0;o<i;++o)t[r+o+4]=n[o];return(r+4+i)*8},e4e=function(t,e,n,i,r,o,s,a,c,l,u){RS(e,u++,n),++r[256];for(var d=cK(r,15),h=d.t,f=d.l,m=cK(o,15),y=m.t,g=m.l,b=Q3e(h),v=b.c,w=b.n,T=Q3e(y),N=T.c,R=T.n,P=new w9(19),M=0;M<v.length;++M)++P[v[M]&31];for(var M=0;M<N.length;++M)++P[N[M]&31];for(var I=cK(P,7),A=I.t,$=I.l,k=19;k>4&&!A[Y3e[k-1]];--k);var V=l+5<<3,X=RR(r,hT)+RR(o,CL)+s,W=RR(r,h)+RR(o,y)+s+14+3*k+RR(P,A)+2*P[16]+3*P[17]+7*P[18];if(c>=0&&V<=X&&V<=W)return J3e(e,u,t.subarray(c,c+l));var K,ee,se,de;if(RS(e,u,1+(W<X)),u+=2,W<X){K=AR(h,f,0),ee=h,se=AR(y,g,0),de=y;var be=AR(A,$,0);RS(e,u,w-257),RS(e,u+5,R-1),RS(e,u+10,k-4),u+=14;for(var M=0;M<k;++M)RS(e,u+3*M,A[Y3e[M]]);u+=3*k;for(var re=[v,N],ue=0;ue<2;++ue)for(var he=re[ue],M=0;M<he.length;++M){var Te=he[M]&31;RS(e,u,be[Te]),u+=A[Te],Te>15&&(RS(e,u,he[M]>>5&127),u+=he[M]>>12)}}else K=n1t,ee=hT,se=i1t,de=CL;for(var M=0;M<a;++M){var Ie=i[M];if(Ie>255){var Te=Ie>>18&31;CR(e,u,K[Te+257]),u+=ee[Te+257],Te>7&&(RS(e,u,Ie>>23&31),u+=rK[Te]);var De=Ie&31;CR(e,u,se[De]),u+=de[De],De>3&&(CR(e,u,Ie>>5&8191),u+=oK[De])}else CR(e,u,K[Ie]),u+=ee[Ie]}return CR(e,u,K[256]),u+ee[256]},r1t=new iK([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),t4e=new v9(0),o1t=function(t,e,n,i,r,o){var s=o.z||t.length,a=new v9(i+s+5*(1+Math.ceil(s/7e3))+r),c=a.subarray(i,a.length-r),l=o.l,u=(o.r||0)&7;if(e){u&&(c[0]=o.r>>3);for(var d=r1t[e-1],h=d>>13,f=d&8191,m=(1<<n)-1,y=o.p||new w9(32768),g=o.h||new w9(m+1),b=Math.ceil(n/3),v=2*b,w=function(at){return(t[at]^t[at+1]<<b^t[at+2]<<v)&m},T=new iK(25e3),N=new w9(288),R=new w9(32),P=0,M=0,I=o.i||0,A=0,$=o.w||0,k=0;I+2<s;++I){var V=w(I),X=I&32767,W=g[V];if(y[X]=W,g[V]=X,$<=I){var K=s-I;if((P>7e3||A>24576)&&(K>423||!l)){u=e4e(t,c,0,T,N,R,M,A,k,I-k,u),A=P=M=0,k=I;for(var ee=0;ee<286;++ee)N[ee]=0;for(var ee=0;ee<30;++ee)R[ee]=0}var se=2,de=0,be=f,re=X-W&32767;if(K>2&&V==w(I-re))for(var ue=Math.min(h,K)-1,he=Math.min(32767,I),Te=Math.min(258,K);re<=he&&--be&&X!=W;){if(t[I+se]==t[I+se-re]){for(var Ie=0;Ie<Te&&t[I+Ie]==t[I+Ie-re];++Ie);if(Ie>se){if(se=Ie,de=re,Ie>ue)break;for(var De=Math.min(re,Ie-2),Ge=0,ee=0;ee<De;++ee){var ke=I-re+ee&32767,ce=y[ke],we=ke-ce&32767;we>Ge&&(Ge=we,W=ke)}}}X=W,W=y[X],re+=X-W&32767}if(de){T[A++]=268435456|sK[se]<<18|W3e[de];var xe=sK[se]&31,qe=W3e[de]&31;M+=rK[xe]+oK[qe],++N[257+xe],++R[qe],$=I+se,++P}else T[A++]=t[I],++N[t[I]]}}for(I=Math.max(I,$);I<s;++I)T[A++]=t[I],++N[t[I]];u=e4e(t,c,l,T,N,R,M,A,k,I-k,u),l||(o.r=u&7|c[u/8|0]<<3,u-=7,o.h=g,o.p=y,o.i=I,o.w=$)}else{for(var I=o.w||0;I<s+l;I+=65535){var Je=I+65535;Je>=s&&(c[u/8|0]=l,Je=s),u=J3e(c,u+1,t.subarray(I,Je))}o.i=s}return K3e(a,0,i+Z3e(u)+r)},s1t=(function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var n=e,i=9;--i;)n=(n&1&&-306674912)^n>>>1;t[e]=n}return t})(),a1t=function(){var t=-1;return{p:function(e){for(var n=t,i=0;i<e.length;++i)n=s1t[n&255^e[i]]^n>>>8;t=n},d:function(){return~t}}},c1t=function(t,e,n,i,r){if(!r&&(r={l:1},e.dictionary)){var o=e.dictionary.subarray(-32768),s=new v9(o.length+t.length);s.set(o),s.set(t,o.length),t=s,r.w=o.length}return o1t(t,e.level==null?6:e.level,e.mem==null?r.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,n,i,r)},uK=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8},l1t=function(t,e){var n=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&uK(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),n){t[3]=8;for(var i=0;i<=n.length;++i)t[i+10]=n.charCodeAt(i)}},u1t=function(t){return 10+(t.filename?t.filename.length+1:0)};function n4e(t,e){e||(e={});var n=a1t(),i=t.length;n.p(t);var r=c1t(t,e,u1t(e),8),o=r.length;return l1t(r,e),uK(r,o-8,n.d()),uK(r,o-4,i),r}var i4e=typeof TextEncoder<"u"&&new TextEncoder,d1t=typeof TextDecoder<"u"&&new TextDecoder,h1t=0;try{d1t.decode(t4e,{stream:!0}),h1t=1}catch{}function r4e(t,e){var n;if(i4e)return i4e.encode(t);for(var i=t.length,r=new v9(t.length+(t.length>>1)),o=0,s=function(l){r[o++]=l},n=0;n<i;++n){if(o+5>r.length){var a=new v9(o+8+(i-n<<1));a.set(r),r=a}var c=t.charCodeAt(n);c<128||e?s(c):c<2048?(s(192|c>>6),s(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|t.charCodeAt(++n)&1023,s(240|c>>18),s(128|c>>12&63),s(128|c>>6&63),s(128|c&63)):(s(224|c>>12),s(128|c>>6&63),s(128|c&63))}return K3e(r,0,o)}function p1t(t,e){const n=JSON.stringify(t),i=n4e(r4e(n));return`https://tscircuit.com/editor?#data:application/gzip;base64,${Jgt(i)}`}function Fa(...t){return R_t(J5(t))}const o4e=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),dK=Qmt,RL=Ce.forwardRef(({className:t,...e},n)=>ye.jsx(ywe,{ref:n,className:Fa("rf-inline-flex rf-h-9 rf-items-center rf-justify-center rf-rounded-lg rf-bg-zinc-100 rf-p-1 rf-text-zinc-500 dark:rf-bg-zinc-800 dark:rf-text-zinc-400",t),...e}));RL.displayName=ywe.displayName;const t5=Ce.forwardRef(({className:t,...e},n)=>ye.jsx(gwe,{ref:n,className:Fa("rf-inline-flex rf-items-center rf-justify-center rf-whitespace-nowrap rf-rounded-md rf-px-3 rf-py-1 rf-text-sm rf-font-medium rf-ring-offset-white rf-transition-all focus-visible:rf-outline-none focus-visible:rf-ring-2 focus-visible:rf-ring-zinc-950 focus-visible:rf-ring-offset-2 disabled:rf-pointer-events-none disabled:rf-opacity-50 data-[state=active]:rf-bg-white data-[state=active]:rf-text-zinc-950 data-[state=active]:rf-shadow dark:rf-ring-offset-zinc-950 dark:focus-visible:rf-ring-zinc-300 dark:data-[state=active]:rf-bg-zinc-950 dark:data-[state=active]:rf-text-zinc-50",t),...e}));t5.displayName=gwe.displayName;const S9=Ce.forwardRef(({className:t,...e},n)=>ye.jsx(bwe,{ref:n,className:Fa("rf-h-full rf-mt-2 rf-ring-offset-white focus-visible:rf-outline-none focus-visible:rf-ring-2 focus-visible:rf-ring-zinc-950 focus-visible:rf-ring-offset-2 dark:rf-ring-offset-zinc-950 dark:focus-visible:rf-ring-zinc-300",t),...e}));S9.displayName=bwe.displayName;var $d;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function n(r){throw new Error}t.assertNever=n,t.arrayToEnum=r=>{const o={};for(const s of r)o[s]=s;return o},t.getValidEnumValues=r=>{const o=t.objectKeys(r).filter(a=>typeof r[r[a]]!="number"),s={};for(const a of o)s[a]=r[a];return t.objectValues(s)},t.objectValues=r=>t.objectKeys(r).map(function(o){return r[o]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const o=[];for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&o.push(s);return o},t.find=(r,o)=>{for(const s of r)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function i(r,o=" | "){return r.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=i,t.jsonStringifyReplacer=(r,o)=>typeof o=="bigint"?o.toString():o})($d||($d={}));var s4e;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(s4e||(s4e={}));const ao=$d.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),c4=t=>{switch(typeof t){case"undefined":return ao.undefined;case"string":return ao.string;case"number":return Number.isNaN(t)?ao.nan:ao.number;case"boolean":return ao.boolean;case"function":return ao.function;case"bigint":return ao.bigint;case"symbol":return ao.symbol;case"object":return Array.isArray(t)?ao.array:t===null?ao.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ao.promise:typeof Map<"u"&&t instanceof Map?ao.map:typeof Set<"u"&&t instanceof Set?ao.set:typeof Date<"u"&&t instanceof Date?ao.date:ao.object;default:return ao.unknown}},zi=$d.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);let sw=class I0t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(o){return o.message},i={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(r);else if(s.code==="invalid_return_type")r(s.returnTypeError);else if(s.code==="invalid_arguments")r(s.argumentsError);else if(s.path.length===0)i._errors.push(n(s));else{let a=i,c=0;for(;c<s.path.length;){const l=s.path[c];c===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(n(s))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return r(this),i}static assert(e){if(!(e instanceof I0t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,$d.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},i=[];for(const r of this.issues)if(r.path.length>0){const o=r.path[0];n[o]=n[o]||[],n[o].push(e(r))}else i.push(e(r));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}};sw.create=t=>new sw(t);const PR=(t,e)=>{let n;switch(t.code){case zi.invalid_type:t.received===ao.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case zi.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,$d.jsonStringifyReplacer)}`;break;case zi.unrecognized_keys:n=`Unrecognized key(s) in object: ${$d.joinValues(t.keys,", ")}`;break;case zi.invalid_union:n="Invalid input";break;case zi.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${$d.joinValues(t.options)}`;break;case zi.invalid_enum_value:n=`Invalid enum value. Expected ${$d.joinValues(t.options)}, received '${t.received}'`;break;case zi.invalid_arguments:n="Invalid function arguments";break;case zi.invalid_return_type:n="Invalid function return type";break;case zi.invalid_date:n="Invalid date";break;case zi.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:$d.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case zi.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case zi.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case zi.custom:n="Invalid input";break;case zi.invalid_intersection_types:n="Intersection results could not be merged";break;case zi.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case zi.not_finite:n="Number must be finite";break;default:n=e.defaultError,$d.assertNever(t)}return{message:n}};let f1t=PR;function hK(){return f1t}const pK=t=>{const{data:e,path:n,errorMaps:i,issueData:r}=t,o=[...n,...r.path||[]],s={...r,path:o};if(r.message!==void 0)return{...r,path:o,message:r.message};let a="";const c=i.filter(l=>!!l).slice().reverse();for(const l of c)a=l(s,{data:e,defaultError:a}).message;return{...r,path:o,message:a}};function Or(t,e){const n=hK(),i=pK({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===PR?void 0:PR].filter(r=>!!r)});t.common.issues.push(i)}let E9=class N0t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const i=[];for(const r of n){if(r.status==="aborted")return Js;r.status==="dirty"&&e.dirty(),i.push(r.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,n){const i=[];for(const r of n){const o=await r.key,s=await r.value;i.push({key:o,value:s})}return N0t.mergeObjectSync(e,i)}static mergeObjectSync(e,n){const i={};for(const r of n){const{key:o,value:s}=r;if(o.status==="aborted"||s.status==="aborted")return Js;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||r.alwaysSet)&&(i[o.value]=s.value)}return{status:e.value,value:i}}};const Js=Object.freeze({status:"aborted"}),IR=t=>({status:"dirty",value:t}),Uv=t=>({status:"valid",value:t}),a4e=t=>t.status==="aborted",c4e=t=>t.status==="dirty",z8=t=>t.status==="valid",PL=t=>typeof Promise<"u"&&t instanceof Promise;var Xo;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Xo||(Xo={}));let aw=class{constructor(e,n,i,r){this._cachedPath=[],this.parent=e,this.data=n,this._path=i,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const l4e=(t,e)=>{if(z8(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new sw(t.common.issues);return this._error=n,this._error}}};function kc(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:i,description:r}=t;if(e&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:r}:{errorMap:(s,a)=>{const{message:c}=t;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??i??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??n??a.defaultError}},description:r}}let nu=class{get description(){return this._def.description}_getType(e){return c4(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:c4(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new E9,ctx:{common:e.parent.common,data:e.data,parsedType:c4(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(PL(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const i=this.safeParse(e,n);if(i.success)return i.data;throw i.error}safeParse(e,n){const i={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:c4(e)},r=this._parseSync({data:e,path:i.path,parent:i});return l4e(i,r)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:c4(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:n});return z8(i)?{value:i.value}:{issues:n.common.issues}}catch(i){i?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>z8(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,n){const i=await this.safeParseAsync(e,n);if(i.success)return i.data;throw i.error}async safeParseAsync(e,n){const i={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:c4(e)},r=this._parse({data:e,path:i.path,parent:i}),o=await(PL(r)?r:Promise.resolve(r));return l4e(i,o)}refine(e,n){const i=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,o)=>{const s=e(r),a=()=>o.addIssue({code:zi.custom,...i(r)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((i,r)=>e(i)?!0:(r.addIssue(typeof n=="function"?n(i,r):n),!1))}_refinement(e){return new u4({schema:this,typeName:va.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return NS.create(this,this._def)}nullable(){return fT.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return B8.create(this)}promise(){return OR.create(this,this._def)}or(e){return DL.create([this,e],this._def)}and(e){return zL.create(this,e,this._def)}transform(e){return new u4({...kc(this._def),schema:this,typeName:va.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new UL({...kc(this._def),innerType:this,defaultValue:n,typeName:va.ZodDefault})}brand(){return new g4e({typeName:va.ZodBranded,type:this,...kc(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new $L({...kc(this._def),innerType:this,catchValue:n,typeName:va.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return U1t.create(this,e)}readonly(){return jL.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const m1t=/^c[^\s-]{8,}$/i,_1t=/^[0-9a-z]+$/,y1t=/^[0-9A-HJKMNP-TV-Z]{26}$/i,g1t=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,b1t=/^[a-z0-9_-]{21}$/i,x1t=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,v1t=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,w1t=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,S1t="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let fK;const E1t=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,T1t=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,M1t=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,A1t=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,C1t=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,R1t=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,u4e="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",P1t=new RegExp(`^${u4e}$`);function d4e(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function I1t(t){return new RegExp(`^${d4e(t)}$`)}function N1t(t){let e=`${u4e}T${d4e(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function k1t(t,e){return!!((e==="v4"||!e)&&E1t.test(t)||(e==="v6"||!e)&&M1t.test(t))}function O1t(t,e){if(!x1t.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(i));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||e&&r.alg!==e)}catch{return!1}}function L1t(t,e){return!!((e==="v4"||!e)&&T1t.test(t)||(e==="v6"||!e)&&A1t.test(t))}let NR=class PO extends nu{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ao.string){const o=this._getOrReturnCtx(e);return Or(o,{code:zi.invalid_type,expected:ao.string,received:o.parsedType}),Js}const i=new E9;let r;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="max")e.data.length>o.value&&(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="length"){const s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(r=this._getOrReturnCtx(e,r),s?Or(r,{code:zi.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&Or(r,{code:zi.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),i.dirty())}else if(o.kind==="email")w1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"email",code:zi.invalid_string,message:o.message}),i.dirty());else if(o.kind==="emoji")fK||(fK=new RegExp(S1t,"u")),fK.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"emoji",code:zi.invalid_string,message:o.message}),i.dirty());else if(o.kind==="uuid")g1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"uuid",code:zi.invalid_string,message:o.message}),i.dirty());else if(o.kind==="nanoid")b1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"nanoid",code:zi.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid")m1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"cuid",code:zi.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid2")_1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"cuid2",code:zi.invalid_string,message:o.message}),i.dirty());else if(o.kind==="ulid")y1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"ulid",code:zi.invalid_string,message:o.message}),i.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),Or(r,{validation:"url",code:zi.invalid_string,message:o.message}),i.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"regex",code:zi.invalid_string,message:o.message}),i.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),i.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.invalid_string,validation:{startsWith:o.value},message:o.message}),i.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.invalid_string,validation:{endsWith:o.value},message:o.message}),i.dirty()):o.kind==="datetime"?N1t(o).test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.invalid_string,validation:"datetime",message:o.message}),i.dirty()):o.kind==="date"?P1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.invalid_string,validation:"date",message:o.message}),i.dirty()):o.kind==="time"?I1t(o).test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.invalid_string,validation:"time",message:o.message}),i.dirty()):o.kind==="duration"?v1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"duration",code:zi.invalid_string,message:o.message}),i.dirty()):o.kind==="ip"?k1t(e.data,o.version)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"ip",code:zi.invalid_string,message:o.message}),i.dirty()):o.kind==="jwt"?O1t(e.data,o.alg)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"jwt",code:zi.invalid_string,message:o.message}),i.dirty()):o.kind==="cidr"?L1t(e.data,o.version)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"cidr",code:zi.invalid_string,message:o.message}),i.dirty()):o.kind==="base64"?C1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"base64",code:zi.invalid_string,message:o.message}),i.dirty()):o.kind==="base64url"?R1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"base64url",code:zi.invalid_string,message:o.message}),i.dirty()):$d.assertNever(o);return{status:i.value,value:e.data}}_regex(e,n,i){return this.refinement(r=>e.test(r),{validation:n,code:zi.invalid_string,...Xo.errToObj(i)})}_addCheck(e){return new PO({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Xo.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Xo.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Xo.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Xo.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Xo.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Xo.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Xo.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Xo.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Xo.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Xo.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Xo.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Xo.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Xo.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Xo.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Xo.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Xo.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Xo.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Xo.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Xo.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Xo.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Xo.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Xo.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Xo.errToObj(n)})}nonempty(e){return this.min(1,Xo.errToObj(e))}trim(){return new PO({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new PO({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new PO({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};NR.create=t=>new NR({checks:[],typeName:va.ZodString,coerce:t?.coerce??!1,...kc(t)});function D1t(t,e){const n=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,r=n>i?n:i,o=Number.parseInt(t.toFixed(r).replace(".","")),s=Number.parseInt(e.toFixed(r).replace(".",""));return o%s/10**r}let IL=class f5e extends nu{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ao.number){const o=this._getOrReturnCtx(e);return Or(o,{code:zi.invalid_type,expected:ao.number,received:o.parsedType}),Js}let i;const r=new E9;for(const o of this._def.checks)o.kind==="int"?$d.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.invalid_type,expected:"integer",received:"float",message:o.message}),r.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind==="multipleOf"?D1t(e.data,o.value)!==0&&(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.not_finite,message:o.message}),r.dirty()):$d.assertNever(o);return{status:r.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Xo.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Xo.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Xo.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Xo.toString(n))}setLimit(e,n,i,r){return new f5e({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:Xo.toString(r)}]})}_addCheck(e){return new f5e({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Xo.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Xo.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Xo.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Xo.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Xo.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Xo.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Xo.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Xo.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Xo.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&$d.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(n)&&Number.isFinite(e)}};IL.create=t=>new IL({checks:[],typeName:va.ZodNumber,coerce:t?.coerce||!1,...kc(t)});let NL=class m5e extends nu{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==ao.bigint)return this._getInvalidInput(e);let i;const r=new E9;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):$d.assertNever(o);return{status:r.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return Or(n,{code:zi.invalid_type,expected:ao.bigint,received:n.parsedType}),Js}gte(e,n){return this.setLimit("min",e,!0,Xo.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Xo.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Xo.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Xo.toString(n))}setLimit(e,n,i,r){return new m5e({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:Xo.toString(r)}]})}_addCheck(e){return new m5e({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Xo.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Xo.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Xo.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Xo.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Xo.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};NL.create=t=>new NL({checks:[],typeName:va.ZodBigInt,coerce:t?.coerce??!1,...kc(t)});let kL=class extends nu{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ao.boolean){const i=this._getOrReturnCtx(e);return Or(i,{code:zi.invalid_type,expected:ao.boolean,received:i.parsedType}),Js}return Uv(e.data)}};kL.create=t=>new kL({typeName:va.ZodBoolean,coerce:t?.coerce||!1,...kc(t)});let OL=class k0t extends nu{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ao.date){const o=this._getOrReturnCtx(e);return Or(o,{code:zi.invalid_type,expected:ao.date,received:o.parsedType}),Js}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return Or(o,{code:zi.invalid_date}),Js}const i=new E9;let r;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),i.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),i.dirty()):$d.assertNever(o);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new k0t({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Xo.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Xo.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};OL.create=t=>new OL({checks:[],coerce:t?.coerce||!1,typeName:va.ZodDate,...kc(t)});let h4e=class extends nu{_parse(e){if(this._getType(e)!==ao.symbol){const i=this._getOrReturnCtx(e);return Or(i,{code:zi.invalid_type,expected:ao.symbol,received:i.parsedType}),Js}return Uv(e.data)}};h4e.create=t=>new h4e({typeName:va.ZodSymbol,...kc(t)});let mK=class extends nu{_parse(e){if(this._getType(e)!==ao.undefined){const i=this._getOrReturnCtx(e);return Or(i,{code:zi.invalid_type,expected:ao.undefined,received:i.parsedType}),Js}return Uv(e.data)}};mK.create=t=>new mK({typeName:va.ZodUndefined,...kc(t)});let LL=class extends nu{_parse(e){if(this._getType(e)!==ao.null){const i=this._getOrReturnCtx(e);return Or(i,{code:zi.invalid_type,expected:ao.null,received:i.parsedType}),Js}return Uv(e.data)}};LL.create=t=>new LL({typeName:va.ZodNull,...kc(t)});let kR=class extends nu{constructor(){super(...arguments),this._any=!0}_parse(e){return Uv(e.data)}};kR.create=t=>new kR({typeName:va.ZodAny,...kc(t)});let F8=class extends nu{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Uv(e.data)}};F8.create=t=>new F8({typeName:va.ZodUnknown,...kc(t)});let l4=class extends nu{_parse(e){const n=this._getOrReturnCtx(e);return Or(n,{code:zi.invalid_type,expected:ao.never,received:n.parsedType}),Js}};l4.create=t=>new l4({typeName:va.ZodNever,...kc(t)});let p4e=class extends nu{_parse(e){if(this._getType(e)!==ao.undefined){const i=this._getOrReturnCtx(e);return Or(i,{code:zi.invalid_type,expected:ao.void,received:i.parsedType}),Js}return Uv(e.data)}};p4e.create=t=>new p4e({typeName:va.ZodVoid,...kc(t)});let B8=class RW extends nu{_parse(e){const{ctx:n,status:i}=this._processInputParams(e),r=this._def;if(n.parsedType!==ao.array)return Or(n,{code:zi.invalid_type,expected:ao.array,received:n.parsedType}),Js;if(r.exactLength!==null){const s=n.data.length>r.exactLength.value,a=n.data.length<r.exactLength.value;(s||a)&&(Or(n,{code:s?zi.too_big:zi.too_small,minimum:a?r.exactLength.value:void 0,maximum:s?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),i.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(Or(n,{code:zi.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),i.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(Or(n,{code:zi.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>r.type._parseAsync(new aw(n,s,n.path,a)))).then(s=>E9.mergeArray(i,s));const o=[...n.data].map((s,a)=>r.type._parseSync(new aw(n,s,n.path,a)));return E9.mergeArray(i,o)}get element(){return this._def.type}min(e,n){return new RW({...this._def,minLength:{value:e,message:Xo.toString(n)}})}max(e,n){return new RW({...this._def,maxLength:{value:e,message:Xo.toString(n)}})}length(e,n){return new RW({...this._def,exactLength:{value:e,message:Xo.toString(n)}})}nonempty(e){return this.min(1,e)}};B8.create=(t,e)=>new B8({type:t,minLength:null,maxLength:null,exactLength:null,typeName:va.ZodArray,...kc(e)});function U8(t){if(t instanceof PS){const e={};for(const n in t.shape){const i=t.shape[n];e[n]=NS.create(U8(i))}return new PS({...t._def,shape:()=>e})}else return t instanceof B8?new B8({...t._def,type:U8(t.element)}):t instanceof NS?NS.create(U8(t.unwrap())):t instanceof fT?fT.create(U8(t.unwrap())):t instanceof pT?pT.create(t.items.map(e=>U8(e))):t}let PS=class W5 extends nu{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=$d.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==ao.object){const l=this._getOrReturnCtx(e);return Or(l,{code:zi.invalid_type,expected:ao.object,received:l.parsedType}),Js}const{status:i,ctx:r}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof l4&&this._def.unknownKeys==="strip"))for(const l in r.data)s.includes(l)||a.push(l);const c=[];for(const l of s){const u=o[l],d=r.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new aw(r,d,r.path,l)),alwaysSet:l in r.data})}if(this._def.catchall instanceof l4){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of a)c.push({key:{status:"valid",value:u},value:{status:"valid",value:r.data[u]}});else if(l==="strict")a.length>0&&(Or(r,{code:zi.unrecognized_keys,keys:a}),i.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of a){const d=r.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new aw(r,d,r.path,u)),alwaysSet:u in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,h=await u.value;l.push({key:d,value:h,alwaysSet:u.alwaysSet})}return l}).then(l=>E9.mergeObjectSync(i,l)):E9.mergeObjectSync(i,c)}get shape(){return this._def.shape()}strict(e){return Xo.errToObj,new W5({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,i)=>{const r=this._def.errorMap?.(n,i).message??i.defaultError;return n.code==="unrecognized_keys"?{message:Xo.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new W5({...this._def,unknownKeys:"strip"})}passthrough(){return new W5({...this._def,unknownKeys:"passthrough"})}extend(e){return new W5({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new W5({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:va.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new W5({...this._def,catchall:e})}pick(e){const n={};for(const i of $d.objectKeys(e))e[i]&&this.shape[i]&&(n[i]=this.shape[i]);return new W5({...this._def,shape:()=>n})}omit(e){const n={};for(const i of $d.objectKeys(this.shape))e[i]||(n[i]=this.shape[i]);return new W5({...this._def,shape:()=>n})}deepPartial(){return U8(this)}partial(e){const n={};for(const i of $d.objectKeys(this.shape)){const r=this.shape[i];e&&!e[i]?n[i]=r:n[i]=r.optional()}return new W5({...this._def,shape:()=>n})}required(e){const n={};for(const i of $d.objectKeys(this.shape))if(e&&!e[i])n[i]=this.shape[i];else{let o=this.shape[i];for(;o instanceof NS;)o=o._def.innerType;n[i]=o}return new W5({...this._def,shape:()=>n})}keyof(){return _4e($d.objectKeys(this.shape))}};PS.create=(t,e)=>new PS({shape:()=>t,unknownKeys:"strip",catchall:l4.create(),typeName:va.ZodObject,...kc(e)}),PS.strictCreate=(t,e)=>new PS({shape:()=>t,unknownKeys:"strict",catchall:l4.create(),typeName:va.ZodObject,...kc(e)}),PS.lazycreate=(t,e)=>new PS({shape:t,unknownKeys:"strip",catchall:l4.create(),typeName:va.ZodObject,...kc(e)});let DL=class extends nu{_parse(e){const{ctx:n}=this._processInputParams(e),i=this._def.options;function r(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(a=>new sw(a.ctx.common.issues));return Or(n,{code:zi.invalid_union,unionErrors:s}),Js}if(n.common.async)return Promise.all(i.map(async o=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(r);{let o;const s=[];for(const c of i){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:l}),l.common.issues.length&&s.push(l.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(c=>new sw(c));return Or(n,{code:zi.invalid_union,unionErrors:a}),Js}}get options(){return this._def.options}};DL.create=(t,e)=>new DL({options:t,typeName:va.ZodUnion,...kc(e)});const IS=t=>t instanceof yK?IS(t.schema):t instanceof u4?IS(t.innerType()):t instanceof FL?[t.value]:t instanceof BL?t.options:t instanceof gK?$d.objectValues(t.enum):t instanceof UL?IS(t._def.innerType):t instanceof mK?[void 0]:t instanceof LL?[null]:t instanceof NS?[void 0,...IS(t.unwrap())]:t instanceof fT?[null,...IS(t.unwrap())]:t instanceof g4e||t instanceof jL?IS(t.unwrap()):t instanceof $L?IS(t._def.innerType):[];let z1t=class O0t extends nu{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ao.object)return Or(n,{code:zi.invalid_type,expected:ao.object,received:n.parsedType}),Js;const i=this.discriminator,r=n.data[i],o=this.optionsMap.get(r);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Or(n,{code:zi.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),Js)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,i){const r=new Map;for(const o of n){const s=IS(o.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of s){if(r.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);r.set(a,o)}}return new O0t({typeName:va.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:r,...kc(i)})}};function _K(t,e){const n=c4(t),i=c4(e);if(t===e)return{valid:!0,data:t};if(n===ao.object&&i===ao.object){const r=$d.objectKeys(e),o=$d.objectKeys(t).filter(a=>r.indexOf(a)!==-1),s={...t,...e};for(const a of o){const c=_K(t[a],e[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(n===ao.array&&i===ao.array){if(t.length!==e.length)return{valid:!1};const r=[];for(let o=0;o<t.length;o++){const s=t[o],a=e[o],c=_K(s,a);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===ao.date&&i===ao.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}let zL=class extends nu{_parse(e){const{status:n,ctx:i}=this._processInputParams(e),r=(o,s)=>{if(a4e(o)||a4e(s))return Js;const a=_K(o.value,s.value);return a.valid?((c4e(o)||c4e(s))&&n.dirty(),{status:n.value,value:a.data}):(Or(i,{code:zi.invalid_intersection_types}),Js)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([o,s])=>r(o,s)):r(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};zL.create=(t,e,n)=>new zL({left:t,right:e,typeName:va.ZodIntersection,...kc(n)});let pT=class L0t extends nu{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ao.array)return Or(i,{code:zi.invalid_type,expected:ao.array,received:i.parsedType}),Js;if(i.data.length<this._def.items.length)return Or(i,{code:zi.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Js;!this._def.rest&&i.data.length>this._def.items.length&&(Or(i,{code:zi.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...i.data].map((s,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new aw(i,s,i.path,a)):null}).filter(s=>!!s);return i.common.async?Promise.all(o).then(s=>E9.mergeArray(n,s)):E9.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new L0t({...this._def,rest:e})}};pT.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new pT({items:t,typeName:va.ZodTuple,rest:null,...kc(e)})};let F1t=class _5e extends nu{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ao.object)return Or(i,{code:zi.invalid_type,expected:ao.object,received:i.parsedType}),Js;const r=[],o=this._def.keyType,s=this._def.valueType;for(const a in i.data)r.push({key:o._parse(new aw(i,a,i.path,a)),value:s._parse(new aw(i,i.data[a],i.path,a)),alwaysSet:a in i.data});return i.common.async?E9.mergeObjectAsync(n,r):E9.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(e,n,i){return n instanceof nu?new _5e({keyType:e,valueType:n,typeName:va.ZodRecord,...kc(i)}):new _5e({keyType:NR.create(),valueType:e,typeName:va.ZodRecord,...kc(n)})}},f4e=class extends nu{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ao.map)return Or(i,{code:zi.invalid_type,expected:ao.map,received:i.parsedType}),Js;const r=this._def.keyType,o=this._def.valueType,s=[...i.data.entries()].map(([a,c],l)=>({key:r._parse(new aw(i,a,i.path,[l,"key"])),value:o._parse(new aw(i,c,i.path,[l,"value"]))}));if(i.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of s){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Js;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of s){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Js;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}}}};f4e.create=(t,e,n)=>new f4e({valueType:e,keyType:t,typeName:va.ZodMap,...kc(n)});let m4e=class y5e extends nu{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ao.set)return Or(i,{code:zi.invalid_type,expected:ao.set,received:i.parsedType}),Js;const r=this._def;r.minSize!==null&&i.data.size<r.minSize.value&&(Or(i,{code:zi.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&i.data.size>r.maxSize.value&&(Or(i,{code:zi.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());const o=this._def.valueType;function s(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Js;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const a=[...i.data.values()].map((c,l)=>o._parse(new aw(i,c,i.path,l)));return i.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(e,n){return new y5e({...this._def,minSize:{value:e,message:Xo.toString(n)}})}max(e,n){return new y5e({...this._def,maxSize:{value:e,message:Xo.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};m4e.create=(t,e)=>new m4e({valueType:t,minSize:null,maxSize:null,typeName:va.ZodSet,...kc(e)});let B1t=class PW extends nu{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ao.function)return Or(n,{code:zi.invalid_type,expected:ao.function,received:n.parsedType}),Js;function i(a,c){return pK({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,hK(),PR].filter(l=>!!l),issueData:{code:zi.invalid_arguments,argumentsError:c}})}function r(a,c){return pK({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,hK(),PR].filter(l=>!!l),issueData:{code:zi.invalid_return_type,returnTypeError:c}})}const o={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof OR){const a=this;return Uv(async function(...c){const l=new sw([]),u=await a._def.args.parseAsync(c,o).catch(f=>{throw l.addIssue(i(c,f)),l}),d=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(d,o).catch(f=>{throw l.addIssue(r(d,f)),l})})}else{const a=this;return Uv(function(...c){const l=a._def.args.safeParse(c,o);if(!l.success)throw new sw([i(c,l.error)]);const u=Reflect.apply(s,this,l.data),d=a._def.returns.safeParse(u,o);if(!d.success)throw new sw([r(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new PW({...this._def,args:pT.create(e).rest(F8.create())})}returns(e){return new PW({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,i){return new PW({args:e||pT.create([]).rest(F8.create()),returns:n||F8.create(),typeName:va.ZodFunction,...kc(i)})}},yK=class extends nu{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};yK.create=(t,e)=>new yK({getter:t,typeName:va.ZodLazy,...kc(e)});let FL=class extends nu{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Or(n,{received:n.data,code:zi.invalid_literal,expected:this._def.value}),Js}return{status:"valid",value:e.data}}get value(){return this._def.value}};FL.create=(t,e)=>new FL({value:t,typeName:va.ZodLiteral,...kc(e)});function _4e(t,e){return new BL({values:t,typeName:va.ZodEnum,...kc(e)})}let BL=class g5e extends nu{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),i=this._def.values;return Or(n,{expected:$d.joinValues(i),received:n.parsedType,code:zi.invalid_type}),Js}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),i=this._def.values;return Or(n,{received:n.data,code:zi.invalid_enum_value,options:i}),Js}return Uv(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return g5e.create(e,{...this._def,...n})}exclude(e,n=this._def){return g5e.create(this.options.filter(i=>!e.includes(i)),{...this._def,...n})}};BL.create=_4e;let gK=class extends nu{_parse(e){const n=$d.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==ao.string&&i.parsedType!==ao.number){const r=$d.objectValues(n);return Or(i,{expected:$d.joinValues(r),received:i.parsedType,code:zi.invalid_type}),Js}if(this._cache||(this._cache=new Set($d.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const r=$d.objectValues(n);return Or(i,{received:i.data,code:zi.invalid_enum_value,options:r}),Js}return Uv(e.data)}get enum(){return this._def.values}};gK.create=(t,e)=>new gK({values:t,typeName:va.ZodNativeEnum,...kc(e)});let OR=class extends nu{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ao.promise&&n.common.async===!1)return Or(n,{code:zi.invalid_type,expected:ao.promise,received:n.parsedType}),Js;const i=n.parsedType===ao.promise?n.data:Promise.resolve(n.data);return Uv(i.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}};OR.create=(t,e)=>new OR({type:t,typeName:va.ZodPromise,...kc(e)});let u4=class extends nu{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===va.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:i}=this._processInputParams(e),r=this._def.effect||null,o={addIssue:s=>{Or(i,s),s.fatal?n.abort():n.dirty()},get path(){return i.path}};if(o.addIssue=o.addIssue.bind(o),r.type==="preprocess"){const s=r.transform(i.data,o);if(i.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return Js;const c=await this._def.schema._parseAsync({data:a,path:i.path,parent:i});return c.status==="aborted"?Js:c.status==="dirty"||n.value==="dirty"?IR(c.value):c});{if(n.value==="aborted")return Js;const a=this._def.schema._parseSync({data:s,path:i.path,parent:i});return a.status==="aborted"?Js:a.status==="dirty"||n.value==="dirty"?IR(a.value):a}}if(r.type==="refinement"){const s=a=>{const c=r.refinement(a,o);if(i.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(i.common.async===!1){const a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?Js:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>a.status==="aborted"?Js:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(r.type==="transform")if(i.common.async===!1){const s=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!z8(s))return Js;const a=r.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(s=>z8(s)?Promise.resolve(r.transform(s.value,o)).then(a=>({status:n.value,value:a})):Js);$d.assertNever(r)}};u4.create=(t,e,n)=>new u4({schema:t,typeName:va.ZodEffects,effect:e,...kc(n)}),u4.createWithPreprocess=(t,e,n)=>new u4({schema:e,effect:{type:"preprocess",transform:t},typeName:va.ZodEffects,...kc(n)});let NS=class extends nu{_parse(e){return this._getType(e)===ao.undefined?Uv(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};NS.create=(t,e)=>new NS({innerType:t,typeName:va.ZodOptional,...kc(e)});let fT=class extends nu{_parse(e){return this._getType(e)===ao.null?Uv(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};fT.create=(t,e)=>new fT({innerType:t,typeName:va.ZodNullable,...kc(e)});let UL=class extends nu{_parse(e){const{ctx:n}=this._processInputParams(e);let i=n.data;return n.parsedType===ao.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};UL.create=(t,e)=>new UL({innerType:t,typeName:va.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...kc(e)});let $L=class extends nu{_parse(e){const{ctx:n}=this._processInputParams(e),i={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return PL(r)?r.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new sw(i.common.issues)},input:i.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new sw(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};$L.create=(t,e)=>new $L({innerType:t,typeName:va.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...kc(e)});let y4e=class extends nu{_parse(e){if(this._getType(e)!==ao.nan){const i=this._getOrReturnCtx(e);return Or(i,{code:zi.invalid_type,expected:ao.nan,received:i.parsedType}),Js}return{status:"valid",value:e.data}}};y4e.create=t=>new y4e({typeName:va.ZodNaN,...kc(t)});let g4e=class extends nu{_parse(e){const{ctx:n}=this._processInputParams(e),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}},U1t=class D0t extends nu{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?Js:o.status==="dirty"?(n.dirty(),IR(o.value)):this._def.out._parseAsync({data:o.value,path:i.path,parent:i})})();{const r=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return r.status==="aborted"?Js:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:i.path,parent:i})}}static create(e,n){return new D0t({in:e,out:n,typeName:va.ZodPipeline})}},jL=class extends nu{_parse(e){const n=this._def.innerType._parse(e),i=r=>(z8(r)&&(r.value=Object.freeze(r.value)),r);return PL(n)?n.then(r=>i(r)):i(n)}unwrap(){return this._def.innerType}};jL.create=(t,e)=>new jL({innerType:t,typeName:va.ZodReadonly,...kc(e)});function b4e(t,e){const n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function ly(t,e={},n){return t?kR.create().superRefine((i,r)=>{const o=t(i);if(o instanceof Promise)return o.then(s=>{if(!s){const a=b4e(e,i),c=a.fatal??n??!0;r.addIssue({code:"custom",...a,fatal:c})}});if(!o){const s=b4e(e,i),a=s.fatal??n??!0;r.addIssue({code:"custom",...s,fatal:a})}}):kR.create()}var va;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(va||(va={}));const B=NR.create,Ue=IL.create;NL.create;const bt=kL.create;OL.create;const bK=LL.create,jd=kR.create,xK=F8.create;l4.create;const Ct=B8.create,Ne=PS.create,oi=DL.create,uy=z1t.create;zL.create,pT.create;const Us=F1t.create,vK=B1t.create,Ae=FL.create,dn=BL.create,wK=OR.create;NS.create,fT.create;const x4e=u4.createWithPreprocess,v4e={string:(t=>NR.create({...t,coerce:!0})),number:(t=>IL.create({...t,coerce:!0})),boolean:(t=>kL.create({...t,coerce:!0})),bigint:(t=>NL.create({...t,coerce:!0})),date:(t=>OL.create({...t,coerce:!0}))};var w4e={Hz:{baseUnit:"Hz",variants:{MHz:1e6,kHz:1e3,Hz:1}},g:{baseUnit:"g",variants:{kg:1e3,g:1}},Ω:{baseUnit:"Ω",variants:{mΩ:.001,Ω:1,kΩ:1e3,KΩ:1e3,kohm:1e3,MΩ:1e6,GΩ:1e9,TΩ:1e12}},V:{baseUnit:"V",variants:{mV:.001,V:1,kV:1e3,KV:1e3,MV:1e6,GV:1e9,TV:1e12}},A:{baseUnit:"A",variants:{µA:1e-6,mA:.001,ma:.001,A:1,kA:1e3,MA:1e6}},F:{baseUnit:"F",variants:{pF:1e-12,nF:1e-9,µF:1e-6,uF:1e-6,mF:.001,F:1}},ml:{baseUnit:"ml",variants:{ml:1,mL:1,l:1e3,L:1e3}},deg:{baseUnit:"deg",variants:{rad:180/Math.PI}},ms:{baseUnit:"ms",variants:{s:1e3}},mm:{baseUnit:"mm",variants:{nm:1e-6,µm:.001,um:.001,mm:1,cm:10,dm:100,m:1e3,km:1e6,in:25.4,ft:304.8,IN:25.4,FT:304.8,yd:914.4,mi:1609344,mil:.0254}}},SK=new Set;for(const[t,e]of Object.entries(w4e)){SK.add(t);for(const n of Object.keys(e.variants))SK.add(n)}function $1t(t){for(const[e,n]of Object.entries(w4e))if(t in n.variants)return{baseUnit:n.baseUnit,conversionFactor:n.variants[t]};return{baseUnit:t,conversionFactor:1}}var S4e={tera:1e12,T:1e12,giga:1e9,G:1e9,mega:1e6,M:1e6,kilo:1e3,k:1e3,deci:.1,d:.1,centi:.01,c:.01,milli:.001,m:.001,micro:1e-6,u:1e-6,µ:1e-6,nano:1e-9,n:1e-9,pico:1e-12,p:1e-12},n5=t=>{if(typeof t>"u")return{parsedUnit:null,unitOfValue:null,value:null};if(typeof t=="string"&&t.match(/^-?[\d\.]+$/))return{value:Number.parseFloat(t),parsedUnit:null,unitOfValue:null};if(typeof t=="number")return{value:t,parsedUnit:null,unitOfValue:null};if(typeof t=="object"&&"x"in t&&"y"in t){const{parsedUnit:a,unitOfValue:c}=n5(t.x);return{parsedUnit:a,unitOfValue:c,value:{x:n5(t.x).value,y:n5(t.y).value}}}const n=t.toString().split("").reverse().join("").match(/[^\d\s]+/)?.[0];if(!n)throw new Error(`Could not determine unit: "${t}"`);const i=n.split("").reverse().join(""),r=t.slice(0,-i.length);if(i in S4e&&!SK.has(i)){const a=S4e[i];return{parsedUnit:null,unitOfValue:null,value:Number.parseFloat(r)*a}}const{baseUnit:o,conversionFactor:s}=$1t(i);return{parsedUnit:i,unitOfValue:o,value:s*Number.parseFloat(r)}},$8=B().or(Ue()).transform(t=>n5(t).value),j8=B().or(Ue()).transform(t=>n5(t).value).transform(t=>Number.parseFloat(t.toPrecision(12))),EK=B().or(Ue()).transform(t=>n5(t).value),$v=B().or(Ue()).transform(t=>n5(t).value),st=B().or(Ue()).transform(t=>n5(t).value),mT=B().or(Ue()).transform(t=>n5(t).value),Ft=st,j1t=B().or(Ue()).transform(t=>n5(t).value),H1t=B().or(Ue()).transform(t=>n5(t).value),u0=B().or(Ue()).transform(t=>typeof t=="number"?t:t.endsWith("deg")?Number.parseFloat(t.split("deg")[0]):t.endsWith("rad")?Number.parseFloat(t.split("rad")[0])*180/Math.PI:Number.parseFloat(t)),E4e=Ue().or(B().endsWith("mAh")).transform(t=>{if(typeof t=="string"){const e=t.replace("mAh",""),n=Number.parseFloat(e);if(Number.isNaN(n))throw new Error("Invalid capacity");return n}return t}).describe("Battery capacity in mAh"),wa=Ne({x:Ft,y:Ft}),V1t=wa,H8=Ne({x:Ft,y:Ft,z:Ft}),G1t=H8,TK=Ne({width:Ue(),height:Ue()}),Y1t=t=>{const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";return Array.from({length:t},()=>e[Math.floor(Math.random()*e.length)]).join("")},qr=t=>B().optional().default(()=>`${t}_${Y1t(10)}`),HL=dn(["top_left","top_center","top_right","center_left","center","center_right","bottom_left","bottom_center","bottom_right"]),VL=dn(["jlcpcb","macrofab","pcbway","digikey","mouser","lcsc"]),Ig=Ne({type:Ae("source_component"),ftype:B().optional(),source_component_id:B(),name:B(),manufacturer_part_number:B().optional(),supplier_part_numbers:Us(VL,Ct(B())).optional(),display_value:B().optional(),are_pins_interchangeable:bt().optional(),internally_connected_source_port_ids:Ct(Ct(B())).optional(),source_group_id:B().optional(),subcircuit_id:B().optional()}),MK=Ig.extend({ftype:Ae("simple_capacitor"),capacitance:j8,max_voltage_rating:$v.optional(),display_capacitance:B().optional(),max_decoupling_trace_length:Ft.optional()}),AK=Ig.extend({ftype:Ae("simple_resistor"),resistance:$8,display_resistance:B().optional()}),GL=Ig.extend({ftype:Ae("simple_diode")}),CK=GL.extend({ftype:Ae("simple_led"),color:B().optional(),wavelength:B().optional()}),T4e=Ig.extend({ftype:Ae("simple_ground")}),RK=Ig.extend({ftype:Ae("simple_chip")}),PK=Ig.extend({ftype:Ae("simple_power_source"),voltage:$v}),q1t=Ig.extend({ftype:Ae("simple_fuse"),current_rating_amps:Ue().describe("Nominal current in amps the fuse is rated for"),voltage_rating_volts:Ue().describe("Voltage rating in volts, e.g. ±5V would be 5")}),IK=Ig.extend({ftype:Ae("simple_battery"),capacity:E4e}),NK=Ig.extend({ftype:Ae("simple_inductor"),inductance:EK,max_current_rating:Ue().optional()}),kK=Ig.extend({ftype:Ae("simple_push_button")}),OK=Ig.extend({ftype:Ae("simple_potentiometer"),max_resistance:$8}),M4e=Ig.extend({ftype:Ae("simple_crystal"),frequency:Ue().describe("Frequency in Hz"),load_capacitance:Ue().optional().describe("Load capacitance in pF")}),LK=Ig.extend({ftype:Ae("simple_pin_header"),pin_count:Ue(),gender:dn(["male","female"]).optional().default("male")}),DK=Ig.extend({ftype:Ae("simple_pinout")}),zK=Ig.extend({ftype:Ae("simple_resonator"),load_capacitance:j8,equivalent_series_resistance:$8.optional(),frequency:mT}),FK=Ig.extend({ftype:Ae("simple_transistor"),transistor_type:dn(["npn","pnp"])}),BK=Ig.extend({ftype:Ae("simple_test_point"),footprint_variant:dn(["pad","through_hole"]).optional(),pad_shape:dn(["rect","circle"]).optional(),pad_diameter:oi([Ue(),B()]).optional(),hole_diameter:oi([Ue(),B()]).optional(),width:oi([Ue(),B()]).optional(),height:oi([Ue(),B()]).optional()}),UK=Ig.extend({ftype:Ae("simple_mosfet"),channel_type:dn(["n","p"]),mosfet_mode:dn(["enhancement","depletion"])}),$K=Ig.extend({ftype:Ae("simple_switch")}),jK=Ne({type:Ae("source_project_metadata"),name:B().optional(),software_used_string:B().optional(),project_url:B().optional(),created_at:B().datetime().optional()}),A4e=Ne({type:Ae("source_missing_property_error"),source_missing_property_error_id:qr("source_missing_property_error"),source_component_id:B(),property_name:B(),subcircuit_id:B().optional(),error_type:Ae("source_missing_property_error").default("source_missing_property_error"),message:B()}).describe("The source code is missing a property"),C4e=Ne({type:Ae("source_failed_to_create_component_error"),source_failed_to_create_component_error_id:qr("source_failed_to_create_component_error"),error_type:Ae("source_failed_to_create_component_error").default("source_failed_to_create_component_error"),component_name:B().optional(),subcircuit_id:B().optional(),parent_source_component_id:B().optional(),message:B(),pcb_center:Ne({x:Ue().optional(),y:Ue().optional()}).optional(),schematic_center:Ne({x:Ue().optional(),y:Ue().optional()}).optional()}).describe("Error emitted when a component fails to be constructed"),HK=Ne({type:Ae("source_trace_not_connected_error"),source_trace_not_connected_error_id:qr("source_trace_not_connected_error"),error_type:Ae("source_trace_not_connected_error").default("source_trace_not_connected_error"),message:B(),subcircuit_id:B().optional(),source_group_id:B().optional(),source_trace_id:B().optional(),connected_source_port_ids:Ct(B()).optional(),selectors_not_found:Ct(B()).optional()}).describe("Occurs when a source trace selector does not match any ports"),R4e=Ne({type:Ae("source_property_ignored_warning"),source_property_ignored_warning_id:qr("source_property_ignored_warning"),source_component_id:B(),property_name:B(),subcircuit_id:B().optional(),error_type:Ae("source_property_ignored_warning").default("source_property_ignored_warning"),message:B()}).describe("The source property was ignored"),VK=Ne({type:Ae("source_pin_missing_trace_warning"),source_pin_missing_trace_warning_id:qr("source_pin_missing_trace_warning"),warning_type:Ae("source_pin_missing_trace_warning").default("source_pin_missing_trace_warning"),message:B(),source_component_id:B(),source_port_id:B(),subcircuit_id:B().optional()}).describe("Warning emitted when a source component pin is missing a trace connection"),P4e=oi([AK,MK,GL,CK,T4e,RK,PK,IK,NK,kK,OK,M4e,LK,DK,zK,$K,FK,BK,UK,q1t,jK,A4e,C4e,HK,R4e,VK]),I4e=Ne({type:Ae("source_port"),pin_number:Ue().optional(),port_hints:Ct(B()).optional(),name:B(),source_port_id:B(),source_component_id:B(),subcircuit_id:B().optional(),subcircuit_connectivity_map_key:B().optional()}),N4e=Ne({type:Ae("source_trace"),source_trace_id:B(),connected_source_port_ids:Ct(B()),connected_source_net_ids:Ct(B()),subcircuit_id:B().optional(),subcircuit_connectivity_map_key:B().optional(),max_length:Ue().optional(),min_trace_thickness:Ue().optional(),display_name:B().optional()}),k4e=Ne({type:Ae("source_group"),source_group_id:B(),subcircuit_id:B().optional(),parent_subcircuit_id:B().optional(),parent_source_group_id:B().optional(),is_subcircuit:bt().optional(),show_as_schematic_box:bt().optional(),name:B().optional()}),O4e=Ne({type:Ae("source_net"),source_net_id:B(),name:B(),member_source_group_ids:Ct(B()),is_power:bt().optional(),is_ground:bt().optional(),is_digital_signal:bt().optional(),is_analog_signal:bt().optional(),is_positive_voltage_source:bt().optional(),trace_width:Ue().optional(),subcircuit_id:B().optional(),subcircuit_connectivity_map_key:B().optional()}),L4e=Ne({type:Ae("source_pcb_ground_plane"),source_pcb_ground_plane_id:B(),source_group_id:B(),source_net_id:B(),subcircuit_id:B().optional()}).describe("Defines a ground plane in the source domain"),LR=["top","bottom","inner1","inner2","inner3","inner4","inner5","inner6"],GK=dn(LR),Xc=GK.or(Ne({name:GK})).transform(t=>typeof t=="string"?t:t.name),V8=dn(["top","bottom"]),D4e=Ne({type:Ae("source_manually_placed_via"),source_manually_placed_via_id:B(),source_group_id:B(),source_net_id:B(),subcircuit_id:B().optional(),source_trace_id:B().optional()}).describe("Defines a via that is manually placed in the source domain"),z4e=Ne({type:Ae("schematic_box"),schematic_component_id:B().optional(),width:Ft,height:Ft,is_dashed:bt().default(!1),x:Ft,y:Ft,subcircuit_id:B().optional()}).describe("Draws a box on the schematic"),F4e=Ne({type:Ae("schematic_path"),schematic_component_id:B(),fill_color:dn(["red","blue"]).optional(),is_filled:bt().optional(),points:Ct(wa),subcircuit_id:B().optional()}),B4e=Us(Ne({left_margin:st.optional(),right_margin:st.optional(),top_margin:st.optional(),bottom_margin:st.optional()})),U4e=Ne({left_size:Ue(),right_size:Ue(),top_size:Ue().optional(),bottom_size:Ue().optional()}),$4e=Ne({left_side:Ne({pins:Ct(Ue()),direction:dn(["top-to-bottom","bottom-to-top"]).optional()}).optional(),right_side:Ne({pins:Ct(Ue()),direction:dn(["top-to-bottom","bottom-to-top"]).optional()}).optional(),top_side:Ne({pins:Ct(Ue()),direction:dn(["left-to-right","right-to-left"]).optional()}).optional(),bottom_side:Ne({pins:Ct(Ue()),direction:dn(["left-to-right","right-to-left"]).optional()}).optional()}),j4e=oi([U4e,$4e]),H4e=Ne({type:Ae("schematic_component"),size:TK,center:wa,source_component_id:B().optional(),schematic_component_id:B(),pin_spacing:st.optional(),pin_styles:B4e.optional(),box_width:st.optional(),symbol_name:B().optional(),port_arrangement:j4e.optional(),port_labels:Us(B()).optional(),symbol_display_value:B().optional(),subcircuit_id:B().optional(),schematic_group_id:B().optional(),is_schematic_group:bt().optional(),source_group_id:B().optional(),is_box_with_pins:bt().optional().default(!0)}),V4e=Ne({type:Ae("schematic_line"),schematic_line_id:qr("schematic_line"),schematic_component_id:B(),x1:Ft,y1:Ft,x2:Ft,y2:Ft,stroke_width:Ft.nullable().optional(),color:B().default("#000000"),is_dashed:bt().default(!1),subcircuit_id:B().optional()}).describe("Draws a styled line on the schematic"),G4e=Ne({type:Ae("schematic_rect"),schematic_rect_id:qr("schematic_rect"),schematic_component_id:B(),center:wa,width:Ft,height:Ft,rotation:u0.default(0),stroke_width:Ft.nullable().optional(),color:B().default("#000000"),is_filled:bt().default(!1),fill_color:B().optional(),is_dashed:bt().default(!1),subcircuit_id:B().optional()}).describe("Draws a styled rectangle on the schematic"),Y4e=Ne({type:Ae("schematic_circle"),schematic_circle_id:qr("schematic_circle"),schematic_component_id:B(),center:wa,radius:Ft,stroke_width:Ft.nullable().optional(),color:B().default("#000000"),is_filled:bt().default(!1),fill_color:B().optional(),is_dashed:bt().default(!1),subcircuit_id:B().optional()}).describe("Draws a styled circle on the schematic"),q4e=Ne({type:Ae("schematic_arc"),schematic_arc_id:qr("schematic_arc"),schematic_component_id:B(),center:wa,radius:Ft,start_angle_degrees:u0,end_angle_degrees:u0,direction:dn(["clockwise","counterclockwise"]).default("counterclockwise"),stroke_width:Ft.nullable().optional(),color:B().default("#000000"),is_dashed:bt().default(!1),subcircuit_id:B().optional()}).describe("Draws a styled arc on the schematic"),X4e=Ne({type:Ae("schematic_trace"),schematic_trace_id:B(),source_trace_id:B().optional(),junctions:Ct(Ne({x:Ue(),y:Ue()})),edges:Ct(Ne({from:Ne({x:Ue(),y:Ue()}),to:Ne({x:Ue(),y:Ue()}),is_crossing:bt().optional(),from_schematic_port_id:B().optional(),to_schematic_port_id:B().optional()})),subcircuit_id:B().optional(),subcircuit_connectivity_map_key:B().optional()}),X1t=dn(["center","left","right","top","bottom"]),W4e=Ne({type:Ae("schematic_text"),schematic_component_id:B().optional(),schematic_text_id:B(),text:B(),font_size:Ue().default(.18),position:Ne({x:Ft,y:Ft}),rotation:Ue().default(0),anchor:oi([X1t.describe("legacy"),HL]).default("center"),color:B().default("#000000"),subcircuit_id:B().optional()}),Z4e=Ne({type:Ae("schematic_port"),schematic_port_id:B(),source_port_id:B(),schematic_component_id:B().optional(),center:wa,facing_direction:dn(["up","down","left","right"]).optional(),distance_from_component_edge:Ue().optional(),side_of_component:dn(["top","bottom","left","right"]).optional(),true_ccw_index:Ue().optional(),pin_number:Ue().optional(),display_pin_label:B().optional(),subcircuit_id:B().optional(),is_connected:bt().optional(),has_input_arrow:bt().optional(),has_output_arrow:bt().optional()}).describe("Defines a port on a schematic component"),K4e=Ne({type:Ae("schematic_net_label"),schematic_net_label_id:qr("schematic_net_label"),schematic_trace_id:B().optional(),source_trace_id:B().optional(),source_net_id:B(),center:wa,anchor_position:wa.optional(),anchor_side:dn(["top","bottom","left","right"]),text:B(),symbol_name:B().optional(),is_movable:bt().optional(),subcircuit_id:B().optional()}),Q4e=Ne({type:Ae("schematic_error"),schematic_error_id:B(),error_type:Ae("schematic_port_not_found").default("schematic_port_not_found"),message:B(),subcircuit_id:B().optional()}).describe("Defines a schematic error on the schematic"),J4e=Ne({type:Ae("schematic_layout_error"),schematic_layout_error_id:qr("schematic_layout_error"),error_type:Ae("schematic_layout_error").default("schematic_layout_error"),message:B(),source_group_id:B(),schematic_group_id:B(),subcircuit_id:B().optional()}).describe("Error emitted when schematic layout fails for a group"),YL=Ne({type:Ae("schematic_debug_object"),label:B().optional(),subcircuit_id:B().optional()}),eEe=YL.extend({shape:Ae("rect"),center:wa,size:TK}),tEe=YL.extend({shape:Ae("line"),start:wa,end:wa}),nEe=YL.extend({shape:Ae("point"),center:wa}),iEe=uy("shape",[eEe,tEe,nEe]),rEe=Ne({type:Ae("schematic_voltage_probe"),schematic_voltage_probe_id:B(),position:wa,schematic_trace_id:B(),voltage:$v.optional(),subcircuit_id:B().optional()}).describe("Defines a voltage probe measurement point on a schematic trace"),YK=Ne({type:Ae("schematic_manual_edit_conflict_warning"),schematic_manual_edit_conflict_warning_id:qr("schematic_manual_edit_conflict_warning"),warning_type:Ae("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),message:B(),schematic_component_id:B(),schematic_group_id:B().optional(),subcircuit_id:B().optional(),source_component_id:B()}).describe("Warning emitted when a component has both manual placement and explicit schX/schY coordinates"),oEe=Ne({type:Ae("schematic_group"),schematic_group_id:qr("schematic_group"),source_group_id:B(),is_subcircuit:bt().optional(),subcircuit_id:B().optional(),width:st,height:st,center:wa,schematic_component_ids:Ct(B()),show_as_schematic_box:bt().optional(),name:B().optional(),description:B().optional()}).describe("Defines a group of components on the schematic"),sEe=Ne({type:Ae("schematic_table"),schematic_table_id:qr("schematic_table"),anchor_position:wa,column_widths:Ct(Ft),row_heights:Ct(Ft),cell_padding:Ft.optional(),border_width:Ft.optional(),subcircuit_id:B().optional(),schematic_component_id:B().optional(),anchor:HL.optional()}).describe("Defines a table on the schematic"),aEe=Ne({type:Ae("schematic_table_cell"),schematic_table_cell_id:qr("schematic_table_cell"),schematic_table_id:B(),start_row_index:Ue(),end_row_index:Ue(),start_column_index:Ue(),end_column_index:Ue(),text:B().optional(),center:wa,width:Ft,height:Ft,horizontal_align:dn(["left","center","right"]).optional(),vertical_align:dn(["top","middle","bottom"]).optional(),font_size:Ft.optional(),subcircuit_id:B().optional()}).describe("Defines a cell within a schematic_table"),cEe=Ne({x:Ft,y:Ft,bulge:Ue().optional()}),qK=Ne({vertices:Ct(cEe)}),lEe=Ne({outer_ring:qK,inner_rings:Ct(qK).default([])}),uEe=Ne({x:Ft,y:Ft,via:bt().optional(),via_to_layer:Xc.optional()}),W1t=Ct(uEe),kS=Ne({x:Ft,y:Ft,via:bt().optional(),to_layer:Xc.optional(),trace_width:Ft.optional()}),dEe=Ne({type:Ae("pcb_component"),pcb_component_id:qr("pcb_component"),source_component_id:B(),center:wa,layer:Xc,rotation:u0,width:st,height:st,subcircuit_id:B().optional(),pcb_group_id:B().optional()}).describe("Defines a component on the PCB"),hEe=Ne({type:Ae("pcb_hole"),pcb_hole_id:qr("pcb_hole"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),hole_shape:dn(["circle","square"]),hole_diameter:Ue(),x:Ft,y:Ft}),Z1t=hEe.describe("Defines a circular or square hole on the PCB"),pEe=Ne({type:Ae("pcb_hole"),pcb_hole_id:qr("pcb_hole"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),hole_shape:Ae("oval"),hole_width:Ue(),hole_height:Ue(),x:Ft,y:Ft}),K1t=pEe.describe("Defines an oval hole on the PCB"),fEe=hEe.or(pEe),Q1t=Ne({type:Ae("pcb_plated_hole"),shape:Ae("circle"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),outer_diameter:Ue(),hole_diameter:Ue(),x:Ft,y:Ft,layers:Ct(Xc),port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),pcb_plated_hole_id:qr("pcb_plated_hole")}),J1t=Ne({type:Ae("pcb_plated_hole"),shape:dn(["oval","pill"]),pcb_group_id:B().optional(),subcircuit_id:B().optional(),outer_width:Ue(),outer_height:Ue(),hole_width:Ue(),hole_height:Ue(),x:Ft,y:Ft,ccw_rotation:u0,layers:Ct(Xc),port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),pcb_plated_hole_id:qr("pcb_plated_hole")}),ebt=Ne({type:Ae("pcb_plated_hole"),shape:Ae("circular_hole_with_rect_pad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),hole_shape:Ae("circle"),pad_shape:Ae("rect"),hole_diameter:Ue(),rect_pad_width:Ue(),rect_pad_height:Ue(),rect_border_radius:Ue().optional(),hole_offset_x:Ft.default(0),hole_offset_y:Ft.default(0),x:Ft,y:Ft,layers:Ct(Xc),port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),pcb_plated_hole_id:qr("pcb_plated_hole")}),tbt=Ne({type:Ae("pcb_plated_hole"),shape:Ae("pill_hole_with_rect_pad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),hole_shape:Ae("pill"),pad_shape:Ae("rect"),hole_width:Ue(),hole_height:Ue(),rect_pad_width:Ue(),rect_pad_height:Ue(),rect_border_radius:Ue().optional(),hole_offset_x:Ft.default(0),hole_offset_y:Ft.default(0),x:Ft,y:Ft,layers:Ct(Xc),port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),pcb_plated_hole_id:qr("pcb_plated_hole")}),nbt=Ne({type:Ae("pcb_plated_hole"),shape:Ae("rotated_pill_hole_with_rect_pad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),hole_shape:Ae("rotated_pill"),pad_shape:Ae("rect"),hole_width:Ue(),hole_height:Ue(),hole_ccw_rotation:u0,rect_pad_width:Ue(),rect_pad_height:Ue(),rect_border_radius:Ue().optional(),rect_ccw_rotation:u0,hole_offset_x:Ft.default(0),hole_offset_y:Ft.default(0),x:Ft,y:Ft,layers:Ct(Xc),port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),pcb_plated_hole_id:qr("pcb_plated_hole")}),mEe=oi([Q1t,J1t,ebt,tbt,nbt]),_Ee=Ne({type:Ae("pcb_port"),pcb_port_id:qr("pcb_port"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),source_port_id:B(),pcb_component_id:B(),x:Ft,y:Ft,layers:Ct(Xc),is_board_pinout:bt().optional()}).describe("Defines a port on the PCB"),ibt=Ne({type:Ae("pcb_smtpad"),shape:Ae("circle"),pcb_smtpad_id:qr("pcb_smtpad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,radius:Ue(),layer:Xc,port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),is_covered_with_solder_mask:bt().optional()}),rbt=Ne({type:Ae("pcb_smtpad"),shape:Ae("rect"),pcb_smtpad_id:qr("pcb_smtpad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),rect_border_radius:Ue().optional(),layer:Xc,port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),is_covered_with_solder_mask:bt().optional()}),obt=Ne({type:Ae("pcb_smtpad"),shape:Ae("rotated_rect"),pcb_smtpad_id:qr("pcb_smtpad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),rect_border_radius:Ue().optional(),ccw_rotation:u0,layer:Xc,port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),is_covered_with_solder_mask:bt().optional()}),yEe=Ne({type:Ae("pcb_smtpad"),shape:Ae("pill"),pcb_smtpad_id:qr("pcb_smtpad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),radius:Ue(),layer:Xc,port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),is_covered_with_solder_mask:bt().optional()}),sbt=Ne({type:Ae("pcb_smtpad"),shape:Ae("rotated_pill"),pcb_smtpad_id:qr("pcb_smtpad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),radius:Ue(),ccw_rotation:u0,layer:Xc,port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),is_covered_with_solder_mask:bt().optional()}),abt=Ne({type:Ae("pcb_smtpad"),shape:Ae("polygon"),pcb_smtpad_id:qr("pcb_smtpad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),points:Ct(wa),layer:Xc,port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),is_covered_with_solder_mask:bt().optional()}),gEe=uy("shape",[ibt,rbt,obt,sbt,yEe,abt]).describe("Defines an SMT pad on the PCB"),cbt=Ne({type:Ae("pcb_solder_paste"),shape:Ae("circle"),pcb_solder_paste_id:qr("pcb_solder_paste"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,radius:Ue(),layer:Xc,pcb_component_id:B().optional(),pcb_smtpad_id:B().optional()}),lbt=Ne({type:Ae("pcb_solder_paste"),shape:Ae("rect"),pcb_solder_paste_id:qr("pcb_solder_paste"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),layer:Xc,pcb_component_id:B().optional(),pcb_smtpad_id:B().optional()}),ubt=Ne({type:Ae("pcb_solder_paste"),shape:Ae("pill"),pcb_solder_paste_id:qr("pcb_solder_paste"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),radius:Ue(),layer:Xc,pcb_component_id:B().optional(),pcb_smtpad_id:B().optional()}),dbt=Ne({type:Ae("pcb_solder_paste"),shape:Ae("rotated_rect"),pcb_solder_paste_id:qr("pcb_solder_paste"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),ccw_rotation:Ft,layer:Xc,pcb_component_id:B().optional(),pcb_smtpad_id:B().optional()}),hbt=Ne({type:Ae("pcb_solder_paste"),shape:Ae("oval"),pcb_solder_paste_id:qr("pcb_solder_paste"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),layer:Xc,pcb_component_id:B().optional(),pcb_smtpad_id:B().optional()}),bEe=oi([cbt,lbt,ubt,dbt,hbt]).describe("Defines solderpaste on the PCB"),xEe=Ne({type:Ae("pcb_text"),pcb_text_id:qr("pcb_text"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),text:B(),center:wa,layer:Xc,width:st,height:st,lines:Ue(),align:dn(["bottom-left"])}).describe("Defines text on the PCB"),vEe=Ne({route_type:Ae("wire"),x:Ft,y:Ft,width:Ft,start_pcb_port_id:B().optional(),end_pcb_port_id:B().optional(),layer:Xc}),wEe=Ne({route_type:Ae("via"),x:Ft,y:Ft,hole_diameter:Ft.optional(),outer_diameter:Ft.optional(),from_layer:B(),to_layer:B()}),XK=oi([vEe,wEe]),SEe=Ne({type:Ae("pcb_trace"),source_trace_id:B().optional(),pcb_component_id:B().optional(),pcb_trace_id:qr("pcb_trace"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),route_thickness_mode:dn(["constant","interpolated"]).default("constant").optional(),route_order_index:Ue().optional(),should_round_corners:bt().optional(),trace_length:Ue().optional(),rats_nest_color:B().optional(),route:Ct(XK)}).describe("Defines a trace on the PCB"),EEe=Ne({type:Ae("pcb_trace_error"),pcb_trace_error_id:qr("pcb_trace_error"),error_type:Ae("pcb_trace_error").default("pcb_trace_error"),message:B(),center:wa.optional(),pcb_trace_id:B(),source_trace_id:B(),pcb_component_ids:Ct(B()),pcb_port_ids:Ct(B()),subcircuit_id:B().optional()}).describe("Defines a trace error on the PCB"),TEe=Ne({type:Ae("pcb_trace_missing_error"),pcb_trace_missing_error_id:qr("pcb_trace_missing_error"),error_type:Ae("pcb_trace_missing_error").default("pcb_trace_missing_error"),message:B(),center:wa.optional(),source_trace_id:B(),pcb_component_ids:Ct(B()),pcb_port_ids:Ct(B()),subcircuit_id:B().optional()}).describe("Defines an error when a source trace has no corresponding PCB trace"),MEe=Ne({type:Ae("pcb_port_not_matched_error"),pcb_error_id:qr("pcb_error"),error_type:Ae("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),message:B(),pcb_component_ids:Ct(B()),subcircuit_id:B().optional()}).describe("Defines a trace error on the PCB where a port is not matched"),AEe=Ne({type:Ae("pcb_port_not_connected_error"),pcb_port_not_connected_error_id:qr("pcb_port_not_connected_error"),error_type:Ae("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),message:B(),pcb_port_ids:Ct(B()),pcb_component_ids:Ct(B()),subcircuit_id:B().optional()}).describe("Defines an error when a pcb port is not connected to any trace"),CEe=Ne({type:Ae("pcb_net"),pcb_net_id:qr("pcb_net"),source_net_id:B().optional(),rats_nest_color:B().optional()}).describe("Defines a net on the PCB"),REe=Ne({type:Ae("pcb_via"),pcb_via_id:qr("pcb_via"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,outer_diameter:Ft.default("0.6mm"),hole_diameter:Ft.default("0.25mm"),from_layer:Xc.optional(),to_layer:Xc.optional(),layers:Ct(Xc),pcb_trace_id:B().optional()}).describe("Defines a via on the PCB"),PEe=Ne({type:Ae("pcb_board"),pcb_board_id:qr("pcb_board"),is_subcircuit:bt().optional(),subcircuit_id:B().optional(),width:st,height:st,center:wa,thickness:st.optional().default(1.4),num_layers:Ue().optional().default(4),outline:Ct(wa).optional(),material:dn(["fr4","fr1"]).default("fr4")}).describe("Defines the board outline of the PCB"),IEe=Ne({type:Ae("pcb_placement_error"),pcb_placement_error_id:qr("pcb_placement_error"),error_type:Ae("pcb_placement_error").default("pcb_placement_error"),message:B(),subcircuit_id:B().optional()}).describe("Defines a placement error on the PCB"),NEe=Ne({type:Ae("pcb_trace_hint"),pcb_trace_hint_id:qr("pcb_trace_hint"),pcb_port_id:B(),pcb_component_id:B(),route:Ct(kS),subcircuit_id:B().optional()}).describe("A hint that can be used during generation of a PCB trace"),kEe=Ne({type:Ae("pcb_silkscreen_line"),pcb_silkscreen_line_id:qr("pcb_silkscreen_line"),pcb_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),stroke_width:Ft.default("0.1mm"),x1:Ft,y1:Ft,x2:Ft,y2:Ft,layer:V8}).describe("Defines a silkscreen line on the PCB"),OEe=Ne({type:Ae("pcb_silkscreen_path"),pcb_silkscreen_path_id:qr("pcb_silkscreen_path"),pcb_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),layer:V8,route:Ct(wa),stroke_width:st}).describe("Defines a silkscreen path on the PCB"),LEe=Ne({type:Ae("pcb_silkscreen_text"),pcb_silkscreen_text_id:qr("pcb_silkscreen_text"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),font:Ae("tscircuit2024").default("tscircuit2024"),font_size:Ft.default("0.2mm"),pcb_component_id:B(),text:B(),is_knockout:bt().default(!1).optional(),knockout_padding:Ne({left:st,top:st,bottom:st,right:st}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:Ue().optional(),layer:Xc,is_mirrored:bt().default(!1).optional(),anchor_position:wa.default({x:0,y:0}),anchor_alignment:HL.default("center")}).describe("Defines silkscreen text on the PCB"),DEe=Ne({type:Ae("pcb_silkscreen_rect"),pcb_silkscreen_rect_id:qr("pcb_silkscreen_rect"),pcb_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),center:wa,width:st,height:st,layer:Xc,stroke_width:st.default("1mm"),is_filled:bt().default(!0).optional(),has_stroke:bt().optional(),is_stroke_dashed:bt().optional()}).describe("Defines a silkscreen rect on the PCB"),zEe=Ne({type:Ae("pcb_silkscreen_circle"),pcb_silkscreen_circle_id:qr("pcb_silkscreen_circle"),pcb_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),center:wa,radius:st,layer:V8,stroke_width:st.default("1mm")}).describe("Defines a silkscreen circle on the PCB"),FEe=Ne({type:Ae("pcb_silkscreen_oval"),pcb_silkscreen_oval_id:qr("pcb_silkscreen_oval"),pcb_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),center:wa,radius_x:Ft,radius_y:Ft,layer:V8}).describe("Defines a silkscreen oval on the PCB"),BEe=Ne({type:Ae("pcb_fabrication_note_text"),pcb_fabrication_note_text_id:qr("pcb_fabrication_note_text"),subcircuit_id:B().optional(),pcb_group_id:B().optional(),font:Ae("tscircuit2024").default("tscircuit2024"),font_size:Ft.default("1mm"),pcb_component_id:B(),text:B(),layer:V8,anchor_position:wa.default({x:0,y:0}),anchor_alignment:dn(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),color:B().optional()}).describe("Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"),UEe=Ne({type:Ae("pcb_fabrication_note_path"),pcb_fabrication_note_path_id:qr("pcb_fabrication_note_path"),pcb_component_id:B(),subcircuit_id:B().optional(),layer:Xc,route:Ct(wa),stroke_width:st,color:B().optional()}).describe("Defines a fabrication path on the PCB for fabricators or assemblers"),$Ee=Ne({type:Ae("pcb_footprint_overlap_error"),pcb_error_id:qr("pcb_error"),error_type:Ae("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),message:B(),pcb_smtpad_ids:Ct(B()).optional(),pcb_plated_hole_ids:Ct(B()).optional(),pcb_hole_ids:Ct(B()).optional(),pcb_keepout_ids:Ct(B()).optional()}).describe("Error emitted when a pcb footprint overlaps with another element"),jEe=Ne({type:Ae("pcb_keepout"),shape:Ae("rect"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),center:wa,width:Ft,height:Ft,pcb_keepout_id:B(),layers:Ct(B()),description:B().optional()}).or(Ne({type:Ae("pcb_keepout"),shape:Ae("circle"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),center:wa,radius:Ft,pcb_keepout_id:B(),layers:Ct(B()),description:B().optional()})),WK=Ne({type:Ae("pcb_cutout"),pcb_cutout_id:qr("pcb_cutout"),pcb_group_id:B().optional(),subcircuit_id:B().optional()}),HEe=WK.extend({shape:Ae("rect"),center:wa,width:st,height:st,rotation:u0.optional()}),VEe=WK.extend({shape:Ae("circle"),center:wa,radius:st}),GEe=WK.extend({shape:Ae("polygon"),points:Ct(wa)}),YEe=uy("shape",[HEe,VEe,GEe]).describe("Defines a cutout on the PCB, removing board material."),qEe=Ne({type:Ae("pcb_missing_footprint_error"),pcb_missing_footprint_error_id:qr("pcb_missing_footprint_error"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),error_type:Ae("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),source_component_id:B(),message:B()}).describe("Defines a missing footprint error on the PCB"),qL=Ne({type:Ae("external_footprint_load_error"),external_footprint_load_error_id:qr("external_footprint_load_error"),pcb_component_id:B(),source_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),footprinter_string:B().optional(),error_type:Ae("external_footprint_load_error").default("external_footprint_load_error"),message:B()}).describe("Defines an error when an external footprint fails to load"),ZK=Ne({type:Ae("circuit_json_footprint_load_error"),circuit_json_footprint_load_error_id:qr("circuit_json_footprint_load_error"),pcb_component_id:B(),source_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),error_type:Ae("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),message:B(),circuit_json:Ct(jd()).optional()}).describe("Defines an error when a circuit JSON footprint fails to load"),XEe=Ne({type:Ae("pcb_group"),pcb_group_id:qr("pcb_group"),source_group_id:B(),is_subcircuit:bt().optional(),subcircuit_id:B().optional(),width:st,height:st,center:wa,pcb_component_ids:Ct(B()),name:B().optional(),description:B().optional(),layout_mode:B().optional(),autorouter_configuration:Ne({trace_clearance:st}).optional(),autorouter_used_string:B().optional()}).describe("Defines a group of components on the PCB"),WEe=Ne({type:Ae("pcb_autorouting_error"),pcb_error_id:qr("pcb_autorouting_error"),error_type:Ae("pcb_autorouting_error").default("pcb_autorouting_error"),message:B(),subcircuit_id:B().optional()}).describe("The autorouting has failed to route a portion of the board"),KK=Ne({type:Ae("pcb_manual_edit_conflict_warning"),pcb_manual_edit_conflict_warning_id:qr("pcb_manual_edit_conflict_warning"),warning_type:Ae("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),message:B(),pcb_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),source_component_id:B()}).describe("Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"),ZEe=Ne({type:Ae("pcb_breakout_point"),pcb_breakout_point_id:qr("pcb_breakout_point"),pcb_group_id:B(),subcircuit_id:B().optional(),source_trace_id:B().optional(),source_port_id:B().optional(),source_net_id:B().optional(),x:Ft,y:Ft}).describe("Defines a routing target within a pcb_group for a source_trace or source_net"),KEe=Ne({type:Ae("pcb_ground_plane"),pcb_ground_plane_id:qr("pcb_ground_plane"),source_pcb_ground_plane_id:B(),source_net_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional()}).describe("Defines a ground plane on the PCB"),QEe=Ne({type:Ae("pcb_ground_plane_region"),pcb_ground_plane_region_id:qr("pcb_ground_plane_region"),pcb_ground_plane_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),layer:Xc,points:Ct(wa)}).describe("Defines a polygon region of a ground plane"),JEe=Ne({type:Ae("pcb_thermal_spoke"),pcb_thermal_spoke_id:qr("pcb_thermal_spoke"),pcb_ground_plane_id:B(),shape:B(),spoke_count:Ue(),spoke_thickness:Ft,spoke_inner_diameter:Ft,spoke_outer_diameter:Ft,pcb_plated_hole_id:B().optional(),subcircuit_id:B().optional()}).describe("Pattern for connecting a ground plane to a plated hole"),QK=Ne({type:Ae("pcb_copper_pour"),pcb_copper_pour_id:qr("pcb_copper_pour"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),layer:Xc,source_net_id:B().optional()}),eTe=QK.extend({shape:Ae("rect"),center:wa,width:st,height:st,rotation:u0.optional()}),tTe=QK.extend({shape:Ae("brep"),brep_shape:lEe}),nTe=QK.extend({shape:Ae("polygon"),points:Ct(wa)}),iTe=uy("shape",[eTe,tTe,nTe]).describe("Defines a copper pour on the PCB."),rTe=Ne({type:Ae("pcb_component_outside_board_error"),pcb_component_outside_board_error_id:qr("pcb_component_outside_board_error"),error_type:Ae("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),message:B(),pcb_component_id:B(),pcb_board_id:B(),component_center:wa,component_bounds:Ne({min_x:Ue(),max_x:Ue(),min_y:Ue(),max_y:Ue()}),subcircuit_id:B().optional(),source_component_id:B().optional()}).describe("Error emitted when a PCB component is placed outside the board boundaries"),oTe=Ne({type:Ae("cad_component"),cad_component_id:B(),pcb_component_id:B(),source_component_id:B(),position:H8,rotation:H8.optional(),size:H8.optional(),layer:Xc.optional(),subcircuit_id:B().optional(),footprinter_string:B().optional(),model_obj_url:B().optional(),model_stl_url:B().optional(),model_3mf_url:B().optional(),model_gltf_url:B().optional(),model_glb_url:B().optional(),model_step_url:B().optional(),model_wrl_url:B().optional(),model_unit_to_mm_scale_factor:Ue().optional(),model_jscad:jd().optional()}).describe("Defines a component on the PCB"),sTe=dn(["sinewave","square","triangle","sawtooth"]),pbt=oi([B(),Ue()]).transform(t=>typeof t=="string"?t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(Ue().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),aTe=Ne({type:Ae("simulation_voltage_source"),simulation_voltage_source_id:qr("simulation_voltage_source"),is_dc_source:Ae(!0).optional().default(!0),positive_source_port_id:B().optional(),negative_source_port_id:B().optional(),positive_source_net_id:B().optional(),negative_source_net_id:B().optional(),voltage:$v}).describe("Defines a DC voltage source for simulation"),cTe=Ne({type:Ae("simulation_voltage_source"),simulation_voltage_source_id:qr("simulation_voltage_source"),is_dc_source:Ae(!1),terminal1_source_port_id:B().optional(),terminal2_source_port_id:B().optional(),terminal1_source_net_id:B().optional(),terminal2_source_net_id:B().optional(),voltage:$v.optional(),frequency:mT.optional(),peak_to_peak_voltage:$v.optional(),wave_shape:sTe.optional(),phase:u0.optional(),duty_cycle:pbt.optional()}).describe("Defines an AC voltage source for simulation"),lTe=oi([aTe,cTe]).describe("Defines a voltage source for simulation"),uTe=oi([N4e,I4e,P4e,O4e,k4e,RK,MK,GL,CK,AK,PK,IK,NK,LK,DK,zK,$K,FK,BK,UK,OK,kK,L4e,D4e,jK,HK,VK,dEe,fEe,qEe,qL,ZK,KK,mEe,jEe,_Ee,CEe,xEe,SEe,REe,gEe,bEe,PEe,XEe,NEe,kEe,OEe,LEe,DEe,zEe,FEe,EEe,TEe,IEe,MEe,AEe,UEe,BEe,WEe,$Ee,ZEe,YEe,KEe,QEe,JEe,iTe,rTe,z4e,W4e,V4e,G4e,Y4e,q4e,H4e,Z4e,X4e,F4e,Q4e,J4e,K4e,iEe,rEe,YK,oEe,sEe,aEe,oTe,lTe]),XL=uTe;const JK=Object.freeze(Object.defineProperty({__proto__:null,all_layers:LR,any_circuit_element:uTe,any_soup_element:XL,any_source_component:P4e,battery_capacity:E4e,brep_shape:lEe,cad_component:oTe,capacitance:j8,circuit_json_footprint_load_error:ZK,current:j1t,distance:Ft,external_footprint_load_error:qL,frequency:mT,getZodPrefixedIdWithDefault:qr,inductance:EK,layer_ref:Xc,layer_string:GK,length:st,ninePointAnchor:HL,pcb_autorouting_error:WEe,pcb_board:PEe,pcb_breakout_point:ZEe,pcb_component:dEe,pcb_component_outside_board_error:rTe,pcb_copper_pour:iTe,pcb_copper_pour_brep:tTe,pcb_copper_pour_polygon:nTe,pcb_copper_pour_rect:eTe,pcb_cutout:YEe,pcb_cutout_circle:VEe,pcb_cutout_polygon:GEe,pcb_cutout_rect:HEe,pcb_fabrication_note_path:UEe,pcb_fabrication_note_text:BEe,pcb_footprint_overlap_error:$Ee,pcb_ground_plane:KEe,pcb_ground_plane_region:QEe,pcb_group:XEe,pcb_hole:fEe,pcb_hole_circle_or_square_shape:Z1t,pcb_hole_oval_shape:K1t,pcb_keepout:jEe,pcb_manual_edit_conflict_warning:KK,pcb_missing_footprint_error:qEe,pcb_net:CEe,pcb_placement_error:IEe,pcb_plated_hole:mEe,pcb_port:_Ee,pcb_port_not_connected_error:AEe,pcb_port_not_matched_error:MEe,pcb_route_hint:uEe,pcb_route_hints:W1t,pcb_silkscreen_circle:zEe,pcb_silkscreen_line:kEe,pcb_silkscreen_oval:FEe,pcb_silkscreen_path:OEe,pcb_silkscreen_rect:DEe,pcb_silkscreen_text:LEe,pcb_smtpad:gEe,pcb_smtpad_pill:yEe,pcb_solder_paste:bEe,pcb_text:xEe,pcb_thermal_spoke:JEe,pcb_trace:SEe,pcb_trace_error:EEe,pcb_trace_hint:NEe,pcb_trace_missing_error:TEe,pcb_trace_route_point:XK,pcb_trace_route_point_via:wEe,pcb_trace_route_point_wire:vEe,pcb_via:REe,point:wa,point3:H8,point_with_bulge:cEe,port_arrangement:j4e,position:V1t,position3:G1t,resistance:$8,ring:qK,rotation:u0,route_hint_point:kS,schematic_arc:q4e,schematic_box:z4e,schematic_circle:Y4e,schematic_component:H4e,schematic_component_port_arrangement_by_sides:$4e,schematic_component_port_arrangement_by_size:U4e,schematic_debug_line:tEe,schematic_debug_object:iEe,schematic_debug_object_base:YL,schematic_debug_point:nEe,schematic_debug_rect:eEe,schematic_error:Q4e,schematic_group:oEe,schematic_layout_error:J4e,schematic_line:V4e,schematic_manual_edit_conflict_warning:YK,schematic_net_label:K4e,schematic_path:F4e,schematic_pin_styles:B4e,schematic_port:Z4e,schematic_rect:G4e,schematic_table:sEe,schematic_table_cell:aEe,schematic_text:W4e,schematic_trace:X4e,schematic_voltage_probe:rEe,simulation_ac_voltage_source:cTe,simulation_dc_voltage_source:aTe,simulation_voltage_source:lTe,size:TK,source_component_base:Ig,source_failed_to_create_component_error:C4e,source_group:k4e,source_manually_placed_via:D4e,source_missing_property_error:A4e,source_net:O4e,source_pcb_ground_plane:L4e,source_pin_missing_trace_warning:VK,source_port:I4e,source_project_metadata:jK,source_property_ignored_warning:R4e,source_simple_battery:IK,source_simple_capacitor:MK,source_simple_chip:RK,source_simple_crystal:M4e,source_simple_diode:GL,source_simple_ground:T4e,source_simple_inductor:NK,source_simple_led:CK,source_simple_mosfet:UK,source_simple_pin_header:LK,source_simple_pinout:DK,source_simple_potentiometer:OK,source_simple_power_source:PK,source_simple_push_button:kK,source_simple_resistor:AK,source_simple_resonator:zK,source_simple_switch:$K,source_simple_test_point:BK,source_simple_transistor:FK,source_trace:N4e,source_trace_not_connected_error:HK,supplier_name:VL,time:H1t,visible_layer:V8,voltage:$v,wave_shape:sTe},Symbol.toStringTag,{value:"Module"}));function Yt(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function fbt(t,e){return e.map(n=>Yt(t,n))}function dTe(t){return{a:parseFloat(t.a),b:parseFloat(t.b),c:parseFloat(t.c),d:parseFloat(t.d),e:parseFloat(t.e),f:parseFloat(t.f)}}const mbt=/^matrix\(\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*\)$/i;function WL(t){const e=t.match(mbt);if(e===null||e.length<7)throw new Error(`'${t}' is not a matrix`);return{a:parseFloat(e[1]),b:parseFloat(e[2]),c:parseFloat(e[3]),d:parseFloat(e[4]),e:parseFloat(e[5]),f:parseFloat(e[6])}}function d0(){return{a:1,c:0,e:0,b:0,d:1,f:0}}function i5(t){const{a:e,b:n,c:i,d:r,e:o,f:s}=t,a=e*r-n*i;return{a:r/a,b:n/-a,c:i/-a,d:e/a,e:(r*o-i*s)/-a,f:(n*o-e*s)/a}}function DR(t){return typeof t>"u"}function G8(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}function _bt(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function ybt(t){return _bt(t)&&"a"in t&&G8(t.a)&&"b"in t&&G8(t.b)&&"c"in t&&G8(t.c)&&"d"in t&&G8(t.d)&&"e"in t&&G8(t.e)&&"f"in t&&G8(t.f)}function Cs(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function Y8(...t){t=Array.isArray(t[0])?t[0]:t;const e=(n,i)=>({a:n.a*i.a+n.c*i.b,c:n.a*i.c+n.c*i.d,e:n.a*i.e+n.c*i.f+n.e,b:n.b*i.a+n.d*i.b,d:n.b*i.c+n.d*i.d,f:n.b*i.e+n.d*i.f+n.f});switch(t.length){case 0:throw new Error("no matrices provided");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,i,...r]=t,o=e(n,i);return Y8(o,...r)}}}function cs(...t){return Y8(...t)}const{cos:gbt,sin:bbt,PI:xbt}=Math;function ov(t,e,n){const i=gbt(t),r=bbt(t),o={a:i,c:-r,e:0,b:r,d:i,f:0};return DR(e)||DR(n)?o:Y8([Cs(e,n),o,Cs(-e,-n)])}function zR(t,e=void 0,n=void 0){return ov(t*xbt/180,e,n)}function Ng(t,e=void 0,n=void 0,i=void 0){DR(e)&&(e=t);const r={a:t,c:0,e:0,b:0,d:e,f:0};return DR(n)||DR(i)?r:Y8([Cs(n,i),r,Cs(-n,-i)])}function hTe(t,e){return{a:1,c:t,e:0,b:e,d:1,f:0}}const{tan:pTe}=Math;function fTe(t,e){return{a:1,c:pTe(t),e:0,b:pTe(e),d:1,f:0}}function eQ(t,e){return fTe(t*Math.PI/180,e*Math.PI/180)}function vbt(t){return cw(t)}function mTe(t){return cw(t)}function cw(t){return`matrix(${t.a},${t.b},${t.c},${t.d},${t.e},${t.f})`}function _Te(t,e=1e10){return{a:Math.round(t.a*e)/e,b:Math.round(t.b*e)/e,c:Math.round(t.c*e)/e,d:Math.round(t.d*e)/e,e:Math.round(t.e*e)/e,f:Math.round(t.f*e)/e}}function yTe(t,e){const n=t[0].x!=null?t[0].x:t[0][0],i=t[0].y!=null?t[0].y:t[0][1],r=e[0].x!=null?e[0].x:e[0][0],o=e[0].y!=null?e[0].y:e[0][1],s=t[1].x!=null?t[1].x:t[1][0],a=t[1].y!=null?t[1].y:t[1][1],c=e[1].x!=null?e[1].x:e[1][0],l=e[1].y!=null?e[1].y:e[1][1],u=t[2].x!=null?t[2].x:t[2][0],d=t[2].y!=null?t[2].y:t[2][1],h=e[2].x!=null?e[2].x:e[2][0],f=e[2].y!=null?e[2].y:e[2][1],m={a:n-u,b:i-d,c:s-u,d:a-d,e:u,f:d},y={a:r-h,b:o-f,c:c-h,d:l-f,e:h,f},g=i5(m),b=Y8([y,g]);return _Te(b)}function wbt(t){return Array.isArray(t)?t.map(e):e(t);function e(n){switch(n.type){case"matrix":if("a"in n&&"b"in n&&"c"in n&&"d"in n&&"e"in n&&"f"in n)return dTe(n);throw new Error("MISSING_MANDATORY_PARAM");case"translate":if(!("tx"in n))throw new Error("MISSING_MANDATORY_PARAM");return"ty"in n?Cs(n.tx,n.ty):Cs(n.tx);case"scale":if(!("sx"in n))throw new Error("MISSING_MANDATORY_PARAM");return"sy"in n?Ng(n.sx,n.sy):Ng(n.sx);case"rotate":if(!("angle"in n))throw new Error("MISSING_MANDATORY_PARAM");return"cx"in n&&"cy"in n?zR(n.angle,n.cx,n.cy):zR(n.angle);case"skewX":if(!("angle"in n))throw new Error("MISSING_MANDATORY_PARAM");return eQ(n.angle,0);case"skewY":if(!("angle"in n))throw new Error("MISSING_MANDATORY_PARAM");return eQ(0,n.angle);case"shear":if(!("shx"in n&&"shy"in n))throw new Error("MISSING_MANDATORY_PARAM");return hTe(n.shx,n.shy);default:throw new Error("UNSUPPORTED_DESCRIPTOR")}}}function Sbt(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function q8(t,e,n,i){var r=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(r,q8.prototype),r.expected=e,r.found=n,r.location=i,r.name="SyntaxError",r}Sbt(q8,Error);function tQ(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}q8.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n=null,i;for(i=0;i<t.length;i++)if(t[i].source===this.location.source){n=t[i].text.split(/\r\n|\n|\r/g);break}var r=this.location.start,o=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(r):r,s=this.location.source+":"+o.line+":"+o.column;if(n){var a=this.location.end,c=tQ("",o.line.toString().length," "),l=n[r.line-1],u=r.line===a.line?a.column:l.length+1,d=u-r.column||1;e+=`
|
|
322
|
+
`)).length,r=0;r<i;r++){var s=t.charCodeAt(r),a=null;s<128?n++:a=s>127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),e4(a)||(n>e&&(o+=t.substring(e,n)),o+=a,e=n=r+1)}return n>e&&(o+=t.substring(e,t.length)),o},lgt=!!ZW||!!WW,JSe="text/plain",vL=(t,e)=>{var[n,i]=t.split("?"),r=Kr({},e);i?.split("&").forEach((s=>{var[a]=s.split("=");delete r[a]}));var o=K_t(r);return n+"?"+(o=o?(i?i+"&":"")+o:i)},yR=(t,e)=>JSON.stringify(t,((n,i)=>typeof i=="bigint"?i.toString():i),e),FZ=t=>{var{data:e,compression:n}=t;if(e){if(n===ES.GZipJS){var i=BSe(USe(yR(e)),{mtime:0}),r=new Blob([i],{type:JSe});return{contentType:JSe,body:r,estimatedSize:r.size}}if(n===ES.Base64){var o=(function(c){var l,u,d,h,f,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",y=0,g=0,b="",v=[];if(!c)return c;c=cgt(c);do l=(f=c.charCodeAt(y++)<<16|c.charCodeAt(y++)<<8|c.charCodeAt(y++))>>18&63,u=f>>12&63,d=f>>6&63,h=63&f,v[g++]=m.charAt(l)+m.charAt(u)+m.charAt(d)+m.charAt(h);while(y<c.length);switch(b=v.join(""),c.length%3){case 1:b=b.slice(0,-2)+"==";break;case 2:b=b.slice(0,-1)+"="}return b})(yR(e)),s=(c=>"data="+encodeURIComponent(typeof c=="string"?c:yR(c)))(o);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var a=yR(e);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},gR=[];WW&&gR.push({transport:"fetch",method:t=>{var e,n,{contentType:i,body:r,estimatedSize:o}=(e=FZ(t))!==null&&e!==void 0?e:{},s=new Headers;vf(t.headers,(function(u,d){s.append(d,u)})),i&&s.append("Content-Type",i);var a=t.url,c=null;if(Iwe){var l=new Iwe;c={signal:l.signal,timeout:setTimeout((()=>l.abort()),t.timeout)}}WW(a,Kr({method:t?.method||"GET",headers:s,keepalive:t.method==="POST"&&(o||0)<52428.8,body:r,signal:(n=c)==null?void 0:n.signal},t.fetchOptions)).then((u=>u.text().then((d=>{var h={statusCode:u.status,text:d};if(u.status===200)try{h.json=JSON.parse(d)}catch(f){Yr.error(f)}t.callback==null||t.callback(h)})))).catch((u=>{Yr.error(u),t.callback==null||t.callback({statusCode:0,text:u})})).finally((()=>c?clearTimeout(c.timeout):null))}}),ZW&&gR.push({transport:"XHR",method:t=>{var e,n=new ZW;n.open(t.method||"GET",t.url,!0);var{contentType:i,body:r}=(e=FZ(t))!==null&&e!==void 0?e:{};vf(t.headers,(function(o,s){n.setRequestHeader(s,o)})),i&&n.setRequestHeader("Content-Type",i),t.timeout&&(n.timeout=t.timeout),n.withCredentials=!0,n.onreadystatechange=()=>{if(n.readyState===4){var o={statusCode:n.status,text:n.responseText};if(n.status===200)try{o.json=JSON.parse(n.responseText)}catch{}t.callback==null||t.callback(o)}},n.send(r)}}),b9!=null&&b9.sendBeacon&&gR.push({transport:"sendBeacon",method:t=>{var e=vL(t.url,{beacon:"1"});try{var n,{contentType:i,body:r}=(n=FZ(t))!==null&&n!==void 0?n:{},o=typeof r=="string"?new Blob([r],{type:i}):r;b9.sendBeacon(e,o)}catch{}}});var I8=function(t,e){if(!(function(n){try{new RegExp(n)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}};function e3e(t,e,n){return yR({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}var ugt={exact:(t,e)=>e.some((n=>t.some((i=>n===i)))),is_not:(t,e)=>e.every((n=>t.every((i=>n!==i)))),regex:(t,e)=>e.some((n=>t.some((i=>I8(n,i))))),not_regex:(t,e)=>e.every((n=>t.every((i=>!I8(n,i))))),icontains:(t,e)=>e.map(wL).some((n=>t.map(wL).some((i=>n.includes(i))))),not_icontains:(t,e)=>e.map(wL).every((n=>t.map(wL).every((i=>!n.includes(i)))))},wL=t=>t.toLowerCase(),t3e=g1("[Error tracking]");let dgt=class{constructor(e){var n,i;this.ge=[],this._instance=e,this.ge=(n=(i=this._instance.persistence)==null?void 0:i.get_property(nZ))!==null&&n!==void 0?n:[]}onRemoteConfig(e){var n,i,r,o=(n=(i=e.errorTracking)==null?void 0:i.suppressionRules)!==null&&n!==void 0?n:[],s=(r=e.errorTracking)==null?void 0:r.captureExtensionExceptions;this.ge=o,this._instance.persistence&&this._instance.persistence.register({[nZ]:this.ge,[Hwe]:s})}get _e(){var e,n=!!this._instance.get_property(Hwe),i=this._instance.config.error_tracking.captureExtensionExceptions;return(e=i??n)!==null&&e!==void 0&&e}sendExceptionEvent(e){if(this.me(e))t3e.info("Skipping exception capture because a suppression rule matched");else{if(this._e||!this.be(e))return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"});t3e.info("Skipping exception capture because it was thrown by an extension")}}me(e){var n=e.$exception_list;if(!n||!mm(n)||n.length===0)return!1;var i=n.reduce(((r,o)=>{var{type:s,value:a}=o;return cy(s)&&s.length>0&&r.$exception_types.push(s),cy(a)&&a.length>0&&r.$exception_values.push(a),r}),{$exception_types:[],$exception_values:[]});return this.ge.some((r=>{var o=r.values.map((s=>{var a,c=ugt[s.operator],l=mm(s.value)?s.value:[s.value],u=(a=i[s.key])!==null&&a!==void 0?a:[];return l.length>0&&c(l,u)}));return r.type==="OR"?o.some(Boolean):o.every(Boolean)}))}be(e){var n=e.$exception_list;return!(!n||!mm(n))&&n.flatMap((i=>{var r,o;return(r=(o=i.stacktrace)==null?void 0:o.frames)!==null&&r!==void 0?r:[]})).some((i=>i.filename&&i.filename.startsWith("chrome-extension://")))}};var p2="Mobile",SL="iOS",rw="Android",bR="Tablet",n3e=rw+" "+bR,i3e="iPad",r3e="Apple",o3e=r3e+" Watch",xR="Safari",N8="BlackBerry",s3e="Samsung",a3e=s3e+"Browser",c3e=s3e+" Internet",uT="Chrome",hgt=uT+" OS",l3e=uT+" "+SL,BZ="Internet Explorer",u3e=BZ+" "+p2,UZ="Opera",pgt=UZ+" Mini",$Z="Edge",d3e="Microsoft "+$Z,k8="Firefox",h3e=k8+" "+SL,vR="Nintendo",wR="PlayStation",O8="Xbox",p3e=rw+" "+p2,f3e=p2+" "+xR,SR="Windows",jZ=SR+" Phone",m3e="Nokia",HZ="Ouya",_3e="Generic",fgt=_3e+" "+p2.toLowerCase(),y3e=_3e+" "+bR.toLowerCase(),VZ="Konqueror",rv="(\\d+(\\.\\d+)?)",GZ=new RegExp("Version/"+rv),mgt=new RegExp(O8,"i"),_gt=new RegExp(wR+" \\w+","i"),ygt=new RegExp(vR+" \\w+","i"),YZ=new RegExp(N8+"|PlayBook|BB10","i"),ggt={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},bgt=(t,e)=>e&&zl(e,r3e)||(function(n){return zl(n,xR)&&!zl(n,uT)&&!zl(n,rw)})(t),g3e=function(t,e){return e=e||"",zl(t," OPR/")&&zl(t,"Mini")?pgt:zl(t," OPR/")?UZ:YZ.test(t)?N8:zl(t,"IE"+p2)||zl(t,"WPDesktop")?u3e:zl(t,a3e)?c3e:zl(t,$Z)||zl(t,"Edg/")?d3e:zl(t,"FBIOS")?"Facebook "+p2:zl(t,"UCWEB")||zl(t,"UCBrowser")?"UC Browser":zl(t,"CriOS")?l3e:zl(t,"CrMo")||zl(t,uT)?uT:zl(t,rw)&&zl(t,xR)?p3e:zl(t,"FxiOS")?h3e:zl(t.toLowerCase(),VZ.toLowerCase())?VZ:bgt(t,e)?zl(t,p2)?f3e:xR:zl(t,k8)?k8:zl(t,"MSIE")||zl(t,"Trident/")?BZ:zl(t,"Gecko")?k8:""},xgt={[u3e]:[new RegExp("rv:"+rv)],[d3e]:[new RegExp($Z+"?\\/"+rv)],[uT]:[new RegExp("("+uT+"|CrMo)\\/"+rv)],[l3e]:[new RegExp("CriOS\\/"+rv)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+rv)],[xR]:[GZ],[f3e]:[GZ],[UZ]:[new RegExp("(Opera|OPR)\\/"+rv)],[k8]:[new RegExp(k8+"\\/"+rv)],[h3e]:[new RegExp("FxiOS\\/"+rv)],[VZ]:[new RegExp("Konqueror[:/]?"+rv,"i")],[N8]:[new RegExp(N8+" "+rv),GZ],[p3e]:[new RegExp("android\\s"+rv,"i")],[c3e]:[new RegExp(a3e+"\\/"+rv)],[BZ]:[new RegExp("(rv:|MSIE )"+rv)],Mozilla:[new RegExp("rv:"+rv)]},vgt=function(t,e){var n=g3e(t,e),i=xgt[n];if(br(i))return null;for(var r=0;r<i.length;r++){var o=i[r],s=t.match(o);if(s)return parseFloat(s[s.length-2])}return null},b3e=[[new RegExp(O8+"; "+O8+" (.*?)[);]","i"),t=>[O8,t&&t[1]||""]],[new RegExp(vR,"i"),[vR,""]],[new RegExp(wR,"i"),[wR,""]],[YZ,[N8,""]],[new RegExp(SR,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[jZ,""];if(new RegExp(p2).test(e)&&!/IEMobile\b/.test(e))return[SR+" "+p2,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var i=n[1],r=ggt[i]||"";return/arm/i.test(e)&&(r="RT"),[SR,r]}return[SR,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>{if(t&&t[3]){var e=[t[3],t[4],t[5]||"0"];return[SL,e.join(".")]}return[SL,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=br(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+rw+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+rw+")","i"),t=>{if(t&&t[2]){var e=[t[2],t[3],t[4]||"0"];return[rw,e.join(".")]}return[rw,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];if(t&&t[1]){var n=[t[1],t[2],t[3]||"0"];e[1]=n.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[hgt,""]],[/Linux|debian/i,["Linux",""]]],x3e=function(t){return ygt.test(t)?vR:_gt.test(t)?wR:mgt.test(t)?O8:new RegExp(HZ,"i").test(t)?HZ:new RegExp("("+jZ+"|WPDesktop)","i").test(t)?jZ:/iPad/.test(t)?i3e:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?o3e:YZ.test(t)?N8:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(m3e,"i").test(t)?m3e:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?!new RegExp(p2).test(t)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)?/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?rw:n3e:rw:new RegExp("(pda|"+p2+")","i").test(t)?fgt:new RegExp(bR,"i").test(t)&&!new RegExp(bR+" pc","i").test(t)?y3e:""},EL="https?://(.*)",TL=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],wgt=QO(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],TL),qZ="<masked>",Sgt=["li_fat_id"];function v3e(t,e,n){if(!Zr)return{};var i,r=e?QO([],TL,n||[]):[],o=w3e(mZ(Zr.URL,r,qZ),t),s=(i={},vf(Sgt,(function(a){var c=tw.V(a);i[a]=c||null})),i);return Yy(s,o)}function w3e(t,e){var n=wgt.concat(e||[]),i={};return vf(n,(function(r){var o=lL(t,r);i[r]=o||null})),i}function S3e(t){var e=(function(o){return o?o.search(EL+"google.([^/?]*)")===0?"google":o.search(EL+"bing.com")===0?"bing":o.search(EL+"yahoo.com")===0?"yahoo":o.search(EL+"duckduckgo.com")===0?"duckduckgo":null:null})(t),n=e!="yahoo"?"q":"p",i={};if(!e4(e)){i.$search_engine=e;var r=Zr?lL(Zr.referrer,n):"";r.length&&(i.ph_keyword=r)}return i}function E3e(){return navigator.language||navigator.userLanguage}function T3e(){return Zr?.referrer||"$direct"}function M3e(t,e){var n=t?QO([],TL,e||[]):[],i=zv?.href.substring(0,1e3);return{r:T3e().substring(0,1e3),u:i?mZ(i,n,qZ):void 0}}function A3e(t){var e,{r:n,u:i}=t,r={$referrer:n,$referring_domain:n==null?void 0:n=="$direct"?"$direct":(e=C8(n))==null?void 0:e.host};if(i){r.$current_url=i;var o=C8(i);r.$host=o?.host,r.$pathname=o?.pathname;var s=w3e(i);Yy(r,s)}if(n){var a=S3e(n);Yy(r,a)}return r}function C3e(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function Egt(){try{return new Date().getTimezoneOffset()}catch{return}}function Tgt(t,e){if(!Fv)return{};var n,i,r,o=t?QO([],TL,e||[]):[],[s,a]=(function(c){for(var l=0;l<b3e.length;l++){var[u,d]=b3e[l],h=u.exec(c),f=h&&(d2(d)?d(h,c):d);if(f)return f}return["",""]})(Fv);return Yy(eZ({$os:s,$os_version:a,$browser:g3e(Fv,navigator.vendor),$device:x3e(Fv),$device_type:(i=Fv,r=x3e(i),r===i3e||r===n3e||r==="Kobo"||r==="Kindle Fire"||r===y3e?bR:r===vR||r===O8||r===wR||r===HZ?"Console":r===o3e?"Wearable":r?p2:"Desktop"),$timezone:C3e(),$timezone_offset:Egt()}),{$current_url:mZ(zv?.href,o,qZ),$host:zv?.host,$pathname:zv?.pathname,$raw_user_agent:Fv.length>1e3?Fv.substring(0,997)+"...":Fv,$browser_version:vgt(Fv,navigator.vendor),$browser_language:E3e(),$browser_language_prefix:(n=E3e(),typeof n=="string"?n.split("-")[0]:void 0),$screen_height:qn?.screen.height,$screen_width:qn?.screen.width,$viewport_height:qn?.innerHeight,$viewport_width:qn?.innerWidth,$lib:"web",$lib_version:wS.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var ow=g1("[FeatureFlags]"),XZ="$active_feature_flags",L8="$override_feature_flags",R3e="$feature_flag_payloads",ER="$override_feature_flag_payloads",P3e="$feature_flag_request_id",I3e=t=>{var e={};for(var[n,i]of JO(t||{}))i&&(e[n]=i);return e},Mgt=t=>{var e=t.flags;return e?(t.featureFlags=Object.fromEntries(Object.keys(e).map((n=>{var i;return[n,(i=e[n].variant)!==null&&i!==void 0?i:e[n].enabled]}))),t.featureFlagPayloads=Object.fromEntries(Object.keys(e).filter((n=>e[n].enabled)).filter((n=>{var i;return(i=e[n].metadata)==null?void 0:i.payload})).map((n=>{var i;return[n,(i=e[n].metadata)==null?void 0:i.payload]})))):ow.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),t},Agt=(function(t){return t.FeatureFlags="feature_flags",t.Recordings="recordings",t})({});let Cgt=class{constructor(e){this.ye=!1,this.we=!1,this.Se=!1,this.$e=!1,this.ke=!1,this.xe=!1,this.Ee=!1,this._instance=e,this.featureFlagEventHandlers=[]}flags(){if(this._instance.config.__preview_remote_config)this.xe=!0;else{var e=!this.Ie&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.Re({disableFlags:e})}}get hasLoadedFlags(){return this.we}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(oZ),n=this._instance.get_property(L8),i=this._instance.get_property(ER);if(!i&&!n)return e||{};var r=Yy({},e||{}),o=[...new Set([...Object.keys(i||{}),...Object.keys(n||{})])];for(var s of o){var a,c,l=r[s],u=n?.[s],d=br(u)?(a=l?.enabled)!==null&&a!==void 0&&a:!!u,h=br(u)?l.variant:typeof u=="string"?u:void 0,f=i?.[s],m=Kr({},l,{enabled:d,variant:d?h??l?.variant:void 0});d!==l?.enabled&&(m.original_enabled=l?.enabled),h!==l?.variant&&(m.original_variant=l?.variant),f&&(m.metadata=Kr({},l?.metadata,{payload:f,original_payload:l==null||(c=l.metadata)==null?void 0:c.payload})),r[s]=m}return this.ye||(ow.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:r}),this.ye=!0),r}getFlagVariants(){var e=this._instance.get_property(M8),n=this._instance.get_property(L8);if(!n)return e||{};for(var i=Yy({},e),r=Object.keys(n),o=0;o<r.length;o++)i[r[o]]=n[r[o]];return this.ye||(ow.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:n,finalFlags:i}),this.ye=!0),i}getFlagPayloads(){var e=this._instance.get_property(R3e),n=this._instance.get_property(ER);if(!n)return e||{};for(var i=Yy({},e||{}),r=Object.keys(n),o=0;o<r.length;o++)i[r[o]]=n[r[o]];return this.ye||(ow.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:n,finalPayloads:i}),this.ye=!0),i}reloadFeatureFlags(){this.$e||this._instance.config.advanced_disable_feature_flags||this.Ie||(this.Ie=setTimeout((()=>{this.Re()}),5))}Pe(){clearTimeout(this.Ie),this.Ie=void 0}ensureFlagsLoaded(){this.we||this.Se||this.Ie||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.$e=e}Re(e){var n;if(this.Pe(),!this._instance.L())if(this.Se)this.ke=!0;else{var i={token:this._instance.config.token,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Kr({},((n=this._instance.persistence)==null?void 0:n.get_initial_props())||{},this._instance.get_property(lR)||{}),group_properties:this._instance.get_property(rT)};(e!=null&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(i.disable_flags=!0);var r=this._instance.config.__preview_remote_config,o=r?"/flags/?v=2":"/flags/?v=2&config=true",s=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",a=this._instance.requestRouter.endpointFor("api",o+s);r&&(i.timezone=C3e()),this.Se=!0,this._instance.Te({method:"POST",url:a,data:i,compression:this._instance.config.disable_compression?void 0:ES.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:c=>{var l,u,d=!0;if(c.statusCode===200&&(this.ke||(this.$anon_distinct_id=void 0),d=!1),this.Se=!1,this.xe||(this.xe=!0,this._instance.Ce((u=c.json)!==null&&u!==void 0?u:{})),!i.disable_flags||this.ke)if(this.Ee=!d,c.json&&(l=c.json.quotaLimited)!=null&&l.includes(Agt.FeatureFlags))ow.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else{var h;i.disable_flags||this.receivedFeatureFlags((h=c.json)!==null&&h!==void 0?h:{},d),this.ke&&(this.ke=!1,this.Re())}}})}}getFeatureFlag(e,n){if(n===void 0&&(n={}),this.we||this.getFlags()&&this.getFlags().length>0){var i=this.getFlagVariants()[e],r=""+i,o=this._instance.get_property(P3e)||void 0,s=this._instance.get_property(iL)||{};if((n.send_event||!("send_event"in n))&&(!(e in s)||!s[e].includes(r))){var a,c,l,u,d,h,f,m,y;mm(s[e])?s[e].push(r):s[e]=[r],(a=this._instance.persistence)==null||a.register({[iL]:s});var g=this.getFeatureFlagDetails(e),b={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_request_id:o,$feature_flag_bootstrapped_response:((c=this._instance.config.bootstrap)==null||(c=c.featureFlags)==null?void 0:c[e])||null,$feature_flag_bootstrapped_payload:((l=this._instance.config.bootstrap)==null||(l=l.featureFlagPayloads)==null?void 0:l[e])||null,$used_bootstrap_value:!this.Ee};br(g==null||(u=g.metadata)==null?void 0:u.version)||(b.$feature_flag_version=g.metadata.version);var v,w=(d=g==null||(h=g.reason)==null?void 0:h.description)!==null&&d!==void 0?d:g==null||(f=g.reason)==null?void 0:f.code;w&&(b.$feature_flag_reason=w),g!=null&&(m=g.metadata)!=null&&m.id&&(b.$feature_flag_id=g.metadata.id),br(g?.original_variant)&&br(g?.original_enabled)||(b.$feature_flag_original_response=br(g.original_variant)?g.original_enabled:g.original_variant),g!=null&&(y=g.metadata)!=null&&y.original_payload&&(b.$feature_flag_original_payload=g==null||(v=g.metadata)==null?void 0:v.original_payload),this._instance.capture("$feature_flag_called",b)}return i}ow.warn('getFeatureFlag for key "'+e+`" failed. Feature flags didn't load in time.`)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){return this.getFlagPayloads()[e]}getRemoteConfigPayload(e,n){var i=this._instance.config.token;this._instance.Te({method:"POST",url:this._instance.requestRouter.endpointFor("api","/flags/?v=2&config=true"),data:{distinct_id:this._instance.get_distinct_id(),token:i},compression:this._instance.config.disable_compression?void 0:ES.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:r=>{var o,s=(o=r.json)==null?void 0:o.featureFlagPayloads;n(s?.[e]||void 0)}})}isFeatureEnabled(e,n){if(n===void 0&&(n={}),this.we||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(e,n);ow.warn('isFeatureEnabled for key "'+e+`" failed. Feature flags didn't load in time.`)}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((n=>n!==e))}receivedFeatureFlags(e,n){if(this._instance.persistence){this.we=!0;var i=this.getFlagVariants(),r=this.getFlagPayloads(),o=this.getFlagsWithDetails();(function(s,a,c,l,u){c===void 0&&(c={}),l===void 0&&(l={}),u===void 0&&(u={});var d=Mgt(s),h=d.flags,f=d.featureFlags,m=d.featureFlagPayloads;if(f){var y=s.requestId;if(mm(f)){ow.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var g={};if(f)for(var b=0;b<f.length;b++)g[f[b]]=!0;a&&a.register({[XZ]:f,[M8]:g})}else{var v=f,w=m,T=h;s.errorsWhileComputingFlags&&(v=Kr({},c,v),w=Kr({},l,w),T=Kr({},u,T)),a&&a.register(Kr({[XZ]:Object.keys(I3e(v)),[M8]:v||{},[R3e]:w||{},[oZ]:T||{}},y?{[P3e]:y}:{}))}}})(e,this._instance.persistence,i,r,o),this.Me(n)}}override(e,n){n===void 0&&(n=!1),ow.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:n})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return ow.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this._instance.persistence.unregister(L8),this._instance.persistence.unregister(ER),void this.Me();if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var n,i=e;if(this.ye=!!((n=i.suppressWarning)!==null&&n!==void 0&&n),"flags"in i){if(i.flags===!1)this._instance.persistence.unregister(L8);else if(i.flags)if(mm(i.flags)){for(var r={},o=0;o<i.flags.length;o++)r[i.flags[o]]=!0;this._instance.persistence.register({[L8]:r})}else this._instance.persistence.register({[L8]:i.flags})}return"payloads"in i&&(i.payloads===!1?this._instance.persistence.unregister(ER):i.payloads&&this._instance.persistence.register({[ER]:i.payloads})),void this.Me()}this.Me()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.we){var{flags:n,flagVariants:i}=this.Oe();e(n,i)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,n,i){var r,o=(this._instance.get_property(cR)||[]).find((l=>l.flagKey===e)),s={["$feature_enrollment/"+e]:n},a={$feature_flag:e,$feature_enrollment:n,$set:s};o&&(a.$early_access_feature_name=o.name),i&&(a.$feature_enrollment_stage=i),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(s,!1);var c=Kr({},this.getFlagVariants(),{[e]:n});(r=this._instance.persistence)==null||r.register({[XZ]:Object.keys(I3e(c)),[M8]:c}),this.Me()}getEarlyAccessFeatures(e,n,i){n===void 0&&(n=!1);var r=this._instance.get_property(cR),o=i?"&"+i.map((s=>"stage="+s)).join("&"):"";if(r&&!n)return e(r);this._instance.Te({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+o),method:"GET",callback:s=>{var a,c;if(s.json){var l=s.json.earlyAccessFeatures;return(a=this._instance.persistence)==null||a.unregister(cR),(c=this._instance.persistence)==null||c.register({[cR]:l}),e(l)}}})}Oe(){var e=this.getFlags(),n=this.getFlagVariants();return{flags:e.filter((i=>n[i])),flagVariants:Object.keys(n).filter((i=>n[i])).reduce(((i,r)=>(i[r]=n[r],i)),{})}}Me(e){var{flags:n,flagVariants:i}=this.Oe();this.featureFlagEventHandlers.forEach((r=>r(n,i,{errorsLoading:e})))}setPersonPropertiesForFlags(e,n){n===void 0&&(n=!0);var i=this._instance.get_property(lR)||{};this._instance.register({[lR]:Kr({},i,e)}),n&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(lR)}setGroupPropertiesForFlags(e,n){n===void 0&&(n=!0);var i=this._instance.get_property(rT)||{};Object.keys(i).length!==0&&Object.keys(i).forEach((r=>{i[r]=Kr({},i[r],e[r]),delete e[r]})),this._instance.register({[rT]:Kr({},i,e)}),n&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var n=this._instance.get_property(rT)||{};this._instance.register({[rT]:Kr({},n,{[e]:{}})})}else this._instance.unregister(rT)}reset(){this.we=!1,this.Se=!1,this.$e=!1,this.ke=!1,this.xe=!1,this.Ee=!1,this.$anon_distinct_id=void 0,this.Pe(),this.ye=!1}};var Rgt=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];let WZ=class{constructor(e,n){this.A=e,this.props={},this.Fe=!1,this.Ae=(i=>{var r="";return i.token&&(r=i.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),i.persistence_name?"ph_"+i.persistence_name:"ph_"+r+"_posthog"})(e),this.it=this.De(e),this.load(),e.debug&&Yr.info("Persistence loaded",e.persistence,Kr({},this.props)),this.update_config(e,e,n),this.save()}isDisabled(){return!!this.je}De(e){Rgt.indexOf(e.persistence.toLowerCase())===-1&&(Yr.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var n=e.persistence.toLowerCase();return n==="localstorage"&&b1.G()?b1:n==="localstorage+cookie"&&dL.G()?dL:n==="sessionstorage"&&qb.G()?qb:n==="memory"?lyt:n==="cookie"?tw:dL.G()?dL:tw}properties(){var e={};return vf(this.props,(function(n,i){if(i===M8&&ay(n))for(var r=Object.keys(n),o=0;o<r.length;o++)e["$feature/"+r[o]]=n[r[o]];else a=i,c=!1,(e4(s=$_t)?c:Pwe&&s.indexOf===Pwe?s.indexOf(a)!=-1:(vf(s,(function(l){if(c||(c=l===a))return KO})),c))||(e[i]=n);var s,a,c})),e}load(){if(!this.je){var e=this.it.K(this.Ae);e&&(this.props=Yy({},e))}}save(){this.je||this.it.Y(this.Ae,this.props,this.Le,this.Ne,this.ze,this.A.debug)}remove(){this.it.X(this.Ae,!1),this.it.X(this.Ae,!0)}clear(){this.remove(),this.props={}}register_once(e,n,i){if(ay(e)){br(n)&&(n="None"),this.Le=br(i)?this.Ue:i;var r=!1;if(vf(e,((o,s)=>{this.props.hasOwnProperty(s)&&this.props[s]!==n||(this.props[s]=o,r=!0)})),r)return this.save(),!0}return!1}register(e,n){if(ay(e)){this.Le=br(n)?this.Ue:n;var i=!1;if(vf(e,((r,o)=>{e.hasOwnProperty(o)&&this.props[o]!==r&&(this.props[o]=r,i=!0)})),i)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.Fe){var e=v3e(this.A.custom_campaign_params,this.A.mask_personal_data_properties,this.A.custom_personal_data_properties);T8(eZ(e))||this.register(e),this.Fe=!0}}update_search_keyword(){var e;this.register((e=Zr?.referrer)?S3e(e):{})}update_referrer_info(){var e;this.register_once({$referrer:T3e(),$referring_domain:Zr!=null&&Zr.referrer&&((e=C8(Zr.referrer))==null?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[lZ]||this.props[uZ]||this.register_once({[rL]:M3e(this.A.mask_personal_data_properties,this.A.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};vf([uZ,lZ],(s=>{var a=this.props[s];a&&vf(a,(function(c,l){e["$initial_"+KW(l)]=c}))}));var n,i,r=this.props[rL];if(r){var o=(n=A3e(r),i={},vf(n,(function(s,a){i["$initial_"+KW(a)]=s})),i);Yy(e,o)}return e}safe_merge(e){return vf(this.props,(function(n,i){i in e||(e[i]=n)})),e}update_config(e,n,i){if(this.Ue=this.Le=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!i),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==n.persistence){var r=this.De(e),o=this.props;this.clear(),this.it=r,this.props=o,this.save()}}set_disabled(e){this.je=e,this.je?this.remove():this.save()}set_cross_subdomain(e){e!==this.Ne&&(this.Ne=e,this.remove(),this.save())}set_secure(e){e!==this.ze&&(this.ze=e,this.remove(),this.save())}set_event_timer(e,n){var i=this.props[oR]||{};i[e]=n,this.props[oR]=i,this.save()}remove_event_timer(e){var n=(this.props[oR]||{})[e];return br(n)||(delete this.props[oR][e],this.save()),n}get_property(e){return this.props[e]}set_property(e,n){this.props[e]=n,this.save()}},N3e=class{constructor(){this.qe={},this.qe={}}on(e,n){return this.qe[e]||(this.qe[e]=[]),this.qe[e].push(n),()=>{this.qe[e]=this.qe[e].filter((i=>i!==n))}}emit(e,n){for(var i of this.qe[e]||[])i(n);for(var r of this.qe["*"]||[])r(e,n)}},Pgt=class $7{constructor(e){this.Be=new N3e,this.He=(n,i)=>this.We(n,i)&&this.Ge(n,i)&&this.Je(n,i),this.We=(n,i)=>i==null||!i.event||n?.event===i?.event,this._instance=e,this.Ve=new Set,this.Ke=new Set}init(){var e;if(!br((e=this._instance)==null?void 0:e.Ye)){var n;(n=this._instance)==null||n.Ye(((i,r)=>{this.on(i,r)}))}}register(e){var n,i;if(!br((n=this._instance)==null?void 0:n.Ye)&&(e.forEach((s=>{var a,c;(a=this.Ke)==null||a.add(s),(c=s.steps)==null||c.forEach((l=>{var u;(u=this.Ve)==null||u.add(l?.event||"")}))})),(i=this._instance)!=null&&i.autocapture)){var r,o=new Set;e.forEach((s=>{var a;(a=s.steps)==null||a.forEach((c=>{c!=null&&c.selector&&o.add(c?.selector)}))})),(r=this._instance)==null||r.autocapture.setElementSelectors(o)}}on(e,n){var i;n!=null&&e.length!=0&&(this.Ve.has(e)||this.Ve.has(n?.event))&&this.Ke&&((i=this.Ke)==null?void 0:i.size)>0&&this.Ke.forEach((r=>{this.Xe(n,r)&&this.Be.emit("actionCaptured",r.name)}))}Qe(e){this.onAction("actionCaptured",(n=>e(n)))}Xe(e,n){if(n?.steps==null)return!1;for(var i of n.steps)if(this.He(e,i))return!0;return!1}onAction(e,n){return this.Be.on(e,n)}Ge(e,n){if(n!=null&&n.url){var i,r=e==null||(i=e.properties)==null?void 0:i.$current_url;if(!r||typeof r!="string"||!$7.Ze(r,n?.url,n?.url_matching||"contains"))return!1}return!0}static Ze(e,n,i){switch(i){case"regex":return!!qn&&I8(e,n);case"exact":return n===e;case"contains":var r=$7.tr(n).replace(/_/g,".").replace(/%/g,".*");return I8(e,r);default:return!1}}static tr(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Je(e,n){if((n!=null&&n.href||n!=null&&n.tag_name||n!=null&&n.text)&&!this.ir(e).some((o=>!(n!=null&&n.href&&!$7.Ze(o.href||"",n?.href,n?.href_matching||"exact"))&&(n==null||!n.tag_name||o.tag_name===n?.tag_name)&&!(n!=null&&n.text&&!$7.Ze(o.text||"",n?.text,n?.text_matching||"exact")&&!$7.Ze(o.$el_text||"",n?.text,n?.text_matching||"exact")))))return!1;if(n!=null&&n.selector){var i,r=e==null||(i=e.properties)==null?void 0:i.$element_selectors;if(!r||!r.includes(n?.selector))return!1}return!0}ir(e){return e?.properties.$elements==null?[]:e?.properties.$elements}};(function(t){return t.Button="button",t.Tab="tab",t.Selector="selector",t})({}),(function(t){return t.TopLeft="top_left",t.TopRight="top_right",t.TopCenter="top_center",t.MiddleLeft="middle_left",t.MiddleRight="middle_right",t.MiddleCenter="middle_center",t.Left="left",t.Center="center",t.Right="right",t.NextToTrigger="next_to_trigger",t})({});var ZZ=(function(t){return t.Popover="popover",t.API="api",t.Widget="widget",t.ExternalSurvey="external_survey",t})({});(function(t){return t.Open="open",t.MultipleChoice="multiple_choice",t.SingleChoice="single_choice",t.Rating="rating",t.Link="link",t})({}),(function(t){return t.NextQuestion="next_question",t.End="end",t.ResponseBased="response_based",t.SpecificQuestion="specific_question",t})({}),(function(t){return t.Once="once",t.Recurring="recurring",t.Always="always",t})({});var KZ=(function(t){return t.SHOWN="survey shown",t.DISMISSED="survey dismissed",t.SENT="survey sent",t})({}),k3e=(function(t){return t.SURVEY_ID="$survey_id",t.SURVEY_NAME="$survey_name",t.SURVEY_RESPONSE="$survey_response",t.SURVEY_ITERATION="$survey_iteration",t.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",t.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",t.SURVEY_SUBMISSION_ID="$survey_submission_id",t.SURVEY_QUESTIONS="$survey_questions",t.SURVEY_COMPLETED="$survey_completed",t})({}),Pg=g1("[Surveys]"),QZ="seenSurvey_",Igt=(t,e)=>{var n="$survey_"+e+"/"+t.id;return t.current_iteration&&t.current_iteration>0&&(n="$survey_"+e+"/"+t.id+"/"+t.current_iteration),n},O3e=t=>{var e=""+QZ+t.id;return t.current_iteration&&t.current_iteration>0&&(e=""+QZ+t.id+"_"+t.current_iteration),e},Ngt=[ZZ.Popover,ZZ.Widget,ZZ.API];let kgt=class{constructor(e){this._instance=e,this.er=new Map,this.rr=new Map}register(e){var n;br((n=this._instance)==null?void 0:n.Ye)||(this.sr(e),this.nr(e))}nr(e){var n=e.filter((i=>{var r,o;return((r=i.conditions)==null?void 0:r.actions)&&((o=i.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0}));n.length!==0&&(this.ar==null&&(this.ar=new Pgt(this._instance),this.ar.init(),this.ar.Qe((i=>{this.onAction(i)}))),n.forEach((i=>{var r,o,s,a,c;i.conditions&&(r=i.conditions)!=null&&r.actions&&(o=i.conditions)!=null&&(o=o.actions)!=null&&o.values&&((s=i.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0&&((a=this.ar)==null||a.register(i.conditions.actions.values),(c=i.conditions)==null||(c=c.actions)==null||(c=c.values)==null||c.forEach((l=>{if(l&&l.name){var u=this.rr.get(l.name);u&&u.push(i.id),this.rr.set(l.name,u||[i.id])}})))})))}sr(e){var n;e.filter((i=>{var r,o;return((r=i.conditions)==null?void 0:r.events)&&((o=i.conditions)==null||(o=o.events)==null||(o=o.values)==null?void 0:o.length)>0})).length!==0&&((n=this._instance)==null||n.Ye(((i,r)=>{this.onEvent(i,r)})),e.forEach((i=>{var r;(r=i.conditions)==null||(r=r.events)==null||(r=r.values)==null||r.forEach((o=>{if(o&&o.name){var s=this.er.get(o.name);s&&s.push(i.id),this.er.set(o.name,s||[i.id])}}))})))}onEvent(e,n){var i,r=((i=this._instance)==null||(i=i.persistence)==null?void 0:i.props[nL])||[];if(e==="survey shown"&&n&&r.length>0){var o;Pg.info("survey event matched, removing survey from activated surveys",{event:e,eventPayload:n,existingActivatedSurveys:r});var s=n==null||(o=n.properties)==null?void 0:o.$survey_id;if(s){var a=r.indexOf(s);a>=0&&(r.splice(a,1),this.lr(r))}}else this.er.has(e)&&(Pg.info("survey event matched, updating activated surveys",{event:e,surveys:this.er.get(e)}),this.lr(r.concat(this.er.get(e)||[])))}onAction(e){var n,i=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[nL])||[];this.rr.has(e)&&this.lr(i.concat(this.rr.get(e)||[]))}lr(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[nL]:[...new Set(e)]})}getSurveys(){var e,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[nL];return n||[]}getEventToSurveys(){return this.er}hr(){return this.ar}},Ogt=class{constructor(e){this.ur=void 0,this._surveyManager=null,this.dr=!1,this.vr=!1,this.cr=[],this._instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var n=e.surveys;if(Lh(n))return Pg.warn("Flags not loaded yet. Not loading surveys.");var i=mm(n);this.ur=i?n.length>0:n,Pg.info("flags response received, isSurveysEnabled: "+this.ur),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],n=0;n<localStorage.length;n++){var i=localStorage.key(n);(i!=null&&i.startsWith(QZ)||i!=null&&i.startsWith("inProgressSurvey_"))&&e.push(i)}e.forEach((r=>localStorage.removeItem(r)))}loadIfEnabled(){if(!this._surveyManager)if(this.vr)Pg.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)Pg.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode)Pg.info("Not loading surveys in cookieless mode.");else{var e=Bs?.__PosthogExtensions__;if(e){if(!br(this.ur)||this._instance.config.advanced_enable_surveys){var n=this.ur||this._instance.config.advanced_enable_surveys;this.vr=!0;try{var i=e.generateSurveys;if(i)return void this.pr(i,n);var r=e.loadExternalDependency;if(!r)return void this.gr("PostHog loadExternalDependency extension not found.");r(this._instance,"surveys",(o=>{o||!e.generateSurveys?this.gr("Could not load surveys script",o):this.pr(e.generateSurveys,n)}))}catch(o){throw this.gr("Error initializing surveys",o),o}finally{this.vr=!1}}}else Pg.error("PostHog Extensions not found.")}}pr(e,n){this._surveyManager=e(this._instance,n),this._surveyEventReceiver=new kgt(this._instance),Pg.info("Surveys loaded successfully"),this._r({isLoaded:!0})}gr(e,n){Pg.error(e,n),this._r({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.cr.push(e),this._surveyManager&&this._r({isLoaded:!0}),()=>{this.cr=this.cr.filter((n=>n!==e))}}getSurveys(e,n){if(n===void 0&&(n=!1),this._instance.config.disable_surveys)return Pg.info("Disabled. Not loading surveys."),e([]);var i=this._instance.get_property(sZ);if(i&&!n)return e(i,{isLoaded:!0});if(this.dr)return e([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.dr=!0,this._instance.Te({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:r=>{var o;this.dr=!1;var s=r.statusCode;if(s!==200||!r.json){var a="Surveys API could not be loaded, status: "+s;return Pg.error(a),e([],{isLoaded:!1,error:a})}var c,l=r.json.surveys||[],u=l.filter((d=>(function(h){return!(!h.start_date||h.end_date)})(d)&&((function(h){var f;return!((f=h.conditions)==null||(f=f.events)==null||(f=f.values)==null||!f.length)})(d)||(function(h){var f;return!((f=h.conditions)==null||(f=f.actions)==null||(f=f.values)==null||!f.length)})(d))));return u.length>0&&((c=this._surveyEventReceiver)==null||c.register(u)),(o=this._instance.persistence)==null||o.register({[sZ]:l}),e(l,{isLoaded:!0})}})}catch(r){throw this.dr=!1,r}}_r(e){for(var n of this.cr)try{if(!e.isLoaded)return n([],e);this.getSurveys(n)}catch(i){Pg.error("Error in survey callback",i)}}getActiveMatchingSurveys(e,n){if(n===void 0&&(n=!1),!Lh(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,n);Pg.warn("init was not called")}mr(e){var n=null;return this.getSurveys((i=>{var r;n=(r=i.find((o=>o.id===e)))!==null&&r!==void 0?r:null})),n}br(e){if(Lh(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var n=typeof e=="string"?this.mr(e):e;return n?this._surveyManager.checkSurveyEligibility(n):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(Lh(this._surveyManager))return Pg.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var n=this.br(e);return{visible:n.eligible,disabledReason:n.reason}}canRenderSurveyAsync(e,n){return Lh(this._surveyManager)?(Pg.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise((i=>{this.getSurveys((r=>{var o,s=(o=r.find((c=>c.id===e)))!==null&&o!==void 0?o:null;if(s){var a=this.br(s);i({visible:a.eligible,disabledReason:a.reason})}else i({visible:!1,disabledReason:"Survey not found"})}),n)}))}renderSurvey(e,n){if(Lh(this._surveyManager))Pg.warn("init was not called");else{var i=this.mr(e);if(i)if(Ngt.includes(i.type)){var r=Zr?.querySelector(n);r?this._surveyManager.renderSurvey(i,r):Pg.warn("Survey element not found")}else Pg.warn("Surveys of type "+i.type+" cannot be rendered in the app");else Pg.warn("Survey not found")}}};var L3e=g1("[RateLimiter]");let Lgt=class{constructor(e){var n,i;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=r=>{var o=r.text;if(o&&o.length)try{(JSON.parse(o).quota_limited||[]).forEach((s=>{L3e.info((s||"events")+" is quota limited."),this.serverLimits[s]=new Date().getTime()+6e4}))}catch(s){return void L3e.warn('could not rate limit - continuing. Error: "'+s?.message+'"',{text:o})}},this.instance=e,this.captureEventsPerSecond=((n=e.config.rate_limiting)==null?void 0:n.events_per_second)||10,this.captureEventsBurstLimit=Math.max(((i=e.config.rate_limiting)==null?void 0:i.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(e){var n,i,r;e===void 0&&(e=!1);var o=new Date().getTime(),s=(n=(i=this.instance.persistence)==null?void 0:i.get_property(cZ))!==null&&n!==void 0?n:{tokens:this.captureEventsBurstLimit,last:o};s.tokens+=(o-s.last)/1e3*this.captureEventsPerSecond,s.last=o,s.tokens>this.captureEventsBurstLimit&&(s.tokens=this.captureEventsBurstLimit);var a=s.tokens<1;return a||e||(s.tokens=Math.max(0,s.tokens-1)),!a||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+this.captureEventsPerSecond+" events per second and "+this.captureEventsBurstLimit+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=a,(r=this.instance.persistence)==null||r.set_property(cZ,s),{isRateLimited:a,remainingTokens:s.tokens}}isServerRateLimited(e){var n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}};var dT=g1("[RemoteConfig]");let Dgt=class{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=Bs._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}yr(e){var n,i;(n=Bs.__PosthogExtensions__)!=null&&n.loadExternalDependency?(i=Bs.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):(dT.error("PostHog Extensions not found. Cannot load remote config."),e())}wr(e){this._instance.Te({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:n=>{e(n.json)}})}load(){try{if(this.remoteConfig)return dT.info("Using preloaded remote config",this.remoteConfig),void this.Ce(this.remoteConfig);if(this._instance.L())return void dT.warn("Remote config is disabled. Falling back to local config.");this.yr((e=>{if(!e)return dT.info("No config found after loading remote JS config. Falling back to JSON."),void this.wr((n=>{this.Ce(n)}));this.Ce(e)}))}catch(e){dT.error("Error loading remote config",e)}}Ce(e){e?this._instance.config.__preview_remote_config?(this._instance.Ce(e),e.hasFeatureFlags!==!1&&this._instance.featureFlags.ensureFlagsLoaded()):dT.info("__preview_remote_config is disabled. Logging config instead",e):dT.error("Failed to fetch remote config from PostHog.")}};var JZ=3e3;let zgt=class{constructor(e,n){this.Sr=!0,this.$r=[],this.kr=x9(n?.flush_interval_ms||JZ,250,5e3,Yr.createLogger("flush interval"),JZ),this.Er=e}enqueue(e){this.$r.push(e),this.Ir||this.Rr()}unload(){this.Pr();var e=this.$r.length>0?this.Tr():{},n=Object.values(e);[...n.filter((i=>i.url.indexOf("/e")===0)),...n.filter((i=>i.url.indexOf("/e")!==0))].map((i=>{this.Er(Kr({},i,{transport:"sendBeacon"}))}))}enable(){this.Sr=!1,this.Rr()}Rr(){var e=this;this.Sr||(this.Ir=setTimeout((()=>{if(this.Pr(),this.$r.length>0){var n=this.Tr(),i=function(){var o=n[r],s=new Date().getTime();o.data&&mm(o.data)&&vf(o.data,(a=>{a.offset=Math.abs(a.timestamp-s),delete a.timestamp})),e.Er(o)};for(var r in n)i()}}),this.kr))}Pr(){clearTimeout(this.Ir),this.Ir=void 0}Tr(){var e={};return vf(this.$r,(n=>{var i,r=n,o=(r?r.batchKey:null)||r.url;br(e[o])&&(e[o]=Kr({},r,{data:[]})),(i=e[o].data)==null||i.push(r.data)})),this.$r=[],e}};var Fgt=["retriesPerformedSoFar"];let Bgt=class{constructor(e){this.Cr=!1,this.Mr=3e3,this.$r=[],this._instance=e,this.$r=[],this.Or=!0,!br(qn)&&"onLine"in qn.navigator&&(this.Or=qn.navigator.onLine,M_(qn,"online",(()=>{this.Or=!0,this.oe()})),M_(qn,"offline",(()=>{this.Or=!1})))}get length(){return this.$r.length}retriableRequest(e){var{retriesPerformedSoFar:n}=e,i=Nwe(e,Fgt);vx(n)&&n>0&&(i.url=vL(i.url,{retry_count:n})),this._instance.Te(Kr({},i,{callback:r=>{r.statusCode!==200&&(r.statusCode<400||r.statusCode>=500)&&(n??0)<10?this.Fr(Kr({retriesPerformedSoFar:n},i)):i.callback==null||i.callback(r)}}))}Fr(e){var n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;var i=(function(s){var a=3e3*Math.pow(2,s),c=a/2,l=Math.min(18e5,a),u=(Math.random()-.5)*(l-c);return Math.ceil(l+u)})(n),r=Date.now()+i;this.$r.push({retryAt:r,requestOptions:e});var o="Enqueued failed request for retry in "+i;navigator.onLine||(o+=" (Browser is offline)"),Yr.warn(o),this.Cr||(this.Cr=!0,this.Ar())}Ar(){this.Dr&&clearTimeout(this.Dr),this.Dr=setTimeout((()=>{this.Or&&this.$r.length>0&&this.oe(),this.Ar()}),this.Mr)}oe(){var e=Date.now(),n=[],i=this.$r.filter((o=>o.retryAt<e||(n.push(o),!1)));if(this.$r=n,i.length>0)for(var{requestOptions:r}of i)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.Dr&&(clearTimeout(this.Dr),this.Dr=void 0),this.$r))try{this._instance.Te(Kr({},e,{transport:"sendBeacon"}))}catch(n){Yr.error(n)}this.$r=[]}},Ugt=class{constructor(e){this.jr=()=>{var n,i,r,o;this.Lr||(this.Lr={});var s=this.scrollElement(),a=this.scrollY(),c=s?Math.max(0,s.scrollHeight-s.clientHeight):0,l=a+(s?.clientHeight||0),u=s?.scrollHeight||0;this.Lr.lastScrollY=Math.ceil(a),this.Lr.maxScrollY=Math.max(a,(n=this.Lr.maxScrollY)!==null&&n!==void 0?n:0),this.Lr.maxScrollHeight=Math.max(c,(i=this.Lr.maxScrollHeight)!==null&&i!==void 0?i:0),this.Lr.lastContentY=l,this.Lr.maxContentY=Math.max(l,(r=this.Lr.maxContentY)!==null&&r!==void 0?r:0),this.Lr.maxContentHeight=Math.max(u,(o=this.Lr.maxContentHeight)!==null&&o!==void 0?o:0)},this._instance=e}getContext(){return this.Lr}resetContext(){var e=this.Lr;return setTimeout(this.jr,0),e}startMeasuringScrollPosition(){M_(qn,"scroll",this.jr,{capture:!0}),M_(qn,"scrollend",this.jr,{capture:!0}),M_(qn,"resize",this.jr)}scrollElement(){if(!this._instance.config.scroll_root_selector)return qn?.document.documentElement;var e=mm(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var n of e){var i=qn?.document.querySelector(n);if(i)return i}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return qn&&(qn.scrollY||qn.pageYOffset||qn.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return qn&&(qn.scrollX||qn.pageXOffset||qn.document.documentElement.scrollLeft)||0}};var $gt=t=>M3e(t?.config.mask_personal_data_properties,t?.config.custom_personal_data_properties);let D3e=class{constructor(e,n,i,r){this.Nr=o=>{var s=this.zr();if(!s||s.sessionId!==o){var a={sessionId:o,props:this.Ur(this._instance)};this.qr.register({[aZ]:a})}},this._instance=e,this.Br=n,this.qr=i,this.Ur=r||$gt,this.Br.onSessionId(this.Nr)}zr(){return this.qr.props[aZ]}getSetOnceProps(){var e,n=(e=this.zr())==null?void 0:e.props;return n?"r"in n?A3e(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var e={};return vf(eZ(this.getSetOnceProps()),((n,i)=>{i==="$current_url"&&(i="url"),e["$session_entry_"+KW(i)]=n})),e}};var eK=g1("[SessionId]");let z3e=class{constructor(e,n,i){var r;if(this.Hr=[],this.Wr=(u,d)=>Math.abs(u-d)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode==="always")throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.A=e.config,this.qr=e.persistence,this.gi=void 0,this.Ft=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Gr=n||i4,this.Jr=i||i4;var o=this.A.persistence_name||this.A.token,s=this.A.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*x9(s,60,36e3,eK.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Vr(),this.Kr="ph_"+o+"_window_id",this.Yr="ph_"+o+"_primary_window_exists",this.Xr()){var a=qb.K(this.Kr),c=qb.K(this.Yr);a&&!c?this.gi=a:qb.X(this.Kr),qb.Y(this.Yr,!0)}if((r=this.A.bootstrap)!=null&&r.sessionID)try{var l=(u=>{var d=u.replace(/-/g,"");if(d.length!==32)throw new Error("Not a valid UUID");if(d[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(d.substring(0,12),16)})(this.A.bootstrap.sessionID);this.Qr(this.A.bootstrap.sessionID,new Date().getTime(),l)}catch(u){eK.error("Invalid sessionID in bootstrap",u)}this.Zr()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return br(this.Hr)&&(this.Hr=[]),this.Hr.push(e),this.Ft&&e(this.Ft,this.gi),()=>{this.Hr=this.Hr.filter((n=>n!==e))}}Xr(){return this.A.persistence!=="memory"&&!this.qr.je&&qb.G()}ts(e){e!==this.gi&&(this.gi=e,this.Xr()&&qb.Y(this.Kr,e))}es(){return this.gi?this.gi:this.Xr()?qb.K(this.Kr):null}Qr(e,n,i){e===this.Ft&&n===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=n,this.Ft=e,this.qr.register({[tL]:[n,e,i]}))}rs(){if(this.Ft&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this.Ft,this._sessionStartTimestamp];var e=this.qr.props[tL];return mm(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Qr(null,null,null)}Zr(){M_(qn,"beforeunload",(()=>{this.Xr()&&qb.X(this.Yr)}),{capture:!1})}checkAndGetSessionAndWindowId(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=null),this.A.cookieless_mode==="always")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=n||new Date().getTime(),[r,o,s]=this.rs(),a=this.es(),c=vx(s)&&s>0&&Math.abs(i-s)>864e5,l=!1,u=!o,d=!e&&this.Wr(i,r);u||d||c?(o=this.Gr(),a=this.Jr(),eK.info("new session ID generated",{sessionId:o,windowId:a,changeReason:{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:c}}),s=i,l=!0):a||(a=this.Jr(),l=!0);var h=r===0||!e||c?i:r,f=s===0?new Date().getTime():s;return this.ts(a),this.Qr(o,h,f),e||this.Vr(),l&&this.Hr.forEach((m=>m(o,a,l?{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:c}:void 0))),{sessionId:o,windowId:a,sessionStartTimestamp:f,changeReason:l?{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:c}:void 0,lastActivityTimestamp:r}}Vr(){clearTimeout(this.ss),this.ss=setTimeout((()=>{var[e]=this.rs();this.Wr(new Date().getTime(),e)&&this.resetSessionId()}),1.1*this.sessionTimeoutMs)}};var jgt=["$set_once","$set"],s4=g1("[SiteApps]");let Hgt=class{constructor(e){this._instance=e,this.ns=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}os(e,n){if(n){var i=this.globalsForEvent(n);this.ns.push(i),this.ns.length>1e3&&(this.ns=this.ns.slice(10))}}get siteAppLoaders(){var e;return(e=Bs._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance.Ye(this.os.bind(this));this.ls=()=>{e(),this.ns=[],this.ls=void 0}}}globalsForEvent(e){var n,i,r,o,s,a,c;if(!e)throw new Error("Event payload is required");var l={},u=this._instance.get_property("$groups")||[],d=this._instance.get_property("$stored_group_properties")||{};for(var[h,f]of Object.entries(d))l[h]={id:u[h],type:h,properties:f};var{$set_once:m,$set:y}=e;return{event:Kr({},Nwe(e,jgt),{properties:Kr({},e.properties,y?{$set:Kr({},(n=(i=e.properties)==null?void 0:i.$set)!==null&&n!==void 0?n:{},y)}:{},m?{$set_once:Kr({},(r=(o=e.properties)==null?void 0:o.$set_once)!==null&&r!==void 0?r:{},m)}:{}),elements_chain:(s=(a=e.properties)==null?void 0:a.$elements_chain)!==null&&s!==void 0?s:"",distinct_id:(c=e.properties)==null?void 0:c.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(e){var n=this.apps[e.id],i=()=>{var a;!n.errored&&this.ns.length&&(s4.info("Processing "+this.ns.length+" events for site app with id "+e.id),this.ns.forEach((c=>n.processEvent==null?void 0:n.processEvent(c))),n.processedBuffer=!0),Object.values(this.apps).every((c=>c.processedBuffer||c.errored))&&((a=this.ls)==null||a.call(this))},r=!1,o=a=>{n.errored=!a,n.loaded=!0,s4.info("Site app with id "+e.id+" "+(a?"loaded":"errored")),r&&i()};try{var{processEvent:s}=e.init({posthog:this._instance,callback:a=>{o(a)}});s&&(n.processEvent=s),r=!0}catch(a){s4.error("Error while initializing PostHog app with config id "+e.id,a),o(!1)}if(r&&n.loaded)try{i()}catch(a){s4.error("Error while processing buffered events PostHog app with config id "+e.id,a),n.errored=!0}}hs(){var e=this.siteAppLoaders||[];for(var n of e)this.apps[n.id]={id:n.id,loaded:!1,errored:!1,processedBuffer:!1};for(var i of e)this.setupSiteApp(i)}us(e){if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(e);for(var i of Object.values(this.apps))try{i.processEvent==null||i.processEvent(n)}catch(r){s4.error("Error while processing event "+e.event+" for site app "+i.id,r)}}}onRemoteConfig(e){var n,i,r,o=this;if((n=this.siteAppLoaders)!=null&&n.length)return this.isEnabled?(this.hs(),void this._instance.on("eventCaptured",(l=>this.us(l)))):void s4.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((i=this.ls)==null||i.call(this),(r=e.siteApps)!=null&&r.length)if(this.isEnabled){var s=function(l){var u;Bs["__$$ph_site_app_"+l]=o._instance,(u=Bs.__PosthogExtensions__)==null||u.loadSiteApp==null||u.loadSiteApp(o._instance,c,(d=>{if(d)return s4.error("Error while initializing PostHog app with config id "+l,d)}))};for(var{id:a,url:c}of e.siteApps)s(a)}else s4.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}};var Vgt=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],F3e=function(t,e){if(!t)return!1;var n=t.toLowerCase();return Vgt.concat(e||[]).some((i=>{var r=i.toLowerCase();return n.indexOf(r)!==-1}))},B3e=function(t,e){if(!t)return!1;var n=t.userAgent;if(n&&F3e(n,e))return!0;try{var i=t?.userAgentData;if(i!=null&&i.brands&&i.brands.some((r=>F3e(r?.brand,e))))return!0}catch{}return!!t.webdriver},TR=(function(t){return t.US="us",t.EU="eu",t.CUSTOM="custom",t})({}),U3e="i.posthog.com";let Ggt=class{constructor(e){this.ds={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get uiHost(){var e,n=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+U3e,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.ds[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.ds[this.apiHost]=TR.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.ds[this.apiHost]=TR.EU:this.ds[this.apiHost]=TR.CUSTOM),this.ds[this.apiHost]}endpointFor(e,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),e==="ui")return this.uiHost+n;if(this.region===TR.CUSTOM)return this.apiHost+n;var i=U3e+n;switch(e){case"assets":return"https://"+this.region+"-assets."+i;case"api":return"https://"+this.region+"."+i}}};var Ygt={icontains:(t,e)=>!!qn&&e.href.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>!!qn&&e.href.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>!!qn&&I8(e.href,t),not_regex:(t,e)=>!!qn&&!I8(e.href,t),exact:(t,e)=>e.href===t,is_not:(t,e)=>e.href!==t};let qgt=class Lv{constructor(e){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(i){i===void 0&&(i=!1),n.getWebExperiments((r=>{Lv.vs("retrieved web experiments from the server"),n.cs=new Map,r.forEach((o=>{if(o.feature_flag_key){var s;n.cs&&(Lv.vs("setting flag key ",o.feature_flag_key," to web experiment ",o),(s=n.cs)==null||s.set(o.feature_flag_key,o));var a=n._instance.getFeatureFlag(o.feature_flag_key);cy(a)&&o.variants[a]&&n.fs(o.name,a,o.variants[a].transforms)}else if(o.variants)for(var c in o.variants){var l=o.variants[c];Lv.ps(l)&&n.fs(o.name,c,l.transforms)}}))}),i)},this._instance=e,this._instance.onFeatureFlags((i=>{this.onFeatureFlags(i)}))}onFeatureFlags(e){if(this._is_bot())Lv.vs("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(Lh(this.cs))return this.cs=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Lv.vs("applying feature flags",e),e.forEach((n=>{var i;if(this.cs&&(i=this.cs)!=null&&i.has(n)){var r,o=this._instance.getFeatureFlag(n),s=(r=this.cs)==null?void 0:r.get(n);o&&s!=null&&s.variants[o]&&this.fs(s.name,o,s.variants[o].transforms)}}))}}previewWebExperiment(){var e=Lv.getWindowLocation();if(e!=null&&e.search){var n=lL(e?.search,"__experiment_id"),i=lL(e?.search,"__experiment_variant");n&&i&&(Lv.vs("previewing web experiments "+n+" && "+i),this.getWebExperiments((r=>{this.gs(parseInt(n),i,r)}),!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,i){if(this._instance.config.disable_web_experiments&&!i)return e([]);var r=this._instance.get_property("$web_experiments");if(r&&!n)return e(r);this._instance.Te({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:o=>{if(o.statusCode!==200||!o.json)return e([]);var s=o.json.experiments||[];return e(s)}})}gs(e,n,i){var r=i.filter((o=>o.id===e));r&&r.length>0&&(Lv.vs("Previewing web experiment ["+r[0].name+"] with variant ["+n+"]"),this.fs(r[0].name,n,r[0].variants[n].transforms))}static ps(e){return!Lh(e.conditions)&&Lv._s(e)&&Lv.bs(e)}static _s(e){var n;if(Lh(e.conditions)||Lh((n=e.conditions)==null?void 0:n.url))return!0;var i,r,o,s=Lv.getWindowLocation();return!!s&&((i=e.conditions)==null||!i.url||Ygt[(r=(o=e.conditions)==null?void 0:o.urlMatchType)!==null&&r!==void 0?r:"icontains"](e.conditions.url,s))}static getWindowLocation(){return qn?.location}static bs(e){var n;if(Lh(e.conditions)||Lh((n=e.conditions)==null?void 0:n.utm))return!0;var i=v3e();if(i.utm_source){var r,o,s,a,c,l,u,d,h=(r=e.conditions)==null||(r=r.utm)==null||!r.utm_campaign||((o=e.conditions)==null||(o=o.utm)==null?void 0:o.utm_campaign)==i.utm_campaign,f=(s=e.conditions)==null||(s=s.utm)==null||!s.utm_source||((a=e.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==i.utm_source,m=(c=e.conditions)==null||(c=c.utm)==null||!c.utm_medium||((l=e.conditions)==null||(l=l.utm)==null?void 0:l.utm_medium)==i.utm_medium,y=(u=e.conditions)==null||(u=u.utm)==null||!u.utm_term||((d=e.conditions)==null||(d=d.utm)==null?void 0:d.utm_term)==i.utm_term;return h&&m&&y&&f}return!1}static vs(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];Yr.info("[WebExperiments] "+e,i)}fs(e,n,i){this._is_bot()?Lv.vs("Refusing to render web experiment since the viewer is a likely bot"):n!=="control"?i.forEach((r=>{if(r.selector){var o;Lv.vs("applying transform of variant "+n+" for experiment "+e+" ",r);var s=(o=document)==null?void 0:o.querySelectorAll(r.selector);s?.forEach((a=>{var c=a;r.html&&(c.innerHTML=r.html),r.css&&c.setAttribute("style",r.css)}))}})):Lv.vs("Control variants leave the page unmodified.")}_is_bot(){return b9&&this._instance?B3e(b9,this._instance.config.custom_blocked_useragents):void 0}};var Xgt=g1("[PostHog ExternalIntegrations]"),Wgt={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};let Zgt=class{constructor(e){this._instance=e}nt(e,n){var i;(i=Bs.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this._instance,e,(r=>{if(r)return Xgt.error("failed to load script",r);n()}))}startIfEnabledOrStop(){var e=this,n=function(s){var a,c,l;!r||(a=Bs.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[s]||e.nt(Wgt[s],(()=>{var u;(u=Bs.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[s])==null||u.start(e._instance)})),!r&&(c=Bs.__PosthogExtensions__)!=null&&(c=c.integrations)!=null&&c[s]&&((l=Bs.__PosthogExtensions__)==null||(l=l.integrations)==null||(l=l[s])==null||l.stop())};for(var[i,r]of Object.entries((o=this._instance.config.integrations)!==null&&o!==void 0?o:{})){var o;n(i)}}};var tK="[SessionRecording]",ML=g1(tK);let Kgt=class{get started(){var e;return!((e=this.ys)==null||!e.isStarted)}get status(){var e;return this.qt?((e=this.ys)==null?void 0:e.status)||"lazy_loading":CS}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this._instance=e,!this._instance.sessionManager)throw ML.error("started without valid sessionManager"),new Error(tK+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(tK+' cannot be used with cookieless_mode="always"')}get qt(){var e=!!this._instance.get_property(sR),n=!this._instance.config.disable_session_recording,i=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return qn&&e&&n&&!i}startIfEnabledOrStop(e){var n;if(!this.qt||(n=this.ys)==null||!n.isStarted){var i=!br(Object.assign)&&!br(Array.from);this.qt&&i?(this.ws(e),ML.info("starting")):this.stopRecording()}}ws(e){var n,i,r;this.qt&&(Bs!=null&&(n=Bs.__PosthogExtensions__)!=null&&(n=n.rrweb)!=null&&n.record&&(i=Bs.__PosthogExtensions__)!=null&&i.initSessionRecording?this.Ri(e):(r=Bs.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.Pi,(o=>{if(o)return ML.error("could not load recorder",o);this.Ri(e)})))}stopRecording(){var e;(e=this.ys)==null||e.stop()}onRemoteConfig(e){this.Ss=e;var n,i=this._instance.persistence;i&&i.register({[sR]:!!e.sessionRecording,[eL]:(n=e.sessionRecording)==null?void 0:n.scriptConfig}),this.ys?(this.ys.onRemoteConfig(e),this.Ss=void 0):this.ws(),this.startIfEnabledOrStop()}log(e,n){var i;n===void 0&&(n="log"),(i=this.ys)!=null&&i.log?this.ys.log(e,n):ML.warn("log called before recorder was ready")}get Pi(){var e;return((e=this._instance)==null||(e=e.persistence)==null||(e=e.get_property(eL))==null?void 0:e.script)||"lazy-recorder"}Ri(e){var n,i;if((n=Bs.__PosthogExtensions__)==null||!n.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.ys||(this.ys=(i=Bs.__PosthogExtensions__)==null?void 0:i.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture,this.Ss&&(this.ys.onRemoteConfig(this.Ss),this.Ss=void 0)),this.ys.start(e)}onRRwebEmit(e){var n;(n=this.ys)==null||n.onRRwebEmit==null||n.onRRwebEmit(e)}overrideLinkedFlag(){var e;(e=this.ys)==null||e.overrideLinkedFlag()}overrideSampling(){var e;(e=this.ys)==null||e.overrideSampling()}overrideTrigger(e){var n;(n=this.ys)==null||n.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.ys)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}};var MR={},nK=()=>{},D8="posthog",$3e=!lgt&&Fv?.indexOf("MSIE")===-1&&Fv?.indexOf("Mozilla")===-1,j3e=t=>{var e;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:U_t(Zr?.location),persistence:"localStorage+cookie",persistence_name:"",loaded:nK,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:t!=="2025-05-24"||"history_change",capture_pageleave:"if_capture_pageview",defaults:t??"unset",debug:zv&&cy(zv?.search)&&zv.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(qn==null||(e=qn.location)==null?void 0:e.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:n=>{var i="Bad HTTP status: "+n.statusCode+" "+n.text;Yr.error(i)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:JZ},error_tracking:{},_onCapture:nK}},H3e=t=>{var e={};br(t.process_person)||(e.person_profiles=t.process_person),br(t.xhr_headers)||(e.request_headers=t.xhr_headers),br(t.cookie_name)||(e.persistence_name=t.cookie_name),br(t.disable_cookie)||(e.disable_persistence=t.disable_cookie),br(t.store_google)||(e.save_campaign_params=t.store_google),br(t.verbose)||(e.debug=t.verbose);var n=Yy({},e,t);return mm(t.property_blacklist)&&(br(t.property_denylist)?n.property_denylist=t.property_blacklist:mm(t.property_denylist)?n.property_denylist=[...t.property_blacklist,...t.property_denylist]:Yr.error("Invalid value for property_denylist config: "+t.property_denylist)),n};let Qgt=class{constructor(){this.__forceAllowLocalhost=!1}get $s(){return this.__forceAllowLocalhost}set $s(e){Yr.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}},V3e=class P0t{get decideEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){this.webPerformance=new Qgt,this.ks=!1,this.version=wS.LIB_VERSION,this.xs=new N3e,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=j3e(),this.SentryIntegration=Jyt,this.sentryIntegration=e=>(function(n,i){var r=XSe(n,i);return{name:qSe,processEvent:o=>r(o)}})(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Es=!1,this.Is=null,this.Rs=null,this.Ps=null,this.featureFlags=new Cgt(this),this.toolbar=new tgt(this),this.scrollManager=new Ugt(this),this.pageViewManager=new agt(this),this.surveys=new Ogt(this),this.experiments=new qgt(this),this.exceptions=new dgt(this),this.rateLimiter=new Lgt(this),this.requestRouter=new Ggt(this),this.consent=new uyt(this),this.externalIntegrations=new Zgt(this),this.people={set:(e,n,i)=>{var r=cy(e)?{[e]:n}:e;this.setPersonProperties(r),i?.({})},set_once:(e,n,i)=>{var r=cy(e)?{[e]:n}:e;this.setPersonProperties(void 0,r),i?.({})}},this.on("eventCaptured",(e=>Yr.info('send "'+e?.event+'"',e)))}init(e,n,i){if(i&&i!==D8){var r,o=(r=MR[i])!==null&&r!==void 0?r:new P0t;return o._init(e,n,i),MR[i]=o,MR[D8][i]=o,o}return this._init(e,n,i)}_init(e,n,i){var r,o;if(n===void 0&&(n={}),br(e)||QW(e))return Yr.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return Yr.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},this.Ts=n,this.Cs=[],n.person_profiles&&(this.Rs=n.person_profiles),this.set_config(Yy({},j3e(n.defaults),H3e(n),{name:i,token:e})),this.config.on_xhr_error&&Yr.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:ES.GZipJS;var s=this.Ms();this.persistence=new WZ(this.config,s),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new WZ(Kr({},this.config,{persistence:"sessionStorage"}),s);var a=Kr({},this.persistence.props),c=Kr({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Os=new zgt((w=>this.Fs(w)),this.config.request_queue_config),this.As=new Bgt(this),this.__request_queue=[];var l=this.config.cookieless_mode==="always"||this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut();if(l||(this.sessionManager=new z3e(this),this.sessionPropsManager=new D3e(this,this.sessionManager,this.persistence)),new igt(this).startIfEnabledOrStop(),this.siteApps=new Hgt(this),(r=this.siteApps)==null||r.init(),l||(this.config.__preview_lazy_load_replay?this.sessionRecording=new Kgt(this):this.sessionRecording=new YSe(this),this.sessionRecording.startIfEnabledOrStop()),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new tyt(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new sgt(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new rgt(this),this.exceptionObserver=new pyt(this),this.exceptionObserver.startIfEnabled(),this.deadClicksAutocapture=new gSe(this,hyt),this.deadClicksAutocapture.startIfEnabled(),this.historyAutocapture=new Ayt(this),this.historyAutocapture.startIfEnabled(),wS.DEBUG=wS.DEBUG||this.config.debug,wS.DEBUG&&Yr.info("Starting in debug mode",{this:this,config:n,thisC:Kr({},this.config),p:a,s:c}),((o=n.bootstrap)==null?void 0:o.distinctID)!==void 0){var u,d,h=this.config.get_device_id(i4()),f=(u=n.bootstrap)!=null&&u.isIdentifiedID?h:n.bootstrap.distinctID;this.persistence.set_property(SS,(d=n.bootstrap)!=null&&d.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:n.bootstrap.distinctID,$device_id:f})}if(this.Ds()){var m,y,g=Object.keys(((m=n.bootstrap)==null?void 0:m.featureFlags)||{}).filter((w=>{var T;return!((T=n.bootstrap)==null||(T=T.featureFlags)==null||!T[w])})).reduce(((w,T)=>{var N;return w[T]=((N=n.bootstrap)==null||(N=N.featureFlags)==null?void 0:N[T])||!1,w}),{}),b=Object.keys(((y=n.bootstrap)==null?void 0:y.featureFlagPayloads)||{}).filter((w=>g[w])).reduce(((w,T)=>{var N,R;return(N=n.bootstrap)!=null&&(N=N.featureFlagPayloads)!=null&&N[T]&&(w[T]=(R=n.bootstrap)==null||(R=R.featureFlagPayloads)==null?void 0:R[T]),w}),{});this.featureFlags.receivedFeatureFlags({featureFlags:g,featureFlagPayloads:b})}if(l)this.register_once({distinct_id:uR,$device_id:null},"");else if(!this.get_distinct_id()){var v=this.config.get_device_id(i4());this.register_once({distinct_id:v,$device_id:v},""),this.persistence.set_property(SS,"anonymous")}return M_(qn,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),n.segment?Qyt(this,(()=>this.js())):this.js(),d2(this.config._onCapture)&&this.config._onCapture!==nK&&(Yr.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(w=>this.config._onCapture(w.event,w)))),this.config.ip&&Yr.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Ce(e){var n,i,r,o,s,a,c,l;if(!Zr||!Zr.body)return Yr.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Ce(e)}),500);this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=zl(e.supportedCompression,ES.GZipJS)?ES.GZipJS:zl(e.supportedCompression,ES.Base64)?ES.Base64:void 0),(n=e.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Rs?this.Rs:"identified_only"}),(i=this.siteApps)==null||i.onRemoteConfig(e),(r=this.sessionRecording)==null||r.onRemoteConfig(e),(o=this.autocapture)==null||o.onRemoteConfig(e),(s=this.heatmaps)==null||s.onRemoteConfig(e),this.surveys.onRemoteConfig(e),(a=this.webVitalsAutocapture)==null||a.onRemoteConfig(e),(c=this.exceptionObserver)==null||c.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),(l=this.deadClicksAutocapture)==null||l.onRemoteConfig(e)}js(){try{this.config.loaded(this)}catch(e){Yr.critical("`loaded` function failed",e)}this.Ls(),this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.config.cookieless_mode==="always")&&this.Ns()}),1),new Dgt(this).load(),this.featureFlags.flags()}Ls(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.Os)==null||e.enable())}_dom_loaded(){this.is_capturing()&&t4(this.__request_queue,(e=>this.Fs(e))),this.__request_queue=[],this.Ls()}_handle_unload(){var e,n;this.config.request_batching?(this.zs()&&this.capture("$pageleave"),(e=this.Os)==null||e.unload(),(n=this.As)==null||n.unload()):this.zs()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}Te(e){this.__loaded&&($3e?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=vL(e.url,{ip:this.config.ip?1:0}),e.headers=Kr({},this.config.request_headers),e.compression=e.compression==="best-available"?this.compression:e.compression,e.fetchOptions=e.fetchOptions||this.config.fetch_options,(n=>{var i,r,o,s=Kr({},n);s.timeout=s.timeout||6e4,s.url=vL(s.url,{_:new Date().getTime().toString(),ver:wS.LIB_VERSION,compression:s.compression});var a=(i=s.transport)!==null&&i!==void 0?i:"fetch",c=(r=(o=Bwe(gR,(l=>l.transport===a)))==null?void 0:o.method)!==null&&r!==void 0?r:gR[0].method;if(!c)throw new Error("No available transport method");c(s)})(Kr({},e,{callback:n=>{var i,r;this.rateLimiter.checkForLimiting(n),n.statusCode>=400&&((i=(r=this.config).on_request_error)==null||i.call(r,n)),e.callback==null||e.callback(n)}}))))}Fs(e){this.As?this.As.retriableRequest(e):this.Te(e)}_execute_array(e){var n,i=[],r=[],o=[];t4(e,(a=>{a&&(n=a[0],mm(n)?o.push(a):d2(a)?a.call(this):mm(a)&&n==="alias"?i.push(a):mm(a)&&n.indexOf("capture")!==-1&&d2(this[n])?o.push(a):r.push(a))}));var s=function(a,c){t4(a,(function(l){if(mm(l[0])){var u=c;vf(l,(function(d){u=u[d[0]].apply(u,d.slice(1))}))}else this[l[0]].apply(this,l.slice(1))}),c)};s(i,this),s(r,this),s(o,this)}Ds(){var e,n;return((e=this.config.bootstrap)==null?void 0:e.featureFlags)&&Object.keys((n=this.config.bootstrap)==null?void 0:n.featureFlags).length>0||!1}push(e){this._execute_array([e])}capture(e,n,i){var r;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Os){if(this.is_capturing())if(!br(e)&&cy(e)){if(this.config.opt_out_useragent_filter||!this._is_bot()){var o=i!=null&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(o==null||!o.isRateLimited){n!=null&&n.$current_url&&!cy(n?.$current_url)&&(Yr.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var s=new Date,a=i?.timestamp||s,c=i4(),l={uuid:c,event:e,properties:this.calculateEventProperties(e,n||{},a,c)};o&&(l.properties.$lib_rate_limit_remaining_tokens=o.remainingTokens),i?.$set&&(l.$set=i?.$set);var u,d=this.Us(i?.$set_once);if(d&&(l.$set_once=d),(l=F_t(l,i!=null&&i._noTruncate?null:this.config.properties_string_max_length)).timestamp=a,br(i?.timestamp)||(l.properties.$event_time_override_provided=!0,l.properties.$event_time_override_system_time=s),e===KZ.DISMISSED||e===KZ.SENT){var h=n?.[k3e.SURVEY_ID],f=n?.[k3e.SURVEY_ITERATION];u={id:h,current_iteration:f},localStorage.getItem(O3e(u))||localStorage.setItem(O3e(u),"true"),l.$set=Kr({},l.$set,{[Igt({id:h,current_iteration:f},e===KZ.SENT?"responded":"dismissed")]:!0})}var m=Kr({},l.properties.$set,l.$set);if(T8(m)||this.setPersonPropertiesForFlags(m),!Lh(this.config.before_send)){var y=this.qs(l);if(!y)return;l=y}this.xs.emit("eventCaptured",l);var g={method:"POST",url:(r=i?._url)!==null&&r!==void 0?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:l,compression:"best-available",batchKey:i?._batchKey};return!this.config.request_batching||i&&(i==null||!i._batchKey)||i!=null&&i.send_instantly?this.Fs(g):this.Os.enqueue(g),l}Yr.critical("This capture call is ignored due to client rate limiting.")}}else Yr.error("No event name provided to posthog.capture")}else Yr.uninitializedWarning("posthog.capture")}Ye(e){return this.on("eventCaptured",(n=>e(n.event,n)))}calculateEventProperties(e,n,i,r,o){if(i=i||new Date,!this.persistence||!this.sessionPersistence)return n;var s=o?void 0:this.persistence.remove_event_timer(e),a=Kr({},n);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,(this.config.cookieless_mode=="always"||this.config.cookieless_mode=="on_reject"&&this.consent.isExplicitlyOptedOut())&&(a.$cookieless_mode=!0),e==="$snapshot"){var c=Kr({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=c.distinct_id,(!cy(a.distinct_id)&&!vx(a.distinct_id)||QW(a.distinct_id))&&Yr.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var l,u=Tgt(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:d,windowId:h}=this.sessionManager.checkAndGetSessionAndWindowId(o,i.getTime());a.$session_id=d,a.$window_id=h}this.sessionPropsManager&&Yy(a,this.sessionPropsManager.getSessionProps());try{var f;this.sessionRecording&&Yy(a,this.sessionRecording.sdkDebugProperties),a.$sdk_debug_retry_queue_size=(f=this.As)==null?void 0:f.length}catch(b){a.$sdk_debug_error_capturing_properties=String(b)}if(this.requestRouter.region===TR.CUSTOM&&(a.$lib_custom_api_host=this.config.api_host),l=e!=="$pageview"||o?e!=="$pageleave"||o?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(i):this.pageViewManager.doPageView(i,r),a=Yy(a,l),e==="$pageview"&&Zr&&(a.title=Zr.title),!br(s)){var m=i.getTime()-s;a.$duration=parseFloat((m/1e3).toFixed(3))}Fv&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=Yy({},u,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),mm(this.config.property_denylist)?vf(this.config.property_denylist,(function(b){delete a[b]})):Yr.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var y=this.config.sanitize_properties;y&&(Yr.error("sanitize_properties is deprecated. Use before_send instead"),a=y(a,e));var g=this.Bs();return a.$process_person_profile=g,g&&!o&&this.Hs("_calculate_event_properties"),a}Us(e){var n;if(!this.persistence||!this.Bs()||this.ks)return e;var i=this.persistence.get_initial_props(),r=(n=this.sessionPropsManager)==null?void 0:n.getSetOnceProps(),o=Yy({},i,r||{},e||{}),s=this.config.sanitize_properties;return s&&(Yr.error("sanitize_properties is deprecated. Use before_send instead"),o=s(o,"$set_once")),this.ks=!0,T8(o)?void 0:o}register(e,n){var i;(i=this.persistence)==null||i.register(e,n)}register_once(e,n,i){var r;(r=this.persistence)==null||r.register_once(e,n,i)}register_for_session(e){var n;(n=this.sessionPersistence)==null||n.register(e)}unregister(e){var n;(n=this.persistence)==null||n.unregister(e)}unregister_for_session(e){var n;(n=this.sessionPersistence)==null||n.unregister(e)}Ws(e,n){this.register({[e]:n})}getFeatureFlag(e,n){return this.featureFlags.getFeatureFlag(e,n)}getFeatureFlagPayload(e){var n=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(n)}catch{return n}}isFeatureEnabled(e,n){return this.featureFlags.isFeatureEnabled(e,n)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(e,n,i){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,n,i)}getEarlyAccessFeatures(e,n,i){return n===void 0&&(n=!1),this.featureFlags.getEarlyAccessFeatures(e,n,i)}on(e,n){return this.xs.on(e,n)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSurveysLoaded(e){return this.surveys.onSurveysLoaded(e)}onSessionId(e){var n,i;return(n=(i=this.sessionManager)==null?void 0:i.onSessionId(e))!==null&&n!==void 0?n:()=>{}}getSurveys(e,n){n===void 0&&(n=!1),this.surveys.getSurveys(e,n)}getActiveMatchingSurveys(e,n){n===void 0&&(n=!1),this.surveys.getActiveMatchingSurveys(e,n)}renderSurvey(e,n){this.surveys.renderSurvey(e,n)}canRenderSurvey(e){return this.surveys.canRenderSurvey(e)}canRenderSurveyAsync(e,n){return n===void 0&&(n=!1),this.surveys.canRenderSurveyAsync(e,n)}identify(e,n,i){if(!this.__loaded||!this.persistence)return Yr.uninitializedWarning("posthog.identify");if(vx(e)&&(e=e.toString(),Yr.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e)if(["distinct_id","distinctid"].includes(e.toLowerCase()))Yr.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if(e!==uR){if(this.Hs("posthog.identify")){var r=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var o=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:o},"")}e!==r&&e!==this.get_property(rR)&&(this.unregister(rR),this.register({distinct_id:e}));var s=(this.persistence.get_property(SS)||"anonymous")==="anonymous";e!==r&&s?(this.persistence.set_property(SS,"identified"),this.setPersonPropertiesForFlags(Kr({},i||{},n||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:n||{},$set_once:i||{}}),this.Ps=e3e(e,n,i),this.featureFlags.setAnonymousDistinctId(r)):(n||i)&&this.setPersonProperties(n,i),e!==r&&(this.reloadFeatureFlags(),this.unregister(iL))}}else Yr.critical('The string "'+uR+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else Yr.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,n){if((e||n)&&this.Hs("posthog.setPersonProperties")){var i=e3e(this.get_distinct_id(),e,n);this.Ps!==i?(this.setPersonPropertiesForFlags(Kr({},n||{},e||{})),this.capture("$set",{$set:e||{},$set_once:n||{}}),this.Ps=i):Yr.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,n,i){if(e&&n){if(this.Hs("posthog.group")){var r=this.getGroups();r[e]!==n&&this.resetGroupPropertiesForFlags(e),this.register({$groups:Kr({},r,{[e]:n})}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:n,$group_set:i}),this.setGroupPropertiesForFlags({[e]:i})),r[e]===n||i||this.reloadFeatureFlags()}}else Yr.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n){n===void 0&&(n=!0),this.featureFlags.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,n){n===void 0&&(n=!0),this.Hs("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,n)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){var n,i,r,o;if(Yr.info("reset"),!this.__loaded)return Yr.uninitializedWarning("posthog.reset");var s=this.get_property("$device_id");if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(i=this.sessionPersistence)==null||i.clear(),this.surveys.reset(),this.featureFlags.reset(),(r=this.persistence)==null||r.set_property(SS,"anonymous"),(o=this.sessionManager)==null||o.resetSessionId(),this.Ps=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:uR,$device_id:null},"");else{var a=this.config.get_device_id(i4());this.register_once({distinct_id:a,$device_id:e?a:s},"")}this.register({$last_posthog_reset:new Date().toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,n;return(e=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:i}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(e!=null&&e.withTimestamp&&i){var o,s=(o=e.timestampLookBack)!==null&&o!==void 0?o:10;if(!i)return r;r+="?t="+Math.max(Math.floor((new Date().getTime()-i)/1e3)-s,0)}return r}alias(e,n){return e===this.get_property(Uwe)?(Yr.critical("Attempting to create alias for existing People user - aborting."),-2):this.Hs("posthog.alias")?(br(n)&&(n=this.get_distinct_id()),e!==n?(this.Ws(rR,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(Yr.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var n=Kr({},this.config);if(ay(e)){var i,r,o,s,a;Yy(this.config,H3e(e));var c=this.Ms();(i=this.persistence)==null||i.update_config(this.config,n,c),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new WZ(Kr({},this.config,{persistence:"sessionStorage"}),c),b1.G()&&b1.V("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(wS.DEBUG=!0,Yr.info("set_config",{config:e,oldConfig:n,newConfig:Kr({},this.config)})),(r=this.sessionRecording)==null||r.startIfEnabledOrStop(),(o=this.autocapture)==null||o.startIfEnabled(),(s=this.heatmaps)==null||s.startIfEnabled(),this.surveys.loadIfEnabled(),this.Gs(),(a=this.externalIntegrations)==null||a.startIfEnabledOrStop()}}startSessionRecording(e){var n=e===!0,i={sampling:n||!(e==null||!e.sampling),linked_flag:n||!(e==null||!e.linked_flag),url_trigger:n||!(e==null||!e.url_trigger),event_trigger:n||!(e==null||!e.event_trigger)};if(Object.values(i).some(Boolean)){var r,o,s,a,c;(r=this.sessionManager)==null||r.checkAndGetSessionAndWindowId(),i.sampling&&((o=this.sessionRecording)==null||o.overrideSampling()),i.linked_flag&&((s=this.sessionRecording)==null||s.overrideLinkedFlag()),i.url_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger("url")),i.event_trigger&&((c=this.sessionRecording)==null||c.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,n){var i=new Error("PostHog syntheticException");return this.exceptions.sendExceptionEvent(Kr({},Myt((r=>r instanceof Error)(e)?{error:e,event:e.message}:{event:e},{syntheticException:i}),n))}loadToolbar(e){return this.toolbar.loadToolbar(e)}get_property(e){var n;return(n=this.persistence)==null?void 0:n.props[e]}getSessionProperty(e){var n;return(n=this.sessionPersistence)==null?void 0:n.props[e]}toString(){var e,n=(e=this.config.name)!==null&&e!==void 0?e:D8;return n!==D8&&(n=D8+"."+n),n}_isIdentified(){var e,n;return((e=this.persistence)==null?void 0:e.get_property(SS))==="identified"||((n=this.sessionPersistence)==null?void 0:n.get_property(SS))==="identified"}Bs(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&T8(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[rR])&&((n=this.persistence)==null||(n=n.props)==null||!n[oL]))}zs(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Bs()||this.Hs("posthog.createPersonProfile")&&this.setPersonProperties({},{})}Hs(e){return this.config.person_profiles==="never"?(Yr.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Ws(oL,!0),!0)}Ms(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut(),n=this.config.opt_out_persistence_by_default||this.config.cookieless_mode==="on_reject";return this.config.disable_persistence||e&&!!n}Gs(){var e,n,i,r,o=this.Ms();return((e=this.persistence)==null?void 0:e.je)!==o&&((i=this.persistence)==null||i.set_disabled(o)),((n=this.sessionPersistence)==null?void 0:n.je)!==o&&((r=this.sessionPersistence)==null||r.set_disabled(o)),o}opt_in_capturing(e){if(this.config.cookieless_mode!=="always"){var n;this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),this.sessionManager=new z3e(this),this.persistence&&(this.sessionPropsManager=new D3e(this,this.sessionManager,this.persistence)),this.sessionRecording=new YSe(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.Gs(),(br(e?.captureEventName)||e!=null&&e.captureEventName)&&this.capture((n=e?.captureEventName)!==null&&n!==void 0?n:"$opt_in",e?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ns()}else Yr.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e;this.config.cookieless_mode!=="always"?(this.config.cookieless_mode==="on_reject"&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Gs(),this.config.cookieless_mode==="on_reject"&&(this.register({distinct_id:uR,$device_id:null}),this.sessionManager=void 0,this.sessionPropsManager=void 0,(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,this.Ns())):Yr.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===TS.GRANTED?"granted":e===TS.DENIED?"denied":"pending"}is_capturing(){return this.config.cookieless_mode==="always"||(this.config.cookieless_mode==="on_reject"?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Gs()}_is_bot(){return b9?B3e(b9,this.config.custom_blocked_useragents):void 0}Ns(){Zr&&(Zr.visibilityState==="visible"?this.Es||(this.Es=!0,this.capture("$pageview",{title:Zr.title},{send_instantly:!0}),this.Is&&(Zr.removeEventListener("visibilitychange",this.Is),this.Is=null)):this.Is||(this.Is=this.Ns.bind(this),M_(Zr,"visibilitychange",this.Is)))}debug(e){e===!1?(qn?.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(qn?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}L(){var e,n,i,r,o,s,a,c=this.Ts||{};return"advanced_disable_flags"in c?!!c.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(Yr.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(i="advanced_disable_decide",r=!1,o=Yr,s=(n="advanced_disable_flags")in(e=c)&&!br(e[n]),a=i in e&&!br(e[i]),s?e[n]:a?(o&&o.warn("Config field '"+i+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),e[i]):r)}qs(e){if(Lh(this.config.before_send))return e;var n=mm(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var r of n){if(i=r(i),Lh(i)){var o="Event '"+e.event+"' was rejected in beforeSend function";return k_t(e.event)?Yr.warn(o+". This can cause unexpected behavior."):Yr.info(o),null}i.properties&&!T8(i.properties)||Yr.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;return(e=this.pageViewManager.pe)==null?void 0:e.pageViewId}captureTraceFeedback(e,n){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:n})}captureTraceMetric(e,n,i){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:n,$ai_metric_value:String(i)})}};(function(t,e){for(var n=0;n<e.length;n++)t.prototype[e[n]]=z_t(t.prototype[e[n]])})(V3e,["identify"]);var G3e,AL=(G3e=MR[D8]=new V3e,(function(){function t(){t.done||(t.done=!0,$3e=!1,vf(MR,(function(e){e._dom_loaded()})))}Zr!=null&&Zr.addEventListener?Zr.readyState==="complete"?t():M_(Zr,"DOMContentLoaded",t,{capture:!1}):qn&&Yr.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),G3e);!window.location.hostname.includes("localhost")&&!window.location.hostname.includes("127.0.0.1")&&(AL.__loaded||AL.init("phc_htd8AQjSfVEsFCLQMAiUooG4Q0DKBCjqYuQglc9V3Wo",{api_host:"https://postpig.tscircuit.com",person_profiles:"always"}));function Jgt(t){const e=String.fromCodePoint(...t);return btoa(e)}var v9=Uint8Array,w9=Uint16Array,iK=Int32Array,rK=new v9([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),oK=new v9([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Y3e=new v9([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),q3e=function(t,e){for(var n=new w9(31),i=0;i<31;++i)n[i]=e+=1<<t[i-1];for(var r=new iK(n[30]),i=1;i<30;++i)for(var o=n[i];o<n[i+1];++o)r[o]=o-n[i]<<5|i;return{b:n,r}},X3e=q3e(rK,2),e1t=X3e.b,sK=X3e.r;e1t[28]=258,sK[258]=28;for(var t1t=q3e(oK,0),W3e=t1t.r,aK=new w9(32768),ym=0;ym<32768;++ym){var a4=(ym&43690)>>1|(ym&21845)<<1;a4=(a4&52428)>>2|(a4&13107)<<2,a4=(a4&61680)>>4|(a4&3855)<<4,aK[ym]=((a4&65280)>>8|(a4&255)<<8)>>1}for(var AR=(function(t,e,n){for(var i=t.length,r=0,o=new w9(e);r<i;++r)t[r]&&++o[t[r]-1];var s=new w9(e);for(r=1;r<e;++r)s[r]=s[r-1]+o[r-1]<<1;var a;if(n){a=new w9(1<<e);var c=15-e;for(r=0;r<i;++r)if(t[r])for(var l=r<<4|t[r],u=e-t[r],d=s[t[r]-1]++<<u,h=d|(1<<u)-1;d<=h;++d)a[aK[d]>>c]=l}else for(a=new w9(i),r=0;r<i;++r)t[r]&&(a[r]=aK[s[t[r]-1]++]>>15-t[r]);return a}),hT=new v9(288),ym=0;ym<144;++ym)hT[ym]=8;for(var ym=144;ym<256;++ym)hT[ym]=9;for(var ym=256;ym<280;++ym)hT[ym]=7;for(var ym=280;ym<288;++ym)hT[ym]=8;for(var CL=new v9(32),ym=0;ym<32;++ym)CL[ym]=5;var n1t=AR(hT,9,0),i1t=AR(CL,5,0),Z3e=function(t){return(t+7)/8|0},K3e=function(t,e,n){return(n==null||n>t.length)&&(n=t.length),new v9(t.subarray(e,n))},RS=function(t,e,n){n<<=e&7;var i=e/8|0;t[i]|=n,t[i+1]|=n>>8},CR=function(t,e,n){n<<=e&7;var i=e/8|0;t[i]|=n,t[i+1]|=n>>8,t[i+2]|=n>>16},cK=function(t,e){for(var n=[],i=0;i<t.length;++i)t[i]&&n.push({s:i,f:t[i]});var r=n.length,o=n.slice();if(!r)return{t:t4e,l:0};if(r==1){var s=new v9(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort(function(N,R){return N.f-R.f}),n.push({s:-1,f:25001});var a=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=r-1;)a=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:a.f+c.f,l:a,r:c};for(var h=o[0].s,i=1;i<r;++i)o[i].s>h&&(h=o[i].s);var f=new w9(h+1),m=lK(n[u-1],f,0);if(m>e){var i=0,y=0,g=m-e,b=1<<g;for(o.sort(function(R,P){return f[P.s]-f[R.s]||R.f-P.f});i<r;++i){var v=o[i].s;if(f[v]>e)y+=b-(1<<m-f[v]),f[v]=e;else break}for(y>>=g;y>0;){var w=o[i].s;f[w]<e?y-=1<<e-f[w]++-1:++i}for(;i>=0&&y;--i){var T=o[i].s;f[T]==e&&(--f[T],++y)}m=e}return{t:new v9(f),l:m}},lK=function(t,e,n){return t.s==-1?Math.max(lK(t.l,e,n+1),lK(t.r,e,n+1)):e[t.s]=n},Q3e=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new w9(++e),i=0,r=t[0],o=1,s=function(c){n[i++]=c},a=1;a<=e;++a)if(t[a]==r&&a!=e)++o;else{if(!r&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(r),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(r);o=1,r=t[a]}return{c:n.subarray(0,i),n:e}},RR=function(t,e){for(var n=0,i=0;i<e.length;++i)n+=t[i]*e[i];return n},J3e=function(t,e,n){var i=n.length,r=Z3e(e+2);t[r]=i&255,t[r+1]=i>>8,t[r+2]=t[r]^255,t[r+3]=t[r+1]^255;for(var o=0;o<i;++o)t[r+o+4]=n[o];return(r+4+i)*8},e4e=function(t,e,n,i,r,o,s,a,c,l,u){RS(e,u++,n),++r[256];for(var d=cK(r,15),h=d.t,f=d.l,m=cK(o,15),y=m.t,g=m.l,b=Q3e(h),v=b.c,w=b.n,T=Q3e(y),N=T.c,R=T.n,P=new w9(19),M=0;M<v.length;++M)++P[v[M]&31];for(var M=0;M<N.length;++M)++P[N[M]&31];for(var I=cK(P,7),A=I.t,$=I.l,k=19;k>4&&!A[Y3e[k-1]];--k);var V=l+5<<3,X=RR(r,hT)+RR(o,CL)+s,W=RR(r,h)+RR(o,y)+s+14+3*k+RR(P,A)+2*P[16]+3*P[17]+7*P[18];if(c>=0&&V<=X&&V<=W)return J3e(e,u,t.subarray(c,c+l));var K,ee,se,de;if(RS(e,u,1+(W<X)),u+=2,W<X){K=AR(h,f,0),ee=h,se=AR(y,g,0),de=y;var be=AR(A,$,0);RS(e,u,w-257),RS(e,u+5,R-1),RS(e,u+10,k-4),u+=14;for(var M=0;M<k;++M)RS(e,u+3*M,A[Y3e[M]]);u+=3*k;for(var re=[v,N],ue=0;ue<2;++ue)for(var he=re[ue],M=0;M<he.length;++M){var Te=he[M]&31;RS(e,u,be[Te]),u+=A[Te],Te>15&&(RS(e,u,he[M]>>5&127),u+=he[M]>>12)}}else K=n1t,ee=hT,se=i1t,de=CL;for(var M=0;M<a;++M){var Ie=i[M];if(Ie>255){var Te=Ie>>18&31;CR(e,u,K[Te+257]),u+=ee[Te+257],Te>7&&(RS(e,u,Ie>>23&31),u+=rK[Te]);var De=Ie&31;CR(e,u,se[De]),u+=de[De],De>3&&(CR(e,u,Ie>>5&8191),u+=oK[De])}else CR(e,u,K[Ie]),u+=ee[Ie]}return CR(e,u,K[256]),u+ee[256]},r1t=new iK([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),t4e=new v9(0),o1t=function(t,e,n,i,r,o){var s=o.z||t.length,a=new v9(i+s+5*(1+Math.ceil(s/7e3))+r),c=a.subarray(i,a.length-r),l=o.l,u=(o.r||0)&7;if(e){u&&(c[0]=o.r>>3);for(var d=r1t[e-1],h=d>>13,f=d&8191,m=(1<<n)-1,y=o.p||new w9(32768),g=o.h||new w9(m+1),b=Math.ceil(n/3),v=2*b,w=function(at){return(t[at]^t[at+1]<<b^t[at+2]<<v)&m},T=new iK(25e3),N=new w9(288),R=new w9(32),P=0,M=0,I=o.i||0,A=0,$=o.w||0,k=0;I+2<s;++I){var V=w(I),X=I&32767,W=g[V];if(y[X]=W,g[V]=X,$<=I){var K=s-I;if((P>7e3||A>24576)&&(K>423||!l)){u=e4e(t,c,0,T,N,R,M,A,k,I-k,u),A=P=M=0,k=I;for(var ee=0;ee<286;++ee)N[ee]=0;for(var ee=0;ee<30;++ee)R[ee]=0}var se=2,de=0,be=f,re=X-W&32767;if(K>2&&V==w(I-re))for(var ue=Math.min(h,K)-1,he=Math.min(32767,I),Te=Math.min(258,K);re<=he&&--be&&X!=W;){if(t[I+se]==t[I+se-re]){for(var Ie=0;Ie<Te&&t[I+Ie]==t[I+Ie-re];++Ie);if(Ie>se){if(se=Ie,de=re,Ie>ue)break;for(var De=Math.min(re,Ie-2),Ge=0,ee=0;ee<De;++ee){var ke=I-re+ee&32767,ce=y[ke],we=ke-ce&32767;we>Ge&&(Ge=we,W=ke)}}}X=W,W=y[X],re+=X-W&32767}if(de){T[A++]=268435456|sK[se]<<18|W3e[de];var xe=sK[se]&31,qe=W3e[de]&31;M+=rK[xe]+oK[qe],++N[257+xe],++R[qe],$=I+se,++P}else T[A++]=t[I],++N[t[I]]}}for(I=Math.max(I,$);I<s;++I)T[A++]=t[I],++N[t[I]];u=e4e(t,c,l,T,N,R,M,A,k,I-k,u),l||(o.r=u&7|c[u/8|0]<<3,u-=7,o.h=g,o.p=y,o.i=I,o.w=$)}else{for(var I=o.w||0;I<s+l;I+=65535){var Je=I+65535;Je>=s&&(c[u/8|0]=l,Je=s),u=J3e(c,u+1,t.subarray(I,Je))}o.i=s}return K3e(a,0,i+Z3e(u)+r)},s1t=(function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var n=e,i=9;--i;)n=(n&1&&-306674912)^n>>>1;t[e]=n}return t})(),a1t=function(){var t=-1;return{p:function(e){for(var n=t,i=0;i<e.length;++i)n=s1t[n&255^e[i]]^n>>>8;t=n},d:function(){return~t}}},c1t=function(t,e,n,i,r){if(!r&&(r={l:1},e.dictionary)){var o=e.dictionary.subarray(-32768),s=new v9(o.length+t.length);s.set(o),s.set(t,o.length),t=s,r.w=o.length}return o1t(t,e.level==null?6:e.level,e.mem==null?r.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,n,i,r)},uK=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8},l1t=function(t,e){var n=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&uK(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),n){t[3]=8;for(var i=0;i<=n.length;++i)t[i+10]=n.charCodeAt(i)}},u1t=function(t){return 10+(t.filename?t.filename.length+1:0)};function n4e(t,e){e||(e={});var n=a1t(),i=t.length;n.p(t);var r=c1t(t,e,u1t(e),8),o=r.length;return l1t(r,e),uK(r,o-8,n.d()),uK(r,o-4,i),r}var i4e=typeof TextEncoder<"u"&&new TextEncoder,d1t=typeof TextDecoder<"u"&&new TextDecoder,h1t=0;try{d1t.decode(t4e,{stream:!0}),h1t=1}catch{}function r4e(t,e){var n;if(i4e)return i4e.encode(t);for(var i=t.length,r=new v9(t.length+(t.length>>1)),o=0,s=function(l){r[o++]=l},n=0;n<i;++n){if(o+5>r.length){var a=new v9(o+8+(i-n<<1));a.set(r),r=a}var c=t.charCodeAt(n);c<128||e?s(c):c<2048?(s(192|c>>6),s(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|t.charCodeAt(++n)&1023,s(240|c>>18),s(128|c>>12&63),s(128|c>>6&63),s(128|c&63)):(s(224|c>>12),s(128|c>>6&63),s(128|c&63))}return K3e(r,0,o)}function p1t(t,e){const n=JSON.stringify(t),i=n4e(r4e(n));return`https://tscircuit.com/editor?#data:application/gzip;base64,${Jgt(i)}`}function Fa(...t){return R_t(J5(t))}const o4e=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),dK=Qmt,RL=Ce.forwardRef(({className:t,...e},n)=>ye.jsx(ywe,{ref:n,className:Fa("rf-inline-flex rf-h-9 rf-items-center rf-justify-center rf-rounded-lg rf-bg-zinc-100 rf-p-1 rf-text-zinc-500 dark:rf-bg-zinc-800 dark:rf-text-zinc-400",t),...e}));RL.displayName=ywe.displayName;const t5=Ce.forwardRef(({className:t,...e},n)=>ye.jsx(gwe,{ref:n,className:Fa("rf-inline-flex rf-items-center rf-justify-center rf-whitespace-nowrap rf-rounded-md rf-px-3 rf-py-1 rf-text-sm rf-font-medium rf-ring-offset-white rf-transition-all focus-visible:rf-outline-none focus-visible:rf-ring-2 focus-visible:rf-ring-zinc-950 focus-visible:rf-ring-offset-2 disabled:rf-pointer-events-none disabled:rf-opacity-50 data-[state=active]:rf-bg-white data-[state=active]:rf-text-zinc-950 data-[state=active]:rf-shadow dark:rf-ring-offset-zinc-950 dark:focus-visible:rf-ring-zinc-300 dark:data-[state=active]:rf-bg-zinc-950 dark:data-[state=active]:rf-text-zinc-50",t),...e}));t5.displayName=gwe.displayName;const S9=Ce.forwardRef(({className:t,...e},n)=>ye.jsx(bwe,{ref:n,className:Fa("rf-h-full rf-mt-2 rf-ring-offset-white focus-visible:rf-outline-none focus-visible:rf-ring-2 focus-visible:rf-ring-zinc-950 focus-visible:rf-ring-offset-2 dark:rf-ring-offset-zinc-950 dark:focus-visible:rf-ring-zinc-300",t),...e}));S9.displayName=bwe.displayName;var $d;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function n(r){throw new Error}t.assertNever=n,t.arrayToEnum=r=>{const o={};for(const s of r)o[s]=s;return o},t.getValidEnumValues=r=>{const o=t.objectKeys(r).filter(a=>typeof r[r[a]]!="number"),s={};for(const a of o)s[a]=r[a];return t.objectValues(s)},t.objectValues=r=>t.objectKeys(r).map(function(o){return r[o]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const o=[];for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&o.push(s);return o},t.find=(r,o)=>{for(const s of r)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function i(r,o=" | "){return r.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=i,t.jsonStringifyReplacer=(r,o)=>typeof o=="bigint"?o.toString():o})($d||($d={}));var s4e;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(s4e||(s4e={}));const ao=$d.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),c4=t=>{switch(typeof t){case"undefined":return ao.undefined;case"string":return ao.string;case"number":return Number.isNaN(t)?ao.nan:ao.number;case"boolean":return ao.boolean;case"function":return ao.function;case"bigint":return ao.bigint;case"symbol":return ao.symbol;case"object":return Array.isArray(t)?ao.array:t===null?ao.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ao.promise:typeof Map<"u"&&t instanceof Map?ao.map:typeof Set<"u"&&t instanceof Set?ao.set:typeof Date<"u"&&t instanceof Date?ao.date:ao.object;default:return ao.unknown}},zi=$d.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);let sw=class I0t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(o){return o.message},i={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(r);else if(s.code==="invalid_return_type")r(s.returnTypeError);else if(s.code==="invalid_arguments")r(s.argumentsError);else if(s.path.length===0)i._errors.push(n(s));else{let a=i,c=0;for(;c<s.path.length;){const l=s.path[c];c===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(n(s))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return r(this),i}static assert(e){if(!(e instanceof I0t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,$d.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},i=[];for(const r of this.issues)if(r.path.length>0){const o=r.path[0];n[o]=n[o]||[],n[o].push(e(r))}else i.push(e(r));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}};sw.create=t=>new sw(t);const PR=(t,e)=>{let n;switch(t.code){case zi.invalid_type:t.received===ao.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case zi.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,$d.jsonStringifyReplacer)}`;break;case zi.unrecognized_keys:n=`Unrecognized key(s) in object: ${$d.joinValues(t.keys,", ")}`;break;case zi.invalid_union:n="Invalid input";break;case zi.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${$d.joinValues(t.options)}`;break;case zi.invalid_enum_value:n=`Invalid enum value. Expected ${$d.joinValues(t.options)}, received '${t.received}'`;break;case zi.invalid_arguments:n="Invalid function arguments";break;case zi.invalid_return_type:n="Invalid function return type";break;case zi.invalid_date:n="Invalid date";break;case zi.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:$d.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case zi.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case zi.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case zi.custom:n="Invalid input";break;case zi.invalid_intersection_types:n="Intersection results could not be merged";break;case zi.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case zi.not_finite:n="Number must be finite";break;default:n=e.defaultError,$d.assertNever(t)}return{message:n}};let f1t=PR;function hK(){return f1t}const pK=t=>{const{data:e,path:n,errorMaps:i,issueData:r}=t,o=[...n,...r.path||[]],s={...r,path:o};if(r.message!==void 0)return{...r,path:o,message:r.message};let a="";const c=i.filter(l=>!!l).slice().reverse();for(const l of c)a=l(s,{data:e,defaultError:a}).message;return{...r,path:o,message:a}};function Or(t,e){const n=hK(),i=pK({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===PR?void 0:PR].filter(r=>!!r)});t.common.issues.push(i)}let E9=class N0t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const i=[];for(const r of n){if(r.status==="aborted")return Js;r.status==="dirty"&&e.dirty(),i.push(r.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,n){const i=[];for(const r of n){const o=await r.key,s=await r.value;i.push({key:o,value:s})}return N0t.mergeObjectSync(e,i)}static mergeObjectSync(e,n){const i={};for(const r of n){const{key:o,value:s}=r;if(o.status==="aborted"||s.status==="aborted")return Js;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||r.alwaysSet)&&(i[o.value]=s.value)}return{status:e.value,value:i}}};const Js=Object.freeze({status:"aborted"}),IR=t=>({status:"dirty",value:t}),Uv=t=>({status:"valid",value:t}),a4e=t=>t.status==="aborted",c4e=t=>t.status==="dirty",z8=t=>t.status==="valid",PL=t=>typeof Promise<"u"&&t instanceof Promise;var Xo;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Xo||(Xo={}));let aw=class{constructor(e,n,i,r){this._cachedPath=[],this.parent=e,this.data=n,this._path=i,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const l4e=(t,e)=>{if(z8(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new sw(t.common.issues);return this._error=n,this._error}}};function kc(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:i,description:r}=t;if(e&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:r}:{errorMap:(s,a)=>{const{message:c}=t;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??i??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??n??a.defaultError}},description:r}}let nu=class{get description(){return this._def.description}_getType(e){return c4(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:c4(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new E9,ctx:{common:e.parent.common,data:e.data,parsedType:c4(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(PL(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const i=this.safeParse(e,n);if(i.success)return i.data;throw i.error}safeParse(e,n){const i={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:c4(e)},r=this._parseSync({data:e,path:i.path,parent:i});return l4e(i,r)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:c4(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:n});return z8(i)?{value:i.value}:{issues:n.common.issues}}catch(i){i?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>z8(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,n){const i=await this.safeParseAsync(e,n);if(i.success)return i.data;throw i.error}async safeParseAsync(e,n){const i={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:c4(e)},r=this._parse({data:e,path:i.path,parent:i}),o=await(PL(r)?r:Promise.resolve(r));return l4e(i,o)}refine(e,n){const i=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,o)=>{const s=e(r),a=()=>o.addIssue({code:zi.custom,...i(r)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((i,r)=>e(i)?!0:(r.addIssue(typeof n=="function"?n(i,r):n),!1))}_refinement(e){return new u4({schema:this,typeName:va.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return NS.create(this,this._def)}nullable(){return fT.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return B8.create(this)}promise(){return OR.create(this,this._def)}or(e){return DL.create([this,e],this._def)}and(e){return zL.create(this,e,this._def)}transform(e){return new u4({...kc(this._def),schema:this,typeName:va.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new UL({...kc(this._def),innerType:this,defaultValue:n,typeName:va.ZodDefault})}brand(){return new g4e({typeName:va.ZodBranded,type:this,...kc(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new $L({...kc(this._def),innerType:this,catchValue:n,typeName:va.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return U1t.create(this,e)}readonly(){return jL.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const m1t=/^c[^\s-]{8,}$/i,_1t=/^[0-9a-z]+$/,y1t=/^[0-9A-HJKMNP-TV-Z]{26}$/i,g1t=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,b1t=/^[a-z0-9_-]{21}$/i,x1t=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,v1t=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,w1t=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,S1t="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let fK;const E1t=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,T1t=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,M1t=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,A1t=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,C1t=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,R1t=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,u4e="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",P1t=new RegExp(`^${u4e}$`);function d4e(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function I1t(t){return new RegExp(`^${d4e(t)}$`)}function N1t(t){let e=`${u4e}T${d4e(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function k1t(t,e){return!!((e==="v4"||!e)&&E1t.test(t)||(e==="v6"||!e)&&M1t.test(t))}function O1t(t,e){if(!x1t.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(i));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||e&&r.alg!==e)}catch{return!1}}function L1t(t,e){return!!((e==="v4"||!e)&&T1t.test(t)||(e==="v6"||!e)&&A1t.test(t))}let NR=class PO extends nu{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ao.string){const o=this._getOrReturnCtx(e);return Or(o,{code:zi.invalid_type,expected:ao.string,received:o.parsedType}),Js}const i=new E9;let r;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="max")e.data.length>o.value&&(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="length"){const s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(r=this._getOrReturnCtx(e,r),s?Or(r,{code:zi.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&Or(r,{code:zi.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),i.dirty())}else if(o.kind==="email")w1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"email",code:zi.invalid_string,message:o.message}),i.dirty());else if(o.kind==="emoji")fK||(fK=new RegExp(S1t,"u")),fK.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"emoji",code:zi.invalid_string,message:o.message}),i.dirty());else if(o.kind==="uuid")g1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"uuid",code:zi.invalid_string,message:o.message}),i.dirty());else if(o.kind==="nanoid")b1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"nanoid",code:zi.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid")m1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"cuid",code:zi.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid2")_1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"cuid2",code:zi.invalid_string,message:o.message}),i.dirty());else if(o.kind==="ulid")y1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"ulid",code:zi.invalid_string,message:o.message}),i.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),Or(r,{validation:"url",code:zi.invalid_string,message:o.message}),i.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"regex",code:zi.invalid_string,message:o.message}),i.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),i.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.invalid_string,validation:{startsWith:o.value},message:o.message}),i.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.invalid_string,validation:{endsWith:o.value},message:o.message}),i.dirty()):o.kind==="datetime"?N1t(o).test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.invalid_string,validation:"datetime",message:o.message}),i.dirty()):o.kind==="date"?P1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.invalid_string,validation:"date",message:o.message}),i.dirty()):o.kind==="time"?I1t(o).test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.invalid_string,validation:"time",message:o.message}),i.dirty()):o.kind==="duration"?v1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"duration",code:zi.invalid_string,message:o.message}),i.dirty()):o.kind==="ip"?k1t(e.data,o.version)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"ip",code:zi.invalid_string,message:o.message}),i.dirty()):o.kind==="jwt"?O1t(e.data,o.alg)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"jwt",code:zi.invalid_string,message:o.message}),i.dirty()):o.kind==="cidr"?L1t(e.data,o.version)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"cidr",code:zi.invalid_string,message:o.message}),i.dirty()):o.kind==="base64"?C1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"base64",code:zi.invalid_string,message:o.message}),i.dirty()):o.kind==="base64url"?R1t.test(e.data)||(r=this._getOrReturnCtx(e,r),Or(r,{validation:"base64url",code:zi.invalid_string,message:o.message}),i.dirty()):$d.assertNever(o);return{status:i.value,value:e.data}}_regex(e,n,i){return this.refinement(r=>e.test(r),{validation:n,code:zi.invalid_string,...Xo.errToObj(i)})}_addCheck(e){return new PO({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Xo.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Xo.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Xo.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Xo.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Xo.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Xo.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Xo.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Xo.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Xo.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Xo.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Xo.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Xo.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Xo.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Xo.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Xo.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Xo.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Xo.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Xo.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Xo.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Xo.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Xo.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Xo.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Xo.errToObj(n)})}nonempty(e){return this.min(1,Xo.errToObj(e))}trim(){return new PO({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new PO({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new PO({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};NR.create=t=>new NR({checks:[],typeName:va.ZodString,coerce:t?.coerce??!1,...kc(t)});function D1t(t,e){const n=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,r=n>i?n:i,o=Number.parseInt(t.toFixed(r).replace(".","")),s=Number.parseInt(e.toFixed(r).replace(".",""));return o%s/10**r}let IL=class f5e extends nu{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ao.number){const o=this._getOrReturnCtx(e);return Or(o,{code:zi.invalid_type,expected:ao.number,received:o.parsedType}),Js}let i;const r=new E9;for(const o of this._def.checks)o.kind==="int"?$d.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.invalid_type,expected:"integer",received:"float",message:o.message}),r.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind==="multipleOf"?D1t(e.data,o.value)!==0&&(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.not_finite,message:o.message}),r.dirty()):$d.assertNever(o);return{status:r.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Xo.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Xo.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Xo.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Xo.toString(n))}setLimit(e,n,i,r){return new f5e({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:Xo.toString(r)}]})}_addCheck(e){return new f5e({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Xo.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Xo.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Xo.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Xo.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Xo.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Xo.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Xo.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Xo.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Xo.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&$d.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(n)&&Number.isFinite(e)}};IL.create=t=>new IL({checks:[],typeName:va.ZodNumber,coerce:t?.coerce||!1,...kc(t)});let NL=class m5e extends nu{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==ao.bigint)return this._getInvalidInput(e);let i;const r=new E9;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),Or(i,{code:zi.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):$d.assertNever(o);return{status:r.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return Or(n,{code:zi.invalid_type,expected:ao.bigint,received:n.parsedType}),Js}gte(e,n){return this.setLimit("min",e,!0,Xo.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Xo.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Xo.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Xo.toString(n))}setLimit(e,n,i,r){return new m5e({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:Xo.toString(r)}]})}_addCheck(e){return new m5e({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Xo.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Xo.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Xo.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Xo.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Xo.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};NL.create=t=>new NL({checks:[],typeName:va.ZodBigInt,coerce:t?.coerce??!1,...kc(t)});let kL=class extends nu{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ao.boolean){const i=this._getOrReturnCtx(e);return Or(i,{code:zi.invalid_type,expected:ao.boolean,received:i.parsedType}),Js}return Uv(e.data)}};kL.create=t=>new kL({typeName:va.ZodBoolean,coerce:t?.coerce||!1,...kc(t)});let OL=class k0t extends nu{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ao.date){const o=this._getOrReturnCtx(e);return Or(o,{code:zi.invalid_type,expected:ao.date,received:o.parsedType}),Js}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return Or(o,{code:zi.invalid_date}),Js}const i=new E9;let r;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),i.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(r=this._getOrReturnCtx(e,r),Or(r,{code:zi.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),i.dirty()):$d.assertNever(o);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new k0t({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Xo.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Xo.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};OL.create=t=>new OL({checks:[],coerce:t?.coerce||!1,typeName:va.ZodDate,...kc(t)});let h4e=class extends nu{_parse(e){if(this._getType(e)!==ao.symbol){const i=this._getOrReturnCtx(e);return Or(i,{code:zi.invalid_type,expected:ao.symbol,received:i.parsedType}),Js}return Uv(e.data)}};h4e.create=t=>new h4e({typeName:va.ZodSymbol,...kc(t)});let mK=class extends nu{_parse(e){if(this._getType(e)!==ao.undefined){const i=this._getOrReturnCtx(e);return Or(i,{code:zi.invalid_type,expected:ao.undefined,received:i.parsedType}),Js}return Uv(e.data)}};mK.create=t=>new mK({typeName:va.ZodUndefined,...kc(t)});let LL=class extends nu{_parse(e){if(this._getType(e)!==ao.null){const i=this._getOrReturnCtx(e);return Or(i,{code:zi.invalid_type,expected:ao.null,received:i.parsedType}),Js}return Uv(e.data)}};LL.create=t=>new LL({typeName:va.ZodNull,...kc(t)});let kR=class extends nu{constructor(){super(...arguments),this._any=!0}_parse(e){return Uv(e.data)}};kR.create=t=>new kR({typeName:va.ZodAny,...kc(t)});let F8=class extends nu{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Uv(e.data)}};F8.create=t=>new F8({typeName:va.ZodUnknown,...kc(t)});let l4=class extends nu{_parse(e){const n=this._getOrReturnCtx(e);return Or(n,{code:zi.invalid_type,expected:ao.never,received:n.parsedType}),Js}};l4.create=t=>new l4({typeName:va.ZodNever,...kc(t)});let p4e=class extends nu{_parse(e){if(this._getType(e)!==ao.undefined){const i=this._getOrReturnCtx(e);return Or(i,{code:zi.invalid_type,expected:ao.void,received:i.parsedType}),Js}return Uv(e.data)}};p4e.create=t=>new p4e({typeName:va.ZodVoid,...kc(t)});let B8=class RW extends nu{_parse(e){const{ctx:n,status:i}=this._processInputParams(e),r=this._def;if(n.parsedType!==ao.array)return Or(n,{code:zi.invalid_type,expected:ao.array,received:n.parsedType}),Js;if(r.exactLength!==null){const s=n.data.length>r.exactLength.value,a=n.data.length<r.exactLength.value;(s||a)&&(Or(n,{code:s?zi.too_big:zi.too_small,minimum:a?r.exactLength.value:void 0,maximum:s?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),i.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(Or(n,{code:zi.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),i.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(Or(n,{code:zi.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>r.type._parseAsync(new aw(n,s,n.path,a)))).then(s=>E9.mergeArray(i,s));const o=[...n.data].map((s,a)=>r.type._parseSync(new aw(n,s,n.path,a)));return E9.mergeArray(i,o)}get element(){return this._def.type}min(e,n){return new RW({...this._def,minLength:{value:e,message:Xo.toString(n)}})}max(e,n){return new RW({...this._def,maxLength:{value:e,message:Xo.toString(n)}})}length(e,n){return new RW({...this._def,exactLength:{value:e,message:Xo.toString(n)}})}nonempty(e){return this.min(1,e)}};B8.create=(t,e)=>new B8({type:t,minLength:null,maxLength:null,exactLength:null,typeName:va.ZodArray,...kc(e)});function U8(t){if(t instanceof PS){const e={};for(const n in t.shape){const i=t.shape[n];e[n]=NS.create(U8(i))}return new PS({...t._def,shape:()=>e})}else return t instanceof B8?new B8({...t._def,type:U8(t.element)}):t instanceof NS?NS.create(U8(t.unwrap())):t instanceof fT?fT.create(U8(t.unwrap())):t instanceof pT?pT.create(t.items.map(e=>U8(e))):t}let PS=class W5 extends nu{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=$d.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==ao.object){const l=this._getOrReturnCtx(e);return Or(l,{code:zi.invalid_type,expected:ao.object,received:l.parsedType}),Js}const{status:i,ctx:r}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof l4&&this._def.unknownKeys==="strip"))for(const l in r.data)s.includes(l)||a.push(l);const c=[];for(const l of s){const u=o[l],d=r.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new aw(r,d,r.path,l)),alwaysSet:l in r.data})}if(this._def.catchall instanceof l4){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of a)c.push({key:{status:"valid",value:u},value:{status:"valid",value:r.data[u]}});else if(l==="strict")a.length>0&&(Or(r,{code:zi.unrecognized_keys,keys:a}),i.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of a){const d=r.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new aw(r,d,r.path,u)),alwaysSet:u in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,h=await u.value;l.push({key:d,value:h,alwaysSet:u.alwaysSet})}return l}).then(l=>E9.mergeObjectSync(i,l)):E9.mergeObjectSync(i,c)}get shape(){return this._def.shape()}strict(e){return Xo.errToObj,new W5({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,i)=>{const r=this._def.errorMap?.(n,i).message??i.defaultError;return n.code==="unrecognized_keys"?{message:Xo.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new W5({...this._def,unknownKeys:"strip"})}passthrough(){return new W5({...this._def,unknownKeys:"passthrough"})}extend(e){return new W5({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new W5({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:va.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new W5({...this._def,catchall:e})}pick(e){const n={};for(const i of $d.objectKeys(e))e[i]&&this.shape[i]&&(n[i]=this.shape[i]);return new W5({...this._def,shape:()=>n})}omit(e){const n={};for(const i of $d.objectKeys(this.shape))e[i]||(n[i]=this.shape[i]);return new W5({...this._def,shape:()=>n})}deepPartial(){return U8(this)}partial(e){const n={};for(const i of $d.objectKeys(this.shape)){const r=this.shape[i];e&&!e[i]?n[i]=r:n[i]=r.optional()}return new W5({...this._def,shape:()=>n})}required(e){const n={};for(const i of $d.objectKeys(this.shape))if(e&&!e[i])n[i]=this.shape[i];else{let o=this.shape[i];for(;o instanceof NS;)o=o._def.innerType;n[i]=o}return new W5({...this._def,shape:()=>n})}keyof(){return _4e($d.objectKeys(this.shape))}};PS.create=(t,e)=>new PS({shape:()=>t,unknownKeys:"strip",catchall:l4.create(),typeName:va.ZodObject,...kc(e)}),PS.strictCreate=(t,e)=>new PS({shape:()=>t,unknownKeys:"strict",catchall:l4.create(),typeName:va.ZodObject,...kc(e)}),PS.lazycreate=(t,e)=>new PS({shape:t,unknownKeys:"strip",catchall:l4.create(),typeName:va.ZodObject,...kc(e)});let DL=class extends nu{_parse(e){const{ctx:n}=this._processInputParams(e),i=this._def.options;function r(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(a=>new sw(a.ctx.common.issues));return Or(n,{code:zi.invalid_union,unionErrors:s}),Js}if(n.common.async)return Promise.all(i.map(async o=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(r);{let o;const s=[];for(const c of i){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:l}),l.common.issues.length&&s.push(l.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(c=>new sw(c));return Or(n,{code:zi.invalid_union,unionErrors:a}),Js}}get options(){return this._def.options}};DL.create=(t,e)=>new DL({options:t,typeName:va.ZodUnion,...kc(e)});const IS=t=>t instanceof yK?IS(t.schema):t instanceof u4?IS(t.innerType()):t instanceof FL?[t.value]:t instanceof BL?t.options:t instanceof gK?$d.objectValues(t.enum):t instanceof UL?IS(t._def.innerType):t instanceof mK?[void 0]:t instanceof LL?[null]:t instanceof NS?[void 0,...IS(t.unwrap())]:t instanceof fT?[null,...IS(t.unwrap())]:t instanceof g4e||t instanceof jL?IS(t.unwrap()):t instanceof $L?IS(t._def.innerType):[];let z1t=class O0t extends nu{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ao.object)return Or(n,{code:zi.invalid_type,expected:ao.object,received:n.parsedType}),Js;const i=this.discriminator,r=n.data[i],o=this.optionsMap.get(r);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Or(n,{code:zi.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),Js)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,i){const r=new Map;for(const o of n){const s=IS(o.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of s){if(r.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);r.set(a,o)}}return new O0t({typeName:va.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:r,...kc(i)})}};function _K(t,e){const n=c4(t),i=c4(e);if(t===e)return{valid:!0,data:t};if(n===ao.object&&i===ao.object){const r=$d.objectKeys(e),o=$d.objectKeys(t).filter(a=>r.indexOf(a)!==-1),s={...t,...e};for(const a of o){const c=_K(t[a],e[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(n===ao.array&&i===ao.array){if(t.length!==e.length)return{valid:!1};const r=[];for(let o=0;o<t.length;o++){const s=t[o],a=e[o],c=_K(s,a);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===ao.date&&i===ao.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}let zL=class extends nu{_parse(e){const{status:n,ctx:i}=this._processInputParams(e),r=(o,s)=>{if(a4e(o)||a4e(s))return Js;const a=_K(o.value,s.value);return a.valid?((c4e(o)||c4e(s))&&n.dirty(),{status:n.value,value:a.data}):(Or(i,{code:zi.invalid_intersection_types}),Js)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([o,s])=>r(o,s)):r(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};zL.create=(t,e,n)=>new zL({left:t,right:e,typeName:va.ZodIntersection,...kc(n)});let pT=class L0t extends nu{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ao.array)return Or(i,{code:zi.invalid_type,expected:ao.array,received:i.parsedType}),Js;if(i.data.length<this._def.items.length)return Or(i,{code:zi.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Js;!this._def.rest&&i.data.length>this._def.items.length&&(Or(i,{code:zi.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...i.data].map((s,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new aw(i,s,i.path,a)):null}).filter(s=>!!s);return i.common.async?Promise.all(o).then(s=>E9.mergeArray(n,s)):E9.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new L0t({...this._def,rest:e})}};pT.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new pT({items:t,typeName:va.ZodTuple,rest:null,...kc(e)})};let F1t=class _5e extends nu{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ao.object)return Or(i,{code:zi.invalid_type,expected:ao.object,received:i.parsedType}),Js;const r=[],o=this._def.keyType,s=this._def.valueType;for(const a in i.data)r.push({key:o._parse(new aw(i,a,i.path,a)),value:s._parse(new aw(i,i.data[a],i.path,a)),alwaysSet:a in i.data});return i.common.async?E9.mergeObjectAsync(n,r):E9.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(e,n,i){return n instanceof nu?new _5e({keyType:e,valueType:n,typeName:va.ZodRecord,...kc(i)}):new _5e({keyType:NR.create(),valueType:e,typeName:va.ZodRecord,...kc(n)})}},f4e=class extends nu{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ao.map)return Or(i,{code:zi.invalid_type,expected:ao.map,received:i.parsedType}),Js;const r=this._def.keyType,o=this._def.valueType,s=[...i.data.entries()].map(([a,c],l)=>({key:r._parse(new aw(i,a,i.path,[l,"key"])),value:o._parse(new aw(i,c,i.path,[l,"value"]))}));if(i.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of s){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Js;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of s){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Js;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}}}};f4e.create=(t,e,n)=>new f4e({valueType:e,keyType:t,typeName:va.ZodMap,...kc(n)});let m4e=class y5e extends nu{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ao.set)return Or(i,{code:zi.invalid_type,expected:ao.set,received:i.parsedType}),Js;const r=this._def;r.minSize!==null&&i.data.size<r.minSize.value&&(Or(i,{code:zi.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&i.data.size>r.maxSize.value&&(Or(i,{code:zi.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());const o=this._def.valueType;function s(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Js;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const a=[...i.data.values()].map((c,l)=>o._parse(new aw(i,c,i.path,l)));return i.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(e,n){return new y5e({...this._def,minSize:{value:e,message:Xo.toString(n)}})}max(e,n){return new y5e({...this._def,maxSize:{value:e,message:Xo.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};m4e.create=(t,e)=>new m4e({valueType:t,minSize:null,maxSize:null,typeName:va.ZodSet,...kc(e)});let B1t=class PW extends nu{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ao.function)return Or(n,{code:zi.invalid_type,expected:ao.function,received:n.parsedType}),Js;function i(a,c){return pK({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,hK(),PR].filter(l=>!!l),issueData:{code:zi.invalid_arguments,argumentsError:c}})}function r(a,c){return pK({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,hK(),PR].filter(l=>!!l),issueData:{code:zi.invalid_return_type,returnTypeError:c}})}const o={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof OR){const a=this;return Uv(async function(...c){const l=new sw([]),u=await a._def.args.parseAsync(c,o).catch(f=>{throw l.addIssue(i(c,f)),l}),d=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(d,o).catch(f=>{throw l.addIssue(r(d,f)),l})})}else{const a=this;return Uv(function(...c){const l=a._def.args.safeParse(c,o);if(!l.success)throw new sw([i(c,l.error)]);const u=Reflect.apply(s,this,l.data),d=a._def.returns.safeParse(u,o);if(!d.success)throw new sw([r(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new PW({...this._def,args:pT.create(e).rest(F8.create())})}returns(e){return new PW({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,i){return new PW({args:e||pT.create([]).rest(F8.create()),returns:n||F8.create(),typeName:va.ZodFunction,...kc(i)})}},yK=class extends nu{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};yK.create=(t,e)=>new yK({getter:t,typeName:va.ZodLazy,...kc(e)});let FL=class extends nu{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Or(n,{received:n.data,code:zi.invalid_literal,expected:this._def.value}),Js}return{status:"valid",value:e.data}}get value(){return this._def.value}};FL.create=(t,e)=>new FL({value:t,typeName:va.ZodLiteral,...kc(e)});function _4e(t,e){return new BL({values:t,typeName:va.ZodEnum,...kc(e)})}let BL=class g5e extends nu{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),i=this._def.values;return Or(n,{expected:$d.joinValues(i),received:n.parsedType,code:zi.invalid_type}),Js}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),i=this._def.values;return Or(n,{received:n.data,code:zi.invalid_enum_value,options:i}),Js}return Uv(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return g5e.create(e,{...this._def,...n})}exclude(e,n=this._def){return g5e.create(this.options.filter(i=>!e.includes(i)),{...this._def,...n})}};BL.create=_4e;let gK=class extends nu{_parse(e){const n=$d.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==ao.string&&i.parsedType!==ao.number){const r=$d.objectValues(n);return Or(i,{expected:$d.joinValues(r),received:i.parsedType,code:zi.invalid_type}),Js}if(this._cache||(this._cache=new Set($d.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const r=$d.objectValues(n);return Or(i,{received:i.data,code:zi.invalid_enum_value,options:r}),Js}return Uv(e.data)}get enum(){return this._def.values}};gK.create=(t,e)=>new gK({values:t,typeName:va.ZodNativeEnum,...kc(e)});let OR=class extends nu{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ao.promise&&n.common.async===!1)return Or(n,{code:zi.invalid_type,expected:ao.promise,received:n.parsedType}),Js;const i=n.parsedType===ao.promise?n.data:Promise.resolve(n.data);return Uv(i.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}};OR.create=(t,e)=>new OR({type:t,typeName:va.ZodPromise,...kc(e)});let u4=class extends nu{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===va.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:i}=this._processInputParams(e),r=this._def.effect||null,o={addIssue:s=>{Or(i,s),s.fatal?n.abort():n.dirty()},get path(){return i.path}};if(o.addIssue=o.addIssue.bind(o),r.type==="preprocess"){const s=r.transform(i.data,o);if(i.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return Js;const c=await this._def.schema._parseAsync({data:a,path:i.path,parent:i});return c.status==="aborted"?Js:c.status==="dirty"||n.value==="dirty"?IR(c.value):c});{if(n.value==="aborted")return Js;const a=this._def.schema._parseSync({data:s,path:i.path,parent:i});return a.status==="aborted"?Js:a.status==="dirty"||n.value==="dirty"?IR(a.value):a}}if(r.type==="refinement"){const s=a=>{const c=r.refinement(a,o);if(i.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(i.common.async===!1){const a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?Js:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>a.status==="aborted"?Js:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(r.type==="transform")if(i.common.async===!1){const s=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!z8(s))return Js;const a=r.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(s=>z8(s)?Promise.resolve(r.transform(s.value,o)).then(a=>({status:n.value,value:a})):Js);$d.assertNever(r)}};u4.create=(t,e,n)=>new u4({schema:t,typeName:va.ZodEffects,effect:e,...kc(n)}),u4.createWithPreprocess=(t,e,n)=>new u4({schema:e,effect:{type:"preprocess",transform:t},typeName:va.ZodEffects,...kc(n)});let NS=class extends nu{_parse(e){return this._getType(e)===ao.undefined?Uv(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};NS.create=(t,e)=>new NS({innerType:t,typeName:va.ZodOptional,...kc(e)});let fT=class extends nu{_parse(e){return this._getType(e)===ao.null?Uv(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};fT.create=(t,e)=>new fT({innerType:t,typeName:va.ZodNullable,...kc(e)});let UL=class extends nu{_parse(e){const{ctx:n}=this._processInputParams(e);let i=n.data;return n.parsedType===ao.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};UL.create=(t,e)=>new UL({innerType:t,typeName:va.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...kc(e)});let $L=class extends nu{_parse(e){const{ctx:n}=this._processInputParams(e),i={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return PL(r)?r.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new sw(i.common.issues)},input:i.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new sw(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};$L.create=(t,e)=>new $L({innerType:t,typeName:va.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...kc(e)});let y4e=class extends nu{_parse(e){if(this._getType(e)!==ao.nan){const i=this._getOrReturnCtx(e);return Or(i,{code:zi.invalid_type,expected:ao.nan,received:i.parsedType}),Js}return{status:"valid",value:e.data}}};y4e.create=t=>new y4e({typeName:va.ZodNaN,...kc(t)});let g4e=class extends nu{_parse(e){const{ctx:n}=this._processInputParams(e),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}},U1t=class D0t extends nu{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?Js:o.status==="dirty"?(n.dirty(),IR(o.value)):this._def.out._parseAsync({data:o.value,path:i.path,parent:i})})();{const r=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return r.status==="aborted"?Js:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:i.path,parent:i})}}static create(e,n){return new D0t({in:e,out:n,typeName:va.ZodPipeline})}},jL=class extends nu{_parse(e){const n=this._def.innerType._parse(e),i=r=>(z8(r)&&(r.value=Object.freeze(r.value)),r);return PL(n)?n.then(r=>i(r)):i(n)}unwrap(){return this._def.innerType}};jL.create=(t,e)=>new jL({innerType:t,typeName:va.ZodReadonly,...kc(e)});function b4e(t,e){const n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function ly(t,e={},n){return t?kR.create().superRefine((i,r)=>{const o=t(i);if(o instanceof Promise)return o.then(s=>{if(!s){const a=b4e(e,i),c=a.fatal??n??!0;r.addIssue({code:"custom",...a,fatal:c})}});if(!o){const s=b4e(e,i),a=s.fatal??n??!0;r.addIssue({code:"custom",...s,fatal:a})}}):kR.create()}var va;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(va||(va={}));const B=NR.create,Ue=IL.create;NL.create;const bt=kL.create;OL.create;const bK=LL.create,jd=kR.create,xK=F8.create;l4.create;const Ct=B8.create,Ne=PS.create,oi=DL.create,uy=z1t.create;zL.create,pT.create;const Us=F1t.create,vK=B1t.create,Ae=FL.create,dn=BL.create,wK=OR.create;NS.create,fT.create;const x4e=u4.createWithPreprocess,v4e={string:(t=>NR.create({...t,coerce:!0})),number:(t=>IL.create({...t,coerce:!0})),boolean:(t=>kL.create({...t,coerce:!0})),bigint:(t=>NL.create({...t,coerce:!0})),date:(t=>OL.create({...t,coerce:!0}))};var w4e={Hz:{baseUnit:"Hz",variants:{MHz:1e6,kHz:1e3,Hz:1}},g:{baseUnit:"g",variants:{kg:1e3,g:1}},Ω:{baseUnit:"Ω",variants:{mΩ:.001,Ω:1,kΩ:1e3,KΩ:1e3,kohm:1e3,MΩ:1e6,GΩ:1e9,TΩ:1e12}},V:{baseUnit:"V",variants:{mV:.001,V:1,kV:1e3,KV:1e3,MV:1e6,GV:1e9,TV:1e12}},A:{baseUnit:"A",variants:{µA:1e-6,mA:.001,ma:.001,A:1,kA:1e3,MA:1e6}},F:{baseUnit:"F",variants:{pF:1e-12,nF:1e-9,µF:1e-6,uF:1e-6,mF:.001,F:1}},ml:{baseUnit:"ml",variants:{ml:1,mL:1,l:1e3,L:1e3}},deg:{baseUnit:"deg",variants:{rad:180/Math.PI}},ms:{baseUnit:"ms",variants:{s:1e3}},mm:{baseUnit:"mm",variants:{nm:1e-6,µm:.001,um:.001,mm:1,cm:10,dm:100,m:1e3,km:1e6,in:25.4,ft:304.8,IN:25.4,FT:304.8,yd:914.4,mi:1609344,mil:.0254}}},SK=new Set;for(const[t,e]of Object.entries(w4e)){SK.add(t);for(const n of Object.keys(e.variants))SK.add(n)}function $1t(t){for(const[e,n]of Object.entries(w4e))if(t in n.variants)return{baseUnit:n.baseUnit,conversionFactor:n.variants[t]};return{baseUnit:t,conversionFactor:1}}var S4e={tera:1e12,T:1e12,giga:1e9,G:1e9,mega:1e6,M:1e6,kilo:1e3,k:1e3,deci:.1,d:.1,centi:.01,c:.01,milli:.001,m:.001,micro:1e-6,u:1e-6,µ:1e-6,nano:1e-9,n:1e-9,pico:1e-12,p:1e-12},n5=t=>{if(typeof t>"u")return{parsedUnit:null,unitOfValue:null,value:null};if(typeof t=="string"&&t.match(/^-?[\d\.]+$/))return{value:Number.parseFloat(t),parsedUnit:null,unitOfValue:null};if(typeof t=="number")return{value:t,parsedUnit:null,unitOfValue:null};if(typeof t=="object"&&"x"in t&&"y"in t){const{parsedUnit:a,unitOfValue:c}=n5(t.x);return{parsedUnit:a,unitOfValue:c,value:{x:n5(t.x).value,y:n5(t.y).value}}}const n=t.toString().split("").reverse().join("").match(/[^\d\s]+/)?.[0];if(!n)throw new Error(`Could not determine unit: "${t}"`);const i=n.split("").reverse().join(""),r=t.slice(0,-i.length);if(i in S4e&&!SK.has(i)){const a=S4e[i];return{parsedUnit:null,unitOfValue:null,value:Number.parseFloat(r)*a}}const{baseUnit:o,conversionFactor:s}=$1t(i);return{parsedUnit:i,unitOfValue:o,value:s*Number.parseFloat(r)}},$8=B().or(Ue()).transform(t=>n5(t).value),j8=B().or(Ue()).transform(t=>n5(t).value).transform(t=>Number.parseFloat(t.toPrecision(12))),EK=B().or(Ue()).transform(t=>n5(t).value),$v=B().or(Ue()).transform(t=>n5(t).value),st=B().or(Ue()).transform(t=>n5(t).value),mT=B().or(Ue()).transform(t=>n5(t).value),Ft=st,j1t=B().or(Ue()).transform(t=>n5(t).value),H1t=B().or(Ue()).transform(t=>n5(t).value),u0=B().or(Ue()).transform(t=>typeof t=="number"?t:t.endsWith("deg")?Number.parseFloat(t.split("deg")[0]):t.endsWith("rad")?Number.parseFloat(t.split("rad")[0])*180/Math.PI:Number.parseFloat(t)),E4e=Ue().or(B().endsWith("mAh")).transform(t=>{if(typeof t=="string"){const e=t.replace("mAh",""),n=Number.parseFloat(e);if(Number.isNaN(n))throw new Error("Invalid capacity");return n}return t}).describe("Battery capacity in mAh"),wa=Ne({x:Ft,y:Ft}),V1t=wa,H8=Ne({x:Ft,y:Ft,z:Ft}),G1t=H8,TK=Ne({width:Ue(),height:Ue()}),Y1t=t=>{const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";return Array.from({length:t},()=>e[Math.floor(Math.random()*e.length)]).join("")},qr=t=>B().optional().default(()=>`${t}_${Y1t(10)}`),HL=dn(["top_left","top_center","top_right","center_left","center","center_right","bottom_left","bottom_center","bottom_right"]),VL=dn(["jlcpcb","macrofab","pcbway","digikey","mouser","lcsc"]),Ig=Ne({type:Ae("source_component"),ftype:B().optional(),source_component_id:B(),name:B(),manufacturer_part_number:B().optional(),supplier_part_numbers:Us(VL,Ct(B())).optional(),display_value:B().optional(),are_pins_interchangeable:bt().optional(),internally_connected_source_port_ids:Ct(Ct(B())).optional(),source_group_id:B().optional(),subcircuit_id:B().optional()}),MK=Ig.extend({ftype:Ae("simple_capacitor"),capacitance:j8,max_voltage_rating:$v.optional(),display_capacitance:B().optional(),max_decoupling_trace_length:Ft.optional()}),AK=Ig.extend({ftype:Ae("simple_resistor"),resistance:$8,display_resistance:B().optional()}),GL=Ig.extend({ftype:Ae("simple_diode")}),CK=GL.extend({ftype:Ae("simple_led"),color:B().optional(),wavelength:B().optional()}),T4e=Ig.extend({ftype:Ae("simple_ground")}),RK=Ig.extend({ftype:Ae("simple_chip")}),PK=Ig.extend({ftype:Ae("simple_power_source"),voltage:$v}),q1t=Ig.extend({ftype:Ae("simple_fuse"),current_rating_amps:Ue().describe("Nominal current in amps the fuse is rated for"),voltage_rating_volts:Ue().describe("Voltage rating in volts, e.g. ±5V would be 5")}),IK=Ig.extend({ftype:Ae("simple_battery"),capacity:E4e}),NK=Ig.extend({ftype:Ae("simple_inductor"),inductance:EK,max_current_rating:Ue().optional()}),kK=Ig.extend({ftype:Ae("simple_push_button")}),OK=Ig.extend({ftype:Ae("simple_potentiometer"),max_resistance:$8}),M4e=Ig.extend({ftype:Ae("simple_crystal"),frequency:Ue().describe("Frequency in Hz"),load_capacitance:Ue().optional().describe("Load capacitance in pF")}),LK=Ig.extend({ftype:Ae("simple_pin_header"),pin_count:Ue(),gender:dn(["male","female"]).optional().default("male")}),DK=Ig.extend({ftype:Ae("simple_pinout")}),zK=Ig.extend({ftype:Ae("simple_resonator"),load_capacitance:j8,equivalent_series_resistance:$8.optional(),frequency:mT}),FK=Ig.extend({ftype:Ae("simple_transistor"),transistor_type:dn(["npn","pnp"])}),BK=Ig.extend({ftype:Ae("simple_test_point"),footprint_variant:dn(["pad","through_hole"]).optional(),pad_shape:dn(["rect","circle"]).optional(),pad_diameter:oi([Ue(),B()]).optional(),hole_diameter:oi([Ue(),B()]).optional(),width:oi([Ue(),B()]).optional(),height:oi([Ue(),B()]).optional()}),UK=Ig.extend({ftype:Ae("simple_mosfet"),channel_type:dn(["n","p"]),mosfet_mode:dn(["enhancement","depletion"])}),$K=Ig.extend({ftype:Ae("simple_switch")}),jK=Ne({type:Ae("source_project_metadata"),name:B().optional(),software_used_string:B().optional(),project_url:B().optional(),created_at:B().datetime().optional()}),A4e=Ne({type:Ae("source_missing_property_error"),source_missing_property_error_id:qr("source_missing_property_error"),source_component_id:B(),property_name:B(),subcircuit_id:B().optional(),error_type:Ae("source_missing_property_error").default("source_missing_property_error"),message:B()}).describe("The source code is missing a property"),C4e=Ne({type:Ae("source_failed_to_create_component_error"),source_failed_to_create_component_error_id:qr("source_failed_to_create_component_error"),error_type:Ae("source_failed_to_create_component_error").default("source_failed_to_create_component_error"),component_name:B().optional(),subcircuit_id:B().optional(),parent_source_component_id:B().optional(),message:B(),pcb_center:Ne({x:Ue().optional(),y:Ue().optional()}).optional(),schematic_center:Ne({x:Ue().optional(),y:Ue().optional()}).optional()}).describe("Error emitted when a component fails to be constructed"),HK=Ne({type:Ae("source_trace_not_connected_error"),source_trace_not_connected_error_id:qr("source_trace_not_connected_error"),error_type:Ae("source_trace_not_connected_error").default("source_trace_not_connected_error"),message:B(),subcircuit_id:B().optional(),source_group_id:B().optional(),source_trace_id:B().optional(),connected_source_port_ids:Ct(B()).optional(),selectors_not_found:Ct(B()).optional()}).describe("Occurs when a source trace selector does not match any ports"),R4e=Ne({type:Ae("source_property_ignored_warning"),source_property_ignored_warning_id:qr("source_property_ignored_warning"),source_component_id:B(),property_name:B(),subcircuit_id:B().optional(),error_type:Ae("source_property_ignored_warning").default("source_property_ignored_warning"),message:B()}).describe("The source property was ignored"),VK=Ne({type:Ae("source_pin_missing_trace_warning"),source_pin_missing_trace_warning_id:qr("source_pin_missing_trace_warning"),warning_type:Ae("source_pin_missing_trace_warning").default("source_pin_missing_trace_warning"),message:B(),source_component_id:B(),source_port_id:B(),subcircuit_id:B().optional()}).describe("Warning emitted when a source component pin is missing a trace connection"),P4e=oi([AK,MK,GL,CK,T4e,RK,PK,IK,NK,kK,OK,M4e,LK,DK,zK,$K,FK,BK,UK,q1t,jK,A4e,C4e,HK,R4e,VK]),I4e=Ne({type:Ae("source_port"),pin_number:Ue().optional(),port_hints:Ct(B()).optional(),name:B(),source_port_id:B(),source_component_id:B(),subcircuit_id:B().optional(),subcircuit_connectivity_map_key:B().optional()}),N4e=Ne({type:Ae("source_trace"),source_trace_id:B(),connected_source_port_ids:Ct(B()),connected_source_net_ids:Ct(B()),subcircuit_id:B().optional(),subcircuit_connectivity_map_key:B().optional(),max_length:Ue().optional(),min_trace_thickness:Ue().optional(),display_name:B().optional()}),k4e=Ne({type:Ae("source_group"),source_group_id:B(),subcircuit_id:B().optional(),parent_subcircuit_id:B().optional(),parent_source_group_id:B().optional(),is_subcircuit:bt().optional(),show_as_schematic_box:bt().optional(),name:B().optional()}),O4e=Ne({type:Ae("source_net"),source_net_id:B(),name:B(),member_source_group_ids:Ct(B()),is_power:bt().optional(),is_ground:bt().optional(),is_digital_signal:bt().optional(),is_analog_signal:bt().optional(),is_positive_voltage_source:bt().optional(),trace_width:Ue().optional(),subcircuit_id:B().optional(),subcircuit_connectivity_map_key:B().optional()}),L4e=Ne({type:Ae("source_pcb_ground_plane"),source_pcb_ground_plane_id:B(),source_group_id:B(),source_net_id:B(),subcircuit_id:B().optional()}).describe("Defines a ground plane in the source domain"),LR=["top","bottom","inner1","inner2","inner3","inner4","inner5","inner6"],GK=dn(LR),Xc=GK.or(Ne({name:GK})).transform(t=>typeof t=="string"?t:t.name),V8=dn(["top","bottom"]),D4e=Ne({type:Ae("source_manually_placed_via"),source_manually_placed_via_id:B(),source_group_id:B(),source_net_id:B(),subcircuit_id:B().optional(),source_trace_id:B().optional()}).describe("Defines a via that is manually placed in the source domain"),z4e=Ne({type:Ae("schematic_box"),schematic_component_id:B().optional(),width:Ft,height:Ft,is_dashed:bt().default(!1),x:Ft,y:Ft,subcircuit_id:B().optional()}).describe("Draws a box on the schematic"),F4e=Ne({type:Ae("schematic_path"),schematic_component_id:B(),fill_color:dn(["red","blue"]).optional(),is_filled:bt().optional(),points:Ct(wa),subcircuit_id:B().optional()}),B4e=Us(Ne({left_margin:st.optional(),right_margin:st.optional(),top_margin:st.optional(),bottom_margin:st.optional()})),U4e=Ne({left_size:Ue(),right_size:Ue(),top_size:Ue().optional(),bottom_size:Ue().optional()}),$4e=Ne({left_side:Ne({pins:Ct(Ue()),direction:dn(["top-to-bottom","bottom-to-top"]).optional()}).optional(),right_side:Ne({pins:Ct(Ue()),direction:dn(["top-to-bottom","bottom-to-top"]).optional()}).optional(),top_side:Ne({pins:Ct(Ue()),direction:dn(["left-to-right","right-to-left"]).optional()}).optional(),bottom_side:Ne({pins:Ct(Ue()),direction:dn(["left-to-right","right-to-left"]).optional()}).optional()}),j4e=oi([U4e,$4e]),H4e=Ne({type:Ae("schematic_component"),size:TK,center:wa,source_component_id:B().optional(),schematic_component_id:B(),pin_spacing:st.optional(),pin_styles:B4e.optional(),box_width:st.optional(),symbol_name:B().optional(),port_arrangement:j4e.optional(),port_labels:Us(B()).optional(),symbol_display_value:B().optional(),subcircuit_id:B().optional(),schematic_group_id:B().optional(),is_schematic_group:bt().optional(),source_group_id:B().optional(),is_box_with_pins:bt().optional().default(!0)}),V4e=Ne({type:Ae("schematic_line"),schematic_line_id:qr("schematic_line"),schematic_component_id:B(),x1:Ft,y1:Ft,x2:Ft,y2:Ft,stroke_width:Ft.nullable().optional(),color:B().default("#000000"),is_dashed:bt().default(!1),subcircuit_id:B().optional()}).describe("Draws a styled line on the schematic"),G4e=Ne({type:Ae("schematic_rect"),schematic_rect_id:qr("schematic_rect"),schematic_component_id:B(),center:wa,width:Ft,height:Ft,rotation:u0.default(0),stroke_width:Ft.nullable().optional(),color:B().default("#000000"),is_filled:bt().default(!1),fill_color:B().optional(),is_dashed:bt().default(!1),subcircuit_id:B().optional()}).describe("Draws a styled rectangle on the schematic"),Y4e=Ne({type:Ae("schematic_circle"),schematic_circle_id:qr("schematic_circle"),schematic_component_id:B(),center:wa,radius:Ft,stroke_width:Ft.nullable().optional(),color:B().default("#000000"),is_filled:bt().default(!1),fill_color:B().optional(),is_dashed:bt().default(!1),subcircuit_id:B().optional()}).describe("Draws a styled circle on the schematic"),q4e=Ne({type:Ae("schematic_arc"),schematic_arc_id:qr("schematic_arc"),schematic_component_id:B(),center:wa,radius:Ft,start_angle_degrees:u0,end_angle_degrees:u0,direction:dn(["clockwise","counterclockwise"]).default("counterclockwise"),stroke_width:Ft.nullable().optional(),color:B().default("#000000"),is_dashed:bt().default(!1),subcircuit_id:B().optional()}).describe("Draws a styled arc on the schematic"),X4e=Ne({type:Ae("schematic_trace"),schematic_trace_id:B(),source_trace_id:B().optional(),junctions:Ct(Ne({x:Ue(),y:Ue()})),edges:Ct(Ne({from:Ne({x:Ue(),y:Ue()}),to:Ne({x:Ue(),y:Ue()}),is_crossing:bt().optional(),from_schematic_port_id:B().optional(),to_schematic_port_id:B().optional()})),subcircuit_id:B().optional(),subcircuit_connectivity_map_key:B().optional()}),X1t=dn(["center","left","right","top","bottom"]),W4e=Ne({type:Ae("schematic_text"),schematic_component_id:B().optional(),schematic_text_id:B(),text:B(),font_size:Ue().default(.18),position:Ne({x:Ft,y:Ft}),rotation:Ue().default(0),anchor:oi([X1t.describe("legacy"),HL]).default("center"),color:B().default("#000000"),subcircuit_id:B().optional()}),Z4e=Ne({type:Ae("schematic_port"),schematic_port_id:B(),source_port_id:B(),schematic_component_id:B().optional(),center:wa,facing_direction:dn(["up","down","left","right"]).optional(),distance_from_component_edge:Ue().optional(),side_of_component:dn(["top","bottom","left","right"]).optional(),true_ccw_index:Ue().optional(),pin_number:Ue().optional(),display_pin_label:B().optional(),subcircuit_id:B().optional(),is_connected:bt().optional(),has_input_arrow:bt().optional(),has_output_arrow:bt().optional()}).describe("Defines a port on a schematic component"),K4e=Ne({type:Ae("schematic_net_label"),schematic_net_label_id:qr("schematic_net_label"),schematic_trace_id:B().optional(),source_trace_id:B().optional(),source_net_id:B(),center:wa,anchor_position:wa.optional(),anchor_side:dn(["top","bottom","left","right"]),text:B(),symbol_name:B().optional(),is_movable:bt().optional(),subcircuit_id:B().optional()}),Q4e=Ne({type:Ae("schematic_error"),schematic_error_id:B(),error_type:Ae("schematic_port_not_found").default("schematic_port_not_found"),message:B(),subcircuit_id:B().optional()}).describe("Defines a schematic error on the schematic"),J4e=Ne({type:Ae("schematic_layout_error"),schematic_layout_error_id:qr("schematic_layout_error"),error_type:Ae("schematic_layout_error").default("schematic_layout_error"),message:B(),source_group_id:B(),schematic_group_id:B(),subcircuit_id:B().optional()}).describe("Error emitted when schematic layout fails for a group"),YL=Ne({type:Ae("schematic_debug_object"),label:B().optional(),subcircuit_id:B().optional()}),eEe=YL.extend({shape:Ae("rect"),center:wa,size:TK}),tEe=YL.extend({shape:Ae("line"),start:wa,end:wa}),nEe=YL.extend({shape:Ae("point"),center:wa}),iEe=uy("shape",[eEe,tEe,nEe]),rEe=Ne({type:Ae("schematic_voltage_probe"),schematic_voltage_probe_id:B(),position:wa,schematic_trace_id:B(),voltage:$v.optional(),subcircuit_id:B().optional()}).describe("Defines a voltage probe measurement point on a schematic trace"),YK=Ne({type:Ae("schematic_manual_edit_conflict_warning"),schematic_manual_edit_conflict_warning_id:qr("schematic_manual_edit_conflict_warning"),warning_type:Ae("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),message:B(),schematic_component_id:B(),schematic_group_id:B().optional(),subcircuit_id:B().optional(),source_component_id:B()}).describe("Warning emitted when a component has both manual placement and explicit schX/schY coordinates"),oEe=Ne({type:Ae("schematic_group"),schematic_group_id:qr("schematic_group"),source_group_id:B(),is_subcircuit:bt().optional(),subcircuit_id:B().optional(),width:st,height:st,center:wa,schematic_component_ids:Ct(B()),show_as_schematic_box:bt().optional(),name:B().optional(),description:B().optional()}).describe("Defines a group of components on the schematic"),sEe=Ne({type:Ae("schematic_table"),schematic_table_id:qr("schematic_table"),anchor_position:wa,column_widths:Ct(Ft),row_heights:Ct(Ft),cell_padding:Ft.optional(),border_width:Ft.optional(),subcircuit_id:B().optional(),schematic_component_id:B().optional(),anchor:HL.optional()}).describe("Defines a table on the schematic"),aEe=Ne({type:Ae("schematic_table_cell"),schematic_table_cell_id:qr("schematic_table_cell"),schematic_table_id:B(),start_row_index:Ue(),end_row_index:Ue(),start_column_index:Ue(),end_column_index:Ue(),text:B().optional(),center:wa,width:Ft,height:Ft,horizontal_align:dn(["left","center","right"]).optional(),vertical_align:dn(["top","middle","bottom"]).optional(),font_size:Ft.optional(),subcircuit_id:B().optional()}).describe("Defines a cell within a schematic_table"),cEe=Ne({x:Ft,y:Ft,bulge:Ue().optional()}),qK=Ne({vertices:Ct(cEe)}),lEe=Ne({outer_ring:qK,inner_rings:Ct(qK).default([])}),uEe=Ne({x:Ft,y:Ft,via:bt().optional(),via_to_layer:Xc.optional()}),W1t=Ct(uEe),kS=Ne({x:Ft,y:Ft,via:bt().optional(),to_layer:Xc.optional(),trace_width:Ft.optional()}),dEe=Ne({type:Ae("pcb_component"),pcb_component_id:qr("pcb_component"),source_component_id:B(),center:wa,layer:Xc,rotation:u0,width:st,height:st,subcircuit_id:B().optional(),pcb_group_id:B().optional()}).describe("Defines a component on the PCB"),hEe=Ne({type:Ae("pcb_hole"),pcb_hole_id:qr("pcb_hole"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),hole_shape:dn(["circle","square"]),hole_diameter:Ue(),x:Ft,y:Ft}),Z1t=hEe.describe("Defines a circular or square hole on the PCB"),pEe=Ne({type:Ae("pcb_hole"),pcb_hole_id:qr("pcb_hole"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),hole_shape:Ae("oval"),hole_width:Ue(),hole_height:Ue(),x:Ft,y:Ft}),K1t=pEe.describe("Defines an oval hole on the PCB"),fEe=hEe.or(pEe),Q1t=Ne({type:Ae("pcb_plated_hole"),shape:Ae("circle"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),outer_diameter:Ue(),hole_diameter:Ue(),x:Ft,y:Ft,layers:Ct(Xc),port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),pcb_plated_hole_id:qr("pcb_plated_hole")}),J1t=Ne({type:Ae("pcb_plated_hole"),shape:dn(["oval","pill"]),pcb_group_id:B().optional(),subcircuit_id:B().optional(),outer_width:Ue(),outer_height:Ue(),hole_width:Ue(),hole_height:Ue(),x:Ft,y:Ft,ccw_rotation:u0,layers:Ct(Xc),port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),pcb_plated_hole_id:qr("pcb_plated_hole")}),ebt=Ne({type:Ae("pcb_plated_hole"),shape:Ae("circular_hole_with_rect_pad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),hole_shape:Ae("circle"),pad_shape:Ae("rect"),hole_diameter:Ue(),rect_pad_width:Ue(),rect_pad_height:Ue(),rect_border_radius:Ue().optional(),hole_offset_x:Ft.default(0),hole_offset_y:Ft.default(0),x:Ft,y:Ft,layers:Ct(Xc),port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),pcb_plated_hole_id:qr("pcb_plated_hole")}),tbt=Ne({type:Ae("pcb_plated_hole"),shape:Ae("pill_hole_with_rect_pad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),hole_shape:Ae("pill"),pad_shape:Ae("rect"),hole_width:Ue(),hole_height:Ue(),rect_pad_width:Ue(),rect_pad_height:Ue(),rect_border_radius:Ue().optional(),hole_offset_x:Ft.default(0),hole_offset_y:Ft.default(0),x:Ft,y:Ft,layers:Ct(Xc),port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),pcb_plated_hole_id:qr("pcb_plated_hole")}),nbt=Ne({type:Ae("pcb_plated_hole"),shape:Ae("rotated_pill_hole_with_rect_pad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),hole_shape:Ae("rotated_pill"),pad_shape:Ae("rect"),hole_width:Ue(),hole_height:Ue(),hole_ccw_rotation:u0,rect_pad_width:Ue(),rect_pad_height:Ue(),rect_border_radius:Ue().optional(),rect_ccw_rotation:u0,hole_offset_x:Ft.default(0),hole_offset_y:Ft.default(0),x:Ft,y:Ft,layers:Ct(Xc),port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),pcb_plated_hole_id:qr("pcb_plated_hole")}),mEe=oi([Q1t,J1t,ebt,tbt,nbt]),_Ee=Ne({type:Ae("pcb_port"),pcb_port_id:qr("pcb_port"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),source_port_id:B(),pcb_component_id:B(),x:Ft,y:Ft,layers:Ct(Xc),is_board_pinout:bt().optional()}).describe("Defines a port on the PCB"),ibt=Ne({type:Ae("pcb_smtpad"),shape:Ae("circle"),pcb_smtpad_id:qr("pcb_smtpad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,radius:Ue(),layer:Xc,port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),is_covered_with_solder_mask:bt().optional()}),rbt=Ne({type:Ae("pcb_smtpad"),shape:Ae("rect"),pcb_smtpad_id:qr("pcb_smtpad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),rect_border_radius:Ue().optional(),layer:Xc,port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),is_covered_with_solder_mask:bt().optional()}),obt=Ne({type:Ae("pcb_smtpad"),shape:Ae("rotated_rect"),pcb_smtpad_id:qr("pcb_smtpad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),rect_border_radius:Ue().optional(),ccw_rotation:u0,layer:Xc,port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),is_covered_with_solder_mask:bt().optional()}),yEe=Ne({type:Ae("pcb_smtpad"),shape:Ae("pill"),pcb_smtpad_id:qr("pcb_smtpad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),radius:Ue(),layer:Xc,port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),is_covered_with_solder_mask:bt().optional()}),sbt=Ne({type:Ae("pcb_smtpad"),shape:Ae("rotated_pill"),pcb_smtpad_id:qr("pcb_smtpad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),radius:Ue(),ccw_rotation:u0,layer:Xc,port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),is_covered_with_solder_mask:bt().optional()}),abt=Ne({type:Ae("pcb_smtpad"),shape:Ae("polygon"),pcb_smtpad_id:qr("pcb_smtpad"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),points:Ct(wa),layer:Xc,port_hints:Ct(B()).optional(),pcb_component_id:B().optional(),pcb_port_id:B().optional(),is_covered_with_solder_mask:bt().optional()}),gEe=uy("shape",[ibt,rbt,obt,sbt,yEe,abt]).describe("Defines an SMT pad on the PCB"),cbt=Ne({type:Ae("pcb_solder_paste"),shape:Ae("circle"),pcb_solder_paste_id:qr("pcb_solder_paste"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,radius:Ue(),layer:Xc,pcb_component_id:B().optional(),pcb_smtpad_id:B().optional()}),lbt=Ne({type:Ae("pcb_solder_paste"),shape:Ae("rect"),pcb_solder_paste_id:qr("pcb_solder_paste"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),layer:Xc,pcb_component_id:B().optional(),pcb_smtpad_id:B().optional()}),ubt=Ne({type:Ae("pcb_solder_paste"),shape:Ae("pill"),pcb_solder_paste_id:qr("pcb_solder_paste"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),radius:Ue(),layer:Xc,pcb_component_id:B().optional(),pcb_smtpad_id:B().optional()}),dbt=Ne({type:Ae("pcb_solder_paste"),shape:Ae("rotated_rect"),pcb_solder_paste_id:qr("pcb_solder_paste"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),ccw_rotation:Ft,layer:Xc,pcb_component_id:B().optional(),pcb_smtpad_id:B().optional()}),hbt=Ne({type:Ae("pcb_solder_paste"),shape:Ae("oval"),pcb_solder_paste_id:qr("pcb_solder_paste"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,width:Ue(),height:Ue(),layer:Xc,pcb_component_id:B().optional(),pcb_smtpad_id:B().optional()}),bEe=oi([cbt,lbt,ubt,dbt,hbt]).describe("Defines solderpaste on the PCB"),xEe=Ne({type:Ae("pcb_text"),pcb_text_id:qr("pcb_text"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),text:B(),center:wa,layer:Xc,width:st,height:st,lines:Ue(),align:dn(["bottom-left"])}).describe("Defines text on the PCB"),vEe=Ne({route_type:Ae("wire"),x:Ft,y:Ft,width:Ft,start_pcb_port_id:B().optional(),end_pcb_port_id:B().optional(),layer:Xc}),wEe=Ne({route_type:Ae("via"),x:Ft,y:Ft,hole_diameter:Ft.optional(),outer_diameter:Ft.optional(),from_layer:B(),to_layer:B()}),XK=oi([vEe,wEe]),SEe=Ne({type:Ae("pcb_trace"),source_trace_id:B().optional(),pcb_component_id:B().optional(),pcb_trace_id:qr("pcb_trace"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),route_thickness_mode:dn(["constant","interpolated"]).default("constant").optional(),route_order_index:Ue().optional(),should_round_corners:bt().optional(),trace_length:Ue().optional(),highlight_color:B().optional(),route:Ct(XK)}).describe("Defines a trace on the PCB"),EEe=Ne({type:Ae("pcb_trace_error"),pcb_trace_error_id:qr("pcb_trace_error"),error_type:Ae("pcb_trace_error").default("pcb_trace_error"),message:B(),center:wa.optional(),pcb_trace_id:B(),source_trace_id:B(),pcb_component_ids:Ct(B()),pcb_port_ids:Ct(B()),subcircuit_id:B().optional()}).describe("Defines a trace error on the PCB"),TEe=Ne({type:Ae("pcb_trace_missing_error"),pcb_trace_missing_error_id:qr("pcb_trace_missing_error"),error_type:Ae("pcb_trace_missing_error").default("pcb_trace_missing_error"),message:B(),center:wa.optional(),source_trace_id:B(),pcb_component_ids:Ct(B()),pcb_port_ids:Ct(B()),subcircuit_id:B().optional()}).describe("Defines an error when a source trace has no corresponding PCB trace"),MEe=Ne({type:Ae("pcb_port_not_matched_error"),pcb_error_id:qr("pcb_error"),error_type:Ae("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),message:B(),pcb_component_ids:Ct(B()),subcircuit_id:B().optional()}).describe("Defines a trace error on the PCB where a port is not matched"),AEe=Ne({type:Ae("pcb_port_not_connected_error"),pcb_port_not_connected_error_id:qr("pcb_port_not_connected_error"),error_type:Ae("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),message:B(),pcb_port_ids:Ct(B()),pcb_component_ids:Ct(B()),subcircuit_id:B().optional()}).describe("Defines an error when a pcb port is not connected to any trace"),CEe=Ne({type:Ae("pcb_net"),pcb_net_id:qr("pcb_net"),source_net_id:B().optional(),highlight_color:B().optional()}).describe("Defines a net on the PCB"),REe=Ne({type:Ae("pcb_via"),pcb_via_id:qr("pcb_via"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),x:Ft,y:Ft,outer_diameter:Ft.default("0.6mm"),hole_diameter:Ft.default("0.25mm"),from_layer:Xc.optional(),to_layer:Xc.optional(),layers:Ct(Xc),pcb_trace_id:B().optional()}).describe("Defines a via on the PCB"),PEe=Ne({type:Ae("pcb_board"),pcb_board_id:qr("pcb_board"),is_subcircuit:bt().optional(),subcircuit_id:B().optional(),width:st,height:st,center:wa,thickness:st.optional().default(1.4),num_layers:Ue().optional().default(4),outline:Ct(wa).optional(),material:dn(["fr4","fr1"]).default("fr4")}).describe("Defines the board outline of the PCB"),IEe=Ne({type:Ae("pcb_placement_error"),pcb_placement_error_id:qr("pcb_placement_error"),error_type:Ae("pcb_placement_error").default("pcb_placement_error"),message:B(),subcircuit_id:B().optional()}).describe("Defines a placement error on the PCB"),NEe=Ne({type:Ae("pcb_trace_hint"),pcb_trace_hint_id:qr("pcb_trace_hint"),pcb_port_id:B(),pcb_component_id:B(),route:Ct(kS),subcircuit_id:B().optional()}).describe("A hint that can be used during generation of a PCB trace"),kEe=Ne({type:Ae("pcb_silkscreen_line"),pcb_silkscreen_line_id:qr("pcb_silkscreen_line"),pcb_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),stroke_width:Ft.default("0.1mm"),x1:Ft,y1:Ft,x2:Ft,y2:Ft,layer:V8}).describe("Defines a silkscreen line on the PCB"),OEe=Ne({type:Ae("pcb_silkscreen_path"),pcb_silkscreen_path_id:qr("pcb_silkscreen_path"),pcb_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),layer:V8,route:Ct(wa),stroke_width:st}).describe("Defines a silkscreen path on the PCB"),LEe=Ne({type:Ae("pcb_silkscreen_text"),pcb_silkscreen_text_id:qr("pcb_silkscreen_text"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),font:Ae("tscircuit2024").default("tscircuit2024"),font_size:Ft.default("0.2mm"),pcb_component_id:B(),text:B(),is_knockout:bt().default(!1).optional(),knockout_padding:Ne({left:st,top:st,bottom:st,right:st}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:Ue().optional(),layer:Xc,is_mirrored:bt().default(!1).optional(),anchor_position:wa.default({x:0,y:0}),anchor_alignment:HL.default("center")}).describe("Defines silkscreen text on the PCB"),DEe=Ne({type:Ae("pcb_silkscreen_rect"),pcb_silkscreen_rect_id:qr("pcb_silkscreen_rect"),pcb_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),center:wa,width:st,height:st,layer:Xc,stroke_width:st.default("1mm"),is_filled:bt().default(!0).optional(),has_stroke:bt().optional(),is_stroke_dashed:bt().optional()}).describe("Defines a silkscreen rect on the PCB"),zEe=Ne({type:Ae("pcb_silkscreen_circle"),pcb_silkscreen_circle_id:qr("pcb_silkscreen_circle"),pcb_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),center:wa,radius:st,layer:V8,stroke_width:st.default("1mm")}).describe("Defines a silkscreen circle on the PCB"),FEe=Ne({type:Ae("pcb_silkscreen_oval"),pcb_silkscreen_oval_id:qr("pcb_silkscreen_oval"),pcb_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),center:wa,radius_x:Ft,radius_y:Ft,layer:V8}).describe("Defines a silkscreen oval on the PCB"),BEe=Ne({type:Ae("pcb_fabrication_note_text"),pcb_fabrication_note_text_id:qr("pcb_fabrication_note_text"),subcircuit_id:B().optional(),pcb_group_id:B().optional(),font:Ae("tscircuit2024").default("tscircuit2024"),font_size:Ft.default("1mm"),pcb_component_id:B(),text:B(),layer:V8,anchor_position:wa.default({x:0,y:0}),anchor_alignment:dn(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),color:B().optional()}).describe("Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"),UEe=Ne({type:Ae("pcb_fabrication_note_path"),pcb_fabrication_note_path_id:qr("pcb_fabrication_note_path"),pcb_component_id:B(),subcircuit_id:B().optional(),layer:Xc,route:Ct(wa),stroke_width:st,color:B().optional()}).describe("Defines a fabrication path on the PCB for fabricators or assemblers"),$Ee=Ne({type:Ae("pcb_footprint_overlap_error"),pcb_error_id:qr("pcb_error"),error_type:Ae("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),message:B(),pcb_smtpad_ids:Ct(B()).optional(),pcb_plated_hole_ids:Ct(B()).optional(),pcb_hole_ids:Ct(B()).optional(),pcb_keepout_ids:Ct(B()).optional()}).describe("Error emitted when a pcb footprint overlaps with another element"),jEe=Ne({type:Ae("pcb_keepout"),shape:Ae("rect"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),center:wa,width:Ft,height:Ft,pcb_keepout_id:B(),layers:Ct(B()),description:B().optional()}).or(Ne({type:Ae("pcb_keepout"),shape:Ae("circle"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),center:wa,radius:Ft,pcb_keepout_id:B(),layers:Ct(B()),description:B().optional()})),WK=Ne({type:Ae("pcb_cutout"),pcb_cutout_id:qr("pcb_cutout"),pcb_group_id:B().optional(),subcircuit_id:B().optional()}),HEe=WK.extend({shape:Ae("rect"),center:wa,width:st,height:st,rotation:u0.optional()}),VEe=WK.extend({shape:Ae("circle"),center:wa,radius:st}),GEe=WK.extend({shape:Ae("polygon"),points:Ct(wa)}),YEe=uy("shape",[HEe,VEe,GEe]).describe("Defines a cutout on the PCB, removing board material."),qEe=Ne({type:Ae("pcb_missing_footprint_error"),pcb_missing_footprint_error_id:qr("pcb_missing_footprint_error"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),error_type:Ae("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),source_component_id:B(),message:B()}).describe("Defines a missing footprint error on the PCB"),qL=Ne({type:Ae("external_footprint_load_error"),external_footprint_load_error_id:qr("external_footprint_load_error"),pcb_component_id:B(),source_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),footprinter_string:B().optional(),error_type:Ae("external_footprint_load_error").default("external_footprint_load_error"),message:B()}).describe("Defines an error when an external footprint fails to load"),ZK=Ne({type:Ae("circuit_json_footprint_load_error"),circuit_json_footprint_load_error_id:qr("circuit_json_footprint_load_error"),pcb_component_id:B(),source_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),error_type:Ae("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),message:B(),circuit_json:Ct(jd()).optional()}).describe("Defines an error when a circuit JSON footprint fails to load"),XEe=Ne({type:Ae("pcb_group"),pcb_group_id:qr("pcb_group"),source_group_id:B(),is_subcircuit:bt().optional(),subcircuit_id:B().optional(),width:st,height:st,center:wa,pcb_component_ids:Ct(B()),name:B().optional(),description:B().optional(),layout_mode:B().optional(),autorouter_configuration:Ne({trace_clearance:st}).optional(),autorouter_used_string:B().optional()}).describe("Defines a group of components on the PCB"),WEe=Ne({type:Ae("pcb_autorouting_error"),pcb_error_id:qr("pcb_autorouting_error"),error_type:Ae("pcb_autorouting_error").default("pcb_autorouting_error"),message:B(),subcircuit_id:B().optional()}).describe("The autorouting has failed to route a portion of the board"),KK=Ne({type:Ae("pcb_manual_edit_conflict_warning"),pcb_manual_edit_conflict_warning_id:qr("pcb_manual_edit_conflict_warning"),warning_type:Ae("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),message:B(),pcb_component_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),source_component_id:B()}).describe("Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"),ZEe=Ne({type:Ae("pcb_breakout_point"),pcb_breakout_point_id:qr("pcb_breakout_point"),pcb_group_id:B(),subcircuit_id:B().optional(),source_trace_id:B().optional(),source_port_id:B().optional(),source_net_id:B().optional(),x:Ft,y:Ft}).describe("Defines a routing target within a pcb_group for a source_trace or source_net"),KEe=Ne({type:Ae("pcb_ground_plane"),pcb_ground_plane_id:qr("pcb_ground_plane"),source_pcb_ground_plane_id:B(),source_net_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional()}).describe("Defines a ground plane on the PCB"),QEe=Ne({type:Ae("pcb_ground_plane_region"),pcb_ground_plane_region_id:qr("pcb_ground_plane_region"),pcb_ground_plane_id:B(),pcb_group_id:B().optional(),subcircuit_id:B().optional(),layer:Xc,points:Ct(wa)}).describe("Defines a polygon region of a ground plane"),JEe=Ne({type:Ae("pcb_thermal_spoke"),pcb_thermal_spoke_id:qr("pcb_thermal_spoke"),pcb_ground_plane_id:B(),shape:B(),spoke_count:Ue(),spoke_thickness:Ft,spoke_inner_diameter:Ft,spoke_outer_diameter:Ft,pcb_plated_hole_id:B().optional(),subcircuit_id:B().optional()}).describe("Pattern for connecting a ground plane to a plated hole"),QK=Ne({type:Ae("pcb_copper_pour"),pcb_copper_pour_id:qr("pcb_copper_pour"),pcb_group_id:B().optional(),subcircuit_id:B().optional(),layer:Xc,source_net_id:B().optional()}),eTe=QK.extend({shape:Ae("rect"),center:wa,width:st,height:st,rotation:u0.optional()}),tTe=QK.extend({shape:Ae("brep"),brep_shape:lEe}),nTe=QK.extend({shape:Ae("polygon"),points:Ct(wa)}),iTe=uy("shape",[eTe,tTe,nTe]).describe("Defines a copper pour on the PCB."),rTe=Ne({type:Ae("pcb_component_outside_board_error"),pcb_component_outside_board_error_id:qr("pcb_component_outside_board_error"),error_type:Ae("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),message:B(),pcb_component_id:B(),pcb_board_id:B(),component_center:wa,component_bounds:Ne({min_x:Ue(),max_x:Ue(),min_y:Ue(),max_y:Ue()}),subcircuit_id:B().optional(),source_component_id:B().optional()}).describe("Error emitted when a PCB component is placed outside the board boundaries"),oTe=Ne({type:Ae("cad_component"),cad_component_id:B(),pcb_component_id:B(),source_component_id:B(),position:H8,rotation:H8.optional(),size:H8.optional(),layer:Xc.optional(),subcircuit_id:B().optional(),footprinter_string:B().optional(),model_obj_url:B().optional(),model_stl_url:B().optional(),model_3mf_url:B().optional(),model_gltf_url:B().optional(),model_glb_url:B().optional(),model_step_url:B().optional(),model_wrl_url:B().optional(),model_unit_to_mm_scale_factor:Ue().optional(),model_jscad:jd().optional()}).describe("Defines a component on the PCB"),sTe=dn(["sinewave","square","triangle","sawtooth"]),pbt=oi([B(),Ue()]).transform(t=>typeof t=="string"?t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(Ue().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),aTe=Ne({type:Ae("simulation_voltage_source"),simulation_voltage_source_id:qr("simulation_voltage_source"),is_dc_source:Ae(!0).optional().default(!0),positive_source_port_id:B().optional(),negative_source_port_id:B().optional(),positive_source_net_id:B().optional(),negative_source_net_id:B().optional(),voltage:$v}).describe("Defines a DC voltage source for simulation"),cTe=Ne({type:Ae("simulation_voltage_source"),simulation_voltage_source_id:qr("simulation_voltage_source"),is_dc_source:Ae(!1),terminal1_source_port_id:B().optional(),terminal2_source_port_id:B().optional(),terminal1_source_net_id:B().optional(),terminal2_source_net_id:B().optional(),voltage:$v.optional(),frequency:mT.optional(),peak_to_peak_voltage:$v.optional(),wave_shape:sTe.optional(),phase:u0.optional(),duty_cycle:pbt.optional()}).describe("Defines an AC voltage source for simulation"),lTe=oi([aTe,cTe]).describe("Defines a voltage source for simulation"),uTe=oi([N4e,I4e,P4e,O4e,k4e,RK,MK,GL,CK,AK,PK,IK,NK,LK,DK,zK,$K,FK,BK,UK,OK,kK,L4e,D4e,jK,HK,VK,dEe,fEe,qEe,qL,ZK,KK,mEe,jEe,_Ee,CEe,xEe,SEe,REe,gEe,bEe,PEe,XEe,NEe,kEe,OEe,LEe,DEe,zEe,FEe,EEe,TEe,IEe,MEe,AEe,UEe,BEe,WEe,$Ee,ZEe,YEe,KEe,QEe,JEe,iTe,rTe,z4e,W4e,V4e,G4e,Y4e,q4e,H4e,Z4e,X4e,F4e,Q4e,J4e,K4e,iEe,rEe,YK,oEe,sEe,aEe,oTe,lTe]),XL=uTe;const JK=Object.freeze(Object.defineProperty({__proto__:null,all_layers:LR,any_circuit_element:uTe,any_soup_element:XL,any_source_component:P4e,battery_capacity:E4e,brep_shape:lEe,cad_component:oTe,capacitance:j8,circuit_json_footprint_load_error:ZK,current:j1t,distance:Ft,external_footprint_load_error:qL,frequency:mT,getZodPrefixedIdWithDefault:qr,inductance:EK,layer_ref:Xc,layer_string:GK,length:st,ninePointAnchor:HL,pcb_autorouting_error:WEe,pcb_board:PEe,pcb_breakout_point:ZEe,pcb_component:dEe,pcb_component_outside_board_error:rTe,pcb_copper_pour:iTe,pcb_copper_pour_brep:tTe,pcb_copper_pour_polygon:nTe,pcb_copper_pour_rect:eTe,pcb_cutout:YEe,pcb_cutout_circle:VEe,pcb_cutout_polygon:GEe,pcb_cutout_rect:HEe,pcb_fabrication_note_path:UEe,pcb_fabrication_note_text:BEe,pcb_footprint_overlap_error:$Ee,pcb_ground_plane:KEe,pcb_ground_plane_region:QEe,pcb_group:XEe,pcb_hole:fEe,pcb_hole_circle_or_square_shape:Z1t,pcb_hole_oval_shape:K1t,pcb_keepout:jEe,pcb_manual_edit_conflict_warning:KK,pcb_missing_footprint_error:qEe,pcb_net:CEe,pcb_placement_error:IEe,pcb_plated_hole:mEe,pcb_port:_Ee,pcb_port_not_connected_error:AEe,pcb_port_not_matched_error:MEe,pcb_route_hint:uEe,pcb_route_hints:W1t,pcb_silkscreen_circle:zEe,pcb_silkscreen_line:kEe,pcb_silkscreen_oval:FEe,pcb_silkscreen_path:OEe,pcb_silkscreen_rect:DEe,pcb_silkscreen_text:LEe,pcb_smtpad:gEe,pcb_smtpad_pill:yEe,pcb_solder_paste:bEe,pcb_text:xEe,pcb_thermal_spoke:JEe,pcb_trace:SEe,pcb_trace_error:EEe,pcb_trace_hint:NEe,pcb_trace_missing_error:TEe,pcb_trace_route_point:XK,pcb_trace_route_point_via:wEe,pcb_trace_route_point_wire:vEe,pcb_via:REe,point:wa,point3:H8,point_with_bulge:cEe,port_arrangement:j4e,position:V1t,position3:G1t,resistance:$8,ring:qK,rotation:u0,route_hint_point:kS,schematic_arc:q4e,schematic_box:z4e,schematic_circle:Y4e,schematic_component:H4e,schematic_component_port_arrangement_by_sides:$4e,schematic_component_port_arrangement_by_size:U4e,schematic_debug_line:tEe,schematic_debug_object:iEe,schematic_debug_object_base:YL,schematic_debug_point:nEe,schematic_debug_rect:eEe,schematic_error:Q4e,schematic_group:oEe,schematic_layout_error:J4e,schematic_line:V4e,schematic_manual_edit_conflict_warning:YK,schematic_net_label:K4e,schematic_path:F4e,schematic_pin_styles:B4e,schematic_port:Z4e,schematic_rect:G4e,schematic_table:sEe,schematic_table_cell:aEe,schematic_text:W4e,schematic_trace:X4e,schematic_voltage_probe:rEe,simulation_ac_voltage_source:cTe,simulation_dc_voltage_source:aTe,simulation_voltage_source:lTe,size:TK,source_component_base:Ig,source_failed_to_create_component_error:C4e,source_group:k4e,source_manually_placed_via:D4e,source_missing_property_error:A4e,source_net:O4e,source_pcb_ground_plane:L4e,source_pin_missing_trace_warning:VK,source_port:I4e,source_project_metadata:jK,source_property_ignored_warning:R4e,source_simple_battery:IK,source_simple_capacitor:MK,source_simple_chip:RK,source_simple_crystal:M4e,source_simple_diode:GL,source_simple_ground:T4e,source_simple_inductor:NK,source_simple_led:CK,source_simple_mosfet:UK,source_simple_pin_header:LK,source_simple_pinout:DK,source_simple_potentiometer:OK,source_simple_power_source:PK,source_simple_push_button:kK,source_simple_resistor:AK,source_simple_resonator:zK,source_simple_switch:$K,source_simple_test_point:BK,source_simple_transistor:FK,source_trace:N4e,source_trace_not_connected_error:HK,supplier_name:VL,time:H1t,visible_layer:V8,voltage:$v,wave_shape:sTe},Symbol.toStringTag,{value:"Module"}));function Yt(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function fbt(t,e){return e.map(n=>Yt(t,n))}function dTe(t){return{a:parseFloat(t.a),b:parseFloat(t.b),c:parseFloat(t.c),d:parseFloat(t.d),e:parseFloat(t.e),f:parseFloat(t.f)}}const mbt=/^matrix\(\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*\)$/i;function WL(t){const e=t.match(mbt);if(e===null||e.length<7)throw new Error(`'${t}' is not a matrix`);return{a:parseFloat(e[1]),b:parseFloat(e[2]),c:parseFloat(e[3]),d:parseFloat(e[4]),e:parseFloat(e[5]),f:parseFloat(e[6])}}function d0(){return{a:1,c:0,e:0,b:0,d:1,f:0}}function i5(t){const{a:e,b:n,c:i,d:r,e:o,f:s}=t,a=e*r-n*i;return{a:r/a,b:n/-a,c:i/-a,d:e/a,e:(r*o-i*s)/-a,f:(n*o-e*s)/a}}function DR(t){return typeof t>"u"}function G8(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}function _bt(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function ybt(t){return _bt(t)&&"a"in t&&G8(t.a)&&"b"in t&&G8(t.b)&&"c"in t&&G8(t.c)&&"d"in t&&G8(t.d)&&"e"in t&&G8(t.e)&&"f"in t&&G8(t.f)}function Cs(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function Y8(...t){t=Array.isArray(t[0])?t[0]:t;const e=(n,i)=>({a:n.a*i.a+n.c*i.b,c:n.a*i.c+n.c*i.d,e:n.a*i.e+n.c*i.f+n.e,b:n.b*i.a+n.d*i.b,d:n.b*i.c+n.d*i.d,f:n.b*i.e+n.d*i.f+n.f});switch(t.length){case 0:throw new Error("no matrices provided");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,i,...r]=t,o=e(n,i);return Y8(o,...r)}}}function cs(...t){return Y8(...t)}const{cos:gbt,sin:bbt,PI:xbt}=Math;function ov(t,e,n){const i=gbt(t),r=bbt(t),o={a:i,c:-r,e:0,b:r,d:i,f:0};return DR(e)||DR(n)?o:Y8([Cs(e,n),o,Cs(-e,-n)])}function zR(t,e=void 0,n=void 0){return ov(t*xbt/180,e,n)}function Ng(t,e=void 0,n=void 0,i=void 0){DR(e)&&(e=t);const r={a:t,c:0,e:0,b:0,d:e,f:0};return DR(n)||DR(i)?r:Y8([Cs(n,i),r,Cs(-n,-i)])}function hTe(t,e){return{a:1,c:t,e:0,b:e,d:1,f:0}}const{tan:pTe}=Math;function fTe(t,e){return{a:1,c:pTe(t),e:0,b:pTe(e),d:1,f:0}}function eQ(t,e){return fTe(t*Math.PI/180,e*Math.PI/180)}function vbt(t){return cw(t)}function mTe(t){return cw(t)}function cw(t){return`matrix(${t.a},${t.b},${t.c},${t.d},${t.e},${t.f})`}function _Te(t,e=1e10){return{a:Math.round(t.a*e)/e,b:Math.round(t.b*e)/e,c:Math.round(t.c*e)/e,d:Math.round(t.d*e)/e,e:Math.round(t.e*e)/e,f:Math.round(t.f*e)/e}}function yTe(t,e){const n=t[0].x!=null?t[0].x:t[0][0],i=t[0].y!=null?t[0].y:t[0][1],r=e[0].x!=null?e[0].x:e[0][0],o=e[0].y!=null?e[0].y:e[0][1],s=t[1].x!=null?t[1].x:t[1][0],a=t[1].y!=null?t[1].y:t[1][1],c=e[1].x!=null?e[1].x:e[1][0],l=e[1].y!=null?e[1].y:e[1][1],u=t[2].x!=null?t[2].x:t[2][0],d=t[2].y!=null?t[2].y:t[2][1],h=e[2].x!=null?e[2].x:e[2][0],f=e[2].y!=null?e[2].y:e[2][1],m={a:n-u,b:i-d,c:s-u,d:a-d,e:u,f:d},y={a:r-h,b:o-f,c:c-h,d:l-f,e:h,f},g=i5(m),b=Y8([y,g]);return _Te(b)}function wbt(t){return Array.isArray(t)?t.map(e):e(t);function e(n){switch(n.type){case"matrix":if("a"in n&&"b"in n&&"c"in n&&"d"in n&&"e"in n&&"f"in n)return dTe(n);throw new Error("MISSING_MANDATORY_PARAM");case"translate":if(!("tx"in n))throw new Error("MISSING_MANDATORY_PARAM");return"ty"in n?Cs(n.tx,n.ty):Cs(n.tx);case"scale":if(!("sx"in n))throw new Error("MISSING_MANDATORY_PARAM");return"sy"in n?Ng(n.sx,n.sy):Ng(n.sx);case"rotate":if(!("angle"in n))throw new Error("MISSING_MANDATORY_PARAM");return"cx"in n&&"cy"in n?zR(n.angle,n.cx,n.cy):zR(n.angle);case"skewX":if(!("angle"in n))throw new Error("MISSING_MANDATORY_PARAM");return eQ(n.angle,0);case"skewY":if(!("angle"in n))throw new Error("MISSING_MANDATORY_PARAM");return eQ(0,n.angle);case"shear":if(!("shx"in n&&"shy"in n))throw new Error("MISSING_MANDATORY_PARAM");return hTe(n.shx,n.shy);default:throw new Error("UNSUPPORTED_DESCRIPTOR")}}}function Sbt(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function q8(t,e,n,i){var r=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(r,q8.prototype),r.expected=e,r.found=n,r.location=i,r.name="SyntaxError",r}Sbt(q8,Error);function tQ(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}q8.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n=null,i;for(i=0;i<t.length;i++)if(t[i].source===this.location.source){n=t[i].text.split(/\r\n|\n|\r/g);break}var r=this.location.start,o=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(r):r,s=this.location.source+":"+o.line+":"+o.column;if(n){var a=this.location.end,c=tQ("",o.line.toString().length," "),l=n[r.line-1],u=r.line===a.line?a.column:l.length+1,d=u-r.column||1;e+=`
|
|
323
323
|
--> `+s+`
|
|
324
324
|
`+c+` |
|
|
325
325
|
`+o.line+" | "+l+`
|
|
@@ -5574,7 +5574,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}}}),set={};H2n(set,{all_layers:()=>kye
|
|
|
5574
5574
|
* Copyright (c) 2013-2015, 2017, Jon Schlinkert.
|
|
5575
5575
|
* Released under the MIT License.
|
|
5576
5576
|
*)
|
|
5577
|
-
*/const f3n=({containerClassName:t,...e})=>{const n=Ce.useRef(null),[i,r]=Ce.useState(620);return Ce.useLayoutEffect(()=>{const o=()=>{if(n.current){const a=n.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return n.current&&s.observe(n.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),ye.jsx("div",{ref:n,className:t||"rf-w-full rf-h-full",children:ye.jsx(p3n,{...e,height:i})})},m3n='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.\\!rf-z-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[400px\\]{width:400px}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[400px\\]{min-width:400px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-64{max-width:16rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[100px\\]{max-width:100px}.rf-max-w-\\[120px\\]{max-width:120px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[400px\\]{max-width:400px}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.\\!rf-overflow-x-auto{overflow-x:auto!important}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-1{padding-bottom:.25rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.rf-text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.rf-text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',_3n=()=>{Ce.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=m3n,document.head.appendChild(e)},[])},y3n=t=>{Ce.useEffect(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t])},Nnt=t=>`hsl(${A2.indexOf(t)*137.5%360}, 70%, 50%)`,g3n=({phaseTimings:t})=>{if(!t)return null;const e=Object.values(t).reduce((n,i)=>n+i,0);return ye.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[ye.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:A2.map(n=>{const i=t[n]||0,r=i/e*100;return ye.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:Nnt(n)},children:ye.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[n,": ",i.toFixed(1),"ms"]})},n)})}),ye.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},b3n=({renderLog:t,onRerunWithDebug:e})=>{const[n,i]=Ce.useState("chronological"),[r,o]=Ce.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!t)return ye.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[ye.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&ye.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[ye.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>ye.jsx("option",{value:l.value,children:l.label},l.value))}),ye.jsx(P_,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const a=Object.entries(t?.phaseTimings??{});n==="chronological"?a.sort((l,u)=>A2.indexOf(l[0])-A2.indexOf(u[0])):a.sort((l,u)=>u[1]-l[1]);const c=a.reduce((l,[u,d])=>l+d,0);return ye.jsxs("div",{className:"rf-bg-white",children:[ye.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[ye.jsx("div",{children:"Render Logs"}),ye.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&ye.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[ye.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>ye.jsx("option",{value:l.value,children:l.label},l.value))}),ye.jsx(P_,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),ye.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:ye.jsxs("select",{onChange:l=>{if(l.target.value){const u=t?.debugOutputs?.find(d=>d.name===l.target.value);if(u){const d=new Blob([u.content],{type:"text/plain"}),h=URL.createObjectURL(d),f=document.createElement("a");f.href=h,f.download=`debug-${u.name}.txt`,document.body.appendChild(f),f.click(),document.body.removeChild(f),URL.revokeObjectURL(h)}l.target.value=""}},disabled:!t?.debugOutputs||t.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[ye.jsx("option",{value:"",children:"Download Debug Output"}),t?.debugOutputs?.map(l=>ye.jsx("option",{value:l.name,children:l.name},l.name))]})}),ye.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[ye.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),ye.jsxs("select",{value:n,onChange:l=>i(l.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[ye.jsx("option",{value:"chronological",children:"Phase Order"}),ye.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),ye.jsx(g3n,{phaseTimings:t.phaseTimings}),ye.jsxs("table",{className:"rf-w-full rf-text-xs",children:[ye.jsx("thead",{children:ye.jsxs("tr",{children:[ye.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),ye.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),ye.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),ye.jsx("tbody",{children:a.map(([l,u])=>ye.jsxs("tr",{children:[ye.jsx("td",{className:"rf-p-2",children:A2.indexOf(l)}),ye.jsx("td",{className:"rf-p-2",children:l}),ye.jsx("td",{className:"rf-p-2",children:ye.jsx("div",{className:"rf-w-8",children:ye.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:Nnt(l),width:`${u/c*100}%`}})})}),ye.jsx("td",{className:"rf-p-2",children:ye.jsxs("div",{className:"rf-flex w-full",children:[ye.jsxs("span",{className:"rf-flex-grow",children:[u,"ms"]}),ye.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(u/c*100).toFixed(1),"%"]})]})})]},l))})]})]})},knt=({errorMessage:t,errorStack:e,circuitJsonErrors:n})=>{Ce.useEffect(()=>{if(t){const i=new Error(t);e&&(i.stack=e);try{AL.captureException(i)}catch{}}},[t,e]),Ce.useEffect(()=>{if(n&&n.length>0)for(const i of n){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{AL.captureException(r,{error_type:i.type})}catch{}}},[n])},x3n="0.0.973";function v3n(t,e){const[n,i]=Ce.useState(()=>{try{const r=window.localStorage.getItem(t);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return Ce.useEffect(()=>{try{window.localStorage.setItem(t,JSON.stringify(n))}catch(r){console.error("Error writing to localStorage:",r)}},[t,n]),[n,i]}const jye={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Hye=new Map,iV=t=>{const e=Hye.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,i])=>[n,i.getState()])):{}},w3n=(t,e,n)=>{if(t===void 0)return{type:"untracked",connection:e.connect(n)};const i=Hye.get(n.name);if(i)return{type:"tracked",store:t,...i};const r={connection:e.connect(n),stores:{}};return Hye.set(n.name,r),{type:"tracked",store:t,...r}},Ont=(t,e={})=>(n,i,r)=>{const{enabled:o,anonymousActionType:s,store:a,...c}=e;let l;try{l=(o??(jye?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(jye?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,i,r);const{connection:u,...d}=w3n(a,l,c);let h=!0;r.setState=(y,g,b)=>{const v=n(y,g);if(!h)return v;const w=b===void 0?{type:s||"anonymous"}:typeof b=="string"?{type:b}:b;return a===void 0?(u?.send(w,i()),v):(u?.send({...w,type:`${a}/${w.type}`},{...iV(c.name),[a]:r.getState()}),v)};const f=(...y)=>{const g=h;h=!1,n(...y),h=g},m=t(r.setState,i,r);if(d.type==="untracked"?u?.init(m):(d.stores[d.store]=r,u?.init(Object.fromEntries(Object.entries(d.stores).map(([y,g])=>[y,y===d.store?m:g.getState()])))),r.dispatchFromDevtools&&typeof r.dispatch=="function"){let y=!1;const g=r.dispatch;r.dispatch=(...b)=>{(jye?"production":void 0)!=="production"&&b[0].type==="__setState"&&!y&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),y=!0),g(...b)}}return u.subscribe(y=>{var g;switch(y.type){case"ACTION":if(typeof y.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Vye(y.payload,b=>{if(b.type==="__setState"){if(a===void 0){f(b.state);return}Object.keys(b.state).length!==1&&console.error(`
|
|
5577
|
+
*/const f3n=({containerClassName:t,...e})=>{const n=Ce.useRef(null),[i,r]=Ce.useState(620);return Ce.useLayoutEffect(()=>{const o=()=>{if(n.current){const a=n.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return n.current&&s.observe(n.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),ye.jsx("div",{ref:n,className:t||"rf-w-full rf-h-full",children:ye.jsx(p3n,{...e,height:i})})},m3n='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.\\!rf-z-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[400px\\]{width:400px}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[400px\\]{min-width:400px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-64{max-width:16rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[100px\\]{max-width:100px}.rf-max-w-\\[120px\\]{max-width:120px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[400px\\]{max-width:400px}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.\\!rf-overflow-x-auto{overflow-x:auto!important}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-1{padding-bottom:.25rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.rf-text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.rf-text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',_3n=()=>{Ce.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=m3n,document.head.appendChild(e)},[])},y3n=t=>{Ce.useEffect(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t])},Nnt=t=>`hsl(${A2.indexOf(t)*137.5%360}, 70%, 50%)`,g3n=({phaseTimings:t})=>{if(!t)return null;const e=Object.values(t).reduce((n,i)=>n+i,0);return ye.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[ye.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:A2.map(n=>{const i=t[n]||0,r=i/e*100;return ye.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:Nnt(n)},children:ye.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[n,": ",i.toFixed(1),"ms"]})},n)})}),ye.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},b3n=({renderLog:t,onRerunWithDebug:e})=>{const[n,i]=Ce.useState("chronological"),[r,o]=Ce.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!t)return ye.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[ye.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&ye.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[ye.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>ye.jsx("option",{value:l.value,children:l.label},l.value))}),ye.jsx(P_,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const a=Object.entries(t?.phaseTimings??{});n==="chronological"?a.sort((l,u)=>A2.indexOf(l[0])-A2.indexOf(u[0])):a.sort((l,u)=>u[1]-l[1]);const c=a.reduce((l,[u,d])=>l+d,0);return ye.jsxs("div",{className:"rf-bg-white",children:[ye.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[ye.jsx("div",{children:"Render Logs"}),ye.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&ye.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[ye.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>ye.jsx("option",{value:l.value,children:l.label},l.value))}),ye.jsx(P_,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),ye.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:ye.jsxs("select",{onChange:l=>{if(l.target.value){const u=t?.debugOutputs?.find(d=>d.name===l.target.value);if(u){const d=new Blob([u.content],{type:"text/plain"}),h=URL.createObjectURL(d),f=document.createElement("a");f.href=h,f.download=`debug-${u.name}.txt`,document.body.appendChild(f),f.click(),document.body.removeChild(f),URL.revokeObjectURL(h)}l.target.value=""}},disabled:!t?.debugOutputs||t.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[ye.jsx("option",{value:"",children:"Download Debug Output"}),t?.debugOutputs?.map(l=>ye.jsx("option",{value:l.name,children:l.name},l.name))]})}),ye.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[ye.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),ye.jsxs("select",{value:n,onChange:l=>i(l.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[ye.jsx("option",{value:"chronological",children:"Phase Order"}),ye.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),ye.jsx(g3n,{phaseTimings:t.phaseTimings}),ye.jsxs("table",{className:"rf-w-full rf-text-xs",children:[ye.jsx("thead",{children:ye.jsxs("tr",{children:[ye.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),ye.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),ye.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),ye.jsx("tbody",{children:a.map(([l,u])=>ye.jsxs("tr",{children:[ye.jsx("td",{className:"rf-p-2",children:A2.indexOf(l)}),ye.jsx("td",{className:"rf-p-2",children:l}),ye.jsx("td",{className:"rf-p-2",children:ye.jsx("div",{className:"rf-w-8",children:ye.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:Nnt(l),width:`${u/c*100}%`}})})}),ye.jsx("td",{className:"rf-p-2",children:ye.jsxs("div",{className:"rf-flex w-full",children:[ye.jsxs("span",{className:"rf-flex-grow",children:[u,"ms"]}),ye.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(u/c*100).toFixed(1),"%"]})]})})]},l))})]})]})},knt=({errorMessage:t,errorStack:e,circuitJsonErrors:n})=>{Ce.useEffect(()=>{if(t){const i=new Error(t);e&&(i.stack=e);try{AL.captureException(i)}catch{}}},[t,e]),Ce.useEffect(()=>{if(n&&n.length>0)for(const i of n){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{AL.captureException(r,{error_type:i.type})}catch{}}},[n])},x3n="0.0.975";function v3n(t,e){const[n,i]=Ce.useState(()=>{try{const r=window.localStorage.getItem(t);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return Ce.useEffect(()=>{try{window.localStorage.setItem(t,JSON.stringify(n))}catch(r){console.error("Error writing to localStorage:",r)}},[t,n]),[n,i]}const jye={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Hye=new Map,iV=t=>{const e=Hye.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,i])=>[n,i.getState()])):{}},w3n=(t,e,n)=>{if(t===void 0)return{type:"untracked",connection:e.connect(n)};const i=Hye.get(n.name);if(i)return{type:"tracked",store:t,...i};const r={connection:e.connect(n),stores:{}};return Hye.set(n.name,r),{type:"tracked",store:t,...r}},Ont=(t,e={})=>(n,i,r)=>{const{enabled:o,anonymousActionType:s,store:a,...c}=e;let l;try{l=(o??(jye?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(jye?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,i,r);const{connection:u,...d}=w3n(a,l,c);let h=!0;r.setState=(y,g,b)=>{const v=n(y,g);if(!h)return v;const w=b===void 0?{type:s||"anonymous"}:typeof b=="string"?{type:b}:b;return a===void 0?(u?.send(w,i()),v):(u?.send({...w,type:`${a}/${w.type}`},{...iV(c.name),[a]:r.getState()}),v)};const f=(...y)=>{const g=h;h=!1,n(...y),h=g},m=t(r.setState,i,r);if(d.type==="untracked"?u?.init(m):(d.stores[d.store]=r,u?.init(Object.fromEntries(Object.entries(d.stores).map(([y,g])=>[y,y===d.store?m:g.getState()])))),r.dispatchFromDevtools&&typeof r.dispatch=="function"){let y=!1;const g=r.dispatch;r.dispatch=(...b)=>{(jye?"production":void 0)!=="production"&&b[0].type==="__setState"&&!y&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),y=!0),g(...b)}}return u.subscribe(y=>{var g;switch(y.type){case"ACTION":if(typeof y.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Vye(y.payload,b=>{if(b.type==="__setState"){if(a===void 0){f(b.state);return}Object.keys(b.state).length!==1&&console.error(`
|
|
5578
5578
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
5579
5579
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
5580
5580
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|