@tonyclaw/agent-inspector 2.0.29 → 2.0.30
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.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/{CompareDrawer-DcqxlgSQ.js → CompareDrawer-BDzfRSt1.js} +1 -1
- package/.output/public/assets/{ProxyViewerContainer-D650kQlv.js → ProxyViewerContainer-NtOD8Ex_.js} +4 -4
- package/.output/public/assets/{ReplayDialog-CBcnPgx1.js → ReplayDialog-p-5TKg75.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-DSgSqCYt.js → RequestAnatomy-G0dV8-D_.js} +1 -1
- package/.output/public/assets/{ResponseView-CjqzBSoF.js → ResponseView-D2wE6lD-.js} +1 -1
- package/.output/public/assets/{StreamingChunkSequence-DdBBKolI.js → StreamingChunkSequence-D8JRK-j_.js} +1 -1
- package/.output/public/assets/_sessionId-zimzVrJE.js +1 -0
- package/.output/public/assets/index-Cv5vPgpr.js +1 -0
- package/.output/public/assets/{main-B6OLZCp9.js → main-XHHZsOBK.js} +2 -2
- package/.output/server/{_sessionId-CCfKJJ19.mjs → _sessionId-CK9QEhkB.mjs} +3 -3
- package/.output/server/_ssr/{CompareDrawer-uaPI5R6e.mjs → CompareDrawer-BJVPFMIx.mjs} +2 -2
- package/.output/server/_ssr/{ProxyViewerContainer-BV2nIxXy.mjs → ProxyViewerContainer-DhbmJ2zj.mjs} +7 -7
- package/.output/server/_ssr/{ReplayDialog-eE2Hy2Nl.mjs → ReplayDialog-DXRj95Gj.mjs} +3 -3
- package/.output/server/_ssr/{RequestAnatomy-B7vwWo57.mjs → RequestAnatomy-CrYJTXdJ.mjs} +2 -2
- package/.output/server/_ssr/{ResponseView-Bm6Qp8mo.mjs → ResponseView-4ESqSITr.mjs} +2 -2
- package/.output/server/_ssr/{StreamingChunkSequence-CbAJKJQx.mjs → StreamingChunkSequence-Czdko5n_.mjs} +2 -2
- package/.output/server/_ssr/{index-u14_Aj60.mjs → index-bei0I7qL.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{router-qgeGUp1k.mjs → router-sQh4Gk8J.mjs} +1189 -131
- package/.output/server/_tanstack-start-manifest_v-C0fdSWnA.mjs +4 -0
- package/.output/server/index.mjs +62 -62
- package/README.md +24 -1
- package/package.json +1 -1
- package/src/lib/groupContract.ts +139 -0
- package/src/mcp/server.ts +278 -0
- package/src/mcp/toolHandlers.ts +123 -0
- package/src/proxy/groupEvidenceExporter.ts +341 -0
- package/src/proxy/groupStore.ts +259 -0
- package/src/routes/api/groups.$groupId.evidence.ts +62 -0
- package/src/routes/api/groups.$groupId.sessions.ts +50 -0
- package/src/routes/api/groups.$groupId.ts +50 -0
- package/src/routes/api/groups.ts +39 -0
- package/.output/public/assets/_sessionId-wctOoGh_.js +0 -1
- package/.output/public/assets/index-BhQGSdhG.js +0 -1
- package/.output/server/_tanstack-start-manifest_v-BrfUXnre.mjs +0 -4
package/.output/public/assets/{ProxyViewerContainer-D650kQlv.js → ProxyViewerContainer-NtOD8Ex_.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CompareDrawer-
|
|
2
|
-
import{u as ua,a as md,r as x,j as a,c as Yr,g as da,b as Br,d as lt,e as gd,f as Ag,h as Ig,_ as Nn}from"./main-B6OLZCp9.js";function ne(e,t,n){function r(l,c){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,c);const u=i.prototype,d=Object.keys(u);for(let f=0;f<d.length;f++){const h=d[f];h in l||(l[h]=u[h].bind(l))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(l){var c;const u=n?.Parent?new s:this;r(u,l),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:l=>n?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Hn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class xd extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const yd={};function an(e){return yd}function bd(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function mi(e,t){return typeof t=="bigint"?t.toString():t}function ts(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function fa(e){return e==null}function pa(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function zg(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const c=r.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const s=n>o?n:o,i=Number.parseInt(e.toFixed(s).replace(".","")),l=Number.parseInt(t.toFixed(s).replace(".",""));return i%l/10**s}const Cl=Symbol("evaluating");function Ie(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Cl)return r===void 0&&(r=Cl,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Tn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function fn(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function jl(e){return JSON.stringify(e)}function Pg(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const vd="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ar(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Rg=ts(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Yn(e){if(Ar(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Ar(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function wd(e){return Yn(e)?{...e}:Array.isArray(e)?[...e]:e}const Og=new Set(["string","number","symbol"]);function Xn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pn(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function we(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Mg(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Lg={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Dg(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=fn(e._zod.def,{get shape(){const i={};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(i[l]=n.shape[l])}return Tn(this,"shape",i),i},checks:[]});return pn(e,s)}function Fg(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=fn(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete i[l]}return Tn(this,"shape",i),i},checks:[]});return pn(e,s)}function $g(e,t){if(!Yn(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=fn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Tn(this,"shape",s),s}});return pn(e,o)}function Bg(e,t){if(!Yn(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=fn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Tn(this,"shape",r),r}});return pn(e,n)}function Ug(e,t){const n=fn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Tn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return pn(e,n)}function Wg(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=fn(t._zod.def,{get shape(){const l=t._zod.def.shape,c={...l};if(n)for(const u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(const u in l)c[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return Tn(this,"shape",c),c},checks:[]});return pn(t,i)}function Vg(e,t,n){const r=fn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const i in n){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return Tn(this,"shape",s),s}});return pn(t,r)}function Wn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Vn(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Xr(e){return typeof e=="string"?e:e?.message}function ln(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=Xr(e.inst?._zod.def?.error?.(e))??Xr(t?.error?.(e))??Xr(n.customError?.(e))??Xr(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function ha(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ir(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const kd=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,mi,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},_d=ne("$ZodError",kd),Sd=ne("$ZodError",kd,{Parent:Error});function Hg(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Zg(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(i=>r({issues:i}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let i=n,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(i[c]=i[c]||{_errors:[]},i[c]._errors.push(t(s))):i[c]=i[c]||{_errors:[]},i=i[c],l++}}};return r(e),n}const ma=e=>(t,n,r,o)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Hn;if(i.issues.length){const l=new(o?.Err??e)(i.issues.map(c=>ln(c,s,an())));throw vd(l,o?.callee),l}return i.value},ga=e=>async(t,n,r,o)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const l=new(o?.Err??e)(i.issues.map(c=>ln(c,s,an())));throw vd(l,o?.callee),l}return i.value},ns=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Hn;return s.issues.length?{success:!1,error:new(e??_d)(s.issues.map(i=>ln(i,o,an())))}:{success:!0,data:s.value}},qg=ns(Sd),rs=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>ln(i,o,an())))}:{success:!0,data:s.value}},Kg=rs(Sd),Jg=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ma(e)(t,n,o)},Gg=e=>(t,n,r)=>ma(e)(t,n,r),Yg=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ga(e)(t,n,o)},Xg=e=>async(t,n,r)=>ga(e)(t,n,r),Qg=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ns(e)(t,n,o)},ex=e=>(t,n,r)=>ns(e)(t,n,r),tx=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return rs(e)(t,n,o)},nx=e=>async(t,n,r)=>rs(e)(t,n,r),rx=/^[cC][^\s-]{8,}$/,ox=/^[0-9a-z]+$/,sx=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ix=/^[0-9a-vA-V]{20}$/,ax=/^[A-Za-z0-9]{27}$/,lx=/^[a-zA-Z0-9_-]{21}$/,cx=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ux=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,El=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,dx=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,fx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function px(){return new RegExp(fx,"u")}const hx=/^(?:(?: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])$/,mx=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,gx=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,xx=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yx=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Cd=/^[A-Za-z0-9_-]*$/,bx=/^\+[1-9]\d{6,14}$/,jd="(?:(?:\\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])))",vx=new RegExp(`^${jd}$`);function Ed(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function wx(e){return new RegExp(`^${Ed(e)}$`)}function kx(e){const t=Ed({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${jd}T(?:${r})$`)}const _x=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Sx=/^-?\d+$/,Nd=/^-?\d+(?:\.\d+)?$/,Cx=/^(?:true|false)$/i,jx=/^null$/i,Ex=/^[^A-Z]*$/,Nx=/^[^a-z]*$/,ut=ne("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Td={number:"number",bigint:"bigint",object:"date"},Ad=ne("$ZodCheckLessThan",(e,t)=>{ut.init(e,t);const n=Td[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Id=ne("$ZodCheckGreaterThan",(e,t)=>{ut.init(e,t);const n=Td[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Tx=ne("$ZodCheckMultipleOf",(e,t)=>{ut.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):zg(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ax=ne("$ZodCheckNumberFormat",(e,t)=>{ut.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=Lg[t.format];e._zod.onattach.push(i=>{const l=i._zod.bag;l.format=t.format,l.minimum=o,l.maximum=s,n&&(l.pattern=Sx)}),e._zod.check=i=>{const l=i.value;if(n){if(!Number.isInteger(l)){i.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?i.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):i.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}l<o&&i.issues.push({origin:"number",input:l,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),l>s&&i.issues.push({origin:"number",input:l,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Ix=ne("$ZodCheckMaxLength",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!fa(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const i=ha(o);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),zx=ne("$ZodCheckMinLength",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!fa(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const i=ha(o);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Px=ne("$ZodCheckLengthEquals",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!fa(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const i=ha(o),l=s>t.length;r.issues.push({origin:i,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),os=ne("$ZodCheckStringFormat",(e,t)=>{var n,r;ut.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Rx=ne("$ZodCheckRegex",(e,t)=>{os.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ox=ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ex),os.init(e,t)}),Mx=ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Nx),os.init(e,t)}),Lx=ne("$ZodCheckIncludes",(e,t)=>{ut.init(e,t);const n=Xn(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Dx=ne("$ZodCheckStartsWith",(e,t)=>{ut.init(e,t);const n=new RegExp(`^${Xn(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Fx=ne("$ZodCheckEndsWith",(e,t)=>{ut.init(e,t);const n=new RegExp(`.*${Xn(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),$x=ne("$ZodCheckOverwrite",(e,t)=>{ut.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Bx{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CompareDrawer-BDzfRSt1.js","assets/main-XHHZsOBK.js","assets/ReplayDialog-p-5TKg75.js","assets/ResponseView-D2wE6lD-.js","assets/RequestAnatomy-G0dV8-D_.js","assets/StreamingChunkSequence-D8JRK-j_.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{u as ua,a as md,r as x,j as a,c as Yr,g as da,b as Br,d as lt,e as gd,f as Ag,h as Ig,_ as Nn}from"./main-XHHZsOBK.js";function ne(e,t,n){function r(l,c){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,c);const u=i.prototype,d=Object.keys(u);for(let f=0;f<d.length;f++){const h=d[f];h in l||(l[h]=u[h].bind(l))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(l){var c;const u=n?.Parent?new s:this;r(u,l),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:l=>n?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Hn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class xd extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const yd={};function an(e){return yd}function bd(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function mi(e,t){return typeof t=="bigint"?t.toString():t}function ts(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function fa(e){return e==null}function pa(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function zg(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const c=r.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const s=n>o?n:o,i=Number.parseInt(e.toFixed(s).replace(".","")),l=Number.parseInt(t.toFixed(s).replace(".",""));return i%l/10**s}const Cl=Symbol("evaluating");function Ie(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Cl)return r===void 0&&(r=Cl,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Tn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function fn(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function jl(e){return JSON.stringify(e)}function Pg(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const vd="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ar(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Rg=ts(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Yn(e){if(Ar(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Ar(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function wd(e){return Yn(e)?{...e}:Array.isArray(e)?[...e]:e}const Og=new Set(["string","number","symbol"]);function Xn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pn(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function we(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Mg(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Lg={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Dg(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=fn(e._zod.def,{get shape(){const i={};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(i[l]=n.shape[l])}return Tn(this,"shape",i),i},checks:[]});return pn(e,s)}function Fg(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=fn(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete i[l]}return Tn(this,"shape",i),i},checks:[]});return pn(e,s)}function $g(e,t){if(!Yn(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=fn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Tn(this,"shape",s),s}});return pn(e,o)}function Bg(e,t){if(!Yn(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=fn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Tn(this,"shape",r),r}});return pn(e,n)}function Ug(e,t){const n=fn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Tn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return pn(e,n)}function Wg(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=fn(t._zod.def,{get shape(){const l=t._zod.def.shape,c={...l};if(n)for(const u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(const u in l)c[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return Tn(this,"shape",c),c},checks:[]});return pn(t,i)}function Vg(e,t,n){const r=fn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const i in n){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return Tn(this,"shape",s),s}});return pn(t,r)}function Wn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Vn(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Xr(e){return typeof e=="string"?e:e?.message}function ln(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=Xr(e.inst?._zod.def?.error?.(e))??Xr(t?.error?.(e))??Xr(n.customError?.(e))??Xr(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function ha(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ir(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const kd=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,mi,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},_d=ne("$ZodError",kd),Sd=ne("$ZodError",kd,{Parent:Error});function Hg(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Zg(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(i=>r({issues:i}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let i=n,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(i[c]=i[c]||{_errors:[]},i[c]._errors.push(t(s))):i[c]=i[c]||{_errors:[]},i=i[c],l++}}};return r(e),n}const ma=e=>(t,n,r,o)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Hn;if(i.issues.length){const l=new(o?.Err??e)(i.issues.map(c=>ln(c,s,an())));throw vd(l,o?.callee),l}return i.value},ga=e=>async(t,n,r,o)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const l=new(o?.Err??e)(i.issues.map(c=>ln(c,s,an())));throw vd(l,o?.callee),l}return i.value},ns=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Hn;return s.issues.length?{success:!1,error:new(e??_d)(s.issues.map(i=>ln(i,o,an())))}:{success:!0,data:s.value}},qg=ns(Sd),rs=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>ln(i,o,an())))}:{success:!0,data:s.value}},Kg=rs(Sd),Jg=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ma(e)(t,n,o)},Gg=e=>(t,n,r)=>ma(e)(t,n,r),Yg=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ga(e)(t,n,o)},Xg=e=>async(t,n,r)=>ga(e)(t,n,r),Qg=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ns(e)(t,n,o)},ex=e=>(t,n,r)=>ns(e)(t,n,r),tx=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return rs(e)(t,n,o)},nx=e=>async(t,n,r)=>rs(e)(t,n,r),rx=/^[cC][^\s-]{8,}$/,ox=/^[0-9a-z]+$/,sx=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ix=/^[0-9a-vA-V]{20}$/,ax=/^[A-Za-z0-9]{27}$/,lx=/^[a-zA-Z0-9_-]{21}$/,cx=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ux=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,El=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,dx=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,fx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function px(){return new RegExp(fx,"u")}const hx=/^(?:(?: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])$/,mx=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,gx=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,xx=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yx=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Cd=/^[A-Za-z0-9_-]*$/,bx=/^\+[1-9]\d{6,14}$/,jd="(?:(?:\\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])))",vx=new RegExp(`^${jd}$`);function Ed(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function wx(e){return new RegExp(`^${Ed(e)}$`)}function kx(e){const t=Ed({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${jd}T(?:${r})$`)}const _x=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Sx=/^-?\d+$/,Nd=/^-?\d+(?:\.\d+)?$/,Cx=/^(?:true|false)$/i,jx=/^null$/i,Ex=/^[^A-Z]*$/,Nx=/^[^a-z]*$/,ut=ne("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Td={number:"number",bigint:"bigint",object:"date"},Ad=ne("$ZodCheckLessThan",(e,t)=>{ut.init(e,t);const n=Td[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Id=ne("$ZodCheckGreaterThan",(e,t)=>{ut.init(e,t);const n=Td[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Tx=ne("$ZodCheckMultipleOf",(e,t)=>{ut.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):zg(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ax=ne("$ZodCheckNumberFormat",(e,t)=>{ut.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=Lg[t.format];e._zod.onattach.push(i=>{const l=i._zod.bag;l.format=t.format,l.minimum=o,l.maximum=s,n&&(l.pattern=Sx)}),e._zod.check=i=>{const l=i.value;if(n){if(!Number.isInteger(l)){i.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?i.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):i.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}l<o&&i.issues.push({origin:"number",input:l,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),l>s&&i.issues.push({origin:"number",input:l,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Ix=ne("$ZodCheckMaxLength",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!fa(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const i=ha(o);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),zx=ne("$ZodCheckMinLength",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!fa(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const i=ha(o);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Px=ne("$ZodCheckLengthEquals",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!fa(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const i=ha(o),l=s>t.length;r.issues.push({origin:i,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),os=ne("$ZodCheckStringFormat",(e,t)=>{var n,r;ut.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Rx=ne("$ZodCheckRegex",(e,t)=>{os.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ox=ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ex),os.init(e,t)}),Mx=ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Nx),os.init(e,t)}),Lx=ne("$ZodCheckIncludes",(e,t)=>{ut.init(e,t);const n=Xn(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Dx=ne("$ZodCheckStartsWith",(e,t)=>{ut.init(e,t);const n=new RegExp(`^${Xn(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Fx=ne("$ZodCheckEndsWith",(e,t)=>{ut.init(e,t);const n=new RegExp(`.*${Xn(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),$x=ne("$ZodCheckOverwrite",(e,t)=>{ut.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Bx{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
3
3
|
`).filter(i=>i),o=Math.min(...r.map(i=>i.length-i.trimStart().length)),s=r.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...n,o.join(`
|
|
4
4
|
`))}}const Ux={major:4,minor:3,patch:6},He=ne("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ux;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const s of o._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(i,l,c)=>{let u=Wn(i),d;for(const f of l){if(f._zod.def.when){if(!f._zod.def.when(i))continue}else if(u)continue;const h=i.issues.length,p=f._zod.check(i);if(p instanceof Promise&&c?.async===!1)throw new Hn;if(d||p instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await p,i.issues.length!==h&&(u||(u=Wn(i,h)))});else{if(i.issues.length===h)continue;u||(u=Wn(i,h))}}return d?d.then(()=>i):i},s=(i,l,c)=>{if(Wn(i))return i.aborted=!0,i;const u=o(l,r,c);if(u instanceof Promise){if(c.async===!1)throw new Hn;return u.then(d=>e._zod.parse(d,c))}return e._zod.parse(u,c)};e._zod.run=(i,l)=>{if(l.skipChecks)return e._zod.parse(i,l);if(l.direction==="backward"){const u=e._zod.parse({value:i.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(d=>s(d,i,l)):s(u,i,l)}const c=e._zod.parse(i,l);if(c instanceof Promise){if(l.async===!1)throw new Hn;return c.then(u=>o(u,r,l))}return o(c,r,l)}}Ie(e,"~standard",()=>({validate:o=>{try{const s=qg(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Kg(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),xa=ne("$ZodString",(e,t)=>{He.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??_x(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),qe=ne("$ZodStringFormat",(e,t)=>{os.init(e,t),xa.init(e,t)}),Wx=ne("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ux),qe.init(e,t)}),Vx=ne("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=El(r))}else t.pattern??(t.pattern=El());qe.init(e,t)}),Hx=ne("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=dx),qe.init(e,t)}),Zx=ne("$ZodURL",(e,t)=>{qe.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),qx=ne("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=px()),qe.init(e,t)}),Kx=ne("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=lx),qe.init(e,t)}),Jx=ne("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=rx),qe.init(e,t)}),Gx=ne("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ox),qe.init(e,t)}),Yx=ne("$ZodULID",(e,t)=>{t.pattern??(t.pattern=sx),qe.init(e,t)}),Xx=ne("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ix),qe.init(e,t)}),Qx=ne("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ax),qe.init(e,t)}),e0=ne("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=kx(t)),qe.init(e,t)}),t0=ne("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=vx),qe.init(e,t)}),n0=ne("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=wx(t)),qe.init(e,t)}),r0=ne("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=cx),qe.init(e,t)}),o0=ne("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=hx),qe.init(e,t),e._zod.bag.format="ipv4"}),s0=ne("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=mx),qe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),i0=ne("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=gx),qe.init(e,t)}),a0=ne("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=xx),qe.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,s]=r;if(!s)throw new Error;const i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function zd(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const l0=ne("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=yx),qe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{zd(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function c0(e){if(!Cd.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return zd(n)}const u0=ne("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Cd),qe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{c0(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),d0=ne("$ZodE164",(e,t)=>{t.pattern??(t.pattern=bx),qe.init(e,t)});function f0(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const p0=ne("$ZodJWT",(e,t)=>{qe.init(e,t),e._zod.check=n=>{f0(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Pd=ne("$ZodNumber",(e,t)=>{He.init(e,t),e._zod.pattern=e._zod.bag.pattern??Nd,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),n}}),h0=ne("$ZodNumberFormat",(e,t)=>{Ax.init(e,t),Pd.init(e,t)}),m0=ne("$ZodBoolean",(e,t)=>{He.init(e,t),e._zod.pattern=Cx,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),g0=ne("$ZodNull",(e,t)=>{He.init(e,t),e._zod.pattern=jx,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),x0=ne("$ZodUnknown",(e,t)=>{He.init(e,t),e._zod.parse=n=>n}),y0=ne("$ZodNever",(e,t)=>{He.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Nl(e,t,n){e.issues.length&&t.issues.push(...Vn(n,e.issues)),t.value[n]=e.value}const b0=ne("$ZodArray",(e,t)=>{He.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const l=o[i],c=t.element._zod.run({value:l,issues:[]},r);c instanceof Promise?s.push(c.then(u=>Nl(u,n,i))):Nl(c,n,i)}return s.length?Promise.all(s).then(()=>n):n}});function jo(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...Vn(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Rd(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=Mg(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Od(e,t,n,r,o,s){const i=[],l=o.keySet,c=o.catchall._zod,u=c.def.type,d=c.optout==="optional";for(const f in t){if(l.has(f))continue;if(u==="never"){i.push(f);continue}const h=c.run({value:t[f],issues:[]},r);h instanceof Promise?e.push(h.then(p=>jo(p,n,f,t,d))):jo(h,n,f,t,d)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}const v0=ne("$ZodObject",(e,t)=>{if(He.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...l};return Object.defineProperty(t,"shape",{value:c}),c}})}const r=ts(()=>Rd(t));Ie(e._zod,"propValues",()=>{const l=t.shape,c={};for(const u in l){const d=l[u]._zod;if(d.values){c[u]??(c[u]=new Set);for(const f of d.values)c[u].add(f)}}return c});const o=Ar,s=t.catchall;let i;e._zod.parse=(l,c)=>{i??(i=r.value);const u=l.value;if(!o(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};const d=[],f=i.shape;for(const h of i.keys){const p=f[h],b=p._zod.optout==="optional",m=p._zod.run({value:u[h],issues:[]},c);m instanceof Promise?d.push(m.then(g=>jo(g,l,h,u,b))):jo(m,l,h,u,b)}return s?Od(d,u,l,c,r.value,e):d.length?Promise.all(d).then(()=>l):l}}),w0=ne("$ZodObjectJIT",(e,t)=>{v0.init(e,t);const n=e._zod.parse,r=ts(()=>Rd(t)),o=h=>{const p=new Bx(["shape","payload","ctx"]),b=r.value,m=k=>{const S=jl(k);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};p.write("const input = payload.value;");const g=Object.create(null);let y=0;for(const k of b.keys)g[k]=`key_${y++}`;p.write("const newResult = {};");for(const k of b.keys){const S=g[k],C=jl(k),N=h[k]?._zod?.optout==="optional";p.write(`const ${S} = ${m(k)};`),N?p.write(`
|
|
5
5
|
if (${S}.issues.length) {
|
|
@@ -38,7 +38,7 @@ import{u as ua,a as md,r as x,j as a,c as Yr,g as da,b as Br,d as lt,e as gd,f a
|
|
|
38
38
|
`)}p.write("payload.value = newResult;"),p.write("return payload;");const v=p.compile();return(k,S)=>v(h,k,S)};let s;const i=Ar,l=!yd.jitless,u=l&&Rg.value,d=t.catchall;let f;e._zod.parse=(h,p)=>{f??(f=r.value);const b=h.value;return i(b)?l&&u&&p?.async===!1&&p.jitless!==!0?(s||(s=o(t.shape)),h=s(h,p),d?Od([],b,h,p,f,e):h):n(h,p):(h.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),h)}});function Tl(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!Wn(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(i=>ln(i,r,an())))}),t)}const Md=ne("$ZodUnion",(e,t)=>{He.init(e,t),Ie(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ie(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ie(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Ie(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>pa(s.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(n)return r(o,s);let i=!1;const l=[];for(const c of t.options){const u=c._zod.run({value:o.value,issues:[]},s);if(u instanceof Promise)l.push(u),i=!0;else{if(u.issues.length===0)return u;l.push(u)}}return i?Promise.all(l).then(c=>Tl(c,o,e,s)):Tl(l,o,e,s)}}),k0=ne("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Md.init(e,t);const n=e._zod.parse;Ie(e._zod,"propValues",()=>{const o={};for(const s of t.options){const i=s._zod.propValues;if(!i||Object.keys(i).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const[l,c]of Object.entries(i)){o[l]||(o[l]=new Set);for(const u of c)o[l].add(u)}}return o});const r=ts(()=>{const o=t.options,s=new Map;for(const i of o){const l=i._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const c of l){if(s.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);s.set(c,i)}}return s});e._zod.parse=(o,s)=>{const i=o.value;if(!Ar(i))return o.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),o;const l=r.value.get(i?.[t.discriminator]);return l?l._zod.run(o,s):t.unionFallback?n(o,s):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:i,path:[t.discriminator],inst:e}),o)}}),_0=ne("$ZodIntersection",(e,t)=>{He.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,s=t.left._zod.run({value:o,issues:[]},r),i=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([c,u])=>Al(n,c,u)):Al(n,s,i)}});function gi(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Yn(e)&&Yn(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};for(const s of r){const i=gi(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r],i=gi(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Al(e,t,n){const r=new Map;let o;for(const l of t.issues)if(l.code==="unrecognized_keys"){o??(o=l);for(const c of l.keys)r.has(c)||r.set(c,{}),r.get(c).l=!0}else e.issues.push(l);for(const l of n.issues)if(l.code==="unrecognized_keys")for(const c of l.keys)r.has(c)||r.set(c,{}),r.get(c).r=!0;else e.issues.push(l);const s=[...r].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(s.length&&o&&e.issues.push({...o,keys:s}),Wn(e))return e;const i=gi(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const S0=ne("$ZodRecord",(e,t)=>{He.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Yn(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const s=[],i=t.keyType._zod.values;if(i){n.value={};const l=new Set;for(const u of i)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){l.add(typeof u=="number"?u.toString():u);const d=t.valueType._zod.run({value:o[u],issues:[]},r);d instanceof Promise?s.push(d.then(f=>{f.issues.length&&n.issues.push(...Vn(u,f.issues)),n.value[u]=f.value})):(d.issues.length&&n.issues.push(...Vn(u,d.issues)),n.value[u]=d.value)}let c;for(const u in o)l.has(u)||(c=c??[],c.push(u));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c})}else{n.value={};for(const l of Reflect.ownKeys(o)){if(l==="__proto__")continue;let c=t.keyType._zod.run({value:l,issues:[]},r);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&Nd.test(l)&&c.issues.length){const f=t.keyType._zod.run({value:Number(l),issues:[]},r);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");f.issues.length===0&&(c=f)}if(c.issues.length){t.mode==="loose"?n.value[l]=o[l]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(f=>ln(f,r,an())),input:l,path:[l],inst:e});continue}const d=t.valueType._zod.run({value:o[l],issues:[]},r);d instanceof Promise?s.push(d.then(f=>{f.issues.length&&n.issues.push(...Vn(l,f.issues)),n.value[c.value]=f.value})):(d.issues.length&&n.issues.push(...Vn(l,d.issues)),n.value[c.value]=d.value)}}return s.length?Promise.all(s).then(()=>n):n}}),C0=ne("$ZodEnum",(e,t)=>{He.init(e,t);const n=bd(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Og.has(typeof o)).map(o=>typeof o=="string"?Xn(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:n,input:i,inst:e}),o}}),j0=ne("$ZodLiteral",(e,t)=>{if(He.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Xn(r):r?Xn(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const s=r.value;return n.has(s)||r.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),r}}),E0=ne("$ZodTransform",(e,t)=>{He.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new xd(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(n.value=i,n));if(o instanceof Promise)throw new Hn;return n.value=o,n}});function Il(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Ld=ne("$ZodOptional",(e,t)=>{He.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ie(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ie(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${pa(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>Il(s,n.value)):Il(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),N0=ne("$ZodExactOptional",(e,t)=>{Ld.init(e,t),Ie(e._zod,"values",()=>t.innerType._zod.values),Ie(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),T0=ne("$ZodNullable",(e,t)=>{He.init(e,t),Ie(e._zod,"optin",()=>t.innerType._zod.optin),Ie(e._zod,"optout",()=>t.innerType._zod.optout),Ie(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${pa(n.source)}|null)$`):void 0}),Ie(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),A0=ne("$ZodDefault",(e,t)=>{He.init(e,t),e._zod.optin="optional",Ie(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>zl(s,t)):zl(o,t)}});function zl(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const I0=ne("$ZodPrefault",(e,t)=>{He.init(e,t),e._zod.optin="optional",Ie(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),z0=ne("$ZodNonOptional",(e,t)=>{He.init(e,t),Ie(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>Pl(s,e)):Pl(o,e)}});function Pl(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const P0=ne("$ZodCatch",(e,t)=>{He.init(e,t),Ie(e._zod,"optin",()=>t.innerType._zod.optin),Ie(e._zod,"optout",()=>t.innerType._zod.optout),Ie(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>ln(i,r,an()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>ln(s,r,an()))},input:n.value}),n.issues=[]),n)}}),R0=ne("$ZodPipe",(e,t)=>{He.init(e,t),Ie(e._zod,"values",()=>t.in._zod.values),Ie(e._zod,"optin",()=>t.in._zod.optin),Ie(e._zod,"optout",()=>t.out._zod.optout),Ie(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(i=>Qr(i,t.in,r)):Qr(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>Qr(s,t.out,r)):Qr(o,t.out,r)}});function Qr(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const O0=ne("$ZodReadonly",(e,t)=>{He.init(e,t),Ie(e._zod,"propValues",()=>t.innerType._zod.propValues),Ie(e._zod,"values",()=>t.innerType._zod.values),Ie(e._zod,"optin",()=>t.innerType?._zod?.optin),Ie(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Rl):Rl(o)}});function Rl(e){return e.value=Object.freeze(e.value),e}const M0=ne("$ZodLazy",(e,t)=>{He.init(e,t),Ie(e._zod,"innerType",()=>t.getter()),Ie(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Ie(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Ie(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Ie(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),L0=ne("$ZodCustom",(e,t)=>{ut.init(e,t),He.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(s=>Ol(s,n,r,e));Ol(o,n,r,e)}});function Ol(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(Ir(o))}}var Ml;class D0{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function F0(){return new D0}(Ml=globalThis).__zod_globalRegistry??(Ml.__zod_globalRegistry=F0());const _r=globalThis.__zod_globalRegistry;function $0(e,t){return new e({type:"string",...we(t)})}function B0(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...we(t)})}function Ll(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...we(t)})}function U0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...we(t)})}function W0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...we(t)})}function V0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...we(t)})}function H0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...we(t)})}function Z0(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...we(t)})}function q0(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...we(t)})}function K0(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...we(t)})}function J0(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...we(t)})}function G0(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...we(t)})}function Y0(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...we(t)})}function X0(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...we(t)})}function Q0(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...we(t)})}function e1(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...we(t)})}function t1(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...we(t)})}function n1(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...we(t)})}function r1(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...we(t)})}function o1(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...we(t)})}function s1(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...we(t)})}function i1(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...we(t)})}function a1(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...we(t)})}function l1(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...we(t)})}function c1(e,t){return new e({type:"string",format:"date",check:"string_format",...we(t)})}function u1(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...we(t)})}function d1(e,t){return new e({type:"string",format:"duration",check:"string_format",...we(t)})}function f1(e,t){return new e({type:"number",checks:[],...we(t)})}function p1(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...we(t)})}function h1(e,t){return new e({type:"boolean",...we(t)})}function m1(e,t){return new e({type:"null",...we(t)})}function g1(e){return new e({type:"unknown"})}function x1(e,t){return new e({type:"never",...we(t)})}function Dl(e,t){return new Ad({check:"less_than",...we(t),value:e,inclusive:!1})}function zs(e,t){return new Ad({check:"less_than",...we(t),value:e,inclusive:!0})}function Fl(e,t){return new Id({check:"greater_than",...we(t),value:e,inclusive:!1})}function Ps(e,t){return new Id({check:"greater_than",...we(t),value:e,inclusive:!0})}function $l(e,t){return new Tx({check:"multiple_of",...we(t),value:e})}function Dd(e,t){return new Ix({check:"max_length",...we(t),maximum:e})}function Eo(e,t){return new zx({check:"min_length",...we(t),minimum:e})}function Fd(e,t){return new Px({check:"length_equals",...we(t),length:e})}function y1(e,t){return new Rx({check:"string_format",format:"regex",...we(t),pattern:e})}function b1(e){return new Ox({check:"string_format",format:"lowercase",...we(e)})}function v1(e){return new Mx({check:"string_format",format:"uppercase",...we(e)})}function w1(e,t){return new Lx({check:"string_format",format:"includes",...we(t),includes:e})}function k1(e,t){return new Dx({check:"string_format",format:"starts_with",...we(t),prefix:e})}function _1(e,t){return new Fx({check:"string_format",format:"ends_with",...we(t),suffix:e})}function or(e){return new $x({check:"overwrite",tx:e})}function S1(e){return or(t=>t.normalize(e))}function C1(){return or(e=>e.trim())}function j1(){return or(e=>e.toLowerCase())}function E1(){return or(e=>e.toUpperCase())}function N1(){return or(e=>Pg(e))}function T1(e,t,n){return new e({type:"array",element:t,...we(n)})}function A1(e,t,n){return new e({type:"custom",check:"custom",fn:t,...we(n)})}function I1(e){const t=z1(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Ir(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(Ir(o))}},e(n.value,n)));return t}function z1(e,t){const n=new ut({check:"custom",...we(t)});return n._zod.check=e,n}function $d(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??_r,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ge(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);const l=e._zod.toJSONSchema?.();if(l)i.schema=l;else{const d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,d);else{const h=i.schema,p=t.processors[o.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);p(e,t,h,d)}const f=e._zod.parent;f&&(i.ref||(i.ref=f),Ge(f,t,d),t.seen.get(f).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(i.schema,c),t.io==="input"&&ot(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&i.schema._prefault&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function Bd(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const i of e.seen.entries()){const l=e.metadataRegistry.get(i[0])?.id;if(l){const c=r.get(l);if(c&&c!==i[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(l,i[0])}}const o=i=>{const l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(i[0])?.id,h=e.external.uri??(b=>b);if(f)return{ref:h(f)};const p=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=p,{defId:p,ref:`${h("__shared")}#/${l}/${p}`}}if(i[1]===n)return{ref:"#"};const u=`#/${l}/`,d=i[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:u+d}},s=i=>{if(i[1].schema.$ref)return;const l=i[1],{ref:c,defId:u}=o(i);l.def={...l.schema},u&&(l.defId=u);const d=l.schema;for(const f in d)delete d[f];d.$ref=c};if(e.cycles==="throw")for(const i of e.seen.entries()){const l=i[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
|
|
39
39
|
|
|
40
40
|
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const l=i[1];if(t===i[0]){s(i);continue}if(e.external){const u=e.external.registry.get(i[0])?.id;if(t!==i[0]&&u){s(i);continue}}if(e.metadataRegistry.get(i[0])?.id){s(i);continue}if(l.cycle){s(i);continue}if(l.count>1&&e.reused==="ref"){s(i);continue}}}function Ud(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=i=>{const l=e.seen.get(i);if(l.ref===null)return;const c=l.def??l.schema,u={...c},d=l.ref;if(l.ref=null,d){r(d);const h=e.seen.get(d),p=h.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(p)):Object.assign(c,p),Object.assign(c,u),i._zod.parent===d)for(const m in c)m==="$ref"||m==="allOf"||m in u||delete c[m];if(p.$ref&&h.def)for(const m in c)m==="$ref"||m==="allOf"||m in h.def&&JSON.stringify(c[m])===JSON.stringify(h.def[m])&&delete c[m]}const f=i._zod.parent;if(f&&f!==d){r(f);const h=e.seen.get(f);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(const p in c)p==="$ref"||p==="allOf"||p in h.def&&JSON.stringify(c[p])===JSON.stringify(h.def[p])&&delete c[p]}e.override({zodSchema:i,jsonSchema:c,path:l.path??[]})};for(const i of[...e.seen.entries()].reverse())r(i[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const i=e.external.registry.get(t)?.id;if(!i)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(i)}Object.assign(o,n.def??n.schema);const s=e.external?.defs??{};for(const i of e.seen.entries()){const l=i[1];l.def&&l.defId&&(s[l.defId]=l.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const i=JSON.parse(JSON.stringify(o));return Object.defineProperty(i,"~standard",{value:{...t["~standard"],jsonSchema:{input:No(t,"input",e.processors),output:No(t,"output",e.processors)}},enumerable:!1,writable:!1}),i}catch{throw new Error("Error converting schema to JSON.")}}function ot(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return ot(r.element,n);if(r.type==="set")return ot(r.valueType,n);if(r.type==="lazy")return ot(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return ot(r.innerType,n);if(r.type==="intersection")return ot(r.left,n)||ot(r.right,n);if(r.type==="record"||r.type==="map")return ot(r.keyType,n)||ot(r.valueType,n);if(r.type==="pipe")return ot(r.in,n)||ot(r.out,n);if(r.type==="object"){for(const o in r.shape)if(ot(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(ot(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(ot(o,n))return!0;return!!(r.rest&&ot(r.rest,n))}return!1}const P1=(e,t={})=>n=>{const r=$d({...n,processors:t});return Ge(e,r),Bd(r,e),Ud(r,e)},No=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},i=$d({...o??{},target:s,io:t,processors:n});return Ge(e,i),Bd(i,e),Ud(i,e)},R1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},O1=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:i,format:l,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),l&&(o.format=R1[l]??l,o.format===""&&delete o.format,l==="time"&&delete o.format),u&&(o.contentEncoding=u),c&&c.size>0){const d=[...c];d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},M1=(e,t,n,r)=>{const o=n,{minimum:s,maximum:i,format:l,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:d}=e._zod.bag;typeof l=="string"&&l.includes("int")?o.type="integer":o.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=d,o.exclusiveMinimum=!0):o.exclusiveMinimum=d),typeof s=="number"&&(o.minimum=s,typeof d=="number"&&t.target!=="draft-04"&&(d>=s?delete o.minimum:delete o.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=u,o.exclusiveMaximum=!0):o.exclusiveMaximum=u),typeof i=="number"&&(o.maximum=i,typeof u=="number"&&t.target!=="draft-04"&&(u<=i?delete o.maximum:delete o.exclusiveMaximum)),typeof c=="number"&&(o.multipleOf=c)},L1=(e,t,n,r)=>{n.type="boolean"},D1=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},F1=(e,t,n,r)=>{n.not={}},$1=(e,t,n,r)=>{},B1=(e,t,n,r)=>{const o=e._zod.def,s=bd(o.entries);s.every(i=>typeof i=="number")&&(n.type="number"),s.every(i=>typeof i=="string")&&(n.type="string"),n.enum=s},U1=(e,t,n,r)=>{const o=e._zod.def,s=[];for(const i of o.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(i))}else s.push(i);if(s.length!==0)if(s.length===1){const i=s[0];n.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[i]:n.const=i}else s.every(i=>typeof i=="number")&&(n.type="number"),s.every(i=>typeof i=="string")&&(n.type="string"),s.every(i=>typeof i=="boolean")&&(n.type="boolean"),s.every(i=>i===null)&&(n.type="null"),n.enum=s},W1=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},V1=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},H1=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:i,maximum:l}=e._zod.bag;typeof i=="number"&&(o.minItems=i),typeof l=="number"&&(o.maxItems=l),o.type="array",o.items=Ge(s.element,t,{...r,path:[...r.path,"items"]})},Z1=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object",o.properties={};const i=s.shape;for(const u in i)o.properties[u]=Ge(i[u],t,{...r,path:[...r.path,"properties",u]});const l=new Set(Object.keys(i)),c=new Set([...l].filter(u=>{const d=s.shape[u]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(o.required=Array.from(c)),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=Ge(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},q1=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,i=o.options.map((l,c)=>Ge(l,t,{...r,path:[...r.path,s?"oneOf":"anyOf",c]}));s?n.oneOf=i:n.anyOf=i},K1=(e,t,n,r)=>{const o=e._zod.def,s=Ge(o.left,t,{...r,path:[...r.path,"allOf",0]}),i=Ge(o.right,t,{...r,path:[...r.path,"allOf",1]}),l=u=>"allOf"in u&&Object.keys(u).length===1,c=[...l(s)?s.allOf:[s],...l(i)?i.allOf:[i]];n.allOf=c},J1=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object";const i=s.keyType,c=i._zod.bag?.patterns;if(s.mode==="loose"&&c&&c.size>0){const d=Ge(s.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const f of c)o.patternProperties[f.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Ge(s.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Ge(s.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const u=i._zod.values;if(u){const d=[...u].filter(f=>typeof f=="string"||typeof f=="number");d.length>0&&(o.required=d)}},G1=(e,t,n,r)=>{const o=e._zod.def,s=Ge(o.innerType,t,r),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=o.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},Y1=(e,t,n,r)=>{const o=e._zod.def;Ge(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},X1=(e,t,n,r)=>{const o=e._zod.def;Ge(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},Q1=(e,t,n,r)=>{const o=e._zod.def;Ge(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},ey=(e,t,n,r)=>{const o=e._zod.def;Ge(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},ty=(e,t,n,r)=>{const o=e._zod.def,s=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Ge(s,t,r);const i=t.seen.get(e);i.ref=s},ny=(e,t,n,r)=>{const o=e._zod.def;Ge(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},Wd=(e,t,n,r)=>{const o=e._zod.def;Ge(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},ry=(e,t,n,r)=>{const o=e._zod.innerType;Ge(o,t,r);const s=t.seen.get(e);s.ref=o},oy=ne("ZodISODateTime",(e,t)=>{e0.init(e,t),Je.init(e,t)});function sy(e){return l1(oy,e)}const iy=ne("ZodISODate",(e,t)=>{t0.init(e,t),Je.init(e,t)});function ay(e){return c1(iy,e)}const ly=ne("ZodISOTime",(e,t)=>{n0.init(e,t),Je.init(e,t)});function cy(e){return u1(ly,e)}const uy=ne("ZodISODuration",(e,t)=>{r0.init(e,t),Je.init(e,t)});function dy(e){return d1(uy,e)}const fy=(e,t)=>{_d.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Zg(e,n)},flatten:{value:n=>Hg(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,mi,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,mi,2)}},isEmpty:{get(){return e.issues.length===0}}})},bt=ne("ZodError",fy,{Parent:Error}),py=ma(bt),hy=ga(bt),my=ns(bt),gy=rs(bt),xy=Jg(bt),yy=Gg(bt),by=Yg(bt),vy=Xg(bt),wy=Qg(bt),ky=ex(bt),_y=tx(bt),Sy=nx(bt),Ze=ne("ZodType",(e,t)=>(He.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:No(e,"input"),output:No(e,"output")}}),e.toJSONSchema=P1(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(fn(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>pn(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>py(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>my(e,n,r),e.parseAsync=async(n,r)=>hy(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>gy(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>xy(e,n,r),e.decode=(n,r)=>yy(e,n,r),e.encodeAsync=async(n,r)=>by(e,n,r),e.decodeAsync=async(n,r)=>vy(e,n,r),e.safeEncode=(n,r)=>wy(e,n,r),e.safeDecode=(n,r)=>ky(e,n,r),e.safeEncodeAsync=async(n,r)=>_y(e,n,r),e.safeDecodeAsync=async(n,r)=>Sy(e,n,r),e.refine=(n,r)=>e.check(vb(n,r)),e.superRefine=n=>e.check(wb(n)),e.overwrite=n=>e.check(or(n)),e.optional=()=>Wl(e),e.exactOptional=()=>sb(e),e.nullable=()=>Vl(e),e.nullish=()=>Wl(Vl(e)),e.nonoptional=n=>db(e,n),e.array=()=>Ce(e),e.or=n=>Qt([e,n]),e.and=n=>Qy(e,n),e.transform=n=>Hl(e,rb(n)),e.default=n=>lb(e,n),e.prefault=n=>ub(e,n),e.catch=n=>pb(e,n),e.pipe=n=>Hl(e,n),e.readonly=()=>gb(e),e.describe=n=>{const r=e.clone();return _r.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return _r.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return _r.get(e);const r=e.clone();return _r.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Vd=ne("_ZodString",(e,t)=>{xa.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(r,o,s)=>O1(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(y1(...r)),e.includes=(...r)=>e.check(w1(...r)),e.startsWith=(...r)=>e.check(k1(...r)),e.endsWith=(...r)=>e.check(_1(...r)),e.min=(...r)=>e.check(Eo(...r)),e.max=(...r)=>e.check(Dd(...r)),e.length=(...r)=>e.check(Fd(...r)),e.nonempty=(...r)=>e.check(Eo(1,...r)),e.lowercase=r=>e.check(b1(r)),e.uppercase=r=>e.check(v1(r)),e.trim=()=>e.check(C1()),e.normalize=(...r)=>e.check(S1(...r)),e.toLowerCase=()=>e.check(j1()),e.toUpperCase=()=>e.check(E1()),e.slugify=()=>e.check(N1())}),Cy=ne("ZodString",(e,t)=>{xa.init(e,t),Vd.init(e,t),e.email=n=>e.check(B0(jy,n)),e.url=n=>e.check(Z0(Ey,n)),e.jwt=n=>e.check(a1(Uy,n)),e.emoji=n=>e.check(q0(Ny,n)),e.guid=n=>e.check(Ll(Bl,n)),e.uuid=n=>e.check(U0(eo,n)),e.uuidv4=n=>e.check(W0(eo,n)),e.uuidv6=n=>e.check(V0(eo,n)),e.uuidv7=n=>e.check(H0(eo,n)),e.nanoid=n=>e.check(K0(Ty,n)),e.guid=n=>e.check(Ll(Bl,n)),e.cuid=n=>e.check(J0(Ay,n)),e.cuid2=n=>e.check(G0(Iy,n)),e.ulid=n=>e.check(Y0(zy,n)),e.base64=n=>e.check(o1(Fy,n)),e.base64url=n=>e.check(s1($y,n)),e.xid=n=>e.check(X0(Py,n)),e.ksuid=n=>e.check(Q0(Ry,n)),e.ipv4=n=>e.check(e1(Oy,n)),e.ipv6=n=>e.check(t1(My,n)),e.cidrv4=n=>e.check(n1(Ly,n)),e.cidrv6=n=>e.check(r1(Dy,n)),e.e164=n=>e.check(i1(By,n)),e.datetime=n=>e.check(sy(n)),e.date=n=>e.check(ay(n)),e.time=n=>e.check(cy(n)),e.duration=n=>e.check(dy(n))});function W(e){return $0(Cy,e)}const Je=ne("ZodStringFormat",(e,t)=>{qe.init(e,t),Vd.init(e,t)}),jy=ne("ZodEmail",(e,t)=>{Hx.init(e,t),Je.init(e,t)}),Bl=ne("ZodGUID",(e,t)=>{Wx.init(e,t),Je.init(e,t)}),eo=ne("ZodUUID",(e,t)=>{Vx.init(e,t),Je.init(e,t)}),Ey=ne("ZodURL",(e,t)=>{Zx.init(e,t),Je.init(e,t)}),Ny=ne("ZodEmoji",(e,t)=>{qx.init(e,t),Je.init(e,t)}),Ty=ne("ZodNanoID",(e,t)=>{Kx.init(e,t),Je.init(e,t)}),Ay=ne("ZodCUID",(e,t)=>{Jx.init(e,t),Je.init(e,t)}),Iy=ne("ZodCUID2",(e,t)=>{Gx.init(e,t),Je.init(e,t)}),zy=ne("ZodULID",(e,t)=>{Yx.init(e,t),Je.init(e,t)}),Py=ne("ZodXID",(e,t)=>{Xx.init(e,t),Je.init(e,t)}),Ry=ne("ZodKSUID",(e,t)=>{Qx.init(e,t),Je.init(e,t)}),Oy=ne("ZodIPv4",(e,t)=>{o0.init(e,t),Je.init(e,t)}),My=ne("ZodIPv6",(e,t)=>{s0.init(e,t),Je.init(e,t)}),Ly=ne("ZodCIDRv4",(e,t)=>{i0.init(e,t),Je.init(e,t)}),Dy=ne("ZodCIDRv6",(e,t)=>{a0.init(e,t),Je.init(e,t)}),Fy=ne("ZodBase64",(e,t)=>{l0.init(e,t),Je.init(e,t)}),$y=ne("ZodBase64URL",(e,t)=>{u0.init(e,t),Je.init(e,t)}),By=ne("ZodE164",(e,t)=>{d0.init(e,t),Je.init(e,t)}),Uy=ne("ZodJWT",(e,t)=>{p0.init(e,t),Je.init(e,t)}),Hd=ne("ZodNumber",(e,t)=>{Pd.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(r,o,s)=>M1(e,r,o),e.gt=(r,o)=>e.check(Fl(r,o)),e.gte=(r,o)=>e.check(Ps(r,o)),e.min=(r,o)=>e.check(Ps(r,o)),e.lt=(r,o)=>e.check(Dl(r,o)),e.lte=(r,o)=>e.check(zs(r,o)),e.max=(r,o)=>e.check(zs(r,o)),e.int=r=>e.check(Ul(r)),e.safe=r=>e.check(Ul(r)),e.positive=r=>e.check(Fl(0,r)),e.nonnegative=r=>e.check(Ps(0,r)),e.negative=r=>e.check(Dl(0,r)),e.nonpositive=r=>e.check(zs(0,r)),e.multipleOf=(r,o)=>e.check($l(r,o)),e.step=(r,o)=>e.check($l(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function fe(e){return f1(Hd,e)}const Wy=ne("ZodNumberFormat",(e,t)=>{h0.init(e,t),Hd.init(e,t)});function Ul(e){return p1(Wy,e)}const Vy=ne("ZodBoolean",(e,t)=>{m0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>L1(e,n,r)});function nt(e){return h1(Vy,e)}const Hy=ne("ZodNull",(e,t)=>{g0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>D1(e,n,r)});function xi(e){return m1(Hy,e)}const Zy=ne("ZodUnknown",(e,t)=>{x0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$1()});function yi(){return g1(Zy)}const qy=ne("ZodNever",(e,t)=>{y0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>F1(e,n,r)});function Ky(e){return x1(qy,e)}const Jy=ne("ZodArray",(e,t)=>{b0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>H1(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Eo(n,r)),e.nonempty=n=>e.check(Eo(1,n)),e.max=(n,r)=>e.check(Dd(n,r)),e.length=(n,r)=>e.check(Fd(n,r)),e.unwrap=()=>e.element});function Ce(e,t){return T1(Jy,e,t)}const Gy=ne("ZodObject",(e,t)=>{w0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Z1(e,n,r,o),Ie(e,"shape",()=>t.shape),e.keyof=()=>Xe(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:yi()}),e.loose=()=>e.clone({...e._zod.def,catchall:yi()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ky()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>$g(e,n),e.safeExtend=n=>Bg(e,n),e.merge=n=>Ug(e,n),e.pick=n=>Dg(e,n),e.omit=n=>Fg(e,n),e.partial=(...n)=>Wg(qd,e,n[0]),e.required=(...n)=>Vg(Kd,e,n[0])});function le(e,t){const n={type:"object",shape:e??{},...we(t)};return new Gy(n)}const Zd=ne("ZodUnion",(e,t)=>{Md.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>q1(e,n,r,o),e.options=t.options});function Qt(e,t){return new Zd({type:"union",options:e,...we(t)})}const Yy=ne("ZodDiscriminatedUnion",(e,t)=>{Zd.init(e,t),k0.init(e,t)});function An(e,t,n){return new Yy({type:"union",options:t,discriminator:e,...we(n)})}const Xy=ne("ZodIntersection",(e,t)=>{_0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>K1(e,n,r,o)});function Qy(e,t){return new Xy({type:"intersection",left:e,right:t})}const eb=ne("ZodRecord",(e,t)=>{S0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>J1(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function Nt(e,t,n){return new eb({type:"record",keyType:e,valueType:t,...we(n)})}const bi=ne("ZodEnum",(e,t)=>{C0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(r,o,s)=>B1(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const s={};for(const i of r)if(n.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new bi({...t,checks:[],...we(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const i of r)if(n.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new bi({...t,checks:[],...we(o),entries:s})}});function Xe(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new bi({type:"enum",entries:n,...we(t)})}const tb=ne("ZodLiteral",(e,t)=>{j0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>U1(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function je(e,t){return new tb({type:"literal",values:Array.isArray(e)?e:[e],...we(t)})}const nb=ne("ZodTransform",(e,t)=>{E0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>V1(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new xd(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(Ir(s,n.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),n.issues.push(Ir(i))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n)):(n.value=o,n)}});function rb(e){return new nb({type:"transform",transform:e})}const qd=ne("ZodOptional",(e,t)=>{Ld.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wd(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Wl(e){return new qd({type:"optional",innerType:e})}const ob=ne("ZodExactOptional",(e,t)=>{N0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wd(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function sb(e){return new ob({type:"optional",innerType:e})}const ib=ne("ZodNullable",(e,t)=>{T0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>G1(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Vl(e){return new ib({type:"nullable",innerType:e})}const ab=ne("ZodDefault",(e,t)=>{A0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>X1(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function lb(e,t){return new ab({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():wd(t)}})}const cb=ne("ZodPrefault",(e,t)=>{I0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Q1(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function ub(e,t){return new cb({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():wd(t)}})}const Kd=ne("ZodNonOptional",(e,t)=>{z0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Y1(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function db(e,t){return new Kd({type:"nonoptional",innerType:e,...we(t)})}const fb=ne("ZodCatch",(e,t)=>{P0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ey(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function pb(e,t){return new fb({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const hb=ne("ZodPipe",(e,t)=>{R0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ty(e,n,r,o),e.in=t.in,e.out=t.out});function Hl(e,t){return new hb({type:"pipe",in:e,out:t})}const mb=ne("ZodReadonly",(e,t)=>{O0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ny(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function gb(e){return new mb({type:"readonly",innerType:e})}const xb=ne("ZodLazy",(e,t)=>{M0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ry(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});function yb(e){return new xb({type:"lazy",getter:e})}const bb=ne("ZodCustom",(e,t)=>{L0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>W1(e,n)});function vb(e,t={}){return A1(bb,e,t)}function wb(e){return I1(e)}const Qn=yb(()=>Qt([W(),fe(),nt(),xi(),Ce(Qn),Nt(W(),Qn)]));const ya=le({type:W(),ttl:W().optional(),scope:W().optional()}),ba=le({type:je("text"),text:W(),cache_control:ya.optional()}),Jd=le({type:je("thinking"),thinking:W(),signature:W().optional()}),kb=le({type:je("think"),thinking:W(),signature:W().optional()}),_b=le({type:je("base64"),media_type:W(),data:W()}),Gd=le({type:je("image"),source:_b}),Yd=le({type:je("tool_use"),id:W(),name:W(),input:Nt(W(),Qn)}),Sb=An("type",[ba,Gd]),Cb=le({type:je("tool_result"),tool_use_id:W().optional(),content:Qt([W(),Ce(Sb)]),is_error:nt().optional()}),jb=An("type",[ba,Jd,Gd,Yd,Cb]),Eb=Qt([W(),Ce(jb)]),Nb=le({role:Xe(["user","assistant"]),content:Eb}),Tb=le({type:je("text"),text:W(),cache_control:ya.optional()}),Ab=le({type:W(),properties:Nt(W(),Nt(W(),Qn)).optional(),required:Ce(W()).optional(),additionalProperties:nt().optional(),$schema:W().optional()}),Ib=le({name:W(),description:W().optional(),input_schema:Ab.optional(),cache_control:ya.optional()}),zb=An("type",[le({type:je("enabled"),budget_tokens:fe()}),le({type:je("disabled")}),le({type:je("adaptive")})]),Xd=le({model:W(),messages:Ce(Nb),system:Ce(Tb).optional(),tools:Ce(Ib).optional(),max_tokens:fe().optional(),temperature:fe().optional(),stream:nt().optional(),thinking:zb.optional(),metadata:le({user_id:W().optional()}).optional()}),va=An("type",[ba,Jd,kb,Yd]),Pb=le({input_tokens:fe().nullable().optional(),output_tokens:fe().nullable().optional(),cache_creation_input_tokens:fe().nullable().optional(),cache_read_input_tokens:fe().nullable().optional()}).passthrough(),Qd=le({id:W(),type:je("message"),model:W(),role:je("assistant"),content:Ce(va),stop_reason:W().nullable(),stop_sequence:W().nullable().optional(),usage:Pb}).passthrough(),Rb=le({type:je("message_start"),message:le({id:W(),type:je("message"),model:W(),role:je("assistant"),content:Ce(va),stop_reason:xi(),stop_sequence:xi(),usage:le({input_tokens:fe(),cache_creation_input_tokens:fe().optional(),cache_read_input_tokens:fe().optional()}).passthrough()})}),Ob=le({type:je("content_block_start"),index:fe(),content_block:va}),Mb=An("type",[le({type:je("text_delta"),text:W()}),le({type:je("input_json_delta"),partial_json:W()}),le({type:je("thinking_delta"),thinking:W()}),le({type:je("signature_delta"),signature:W()})]),Lb=le({type:je("content_block_delta"),index:fe(),delta:Mb}),Db=le({type:je("content_block_stop"),index:fe()}),Fb=le({type:je("message_delta"),delta:le({stop_reason:W().nullable(),stop_sequence:W().nullable().optional()}),usage:le({output_tokens:fe(),input_tokens:fe().optional(),cache_creation_input_tokens:fe().optional(),cache_read_input_tokens:fe().optional()}).passthrough()}),$b=le({type:je("message_stop")}),Bb=le({type:je("ping")}),Ub=le({type:je("error"),error:le({type:W(),message:W()})}),Wb=An("type",[Rb,Ob,Lb,Db,Fb,$b,Bb,Ub]),Vb=Qt([W(),Ce(An("type",[le({type:je("text"),text:W()}),le({type:je("image_url"),image_url:le({url:W(),detail:W().optional()})})]))]),ef=le({role:Xe(["system","user","assistant","tool"]),content:Vb,name:W().optional(),reasoning_content:W().optional(),thinking:W().optional(),think:W().optional()}),Hb=le({name:W(),arguments:W()}),tf=le({index:fe().optional(),id:W().optional(),type:je("function").optional(),function:le({name:W().optional(),arguments:W().optional()})});ef.extend({content:Qt([W(),Ce(le({type:je("text"),text:W()}))]).optional(),function_call:Hb.optional(),tool_calls:Ce(tf).optional()});const Zb=le({type:je("function"),function:le({name:W(),description:W().optional(),parameters:Nt(W(),Qn)})}),nf=le({model:W(),messages:Ce(ef),temperature:fe().optional(),max_tokens:fe().optional(),stream:nt().optional(),tools:Ce(Zb).optional(),tool_choice:Qt([Xe(["auto","none","required"]),le({type:je("auto")}),le({type:je("none")}),le({type:je("function"),function:le({name:W()})})]).optional(),user:W().optional()}),rf=le({role:Xe(["assistant"]).optional(),content:W().nullable().optional(),reasoning_content:W().nullable().optional(),thinking:W().nullable().optional(),think:W().nullable().optional(),function_call:le({name:W().optional(),arguments:W().optional()}).nullable().optional(),tool_calls:Ce(le({index:fe(),id:W().optional(),type:je("function").optional(),function:le({name:W().optional(),arguments:W().optional()})})).nullable().optional()}),qb=le({index:fe(),message:le({role:Xe(["assistant"]),content:W().nullable(),reasoning_content:W().optional(),thinking:W().optional(),think:W().optional(),function_call:le({name:W(),arguments:W()}).nullable().optional(),tool_calls:Ce(tf).optional()}).optional(),delta:rf.optional(),finish_reason:W().nullable()}),Kb=le({id:W(),object:je("chat.completion"),created:fe(),model:W(),choices:Ce(qb),usage:le({prompt_tokens:fe().nullable().optional(),completion_tokens:fe().nullable().optional(),total_tokens:fe().nullable().optional()}).passthrough(),service_tier:W().nullable().optional(),system_fingerprint:W().nullable().optional()}).passthrough(),Jb=le({id:W(),object:je("chat.completion.chunk"),created:fe(),model:W(),choices:Ce(le({index:fe(),delta:rf,finish_reason:W().nullable().optional()})),usage:le({prompt_tokens:fe().nullable().optional(),completion_tokens:fe().nullable().optional(),total_tokens:fe().nullable().optional()}).passthrough().nullable().optional()}).passthrough();function of(e){try{const t=JSON.parse(e),n=Kb.safeParse(t);return n.success?n.data:null}catch{return null}}const sf=le({index:fe(),timestamp:fe(),type:W(),data:Qn}),Gb=le({chunks:Ce(sf),truncated:nt().optional().default(!1)}),Zl=le({id:fe(),timestamp:W(),method:W(),path:W(),model:W().nullable(),sessionId:W().nullable(),rawRequestBody:W().nullable(),responseStatus:fe().nullable(),responseText:W().nullable(),inputTokens:fe().nullable(),outputTokens:fe().nullable(),cacheCreationInputTokens:fe().nullable(),cacheReadInputTokens:fe().nullable(),elapsedMs:fe().nullable(),firstChunkMs:fe().nullable().optional(),totalStreamMs:fe().nullable().optional(),tokensPerSecond:fe().nullable().optional(),streaming:nt(),userAgent:W().nullable(),origin:W().nullable(),rawHeaders:Nt(W(),W()).optional(),headers:Nt(W(),W()).optional(),apiFormat:Xe(["anthropic","openai","unknown"]).default("unknown"),isTest:nt().optional().default(!1),replayOfLogId:fe().nullable().optional(),providerName:W().nullable().optional(),clientPort:fe().nullable().optional(),clientPid:fe().nullable().optional(),clientCwd:W().nullable().optional(),clientProjectFolder:W().nullable().optional(),streamingChunks:Gb.optional(),streamingChunksPath:W().nullable().optional(),rawRequestBodyBytes:fe().int().nonnegative().nullable().optional(),responseTextBytes:fe().int().nonnegative().nullable().optional(),bodyContentMode:Xe(["full","compact","truncated"]).optional(),error:W().nullable().optional()});le({model:W()});le({model:W().optional(),metadata:le({user_id:W().optional()}).passthrough().optional()});const Yb=le({error:W()});async function Jt(e,t){const n=await e.json();return t.parse(n)}async function wn(e,t){try{const n=await e.json(),r=Yb.safeParse(n);return r.success?r.data.error:t}catch{return t}}async function Ur(e,t,n,r){const o=await fetch(e,n);if(!o.ok){const s=r?.(o)??`Request failed with status ${o.status}`;throw new Error(await wn(o,s))}return Jt(o,t)}const To=10,vi=600,Ao=60,wi=600,Io="time",wa="simple",af=Xe(["time","full"]),Xb=Xe(["simple","full"]),ss=le({stripClaudeCodeBillingHeader:nt(),hasSeenOnboarding:nt().default(!1),slowResponseThresholdSeconds:fe().int().min(0).max(vi).default(To),providerTestTimeoutSeconds:fe().int().min(1).max(wi).default(Ao),timeDisplayFormat:af.default(Io),captureMode:Xb.default(wa)}),Un="/api/config";async function Qb(e){return Ur(e,ss,void 0,t=>`Failed to fetch ${e}: ${t.status}`)}async function to(e){return Ur(Un,ss,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)},t=>`PATCH failed with status ${t.status}`)}function ka(){const e=ua(Un,Qb,{revalidateOnFocus:!1,revalidateIfStale:!1}),{mutate:t}=md(),n=e.data?.stripClaudeCodeBillingHeader??!1,r=e.data?.captureMode??wa,o=e.data?.slowResponseThresholdSeconds??To,s=e.data?.providerTestTimeoutSeconds??Ao,i=e.data?.timeDisplayFormat??Io,l=h=>({stripClaudeCodeBillingHeader:e.data?.stripClaudeCodeBillingHeader??!1,hasSeenOnboarding:e.data?.hasSeenOnboarding??!1,slowResponseThresholdSeconds:e.data?.slowResponseThresholdSeconds??To,providerTestTimeoutSeconds:e.data?.providerTestTimeoutSeconds??Ao,timeDisplayFormat:e.data?.timeDisplayFormat??Io,captureMode:r,...h}),c=async h=>{await t(Un,to({stripClaudeCodeBillingHeader:h}),{optimisticData:l({stripClaudeCodeBillingHeader:h}),rollbackOnError:!0,revalidate:!1})},u=async h=>{await t(Un,to({slowResponseThresholdSeconds:h}),{optimisticData:l({slowResponseThresholdSeconds:h}),rollbackOnError:!0,revalidate:!1})},d=async h=>{await t(Un,to({timeDisplayFormat:h}),{optimisticData:l({timeDisplayFormat:h}),rollbackOnError:!0,revalidate:!1})},f=async h=>{await t(Un,to({providerTestTimeoutSeconds:h}),{optimisticData:l({providerTestTimeoutSeconds:h}),rollbackOnError:!0,revalidate:!1})};return{strip:n,captureMode:r,slowResponseThresholdSeconds:o,providerTestTimeoutSeconds:s,timeDisplayFormat:i,isLoading:e.isLoading,isError:e.error!==void 0,setStrip:c,setSlowResponseThresholdSeconds:u,setProviderTestTimeoutSeconds:f,setTimeDisplayFormat:d}}const lf=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const ev=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const tv=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const ql=e=>{const t=tv(e);return t.charAt(0).toUpperCase()+t.slice(1)};var nv={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const rv=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const ov=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...l},c)=>x.createElement("svg",{ref:c,...nv,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:lf("lucide",o),...!s&&!rv(l)&&{"aria-hidden":"true"},...l},[...i.map(([u,d])=>x.createElement(u,d)),...Array.isArray(s)?s:[s]]));const xe=(e,t)=>{const n=x.forwardRef(({className:r,...o},s)=>x.createElement(ov,{ref:s,iconNode:t,className:lf(`lucide-${ev(ql(e))}`,`lucide-${e}`,r),...o}));return n.displayName=ql(e),n};const sv=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],iv=xe("arrow-down-right",sv);const av=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],lv=xe("arrow-down",av);const cv=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],uv=xe("arrow-left",cv);const dv=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],fv=xe("arrow-up-right",dv);const pv=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],hv=xe("arrow-up",pv);const mv=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],gv=xe("blocks",mv);const xv=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],cf=xe("brain",xv);const yv=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],it=xe("check",yv);const bv=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ut=xe("chevron-down",bv);const vv=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],en=xe("chevron-right",vv);const wv=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],kv=xe("chevron-up",wv);const _v=[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]],uf=xe("chevrons-down",_v);const Sv=[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]],Cv=xe("chevrons-up",Sv);const jv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],zr=xe("circle-alert",jv);const Ev=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Nv=xe("circle-check-big",Ev);const Tv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Kl=xe("circle-check",Tv);const Av=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Iv=xe("circle-question-mark",Av);const zv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],df=xe("circle-x",zv);const Pv=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],cn=xe("clock",Pv);const Rv=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],Ov=xe("cloud-upload",Rv);const Mv=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Lv=xe("code-xml",Mv);const Dv=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],Fv=xe("columns-2",Dv);const $v=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Wt=xe("copy",$v);const Bv=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],_a=xe("download",Bv);const Uv=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Wv=xe("ellipsis",Uv);const Vv=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],ff=xe("external-link",Vv);const Hv=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Sa=xe("eye-off",Hv);const Zv=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ca=xe("eye",Zv);const qv=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],Kv=xe("file-diff",qv);const Jv=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5",key:"1bq0ko"}],["path",{d:"M13.3 16.3 15 18",key:"2quom7"}]],Gv=xe("file-search",Jv);const Yv=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m8 16 2-2-2-2",key:"10vzyd"}],["path",{d:"M12 18h4",key:"1wd2n7"}]],Xv=xe("file-terminal",Yv);const Qv=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],ew=xe("file-text",Qv);const tw=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],pf=xe("gauge",tw);const nw=[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]],rw=xe("git-compare-arrows",nw);const ow=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],hf=xe("globe",ow);const sw=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],iw=xe("history",sw);const aw=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Pr=xe("loader-circle",aw);const lw=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],cw=xe("lock",lw);const uw=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],is=xe("message-square",uw);const dw=[["path",{d:"M5 12h14",key:"1ays0h"}]],fw=xe("minus",dw);const pw=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],hw=xe("mouse-pointer-click",pw);const mw=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],gw=xe("octagon-alert",mw);const xw=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],mf=xe("pencil",xw);const yw=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ki=xe("plus",yw);const bw=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Jl=xe("radio",bw);const vw=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Gl=xe("refresh-cw",vw);const ww=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],kw=xe("rotate-ccw",ww);const _w=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],_i=xe("rotate-cw",_w);const Sw=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],Cw=xe("rows-3",Sw);const jw=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Ew=xe("save",jw);const Nw=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]],Tw=xe("scan",Nw);const Aw=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Iw=xe("search",Aw);const zw=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Pw=xe("server",zw);const Rw=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ow=xe("settings",Rw);const Mw=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Yl=xe("shield-check",Mw);const Lw=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],gf=xe("terminal",Lw);const Dw=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],xf=xe("trash-2",Dw);const Fw=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],zo=xe("triangle-alert",Fw);const $w=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Bw=xe("upload",$w);const Uw=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Ww=xe("user",Uw);const Vw=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Hw=xe("wifi-off",Vw);const Zw=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],qw=xe("wifi",Zw);const Kw=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Wr=xe("wrench",Kw);const Jw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ja=xe("x",Jw);const Gw=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Rr=xe("zap",Gw),Si="/api/config";async function Yw(e){return Ur(e,ss,void 0,t=>`Failed to fetch ${e}: ${t.status}`)}async function Xw(e){return Ur(Si,ss,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)},t=>`PATCH failed with status ${t.status}`)}function Qw(){const e=ua(Si,Yw,{revalidateOnFocus:!1,revalidateIfStale:!1}),{mutate:t}=md(),n=e.data?.hasSeenOnboarding??!1,r=e.data?.captureMode??wa,o=async()=>{await t(Si,Xw({hasSeenOnboarding:!0}),{optimisticData:{stripClaudeCodeBillingHeader:e.data?.stripClaudeCodeBillingHeader??!1,hasSeenOnboarding:!0,slowResponseThresholdSeconds:e.data?.slowResponseThresholdSeconds??To,providerTestTimeoutSeconds:e.data?.providerTestTimeoutSeconds??Ao,timeDisplayFormat:e.data?.timeDisplayFormat??Io,captureMode:r},rollbackOnError:!0,revalidate:!1})};return{hasSeenOnboarding:n,captureMode:r,isLoading:e.isLoading,markSeen:o}}function e2(){const{hasSeenOnboarding:e,captureMode:t,isLoading:n,markSeen:r}=Qw();if(n||e)return null;const o=t==="full";return a.jsxs("div",{role:"note","aria-label":"Onboarding tip",className:"mx-4 mt-2 mb-1 flex items-start gap-3 rounded-md border border-amber-500/30 bg-amber-500/5 px-4 py-3 text-sm",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"mb-1 font-medium text-amber-600 dark:text-amber-400",children:o?"Agent Inspector is ready in Full mode":"Agent Inspector is ready in Simple mode"}),a.jsxs("ol",{className:"space-y-0.5 text-xs leading-relaxed text-muted-foreground",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"1. Start in the right mode"}),": this process is currently running in"," ",a.jsx("code",{children:t}),". Mode is fixed at startup."]}),o?a.jsxs(a.Fragment,{children:[a.jsxs("li",{children:[a.jsx("strong",{children:"2. Full diagnostics"}),": raw headers, raw response, and SSE chunks are captured for deep investigations."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"3. Daily work"}),": restart with"," ",a.jsx("code",{children:"agent-inspector --mode simple"})," to reduce capture overhead."]})]}):a.jsxs(a.Fragment,{children:[a.jsxs("li",{children:[a.jsx("strong",{children:"2. Simple capture"}),": requests, responses, tools, timing, tokens, replay, and memory candidates are available with lower overhead."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"3. Need raw diagnostics?"})," Restart with"," ",a.jsx("code",{children:"agent-inspector --mode full"})," for raw headers, raw response, and SSE chunks."]})]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Agent setup"}),": run ",a.jsx("code",{children:"agent-inspector onboard --status"}),", then use ",a.jsx("code",{children:"/agent-inspector:onboard"})," in Claude Code or ask Codex to use"," ",a.jsx("code",{children:"agent-inspector-onboard"}),"."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Container networking"}),": if the AI tool runs outside this Inspector container or host, replace ",a.jsx("code",{children:"localhost"})," with a reachable address."]})]})]}),a.jsxs("button",{type:"button",onClick:()=>{r()},className:"inline-flex h-8 shrink-0 items-center gap-1.5 rounded-md border border-amber-500/40 px-3 text-xs text-amber-700 transition-colors hover:bg-amber-500/10 dark:text-amber-300","aria-label":"Dismiss onboarding tip",children:[a.jsx(it,{className:"size-3.5"}),"Got it"]}),a.jsx("button",{type:"button",onClick:()=>{r()},className:"-m-1 shrink-0 p-1 text-muted-foreground transition-colors hover:text-foreground","aria-label":"Dismiss",children:a.jsx(ja,{className:"size-3.5"})})]})}function no(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Rs={exports:{}};var Xl;function t2(){return Xl||(Xl=1,(function(e,t){(function(n){e.exports=n()})(function(){return(function n(r,o,s){function i(u,d){if(!o[u]){if(!r[u]){var f=typeof no=="function"&&no;if(!d&&f)return f(u,!0);if(l)return l(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var p=o[u]={exports:{}};r[u][0].call(p.exports,function(b){var m=r[u][1][b];return i(m||b)},p,p.exports,n,r,o,s)}return o[u].exports}for(var l=typeof no=="function"&&no,c=0;c<s.length;c++)i(s[c]);return i})({1:[function(n,r,o){var s=n("./utils"),i=n("./support"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.encode=function(c){for(var u,d,f,h,p,b,m,g=[],y=0,v=c.length,k=v,S=s.getTypeOf(c)!=="string";y<c.length;)k=v-y,f=S?(u=c[y++],d=y<v?c[y++]:0,y<v?c[y++]:0):(u=c.charCodeAt(y++),d=y<v?c.charCodeAt(y++):0,y<v?c.charCodeAt(y++):0),h=u>>2,p=(3&u)<<4|d>>4,b=1<k?(15&d)<<2|f>>6:64,m=2<k?63&f:64,g.push(l.charAt(h)+l.charAt(p)+l.charAt(b)+l.charAt(m));return g.join("")},o.decode=function(c){var u,d,f,h,p,b,m=0,g=0,y="data:";if(c.substr(0,y.length)===y)throw new Error("Invalid base64 input, it looks like a data url.");var v,k=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===l.charAt(64)&&k--,c.charAt(c.length-2)===l.charAt(64)&&k--,k%1!=0)throw new Error("Invalid base64 input, bad content length.");for(v=i.uint8array?new Uint8Array(0|k):new Array(0|k);m<c.length;)u=l.indexOf(c.charAt(m++))<<2|(h=l.indexOf(c.charAt(m++)))>>4,d=(15&h)<<4|(p=l.indexOf(c.charAt(m++)))>>2,f=(3&p)<<6|(b=l.indexOf(c.charAt(m++))),v[g++]=u,p!==64&&(v[g++]=d),b!==64&&(v[g++]=f);return v}},{"./support":30,"./utils":32}],2:[function(n,r,o){var s=n("./external"),i=n("./stream/DataWorker"),l=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function u(d,f,h,p,b){this.compressedSize=d,this.uncompressedSize=f,this.crc32=h,this.compression=p,this.compressedContent=b}u.prototype={getContentWorker:function(){var d=new i(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new i(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(d,f,h){return d.pipe(new l).pipe(new c("uncompressedSize")).pipe(f.compressWorker(h)).pipe(new c("compressedSize")).withStreamInfo("compression",f)},r.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,o){var s=n("./stream/GenericWorker");o.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},o.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,o){var s=n("./utils"),i=(function(){for(var l,c=[],u=0;u<256;u++){l=u;for(var d=0;d<8;d++)l=1&l?3988292384^l>>>1:l>>>1;c[u]=l}return c})();r.exports=function(l,c){return l!==void 0&&l.length?s.getTypeOf(l)!=="string"?(function(u,d,f,h){var p=i,b=h+f;u^=-1;for(var m=h;m<b;m++)u=u>>>8^p[255&(u^d[m])];return-1^u})(0|c,l,l.length,0):(function(u,d,f,h){var p=i,b=h+f;u^=-1;for(var m=h;m<b;m++)u=u>>>8^p[255&(u^d.charCodeAt(m))];return-1^u})(0|c,l,l.length,0):0}},{"./utils":32}],5:[function(n,r,o){o.base64=!1,o.binary=!1,o.dir=!1,o.createFolders=!0,o.date=null,o.compression=null,o.compressionOptions=null,o.comment=null,o.unixPermissions=null,o.dosPermissions=null},{}],6:[function(n,r,o){var s=null;s=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:s}},{lie:37}],7:[function(n,r,o){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=n("pako"),l=n("./utils"),c=n("./stream/GenericWorker"),u=s?"uint8array":"array";function d(f,h){c.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=h,this.meta={}}o.magic="\b\0",l.inherits(d,c),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(l.transformTo(u,f.data),!1)},d.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(h){f.push({data:h,meta:f.meta})}},o.compressWorker=function(f){return new d("Deflate",f)},o.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,o){function s(p,b){var m,g="";for(m=0;m<b;m++)g+=String.fromCharCode(255&p),p>>>=8;return g}function i(p,b,m,g,y,v){var k,S,C=p.file,j=p.compression,N=v!==u.utf8encode,T=l.transformTo("string",v(C.name)),A=l.transformTo("string",u.utf8encode(C.name)),O=C.comment,$=l.transformTo("string",v(O)),E=l.transformTo("string",u.utf8encode(O)),L=A.length!==C.name.length,w=E.length!==O.length,M="",U="",F="",B=C.dir,G=C.date,I={crc32:0,compressedSize:0,uncompressedSize:0};b&&!m||(I.crc32=p.crc32,I.compressedSize=p.compressedSize,I.uncompressedSize=p.uncompressedSize);var H=0;b&&(H|=8),N||!L&&!w||(H|=2048);var K=0,z=0;B&&(K|=16),y==="UNIX"?(z=798,K|=(function(re,ue){var ie=re;return re||(ie=ue?16893:33204),(65535&ie)<<16})(C.unixPermissions,B)):(z=20,K|=(function(re){return 63&(re||0)})(C.dosPermissions)),k=G.getUTCHours(),k<<=6,k|=G.getUTCMinutes(),k<<=5,k|=G.getUTCSeconds()/2,S=G.getUTCFullYear()-1980,S<<=4,S|=G.getUTCMonth()+1,S<<=5,S|=G.getUTCDate(),L&&(U=s(1,1)+s(d(T),4)+A,M+="up"+s(U.length,2)+U),w&&(F=s(1,1)+s(d($),4)+E,M+="uc"+s(F.length,2)+F);var se="";return se+=`
|
|
41
|
-
\0`,se+=s(H,2),se+=j.magic,se+=s(k,2),se+=s(S,2),se+=s(I.crc32,4),se+=s(I.compressedSize,4),se+=s(I.uncompressedSize,4),se+=s(T.length,2),se+=s(M.length,2),{fileRecord:f.LOCAL_FILE_HEADER+se+T+M,dirRecord:f.CENTRAL_FILE_HEADER+s(z,2)+se+s($.length,2)+"\0\0\0\0"+s(K,4)+s(g,4)+T+M+$}}var l=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),f=n("../signature");function h(p,b,m,g){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=b,this.zipPlatform=m,this.encodeFileName=g,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(h,c),h.prototype.push=function(p){var b=p.meta.percent||0,m=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,c.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:m?(b+100*(m-g-1))/m:100}}))},h.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var b=this.streamFiles&&!p.file.dir;if(b){var m=i(p,b,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:m.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(p){this.accumulate=!1;var b=this.streamFiles&&!p.file.dir,m=i(p,b,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(m.dirRecord),b)this.push({data:(function(g){return f.DATA_DESCRIPTOR+s(g.crc32,4)+s(g.compressedSize,4)+s(g.uncompressedSize,4)})(p),meta:{percent:100}});else for(this.push({data:m.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var p=this.bytesWritten,b=0;b<this.dirRecords.length;b++)this.push({data:this.dirRecords[b],meta:{percent:100}});var m=this.bytesWritten-p,g=(function(y,v,k,S,C){var j=l.transformTo("string",C(S));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(y,2)+s(y,2)+s(v,4)+s(k,4)+s(j.length,2)+j})(this.dirRecords.length,m,p,this.zipComment,this.encodeFileName);this.push({data:g,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(p){this._sources.push(p);var b=this;return p.on("data",function(m){b.processChunk(m)}),p.on("end",function(){b.closedSource(b.previous.streamInfo),b._sources.length?b.prepareNextSource():b.end()}),p.on("error",function(m){b.error(m)}),this},h.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(p){var b=this._sources;if(!c.prototype.error.call(this,p))return!1;for(var m=0;m<b.length;m++)try{b[m].error(p)}catch{}return!0},h.prototype.lock=function(){c.prototype.lock.call(this);for(var p=this._sources,b=0;b<p.length;b++)p[b].lock()},r.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,o){var s=n("../compressions"),i=n("./ZipFileWorker");o.generateWorker=function(l,c,u){var d=new i(c.streamFiles,u,c.platform,c.encodeFileName),f=0;try{l.forEach(function(h,p){f++;var b=(function(v,k){var S=v||k,C=s[S];if(!C)throw new Error(S+" is not a valid compression method !");return C})(p.options.compression,c.compression),m=p.options.compressionOptions||c.compressionOptions||{},g=p.dir,y=p.date;p._compressWorker(b,m).withStreamInfo("file",{name:h,dir:g,date:y,comment:p.comment||"",unixPermissions:p.unixPermissions,dosPermissions:p.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(h){d.error(h)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,o){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new s;for(var l in this)typeof this[l]!="function"&&(i[l]=this[l]);return i}}(s.prototype=n("./object")).loadAsync=n("./load"),s.support=n("./support"),s.defaults=n("./defaults"),s.version="3.10.1",s.loadAsync=function(i,l){return new s().loadAsync(i,l)},s.external=n("./external"),r.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,o){var s=n("./utils"),i=n("./external"),l=n("./utf8"),c=n("./zipEntries"),u=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function f(h){return new i.Promise(function(p,b){var m=h.decompressed.getContentWorker().pipe(new u);m.on("error",function(g){b(g)}).on("end",function(){m.streamInfo.crc32!==h.decompressed.crc32?b(new Error("Corrupted zip : CRC32 mismatch")):p()}).resume()})}r.exports=function(h,p){var b=this;return p=s.extend(p||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:l.utf8decode}),d.isNode&&d.isStream(h)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip file",h,!0,p.optimizedBinaryString,p.base64).then(function(m){var g=new c(p);return g.load(m),g}).then(function(m){var g=[i.Promise.resolve(m)],y=m.files;if(p.checkCRC32)for(var v=0;v<y.length;v++)g.push(f(y[v]));return i.Promise.all(g)}).then(function(m){for(var g=m.shift(),y=g.files,v=0;v<y.length;v++){var k=y[v],S=k.fileNameStr,C=s.resolve(k.fileNameStr);b.file(C,k.decompressed,{binary:!0,optimizedBinaryString:!0,date:k.date,dir:k.dir,comment:k.fileCommentStr.length?k.fileCommentStr:null,unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions,createFolders:p.createFolders}),k.dir||(b.file(C).unsafeOriginalName=S)}return g.zipComment.length&&(b.comment=g.zipComment),b})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,o){var s=n("../utils"),i=n("../stream/GenericWorker");function l(c,u){i.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}s.inherits(l,i),l.prototype._bindStream=function(c){var u=this;(this._stream=c).pause(),c.on("data",function(d){u.push({data:d,meta:{percent:0}})}).on("error",function(d){u.isPaused?this.generatedError=d:u.error(d)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},l.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},l.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=l},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,o){var s=n("readable-stream").Readable;function i(l,c,u){s.call(this,c),this._helper=l;var d=this;l.on("data",function(f,h){d.push(f)||d._helper.pause(),u&&u(h)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}n("../utils").inherits(i,s),i.prototype._read=function(){this._helper.resume()},r.exports=i},{"../utils":32,"readable-stream":16}],14:[function(n,r,o){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,i);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,i)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var i=new Buffer(s);return i.fill(0),i},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(n,r,o){function s(C,j,N){var T,A=l.getTypeOf(j),O=l.extend(N||{},d);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(C=y(C)),O.createFolders&&(T=g(C))&&v.call(this,T,!0);var $=A==="string"&&O.binary===!1&&O.base64===!1;N&&N.binary!==void 0||(O.binary=!$),(j instanceof f&&j.uncompressedSize===0||O.dir||!j||j.length===0)&&(O.base64=!1,O.binary=!0,j="",O.compression="STORE",A="string");var E=null;E=j instanceof f||j instanceof c?j:b.isNode&&b.isStream(j)?new m(C,j):l.prepareContent(C,j,O.binary,O.optimizedBinaryString,O.base64);var L=new h(C,E,O);this.files[C]=L}var i=n("./utf8"),l=n("./utils"),c=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),d=n("./defaults"),f=n("./compressedObject"),h=n("./zipObject"),p=n("./generate"),b=n("./nodejsUtils"),m=n("./nodejs/NodejsStreamInputAdapter"),g=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var j=C.lastIndexOf("/");return 0<j?C.substring(0,j):""},y=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},v=function(C,j){return j=j!==void 0?j:d.createFolders,C=y(C),this.files[C]||s.call(this,C,null,{dir:!0,createFolders:j}),this.files[C]};function k(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var j,N,T;for(j in this.files)T=this.files[j],(N=j.slice(this.root.length,j.length))&&j.slice(0,this.root.length)===this.root&&C(N,T)},filter:function(C){var j=[];return this.forEach(function(N,T){C(N,T)&&j.push(T)}),j},file:function(C,j,N){if(arguments.length!==1)return C=this.root+C,s.call(this,C,j,N),this;if(k(C)){var T=C;return this.filter(function(O,$){return!$.dir&&T.test(O)})}var A=this.files[this.root+C];return A&&!A.dir?A:null},folder:function(C){if(!C)return this;if(k(C))return this.filter(function(A,O){return O.dir&&C.test(A)});var j=this.root+C,N=v.call(this,j),T=this.clone();return T.root=N.name,T},remove:function(C){C=this.root+C;var j=this.files[C];if(j||(C.slice(-1)!=="/"&&(C+="/"),j=this.files[C]),j&&!j.dir)delete this.files[C];else for(var N=this.filter(function(A,O){return O.name.slice(0,C.length)===C}),T=0;T<N.length;T++)delete this.files[N[T].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var j,N={};try{if((N=l.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=N.type.toLowerCase(),N.compression=N.compression.toUpperCase(),N.type==="binarystring"&&(N.type="string"),!N.type)throw new Error("No output type specified.");l.checkSupport(N.type),N.platform!=="darwin"&&N.platform!=="freebsd"&&N.platform!=="linux"&&N.platform!=="sunos"||(N.platform="UNIX"),N.platform==="win32"&&(N.platform="DOS");var T=N.comment||this.comment||"";j=p.generateWorker(this,N,T)}catch(A){(j=new c("error")).error(A)}return new u(j,N.type||"string",N.mimeType)},generateAsync:function(C,j){return this.generateInternalStream(C).accumulate(j)},generateNodeStream:function(C,j){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(j)}};r.exports=S},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,o){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,o){var s=n("./DataReader");function i(l){s.call(this,l);for(var c=0;c<this.data.length;c++)l[c]=255&l[c]}n("../utils").inherits(i,s),i.prototype.byteAt=function(l){return this.data[this.zero+l]},i.prototype.lastIndexOfSignature=function(l){for(var c=l.charCodeAt(0),u=l.charCodeAt(1),d=l.charCodeAt(2),f=l.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===c&&this.data[h+1]===u&&this.data[h+2]===d&&this.data[h+3]===f)return h-this.zero;return-1},i.prototype.readAndCheckSignature=function(l){var c=l.charCodeAt(0),u=l.charCodeAt(1),d=l.charCodeAt(2),f=l.charCodeAt(3),h=this.readData(4);return c===h[0]&&u===h[1]&&d===h[2]&&f===h[3]},i.prototype.readData=function(l){if(this.checkOffset(l),l===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./DataReader":18}],18:[function(n,r,o){var s=n("../utils");function i(l){this.data=l,this.length=l.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(l){this.checkIndex(this.index+l)},checkIndex:function(l){if(this.length<this.zero+l||l<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+l+"). Corrupted zip ?")},setIndex:function(l){this.checkIndex(l),this.index=l},skip:function(l){this.setIndex(this.index+l)},byteAt:function(){},readInt:function(l){var c,u=0;for(this.checkOffset(l),c=this.index+l-1;c>=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=l,u},readString:function(l){return s.transformTo("string",this.readData(l))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},r.exports=i},{"../utils":32}],19:[function(n,r,o){var s=n("./Uint8ArrayReader");function i(l){s.call(this,l)}n("../utils").inherits(i,s),i.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,o){var s=n("./DataReader");function i(l){s.call(this,l)}n("../utils").inherits(i,s),i.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},i.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},i.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},i.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./DataReader":18}],21:[function(n,r,o){var s=n("./ArrayReader");function i(l){s.call(this,l)}n("../utils").inherits(i,s),i.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,o){var s=n("../utils"),i=n("../support"),l=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(f){var h=s.getTypeOf(f);return s.checkSupport(h),h!=="string"||i.uint8array?h==="nodebuffer"?new u(f):i.uint8array?new d(s.transformTo("uint8array",f)):new l(s.transformTo("array",f)):new c(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,o){o.LOCAL_FILE_HEADER="PK",o.CENTRAL_FILE_HEADER="PK",o.CENTRAL_DIRECTORY_END="PK",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,o){var s=n("./GenericWorker"),i=n("../utils");function l(c){s.call(this,"ConvertWorker to "+c),this.destType=c}i.inherits(l,s),l.prototype.processChunk=function(c){this.push({data:i.transformTo(this.destType,c.data),meta:c.meta})},r.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,o){var s=n("./GenericWorker"),i=n("../crc32");function l(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(l,s),l.prototype.processChunk=function(c){this.streamInfo.crc32=i(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,o){var s=n("../utils"),i=n("./GenericWorker");function l(c){i.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}s.inherits(l,i),l.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}i.prototype.processChunk.call(this,c)},r.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,o){var s=n("../utils"),i=n("./GenericWorker");function l(c){i.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=s.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}s.inherits(l,i),l.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,o){function s(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,l){return this._listeners[i].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,l){if(this._listeners[i])for(var c=0;c<this._listeners[i].length;c++)this._listeners[i][c].call(this,l)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var l=this;return i.on("data",function(c){l.processChunk(c)}),i.on("end",function(){l.end()}),i.on("error",function(c){l.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,l){return this.extraStreamInfo[i]=l,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},r.exports=s},{}],29:[function(n,r,o){var s=n("../utils"),i=n("./ConvertWorker"),l=n("./GenericWorker"),c=n("../base64"),u=n("../support"),d=n("../external"),f=null;if(u.nodestream)try{f=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(b,m){return new d.Promise(function(g,y){var v=[],k=b._internalType,S=b._outputType,C=b._mimeType;b.on("data",function(j,N){v.push(j),m&&m(N)}).on("error",function(j){v=[],y(j)}).on("end",function(){try{var j=(function(N,T,A){switch(N){case"blob":return s.newBlob(s.transformTo("arraybuffer",T),A);case"base64":return c.encode(T);default:return s.transformTo(N,T)}})(S,(function(N,T){var A,O=0,$=null,E=0;for(A=0;A<T.length;A++)E+=T[A].length;switch(N){case"string":return T.join("");case"array":return Array.prototype.concat.apply([],T);case"uint8array":for($=new Uint8Array(E),A=0;A<T.length;A++)$.set(T[A],O),O+=T[A].length;return $;case"nodebuffer":return Buffer.concat(T);default:throw new Error("concat : unsupported type '"+N+"'")}})(k,v),C);g(j)}catch(N){y(N)}v=[]}).resume()})}function p(b,m,g){var y=m;switch(m){case"blob":case"arraybuffer":y="uint8array";break;case"base64":y="string"}try{this._internalType=y,this._outputType=m,this._mimeType=g,s.checkSupport(y),this._worker=b.pipe(new i(y)),b.lock()}catch(v){this._worker=new l("error"),this._worker.error(v)}}p.prototype={accumulate:function(b){return h(this,b)},on:function(b,m){var g=this;return b==="data"?this._worker.on(b,function(y){m.call(g,y.data,y.meta)}):this._worker.on(b,function(){s.delay(m,arguments,g)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(b){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},b)}},r.exports=p},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,o){if(o.base64=!0,o.array=!0,o.string=!0,o.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o.nodebuffer=typeof Buffer<"u",o.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")o.blob=!1;else{var s=new ArrayBuffer(0);try{o.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(s),o.blob=i.getBlob("application/zip").size===0}catch{o.blob=!1}}}try{o.nodestream=!!n("readable-stream").Readable}catch{o.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,o){for(var s=n("./utils"),i=n("./support"),l=n("./nodejsUtils"),c=n("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function f(){c.call(this,"utf-8 decode"),this.leftOver=null}function h(){c.call(this,"utf-8 encode")}o.utf8encode=function(p){return i.nodebuffer?l.newBufferFrom(p,"utf-8"):(function(b){var m,g,y,v,k,S=b.length,C=0;for(v=0;v<S;v++)(64512&(g=b.charCodeAt(v)))==55296&&v+1<S&&(64512&(y=b.charCodeAt(v+1)))==56320&&(g=65536+(g-55296<<10)+(y-56320),v++),C+=g<128?1:g<2048?2:g<65536?3:4;for(m=i.uint8array?new Uint8Array(C):new Array(C),v=k=0;k<C;v++)(64512&(g=b.charCodeAt(v)))==55296&&v+1<S&&(64512&(y=b.charCodeAt(v+1)))==56320&&(g=65536+(g-55296<<10)+(y-56320),v++),g<128?m[k++]=g:(g<2048?m[k++]=192|g>>>6:(g<65536?m[k++]=224|g>>>12:(m[k++]=240|g>>>18,m[k++]=128|g>>>12&63),m[k++]=128|g>>>6&63),m[k++]=128|63&g);return m})(p)},o.utf8decode=function(p){return i.nodebuffer?s.transformTo("nodebuffer",p).toString("utf-8"):(function(b){var m,g,y,v,k=b.length,S=new Array(2*k);for(m=g=0;m<k;)if((y=b[m++])<128)S[g++]=y;else if(4<(v=u[y]))S[g++]=65533,m+=v-1;else{for(y&=v===2?31:v===3?15:7;1<v&&m<k;)y=y<<6|63&b[m++],v--;1<v?S[g++]=65533:y<65536?S[g++]=y:(y-=65536,S[g++]=55296|y>>10&1023,S[g++]=56320|1023&y)}return S.length!==g&&(S.subarray?S=S.subarray(0,g):S.length=g),s.applyFromCharCode(S)})(p=s.transformTo(i.uint8array?"uint8array":"array",p))},s.inherits(f,c),f.prototype.processChunk=function(p){var b=s.transformTo(i.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var m=b;(b=new Uint8Array(m.length+this.leftOver.length)).set(this.leftOver,0),b.set(m,this.leftOver.length)}else b=this.leftOver.concat(b);this.leftOver=null}var g=(function(v,k){var S;for((k=k||v.length)>v.length&&(k=v.length),S=k-1;0<=S&&(192&v[S])==128;)S--;return S<0||S===0?k:S+u[v[S]]>k?S:k})(b),y=b;g!==b.length&&(i.uint8array?(y=b.subarray(0,g),this.leftOver=b.subarray(g,b.length)):(y=b.slice(0,g),this.leftOver=b.slice(g,b.length))),this.push({data:o.utf8decode(y),meta:p.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=f,s.inherits(h,c),h.prototype.processChunk=function(p){this.push({data:o.utf8encode(p.data),meta:p.meta})},o.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,o){var s=n("./support"),i=n("./base64"),l=n("./nodejsUtils"),c=n("./external");function u(m){return m}function d(m,g){for(var y=0;y<m.length;++y)g[y]=255&m.charCodeAt(y);return g}n("setimmediate"),o.newBlob=function(m,g){o.checkSupport("blob");try{return new Blob([m],{type:g})}catch{try{var y=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return y.append(m),y.getBlob(g)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(m,g,y){var v=[],k=0,S=m.length;if(S<=y)return String.fromCharCode.apply(null,m);for(;k<S;)g==="array"||g==="nodebuffer"?v.push(String.fromCharCode.apply(null,m.slice(k,Math.min(k+y,S)))):v.push(String.fromCharCode.apply(null,m.subarray(k,Math.min(k+y,S)))),k+=y;return v.join("")},stringifyByChar:function(m){for(var g="",y=0;y<m.length;y++)g+=String.fromCharCode(m[y]);return g},applyCanBeUsed:{uint8array:(function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,l.allocBuffer(1)).length===1}catch{return!1}})()}};function h(m){var g=65536,y=o.getTypeOf(m),v=!0;if(y==="uint8array"?v=f.applyCanBeUsed.uint8array:y==="nodebuffer"&&(v=f.applyCanBeUsed.nodebuffer),v)for(;1<g;)try{return f.stringifyByChunk(m,y,g)}catch{g=Math.floor(g/2)}return f.stringifyByChar(m)}function p(m,g){for(var y=0;y<m.length;y++)g[y]=m[y];return g}o.applyFromCharCode=h;var b={};b.string={string:u,array:function(m){return d(m,new Array(m.length))},arraybuffer:function(m){return b.string.uint8array(m).buffer},uint8array:function(m){return d(m,new Uint8Array(m.length))},nodebuffer:function(m){return d(m,l.allocBuffer(m.length))}},b.array={string:h,array:u,arraybuffer:function(m){return new Uint8Array(m).buffer},uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return l.newBufferFrom(m)}},b.arraybuffer={string:function(m){return h(new Uint8Array(m))},array:function(m){return p(new Uint8Array(m),new Array(m.byteLength))},arraybuffer:u,uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return l.newBufferFrom(new Uint8Array(m))}},b.uint8array={string:h,array:function(m){return p(m,new Array(m.length))},arraybuffer:function(m){return m.buffer},uint8array:u,nodebuffer:function(m){return l.newBufferFrom(m)}},b.nodebuffer={string:h,array:function(m){return p(m,new Array(m.length))},arraybuffer:function(m){return b.nodebuffer.uint8array(m).buffer},uint8array:function(m){return p(m,new Uint8Array(m.length))},nodebuffer:u},o.transformTo=function(m,g){if(g=g||"",!m)return g;o.checkSupport(m);var y=o.getTypeOf(g);return b[y][m](g)},o.resolve=function(m){for(var g=m.split("/"),y=[],v=0;v<g.length;v++){var k=g[v];k==="."||k===""&&v!==0&&v!==g.length-1||(k===".."?y.pop():y.push(k))}return y.join("/")},o.getTypeOf=function(m){return typeof m=="string"?"string":Object.prototype.toString.call(m)==="[object Array]"?"array":s.nodebuffer&&l.isBuffer(m)?"nodebuffer":s.uint8array&&m instanceof Uint8Array?"uint8array":s.arraybuffer&&m instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(m){if(!s[m.toLowerCase()])throw new Error(m+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(m){var g,y,v="";for(y=0;y<(m||"").length;y++)v+="\\x"+((g=m.charCodeAt(y))<16?"0":"")+g.toString(16).toUpperCase();return v},o.delay=function(m,g,y){setImmediate(function(){m.apply(y||null,g||[])})},o.inherits=function(m,g){function y(){}y.prototype=g.prototype,m.prototype=new y},o.extend=function(){var m,g,y={};for(m=0;m<arguments.length;m++)for(g in arguments[m])Object.prototype.hasOwnProperty.call(arguments[m],g)&&y[g]===void 0&&(y[g]=arguments[m][g]);return y},o.prepareContent=function(m,g,y,v,k){return c.Promise.resolve(g).then(function(S){return s.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader<"u"?new c.Promise(function(C,j){var N=new FileReader;N.onload=function(T){C(T.target.result)},N.onerror=function(T){j(T.target.error)},N.readAsArrayBuffer(S)}):S}).then(function(S){var C=o.getTypeOf(S);return C?(C==="arraybuffer"?S=o.transformTo("uint8array",S):C==="string"&&(k?S=i.decode(S):y&&v!==!0&&(S=(function(j){return d(j,s.uint8array?new Uint8Array(j.length):new Array(j.length))})(S))),S):c.Promise.reject(new Error("Can't read the data of '"+m+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,o){var s=n("./reader/readerFor"),i=n("./utils"),l=n("./signature"),c=n("./zipEntry"),u=n("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(h)+", expected "+i.pretty(f)+")")}},isSignature:function(f,h){var p=this.reader.index;this.reader.setIndex(f);var b=this.reader.readString(4)===h;return this.reader.setIndex(p),b},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),h=u.uint8array?"uint8array":"array",p=i.transformTo(h,f);this.zipComment=this.loadOptions.decodeFileName(p)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,h,p,b=this.zip64EndOfCentralSize-44;0<b;)f=this.reader.readInt(2),h=this.reader.readInt(4),p=this.reader.readData(h),this.zip64ExtensibleData[f]={id:f,length:h,value:p}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,h;for(f=0;f<this.files.length;f++)h=this.files[f],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(l.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(l.CENTRAL_FILE_HEADER);)(f=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(l.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,l.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var h=f;if(this.checkSignature(l.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,l.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var p=this.centralDirOffset+this.centralDirSize;this.zip64&&(p+=20,p+=12+this.zip64EndOfCentralSize);var b=h-p;if(0<b)this.isSignature(h,l.CENTRAL_FILE_HEADER)||(this.reader.zero=b);else if(b<0)throw new Error("Corrupted zip: missing "+Math.abs(b)+" bytes.")},prepareReader:function(f){this.reader=s(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,o){var s=n("./reader/readerFor"),i=n("./utils"),l=n("./compressedObject"),c=n("./crc32"),u=n("./utf8"),d=n("./compressions"),f=n("./support");function h(p,b){this.options=p,this.loadOptions=b}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(p){var b,m;if(p.skip(22),this.fileNameLength=p.readInt(2),m=p.readInt(2),this.fileName=p.readData(this.fileNameLength),p.skip(m),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((b=(function(g){for(var y in d)if(Object.prototype.hasOwnProperty.call(d,y)&&d[y].magic===g)return d[y];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new l(this.compressedSize,this.uncompressedSize,this.crc32,b,p.readData(this.compressedSize))},readCentralPart:function(p){this.versionMadeBy=p.readInt(2),p.skip(2),this.bitFlag=p.readInt(2),this.compressionMethod=p.readString(2),this.date=p.readDate(),this.crc32=p.readInt(4),this.compressedSize=p.readInt(4),this.uncompressedSize=p.readInt(4);var b=p.readInt(2);if(this.extraFieldsLength=p.readInt(2),this.fileCommentLength=p.readInt(2),this.diskNumberStart=p.readInt(2),this.internalFileAttributes=p.readInt(2),this.externalFileAttributes=p.readInt(4),this.localHeaderOffset=p.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");p.skip(b),this.readExtraFields(p),this.parseZIP64ExtraField(p),this.fileComment=p.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var p=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=s(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var b,m,g,y=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4<y;)b=p.readInt(2),m=p.readInt(2),g=p.readData(m),this.extraFields[b]={id:b,length:m,value:g};p.setIndex(y)},handleUTF8:function(){var p=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var b=this.findExtraFieldUnicodePath();if(b!==null)this.fileNameStr=b;else{var m=i.transformTo(p,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(m)}var g=this.findExtraFieldUnicodeComment();if(g!==null)this.fileCommentStr=g;else{var y=i.transformTo(p,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(y)}}},findExtraFieldUnicodePath:function(){var p=this.extraFields[28789];if(p){var b=s(p.value);return b.readInt(1)!==1||c(this.fileName)!==b.readInt(4)?null:u.utf8decode(b.readData(p.length-5))}return null},findExtraFieldUnicodeComment:function(){var p=this.extraFields[25461];if(p){var b=s(p.value);return b.readInt(1)!==1||c(this.fileComment)!==b.readInt(4)?null:u.utf8decode(b.readData(p.length-5))}return null}},r.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,o){function s(b,m,g){this.name=b,this.dir=g.dir,this.date=g.date,this.comment=g.comment,this.unixPermissions=g.unixPermissions,this.dosPermissions=g.dosPermissions,this._data=m,this._dataBinary=g.binary,this.options={compression:g.compression,compressionOptions:g.compressionOptions}}var i=n("./stream/StreamHelper"),l=n("./stream/DataWorker"),c=n("./utf8"),u=n("./compressedObject"),d=n("./stream/GenericWorker");s.prototype={internalStream:function(b){var m=null,g="string";try{if(!b)throw new Error("No output type specified.");var y=(g=b.toLowerCase())==="string"||g==="text";g!=="binarystring"&&g!=="text"||(g="string"),m=this._decompressWorker();var v=!this._dataBinary;v&&!y&&(m=m.pipe(new c.Utf8EncodeWorker)),!v&&y&&(m=m.pipe(new c.Utf8DecodeWorker))}catch(k){(m=new d("error")).error(k)}return new i(m,g,"")},async:function(b,m){return this.internalStream(b).accumulate(m)},nodeStream:function(b,m){return this.internalStream(b||"nodebuffer").toNodejsStream(m)},_compressWorker:function(b,m){if(this._data instanceof u&&this._data.compression.magic===b.magic)return this._data.getCompressedWorker();var g=this._decompressWorker();return this._dataBinary||(g=g.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(g,b,m)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new l(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},p=0;p<f.length;p++)s.prototype[f[p]]=h;r.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,o){(function(s){var i,l,c=s.MutationObserver||s.WebKitMutationObserver;if(c){var u=0,d=new c(b),f=s.document.createTextNode("");d.observe(f,{characterData:!0}),i=function(){f.data=u=++u%2}}else if(s.setImmediate||s.MessageChannel===void 0)i="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var m=s.document.createElement("script");m.onreadystatechange=function(){b(),m.onreadystatechange=null,m.parentNode.removeChild(m),m=null},s.document.documentElement.appendChild(m)}:function(){setTimeout(b,0)};else{var h=new s.MessageChannel;h.port1.onmessage=b,i=function(){h.port2.postMessage(0)}}var p=[];function b(){var m,g;l=!0;for(var y=p.length;y;){for(g=p,p=[],m=-1;++m<y;)g[m]();y=p.length}l=!1}r.exports=function(m){p.push(m)!==1||l||i()}}).call(this,typeof Yr<"u"?Yr:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,o){var s=n("immediate");function i(){}var l={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function f(y){if(typeof y!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,y!==i&&m(this,y)}function h(y,v,k){this.promise=y,typeof v=="function"&&(this.onFulfilled=v,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function p(y,v,k){s(function(){var S;try{S=v(k)}catch(C){return l.reject(y,C)}S===y?l.reject(y,new TypeError("Cannot resolve promise with itself")):l.resolve(y,S)})}function b(y){var v=y&&y.then;if(y&&(typeof y=="object"||typeof y=="function")&&typeof v=="function")return function(){v.apply(y,arguments)}}function m(y,v){var k=!1;function S(N){k||(k=!0,l.reject(y,N))}function C(N){k||(k=!0,l.resolve(y,N))}var j=g(function(){v(C,S)});j.status==="error"&&S(j.value)}function g(y,v){var k={};try{k.value=y(v),k.status="success"}catch(S){k.status="error",k.value=S}return k}(r.exports=f).prototype.finally=function(y){if(typeof y!="function")return this;var v=this.constructor;return this.then(function(k){return v.resolve(y()).then(function(){return k})},function(k){return v.resolve(y()).then(function(){throw k})})},f.prototype.catch=function(y){return this.then(null,y)},f.prototype.then=function(y,v){if(typeof y!="function"&&this.state===u||typeof v!="function"&&this.state===c)return this;var k=new this.constructor(i);return this.state!==d?p(k,this.state===u?y:v,this.outcome):this.queue.push(new h(k,y,v)),k},h.prototype.callFulfilled=function(y){l.resolve(this.promise,y)},h.prototype.otherCallFulfilled=function(y){p(this.promise,this.onFulfilled,y)},h.prototype.callRejected=function(y){l.reject(this.promise,y)},h.prototype.otherCallRejected=function(y){p(this.promise,this.onRejected,y)},l.resolve=function(y,v){var k=g(b,v);if(k.status==="error")return l.reject(y,k.value);var S=k.value;if(S)m(y,S);else{y.state=u,y.outcome=v;for(var C=-1,j=y.queue.length;++C<j;)y.queue[C].callFulfilled(v)}return y},l.reject=function(y,v){y.state=c,y.outcome=v;for(var k=-1,S=y.queue.length;++k<S;)y.queue[k].callRejected(v);return y},f.resolve=function(y){return y instanceof this?y:l.resolve(new this(i),y)},f.reject=function(y){var v=new this(i);return l.reject(v,y)},f.all=function(y){var v=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=y.length,S=!1;if(!k)return this.resolve([]);for(var C=new Array(k),j=0,N=-1,T=new this(i);++N<k;)A(y[N],N);return T;function A(O,$){v.resolve(O).then(function(E){C[$]=E,++j!==k||S||(S=!0,l.resolve(T,C))},function(E){S||(S=!0,l.reject(T,E))})}},f.race=function(y){var v=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=y.length,S=!1;if(!k)return this.resolve([]);for(var C=-1,j=new this(i);++C<k;)N=y[C],v.resolve(N).then(function(T){S||(S=!0,l.resolve(j,T))},function(T){S||(S=!0,l.reject(j,T))});var N;return j}},{immediate:36}],38:[function(n,r,o){var s={};(0,n("./lib/utils/common").assign)(s,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,o){var s=n("./zlib/deflate"),i=n("./utils/common"),l=n("./utils/strings"),c=n("./zlib/messages"),u=n("./zlib/zstream"),d=Object.prototype.toString,f=0,h=-1,p=0,b=8;function m(y){if(!(this instanceof m))return new m(y);this.options=i.assign({level:h,method:b,chunkSize:16384,windowBits:15,memLevel:8,strategy:p,to:""},y||{});var v=this.options;v.raw&&0<v.windowBits?v.windowBits=-v.windowBits:v.gzip&&0<v.windowBits&&v.windowBits<16&&(v.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var k=s.deflateInit2(this.strm,v.level,v.method,v.windowBits,v.memLevel,v.strategy);if(k!==f)throw new Error(c[k]);if(v.header&&s.deflateSetHeader(this.strm,v.header),v.dictionary){var S;if(S=typeof v.dictionary=="string"?l.string2buf(v.dictionary):d.call(v.dictionary)==="[object ArrayBuffer]"?new Uint8Array(v.dictionary):v.dictionary,(k=s.deflateSetDictionary(this.strm,S))!==f)throw new Error(c[k]);this._dict_set=!0}}function g(y,v){var k=new m(v);if(k.push(y,!0),k.err)throw k.msg||c[k.err];return k.result}m.prototype.push=function(y,v){var k,S,C=this.strm,j=this.options.chunkSize;if(this.ended)return!1;S=v===~~v?v:v===!0?4:0,typeof y=="string"?C.input=l.string2buf(y):d.call(y)==="[object ArrayBuffer]"?C.input=new Uint8Array(y):C.input=y,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new i.Buf8(j),C.next_out=0,C.avail_out=j),(k=s.deflate(C,S))!==1&&k!==f)return this.onEnd(k),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(l.buf2binstring(i.shrinkBuf(C.output,C.next_out))):this.onData(i.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&k!==1);return S===4?(k=s.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===f):S!==2||(this.onEnd(f),!(C.avail_out=0))},m.prototype.onData=function(y){this.chunks.push(y)},m.prototype.onEnd=function(y){y===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=y,this.msg=this.strm.msg},o.Deflate=m,o.deflate=g,o.deflateRaw=function(y,v){return(v=v||{}).raw=!0,g(y,v)},o.gzip=function(y,v){return(v=v||{}).gzip=!0,g(y,v)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,o){var s=n("./zlib/inflate"),i=n("./utils/common"),l=n("./utils/strings"),c=n("./zlib/constants"),u=n("./zlib/messages"),d=n("./zlib/zstream"),f=n("./zlib/gzheader"),h=Object.prototype.toString;function p(m){if(!(this instanceof p))return new p(m);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},m||{});var g=this.options;g.raw&&0<=g.windowBits&&g.windowBits<16&&(g.windowBits=-g.windowBits,g.windowBits===0&&(g.windowBits=-15)),!(0<=g.windowBits&&g.windowBits<16)||m&&m.windowBits||(g.windowBits+=32),15<g.windowBits&&g.windowBits<48&&(15&g.windowBits)==0&&(g.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var y=s.inflateInit2(this.strm,g.windowBits);if(y!==c.Z_OK)throw new Error(u[y]);this.header=new f,s.inflateGetHeader(this.strm,this.header)}function b(m,g){var y=new p(g);if(y.push(m,!0),y.err)throw y.msg||u[y.err];return y.result}p.prototype.push=function(m,g){var y,v,k,S,C,j,N=this.strm,T=this.options.chunkSize,A=this.options.dictionary,O=!1;if(this.ended)return!1;v=g===~~g?g:g===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof m=="string"?N.input=l.binstring2buf(m):h.call(m)==="[object ArrayBuffer]"?N.input=new Uint8Array(m):N.input=m,N.next_in=0,N.avail_in=N.input.length;do{if(N.avail_out===0&&(N.output=new i.Buf8(T),N.next_out=0,N.avail_out=T),(y=s.inflate(N,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&A&&(j=typeof A=="string"?l.string2buf(A):h.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,y=s.inflateSetDictionary(this.strm,j)),y===c.Z_BUF_ERROR&&O===!0&&(y=c.Z_OK,O=!1),y!==c.Z_STREAM_END&&y!==c.Z_OK)return this.onEnd(y),!(this.ended=!0);N.next_out&&(N.avail_out!==0&&y!==c.Z_STREAM_END&&(N.avail_in!==0||v!==c.Z_FINISH&&v!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=l.utf8border(N.output,N.next_out),S=N.next_out-k,C=l.buf2string(N.output,k),N.next_out=S,N.avail_out=T-S,S&&i.arraySet(N.output,N.output,k,S,0),this.onData(C)):this.onData(i.shrinkBuf(N.output,N.next_out)))),N.avail_in===0&&N.avail_out===0&&(O=!0)}while((0<N.avail_in||N.avail_out===0)&&y!==c.Z_STREAM_END);return y===c.Z_STREAM_END&&(v=c.Z_FINISH),v===c.Z_FINISH?(y=s.inflateEnd(this.strm),this.onEnd(y),this.ended=!0,y===c.Z_OK):v!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(N.avail_out=0))},p.prototype.onData=function(m){this.chunks.push(m)},p.prototype.onEnd=function(m){m===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},o.Inflate=p,o.inflate=b,o.inflateRaw=function(m,g){return(g=g||{}).raw=!0,b(m,g)},o.ungzip=b},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,o){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";o.assign=function(c){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var d=u.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(c[f]=d[f])}}return c},o.shrinkBuf=function(c,u){return c.length===u?c:c.subarray?c.subarray(0,u):(c.length=u,c)};var i={arraySet:function(c,u,d,f,h){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+f),h);else for(var p=0;p<f;p++)c[h+p]=u[d+p]},flattenChunks:function(c){var u,d,f,h,p,b;for(u=f=0,d=c.length;u<d;u++)f+=c[u].length;for(b=new Uint8Array(f),u=h=0,d=c.length;u<d;u++)p=c[u],b.set(p,h),h+=p.length;return b}},l={arraySet:function(c,u,d,f,h){for(var p=0;p<f;p++)c[h+p]=u[d+p]},flattenChunks:function(c){return[].concat.apply([],c)}};o.setTyped=function(c){c?(o.Buf8=Uint8Array,o.Buf16=Uint16Array,o.Buf32=Int32Array,o.assign(o,i)):(o.Buf8=Array,o.Buf16=Array,o.Buf32=Array,o.assign(o,l))},o.setTyped(s)},{}],42:[function(n,r,o){var s=n("./common"),i=!0,l=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{l=!1}for(var c=new s.Buf8(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function d(f,h){if(h<65537&&(f.subarray&&l||!f.subarray&&i))return String.fromCharCode.apply(null,s.shrinkBuf(f,h));for(var p="",b=0;b<h;b++)p+=String.fromCharCode(f[b]);return p}c[254]=c[254]=1,o.string2buf=function(f){var h,p,b,m,g,y=f.length,v=0;for(m=0;m<y;m++)(64512&(p=f.charCodeAt(m)))==55296&&m+1<y&&(64512&(b=f.charCodeAt(m+1)))==56320&&(p=65536+(p-55296<<10)+(b-56320),m++),v+=p<128?1:p<2048?2:p<65536?3:4;for(h=new s.Buf8(v),m=g=0;g<v;m++)(64512&(p=f.charCodeAt(m)))==55296&&m+1<y&&(64512&(b=f.charCodeAt(m+1)))==56320&&(p=65536+(p-55296<<10)+(b-56320),m++),p<128?h[g++]=p:(p<2048?h[g++]=192|p>>>6:(p<65536?h[g++]=224|p>>>12:(h[g++]=240|p>>>18,h[g++]=128|p>>>12&63),h[g++]=128|p>>>6&63),h[g++]=128|63&p);return h},o.buf2binstring=function(f){return d(f,f.length)},o.binstring2buf=function(f){for(var h=new s.Buf8(f.length),p=0,b=h.length;p<b;p++)h[p]=f.charCodeAt(p);return h},o.buf2string=function(f,h){var p,b,m,g,y=h||f.length,v=new Array(2*y);for(p=b=0;p<y;)if((m=f[p++])<128)v[b++]=m;else if(4<(g=c[m]))v[b++]=65533,p+=g-1;else{for(m&=g===2?31:g===3?15:7;1<g&&p<y;)m=m<<6|63&f[p++],g--;1<g?v[b++]=65533:m<65536?v[b++]=m:(m-=65536,v[b++]=55296|m>>10&1023,v[b++]=56320|1023&m)}return d(v,b)},o.utf8border=function(f,h){var p;for((h=h||f.length)>f.length&&(h=f.length),p=h-1;0<=p&&(192&f[p])==128;)p--;return p<0||p===0?h:p+c[f[p]]>h?p:h}},{"./common":41}],43:[function(n,r,o){r.exports=function(s,i,l,c){for(var u=65535&s|0,d=s>>>16&65535|0,f=0;l!==0;){for(l-=f=2e3<l?2e3:l;d=d+(u=u+i[c++]|0)|0,--f;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(n,r,o){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,o){var s=(function(){for(var i,l=[],c=0;c<256;c++){i=c;for(var u=0;u<8;u++)i=1&i?3988292384^i>>>1:i>>>1;l[c]=i}return l})();r.exports=function(i,l,c,u){var d=s,f=u+c;i^=-1;for(var h=u;h<f;h++)i=i>>>8^d[255&(i^l[h])];return-1^i}},{}],46:[function(n,r,o){var s,i=n("../utils/common"),l=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),f=0,h=4,p=0,b=-2,m=-1,g=4,y=2,v=8,k=9,S=286,C=30,j=19,N=2*S+1,T=15,A=3,O=258,$=O+A+1,E=42,L=113,w=1,M=2,U=3,F=4;function B(_,te){return _.msg=d[te],te}function G(_){return(_<<1)-(4<_?9:0)}function I(_){for(var te=_.length;0<=--te;)_[te]=0}function H(_){var te=_.state,Q=te.pending;Q>_.avail_out&&(Q=_.avail_out),Q!==0&&(i.arraySet(_.output,te.pending_buf,te.pending_out,Q,_.next_out),_.next_out+=Q,te.pending_out+=Q,_.total_out+=Q,_.avail_out-=Q,te.pending-=Q,te.pending===0&&(te.pending_out=0))}function K(_,te){l._tr_flush_block(_,0<=_.block_start?_.block_start:-1,_.strstart-_.block_start,te),_.block_start=_.strstart,H(_.strm)}function z(_,te){_.pending_buf[_.pending++]=te}function se(_,te){_.pending_buf[_.pending++]=te>>>8&255,_.pending_buf[_.pending++]=255&te}function re(_,te){var Q,R,P=_.max_chain_length,q=_.strstart,Z=_.prev_length,J=_.nice_match,V=_.strstart>_.w_size-$?_.strstart-(_.w_size-$):0,oe=_.window,Y=_.w_mask,ee=_.prev,D=_.strstart+O,X=oe[q+Z-1],ae=oe[q+Z];_.prev_length>=_.good_match&&(P>>=2),J>_.lookahead&&(J=_.lookahead);do if(oe[(Q=te)+Z]===ae&&oe[Q+Z-1]===X&&oe[Q]===oe[q]&&oe[++Q]===oe[q+1]){q+=2,Q++;do;while(oe[++q]===oe[++Q]&&oe[++q]===oe[++Q]&&oe[++q]===oe[++Q]&&oe[++q]===oe[++Q]&&oe[++q]===oe[++Q]&&oe[++q]===oe[++Q]&&oe[++q]===oe[++Q]&&oe[++q]===oe[++Q]&&q<D);if(R=O-(D-q),q=D-O,Z<R){if(_.match_start=te,J<=(Z=R))break;X=oe[q+Z-1],ae=oe[q+Z]}}while((te=ee[te&Y])>V&&--P!=0);return Z<=_.lookahead?Z:_.lookahead}function ue(_){var te,Q,R,P,q,Z,J,V,oe,Y,ee=_.w_size;do{if(P=_.window_size-_.lookahead-_.strstart,_.strstart>=ee+(ee-$)){for(i.arraySet(_.window,_.window,ee,ee,0),_.match_start-=ee,_.strstart-=ee,_.block_start-=ee,te=Q=_.hash_size;R=_.head[--te],_.head[te]=ee<=R?R-ee:0,--Q;);for(te=Q=ee;R=_.prev[--te],_.prev[te]=ee<=R?R-ee:0,--Q;);P+=ee}if(_.strm.avail_in===0)break;if(Z=_.strm,J=_.window,V=_.strstart+_.lookahead,oe=P,Y=void 0,Y=Z.avail_in,oe<Y&&(Y=oe),Q=Y===0?0:(Z.avail_in-=Y,i.arraySet(J,Z.input,Z.next_in,Y,V),Z.state.wrap===1?Z.adler=c(Z.adler,J,Y,V):Z.state.wrap===2&&(Z.adler=u(Z.adler,J,Y,V)),Z.next_in+=Y,Z.total_in+=Y,Y),_.lookahead+=Q,_.lookahead+_.insert>=A)for(q=_.strstart-_.insert,_.ins_h=_.window[q],_.ins_h=(_.ins_h<<_.hash_shift^_.window[q+1])&_.hash_mask;_.insert&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[q+A-1])&_.hash_mask,_.prev[q&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=q,q++,_.insert--,!(_.lookahead+_.insert<A)););}while(_.lookahead<$&&_.strm.avail_in!==0)}function ie(_,te){for(var Q,R;;){if(_.lookahead<$){if(ue(_),_.lookahead<$&&te===f)return w;if(_.lookahead===0)break}if(Q=0,_.lookahead>=A&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+A-1])&_.hash_mask,Q=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),Q!==0&&_.strstart-Q<=_.w_size-$&&(_.match_length=re(_,Q)),_.match_length>=A)if(R=l._tr_tally(_,_.strstart-_.match_start,_.match_length-A),_.lookahead-=_.match_length,_.match_length<=_.max_lazy_match&&_.lookahead>=A){for(_.match_length--;_.strstart++,_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+A-1])&_.hash_mask,Q=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart,--_.match_length!=0;);_.strstart++}else _.strstart+=_.match_length,_.match_length=0,_.ins_h=_.window[_.strstart],_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+1])&_.hash_mask;else R=l._tr_tally(_,0,_.window[_.strstart]),_.lookahead--,_.strstart++;if(R&&(K(_,!1),_.strm.avail_out===0))return w}return _.insert=_.strstart<A-1?_.strstart:A-1,te===h?(K(_,!0),_.strm.avail_out===0?U:F):_.last_lit&&(K(_,!1),_.strm.avail_out===0)?w:M}function de(_,te){for(var Q,R,P;;){if(_.lookahead<$){if(ue(_),_.lookahead<$&&te===f)return w;if(_.lookahead===0)break}if(Q=0,_.lookahead>=A&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+A-1])&_.hash_mask,Q=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),_.prev_length=_.match_length,_.prev_match=_.match_start,_.match_length=A-1,Q!==0&&_.prev_length<_.max_lazy_match&&_.strstart-Q<=_.w_size-$&&(_.match_length=re(_,Q),_.match_length<=5&&(_.strategy===1||_.match_length===A&&4096<_.strstart-_.match_start)&&(_.match_length=A-1)),_.prev_length>=A&&_.match_length<=_.prev_length){for(P=_.strstart+_.lookahead-A,R=l._tr_tally(_,_.strstart-1-_.prev_match,_.prev_length-A),_.lookahead-=_.prev_length-1,_.prev_length-=2;++_.strstart<=P&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+A-1])&_.hash_mask,Q=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),--_.prev_length!=0;);if(_.match_available=0,_.match_length=A-1,_.strstart++,R&&(K(_,!1),_.strm.avail_out===0))return w}else if(_.match_available){if((R=l._tr_tally(_,0,_.window[_.strstart-1]))&&K(_,!1),_.strstart++,_.lookahead--,_.strm.avail_out===0)return w}else _.match_available=1,_.strstart++,_.lookahead--}return _.match_available&&(R=l._tr_tally(_,0,_.window[_.strstart-1]),_.match_available=0),_.insert=_.strstart<A-1?_.strstart:A-1,te===h?(K(_,!0),_.strm.avail_out===0?U:F):_.last_lit&&(K(_,!1),_.strm.avail_out===0)?w:M}function pe(_,te,Q,R,P){this.good_length=_,this.max_lazy=te,this.nice_length=Q,this.max_chain=R,this.func=P}function he(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*N),this.dyn_dtree=new i.Buf16(2*(2*C+1)),this.bl_tree=new i.Buf16(2*(2*j+1)),I(this.dyn_ltree),I(this.dyn_dtree),I(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(T+1),this.heap=new i.Buf16(2*S+1),I(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*S+1),I(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function me(_){var te;return _&&_.state?(_.total_in=_.total_out=0,_.data_type=y,(te=_.state).pending=0,te.pending_out=0,te.wrap<0&&(te.wrap=-te.wrap),te.status=te.wrap?E:L,_.adler=te.wrap===2?0:1,te.last_flush=f,l._tr_init(te),p):B(_,b)}function ke(_){var te=me(_);return te===p&&(function(Q){Q.window_size=2*Q.w_size,I(Q.head),Q.max_lazy_match=s[Q.level].max_lazy,Q.good_match=s[Q.level].good_length,Q.nice_match=s[Q.level].nice_length,Q.max_chain_length=s[Q.level].max_chain,Q.strstart=0,Q.block_start=0,Q.lookahead=0,Q.insert=0,Q.match_length=Q.prev_length=A-1,Q.match_available=0,Q.ins_h=0})(_.state),te}function ze(_,te,Q,R,P,q){if(!_)return b;var Z=1;if(te===m&&(te=6),R<0?(Z=0,R=-R):15<R&&(Z=2,R-=16),P<1||k<P||Q!==v||R<8||15<R||te<0||9<te||q<0||g<q)return B(_,b);R===8&&(R=9);var J=new he;return(_.state=J).strm=_,J.wrap=Z,J.gzhead=null,J.w_bits=R,J.w_size=1<<J.w_bits,J.w_mask=J.w_size-1,J.hash_bits=P+7,J.hash_size=1<<J.hash_bits,J.hash_mask=J.hash_size-1,J.hash_shift=~~((J.hash_bits+A-1)/A),J.window=new i.Buf8(2*J.w_size),J.head=new i.Buf16(J.hash_size),J.prev=new i.Buf16(J.w_size),J.lit_bufsize=1<<P+6,J.pending_buf_size=4*J.lit_bufsize,J.pending_buf=new i.Buf8(J.pending_buf_size),J.d_buf=1*J.lit_bufsize,J.l_buf=3*J.lit_bufsize,J.level=te,J.strategy=q,J.method=Q,ke(_)}s=[new pe(0,0,0,0,function(_,te){var Q=65535;for(Q>_.pending_buf_size-5&&(Q=_.pending_buf_size-5);;){if(_.lookahead<=1){if(ue(_),_.lookahead===0&&te===f)return w;if(_.lookahead===0)break}_.strstart+=_.lookahead,_.lookahead=0;var R=_.block_start+Q;if((_.strstart===0||_.strstart>=R)&&(_.lookahead=_.strstart-R,_.strstart=R,K(_,!1),_.strm.avail_out===0)||_.strstart-_.block_start>=_.w_size-$&&(K(_,!1),_.strm.avail_out===0))return w}return _.insert=0,te===h?(K(_,!0),_.strm.avail_out===0?U:F):(_.strstart>_.block_start&&(K(_,!1),_.strm.avail_out),w)}),new pe(4,4,8,4,ie),new pe(4,5,16,8,ie),new pe(4,6,32,32,ie),new pe(4,4,16,16,de),new pe(8,16,32,32,de),new pe(8,16,128,128,de),new pe(8,32,128,256,de),new pe(32,128,258,1024,de),new pe(32,258,258,4096,de)],o.deflateInit=function(_,te){return ze(_,te,v,15,8,0)},o.deflateInit2=ze,o.deflateReset=ke,o.deflateResetKeep=me,o.deflateSetHeader=function(_,te){return _&&_.state?_.state.wrap!==2?b:(_.state.gzhead=te,p):b},o.deflate=function(_,te){var Q,R,P,q;if(!_||!_.state||5<te||te<0)return _?B(_,b):b;if(R=_.state,!_.output||!_.input&&_.avail_in!==0||R.status===666&&te!==h)return B(_,_.avail_out===0?-5:b);if(R.strm=_,Q=R.last_flush,R.last_flush=te,R.status===E)if(R.wrap===2)_.adler=0,z(R,31),z(R,139),z(R,8),R.gzhead?(z(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),z(R,255&R.gzhead.time),z(R,R.gzhead.time>>8&255),z(R,R.gzhead.time>>16&255),z(R,R.gzhead.time>>24&255),z(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),z(R,255&R.gzhead.os),R.gzhead.extra&&R.gzhead.extra.length&&(z(R,255&R.gzhead.extra.length),z(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(_.adler=u(_.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=69):(z(R,0),z(R,0),z(R,0),z(R,0),z(R,0),z(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),z(R,3),R.status=L);else{var Z=v+(R.w_bits-8<<4)<<8;Z|=(2<=R.strategy||R.level<2?0:R.level<6?1:R.level===6?2:3)<<6,R.strstart!==0&&(Z|=32),Z+=31-Z%31,R.status=L,se(R,Z),R.strstart!==0&&(se(R,_.adler>>>16),se(R,65535&_.adler)),_.adler=1}if(R.status===69)if(R.gzhead.extra){for(P=R.pending;R.gzindex<(65535&R.gzhead.extra.length)&&(R.pending!==R.pending_buf_size||(R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),H(_),P=R.pending,R.pending!==R.pending_buf_size));)z(R,255&R.gzhead.extra[R.gzindex]),R.gzindex++;R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=73)}else R.status=73;if(R.status===73)if(R.gzhead.name){P=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),H(_),P=R.pending,R.pending===R.pending_buf_size)){q=1;break}q=R.gzindex<R.gzhead.name.length?255&R.gzhead.name.charCodeAt(R.gzindex++):0,z(R,q)}while(q!==0);R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),q===0&&(R.gzindex=0,R.status=91)}else R.status=91;if(R.status===91)if(R.gzhead.comment){P=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),H(_),P=R.pending,R.pending===R.pending_buf_size)){q=1;break}q=R.gzindex<R.gzhead.comment.length?255&R.gzhead.comment.charCodeAt(R.gzindex++):0,z(R,q)}while(q!==0);R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),q===0&&(R.status=103)}else R.status=103;if(R.status===103&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&H(_),R.pending+2<=R.pending_buf_size&&(z(R,255&_.adler),z(R,_.adler>>8&255),_.adler=0,R.status=L)):R.status=L),R.pending!==0){if(H(_),_.avail_out===0)return R.last_flush=-1,p}else if(_.avail_in===0&&G(te)<=G(Q)&&te!==h)return B(_,-5);if(R.status===666&&_.avail_in!==0)return B(_,-5);if(_.avail_in!==0||R.lookahead!==0||te!==f&&R.status!==666){var J=R.strategy===2?(function(V,oe){for(var Y;;){if(V.lookahead===0&&(ue(V),V.lookahead===0)){if(oe===f)return w;break}if(V.match_length=0,Y=l._tr_tally(V,0,V.window[V.strstart]),V.lookahead--,V.strstart++,Y&&(K(V,!1),V.strm.avail_out===0))return w}return V.insert=0,oe===h?(K(V,!0),V.strm.avail_out===0?U:F):V.last_lit&&(K(V,!1),V.strm.avail_out===0)?w:M})(R,te):R.strategy===3?(function(V,oe){for(var Y,ee,D,X,ae=V.window;;){if(V.lookahead<=O){if(ue(V),V.lookahead<=O&&oe===f)return w;if(V.lookahead===0)break}if(V.match_length=0,V.lookahead>=A&&0<V.strstart&&(ee=ae[D=V.strstart-1])===ae[++D]&&ee===ae[++D]&&ee===ae[++D]){X=V.strstart+O;do;while(ee===ae[++D]&&ee===ae[++D]&&ee===ae[++D]&&ee===ae[++D]&&ee===ae[++D]&&ee===ae[++D]&&ee===ae[++D]&&ee===ae[++D]&&D<X);V.match_length=O-(X-D),V.match_length>V.lookahead&&(V.match_length=V.lookahead)}if(V.match_length>=A?(Y=l._tr_tally(V,1,V.match_length-A),V.lookahead-=V.match_length,V.strstart+=V.match_length,V.match_length=0):(Y=l._tr_tally(V,0,V.window[V.strstart]),V.lookahead--,V.strstart++),Y&&(K(V,!1),V.strm.avail_out===0))return w}return V.insert=0,oe===h?(K(V,!0),V.strm.avail_out===0?U:F):V.last_lit&&(K(V,!1),V.strm.avail_out===0)?w:M})(R,te):s[R.level].func(R,te);if(J!==U&&J!==F||(R.status=666),J===w||J===U)return _.avail_out===0&&(R.last_flush=-1),p;if(J===M&&(te===1?l._tr_align(R):te!==5&&(l._tr_stored_block(R,0,0,!1),te===3&&(I(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),H(_),_.avail_out===0))return R.last_flush=-1,p}return te!==h?p:R.wrap<=0?1:(R.wrap===2?(z(R,255&_.adler),z(R,_.adler>>8&255),z(R,_.adler>>16&255),z(R,_.adler>>24&255),z(R,255&_.total_in),z(R,_.total_in>>8&255),z(R,_.total_in>>16&255),z(R,_.total_in>>24&255)):(se(R,_.adler>>>16),se(R,65535&_.adler)),H(_),0<R.wrap&&(R.wrap=-R.wrap),R.pending!==0?p:1)},o.deflateEnd=function(_){var te;return _&&_.state?(te=_.state.status)!==E&&te!==69&&te!==73&&te!==91&&te!==103&&te!==L&&te!==666?B(_,b):(_.state=null,te===L?B(_,-3):p):b},o.deflateSetDictionary=function(_,te){var Q,R,P,q,Z,J,V,oe,Y=te.length;if(!_||!_.state||(q=(Q=_.state).wrap)===2||q===1&&Q.status!==E||Q.lookahead)return b;for(q===1&&(_.adler=c(_.adler,te,Y,0)),Q.wrap=0,Y>=Q.w_size&&(q===0&&(I(Q.head),Q.strstart=0,Q.block_start=0,Q.insert=0),oe=new i.Buf8(Q.w_size),i.arraySet(oe,te,Y-Q.w_size,Q.w_size,0),te=oe,Y=Q.w_size),Z=_.avail_in,J=_.next_in,V=_.input,_.avail_in=Y,_.next_in=0,_.input=te,ue(Q);Q.lookahead>=A;){for(R=Q.strstart,P=Q.lookahead-(A-1);Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[R+A-1])&Q.hash_mask,Q.prev[R&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=R,R++,--P;);Q.strstart=R,Q.lookahead=A-1,ue(Q)}return Q.strstart+=Q.lookahead,Q.block_start=Q.strstart,Q.insert=Q.lookahead,Q.lookahead=0,Q.match_length=Q.prev_length=A-1,Q.match_available=0,_.next_in=J,_.input=V,_.avail_in=Z,Q.wrap=q,p},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,o){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,o){r.exports=function(s,i){var l,c,u,d,f,h,p,b,m,g,y,v,k,S,C,j,N,T,A,O,$,E,L,w,M;l=s.state,c=s.next_in,w=s.input,u=c+(s.avail_in-5),d=s.next_out,M=s.output,f=d-(i-s.avail_out),h=d+(s.avail_out-257),p=l.dmax,b=l.wsize,m=l.whave,g=l.wnext,y=l.window,v=l.hold,k=l.bits,S=l.lencode,C=l.distcode,j=(1<<l.lenbits)-1,N=(1<<l.distbits)-1;e:do{k<15&&(v+=w[c++]<<k,k+=8,v+=w[c++]<<k,k+=8),T=S[v&j];t:for(;;){if(v>>>=A=T>>>24,k-=A,(A=T>>>16&255)===0)M[d++]=65535&T;else{if(!(16&A)){if((64&A)==0){T=S[(65535&T)+(v&(1<<A)-1)];continue t}if(32&A){l.mode=12;break e}s.msg="invalid literal/length code",l.mode=30;break e}O=65535&T,(A&=15)&&(k<A&&(v+=w[c++]<<k,k+=8),O+=v&(1<<A)-1,v>>>=A,k-=A),k<15&&(v+=w[c++]<<k,k+=8,v+=w[c++]<<k,k+=8),T=C[v&N];n:for(;;){if(v>>>=A=T>>>24,k-=A,!(16&(A=T>>>16&255))){if((64&A)==0){T=C[(65535&T)+(v&(1<<A)-1)];continue n}s.msg="invalid distance code",l.mode=30;break e}if($=65535&T,k<(A&=15)&&(v+=w[c++]<<k,(k+=8)<A&&(v+=w[c++]<<k,k+=8)),p<($+=v&(1<<A)-1)){s.msg="invalid distance too far back",l.mode=30;break e}if(v>>>=A,k-=A,(A=d-f)<$){if(m<(A=$-A)&&l.sane){s.msg="invalid distance too far back",l.mode=30;break e}if(L=y,(E=0)===g){if(E+=b-A,A<O){for(O-=A;M[d++]=y[E++],--A;);E=d-$,L=M}}else if(g<A){if(E+=b+g-A,(A-=g)<O){for(O-=A;M[d++]=y[E++],--A;);if(E=0,g<O){for(O-=A=g;M[d++]=y[E++],--A;);E=d-$,L=M}}}else if(E+=g-A,A<O){for(O-=A;M[d++]=y[E++],--A;);E=d-$,L=M}for(;2<O;)M[d++]=L[E++],M[d++]=L[E++],M[d++]=L[E++],O-=3;O&&(M[d++]=L[E++],1<O&&(M[d++]=L[E++]))}else{for(E=d-$;M[d++]=M[E++],M[d++]=M[E++],M[d++]=M[E++],2<(O-=3););O&&(M[d++]=M[E++],1<O&&(M[d++]=M[E++]))}break}}break}}while(c<u&&d<h);c-=O=k>>3,v&=(1<<(k-=O<<3))-1,s.next_in=c,s.next_out=d,s.avail_in=c<u?u-c+5:5-(c-u),s.avail_out=d<h?h-d+257:257-(d-h),l.hold=v,l.bits=k}},{}],49:[function(n,r,o){var s=n("../utils/common"),i=n("./adler32"),l=n("./crc32"),c=n("./inffast"),u=n("./inftrees"),d=1,f=2,h=0,p=-2,b=1,m=852,g=592;function y(E){return(E>>>24&255)+(E>>>8&65280)+((65280&E)<<8)+((255&E)<<24)}function v(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(E){var L;return E&&E.state?(L=E.state,E.total_in=E.total_out=L.total=0,E.msg="",L.wrap&&(E.adler=1&L.wrap),L.mode=b,L.last=0,L.havedict=0,L.dmax=32768,L.head=null,L.hold=0,L.bits=0,L.lencode=L.lendyn=new s.Buf32(m),L.distcode=L.distdyn=new s.Buf32(g),L.sane=1,L.back=-1,h):p}function S(E){var L;return E&&E.state?((L=E.state).wsize=0,L.whave=0,L.wnext=0,k(E)):p}function C(E,L){var w,M;return E&&E.state?(M=E.state,L<0?(w=0,L=-L):(w=1+(L>>4),L<48&&(L&=15)),L&&(L<8||15<L)?p:(M.window!==null&&M.wbits!==L&&(M.window=null),M.wrap=w,M.wbits=L,S(E))):p}function j(E,L){var w,M;return E?(M=new v,(E.state=M).window=null,(w=C(E,L))!==h&&(E.state=null),w):p}var N,T,A=!0;function O(E){if(A){var L;for(N=new s.Buf32(512),T=new s.Buf32(32),L=0;L<144;)E.lens[L++]=8;for(;L<256;)E.lens[L++]=9;for(;L<280;)E.lens[L++]=7;for(;L<288;)E.lens[L++]=8;for(u(d,E.lens,0,288,N,0,E.work,{bits:9}),L=0;L<32;)E.lens[L++]=5;u(f,E.lens,0,32,T,0,E.work,{bits:5}),A=!1}E.lencode=N,E.lenbits=9,E.distcode=T,E.distbits=5}function $(E,L,w,M){var U,F=E.state;return F.window===null&&(F.wsize=1<<F.wbits,F.wnext=0,F.whave=0,F.window=new s.Buf8(F.wsize)),M>=F.wsize?(s.arraySet(F.window,L,w-F.wsize,F.wsize,0),F.wnext=0,F.whave=F.wsize):(M<(U=F.wsize-F.wnext)&&(U=M),s.arraySet(F.window,L,w-M,U,F.wnext),(M-=U)?(s.arraySet(F.window,L,w-M,M,0),F.wnext=M,F.whave=F.wsize):(F.wnext+=U,F.wnext===F.wsize&&(F.wnext=0),F.whave<F.wsize&&(F.whave+=U))),0}o.inflateReset=S,o.inflateReset2=C,o.inflateResetKeep=k,o.inflateInit=function(E){return j(E,15)},o.inflateInit2=j,o.inflate=function(E,L){var w,M,U,F,B,G,I,H,K,z,se,re,ue,ie,de,pe,he,me,ke,ze,_,te,Q,R,P=0,q=new s.Buf8(4),Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!E||!E.state||!E.output||!E.input&&E.avail_in!==0)return p;(w=E.state).mode===12&&(w.mode=13),B=E.next_out,U=E.output,I=E.avail_out,F=E.next_in,M=E.input,G=E.avail_in,H=w.hold,K=w.bits,z=G,se=I,te=h;e:for(;;)switch(w.mode){case b:if(w.wrap===0){w.mode=13;break}for(;K<16;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(2&w.wrap&&H===35615){q[w.check=0]=255&H,q[1]=H>>>8&255,w.check=l(w.check,q,2,0),K=H=0,w.mode=2;break}if(w.flags=0,w.head&&(w.head.done=!1),!(1&w.wrap)||(((255&H)<<8)+(H>>8))%31){E.msg="incorrect header check",w.mode=30;break}if((15&H)!=8){E.msg="unknown compression method",w.mode=30;break}if(K-=4,_=8+(15&(H>>>=4)),w.wbits===0)w.wbits=_;else if(_>w.wbits){E.msg="invalid window size",w.mode=30;break}w.dmax=1<<_,E.adler=w.check=1,w.mode=512&H?10:12,K=H=0;break;case 2:for(;K<16;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(w.flags=H,(255&w.flags)!=8){E.msg="unknown compression method",w.mode=30;break}if(57344&w.flags){E.msg="unknown header flags set",w.mode=30;break}w.head&&(w.head.text=H>>8&1),512&w.flags&&(q[0]=255&H,q[1]=H>>>8&255,w.check=l(w.check,q,2,0)),K=H=0,w.mode=3;case 3:for(;K<32;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}w.head&&(w.head.time=H),512&w.flags&&(q[0]=255&H,q[1]=H>>>8&255,q[2]=H>>>16&255,q[3]=H>>>24&255,w.check=l(w.check,q,4,0)),K=H=0,w.mode=4;case 4:for(;K<16;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}w.head&&(w.head.xflags=255&H,w.head.os=H>>8),512&w.flags&&(q[0]=255&H,q[1]=H>>>8&255,w.check=l(w.check,q,2,0)),K=H=0,w.mode=5;case 5:if(1024&w.flags){for(;K<16;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}w.length=H,w.head&&(w.head.extra_len=H),512&w.flags&&(q[0]=255&H,q[1]=H>>>8&255,w.check=l(w.check,q,2,0)),K=H=0}else w.head&&(w.head.extra=null);w.mode=6;case 6:if(1024&w.flags&&(G<(re=w.length)&&(re=G),re&&(w.head&&(_=w.head.extra_len-w.length,w.head.extra||(w.head.extra=new Array(w.head.extra_len)),s.arraySet(w.head.extra,M,F,re,_)),512&w.flags&&(w.check=l(w.check,M,re,F)),G-=re,F+=re,w.length-=re),w.length))break e;w.length=0,w.mode=7;case 7:if(2048&w.flags){if(G===0)break e;for(re=0;_=M[F+re++],w.head&&_&&w.length<65536&&(w.head.name+=String.fromCharCode(_)),_&&re<G;);if(512&w.flags&&(w.check=l(w.check,M,re,F)),G-=re,F+=re,_)break e}else w.head&&(w.head.name=null);w.length=0,w.mode=8;case 8:if(4096&w.flags){if(G===0)break e;for(re=0;_=M[F+re++],w.head&&_&&w.length<65536&&(w.head.comment+=String.fromCharCode(_)),_&&re<G;);if(512&w.flags&&(w.check=l(w.check,M,re,F)),G-=re,F+=re,_)break e}else w.head&&(w.head.comment=null);w.mode=9;case 9:if(512&w.flags){for(;K<16;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(H!==(65535&w.check)){E.msg="header crc mismatch",w.mode=30;break}K=H=0}w.head&&(w.head.hcrc=w.flags>>9&1,w.head.done=!0),E.adler=w.check=0,w.mode=12;break;case 10:for(;K<32;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}E.adler=w.check=y(H),K=H=0,w.mode=11;case 11:if(w.havedict===0)return E.next_out=B,E.avail_out=I,E.next_in=F,E.avail_in=G,w.hold=H,w.bits=K,2;E.adler=w.check=1,w.mode=12;case 12:if(L===5||L===6)break e;case 13:if(w.last){H>>>=7&K,K-=7&K,w.mode=27;break}for(;K<3;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}switch(w.last=1&H,K-=1,3&(H>>>=1)){case 0:w.mode=14;break;case 1:if(O(w),w.mode=20,L!==6)break;H>>>=2,K-=2;break e;case 2:w.mode=17;break;case 3:E.msg="invalid block type",w.mode=30}H>>>=2,K-=2;break;case 14:for(H>>>=7&K,K-=7&K;K<32;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if((65535&H)!=(H>>>16^65535)){E.msg="invalid stored block lengths",w.mode=30;break}if(w.length=65535&H,K=H=0,w.mode=15,L===6)break e;case 15:w.mode=16;case 16:if(re=w.length){if(G<re&&(re=G),I<re&&(re=I),re===0)break e;s.arraySet(U,M,F,re,B),G-=re,F+=re,I-=re,B+=re,w.length-=re;break}w.mode=12;break;case 17:for(;K<14;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(w.nlen=257+(31&H),H>>>=5,K-=5,w.ndist=1+(31&H),H>>>=5,K-=5,w.ncode=4+(15&H),H>>>=4,K-=4,286<w.nlen||30<w.ndist){E.msg="too many length or distance symbols",w.mode=30;break}w.have=0,w.mode=18;case 18:for(;w.have<w.ncode;){for(;K<3;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}w.lens[Z[w.have++]]=7&H,H>>>=3,K-=3}for(;w.have<19;)w.lens[Z[w.have++]]=0;if(w.lencode=w.lendyn,w.lenbits=7,Q={bits:w.lenbits},te=u(0,w.lens,0,19,w.lencode,0,w.work,Q),w.lenbits=Q.bits,te){E.msg="invalid code lengths set",w.mode=30;break}w.have=0,w.mode=19;case 19:for(;w.have<w.nlen+w.ndist;){for(;pe=(P=w.lencode[H&(1<<w.lenbits)-1])>>>16&255,he=65535&P,!((de=P>>>24)<=K);){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(he<16)H>>>=de,K-=de,w.lens[w.have++]=he;else{if(he===16){for(R=de+2;K<R;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(H>>>=de,K-=de,w.have===0){E.msg="invalid bit length repeat",w.mode=30;break}_=w.lens[w.have-1],re=3+(3&H),H>>>=2,K-=2}else if(he===17){for(R=de+3;K<R;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}K-=de,_=0,re=3+(7&(H>>>=de)),H>>>=3,K-=3}else{for(R=de+7;K<R;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}K-=de,_=0,re=11+(127&(H>>>=de)),H>>>=7,K-=7}if(w.have+re>w.nlen+w.ndist){E.msg="invalid bit length repeat",w.mode=30;break}for(;re--;)w.lens[w.have++]=_}}if(w.mode===30)break;if(w.lens[256]===0){E.msg="invalid code -- missing end-of-block",w.mode=30;break}if(w.lenbits=9,Q={bits:w.lenbits},te=u(d,w.lens,0,w.nlen,w.lencode,0,w.work,Q),w.lenbits=Q.bits,te){E.msg="invalid literal/lengths set",w.mode=30;break}if(w.distbits=6,w.distcode=w.distdyn,Q={bits:w.distbits},te=u(f,w.lens,w.nlen,w.ndist,w.distcode,0,w.work,Q),w.distbits=Q.bits,te){E.msg="invalid distances set",w.mode=30;break}if(w.mode=20,L===6)break e;case 20:w.mode=21;case 21:if(6<=G&&258<=I){E.next_out=B,E.avail_out=I,E.next_in=F,E.avail_in=G,w.hold=H,w.bits=K,c(E,se),B=E.next_out,U=E.output,I=E.avail_out,F=E.next_in,M=E.input,G=E.avail_in,H=w.hold,K=w.bits,w.mode===12&&(w.back=-1);break}for(w.back=0;pe=(P=w.lencode[H&(1<<w.lenbits)-1])>>>16&255,he=65535&P,!((de=P>>>24)<=K);){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(pe&&(240&pe)==0){for(me=de,ke=pe,ze=he;pe=(P=w.lencode[ze+((H&(1<<me+ke)-1)>>me)])>>>16&255,he=65535&P,!(me+(de=P>>>24)<=K);){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}H>>>=me,K-=me,w.back+=me}if(H>>>=de,K-=de,w.back+=de,w.length=he,pe===0){w.mode=26;break}if(32&pe){w.back=-1,w.mode=12;break}if(64&pe){E.msg="invalid literal/length code",w.mode=30;break}w.extra=15&pe,w.mode=22;case 22:if(w.extra){for(R=w.extra;K<R;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}w.length+=H&(1<<w.extra)-1,H>>>=w.extra,K-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=23;case 23:for(;pe=(P=w.distcode[H&(1<<w.distbits)-1])>>>16&255,he=65535&P,!((de=P>>>24)<=K);){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if((240&pe)==0){for(me=de,ke=pe,ze=he;pe=(P=w.distcode[ze+((H&(1<<me+ke)-1)>>me)])>>>16&255,he=65535&P,!(me+(de=P>>>24)<=K);){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}H>>>=me,K-=me,w.back+=me}if(H>>>=de,K-=de,w.back+=de,64&pe){E.msg="invalid distance code",w.mode=30;break}w.offset=he,w.extra=15&pe,w.mode=24;case 24:if(w.extra){for(R=w.extra;K<R;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}w.offset+=H&(1<<w.extra)-1,H>>>=w.extra,K-=w.extra,w.back+=w.extra}if(w.offset>w.dmax){E.msg="invalid distance too far back",w.mode=30;break}w.mode=25;case 25:if(I===0)break e;if(re=se-I,w.offset>re){if((re=w.offset-re)>w.whave&&w.sane){E.msg="invalid distance too far back",w.mode=30;break}ue=re>w.wnext?(re-=w.wnext,w.wsize-re):w.wnext-re,re>w.length&&(re=w.length),ie=w.window}else ie=U,ue=B-w.offset,re=w.length;for(I<re&&(re=I),I-=re,w.length-=re;U[B++]=ie[ue++],--re;);w.length===0&&(w.mode=21);break;case 26:if(I===0)break e;U[B++]=w.length,I--,w.mode=21;break;case 27:if(w.wrap){for(;K<32;){if(G===0)break e;G--,H|=M[F++]<<K,K+=8}if(se-=I,E.total_out+=se,w.total+=se,se&&(E.adler=w.check=w.flags?l(w.check,U,se,B-se):i(w.check,U,se,B-se)),se=I,(w.flags?H:y(H))!==w.check){E.msg="incorrect data check",w.mode=30;break}K=H=0}w.mode=28;case 28:if(w.wrap&&w.flags){for(;K<32;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(H!==(4294967295&w.total)){E.msg="incorrect length check",w.mode=30;break}K=H=0}w.mode=29;case 29:te=1;break e;case 30:te=-3;break e;case 31:return-4;default:return p}return E.next_out=B,E.avail_out=I,E.next_in=F,E.avail_in=G,w.hold=H,w.bits=K,(w.wsize||se!==E.avail_out&&w.mode<30&&(w.mode<27||L!==4))&&$(E,E.output,E.next_out,se-E.avail_out)?(w.mode=31,-4):(z-=E.avail_in,se-=E.avail_out,E.total_in+=z,E.total_out+=se,w.total+=se,w.wrap&&se&&(E.adler=w.check=w.flags?l(w.check,U,se,E.next_out-se):i(w.check,U,se,E.next_out-se)),E.data_type=w.bits+(w.last?64:0)+(w.mode===12?128:0)+(w.mode===20||w.mode===15?256:0),(z==0&&se===0||L===4)&&te===h&&(te=-5),te)},o.inflateEnd=function(E){if(!E||!E.state)return p;var L=E.state;return L.window&&(L.window=null),E.state=null,h},o.inflateGetHeader=function(E,L){var w;return E&&E.state?(2&(w=E.state).wrap)==0?p:((w.head=L).done=!1,h):p},o.inflateSetDictionary=function(E,L){var w,M=L.length;return E&&E.state?(w=E.state).wrap!==0&&w.mode!==11?p:w.mode===11&&i(1,L,M,0)!==w.check?-3:$(E,L,M,M)?(w.mode=31,-4):(w.havedict=1,h):p},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,o){var s=n("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(d,f,h,p,b,m,g,y){var v,k,S,C,j,N,T,A,O,$=y.bits,E=0,L=0,w=0,M=0,U=0,F=0,B=0,G=0,I=0,H=0,K=null,z=0,se=new s.Buf16(16),re=new s.Buf16(16),ue=null,ie=0;for(E=0;E<=15;E++)se[E]=0;for(L=0;L<p;L++)se[f[h+L]]++;for(U=$,M=15;1<=M&&se[M]===0;M--);if(M<U&&(U=M),M===0)return b[m++]=20971520,b[m++]=20971520,y.bits=1,0;for(w=1;w<M&&se[w]===0;w++);for(U<w&&(U=w),E=G=1;E<=15;E++)if(G<<=1,(G-=se[E])<0)return-1;if(0<G&&(d===0||M!==1))return-1;for(re[1]=0,E=1;E<15;E++)re[E+1]=re[E]+se[E];for(L=0;L<p;L++)f[h+L]!==0&&(g[re[f[h+L]]++]=L);if(N=d===0?(K=ue=g,19):d===1?(K=i,z-=257,ue=l,ie-=257,256):(K=c,ue=u,-1),E=w,j=m,B=L=H=0,S=-1,C=(I=1<<(F=U))-1,d===1&&852<I||d===2&&592<I)return 1;for(;;){for(T=E-B,O=g[L]<N?(A=0,g[L]):g[L]>N?(A=ue[ie+g[L]],K[z+g[L]]):(A=96,0),v=1<<E-B,w=k=1<<F;b[j+(H>>B)+(k-=v)]=T<<24|A<<16|O|0,k!==0;);for(v=1<<E-1;H&v;)v>>=1;if(v!==0?(H&=v-1,H+=v):H=0,L++,--se[E]==0){if(E===M)break;E=f[h+g[L]]}if(U<E&&(H&C)!==S){for(B===0&&(B=U),j+=w,G=1<<(F=E-B);F+B<M&&!((G-=se[F+B])<=0);)F++,G<<=1;if(I+=1<<F,d===1&&852<I||d===2&&592<I)return 1;b[S=H&C]=U<<24|F<<16|j-m|0}}return H!==0&&(b[j+H]=E-B<<24|64<<16|0),y.bits=U,0}},{"../utils/common":41}],51:[function(n,r,o){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,o){var s=n("../utils/common"),i=0,l=1;function c(P){for(var q=P.length;0<=--q;)P[q]=0}var u=0,d=29,f=256,h=f+1+d,p=30,b=19,m=2*h+1,g=15,y=16,v=7,k=256,S=16,C=17,j=18,N=[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],T=[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],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],$=new Array(2*(h+2));c($);var E=new Array(2*p);c(E);var L=new Array(512);c(L);var w=new Array(256);c(w);var M=new Array(d);c(M);var U,F,B,G=new Array(p);function I(P,q,Z,J,V){this.static_tree=P,this.extra_bits=q,this.extra_base=Z,this.elems=J,this.max_length=V,this.has_stree=P&&P.length}function H(P,q){this.dyn_tree=P,this.max_code=0,this.stat_desc=q}function K(P){return P<256?L[P]:L[256+(P>>>7)]}function z(P,q){P.pending_buf[P.pending++]=255&q,P.pending_buf[P.pending++]=q>>>8&255}function se(P,q,Z){P.bi_valid>y-Z?(P.bi_buf|=q<<P.bi_valid&65535,z(P,P.bi_buf),P.bi_buf=q>>y-P.bi_valid,P.bi_valid+=Z-y):(P.bi_buf|=q<<P.bi_valid&65535,P.bi_valid+=Z)}function re(P,q,Z){se(P,Z[2*q],Z[2*q+1])}function ue(P,q){for(var Z=0;Z|=1&P,P>>>=1,Z<<=1,0<--q;);return Z>>>1}function ie(P,q,Z){var J,V,oe=new Array(g+1),Y=0;for(J=1;J<=g;J++)oe[J]=Y=Y+Z[J-1]<<1;for(V=0;V<=q;V++){var ee=P[2*V+1];ee!==0&&(P[2*V]=ue(oe[ee]++,ee))}}function de(P){var q;for(q=0;q<h;q++)P.dyn_ltree[2*q]=0;for(q=0;q<p;q++)P.dyn_dtree[2*q]=0;for(q=0;q<b;q++)P.bl_tree[2*q]=0;P.dyn_ltree[2*k]=1,P.opt_len=P.static_len=0,P.last_lit=P.matches=0}function pe(P){8<P.bi_valid?z(P,P.bi_buf):0<P.bi_valid&&(P.pending_buf[P.pending++]=P.bi_buf),P.bi_buf=0,P.bi_valid=0}function he(P,q,Z,J){var V=2*q,oe=2*Z;return P[V]<P[oe]||P[V]===P[oe]&&J[q]<=J[Z]}function me(P,q,Z){for(var J=P.heap[Z],V=Z<<1;V<=P.heap_len&&(V<P.heap_len&&he(q,P.heap[V+1],P.heap[V],P.depth)&&V++,!he(q,J,P.heap[V],P.depth));)P.heap[Z]=P.heap[V],Z=V,V<<=1;P.heap[Z]=J}function ke(P,q,Z){var J,V,oe,Y,ee=0;if(P.last_lit!==0)for(;J=P.pending_buf[P.d_buf+2*ee]<<8|P.pending_buf[P.d_buf+2*ee+1],V=P.pending_buf[P.l_buf+ee],ee++,J===0?re(P,V,q):(re(P,(oe=w[V])+f+1,q),(Y=N[oe])!==0&&se(P,V-=M[oe],Y),re(P,oe=K(--J),Z),(Y=T[oe])!==0&&se(P,J-=G[oe],Y)),ee<P.last_lit;);re(P,k,q)}function ze(P,q){var Z,J,V,oe=q.dyn_tree,Y=q.stat_desc.static_tree,ee=q.stat_desc.has_stree,D=q.stat_desc.elems,X=-1;for(P.heap_len=0,P.heap_max=m,Z=0;Z<D;Z++)oe[2*Z]!==0?(P.heap[++P.heap_len]=X=Z,P.depth[Z]=0):oe[2*Z+1]=0;for(;P.heap_len<2;)oe[2*(V=P.heap[++P.heap_len]=X<2?++X:0)]=1,P.depth[V]=0,P.opt_len--,ee&&(P.static_len-=Y[2*V+1]);for(q.max_code=X,Z=P.heap_len>>1;1<=Z;Z--)me(P,oe,Z);for(V=D;Z=P.heap[1],P.heap[1]=P.heap[P.heap_len--],me(P,oe,1),J=P.heap[1],P.heap[--P.heap_max]=Z,P.heap[--P.heap_max]=J,oe[2*V]=oe[2*Z]+oe[2*J],P.depth[V]=(P.depth[Z]>=P.depth[J]?P.depth[Z]:P.depth[J])+1,oe[2*Z+1]=oe[2*J+1]=V,P.heap[1]=V++,me(P,oe,1),2<=P.heap_len;);P.heap[--P.heap_max]=P.heap[1],(function(ae,ge){var Ee,Be,ft,Re,zt,Zt,Ke=ge.dyn_tree,qt=ge.max_code,_t=ge.stat_desc.static_tree,Ng=ge.stat_desc.has_stree,Tg=ge.stat_desc.extra_bits,Sl=ge.stat_desc.extra_base,pr=ge.stat_desc.max_length,Gr=0;for(Re=0;Re<=g;Re++)ae.bl_count[Re]=0;for(Ke[2*ae.heap[ae.heap_max]+1]=0,Ee=ae.heap_max+1;Ee<m;Ee++)pr<(Re=Ke[2*Ke[2*(Be=ae.heap[Ee])+1]+1]+1)&&(Re=pr,Gr++),Ke[2*Be+1]=Re,qt<Be||(ae.bl_count[Re]++,zt=0,Sl<=Be&&(zt=Tg[Be-Sl]),Zt=Ke[2*Be],ae.opt_len+=Zt*(Re+zt),Ng&&(ae.static_len+=Zt*(_t[2*Be+1]+zt)));if(Gr!==0){do{for(Re=pr-1;ae.bl_count[Re]===0;)Re--;ae.bl_count[Re]--,ae.bl_count[Re+1]+=2,ae.bl_count[pr]--,Gr-=2}while(0<Gr);for(Re=pr;Re!==0;Re--)for(Be=ae.bl_count[Re];Be!==0;)qt<(ft=ae.heap[--Ee])||(Ke[2*ft+1]!==Re&&(ae.opt_len+=(Re-Ke[2*ft+1])*Ke[2*ft],Ke[2*ft+1]=Re),Be--)}})(P,q),ie(oe,X,P.bl_count)}function _(P,q,Z){var J,V,oe=-1,Y=q[1],ee=0,D=7,X=4;for(Y===0&&(D=138,X=3),q[2*(Z+1)+1]=65535,J=0;J<=Z;J++)V=Y,Y=q[2*(J+1)+1],++ee<D&&V===Y||(ee<X?P.bl_tree[2*V]+=ee:V!==0?(V!==oe&&P.bl_tree[2*V]++,P.bl_tree[2*S]++):ee<=10?P.bl_tree[2*C]++:P.bl_tree[2*j]++,oe=V,X=(ee=0)===Y?(D=138,3):V===Y?(D=6,3):(D=7,4))}function te(P,q,Z){var J,V,oe=-1,Y=q[1],ee=0,D=7,X=4;for(Y===0&&(D=138,X=3),J=0;J<=Z;J++)if(V=Y,Y=q[2*(J+1)+1],!(++ee<D&&V===Y)){if(ee<X)for(;re(P,V,P.bl_tree),--ee!=0;);else V!==0?(V!==oe&&(re(P,V,P.bl_tree),ee--),re(P,S,P.bl_tree),se(P,ee-3,2)):ee<=10?(re(P,C,P.bl_tree),se(P,ee-3,3)):(re(P,j,P.bl_tree),se(P,ee-11,7));oe=V,X=(ee=0)===Y?(D=138,3):V===Y?(D=6,3):(D=7,4)}}c(G);var Q=!1;function R(P,q,Z,J){se(P,(u<<1)+(J?1:0),3),(function(V,oe,Y,ee){pe(V),z(V,Y),z(V,~Y),s.arraySet(V.pending_buf,V.window,oe,Y,V.pending),V.pending+=Y})(P,q,Z)}o._tr_init=function(P){Q||((function(){var q,Z,J,V,oe,Y=new Array(g+1);for(V=J=0;V<d-1;V++)for(M[V]=J,q=0;q<1<<N[V];q++)w[J++]=V;for(w[J-1]=V,V=oe=0;V<16;V++)for(G[V]=oe,q=0;q<1<<T[V];q++)L[oe++]=V;for(oe>>=7;V<p;V++)for(G[V]=oe<<7,q=0;q<1<<T[V]-7;q++)L[256+oe++]=V;for(Z=0;Z<=g;Z++)Y[Z]=0;for(q=0;q<=143;)$[2*q+1]=8,q++,Y[8]++;for(;q<=255;)$[2*q+1]=9,q++,Y[9]++;for(;q<=279;)$[2*q+1]=7,q++,Y[7]++;for(;q<=287;)$[2*q+1]=8,q++,Y[8]++;for(ie($,h+1,Y),q=0;q<p;q++)E[2*q+1]=5,E[2*q]=ue(q,5);U=new I($,N,f+1,h,g),F=new I(E,T,0,p,g),B=new I(new Array(0),A,0,b,v)})(),Q=!0),P.l_desc=new H(P.dyn_ltree,U),P.d_desc=new H(P.dyn_dtree,F),P.bl_desc=new H(P.bl_tree,B),P.bi_buf=0,P.bi_valid=0,de(P)},o._tr_stored_block=R,o._tr_flush_block=function(P,q,Z,J){var V,oe,Y=0;0<P.level?(P.strm.data_type===2&&(P.strm.data_type=(function(ee){var D,X=4093624447;for(D=0;D<=31;D++,X>>>=1)if(1&X&&ee.dyn_ltree[2*D]!==0)return i;if(ee.dyn_ltree[18]!==0||ee.dyn_ltree[20]!==0||ee.dyn_ltree[26]!==0)return l;for(D=32;D<f;D++)if(ee.dyn_ltree[2*D]!==0)return l;return i})(P)),ze(P,P.l_desc),ze(P,P.d_desc),Y=(function(ee){var D;for(_(ee,ee.dyn_ltree,ee.l_desc.max_code),_(ee,ee.dyn_dtree,ee.d_desc.max_code),ze(ee,ee.bl_desc),D=b-1;3<=D&&ee.bl_tree[2*O[D]+1]===0;D--);return ee.opt_len+=3*(D+1)+5+5+4,D})(P),V=P.opt_len+3+7>>>3,(oe=P.static_len+3+7>>>3)<=V&&(V=oe)):V=oe=Z+5,Z+4<=V&&q!==-1?R(P,q,Z,J):P.strategy===4||oe===V?(se(P,2+(J?1:0),3),ke(P,$,E)):(se(P,4+(J?1:0),3),(function(ee,D,X,ae){var ge;for(se(ee,D-257,5),se(ee,X-1,5),se(ee,ae-4,4),ge=0;ge<ae;ge++)se(ee,ee.bl_tree[2*O[ge]+1],3);te(ee,ee.dyn_ltree,D-1),te(ee,ee.dyn_dtree,X-1)})(P,P.l_desc.max_code+1,P.d_desc.max_code+1,Y+1),ke(P,P.dyn_ltree,P.dyn_dtree)),de(P),J&&pe(P)},o._tr_tally=function(P,q,Z){return P.pending_buf[P.d_buf+2*P.last_lit]=q>>>8&255,P.pending_buf[P.d_buf+2*P.last_lit+1]=255&q,P.pending_buf[P.l_buf+P.last_lit]=255&Z,P.last_lit++,q===0?P.dyn_ltree[2*Z]++:(P.matches++,q--,P.dyn_ltree[2*(w[Z]+f+1)]++,P.dyn_dtree[2*K(q)]++),P.last_lit===P.lit_bufsize-1},o._tr_align=function(P){se(P,2,3),re(P,k,$),(function(q){q.bi_valid===16?(z(q,q.bi_buf),q.bi_buf=0,q.bi_valid=0):8<=q.bi_valid&&(q.pending_buf[q.pending++]=255&q.bi_buf,q.bi_buf>>=8,q.bi_valid-=8)})(P)}},{"../utils/common":41}],53:[function(n,r,o){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,o){(function(s){(function(i,l){if(!i.setImmediate){var c,u,d,f,h=1,p={},b=!1,m=i.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(i);g=g&&g.setTimeout?g:i,c={}.toString.call(i.process)==="[object process]"?function(S){process.nextTick(function(){v(S)})}:(function(){if(i.postMessage&&!i.importScripts){var S=!0,C=i.onmessage;return i.onmessage=function(){S=!1},i.postMessage("","*"),i.onmessage=C,S}})()?(f="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",k,!1):i.attachEvent("onmessage",k),function(S){i.postMessage(f+S,"*")}):i.MessageChannel?((d=new MessageChannel).port1.onmessage=function(S){v(S.data)},function(S){d.port2.postMessage(S)}):m&&"onreadystatechange"in m.createElement("script")?(u=m.documentElement,function(S){var C=m.createElement("script");C.onreadystatechange=function(){v(S),C.onreadystatechange=null,u.removeChild(C),C=null},u.appendChild(C)}):function(S){setTimeout(v,0,S)},g.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var C=new Array(arguments.length-1),j=0;j<C.length;j++)C[j]=arguments[j+1];var N={callback:S,args:C};return p[h]=N,c(h),h++},g.clearImmediate=y}function y(S){delete p[S]}function v(S){if(b)setTimeout(v,0,S);else{var C=p[S];if(C){b=!0;try{(function(j){var N=j.callback,T=j.args;switch(T.length){case 0:N();break;case 1:N(T[0]);break;case 2:N(T[0],T[1]);break;case 3:N(T[0],T[1],T[2]);break;default:N.apply(l,T)}})(C)}finally{y(S),b=!1}}}}function k(S){S.source===i&&typeof S.data=="string"&&S.data.indexOf(f)===0&&v(+S.data.slice(f.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof Yr<"u"?Yr:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Rs)),Rs.exports}var n2=t2();const r2=da(n2),yf="[REDACTED]",o2=/(^|[-_])(api[-_]?key|authorization|cookie|token|secret|password|access[-_]?token|refresh[-_]?token)([-_]|$)/i,s2=[/Bearer\s+[A-Za-z0-9._~+/=-]{12,}/gi,/\bsk-[A-Za-z0-9_-]{12,}\b/g,/\bsk-ant-[A-Za-z0-9_-]{12,}\b/g,/\bghp_[A-Za-z0-9_]{12,}\b/g,/\bglpat-[A-Za-z0-9_-]{12,}\b/g],Ql=200,i2=25e6,ec=50;function a2(e){return e<1024?`${e} chars`:e<1024*1024?`${Math.ceil(e/1024)} KB`:`${Math.ceil(e/(1024*1024))} MB`}function l2(e){let t=0;for(const n of e)t+=n.rawRequestBody?.length??0,t+=n.responseText?.length??0;return t}function c2(e){if(e.length>Ql)return`Export is limited to ${Ql} logs at once. Narrow the filter and try again.`;const t=l2(e);return t>i2?`Export is too large (${a2(t)} of text). Narrow the filter and try again.`:null}async function u2(e){try{const t=await fetch(`/api/logs/${e}/chunks`);if(!t.ok)return null;const n=await t.json();return JSON.stringify(n,null,2)}catch{return null}}function d2(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ci(e){if(Array.isArray(e))return e.map(n=>Ci(n));if(!d2(e))return e;const t={};for(const[n,r]of Object.entries(e))t[n]=o2.test(n)?yf:Ci(r);return t}function f2(e){const t=n=>{let r=n;for(const o of s2)r=r.replace(o,yf);return r};try{const n=JSON.parse(e);return t(JSON.stringify(Ci(n),null,2))}catch{return t(e)}}function Os(e,t){return t==="redacted"?f2(e):e}async function p2(e,t="redacted"){const n=c2(e);if(n!==null)return{ok:!1,message:n};const r=new r2,o=t==="redacted"?"redacted":"raw",s=e.filter(u=>u.streaming).slice(0,ec);r.file("manifest.json",JSON.stringify({exportedAt:new Date().toISOString(),mode:t,redacted:t==="redacted",logCount:e.length,logIds:e.map(u=>u.id),streamingChunkExportLimit:ec,streamingChunkLogIds:s.map(u=>u.id)},null,2));for(const u of e)u.rawRequestBody!==null&&r.file(`#${u.id}.Request.json`,Os(u.rawRequestBody,t)),u.responseText!==null&&r.file(`#${u.id}.Response.json`,Os(u.responseText,t));for(const u of s){const d=await u2(u.id);d!==null&&r.file(`#${u.id}.SSE.Response.json`,Os(d,t))}const i=await r.generateAsync({type:"blob"}),l=URL.createObjectURL(i),c=document.createElement("a");return c.href=l,c.download=`agent-inspector-export-${o}-${new Date().toISOString().slice(0,10)}.zip`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(l),{ok:!0}}function ji(e,t){switch(t){case"full":return e;case"time":return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}}function Ea(e,t,n){return`${ji(e,n)} - ${ji(t,n)}`}function bf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=bf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function vf(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=bf(e))&&(r&&(r+=" "),r+=t);return r}const h2=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},m2=(e,t)=>({classGroupId:e,validator:t}),wf=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Po="-",tc=[],g2="arbitrary..",x2=e=>{const t=b2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return y2(i);const l=i.split(Po),c=l[0]===""&&l.length>1?1:0;return kf(l,c,t)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=r[i],u=n[i];return c?u?h2(u,c):c:u||tc}return n[i]||tc}}},kf=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const u=kf(e,t+1,s);if(u)return u}const i=n.validators;if(i===null)return;const l=t===0?e.join(Po):e.slice(t).join(Po),c=i.length;for(let u=0;u<c;u++){const d=i[u];if(d.validator(l))return d.classGroupId}},y2=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?g2+r:void 0})(),b2=e=>{const{theme:t,classGroups:n}=e;return v2(n,t)},v2=(e,t)=>{const n=wf();for(const r in e){const o=e[r];Na(o,n,r,t)}return n},Na=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];w2(i,t,n,r)}},w2=(e,t,n,r)=>{if(typeof e=="string"){k2(e,t,n);return}if(typeof e=="function"){_2(e,t,n,r);return}S2(e,t,n,r)},k2=(e,t,n)=>{const r=e===""?t:_f(t,e);r.classGroupId=n},_2=(e,t,n,r)=>{if(C2(e)){Na(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(m2(n,e))},S2=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[l,c]=o[i];Na(c,_f(t,l),n,r)}},_f=(e,t)=>{let n=e;const r=t.split(Po),o=r.length;for(let s=0;s<o;s++){const i=r[s];let l=n.nextPart.get(i);l||(l=wf(),n.nextPart.set(i,l)),n=l}return n},C2=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,j2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return o(s,i),i},set(s,i){s in n?n[s]=i:o(s,i)}}},Ei="!",nc=":",E2=[],rc=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),N2=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,l=0,c=0,u;const d=o.length;for(let m=0;m<d;m++){const g=o[m];if(i===0&&l===0){if(g===nc){s.push(o.slice(c,m)),c=m+1;continue}if(g==="/"){u=m;continue}}g==="["?i++:g==="]"?i--:g==="("?l++:g===")"&&l--}const f=s.length===0?o:o.slice(c);let h=f,p=!1;f.endsWith(Ei)?(h=f.slice(0,-1),p=!0):f.startsWith(Ei)&&(h=f.slice(1),p=!0);const b=u&&u>c?u-c:void 0;return rc(s,p,h,b)};if(t){const o=t+nc,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):rc(E2,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},T2=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const i=n[s],l=i[0]==="[",c=t.has(i);l||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},A2=e=>({cache:j2(e.cacheSize),parseClassName:N2(e),sortModifiers:T2(e),...x2(e)}),I2=/\s+/,z2=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],l=e.trim().split(I2);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:h,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:m}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let g=!!m,y=r(g?b.substring(0,m):b);if(!y){if(!g){c=d+(c.length>0?" "+c:c);continue}if(y=r(b),!y){c=d+(c.length>0?" "+c:c);continue}g=!1}const v=h.length===0?"":h.length===1?h[0]:s(h).join(":"),k=p?v+Ei:v,S=k+y;if(i.indexOf(S)>-1)continue;i.push(S);const C=o(y,g);for(let j=0;j<C.length;++j){const N=C[j];i.push(k+N)}c=d+(c.length>0?" "+c:c)}return c},P2=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Sf(n))&&(o&&(o+=" "),o+=r);return o},Sf=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Sf(e[r]))&&(n&&(n+=" "),n+=t);return n},R2=(e,...t)=>{let n,r,o,s;const i=c=>{const u=t.reduce((d,f)=>f(d),e());return n=A2(u),r=n.cache.get,o=n.cache.set,s=l,l(c)},l=c=>{const u=r(c);if(u)return u;const d=z2(c,n);return o(c,d),d};return s=i,(...c)=>s(P2(...c))},O2=[],Qe=e=>{const t=n=>n[e]||O2;return t.isThemeGetter=!0,t},Cf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,M2=/^\d+\/\d+$/,L2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,D2=/\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$/,F2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,B2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pn=e=>M2.test(e),Ae=e=>!!e&&!Number.isNaN(Number(e)),nn=e=>!!e&&Number.isInteger(Number(e)),Ms=e=>e.endsWith("%")&&Ae(e.slice(0,-1)),Kt=e=>L2.test(e),U2=()=>!0,W2=e=>D2.test(e)&&!F2.test(e),Ef=()=>!1,V2=e=>$2.test(e),H2=e=>B2.test(e),Z2=e=>!ye(e)&&!be(e),q2=e=>sr(e,Af,Ef),ye=e=>Cf.test(e),yn=e=>sr(e,If,W2),Ls=e=>sr(e,X2,Ae),oc=e=>sr(e,Nf,Ef),K2=e=>sr(e,Tf,H2),ro=e=>sr(e,zf,V2),be=e=>jf.test(e),hr=e=>ir(e,If),J2=e=>ir(e,Q2),sc=e=>ir(e,Nf),G2=e=>ir(e,Af),Y2=e=>ir(e,Tf),oo=e=>ir(e,zf,!0),sr=(e,t,n)=>{const r=Cf.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ir=(e,t,n=!1)=>{const r=jf.exec(e);return r?r[1]?t(r[1]):n:!1},Nf=e=>e==="position"||e==="percentage",Tf=e=>e==="image"||e==="url",Af=e=>e==="length"||e==="size"||e==="bg-size",If=e=>e==="length",X2=e=>e==="number",Q2=e=>e==="family-name",zf=e=>e==="shadow",ek=()=>{const e=Qe("color"),t=Qe("font"),n=Qe("text"),r=Qe("font-weight"),o=Qe("tracking"),s=Qe("leading"),i=Qe("breakpoint"),l=Qe("container"),c=Qe("spacing"),u=Qe("radius"),d=Qe("shadow"),f=Qe("inset-shadow"),h=Qe("text-shadow"),p=Qe("drop-shadow"),b=Qe("blur"),m=Qe("perspective"),g=Qe("aspect"),y=Qe("ease"),v=Qe("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),be,ye],j=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],T=()=>[be,ye,c],A=()=>[Pn,"full","auto",...T()],O=()=>[nn,"none","subgrid",be,ye],$=()=>["auto",{span:["full",nn,be,ye]},nn,be,ye],E=()=>[nn,"auto",be,ye],L=()=>["auto","min","max","fr",be,ye],w=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],M=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...T()],F=()=>[Pn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],B=()=>[e,be,ye],G=()=>[...S(),sc,oc,{position:[be,ye]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",G2,q2,{size:[be,ye]}],K=()=>[Ms,hr,yn],z=()=>["","none","full",u,be,ye],se=()=>["",Ae,hr,yn],re=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[Ae,Ms,sc,oc],de=()=>["","none",b,be,ye],pe=()=>["none",Ae,be,ye],he=()=>["none",Ae,be,ye],me=()=>[Ae,be,ye],ke=()=>[Pn,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Kt],breakpoint:[Kt],color:[U2],container:[Kt],"drop-shadow":[Kt],ease:["in","out","in-out"],font:[Z2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Kt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Kt],shadow:[Kt],spacing:["px",Ae],text:[Kt],"text-shadow":[Kt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pn,ye,be,g]}],container:["container"],columns:[{columns:[Ae,ye,be,l]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[nn,"auto",be,ye]}],basis:[{basis:[Pn,"full","auto",l,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,Pn,"auto","initial","none",ye]}],grow:[{grow:["",Ae,be,ye]}],shrink:[{shrink:["",Ae,be,ye]}],order:[{order:[nn,"first","last","none",be,ye]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...w(),"normal"]}],"justify-items":[{"justify-items":[...M(),"normal"]}],"justify-self":[{"justify-self":["auto",...M()]}],"align-content":[{content:["normal",...w()]}],"align-items":[{items:[...M(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...M(),{baseline:["","last"]}]}],"place-content":[{"place-content":w()}],"place-items":[{"place-items":[...M(),"baseline"]}],"place-self":[{"place-self":["auto",...M()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[l,"screen",...F()]}],"min-w":[{"min-w":[l,"screen","none",...F()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,hr,yn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,be,Ls]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ms,ye]}],"font-family":[{font:[J2,ye,t]}],"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:[o,be,ye]}],"line-clamp":[{"line-clamp":[Ae,"none",be,Ls]}],leading:[{leading:[s,...T()]}],"list-image":[{"list-image":["none",be,ye]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ye]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",be,yn]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[Ae,"auto",be,ye]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be,ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},nn,be,ye],radial:["",be,ye],conic:[nn,be,ye]},Y2,K2]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,be,ye]}],"outline-w":[{outline:["",Ae,hr,yn]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",d,oo,ro]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",f,oo,ro]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[Ae,yn]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",h,oo,ro]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[Ae,be,ye]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[be,ye]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ye]}],filter:[{filter:["","none",be,ye]}],blur:[{blur:de()}],brightness:[{brightness:[Ae,be,ye]}],contrast:[{contrast:[Ae,be,ye]}],"drop-shadow":[{"drop-shadow":["","none",p,oo,ro]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",Ae,be,ye]}],"hue-rotate":[{"hue-rotate":[Ae,be,ye]}],invert:[{invert:["",Ae,be,ye]}],saturate:[{saturate:[Ae,be,ye]}],sepia:[{sepia:["",Ae,be,ye]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ye]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,be,ye]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,be,ye]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,be,ye]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,be,ye]}],"backdrop-invert":[{"backdrop-invert":["",Ae,be,ye]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,be,ye]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,be,ye]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,be,ye]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ye]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",be,ye]}],ease:[{ease:["linear","initial",y,be,ye]}],delay:[{delay:[Ae,be,ye]}],animate:[{animate:["none",v,be,ye]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,be,ye]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:me()}],"skew-x":[{"skew-x":me()}],"skew-y":[{"skew-y":me()}],transform:[{transform:[be,ye,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",be,ye]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",be,ye]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[Ae,hr,yn,Ls]}],stroke:[{stroke:["none",...B()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},tk=R2(ek);function ve(...e){return tk(vf(e))}function Ve(e){return e>=1e6?(e/1e6).toFixed(1).replace(/\.0$/,"")+"M":(e/1e3).toFixed(1).replace(/\.0$/,"")+"K"}function Pf(e){return e>=1024*1024?(e/(1024*1024)).toFixed(1).replace(/\.0$/,"")+"M":(e/1024).toFixed(1).replace(/\.0$/,"")+"K"}function ic(e,t,n){const r=e*10;return!Number.isSafeInteger(r)||r%t!==0?null:(r/t/10).toFixed(1).replace(/\.0$/,"")+n}function nk(e){if(!Number.isSafeInteger(e)||e<=0)return e.toString();if(e>=1024*1024){const n=ic(e,1048576,"M");if(n!==null)return n}const t=ic(e,1024,"K");return t!==null?t:e.toString()}function rk(e){if(e===void 0||e==="")return 1;switch(e.toLowerCase()){case"k":return 1024;case"m":return 1024*1024;default:return null}}function Ro(e){const t=e.trim().replaceAll(",","");if(t==="")return null;const n=/^(\d+(?:\.\d+)?)\s*([kKmM])?$/.exec(t);if(n===null)return null;const r=n[1];if(r===void 0)return null;const o=Number(r),s=n[2],i=rk(s);if(!Number.isFinite(o)||o<=0||i===null||(s===void 0||s==="")&&!Number.isInteger(o))return null;const l=Math.round(o*i);return!Number.isSafeInteger(l)||l<=0?null:l}function ok(e){return e===null?"pending":e>=200&&e<300?"success":e>=400&&e<500?"client_error":e>=500?"server_error":"pending"}const sk=le({model:W().min(1),contextWindow:fe().int().positive().optional(),outputLimit:fe().int().positive().optional(),source:Xe(["manual","registry"]).optional(),sourceUrl:W().optional(),updatedAt:W().optional()}),Oo=le({id:W(),name:W(),apiKey:W(),model:W().optional(),models:Ce(W()).min(1),format:Xe(["anthropic","openai"]).optional(),baseUrl:W().optional(),anthropicBaseUrl:W().optional(),openaiBaseUrl:W().optional(),authHeader:Xe(["bearer","x-api-key"]).optional().default("bearer"),apiDocsUrl:W().optional(),modelMetadataUrl:W().optional(),modelMetadata:Ce(sk).optional(),source:Xe(["company","personal"]).optional(),createdAt:W(),updatedAt:W()});async function ik(e){return Ur(e,Oo.array(),void 0,t=>`Failed to fetch ${e}: ${t.status}`)}function Rf(){const e=ua("/api/providers?includeSecrets=1",ik,{revalidateOnFocus:!1,revalidateIfStale:!1});return{providers:e.data??[],isLoading:e.isLoading,isError:e.error,mutate:e.mutate}}const ak="2.0.29",lk={version:ak},ac=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,lc=vf,Ta=(e,t)=>n=>{var r;if(t?.variants==null)return lc(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const d=n?.[u],f=s?.[u];if(d===null)return null;const h=ac(d)||ac(f);return o[u][h]}),l=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(b=>{let[m,g]=b;return Array.isArray(g)?g.includes({...s,...l}[m]):{...s,...l}[m]===g})?[...u,f,h]:u},[]);return lc(e,i,c,n?.class,n?.className)};function cc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Of(...e){return t=>{let n=!1;const r=e.map(o=>{const s=cc(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():cc(e[o],null)}}}}function Le(...e){return x.useCallback(Of(...e),e)}function er(e){const t=uk(e),n=x.forwardRef((r,o)=>{const{children:s,...i}=r,l=x.Children.toArray(s),c=l.find(fk);if(c){const u=c.props.children,d=l.map(f=>f===c?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:f);return a.jsx(t,{...i,ref:o,children:x.isValidElement(u)?x.cloneElement(u,void 0,d):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var ck=er("Slot");function uk(e){const t=x.forwardRef((n,r)=>{const{children:o,...s}=n;if(x.isValidElement(o)){const i=hk(o),l=pk(s,o.props);return o.type!==x.Fragment&&(l.ref=r?Of(r,i):i),x.cloneElement(o,l)}return x.Children.count(o)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Mf=Symbol("radix.slottable");function dk(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Mf,t}function fk(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Mf}function pk(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function hk(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Te=mk.reduce((e,t)=>{const n=er(`Primitive.${t}`),r=x.forwardRef((o,s)=>{const{asChild:i,...l}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function gk(e,t){e&&Br.flushSync(()=>e.dispatchEvent(t))}var Lf=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),xk="VisuallyHidden",Df=x.forwardRef((e,t)=>a.jsx(Te.span,{...e,ref:t,style:{...Lf,...e.style}}));Df.displayName=xk;var yk=Df;function bk(e,t){const n=x.createContext(t),r=s=>{const{children:i,...l}=s,c=x.useMemo(()=>l,Object.values(l));return a.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=x.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function tn(e,t=[]){let n=[];function r(s,i){const l=x.createContext(i),c=n.length;n=[...n,i];const u=f=>{const{scope:h,children:p,...b}=f,m=h?.[e]?.[c]||l,g=x.useMemo(()=>b,Object.values(b));return a.jsx(m.Provider,{value:g,children:p})};u.displayName=s+"Provider";function d(f,h){const p=h?.[e]?.[c]||l,b=x.useContext(p);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(i=>x.createContext(i));return function(l){const c=l?.[e]||s;return x.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,vk(o,...t)]}function vk(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ff(e){const t=e+"CollectionProvider",[n,r]=tn(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:g,children:y}=m,v=lt.useRef(null),k=lt.useRef(new Map).current;return a.jsx(o,{scope:g,itemMap:k,collectionRef:v,children:y})};i.displayName=t;const l=e+"CollectionSlot",c=er(l),u=lt.forwardRef((m,g)=>{const{scope:y,children:v}=m,k=s(l,y),S=Le(g,k.collectionRef);return a.jsx(c,{ref:S,children:v})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=er(d),p=lt.forwardRef((m,g)=>{const{scope:y,children:v,...k}=m,S=lt.useRef(null),C=Le(g,S),j=s(d,y);return lt.useEffect(()=>(j.itemMap.set(S,{ref:S,...k}),()=>{j.itemMap.delete(S)})),a.jsx(h,{[f]:"",ref:C,children:v})});p.displayName=d;function b(m){const g=s(e+"CollectionConsumer",m);return lt.useCallback(()=>{const v=g.collectionRef.current;if(!v)return[];const k=Array.from(v.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((j,N)=>k.indexOf(j.ref.current)-k.indexOf(N.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:u,ItemSlot:p},b,r]}function _e(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var tt=globalThis?.document?x.useLayoutEffect:()=>{},wk=gd[" useInsertionEffect ".trim().toString()]||tt;function _n({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=kk({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o;{const d=x.useRef(e!==void 0);x.useEffect(()=>{const f=d.current;f!==l&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${l?"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.`),d.current=l},[l,r])}const u=x.useCallback(d=>{if(l){const f=_k(d)?d(e):d;f!==e&&i.current?.(f)}else s(d)},[l,e,s,i]);return[c,u]}function kk({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),o=x.useRef(n),s=x.useRef(t);return wk(()=>{s.current=t},[t]),x.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function _k(e){return typeof e=="function"}function Sk(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var vt=e=>{const{present:t,children:n}=e,r=Ck(t),o=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),s=Le(r.ref,jk(o));return typeof n=="function"||r.isPresent?x.cloneElement(o,{ref:s}):null};vt.displayName="Presence";function Ck(e){const[t,n]=x.useState(),r=x.useRef(null),o=x.useRef(e),s=x.useRef("none"),i=e?"mounted":"unmounted",[l,c]=Sk(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=so(r.current);s.current=l==="mounted"?u:"none"},[l]),tt(()=>{const u=r.current,d=o.current;if(d!==e){const h=s.current,p=so(u);e?c("MOUNT"):p==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),tt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const m=so(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(c("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=p=>{p.target===t&&(s.current=so(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:x.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function so(e){return e?.animationName||"none"}function jk(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ek=gd[" useId ".trim().toString()]||(()=>{}),Nk=0;function Dt(e){const[t,n]=x.useState(Ek());return tt(()=>{n(r=>r??String(Nk++))},[e]),e||(t?`radix-${t}`:"")}var as="Collapsible",[Tk]=tn(as),[Ak,Aa]=Tk(as),$f=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...l}=e,[c,u]=_n({prop:r,defaultProp:o??!1,onChange:i,caller:as});return a.jsx(Ak,{scope:n,disabled:s,contentId:Dt(),open:c,onOpenToggle:x.useCallback(()=>u(d=>!d),[u]),children:a.jsx(Te.div,{"data-state":za(c),"data-disabled":s?"":void 0,...l,ref:t})})});$f.displayName=as;var Bf="CollapsibleTrigger",Uf=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Aa(Bf,n);return a.jsx(Te.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":za(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:_e(e.onClick,o.onOpenToggle)})});Uf.displayName=Bf;var Ia="CollapsibleContent",Wf=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Aa(Ia,e.__scopeCollapsible);return a.jsx(vt,{present:n||o.open,children:({present:s})=>a.jsx(Ik,{...r,ref:t,present:s})})});Wf.displayName=Ia;var Ik=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,i=Aa(Ia,n),[l,c]=x.useState(r),u=x.useRef(null),d=Le(t,u),f=x.useRef(0),h=f.current,p=x.useRef(0),b=p.current,m=i.open||l,g=x.useRef(m),y=x.useRef(void 0);return x.useEffect(()=>{const v=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(v)},[]),tt(()=>{const v=u.current;if(v){y.current=y.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const k=v.getBoundingClientRect();f.current=k.height,p.current=k.width,g.current||(v.style.transitionDuration=y.current.transitionDuration,v.style.animationName=y.current.animationName),c(r)}},[i.open,r]),a.jsx(Te.div,{"data-state":za(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...s,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:m&&o})});function za(e){return e?"open":"closed"}var zk=$f,Pk=x.createContext(void 0);function ls(e){const t=x.useContext(Pk);return e||t||"ltr"}function st(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>t.current?.(...n),[])}function Rk(e,t=globalThis?.document){const n=st(e);x.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ok="DismissableLayer",Ni="dismissableLayer.update",Mk="dismissableLayer.pointerDownOutside",Lk="dismissableLayer.focusOutside",uc,Vf=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cs=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...c}=e,u=x.useContext(Vf),[d,f]=x.useState(null),h=d?.ownerDocument??globalThis?.document,[,p]=x.useState({}),b=Le(t,N=>f(N)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),v=d?m.indexOf(d):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,S=v>=y,C=$k(N=>{const T=N.target,A=[...u.branches].some(O=>O.contains(T));!S||A||(o?.(N),i?.(N),N.defaultPrevented||l?.())},h),j=Bk(N=>{const T=N.target;[...u.branches].some(O=>O.contains(T))||(s?.(N),i?.(N),N.defaultPrevented||l?.())},h);return Rk(N=>{v===u.layers.size-1&&(r?.(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},h),x.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(uc=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),dc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=uc)}},[d,h,n,u]),x.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),dc())},[d,u]),x.useEffect(()=>{const N=()=>p({});return document.addEventListener(Ni,N),()=>document.removeEventListener(Ni,N)},[]),a.jsx(Te.div,{...c,ref:b,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:_e(e.onFocusCapture,j.onFocusCapture),onBlurCapture:_e(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:_e(e.onPointerDownCapture,C.onPointerDownCapture)})});cs.displayName=Ok;var Dk="DismissableLayerBranch",Fk=x.forwardRef((e,t)=>{const n=x.useContext(Vf),r=x.useRef(null),o=Le(t,r);return x.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),a.jsx(Te.div,{...e,ref:o})});Fk.displayName=Dk;function $k(e,t=globalThis?.document){const n=st(e),r=x.useRef(!1),o=x.useRef(()=>{});return x.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let c=function(){Hf(Mk,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Bk(e,t=globalThis?.document){const n=st(e),r=x.useRef(!1);return x.useEffect(()=>{const o=s=>{s.target&&!r.current&&Hf(Lk,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function dc(){const e=new CustomEvent(Ni);document.dispatchEvent(e)}function Hf(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?gk(o,s):o.dispatchEvent(s)}var Ds="focusScope.autoFocusOnMount",Fs="focusScope.autoFocusOnUnmount",fc={bubbles:!1,cancelable:!0},Uk="FocusScope",Pa=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[l,c]=x.useState(null),u=st(o),d=st(s),f=x.useRef(null),h=Le(t,m=>c(m)),p=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let m=function(k){if(p.paused||!l)return;const S=k.target;l.contains(S)?f.current=S:sn(f.current,{select:!0})},g=function(k){if(p.paused||!l)return;const S=k.relatedTarget;S!==null&&(l.contains(S)||sn(f.current,{select:!0}))},y=function(k){if(document.activeElement===document.body)for(const C of k)C.removedNodes.length>0&&sn(l)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const v=new MutationObserver(y);return l&&v.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),v.disconnect()}}},[r,l,p.paused]),x.useEffect(()=>{if(l){hc.add(p);const m=document.activeElement;if(!l.contains(m)){const y=new CustomEvent(Ds,fc);l.addEventListener(Ds,u),l.dispatchEvent(y),y.defaultPrevented||(Wk(Kk(Zf(l)),{select:!0}),document.activeElement===m&&sn(l))}return()=>{l.removeEventListener(Ds,u),setTimeout(()=>{const y=new CustomEvent(Fs,fc);l.addEventListener(Fs,d),l.dispatchEvent(y),y.defaultPrevented||sn(m??document.body,{select:!0}),l.removeEventListener(Fs,d),hc.remove(p)},0)}}},[l,u,d,p]);const b=x.useCallback(m=>{if(!n&&!r||p.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){const v=m.currentTarget,[k,S]=Vk(v);k&&S?!m.shiftKey&&y===S?(m.preventDefault(),n&&sn(k,{select:!0})):m.shiftKey&&y===k&&(m.preventDefault(),n&&sn(S,{select:!0})):y===v&&m.preventDefault()}},[n,r,p.paused]);return a.jsx(Te.div,{tabIndex:-1,...i,ref:h,onKeyDown:b})});Pa.displayName=Uk;function Wk(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(sn(r,{select:t}),document.activeElement!==n)return}function Vk(e){const t=Zf(e),n=pc(t,e),r=pc(t.reverse(),e);return[n,r]}function Zf(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pc(e,t){for(const n of e)if(!Hk(n,{upTo:t}))return n}function Hk(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Zk(e){return e instanceof HTMLInputElement&&"select"in e}function sn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Zk(e)&&t&&e.select()}}var hc=qk();function qk(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=mc(e,t),e.unshift(t)},remove(t){e=mc(e,t),e[0]?.resume()}}}function mc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Kk(e){return e.filter(t=>t.tagName!=="A")}var Jk="Portal",us=x.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=x.useState(!1);tt(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Ag.createPortal(a.jsx(Te.div,{...r,ref:t}),i):null});us.displayName=Jk;var $s=0;function qf(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??gc()),document.body.insertAdjacentElement("beforeend",e[1]??gc()),$s++,()=>{$s===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),$s--}},[])}function gc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ot=function(){return Ot=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ot.apply(this,arguments)};function Kf(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Gk(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var wo="right-scroll-bar-position",ko="width-before-scroll-bar",Yk="with-scroll-bars-hidden",Xk="--removed-body-scroll-bar-size";function Bs(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Qk(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var e_=typeof window<"u"?x.useLayoutEffect:x.useEffect,xc=new WeakMap;function t_(e,t){var n=Qk(null,function(r){return e.forEach(function(o){return Bs(o,r)})});return e_(function(){var r=xc.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(l){s.has(l)||Bs(l,null)}),s.forEach(function(l){o.has(l)||Bs(l,i)})}xc.set(n,e)},[e]),n}function n_(e){return e}function r_(e,t){t===void 0&&(t=n_);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(l){return l!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var l=n;n=[],l.forEach(s),i=n}var c=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function o_(e){e===void 0&&(e={});var t=r_(null);return t.options=Ot({async:!0,ssr:!1},e),t}var Jf=function(e){var t=e.sideCar,n=Kf(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,Ot({},n))};Jf.isSideCarExport=!0;function s_(e,t){return e.useMedium(t),Jf}var Gf=o_(),Us=function(){},ds=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:Us,onWheelCapture:Us,onTouchMoveCapture:Us}),o=r[0],s=r[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noRelative,b=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,k=e.gapMode,S=Kf(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,j=t_([n,t]),N=Ot(Ot({},S),o);return x.createElement(x.Fragment,null,d&&x.createElement(C,{sideCar:Gf,removeScrollBar:u,shards:f,noRelative:p,noIsolation:b,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:k}),i?x.cloneElement(x.Children.only(l),Ot(Ot({},N),{ref:j})):x.createElement(v,Ot({},N,{className:c,ref:j}),l))});ds.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ds.classNames={fullWidth:ko,zeroRight:wo};var i_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function a_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=i_();return t&&e.setAttribute("nonce",t),e}function l_(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function c_(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var u_=function(){var e=0,t=null;return{add:function(n){e==0&&(t=a_())&&(l_(t,n),c_(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},d_=function(){var e=u_();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Yf=function(){var e=d_(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},f_={left:0,top:0,right:0,gap:0},Ws=function(e){return parseInt(e||"",10)||0},p_=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ws(n),Ws(r),Ws(o)]},h_=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return f_;var t=p_(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},m_=Yf(),Zn="data-scroll-locked",g_=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
41
|
+
\0`,se+=s(H,2),se+=j.magic,se+=s(k,2),se+=s(S,2),se+=s(I.crc32,4),se+=s(I.compressedSize,4),se+=s(I.uncompressedSize,4),se+=s(T.length,2),se+=s(M.length,2),{fileRecord:f.LOCAL_FILE_HEADER+se+T+M,dirRecord:f.CENTRAL_FILE_HEADER+s(z,2)+se+s($.length,2)+"\0\0\0\0"+s(K,4)+s(g,4)+T+M+$}}var l=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),f=n("../signature");function h(p,b,m,g){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=b,this.zipPlatform=m,this.encodeFileName=g,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(h,c),h.prototype.push=function(p){var b=p.meta.percent||0,m=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,c.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:m?(b+100*(m-g-1))/m:100}}))},h.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var b=this.streamFiles&&!p.file.dir;if(b){var m=i(p,b,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:m.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(p){this.accumulate=!1;var b=this.streamFiles&&!p.file.dir,m=i(p,b,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(m.dirRecord),b)this.push({data:(function(g){return f.DATA_DESCRIPTOR+s(g.crc32,4)+s(g.compressedSize,4)+s(g.uncompressedSize,4)})(p),meta:{percent:100}});else for(this.push({data:m.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var p=this.bytesWritten,b=0;b<this.dirRecords.length;b++)this.push({data:this.dirRecords[b],meta:{percent:100}});var m=this.bytesWritten-p,g=(function(y,v,k,S,C){var j=l.transformTo("string",C(S));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(y,2)+s(y,2)+s(v,4)+s(k,4)+s(j.length,2)+j})(this.dirRecords.length,m,p,this.zipComment,this.encodeFileName);this.push({data:g,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(p){this._sources.push(p);var b=this;return p.on("data",function(m){b.processChunk(m)}),p.on("end",function(){b.closedSource(b.previous.streamInfo),b._sources.length?b.prepareNextSource():b.end()}),p.on("error",function(m){b.error(m)}),this},h.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(p){var b=this._sources;if(!c.prototype.error.call(this,p))return!1;for(var m=0;m<b.length;m++)try{b[m].error(p)}catch{}return!0},h.prototype.lock=function(){c.prototype.lock.call(this);for(var p=this._sources,b=0;b<p.length;b++)p[b].lock()},r.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,o){var s=n("../compressions"),i=n("./ZipFileWorker");o.generateWorker=function(l,c,u){var d=new i(c.streamFiles,u,c.platform,c.encodeFileName),f=0;try{l.forEach(function(h,p){f++;var b=(function(v,k){var S=v||k,C=s[S];if(!C)throw new Error(S+" is not a valid compression method !");return C})(p.options.compression,c.compression),m=p.options.compressionOptions||c.compressionOptions||{},g=p.dir,y=p.date;p._compressWorker(b,m).withStreamInfo("file",{name:h,dir:g,date:y,comment:p.comment||"",unixPermissions:p.unixPermissions,dosPermissions:p.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(h){d.error(h)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,o){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new s;for(var l in this)typeof this[l]!="function"&&(i[l]=this[l]);return i}}(s.prototype=n("./object")).loadAsync=n("./load"),s.support=n("./support"),s.defaults=n("./defaults"),s.version="3.10.1",s.loadAsync=function(i,l){return new s().loadAsync(i,l)},s.external=n("./external"),r.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,o){var s=n("./utils"),i=n("./external"),l=n("./utf8"),c=n("./zipEntries"),u=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function f(h){return new i.Promise(function(p,b){var m=h.decompressed.getContentWorker().pipe(new u);m.on("error",function(g){b(g)}).on("end",function(){m.streamInfo.crc32!==h.decompressed.crc32?b(new Error("Corrupted zip : CRC32 mismatch")):p()}).resume()})}r.exports=function(h,p){var b=this;return p=s.extend(p||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:l.utf8decode}),d.isNode&&d.isStream(h)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip file",h,!0,p.optimizedBinaryString,p.base64).then(function(m){var g=new c(p);return g.load(m),g}).then(function(m){var g=[i.Promise.resolve(m)],y=m.files;if(p.checkCRC32)for(var v=0;v<y.length;v++)g.push(f(y[v]));return i.Promise.all(g)}).then(function(m){for(var g=m.shift(),y=g.files,v=0;v<y.length;v++){var k=y[v],S=k.fileNameStr,C=s.resolve(k.fileNameStr);b.file(C,k.decompressed,{binary:!0,optimizedBinaryString:!0,date:k.date,dir:k.dir,comment:k.fileCommentStr.length?k.fileCommentStr:null,unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions,createFolders:p.createFolders}),k.dir||(b.file(C).unsafeOriginalName=S)}return g.zipComment.length&&(b.comment=g.zipComment),b})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,o){var s=n("../utils"),i=n("../stream/GenericWorker");function l(c,u){i.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}s.inherits(l,i),l.prototype._bindStream=function(c){var u=this;(this._stream=c).pause(),c.on("data",function(d){u.push({data:d,meta:{percent:0}})}).on("error",function(d){u.isPaused?this.generatedError=d:u.error(d)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},l.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},l.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=l},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,o){var s=n("readable-stream").Readable;function i(l,c,u){s.call(this,c),this._helper=l;var d=this;l.on("data",function(f,h){d.push(f)||d._helper.pause(),u&&u(h)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}n("../utils").inherits(i,s),i.prototype._read=function(){this._helper.resume()},r.exports=i},{"../utils":32,"readable-stream":16}],14:[function(n,r,o){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,i);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,i)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var i=new Buffer(s);return i.fill(0),i},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(n,r,o){function s(C,j,N){var T,A=l.getTypeOf(j),O=l.extend(N||{},d);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(C=y(C)),O.createFolders&&(T=g(C))&&v.call(this,T,!0);var $=A==="string"&&O.binary===!1&&O.base64===!1;N&&N.binary!==void 0||(O.binary=!$),(j instanceof f&&j.uncompressedSize===0||O.dir||!j||j.length===0)&&(O.base64=!1,O.binary=!0,j="",O.compression="STORE",A="string");var E=null;E=j instanceof f||j instanceof c?j:b.isNode&&b.isStream(j)?new m(C,j):l.prepareContent(C,j,O.binary,O.optimizedBinaryString,O.base64);var L=new h(C,E,O);this.files[C]=L}var i=n("./utf8"),l=n("./utils"),c=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),d=n("./defaults"),f=n("./compressedObject"),h=n("./zipObject"),p=n("./generate"),b=n("./nodejsUtils"),m=n("./nodejs/NodejsStreamInputAdapter"),g=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var j=C.lastIndexOf("/");return 0<j?C.substring(0,j):""},y=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},v=function(C,j){return j=j!==void 0?j:d.createFolders,C=y(C),this.files[C]||s.call(this,C,null,{dir:!0,createFolders:j}),this.files[C]};function k(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var j,N,T;for(j in this.files)T=this.files[j],(N=j.slice(this.root.length,j.length))&&j.slice(0,this.root.length)===this.root&&C(N,T)},filter:function(C){var j=[];return this.forEach(function(N,T){C(N,T)&&j.push(T)}),j},file:function(C,j,N){if(arguments.length!==1)return C=this.root+C,s.call(this,C,j,N),this;if(k(C)){var T=C;return this.filter(function(O,$){return!$.dir&&T.test(O)})}var A=this.files[this.root+C];return A&&!A.dir?A:null},folder:function(C){if(!C)return this;if(k(C))return this.filter(function(A,O){return O.dir&&C.test(A)});var j=this.root+C,N=v.call(this,j),T=this.clone();return T.root=N.name,T},remove:function(C){C=this.root+C;var j=this.files[C];if(j||(C.slice(-1)!=="/"&&(C+="/"),j=this.files[C]),j&&!j.dir)delete this.files[C];else for(var N=this.filter(function(A,O){return O.name.slice(0,C.length)===C}),T=0;T<N.length;T++)delete this.files[N[T].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var j,N={};try{if((N=l.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=N.type.toLowerCase(),N.compression=N.compression.toUpperCase(),N.type==="binarystring"&&(N.type="string"),!N.type)throw new Error("No output type specified.");l.checkSupport(N.type),N.platform!=="darwin"&&N.platform!=="freebsd"&&N.platform!=="linux"&&N.platform!=="sunos"||(N.platform="UNIX"),N.platform==="win32"&&(N.platform="DOS");var T=N.comment||this.comment||"";j=p.generateWorker(this,N,T)}catch(A){(j=new c("error")).error(A)}return new u(j,N.type||"string",N.mimeType)},generateAsync:function(C,j){return this.generateInternalStream(C).accumulate(j)},generateNodeStream:function(C,j){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(j)}};r.exports=S},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,o){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,o){var s=n("./DataReader");function i(l){s.call(this,l);for(var c=0;c<this.data.length;c++)l[c]=255&l[c]}n("../utils").inherits(i,s),i.prototype.byteAt=function(l){return this.data[this.zero+l]},i.prototype.lastIndexOfSignature=function(l){for(var c=l.charCodeAt(0),u=l.charCodeAt(1),d=l.charCodeAt(2),f=l.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===c&&this.data[h+1]===u&&this.data[h+2]===d&&this.data[h+3]===f)return h-this.zero;return-1},i.prototype.readAndCheckSignature=function(l){var c=l.charCodeAt(0),u=l.charCodeAt(1),d=l.charCodeAt(2),f=l.charCodeAt(3),h=this.readData(4);return c===h[0]&&u===h[1]&&d===h[2]&&f===h[3]},i.prototype.readData=function(l){if(this.checkOffset(l),l===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./DataReader":18}],18:[function(n,r,o){var s=n("../utils");function i(l){this.data=l,this.length=l.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(l){this.checkIndex(this.index+l)},checkIndex:function(l){if(this.length<this.zero+l||l<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+l+"). Corrupted zip ?")},setIndex:function(l){this.checkIndex(l),this.index=l},skip:function(l){this.setIndex(this.index+l)},byteAt:function(){},readInt:function(l){var c,u=0;for(this.checkOffset(l),c=this.index+l-1;c>=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=l,u},readString:function(l){return s.transformTo("string",this.readData(l))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},r.exports=i},{"../utils":32}],19:[function(n,r,o){var s=n("./Uint8ArrayReader");function i(l){s.call(this,l)}n("../utils").inherits(i,s),i.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,o){var s=n("./DataReader");function i(l){s.call(this,l)}n("../utils").inherits(i,s),i.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},i.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},i.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},i.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./DataReader":18}],21:[function(n,r,o){var s=n("./ArrayReader");function i(l){s.call(this,l)}n("../utils").inherits(i,s),i.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,o){var s=n("../utils"),i=n("../support"),l=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(f){var h=s.getTypeOf(f);return s.checkSupport(h),h!=="string"||i.uint8array?h==="nodebuffer"?new u(f):i.uint8array?new d(s.transformTo("uint8array",f)):new l(s.transformTo("array",f)):new c(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,o){o.LOCAL_FILE_HEADER="PK",o.CENTRAL_FILE_HEADER="PK",o.CENTRAL_DIRECTORY_END="PK",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,o){var s=n("./GenericWorker"),i=n("../utils");function l(c){s.call(this,"ConvertWorker to "+c),this.destType=c}i.inherits(l,s),l.prototype.processChunk=function(c){this.push({data:i.transformTo(this.destType,c.data),meta:c.meta})},r.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,o){var s=n("./GenericWorker"),i=n("../crc32");function l(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(l,s),l.prototype.processChunk=function(c){this.streamInfo.crc32=i(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,o){var s=n("../utils"),i=n("./GenericWorker");function l(c){i.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}s.inherits(l,i),l.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}i.prototype.processChunk.call(this,c)},r.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,o){var s=n("../utils"),i=n("./GenericWorker");function l(c){i.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=s.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}s.inherits(l,i),l.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,o){function s(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,l){return this._listeners[i].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,l){if(this._listeners[i])for(var c=0;c<this._listeners[i].length;c++)this._listeners[i][c].call(this,l)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var l=this;return i.on("data",function(c){l.processChunk(c)}),i.on("end",function(){l.end()}),i.on("error",function(c){l.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,l){return this.extraStreamInfo[i]=l,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},r.exports=s},{}],29:[function(n,r,o){var s=n("../utils"),i=n("./ConvertWorker"),l=n("./GenericWorker"),c=n("../base64"),u=n("../support"),d=n("../external"),f=null;if(u.nodestream)try{f=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(b,m){return new d.Promise(function(g,y){var v=[],k=b._internalType,S=b._outputType,C=b._mimeType;b.on("data",function(j,N){v.push(j),m&&m(N)}).on("error",function(j){v=[],y(j)}).on("end",function(){try{var j=(function(N,T,A){switch(N){case"blob":return s.newBlob(s.transformTo("arraybuffer",T),A);case"base64":return c.encode(T);default:return s.transformTo(N,T)}})(S,(function(N,T){var A,O=0,$=null,E=0;for(A=0;A<T.length;A++)E+=T[A].length;switch(N){case"string":return T.join("");case"array":return Array.prototype.concat.apply([],T);case"uint8array":for($=new Uint8Array(E),A=0;A<T.length;A++)$.set(T[A],O),O+=T[A].length;return $;case"nodebuffer":return Buffer.concat(T);default:throw new Error("concat : unsupported type '"+N+"'")}})(k,v),C);g(j)}catch(N){y(N)}v=[]}).resume()})}function p(b,m,g){var y=m;switch(m){case"blob":case"arraybuffer":y="uint8array";break;case"base64":y="string"}try{this._internalType=y,this._outputType=m,this._mimeType=g,s.checkSupport(y),this._worker=b.pipe(new i(y)),b.lock()}catch(v){this._worker=new l("error"),this._worker.error(v)}}p.prototype={accumulate:function(b){return h(this,b)},on:function(b,m){var g=this;return b==="data"?this._worker.on(b,function(y){m.call(g,y.data,y.meta)}):this._worker.on(b,function(){s.delay(m,arguments,g)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(b){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},b)}},r.exports=p},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,o){if(o.base64=!0,o.array=!0,o.string=!0,o.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o.nodebuffer=typeof Buffer<"u",o.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")o.blob=!1;else{var s=new ArrayBuffer(0);try{o.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(s),o.blob=i.getBlob("application/zip").size===0}catch{o.blob=!1}}}try{o.nodestream=!!n("readable-stream").Readable}catch{o.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,o){for(var s=n("./utils"),i=n("./support"),l=n("./nodejsUtils"),c=n("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function f(){c.call(this,"utf-8 decode"),this.leftOver=null}function h(){c.call(this,"utf-8 encode")}o.utf8encode=function(p){return i.nodebuffer?l.newBufferFrom(p,"utf-8"):(function(b){var m,g,y,v,k,S=b.length,C=0;for(v=0;v<S;v++)(64512&(g=b.charCodeAt(v)))==55296&&v+1<S&&(64512&(y=b.charCodeAt(v+1)))==56320&&(g=65536+(g-55296<<10)+(y-56320),v++),C+=g<128?1:g<2048?2:g<65536?3:4;for(m=i.uint8array?new Uint8Array(C):new Array(C),v=k=0;k<C;v++)(64512&(g=b.charCodeAt(v)))==55296&&v+1<S&&(64512&(y=b.charCodeAt(v+1)))==56320&&(g=65536+(g-55296<<10)+(y-56320),v++),g<128?m[k++]=g:(g<2048?m[k++]=192|g>>>6:(g<65536?m[k++]=224|g>>>12:(m[k++]=240|g>>>18,m[k++]=128|g>>>12&63),m[k++]=128|g>>>6&63),m[k++]=128|63&g);return m})(p)},o.utf8decode=function(p){return i.nodebuffer?s.transformTo("nodebuffer",p).toString("utf-8"):(function(b){var m,g,y,v,k=b.length,S=new Array(2*k);for(m=g=0;m<k;)if((y=b[m++])<128)S[g++]=y;else if(4<(v=u[y]))S[g++]=65533,m+=v-1;else{for(y&=v===2?31:v===3?15:7;1<v&&m<k;)y=y<<6|63&b[m++],v--;1<v?S[g++]=65533:y<65536?S[g++]=y:(y-=65536,S[g++]=55296|y>>10&1023,S[g++]=56320|1023&y)}return S.length!==g&&(S.subarray?S=S.subarray(0,g):S.length=g),s.applyFromCharCode(S)})(p=s.transformTo(i.uint8array?"uint8array":"array",p))},s.inherits(f,c),f.prototype.processChunk=function(p){var b=s.transformTo(i.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var m=b;(b=new Uint8Array(m.length+this.leftOver.length)).set(this.leftOver,0),b.set(m,this.leftOver.length)}else b=this.leftOver.concat(b);this.leftOver=null}var g=(function(v,k){var S;for((k=k||v.length)>v.length&&(k=v.length),S=k-1;0<=S&&(192&v[S])==128;)S--;return S<0||S===0?k:S+u[v[S]]>k?S:k})(b),y=b;g!==b.length&&(i.uint8array?(y=b.subarray(0,g),this.leftOver=b.subarray(g,b.length)):(y=b.slice(0,g),this.leftOver=b.slice(g,b.length))),this.push({data:o.utf8decode(y),meta:p.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=f,s.inherits(h,c),h.prototype.processChunk=function(p){this.push({data:o.utf8encode(p.data),meta:p.meta})},o.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,o){var s=n("./support"),i=n("./base64"),l=n("./nodejsUtils"),c=n("./external");function u(m){return m}function d(m,g){for(var y=0;y<m.length;++y)g[y]=255&m.charCodeAt(y);return g}n("setimmediate"),o.newBlob=function(m,g){o.checkSupport("blob");try{return new Blob([m],{type:g})}catch{try{var y=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return y.append(m),y.getBlob(g)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(m,g,y){var v=[],k=0,S=m.length;if(S<=y)return String.fromCharCode.apply(null,m);for(;k<S;)g==="array"||g==="nodebuffer"?v.push(String.fromCharCode.apply(null,m.slice(k,Math.min(k+y,S)))):v.push(String.fromCharCode.apply(null,m.subarray(k,Math.min(k+y,S)))),k+=y;return v.join("")},stringifyByChar:function(m){for(var g="",y=0;y<m.length;y++)g+=String.fromCharCode(m[y]);return g},applyCanBeUsed:{uint8array:(function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,l.allocBuffer(1)).length===1}catch{return!1}})()}};function h(m){var g=65536,y=o.getTypeOf(m),v=!0;if(y==="uint8array"?v=f.applyCanBeUsed.uint8array:y==="nodebuffer"&&(v=f.applyCanBeUsed.nodebuffer),v)for(;1<g;)try{return f.stringifyByChunk(m,y,g)}catch{g=Math.floor(g/2)}return f.stringifyByChar(m)}function p(m,g){for(var y=0;y<m.length;y++)g[y]=m[y];return g}o.applyFromCharCode=h;var b={};b.string={string:u,array:function(m){return d(m,new Array(m.length))},arraybuffer:function(m){return b.string.uint8array(m).buffer},uint8array:function(m){return d(m,new Uint8Array(m.length))},nodebuffer:function(m){return d(m,l.allocBuffer(m.length))}},b.array={string:h,array:u,arraybuffer:function(m){return new Uint8Array(m).buffer},uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return l.newBufferFrom(m)}},b.arraybuffer={string:function(m){return h(new Uint8Array(m))},array:function(m){return p(new Uint8Array(m),new Array(m.byteLength))},arraybuffer:u,uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return l.newBufferFrom(new Uint8Array(m))}},b.uint8array={string:h,array:function(m){return p(m,new Array(m.length))},arraybuffer:function(m){return m.buffer},uint8array:u,nodebuffer:function(m){return l.newBufferFrom(m)}},b.nodebuffer={string:h,array:function(m){return p(m,new Array(m.length))},arraybuffer:function(m){return b.nodebuffer.uint8array(m).buffer},uint8array:function(m){return p(m,new Uint8Array(m.length))},nodebuffer:u},o.transformTo=function(m,g){if(g=g||"",!m)return g;o.checkSupport(m);var y=o.getTypeOf(g);return b[y][m](g)},o.resolve=function(m){for(var g=m.split("/"),y=[],v=0;v<g.length;v++){var k=g[v];k==="."||k===""&&v!==0&&v!==g.length-1||(k===".."?y.pop():y.push(k))}return y.join("/")},o.getTypeOf=function(m){return typeof m=="string"?"string":Object.prototype.toString.call(m)==="[object Array]"?"array":s.nodebuffer&&l.isBuffer(m)?"nodebuffer":s.uint8array&&m instanceof Uint8Array?"uint8array":s.arraybuffer&&m instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(m){if(!s[m.toLowerCase()])throw new Error(m+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(m){var g,y,v="";for(y=0;y<(m||"").length;y++)v+="\\x"+((g=m.charCodeAt(y))<16?"0":"")+g.toString(16).toUpperCase();return v},o.delay=function(m,g,y){setImmediate(function(){m.apply(y||null,g||[])})},o.inherits=function(m,g){function y(){}y.prototype=g.prototype,m.prototype=new y},o.extend=function(){var m,g,y={};for(m=0;m<arguments.length;m++)for(g in arguments[m])Object.prototype.hasOwnProperty.call(arguments[m],g)&&y[g]===void 0&&(y[g]=arguments[m][g]);return y},o.prepareContent=function(m,g,y,v,k){return c.Promise.resolve(g).then(function(S){return s.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader<"u"?new c.Promise(function(C,j){var N=new FileReader;N.onload=function(T){C(T.target.result)},N.onerror=function(T){j(T.target.error)},N.readAsArrayBuffer(S)}):S}).then(function(S){var C=o.getTypeOf(S);return C?(C==="arraybuffer"?S=o.transformTo("uint8array",S):C==="string"&&(k?S=i.decode(S):y&&v!==!0&&(S=(function(j){return d(j,s.uint8array?new Uint8Array(j.length):new Array(j.length))})(S))),S):c.Promise.reject(new Error("Can't read the data of '"+m+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,o){var s=n("./reader/readerFor"),i=n("./utils"),l=n("./signature"),c=n("./zipEntry"),u=n("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(h)+", expected "+i.pretty(f)+")")}},isSignature:function(f,h){var p=this.reader.index;this.reader.setIndex(f);var b=this.reader.readString(4)===h;return this.reader.setIndex(p),b},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),h=u.uint8array?"uint8array":"array",p=i.transformTo(h,f);this.zipComment=this.loadOptions.decodeFileName(p)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,h,p,b=this.zip64EndOfCentralSize-44;0<b;)f=this.reader.readInt(2),h=this.reader.readInt(4),p=this.reader.readData(h),this.zip64ExtensibleData[f]={id:f,length:h,value:p}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,h;for(f=0;f<this.files.length;f++)h=this.files[f],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(l.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(l.CENTRAL_FILE_HEADER);)(f=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(l.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,l.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var h=f;if(this.checkSignature(l.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,l.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var p=this.centralDirOffset+this.centralDirSize;this.zip64&&(p+=20,p+=12+this.zip64EndOfCentralSize);var b=h-p;if(0<b)this.isSignature(h,l.CENTRAL_FILE_HEADER)||(this.reader.zero=b);else if(b<0)throw new Error("Corrupted zip: missing "+Math.abs(b)+" bytes.")},prepareReader:function(f){this.reader=s(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,o){var s=n("./reader/readerFor"),i=n("./utils"),l=n("./compressedObject"),c=n("./crc32"),u=n("./utf8"),d=n("./compressions"),f=n("./support");function h(p,b){this.options=p,this.loadOptions=b}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(p){var b,m;if(p.skip(22),this.fileNameLength=p.readInt(2),m=p.readInt(2),this.fileName=p.readData(this.fileNameLength),p.skip(m),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((b=(function(g){for(var y in d)if(Object.prototype.hasOwnProperty.call(d,y)&&d[y].magic===g)return d[y];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new l(this.compressedSize,this.uncompressedSize,this.crc32,b,p.readData(this.compressedSize))},readCentralPart:function(p){this.versionMadeBy=p.readInt(2),p.skip(2),this.bitFlag=p.readInt(2),this.compressionMethod=p.readString(2),this.date=p.readDate(),this.crc32=p.readInt(4),this.compressedSize=p.readInt(4),this.uncompressedSize=p.readInt(4);var b=p.readInt(2);if(this.extraFieldsLength=p.readInt(2),this.fileCommentLength=p.readInt(2),this.diskNumberStart=p.readInt(2),this.internalFileAttributes=p.readInt(2),this.externalFileAttributes=p.readInt(4),this.localHeaderOffset=p.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");p.skip(b),this.readExtraFields(p),this.parseZIP64ExtraField(p),this.fileComment=p.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var p=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=s(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var b,m,g,y=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4<y;)b=p.readInt(2),m=p.readInt(2),g=p.readData(m),this.extraFields[b]={id:b,length:m,value:g};p.setIndex(y)},handleUTF8:function(){var p=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var b=this.findExtraFieldUnicodePath();if(b!==null)this.fileNameStr=b;else{var m=i.transformTo(p,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(m)}var g=this.findExtraFieldUnicodeComment();if(g!==null)this.fileCommentStr=g;else{var y=i.transformTo(p,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(y)}}},findExtraFieldUnicodePath:function(){var p=this.extraFields[28789];if(p){var b=s(p.value);return b.readInt(1)!==1||c(this.fileName)!==b.readInt(4)?null:u.utf8decode(b.readData(p.length-5))}return null},findExtraFieldUnicodeComment:function(){var p=this.extraFields[25461];if(p){var b=s(p.value);return b.readInt(1)!==1||c(this.fileComment)!==b.readInt(4)?null:u.utf8decode(b.readData(p.length-5))}return null}},r.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,o){function s(b,m,g){this.name=b,this.dir=g.dir,this.date=g.date,this.comment=g.comment,this.unixPermissions=g.unixPermissions,this.dosPermissions=g.dosPermissions,this._data=m,this._dataBinary=g.binary,this.options={compression:g.compression,compressionOptions:g.compressionOptions}}var i=n("./stream/StreamHelper"),l=n("./stream/DataWorker"),c=n("./utf8"),u=n("./compressedObject"),d=n("./stream/GenericWorker");s.prototype={internalStream:function(b){var m=null,g="string";try{if(!b)throw new Error("No output type specified.");var y=(g=b.toLowerCase())==="string"||g==="text";g!=="binarystring"&&g!=="text"||(g="string"),m=this._decompressWorker();var v=!this._dataBinary;v&&!y&&(m=m.pipe(new c.Utf8EncodeWorker)),!v&&y&&(m=m.pipe(new c.Utf8DecodeWorker))}catch(k){(m=new d("error")).error(k)}return new i(m,g,"")},async:function(b,m){return this.internalStream(b).accumulate(m)},nodeStream:function(b,m){return this.internalStream(b||"nodebuffer").toNodejsStream(m)},_compressWorker:function(b,m){if(this._data instanceof u&&this._data.compression.magic===b.magic)return this._data.getCompressedWorker();var g=this._decompressWorker();return this._dataBinary||(g=g.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(g,b,m)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new l(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},p=0;p<f.length;p++)s.prototype[f[p]]=h;r.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,o){(function(s){var i,l,c=s.MutationObserver||s.WebKitMutationObserver;if(c){var u=0,d=new c(b),f=s.document.createTextNode("");d.observe(f,{characterData:!0}),i=function(){f.data=u=++u%2}}else if(s.setImmediate||s.MessageChannel===void 0)i="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var m=s.document.createElement("script");m.onreadystatechange=function(){b(),m.onreadystatechange=null,m.parentNode.removeChild(m),m=null},s.document.documentElement.appendChild(m)}:function(){setTimeout(b,0)};else{var h=new s.MessageChannel;h.port1.onmessage=b,i=function(){h.port2.postMessage(0)}}var p=[];function b(){var m,g;l=!0;for(var y=p.length;y;){for(g=p,p=[],m=-1;++m<y;)g[m]();y=p.length}l=!1}r.exports=function(m){p.push(m)!==1||l||i()}}).call(this,typeof Yr<"u"?Yr:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,o){var s=n("immediate");function i(){}var l={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function f(y){if(typeof y!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,y!==i&&m(this,y)}function h(y,v,k){this.promise=y,typeof v=="function"&&(this.onFulfilled=v,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function p(y,v,k){s(function(){var S;try{S=v(k)}catch(C){return l.reject(y,C)}S===y?l.reject(y,new TypeError("Cannot resolve promise with itself")):l.resolve(y,S)})}function b(y){var v=y&&y.then;if(y&&(typeof y=="object"||typeof y=="function")&&typeof v=="function")return function(){v.apply(y,arguments)}}function m(y,v){var k=!1;function S(N){k||(k=!0,l.reject(y,N))}function C(N){k||(k=!0,l.resolve(y,N))}var j=g(function(){v(C,S)});j.status==="error"&&S(j.value)}function g(y,v){var k={};try{k.value=y(v),k.status="success"}catch(S){k.status="error",k.value=S}return k}(r.exports=f).prototype.finally=function(y){if(typeof y!="function")return this;var v=this.constructor;return this.then(function(k){return v.resolve(y()).then(function(){return k})},function(k){return v.resolve(y()).then(function(){throw k})})},f.prototype.catch=function(y){return this.then(null,y)},f.prototype.then=function(y,v){if(typeof y!="function"&&this.state===u||typeof v!="function"&&this.state===c)return this;var k=new this.constructor(i);return this.state!==d?p(k,this.state===u?y:v,this.outcome):this.queue.push(new h(k,y,v)),k},h.prototype.callFulfilled=function(y){l.resolve(this.promise,y)},h.prototype.otherCallFulfilled=function(y){p(this.promise,this.onFulfilled,y)},h.prototype.callRejected=function(y){l.reject(this.promise,y)},h.prototype.otherCallRejected=function(y){p(this.promise,this.onRejected,y)},l.resolve=function(y,v){var k=g(b,v);if(k.status==="error")return l.reject(y,k.value);var S=k.value;if(S)m(y,S);else{y.state=u,y.outcome=v;for(var C=-1,j=y.queue.length;++C<j;)y.queue[C].callFulfilled(v)}return y},l.reject=function(y,v){y.state=c,y.outcome=v;for(var k=-1,S=y.queue.length;++k<S;)y.queue[k].callRejected(v);return y},f.resolve=function(y){return y instanceof this?y:l.resolve(new this(i),y)},f.reject=function(y){var v=new this(i);return l.reject(v,y)},f.all=function(y){var v=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=y.length,S=!1;if(!k)return this.resolve([]);for(var C=new Array(k),j=0,N=-1,T=new this(i);++N<k;)A(y[N],N);return T;function A(O,$){v.resolve(O).then(function(E){C[$]=E,++j!==k||S||(S=!0,l.resolve(T,C))},function(E){S||(S=!0,l.reject(T,E))})}},f.race=function(y){var v=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=y.length,S=!1;if(!k)return this.resolve([]);for(var C=-1,j=new this(i);++C<k;)N=y[C],v.resolve(N).then(function(T){S||(S=!0,l.resolve(j,T))},function(T){S||(S=!0,l.reject(j,T))});var N;return j}},{immediate:36}],38:[function(n,r,o){var s={};(0,n("./lib/utils/common").assign)(s,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,o){var s=n("./zlib/deflate"),i=n("./utils/common"),l=n("./utils/strings"),c=n("./zlib/messages"),u=n("./zlib/zstream"),d=Object.prototype.toString,f=0,h=-1,p=0,b=8;function m(y){if(!(this instanceof m))return new m(y);this.options=i.assign({level:h,method:b,chunkSize:16384,windowBits:15,memLevel:8,strategy:p,to:""},y||{});var v=this.options;v.raw&&0<v.windowBits?v.windowBits=-v.windowBits:v.gzip&&0<v.windowBits&&v.windowBits<16&&(v.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var k=s.deflateInit2(this.strm,v.level,v.method,v.windowBits,v.memLevel,v.strategy);if(k!==f)throw new Error(c[k]);if(v.header&&s.deflateSetHeader(this.strm,v.header),v.dictionary){var S;if(S=typeof v.dictionary=="string"?l.string2buf(v.dictionary):d.call(v.dictionary)==="[object ArrayBuffer]"?new Uint8Array(v.dictionary):v.dictionary,(k=s.deflateSetDictionary(this.strm,S))!==f)throw new Error(c[k]);this._dict_set=!0}}function g(y,v){var k=new m(v);if(k.push(y,!0),k.err)throw k.msg||c[k.err];return k.result}m.prototype.push=function(y,v){var k,S,C=this.strm,j=this.options.chunkSize;if(this.ended)return!1;S=v===~~v?v:v===!0?4:0,typeof y=="string"?C.input=l.string2buf(y):d.call(y)==="[object ArrayBuffer]"?C.input=new Uint8Array(y):C.input=y,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new i.Buf8(j),C.next_out=0,C.avail_out=j),(k=s.deflate(C,S))!==1&&k!==f)return this.onEnd(k),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(l.buf2binstring(i.shrinkBuf(C.output,C.next_out))):this.onData(i.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&k!==1);return S===4?(k=s.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===f):S!==2||(this.onEnd(f),!(C.avail_out=0))},m.prototype.onData=function(y){this.chunks.push(y)},m.prototype.onEnd=function(y){y===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=y,this.msg=this.strm.msg},o.Deflate=m,o.deflate=g,o.deflateRaw=function(y,v){return(v=v||{}).raw=!0,g(y,v)},o.gzip=function(y,v){return(v=v||{}).gzip=!0,g(y,v)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,o){var s=n("./zlib/inflate"),i=n("./utils/common"),l=n("./utils/strings"),c=n("./zlib/constants"),u=n("./zlib/messages"),d=n("./zlib/zstream"),f=n("./zlib/gzheader"),h=Object.prototype.toString;function p(m){if(!(this instanceof p))return new p(m);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},m||{});var g=this.options;g.raw&&0<=g.windowBits&&g.windowBits<16&&(g.windowBits=-g.windowBits,g.windowBits===0&&(g.windowBits=-15)),!(0<=g.windowBits&&g.windowBits<16)||m&&m.windowBits||(g.windowBits+=32),15<g.windowBits&&g.windowBits<48&&(15&g.windowBits)==0&&(g.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var y=s.inflateInit2(this.strm,g.windowBits);if(y!==c.Z_OK)throw new Error(u[y]);this.header=new f,s.inflateGetHeader(this.strm,this.header)}function b(m,g){var y=new p(g);if(y.push(m,!0),y.err)throw y.msg||u[y.err];return y.result}p.prototype.push=function(m,g){var y,v,k,S,C,j,N=this.strm,T=this.options.chunkSize,A=this.options.dictionary,O=!1;if(this.ended)return!1;v=g===~~g?g:g===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof m=="string"?N.input=l.binstring2buf(m):h.call(m)==="[object ArrayBuffer]"?N.input=new Uint8Array(m):N.input=m,N.next_in=0,N.avail_in=N.input.length;do{if(N.avail_out===0&&(N.output=new i.Buf8(T),N.next_out=0,N.avail_out=T),(y=s.inflate(N,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&A&&(j=typeof A=="string"?l.string2buf(A):h.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,y=s.inflateSetDictionary(this.strm,j)),y===c.Z_BUF_ERROR&&O===!0&&(y=c.Z_OK,O=!1),y!==c.Z_STREAM_END&&y!==c.Z_OK)return this.onEnd(y),!(this.ended=!0);N.next_out&&(N.avail_out!==0&&y!==c.Z_STREAM_END&&(N.avail_in!==0||v!==c.Z_FINISH&&v!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=l.utf8border(N.output,N.next_out),S=N.next_out-k,C=l.buf2string(N.output,k),N.next_out=S,N.avail_out=T-S,S&&i.arraySet(N.output,N.output,k,S,0),this.onData(C)):this.onData(i.shrinkBuf(N.output,N.next_out)))),N.avail_in===0&&N.avail_out===0&&(O=!0)}while((0<N.avail_in||N.avail_out===0)&&y!==c.Z_STREAM_END);return y===c.Z_STREAM_END&&(v=c.Z_FINISH),v===c.Z_FINISH?(y=s.inflateEnd(this.strm),this.onEnd(y),this.ended=!0,y===c.Z_OK):v!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(N.avail_out=0))},p.prototype.onData=function(m){this.chunks.push(m)},p.prototype.onEnd=function(m){m===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},o.Inflate=p,o.inflate=b,o.inflateRaw=function(m,g){return(g=g||{}).raw=!0,b(m,g)},o.ungzip=b},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,o){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";o.assign=function(c){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var d=u.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(c[f]=d[f])}}return c},o.shrinkBuf=function(c,u){return c.length===u?c:c.subarray?c.subarray(0,u):(c.length=u,c)};var i={arraySet:function(c,u,d,f,h){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+f),h);else for(var p=0;p<f;p++)c[h+p]=u[d+p]},flattenChunks:function(c){var u,d,f,h,p,b;for(u=f=0,d=c.length;u<d;u++)f+=c[u].length;for(b=new Uint8Array(f),u=h=0,d=c.length;u<d;u++)p=c[u],b.set(p,h),h+=p.length;return b}},l={arraySet:function(c,u,d,f,h){for(var p=0;p<f;p++)c[h+p]=u[d+p]},flattenChunks:function(c){return[].concat.apply([],c)}};o.setTyped=function(c){c?(o.Buf8=Uint8Array,o.Buf16=Uint16Array,o.Buf32=Int32Array,o.assign(o,i)):(o.Buf8=Array,o.Buf16=Array,o.Buf32=Array,o.assign(o,l))},o.setTyped(s)},{}],42:[function(n,r,o){var s=n("./common"),i=!0,l=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{l=!1}for(var c=new s.Buf8(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function d(f,h){if(h<65537&&(f.subarray&&l||!f.subarray&&i))return String.fromCharCode.apply(null,s.shrinkBuf(f,h));for(var p="",b=0;b<h;b++)p+=String.fromCharCode(f[b]);return p}c[254]=c[254]=1,o.string2buf=function(f){var h,p,b,m,g,y=f.length,v=0;for(m=0;m<y;m++)(64512&(p=f.charCodeAt(m)))==55296&&m+1<y&&(64512&(b=f.charCodeAt(m+1)))==56320&&(p=65536+(p-55296<<10)+(b-56320),m++),v+=p<128?1:p<2048?2:p<65536?3:4;for(h=new s.Buf8(v),m=g=0;g<v;m++)(64512&(p=f.charCodeAt(m)))==55296&&m+1<y&&(64512&(b=f.charCodeAt(m+1)))==56320&&(p=65536+(p-55296<<10)+(b-56320),m++),p<128?h[g++]=p:(p<2048?h[g++]=192|p>>>6:(p<65536?h[g++]=224|p>>>12:(h[g++]=240|p>>>18,h[g++]=128|p>>>12&63),h[g++]=128|p>>>6&63),h[g++]=128|63&p);return h},o.buf2binstring=function(f){return d(f,f.length)},o.binstring2buf=function(f){for(var h=new s.Buf8(f.length),p=0,b=h.length;p<b;p++)h[p]=f.charCodeAt(p);return h},o.buf2string=function(f,h){var p,b,m,g,y=h||f.length,v=new Array(2*y);for(p=b=0;p<y;)if((m=f[p++])<128)v[b++]=m;else if(4<(g=c[m]))v[b++]=65533,p+=g-1;else{for(m&=g===2?31:g===3?15:7;1<g&&p<y;)m=m<<6|63&f[p++],g--;1<g?v[b++]=65533:m<65536?v[b++]=m:(m-=65536,v[b++]=55296|m>>10&1023,v[b++]=56320|1023&m)}return d(v,b)},o.utf8border=function(f,h){var p;for((h=h||f.length)>f.length&&(h=f.length),p=h-1;0<=p&&(192&f[p])==128;)p--;return p<0||p===0?h:p+c[f[p]]>h?p:h}},{"./common":41}],43:[function(n,r,o){r.exports=function(s,i,l,c){for(var u=65535&s|0,d=s>>>16&65535|0,f=0;l!==0;){for(l-=f=2e3<l?2e3:l;d=d+(u=u+i[c++]|0)|0,--f;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(n,r,o){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,o){var s=(function(){for(var i,l=[],c=0;c<256;c++){i=c;for(var u=0;u<8;u++)i=1&i?3988292384^i>>>1:i>>>1;l[c]=i}return l})();r.exports=function(i,l,c,u){var d=s,f=u+c;i^=-1;for(var h=u;h<f;h++)i=i>>>8^d[255&(i^l[h])];return-1^i}},{}],46:[function(n,r,o){var s,i=n("../utils/common"),l=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),f=0,h=4,p=0,b=-2,m=-1,g=4,y=2,v=8,k=9,S=286,C=30,j=19,N=2*S+1,T=15,A=3,O=258,$=O+A+1,E=42,L=113,w=1,M=2,U=3,F=4;function B(_,te){return _.msg=d[te],te}function G(_){return(_<<1)-(4<_?9:0)}function I(_){for(var te=_.length;0<=--te;)_[te]=0}function H(_){var te=_.state,Q=te.pending;Q>_.avail_out&&(Q=_.avail_out),Q!==0&&(i.arraySet(_.output,te.pending_buf,te.pending_out,Q,_.next_out),_.next_out+=Q,te.pending_out+=Q,_.total_out+=Q,_.avail_out-=Q,te.pending-=Q,te.pending===0&&(te.pending_out=0))}function K(_,te){l._tr_flush_block(_,0<=_.block_start?_.block_start:-1,_.strstart-_.block_start,te),_.block_start=_.strstart,H(_.strm)}function z(_,te){_.pending_buf[_.pending++]=te}function se(_,te){_.pending_buf[_.pending++]=te>>>8&255,_.pending_buf[_.pending++]=255&te}function re(_,te){var Q,R,P=_.max_chain_length,q=_.strstart,Z=_.prev_length,J=_.nice_match,V=_.strstart>_.w_size-$?_.strstart-(_.w_size-$):0,oe=_.window,Y=_.w_mask,ee=_.prev,D=_.strstart+O,X=oe[q+Z-1],ae=oe[q+Z];_.prev_length>=_.good_match&&(P>>=2),J>_.lookahead&&(J=_.lookahead);do if(oe[(Q=te)+Z]===ae&&oe[Q+Z-1]===X&&oe[Q]===oe[q]&&oe[++Q]===oe[q+1]){q+=2,Q++;do;while(oe[++q]===oe[++Q]&&oe[++q]===oe[++Q]&&oe[++q]===oe[++Q]&&oe[++q]===oe[++Q]&&oe[++q]===oe[++Q]&&oe[++q]===oe[++Q]&&oe[++q]===oe[++Q]&&oe[++q]===oe[++Q]&&q<D);if(R=O-(D-q),q=D-O,Z<R){if(_.match_start=te,J<=(Z=R))break;X=oe[q+Z-1],ae=oe[q+Z]}}while((te=ee[te&Y])>V&&--P!=0);return Z<=_.lookahead?Z:_.lookahead}function ue(_){var te,Q,R,P,q,Z,J,V,oe,Y,ee=_.w_size;do{if(P=_.window_size-_.lookahead-_.strstart,_.strstart>=ee+(ee-$)){for(i.arraySet(_.window,_.window,ee,ee,0),_.match_start-=ee,_.strstart-=ee,_.block_start-=ee,te=Q=_.hash_size;R=_.head[--te],_.head[te]=ee<=R?R-ee:0,--Q;);for(te=Q=ee;R=_.prev[--te],_.prev[te]=ee<=R?R-ee:0,--Q;);P+=ee}if(_.strm.avail_in===0)break;if(Z=_.strm,J=_.window,V=_.strstart+_.lookahead,oe=P,Y=void 0,Y=Z.avail_in,oe<Y&&(Y=oe),Q=Y===0?0:(Z.avail_in-=Y,i.arraySet(J,Z.input,Z.next_in,Y,V),Z.state.wrap===1?Z.adler=c(Z.adler,J,Y,V):Z.state.wrap===2&&(Z.adler=u(Z.adler,J,Y,V)),Z.next_in+=Y,Z.total_in+=Y,Y),_.lookahead+=Q,_.lookahead+_.insert>=A)for(q=_.strstart-_.insert,_.ins_h=_.window[q],_.ins_h=(_.ins_h<<_.hash_shift^_.window[q+1])&_.hash_mask;_.insert&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[q+A-1])&_.hash_mask,_.prev[q&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=q,q++,_.insert--,!(_.lookahead+_.insert<A)););}while(_.lookahead<$&&_.strm.avail_in!==0)}function ie(_,te){for(var Q,R;;){if(_.lookahead<$){if(ue(_),_.lookahead<$&&te===f)return w;if(_.lookahead===0)break}if(Q=0,_.lookahead>=A&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+A-1])&_.hash_mask,Q=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),Q!==0&&_.strstart-Q<=_.w_size-$&&(_.match_length=re(_,Q)),_.match_length>=A)if(R=l._tr_tally(_,_.strstart-_.match_start,_.match_length-A),_.lookahead-=_.match_length,_.match_length<=_.max_lazy_match&&_.lookahead>=A){for(_.match_length--;_.strstart++,_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+A-1])&_.hash_mask,Q=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart,--_.match_length!=0;);_.strstart++}else _.strstart+=_.match_length,_.match_length=0,_.ins_h=_.window[_.strstart],_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+1])&_.hash_mask;else R=l._tr_tally(_,0,_.window[_.strstart]),_.lookahead--,_.strstart++;if(R&&(K(_,!1),_.strm.avail_out===0))return w}return _.insert=_.strstart<A-1?_.strstart:A-1,te===h?(K(_,!0),_.strm.avail_out===0?U:F):_.last_lit&&(K(_,!1),_.strm.avail_out===0)?w:M}function de(_,te){for(var Q,R,P;;){if(_.lookahead<$){if(ue(_),_.lookahead<$&&te===f)return w;if(_.lookahead===0)break}if(Q=0,_.lookahead>=A&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+A-1])&_.hash_mask,Q=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),_.prev_length=_.match_length,_.prev_match=_.match_start,_.match_length=A-1,Q!==0&&_.prev_length<_.max_lazy_match&&_.strstart-Q<=_.w_size-$&&(_.match_length=re(_,Q),_.match_length<=5&&(_.strategy===1||_.match_length===A&&4096<_.strstart-_.match_start)&&(_.match_length=A-1)),_.prev_length>=A&&_.match_length<=_.prev_length){for(P=_.strstart+_.lookahead-A,R=l._tr_tally(_,_.strstart-1-_.prev_match,_.prev_length-A),_.lookahead-=_.prev_length-1,_.prev_length-=2;++_.strstart<=P&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+A-1])&_.hash_mask,Q=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),--_.prev_length!=0;);if(_.match_available=0,_.match_length=A-1,_.strstart++,R&&(K(_,!1),_.strm.avail_out===0))return w}else if(_.match_available){if((R=l._tr_tally(_,0,_.window[_.strstart-1]))&&K(_,!1),_.strstart++,_.lookahead--,_.strm.avail_out===0)return w}else _.match_available=1,_.strstart++,_.lookahead--}return _.match_available&&(R=l._tr_tally(_,0,_.window[_.strstart-1]),_.match_available=0),_.insert=_.strstart<A-1?_.strstart:A-1,te===h?(K(_,!0),_.strm.avail_out===0?U:F):_.last_lit&&(K(_,!1),_.strm.avail_out===0)?w:M}function pe(_,te,Q,R,P){this.good_length=_,this.max_lazy=te,this.nice_length=Q,this.max_chain=R,this.func=P}function he(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*N),this.dyn_dtree=new i.Buf16(2*(2*C+1)),this.bl_tree=new i.Buf16(2*(2*j+1)),I(this.dyn_ltree),I(this.dyn_dtree),I(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(T+1),this.heap=new i.Buf16(2*S+1),I(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*S+1),I(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function me(_){var te;return _&&_.state?(_.total_in=_.total_out=0,_.data_type=y,(te=_.state).pending=0,te.pending_out=0,te.wrap<0&&(te.wrap=-te.wrap),te.status=te.wrap?E:L,_.adler=te.wrap===2?0:1,te.last_flush=f,l._tr_init(te),p):B(_,b)}function ke(_){var te=me(_);return te===p&&(function(Q){Q.window_size=2*Q.w_size,I(Q.head),Q.max_lazy_match=s[Q.level].max_lazy,Q.good_match=s[Q.level].good_length,Q.nice_match=s[Q.level].nice_length,Q.max_chain_length=s[Q.level].max_chain,Q.strstart=0,Q.block_start=0,Q.lookahead=0,Q.insert=0,Q.match_length=Q.prev_length=A-1,Q.match_available=0,Q.ins_h=0})(_.state),te}function ze(_,te,Q,R,P,q){if(!_)return b;var Z=1;if(te===m&&(te=6),R<0?(Z=0,R=-R):15<R&&(Z=2,R-=16),P<1||k<P||Q!==v||R<8||15<R||te<0||9<te||q<0||g<q)return B(_,b);R===8&&(R=9);var J=new he;return(_.state=J).strm=_,J.wrap=Z,J.gzhead=null,J.w_bits=R,J.w_size=1<<J.w_bits,J.w_mask=J.w_size-1,J.hash_bits=P+7,J.hash_size=1<<J.hash_bits,J.hash_mask=J.hash_size-1,J.hash_shift=~~((J.hash_bits+A-1)/A),J.window=new i.Buf8(2*J.w_size),J.head=new i.Buf16(J.hash_size),J.prev=new i.Buf16(J.w_size),J.lit_bufsize=1<<P+6,J.pending_buf_size=4*J.lit_bufsize,J.pending_buf=new i.Buf8(J.pending_buf_size),J.d_buf=1*J.lit_bufsize,J.l_buf=3*J.lit_bufsize,J.level=te,J.strategy=q,J.method=Q,ke(_)}s=[new pe(0,0,0,0,function(_,te){var Q=65535;for(Q>_.pending_buf_size-5&&(Q=_.pending_buf_size-5);;){if(_.lookahead<=1){if(ue(_),_.lookahead===0&&te===f)return w;if(_.lookahead===0)break}_.strstart+=_.lookahead,_.lookahead=0;var R=_.block_start+Q;if((_.strstart===0||_.strstart>=R)&&(_.lookahead=_.strstart-R,_.strstart=R,K(_,!1),_.strm.avail_out===0)||_.strstart-_.block_start>=_.w_size-$&&(K(_,!1),_.strm.avail_out===0))return w}return _.insert=0,te===h?(K(_,!0),_.strm.avail_out===0?U:F):(_.strstart>_.block_start&&(K(_,!1),_.strm.avail_out),w)}),new pe(4,4,8,4,ie),new pe(4,5,16,8,ie),new pe(4,6,32,32,ie),new pe(4,4,16,16,de),new pe(8,16,32,32,de),new pe(8,16,128,128,de),new pe(8,32,128,256,de),new pe(32,128,258,1024,de),new pe(32,258,258,4096,de)],o.deflateInit=function(_,te){return ze(_,te,v,15,8,0)},o.deflateInit2=ze,o.deflateReset=ke,o.deflateResetKeep=me,o.deflateSetHeader=function(_,te){return _&&_.state?_.state.wrap!==2?b:(_.state.gzhead=te,p):b},o.deflate=function(_,te){var Q,R,P,q;if(!_||!_.state||5<te||te<0)return _?B(_,b):b;if(R=_.state,!_.output||!_.input&&_.avail_in!==0||R.status===666&&te!==h)return B(_,_.avail_out===0?-5:b);if(R.strm=_,Q=R.last_flush,R.last_flush=te,R.status===E)if(R.wrap===2)_.adler=0,z(R,31),z(R,139),z(R,8),R.gzhead?(z(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),z(R,255&R.gzhead.time),z(R,R.gzhead.time>>8&255),z(R,R.gzhead.time>>16&255),z(R,R.gzhead.time>>24&255),z(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),z(R,255&R.gzhead.os),R.gzhead.extra&&R.gzhead.extra.length&&(z(R,255&R.gzhead.extra.length),z(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(_.adler=u(_.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=69):(z(R,0),z(R,0),z(R,0),z(R,0),z(R,0),z(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),z(R,3),R.status=L);else{var Z=v+(R.w_bits-8<<4)<<8;Z|=(2<=R.strategy||R.level<2?0:R.level<6?1:R.level===6?2:3)<<6,R.strstart!==0&&(Z|=32),Z+=31-Z%31,R.status=L,se(R,Z),R.strstart!==0&&(se(R,_.adler>>>16),se(R,65535&_.adler)),_.adler=1}if(R.status===69)if(R.gzhead.extra){for(P=R.pending;R.gzindex<(65535&R.gzhead.extra.length)&&(R.pending!==R.pending_buf_size||(R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),H(_),P=R.pending,R.pending!==R.pending_buf_size));)z(R,255&R.gzhead.extra[R.gzindex]),R.gzindex++;R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=73)}else R.status=73;if(R.status===73)if(R.gzhead.name){P=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),H(_),P=R.pending,R.pending===R.pending_buf_size)){q=1;break}q=R.gzindex<R.gzhead.name.length?255&R.gzhead.name.charCodeAt(R.gzindex++):0,z(R,q)}while(q!==0);R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),q===0&&(R.gzindex=0,R.status=91)}else R.status=91;if(R.status===91)if(R.gzhead.comment){P=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),H(_),P=R.pending,R.pending===R.pending_buf_size)){q=1;break}q=R.gzindex<R.gzhead.comment.length?255&R.gzhead.comment.charCodeAt(R.gzindex++):0,z(R,q)}while(q!==0);R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),q===0&&(R.status=103)}else R.status=103;if(R.status===103&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&H(_),R.pending+2<=R.pending_buf_size&&(z(R,255&_.adler),z(R,_.adler>>8&255),_.adler=0,R.status=L)):R.status=L),R.pending!==0){if(H(_),_.avail_out===0)return R.last_flush=-1,p}else if(_.avail_in===0&&G(te)<=G(Q)&&te!==h)return B(_,-5);if(R.status===666&&_.avail_in!==0)return B(_,-5);if(_.avail_in!==0||R.lookahead!==0||te!==f&&R.status!==666){var J=R.strategy===2?(function(V,oe){for(var Y;;){if(V.lookahead===0&&(ue(V),V.lookahead===0)){if(oe===f)return w;break}if(V.match_length=0,Y=l._tr_tally(V,0,V.window[V.strstart]),V.lookahead--,V.strstart++,Y&&(K(V,!1),V.strm.avail_out===0))return w}return V.insert=0,oe===h?(K(V,!0),V.strm.avail_out===0?U:F):V.last_lit&&(K(V,!1),V.strm.avail_out===0)?w:M})(R,te):R.strategy===3?(function(V,oe){for(var Y,ee,D,X,ae=V.window;;){if(V.lookahead<=O){if(ue(V),V.lookahead<=O&&oe===f)return w;if(V.lookahead===0)break}if(V.match_length=0,V.lookahead>=A&&0<V.strstart&&(ee=ae[D=V.strstart-1])===ae[++D]&&ee===ae[++D]&&ee===ae[++D]){X=V.strstart+O;do;while(ee===ae[++D]&&ee===ae[++D]&&ee===ae[++D]&&ee===ae[++D]&&ee===ae[++D]&&ee===ae[++D]&&ee===ae[++D]&&ee===ae[++D]&&D<X);V.match_length=O-(X-D),V.match_length>V.lookahead&&(V.match_length=V.lookahead)}if(V.match_length>=A?(Y=l._tr_tally(V,1,V.match_length-A),V.lookahead-=V.match_length,V.strstart+=V.match_length,V.match_length=0):(Y=l._tr_tally(V,0,V.window[V.strstart]),V.lookahead--,V.strstart++),Y&&(K(V,!1),V.strm.avail_out===0))return w}return V.insert=0,oe===h?(K(V,!0),V.strm.avail_out===0?U:F):V.last_lit&&(K(V,!1),V.strm.avail_out===0)?w:M})(R,te):s[R.level].func(R,te);if(J!==U&&J!==F||(R.status=666),J===w||J===U)return _.avail_out===0&&(R.last_flush=-1),p;if(J===M&&(te===1?l._tr_align(R):te!==5&&(l._tr_stored_block(R,0,0,!1),te===3&&(I(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),H(_),_.avail_out===0))return R.last_flush=-1,p}return te!==h?p:R.wrap<=0?1:(R.wrap===2?(z(R,255&_.adler),z(R,_.adler>>8&255),z(R,_.adler>>16&255),z(R,_.adler>>24&255),z(R,255&_.total_in),z(R,_.total_in>>8&255),z(R,_.total_in>>16&255),z(R,_.total_in>>24&255)):(se(R,_.adler>>>16),se(R,65535&_.adler)),H(_),0<R.wrap&&(R.wrap=-R.wrap),R.pending!==0?p:1)},o.deflateEnd=function(_){var te;return _&&_.state?(te=_.state.status)!==E&&te!==69&&te!==73&&te!==91&&te!==103&&te!==L&&te!==666?B(_,b):(_.state=null,te===L?B(_,-3):p):b},o.deflateSetDictionary=function(_,te){var Q,R,P,q,Z,J,V,oe,Y=te.length;if(!_||!_.state||(q=(Q=_.state).wrap)===2||q===1&&Q.status!==E||Q.lookahead)return b;for(q===1&&(_.adler=c(_.adler,te,Y,0)),Q.wrap=0,Y>=Q.w_size&&(q===0&&(I(Q.head),Q.strstart=0,Q.block_start=0,Q.insert=0),oe=new i.Buf8(Q.w_size),i.arraySet(oe,te,Y-Q.w_size,Q.w_size,0),te=oe,Y=Q.w_size),Z=_.avail_in,J=_.next_in,V=_.input,_.avail_in=Y,_.next_in=0,_.input=te,ue(Q);Q.lookahead>=A;){for(R=Q.strstart,P=Q.lookahead-(A-1);Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[R+A-1])&Q.hash_mask,Q.prev[R&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=R,R++,--P;);Q.strstart=R,Q.lookahead=A-1,ue(Q)}return Q.strstart+=Q.lookahead,Q.block_start=Q.strstart,Q.insert=Q.lookahead,Q.lookahead=0,Q.match_length=Q.prev_length=A-1,Q.match_available=0,_.next_in=J,_.input=V,_.avail_in=Z,Q.wrap=q,p},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,o){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,o){r.exports=function(s,i){var l,c,u,d,f,h,p,b,m,g,y,v,k,S,C,j,N,T,A,O,$,E,L,w,M;l=s.state,c=s.next_in,w=s.input,u=c+(s.avail_in-5),d=s.next_out,M=s.output,f=d-(i-s.avail_out),h=d+(s.avail_out-257),p=l.dmax,b=l.wsize,m=l.whave,g=l.wnext,y=l.window,v=l.hold,k=l.bits,S=l.lencode,C=l.distcode,j=(1<<l.lenbits)-1,N=(1<<l.distbits)-1;e:do{k<15&&(v+=w[c++]<<k,k+=8,v+=w[c++]<<k,k+=8),T=S[v&j];t:for(;;){if(v>>>=A=T>>>24,k-=A,(A=T>>>16&255)===0)M[d++]=65535&T;else{if(!(16&A)){if((64&A)==0){T=S[(65535&T)+(v&(1<<A)-1)];continue t}if(32&A){l.mode=12;break e}s.msg="invalid literal/length code",l.mode=30;break e}O=65535&T,(A&=15)&&(k<A&&(v+=w[c++]<<k,k+=8),O+=v&(1<<A)-1,v>>>=A,k-=A),k<15&&(v+=w[c++]<<k,k+=8,v+=w[c++]<<k,k+=8),T=C[v&N];n:for(;;){if(v>>>=A=T>>>24,k-=A,!(16&(A=T>>>16&255))){if((64&A)==0){T=C[(65535&T)+(v&(1<<A)-1)];continue n}s.msg="invalid distance code",l.mode=30;break e}if($=65535&T,k<(A&=15)&&(v+=w[c++]<<k,(k+=8)<A&&(v+=w[c++]<<k,k+=8)),p<($+=v&(1<<A)-1)){s.msg="invalid distance too far back",l.mode=30;break e}if(v>>>=A,k-=A,(A=d-f)<$){if(m<(A=$-A)&&l.sane){s.msg="invalid distance too far back",l.mode=30;break e}if(L=y,(E=0)===g){if(E+=b-A,A<O){for(O-=A;M[d++]=y[E++],--A;);E=d-$,L=M}}else if(g<A){if(E+=b+g-A,(A-=g)<O){for(O-=A;M[d++]=y[E++],--A;);if(E=0,g<O){for(O-=A=g;M[d++]=y[E++],--A;);E=d-$,L=M}}}else if(E+=g-A,A<O){for(O-=A;M[d++]=y[E++],--A;);E=d-$,L=M}for(;2<O;)M[d++]=L[E++],M[d++]=L[E++],M[d++]=L[E++],O-=3;O&&(M[d++]=L[E++],1<O&&(M[d++]=L[E++]))}else{for(E=d-$;M[d++]=M[E++],M[d++]=M[E++],M[d++]=M[E++],2<(O-=3););O&&(M[d++]=M[E++],1<O&&(M[d++]=M[E++]))}break}}break}}while(c<u&&d<h);c-=O=k>>3,v&=(1<<(k-=O<<3))-1,s.next_in=c,s.next_out=d,s.avail_in=c<u?u-c+5:5-(c-u),s.avail_out=d<h?h-d+257:257-(d-h),l.hold=v,l.bits=k}},{}],49:[function(n,r,o){var s=n("../utils/common"),i=n("./adler32"),l=n("./crc32"),c=n("./inffast"),u=n("./inftrees"),d=1,f=2,h=0,p=-2,b=1,m=852,g=592;function y(E){return(E>>>24&255)+(E>>>8&65280)+((65280&E)<<8)+((255&E)<<24)}function v(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(E){var L;return E&&E.state?(L=E.state,E.total_in=E.total_out=L.total=0,E.msg="",L.wrap&&(E.adler=1&L.wrap),L.mode=b,L.last=0,L.havedict=0,L.dmax=32768,L.head=null,L.hold=0,L.bits=0,L.lencode=L.lendyn=new s.Buf32(m),L.distcode=L.distdyn=new s.Buf32(g),L.sane=1,L.back=-1,h):p}function S(E){var L;return E&&E.state?((L=E.state).wsize=0,L.whave=0,L.wnext=0,k(E)):p}function C(E,L){var w,M;return E&&E.state?(M=E.state,L<0?(w=0,L=-L):(w=1+(L>>4),L<48&&(L&=15)),L&&(L<8||15<L)?p:(M.window!==null&&M.wbits!==L&&(M.window=null),M.wrap=w,M.wbits=L,S(E))):p}function j(E,L){var w,M;return E?(M=new v,(E.state=M).window=null,(w=C(E,L))!==h&&(E.state=null),w):p}var N,T,A=!0;function O(E){if(A){var L;for(N=new s.Buf32(512),T=new s.Buf32(32),L=0;L<144;)E.lens[L++]=8;for(;L<256;)E.lens[L++]=9;for(;L<280;)E.lens[L++]=7;for(;L<288;)E.lens[L++]=8;for(u(d,E.lens,0,288,N,0,E.work,{bits:9}),L=0;L<32;)E.lens[L++]=5;u(f,E.lens,0,32,T,0,E.work,{bits:5}),A=!1}E.lencode=N,E.lenbits=9,E.distcode=T,E.distbits=5}function $(E,L,w,M){var U,F=E.state;return F.window===null&&(F.wsize=1<<F.wbits,F.wnext=0,F.whave=0,F.window=new s.Buf8(F.wsize)),M>=F.wsize?(s.arraySet(F.window,L,w-F.wsize,F.wsize,0),F.wnext=0,F.whave=F.wsize):(M<(U=F.wsize-F.wnext)&&(U=M),s.arraySet(F.window,L,w-M,U,F.wnext),(M-=U)?(s.arraySet(F.window,L,w-M,M,0),F.wnext=M,F.whave=F.wsize):(F.wnext+=U,F.wnext===F.wsize&&(F.wnext=0),F.whave<F.wsize&&(F.whave+=U))),0}o.inflateReset=S,o.inflateReset2=C,o.inflateResetKeep=k,o.inflateInit=function(E){return j(E,15)},o.inflateInit2=j,o.inflate=function(E,L){var w,M,U,F,B,G,I,H,K,z,se,re,ue,ie,de,pe,he,me,ke,ze,_,te,Q,R,P=0,q=new s.Buf8(4),Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!E||!E.state||!E.output||!E.input&&E.avail_in!==0)return p;(w=E.state).mode===12&&(w.mode=13),B=E.next_out,U=E.output,I=E.avail_out,F=E.next_in,M=E.input,G=E.avail_in,H=w.hold,K=w.bits,z=G,se=I,te=h;e:for(;;)switch(w.mode){case b:if(w.wrap===0){w.mode=13;break}for(;K<16;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(2&w.wrap&&H===35615){q[w.check=0]=255&H,q[1]=H>>>8&255,w.check=l(w.check,q,2,0),K=H=0,w.mode=2;break}if(w.flags=0,w.head&&(w.head.done=!1),!(1&w.wrap)||(((255&H)<<8)+(H>>8))%31){E.msg="incorrect header check",w.mode=30;break}if((15&H)!=8){E.msg="unknown compression method",w.mode=30;break}if(K-=4,_=8+(15&(H>>>=4)),w.wbits===0)w.wbits=_;else if(_>w.wbits){E.msg="invalid window size",w.mode=30;break}w.dmax=1<<_,E.adler=w.check=1,w.mode=512&H?10:12,K=H=0;break;case 2:for(;K<16;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(w.flags=H,(255&w.flags)!=8){E.msg="unknown compression method",w.mode=30;break}if(57344&w.flags){E.msg="unknown header flags set",w.mode=30;break}w.head&&(w.head.text=H>>8&1),512&w.flags&&(q[0]=255&H,q[1]=H>>>8&255,w.check=l(w.check,q,2,0)),K=H=0,w.mode=3;case 3:for(;K<32;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}w.head&&(w.head.time=H),512&w.flags&&(q[0]=255&H,q[1]=H>>>8&255,q[2]=H>>>16&255,q[3]=H>>>24&255,w.check=l(w.check,q,4,0)),K=H=0,w.mode=4;case 4:for(;K<16;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}w.head&&(w.head.xflags=255&H,w.head.os=H>>8),512&w.flags&&(q[0]=255&H,q[1]=H>>>8&255,w.check=l(w.check,q,2,0)),K=H=0,w.mode=5;case 5:if(1024&w.flags){for(;K<16;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}w.length=H,w.head&&(w.head.extra_len=H),512&w.flags&&(q[0]=255&H,q[1]=H>>>8&255,w.check=l(w.check,q,2,0)),K=H=0}else w.head&&(w.head.extra=null);w.mode=6;case 6:if(1024&w.flags&&(G<(re=w.length)&&(re=G),re&&(w.head&&(_=w.head.extra_len-w.length,w.head.extra||(w.head.extra=new Array(w.head.extra_len)),s.arraySet(w.head.extra,M,F,re,_)),512&w.flags&&(w.check=l(w.check,M,re,F)),G-=re,F+=re,w.length-=re),w.length))break e;w.length=0,w.mode=7;case 7:if(2048&w.flags){if(G===0)break e;for(re=0;_=M[F+re++],w.head&&_&&w.length<65536&&(w.head.name+=String.fromCharCode(_)),_&&re<G;);if(512&w.flags&&(w.check=l(w.check,M,re,F)),G-=re,F+=re,_)break e}else w.head&&(w.head.name=null);w.length=0,w.mode=8;case 8:if(4096&w.flags){if(G===0)break e;for(re=0;_=M[F+re++],w.head&&_&&w.length<65536&&(w.head.comment+=String.fromCharCode(_)),_&&re<G;);if(512&w.flags&&(w.check=l(w.check,M,re,F)),G-=re,F+=re,_)break e}else w.head&&(w.head.comment=null);w.mode=9;case 9:if(512&w.flags){for(;K<16;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(H!==(65535&w.check)){E.msg="header crc mismatch",w.mode=30;break}K=H=0}w.head&&(w.head.hcrc=w.flags>>9&1,w.head.done=!0),E.adler=w.check=0,w.mode=12;break;case 10:for(;K<32;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}E.adler=w.check=y(H),K=H=0,w.mode=11;case 11:if(w.havedict===0)return E.next_out=B,E.avail_out=I,E.next_in=F,E.avail_in=G,w.hold=H,w.bits=K,2;E.adler=w.check=1,w.mode=12;case 12:if(L===5||L===6)break e;case 13:if(w.last){H>>>=7&K,K-=7&K,w.mode=27;break}for(;K<3;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}switch(w.last=1&H,K-=1,3&(H>>>=1)){case 0:w.mode=14;break;case 1:if(O(w),w.mode=20,L!==6)break;H>>>=2,K-=2;break e;case 2:w.mode=17;break;case 3:E.msg="invalid block type",w.mode=30}H>>>=2,K-=2;break;case 14:for(H>>>=7&K,K-=7&K;K<32;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if((65535&H)!=(H>>>16^65535)){E.msg="invalid stored block lengths",w.mode=30;break}if(w.length=65535&H,K=H=0,w.mode=15,L===6)break e;case 15:w.mode=16;case 16:if(re=w.length){if(G<re&&(re=G),I<re&&(re=I),re===0)break e;s.arraySet(U,M,F,re,B),G-=re,F+=re,I-=re,B+=re,w.length-=re;break}w.mode=12;break;case 17:for(;K<14;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(w.nlen=257+(31&H),H>>>=5,K-=5,w.ndist=1+(31&H),H>>>=5,K-=5,w.ncode=4+(15&H),H>>>=4,K-=4,286<w.nlen||30<w.ndist){E.msg="too many length or distance symbols",w.mode=30;break}w.have=0,w.mode=18;case 18:for(;w.have<w.ncode;){for(;K<3;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}w.lens[Z[w.have++]]=7&H,H>>>=3,K-=3}for(;w.have<19;)w.lens[Z[w.have++]]=0;if(w.lencode=w.lendyn,w.lenbits=7,Q={bits:w.lenbits},te=u(0,w.lens,0,19,w.lencode,0,w.work,Q),w.lenbits=Q.bits,te){E.msg="invalid code lengths set",w.mode=30;break}w.have=0,w.mode=19;case 19:for(;w.have<w.nlen+w.ndist;){for(;pe=(P=w.lencode[H&(1<<w.lenbits)-1])>>>16&255,he=65535&P,!((de=P>>>24)<=K);){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(he<16)H>>>=de,K-=de,w.lens[w.have++]=he;else{if(he===16){for(R=de+2;K<R;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(H>>>=de,K-=de,w.have===0){E.msg="invalid bit length repeat",w.mode=30;break}_=w.lens[w.have-1],re=3+(3&H),H>>>=2,K-=2}else if(he===17){for(R=de+3;K<R;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}K-=de,_=0,re=3+(7&(H>>>=de)),H>>>=3,K-=3}else{for(R=de+7;K<R;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}K-=de,_=0,re=11+(127&(H>>>=de)),H>>>=7,K-=7}if(w.have+re>w.nlen+w.ndist){E.msg="invalid bit length repeat",w.mode=30;break}for(;re--;)w.lens[w.have++]=_}}if(w.mode===30)break;if(w.lens[256]===0){E.msg="invalid code -- missing end-of-block",w.mode=30;break}if(w.lenbits=9,Q={bits:w.lenbits},te=u(d,w.lens,0,w.nlen,w.lencode,0,w.work,Q),w.lenbits=Q.bits,te){E.msg="invalid literal/lengths set",w.mode=30;break}if(w.distbits=6,w.distcode=w.distdyn,Q={bits:w.distbits},te=u(f,w.lens,w.nlen,w.ndist,w.distcode,0,w.work,Q),w.distbits=Q.bits,te){E.msg="invalid distances set",w.mode=30;break}if(w.mode=20,L===6)break e;case 20:w.mode=21;case 21:if(6<=G&&258<=I){E.next_out=B,E.avail_out=I,E.next_in=F,E.avail_in=G,w.hold=H,w.bits=K,c(E,se),B=E.next_out,U=E.output,I=E.avail_out,F=E.next_in,M=E.input,G=E.avail_in,H=w.hold,K=w.bits,w.mode===12&&(w.back=-1);break}for(w.back=0;pe=(P=w.lencode[H&(1<<w.lenbits)-1])>>>16&255,he=65535&P,!((de=P>>>24)<=K);){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(pe&&(240&pe)==0){for(me=de,ke=pe,ze=he;pe=(P=w.lencode[ze+((H&(1<<me+ke)-1)>>me)])>>>16&255,he=65535&P,!(me+(de=P>>>24)<=K);){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}H>>>=me,K-=me,w.back+=me}if(H>>>=de,K-=de,w.back+=de,w.length=he,pe===0){w.mode=26;break}if(32&pe){w.back=-1,w.mode=12;break}if(64&pe){E.msg="invalid literal/length code",w.mode=30;break}w.extra=15&pe,w.mode=22;case 22:if(w.extra){for(R=w.extra;K<R;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}w.length+=H&(1<<w.extra)-1,H>>>=w.extra,K-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=23;case 23:for(;pe=(P=w.distcode[H&(1<<w.distbits)-1])>>>16&255,he=65535&P,!((de=P>>>24)<=K);){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if((240&pe)==0){for(me=de,ke=pe,ze=he;pe=(P=w.distcode[ze+((H&(1<<me+ke)-1)>>me)])>>>16&255,he=65535&P,!(me+(de=P>>>24)<=K);){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}H>>>=me,K-=me,w.back+=me}if(H>>>=de,K-=de,w.back+=de,64&pe){E.msg="invalid distance code",w.mode=30;break}w.offset=he,w.extra=15&pe,w.mode=24;case 24:if(w.extra){for(R=w.extra;K<R;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}w.offset+=H&(1<<w.extra)-1,H>>>=w.extra,K-=w.extra,w.back+=w.extra}if(w.offset>w.dmax){E.msg="invalid distance too far back",w.mode=30;break}w.mode=25;case 25:if(I===0)break e;if(re=se-I,w.offset>re){if((re=w.offset-re)>w.whave&&w.sane){E.msg="invalid distance too far back",w.mode=30;break}ue=re>w.wnext?(re-=w.wnext,w.wsize-re):w.wnext-re,re>w.length&&(re=w.length),ie=w.window}else ie=U,ue=B-w.offset,re=w.length;for(I<re&&(re=I),I-=re,w.length-=re;U[B++]=ie[ue++],--re;);w.length===0&&(w.mode=21);break;case 26:if(I===0)break e;U[B++]=w.length,I--,w.mode=21;break;case 27:if(w.wrap){for(;K<32;){if(G===0)break e;G--,H|=M[F++]<<K,K+=8}if(se-=I,E.total_out+=se,w.total+=se,se&&(E.adler=w.check=w.flags?l(w.check,U,se,B-se):i(w.check,U,se,B-se)),se=I,(w.flags?H:y(H))!==w.check){E.msg="incorrect data check",w.mode=30;break}K=H=0}w.mode=28;case 28:if(w.wrap&&w.flags){for(;K<32;){if(G===0)break e;G--,H+=M[F++]<<K,K+=8}if(H!==(4294967295&w.total)){E.msg="incorrect length check",w.mode=30;break}K=H=0}w.mode=29;case 29:te=1;break e;case 30:te=-3;break e;case 31:return-4;default:return p}return E.next_out=B,E.avail_out=I,E.next_in=F,E.avail_in=G,w.hold=H,w.bits=K,(w.wsize||se!==E.avail_out&&w.mode<30&&(w.mode<27||L!==4))&&$(E,E.output,E.next_out,se-E.avail_out)?(w.mode=31,-4):(z-=E.avail_in,se-=E.avail_out,E.total_in+=z,E.total_out+=se,w.total+=se,w.wrap&&se&&(E.adler=w.check=w.flags?l(w.check,U,se,E.next_out-se):i(w.check,U,se,E.next_out-se)),E.data_type=w.bits+(w.last?64:0)+(w.mode===12?128:0)+(w.mode===20||w.mode===15?256:0),(z==0&&se===0||L===4)&&te===h&&(te=-5),te)},o.inflateEnd=function(E){if(!E||!E.state)return p;var L=E.state;return L.window&&(L.window=null),E.state=null,h},o.inflateGetHeader=function(E,L){var w;return E&&E.state?(2&(w=E.state).wrap)==0?p:((w.head=L).done=!1,h):p},o.inflateSetDictionary=function(E,L){var w,M=L.length;return E&&E.state?(w=E.state).wrap!==0&&w.mode!==11?p:w.mode===11&&i(1,L,M,0)!==w.check?-3:$(E,L,M,M)?(w.mode=31,-4):(w.havedict=1,h):p},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,o){var s=n("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(d,f,h,p,b,m,g,y){var v,k,S,C,j,N,T,A,O,$=y.bits,E=0,L=0,w=0,M=0,U=0,F=0,B=0,G=0,I=0,H=0,K=null,z=0,se=new s.Buf16(16),re=new s.Buf16(16),ue=null,ie=0;for(E=0;E<=15;E++)se[E]=0;for(L=0;L<p;L++)se[f[h+L]]++;for(U=$,M=15;1<=M&&se[M]===0;M--);if(M<U&&(U=M),M===0)return b[m++]=20971520,b[m++]=20971520,y.bits=1,0;for(w=1;w<M&&se[w]===0;w++);for(U<w&&(U=w),E=G=1;E<=15;E++)if(G<<=1,(G-=se[E])<0)return-1;if(0<G&&(d===0||M!==1))return-1;for(re[1]=0,E=1;E<15;E++)re[E+1]=re[E]+se[E];for(L=0;L<p;L++)f[h+L]!==0&&(g[re[f[h+L]]++]=L);if(N=d===0?(K=ue=g,19):d===1?(K=i,z-=257,ue=l,ie-=257,256):(K=c,ue=u,-1),E=w,j=m,B=L=H=0,S=-1,C=(I=1<<(F=U))-1,d===1&&852<I||d===2&&592<I)return 1;for(;;){for(T=E-B,O=g[L]<N?(A=0,g[L]):g[L]>N?(A=ue[ie+g[L]],K[z+g[L]]):(A=96,0),v=1<<E-B,w=k=1<<F;b[j+(H>>B)+(k-=v)]=T<<24|A<<16|O|0,k!==0;);for(v=1<<E-1;H&v;)v>>=1;if(v!==0?(H&=v-1,H+=v):H=0,L++,--se[E]==0){if(E===M)break;E=f[h+g[L]]}if(U<E&&(H&C)!==S){for(B===0&&(B=U),j+=w,G=1<<(F=E-B);F+B<M&&!((G-=se[F+B])<=0);)F++,G<<=1;if(I+=1<<F,d===1&&852<I||d===2&&592<I)return 1;b[S=H&C]=U<<24|F<<16|j-m|0}}return H!==0&&(b[j+H]=E-B<<24|64<<16|0),y.bits=U,0}},{"../utils/common":41}],51:[function(n,r,o){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,o){var s=n("../utils/common"),i=0,l=1;function c(P){for(var q=P.length;0<=--q;)P[q]=0}var u=0,d=29,f=256,h=f+1+d,p=30,b=19,m=2*h+1,g=15,y=16,v=7,k=256,S=16,C=17,j=18,N=[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],T=[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],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],$=new Array(2*(h+2));c($);var E=new Array(2*p);c(E);var L=new Array(512);c(L);var w=new Array(256);c(w);var M=new Array(d);c(M);var U,F,B,G=new Array(p);function I(P,q,Z,J,V){this.static_tree=P,this.extra_bits=q,this.extra_base=Z,this.elems=J,this.max_length=V,this.has_stree=P&&P.length}function H(P,q){this.dyn_tree=P,this.max_code=0,this.stat_desc=q}function K(P){return P<256?L[P]:L[256+(P>>>7)]}function z(P,q){P.pending_buf[P.pending++]=255&q,P.pending_buf[P.pending++]=q>>>8&255}function se(P,q,Z){P.bi_valid>y-Z?(P.bi_buf|=q<<P.bi_valid&65535,z(P,P.bi_buf),P.bi_buf=q>>y-P.bi_valid,P.bi_valid+=Z-y):(P.bi_buf|=q<<P.bi_valid&65535,P.bi_valid+=Z)}function re(P,q,Z){se(P,Z[2*q],Z[2*q+1])}function ue(P,q){for(var Z=0;Z|=1&P,P>>>=1,Z<<=1,0<--q;);return Z>>>1}function ie(P,q,Z){var J,V,oe=new Array(g+1),Y=0;for(J=1;J<=g;J++)oe[J]=Y=Y+Z[J-1]<<1;for(V=0;V<=q;V++){var ee=P[2*V+1];ee!==0&&(P[2*V]=ue(oe[ee]++,ee))}}function de(P){var q;for(q=0;q<h;q++)P.dyn_ltree[2*q]=0;for(q=0;q<p;q++)P.dyn_dtree[2*q]=0;for(q=0;q<b;q++)P.bl_tree[2*q]=0;P.dyn_ltree[2*k]=1,P.opt_len=P.static_len=0,P.last_lit=P.matches=0}function pe(P){8<P.bi_valid?z(P,P.bi_buf):0<P.bi_valid&&(P.pending_buf[P.pending++]=P.bi_buf),P.bi_buf=0,P.bi_valid=0}function he(P,q,Z,J){var V=2*q,oe=2*Z;return P[V]<P[oe]||P[V]===P[oe]&&J[q]<=J[Z]}function me(P,q,Z){for(var J=P.heap[Z],V=Z<<1;V<=P.heap_len&&(V<P.heap_len&&he(q,P.heap[V+1],P.heap[V],P.depth)&&V++,!he(q,J,P.heap[V],P.depth));)P.heap[Z]=P.heap[V],Z=V,V<<=1;P.heap[Z]=J}function ke(P,q,Z){var J,V,oe,Y,ee=0;if(P.last_lit!==0)for(;J=P.pending_buf[P.d_buf+2*ee]<<8|P.pending_buf[P.d_buf+2*ee+1],V=P.pending_buf[P.l_buf+ee],ee++,J===0?re(P,V,q):(re(P,(oe=w[V])+f+1,q),(Y=N[oe])!==0&&se(P,V-=M[oe],Y),re(P,oe=K(--J),Z),(Y=T[oe])!==0&&se(P,J-=G[oe],Y)),ee<P.last_lit;);re(P,k,q)}function ze(P,q){var Z,J,V,oe=q.dyn_tree,Y=q.stat_desc.static_tree,ee=q.stat_desc.has_stree,D=q.stat_desc.elems,X=-1;for(P.heap_len=0,P.heap_max=m,Z=0;Z<D;Z++)oe[2*Z]!==0?(P.heap[++P.heap_len]=X=Z,P.depth[Z]=0):oe[2*Z+1]=0;for(;P.heap_len<2;)oe[2*(V=P.heap[++P.heap_len]=X<2?++X:0)]=1,P.depth[V]=0,P.opt_len--,ee&&(P.static_len-=Y[2*V+1]);for(q.max_code=X,Z=P.heap_len>>1;1<=Z;Z--)me(P,oe,Z);for(V=D;Z=P.heap[1],P.heap[1]=P.heap[P.heap_len--],me(P,oe,1),J=P.heap[1],P.heap[--P.heap_max]=Z,P.heap[--P.heap_max]=J,oe[2*V]=oe[2*Z]+oe[2*J],P.depth[V]=(P.depth[Z]>=P.depth[J]?P.depth[Z]:P.depth[J])+1,oe[2*Z+1]=oe[2*J+1]=V,P.heap[1]=V++,me(P,oe,1),2<=P.heap_len;);P.heap[--P.heap_max]=P.heap[1],(function(ae,ge){var Ee,Be,ft,Re,zt,Zt,Ke=ge.dyn_tree,qt=ge.max_code,_t=ge.stat_desc.static_tree,Ng=ge.stat_desc.has_stree,Tg=ge.stat_desc.extra_bits,Sl=ge.stat_desc.extra_base,pr=ge.stat_desc.max_length,Gr=0;for(Re=0;Re<=g;Re++)ae.bl_count[Re]=0;for(Ke[2*ae.heap[ae.heap_max]+1]=0,Ee=ae.heap_max+1;Ee<m;Ee++)pr<(Re=Ke[2*Ke[2*(Be=ae.heap[Ee])+1]+1]+1)&&(Re=pr,Gr++),Ke[2*Be+1]=Re,qt<Be||(ae.bl_count[Re]++,zt=0,Sl<=Be&&(zt=Tg[Be-Sl]),Zt=Ke[2*Be],ae.opt_len+=Zt*(Re+zt),Ng&&(ae.static_len+=Zt*(_t[2*Be+1]+zt)));if(Gr!==0){do{for(Re=pr-1;ae.bl_count[Re]===0;)Re--;ae.bl_count[Re]--,ae.bl_count[Re+1]+=2,ae.bl_count[pr]--,Gr-=2}while(0<Gr);for(Re=pr;Re!==0;Re--)for(Be=ae.bl_count[Re];Be!==0;)qt<(ft=ae.heap[--Ee])||(Ke[2*ft+1]!==Re&&(ae.opt_len+=(Re-Ke[2*ft+1])*Ke[2*ft],Ke[2*ft+1]=Re),Be--)}})(P,q),ie(oe,X,P.bl_count)}function _(P,q,Z){var J,V,oe=-1,Y=q[1],ee=0,D=7,X=4;for(Y===0&&(D=138,X=3),q[2*(Z+1)+1]=65535,J=0;J<=Z;J++)V=Y,Y=q[2*(J+1)+1],++ee<D&&V===Y||(ee<X?P.bl_tree[2*V]+=ee:V!==0?(V!==oe&&P.bl_tree[2*V]++,P.bl_tree[2*S]++):ee<=10?P.bl_tree[2*C]++:P.bl_tree[2*j]++,oe=V,X=(ee=0)===Y?(D=138,3):V===Y?(D=6,3):(D=7,4))}function te(P,q,Z){var J,V,oe=-1,Y=q[1],ee=0,D=7,X=4;for(Y===0&&(D=138,X=3),J=0;J<=Z;J++)if(V=Y,Y=q[2*(J+1)+1],!(++ee<D&&V===Y)){if(ee<X)for(;re(P,V,P.bl_tree),--ee!=0;);else V!==0?(V!==oe&&(re(P,V,P.bl_tree),ee--),re(P,S,P.bl_tree),se(P,ee-3,2)):ee<=10?(re(P,C,P.bl_tree),se(P,ee-3,3)):(re(P,j,P.bl_tree),se(P,ee-11,7));oe=V,X=(ee=0)===Y?(D=138,3):V===Y?(D=6,3):(D=7,4)}}c(G);var Q=!1;function R(P,q,Z,J){se(P,(u<<1)+(J?1:0),3),(function(V,oe,Y,ee){pe(V),z(V,Y),z(V,~Y),s.arraySet(V.pending_buf,V.window,oe,Y,V.pending),V.pending+=Y})(P,q,Z)}o._tr_init=function(P){Q||((function(){var q,Z,J,V,oe,Y=new Array(g+1);for(V=J=0;V<d-1;V++)for(M[V]=J,q=0;q<1<<N[V];q++)w[J++]=V;for(w[J-1]=V,V=oe=0;V<16;V++)for(G[V]=oe,q=0;q<1<<T[V];q++)L[oe++]=V;for(oe>>=7;V<p;V++)for(G[V]=oe<<7,q=0;q<1<<T[V]-7;q++)L[256+oe++]=V;for(Z=0;Z<=g;Z++)Y[Z]=0;for(q=0;q<=143;)$[2*q+1]=8,q++,Y[8]++;for(;q<=255;)$[2*q+1]=9,q++,Y[9]++;for(;q<=279;)$[2*q+1]=7,q++,Y[7]++;for(;q<=287;)$[2*q+1]=8,q++,Y[8]++;for(ie($,h+1,Y),q=0;q<p;q++)E[2*q+1]=5,E[2*q]=ue(q,5);U=new I($,N,f+1,h,g),F=new I(E,T,0,p,g),B=new I(new Array(0),A,0,b,v)})(),Q=!0),P.l_desc=new H(P.dyn_ltree,U),P.d_desc=new H(P.dyn_dtree,F),P.bl_desc=new H(P.bl_tree,B),P.bi_buf=0,P.bi_valid=0,de(P)},o._tr_stored_block=R,o._tr_flush_block=function(P,q,Z,J){var V,oe,Y=0;0<P.level?(P.strm.data_type===2&&(P.strm.data_type=(function(ee){var D,X=4093624447;for(D=0;D<=31;D++,X>>>=1)if(1&X&&ee.dyn_ltree[2*D]!==0)return i;if(ee.dyn_ltree[18]!==0||ee.dyn_ltree[20]!==0||ee.dyn_ltree[26]!==0)return l;for(D=32;D<f;D++)if(ee.dyn_ltree[2*D]!==0)return l;return i})(P)),ze(P,P.l_desc),ze(P,P.d_desc),Y=(function(ee){var D;for(_(ee,ee.dyn_ltree,ee.l_desc.max_code),_(ee,ee.dyn_dtree,ee.d_desc.max_code),ze(ee,ee.bl_desc),D=b-1;3<=D&&ee.bl_tree[2*O[D]+1]===0;D--);return ee.opt_len+=3*(D+1)+5+5+4,D})(P),V=P.opt_len+3+7>>>3,(oe=P.static_len+3+7>>>3)<=V&&(V=oe)):V=oe=Z+5,Z+4<=V&&q!==-1?R(P,q,Z,J):P.strategy===4||oe===V?(se(P,2+(J?1:0),3),ke(P,$,E)):(se(P,4+(J?1:0),3),(function(ee,D,X,ae){var ge;for(se(ee,D-257,5),se(ee,X-1,5),se(ee,ae-4,4),ge=0;ge<ae;ge++)se(ee,ee.bl_tree[2*O[ge]+1],3);te(ee,ee.dyn_ltree,D-1),te(ee,ee.dyn_dtree,X-1)})(P,P.l_desc.max_code+1,P.d_desc.max_code+1,Y+1),ke(P,P.dyn_ltree,P.dyn_dtree)),de(P),J&&pe(P)},o._tr_tally=function(P,q,Z){return P.pending_buf[P.d_buf+2*P.last_lit]=q>>>8&255,P.pending_buf[P.d_buf+2*P.last_lit+1]=255&q,P.pending_buf[P.l_buf+P.last_lit]=255&Z,P.last_lit++,q===0?P.dyn_ltree[2*Z]++:(P.matches++,q--,P.dyn_ltree[2*(w[Z]+f+1)]++,P.dyn_dtree[2*K(q)]++),P.last_lit===P.lit_bufsize-1},o._tr_align=function(P){se(P,2,3),re(P,k,$),(function(q){q.bi_valid===16?(z(q,q.bi_buf),q.bi_buf=0,q.bi_valid=0):8<=q.bi_valid&&(q.pending_buf[q.pending++]=255&q.bi_buf,q.bi_buf>>=8,q.bi_valid-=8)})(P)}},{"../utils/common":41}],53:[function(n,r,o){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,o){(function(s){(function(i,l){if(!i.setImmediate){var c,u,d,f,h=1,p={},b=!1,m=i.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(i);g=g&&g.setTimeout?g:i,c={}.toString.call(i.process)==="[object process]"?function(S){process.nextTick(function(){v(S)})}:(function(){if(i.postMessage&&!i.importScripts){var S=!0,C=i.onmessage;return i.onmessage=function(){S=!1},i.postMessage("","*"),i.onmessage=C,S}})()?(f="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",k,!1):i.attachEvent("onmessage",k),function(S){i.postMessage(f+S,"*")}):i.MessageChannel?((d=new MessageChannel).port1.onmessage=function(S){v(S.data)},function(S){d.port2.postMessage(S)}):m&&"onreadystatechange"in m.createElement("script")?(u=m.documentElement,function(S){var C=m.createElement("script");C.onreadystatechange=function(){v(S),C.onreadystatechange=null,u.removeChild(C),C=null},u.appendChild(C)}):function(S){setTimeout(v,0,S)},g.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var C=new Array(arguments.length-1),j=0;j<C.length;j++)C[j]=arguments[j+1];var N={callback:S,args:C};return p[h]=N,c(h),h++},g.clearImmediate=y}function y(S){delete p[S]}function v(S){if(b)setTimeout(v,0,S);else{var C=p[S];if(C){b=!0;try{(function(j){var N=j.callback,T=j.args;switch(T.length){case 0:N();break;case 1:N(T[0]);break;case 2:N(T[0],T[1]);break;case 3:N(T[0],T[1],T[2]);break;default:N.apply(l,T)}})(C)}finally{y(S),b=!1}}}}function k(S){S.source===i&&typeof S.data=="string"&&S.data.indexOf(f)===0&&v(+S.data.slice(f.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof Yr<"u"?Yr:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Rs)),Rs.exports}var n2=t2();const r2=da(n2),yf="[REDACTED]",o2=/(^|[-_])(api[-_]?key|authorization|cookie|token|secret|password|access[-_]?token|refresh[-_]?token)([-_]|$)/i,s2=[/Bearer\s+[A-Za-z0-9._~+/=-]{12,}/gi,/\bsk-[A-Za-z0-9_-]{12,}\b/g,/\bsk-ant-[A-Za-z0-9_-]{12,}\b/g,/\bghp_[A-Za-z0-9_]{12,}\b/g,/\bglpat-[A-Za-z0-9_-]{12,}\b/g],Ql=200,i2=25e6,ec=50;function a2(e){return e<1024?`${e} chars`:e<1024*1024?`${Math.ceil(e/1024)} KB`:`${Math.ceil(e/(1024*1024))} MB`}function l2(e){let t=0;for(const n of e)t+=n.rawRequestBody?.length??0,t+=n.responseText?.length??0;return t}function c2(e){if(e.length>Ql)return`Export is limited to ${Ql} logs at once. Narrow the filter and try again.`;const t=l2(e);return t>i2?`Export is too large (${a2(t)} of text). Narrow the filter and try again.`:null}async function u2(e){try{const t=await fetch(`/api/logs/${e}/chunks`);if(!t.ok)return null;const n=await t.json();return JSON.stringify(n,null,2)}catch{return null}}function d2(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ci(e){if(Array.isArray(e))return e.map(n=>Ci(n));if(!d2(e))return e;const t={};for(const[n,r]of Object.entries(e))t[n]=o2.test(n)?yf:Ci(r);return t}function f2(e){const t=n=>{let r=n;for(const o of s2)r=r.replace(o,yf);return r};try{const n=JSON.parse(e);return t(JSON.stringify(Ci(n),null,2))}catch{return t(e)}}function Os(e,t){return t==="redacted"?f2(e):e}async function p2(e,t="redacted"){const n=c2(e);if(n!==null)return{ok:!1,message:n};const r=new r2,o=t==="redacted"?"redacted":"raw",s=e.filter(u=>u.streaming).slice(0,ec);r.file("manifest.json",JSON.stringify({exportedAt:new Date().toISOString(),mode:t,redacted:t==="redacted",logCount:e.length,logIds:e.map(u=>u.id),streamingChunkExportLimit:ec,streamingChunkLogIds:s.map(u=>u.id)},null,2));for(const u of e)u.rawRequestBody!==null&&r.file(`#${u.id}.Request.json`,Os(u.rawRequestBody,t)),u.responseText!==null&&r.file(`#${u.id}.Response.json`,Os(u.responseText,t));for(const u of s){const d=await u2(u.id);d!==null&&r.file(`#${u.id}.SSE.Response.json`,Os(d,t))}const i=await r.generateAsync({type:"blob"}),l=URL.createObjectURL(i),c=document.createElement("a");return c.href=l,c.download=`agent-inspector-export-${o}-${new Date().toISOString().slice(0,10)}.zip`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(l),{ok:!0}}function ji(e,t){switch(t){case"full":return e;case"time":return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}}function Ea(e,t,n){return`${ji(e,n)} - ${ji(t,n)}`}function bf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=bf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function vf(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=bf(e))&&(r&&(r+=" "),r+=t);return r}const h2=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},m2=(e,t)=>({classGroupId:e,validator:t}),wf=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Po="-",tc=[],g2="arbitrary..",x2=e=>{const t=b2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return y2(i);const l=i.split(Po),c=l[0]===""&&l.length>1?1:0;return kf(l,c,t)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=r[i],u=n[i];return c?u?h2(u,c):c:u||tc}return n[i]||tc}}},kf=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const u=kf(e,t+1,s);if(u)return u}const i=n.validators;if(i===null)return;const l=t===0?e.join(Po):e.slice(t).join(Po),c=i.length;for(let u=0;u<c;u++){const d=i[u];if(d.validator(l))return d.classGroupId}},y2=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?g2+r:void 0})(),b2=e=>{const{theme:t,classGroups:n}=e;return v2(n,t)},v2=(e,t)=>{const n=wf();for(const r in e){const o=e[r];Na(o,n,r,t)}return n},Na=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];w2(i,t,n,r)}},w2=(e,t,n,r)=>{if(typeof e=="string"){k2(e,t,n);return}if(typeof e=="function"){_2(e,t,n,r);return}S2(e,t,n,r)},k2=(e,t,n)=>{const r=e===""?t:_f(t,e);r.classGroupId=n},_2=(e,t,n,r)=>{if(C2(e)){Na(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(m2(n,e))},S2=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[l,c]=o[i];Na(c,_f(t,l),n,r)}},_f=(e,t)=>{let n=e;const r=t.split(Po),o=r.length;for(let s=0;s<o;s++){const i=r[s];let l=n.nextPart.get(i);l||(l=wf(),n.nextPart.set(i,l)),n=l}return n},C2=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,j2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return o(s,i),i},set(s,i){s in n?n[s]=i:o(s,i)}}},Ei="!",nc=":",E2=[],rc=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),N2=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,l=0,c=0,u;const d=o.length;for(let m=0;m<d;m++){const g=o[m];if(i===0&&l===0){if(g===nc){s.push(o.slice(c,m)),c=m+1;continue}if(g==="/"){u=m;continue}}g==="["?i++:g==="]"?i--:g==="("?l++:g===")"&&l--}const f=s.length===0?o:o.slice(c);let h=f,p=!1;f.endsWith(Ei)?(h=f.slice(0,-1),p=!0):f.startsWith(Ei)&&(h=f.slice(1),p=!0);const b=u&&u>c?u-c:void 0;return rc(s,p,h,b)};if(t){const o=t+nc,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):rc(E2,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},T2=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const i=n[s],l=i[0]==="[",c=t.has(i);l||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},A2=e=>({cache:j2(e.cacheSize),parseClassName:N2(e),sortModifiers:T2(e),...x2(e)}),I2=/\s+/,z2=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],l=e.trim().split(I2);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:h,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:m}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let g=!!m,y=r(g?b.substring(0,m):b);if(!y){if(!g){c=d+(c.length>0?" "+c:c);continue}if(y=r(b),!y){c=d+(c.length>0?" "+c:c);continue}g=!1}const v=h.length===0?"":h.length===1?h[0]:s(h).join(":"),k=p?v+Ei:v,S=k+y;if(i.indexOf(S)>-1)continue;i.push(S);const C=o(y,g);for(let j=0;j<C.length;++j){const N=C[j];i.push(k+N)}c=d+(c.length>0?" "+c:c)}return c},P2=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Sf(n))&&(o&&(o+=" "),o+=r);return o},Sf=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Sf(e[r]))&&(n&&(n+=" "),n+=t);return n},R2=(e,...t)=>{let n,r,o,s;const i=c=>{const u=t.reduce((d,f)=>f(d),e());return n=A2(u),r=n.cache.get,o=n.cache.set,s=l,l(c)},l=c=>{const u=r(c);if(u)return u;const d=z2(c,n);return o(c,d),d};return s=i,(...c)=>s(P2(...c))},O2=[],Qe=e=>{const t=n=>n[e]||O2;return t.isThemeGetter=!0,t},Cf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,M2=/^\d+\/\d+$/,L2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,D2=/\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$/,F2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,B2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pn=e=>M2.test(e),Ae=e=>!!e&&!Number.isNaN(Number(e)),nn=e=>!!e&&Number.isInteger(Number(e)),Ms=e=>e.endsWith("%")&&Ae(e.slice(0,-1)),Kt=e=>L2.test(e),U2=()=>!0,W2=e=>D2.test(e)&&!F2.test(e),Ef=()=>!1,V2=e=>$2.test(e),H2=e=>B2.test(e),Z2=e=>!ye(e)&&!be(e),q2=e=>sr(e,Af,Ef),ye=e=>Cf.test(e),yn=e=>sr(e,If,W2),Ls=e=>sr(e,X2,Ae),oc=e=>sr(e,Nf,Ef),K2=e=>sr(e,Tf,H2),ro=e=>sr(e,zf,V2),be=e=>jf.test(e),hr=e=>ir(e,If),J2=e=>ir(e,Q2),sc=e=>ir(e,Nf),G2=e=>ir(e,Af),Y2=e=>ir(e,Tf),oo=e=>ir(e,zf,!0),sr=(e,t,n)=>{const r=Cf.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ir=(e,t,n=!1)=>{const r=jf.exec(e);return r?r[1]?t(r[1]):n:!1},Nf=e=>e==="position"||e==="percentage",Tf=e=>e==="image"||e==="url",Af=e=>e==="length"||e==="size"||e==="bg-size",If=e=>e==="length",X2=e=>e==="number",Q2=e=>e==="family-name",zf=e=>e==="shadow",ek=()=>{const e=Qe("color"),t=Qe("font"),n=Qe("text"),r=Qe("font-weight"),o=Qe("tracking"),s=Qe("leading"),i=Qe("breakpoint"),l=Qe("container"),c=Qe("spacing"),u=Qe("radius"),d=Qe("shadow"),f=Qe("inset-shadow"),h=Qe("text-shadow"),p=Qe("drop-shadow"),b=Qe("blur"),m=Qe("perspective"),g=Qe("aspect"),y=Qe("ease"),v=Qe("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),be,ye],j=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],T=()=>[be,ye,c],A=()=>[Pn,"full","auto",...T()],O=()=>[nn,"none","subgrid",be,ye],$=()=>["auto",{span:["full",nn,be,ye]},nn,be,ye],E=()=>[nn,"auto",be,ye],L=()=>["auto","min","max","fr",be,ye],w=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],M=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...T()],F=()=>[Pn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],B=()=>[e,be,ye],G=()=>[...S(),sc,oc,{position:[be,ye]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",G2,q2,{size:[be,ye]}],K=()=>[Ms,hr,yn],z=()=>["","none","full",u,be,ye],se=()=>["",Ae,hr,yn],re=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[Ae,Ms,sc,oc],de=()=>["","none",b,be,ye],pe=()=>["none",Ae,be,ye],he=()=>["none",Ae,be,ye],me=()=>[Ae,be,ye],ke=()=>[Pn,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Kt],breakpoint:[Kt],color:[U2],container:[Kt],"drop-shadow":[Kt],ease:["in","out","in-out"],font:[Z2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Kt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Kt],shadow:[Kt],spacing:["px",Ae],text:[Kt],"text-shadow":[Kt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pn,ye,be,g]}],container:["container"],columns:[{columns:[Ae,ye,be,l]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[nn,"auto",be,ye]}],basis:[{basis:[Pn,"full","auto",l,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,Pn,"auto","initial","none",ye]}],grow:[{grow:["",Ae,be,ye]}],shrink:[{shrink:["",Ae,be,ye]}],order:[{order:[nn,"first","last","none",be,ye]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...w(),"normal"]}],"justify-items":[{"justify-items":[...M(),"normal"]}],"justify-self":[{"justify-self":["auto",...M()]}],"align-content":[{content:["normal",...w()]}],"align-items":[{items:[...M(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...M(),{baseline:["","last"]}]}],"place-content":[{"place-content":w()}],"place-items":[{"place-items":[...M(),"baseline"]}],"place-self":[{"place-self":["auto",...M()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[l,"screen",...F()]}],"min-w":[{"min-w":[l,"screen","none",...F()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,hr,yn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,be,Ls]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ms,ye]}],"font-family":[{font:[J2,ye,t]}],"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:[o,be,ye]}],"line-clamp":[{"line-clamp":[Ae,"none",be,Ls]}],leading:[{leading:[s,...T()]}],"list-image":[{"list-image":["none",be,ye]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ye]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",be,yn]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[Ae,"auto",be,ye]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be,ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},nn,be,ye],radial:["",be,ye],conic:[nn,be,ye]},Y2,K2]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,be,ye]}],"outline-w":[{outline:["",Ae,hr,yn]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",d,oo,ro]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",f,oo,ro]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[Ae,yn]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",h,oo,ro]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[Ae,be,ye]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[be,ye]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ye]}],filter:[{filter:["","none",be,ye]}],blur:[{blur:de()}],brightness:[{brightness:[Ae,be,ye]}],contrast:[{contrast:[Ae,be,ye]}],"drop-shadow":[{"drop-shadow":["","none",p,oo,ro]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",Ae,be,ye]}],"hue-rotate":[{"hue-rotate":[Ae,be,ye]}],invert:[{invert:["",Ae,be,ye]}],saturate:[{saturate:[Ae,be,ye]}],sepia:[{sepia:["",Ae,be,ye]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ye]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,be,ye]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,be,ye]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,be,ye]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,be,ye]}],"backdrop-invert":[{"backdrop-invert":["",Ae,be,ye]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,be,ye]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,be,ye]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,be,ye]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ye]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",be,ye]}],ease:[{ease:["linear","initial",y,be,ye]}],delay:[{delay:[Ae,be,ye]}],animate:[{animate:["none",v,be,ye]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,be,ye]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:me()}],"skew-x":[{"skew-x":me()}],"skew-y":[{"skew-y":me()}],transform:[{transform:[be,ye,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",be,ye]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",be,ye]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[Ae,hr,yn,Ls]}],stroke:[{stroke:["none",...B()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},tk=R2(ek);function ve(...e){return tk(vf(e))}function Ve(e){return e>=1e6?(e/1e6).toFixed(1).replace(/\.0$/,"")+"M":(e/1e3).toFixed(1).replace(/\.0$/,"")+"K"}function Pf(e){return e>=1024*1024?(e/(1024*1024)).toFixed(1).replace(/\.0$/,"")+"M":(e/1024).toFixed(1).replace(/\.0$/,"")+"K"}function ic(e,t,n){const r=e*10;return!Number.isSafeInteger(r)||r%t!==0?null:(r/t/10).toFixed(1).replace(/\.0$/,"")+n}function nk(e){if(!Number.isSafeInteger(e)||e<=0)return e.toString();if(e>=1024*1024){const n=ic(e,1048576,"M");if(n!==null)return n}const t=ic(e,1024,"K");return t!==null?t:e.toString()}function rk(e){if(e===void 0||e==="")return 1;switch(e.toLowerCase()){case"k":return 1024;case"m":return 1024*1024;default:return null}}function Ro(e){const t=e.trim().replaceAll(",","");if(t==="")return null;const n=/^(\d+(?:\.\d+)?)\s*([kKmM])?$/.exec(t);if(n===null)return null;const r=n[1];if(r===void 0)return null;const o=Number(r),s=n[2],i=rk(s);if(!Number.isFinite(o)||o<=0||i===null||(s===void 0||s==="")&&!Number.isInteger(o))return null;const l=Math.round(o*i);return!Number.isSafeInteger(l)||l<=0?null:l}function ok(e){return e===null?"pending":e>=200&&e<300?"success":e>=400&&e<500?"client_error":e>=500?"server_error":"pending"}const sk=le({model:W().min(1),contextWindow:fe().int().positive().optional(),outputLimit:fe().int().positive().optional(),source:Xe(["manual","registry"]).optional(),sourceUrl:W().optional(),updatedAt:W().optional()}),Oo=le({id:W(),name:W(),apiKey:W(),model:W().optional(),models:Ce(W()).min(1),format:Xe(["anthropic","openai"]).optional(),baseUrl:W().optional(),anthropicBaseUrl:W().optional(),openaiBaseUrl:W().optional(),authHeader:Xe(["bearer","x-api-key"]).optional().default("bearer"),apiDocsUrl:W().optional(),modelMetadataUrl:W().optional(),modelMetadata:Ce(sk).optional(),source:Xe(["company","personal"]).optional(),createdAt:W(),updatedAt:W()});async function ik(e){return Ur(e,Oo.array(),void 0,t=>`Failed to fetch ${e}: ${t.status}`)}function Rf(){const e=ua("/api/providers?includeSecrets=1",ik,{revalidateOnFocus:!1,revalidateIfStale:!1});return{providers:e.data??[],isLoading:e.isLoading,isError:e.error,mutate:e.mutate}}const ak="2.0.30",lk={version:ak},ac=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,lc=vf,Ta=(e,t)=>n=>{var r;if(t?.variants==null)return lc(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const d=n?.[u],f=s?.[u];if(d===null)return null;const h=ac(d)||ac(f);return o[u][h]}),l=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(b=>{let[m,g]=b;return Array.isArray(g)?g.includes({...s,...l}[m]):{...s,...l}[m]===g})?[...u,f,h]:u},[]);return lc(e,i,c,n?.class,n?.className)};function cc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Of(...e){return t=>{let n=!1;const r=e.map(o=>{const s=cc(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():cc(e[o],null)}}}}function Le(...e){return x.useCallback(Of(...e),e)}function er(e){const t=uk(e),n=x.forwardRef((r,o)=>{const{children:s,...i}=r,l=x.Children.toArray(s),c=l.find(fk);if(c){const u=c.props.children,d=l.map(f=>f===c?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:f);return a.jsx(t,{...i,ref:o,children:x.isValidElement(u)?x.cloneElement(u,void 0,d):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var ck=er("Slot");function uk(e){const t=x.forwardRef((n,r)=>{const{children:o,...s}=n;if(x.isValidElement(o)){const i=hk(o),l=pk(s,o.props);return o.type!==x.Fragment&&(l.ref=r?Of(r,i):i),x.cloneElement(o,l)}return x.Children.count(o)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Mf=Symbol("radix.slottable");function dk(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Mf,t}function fk(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Mf}function pk(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function hk(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Te=mk.reduce((e,t)=>{const n=er(`Primitive.${t}`),r=x.forwardRef((o,s)=>{const{asChild:i,...l}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function gk(e,t){e&&Br.flushSync(()=>e.dispatchEvent(t))}var Lf=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),xk="VisuallyHidden",Df=x.forwardRef((e,t)=>a.jsx(Te.span,{...e,ref:t,style:{...Lf,...e.style}}));Df.displayName=xk;var yk=Df;function bk(e,t){const n=x.createContext(t),r=s=>{const{children:i,...l}=s,c=x.useMemo(()=>l,Object.values(l));return a.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=x.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function tn(e,t=[]){let n=[];function r(s,i){const l=x.createContext(i),c=n.length;n=[...n,i];const u=f=>{const{scope:h,children:p,...b}=f,m=h?.[e]?.[c]||l,g=x.useMemo(()=>b,Object.values(b));return a.jsx(m.Provider,{value:g,children:p})};u.displayName=s+"Provider";function d(f,h){const p=h?.[e]?.[c]||l,b=x.useContext(p);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(i=>x.createContext(i));return function(l){const c=l?.[e]||s;return x.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,vk(o,...t)]}function vk(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ff(e){const t=e+"CollectionProvider",[n,r]=tn(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:g,children:y}=m,v=lt.useRef(null),k=lt.useRef(new Map).current;return a.jsx(o,{scope:g,itemMap:k,collectionRef:v,children:y})};i.displayName=t;const l=e+"CollectionSlot",c=er(l),u=lt.forwardRef((m,g)=>{const{scope:y,children:v}=m,k=s(l,y),S=Le(g,k.collectionRef);return a.jsx(c,{ref:S,children:v})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=er(d),p=lt.forwardRef((m,g)=>{const{scope:y,children:v,...k}=m,S=lt.useRef(null),C=Le(g,S),j=s(d,y);return lt.useEffect(()=>(j.itemMap.set(S,{ref:S,...k}),()=>{j.itemMap.delete(S)})),a.jsx(h,{[f]:"",ref:C,children:v})});p.displayName=d;function b(m){const g=s(e+"CollectionConsumer",m);return lt.useCallback(()=>{const v=g.collectionRef.current;if(!v)return[];const k=Array.from(v.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((j,N)=>k.indexOf(j.ref.current)-k.indexOf(N.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:u,ItemSlot:p},b,r]}function _e(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var tt=globalThis?.document?x.useLayoutEffect:()=>{},wk=gd[" useInsertionEffect ".trim().toString()]||tt;function _n({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=kk({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o;{const d=x.useRef(e!==void 0);x.useEffect(()=>{const f=d.current;f!==l&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${l?"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.`),d.current=l},[l,r])}const u=x.useCallback(d=>{if(l){const f=_k(d)?d(e):d;f!==e&&i.current?.(f)}else s(d)},[l,e,s,i]);return[c,u]}function kk({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),o=x.useRef(n),s=x.useRef(t);return wk(()=>{s.current=t},[t]),x.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function _k(e){return typeof e=="function"}function Sk(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var vt=e=>{const{present:t,children:n}=e,r=Ck(t),o=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),s=Le(r.ref,jk(o));return typeof n=="function"||r.isPresent?x.cloneElement(o,{ref:s}):null};vt.displayName="Presence";function Ck(e){const[t,n]=x.useState(),r=x.useRef(null),o=x.useRef(e),s=x.useRef("none"),i=e?"mounted":"unmounted",[l,c]=Sk(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=so(r.current);s.current=l==="mounted"?u:"none"},[l]),tt(()=>{const u=r.current,d=o.current;if(d!==e){const h=s.current,p=so(u);e?c("MOUNT"):p==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),tt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const m=so(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(c("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=p=>{p.target===t&&(s.current=so(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:x.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function so(e){return e?.animationName||"none"}function jk(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ek=gd[" useId ".trim().toString()]||(()=>{}),Nk=0;function Dt(e){const[t,n]=x.useState(Ek());return tt(()=>{n(r=>r??String(Nk++))},[e]),e||(t?`radix-${t}`:"")}var as="Collapsible",[Tk]=tn(as),[Ak,Aa]=Tk(as),$f=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...l}=e,[c,u]=_n({prop:r,defaultProp:o??!1,onChange:i,caller:as});return a.jsx(Ak,{scope:n,disabled:s,contentId:Dt(),open:c,onOpenToggle:x.useCallback(()=>u(d=>!d),[u]),children:a.jsx(Te.div,{"data-state":za(c),"data-disabled":s?"":void 0,...l,ref:t})})});$f.displayName=as;var Bf="CollapsibleTrigger",Uf=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Aa(Bf,n);return a.jsx(Te.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":za(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:_e(e.onClick,o.onOpenToggle)})});Uf.displayName=Bf;var Ia="CollapsibleContent",Wf=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Aa(Ia,e.__scopeCollapsible);return a.jsx(vt,{present:n||o.open,children:({present:s})=>a.jsx(Ik,{...r,ref:t,present:s})})});Wf.displayName=Ia;var Ik=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,i=Aa(Ia,n),[l,c]=x.useState(r),u=x.useRef(null),d=Le(t,u),f=x.useRef(0),h=f.current,p=x.useRef(0),b=p.current,m=i.open||l,g=x.useRef(m),y=x.useRef(void 0);return x.useEffect(()=>{const v=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(v)},[]),tt(()=>{const v=u.current;if(v){y.current=y.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const k=v.getBoundingClientRect();f.current=k.height,p.current=k.width,g.current||(v.style.transitionDuration=y.current.transitionDuration,v.style.animationName=y.current.animationName),c(r)}},[i.open,r]),a.jsx(Te.div,{"data-state":za(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...s,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:m&&o})});function za(e){return e?"open":"closed"}var zk=$f,Pk=x.createContext(void 0);function ls(e){const t=x.useContext(Pk);return e||t||"ltr"}function st(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>t.current?.(...n),[])}function Rk(e,t=globalThis?.document){const n=st(e);x.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ok="DismissableLayer",Ni="dismissableLayer.update",Mk="dismissableLayer.pointerDownOutside",Lk="dismissableLayer.focusOutside",uc,Vf=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cs=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...c}=e,u=x.useContext(Vf),[d,f]=x.useState(null),h=d?.ownerDocument??globalThis?.document,[,p]=x.useState({}),b=Le(t,N=>f(N)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),v=d?m.indexOf(d):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,S=v>=y,C=$k(N=>{const T=N.target,A=[...u.branches].some(O=>O.contains(T));!S||A||(o?.(N),i?.(N),N.defaultPrevented||l?.())},h),j=Bk(N=>{const T=N.target;[...u.branches].some(O=>O.contains(T))||(s?.(N),i?.(N),N.defaultPrevented||l?.())},h);return Rk(N=>{v===u.layers.size-1&&(r?.(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},h),x.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(uc=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),dc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=uc)}},[d,h,n,u]),x.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),dc())},[d,u]),x.useEffect(()=>{const N=()=>p({});return document.addEventListener(Ni,N),()=>document.removeEventListener(Ni,N)},[]),a.jsx(Te.div,{...c,ref:b,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:_e(e.onFocusCapture,j.onFocusCapture),onBlurCapture:_e(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:_e(e.onPointerDownCapture,C.onPointerDownCapture)})});cs.displayName=Ok;var Dk="DismissableLayerBranch",Fk=x.forwardRef((e,t)=>{const n=x.useContext(Vf),r=x.useRef(null),o=Le(t,r);return x.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),a.jsx(Te.div,{...e,ref:o})});Fk.displayName=Dk;function $k(e,t=globalThis?.document){const n=st(e),r=x.useRef(!1),o=x.useRef(()=>{});return x.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let c=function(){Hf(Mk,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Bk(e,t=globalThis?.document){const n=st(e),r=x.useRef(!1);return x.useEffect(()=>{const o=s=>{s.target&&!r.current&&Hf(Lk,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function dc(){const e=new CustomEvent(Ni);document.dispatchEvent(e)}function Hf(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?gk(o,s):o.dispatchEvent(s)}var Ds="focusScope.autoFocusOnMount",Fs="focusScope.autoFocusOnUnmount",fc={bubbles:!1,cancelable:!0},Uk="FocusScope",Pa=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[l,c]=x.useState(null),u=st(o),d=st(s),f=x.useRef(null),h=Le(t,m=>c(m)),p=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let m=function(k){if(p.paused||!l)return;const S=k.target;l.contains(S)?f.current=S:sn(f.current,{select:!0})},g=function(k){if(p.paused||!l)return;const S=k.relatedTarget;S!==null&&(l.contains(S)||sn(f.current,{select:!0}))},y=function(k){if(document.activeElement===document.body)for(const C of k)C.removedNodes.length>0&&sn(l)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const v=new MutationObserver(y);return l&&v.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),v.disconnect()}}},[r,l,p.paused]),x.useEffect(()=>{if(l){hc.add(p);const m=document.activeElement;if(!l.contains(m)){const y=new CustomEvent(Ds,fc);l.addEventListener(Ds,u),l.dispatchEvent(y),y.defaultPrevented||(Wk(Kk(Zf(l)),{select:!0}),document.activeElement===m&&sn(l))}return()=>{l.removeEventListener(Ds,u),setTimeout(()=>{const y=new CustomEvent(Fs,fc);l.addEventListener(Fs,d),l.dispatchEvent(y),y.defaultPrevented||sn(m??document.body,{select:!0}),l.removeEventListener(Fs,d),hc.remove(p)},0)}}},[l,u,d,p]);const b=x.useCallback(m=>{if(!n&&!r||p.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){const v=m.currentTarget,[k,S]=Vk(v);k&&S?!m.shiftKey&&y===S?(m.preventDefault(),n&&sn(k,{select:!0})):m.shiftKey&&y===k&&(m.preventDefault(),n&&sn(S,{select:!0})):y===v&&m.preventDefault()}},[n,r,p.paused]);return a.jsx(Te.div,{tabIndex:-1,...i,ref:h,onKeyDown:b})});Pa.displayName=Uk;function Wk(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(sn(r,{select:t}),document.activeElement!==n)return}function Vk(e){const t=Zf(e),n=pc(t,e),r=pc(t.reverse(),e);return[n,r]}function Zf(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pc(e,t){for(const n of e)if(!Hk(n,{upTo:t}))return n}function Hk(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Zk(e){return e instanceof HTMLInputElement&&"select"in e}function sn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Zk(e)&&t&&e.select()}}var hc=qk();function qk(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=mc(e,t),e.unshift(t)},remove(t){e=mc(e,t),e[0]?.resume()}}}function mc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Kk(e){return e.filter(t=>t.tagName!=="A")}var Jk="Portal",us=x.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=x.useState(!1);tt(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Ag.createPortal(a.jsx(Te.div,{...r,ref:t}),i):null});us.displayName=Jk;var $s=0;function qf(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??gc()),document.body.insertAdjacentElement("beforeend",e[1]??gc()),$s++,()=>{$s===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),$s--}},[])}function gc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ot=function(){return Ot=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ot.apply(this,arguments)};function Kf(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Gk(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var wo="right-scroll-bar-position",ko="width-before-scroll-bar",Yk="with-scroll-bars-hidden",Xk="--removed-body-scroll-bar-size";function Bs(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Qk(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var e_=typeof window<"u"?x.useLayoutEffect:x.useEffect,xc=new WeakMap;function t_(e,t){var n=Qk(null,function(r){return e.forEach(function(o){return Bs(o,r)})});return e_(function(){var r=xc.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(l){s.has(l)||Bs(l,null)}),s.forEach(function(l){o.has(l)||Bs(l,i)})}xc.set(n,e)},[e]),n}function n_(e){return e}function r_(e,t){t===void 0&&(t=n_);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(l){return l!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var l=n;n=[],l.forEach(s),i=n}var c=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function o_(e){e===void 0&&(e={});var t=r_(null);return t.options=Ot({async:!0,ssr:!1},e),t}var Jf=function(e){var t=e.sideCar,n=Kf(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,Ot({},n))};Jf.isSideCarExport=!0;function s_(e,t){return e.useMedium(t),Jf}var Gf=o_(),Us=function(){},ds=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:Us,onWheelCapture:Us,onTouchMoveCapture:Us}),o=r[0],s=r[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noRelative,b=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,k=e.gapMode,S=Kf(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,j=t_([n,t]),N=Ot(Ot({},S),o);return x.createElement(x.Fragment,null,d&&x.createElement(C,{sideCar:Gf,removeScrollBar:u,shards:f,noRelative:p,noIsolation:b,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:k}),i?x.cloneElement(x.Children.only(l),Ot(Ot({},N),{ref:j})):x.createElement(v,Ot({},N,{className:c,ref:j}),l))});ds.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ds.classNames={fullWidth:ko,zeroRight:wo};var i_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function a_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=i_();return t&&e.setAttribute("nonce",t),e}function l_(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function c_(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var u_=function(){var e=0,t=null;return{add:function(n){e==0&&(t=a_())&&(l_(t,n),c_(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},d_=function(){var e=u_();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Yf=function(){var e=d_(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},f_={left:0,top:0,right:0,gap:0},Ws=function(e){return parseInt(e||"",10)||0},p_=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ws(n),Ws(r),Ws(o)]},h_=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return f_;var t=p_(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},m_=Yf(),Zn="data-scroll-locked",g_=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
42
42
|
.`.concat(Yk,` {
|
|
43
43
|
overflow: hidden `).concat(r,`;
|
|
44
44
|
padding-right: `).concat(l,"px ").concat(r,`;
|
|
@@ -82,7 +82,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
82
82
|
|
|
83
83
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
84
84
|
|
|
85
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},W_="DialogDescriptionWarning",V_=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${xp(W_).contentName}}.`;return x.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},H_=op,Z_=ip,q_=lp,K_=cp,J_=up,G_=fp,Y_=mp;function X_(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Q_(e){const[t,n]=x.useState(void 0);return tt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;n({width:i,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const eS=["top","right","bottom","left"],un=Math.min,mt=Math.max,Lo=Math.round,uo=Math.floor,Ft=e=>({x:e,y:e}),tS={left:"right",right:"left",bottom:"top",top:"bottom"},nS={start:"end",end:"start"};function Ai(e,t,n){return mt(e,un(t,n))}function Gt(e,t){return typeof e=="function"?e(t):e}function Yt(e){return e.split("-")[0]}function ar(e){return e.split("-")[1]}function Da(e){return e==="x"?"y":"x"}function Fa(e){return e==="y"?"height":"width"}const rS=new Set(["top","bottom"]);function Lt(e){return rS.has(Yt(e))?"y":"x"}function $a(e){return Da(Lt(e))}function oS(e,t,n){n===void 0&&(n=!1);const r=ar(e),o=$a(e),s=Fa(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Do(i)),[i,Do(i)]}function sS(e){const t=Do(e);return[Ii(e),t,Ii(t)]}function Ii(e){return e.replace(/start|end/g,t=>nS[t])}const kc=["left","right"],_c=["right","left"],iS=["top","bottom"],aS=["bottom","top"];function lS(e,t,n){switch(e){case"top":case"bottom":return n?t?_c:kc:t?kc:_c;case"left":case"right":return t?iS:aS;default:return[]}}function cS(e,t,n,r){const o=ar(e);let s=lS(Yt(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ii)))),s}function Do(e){return e.replace(/left|right|bottom|top/g,t=>tS[t])}function uS(e){return{top:0,right:0,bottom:0,left:0,...e}}function yp(e){return typeof e!="number"?uS(e):{top:e,right:e,bottom:e,left:e}}function Fo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Sc(e,t,n){let{reference:r,floating:o}=e;const s=Lt(t),i=$a(t),l=Fa(i),c=Yt(t),u=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(ar(t)){case"start":p[i]-=h*(n&&u?-1:1);break;case"end":p[i]+=h*(n&&u?-1:1);break}return p}async function dS(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Gt(t,e),b=yp(p),g=l[h?f==="floating"?"reference":"floating":f],y=Fo(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),v=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},C=Fo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:k,strategy:c}):v);return{top:(y.top-C.top+b.top)/S.y,bottom:(C.bottom-y.bottom+b.bottom)/S.y,left:(y.left-C.left+b.left)/S.x,right:(C.right-y.right+b.right)/S.x}}const fS=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,l=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Sc(u,r,c),h=r,p={},b=0;for(let g=0;g<l.length;g++){var m;const{name:y,fn:v}=l[g],{x:k,y:S,data:C,reset:j}=await v({x:d,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:u,platform:{...i,detectOverflow:(m=i.detectOverflow)!=null?m:dS},elements:{reference:e,floating:t}});d=k??d,f=S??f,p={...p,[y]:{...p[y],...C}},j&&b<=50&&(b++,typeof j=="object"&&(j.placement&&(h=j.placement),j.rects&&(u=j.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):j.rects),{x:d,y:f}=Sc(u,h,c)),g=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:p}},pS=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Gt(e,t)||{};if(u==null)return{};const f=yp(d),h={x:n,y:r},p=$a(o),b=Fa(p),m=await i.getDimensions(u),g=p==="y",y=g?"top":"left",v=g?"bottom":"right",k=g?"clientHeight":"clientWidth",S=s.reference[b]+s.reference[p]-h[p]-s.floating[b],C=h[p]-s.reference[p],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let N=j?j[k]:0;(!N||!await(i.isElement==null?void 0:i.isElement(j)))&&(N=l.floating[k]||s.floating[b]);const T=S/2-C/2,A=N/2-m[b]/2-1,O=un(f[y],A),$=un(f[v],A),E=O,L=N-m[b]-$,w=N/2-m[b]/2+T,M=Ai(E,w,L),U=!c.arrow&&ar(o)!=null&&w!==M&&s.reference[b]/2-(w<E?O:$)-m[b]/2<0,F=U?w<E?w-E:w-L:0;return{[p]:h[p]+F,data:{[p]:M,centerOffset:w-M-F,...U&&{alignmentOffset:F}},reset:U}}}),hS=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...g}=Gt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Yt(o),v=Lt(l),k=Yt(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=h||(k||!m?[Do(l)]:sS(l)),j=b!=="none";!h&&j&&C.push(...cS(l,m,b,S));const N=[l,...C],T=await c.detectOverflow(t,g),A=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&A.push(T[y]),f){const w=oS(o,i,S);A.push(T[w[0]],T[w[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(w=>w<=0)){var $,E;const w=((($=s.flip)==null?void 0:$.index)||0)+1,M=N[w];if(M&&(!(f==="alignment"?v!==Lt(M):!1)||O.every(B=>Lt(B.placement)===v?B.overflows[0]>0:!0)))return{data:{index:w,overflows:O},reset:{placement:M}};let U=(E=O.filter(F=>F.overflows[0]<=0).sort((F,B)=>F.overflows[1]-B.overflows[1])[0])==null?void 0:E.placement;if(!U)switch(p){case"bestFit":{var L;const F=(L=O.filter(B=>{if(j){const G=Lt(B.placement);return G===v||G==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(G=>G>0).reduce((G,I)=>G+I,0)]).sort((B,G)=>B[1]-G[1])[0])==null?void 0:L[0];F&&(U=F);break}case"initialPlacement":U=l;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function Cc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jc(e){return eS.some(t=>e[t]>=0)}const mS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Gt(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),l=Cc(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:jc(l)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),l=Cc(i,n.floating);return{data:{escapedOffsets:l,escaped:jc(l)}}}default:return{}}}}},bp=new Set(["left","top"]);async function gS(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Yt(n),l=ar(n),c=Lt(n)==="y",u=bp.has(i)?-1:1,d=s&&c?-1:1,f=Gt(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof b=="number"&&(p=l==="end"?b*-1:b),c?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const xS=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:l}=t,c=await gS(t,e);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},yS=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:y=>{let{x:v,y:k}=y;return{x:v,y:k}}},...u}=Gt(e,t),d={x:n,y:r},f=await s.detectOverflow(t,u),h=Lt(Yt(o)),p=Da(h);let b=d[p],m=d[h];if(i){const y=p==="y"?"top":"left",v=p==="y"?"bottom":"right",k=b+f[y],S=b-f[v];b=Ai(k,b,S)}if(l){const y=h==="y"?"top":"left",v=h==="y"?"bottom":"right",k=m+f[y],S=m-f[v];m=Ai(k,m,S)}const g=c.fn({...t,[p]:b,[h]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[h]:l}}}}}},bS=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Gt(e,t),d={x:n,y:r},f=Lt(o),h=Da(f);let p=d[h],b=d[f];const m=Gt(l,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const k=h==="y"?"height":"width",S=s.reference[h]-s.floating[k]+g.mainAxis,C=s.reference[h]+s.reference[k]-g.mainAxis;p<S?p=S:p>C&&(p=C)}if(u){var y,v;const k=h==="y"?"width":"height",S=bp.has(Yt(o)),C=s.reference[f]-s.floating[k]+(S&&((y=i.offset)==null?void 0:y[f])||0)+(S?0:g.crossAxis),j=s.reference[f]+s.reference[k]+(S?0:((v=i.offset)==null?void 0:v[f])||0)-(S?g.crossAxis:0);b<C?b=C:b>j&&(b=j)}return{[h]:p,[f]:b}}}},vS=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:l}=t,{apply:c=()=>{},...u}=Gt(e,t),d=await i.detectOverflow(t,u),f=Yt(o),h=ar(o),p=Lt(o)==="y",{width:b,height:m}=s.floating;let g,y;f==="top"||f==="bottom"?(g=f,y=h===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=f,g=h==="end"?"top":"bottom");const v=m-d.top-d.bottom,k=b-d.left-d.right,S=un(m-d[g],v),C=un(b-d[y],k),j=!t.middlewareData.shift;let N=S,T=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=v),j&&!h){const O=mt(d.left,0),$=mt(d.right,0),E=mt(d.top,0),L=mt(d.bottom,0);p?T=b-2*(O!==0||$!==0?O+$:mt(d.left,d.right)):N=m-2*(E!==0||L!==0?E+L:mt(d.top,d.bottom))}await c({...t,availableWidth:T,availableHeight:N});const A=await i.getDimensions(l.floating);return b!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function ps(){return typeof window<"u"}function lr(e){return vp(e)?(e.nodeName||"").toLowerCase():"#document"}function xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vt(e){var t;return(t=(vp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vp(e){return ps()?e instanceof Node||e instanceof xt(e).Node:!1}function Tt(e){return ps()?e instanceof Element||e instanceof xt(e).Element:!1}function $t(e){return ps()?e instanceof HTMLElement||e instanceof xt(e).HTMLElement:!1}function Ec(e){return!ps()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xt(e).ShadowRoot}const wS=new Set(["inline","contents"]);function Vr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=At(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!wS.has(o)}const kS=new Set(["table","td","th"]);function _S(e){return kS.has(lr(e))}const SS=[":popover-open",":modal"];function hs(e){return SS.some(t=>{try{return e.matches(t)}catch{return!1}})}const CS=["transform","translate","scale","rotate","perspective"],jS=["transform","translate","scale","rotate","perspective","filter"],ES=["paint","layout","strict","content"];function Ba(e){const t=Ua(),n=Tt(e)?At(e):e;return CS.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||jS.some(r=>(n.willChange||"").includes(r))||ES.some(r=>(n.contain||"").includes(r))}function NS(e){let t=dn(e);for(;$t(t)&&!tr(t);){if(Ba(t))return t;if(hs(t))return null;t=dn(t)}return null}function Ua(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const TS=new Set(["html","body","#document"]);function tr(e){return TS.has(lr(e))}function At(e){return xt(e).getComputedStyle(e)}function ms(e){return Tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dn(e){if(lr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ec(e)&&e.host||Vt(e);return Ec(t)?t.host:t}function wp(e){const t=dn(e);return tr(t)?e.ownerDocument?e.ownerDocument.body:e.body:$t(t)&&Vr(t)?t:wp(t)}function Or(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=wp(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=xt(o);if(s){const l=zi(i);return t.concat(i,i.visualViewport||[],Vr(o)?o:[],l&&n?Or(l):[])}return t.concat(o,Or(o,[],n))}function zi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kp(e){const t=At(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=$t(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Lo(n)!==s||Lo(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function Wa(e){return Tt(e)?e:e.contextElement}function qn(e){const t=Wa(e);if(!$t(t))return Ft(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=kp(t);let i=(s?Lo(n.width):n.width)/r,l=(s?Lo(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const AS=Ft(0);function _p(e){const t=xt(e);return!Ua()||!t.visualViewport?AS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function IS(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xt(e)?!1:t}function Cn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Wa(e);let i=Ft(1);t&&(r?Tt(r)&&(i=qn(r)):i=qn(e));const l=IS(s,n,r)?_p(s):Ft(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const h=xt(s),p=r&&Tt(r)?xt(r):r;let b=h,m=zi(b);for(;m&&r&&p!==b;){const g=qn(m),y=m.getBoundingClientRect(),v=At(m),k=y.left+(m.clientLeft+parseFloat(v.paddingLeft))*g.x,S=y.top+(m.clientTop+parseFloat(v.paddingTop))*g.y;c*=g.x,u*=g.y,d*=g.x,f*=g.y,c+=k,u+=S,b=xt(m),m=zi(b)}}return Fo({width:d,height:f,x:c,y:u})}function gs(e,t){const n=ms(e).scrollLeft;return t?t.left+n:Cn(Vt(e)).left+n}function Sp(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-gs(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function zS(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Vt(r),l=t?hs(t.floating):!1;if(r===i||l&&s)return n;let c={scrollLeft:0,scrollTop:0},u=Ft(1);const d=Ft(0),f=$t(r);if((f||!f&&!s)&&((lr(r)!=="body"||Vr(i))&&(c=ms(r)),$t(r))){const p=Cn(r);u=qn(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=i&&!f&&!s?Sp(i,c):Ft(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-c.scrollTop*u.y+d.y+h.y}}function PS(e){return Array.from(e.getClientRects())}function RS(e){const t=Vt(e),n=ms(e),r=e.ownerDocument.body,o=mt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=mt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+gs(e);const l=-n.scrollTop;return At(r).direction==="rtl"&&(i+=mt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:l}}const Nc=25;function OS(e,t){const n=xt(e),r=Vt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(o){s=o.width,i=o.height;const d=Ua();(!d||d&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const u=gs(r);if(u<=0){const d=r.ownerDocument,f=d.body,h=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(r.clientWidth-f.clientWidth-p);b<=Nc&&(s-=b)}else u<=Nc&&(s+=u);return{width:s,height:i,x:l,y:c}}const MS=new Set(["absolute","fixed"]);function LS(e,t){const n=Cn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=$t(e)?qn(e):Ft(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:i,height:l,x:c,y:u}}function Tc(e,t,n){let r;if(t==="viewport")r=OS(e,n);else if(t==="document")r=RS(Vt(e));else if(Tt(t))r=LS(t,n);else{const o=_p(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Fo(r)}function Cp(e,t){const n=dn(e);return n===t||!Tt(n)||tr(n)?!1:At(n).position==="fixed"||Cp(n,t)}function DS(e,t){const n=t.get(e);if(n)return n;let r=Or(e,[],!1).filter(l=>Tt(l)&&lr(l)!=="body"),o=null;const s=At(e).position==="fixed";let i=s?dn(e):e;for(;Tt(i)&&!tr(i);){const l=At(i),c=Ba(i);!c&&l.position==="fixed"&&(o=null),(s?!c&&!o:!c&&l.position==="static"&&!!o&&MS.has(o.position)||Vr(i)&&!c&&Cp(e,i))?r=r.filter(d=>d!==i):o=l,i=dn(i)}return t.set(e,r),r}function FS(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?hs(t)?[]:DS(t,this._c):[].concat(n),r],l=i[0],c=i.reduce((u,d)=>{const f=Tc(t,d,o);return u.top=mt(f.top,u.top),u.right=un(f.right,u.right),u.bottom=un(f.bottom,u.bottom),u.left=mt(f.left,u.left),u},Tc(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function $S(e){const{width:t,height:n}=kp(e);return{width:t,height:n}}function BS(e,t,n){const r=$t(t),o=Vt(t),s=n==="fixed",i=Cn(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=Ft(0);function u(){c.x=gs(o)}if(r||!r&&!s)if((lr(t)!=="body"||Vr(o))&&(l=ms(t)),r){const p=Cn(t,!0,s,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&u();s&&!r&&o&&u();const d=o&&!r&&!s?Sp(o,l):Ft(0),f=i.left+l.scrollLeft-c.x-d.x,h=i.top+l.scrollTop-c.y-d.y;return{x:f,y:h,width:i.width,height:i.height}}function Hs(e){return At(e).position==="static"}function Ac(e,t){if(!$t(e)||At(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vt(e)===n&&(n=n.ownerDocument.body),n}function jp(e,t){const n=xt(e);if(hs(e))return n;if(!$t(e)){let o=dn(e);for(;o&&!tr(o);){if(Tt(o)&&!Hs(o))return o;o=dn(o)}return n}let r=Ac(e,t);for(;r&&_S(r)&&Hs(r);)r=Ac(r,t);return r&&tr(r)&&Hs(r)&&!Ba(r)?n:r||NS(e)||n}const US=async function(e){const t=this.getOffsetParent||jp,n=this.getDimensions,r=await n(e.floating);return{reference:BS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function WS(e){return At(e).direction==="rtl"}const VS={convertOffsetParentRelativeRectToViewportRelativeRect:zS,getDocumentElement:Vt,getClippingRect:FS,getOffsetParent:jp,getElementRects:US,getClientRects:PS,getDimensions:$S,getScale:qn,isElement:Tt,isRTL:WS};function Ep(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function HS(e,t){let n=null,r;const o=Vt(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:p}=u;if(l||t(),!h||!p)return;const b=uo(f),m=uo(o.clientWidth-(d+h)),g=uo(o.clientHeight-(f+p)),y=uo(d),k={rootMargin:-b+"px "+-m+"px "+-g+"px "+-y+"px",threshold:mt(0,un(1,c))||1};let S=!0;function C(j){const N=j[0].intersectionRatio;if(N!==c){if(!S)return i();N?i(!1,N):r=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!Ep(u,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(C,{...k,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,k)}n.observe(e)}return i(!0),s}function ZS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Wa(e),d=o||s?[...u?Or(u):[],...Or(t)]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=u&&l?HS(u,n):null;let h=-1,p=null;i&&(p=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=p)==null||k.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let b,m=c?Cn(e):null;c&&g();function g(){const y=Cn(e);m&&!Ep(m,y)&&n(),m=y,b=requestAnimationFrame(g)}return n(),()=>{var y;d.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),f?.(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(b)}}const qS=xS,KS=yS,JS=hS,GS=vS,YS=mS,Ic=pS,XS=bS,QS=(e,t,n)=>{const r=new Map,o={platform:VS,...n},s={...o.platform,_c:r};return fS(e,t,{...o,platform:s})};var eC=typeof document<"u",tC=function(){},_o=eC?x.useLayoutEffect:tC;function $o(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!$o(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!$o(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Np(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zc(e,t){const n=Np(e);return Math.round(t*n)/n}function Zs(e){const t=x.useRef(e);return _o(()=>{t.current=e}),t}function nC(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=x.useState(r);$o(h,r)||p(r);const[b,m]=x.useState(null),[g,y]=x.useState(null),v=x.useCallback(B=>{B!==j.current&&(j.current=B,m(B))},[]),k=x.useCallback(B=>{B!==N.current&&(N.current=B,y(B))},[]),S=s||b,C=i||g,j=x.useRef(null),N=x.useRef(null),T=x.useRef(d),A=c!=null,O=Zs(c),$=Zs(o),E=Zs(u),L=x.useCallback(()=>{if(!j.current||!N.current)return;const B={placement:t,strategy:n,middleware:h};$.current&&(B.platform=$.current),QS(j.current,N.current,B).then(G=>{const I={...G,isPositioned:E.current!==!1};w.current&&!$o(T.current,I)&&(T.current=I,Br.flushSync(()=>{f(I)}))})},[h,t,n,$,E]);_o(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(B=>({...B,isPositioned:!1})))},[u]);const w=x.useRef(!1);_o(()=>(w.current=!0,()=>{w.current=!1}),[]),_o(()=>{if(S&&(j.current=S),C&&(N.current=C),S&&C){if(O.current)return O.current(S,C,L);L()}},[S,C,L,O,A]);const M=x.useMemo(()=>({reference:j,floating:N,setReference:v,setFloating:k}),[v,k]),U=x.useMemo(()=>({reference:S,floating:C}),[S,C]),F=x.useMemo(()=>{const B={position:n,left:0,top:0};if(!U.floating)return B;const G=zc(U.floating,d.x),I=zc(U.floating,d.y);return l?{...B,transform:"translate("+G+"px, "+I+"px)",...Np(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:I}},[n,l,U.floating,d.x,d.y]);return x.useMemo(()=>({...d,update:L,refs:M,elements:U,floatingStyles:F}),[d,L,M,U,F])}const rC=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ic({element:r.current,padding:o}).fn(n):{}:r?Ic({element:r,padding:o}).fn(n):{}}}},oC=(e,t)=>({...qS(e),options:[e,t]}),sC=(e,t)=>({...KS(e),options:[e,t]}),iC=(e,t)=>({...XS(e),options:[e,t]}),aC=(e,t)=>({...JS(e),options:[e,t]}),lC=(e,t)=>({...GS(e),options:[e,t]}),cC=(e,t)=>({...YS(e),options:[e,t]}),uC=(e,t)=>({...rC(e),options:[e,t]});var dC="Arrow",Tp=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return a.jsx(Te.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Tp.displayName=dC;var fC=Tp,Va="Popper",[Ap,xs]=tn(Va),[pC,Ip]=Ap(Va),zp=e=>{const{__scopePopper:t,children:n}=e,[r,o]=x.useState(null);return a.jsx(pC,{scope:t,anchor:r,onAnchorChange:o,children:n})};zp.displayName=Va;var Pp="PopperAnchor",Rp=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Ip(Pp,n),i=x.useRef(null),l=Le(t,i),c=x.useRef(null);return x.useEffect(()=>{const u=c.current;c.current=r?.current||i.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:a.jsx(Te.div,{...o,ref:l})});Rp.displayName=Pp;var Ha="PopperContent",[hC,mC]=Ap(Ha),Op=x.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:b,...m}=e,g=Ip(Ha,n),[y,v]=x.useState(null),k=Le(t,ie=>v(ie)),[S,C]=x.useState(null),j=Q_(S),N=j?.width??0,T=j?.height??0,A=r+(s!=="center"?"-"+s:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(u)?u:[u],E=$.length>0,L={padding:O,boundary:$.filter(xC),altBoundary:E},{refs:w,floatingStyles:M,placement:U,isPositioned:F,middlewareData:B}=nC({strategy:"fixed",placement:A,whileElementsMounted:(...ie)=>ZS(...ie,{animationFrame:p==="always"}),elements:{reference:g.anchor},middleware:[oC({mainAxis:o+T,alignmentAxis:i}),c&&sC({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?iC():void 0,...L}),c&&aC({...L}),lC({...L,apply:({elements:ie,rects:de,availableWidth:pe,availableHeight:he})=>{const{width:me,height:ke}=de.reference,ze=ie.floating.style;ze.setProperty("--radix-popper-available-width",`${pe}px`),ze.setProperty("--radix-popper-available-height",`${he}px`),ze.setProperty("--radix-popper-anchor-width",`${me}px`),ze.setProperty("--radix-popper-anchor-height",`${ke}px`)}}),S&&uC({element:S,padding:l}),yC({arrowWidth:N,arrowHeight:T}),h&&cC({strategy:"referenceHidden",...L})]}),[G,I]=Dp(U),H=st(b);tt(()=>{F&&H?.()},[F,H]);const K=B.arrow?.x,z=B.arrow?.y,se=B.arrow?.centerOffset!==0,[re,ue]=x.useState();return tt(()=>{y&&ue(window.getComputedStyle(y).zIndex)},[y]),a.jsx("div",{ref:w.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:F?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(hC,{scope:n,placedSide:G,onArrowChange:C,arrowX:K,arrowY:z,shouldHideArrow:se,children:a.jsx(Te.div,{"data-side":G,"data-align":I,...m,ref:k,style:{...m.style,animation:F?void 0:"none"}})})})});Op.displayName=Ha;var Mp="PopperArrow",gC={top:"bottom",right:"left",bottom:"top",left:"right"},Lp=x.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=mC(Mp,r),i=gC[s.placedSide];return a.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:a.jsx(fC,{...o,ref:n,style:{...o.style,display:"block"}})})});Lp.displayName=Mp;function xC(e){return e!==null}var yC=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=Dp(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(o.arrow?.x??0)+l/2,p=(o.arrow?.y??0)+c/2;let b="",m="";return u==="bottom"?(b=i?f:`${h}px`,m=`${-c}px`):u==="top"?(b=i?f:`${h}px`,m=`${r.floating.height+c}px`):u==="right"?(b=`${-c}px`,m=i?f:`${p}px`):u==="left"&&(b=`${r.floating.width+c}px`,m=i?f:`${p}px`),{data:{x:b,y:m}}}});function Dp(e){const[t,n="center"]=e.split("-");return[t,n]}var Fp=zp,$p=Rp,Bp=Op,Up=Lp,qs="rovingFocusGroup.onEntryFocus",bC={bubbles:!1,cancelable:!0},Hr="RovingFocusGroup",[Pi,Wp,vC]=Ff(Hr),[wC,Vp]=tn(Hr,[vC]),[kC,_C]=wC(Hr),Hp=x.forwardRef((e,t)=>a.jsx(Pi.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Pi.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(SC,{...e,ref:t})})}));Hp.displayName=Hr;var SC=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=x.useRef(null),p=Le(t,h),b=ls(s),[m,g]=_n({prop:i,defaultProp:l??null,onChange:c,caller:Hr}),[y,v]=x.useState(!1),k=st(u),S=Wp(n),C=x.useRef(!1),[j,N]=x.useState(0);return x.useEffect(()=>{const T=h.current;if(T)return T.addEventListener(qs,k),()=>T.removeEventListener(qs,k)},[k]),a.jsx(kC,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:m,onItemFocus:x.useCallback(T=>g(T),[g]),onItemShiftTab:x.useCallback(()=>v(!0),[]),onFocusableItemAdd:x.useCallback(()=>N(T=>T+1),[]),onFocusableItemRemove:x.useCallback(()=>N(T=>T-1),[]),children:a.jsx(Te.div,{tabIndex:y||j===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:_e(e.onMouseDown,()=>{C.current=!0}),onFocus:_e(e.onFocus,T=>{const A=!C.current;if(T.target===T.currentTarget&&A&&!y){const O=new CustomEvent(qs,bC);if(T.currentTarget.dispatchEvent(O),!O.defaultPrevented){const $=S().filter(U=>U.focusable),E=$.find(U=>U.active),L=$.find(U=>U.id===m),M=[E,L,...$].filter(Boolean).map(U=>U.ref.current);Kp(M,d)}}C.current=!1}),onBlur:_e(e.onBlur,()=>v(!1))})})}),Zp="RovingFocusGroupItem",qp=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...l}=e,c=Dt(),u=s||c,d=_C(Zp,n),f=d.currentTabStopId===u,h=Wp(n),{onFocusableItemAdd:p,onFocusableItemRemove:b,currentTabStopId:m}=d;return x.useEffect(()=>{if(r)return p(),()=>b()},[r,p,b]),a.jsx(Pi.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:a.jsx(Te.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:_e(e.onMouseDown,g=>{r?d.onItemFocus(u):g.preventDefault()}),onFocus:_e(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:_e(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=EC(g,d.orientation,d.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let k=h().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")k.reverse();else if(y==="prev"||y==="next"){y==="prev"&&k.reverse();const S=k.indexOf(g.currentTarget);k=d.loop?NC(k,S+1):k.slice(S+1)}setTimeout(()=>Kp(k))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:m!=null}):i})})});qp.displayName=Zp;var CC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jC(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function EC(e,t,n){const r=jC(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return CC[r]}function Kp(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function NC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var TC=Hp,AC=qp;function Ri(e,[t,n]){return Math.min(n,Math.max(t,e))}function IC(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Za="ScrollArea",[Jp]=tn(Za),[zC,wt]=Jp(Za),Gp=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...i}=e,[l,c]=x.useState(null),[u,d]=x.useState(null),[f,h]=x.useState(null),[p,b]=x.useState(null),[m,g]=x.useState(null),[y,v]=x.useState(0),[k,S]=x.useState(0),[C,j]=x.useState(!1),[N,T]=x.useState(!1),A=Le(t,$=>c($)),O=ls(o);return a.jsx(zC,{scope:n,type:r,dir:O,scrollHideDelay:s,scrollArea:l,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:p,onScrollbarXChange:b,scrollbarXEnabled:C,onScrollbarXEnabledChange:j,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:N,onScrollbarYEnabledChange:T,onCornerWidthChange:v,onCornerHeightChange:S,children:a.jsx(Te.div,{dir:O,...i,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":k+"px",...e.style}})})});Gp.displayName=Za;var Yp="ScrollAreaViewport",Xp=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,i=wt(Yp,n),l=x.useRef(null),c=Le(t,l,i.onViewportChange);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),a.jsx(Te.div,{"data-radix-scroll-area-viewport":"",...s,ref:c,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:a.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Xp.displayName=Yp;var Ht="ScrollAreaScrollbar",Qp=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=wt(Ht,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,l=e.orientation==="horizontal";return x.useEffect(()=>(l?s(!0):i(!0),()=>{l?s(!1):i(!1)}),[l,s,i]),o.type==="hover"?a.jsx(PC,{...r,ref:t,forceMount:n}):o.type==="scroll"?a.jsx(RC,{...r,ref:t,forceMount:n}):o.type==="auto"?a.jsx(eh,{...r,ref:t,forceMount:n}):o.type==="always"?a.jsx(qa,{...r,ref:t}):null});Qp.displayName=Ht;var PC=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=wt(Ht,e.__scopeScrollArea),[s,i]=x.useState(!1);return x.useEffect(()=>{const l=o.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),i(!0)},d=()=>{c=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),a.jsx(vt,{present:n||s,children:a.jsx(eh,{"data-state":s?"visible":"hidden",...r,ref:t})})}),RC=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=wt(Ht,e.__scopeScrollArea),s=e.orientation==="horizontal",i=bs(()=>c("SCROLL_END"),100),[l,c]=IC("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return x.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,o.scrollHideDelay,c]),x.useEffect(()=>{const u=o.viewport,d=s?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const p=u[d];f!==p&&(c("SCROLL"),i()),f=p};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[o.viewport,s,c,i]),a.jsx(vt,{present:n||l!=="hidden",children:a.jsx(qa,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:_e(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:_e(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),eh=x.forwardRef((e,t)=>{const n=wt(Ht,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,i]=x.useState(!1),l=e.orientation==="horizontal",c=bs(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(l?u:d)}},10);return nr(n.viewport,c),nr(n.content,c),a.jsx(vt,{present:r||s,children:a.jsx(qa,{"data-state":s?"visible":"hidden",...o,ref:t})})}),qa=x.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=wt(Ht,e.__scopeScrollArea),s=x.useRef(null),i=x.useRef(0),[l,c]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=sh(l.viewport,l.content),d={...r,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>s.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function f(h,p){return $C(h,i.current,l,p)}return n==="horizontal"?a.jsx(OC,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const h=o.viewport.scrollLeft,p=Pc(h,l,o.dir);s.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollLeft=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollLeft=f(h,o.dir))}}):n==="vertical"?a.jsx(MC,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const h=o.viewport.scrollTop,p=Pc(h,l);s.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollTop=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollTop=f(h))}}):null}),OC=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=wt(Ht,e.__scopeScrollArea),[i,l]=x.useState(),c=x.useRef(null),u=Le(t,c,s.onScrollbarXChange);return x.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(nh,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ys(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),ah(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&s.viewport&&i&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Uo(i.paddingLeft),paddingEnd:Uo(i.paddingRight)}})}})}),MC=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=wt(Ht,e.__scopeScrollArea),[i,l]=x.useState(),c=x.useRef(null),u=Le(t,c,s.onScrollbarYChange);return x.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(nh,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ys(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),ah(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&s.viewport&&i&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Uo(i.paddingTop),paddingEnd:Uo(i.paddingBottom)}})}})}),[LC,th]=Jp(Ht),nh=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,p=wt(Ht,n),[b,m]=x.useState(null),g=Le(t,A=>m(A)),y=x.useRef(null),v=x.useRef(""),k=p.viewport,S=r.content-r.viewport,C=st(d),j=st(c),N=bs(f,10);function T(A){if(y.current){const O=A.clientX-y.current.left,$=A.clientY-y.current.top;u({x:O,y:$})}}return x.useEffect(()=>{const A=O=>{const $=O.target;b?.contains($)&&C(O,S)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[k,b,S,C]),x.useEffect(j,[r,j]),nr(b,N),nr(p.content,N),a.jsx(LC,{scope:n,scrollbar:b,hasThumb:o,onThumbChange:st(s),onThumbPointerUp:st(i),onThumbPositionChange:j,onThumbPointerDown:st(l),children:a.jsx(Te.div,{...h,ref:g,style:{position:"absolute",...h.style},onPointerDown:_e(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),y.current=b.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),T(A))}),onPointerMove:_e(e.onPointerMove,T),onPointerUp:_e(e.onPointerUp,A=>{const O=A.target;O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=""),y.current=null})})})}),Bo="ScrollAreaThumb",rh=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=th(Bo,e.__scopeScrollArea);return a.jsx(vt,{present:n||o.hasThumb,children:a.jsx(DC,{ref:t,...r})})}),DC=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=wt(Bo,n),i=th(Bo,n),{onThumbPositionChange:l}=i,c=Le(t,f=>i.onThumbChange(f)),u=x.useRef(void 0),d=bs(()=>{u.current&&(u.current(),u.current=void 0)},100);return x.useEffect(()=>{const f=s.viewport;if(f){const h=()=>{if(d(),!u.current){const p=BC(f,l);u.current=p,l()}};return l(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[s.viewport,d,l]),a.jsx(Te.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:_e(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),b=f.clientX-p.left,m=f.clientY-p.top;i.onThumbPointerDown({x:b,y:m})}),onPointerUp:_e(e.onPointerUp,i.onThumbPointerUp)})});rh.displayName=Bo;var Ka="ScrollAreaCorner",oh=x.forwardRef((e,t)=>{const n=wt(Ka,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?a.jsx(FC,{...e,ref:t}):null});oh.displayName=Ka;var FC=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=wt(Ka,n),[s,i]=x.useState(0),[l,c]=x.useState(0),u=!!(s&&l);return nr(o.scrollbarX,()=>{const d=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(d),c(d)}),nr(o.scrollbarY,()=>{const d=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(d),i(d)}),u?a.jsx(Te.div,{...r,ref:t,style:{width:s,height:l,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Uo(e){return e?parseInt(e,10):0}function sh(e,t){const n=e/t;return isNaN(n)?0:n}function ys(e){const t=sh(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function $C(e,t,n,r="ltr"){const o=ys(n),s=o/2,i=t||s,l=o-i,c=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-l,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return ih([c,u],f)(e)}function Pc(e,t,n="ltr"){const r=ys(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,i=t.content-t.viewport,l=s-r,c=n==="ltr"?[0,i]:[i*-1,0],u=Ri(e,c);return ih([0,i],[0,l])(u)}function ih(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function ah(e,t){return e>0&&e<t}var BC=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const s={left:e.scrollLeft,top:e.scrollTop},i=n.left!==s.left,l=n.top!==s.top;(i||l)&&t(),n=s,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function bs(e,t){const n=st(e),r=x.useRef(0);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),x.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function nr(e,t){const n=st(t);tt(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var UC=Gp,WC=Xp,VC=oh,HC=[" ","Enter","ArrowUp","ArrowDown"],ZC=[" ","Enter"],jn="Select",[vs,ws,qC]=Ff(jn),[cr]=tn(jn,[qC,xs]),ks=xs(),[KC,hn]=cr(jn),[JC,GC]=cr(jn),lh=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:p,form:b}=e,m=ks(t),[g,y]=x.useState(null),[v,k]=x.useState(null),[S,C]=x.useState(!1),j=ls(u),[N,T]=_n({prop:r,defaultProp:o??!1,onChange:s,caller:jn}),[A,O]=_n({prop:i,defaultProp:l,onChange:c,caller:jn}),$=x.useRef(null),E=g?b||!!g.closest("form"):!0,[L,w]=x.useState(new Set),M=Array.from(L).map(U=>U.props.value).join(";");return a.jsx(Fp,{...m,children:a.jsxs(KC,{required:p,scope:t,trigger:g,onTriggerChange:y,valueNode:v,onValueNodeChange:k,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:Dt(),value:A,onValueChange:O,open:N,onOpenChange:T,dir:j,triggerPointerDownPosRef:$,disabled:h,children:[a.jsx(vs.Provider,{scope:t,children:a.jsx(JC,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(U=>{w(F=>new Set(F).add(U))},[]),onNativeOptionRemove:x.useCallback(U=>{w(F=>{const B=new Set(F);return B.delete(U),B})},[]),children:n})}),E?a.jsxs(Ah,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:A,onChange:U=>O(U.target.value),disabled:h,form:b,children:[A===void 0?a.jsx("option",{value:""}):null,Array.from(L)]},M):null]})})};lh.displayName=jn;var ch="SelectTrigger",uh=x.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=ks(n),i=hn(ch,n),l=i.disabled||r,c=Le(t,i.onTriggerChange),u=ws(n),d=x.useRef("touch"),[f,h,p]=zh(m=>{const g=u().filter(k=>!k.disabled),y=g.find(k=>k.value===i.value),v=Ph(g,m,y);v!==void 0&&i.onValueChange(v.value)}),b=m=>{l||(i.onOpenChange(!0),p()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return a.jsx($p,{asChild:!0,...s,children:a.jsx(Te.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Ih(i.value)?"":void 0,...o,ref:c,onClick:_e(o.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&b(m)}),onPointerDown:_e(o.onPointerDown,m=>{d.current=m.pointerType;const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(b(m),m.preventDefault())}),onKeyDown:_e(o.onKeyDown,m=>{const g=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(g&&m.key===" ")&&HC.includes(m.key)&&(b(),m.preventDefault())})})})});uh.displayName=ch;var dh="SelectValue",fh=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...l}=e,c=hn(dh,n),{onValueNodeHasChildrenChange:u}=c,d=s!==void 0,f=Le(t,c.onValueNodeChange);return tt(()=>{u(d)},[u,d]),a.jsx(Te.span,{...l,ref:f,style:{pointerEvents:"none"},children:Ih(c.value)?a.jsx(a.Fragment,{children:i}):s})});fh.displayName=dh;var YC="SelectIcon",ph=x.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return a.jsx(Te.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});ph.displayName=YC;var XC="SelectPortal",hh=e=>a.jsx(us,{asChild:!0,...e});hh.displayName=XC;var En="SelectContent",mh=x.forwardRef((e,t)=>{const n=hn(En,e.__scopeSelect),[r,o]=x.useState();if(tt(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Br.createPortal(a.jsx(gh,{scope:e.__scopeSelect,children:a.jsx(vs.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),s):null}return a.jsx(xh,{...e,ref:t})});mh.displayName=En;var St=10,[gh,mn]=cr(En),QC="SelectContentImpl",e5=er("SelectContent.RemoveScroll"),xh=x.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:b,hideWhenDetached:m,avoidCollisions:g,...y}=e,v=hn(En,n),[k,S]=x.useState(null),[C,j]=x.useState(null),N=Le(t,ie=>S(ie)),[T,A]=x.useState(null),[O,$]=x.useState(null),E=ws(n),[L,w]=x.useState(!1),M=x.useRef(!1);x.useEffect(()=>{if(k)return np(k)},[k]),qf();const U=x.useCallback(ie=>{const[de,...pe]=E().map(ke=>ke.ref.current),[he]=pe.slice(-1),me=document.activeElement;for(const ke of ie)if(ke===me||(ke?.scrollIntoView({block:"nearest"}),ke===de&&C&&(C.scrollTop=0),ke===he&&C&&(C.scrollTop=C.scrollHeight),ke?.focus(),document.activeElement!==me))return},[E,C]),F=x.useCallback(()=>U([T,k]),[U,T,k]);x.useEffect(()=>{L&&F()},[L,F]);const{onOpenChange:B,triggerPointerDownPosRef:G}=v;x.useEffect(()=>{if(k){let ie={x:0,y:0};const de=he=>{ie={x:Math.abs(Math.round(he.pageX)-(G.current?.x??0)),y:Math.abs(Math.round(he.pageY)-(G.current?.y??0))}},pe=he=>{ie.x<=10&&ie.y<=10?he.preventDefault():k.contains(he.target)||B(!1),document.removeEventListener("pointermove",de),G.current=null};return G.current!==null&&(document.addEventListener("pointermove",de),document.addEventListener("pointerup",pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",de),document.removeEventListener("pointerup",pe,{capture:!0})}}},[k,B,G]),x.useEffect(()=>{const ie=()=>B(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[B]);const[I,H]=zh(ie=>{const de=E().filter(me=>!me.disabled),pe=de.find(me=>me.ref.current===document.activeElement),he=Ph(de,ie,pe);he&&setTimeout(()=>he.ref.current.focus())}),K=x.useCallback((ie,de,pe)=>{const he=!M.current&&!pe;(v.value!==void 0&&v.value===de||he)&&(A(ie),he&&(M.current=!0))},[v.value]),z=x.useCallback(()=>k?.focus(),[k]),se=x.useCallback((ie,de,pe)=>{const he=!M.current&&!pe;(v.value!==void 0&&v.value===de||he)&&$(ie)},[v.value]),re=r==="popper"?Oi:yh,ue=re===Oi?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:b,hideWhenDetached:m,avoidCollisions:g}:{};return a.jsx(gh,{scope:n,content:k,viewport:C,onViewportChange:j,itemRefCallback:K,selectedItem:T,onItemLeave:z,itemTextRefCallback:se,focusSelectedItem:F,selectedItemText:O,position:r,isPositioned:L,searchRef:I,children:a.jsx(Ra,{as:e5,allowPinchZoom:!0,children:a.jsx(Pa,{asChild:!0,trapped:v.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:_e(o,ie=>{v.trigger?.focus({preventScroll:!0}),ie.preventDefault()}),children:a.jsx(cs,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:a.jsx(re,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:ie=>ie.preventDefault(),...y,...ue,onPlaced:()=>w(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:_e(y.onKeyDown,ie=>{const de=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!de&&ie.key.length===1&&H(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let he=E().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(he=he.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const me=ie.target,ke=he.indexOf(me);he=he.slice(ke+1)}setTimeout(()=>U(he)),ie.preventDefault()}})})})})})})});xh.displayName=QC;var t5="SelectItemAlignedPosition",yh=x.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=hn(En,n),i=mn(En,n),[l,c]=x.useState(null),[u,d]=x.useState(null),f=Le(t,N=>d(N)),h=ws(n),p=x.useRef(!1),b=x.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:v}=i,k=x.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&u&&m&&g&&y){const N=s.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),A=s.valueNode.getBoundingClientRect(),O=y.getBoundingClientRect();if(s.dir!=="rtl"){const me=O.left-T.left,ke=A.left-me,ze=N.left-ke,_=N.width+ze,te=Math.max(_,T.width),Q=window.innerWidth-St,R=Ri(ke,[St,Math.max(St,Q-te)]);l.style.minWidth=_+"px",l.style.left=R+"px"}else{const me=T.right-O.right,ke=window.innerWidth-A.right-me,ze=window.innerWidth-N.right-ke,_=N.width+ze,te=Math.max(_,T.width),Q=window.innerWidth-St,R=Ri(ke,[St,Math.max(St,Q-te)]);l.style.minWidth=_+"px",l.style.right=R+"px"}const $=h(),E=window.innerHeight-St*2,L=m.scrollHeight,w=window.getComputedStyle(u),M=parseInt(w.borderTopWidth,10),U=parseInt(w.paddingTop,10),F=parseInt(w.borderBottomWidth,10),B=parseInt(w.paddingBottom,10),G=M+U+L+B+F,I=Math.min(g.offsetHeight*5,G),H=window.getComputedStyle(m),K=parseInt(H.paddingTop,10),z=parseInt(H.paddingBottom,10),se=N.top+N.height/2-St,re=E-se,ue=g.offsetHeight/2,ie=g.offsetTop+ue,de=M+U+ie,pe=G-de;if(de<=se){const me=$.length>0&&g===$[$.length-1].ref.current;l.style.bottom="0px";const ke=u.clientHeight-m.offsetTop-m.offsetHeight,ze=Math.max(re,ue+(me?z:0)+ke+F),_=de+ze;l.style.height=_+"px"}else{const me=$.length>0&&g===$[0].ref.current;l.style.top="0px";const ze=Math.max(se,M+m.offsetTop+(me?K:0)+ue)+pe;l.style.height=ze+"px",m.scrollTop=de-se+m.offsetTop}l.style.margin=`${St}px 0`,l.style.minHeight=I+"px",l.style.maxHeight=E+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[h,s.trigger,s.valueNode,l,u,m,g,y,s.dir,r]);tt(()=>k(),[k]);const[S,C]=x.useState();tt(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const j=x.useCallback(N=>{N&&b.current===!0&&(k(),v?.(),b.current=!1)},[k,v]);return a.jsx(r5,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:j,children:a.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:a.jsx(Te.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});yh.displayName=t5;var n5="SelectPopperPosition",Oi=x.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=St,...s}=e,i=ks(n);return a.jsx(Bp,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Oi.displayName=n5;var[r5,Ja]=cr(En,{}),Mi="SelectViewport",bh=x.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=mn(Mi,n),i=Ja(Mi,n),l=Le(t,s.onViewportChange),c=x.useRef(0);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),a.jsx(vs.Slot,{scope:n,children:a.jsx(Te.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:_e(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=i;if(h?.current&&f){const p=Math.abs(c.current-d.scrollTop);if(p>0){const b=window.innerHeight-St*2,m=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),y=Math.max(m,g);if(y<b){const v=y+p,k=Math.min(b,v),S=v-k;f.style.height=k+"px",f.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});bh.displayName=Mi;var vh="SelectGroup",[o5,s5]=cr(vh),i5=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Dt();return a.jsx(o5,{scope:n,id:o,children:a.jsx(Te.div,{role:"group","aria-labelledby":o,...r,ref:t})})});i5.displayName=vh;var wh="SelectLabel",a5=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=s5(wh,n);return a.jsx(Te.div,{id:o.id,...r,ref:t})});a5.displayName=wh;var Wo="SelectItem",[l5,kh]=cr(Wo),_h=x.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,l=hn(Wo,n),c=mn(Wo,n),u=l.value===r,[d,f]=x.useState(s??""),[h,p]=x.useState(!1),b=Le(t,v=>c.itemRefCallback?.(v,r,o)),m=Dt(),g=x.useRef("touch"),y=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return a.jsx(l5,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:x.useCallback(v=>{f(k=>k||(v?.textContent??"").trim())},[]),children:a.jsx(vs.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:a.jsx(Te.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:b,onFocus:_e(i.onFocus,()=>p(!0)),onBlur:_e(i.onBlur,()=>p(!1)),onClick:_e(i.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:_e(i.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:_e(i.onPointerDown,v=>{g.current=v.pointerType}),onPointerMove:_e(i.onPointerMove,v=>{g.current=v.pointerType,o?c.onItemLeave?.():g.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_e(i.onPointerLeave,v=>{v.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:_e(i.onKeyDown,v=>{c.searchRef?.current!==""&&v.key===" "||(ZC.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})})})})});_h.displayName=Wo;var Sr="SelectItemText",Sh=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=hn(Sr,n),l=mn(Sr,n),c=kh(Sr,n),u=GC(Sr,n),[d,f]=x.useState(null),h=Le(t,y=>f(y),c.onItemTextChange,y=>l.itemTextRefCallback?.(y,c.value,c.disabled)),p=d?.textContent,b=x.useMemo(()=>a.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=u;return tt(()=>(m(b),()=>g(b)),[m,g,b]),a.jsxs(a.Fragment,{children:[a.jsx(Te.span,{id:c.textId,...s,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Br.createPortal(s.children,i.valueNode):null]})});Sh.displayName=Sr;var Ch="SelectItemIndicator",jh=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return kh(Ch,n).isSelected?a.jsx(Te.span,{"aria-hidden":!0,...r,ref:t}):null});jh.displayName=Ch;var Li="SelectScrollUpButton",Eh=x.forwardRef((e,t)=>{const n=mn(Li,e.__scopeSelect),r=Ja(Li,e.__scopeSelect),[o,s]=x.useState(!1),i=Le(t,r.onScrollButtonChange);return tt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;s(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?a.jsx(Th,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Eh.displayName=Li;var Di="SelectScrollDownButton",Nh=x.forwardRef((e,t)=>{const n=mn(Di,e.__scopeSelect),r=Ja(Di,e.__scopeSelect),[o,s]=x.useState(!1),i=Le(t,r.onScrollButtonChange);return tt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;s(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?a.jsx(Th,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});Nh.displayName=Di;var Th=x.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=mn("SelectScrollButton",n),i=x.useRef(null),l=ws(n),c=x.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return x.useEffect(()=>()=>c(),[c]),tt(()=>{l().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),a.jsx(Te.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:_e(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:_e(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:_e(o.onPointerLeave,()=>{c()})})}),c5="SelectSeparator",u5=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(Te.div,{"aria-hidden":!0,...r,ref:t})});u5.displayName=c5;var Fi="SelectArrow",d5=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ks(n),s=hn(Fi,n),i=mn(Fi,n);return s.open&&i.position==="popper"?a.jsx(Up,{...o,...r,ref:t}):null});d5.displayName=Fi;var f5="SelectBubbleInput",Ah=x.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=x.useRef(null),s=Le(r,o),i=X_(t);return x.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&d){const f=new Event("change",{bubbles:!0});d.call(l,t),l.dispatchEvent(f)}},[i,t]),a.jsx(Te.select,{...n,style:{...Lf,...n.style},ref:s,defaultValue:t})});Ah.displayName=f5;function Ih(e){return e===""||e===void 0}function zh(e){const t=st(e),n=x.useRef(""),r=x.useRef(0),o=x.useCallback(i=>{const l=n.current+i;t(l),(function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),s=x.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Ph(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=p5(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function p5(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var h5=lh,m5=uh,g5=fh,x5=ph,y5=hh,b5=mh,v5=bh,w5=_h,k5=Sh,_5=jh,S5=Eh,C5=Nh,_s="Tabs",[j5]=tn(_s,[Vp]),Rh=Vp(),[E5,Ga]=j5(_s),Oh=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=ls(l),[f,h]=_n({prop:r,onChange:o,defaultProp:s??"",caller:_s});return a.jsx(E5,{scope:n,baseId:Dt(),value:f,onValueChange:h,orientation:i,dir:d,activationMode:c,children:a.jsx(Te.div,{dir:d,"data-orientation":i,...u,ref:t})})});Oh.displayName=_s;var Mh="TabsList",Lh=x.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=Ga(Mh,n),i=Rh(n);return a.jsx(TC,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:a.jsx(Te.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});Lh.displayName=Mh;var Dh="TabsTrigger",Fh=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=Ga(Dh,n),l=Rh(n),c=Uh(i.baseId,r),u=Wh(i.baseId,r),d=r===i.value;return a.jsx(AC,{asChild:!0,...l,focusable:!o,active:d,children:a.jsx(Te.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...s,ref:t,onMouseDown:_e(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:_e(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:_e(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!o&&f&&i.onValueChange(r)})})})});Fh.displayName=Dh;var $h="TabsContent",Bh=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,l=Ga($h,n),c=Uh(l.baseId,r),u=Wh(l.baseId,r),d=r===l.value,f=x.useRef(d);return x.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),a.jsx(vt,{present:o||d,children:({present:h})=>a.jsx(Te.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&s})})});Bh.displayName=$h;function Uh(e,t){return`${e}-trigger-${t}`}function Wh(e,t){return`${e}-content-${t}`}var N5=Oh,T5=Lh,A5=Fh,I5=Bh,[Ss]=tn("Tooltip",[xs]),Cs=xs(),Vh="TooltipProvider",z5=700,$i="tooltip.open",[P5,Ya]=Ss(Vh),Hh=e=>{const{__scopeTooltip:t,delayDuration:n=z5,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=x.useRef(!0),l=x.useRef(!1),c=x.useRef(0);return x.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),a.jsx(P5,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:x.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:s})};Hh.displayName=Vh;var Mr="Tooltip",[R5,Zr]=Ss(Mr),Zh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:l}=e,c=Ya(Mr,e.__scopeTooltip),u=Cs(t),[d,f]=x.useState(null),h=Dt(),p=x.useRef(0),b=i??c.disableHoverableContent,m=l??c.delayDuration,g=x.useRef(!1),[y,v]=_n({prop:r,defaultProp:o??!1,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent($i))):c.onClose(),s?.(N)},caller:Mr}),k=x.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),S=x.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),C=x.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),j=x.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},m)},[m,v]);return x.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),a.jsx(Fp,{...u,children:a.jsx(R5,{scope:t,contentId:h,open:y,stateAttribute:k,trigger:d,onTriggerChange:f,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayedRef.current?j():S()},[c.isOpenDelayedRef,j,S]),onTriggerLeave:x.useCallback(()=>{b?C():(window.clearTimeout(p.current),p.current=0)},[C,b]),onOpen:S,onClose:C,disableHoverableContent:b,children:n})})};Zh.displayName=Mr;var Bi="TooltipTrigger",qh=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Zr(Bi,n),s=Ya(Bi,n),i=Cs(n),l=x.useRef(null),c=Le(t,l,o.onTriggerChange),u=x.useRef(!1),d=x.useRef(!1),f=x.useCallback(()=>u.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),a.jsx($p,{asChild:!0,...i,children:a.jsx(Te.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:_e(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:_e(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:_e(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:_e(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:_e(e.onBlur,o.onClose),onClick:_e(e.onClick,o.onClose)})})});qh.displayName=Bi;var Xa="TooltipPortal",[O5,M5]=Ss(Xa,{forceMount:void 0}),Kh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Zr(Xa,t);return a.jsx(O5,{scope:t,forceMount:n,children:a.jsx(vt,{present:n||s.open,children:a.jsx(us,{asChild:!0,container:o,children:r})})})};Kh.displayName=Xa;var rr="TooltipContent",Jh=x.forwardRef((e,t)=>{const n=M5(rr,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Zr(rr,e.__scopeTooltip);return a.jsx(vt,{present:r||i.open,children:i.disableHoverableContent?a.jsx(Gh,{side:o,...s,ref:t}):a.jsx(L5,{side:o,...s,ref:t})})}),L5=x.forwardRef((e,t)=>{const n=Zr(rr,e.__scopeTooltip),r=Ya(rr,e.__scopeTooltip),o=x.useRef(null),s=Le(t,o),[i,l]=x.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,h=x.useCallback(()=>{l(null),f(!1)},[f]),p=x.useCallback((b,m)=>{const g=b.currentTarget,y={x:b.clientX,y:b.clientY},v=B5(y,g.getBoundingClientRect()),k=U5(y,v),S=W5(m.getBoundingClientRect()),C=H5([...k,...S]);l(C),f(!0)},[f]);return x.useEffect(()=>()=>h(),[h]),x.useEffect(()=>{if(c&&d){const b=g=>p(g,d),m=g=>p(g,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",m)}}},[c,d,p,h]),x.useEffect(()=>{if(i){const b=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},v=c?.contains(g)||d?.contains(g),k=!V5(y,i);v?h():k&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,i,u,h]),a.jsx(Gh,{...e,ref:s})}),[D5,F5]=Ss(Mr,{isInside:!1}),$5=dk("TooltipContent"),Gh=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...l}=e,c=Zr(rr,n),u=Cs(n),{onClose:d}=c;return x.useEffect(()=>(document.addEventListener($i,d),()=>document.removeEventListener($i,d)),[d]),x.useEffect(()=>{if(c.trigger){const f=h=>{h.target?.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),a.jsx(cs,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:a.jsxs(Bp,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx($5,{children:r}),a.jsx(D5,{scope:n,isInside:!0,children:a.jsx(yk,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Jh.displayName=rr;var Yh="TooltipArrow",Xh=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Cs(n);return F5(Yh,n).isInside?null:a.jsx(Up,{...o,...r,ref:t})});Xh.displayName=Yh;function B5(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function U5(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function W5(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function V5(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s],c=t[i],u=l.x,d=l.y,f=c.x,h=c.y;d>r!=h>r&&n<(f-u)*(r-d)/(h-d)+u&&(o=!o)}return o}function H5(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Z5(t)}function Z5(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var q5=Hh,K5=Zh,J5=qh,G5=Kh,Y5=Jh,X5=Xh;const Q5=Ta("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function Et({className:e,variant:t="default",asChild:n=!1,...r}){const o=n?ck:"span";return a.jsx(o,{"data-slot":"badge","data-variant":t,className:ve(Q5({variant:t}),e),...r})}function Qa({...e}){return a.jsx(H_,{"data-slot":"dialog",...e})}function ej({...e}){return a.jsx(Z_,{"data-slot":"dialog-trigger",...e})}function tj({...e}){return a.jsx(q_,{"data-slot":"dialog-portal",...e})}function nj({className:e,...t}){return a.jsx(K_,{"data-slot":"dialog-overlay",className:ve("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})}function el({className:e,children:t,...n}){return a.jsxs(tj,{children:[a.jsx(nj,{}),a.jsxs(J_,{"data-slot":"dialog-content",className:ve("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",e),...n,children:[t,a.jsxs(Y_,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[a.jsx(ja,{className:"size-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function tl({className:e,...t}){return a.jsx("div",{"data-slot":"dialog-header",className:ve("flex flex-col space-y-1.5 text-center sm:text-left",e),...t})}function nl({className:e,...t}){return a.jsx(G_,{"data-slot":"dialog-title",className:ve("text-lg font-semibold leading-none tracking-tight",e),...t})}const rj=Ta("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Pe({className:e,variant:t,size:n,...r}){return a.jsx("button",{"data-slot":"button",className:ve(rj({variant:t,size:n,className:e})),...r})}function Qh({open:e,onOpenChange:t,title:n,description:r,confirmLabel:o="Confirm",variant:s="default",onConfirm:i}){return a.jsx(Qa,{open:e,onOpenChange:t,children:a.jsxs(el,{children:[a.jsx(tl,{children:a.jsx(nl,{children:n})}),a.jsx("p",{className:"text-sm text-muted-foreground",children:r}),a.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[a.jsx(Pe,{variant:"outline",size:"sm",onClick:()=>t(!1),children:"Cancel"}),a.jsx(Pe,{variant:s,size:"sm",onClick:()=>{i(),t(!1)},children:o})]})]})})}const oj={anthropic:"Anthropic",openai:"OpenAI",unknown:"Unknown"};function sj({conversationId:e,startTime:t,endTime:n,totalCalls:r,totalInputTokens:o,totalOutputTokens:s,apiFormat:i,expanded:l,onToggle:c,hideApiFormat:u=!1,isLoading:d=!1,userAgent:f,timeDisplayFormat:h,onClear:p}){const[b,m]=x.useState(!1),g=v=>{v.stopPropagation(),p!==void 0&&m(!0)},y=x.useCallback(v=>{v.stopPropagation(),window.open(Ig(e),"_blank","noopener,noreferrer")},[e]);return a.jsxs("div",{role:"button",tabIndex:0,"data-nav-id":`conv-${e}`,"data-nav-action":l?"collapse":"expand",className:ve("flex items-center gap-3 px-3 py-2 cursor-pointer transition-colors","hover:bg-muted/50","select-none","border border-border rounded-lg mb-2 bg-background sticky top-0 z-10","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:outline-none"),onClick:c,onKeyDown:v=>{v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),c())},children:[l?a.jsx(Ut,{className:"size-4 text-muted-foreground shrink-0"}):d?a.jsx(Pr,{className:"size-4 animate-spin text-muted-foreground shrink-0"}):a.jsx(en,{className:"size-4 text-muted-foreground shrink-0"}),a.jsx("span",{className:"text-purple-400/90 font-mono text-xs font-semibold shrink-0",title:e,children:e.startsWith("PID:")||e.includes("|")?e:e.length>24?e.slice(0,12)+"..."+e.slice(-12):e}),f!=null&&f!==""&&a.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground text-xs shrink-0",title:f,children:[a.jsx(Ww,{className:"size-3"}),a.jsx("span",{className:"font-mono tabular-nums truncate max-w-[120px]",children:f})]}),!u&&a.jsx(Et,{variant:"outline",className:ve("text-[10px] px-1.5 py-0 h-5 font-mono shrink-0",i==="openai"&&"border-blue-500/40 text-blue-400",i==="anthropic"&&"border-orange-500/40 text-orange-400",i==="unknown"&&"border-muted text-muted-foreground"),children:oj[i]}),a.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground text-xs shrink-0",children:[a.jsx(cn,{className:"size-3"}),a.jsx("span",{className:"font-mono tabular-nums",children:Ea(t,n,h)})]}),a.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground text-xs shrink-0",children:[a.jsx(is,{className:"size-3"}),a.jsxs("span",{className:"font-mono tabular-nums",children:[r," call",r!==1?"s":""]})]}),a.jsxs("span",{className:"flex items-center gap-1 text-xs shrink-0",children:[a.jsx(Rr,{className:"size-3 text-muted-foreground"}),a.jsxs("span",{className:"font-mono tabular-nums",children:[a.jsx("span",{className:"text-blue-400",children:Ve(o)})," / ",a.jsx("span",{className:"text-amber-400",children:Ve(s)})]})]}),a.jsx("span",{className:"flex-1 min-w-0"}),a.jsx("button",{type:"button",onClick:y,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&y(v)},"aria-label":`Open session ${e} in a new tab`,title:"Open this session in a new tab",className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 inline-flex items-center justify-center size-8 rounded hover:bg-muted cursor-pointer",children:a.jsx(ff,{className:"size-3.5"})}),p!==void 0&&a.jsx("button",{type:"button",onClick:g,"aria-label":`Clear group (${r} request${r!==1?"s":""})`,title:"Clear this group",className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 inline-flex items-center justify-center size-8 rounded hover:bg-muted cursor-pointer",children:a.jsx(xf,{className:"size-3.5"})}),a.jsx(Qh,{open:b,onOpenChange:m,title:"Clear this group?",description:`This will remove ${r} request${r!==1?"s":""} from this conversation. This action cannot be undone.`,confirmLabel:"Clear",variant:"destructive",onConfirm:()=>{p?.()}})]})}function ij(e){const t=e.find(n=>n.apiFormat!=="unknown");return t!==void 0?t.apiFormat:e[0]?.apiFormat??"unknown"}function aj(e){let t=!1,n=!1;for(const r of e)if(r.apiFormat==="anthropic"?t=!0:r.apiFormat==="openai"&&(n=!0),t&&n)return!0;return!1}function lj(e){if(e.isTest===!0)return"provider-test";if(e.sessionId!==null&&e.sessionId!==""&&e.sessionId!==void 0)return e.sessionId;const t=e.clientPid!==null&&e.clientPid!==void 0,n=e.clientProjectFolder!==null&&e.clientProjectFolder!==void 0;if(!t&&!n)return"default";const r=t?`PID:${e.clientPid}`:"unknown",o=n?e.clientProjectFolder:"no-folder";return`${r}|${o}`}function cj(e){const t=new Map;for(const r of e){const o=lj(r),s=t.get(o);s!==void 0?s.push(r):t.set(o,[r])}const n=[];for(const[r,o]of t){const s=[...o].sort((i,l)=>i.timestamp.localeCompare(l.timestamp));n.push({id:r,conversationId:r,logs:s})}return n.sort((r,o)=>(r.logs[0]?.timestamp??"").localeCompare(o.logs[0]?.timestamp??"")),n}function Rc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function uj(e){if(e.responseText===null)return null;try{let t=JSON.parse(e.responseText);return typeof t=="string"&&(t=JSON.parse(t)),Rc(t)?typeof t.stop_reason=="string"?t.stop_reason==="end_turn"||t.stop_reason==="tool_use"?t.stop_reason:null:Array.isArray(t.choices)&&t.choices.length>0&&Rc(t.choices[0])&&typeof t.choices[0].finish_reason=="string"&&t.choices[0].finish_reason==="stop"?"stop":null:null}catch{return null}}function em(e){return e==="end_turn"||e==="stop"}function kt({className:e,style:t,d:n,eyeStalks:r,eyes:o,legs:s,extras:i}){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:t,className:ve("inline-block size-5",e),children:[a.jsx("path",{d:n}),r,o,s,i]})}const gn=a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"6.5",y1:"16",x2:"4.5",y2:"19.5"}),a.jsx("line",{x1:"9",y1:"17.5",x2:"8",y2:"20.5"}),a.jsx("line",{x1:"15",y1:"17.5",x2:"16",y2:"20.5"}),a.jsx("line",{x1:"17.5",y1:"16",x2:"19.5",y2:"19.5"})]}),tm=a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"7",y1:"16",x2:"5.5",y2:"18.5"}),a.jsx("line",{x1:"9.5",y1:"17",x2:"8.5",y2:"19.5"}),a.jsx("line",{x1:"14.5",y1:"17",x2:"15.5",y2:"19.5"}),a.jsx("line",{x1:"17",y1:"16",x2:"18.5",y2:"18.5"})]});function nm({className:e}){return a.jsx(kt,{className:e,d:"M5 13 C5 9 8 7 12 7 C16 7 19 9 19 13 C19 16 16 18 12 18 C8 18 5 16 5 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),a.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),a.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"})]})})}function dj({className:e}){return a.jsx(kt,{className:e,d:"M4 13 C4 7 7.5 5.5 12 5.5 C16.5 5.5 20 7 20 13 C20 17.5 16.5 19 12 19 C7.5 19 4 17.5 4 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"9.5",y1:"6.5",x2:"9.5",y2:"4.5"}),a.jsx("line",{x1:"14.5",y1:"6.5",x2:"14.5",y2:"4.5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"9.5",cy:"4",r:"1.1",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"14.5",cy:"4",r:"1.1",fill:"currentColor",stroke:"none"})]}),legs:tm,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C4 9.5 2.5 10 3 12 C3.5 13.5 4.5 13 5 12"}),a.jsx("path",{d:"M19 11 C20 9.5 21.5 10 21 12 C20.5 13.5 19.5 13 19 12"})]})})}function fj({className:e}){return a.jsx(kt,{className:e,d:"M3 13.5 C3 8 7 6 12 6 C17 6 21 8 21 13.5 C21 17 17 19 12 19 C7 19 3 17 3 13.5 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"7",y1:"7",x2:"6.5",y2:"4.5"}),a.jsx("line",{x1:"17",y1:"7",x2:"17.5",y2:"4.5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"6.5",cy:"4",r:"0.8",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"17.5",cy:"4",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M4 12 C2.5 10.5 1 11 1.5 13 C2 14.5 3.5 14 4.5 13"}),a.jsx("path",{d:"M20 12 C21.5 10.5 23 11 22.5 13 C22 14.5 20.5 14 19.5 13"})]})})}function pj({className:e}){return a.jsx(kt,{className:e,d:"M6 14 C6 8 9 5.5 12 5.5 C15 5.5 18 8 18 14 C18 18 15 20 12 20 C9 20 6 18 6 14 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"6.5",x2:"10",y2:"3.5"}),a.jsx("line",{x1:"14",y1:"6.5",x2:"14",y2:"3.5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"10",cy:"3",r:"0.7",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"14",cy:"3",r:"0.7",fill:"currentColor",stroke:"none"})]}),legs:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"7",y1:"17",x2:"5",y2:"20.5"}),a.jsx("line",{x1:"9.5",y1:"18.5",x2:"8.5",y2:"21.5"}),a.jsx("line",{x1:"14.5",y1:"18.5",x2:"15.5",y2:"21.5"}),a.jsx("line",{x1:"17",y1:"17",x2:"19",y2:"20.5"})]}),extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M6.5 11 C5 8.5 3 9 3.5 11.5 C4 13.5 5 13 6 12"}),a.jsx("path",{d:"M17.5 11 C19 8.5 21 9 20.5 11.5 C20 13.5 19 13 18 12"})]})})}function hj({className:e}){return a.jsx(kt,{className:e,d:"M5 13 C5 9 8 7 12 7 L13 4 L14 7 C16 7 19 9 19 13 C19 16 16 18 13 18 L12 21 L11 18 C8 18 5 16 5 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),a.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.8",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),a.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"})]})})}function mj({className:e}){return a.jsx(kt,{className:e,d:"M5 13 C5 9 8 7 12 7 C16 7 19 9 19 13 C19 16 16 18 12 18 C8 18 5 16 5 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),a.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"}),a.jsx("line",{x1:"13.5",y1:"4",x2:"15.5",y2:"5"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),a.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"})]})})}function gj({className:e}){return a.jsx(kt,{className:e,d:"M5.5 13.5 C5.5 10 8.5 8 12 8 C15.5 8 18.5 10 18.5 13.5 C18.5 16 15.5 17.5 12 17.5 C8.5 17.5 5.5 16 5.5 13.5 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"8",x2:"10",y2:"6"}),a.jsx("line",{x1:"14",y1:"8",x2:"14",y2:"6"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"9",y1:"6",x2:"11",y2:"6.5"}),a.jsx("line",{x1:"13",y1:"6",x2:"15",y2:"6.5"})]}),legs:tm,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M6 11.5 C4.5 10.5 3 11 3.5 12.5 C4 13.5 5 13 5.5 12.5"}),a.jsx("path",{d:"M18 11.5 C19.5 10.5 21 11 20.5 12.5 C20 13.5 19 13 18.5 12.5"})]})})}function xj({className:e}){return a.jsx(kt,{className:e,d:"M5 13 C5 9 8 7 12 7 C16 7 19 9 19 13 C19 16 16 18 12 18 C8 18 5 16 5 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),a.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.7",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.7",fill:"currentColor",stroke:"none"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),a.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),a.jsx("line",{x1:"8.5",y1:"4",x2:"10.5",y2:"4.5"}),a.jsx("line",{x1:"15.5",y1:"4",x2:"13.5",y2:"4.5"}),a.jsx("path",{d:"M9 15.5 C10 14.5 14 14.5 15 15.5"})]})})}function yj({className:e}){return a.jsx(kt,{className:e,d:"M5 13 C5 9 8 7 12 7 C16 7 19 9 19 13 C19 16 16 18 12 18 C8 18 5 16 5 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),a.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"9.5",cy:"4.5",r:"1.2",fill:"none",stroke:"currentColor"}),a.jsx("circle",{cx:"14.5",cy:"4.5",r:"1.2",fill:"none",stroke:"currentColor"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),a.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),a.jsx("ellipse",{cx:"12",cy:"15",rx:"2",ry:"1.5",fill:"currentColor",stroke:"none"})]})})}function bj({className:e}){return a.jsx(kt,{className:e,d:"M4.5 13 C4.5 8 7.5 6 12 6 C16.5 6 19.5 8 19.5 13 C19.5 17 16.5 18.5 12 18.5 C7.5 18.5 4.5 17 4.5 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"9.5",y1:"7",x2:"9",y2:"5"}),a.jsx("line",{x1:"14.5",y1:"7",x2:"15",y2:"5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"9",cy:"4.5",r:"1",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"15",cy:"4.5",r:"1",fill:"currentColor",stroke:"none"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C3.5 9 2 9.5 2.5 12 C3 14 4 13 5 12"}),a.jsx("path",{d:"M19 11 C20.5 9 22 9.5 21.5 12 C21 14 20 13 19 12"}),a.jsx("path",{d:"M9 14.5 C10 16 14 16 15 14.5"}),a.jsx("circle",{cx:"7",cy:"13",r:"1",fill:"currentColor",stroke:"none",opacity:"0.3"}),a.jsx("circle",{cx:"17",cy:"13",r:"1",fill:"currentColor",stroke:"none",opacity:"0.3"})]})})}function vj({className:e}){return a.jsx(kt,{className:e,d:"M5 13 C5 9 8 7 12 7 C16 7 19 9 19 13 C19 16 16 18 12 18 C8 18 5 16 5 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5.5"}),a.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5.5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"7.5",y1:"5.5",x2:"16.5",y2:"5.5"}),a.jsx("rect",{x:"7",y:"5",width:"4",height:"2",rx:"0.5",fill:"currentColor",stroke:"none"}),a.jsx("rect",{x:"13",y:"5",width:"4",height:"2",rx:"0.5",fill:"currentColor",stroke:"none"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),a.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),a.jsx("path",{d:"M9.5 15 C10.5 16 13.5 16 14.5 15"})]})})}function wj({className:e}){return a.jsx(kt,{className:e,d:"M7 13.5 C7 10.5 9.5 9 12 9 C14.5 9 17 10.5 17 13.5 C17 16 14.5 17.5 12 17.5 C9.5 17.5 7 16 7 13.5 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10.5",y1:"9.5",x2:"10.5",y2:"8"}),a.jsx("line",{x1:"13.5",y1:"9.5",x2:"13.5",y2:"8"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"10.5",cy:"7.5",r:"0.8",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"13.5",cy:"7.5",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"8",y1:"16",x2:"6.5",y2:"18"}),a.jsx("line",{x1:"10",y1:"17",x2:"9.5",y2:"19"}),a.jsx("line",{x1:"14",y1:"17",x2:"14.5",y2:"19"}),a.jsx("line",{x1:"16",y1:"16",x2:"17.5",y2:"18"})]}),extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M7.5 12 C6.5 11 5.5 11.5 6 13 C6.5 14 7 13.5 7.5 13"}),a.jsx("path",{d:"M16.5 12 C17.5 11 18.5 11.5 18 13 C17.5 14 17 13.5 16.5 13"})]})})}const Lr=[nm,dj,fj,pj,hj,mj,gj,xj,yj,bj,vj,wj];function Vo(e){return Lr[Math.abs(e)%Lr.length]??nm}function kj(e){const t=Lr.length-2;return t<=0?0:1+((Number.isFinite(e)?Math.trunc(e):0)%t+t)%t}function _j(e){return Vo(kj(e))}const Sj="data:image/svg+xml,%3csvg%20height='2500'%20viewBox='0%206.603%201192.672%201193.397'%20width='2500'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m233.96%20800.215%20234.684-131.678%203.947-11.436-3.947-6.363h-11.436l-39.221-2.416-134.094-3.624-116.296-4.832-112.67-6.04-28.35-6.04-26.577-35.035%202.738-17.477%2023.84-16.027%2034.147%202.98%2075.463%205.155%20113.235%207.812%2082.147%204.832%20121.692%2012.644h19.329l2.738-7.812-6.604-4.832-5.154-4.832-117.182-79.41-126.845-83.92-66.443-48.321-35.92-24.484-18.12-22.953-7.813-50.093%2032.618-35.92%2043.812%202.98%2011.195%202.98%2044.375%2034.147%2094.792%2073.37%20123.786%2091.167%2018.12%2015.06%207.249-5.154.886-3.624-8.135-13.61-67.329-121.692-71.838-123.785-31.974-51.302-8.456-30.765c-2.98-12.645-5.154-23.275-5.154-36.242l37.127-50.416%2020.537-6.604%2049.53%206.604%2020.86%2018.121%2030.765%2070.39%2049.852%20110.818%2077.315%20150.684%2022.631%2044.698%2012.08%2041.396%204.51%2012.645h7.813v-7.248l6.362-84.886%2011.759-104.215%2011.436-134.094%203.946-37.772%2018.685-45.262%2037.127-24.482%2028.994%2013.852%2023.839%2034.148-3.303%2022.067-14.174%2092.134-27.785%20144.323-18.121%2096.644h10.55l12.08-12.08%2048.887-64.913%2082.147-102.685%2036.242-40.752%2042.282-45.02%2027.14-21.423h51.303l37.772%2056.135-16.913%2057.986-52.832%2067.007-43.812%2056.779-62.82%2084.563-39.22%2067.651%203.623%205.396%209.343-.886%20141.906-30.201%2076.671-13.852%2091.49-15.705%2041.396%2019.329%204.51%2019.65-16.269%2040.189-97.852%2024.16-114.764%2022.954-170.9%2040.43-2.093%201.53%202.416%202.98%2076.993%207.248%2032.94%201.771h80.617l150.12%2011.195%2039.222%2025.933%2023.517%2031.732-3.946%2024.16-60.403%2030.766-81.503-19.33-190.228-45.26-65.235-16.27h-9.02v5.397l54.362%2053.154%2099.624%2089.96%20124.752%20115.973%206.362%2028.671-16.027%2022.63-16.912-2.415-109.611-82.47-42.282-37.127-95.758-80.618h-6.363v8.456l22.067%2032.296%20116.537%20175.167%206.04%2053.719-8.456%2017.476-30.201%2010.55-33.181-6.04-68.215-95.758-70.39-107.84-56.778-96.644-6.926%203.947-33.503%20360.886-15.705%2018.443-36.243%2013.852-30.201-22.953-16.027-37.127%2016.027-73.37%2019.329-95.758%2015.704-76.107%2014.175-94.55%208.456-31.41-.563-2.094-6.927.886-71.275%2097.852-108.402%20146.497-85.772%2091.812-20.537%208.134-35.597-18.443%203.301-32.94%2019.893-29.315%20118.712-151.007%2071.597-93.583%2046.228-54.04-.322-7.813h-2.738l-315.302%20204.725-56.135%207.248-24.16-22.63%202.98-37.128%2011.435-12.08%2094.792-65.236-.322.323z'%20fill='%23d97757'/%3e%3c/svg%3e",Cj="data:image/svg+xml,%3csvg%20height='2500'%20viewBox='-1%20-.1%20949.1%20959.8'%20width='2474'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m925.8%20456.3c10.4%2023.2%2017%2048%2019.7%2073.3%202.6%2025.3%201.3%2050.9-4.1%2075.8-5.3%2024.9-14.5%2048.8-27.3%2070.8-8.4%2014.7-18.3%2028.5-29.7%2041.2-11.3%2012.6-23.9%2024-37.6%2034-13.8%2010-28.5%2018.4-44.1%2025.3-15.5%206.8-31.7%2012-48.3%2015.4-7.8%2024.2-19.4%2047.1-34.4%2067.7-14.9%2020.6-33%2038.7-53.6%2053.6-20.6%2015-43.4%2026.6-67.6%2034.4-24.2%207.9-49.5%2011.8-75%2011.8-16.9.1-33.9-1.7-50.5-5.1-16.5-3.5-32.7-8.8-48.2-15.7s-30.2-15.5-43.9-25.5c-13.6-10-26.2-21.5-37.4-34.2-25%205.4-50.6%206.7-75.9%204.1-25.3-2.7-50.1-9.3-73.4-19.7-23.2-10.3-44.7-24.3-63.6-41.4s-35-37.1-47.7-59.1c-8.5-14.7-15.5-30.2-20.8-46.3s-8.8-32.7-10.6-49.6c-1.8-16.8-1.7-33.8.1-50.7%201.8-16.8%205.5-33.4%2010.8-49.5-17-18.9-31-40.4-41.4-63.6-10.3-23.3-17-48-19.6-73.3-2.7-25.3-1.3-50.9%204-75.8s14.5-48.8%2027.3-70.8c8.4-14.7%2018.3-28.6%2029.6-41.2s24-24%2037.7-34%2028.5-18.5%2044-25.3c15.6-6.9%2031.8-12%2048.4-15.4%207.8-24.3%2019.4-47.1%2034.3-67.7%2015-20.6%2033.1-38.7%2053.7-53.7%2020.6-14.9%2043.4-26.5%2067.6-34.4%2024.2-7.8%2049.5-11.8%2075-11.7%2016.9-.1%2033.9%201.6%2050.5%205.1s32.8%208.7%2048.3%2015.6c15.5%207%2030.2%2015.5%2043.9%2025.5%2013.7%2010.1%2026.3%2021.5%2037.5%2034.2%2024.9-5.3%2050.5-6.6%2075.8-4s50%209.3%2073.3%2019.6c23.2%2010.4%2044.7%2024.3%2063.6%2041.4%2018.9%2017%2035%2036.9%2047.7%2059%208.5%2014.6%2015.5%2030.1%2020.8%2046.3%205.3%2016.1%208.9%2032.7%2010.6%2049.6%201.8%2016.9%201.8%2033.9-.1%2050.8-1.8%2016.9-5.5%2033.5-10.8%2049.6%2017.1%2018.9%2031%2040.3%2041.4%2063.6zm-333.2%20426.9c21.8-9%2041.6-22.3%2058.3-39s30-36.5%2039-58.4c9-21.8%2013.7-45.2%2013.7-68.8v-223q-.1-.3-.2-.7-.1-.3-.3-.6-.2-.3-.5-.5-.3-.3-.6-.4l-80.7-46.6v269.4c0%202.7-.4%205.5-1.1%208.1-.7%202.7-1.7%205.2-3.1%207.6s-3%204.6-5%206.5a32.1%2032.1%200%200%201%20-6.5%205l-191.1%20110.3c-1.6%201-4.3%202.4-5.7%203.2%207.9%206.7%2016.5%2012.6%2025.5%2017.8%209.1%205.2%2018.5%209.6%2028.3%2013.2%209.8%203.5%2019.9%206.2%2030.1%208%2010.3%201.8%2020.7%202.7%2031.1%202.7%2023.6%200%2047-4.7%2068.8-13.8zm-455.1-151.4c11.9%2020.5%2027.6%2038.3%2046.3%2052.7%2018.8%2014.4%2040.1%2024.9%2062.9%2031s46.6%207.7%2070%204.6%2045.9-10.7%2066.4-22.5l193.2-111.5.5-.5q.2-.2.3-.6.2-.3.3-.6v-94l-233.2%20134.9c-2.4%201.4-4.9%202.4-7.5%203.2-2.7.7-5.4%201-8.2%201-2.7%200-5.4-.3-8.1-1-2.6-.8-5.2-1.8-7.6-3.2l-191.1-110.4c-1.7-1-4.2-2.5-5.6-3.4-1.8%2010.3-2.7%2020.7-2.7%2031.1s1%2020.8%202.8%2031.1c1.8%2010.2%204.6%2020.3%208.1%2030.1%203.6%209.8%208%2019.2%2013.2%2028.2zm-50.2-417c-11.8%2020.5-19.4%2043.1-22.5%2066.5s-1.5%2047.1%204.6%2070c6.1%2022.8%2016.6%2044.1%2031%2062.9%2014.4%2018.7%2032.3%2034.4%2052.7%2046.2l193.1%20111.6q.3.1.7.2h.7q.4%200%20.7-.2.3-.1.6-.3l81-46.8-233.2-134.6c-2.3-1.4-4.5-3.1-6.5-5a32.1%2032.1%200%200%201%20-5-6.5c-1.3-2.4-2.4-4.9-3.1-7.6-.7-2.6-1.1-5.3-1-8.1v-227.1c-9.8%203.6-19.3%208-28.3%2013.2-9%205.3-17.5%2011.3-25.5%2018-7.9%206.7-15.3%2014.1-22%2022.1-6.7%207.9-12.6%2016.5-17.8%2025.5zm663.3%20154.4c2.4%201.4%204.6%203%206.6%205%201.9%201.9%203.6%204.1%205%206.5%201.3%202.4%202.4%205%203.1%207.6.6%202.7%201%205.4.9%208.2v227.1c32.1-11.8%2060.1-32.5%2080.8-59.7%2020.8-27.2%2033.3-59.7%2036.2-93.7s-3.9-68.2-19.7-98.5-39.9-55.5-69.5-72.5l-193.1-111.6q-.3-.1-.7-.2h-.7q-.3.1-.7.2-.3.1-.6.3l-80.6%2046.6%20233.2%20134.7zm80.5-121h-.1v.1zm-.1-.1c5.8-33.6%201.9-68.2-11.3-99.7-13.1-31.5-35-58.6-63-78.2-28-19.5-61-30.7-95.1-32.2-34.2-1.4-68%206.9-97.6%2023.9l-193.1%20111.5q-.3.2-.5.5l-.4.6q-.1.3-.2.7-.1.3-.1.7v93.2l233.2-134.7c2.4-1.4%205-2.4%207.6-3.2%202.7-.7%205.4-1%208.1-1%202.8%200%205.5.3%208.2%201%202.6.8%205.1%201.8%207.5%203.2l191.1%20110.4c1.7%201%204.2%202.4%205.6%203.3zm-505.3-103.2c0-2.7.4-5.4%201.1-8.1.7-2.6%201.7-5.2%203.1-7.6%201.4-2.3%203-4.5%205-6.5%201.9-1.9%204.1-3.6%206.5-4.9l191.1-110.3c1.8-1.1%204.3-2.5%205.7-3.2-26.2-21.9-58.2-35.9-92.1-40.2-33.9-4.4-68.3%201-99.2%2015.5-31%2014.5-57.2%2037.6-75.5%2066.4-18.3%2028.9-28%2062.3-28%2096.5v223q.1.4.2.7.1.3.3.6.2.3.5.6.2.2.6.4l80.7%2046.6zm43.8%20294.7%20103.9%2060%20103.9-60v-119.9l-103.8-60-103.9%2060z'/%3e%3c/svg%3e",jj="data:image/svg+xml,%3csvg%20fill='none'%20height='1320'%20viewBox='3.771%206.973%2023.993%2017.652'%20width='2500'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m27.501%208.469c-.252-.123-.36.111-.508.23-.05.04-.093.09-.135.135-.368.395-.797.652-1.358.621-.821-.045-1.521.213-2.14.842-.132-.776-.57-1.238-1.235-1.535-.349-.155-.701-.309-.944-.645-.171-.238-.217-.504-.303-.765-.054-.159-.108-.32-.29-.348-.197-.031-.274.135-.352.273-.31.567-.43%201.192-.419%201.825.028%201.421.628%202.554%201.82%203.36.136.093.17.186.128.321-.081.278-.178.547-.264.824-.054.178-.135.217-.324.14a5.448%205.448%200%200%201%20-1.719-1.169c-.848-.82-1.614-1.726-2.57-2.435-.225-.166-.449-.32-.681-.467-.976-.95.128-1.729.383-1.82.267-.096.093-.428-.77-.424s-1.653.293-2.659.677a2.782%202.782%200%200%201%20-.46.135%209.554%209.554%200%200%200%20-2.853-.1c-1.866.21-3.356%201.092-4.452%202.6-1.315%201.81-1.625%203.87-1.246%206.018.399%202.261%201.552%204.136%203.326%205.601%201.837%201.518%203.955%202.262%206.37%202.12%201.466-.085%203.1-.282%204.942-1.842.465.23.952.322%201.762.392.623.059%201.223-.031%201.687-.127.728-.154.677-.828.414-.953-2.132-.994-1.665-.59-2.09-.916%201.084-1.285%202.717-2.619%203.356-6.94.05-.343.007-.558%200-.837-.004-.168.034-.235.228-.254a4.084%204.084%200%200%200%201.529-.47c1.382-.757%201.938-1.997%202.07-3.485.02-.227-.004-.463-.243-.582zm-12.041%2013.391c-2.067-1.627-3.07-2.162-3.483-2.138-.387.021-.318.465-.233.754.089.285.205.482.368.732.113.166.19.414-.112.598-.666.414-1.823-.139-1.878-.166-1.347-.793-2.473-1.842-3.267-3.276-.765-1.38-1.21-2.861-1.284-4.441-.02-.383.093-.518.472-.586a4.692%204.692%200%200%201%201.514-.04c2.109.31%203.905%201.255%205.41%202.749.86.853%201.51%201.871%202.18%202.865.711%201.057%201.478%202.063%202.454%202.887.343.289.619.51.881.672-.792.088-2.117.107-3.022-.61zm.99-6.38a.304.304%200%201%201%20.609%200c0%20.17-.136.304-.306.304a.3.3%200%200%201%20-.303-.305zm3.077%201.581c-.197.08-.394.15-.584.159a1.246%201.246%200%200%201%20-.79-.252c-.27-.227-.463-.354-.546-.752a1.752%201.752%200%200%201%20.016-.582c.07-.324-.008-.531-.235-.72-.187-.155-.422-.196-.682-.196a.551.551%200%200%201%20-.252-.078c-.108-.055-.197-.19-.112-.356.027-.053.159-.183.19-.207.352-.201.758-.135%201.134.016.349.142.611.404.99.773.388.448.457.573.678.906.174.264.333.534.441.842.066.192-.02.35-.248.448z'%20fill='%234d6bfe'/%3e%3c/svg%3e",Ej="/assets/minimax-BPMzvuL-.jpeg",Nj="/assets/alibaba-TTwafVwX.svg",Tj="/assets/qwen-CONDcHqt.png",Aj="/assets/zhipuai-BPNAnxo-.svg",Ij={"claude-":"anthropic","gpt-":"openai","o1-":"openai","o3-":"openai","deepseek-":"deepseek",MiniMax:"minimax",qwen:"qwen","glm-":"zhipuai"};function rm(e){if(e===null)return"unknown";const t=e.toLowerCase();for(const[n,r]of Object.entries(Ij))if(t.startsWith(n.toLowerCase()))return r;return"unknown"}const In={width:24,height:24,objectFit:"contain"},zj=lt.memo(({className:e})=>a.jsx("img",{src:Sj,alt:"Anthropic",className:e,style:In})),Pj=lt.memo(({className:e})=>a.jsx("img",{src:Cj,alt:"OpenAI",className:e,style:{...In,background:"white",borderRadius:"4px"}})),Rj=lt.memo(({className:e})=>a.jsx("img",{src:jj,alt:"DeepSeek",className:e,style:In})),Oj=lt.memo(({className:e})=>a.jsx("img",{src:Ej,alt:"MiniMax",className:e,style:In})),Mj=lt.memo(({className:e})=>a.jsx("img",{src:Nj,alt:"Alibaba",className:e,style:In})),Lj=lt.memo(({className:e})=>a.jsx("img",{src:Tj,alt:"Qwen",className:e,style:In})),Dj=lt.memo(({className:e})=>a.jsx("img",{src:Aj,alt:"ZhipuAI",className:e,style:In}));function om({provider:e,className:t}){switch(e){case"anthropic":return a.jsx(zj,{className:t});case"openai":return a.jsx(Pj,{className:t});case"deepseek":return a.jsx(Rj,{className:t});case"minimax":return a.jsx(Oj,{className:t});case"alibaba":return a.jsx(Mj,{className:t});case"qwen":return a.jsx(Lj,{className:t});case"zhipuai":return a.jsx(Dj,{className:t});case"unknown":return null}}function et({delayDuration:e=0,...t}){return a.jsx(q5,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function De({...e}){return a.jsx(K5,{"data-slot":"tooltip",...e})}function Fe({...e}){return a.jsx(J5,{"data-slot":"tooltip-trigger",...e})}function $e({className:e,sideOffset:t=0,children:n,...r}){return a.jsx(G5,{children:a.jsxs(Y5,{"data-slot":"tooltip-content",sideOffset:t,className:ve("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,a.jsx(X5,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function rl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Oe(e,t){return e===null||typeof e!="object"||Array.isArray(e)?void 0:Object.getOwnPropertyDescriptor(e,t)?.value}const Fj="x-anthropic-billing-header:";function $j(e){return e.trimStart().toLowerCase().startsWith(Fj)}function Bj(e){return rl(e)?Object.prototype.hasOwnProperty.call(e,"system"):!1}function Uj(e){if(!rl(e))return!1;const t=Oe(e,"type"),n=Oe(e,"text");return typeof t!="string"||t!=="text"||typeof n!="string"?!1:$j(n)}function Wj(e){let t;try{t=JSON.parse(e)}catch{return{body:e,removed:0}}if(!Bj(t))return{body:e,removed:0};const n=t.system;if(!Array.isArray(n)||n.length===0)return{body:e,removed:0};const r=[];let o=0;for(const s of n){if(Uj(s)){o+=1;continue}r.push(s)}return o===0?{body:e,removed:0}:(r.length===0?delete t.system:t.system=r,{body:JSON.stringify(t),removed:o})}function Vj(e){return{depth:Number.POSITIVE_INFINITY}}function sm(e){try{const t=JSON.parse(e);return{kind:"json",data:Ho(t)}}catch{return{kind:"text"}}}function Ks(e){const t=x.useMemo(()=>e===null?null:sm(e),[e]),n=t?.kind==="json"?t.data:null,r=x.useMemo(()=>n===null?null:Vj(),[n]),[o,s]=x.useState(!1),[i,l]=x.useState(0),[c,u]=x.useState(0),[d,f]=x.useTransition(),h=x.useCallback(()=>{const p=!o,b=p&&r!==null?r.depth:0;f(()=>{s(p),l(b),u(m=>m+1)})},[o,r]);return{parsedData:n,policy:r,isExpanded:o,toggle:h,isPending:d,bulkDepth:i,bulkRevision:c}}function Ho(e){if(e==null)return null;switch(typeof e){case"string":return e;case"number":return e;case"boolean":return e;case"object":{if(Array.isArray(e))return e.map(n=>Ho(n));const t={};for(const n of Object.keys(e)){const r=Object.getOwnPropertyDescriptor(e,n);t[n]=Ho(r?.value)}return t}case"bigint":case"symbol":case"function":case"undefined":return String(e)}return null}function im({className:e,orientation:t="horizontal",...n}){return a.jsx(N5,{"data-slot":"tabs","data-orientation":t,orientation:t,className:ve("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const Hj=Ta("rounded-lg p-[3px] group-data-[orientation=horizontal]/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function am({className:e,variant:t="default",...n}){return a.jsx(T5,{"data-slot":"tabs-list","data-variant":t,className:ve(Hj({variant:t}),e),...n})}function Ct({className:e,...t}){return a.jsx(A5,{"data-slot":"tabs-trigger",className:ve("focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 data-[state=active]:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function jt({className:e,...t}){return a.jsx(I5,{"data-slot":"tabs-content",className:ve("flex-1 outline-none",e),...t})}function vn(e){const[t,n]=x.useState(!1),r=x.useRef(null);x.useEffect(()=>()=>{r.current!==null&&clearTimeout(r.current)},[]);const o=x.useCallback(s=>{s.stopPropagation(),e!==null&&window.navigator.clipboard.writeText(e).then(()=>{n(!0),r.current!==null&&clearTimeout(r.current),r.current=setTimeout(()=>n(!1),2e3)})},[e]);return{copied:t,copy:o}}const Zj=x.lazy(()=>Nn(()=>import("./CompareDrawer-DcqxlgSQ.js"),__vite__mapDeps([0,1])).then(e=>({default:e.CompareDrawer}))),qj=x.lazy(()=>Nn(()=>import("./ReplayDialog-CBcnPgx1.js"),__vite__mapDeps([2,1,3])).then(e=>({default:e.ReplayDialog}))),Kj=x.lazy(()=>Nn(()=>import("./RequestAnatomy-DSgSqCYt.js"),__vite__mapDeps([4,1])).then(e=>({default:e.RequestAnatomy}))),Jj=x.lazy(()=>Nn(()=>import("./ResponseView-CjqzBSoF.js"),__vite__mapDeps([3,1])).then(e=>({default:e.ResponseView}))),Gj=x.lazy(()=>Nn(()=>import("./StreamingChunkSequence-DdBBKolI.js"),__vite__mapDeps([5,1])).then(e=>({default:e.StreamingChunkSequence}))),Oc=x.lazy(()=>Nn(()=>Promise.resolve().then(()=>eg),void 0).then(e=>({default:e.JsonViewer}))),Yj=x.lazy(()=>Nn(()=>Promise.resolve().then(()=>eg),void 0).then(e=>({default:e.JsonViewerFromString}))),Xj=1200,Qj=12;function eE(e){const{containerRef:t,setExpandToPath:n,ensureTabActive:r,highlightMs:o}=e,s=x.useRef(null);return x.useCallback(i=>{r?.(),n(i.path);const l=f=>{f.scrollIntoView({behavior:"smooth",block:"center"}),f.classList.add("ring-2","ring-primary/60","ring-offset-1","ring-offset-background","rounded-sm","transition-shadow"),s.current!==null&&clearTimeout(s.current),s.current=setTimeout(()=>{f.classList.remove("ring-2","ring-primary/60","ring-offset-1","ring-offset-background","rounded-sm","transition-shadow"),n(null)},o??Xj)},u=`[data-anatomy-path="${(f=>typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(f):f.replace(/(["'\\[\](){}])/g,"\\$1"))(i.path)}"]`,d=f=>{const h=t.current;if(h!==null){const p=h.querySelector(u);if(p!==null){l(p);return}}f>0?window.requestAnimationFrame(()=>d(f-1)):n(null)};window.requestAnimationFrame(()=>d(Qj))},[t,r,o,n])}class lm{diff(t,n,r={}){let o;typeof r=="function"?(o=r,r={}):"callback"in r&&(o=r.callback);const s=this.castInput(t,r),i=this.castInput(n,r),l=this.removeEmpty(this.tokenize(s,r)),c=this.removeEmpty(this.tokenize(i,r));return this.diffWithOptionsObj(l,c,r,o)}diffWithOptionsObj(t,n,r,o){var s;const i=v=>{if(v=this.postProcess(v,r),o){setTimeout(function(){o(v)},0);return}else return v},l=n.length,c=t.length;let u=1,d=l+c;r.maxEditLength!=null&&(d=Math.min(d,r.maxEditLength));const f=(s=r.timeout)!==null&&s!==void 0?s:1/0,h=Date.now()+f,p=[{oldPos:-1,lastComponent:void 0}];let b=this.extractCommon(p[0],n,t,0,r);if(p[0].oldPos+1>=c&&b+1>=l)return i(this.buildValues(p[0].lastComponent,n,t));let m=-1/0,g=1/0;const y=()=>{for(let v=Math.max(m,-u);v<=Math.min(g,u);v+=2){let k;const S=p[v-1],C=p[v+1];S&&(p[v-1]=void 0);let j=!1;if(C){const T=C.oldPos-v;j=C&&0<=T&&T<l}const N=S&&S.oldPos+1<c;if(!j&&!N){p[v]=void 0;continue}if(!N||j&&S.oldPos<C.oldPos?k=this.addToPath(C,!0,!1,0,r):k=this.addToPath(S,!1,!0,1,r),b=this.extractCommon(k,n,t,v,r),k.oldPos+1>=c&&b+1>=l)return i(this.buildValues(k.lastComponent,n,t))||!0;p[v]=k,k.oldPos+1>=c&&(g=Math.min(g,v-1)),b+1>=l&&(m=Math.max(m,v+1))}u++};if(o)(function v(){setTimeout(function(){if(u>d||Date.now()>h)return o(void 0);y()||v()},0)})();else for(;u<=d&&Date.now()<=h;){const v=y();if(v)return v}}addToPath(t,n,r,o,s){const i=t.lastComponent;return i&&!s.oneChangePerToken&&i.added===n&&i.removed===r?{oldPos:t.oldPos+o,lastComponent:{count:i.count+1,added:n,removed:r,previousComponent:i.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:r,previousComponent:i}}}extractCommon(t,n,r,o,s){const i=n.length,l=r.length;let c=t.oldPos,u=c-o,d=0;for(;u+1<i&&c+1<l&&this.equals(r[c+1],n[u+1],s);)u++,c++,d++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!s.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,u}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const o=[];let s;for(;t;)o.push(t),s=t.previousComponent,delete t.previousComponent,t=s;o.reverse();const i=o.length;let l=0,c=0,u=0;for(;l<i;l++){const d=o[l];if(d.removed)d.value=this.join(r.slice(u,u+d.count)),u+=d.count;else{if(!d.added&&this.useLongestToken){let f=n.slice(c,c+d.count);f=f.map(function(h,p){const b=r[u+p];return b.length>h.length?b:h}),d.value=this.join(f)}else d.value=this.join(n.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}return o}}class tE extends lm{constructor(){super(...arguments),this.tokenize=um}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
85
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},W_="DialogDescriptionWarning",V_=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${xp(W_).contentName}}.`;return x.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},H_=op,Z_=ip,q_=lp,K_=cp,J_=up,G_=fp,Y_=mp;function X_(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Q_(e){const[t,n]=x.useState(void 0);return tt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;n({width:i,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const eS=["top","right","bottom","left"],un=Math.min,mt=Math.max,Lo=Math.round,uo=Math.floor,Ft=e=>({x:e,y:e}),tS={left:"right",right:"left",bottom:"top",top:"bottom"},nS={start:"end",end:"start"};function Ai(e,t,n){return mt(e,un(t,n))}function Gt(e,t){return typeof e=="function"?e(t):e}function Yt(e){return e.split("-")[0]}function ar(e){return e.split("-")[1]}function Da(e){return e==="x"?"y":"x"}function Fa(e){return e==="y"?"height":"width"}const rS=new Set(["top","bottom"]);function Lt(e){return rS.has(Yt(e))?"y":"x"}function $a(e){return Da(Lt(e))}function oS(e,t,n){n===void 0&&(n=!1);const r=ar(e),o=$a(e),s=Fa(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Do(i)),[i,Do(i)]}function sS(e){const t=Do(e);return[Ii(e),t,Ii(t)]}function Ii(e){return e.replace(/start|end/g,t=>nS[t])}const kc=["left","right"],_c=["right","left"],iS=["top","bottom"],aS=["bottom","top"];function lS(e,t,n){switch(e){case"top":case"bottom":return n?t?_c:kc:t?kc:_c;case"left":case"right":return t?iS:aS;default:return[]}}function cS(e,t,n,r){const o=ar(e);let s=lS(Yt(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ii)))),s}function Do(e){return e.replace(/left|right|bottom|top/g,t=>tS[t])}function uS(e){return{top:0,right:0,bottom:0,left:0,...e}}function yp(e){return typeof e!="number"?uS(e):{top:e,right:e,bottom:e,left:e}}function Fo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Sc(e,t,n){let{reference:r,floating:o}=e;const s=Lt(t),i=$a(t),l=Fa(i),c=Yt(t),u=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(ar(t)){case"start":p[i]-=h*(n&&u?-1:1);break;case"end":p[i]+=h*(n&&u?-1:1);break}return p}async function dS(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Gt(t,e),b=yp(p),g=l[h?f==="floating"?"reference":"floating":f],y=Fo(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),v=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},C=Fo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:k,strategy:c}):v);return{top:(y.top-C.top+b.top)/S.y,bottom:(C.bottom-y.bottom+b.bottom)/S.y,left:(y.left-C.left+b.left)/S.x,right:(C.right-y.right+b.right)/S.x}}const fS=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,l=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Sc(u,r,c),h=r,p={},b=0;for(let g=0;g<l.length;g++){var m;const{name:y,fn:v}=l[g],{x:k,y:S,data:C,reset:j}=await v({x:d,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:u,platform:{...i,detectOverflow:(m=i.detectOverflow)!=null?m:dS},elements:{reference:e,floating:t}});d=k??d,f=S??f,p={...p,[y]:{...p[y],...C}},j&&b<=50&&(b++,typeof j=="object"&&(j.placement&&(h=j.placement),j.rects&&(u=j.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):j.rects),{x:d,y:f}=Sc(u,h,c)),g=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:p}},pS=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Gt(e,t)||{};if(u==null)return{};const f=yp(d),h={x:n,y:r},p=$a(o),b=Fa(p),m=await i.getDimensions(u),g=p==="y",y=g?"top":"left",v=g?"bottom":"right",k=g?"clientHeight":"clientWidth",S=s.reference[b]+s.reference[p]-h[p]-s.floating[b],C=h[p]-s.reference[p],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let N=j?j[k]:0;(!N||!await(i.isElement==null?void 0:i.isElement(j)))&&(N=l.floating[k]||s.floating[b]);const T=S/2-C/2,A=N/2-m[b]/2-1,O=un(f[y],A),$=un(f[v],A),E=O,L=N-m[b]-$,w=N/2-m[b]/2+T,M=Ai(E,w,L),U=!c.arrow&&ar(o)!=null&&w!==M&&s.reference[b]/2-(w<E?O:$)-m[b]/2<0,F=U?w<E?w-E:w-L:0;return{[p]:h[p]+F,data:{[p]:M,centerOffset:w-M-F,...U&&{alignmentOffset:F}},reset:U}}}),hS=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...g}=Gt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Yt(o),v=Lt(l),k=Yt(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=h||(k||!m?[Do(l)]:sS(l)),j=b!=="none";!h&&j&&C.push(...cS(l,m,b,S));const N=[l,...C],T=await c.detectOverflow(t,g),A=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&A.push(T[y]),f){const w=oS(o,i,S);A.push(T[w[0]],T[w[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(w=>w<=0)){var $,E;const w=((($=s.flip)==null?void 0:$.index)||0)+1,M=N[w];if(M&&(!(f==="alignment"?v!==Lt(M):!1)||O.every(B=>Lt(B.placement)===v?B.overflows[0]>0:!0)))return{data:{index:w,overflows:O},reset:{placement:M}};let U=(E=O.filter(F=>F.overflows[0]<=0).sort((F,B)=>F.overflows[1]-B.overflows[1])[0])==null?void 0:E.placement;if(!U)switch(p){case"bestFit":{var L;const F=(L=O.filter(B=>{if(j){const G=Lt(B.placement);return G===v||G==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(G=>G>0).reduce((G,I)=>G+I,0)]).sort((B,G)=>B[1]-G[1])[0])==null?void 0:L[0];F&&(U=F);break}case"initialPlacement":U=l;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function Cc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jc(e){return eS.some(t=>e[t]>=0)}const mS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Gt(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),l=Cc(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:jc(l)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),l=Cc(i,n.floating);return{data:{escapedOffsets:l,escaped:jc(l)}}}default:return{}}}}},bp=new Set(["left","top"]);async function gS(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Yt(n),l=ar(n),c=Lt(n)==="y",u=bp.has(i)?-1:1,d=s&&c?-1:1,f=Gt(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof b=="number"&&(p=l==="end"?b*-1:b),c?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const xS=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:l}=t,c=await gS(t,e);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},yS=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:y=>{let{x:v,y:k}=y;return{x:v,y:k}}},...u}=Gt(e,t),d={x:n,y:r},f=await s.detectOverflow(t,u),h=Lt(Yt(o)),p=Da(h);let b=d[p],m=d[h];if(i){const y=p==="y"?"top":"left",v=p==="y"?"bottom":"right",k=b+f[y],S=b-f[v];b=Ai(k,b,S)}if(l){const y=h==="y"?"top":"left",v=h==="y"?"bottom":"right",k=m+f[y],S=m-f[v];m=Ai(k,m,S)}const g=c.fn({...t,[p]:b,[h]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[h]:l}}}}}},bS=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Gt(e,t),d={x:n,y:r},f=Lt(o),h=Da(f);let p=d[h],b=d[f];const m=Gt(l,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const k=h==="y"?"height":"width",S=s.reference[h]-s.floating[k]+g.mainAxis,C=s.reference[h]+s.reference[k]-g.mainAxis;p<S?p=S:p>C&&(p=C)}if(u){var y,v;const k=h==="y"?"width":"height",S=bp.has(Yt(o)),C=s.reference[f]-s.floating[k]+(S&&((y=i.offset)==null?void 0:y[f])||0)+(S?0:g.crossAxis),j=s.reference[f]+s.reference[k]+(S?0:((v=i.offset)==null?void 0:v[f])||0)-(S?g.crossAxis:0);b<C?b=C:b>j&&(b=j)}return{[h]:p,[f]:b}}}},vS=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:l}=t,{apply:c=()=>{},...u}=Gt(e,t),d=await i.detectOverflow(t,u),f=Yt(o),h=ar(o),p=Lt(o)==="y",{width:b,height:m}=s.floating;let g,y;f==="top"||f==="bottom"?(g=f,y=h===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=f,g=h==="end"?"top":"bottom");const v=m-d.top-d.bottom,k=b-d.left-d.right,S=un(m-d[g],v),C=un(b-d[y],k),j=!t.middlewareData.shift;let N=S,T=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=v),j&&!h){const O=mt(d.left,0),$=mt(d.right,0),E=mt(d.top,0),L=mt(d.bottom,0);p?T=b-2*(O!==0||$!==0?O+$:mt(d.left,d.right)):N=m-2*(E!==0||L!==0?E+L:mt(d.top,d.bottom))}await c({...t,availableWidth:T,availableHeight:N});const A=await i.getDimensions(l.floating);return b!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function ps(){return typeof window<"u"}function lr(e){return vp(e)?(e.nodeName||"").toLowerCase():"#document"}function xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vt(e){var t;return(t=(vp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vp(e){return ps()?e instanceof Node||e instanceof xt(e).Node:!1}function Tt(e){return ps()?e instanceof Element||e instanceof xt(e).Element:!1}function $t(e){return ps()?e instanceof HTMLElement||e instanceof xt(e).HTMLElement:!1}function Ec(e){return!ps()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xt(e).ShadowRoot}const wS=new Set(["inline","contents"]);function Vr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=At(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!wS.has(o)}const kS=new Set(["table","td","th"]);function _S(e){return kS.has(lr(e))}const SS=[":popover-open",":modal"];function hs(e){return SS.some(t=>{try{return e.matches(t)}catch{return!1}})}const CS=["transform","translate","scale","rotate","perspective"],jS=["transform","translate","scale","rotate","perspective","filter"],ES=["paint","layout","strict","content"];function Ba(e){const t=Ua(),n=Tt(e)?At(e):e;return CS.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||jS.some(r=>(n.willChange||"").includes(r))||ES.some(r=>(n.contain||"").includes(r))}function NS(e){let t=dn(e);for(;$t(t)&&!tr(t);){if(Ba(t))return t;if(hs(t))return null;t=dn(t)}return null}function Ua(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const TS=new Set(["html","body","#document"]);function tr(e){return TS.has(lr(e))}function At(e){return xt(e).getComputedStyle(e)}function ms(e){return Tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dn(e){if(lr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ec(e)&&e.host||Vt(e);return Ec(t)?t.host:t}function wp(e){const t=dn(e);return tr(t)?e.ownerDocument?e.ownerDocument.body:e.body:$t(t)&&Vr(t)?t:wp(t)}function Or(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=wp(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=xt(o);if(s){const l=zi(i);return t.concat(i,i.visualViewport||[],Vr(o)?o:[],l&&n?Or(l):[])}return t.concat(o,Or(o,[],n))}function zi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kp(e){const t=At(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=$t(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Lo(n)!==s||Lo(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function Wa(e){return Tt(e)?e:e.contextElement}function qn(e){const t=Wa(e);if(!$t(t))return Ft(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=kp(t);let i=(s?Lo(n.width):n.width)/r,l=(s?Lo(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const AS=Ft(0);function _p(e){const t=xt(e);return!Ua()||!t.visualViewport?AS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function IS(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xt(e)?!1:t}function Cn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Wa(e);let i=Ft(1);t&&(r?Tt(r)&&(i=qn(r)):i=qn(e));const l=IS(s,n,r)?_p(s):Ft(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const h=xt(s),p=r&&Tt(r)?xt(r):r;let b=h,m=zi(b);for(;m&&r&&p!==b;){const g=qn(m),y=m.getBoundingClientRect(),v=At(m),k=y.left+(m.clientLeft+parseFloat(v.paddingLeft))*g.x,S=y.top+(m.clientTop+parseFloat(v.paddingTop))*g.y;c*=g.x,u*=g.y,d*=g.x,f*=g.y,c+=k,u+=S,b=xt(m),m=zi(b)}}return Fo({width:d,height:f,x:c,y:u})}function gs(e,t){const n=ms(e).scrollLeft;return t?t.left+n:Cn(Vt(e)).left+n}function Sp(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-gs(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function zS(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Vt(r),l=t?hs(t.floating):!1;if(r===i||l&&s)return n;let c={scrollLeft:0,scrollTop:0},u=Ft(1);const d=Ft(0),f=$t(r);if((f||!f&&!s)&&((lr(r)!=="body"||Vr(i))&&(c=ms(r)),$t(r))){const p=Cn(r);u=qn(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=i&&!f&&!s?Sp(i,c):Ft(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-c.scrollTop*u.y+d.y+h.y}}function PS(e){return Array.from(e.getClientRects())}function RS(e){const t=Vt(e),n=ms(e),r=e.ownerDocument.body,o=mt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=mt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+gs(e);const l=-n.scrollTop;return At(r).direction==="rtl"&&(i+=mt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:l}}const Nc=25;function OS(e,t){const n=xt(e),r=Vt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(o){s=o.width,i=o.height;const d=Ua();(!d||d&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const u=gs(r);if(u<=0){const d=r.ownerDocument,f=d.body,h=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(r.clientWidth-f.clientWidth-p);b<=Nc&&(s-=b)}else u<=Nc&&(s+=u);return{width:s,height:i,x:l,y:c}}const MS=new Set(["absolute","fixed"]);function LS(e,t){const n=Cn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=$t(e)?qn(e):Ft(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:i,height:l,x:c,y:u}}function Tc(e,t,n){let r;if(t==="viewport")r=OS(e,n);else if(t==="document")r=RS(Vt(e));else if(Tt(t))r=LS(t,n);else{const o=_p(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Fo(r)}function Cp(e,t){const n=dn(e);return n===t||!Tt(n)||tr(n)?!1:At(n).position==="fixed"||Cp(n,t)}function DS(e,t){const n=t.get(e);if(n)return n;let r=Or(e,[],!1).filter(l=>Tt(l)&&lr(l)!=="body"),o=null;const s=At(e).position==="fixed";let i=s?dn(e):e;for(;Tt(i)&&!tr(i);){const l=At(i),c=Ba(i);!c&&l.position==="fixed"&&(o=null),(s?!c&&!o:!c&&l.position==="static"&&!!o&&MS.has(o.position)||Vr(i)&&!c&&Cp(e,i))?r=r.filter(d=>d!==i):o=l,i=dn(i)}return t.set(e,r),r}function FS(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?hs(t)?[]:DS(t,this._c):[].concat(n),r],l=i[0],c=i.reduce((u,d)=>{const f=Tc(t,d,o);return u.top=mt(f.top,u.top),u.right=un(f.right,u.right),u.bottom=un(f.bottom,u.bottom),u.left=mt(f.left,u.left),u},Tc(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function $S(e){const{width:t,height:n}=kp(e);return{width:t,height:n}}function BS(e,t,n){const r=$t(t),o=Vt(t),s=n==="fixed",i=Cn(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=Ft(0);function u(){c.x=gs(o)}if(r||!r&&!s)if((lr(t)!=="body"||Vr(o))&&(l=ms(t)),r){const p=Cn(t,!0,s,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&u();s&&!r&&o&&u();const d=o&&!r&&!s?Sp(o,l):Ft(0),f=i.left+l.scrollLeft-c.x-d.x,h=i.top+l.scrollTop-c.y-d.y;return{x:f,y:h,width:i.width,height:i.height}}function Hs(e){return At(e).position==="static"}function Ac(e,t){if(!$t(e)||At(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vt(e)===n&&(n=n.ownerDocument.body),n}function jp(e,t){const n=xt(e);if(hs(e))return n;if(!$t(e)){let o=dn(e);for(;o&&!tr(o);){if(Tt(o)&&!Hs(o))return o;o=dn(o)}return n}let r=Ac(e,t);for(;r&&_S(r)&&Hs(r);)r=Ac(r,t);return r&&tr(r)&&Hs(r)&&!Ba(r)?n:r||NS(e)||n}const US=async function(e){const t=this.getOffsetParent||jp,n=this.getDimensions,r=await n(e.floating);return{reference:BS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function WS(e){return At(e).direction==="rtl"}const VS={convertOffsetParentRelativeRectToViewportRelativeRect:zS,getDocumentElement:Vt,getClippingRect:FS,getOffsetParent:jp,getElementRects:US,getClientRects:PS,getDimensions:$S,getScale:qn,isElement:Tt,isRTL:WS};function Ep(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function HS(e,t){let n=null,r;const o=Vt(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:p}=u;if(l||t(),!h||!p)return;const b=uo(f),m=uo(o.clientWidth-(d+h)),g=uo(o.clientHeight-(f+p)),y=uo(d),k={rootMargin:-b+"px "+-m+"px "+-g+"px "+-y+"px",threshold:mt(0,un(1,c))||1};let S=!0;function C(j){const N=j[0].intersectionRatio;if(N!==c){if(!S)return i();N?i(!1,N):r=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!Ep(u,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(C,{...k,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,k)}n.observe(e)}return i(!0),s}function ZS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Wa(e),d=o||s?[...u?Or(u):[],...Or(t)]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=u&&l?HS(u,n):null;let h=-1,p=null;i&&(p=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=p)==null||k.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let b,m=c?Cn(e):null;c&&g();function g(){const y=Cn(e);m&&!Ep(m,y)&&n(),m=y,b=requestAnimationFrame(g)}return n(),()=>{var y;d.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),f?.(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(b)}}const qS=xS,KS=yS,JS=hS,GS=vS,YS=mS,Ic=pS,XS=bS,QS=(e,t,n)=>{const r=new Map,o={platform:VS,...n},s={...o.platform,_c:r};return fS(e,t,{...o,platform:s})};var eC=typeof document<"u",tC=function(){},_o=eC?x.useLayoutEffect:tC;function $o(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!$o(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!$o(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Np(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zc(e,t){const n=Np(e);return Math.round(t*n)/n}function Zs(e){const t=x.useRef(e);return _o(()=>{t.current=e}),t}function nC(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=x.useState(r);$o(h,r)||p(r);const[b,m]=x.useState(null),[g,y]=x.useState(null),v=x.useCallback(B=>{B!==j.current&&(j.current=B,m(B))},[]),k=x.useCallback(B=>{B!==N.current&&(N.current=B,y(B))},[]),S=s||b,C=i||g,j=x.useRef(null),N=x.useRef(null),T=x.useRef(d),A=c!=null,O=Zs(c),$=Zs(o),E=Zs(u),L=x.useCallback(()=>{if(!j.current||!N.current)return;const B={placement:t,strategy:n,middleware:h};$.current&&(B.platform=$.current),QS(j.current,N.current,B).then(G=>{const I={...G,isPositioned:E.current!==!1};w.current&&!$o(T.current,I)&&(T.current=I,Br.flushSync(()=>{f(I)}))})},[h,t,n,$,E]);_o(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(B=>({...B,isPositioned:!1})))},[u]);const w=x.useRef(!1);_o(()=>(w.current=!0,()=>{w.current=!1}),[]),_o(()=>{if(S&&(j.current=S),C&&(N.current=C),S&&C){if(O.current)return O.current(S,C,L);L()}},[S,C,L,O,A]);const M=x.useMemo(()=>({reference:j,floating:N,setReference:v,setFloating:k}),[v,k]),U=x.useMemo(()=>({reference:S,floating:C}),[S,C]),F=x.useMemo(()=>{const B={position:n,left:0,top:0};if(!U.floating)return B;const G=zc(U.floating,d.x),I=zc(U.floating,d.y);return l?{...B,transform:"translate("+G+"px, "+I+"px)",...Np(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:I}},[n,l,U.floating,d.x,d.y]);return x.useMemo(()=>({...d,update:L,refs:M,elements:U,floatingStyles:F}),[d,L,M,U,F])}const rC=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ic({element:r.current,padding:o}).fn(n):{}:r?Ic({element:r,padding:o}).fn(n):{}}}},oC=(e,t)=>({...qS(e),options:[e,t]}),sC=(e,t)=>({...KS(e),options:[e,t]}),iC=(e,t)=>({...XS(e),options:[e,t]}),aC=(e,t)=>({...JS(e),options:[e,t]}),lC=(e,t)=>({...GS(e),options:[e,t]}),cC=(e,t)=>({...YS(e),options:[e,t]}),uC=(e,t)=>({...rC(e),options:[e,t]});var dC="Arrow",Tp=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return a.jsx(Te.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Tp.displayName=dC;var fC=Tp,Va="Popper",[Ap,xs]=tn(Va),[pC,Ip]=Ap(Va),zp=e=>{const{__scopePopper:t,children:n}=e,[r,o]=x.useState(null);return a.jsx(pC,{scope:t,anchor:r,onAnchorChange:o,children:n})};zp.displayName=Va;var Pp="PopperAnchor",Rp=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Ip(Pp,n),i=x.useRef(null),l=Le(t,i),c=x.useRef(null);return x.useEffect(()=>{const u=c.current;c.current=r?.current||i.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:a.jsx(Te.div,{...o,ref:l})});Rp.displayName=Pp;var Ha="PopperContent",[hC,mC]=Ap(Ha),Op=x.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:b,...m}=e,g=Ip(Ha,n),[y,v]=x.useState(null),k=Le(t,ie=>v(ie)),[S,C]=x.useState(null),j=Q_(S),N=j?.width??0,T=j?.height??0,A=r+(s!=="center"?"-"+s:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(u)?u:[u],E=$.length>0,L={padding:O,boundary:$.filter(xC),altBoundary:E},{refs:w,floatingStyles:M,placement:U,isPositioned:F,middlewareData:B}=nC({strategy:"fixed",placement:A,whileElementsMounted:(...ie)=>ZS(...ie,{animationFrame:p==="always"}),elements:{reference:g.anchor},middleware:[oC({mainAxis:o+T,alignmentAxis:i}),c&&sC({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?iC():void 0,...L}),c&&aC({...L}),lC({...L,apply:({elements:ie,rects:de,availableWidth:pe,availableHeight:he})=>{const{width:me,height:ke}=de.reference,ze=ie.floating.style;ze.setProperty("--radix-popper-available-width",`${pe}px`),ze.setProperty("--radix-popper-available-height",`${he}px`),ze.setProperty("--radix-popper-anchor-width",`${me}px`),ze.setProperty("--radix-popper-anchor-height",`${ke}px`)}}),S&&uC({element:S,padding:l}),yC({arrowWidth:N,arrowHeight:T}),h&&cC({strategy:"referenceHidden",...L})]}),[G,I]=Dp(U),H=st(b);tt(()=>{F&&H?.()},[F,H]);const K=B.arrow?.x,z=B.arrow?.y,se=B.arrow?.centerOffset!==0,[re,ue]=x.useState();return tt(()=>{y&&ue(window.getComputedStyle(y).zIndex)},[y]),a.jsx("div",{ref:w.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:F?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(hC,{scope:n,placedSide:G,onArrowChange:C,arrowX:K,arrowY:z,shouldHideArrow:se,children:a.jsx(Te.div,{"data-side":G,"data-align":I,...m,ref:k,style:{...m.style,animation:F?void 0:"none"}})})})});Op.displayName=Ha;var Mp="PopperArrow",gC={top:"bottom",right:"left",bottom:"top",left:"right"},Lp=x.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=mC(Mp,r),i=gC[s.placedSide];return a.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:a.jsx(fC,{...o,ref:n,style:{...o.style,display:"block"}})})});Lp.displayName=Mp;function xC(e){return e!==null}var yC=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=Dp(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(o.arrow?.x??0)+l/2,p=(o.arrow?.y??0)+c/2;let b="",m="";return u==="bottom"?(b=i?f:`${h}px`,m=`${-c}px`):u==="top"?(b=i?f:`${h}px`,m=`${r.floating.height+c}px`):u==="right"?(b=`${-c}px`,m=i?f:`${p}px`):u==="left"&&(b=`${r.floating.width+c}px`,m=i?f:`${p}px`),{data:{x:b,y:m}}}});function Dp(e){const[t,n="center"]=e.split("-");return[t,n]}var Fp=zp,$p=Rp,Bp=Op,Up=Lp,qs="rovingFocusGroup.onEntryFocus",bC={bubbles:!1,cancelable:!0},Hr="RovingFocusGroup",[Pi,Wp,vC]=Ff(Hr),[wC,Vp]=tn(Hr,[vC]),[kC,_C]=wC(Hr),Hp=x.forwardRef((e,t)=>a.jsx(Pi.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Pi.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(SC,{...e,ref:t})})}));Hp.displayName=Hr;var SC=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=x.useRef(null),p=Le(t,h),b=ls(s),[m,g]=_n({prop:i,defaultProp:l??null,onChange:c,caller:Hr}),[y,v]=x.useState(!1),k=st(u),S=Wp(n),C=x.useRef(!1),[j,N]=x.useState(0);return x.useEffect(()=>{const T=h.current;if(T)return T.addEventListener(qs,k),()=>T.removeEventListener(qs,k)},[k]),a.jsx(kC,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:m,onItemFocus:x.useCallback(T=>g(T),[g]),onItemShiftTab:x.useCallback(()=>v(!0),[]),onFocusableItemAdd:x.useCallback(()=>N(T=>T+1),[]),onFocusableItemRemove:x.useCallback(()=>N(T=>T-1),[]),children:a.jsx(Te.div,{tabIndex:y||j===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:_e(e.onMouseDown,()=>{C.current=!0}),onFocus:_e(e.onFocus,T=>{const A=!C.current;if(T.target===T.currentTarget&&A&&!y){const O=new CustomEvent(qs,bC);if(T.currentTarget.dispatchEvent(O),!O.defaultPrevented){const $=S().filter(U=>U.focusable),E=$.find(U=>U.active),L=$.find(U=>U.id===m),M=[E,L,...$].filter(Boolean).map(U=>U.ref.current);Kp(M,d)}}C.current=!1}),onBlur:_e(e.onBlur,()=>v(!1))})})}),Zp="RovingFocusGroupItem",qp=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...l}=e,c=Dt(),u=s||c,d=_C(Zp,n),f=d.currentTabStopId===u,h=Wp(n),{onFocusableItemAdd:p,onFocusableItemRemove:b,currentTabStopId:m}=d;return x.useEffect(()=>{if(r)return p(),()=>b()},[r,p,b]),a.jsx(Pi.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:a.jsx(Te.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:_e(e.onMouseDown,g=>{r?d.onItemFocus(u):g.preventDefault()}),onFocus:_e(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:_e(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=EC(g,d.orientation,d.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let k=h().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")k.reverse();else if(y==="prev"||y==="next"){y==="prev"&&k.reverse();const S=k.indexOf(g.currentTarget);k=d.loop?NC(k,S+1):k.slice(S+1)}setTimeout(()=>Kp(k))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:m!=null}):i})})});qp.displayName=Zp;var CC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jC(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function EC(e,t,n){const r=jC(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return CC[r]}function Kp(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function NC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var TC=Hp,AC=qp;function Ri(e,[t,n]){return Math.min(n,Math.max(t,e))}function IC(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Za="ScrollArea",[Jp]=tn(Za),[zC,wt]=Jp(Za),Gp=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...i}=e,[l,c]=x.useState(null),[u,d]=x.useState(null),[f,h]=x.useState(null),[p,b]=x.useState(null),[m,g]=x.useState(null),[y,v]=x.useState(0),[k,S]=x.useState(0),[C,j]=x.useState(!1),[N,T]=x.useState(!1),A=Le(t,$=>c($)),O=ls(o);return a.jsx(zC,{scope:n,type:r,dir:O,scrollHideDelay:s,scrollArea:l,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:p,onScrollbarXChange:b,scrollbarXEnabled:C,onScrollbarXEnabledChange:j,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:N,onScrollbarYEnabledChange:T,onCornerWidthChange:v,onCornerHeightChange:S,children:a.jsx(Te.div,{dir:O,...i,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":k+"px",...e.style}})})});Gp.displayName=Za;var Yp="ScrollAreaViewport",Xp=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,i=wt(Yp,n),l=x.useRef(null),c=Le(t,l,i.onViewportChange);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),a.jsx(Te.div,{"data-radix-scroll-area-viewport":"",...s,ref:c,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:a.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Xp.displayName=Yp;var Ht="ScrollAreaScrollbar",Qp=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=wt(Ht,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,l=e.orientation==="horizontal";return x.useEffect(()=>(l?s(!0):i(!0),()=>{l?s(!1):i(!1)}),[l,s,i]),o.type==="hover"?a.jsx(PC,{...r,ref:t,forceMount:n}):o.type==="scroll"?a.jsx(RC,{...r,ref:t,forceMount:n}):o.type==="auto"?a.jsx(eh,{...r,ref:t,forceMount:n}):o.type==="always"?a.jsx(qa,{...r,ref:t}):null});Qp.displayName=Ht;var PC=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=wt(Ht,e.__scopeScrollArea),[s,i]=x.useState(!1);return x.useEffect(()=>{const l=o.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),i(!0)},d=()=>{c=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),a.jsx(vt,{present:n||s,children:a.jsx(eh,{"data-state":s?"visible":"hidden",...r,ref:t})})}),RC=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=wt(Ht,e.__scopeScrollArea),s=e.orientation==="horizontal",i=bs(()=>c("SCROLL_END"),100),[l,c]=IC("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return x.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,o.scrollHideDelay,c]),x.useEffect(()=>{const u=o.viewport,d=s?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const p=u[d];f!==p&&(c("SCROLL"),i()),f=p};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[o.viewport,s,c,i]),a.jsx(vt,{present:n||l!=="hidden",children:a.jsx(qa,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:_e(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:_e(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),eh=x.forwardRef((e,t)=>{const n=wt(Ht,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,i]=x.useState(!1),l=e.orientation==="horizontal",c=bs(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(l?u:d)}},10);return nr(n.viewport,c),nr(n.content,c),a.jsx(vt,{present:r||s,children:a.jsx(qa,{"data-state":s?"visible":"hidden",...o,ref:t})})}),qa=x.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=wt(Ht,e.__scopeScrollArea),s=x.useRef(null),i=x.useRef(0),[l,c]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=sh(l.viewport,l.content),d={...r,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>s.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function f(h,p){return $C(h,i.current,l,p)}return n==="horizontal"?a.jsx(OC,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const h=o.viewport.scrollLeft,p=Pc(h,l,o.dir);s.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollLeft=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollLeft=f(h,o.dir))}}):n==="vertical"?a.jsx(MC,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const h=o.viewport.scrollTop,p=Pc(h,l);s.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollTop=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollTop=f(h))}}):null}),OC=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=wt(Ht,e.__scopeScrollArea),[i,l]=x.useState(),c=x.useRef(null),u=Le(t,c,s.onScrollbarXChange);return x.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(nh,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ys(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),ah(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&s.viewport&&i&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Uo(i.paddingLeft),paddingEnd:Uo(i.paddingRight)}})}})}),MC=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=wt(Ht,e.__scopeScrollArea),[i,l]=x.useState(),c=x.useRef(null),u=Le(t,c,s.onScrollbarYChange);return x.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(nh,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ys(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),ah(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&s.viewport&&i&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Uo(i.paddingTop),paddingEnd:Uo(i.paddingBottom)}})}})}),[LC,th]=Jp(Ht),nh=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,p=wt(Ht,n),[b,m]=x.useState(null),g=Le(t,A=>m(A)),y=x.useRef(null),v=x.useRef(""),k=p.viewport,S=r.content-r.viewport,C=st(d),j=st(c),N=bs(f,10);function T(A){if(y.current){const O=A.clientX-y.current.left,$=A.clientY-y.current.top;u({x:O,y:$})}}return x.useEffect(()=>{const A=O=>{const $=O.target;b?.contains($)&&C(O,S)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[k,b,S,C]),x.useEffect(j,[r,j]),nr(b,N),nr(p.content,N),a.jsx(LC,{scope:n,scrollbar:b,hasThumb:o,onThumbChange:st(s),onThumbPointerUp:st(i),onThumbPositionChange:j,onThumbPointerDown:st(l),children:a.jsx(Te.div,{...h,ref:g,style:{position:"absolute",...h.style},onPointerDown:_e(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),y.current=b.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),T(A))}),onPointerMove:_e(e.onPointerMove,T),onPointerUp:_e(e.onPointerUp,A=>{const O=A.target;O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=""),y.current=null})})})}),Bo="ScrollAreaThumb",rh=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=th(Bo,e.__scopeScrollArea);return a.jsx(vt,{present:n||o.hasThumb,children:a.jsx(DC,{ref:t,...r})})}),DC=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=wt(Bo,n),i=th(Bo,n),{onThumbPositionChange:l}=i,c=Le(t,f=>i.onThumbChange(f)),u=x.useRef(void 0),d=bs(()=>{u.current&&(u.current(),u.current=void 0)},100);return x.useEffect(()=>{const f=s.viewport;if(f){const h=()=>{if(d(),!u.current){const p=BC(f,l);u.current=p,l()}};return l(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[s.viewport,d,l]),a.jsx(Te.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:_e(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),b=f.clientX-p.left,m=f.clientY-p.top;i.onThumbPointerDown({x:b,y:m})}),onPointerUp:_e(e.onPointerUp,i.onThumbPointerUp)})});rh.displayName=Bo;var Ka="ScrollAreaCorner",oh=x.forwardRef((e,t)=>{const n=wt(Ka,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?a.jsx(FC,{...e,ref:t}):null});oh.displayName=Ka;var FC=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=wt(Ka,n),[s,i]=x.useState(0),[l,c]=x.useState(0),u=!!(s&&l);return nr(o.scrollbarX,()=>{const d=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(d),c(d)}),nr(o.scrollbarY,()=>{const d=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(d),i(d)}),u?a.jsx(Te.div,{...r,ref:t,style:{width:s,height:l,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Uo(e){return e?parseInt(e,10):0}function sh(e,t){const n=e/t;return isNaN(n)?0:n}function ys(e){const t=sh(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function $C(e,t,n,r="ltr"){const o=ys(n),s=o/2,i=t||s,l=o-i,c=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-l,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return ih([c,u],f)(e)}function Pc(e,t,n="ltr"){const r=ys(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,i=t.content-t.viewport,l=s-r,c=n==="ltr"?[0,i]:[i*-1,0],u=Ri(e,c);return ih([0,i],[0,l])(u)}function ih(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function ah(e,t){return e>0&&e<t}var BC=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const s={left:e.scrollLeft,top:e.scrollTop},i=n.left!==s.left,l=n.top!==s.top;(i||l)&&t(),n=s,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function bs(e,t){const n=st(e),r=x.useRef(0);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),x.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function nr(e,t){const n=st(t);tt(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var UC=Gp,WC=Xp,VC=oh,HC=[" ","Enter","ArrowUp","ArrowDown"],ZC=[" ","Enter"],jn="Select",[vs,ws,qC]=Ff(jn),[cr]=tn(jn,[qC,xs]),ks=xs(),[KC,hn]=cr(jn),[JC,GC]=cr(jn),lh=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:p,form:b}=e,m=ks(t),[g,y]=x.useState(null),[v,k]=x.useState(null),[S,C]=x.useState(!1),j=ls(u),[N,T]=_n({prop:r,defaultProp:o??!1,onChange:s,caller:jn}),[A,O]=_n({prop:i,defaultProp:l,onChange:c,caller:jn}),$=x.useRef(null),E=g?b||!!g.closest("form"):!0,[L,w]=x.useState(new Set),M=Array.from(L).map(U=>U.props.value).join(";");return a.jsx(Fp,{...m,children:a.jsxs(KC,{required:p,scope:t,trigger:g,onTriggerChange:y,valueNode:v,onValueNodeChange:k,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:Dt(),value:A,onValueChange:O,open:N,onOpenChange:T,dir:j,triggerPointerDownPosRef:$,disabled:h,children:[a.jsx(vs.Provider,{scope:t,children:a.jsx(JC,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(U=>{w(F=>new Set(F).add(U))},[]),onNativeOptionRemove:x.useCallback(U=>{w(F=>{const B=new Set(F);return B.delete(U),B})},[]),children:n})}),E?a.jsxs(Ah,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:A,onChange:U=>O(U.target.value),disabled:h,form:b,children:[A===void 0?a.jsx("option",{value:""}):null,Array.from(L)]},M):null]})})};lh.displayName=jn;var ch="SelectTrigger",uh=x.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=ks(n),i=hn(ch,n),l=i.disabled||r,c=Le(t,i.onTriggerChange),u=ws(n),d=x.useRef("touch"),[f,h,p]=zh(m=>{const g=u().filter(k=>!k.disabled),y=g.find(k=>k.value===i.value),v=Ph(g,m,y);v!==void 0&&i.onValueChange(v.value)}),b=m=>{l||(i.onOpenChange(!0),p()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return a.jsx($p,{asChild:!0,...s,children:a.jsx(Te.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Ih(i.value)?"":void 0,...o,ref:c,onClick:_e(o.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&b(m)}),onPointerDown:_e(o.onPointerDown,m=>{d.current=m.pointerType;const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(b(m),m.preventDefault())}),onKeyDown:_e(o.onKeyDown,m=>{const g=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(g&&m.key===" ")&&HC.includes(m.key)&&(b(),m.preventDefault())})})})});uh.displayName=ch;var dh="SelectValue",fh=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...l}=e,c=hn(dh,n),{onValueNodeHasChildrenChange:u}=c,d=s!==void 0,f=Le(t,c.onValueNodeChange);return tt(()=>{u(d)},[u,d]),a.jsx(Te.span,{...l,ref:f,style:{pointerEvents:"none"},children:Ih(c.value)?a.jsx(a.Fragment,{children:i}):s})});fh.displayName=dh;var YC="SelectIcon",ph=x.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return a.jsx(Te.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});ph.displayName=YC;var XC="SelectPortal",hh=e=>a.jsx(us,{asChild:!0,...e});hh.displayName=XC;var En="SelectContent",mh=x.forwardRef((e,t)=>{const n=hn(En,e.__scopeSelect),[r,o]=x.useState();if(tt(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Br.createPortal(a.jsx(gh,{scope:e.__scopeSelect,children:a.jsx(vs.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),s):null}return a.jsx(xh,{...e,ref:t})});mh.displayName=En;var St=10,[gh,mn]=cr(En),QC="SelectContentImpl",e5=er("SelectContent.RemoveScroll"),xh=x.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:b,hideWhenDetached:m,avoidCollisions:g,...y}=e,v=hn(En,n),[k,S]=x.useState(null),[C,j]=x.useState(null),N=Le(t,ie=>S(ie)),[T,A]=x.useState(null),[O,$]=x.useState(null),E=ws(n),[L,w]=x.useState(!1),M=x.useRef(!1);x.useEffect(()=>{if(k)return np(k)},[k]),qf();const U=x.useCallback(ie=>{const[de,...pe]=E().map(ke=>ke.ref.current),[he]=pe.slice(-1),me=document.activeElement;for(const ke of ie)if(ke===me||(ke?.scrollIntoView({block:"nearest"}),ke===de&&C&&(C.scrollTop=0),ke===he&&C&&(C.scrollTop=C.scrollHeight),ke?.focus(),document.activeElement!==me))return},[E,C]),F=x.useCallback(()=>U([T,k]),[U,T,k]);x.useEffect(()=>{L&&F()},[L,F]);const{onOpenChange:B,triggerPointerDownPosRef:G}=v;x.useEffect(()=>{if(k){let ie={x:0,y:0};const de=he=>{ie={x:Math.abs(Math.round(he.pageX)-(G.current?.x??0)),y:Math.abs(Math.round(he.pageY)-(G.current?.y??0))}},pe=he=>{ie.x<=10&&ie.y<=10?he.preventDefault():k.contains(he.target)||B(!1),document.removeEventListener("pointermove",de),G.current=null};return G.current!==null&&(document.addEventListener("pointermove",de),document.addEventListener("pointerup",pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",de),document.removeEventListener("pointerup",pe,{capture:!0})}}},[k,B,G]),x.useEffect(()=>{const ie=()=>B(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[B]);const[I,H]=zh(ie=>{const de=E().filter(me=>!me.disabled),pe=de.find(me=>me.ref.current===document.activeElement),he=Ph(de,ie,pe);he&&setTimeout(()=>he.ref.current.focus())}),K=x.useCallback((ie,de,pe)=>{const he=!M.current&&!pe;(v.value!==void 0&&v.value===de||he)&&(A(ie),he&&(M.current=!0))},[v.value]),z=x.useCallback(()=>k?.focus(),[k]),se=x.useCallback((ie,de,pe)=>{const he=!M.current&&!pe;(v.value!==void 0&&v.value===de||he)&&$(ie)},[v.value]),re=r==="popper"?Oi:yh,ue=re===Oi?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:b,hideWhenDetached:m,avoidCollisions:g}:{};return a.jsx(gh,{scope:n,content:k,viewport:C,onViewportChange:j,itemRefCallback:K,selectedItem:T,onItemLeave:z,itemTextRefCallback:se,focusSelectedItem:F,selectedItemText:O,position:r,isPositioned:L,searchRef:I,children:a.jsx(Ra,{as:e5,allowPinchZoom:!0,children:a.jsx(Pa,{asChild:!0,trapped:v.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:_e(o,ie=>{v.trigger?.focus({preventScroll:!0}),ie.preventDefault()}),children:a.jsx(cs,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:a.jsx(re,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:ie=>ie.preventDefault(),...y,...ue,onPlaced:()=>w(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:_e(y.onKeyDown,ie=>{const de=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!de&&ie.key.length===1&&H(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let he=E().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(he=he.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const me=ie.target,ke=he.indexOf(me);he=he.slice(ke+1)}setTimeout(()=>U(he)),ie.preventDefault()}})})})})})})});xh.displayName=QC;var t5="SelectItemAlignedPosition",yh=x.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=hn(En,n),i=mn(En,n),[l,c]=x.useState(null),[u,d]=x.useState(null),f=Le(t,N=>d(N)),h=ws(n),p=x.useRef(!1),b=x.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:v}=i,k=x.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&u&&m&&g&&y){const N=s.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),A=s.valueNode.getBoundingClientRect(),O=y.getBoundingClientRect();if(s.dir!=="rtl"){const me=O.left-T.left,ke=A.left-me,ze=N.left-ke,_=N.width+ze,te=Math.max(_,T.width),Q=window.innerWidth-St,R=Ri(ke,[St,Math.max(St,Q-te)]);l.style.minWidth=_+"px",l.style.left=R+"px"}else{const me=T.right-O.right,ke=window.innerWidth-A.right-me,ze=window.innerWidth-N.right-ke,_=N.width+ze,te=Math.max(_,T.width),Q=window.innerWidth-St,R=Ri(ke,[St,Math.max(St,Q-te)]);l.style.minWidth=_+"px",l.style.right=R+"px"}const $=h(),E=window.innerHeight-St*2,L=m.scrollHeight,w=window.getComputedStyle(u),M=parseInt(w.borderTopWidth,10),U=parseInt(w.paddingTop,10),F=parseInt(w.borderBottomWidth,10),B=parseInt(w.paddingBottom,10),G=M+U+L+B+F,I=Math.min(g.offsetHeight*5,G),H=window.getComputedStyle(m),K=parseInt(H.paddingTop,10),z=parseInt(H.paddingBottom,10),se=N.top+N.height/2-St,re=E-se,ue=g.offsetHeight/2,ie=g.offsetTop+ue,de=M+U+ie,pe=G-de;if(de<=se){const me=$.length>0&&g===$[$.length-1].ref.current;l.style.bottom="0px";const ke=u.clientHeight-m.offsetTop-m.offsetHeight,ze=Math.max(re,ue+(me?z:0)+ke+F),_=de+ze;l.style.height=_+"px"}else{const me=$.length>0&&g===$[0].ref.current;l.style.top="0px";const ze=Math.max(se,M+m.offsetTop+(me?K:0)+ue)+pe;l.style.height=ze+"px",m.scrollTop=de-se+m.offsetTop}l.style.margin=`${St}px 0`,l.style.minHeight=I+"px",l.style.maxHeight=E+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[h,s.trigger,s.valueNode,l,u,m,g,y,s.dir,r]);tt(()=>k(),[k]);const[S,C]=x.useState();tt(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const j=x.useCallback(N=>{N&&b.current===!0&&(k(),v?.(),b.current=!1)},[k,v]);return a.jsx(r5,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:j,children:a.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:a.jsx(Te.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});yh.displayName=t5;var n5="SelectPopperPosition",Oi=x.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=St,...s}=e,i=ks(n);return a.jsx(Bp,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Oi.displayName=n5;var[r5,Ja]=cr(En,{}),Mi="SelectViewport",bh=x.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=mn(Mi,n),i=Ja(Mi,n),l=Le(t,s.onViewportChange),c=x.useRef(0);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),a.jsx(vs.Slot,{scope:n,children:a.jsx(Te.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:_e(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=i;if(h?.current&&f){const p=Math.abs(c.current-d.scrollTop);if(p>0){const b=window.innerHeight-St*2,m=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),y=Math.max(m,g);if(y<b){const v=y+p,k=Math.min(b,v),S=v-k;f.style.height=k+"px",f.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});bh.displayName=Mi;var vh="SelectGroup",[o5,s5]=cr(vh),i5=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Dt();return a.jsx(o5,{scope:n,id:o,children:a.jsx(Te.div,{role:"group","aria-labelledby":o,...r,ref:t})})});i5.displayName=vh;var wh="SelectLabel",a5=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=s5(wh,n);return a.jsx(Te.div,{id:o.id,...r,ref:t})});a5.displayName=wh;var Wo="SelectItem",[l5,kh]=cr(Wo),_h=x.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,l=hn(Wo,n),c=mn(Wo,n),u=l.value===r,[d,f]=x.useState(s??""),[h,p]=x.useState(!1),b=Le(t,v=>c.itemRefCallback?.(v,r,o)),m=Dt(),g=x.useRef("touch"),y=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return a.jsx(l5,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:x.useCallback(v=>{f(k=>k||(v?.textContent??"").trim())},[]),children:a.jsx(vs.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:a.jsx(Te.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:b,onFocus:_e(i.onFocus,()=>p(!0)),onBlur:_e(i.onBlur,()=>p(!1)),onClick:_e(i.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:_e(i.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:_e(i.onPointerDown,v=>{g.current=v.pointerType}),onPointerMove:_e(i.onPointerMove,v=>{g.current=v.pointerType,o?c.onItemLeave?.():g.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_e(i.onPointerLeave,v=>{v.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:_e(i.onKeyDown,v=>{c.searchRef?.current!==""&&v.key===" "||(ZC.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})})})})});_h.displayName=Wo;var Sr="SelectItemText",Sh=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=hn(Sr,n),l=mn(Sr,n),c=kh(Sr,n),u=GC(Sr,n),[d,f]=x.useState(null),h=Le(t,y=>f(y),c.onItemTextChange,y=>l.itemTextRefCallback?.(y,c.value,c.disabled)),p=d?.textContent,b=x.useMemo(()=>a.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=u;return tt(()=>(m(b),()=>g(b)),[m,g,b]),a.jsxs(a.Fragment,{children:[a.jsx(Te.span,{id:c.textId,...s,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Br.createPortal(s.children,i.valueNode):null]})});Sh.displayName=Sr;var Ch="SelectItemIndicator",jh=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return kh(Ch,n).isSelected?a.jsx(Te.span,{"aria-hidden":!0,...r,ref:t}):null});jh.displayName=Ch;var Li="SelectScrollUpButton",Eh=x.forwardRef((e,t)=>{const n=mn(Li,e.__scopeSelect),r=Ja(Li,e.__scopeSelect),[o,s]=x.useState(!1),i=Le(t,r.onScrollButtonChange);return tt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;s(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?a.jsx(Th,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Eh.displayName=Li;var Di="SelectScrollDownButton",Nh=x.forwardRef((e,t)=>{const n=mn(Di,e.__scopeSelect),r=Ja(Di,e.__scopeSelect),[o,s]=x.useState(!1),i=Le(t,r.onScrollButtonChange);return tt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;s(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?a.jsx(Th,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});Nh.displayName=Di;var Th=x.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=mn("SelectScrollButton",n),i=x.useRef(null),l=ws(n),c=x.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return x.useEffect(()=>()=>c(),[c]),tt(()=>{l().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),a.jsx(Te.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:_e(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:_e(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:_e(o.onPointerLeave,()=>{c()})})}),c5="SelectSeparator",u5=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(Te.div,{"aria-hidden":!0,...r,ref:t})});u5.displayName=c5;var Fi="SelectArrow",d5=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ks(n),s=hn(Fi,n),i=mn(Fi,n);return s.open&&i.position==="popper"?a.jsx(Up,{...o,...r,ref:t}):null});d5.displayName=Fi;var f5="SelectBubbleInput",Ah=x.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=x.useRef(null),s=Le(r,o),i=X_(t);return x.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&d){const f=new Event("change",{bubbles:!0});d.call(l,t),l.dispatchEvent(f)}},[i,t]),a.jsx(Te.select,{...n,style:{...Lf,...n.style},ref:s,defaultValue:t})});Ah.displayName=f5;function Ih(e){return e===""||e===void 0}function zh(e){const t=st(e),n=x.useRef(""),r=x.useRef(0),o=x.useCallback(i=>{const l=n.current+i;t(l),(function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),s=x.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Ph(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=p5(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function p5(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var h5=lh,m5=uh,g5=fh,x5=ph,y5=hh,b5=mh,v5=bh,w5=_h,k5=Sh,_5=jh,S5=Eh,C5=Nh,_s="Tabs",[j5]=tn(_s,[Vp]),Rh=Vp(),[E5,Ga]=j5(_s),Oh=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=ls(l),[f,h]=_n({prop:r,onChange:o,defaultProp:s??"",caller:_s});return a.jsx(E5,{scope:n,baseId:Dt(),value:f,onValueChange:h,orientation:i,dir:d,activationMode:c,children:a.jsx(Te.div,{dir:d,"data-orientation":i,...u,ref:t})})});Oh.displayName=_s;var Mh="TabsList",Lh=x.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=Ga(Mh,n),i=Rh(n);return a.jsx(TC,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:a.jsx(Te.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});Lh.displayName=Mh;var Dh="TabsTrigger",Fh=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=Ga(Dh,n),l=Rh(n),c=Uh(i.baseId,r),u=Wh(i.baseId,r),d=r===i.value;return a.jsx(AC,{asChild:!0,...l,focusable:!o,active:d,children:a.jsx(Te.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...s,ref:t,onMouseDown:_e(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:_e(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:_e(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!o&&f&&i.onValueChange(r)})})})});Fh.displayName=Dh;var $h="TabsContent",Bh=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,l=Ga($h,n),c=Uh(l.baseId,r),u=Wh(l.baseId,r),d=r===l.value,f=x.useRef(d);return x.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),a.jsx(vt,{present:o||d,children:({present:h})=>a.jsx(Te.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&s})})});Bh.displayName=$h;function Uh(e,t){return`${e}-trigger-${t}`}function Wh(e,t){return`${e}-content-${t}`}var N5=Oh,T5=Lh,A5=Fh,I5=Bh,[Ss]=tn("Tooltip",[xs]),Cs=xs(),Vh="TooltipProvider",z5=700,$i="tooltip.open",[P5,Ya]=Ss(Vh),Hh=e=>{const{__scopeTooltip:t,delayDuration:n=z5,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=x.useRef(!0),l=x.useRef(!1),c=x.useRef(0);return x.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),a.jsx(P5,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:x.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:s})};Hh.displayName=Vh;var Mr="Tooltip",[R5,Zr]=Ss(Mr),Zh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:l}=e,c=Ya(Mr,e.__scopeTooltip),u=Cs(t),[d,f]=x.useState(null),h=Dt(),p=x.useRef(0),b=i??c.disableHoverableContent,m=l??c.delayDuration,g=x.useRef(!1),[y,v]=_n({prop:r,defaultProp:o??!1,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent($i))):c.onClose(),s?.(N)},caller:Mr}),k=x.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),S=x.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),C=x.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),j=x.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},m)},[m,v]);return x.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),a.jsx(Fp,{...u,children:a.jsx(R5,{scope:t,contentId:h,open:y,stateAttribute:k,trigger:d,onTriggerChange:f,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayedRef.current?j():S()},[c.isOpenDelayedRef,j,S]),onTriggerLeave:x.useCallback(()=>{b?C():(window.clearTimeout(p.current),p.current=0)},[C,b]),onOpen:S,onClose:C,disableHoverableContent:b,children:n})})};Zh.displayName=Mr;var Bi="TooltipTrigger",qh=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Zr(Bi,n),s=Ya(Bi,n),i=Cs(n),l=x.useRef(null),c=Le(t,l,o.onTriggerChange),u=x.useRef(!1),d=x.useRef(!1),f=x.useCallback(()=>u.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),a.jsx($p,{asChild:!0,...i,children:a.jsx(Te.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:_e(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:_e(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:_e(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:_e(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:_e(e.onBlur,o.onClose),onClick:_e(e.onClick,o.onClose)})})});qh.displayName=Bi;var Xa="TooltipPortal",[O5,M5]=Ss(Xa,{forceMount:void 0}),Kh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Zr(Xa,t);return a.jsx(O5,{scope:t,forceMount:n,children:a.jsx(vt,{present:n||s.open,children:a.jsx(us,{asChild:!0,container:o,children:r})})})};Kh.displayName=Xa;var rr="TooltipContent",Jh=x.forwardRef((e,t)=>{const n=M5(rr,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Zr(rr,e.__scopeTooltip);return a.jsx(vt,{present:r||i.open,children:i.disableHoverableContent?a.jsx(Gh,{side:o,...s,ref:t}):a.jsx(L5,{side:o,...s,ref:t})})}),L5=x.forwardRef((e,t)=>{const n=Zr(rr,e.__scopeTooltip),r=Ya(rr,e.__scopeTooltip),o=x.useRef(null),s=Le(t,o),[i,l]=x.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,h=x.useCallback(()=>{l(null),f(!1)},[f]),p=x.useCallback((b,m)=>{const g=b.currentTarget,y={x:b.clientX,y:b.clientY},v=B5(y,g.getBoundingClientRect()),k=U5(y,v),S=W5(m.getBoundingClientRect()),C=H5([...k,...S]);l(C),f(!0)},[f]);return x.useEffect(()=>()=>h(),[h]),x.useEffect(()=>{if(c&&d){const b=g=>p(g,d),m=g=>p(g,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",m)}}},[c,d,p,h]),x.useEffect(()=>{if(i){const b=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},v=c?.contains(g)||d?.contains(g),k=!V5(y,i);v?h():k&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,i,u,h]),a.jsx(Gh,{...e,ref:s})}),[D5,F5]=Ss(Mr,{isInside:!1}),$5=dk("TooltipContent"),Gh=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...l}=e,c=Zr(rr,n),u=Cs(n),{onClose:d}=c;return x.useEffect(()=>(document.addEventListener($i,d),()=>document.removeEventListener($i,d)),[d]),x.useEffect(()=>{if(c.trigger){const f=h=>{h.target?.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),a.jsx(cs,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:a.jsxs(Bp,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx($5,{children:r}),a.jsx(D5,{scope:n,isInside:!0,children:a.jsx(yk,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Jh.displayName=rr;var Yh="TooltipArrow",Xh=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Cs(n);return F5(Yh,n).isInside?null:a.jsx(Up,{...o,...r,ref:t})});Xh.displayName=Yh;function B5(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function U5(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function W5(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function V5(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s],c=t[i],u=l.x,d=l.y,f=c.x,h=c.y;d>r!=h>r&&n<(f-u)*(r-d)/(h-d)+u&&(o=!o)}return o}function H5(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Z5(t)}function Z5(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var q5=Hh,K5=Zh,J5=qh,G5=Kh,Y5=Jh,X5=Xh;const Q5=Ta("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function Et({className:e,variant:t="default",asChild:n=!1,...r}){const o=n?ck:"span";return a.jsx(o,{"data-slot":"badge","data-variant":t,className:ve(Q5({variant:t}),e),...r})}function Qa({...e}){return a.jsx(H_,{"data-slot":"dialog",...e})}function ej({...e}){return a.jsx(Z_,{"data-slot":"dialog-trigger",...e})}function tj({...e}){return a.jsx(q_,{"data-slot":"dialog-portal",...e})}function nj({className:e,...t}){return a.jsx(K_,{"data-slot":"dialog-overlay",className:ve("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})}function el({className:e,children:t,...n}){return a.jsxs(tj,{children:[a.jsx(nj,{}),a.jsxs(J_,{"data-slot":"dialog-content",className:ve("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",e),...n,children:[t,a.jsxs(Y_,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[a.jsx(ja,{className:"size-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function tl({className:e,...t}){return a.jsx("div",{"data-slot":"dialog-header",className:ve("flex flex-col space-y-1.5 text-center sm:text-left",e),...t})}function nl({className:e,...t}){return a.jsx(G_,{"data-slot":"dialog-title",className:ve("text-lg font-semibold leading-none tracking-tight",e),...t})}const rj=Ta("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Pe({className:e,variant:t,size:n,...r}){return a.jsx("button",{"data-slot":"button",className:ve(rj({variant:t,size:n,className:e})),...r})}function Qh({open:e,onOpenChange:t,title:n,description:r,confirmLabel:o="Confirm",variant:s="default",onConfirm:i}){return a.jsx(Qa,{open:e,onOpenChange:t,children:a.jsxs(el,{children:[a.jsx(tl,{children:a.jsx(nl,{children:n})}),a.jsx("p",{className:"text-sm text-muted-foreground",children:r}),a.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[a.jsx(Pe,{variant:"outline",size:"sm",onClick:()=>t(!1),children:"Cancel"}),a.jsx(Pe,{variant:s,size:"sm",onClick:()=>{i(),t(!1)},children:o})]})]})})}const oj={anthropic:"Anthropic",openai:"OpenAI",unknown:"Unknown"};function sj({conversationId:e,startTime:t,endTime:n,totalCalls:r,totalInputTokens:o,totalOutputTokens:s,apiFormat:i,expanded:l,onToggle:c,hideApiFormat:u=!1,isLoading:d=!1,userAgent:f,timeDisplayFormat:h,onClear:p}){const[b,m]=x.useState(!1),g=v=>{v.stopPropagation(),p!==void 0&&m(!0)},y=x.useCallback(v=>{v.stopPropagation(),window.open(Ig(e),"_blank","noopener,noreferrer")},[e]);return a.jsxs("div",{role:"button",tabIndex:0,"data-nav-id":`conv-${e}`,"data-nav-action":l?"collapse":"expand",className:ve("flex items-center gap-3 px-3 py-2 cursor-pointer transition-colors","hover:bg-muted/50","select-none","border border-border rounded-lg mb-2 bg-background sticky top-0 z-10","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:outline-none"),onClick:c,onKeyDown:v=>{v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),c())},children:[l?a.jsx(Ut,{className:"size-4 text-muted-foreground shrink-0"}):d?a.jsx(Pr,{className:"size-4 animate-spin text-muted-foreground shrink-0"}):a.jsx(en,{className:"size-4 text-muted-foreground shrink-0"}),a.jsx("span",{className:"text-purple-400/90 font-mono text-xs font-semibold shrink-0",title:e,children:e.startsWith("PID:")||e.includes("|")?e:e.length>24?e.slice(0,12)+"..."+e.slice(-12):e}),f!=null&&f!==""&&a.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground text-xs shrink-0",title:f,children:[a.jsx(Ww,{className:"size-3"}),a.jsx("span",{className:"font-mono tabular-nums truncate max-w-[120px]",children:f})]}),!u&&a.jsx(Et,{variant:"outline",className:ve("text-[10px] px-1.5 py-0 h-5 font-mono shrink-0",i==="openai"&&"border-blue-500/40 text-blue-400",i==="anthropic"&&"border-orange-500/40 text-orange-400",i==="unknown"&&"border-muted text-muted-foreground"),children:oj[i]}),a.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground text-xs shrink-0",children:[a.jsx(cn,{className:"size-3"}),a.jsx("span",{className:"font-mono tabular-nums",children:Ea(t,n,h)})]}),a.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground text-xs shrink-0",children:[a.jsx(is,{className:"size-3"}),a.jsxs("span",{className:"font-mono tabular-nums",children:[r," call",r!==1?"s":""]})]}),a.jsxs("span",{className:"flex items-center gap-1 text-xs shrink-0",children:[a.jsx(Rr,{className:"size-3 text-muted-foreground"}),a.jsxs("span",{className:"font-mono tabular-nums",children:[a.jsx("span",{className:"text-blue-400",children:Ve(o)})," / ",a.jsx("span",{className:"text-amber-400",children:Ve(s)})]})]}),a.jsx("span",{className:"flex-1 min-w-0"}),a.jsx("button",{type:"button",onClick:y,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&y(v)},"aria-label":`Open session ${e} in a new tab`,title:"Open this session in a new tab",className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 inline-flex items-center justify-center size-8 rounded hover:bg-muted cursor-pointer",children:a.jsx(ff,{className:"size-3.5"})}),p!==void 0&&a.jsx("button",{type:"button",onClick:g,"aria-label":`Clear group (${r} request${r!==1?"s":""})`,title:"Clear this group",className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 inline-flex items-center justify-center size-8 rounded hover:bg-muted cursor-pointer",children:a.jsx(xf,{className:"size-3.5"})}),a.jsx(Qh,{open:b,onOpenChange:m,title:"Clear this group?",description:`This will remove ${r} request${r!==1?"s":""} from this conversation. This action cannot be undone.`,confirmLabel:"Clear",variant:"destructive",onConfirm:()=>{p?.()}})]})}function ij(e){const t=e.find(n=>n.apiFormat!=="unknown");return t!==void 0?t.apiFormat:e[0]?.apiFormat??"unknown"}function aj(e){let t=!1,n=!1;for(const r of e)if(r.apiFormat==="anthropic"?t=!0:r.apiFormat==="openai"&&(n=!0),t&&n)return!0;return!1}function lj(e){if(e.isTest===!0)return"provider-test";if(e.sessionId!==null&&e.sessionId!==""&&e.sessionId!==void 0)return e.sessionId;const t=e.clientPid!==null&&e.clientPid!==void 0,n=e.clientProjectFolder!==null&&e.clientProjectFolder!==void 0;if(!t&&!n)return"default";const r=t?`PID:${e.clientPid}`:"unknown",o=n?e.clientProjectFolder:"no-folder";return`${r}|${o}`}function cj(e){const t=new Map;for(const r of e){const o=lj(r),s=t.get(o);s!==void 0?s.push(r):t.set(o,[r])}const n=[];for(const[r,o]of t){const s=[...o].sort((i,l)=>i.timestamp.localeCompare(l.timestamp));n.push({id:r,conversationId:r,logs:s})}return n.sort((r,o)=>(r.logs[0]?.timestamp??"").localeCompare(o.logs[0]?.timestamp??"")),n}function Rc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function uj(e){if(e.responseText===null)return null;try{let t=JSON.parse(e.responseText);return typeof t=="string"&&(t=JSON.parse(t)),Rc(t)?typeof t.stop_reason=="string"?t.stop_reason==="end_turn"||t.stop_reason==="tool_use"?t.stop_reason:null:Array.isArray(t.choices)&&t.choices.length>0&&Rc(t.choices[0])&&typeof t.choices[0].finish_reason=="string"&&t.choices[0].finish_reason==="stop"?"stop":null:null}catch{return null}}function em(e){return e==="end_turn"||e==="stop"}function kt({className:e,style:t,d:n,eyeStalks:r,eyes:o,legs:s,extras:i}){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:t,className:ve("inline-block size-5",e),children:[a.jsx("path",{d:n}),r,o,s,i]})}const gn=a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"6.5",y1:"16",x2:"4.5",y2:"19.5"}),a.jsx("line",{x1:"9",y1:"17.5",x2:"8",y2:"20.5"}),a.jsx("line",{x1:"15",y1:"17.5",x2:"16",y2:"20.5"}),a.jsx("line",{x1:"17.5",y1:"16",x2:"19.5",y2:"19.5"})]}),tm=a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"7",y1:"16",x2:"5.5",y2:"18.5"}),a.jsx("line",{x1:"9.5",y1:"17",x2:"8.5",y2:"19.5"}),a.jsx("line",{x1:"14.5",y1:"17",x2:"15.5",y2:"19.5"}),a.jsx("line",{x1:"17",y1:"16",x2:"18.5",y2:"18.5"})]});function nm({className:e}){return a.jsx(kt,{className:e,d:"M5 13 C5 9 8 7 12 7 C16 7 19 9 19 13 C19 16 16 18 12 18 C8 18 5 16 5 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),a.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),a.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"})]})})}function dj({className:e}){return a.jsx(kt,{className:e,d:"M4 13 C4 7 7.5 5.5 12 5.5 C16.5 5.5 20 7 20 13 C20 17.5 16.5 19 12 19 C7.5 19 4 17.5 4 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"9.5",y1:"6.5",x2:"9.5",y2:"4.5"}),a.jsx("line",{x1:"14.5",y1:"6.5",x2:"14.5",y2:"4.5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"9.5",cy:"4",r:"1.1",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"14.5",cy:"4",r:"1.1",fill:"currentColor",stroke:"none"})]}),legs:tm,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C4 9.5 2.5 10 3 12 C3.5 13.5 4.5 13 5 12"}),a.jsx("path",{d:"M19 11 C20 9.5 21.5 10 21 12 C20.5 13.5 19.5 13 19 12"})]})})}function fj({className:e}){return a.jsx(kt,{className:e,d:"M3 13.5 C3 8 7 6 12 6 C17 6 21 8 21 13.5 C21 17 17 19 12 19 C7 19 3 17 3 13.5 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"7",y1:"7",x2:"6.5",y2:"4.5"}),a.jsx("line",{x1:"17",y1:"7",x2:"17.5",y2:"4.5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"6.5",cy:"4",r:"0.8",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"17.5",cy:"4",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M4 12 C2.5 10.5 1 11 1.5 13 C2 14.5 3.5 14 4.5 13"}),a.jsx("path",{d:"M20 12 C21.5 10.5 23 11 22.5 13 C22 14.5 20.5 14 19.5 13"})]})})}function pj({className:e}){return a.jsx(kt,{className:e,d:"M6 14 C6 8 9 5.5 12 5.5 C15 5.5 18 8 18 14 C18 18 15 20 12 20 C9 20 6 18 6 14 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"6.5",x2:"10",y2:"3.5"}),a.jsx("line",{x1:"14",y1:"6.5",x2:"14",y2:"3.5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"10",cy:"3",r:"0.7",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"14",cy:"3",r:"0.7",fill:"currentColor",stroke:"none"})]}),legs:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"7",y1:"17",x2:"5",y2:"20.5"}),a.jsx("line",{x1:"9.5",y1:"18.5",x2:"8.5",y2:"21.5"}),a.jsx("line",{x1:"14.5",y1:"18.5",x2:"15.5",y2:"21.5"}),a.jsx("line",{x1:"17",y1:"17",x2:"19",y2:"20.5"})]}),extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M6.5 11 C5 8.5 3 9 3.5 11.5 C4 13.5 5 13 6 12"}),a.jsx("path",{d:"M17.5 11 C19 8.5 21 9 20.5 11.5 C20 13.5 19 13 18 12"})]})})}function hj({className:e}){return a.jsx(kt,{className:e,d:"M5 13 C5 9 8 7 12 7 L13 4 L14 7 C16 7 19 9 19 13 C19 16 16 18 13 18 L12 21 L11 18 C8 18 5 16 5 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),a.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.8",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),a.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"})]})})}function mj({className:e}){return a.jsx(kt,{className:e,d:"M5 13 C5 9 8 7 12 7 C16 7 19 9 19 13 C19 16 16 18 12 18 C8 18 5 16 5 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),a.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"}),a.jsx("line",{x1:"13.5",y1:"4",x2:"15.5",y2:"5"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),a.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"})]})})}function gj({className:e}){return a.jsx(kt,{className:e,d:"M5.5 13.5 C5.5 10 8.5 8 12 8 C15.5 8 18.5 10 18.5 13.5 C18.5 16 15.5 17.5 12 17.5 C8.5 17.5 5.5 16 5.5 13.5 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"8",x2:"10",y2:"6"}),a.jsx("line",{x1:"14",y1:"8",x2:"14",y2:"6"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"9",y1:"6",x2:"11",y2:"6.5"}),a.jsx("line",{x1:"13",y1:"6",x2:"15",y2:"6.5"})]}),legs:tm,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M6 11.5 C4.5 10.5 3 11 3.5 12.5 C4 13.5 5 13 5.5 12.5"}),a.jsx("path",{d:"M18 11.5 C19.5 10.5 21 11 20.5 12.5 C20 13.5 19 13 18.5 12.5"})]})})}function xj({className:e}){return a.jsx(kt,{className:e,d:"M5 13 C5 9 8 7 12 7 C16 7 19 9 19 13 C19 16 16 18 12 18 C8 18 5 16 5 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),a.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.7",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.7",fill:"currentColor",stroke:"none"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),a.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),a.jsx("line",{x1:"8.5",y1:"4",x2:"10.5",y2:"4.5"}),a.jsx("line",{x1:"15.5",y1:"4",x2:"13.5",y2:"4.5"}),a.jsx("path",{d:"M9 15.5 C10 14.5 14 14.5 15 15.5"})]})})}function yj({className:e}){return a.jsx(kt,{className:e,d:"M5 13 C5 9 8 7 12 7 C16 7 19 9 19 13 C19 16 16 18 12 18 C8 18 5 16 5 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),a.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"9.5",cy:"4.5",r:"1.2",fill:"none",stroke:"currentColor"}),a.jsx("circle",{cx:"14.5",cy:"4.5",r:"1.2",fill:"none",stroke:"currentColor"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),a.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),a.jsx("ellipse",{cx:"12",cy:"15",rx:"2",ry:"1.5",fill:"currentColor",stroke:"none"})]})})}function bj({className:e}){return a.jsx(kt,{className:e,d:"M4.5 13 C4.5 8 7.5 6 12 6 C16.5 6 19.5 8 19.5 13 C19.5 17 16.5 18.5 12 18.5 C7.5 18.5 4.5 17 4.5 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"9.5",y1:"7",x2:"9",y2:"5"}),a.jsx("line",{x1:"14.5",y1:"7",x2:"15",y2:"5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"9",cy:"4.5",r:"1",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"15",cy:"4.5",r:"1",fill:"currentColor",stroke:"none"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C3.5 9 2 9.5 2.5 12 C3 14 4 13 5 12"}),a.jsx("path",{d:"M19 11 C20.5 9 22 9.5 21.5 12 C21 14 20 13 19 12"}),a.jsx("path",{d:"M9 14.5 C10 16 14 16 15 14.5"}),a.jsx("circle",{cx:"7",cy:"13",r:"1",fill:"currentColor",stroke:"none",opacity:"0.3"}),a.jsx("circle",{cx:"17",cy:"13",r:"1",fill:"currentColor",stroke:"none",opacity:"0.3"})]})})}function vj({className:e}){return a.jsx(kt,{className:e,d:"M5 13 C5 9 8 7 12 7 C16 7 19 9 19 13 C19 16 16 18 12 18 C8 18 5 16 5 13 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5.5"}),a.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5.5"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"7.5",y1:"5.5",x2:"16.5",y2:"5.5"}),a.jsx("rect",{x:"7",y:"5",width:"4",height:"2",rx:"0.5",fill:"currentColor",stroke:"none"}),a.jsx("rect",{x:"13",y:"5",width:"4",height:"2",rx:"0.5",fill:"currentColor",stroke:"none"})]}),legs:gn,extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),a.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),a.jsx("path",{d:"M9.5 15 C10.5 16 13.5 16 14.5 15"})]})})}function wj({className:e}){return a.jsx(kt,{className:e,d:"M7 13.5 C7 10.5 9.5 9 12 9 C14.5 9 17 10.5 17 13.5 C17 16 14.5 17.5 12 17.5 C9.5 17.5 7 16 7 13.5 Z",eyeStalks:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"10.5",y1:"9.5",x2:"10.5",y2:"8"}),a.jsx("line",{x1:"13.5",y1:"9.5",x2:"13.5",y2:"8"})]}),eyes:a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"10.5",cy:"7.5",r:"0.8",fill:"currentColor",stroke:"none"}),a.jsx("circle",{cx:"13.5",cy:"7.5",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:a.jsxs(a.Fragment,{children:[a.jsx("line",{x1:"8",y1:"16",x2:"6.5",y2:"18"}),a.jsx("line",{x1:"10",y1:"17",x2:"9.5",y2:"19"}),a.jsx("line",{x1:"14",y1:"17",x2:"14.5",y2:"19"}),a.jsx("line",{x1:"16",y1:"16",x2:"17.5",y2:"18"})]}),extras:a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M7.5 12 C6.5 11 5.5 11.5 6 13 C6.5 14 7 13.5 7.5 13"}),a.jsx("path",{d:"M16.5 12 C17.5 11 18.5 11.5 18 13 C17.5 14 17 13.5 16.5 13"})]})})}const Lr=[nm,dj,fj,pj,hj,mj,gj,xj,yj,bj,vj,wj];function Vo(e){return Lr[Math.abs(e)%Lr.length]??nm}function kj(e){const t=Lr.length-2;return t<=0?0:1+((Number.isFinite(e)?Math.trunc(e):0)%t+t)%t}function _j(e){return Vo(kj(e))}const Sj="data:image/svg+xml,%3csvg%20height='2500'%20viewBox='0%206.603%201192.672%201193.397'%20width='2500'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m233.96%20800.215%20234.684-131.678%203.947-11.436-3.947-6.363h-11.436l-39.221-2.416-134.094-3.624-116.296-4.832-112.67-6.04-28.35-6.04-26.577-35.035%202.738-17.477%2023.84-16.027%2034.147%202.98%2075.463%205.155%20113.235%207.812%2082.147%204.832%20121.692%2012.644h19.329l2.738-7.812-6.604-4.832-5.154-4.832-117.182-79.41-126.845-83.92-66.443-48.321-35.92-24.484-18.12-22.953-7.813-50.093%2032.618-35.92%2043.812%202.98%2011.195%202.98%2044.375%2034.147%2094.792%2073.37%20123.786%2091.167%2018.12%2015.06%207.249-5.154.886-3.624-8.135-13.61-67.329-121.692-71.838-123.785-31.974-51.302-8.456-30.765c-2.98-12.645-5.154-23.275-5.154-36.242l37.127-50.416%2020.537-6.604%2049.53%206.604%2020.86%2018.121%2030.765%2070.39%2049.852%20110.818%2077.315%20150.684%2022.631%2044.698%2012.08%2041.396%204.51%2012.645h7.813v-7.248l6.362-84.886%2011.759-104.215%2011.436-134.094%203.946-37.772%2018.685-45.262%2037.127-24.482%2028.994%2013.852%2023.839%2034.148-3.303%2022.067-14.174%2092.134-27.785%20144.323-18.121%2096.644h10.55l12.08-12.08%2048.887-64.913%2082.147-102.685%2036.242-40.752%2042.282-45.02%2027.14-21.423h51.303l37.772%2056.135-16.913%2057.986-52.832%2067.007-43.812%2056.779-62.82%2084.563-39.22%2067.651%203.623%205.396%209.343-.886%20141.906-30.201%2076.671-13.852%2091.49-15.705%2041.396%2019.329%204.51%2019.65-16.269%2040.189-97.852%2024.16-114.764%2022.954-170.9%2040.43-2.093%201.53%202.416%202.98%2076.993%207.248%2032.94%201.771h80.617l150.12%2011.195%2039.222%2025.933%2023.517%2031.732-3.946%2024.16-60.403%2030.766-81.503-19.33-190.228-45.26-65.235-16.27h-9.02v5.397l54.362%2053.154%2099.624%2089.96%20124.752%20115.973%206.362%2028.671-16.027%2022.63-16.912-2.415-109.611-82.47-42.282-37.127-95.758-80.618h-6.363v8.456l22.067%2032.296%20116.537%20175.167%206.04%2053.719-8.456%2017.476-30.201%2010.55-33.181-6.04-68.215-95.758-70.39-107.84-56.778-96.644-6.926%203.947-33.503%20360.886-15.705%2018.443-36.243%2013.852-30.201-22.953-16.027-37.127%2016.027-73.37%2019.329-95.758%2015.704-76.107%2014.175-94.55%208.456-31.41-.563-2.094-6.927.886-71.275%2097.852-108.402%20146.497-85.772%2091.812-20.537%208.134-35.597-18.443%203.301-32.94%2019.893-29.315%20118.712-151.007%2071.597-93.583%2046.228-54.04-.322-7.813h-2.738l-315.302%20204.725-56.135%207.248-24.16-22.63%202.98-37.128%2011.435-12.08%2094.792-65.236-.322.323z'%20fill='%23d97757'/%3e%3c/svg%3e",Cj="data:image/svg+xml,%3csvg%20height='2500'%20viewBox='-1%20-.1%20949.1%20959.8'%20width='2474'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m925.8%20456.3c10.4%2023.2%2017%2048%2019.7%2073.3%202.6%2025.3%201.3%2050.9-4.1%2075.8-5.3%2024.9-14.5%2048.8-27.3%2070.8-8.4%2014.7-18.3%2028.5-29.7%2041.2-11.3%2012.6-23.9%2024-37.6%2034-13.8%2010-28.5%2018.4-44.1%2025.3-15.5%206.8-31.7%2012-48.3%2015.4-7.8%2024.2-19.4%2047.1-34.4%2067.7-14.9%2020.6-33%2038.7-53.6%2053.6-20.6%2015-43.4%2026.6-67.6%2034.4-24.2%207.9-49.5%2011.8-75%2011.8-16.9.1-33.9-1.7-50.5-5.1-16.5-3.5-32.7-8.8-48.2-15.7s-30.2-15.5-43.9-25.5c-13.6-10-26.2-21.5-37.4-34.2-25%205.4-50.6%206.7-75.9%204.1-25.3-2.7-50.1-9.3-73.4-19.7-23.2-10.3-44.7-24.3-63.6-41.4s-35-37.1-47.7-59.1c-8.5-14.7-15.5-30.2-20.8-46.3s-8.8-32.7-10.6-49.6c-1.8-16.8-1.7-33.8.1-50.7%201.8-16.8%205.5-33.4%2010.8-49.5-17-18.9-31-40.4-41.4-63.6-10.3-23.3-17-48-19.6-73.3-2.7-25.3-1.3-50.9%204-75.8s14.5-48.8%2027.3-70.8c8.4-14.7%2018.3-28.6%2029.6-41.2s24-24%2037.7-34%2028.5-18.5%2044-25.3c15.6-6.9%2031.8-12%2048.4-15.4%207.8-24.3%2019.4-47.1%2034.3-67.7%2015-20.6%2033.1-38.7%2053.7-53.7%2020.6-14.9%2043.4-26.5%2067.6-34.4%2024.2-7.8%2049.5-11.8%2075-11.7%2016.9-.1%2033.9%201.6%2050.5%205.1s32.8%208.7%2048.3%2015.6c15.5%207%2030.2%2015.5%2043.9%2025.5%2013.7%2010.1%2026.3%2021.5%2037.5%2034.2%2024.9-5.3%2050.5-6.6%2075.8-4s50%209.3%2073.3%2019.6c23.2%2010.4%2044.7%2024.3%2063.6%2041.4%2018.9%2017%2035%2036.9%2047.7%2059%208.5%2014.6%2015.5%2030.1%2020.8%2046.3%205.3%2016.1%208.9%2032.7%2010.6%2049.6%201.8%2016.9%201.8%2033.9-.1%2050.8-1.8%2016.9-5.5%2033.5-10.8%2049.6%2017.1%2018.9%2031%2040.3%2041.4%2063.6zm-333.2%20426.9c21.8-9%2041.6-22.3%2058.3-39s30-36.5%2039-58.4c9-21.8%2013.7-45.2%2013.7-68.8v-223q-.1-.3-.2-.7-.1-.3-.3-.6-.2-.3-.5-.5-.3-.3-.6-.4l-80.7-46.6v269.4c0%202.7-.4%205.5-1.1%208.1-.7%202.7-1.7%205.2-3.1%207.6s-3%204.6-5%206.5a32.1%2032.1%200%200%201%20-6.5%205l-191.1%20110.3c-1.6%201-4.3%202.4-5.7%203.2%207.9%206.7%2016.5%2012.6%2025.5%2017.8%209.1%205.2%2018.5%209.6%2028.3%2013.2%209.8%203.5%2019.9%206.2%2030.1%208%2010.3%201.8%2020.7%202.7%2031.1%202.7%2023.6%200%2047-4.7%2068.8-13.8zm-455.1-151.4c11.9%2020.5%2027.6%2038.3%2046.3%2052.7%2018.8%2014.4%2040.1%2024.9%2062.9%2031s46.6%207.7%2070%204.6%2045.9-10.7%2066.4-22.5l193.2-111.5.5-.5q.2-.2.3-.6.2-.3.3-.6v-94l-233.2%20134.9c-2.4%201.4-4.9%202.4-7.5%203.2-2.7.7-5.4%201-8.2%201-2.7%200-5.4-.3-8.1-1-2.6-.8-5.2-1.8-7.6-3.2l-191.1-110.4c-1.7-1-4.2-2.5-5.6-3.4-1.8%2010.3-2.7%2020.7-2.7%2031.1s1%2020.8%202.8%2031.1c1.8%2010.2%204.6%2020.3%208.1%2030.1%203.6%209.8%208%2019.2%2013.2%2028.2zm-50.2-417c-11.8%2020.5-19.4%2043.1-22.5%2066.5s-1.5%2047.1%204.6%2070c6.1%2022.8%2016.6%2044.1%2031%2062.9%2014.4%2018.7%2032.3%2034.4%2052.7%2046.2l193.1%20111.6q.3.1.7.2h.7q.4%200%20.7-.2.3-.1.6-.3l81-46.8-233.2-134.6c-2.3-1.4-4.5-3.1-6.5-5a32.1%2032.1%200%200%201%20-5-6.5c-1.3-2.4-2.4-4.9-3.1-7.6-.7-2.6-1.1-5.3-1-8.1v-227.1c-9.8%203.6-19.3%208-28.3%2013.2-9%205.3-17.5%2011.3-25.5%2018-7.9%206.7-15.3%2014.1-22%2022.1-6.7%207.9-12.6%2016.5-17.8%2025.5zm663.3%20154.4c2.4%201.4%204.6%203%206.6%205%201.9%201.9%203.6%204.1%205%206.5%201.3%202.4%202.4%205%203.1%207.6.6%202.7%201%205.4.9%208.2v227.1c32.1-11.8%2060.1-32.5%2080.8-59.7%2020.8-27.2%2033.3-59.7%2036.2-93.7s-3.9-68.2-19.7-98.5-39.9-55.5-69.5-72.5l-193.1-111.6q-.3-.1-.7-.2h-.7q-.3.1-.7.2-.3.1-.6.3l-80.6%2046.6%20233.2%20134.7zm80.5-121h-.1v.1zm-.1-.1c5.8-33.6%201.9-68.2-11.3-99.7-13.1-31.5-35-58.6-63-78.2-28-19.5-61-30.7-95.1-32.2-34.2-1.4-68%206.9-97.6%2023.9l-193.1%20111.5q-.3.2-.5.5l-.4.6q-.1.3-.2.7-.1.3-.1.7v93.2l233.2-134.7c2.4-1.4%205-2.4%207.6-3.2%202.7-.7%205.4-1%208.1-1%202.8%200%205.5.3%208.2%201%202.6.8%205.1%201.8%207.5%203.2l191.1%20110.4c1.7%201%204.2%202.4%205.6%203.3zm-505.3-103.2c0-2.7.4-5.4%201.1-8.1.7-2.6%201.7-5.2%203.1-7.6%201.4-2.3%203-4.5%205-6.5%201.9-1.9%204.1-3.6%206.5-4.9l191.1-110.3c1.8-1.1%204.3-2.5%205.7-3.2-26.2-21.9-58.2-35.9-92.1-40.2-33.9-4.4-68.3%201-99.2%2015.5-31%2014.5-57.2%2037.6-75.5%2066.4-18.3%2028.9-28%2062.3-28%2096.5v223q.1.4.2.7.1.3.3.6.2.3.5.6.2.2.6.4l80.7%2046.6zm43.8%20294.7%20103.9%2060%20103.9-60v-119.9l-103.8-60-103.9%2060z'/%3e%3c/svg%3e",jj="data:image/svg+xml,%3csvg%20fill='none'%20height='1320'%20viewBox='3.771%206.973%2023.993%2017.652'%20width='2500'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m27.501%208.469c-.252-.123-.36.111-.508.23-.05.04-.093.09-.135.135-.368.395-.797.652-1.358.621-.821-.045-1.521.213-2.14.842-.132-.776-.57-1.238-1.235-1.535-.349-.155-.701-.309-.944-.645-.171-.238-.217-.504-.303-.765-.054-.159-.108-.32-.29-.348-.197-.031-.274.135-.352.273-.31.567-.43%201.192-.419%201.825.028%201.421.628%202.554%201.82%203.36.136.093.17.186.128.321-.081.278-.178.547-.264.824-.054.178-.135.217-.324.14a5.448%205.448%200%200%201%20-1.719-1.169c-.848-.82-1.614-1.726-2.57-2.435-.225-.166-.449-.32-.681-.467-.976-.95.128-1.729.383-1.82.267-.096.093-.428-.77-.424s-1.653.293-2.659.677a2.782%202.782%200%200%201%20-.46.135%209.554%209.554%200%200%200%20-2.853-.1c-1.866.21-3.356%201.092-4.452%202.6-1.315%201.81-1.625%203.87-1.246%206.018.399%202.261%201.552%204.136%203.326%205.601%201.837%201.518%203.955%202.262%206.37%202.12%201.466-.085%203.1-.282%204.942-1.842.465.23.952.322%201.762.392.623.059%201.223-.031%201.687-.127.728-.154.677-.828.414-.953-2.132-.994-1.665-.59-2.09-.916%201.084-1.285%202.717-2.619%203.356-6.94.05-.343.007-.558%200-.837-.004-.168.034-.235.228-.254a4.084%204.084%200%200%200%201.529-.47c1.382-.757%201.938-1.997%202.07-3.485.02-.227-.004-.463-.243-.582zm-12.041%2013.391c-2.067-1.627-3.07-2.162-3.483-2.138-.387.021-.318.465-.233.754.089.285.205.482.368.732.113.166.19.414-.112.598-.666.414-1.823-.139-1.878-.166-1.347-.793-2.473-1.842-3.267-3.276-.765-1.38-1.21-2.861-1.284-4.441-.02-.383.093-.518.472-.586a4.692%204.692%200%200%201%201.514-.04c2.109.31%203.905%201.255%205.41%202.749.86.853%201.51%201.871%202.18%202.865.711%201.057%201.478%202.063%202.454%202.887.343.289.619.51.881.672-.792.088-2.117.107-3.022-.61zm.99-6.38a.304.304%200%201%201%20.609%200c0%20.17-.136.304-.306.304a.3.3%200%200%201%20-.303-.305zm3.077%201.581c-.197.08-.394.15-.584.159a1.246%201.246%200%200%201%20-.79-.252c-.27-.227-.463-.354-.546-.752a1.752%201.752%200%200%201%20.016-.582c.07-.324-.008-.531-.235-.72-.187-.155-.422-.196-.682-.196a.551.551%200%200%201%20-.252-.078c-.108-.055-.197-.19-.112-.356.027-.053.159-.183.19-.207.352-.201.758-.135%201.134.016.349.142.611.404.99.773.388.448.457.573.678.906.174.264.333.534.441.842.066.192-.02.35-.248.448z'%20fill='%234d6bfe'/%3e%3c/svg%3e",Ej="/assets/minimax-BPMzvuL-.jpeg",Nj="/assets/alibaba-TTwafVwX.svg",Tj="/assets/qwen-CONDcHqt.png",Aj="/assets/zhipuai-BPNAnxo-.svg",Ij={"claude-":"anthropic","gpt-":"openai","o1-":"openai","o3-":"openai","deepseek-":"deepseek",MiniMax:"minimax",qwen:"qwen","glm-":"zhipuai"};function rm(e){if(e===null)return"unknown";const t=e.toLowerCase();for(const[n,r]of Object.entries(Ij))if(t.startsWith(n.toLowerCase()))return r;return"unknown"}const In={width:24,height:24,objectFit:"contain"},zj=lt.memo(({className:e})=>a.jsx("img",{src:Sj,alt:"Anthropic",className:e,style:In})),Pj=lt.memo(({className:e})=>a.jsx("img",{src:Cj,alt:"OpenAI",className:e,style:{...In,background:"white",borderRadius:"4px"}})),Rj=lt.memo(({className:e})=>a.jsx("img",{src:jj,alt:"DeepSeek",className:e,style:In})),Oj=lt.memo(({className:e})=>a.jsx("img",{src:Ej,alt:"MiniMax",className:e,style:In})),Mj=lt.memo(({className:e})=>a.jsx("img",{src:Nj,alt:"Alibaba",className:e,style:In})),Lj=lt.memo(({className:e})=>a.jsx("img",{src:Tj,alt:"Qwen",className:e,style:In})),Dj=lt.memo(({className:e})=>a.jsx("img",{src:Aj,alt:"ZhipuAI",className:e,style:In}));function om({provider:e,className:t}){switch(e){case"anthropic":return a.jsx(zj,{className:t});case"openai":return a.jsx(Pj,{className:t});case"deepseek":return a.jsx(Rj,{className:t});case"minimax":return a.jsx(Oj,{className:t});case"alibaba":return a.jsx(Mj,{className:t});case"qwen":return a.jsx(Lj,{className:t});case"zhipuai":return a.jsx(Dj,{className:t});case"unknown":return null}}function et({delayDuration:e=0,...t}){return a.jsx(q5,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function De({...e}){return a.jsx(K5,{"data-slot":"tooltip",...e})}function Fe({...e}){return a.jsx(J5,{"data-slot":"tooltip-trigger",...e})}function $e({className:e,sideOffset:t=0,children:n,...r}){return a.jsx(G5,{children:a.jsxs(Y5,{"data-slot":"tooltip-content",sideOffset:t,className:ve("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,a.jsx(X5,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function rl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Oe(e,t){return e===null||typeof e!="object"||Array.isArray(e)?void 0:Object.getOwnPropertyDescriptor(e,t)?.value}const Fj="x-anthropic-billing-header:";function $j(e){return e.trimStart().toLowerCase().startsWith(Fj)}function Bj(e){return rl(e)?Object.prototype.hasOwnProperty.call(e,"system"):!1}function Uj(e){if(!rl(e))return!1;const t=Oe(e,"type"),n=Oe(e,"text");return typeof t!="string"||t!=="text"||typeof n!="string"?!1:$j(n)}function Wj(e){let t;try{t=JSON.parse(e)}catch{return{body:e,removed:0}}if(!Bj(t))return{body:e,removed:0};const n=t.system;if(!Array.isArray(n)||n.length===0)return{body:e,removed:0};const r=[];let o=0;for(const s of n){if(Uj(s)){o+=1;continue}r.push(s)}return o===0?{body:e,removed:0}:(r.length===0?delete t.system:t.system=r,{body:JSON.stringify(t),removed:o})}function Vj(e){return{depth:Number.POSITIVE_INFINITY}}function sm(e){try{const t=JSON.parse(e);return{kind:"json",data:Ho(t)}}catch{return{kind:"text"}}}function Ks(e){const t=x.useMemo(()=>e===null?null:sm(e),[e]),n=t?.kind==="json"?t.data:null,r=x.useMemo(()=>n===null?null:Vj(),[n]),[o,s]=x.useState(!1),[i,l]=x.useState(0),[c,u]=x.useState(0),[d,f]=x.useTransition(),h=x.useCallback(()=>{const p=!o,b=p&&r!==null?r.depth:0;f(()=>{s(p),l(b),u(m=>m+1)})},[o,r]);return{parsedData:n,policy:r,isExpanded:o,toggle:h,isPending:d,bulkDepth:i,bulkRevision:c}}function Ho(e){if(e==null)return null;switch(typeof e){case"string":return e;case"number":return e;case"boolean":return e;case"object":{if(Array.isArray(e))return e.map(n=>Ho(n));const t={};for(const n of Object.keys(e)){const r=Object.getOwnPropertyDescriptor(e,n);t[n]=Ho(r?.value)}return t}case"bigint":case"symbol":case"function":case"undefined":return String(e)}return null}function im({className:e,orientation:t="horizontal",...n}){return a.jsx(N5,{"data-slot":"tabs","data-orientation":t,orientation:t,className:ve("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const Hj=Ta("rounded-lg p-[3px] group-data-[orientation=horizontal]/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function am({className:e,variant:t="default",...n}){return a.jsx(T5,{"data-slot":"tabs-list","data-variant":t,className:ve(Hj({variant:t}),e),...n})}function Ct({className:e,...t}){return a.jsx(A5,{"data-slot":"tabs-trigger",className:ve("focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 data-[state=active]:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function jt({className:e,...t}){return a.jsx(I5,{"data-slot":"tabs-content",className:ve("flex-1 outline-none",e),...t})}function vn(e){const[t,n]=x.useState(!1),r=x.useRef(null);x.useEffect(()=>()=>{r.current!==null&&clearTimeout(r.current)},[]);const o=x.useCallback(s=>{s.stopPropagation(),e!==null&&window.navigator.clipboard.writeText(e).then(()=>{n(!0),r.current!==null&&clearTimeout(r.current),r.current=setTimeout(()=>n(!1),2e3)})},[e]);return{copied:t,copy:o}}const Zj=x.lazy(()=>Nn(()=>import("./CompareDrawer-BDzfRSt1.js"),__vite__mapDeps([0,1])).then(e=>({default:e.CompareDrawer}))),qj=x.lazy(()=>Nn(()=>import("./ReplayDialog-p-5TKg75.js"),__vite__mapDeps([2,1,3])).then(e=>({default:e.ReplayDialog}))),Kj=x.lazy(()=>Nn(()=>import("./RequestAnatomy-G0dV8-D_.js"),__vite__mapDeps([4,1])).then(e=>({default:e.RequestAnatomy}))),Jj=x.lazy(()=>Nn(()=>import("./ResponseView-D2wE6lD-.js"),__vite__mapDeps([3,1])).then(e=>({default:e.ResponseView}))),Gj=x.lazy(()=>Nn(()=>import("./StreamingChunkSequence-D8JRK-j_.js"),__vite__mapDeps([5,1])).then(e=>({default:e.StreamingChunkSequence}))),Oc=x.lazy(()=>Nn(()=>Promise.resolve().then(()=>eg),void 0).then(e=>({default:e.JsonViewer}))),Yj=x.lazy(()=>Nn(()=>Promise.resolve().then(()=>eg),void 0).then(e=>({default:e.JsonViewerFromString}))),Xj=1200,Qj=12;function eE(e){const{containerRef:t,setExpandToPath:n,ensureTabActive:r,highlightMs:o}=e,s=x.useRef(null);return x.useCallback(i=>{r?.(),n(i.path);const l=f=>{f.scrollIntoView({behavior:"smooth",block:"center"}),f.classList.add("ring-2","ring-primary/60","ring-offset-1","ring-offset-background","rounded-sm","transition-shadow"),s.current!==null&&clearTimeout(s.current),s.current=setTimeout(()=>{f.classList.remove("ring-2","ring-primary/60","ring-offset-1","ring-offset-background","rounded-sm","transition-shadow"),n(null)},o??Xj)},u=`[data-anatomy-path="${(f=>typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(f):f.replace(/(["'\\[\](){}])/g,"\\$1"))(i.path)}"]`,d=f=>{const h=t.current;if(h!==null){const p=h.querySelector(u);if(p!==null){l(p);return}}f>0?window.requestAnimationFrame(()=>d(f-1)):n(null)};window.requestAnimationFrame(()=>d(Qj))},[t,r,o,n])}class lm{diff(t,n,r={}){let o;typeof r=="function"?(o=r,r={}):"callback"in r&&(o=r.callback);const s=this.castInput(t,r),i=this.castInput(n,r),l=this.removeEmpty(this.tokenize(s,r)),c=this.removeEmpty(this.tokenize(i,r));return this.diffWithOptionsObj(l,c,r,o)}diffWithOptionsObj(t,n,r,o){var s;const i=v=>{if(v=this.postProcess(v,r),o){setTimeout(function(){o(v)},0);return}else return v},l=n.length,c=t.length;let u=1,d=l+c;r.maxEditLength!=null&&(d=Math.min(d,r.maxEditLength));const f=(s=r.timeout)!==null&&s!==void 0?s:1/0,h=Date.now()+f,p=[{oldPos:-1,lastComponent:void 0}];let b=this.extractCommon(p[0],n,t,0,r);if(p[0].oldPos+1>=c&&b+1>=l)return i(this.buildValues(p[0].lastComponent,n,t));let m=-1/0,g=1/0;const y=()=>{for(let v=Math.max(m,-u);v<=Math.min(g,u);v+=2){let k;const S=p[v-1],C=p[v+1];S&&(p[v-1]=void 0);let j=!1;if(C){const T=C.oldPos-v;j=C&&0<=T&&T<l}const N=S&&S.oldPos+1<c;if(!j&&!N){p[v]=void 0;continue}if(!N||j&&S.oldPos<C.oldPos?k=this.addToPath(C,!0,!1,0,r):k=this.addToPath(S,!1,!0,1,r),b=this.extractCommon(k,n,t,v,r),k.oldPos+1>=c&&b+1>=l)return i(this.buildValues(k.lastComponent,n,t))||!0;p[v]=k,k.oldPos+1>=c&&(g=Math.min(g,v-1)),b+1>=l&&(m=Math.max(m,v+1))}u++};if(o)(function v(){setTimeout(function(){if(u>d||Date.now()>h)return o(void 0);y()||v()},0)})();else for(;u<=d&&Date.now()<=h;){const v=y();if(v)return v}}addToPath(t,n,r,o,s){const i=t.lastComponent;return i&&!s.oneChangePerToken&&i.added===n&&i.removed===r?{oldPos:t.oldPos+o,lastComponent:{count:i.count+1,added:n,removed:r,previousComponent:i.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:r,previousComponent:i}}}extractCommon(t,n,r,o,s){const i=n.length,l=r.length;let c=t.oldPos,u=c-o,d=0;for(;u+1<i&&c+1<l&&this.equals(r[c+1],n[u+1],s);)u++,c++,d++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!s.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,u}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const o=[];let s;for(;t;)o.push(t),s=t.previousComponent,delete t.previousComponent,t=s;o.reverse();const i=o.length;let l=0,c=0,u=0;for(;l<i;l++){const d=o[l];if(d.removed)d.value=this.join(r.slice(u,u+d.count)),u+=d.count;else{if(!d.added&&this.useLongestToken){let f=n.slice(c,c+d.count);f=f.map(function(h,p){const b=r[u+p];return b.length>h.length?b:h}),d.value=this.join(f)}else d.value=this.join(n.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}return o}}class tE extends lm{constructor(){super(...arguments),this.tokenize=um}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
86
86
|
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
87
87
|
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
88
88
|
`)&&(t=t.slice(0,-1)),n.endsWith(`
|