@tonyclaw/agent-inspector 3.0.12 → 3.0.13
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/cli.js +72 -6
- package/.output/nitro.json +1 -1
- package/.output/public/assets/{CompareDrawer-BxgmeTyv.js → CompareDrawer-BRV9ztWd.js} +1 -1
- package/.output/public/assets/{ProxyViewerContainer-CchT6T-4.js → ProxyViewerContainer-BVsv8OFb.js} +4 -4
- package/.output/public/assets/{ReplayDialog-CMHVUtVB.js → ReplayDialog-B4b6aD0q.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-CpqHIkD1.js → RequestAnatomy-ybH1l2Bp.js} +1 -1
- package/.output/public/assets/{ResponseView-BvhBiQ5k.js → ResponseView-DpPKgH-Y.js} +2 -2
- package/.output/public/assets/{StreamingChunkSequence-CcNvFNPp.js → StreamingChunkSequence-9f_rtMzz.js} +1 -1
- package/.output/public/assets/{_sessionId-D5z6C77f.js → _sessionId-gEmO-b2f.js} +1 -1
- package/.output/public/assets/index-CF3MPYb3.js +1 -0
- package/.output/public/assets/{index-CXcH69lm.js → index-JgHKqbP1.js} +1 -1
- package/.output/public/assets/{json-viewer-DjRQ00mw.js → json-viewer-DFpIPmLo.js} +1 -1
- package/.output/public/assets/{main-CkKubKth.js → main-YvdO47OP.js} +2 -2
- package/.output/server/{_sessionId-IP7wEbnv.mjs → _sessionId-wSX-l7m2.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-B4qTq3I9.mjs → CompareDrawer-R4d8V0Rv.mjs} +2 -2
- package/.output/server/_ssr/{ProxyViewerContainer-CCIJ1EcB.mjs → ProxyViewerContainer-CDtJhGg8.mjs} +8 -8
- package/.output/server/_ssr/{ReplayDialog-BgxCdCxM.mjs → ReplayDialog-BvmLERpW.mjs} +3 -3
- package/.output/server/_ssr/{RequestAnatomy-De3QDi_x.mjs → RequestAnatomy-CH-oO6mY.mjs} +2 -2
- package/.output/server/_ssr/{ResponseView-Dvibk8g5.mjs → ResponseView-D7shbJw0.mjs} +2 -2
- package/.output/server/_ssr/{StreamingChunkSequence-oAsweEag.mjs → StreamingChunkSequence-DB2YHGJj.mjs} +2 -2
- package/.output/server/_ssr/{index-BIlK7gMO.mjs → index-CS4QLxuv.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{json-viewer-Dgo4oRbs.mjs → json-viewer-HxOn73kS.mjs} +2 -2
- package/.output/server/_ssr/{router-DY_2TxnZ.mjs → router-l4O3mQ4T.mjs} +3 -3
- package/.output/server/{_tanstack-start-manifest_v-CYOwyBpv.mjs → _tanstack-start-manifest_v-Dckf_NHV.mjs} +1 -1
- package/.output/server/index.mjs +68 -68
- package/README.md +8 -9
- package/package.json +1 -1
- package/src/cli.ts +95 -11
- package/.output/public/assets/index-C57MERBU.js +0 -1
package/.output/public/assets/{ProxyViewerContainer-CchT6T-4.js → ProxyViewerContainer-BVsv8OFb.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 nn,a as jd,r as p,j as r,c as mr,g as M0,b as Sd,d as rr,e as L0,f as pt,h as Cd,_ as Un}from"./main-CkKubKth.js";function te(e,t,n){function s(l,c){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,c);const u=a.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 i extends o{}Object.defineProperty(i,"name",{value:e});function a(l){var c;const u=n?.Parent?new i:this;s(u,l),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:s}),Object.defineProperty(a,Symbol.hasInstance,{value:l=>n?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class ds extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Nd extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Td={};function bn(e){return Td}function Ed(e){const t=Object.values(e).filter(s=>typeof s=="number");return Object.entries(e).filter(([s,o])=>t.indexOf(+s)===-1).map(([s,o])=>o)}function ea(e,t){return typeof t=="bigint"?t.toString():t}function Mo(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function qa(e){return e==null}function Ga(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function D0(e,t){const n=(e.toString().split(".")[1]||"").length,s=t.toString();let o=(s.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(s)){const c=s.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const i=n>o?n:o,a=Number.parseInt(e.toFixed(i).replace(".","")),l=Number.parseInt(t.toFixed(i).replace(".",""));return a%l/10**i}const lc=Symbol("evaluating");function Oe(e,t,n){let s;Object.defineProperty(e,t,{get(){if(s!==lc)return s===void 0&&(s=lc,s=n()),s},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Wn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function kn(...e){const t={};for(const n of e){const s=Object.getOwnPropertyDescriptors(n);Object.assign(t,s)}return Object.defineProperties({},t)}function cc(e){return JSON.stringify(e)}function $0(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ad="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function qs(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const F0=Mo(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function xs(e){if(qs(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(qs(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Rd(e){return xs(e)?{...e}:Array.isArray(e)?[...e]:e}const B0=new Set(["string","number","symbol"]);function bs(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jn(e,t,n){const s=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(s._zod.parent=e),s}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 U0(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const W0={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 H0(e,t){const n=e._zod.def,s=n.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=kn(e._zod.def,{get shape(){const a={};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(a[l]=n.shape[l])}return Wn(this,"shape",a),a},checks:[]});return jn(e,i)}function V0(e,t){const n=e._zod.def,s=n.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=kn(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete a[l]}return Wn(this,"shape",a),a},checks:[]});return jn(e,i)}function Z0(e,t){if(!xs(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=kn(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Wn(this,"shape",i),i}});return jn(e,o)}function q0(e,t){if(!xs(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=kn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Wn(this,"shape",s),s}});return jn(e,n)}function G0(e,t){const n=kn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t._zod.def.shape};return Wn(this,"shape",s),s},get catchall(){return t._zod.def.catchall},checks:[]});return jn(e,n)}function K0(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 a=kn(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 Wn(this,"shape",c),c},checks:[]});return jn(t,a)}function J0(e,t,n){const s=kn(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(const a in o)i[a]=new e({type:"nonoptional",innerType:o[a]});return Wn(this,"shape",i),i}});return jn(t,s)}function ls(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 cs(e,t){return t.map(n=>{var s;return(s=n).path??(s.path=[]),n.path.unshift(e),n})}function gr(e){return typeof e=="string"?e:e?.message}function vn(e,t,n){const s={...e,path:e.path??[]};if(!e.message){const o=gr(e.inst?._zod.def?.error?.(e))??gr(t?.error?.(e))??gr(n.customError?.(e))??gr(n.localeError?.(e))??"Invalid input";s.message=o}return delete s.inst,delete s.continue,t?.reportInput||delete s.input,s}function Ka(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Gs(...e){const[t,n,s]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:s}:{...t}}const Id=(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,ea,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},zd=te("$ZodError",Id),Od=te("$ZodError",Id,{Parent:Error});function Y0(e,t=n=>n.message){const n={},s=[];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))):s.push(t(o));return{formErrors:s,fieldErrors:n}}function X0(e,t=n=>n.message){const n={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>s({issues:a}));else if(i.code==="invalid_key")s({issues:i.issues});else if(i.code==="invalid_element")s({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let a=n,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(t(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return s(e),n}const Ja=e=>(t,n,s,o)=>{const i=s?Object.assign(s,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new ds;if(a.issues.length){const l=new(o?.Err??e)(a.issues.map(c=>vn(c,i,bn())));throw Ad(l,o?.callee),l}return a.value},Ya=e=>async(t,n,s,o)=>{const i=s?Object.assign(s,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const l=new(o?.Err??e)(a.issues.map(c=>vn(c,i,bn())));throw Ad(l,o?.callee),l}return a.value},Lo=e=>(t,n,s)=>{const o=s?{...s,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new ds;return i.issues.length?{success:!1,error:new(e??zd)(i.issues.map(a=>vn(a,o,bn())))}:{success:!0,data:i.value}},Q0=Lo(Od),Do=e=>async(t,n,s)=>{const o=s?Object.assign(s,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>vn(a,o,bn())))}:{success:!0,data:i.value}},eg=Do(Od),tg=e=>(t,n,s)=>{const o=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Ja(e)(t,n,o)},ng=e=>(t,n,s)=>Ja(e)(t,n,s),sg=e=>async(t,n,s)=>{const o=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Ya(e)(t,n,o)},rg=e=>async(t,n,s)=>Ya(e)(t,n,s),og=e=>(t,n,s)=>{const o=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Lo(e)(t,n,o)},ig=e=>(t,n,s)=>Lo(e)(t,n,s),ag=e=>async(t,n,s)=>{const o=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Do(e)(t,n,o)},lg=e=>async(t,n,s)=>Do(e)(t,n,s),cg=/^[cC][^\s-]{8,}$/,ug=/^[0-9a-z]+$/,dg=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fg=/^[0-9a-vA-V]{20}$/,pg=/^[A-Za-z0-9]{27}$/,hg=/^[a-zA-Z0-9_-]{21}$/,mg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,gg=/^([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})$/,uc=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)$/,xg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,bg="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function vg(){return new RegExp(bg,"u")}const yg=/^(?:(?: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])$/,wg=/^(([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}|:))$/,_g=/^((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])$/,kg=/^(([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])$/,jg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Pd=/^[A-Za-z0-9_-]*$/,Sg=/^\+[1-9]\d{6,14}$/,Md="(?:(?:\\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])))",Cg=new RegExp(`^${Md}$`);function Ld(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 Ng(e){return new RegExp(`^${Ld(e)}$`)}function Tg(e){const t=Ld({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${t}(?:${n.join("|")})`;return new RegExp(`^${Md}T(?:${s})$`)}const Eg=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ag=/^-?\d+$/,Dd=/^-?\d+(?:\.\d+)?$/,Rg=/^(?:true|false)$/i,Ig=/^null$/i,zg=/^[^A-Z]*$/,Og=/^[^a-z]*$/,ht=te("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),$d={number:"number",bigint:"bigint",object:"date"},Fd=te("$ZodCheckLessThan",(e,t)=>{ht.init(e,t);const n=$d[typeof t.value];e._zod.onattach.push(s=>{const o=s._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value<=t.value:s.value<t.value)||s.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Bd=te("$ZodCheckGreaterThan",(e,t)=>{ht.init(e,t);const n=$d[typeof t.value];e._zod.onattach.push(s=>{const o=s._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value>=t.value:s.value>t.value)||s.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Pg=te("$ZodCheckMultipleOf",(e,t)=>{ht.init(e,t),e._zod.onattach.push(n=>{var s;(s=n._zod.bag).multipleOf??(s.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):D0(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})}}),Mg=te("$ZodCheckNumberFormat",(e,t)=>{ht.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),s=n?"int":"number",[o,i]=W0[t.format];e._zod.onattach.push(a=>{const l=a._zod.bag;l.format=t.format,l.minimum=o,l.maximum=i,n&&(l.pattern=Ag)}),e._zod.check=a=>{const l=a.value;if(n){if(!Number.isInteger(l)){a.issues.push({expected:s,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort});return}}l<o&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),l>i&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Lg=te("$ZodCheckMaxLength",(e,t)=>{var n;ht.init(e,t),(n=e._zod.def).when??(n.when=s=>{const o=s.value;return!qa(o)&&o.length!==void 0}),e._zod.onattach.push(s=>{const o=s._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(s._zod.bag.maximum=t.maximum)}),e._zod.check=s=>{const o=s.value;if(o.length<=t.maximum)return;const a=Ka(o);s.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Dg=te("$ZodCheckMinLength",(e,t)=>{var n;ht.init(e,t),(n=e._zod.def).when??(n.when=s=>{const o=s.value;return!qa(o)&&o.length!==void 0}),e._zod.onattach.push(s=>{const o=s._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(s._zod.bag.minimum=t.minimum)}),e._zod.check=s=>{const o=s.value;if(o.length>=t.minimum)return;const a=Ka(o);s.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),$g=te("$ZodCheckLengthEquals",(e,t)=>{var n;ht.init(e,t),(n=e._zod.def).when??(n.when=s=>{const o=s.value;return!qa(o)&&o.length!==void 0}),e._zod.onattach.push(s=>{const o=s._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=s=>{const o=s.value,i=o.length;if(i===t.length)return;const a=Ka(o),l=i>t.length;s.issues.push({origin:a,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:s.value,inst:e,continue:!t.abort})}}),$o=te("$ZodCheckStringFormat",(e,t)=>{var n,s;ht.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.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})}):(s=e._zod).check??(s.check=()=>{})}),Fg=te("$ZodCheckRegex",(e,t)=>{$o.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})}}),Bg=te("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=zg),$o.init(e,t)}),Ug=te("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Og),$o.init(e,t)}),Wg=te("$ZodCheckIncludes",(e,t)=>{ht.init(e,t);const n=bs(t.includes),s=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=s,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(s)}),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})}}),Hg=te("$ZodCheckStartsWith",(e,t)=>{ht.init(e,t);const n=new RegExp(`^${bs(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(s=>{const o=s._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=s=>{s.value.startsWith(t.prefix)||s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:s.value,inst:e,continue:!t.abort})}}),Vg=te("$ZodCheckEndsWith",(e,t)=>{ht.init(e,t);const n=new RegExp(`.*${bs(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(s=>{const o=s._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=s=>{s.value.endsWith(t.suffix)||s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:s.value,inst:e,continue:!t.abort})}}),Zg=te("$ZodCheckOverwrite",(e,t)=>{ht.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class qg{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 s=t.split(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CompareDrawer-BRV9ztWd.js","assets/main-YvdO47OP.js","assets/ReplayDialog-B4b6aD0q.js","assets/ResponseView-DpPKgH-Y.js","assets/RequestAnatomy-ybH1l2Bp.js","assets/StreamingChunkSequence-9f_rtMzz.js","assets/json-viewer-DFpIPmLo.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{u as nn,a as jd,r as p,j as r,c as mr,g as M0,b as Sd,d as rr,e as L0,f as pt,h as Cd,_ as Un}from"./main-YvdO47OP.js";function te(e,t,n){function s(l,c){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,c);const u=a.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 i extends o{}Object.defineProperty(i,"name",{value:e});function a(l){var c;const u=n?.Parent?new i:this;s(u,l),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:s}),Object.defineProperty(a,Symbol.hasInstance,{value:l=>n?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class ds extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Nd extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Td={};function bn(e){return Td}function Ed(e){const t=Object.values(e).filter(s=>typeof s=="number");return Object.entries(e).filter(([s,o])=>t.indexOf(+s)===-1).map(([s,o])=>o)}function ea(e,t){return typeof t=="bigint"?t.toString():t}function Mo(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function qa(e){return e==null}function Ga(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function D0(e,t){const n=(e.toString().split(".")[1]||"").length,s=t.toString();let o=(s.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(s)){const c=s.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const i=n>o?n:o,a=Number.parseInt(e.toFixed(i).replace(".","")),l=Number.parseInt(t.toFixed(i).replace(".",""));return a%l/10**i}const lc=Symbol("evaluating");function Oe(e,t,n){let s;Object.defineProperty(e,t,{get(){if(s!==lc)return s===void 0&&(s=lc,s=n()),s},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Wn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function kn(...e){const t={};for(const n of e){const s=Object.getOwnPropertyDescriptors(n);Object.assign(t,s)}return Object.defineProperties({},t)}function cc(e){return JSON.stringify(e)}function $0(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ad="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function qs(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const F0=Mo(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function xs(e){if(qs(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(qs(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Rd(e){return xs(e)?{...e}:Array.isArray(e)?[...e]:e}const B0=new Set(["string","number","symbol"]);function bs(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jn(e,t,n){const s=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(s._zod.parent=e),s}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 U0(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const W0={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 H0(e,t){const n=e._zod.def,s=n.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=kn(e._zod.def,{get shape(){const a={};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(a[l]=n.shape[l])}return Wn(this,"shape",a),a},checks:[]});return jn(e,i)}function V0(e,t){const n=e._zod.def,s=n.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=kn(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete a[l]}return Wn(this,"shape",a),a},checks:[]});return jn(e,i)}function Z0(e,t){if(!xs(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=kn(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Wn(this,"shape",i),i}});return jn(e,o)}function q0(e,t){if(!xs(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=kn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Wn(this,"shape",s),s}});return jn(e,n)}function G0(e,t){const n=kn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t._zod.def.shape};return Wn(this,"shape",s),s},get catchall(){return t._zod.def.catchall},checks:[]});return jn(e,n)}function K0(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 a=kn(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 Wn(this,"shape",c),c},checks:[]});return jn(t,a)}function J0(e,t,n){const s=kn(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(const a in o)i[a]=new e({type:"nonoptional",innerType:o[a]});return Wn(this,"shape",i),i}});return jn(t,s)}function ls(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 cs(e,t){return t.map(n=>{var s;return(s=n).path??(s.path=[]),n.path.unshift(e),n})}function gr(e){return typeof e=="string"?e:e?.message}function vn(e,t,n){const s={...e,path:e.path??[]};if(!e.message){const o=gr(e.inst?._zod.def?.error?.(e))??gr(t?.error?.(e))??gr(n.customError?.(e))??gr(n.localeError?.(e))??"Invalid input";s.message=o}return delete s.inst,delete s.continue,t?.reportInput||delete s.input,s}function Ka(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Gs(...e){const[t,n,s]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:s}:{...t}}const Id=(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,ea,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},zd=te("$ZodError",Id),Od=te("$ZodError",Id,{Parent:Error});function Y0(e,t=n=>n.message){const n={},s=[];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))):s.push(t(o));return{formErrors:s,fieldErrors:n}}function X0(e,t=n=>n.message){const n={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>s({issues:a}));else if(i.code==="invalid_key")s({issues:i.issues});else if(i.code==="invalid_element")s({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let a=n,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(t(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return s(e),n}const Ja=e=>(t,n,s,o)=>{const i=s?Object.assign(s,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new ds;if(a.issues.length){const l=new(o?.Err??e)(a.issues.map(c=>vn(c,i,bn())));throw Ad(l,o?.callee),l}return a.value},Ya=e=>async(t,n,s,o)=>{const i=s?Object.assign(s,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const l=new(o?.Err??e)(a.issues.map(c=>vn(c,i,bn())));throw Ad(l,o?.callee),l}return a.value},Lo=e=>(t,n,s)=>{const o=s?{...s,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new ds;return i.issues.length?{success:!1,error:new(e??zd)(i.issues.map(a=>vn(a,o,bn())))}:{success:!0,data:i.value}},Q0=Lo(Od),Do=e=>async(t,n,s)=>{const o=s?Object.assign(s,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>vn(a,o,bn())))}:{success:!0,data:i.value}},eg=Do(Od),tg=e=>(t,n,s)=>{const o=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Ja(e)(t,n,o)},ng=e=>(t,n,s)=>Ja(e)(t,n,s),sg=e=>async(t,n,s)=>{const o=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Ya(e)(t,n,o)},rg=e=>async(t,n,s)=>Ya(e)(t,n,s),og=e=>(t,n,s)=>{const o=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Lo(e)(t,n,o)},ig=e=>(t,n,s)=>Lo(e)(t,n,s),ag=e=>async(t,n,s)=>{const o=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Do(e)(t,n,o)},lg=e=>async(t,n,s)=>Do(e)(t,n,s),cg=/^[cC][^\s-]{8,}$/,ug=/^[0-9a-z]+$/,dg=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fg=/^[0-9a-vA-V]{20}$/,pg=/^[A-Za-z0-9]{27}$/,hg=/^[a-zA-Z0-9_-]{21}$/,mg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,gg=/^([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})$/,uc=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)$/,xg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,bg="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function vg(){return new RegExp(bg,"u")}const yg=/^(?:(?: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])$/,wg=/^(([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}|:))$/,_g=/^((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])$/,kg=/^(([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])$/,jg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Pd=/^[A-Za-z0-9_-]*$/,Sg=/^\+[1-9]\d{6,14}$/,Md="(?:(?:\\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])))",Cg=new RegExp(`^${Md}$`);function Ld(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 Ng(e){return new RegExp(`^${Ld(e)}$`)}function Tg(e){const t=Ld({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${t}(?:${n.join("|")})`;return new RegExp(`^${Md}T(?:${s})$`)}const Eg=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ag=/^-?\d+$/,Dd=/^-?\d+(?:\.\d+)?$/,Rg=/^(?:true|false)$/i,Ig=/^null$/i,zg=/^[^A-Z]*$/,Og=/^[^a-z]*$/,ht=te("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),$d={number:"number",bigint:"bigint",object:"date"},Fd=te("$ZodCheckLessThan",(e,t)=>{ht.init(e,t);const n=$d[typeof t.value];e._zod.onattach.push(s=>{const o=s._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value<=t.value:s.value<t.value)||s.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Bd=te("$ZodCheckGreaterThan",(e,t)=>{ht.init(e,t);const n=$d[typeof t.value];e._zod.onattach.push(s=>{const o=s._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value>=t.value:s.value>t.value)||s.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Pg=te("$ZodCheckMultipleOf",(e,t)=>{ht.init(e,t),e._zod.onattach.push(n=>{var s;(s=n._zod.bag).multipleOf??(s.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):D0(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})}}),Mg=te("$ZodCheckNumberFormat",(e,t)=>{ht.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),s=n?"int":"number",[o,i]=W0[t.format];e._zod.onattach.push(a=>{const l=a._zod.bag;l.format=t.format,l.minimum=o,l.maximum=i,n&&(l.pattern=Ag)}),e._zod.check=a=>{const l=a.value;if(n){if(!Number.isInteger(l)){a.issues.push({expected:s,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort});return}}l<o&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),l>i&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Lg=te("$ZodCheckMaxLength",(e,t)=>{var n;ht.init(e,t),(n=e._zod.def).when??(n.when=s=>{const o=s.value;return!qa(o)&&o.length!==void 0}),e._zod.onattach.push(s=>{const o=s._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(s._zod.bag.maximum=t.maximum)}),e._zod.check=s=>{const o=s.value;if(o.length<=t.maximum)return;const a=Ka(o);s.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Dg=te("$ZodCheckMinLength",(e,t)=>{var n;ht.init(e,t),(n=e._zod.def).when??(n.when=s=>{const o=s.value;return!qa(o)&&o.length!==void 0}),e._zod.onattach.push(s=>{const o=s._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(s._zod.bag.minimum=t.minimum)}),e._zod.check=s=>{const o=s.value;if(o.length>=t.minimum)return;const a=Ka(o);s.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),$g=te("$ZodCheckLengthEquals",(e,t)=>{var n;ht.init(e,t),(n=e._zod.def).when??(n.when=s=>{const o=s.value;return!qa(o)&&o.length!==void 0}),e._zod.onattach.push(s=>{const o=s._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=s=>{const o=s.value,i=o.length;if(i===t.length)return;const a=Ka(o),l=i>t.length;s.issues.push({origin:a,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:s.value,inst:e,continue:!t.abort})}}),$o=te("$ZodCheckStringFormat",(e,t)=>{var n,s;ht.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.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})}):(s=e._zod).check??(s.check=()=>{})}),Fg=te("$ZodCheckRegex",(e,t)=>{$o.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})}}),Bg=te("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=zg),$o.init(e,t)}),Ug=te("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Og),$o.init(e,t)}),Wg=te("$ZodCheckIncludes",(e,t)=>{ht.init(e,t);const n=bs(t.includes),s=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=s,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(s)}),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})}}),Hg=te("$ZodCheckStartsWith",(e,t)=>{ht.init(e,t);const n=new RegExp(`^${bs(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(s=>{const o=s._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=s=>{s.value.startsWith(t.prefix)||s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:s.value,inst:e,continue:!t.abort})}}),Vg=te("$ZodCheckEndsWith",(e,t)=>{ht.init(e,t);const n=new RegExp(`.*${bs(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(s=>{const o=s._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=s=>{s.value.endsWith(t.suffix)||s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:s.value,inst:e,continue:!t.abort})}}),Zg=te("$ZodCheckOverwrite",(e,t)=>{ht.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class qg{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 s=t.split(`
|
|
3
3
|
`).filter(a=>a),o=Math.min(...s.map(a=>a.length-a.trimStart().length)),i=s.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(const a of i)this.content.push(a)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,o.join(`
|
|
4
4
|
`))}}const Gg={major:4,minor:3,patch:6},Ue=te("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Gg;const s=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&s.unshift(e);for(const o of s)for(const i of o._zod.onattach)i(e);if(s.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(a,l,c)=>{let u=ls(a),d;for(const f of l){if(f._zod.def.when){if(!f._zod.def.when(a))continue}else if(u)continue;const h=a.issues.length,m=f._zod.check(a);if(m instanceof Promise&&c?.async===!1)throw new ds;if(d||m instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await m,a.issues.length!==h&&(u||(u=ls(a,h)))});else{if(a.issues.length===h)continue;u||(u=ls(a,h))}}return d?d.then(()=>a):a},i=(a,l,c)=>{if(ls(a))return a.aborted=!0,a;const u=o(l,s,c);if(u instanceof Promise){if(c.async===!1)throw new ds;return u.then(d=>e._zod.parse(d,c))}return e._zod.parse(u,c)};e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){const u=e._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(d=>i(d,a,l)):i(u,a,l)}const c=e._zod.parse(a,l);if(c instanceof Promise){if(l.async===!1)throw new ds;return c.then(u=>o(u,s,l))}return o(c,s,l)}}Oe(e,"~standard",()=>({validate:o=>{try{const i=Q0(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return eg(e,o).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Xa=te("$ZodString",(e,t)=>{Ue.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Eg(e._zod.bag),e._zod.parse=(n,s)=>{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}}),He=te("$ZodStringFormat",(e,t)=>{$o.init(e,t),Xa.init(e,t)}),Kg=te("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=gg),He.init(e,t)}),Jg=te("$ZodUUID",(e,t)=>{if(t.version){const s={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(s===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=uc(s))}else t.pattern??(t.pattern=uc());He.init(e,t)}),Yg=te("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=xg),He.init(e,t)}),Xg=te("$ZodURL",(e,t)=>{He.init(e,t),e._zod.check=n=>{try{const s=n.value.trim(),o=new URL(s);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=s;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Qg=te("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=vg()),He.init(e,t)}),ex=te("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=hg),He.init(e,t)}),tx=te("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=cg),He.init(e,t)}),nx=te("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ug),He.init(e,t)}),sx=te("$ZodULID",(e,t)=>{t.pattern??(t.pattern=dg),He.init(e,t)}),rx=te("$ZodXID",(e,t)=>{t.pattern??(t.pattern=fg),He.init(e,t)}),ox=te("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=pg),He.init(e,t)}),ix=te("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Tg(t)),He.init(e,t)}),ax=te("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Cg),He.init(e,t)}),lx=te("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ng(t)),He.init(e,t)}),cx=te("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=mg),He.init(e,t)}),ux=te("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=yg),He.init(e,t),e._zod.bag.format="ipv4"}),dx=te("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=wg),He.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})}}}),fx=te("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=_g),He.init(e,t)}),px=te("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=kg),He.init(e,t),e._zod.check=n=>{const s=n.value.split("/");try{if(s.length!==2)throw new Error;const[o,i]=s;if(!i)throw new Error;const a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>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 Ud(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const hx=te("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=jg),He.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Ud(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function mx(e){if(!Pd.test(e))return!1;const t=e.replace(/[-_]/g,s=>s==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ud(n)}const gx=te("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Pd),He.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{mx(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),xx=te("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Sg),He.init(e,t)});function bx(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[s]=n;if(!s)return!1;const o=JSON.parse(atob(s));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const vx=te("$ZodJWT",(e,t)=>{He.init(e,t),e._zod.check=n=>{bx(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Wd=te("$ZodNumber",(e,t)=>{Ue.init(e,t),e._zod.pattern=e._zod.bag.pattern??Dd,e._zod.parse=(n,s)=>{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 i=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,...i?{received:i}:{}}),n}}),yx=te("$ZodNumberFormat",(e,t)=>{Mg.init(e,t),Wd.init(e,t)}),wx=te("$ZodBoolean",(e,t)=>{Ue.init(e,t),e._zod.pattern=Rg,e._zod.parse=(n,s)=>{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}}),_x=te("$ZodNull",(e,t)=>{Ue.init(e,t),e._zod.pattern=Ig,e._zod.values=new Set([null]),e._zod.parse=(n,s)=>{const o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),kx=te("$ZodUnknown",(e,t)=>{Ue.init(e,t),e._zod.parse=n=>n}),jx=te("$ZodNever",(e,t)=>{Ue.init(e,t),e._zod.parse=(n,s)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function dc(e,t,n){e.issues.length&&t.issues.push(...cs(n,e.issues)),t.value[n]=e.value}const Sx=te("$ZodArray",(e,t)=>{Ue.init(e,t),e._zod.parse=(n,s)=>{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 i=[];for(let a=0;a<o.length;a++){const l=o[a],c=t.element._zod.run({value:l,issues:[]},s);c instanceof Promise?i.push(c.then(u=>dc(u,n,a))):dc(c,n,a)}return i.length?Promise.all(i).then(()=>n):n}});function to(e,t,n,s,o){if(e.issues.length){if(o&&!(n in s))return;t.issues.push(...cs(n,e.issues))}e.value===void 0?n in s&&(t.value[n]=void 0):t.value[n]=e.value}function Hd(e){const t=Object.keys(e.shape);for(const s of t)if(!e.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${s}": expected a Zod schema`);const n=U0(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Vd(e,t,n,s,o,i){const a=[],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"){a.push(f);continue}const h=c.run({value:t[f],issues:[]},s);h instanceof Promise?e.push(h.then(m=>to(m,n,f,t,d))):to(h,n,f,t,d)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const Cx=te("$ZodObject",(e,t)=>{if(Ue.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 s=Mo(()=>Hd(t));Oe(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=qs,i=t.catchall;let a;e._zod.parse=(l,c)=>{a??(a=s.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=a.shape;for(const h of a.keys){const m=f[h],v=m._zod.optout==="optional",g=m._zod.run({value:u[h],issues:[]},c);g instanceof Promise?d.push(g.then(x=>to(x,l,h,u,v))):to(g,l,h,u,v)}return i?Vd(d,u,l,c,s.value,e):d.length?Promise.all(d).then(()=>l):l}}),Nx=te("$ZodObjectJIT",(e,t)=>{Cx.init(e,t);const n=e._zod.parse,s=Mo(()=>Hd(t)),o=h=>{const m=new qg(["shape","payload","ctx"]),v=s.value,g=k=>{const j=cc(k);return`shape[${j}]._zod.run({ value: input[${j}], issues: [] }, ctx)`};m.write("const input = payload.value;");const x=Object.create(null);let b=0;for(const k of v.keys)x[k]=`key_${b++}`;m.write("const newResult = {};");for(const k of v.keys){const j=x[k],S=cc(k),N=h[k]?._zod?.optout==="optional";m.write(`const ${j} = ${g(k)};`),N?m.write(`
|
|
5
5
|
if (${j}.issues.length) {
|
|
@@ -38,7 +38,7 @@ import{u as nn,a as jd,r as p,j as r,c as mr,g as M0,b as Sd,d as rr,e as L0,f a
|
|
|
38
38
|
`)}m.write("payload.value = newResult;"),m.write("return payload;");const y=m.compile();return(k,j)=>y(h,k,j)};let i;const a=qs,l=!Td.jitless,u=l&&F0.value,d=t.catchall;let f;e._zod.parse=(h,m)=>{f??(f=s.value);const v=h.value;return a(v)?l&&u&&m?.async===!1&&m.jitless!==!0?(i||(i=o(t.shape)),h=i(h,m),d?Vd([],v,h,m,f,e):h):n(h,m):(h.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),h)}});function fc(e,t,n,s){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!ls(i));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(i=>i.issues.map(a=>vn(a,s,bn())))}),t)}const Zd=te("$ZodUnion",(e,t)=>{Ue.init(e,t),Oe(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Oe(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Oe(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Oe(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>Ga(i.source)).join("|")})$`)}});const n=t.options.length===1,s=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return s(o,i);let a=!1;const l=[];for(const c of t.options){const u=c._zod.run({value:o.value,issues:[]},i);if(u instanceof Promise)l.push(u),a=!0;else{if(u.issues.length===0)return u;l.push(u)}}return a?Promise.all(l).then(c=>fc(c,o,e,i)):fc(l,o,e,i)}}),Tx=te("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Zd.init(e,t);const n=e._zod.parse;Oe(e._zod,"propValues",()=>{const o={};for(const i of t.options){const a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[l,c]of Object.entries(a)){o[l]||(o[l]=new Set);for(const u of c)o[l].add(u)}}return o});const s=Mo(()=>{const o=t.options,i=new Map;for(const a of o){const l=a._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const c of l){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(o,i)=>{const a=o.value;if(!qs(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;const l=s.value.get(a?.[t.discriminator]);return l?l._zod.run(o,i):t.unionFallback?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),o)}}),Ex=te("$ZodIntersection",(e,t)=>{Ue.init(e,t),e._zod.parse=(n,s)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},s),a=t.right._zod.run({value:o,issues:[]},s);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,u])=>pc(n,c,u)):pc(n,i,a)}});function ta(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(xs(e)&&xs(t)){const n=Object.keys(t),s=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of s){const a=ta(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.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 s=0;s<e.length;s++){const o=e[s],i=t[s],a=ta(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[s,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function pc(e,t,n){const s=new Map;let o;for(const l of t.issues)if(l.code==="unrecognized_keys"){o??(o=l);for(const c of l.keys)s.has(c)||s.set(c,{}),s.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)s.has(c)||s.set(c,{}),s.get(c).r=!0;else e.issues.push(l);const i=[...s].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(i.length&&o&&e.issues.push({...o,keys:i}),ls(e))return e;const a=ta(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Ax=te("$ZodRecord",(e,t)=>{Ue.init(e,t),e._zod.parse=(n,s)=>{const o=n.value;if(!xs(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const i=[],a=t.keyType._zod.values;if(a){n.value={};const l=new Set;for(const u of a)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:[]},s);d instanceof Promise?i.push(d.then(f=>{f.issues.length&&n.issues.push(...cs(u,f.issues)),n.value[u]=f.value})):(d.issues.length&&n.issues.push(...cs(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:[]},s);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&Dd.test(l)&&c.issues.length){const f=t.keyType._zod.run({value:Number(l),issues:[]},s);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=>vn(f,s,bn())),input:l,path:[l],inst:e});continue}const d=t.valueType._zod.run({value:o[l],issues:[]},s);d instanceof Promise?i.push(d.then(f=>{f.issues.length&&n.issues.push(...cs(l,f.issues)),n.value[c.value]=f.value})):(d.issues.length&&n.issues.push(...cs(l,d.issues)),n.value[c.value]=d.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Rx=te("$ZodEnum",(e,t)=>{Ue.init(e,t);const n=Ed(t.entries),s=new Set(n);e._zod.values=s,e._zod.pattern=new RegExp(`^(${n.filter(o=>B0.has(typeof o)).map(o=>typeof o=="string"?bs(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const a=o.value;return s.has(a)||o.issues.push({code:"invalid_value",values:n,input:a,inst:e}),o}}),Ix=te("$ZodLiteral",(e,t)=>{if(Ue.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(s=>typeof s=="string"?bs(s):s?bs(s.toString()):String(s)).join("|")})$`),e._zod.parse=(s,o)=>{const i=s.value;return n.has(i)||s.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),s}}),zx=te("$ZodTransform",(e,t)=>{Ue.init(e,t),e._zod.parse=(n,s)=>{if(s.direction==="backward")throw new Nd(e.constructor.name);const o=t.transform(n.value,n);if(s.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(n.value=a,n));if(o instanceof Promise)throw new ds;return n.value=o,n}});function hc(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const qd=te("$ZodOptional",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Oe(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ga(n.source)})?$`):void 0}),e._zod.parse=(n,s)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,s);return o instanceof Promise?o.then(i=>hc(i,n.value)):hc(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,s)}}),Ox=te("$ZodExactOptional",(e,t)=>{qd.init(e,t),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,s)=>t.innerType._zod.run(n,s)}),Px=te("$ZodNullable",(e,t)=>{Ue.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ga(n.source)}|null)$`):void 0}),Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,s)=>n.value===null?n:t.innerType._zod.run(n,s)}),Mx=te("$ZodDefault",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,s)=>{if(s.direction==="backward")return t.innerType._zod.run(n,s);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,s);return o instanceof Promise?o.then(i=>mc(i,t)):mc(o,t)}});function mc(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Lx=te("$ZodPrefault",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,s)=>(s.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,s))}),Dx=te("$ZodNonOptional",(e,t)=>{Ue.init(e,t),Oe(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(s=>s!==void 0)):void 0}),e._zod.parse=(n,s)=>{const o=t.innerType._zod.run(n,s);return o instanceof Promise?o.then(i=>gc(i,e)):gc(o,e)}});function gc(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 $x=te("$ZodCatch",(e,t)=>{Ue.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,s)=>{if(s.direction==="backward")return t.innerType._zod.run(n,s);const o=t.innerType._zod.run(n,s);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>vn(a,s,bn()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>vn(i,s,bn()))},input:n.value}),n.issues=[]),n)}}),Fx=te("$ZodPipe",(e,t)=>{Ue.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,s)=>{if(s.direction==="backward"){const i=t.out._zod.run(n,s);return i instanceof Promise?i.then(a=>xr(a,t.in,s)):xr(i,t.in,s)}const o=t.in._zod.run(n,s);return o instanceof Promise?o.then(i=>xr(i,t.out,s)):xr(o,t.out,s)}});function xr(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Bx=te("$ZodReadonly",(e,t)=>{Ue.init(e,t),Oe(e._zod,"propValues",()=>t.innerType._zod.propValues),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"optin",()=>t.innerType?._zod?.optin),Oe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,s)=>{if(s.direction==="backward")return t.innerType._zod.run(n,s);const o=t.innerType._zod.run(n,s);return o instanceof Promise?o.then(xc):xc(o)}});function xc(e){return e.value=Object.freeze(e.value),e}const Ux=te("$ZodLazy",(e,t)=>{Ue.init(e,t),Oe(e._zod,"innerType",()=>t.getter()),Oe(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Oe(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Oe(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Oe(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,s)=>e._zod.innerType._zod.run(n,s)}),Wx=te("$ZodCustom",(e,t)=>{ht.init(e,t),Ue.init(e,t),e._zod.parse=(n,s)=>n,e._zod.check=n=>{const s=n.value,o=t.fn(s);if(o instanceof Promise)return o.then(i=>bc(i,n,s,e));bc(o,n,s,e)}});function bc(e,t,n,s){if(!e){const o={code:"custom",input:n,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};s._zod.def.params&&(o.params=s._zod.def.params),t.issues.push(Gs(o))}}var vc;class Hx{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const s=n[0];return this._map.set(t,s),s&&typeof s=="object"&&"id"in s&&this._idmap.set(s.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 s={...this.get(n)??{}};delete s.id;const o={...s,...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 Vx(){return new Hx}(vc=globalThis).__zod_globalRegistry??(vc.__zod_globalRegistry=Vx());const Ws=globalThis.__zod_globalRegistry;function Zx(e,t){return new e({type:"string",...we(t)})}function qx(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...we(t)})}function yc(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...we(t)})}function Gx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...we(t)})}function Kx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...we(t)})}function Jx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...we(t)})}function Yx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...we(t)})}function Xx(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...we(t)})}function Qx(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...we(t)})}function e1(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...we(t)})}function t1(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...we(t)})}function n1(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...we(t)})}function s1(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...we(t)})}function r1(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...we(t)})}function o1(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...we(t)})}function i1(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...we(t)})}function a1(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...we(t)})}function l1(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...we(t)})}function c1(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...we(t)})}function u1(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...we(t)})}function d1(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...we(t)})}function f1(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...we(t)})}function p1(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...we(t)})}function h1(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...we(t)})}function m1(e,t){return new e({type:"string",format:"date",check:"string_format",...we(t)})}function g1(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...we(t)})}function x1(e,t){return new e({type:"string",format:"duration",check:"string_format",...we(t)})}function b1(e,t){return new e({type:"number",checks:[],...we(t)})}function v1(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...we(t)})}function y1(e,t){return new e({type:"boolean",...we(t)})}function w1(e,t){return new e({type:"null",...we(t)})}function _1(e){return new e({type:"unknown"})}function k1(e,t){return new e({type:"never",...we(t)})}function wc(e,t){return new Fd({check:"less_than",...we(t),value:e,inclusive:!1})}function gi(e,t){return new Fd({check:"less_than",...we(t),value:e,inclusive:!0})}function _c(e,t){return new Bd({check:"greater_than",...we(t),value:e,inclusive:!1})}function xi(e,t){return new Bd({check:"greater_than",...we(t),value:e,inclusive:!0})}function kc(e,t){return new Pg({check:"multiple_of",...we(t),value:e})}function Gd(e,t){return new Lg({check:"max_length",...we(t),maximum:e})}function no(e,t){return new Dg({check:"min_length",...we(t),minimum:e})}function Kd(e,t){return new $g({check:"length_equals",...we(t),length:e})}function j1(e,t){return new Fg({check:"string_format",format:"regex",...we(t),pattern:e})}function S1(e){return new Bg({check:"string_format",format:"lowercase",...we(e)})}function C1(e){return new Ug({check:"string_format",format:"uppercase",...we(e)})}function N1(e,t){return new Wg({check:"string_format",format:"includes",...we(t),includes:e})}function T1(e,t){return new Hg({check:"string_format",format:"starts_with",...we(t),prefix:e})}function E1(e,t){return new Vg({check:"string_format",format:"ends_with",...we(t),suffix:e})}function Ss(e){return new Zg({check:"overwrite",tx:e})}function A1(e){return Ss(t=>t.normalize(e))}function R1(){return Ss(e=>e.trim())}function I1(){return Ss(e=>e.toLowerCase())}function z1(){return Ss(e=>e.toUpperCase())}function O1(){return Ss(e=>$0(e))}function P1(e,t,n){return new e({type:"array",element:t,...we(n)})}function M1(e,t,n){return new e({type:"custom",check:"custom",fn:t,...we(n)})}function L1(e){const t=D1(n=>(n.addIssue=s=>{if(typeof s=="string")n.issues.push(Gs(s,n.value,t._zod.def));else{const o=s;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(Gs(o))}},e(n.value,n)));return t}function D1(e,t){const n=new ht({check:"custom",...we(t)});return n._zod.check=e,n}function Jd(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??Ws,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 s;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const l=e._zod.toJSONSchema?.();if(l)a.schema=l;else{const d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{const h=a.schema,m=t.processors[o.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);m(e,t,h,d)}const f=e._zod.parent;f&&(a.ref||(a.ref=f),Ge(f,t,d),t.seen.get(f).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&at(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((s=a.schema).default??(s.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Yd(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=new Map;for(const a of e.seen.entries()){const l=e.metadataRegistry.get(a[0])?.id;if(l){const c=s.get(l);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);s.set(l,a[0])}}const o=a=>{const l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(a[0])?.id,h=e.external.uri??(v=>v);if(f)return{ref:h(f)};const m=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=m,{defId:m,ref:`${h("__shared")}#/${l}/${m}`}}if(a[1]===n)return{ref:"#"};const u=`#/${l}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:u+d}},i=a=>{if(a[1].schema.$ref)return;const l=a[1],{ref:c,defId:u}=o(a);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 a of e.seen.entries()){const l=a[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 a of e.seen.entries()){const l=a[1];if(t===a[0]){i(a);continue}if(e.external){const u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(l.cycle){i(a);continue}if(l.count>1&&e.reused==="ref"){i(a);continue}}}function Xd(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=a=>{const l=e.seen.get(a);if(l.ref===null)return;const c=l.def??l.schema,u={...c},d=l.ref;if(l.ref=null,d){s(d);const h=e.seen.get(d),m=h.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(m)):Object.assign(c,m),Object.assign(c,u),a._zod.parent===d)for(const g in c)g==="$ref"||g==="allOf"||g in u||delete c[g];if(m.$ref&&h.def)for(const g in c)g==="$ref"||g==="allOf"||g in h.def&&JSON.stringify(c[g])===JSON.stringify(h.def[g])&&delete c[g]}const f=a._zod.parent;if(f&&f!==d){s(f);const h=e.seen.get(f);if(h?.schema.$ref&&(c.$ref=h.schema.$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]}e.override({zodSchema:a,jsonSchema:c,path:l.path??[]})};for(const a of[...e.seen.entries()].reverse())s(a[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 a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(a)}Object.assign(o,n.def??n.schema);const i=e.external?.defs??{};for(const a of e.seen.entries()){const l=a[1];l.def&&l.defId&&(i[l.defId]=l.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const a=JSON.parse(JSON.stringify(o));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:so(t,"input",e.processors),output:so(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function at(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const s=e._zod.def;if(s.type==="transform")return!0;if(s.type==="array")return at(s.element,n);if(s.type==="set")return at(s.valueType,n);if(s.type==="lazy")return at(s.getter(),n);if(s.type==="promise"||s.type==="optional"||s.type==="nonoptional"||s.type==="nullable"||s.type==="readonly"||s.type==="default"||s.type==="prefault")return at(s.innerType,n);if(s.type==="intersection")return at(s.left,n)||at(s.right,n);if(s.type==="record"||s.type==="map")return at(s.keyType,n)||at(s.valueType,n);if(s.type==="pipe")return at(s.in,n)||at(s.out,n);if(s.type==="object"){for(const o in s.shape)if(at(s.shape[o],n))return!0;return!1}if(s.type==="union"){for(const o of s.options)if(at(o,n))return!0;return!1}if(s.type==="tuple"){for(const o of s.items)if(at(o,n))return!0;return!!(s.rest&&at(s.rest,n))}return!1}const $1=(e,t={})=>n=>{const s=Jd({...n,processors:t});return Ge(e,s),Yd(s,e),Xd(s,e)},so=(e,t,n={})=>s=>{const{libraryOptions:o,target:i}=s??{},a=Jd({...o??{},target:i,io:t,processors:n});return Ge(e,a),Yd(a,e),Xd(a,e)},F1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},B1=(e,t,n,s)=>{const o=n;o.type="string";const{minimum:i,maximum:a,format:l,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),l&&(o.format=F1[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}))])}},U1=(e,t,n,s)=>{const o=n,{minimum:i,maximum:a,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 i=="number"&&(o.minimum=i,typeof d=="number"&&t.target!=="draft-04"&&(d>=i?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 a=="number"&&(o.maximum=a,typeof u=="number"&&t.target!=="draft-04"&&(u<=a?delete o.maximum:delete o.exclusiveMaximum)),typeof c=="number"&&(o.multipleOf=c)},W1=(e,t,n,s)=>{n.type="boolean"},H1=(e,t,n,s)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},V1=(e,t,n,s)=>{n.not={}},Z1=(e,t,n,s)=>{},q1=(e,t,n,s)=>{const o=e._zod.def,i=Ed(o.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},G1=(e,t,n,s)=>{const o=e._zod.def,i=[];for(const a of o.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){const a=i[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),i.every(a=>typeof a=="boolean")&&(n.type="boolean"),i.every(a=>a===null)&&(n.type="null"),n.enum=i},K1=(e,t,n,s)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},J1=(e,t,n,s)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Y1=(e,t,n,s)=>{const o=n,i=e._zod.def,{minimum:a,maximum:l}=e._zod.bag;typeof a=="number"&&(o.minItems=a),typeof l=="number"&&(o.maxItems=l),o.type="array",o.items=Ge(i.element,t,{...s,path:[...s.path,"items"]})},X1=(e,t,n,s)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const a=i.shape;for(const u in a)o.properties[u]=Ge(a[u],t,{...s,path:[...s.path,"properties",u]});const l=new Set(Object.keys(a)),c=new Set([...l].filter(u=>{const d=i.shape[u]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Ge(i.catchall,t,{...s,path:[...s.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Q1=(e,t,n,s)=>{const o=e._zod.def,i=o.inclusive===!1,a=o.options.map((l,c)=>Ge(l,t,{...s,path:[...s.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=a:n.anyOf=a},eb=(e,t,n,s)=>{const o=e._zod.def,i=Ge(o.left,t,{...s,path:[...s.path,"allOf",0]}),a=Ge(o.right,t,{...s,path:[...s.path,"allOf",1]}),l=u=>"allOf"in u&&Object.keys(u).length===1,c=[...l(i)?i.allOf:[i],...l(a)?a.allOf:[a]];n.allOf=c},tb=(e,t,n,s)=>{const o=n,i=e._zod.def;o.type="object";const a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){const d=Ge(i.valueType,t,{...s,path:[...s.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(i.keyType,t,{...s,path:[...s.path,"propertyNames"]})),o.additionalProperties=Ge(i.valueType,t,{...s,path:[...s.path,"additionalProperties"]});const u=a._zod.values;if(u){const d=[...u].filter(f=>typeof f=="string"||typeof f=="number");d.length>0&&(o.required=d)}},nb=(e,t,n,s)=>{const o=e._zod.def,i=Ge(o.innerType,t,s),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},sb=(e,t,n,s)=>{const o=e._zod.def;Ge(o.innerType,t,s);const i=t.seen.get(e);i.ref=o.innerType},rb=(e,t,n,s)=>{const o=e._zod.def;Ge(o.innerType,t,s);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},ob=(e,t,n,s)=>{const o=e._zod.def;Ge(o.innerType,t,s);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},ib=(e,t,n,s)=>{const o=e._zod.def;Ge(o.innerType,t,s);const i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},ab=(e,t,n,s)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Ge(i,t,s);const a=t.seen.get(e);a.ref=i},lb=(e,t,n,s)=>{const o=e._zod.def;Ge(o.innerType,t,s);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},Qd=(e,t,n,s)=>{const o=e._zod.def;Ge(o.innerType,t,s);const i=t.seen.get(e);i.ref=o.innerType},cb=(e,t,n,s)=>{const o=e._zod.innerType;Ge(o,t,s);const i=t.seen.get(e);i.ref=o},ub=te("ZodISODateTime",(e,t)=>{ix.init(e,t),Ve.init(e,t)});function db(e){return h1(ub,e)}const fb=te("ZodISODate",(e,t)=>{ax.init(e,t),Ve.init(e,t)});function pb(e){return m1(fb,e)}const hb=te("ZodISOTime",(e,t)=>{lx.init(e,t),Ve.init(e,t)});function mb(e){return g1(hb,e)}const gb=te("ZodISODuration",(e,t)=>{cx.init(e,t),Ve.init(e,t)});function xb(e){return x1(gb,e)}const bb=(e,t)=>{zd.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>X0(e,n)},flatten:{value:n=>Y0(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,ea,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,ea,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ct=te("ZodError",bb,{Parent:Error}),vb=Ja(Ct),yb=Ya(Ct),wb=Lo(Ct),_b=Do(Ct),kb=tg(Ct),jb=ng(Ct),Sb=sg(Ct),Cb=rg(Ct),Nb=og(Ct),Tb=ig(Ct),Eb=ag(Ct),Ab=lg(Ct),We=te("ZodType",(e,t)=>(Ue.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:so(e,"input"),output:so(e,"output")}}),e.toJSONSchema=$1(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(kn(t,{checks:[...t.checks??[],...n.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0}),e.with=e.check,e.clone=(n,s)=>jn(e,n,s),e.brand=()=>e,e.register=((n,s)=>(n.add(e,s),e)),e.parse=(n,s)=>vb(e,n,s,{callee:e.parse}),e.safeParse=(n,s)=>wb(e,n,s),e.parseAsync=async(n,s)=>yb(e,n,s,{callee:e.parseAsync}),e.safeParseAsync=async(n,s)=>_b(e,n,s),e.spa=e.safeParseAsync,e.encode=(n,s)=>kb(e,n,s),e.decode=(n,s)=>jb(e,n,s),e.encodeAsync=async(n,s)=>Sb(e,n,s),e.decodeAsync=async(n,s)=>Cb(e,n,s),e.safeEncode=(n,s)=>Nb(e,n,s),e.safeDecode=(n,s)=>Tb(e,n,s),e.safeEncodeAsync=async(n,s)=>Eb(e,n,s),e.safeDecodeAsync=async(n,s)=>Ab(e,n,s),e.refine=(n,s)=>e.check(Cv(n,s)),e.superRefine=n=>e.check(Nv(n)),e.overwrite=n=>e.check(Ss(n)),e.optional=()=>Cc(e),e.exactOptional=()=>dv(e),e.nullable=()=>Nc(e),e.nullish=()=>Cc(Nc(e)),e.nonoptional=n=>xv(e,n),e.array=()=>fe(e),e.or=n=>Gt([e,n]),e.and=n=>ov(e,n),e.transform=n=>Tc(e,cv(n)),e.default=n=>hv(e,n),e.prefault=n=>gv(e,n),e.catch=n=>vv(e,n),e.pipe=n=>Tc(e,n),e.readonly=()=>_v(e),e.describe=n=>{const s=e.clone();return Ws.add(s,{description:n}),s},Object.defineProperty(e,"description",{get(){return Ws.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Ws.get(e);const s=e.clone();return Ws.add(s,n[0]),s},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),ef=te("_ZodString",(e,t)=>{Xa.init(e,t),We.init(e,t),e._zod.processJSONSchema=(s,o,i)=>B1(e,s,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...s)=>e.check(j1(...s)),e.includes=(...s)=>e.check(N1(...s)),e.startsWith=(...s)=>e.check(T1(...s)),e.endsWith=(...s)=>e.check(E1(...s)),e.min=(...s)=>e.check(no(...s)),e.max=(...s)=>e.check(Gd(...s)),e.length=(...s)=>e.check(Kd(...s)),e.nonempty=(...s)=>e.check(no(1,...s)),e.lowercase=s=>e.check(S1(s)),e.uppercase=s=>e.check(C1(s)),e.trim=()=>e.check(R1()),e.normalize=(...s)=>e.check(A1(...s)),e.toLowerCase=()=>e.check(I1()),e.toUpperCase=()=>e.check(z1()),e.slugify=()=>e.check(O1())}),Rb=te("ZodString",(e,t)=>{Xa.init(e,t),ef.init(e,t),e.email=n=>e.check(qx(Ib,n)),e.url=n=>e.check(Xx(zb,n)),e.jwt=n=>e.check(p1(Gb,n)),e.emoji=n=>e.check(Qx(Ob,n)),e.guid=n=>e.check(yc(jc,n)),e.uuid=n=>e.check(Gx(br,n)),e.uuidv4=n=>e.check(Kx(br,n)),e.uuidv6=n=>e.check(Jx(br,n)),e.uuidv7=n=>e.check(Yx(br,n)),e.nanoid=n=>e.check(e1(Pb,n)),e.guid=n=>e.check(yc(jc,n)),e.cuid=n=>e.check(t1(Mb,n)),e.cuid2=n=>e.check(n1(Lb,n)),e.ulid=n=>e.check(s1(Db,n)),e.base64=n=>e.check(u1(Vb,n)),e.base64url=n=>e.check(d1(Zb,n)),e.xid=n=>e.check(r1($b,n)),e.ksuid=n=>e.check(o1(Fb,n)),e.ipv4=n=>e.check(i1(Bb,n)),e.ipv6=n=>e.check(a1(Ub,n)),e.cidrv4=n=>e.check(l1(Wb,n)),e.cidrv6=n=>e.check(c1(Hb,n)),e.e164=n=>e.check(f1(qb,n)),e.datetime=n=>e.check(db(n)),e.date=n=>e.check(pb(n)),e.time=n=>e.check(mb(n)),e.duration=n=>e.check(xb(n))});function C(e){return Zx(Rb,e)}const Ve=te("ZodStringFormat",(e,t)=>{He.init(e,t),ef.init(e,t)}),Ib=te("ZodEmail",(e,t)=>{Yg.init(e,t),Ve.init(e,t)}),jc=te("ZodGUID",(e,t)=>{Kg.init(e,t),Ve.init(e,t)}),br=te("ZodUUID",(e,t)=>{Jg.init(e,t),Ve.init(e,t)}),zb=te("ZodURL",(e,t)=>{Xg.init(e,t),Ve.init(e,t)}),Ob=te("ZodEmoji",(e,t)=>{Qg.init(e,t),Ve.init(e,t)}),Pb=te("ZodNanoID",(e,t)=>{ex.init(e,t),Ve.init(e,t)}),Mb=te("ZodCUID",(e,t)=>{tx.init(e,t),Ve.init(e,t)}),Lb=te("ZodCUID2",(e,t)=>{nx.init(e,t),Ve.init(e,t)}),Db=te("ZodULID",(e,t)=>{sx.init(e,t),Ve.init(e,t)}),$b=te("ZodXID",(e,t)=>{rx.init(e,t),Ve.init(e,t)}),Fb=te("ZodKSUID",(e,t)=>{ox.init(e,t),Ve.init(e,t)}),Bb=te("ZodIPv4",(e,t)=>{ux.init(e,t),Ve.init(e,t)}),Ub=te("ZodIPv6",(e,t)=>{dx.init(e,t),Ve.init(e,t)}),Wb=te("ZodCIDRv4",(e,t)=>{fx.init(e,t),Ve.init(e,t)}),Hb=te("ZodCIDRv6",(e,t)=>{px.init(e,t),Ve.init(e,t)}),Vb=te("ZodBase64",(e,t)=>{hx.init(e,t),Ve.init(e,t)}),Zb=te("ZodBase64URL",(e,t)=>{gx.init(e,t),Ve.init(e,t)}),qb=te("ZodE164",(e,t)=>{xx.init(e,t),Ve.init(e,t)}),Gb=te("ZodJWT",(e,t)=>{vx.init(e,t),Ve.init(e,t)}),tf=te("ZodNumber",(e,t)=>{Wd.init(e,t),We.init(e,t),e._zod.processJSONSchema=(s,o,i)=>U1(e,s,o),e.gt=(s,o)=>e.check(_c(s,o)),e.gte=(s,o)=>e.check(xi(s,o)),e.min=(s,o)=>e.check(xi(s,o)),e.lt=(s,o)=>e.check(wc(s,o)),e.lte=(s,o)=>e.check(gi(s,o)),e.max=(s,o)=>e.check(gi(s,o)),e.int=s=>e.check(Sc(s)),e.safe=s=>e.check(Sc(s)),e.positive=s=>e.check(_c(0,s)),e.nonnegative=s=>e.check(xi(0,s)),e.negative=s=>e.check(wc(0,s)),e.nonpositive=s=>e.check(gi(0,s)),e.multipleOf=(s,o)=>e.check(kc(s,o)),e.step=(s,o)=>e.check(kc(s,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 K(e){return b1(tf,e)}const Kb=te("ZodNumberFormat",(e,t)=>{yx.init(e,t),tf.init(e,t)});function Sc(e){return v1(Kb,e)}const Jb=te("ZodBoolean",(e,t)=>{wx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>W1(e,n,s)});function Le(e){return y1(Jb,e)}const Yb=te("ZodNull",(e,t)=>{_x.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>H1(e,n,s)});function ro(e){return w1(Yb,e)}const Xb=te("ZodUnknown",(e,t)=>{kx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Z1()});function On(){return _1(Xb)}const Qb=te("ZodNever",(e,t)=>{jx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>V1(e,n,s)});function ev(e){return k1(Qb,e)}const tv=te("ZodArray",(e,t)=>{Sx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Y1(e,n,s,o),e.element=t.element,e.min=(n,s)=>e.check(no(n,s)),e.nonempty=n=>e.check(no(1,n)),e.max=(n,s)=>e.check(Gd(n,s)),e.length=(n,s)=>e.check(Kd(n,s)),e.unwrap=()=>e.element});function fe(e,t){return P1(tv,e,t)}const nv=te("ZodObject",(e,t)=>{Nx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>X1(e,n,s,o),Oe(e,"shape",()=>t.shape),e.keyof=()=>Ee(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:On()}),e.loose=()=>e.clone({...e._zod.def,catchall:On()}),e.strict=()=>e.clone({...e._zod.def,catchall:ev()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Z0(e,n),e.safeExtend=n=>q0(e,n),e.merge=n=>G0(e,n),e.pick=n=>H0(e,n),e.omit=n=>V0(e,n),e.partial=(...n)=>K0(sf,e,n[0]),e.required=(...n)=>J0(rf,e,n[0])});function Y(e,t){const n={type:"object",shape:e??{},...we(t)};return new nv(n)}const nf=te("ZodUnion",(e,t)=>{Zd.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Q1(e,n,s,o),e.options=t.options});function Gt(e,t){return new nf({type:"union",options:e,...we(t)})}const sv=te("ZodDiscriminatedUnion",(e,t)=>{nf.init(e,t),Tx.init(e,t)});function Hn(e,t,n){return new sv({type:"union",options:t,discriminator:e,...we(n)})}const rv=te("ZodIntersection",(e,t)=>{Ex.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>eb(e,n,s,o)});function ov(e,t){return new rv({type:"intersection",left:e,right:t})}const iv=te("ZodRecord",(e,t)=>{Ax.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>tb(e,n,s,o),e.keyType=t.keyType,e.valueType=t.valueType});function Ke(e,t,n){return new iv({type:"record",keyType:e,valueType:t,...we(n)})}const na=te("ZodEnum",(e,t)=>{Rx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(s,o,i)=>q1(e,s,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(s,o)=>{const i={};for(const a of s)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new na({...t,checks:[],...we(o),entries:i})},e.exclude=(s,o)=>{const i={...t.entries};for(const a of s)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new na({...t,checks:[],...we(o),entries:i})}});function Ee(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(s=>[s,s])):e;return new na({type:"enum",entries:n,...we(t)})}const av=te("ZodLiteral",(e,t)=>{Ix.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>G1(e,n,s),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 Te(e,t){return new av({type:"literal",values:Array.isArray(e)?e:[e],...we(t)})}const lv=te("ZodTransform",(e,t)=>{zx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>J1(e,n),e._zod.parse=(n,s)=>{if(s.direction==="backward")throw new Nd(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Gs(i,n.value,t));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(Gs(a))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function cv(e){return new lv({type:"transform",transform:e})}const sf=te("ZodOptional",(e,t)=>{qd.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Qd(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function Cc(e){return new sf({type:"optional",innerType:e})}const uv=te("ZodExactOptional",(e,t)=>{Ox.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Qd(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function dv(e){return new uv({type:"optional",innerType:e})}const fv=te("ZodNullable",(e,t)=>{Px.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>nb(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function Nc(e){return new fv({type:"nullable",innerType:e})}const pv=te("ZodDefault",(e,t)=>{Mx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>rb(e,n,s,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function hv(e,t){return new pv({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Rd(t)}})}const mv=te("ZodPrefault",(e,t)=>{Lx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>ob(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function gv(e,t){return new mv({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Rd(t)}})}const rf=te("ZodNonOptional",(e,t)=>{Dx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>sb(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function xv(e,t){return new rf({type:"nonoptional",innerType:e,...we(t)})}const bv=te("ZodCatch",(e,t)=>{$x.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>ib(e,n,s,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function vv(e,t){return new bv({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const yv=te("ZodPipe",(e,t)=>{Fx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>ab(e,n,s,o),e.in=t.in,e.out=t.out});function Tc(e,t){return new yv({type:"pipe",in:e,out:t})}const wv=te("ZodReadonly",(e,t)=>{Bx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>lb(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function _v(e){return new wv({type:"readonly",innerType:e})}const kv=te("ZodLazy",(e,t)=>{Ux.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>cb(e,n,s,o),e.unwrap=()=>e._zod.def.getter()});function jv(e){return new kv({type:"lazy",getter:e})}const Sv=te("ZodCustom",(e,t)=>{Wx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,s,o)=>K1(e,n)});function Cv(e,t={}){return M1(Sv,e,t)}function Nv(e){return L1(e)}const tt=jv(()=>Gt([C(),K(),Le(),ro(),fe(tt),Ke(C(),tt)]));const of=Y({index:K(),timestamp:K(),type:C(),data:tt}),Tv=Y({chunks:fe(of),truncated:Le().optional().default(!1)}),Ev=Ee(["request","response"]),Av=Y({logId:K().int().positive(),part:Ev,text:C(),offset:K().int().nonnegative(),limit:K().int().positive(),totalBytes:K().int().nonnegative(),textBytes:K().int().nonnegative(),nextOffset:K().int().nonnegative().nullable(),hasMore:Le(),contentMode:Ee(["empty","partial","full"])}),Ks=Y({id:K(),timestamp:C(),method:C(),path:C(),model:C().nullable(),sessionId:C().nullable(),rawRequestBody:C().nullable(),responseStatus:K().nullable(),responseText:C().nullable(),inputTokens:K().nullable(),outputTokens:K().nullable(),cacheCreationInputTokens:K().nullable(),cacheReadInputTokens:K().nullable(),elapsedMs:K().nullable(),firstChunkMs:K().nullable().optional(),totalStreamMs:K().nullable().optional(),tokensPerSecond:K().nullable().optional(),streaming:Le(),userAgent:C().nullable(),origin:C().nullable(),rawHeaders:Ke(C(),C()).optional(),headers:Ke(C(),C()).optional(),apiFormat:Ee(["anthropic","openai","unknown"]).default("unknown"),isTest:Le().optional().default(!1),replayOfLogId:K().nullable().optional(),providerName:C().nullable().optional(),clientPort:K().nullable().optional(),clientPid:K().nullable().optional(),clientCwd:C().nullable().optional(),clientProjectFolder:C().nullable().optional(),streamingChunks:Tv.optional(),streamingChunksPath:C().nullable().optional(),rawRequestBodyBytes:K().int().nonnegative().nullable().optional(),responseTextBytes:K().int().nonnegative().nullable().optional(),bodyContentMode:Ee(["full","compact","truncated"]).optional(),warnings:fe(C()).optional(),error:C().nullable().optional()}),Qa=Y({type:C(),ttl:C().optional(),scope:C().optional()}),el=Y({type:Te("text"),text:C(),cache_control:Qa.optional()}),af=Y({type:Te("thinking"),thinking:C(),signature:C().optional()}),Rv=Y({type:Te("think"),thinking:C(),signature:C().optional()}),Iv=Y({type:Te("base64"),media_type:C(),data:C()}),lf=Y({type:Te("image"),source:Iv}),cf=Y({type:Te("tool_use"),id:C(),name:C(),input:Ke(C(),tt)}),zv=Hn("type",[el,lf]),Ov=Y({type:Te("tool_result"),tool_use_id:C().optional(),content:Gt([C(),fe(zv)]),is_error:Le().optional()}),Pv=Hn("type",[el,af,lf,cf,Ov]),Mv=Gt([C(),fe(Pv)]),Lv=Y({role:Ee(["user","assistant"]),content:Mv}),Dv=Y({type:Te("text"),text:C(),cache_control:Qa.optional()}),$v=Y({type:C(),properties:Ke(C(),Ke(C(),tt)).optional(),required:fe(C()).optional(),additionalProperties:Le().optional(),$schema:C().optional()}),Fv=Y({name:C(),description:C().optional(),input_schema:$v.optional(),cache_control:Qa.optional()}),Bv=Hn("type",[Y({type:Te("enabled"),budget_tokens:K()}),Y({type:Te("disabled")}),Y({type:Te("adaptive")})]),uf=Y({model:C(),messages:fe(Lv),system:fe(Dv).optional(),tools:fe(Fv).optional(),max_tokens:K().optional(),temperature:K().optional(),stream:Le().optional(),thinking:Bv.optional(),metadata:Y({user_id:C().optional()}).optional()}),tl=Hn("type",[el,af,Rv,cf]),Uv=Y({input_tokens:K().nullable().optional(),output_tokens:K().nullable().optional(),cache_creation_input_tokens:K().nullable().optional(),cache_read_input_tokens:K().nullable().optional()}).passthrough(),df=Y({id:C(),type:Te("message"),model:C(),role:Te("assistant"),content:fe(tl),stop_reason:C().nullable(),stop_sequence:C().nullable().optional(),usage:Uv}).passthrough(),Wv=Y({type:Te("message_start"),message:Y({id:C(),type:Te("message"),model:C(),role:Te("assistant"),content:fe(tl),stop_reason:ro(),stop_sequence:ro(),usage:Y({input_tokens:K(),cache_creation_input_tokens:K().optional(),cache_read_input_tokens:K().optional()}).passthrough()})}),Hv=Y({type:Te("content_block_start"),index:K(),content_block:tl}),Vv=Hn("type",[Y({type:Te("text_delta"),text:C()}),Y({type:Te("input_json_delta"),partial_json:C()}),Y({type:Te("thinking_delta"),thinking:C()}),Y({type:Te("signature_delta"),signature:C()})]),Zv=Y({type:Te("content_block_delta"),index:K(),delta:Vv}),qv=Y({type:Te("content_block_stop"),index:K()}),Gv=Y({type:Te("message_delta"),delta:Y({stop_reason:C().nullable(),stop_sequence:C().nullable().optional()}),usage:Y({output_tokens:K(),input_tokens:K().optional(),cache_creation_input_tokens:K().optional(),cache_read_input_tokens:K().optional()}).passthrough()}),Kv=Y({type:Te("message_stop")}),Jv=Y({type:Te("ping")}),Yv=Y({type:Te("error"),error:Y({type:C(),message:C()})}),Xv=Hn("type",[Wv,Hv,Zv,qv,Gv,Kv,Jv,Yv]),Qv=Gt([C(),fe(Hn("type",[Y({type:Te("text"),text:C()}),Y({type:Te("image_url"),image_url:Y({url:C(),detail:C().optional()})})]))]),ff=Y({role:Ee(["system","user","assistant","tool"]),content:Qv,name:C().optional(),reasoning_content:C().optional(),thinking:C().optional(),think:C().optional()}),e2=Y({name:C(),arguments:C()}),pf=Y({index:K().optional(),id:C().optional(),type:Te("function").optional(),function:Y({name:C().optional(),arguments:C().optional()})});ff.extend({content:Gt([C(),fe(Y({type:Te("text"),text:C()}))]).optional(),function_call:e2.optional(),tool_calls:fe(pf).optional()});const t2=Y({type:Te("function"),function:Y({name:C(),description:C().optional(),parameters:Ke(C(),tt)})}),hf=Y({model:C(),messages:fe(ff),temperature:K().optional(),max_tokens:K().optional(),stream:Le().optional(),tools:fe(t2).optional(),tool_choice:Gt([Ee(["auto","none","required"]),Y({type:Te("auto")}),Y({type:Te("none")}),Y({type:Te("function"),function:Y({name:C()})})]).optional(),user:C().optional()}),n2=Y({type:C(),name:C().optional(),description:C().optional(),parameters:tt.optional(),function:Y({name:C().optional(),description:C().optional(),parameters:tt.optional()}).optional()}).passthrough(),mf=Y({model:C(),input:On().optional(),instructions:Gt([C(),ro()]).optional(),stream:Le().optional(),tools:fe(n2).optional(),tool_choice:On().optional(),max_output_tokens:K().optional(),temperature:K().optional(),user:C().optional(),metadata:Ke(C(),On()).optional()}).passthrough(),gf=Y({role:Ee(["assistant"]).optional(),content:C().nullable().optional(),reasoning_content:C().nullable().optional(),thinking:C().nullable().optional(),think:C().nullable().optional(),function_call:Y({name:C().optional(),arguments:C().optional()}).nullable().optional(),tool_calls:fe(Y({index:K(),id:C().optional(),type:Te("function").optional(),function:Y({name:C().optional(),arguments:C().optional()})})).nullable().optional()}),s2=Y({index:K(),message:Y({role:Ee(["assistant"]),content:C().nullable(),reasoning_content:C().optional(),thinking:C().optional(),think:C().optional(),function_call:Y({name:C(),arguments:C()}).nullable().optional(),tool_calls:fe(pf).optional()}).optional(),delta:gf.optional(),finish_reason:C().nullable()}),r2=Y({id:C(),object:Te("chat.completion"),created:K(),model:C(),choices:fe(s2),usage:Y({prompt_tokens:K().nullable().optional(),completion_tokens:K().nullable().optional(),total_tokens:K().nullable().optional()}).passthrough(),service_tier:C().nullable().optional(),system_fingerprint:C().nullable().optional()}).passthrough(),o2=Y({id:C(),object:Te("chat.completion.chunk"),created:K(),model:C(),choices:fe(Y({index:K(),delta:gf,finish_reason:C().nullable().optional()})),usage:Y({prompt_tokens:K().nullable().optional(),completion_tokens:K().nullable().optional(),total_tokens:K().nullable().optional()}).passthrough().nullable().optional()}).passthrough(),i2=Y({input_tokens:K().nullable().optional(),output_tokens:K().nullable().optional(),total_tokens:K().nullable().optional(),input_tokens_details:Y({cached_tokens:K().nullable().optional()}).passthrough().nullable().optional(),output_tokens_details:Y({reasoning_tokens:K().nullable().optional()}).passthrough().nullable().optional()}).passthrough(),a2=Y({type:C()}).passthrough(),oo=Y({id:C(),object:Te("response").optional(),created_at:K().optional(),status:C().nullable().optional(),model:C().optional(),output:fe(a2).optional(),output_text:C().optional(),usage:i2.nullable().optional(),error:On().optional()}).passthrough(),l2=Y({type:C()}).passthrough();function xf(e){try{const t=JSON.parse(e),n=r2.safeParse(t);return n.success?n.data:null}catch{return null}}function bf(e){try{const t=JSON.parse(e),n=oo.safeParse(t);return n.success?n.data:null}catch{return null}}const c2=Y({error:C()});async function nl(e,t){const n=await e.json();return t.parse(n)}async function sl(e,t){try{const n=await e.json(),s=c2.safeParse(n);return s.success?s.data.error:t}catch{return t}}async function Pt(e,t,n,s){const o=await fetch(e,n);if(!o.ok){const i=s?.(o)??`Request failed with status ${o.status}`;throw new Error(await sl(o,i))}return nl(o,t)}function u2(e){return e<1e3?`${String(e)}ms`:`${String(Math.round(e/1e3))}s`}class Fo extends Error{constructor(t){super(`Request timed out after ${u2(t)}`),this.name="ApiTimeoutError"}}async function Pn(e,t,n){const s=new AbortController;let o=!1;const i=setTimeout(()=>{o=!0,s.abort()},t),a=n?.signal??void 0,l=()=>s.abort();a!==void 0&&(a.aborted?s.abort():a.addEventListener("abort",l,{once:!0}));try{return await fetch(e,{...n,signal:s.signal})}catch(c){throw o&&c instanceof DOMException&&c.name==="AbortError"?new Fo(t):c}finally{clearTimeout(i),a?.removeEventListener("abort",l)}}async function qe(e,t,n,s,o){const i=await Pn(e,n,s);if(!i.ok){const a=o?.(i)??`Request failed with status ${i.status}`;throw new Error(await sl(i,a))}return nl(i,t)}const vf=Y({input:K().int().nonnegative(),output:K().int().nonnegative(),cacheCreate:K().int().nonnegative(),cacheRead:K().int().nonnegative(),total:K().int().nonnegative()}),d2=Y({id:K().int().positive(),sessionLogNumber:K().int().positive().optional(),timestamp:C(),provider:C().nullable(),model:C().nullable(),apiFormat:Ee(["anthropic","openai","unknown"]),method:C(),path:C(),status:K().nullable(),isStreaming:Le(),hasError:Le(),error:C().nullable(),latencyMs:K().nullable(),firstChunkMs:K().nullable().optional(),totalStreamMs:K().nullable().optional(),tokensPerSecond:K().nullable().optional(),tokens:Y({input:K().nullable(),output:K().nullable(),cacheCreate:K().nullable(),cacheRead:K().nullable()}),sessionId:C().nullable(),userAgent:C().nullable().optional(),clientPid:K().nullable().optional(),clientProjectFolder:C().nullable().optional()}),yf=Y({id:C(),status:Ee(["active","failed","completed","empty"]),logCoverage:Ee(["recent","history"]),source:Ee(["explicit","client-process","client-connection","provider-test"]).nullable(),runtimeMode:Ee(["in-process","worker-thread","child-process"]).nullable(),createdAt:C().nullable(),updatedAt:C().nullable(),requestCount:K().int().nonnegative(),activeRequests:K().int().nonnegative(),completedRequests:K().int().nonnegative(),failedRequests:K().int().nonnegative(),queuedTasks:K().int().nonnegative(),runningTasks:K().int().nonnegative(),lastTaskError:C().nullable(),logCount:K().int().nonnegative(),errorCount:K().int().nonnegative(),models:fe(C()),providers:fe(C()),tokenUsage:vf,lastLogId:K().nullable(),lastModel:C().nullable(),clientUserAgent:C().nullable().optional(),clientPid:K().nullable(),clientProjectFolder:C().nullable(),inspectorPath:C(),inspectorUrl:C(),apiPath:C(),apiUrl:C(),compactLogsPath:C(),compactLogsUrl:C(),latestLogLimit:K().int().positive(),latestLogs:fe(d2)}),or=Ee(["created","running","completed","failed","cancelled"]),rl=Y({jsonPath:C(),markdownPath:C(),htmlPath:C(),exportedAt:C()}),f2=Ee(["run-created","session-started","request","session-finished","evidence-exported"]),p2=Ee(["info","success","warning","error"]),h2=Y({timestamp:C(),kind:f2,severity:p2,title:C(),details:C(),logId:K().int().positive().nullable(),status:K().nullable(),model:C().nullable(),provider:C().nullable(),latencyMs:K().nullable(),isStreaming:Le().nullable()}),m2=Ee(["none","active","provider-timeout","provider-http-error","provider-auth-error","provider-rate-limit","network-or-container","streaming-mismatch","context-pressure","runtime-task-error","model-output-error","unknown-failure","no-session-data"]),wf=Y({outcome:Ee(["success","failure","active","unknown"]),severity:Ee(["none","low","medium","high"]),category:m2,summary:C(),evidenceLogIds:fe(K().int().positive()),hints:fe(C())}),ol=Y({status:Ee(["PASS","FAIL","RUNNING","UNKNOWN"]),summary:C(),markdown:C()}),_f=ol,il=Y({id:C(),sessionId:C(),groupId:C().nullable().default(null),title:C(),task:C().nullable(),project:C().nullable(),agent:C().nullable(),status:or,tags:fe(C()),metadata:Ke(C(),tt),evidence:rl.nullable(),createdAt:C(),updatedAt:C()});Y({runId:C().min(1).optional(),sessionId:C().min(1).optional(),groupId:C().min(1).nullable().optional(),title:C().min(1).optional(),task:C().nullable().optional(),project:C().nullable().optional(),agent:C().nullable().optional(),status:or.optional(),tags:fe(C()).optional(),metadata:Ke(C(),tt).optional()}).optional();Y({sessionId:C().min(1).optional(),groupId:C().min(1).nullable().optional(),title:C().min(1).optional(),task:C().nullable().optional(),project:C().nullable().optional(),agent:C().nullable().optional(),status:or.optional(),tags:fe(C()).optional(),metadata:Ke(C(),tt).optional()});Y({includeHistory:Le().optional(),latestLogLimit:K().int().positive().max(50).optional()}).optional();Y({run:il,evidence:rl,session:yf.nullable(),timeline:fe(h2),classification:wf,jenkinsReport:ol});const g2=Y({run:il,classification:wf,evidence:rl.nullable(),jenkinsReport:ol.nullable(),sessionId:C(),inspectorUrl:C().nullable(),evidenceMarkdownPath:C().nullable(),updatedAt:C()});Y({failures:fe(g2),total:K().int().nonnegative(),limit:K().int().positive()});const al=Ee(["created","running","completed","failed","cancelled"]),ll=Ee(["evaluation","batch","manual"]),cl=Y({jsonPath:C(),markdownPath:C(),htmlPath:C(),exportedAt:C()}),kf=Y({id:C(),groupId:C(),sessionId:C(),runId:C().nullable(),label:C().nullable(),agent:C().nullable(),provider:C().nullable(),model:C().nullable(),status:or.nullable(),metadata:Ke(C(),tt),addedAt:C(),updatedAt:C()}),ul=Y({id:C(),title:C(),kind:ll,task:C().nullable(),project:C().nullable(),status:al,tags:fe(C()),metadata:Ke(C(),tt),evidence:cl.nullable(),members:fe(kf),createdAt:C(),updatedAt:C()});Y({groupId:C().min(1).optional(),title:C().min(1).optional(),kind:ll.optional(),task:C().nullable().optional(),project:C().nullable().optional(),status:al.optional(),tags:fe(C()).optional(),metadata:Ke(C(),tt).optional()}).optional();Y({title:C().min(1).optional(),kind:ll.optional(),task:C().nullable().optional(),project:C().nullable().optional(),status:al.optional(),tags:fe(C()).optional(),metadata:Ke(C(),tt).optional()});Y({memberId:C().min(1).optional(),sessionId:C().min(1),runId:C().min(1).nullable().optional(),label:C().min(1).nullable().optional(),agent:C().min(1).nullable().optional(),provider:C().min(1).nullable().optional(),model:C().min(1).nullable().optional(),status:or.nullable().optional(),metadata:Ke(C(),tt).optional()});Y({includeHistory:Le().optional(),latestLogLimit:K().int().positive().max(50).optional()}).optional();Y({deleteEvidence:Le().optional()});const jf=Y({groupId:C(),deleted:Le(),evidenceDeleted:Le(),evidencePath:C().nullable()}),x2=Y({deleted:K().int().nonnegative(),groups:fe(jf)}),Sf=Y({member:kf,run:il.nullable(),session:yf.nullable()}),Cf=Y({memberCount:K().int().nonnegative(),sessionsWithData:K().int().nonnegative(),missingSessions:K().int().nonnegative(),requestCount:K().int().nonnegative(),errorCount:K().int().nonnegative(),tokenUsage:vf,models:fe(C()),providers:fe(C()),completedMembers:K().int().nonnegative(),failedMembers:K().int().nonnegative(),runningMembers:K().int().nonnegative()}),b2=Y({group:ul,evidence:cl,members:fe(Sf).nullable(),markdown:C(),summary:Cf.nullable(),report:_f.nullable()}),v2=Y({group:ul,evidence:cl,members:fe(Sf),summary:Cf,jenkinsReport:_f}),Nf=Y({groups:fe(ul)}),y2=Y({sessionId:C(),imported:K().int().nonnegative(),skipped:K().int().nonnegative(),warnings:fe(C()),logs:fe(Ks)}),io=10,sa=600,ao=60,ra=600,lo="time",dl="simple",Tf=Ee(["time","full"]),w2=Ee(["simple","full"]),Bo=Y({stripClaudeCodeBillingHeader:Le(),hasSeenOnboarding:Le().default(!1),slowResponseThresholdSeconds:K().int().min(0).max(sa).default(io),providerTestTimeoutSeconds:K().int().min(1).max(ra).default(ao),timeDisplayFormat:Tf.default(lo),captureMode:w2.default(dl)}),as="/api/config";async function _2(e){return Pt(e,Bo,void 0,t=>`Failed to fetch ${e}: ${t.status}`)}async function vr(e){return Pt(as,Bo,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)},t=>`PATCH failed with status ${t.status}`)}function fl(){const e=nn(as,_2,{revalidateOnFocus:!1,revalidateIfStale:!1}),{mutate:t}=jd(),n=e.data?.stripClaudeCodeBillingHeader??!1,s=e.data?.captureMode??dl,o=e.data?.slowResponseThresholdSeconds??io,i=e.data?.providerTestTimeoutSeconds??ao,a=e.data?.timeDisplayFormat??lo,l=h=>({stripClaudeCodeBillingHeader:e.data?.stripClaudeCodeBillingHeader??!1,hasSeenOnboarding:e.data?.hasSeenOnboarding??!1,slowResponseThresholdSeconds:e.data?.slowResponseThresholdSeconds??io,providerTestTimeoutSeconds:e.data?.providerTestTimeoutSeconds??ao,timeDisplayFormat:e.data?.timeDisplayFormat??lo,captureMode:s,...h}),c=async h=>{await t(as,vr({stripClaudeCodeBillingHeader:h}),{optimisticData:l({stripClaudeCodeBillingHeader:h}),rollbackOnError:!0,revalidate:!1})},u=async h=>{await t(as,vr({slowResponseThresholdSeconds:h}),{optimisticData:l({slowResponseThresholdSeconds:h}),rollbackOnError:!0,revalidate:!1})},d=async h=>{await t(as,vr({timeDisplayFormat:h}),{optimisticData:l({timeDisplayFormat:h}),rollbackOnError:!0,revalidate:!1})},f=async h=>{await t(as,vr({providerTestTimeoutSeconds:h}),{optimisticData:l({providerTestTimeoutSeconds:h}),rollbackOnError:!0,revalidate:!1})};return{strip:n,captureMode:s,slowResponseThresholdSeconds:o,providerTestTimeoutSeconds:i,timeDisplayFormat:a,isLoading:e.isLoading,isError:e.error!==void 0,setStrip:c,setSlowResponseThresholdSeconds:u,setProviderTestTimeoutSeconds:f,setTimeDisplayFormat:d}}const Ef=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();const k2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const j2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase());const Ec=e=>{const t=j2(e);return t.charAt(0).toUpperCase()+t.slice(1)};var S2={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 C2=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const N2=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:o="",children:i,iconNode:a,...l},c)=>p.createElement("svg",{ref:c,...S2,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:Ef("lucide",o),...!i&&!C2(l)&&{"aria-hidden":"true"},...l},[...a.map(([u,d])=>p.createElement(u,d)),...Array.isArray(i)?i:[i]]));const de=(e,t)=>{const n=p.forwardRef(({className:s,...o},i)=>p.createElement(N2,{ref:i,iconNode:t,className:Ef(`lucide-${k2(Ec(e))}`,`lucide-${e}`,s),...o}));return n.displayName=Ec(e),n};const T2=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],E2=de("activity",T2);const A2=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],R2=de("arrow-down-right",A2);const I2=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],z2=de("arrow-down",I2);const O2=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],P2=de("arrow-left",O2);const M2=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],L2=de("arrow-up-right",M2);const D2=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],$2=de("arrow-up",D2);const F2=[["path",{d:"M4.5 3h15",key:"c7n0jr"}],["path",{d:"M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3",key:"m1uhx7"}],["path",{d:"M6 14h12",key:"4cwo0f"}]],pl=de("beaker",F2);const B2=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],U2=de("bell",B2);const W2=[["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"}]],H2=de("blocks",W2);const V2=[["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"}]],Af=de("brain",V2);const Z2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Je=de("check",Z2);const q2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ot=de("chevron-down",q2);const G2=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],K2=de("chevron-left",G2);const J2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],St=de("chevron-right",J2);const Y2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],hl=de("chevron-up",Y2);const X2=[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]],Q2=de("chevrons-down",X2);const ey=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],ty=de("chevrons-left",ey);const ny=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],sy=de("chevrons-right",ny);const ry=[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]],oy=de("chevrons-up",ry);const iy=[["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"}]],vs=de("circle-alert",iy);const ay=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ml=de("circle-check-big",ay);const ly=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],oa=de("circle-check",ly);const cy=[["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"}]],uy=de("circle-question-mark",cy);const dy=[["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"}]],Rf=de("circle-x",dy);const fy=[["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z",key:"1tn4o7"}],["path",{d:"m6.2 5.3 3.1 3.9",key:"iuk76l"}],["path",{d:"m12.4 3.4 3.1 4",key:"6hsd6n"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z",key:"ltgou9"}]],py=de("clapperboard",fy);const hy=[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],my=de("clock-3",hy);const gy=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],en=de("clock",gy);const xy=[["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"}]],by=de("cloud-upload",xy);const vy=[["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"}]],yy=de("code-xml",vy);const wy=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],_y=de("columns-2",wy);const ky=[["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"}]],$t=de("copy",ky);const jy=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Sy=de("cpu",jy);const Cy=[["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"}]],ir=de("download",Cy);const Ny=[["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"}]],Ty=de("ellipsis",Ny);const Ey=[["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"}]],gl=de("external-link",Ey);const Ay=[["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"}]],xl=de("eye-off",Ay);const Ry=[["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"}]],bl=de("eye",Ry);const Iy=[["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 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],zy=de("file-braces",Iy);const Oy=[["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"}]],Py=de("file-diff",Oy);const My=[["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"}]],Ly=de("file-search",My);const Dy=[["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"}]],$y=de("file-terminal",Dy);const Fy=[["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"}]],By=de("file-text",Fy);const Uy=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],Wy=de("flag",Uy);const Hy=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],Vy=de("flask-conical",Hy);const Zy=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],qy=de("folder-open",Zy);const Gy=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],vl=de("gauge",Gy);const Ky=[["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"}]],Jy=de("git-compare-arrows",Ky);const Yy=[["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"}]],If=de("globe",Yy);const Xy=[["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"}]],Qy=de("history",Xy);const ew=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],tw=de("info",ew);const nw=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Ac=de("layers",nw);const sw=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Qe=de("loader-circle",sw);const rw=[["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"}]],ow=de("lock",rw);const iw=[["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"}]],Uo=de("message-square",iw);const aw=[["path",{d:"M5 12h14",key:"1ays0h"}]],zf=de("minus",aw);const lw=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],cw=de("monitor",lw);const uw=[["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"}]],dw=de("mouse-pointer-click",uw);const fw=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],pw=de("network",fw);const hw=[["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"}]],mw=de("octagon-alert",hw);const gw=[["path",{d:"m16 16 2 2 4-4",key:"gfu2re"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]],xw=de("package-check",gw);const bw=[["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"}]],Of=de("pencil",bw);const vw=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ia=de("plus",vw);const yw=[["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"}]],Rc=de("radio",yw);const ww=[["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"}]],tn=de("refresh-cw",ww);const _w=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],kw=de("rocket",_w);const jw=[["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"}]],Sw=de("rotate-ccw",jw);const Cw=[["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"}]],co=de("rotate-cw",Cw);const Nw=[["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"}]],Tw=de("rows-3",Nw);const Ew=[["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"}]],Aw=de("save",Ew);const Rw=[["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"}]],Iw=de("scan",Rw);const zw=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Pf=de("search",zw);const Ow=[["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=de("server",Ow);const Mw=[["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"}]],Lw=de("settings",Mw);const Dw=[["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:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],$w=de("shield-alert",Dw);const Fw=[["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"}]],Ic=de("shield-check",Fw);const Bw=[["path",{d:"M7 18v-6a5 5 0 1 1 10 0v6",key:"pcx96s"}],["path",{d:"M5 21a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2z",key:"1b4s83"}],["path",{d:"M21 12h1",key:"jtio3y"}],["path",{d:"M18.5 4.5 18 5",key:"g5sp9y"}],["path",{d:"M2 12h1",key:"1uaihz"}],["path",{d:"M12 2v1",key:"11qlp1"}],["path",{d:"m4.929 4.929.707.707",key:"1i51kw"}],["path",{d:"M12 12v6",key:"3ahymv"}]],aa=de("siren",Bw);const Uw=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Ww=de("sparkles",Uw);const Hw=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Cs=de("terminal",Hw);const Vw=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],Zw=de("timer",Vw);const qw=[["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"}]],Wt=de("trash-2",qw);const Gw=[["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"}]],xn=de("triangle-alert",Gw);const Kw=[["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"}]],Mf=de("upload",Kw);const Jw=[["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"}]],Yw=de("wifi-off",Jw);const Xw=[["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=de("wifi",Xw);const e_=[["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"}]],ar=de("wrench",e_);const t_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],lr=de("x",t_);const n_=[["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"}]],Js=de("zap",n_),la="/api/config";async function s_(e){return Pt(e,Bo,void 0,t=>`Failed to fetch ${e}: ${t.status}`)}async function r_(e){return Pt(la,Bo,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)},t=>`PATCH failed with status ${t.status}`)}function o_(){const e=nn(la,s_,{revalidateOnFocus:!1,revalidateIfStale:!1}),{mutate:t}=jd(),n=e.data?.hasSeenOnboarding??!1,s=e.data?.captureMode??dl,o=async()=>{await t(la,r_({hasSeenOnboarding:!0}),{optimisticData:{stripClaudeCodeBillingHeader:e.data?.stripClaudeCodeBillingHeader??!1,hasSeenOnboarding:!0,slowResponseThresholdSeconds:e.data?.slowResponseThresholdSeconds??io,providerTestTimeoutSeconds:e.data?.providerTestTimeoutSeconds??ao,timeDisplayFormat:e.data?.timeDisplayFormat??lo,captureMode:s},rollbackOnError:!0,revalidate:!1})};return{hasSeenOnboarding:n,captureMode:s,isLoading:e.isLoading,markSeen:o}}function i_(){const{hasSeenOnboarding:e,isLoading:t,markSeen:n}=o_(),[s,o]=p.useState(!1);if(t||e)return null;const i=s?"grid":"hidden sm:grid";return r.jsx("div",{role:"note","aria-label":"Onboarding tip",className:"mx-4 mt-2 mb-1 rounded-md border border-amber-500/30 bg-[#130d04] px-3 py-2 text-sm shadow-[0_12px_40px_rgba(0,0,0,0.16)]",children:r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(tw,{className:"mt-0.5 size-4 shrink-0 text-amber-300","aria-hidden":"true"}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[r.jsx("span",{className:"font-medium text-amber-200",children:"Inspector ready"}),r.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"Request, response, tool, timing, token, replay, and memory signals are active."})]}),r.jsx("div",{className:"mt-1 text-xs leading-relaxed text-muted-foreground sm:hidden",children:"Core capture is active."}),r.jsxs("div",{className:`${i} mt-2 gap-x-4 gap-y-1 text-xs leading-relaxed text-muted-foreground sm:grid-cols-2`,children:[r.jsxs("div",{children:[r.jsx("strong",{children:"Evidence"}),": logs, sessions, groups, and MCP exports are available."]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Network"}),": replace ",r.jsx("code",{children:"localhost"})," if containers differ."]})]})]}),r.jsx("button",{type:"button",onClick:()=>o(a=>!a),className:"inline-flex h-8 shrink-0 items-center gap-1 rounded-md border border-amber-500/30 px-2 text-xs text-amber-200 transition-colors hover:bg-amber-500/10 sm:hidden","aria-expanded":s,"aria-label":s?"Hide onboarding details":"Show onboarding details",children:r.jsx(ot,{className:`size-3.5 transition-transform ${s?"rotate-180":""}`})}),r.jsxs("button",{type:"button",onClick:()=>{n()},className:"hidden h-8 shrink-0 items-center gap-1.5 rounded-md border border-amber-500/40 px-3 text-xs text-amber-200 transition-colors hover:bg-amber-500/10 sm:inline-flex","aria-label":"Dismiss onboarding tip",children:[r.jsx(Je,{className:"size-3.5"}),"Got it"]}),r.jsx("button",{type:"button",onClick:()=>{n()},className:"-m-1 shrink-0 p-1 text-muted-foreground transition-colors hover:text-foreground","aria-label":"Dismiss",children:r.jsx(lr,{className:"size-3.5"})})]})})}function yr(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 bi={exports:{}};var zc;function a_(){return zc||(zc=1,(function(e,t){(function(n){e.exports=n()})(function(){return(function n(s,o,i){function a(u,d){if(!o[u]){if(!s[u]){var f=typeof yr=="function"&&yr;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 m=o[u]={exports:{}};s[u][0].call(m.exports,function(v){var g=s[u][1][v];return a(g||v)},m,m.exports,n,s,o,i)}return o[u].exports}for(var l=typeof yr=="function"&&yr,c=0;c<i.length;c++)a(i[c]);return a})({1:[function(n,s,o){var i=n("./utils"),a=n("./support"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.encode=function(c){for(var u,d,f,h,m,v,g,x=[],b=0,y=c.length,k=y,j=i.getTypeOf(c)!=="string";b<c.length;)k=y-b,f=j?(u=c[b++],d=b<y?c[b++]:0,b<y?c[b++]:0):(u=c.charCodeAt(b++),d=b<y?c.charCodeAt(b++):0,b<y?c.charCodeAt(b++):0),h=u>>2,m=(3&u)<<4|d>>4,v=1<k?(15&d)<<2|f>>6:64,g=2<k?63&f:64,x.push(l.charAt(h)+l.charAt(m)+l.charAt(v)+l.charAt(g));return x.join("")},o.decode=function(c){var u,d,f,h,m,v,g=0,x=0,b="data:";if(c.substr(0,b.length)===b)throw new Error("Invalid base64 input, it looks like a data url.");var y,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(y=a.uint8array?new Uint8Array(0|k):new Array(0|k);g<c.length;)u=l.indexOf(c.charAt(g++))<<2|(h=l.indexOf(c.charAt(g++)))>>4,d=(15&h)<<4|(m=l.indexOf(c.charAt(g++)))>>2,f=(3&m)<<6|(v=l.indexOf(c.charAt(g++))),y[x++]=u,m!==64&&(y[x++]=d),v!==64&&(y[x++]=f);return y}},{"./support":30,"./utils":32}],2:[function(n,s,o){var i=n("./external"),a=n("./stream/DataWorker"),l=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function u(d,f,h,m,v){this.compressedSize=d,this.uncompressedSize=f,this.crc32=h,this.compression=m,this.compressedContent=v}u.prototype={getContentWorker:function(){var d=new a(i.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 a(i.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)},s.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,s,o){var i=n("./stream/GenericWorker");o.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},o.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,s,o){var i=n("./utils"),a=(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})();s.exports=function(l,c){return l!==void 0&&l.length?i.getTypeOf(l)!=="string"?(function(u,d,f,h){var m=a,v=h+f;u^=-1;for(var g=h;g<v;g++)u=u>>>8^m[255&(u^d[g])];return-1^u})(0|c,l,l.length,0):(function(u,d,f,h){var m=a,v=h+f;u^=-1;for(var g=h;g<v;g++)u=u>>>8^m[255&(u^d.charCodeAt(g))];return-1^u})(0|c,l,l.length,0):0}},{"./utils":32}],5:[function(n,s,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,s,o){var i=null;i=typeof Promise<"u"?Promise:n("lie"),s.exports={Promise:i}},{lie:37}],7:[function(n,s,o){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=n("pako"),l=n("./utils"),c=n("./stream/GenericWorker"),u=i?"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 a[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,s,o){function i(m,v){var g,x="";for(g=0;g<v;g++)x+=String.fromCharCode(255&m),m>>>=8;return x}function a(m,v,g,x,b,y){var k,j,S=m.file,T=m.compression,N=y!==u.utf8encode,I=l.transformTo("string",y(S.name)),A=l.transformTo("string",u.utf8encode(S.name)),O=S.comment,D=l.transformTo("string",y(O)),E=l.transformTo("string",u.utf8encode(O)),L=A.length!==S.name.length,_=E.length!==O.length,F="",ee="",$="",H=S.dir,q=S.date,ue={crc32:0,compressedSize:0,uncompressedSize:0};v&&!g||(ue.crc32=m.crc32,ue.compressedSize=m.compressedSize,ue.uncompressedSize=m.uncompressedSize);var V=0;v&&(V|=8),N||!L&&!_||(V|=2048);var W=0,ce=0;H&&(W|=16),b==="UNIX"?(ce=798,W|=(function(Q,Ce){var oe=Q;return Q||(oe=Ce?16893:33204),(65535&oe)<<16})(S.unixPermissions,H)):(ce=20,W|=(function(Q){return 63&(Q||0)})(S.dosPermissions)),k=q.getUTCHours(),k<<=6,k|=q.getUTCMinutes(),k<<=5,k|=q.getUTCSeconds()/2,j=q.getUTCFullYear()-1980,j<<=4,j|=q.getUTCMonth()+1,j<<=5,j|=q.getUTCDate(),L&&(ee=i(1,1)+i(d(I),4)+A,F+="up"+i(ee.length,2)+ee),_&&($=i(1,1)+i(d(D),4)+E,F+="uc"+i($.length,2)+$);var U="";return U+=`
|
|
41
|
-
\0`,U+=i(V,2),U+=T.magic,U+=i(k,2),U+=i(j,2),U+=i(ue.crc32,4),U+=i(ue.compressedSize,4),U+=i(ue.uncompressedSize,4),U+=i(I.length,2),U+=i(F.length,2),{fileRecord:f.LOCAL_FILE_HEADER+U+I+F,dirRecord:f.CENTRAL_FILE_HEADER+i(ce,2)+U+i(D.length,2)+"\0\0\0\0"+i(W,4)+i(x,4)+I+F+D}}var l=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),f=n("../signature");function h(m,v,g,x){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=g,this.encodeFileName=x,this.streamFiles=m,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(m){var v=m.meta.percent||0,g=this.entriesCount,x=this._sources.length;this.accumulate?this.contentBuffer.push(m):(this.bytesWritten+=m.data.length,c.prototype.push.call(this,{data:m.data,meta:{currentFile:this.currentFile,percent:g?(v+100*(g-x-1))/g:100}}))},h.prototype.openedSource=function(m){this.currentSourceOffset=this.bytesWritten,this.currentFile=m.file.name;var v=this.streamFiles&&!m.file.dir;if(v){var g=a(m,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(m){this.accumulate=!1;var v=this.streamFiles&&!m.file.dir,g=a(m,v,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),v)this.push({data:(function(x){return f.DATA_DESCRIPTOR+i(x.crc32,4)+i(x.compressedSize,4)+i(x.uncompressedSize,4)})(m),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var m=this.bytesWritten,v=0;v<this.dirRecords.length;v++)this.push({data:this.dirRecords[v],meta:{percent:100}});var g=this.bytesWritten-m,x=(function(b,y,k,j,S){var T=l.transformTo("string",S(j));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(b,2)+i(b,2)+i(y,4)+i(k,4)+i(T.length,2)+T})(this.dirRecords.length,g,m,this.zipComment,this.encodeFileName);this.push({data:x,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(m){this._sources.push(m);var v=this;return m.on("data",function(g){v.processChunk(g)}),m.on("end",function(){v.closedSource(v.previous.streamInfo),v._sources.length?v.prepareNextSource():v.end()}),m.on("error",function(g){v.error(g)}),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(m){var v=this._sources;if(!c.prototype.error.call(this,m))return!1;for(var g=0;g<v.length;g++)try{v[g].error(m)}catch{}return!0},h.prototype.lock=function(){c.prototype.lock.call(this);for(var m=this._sources,v=0;v<m.length;v++)m[v].lock()},s.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,s,o){var i=n("../compressions"),a=n("./ZipFileWorker");o.generateWorker=function(l,c,u){var d=new a(c.streamFiles,u,c.platform,c.encodeFileName),f=0;try{l.forEach(function(h,m){f++;var v=(function(y,k){var j=y||k,S=i[j];if(!S)throw new Error(j+" is not a valid compression method !");return S})(m.options.compression,c.compression),g=m.options.compressionOptions||c.compressionOptions||{},x=m.dir,b=m.date;m._compressWorker(v,g).withStreamInfo("file",{name:h,dir:x,date:b,comment:m.comment||"",unixPermissions:m.unixPermissions,dosPermissions:m.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(h){d.error(h)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,s,o){function i(){if(!(this instanceof i))return new i;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 a=new i;for(var l in this)typeof this[l]!="function"&&(a[l]=this[l]);return a}}(i.prototype=n("./object")).loadAsync=n("./load"),i.support=n("./support"),i.defaults=n("./defaults"),i.version="3.10.1",i.loadAsync=function(a,l){return new i().loadAsync(a,l)},i.external=n("./external"),s.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,s,o){var i=n("./utils"),a=n("./external"),l=n("./utf8"),c=n("./zipEntries"),u=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function f(h){return new a.Promise(function(m,v){var g=h.decompressed.getContentWorker().pipe(new u);g.on("error",function(x){v(x)}).on("end",function(){g.streamInfo.crc32!==h.decompressed.crc32?v(new Error("Corrupted zip : CRC32 mismatch")):m()}).resume()})}s.exports=function(h,m){var v=this;return m=i.extend(m||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:l.utf8decode}),d.isNode&&d.isStream(h)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",h,!0,m.optimizedBinaryString,m.base64).then(function(g){var x=new c(m);return x.load(g),x}).then(function(g){var x=[a.Promise.resolve(g)],b=g.files;if(m.checkCRC32)for(var y=0;y<b.length;y++)x.push(f(b[y]));return a.Promise.all(x)}).then(function(g){for(var x=g.shift(),b=x.files,y=0;y<b.length;y++){var k=b[y],j=k.fileNameStr,S=i.resolve(k.fileNameStr);v.file(S,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:m.createFolders}),k.dir||(v.file(S).unsafeOriginalName=j)}return x.zipComment.length&&(v.comment=x.zipComment),v})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,s,o){var i=n("../utils"),a=n("../stream/GenericWorker");function l(c,u){a.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}i.inherits(l,a),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!!a.prototype.pause.call(this)&&(this._stream.pause(),!0)},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},s.exports=l},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,s,o){var i=n("readable-stream").Readable;function a(l,c,u){i.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(a,i),a.prototype._read=function(){this._helper.resume()},s.exports=a},{"../utils":32,"readable-stream":16}],14:[function(n,s,o){s.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,a){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,a);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,a)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var a=new Buffer(i);return a.fill(0),a},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(n,s,o){function i(S,T,N){var I,A=l.getTypeOf(T),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&&(S=b(S)),O.createFolders&&(I=x(S))&&y.call(this,I,!0);var D=A==="string"&&O.binary===!1&&O.base64===!1;N&&N.binary!==void 0||(O.binary=!D),(T instanceof f&&T.uncompressedSize===0||O.dir||!T||T.length===0)&&(O.base64=!1,O.binary=!0,T="",O.compression="STORE",A="string");var E=null;E=T instanceof f||T instanceof c?T:v.isNode&&v.isStream(T)?new g(S,T):l.prepareContent(S,T,O.binary,O.optimizedBinaryString,O.base64);var L=new h(S,E,O);this.files[S]=L}var a=n("./utf8"),l=n("./utils"),c=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),d=n("./defaults"),f=n("./compressedObject"),h=n("./zipObject"),m=n("./generate"),v=n("./nodejsUtils"),g=n("./nodejs/NodejsStreamInputAdapter"),x=function(S){S.slice(-1)==="/"&&(S=S.substring(0,S.length-1));var T=S.lastIndexOf("/");return 0<T?S.substring(0,T):""},b=function(S){return S.slice(-1)!=="/"&&(S+="/"),S},y=function(S,T){return T=T!==void 0?T:d.createFolders,S=b(S),this.files[S]||i.call(this,S,null,{dir:!0,createFolders:T}),this.files[S]};function k(S){return Object.prototype.toString.call(S)==="[object RegExp]"}var j={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(S){var T,N,I;for(T in this.files)I=this.files[T],(N=T.slice(this.root.length,T.length))&&T.slice(0,this.root.length)===this.root&&S(N,I)},filter:function(S){var T=[];return this.forEach(function(N,I){S(N,I)&&T.push(I)}),T},file:function(S,T,N){if(arguments.length!==1)return S=this.root+S,i.call(this,S,T,N),this;if(k(S)){var I=S;return this.filter(function(O,D){return!D.dir&&I.test(O)})}var A=this.files[this.root+S];return A&&!A.dir?A:null},folder:function(S){if(!S)return this;if(k(S))return this.filter(function(A,O){return O.dir&&S.test(A)});var T=this.root+S,N=y.call(this,T),I=this.clone();return I.root=N.name,I},remove:function(S){S=this.root+S;var T=this.files[S];if(T||(S.slice(-1)!=="/"&&(S+="/"),T=this.files[S]),T&&!T.dir)delete this.files[S];else for(var N=this.filter(function(A,O){return O.name.slice(0,S.length)===S}),I=0;I<N.length;I++)delete this.files[N[I].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(S){var T,N={};try{if((N=l.extend(S||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:a.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 I=N.comment||this.comment||"";T=m.generateWorker(this,N,I)}catch(A){(T=new c("error")).error(A)}return new u(T,N.type||"string",N.mimeType)},generateAsync:function(S,T){return this.generateInternalStream(S).accumulate(T)},generateNodeStream:function(S,T){return(S=S||{}).type||(S.type="nodebuffer"),this.generateInternalStream(S).toNodejsStream(T)}};s.exports=j},{"./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,s,o){s.exports=n("stream")},{stream:void 0}],17:[function(n,s,o){var i=n("./DataReader");function a(l){i.call(this,l);for(var c=0;c<this.data.length;c++)l[c]=255&l[c]}n("../utils").inherits(a,i),a.prototype.byteAt=function(l){return this.data[this.zero+l]},a.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},a.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]},a.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},s.exports=a},{"../utils":32,"./DataReader":18}],18:[function(n,s,o){var i=n("../utils");function a(l){this.data=l,this.length=l.length,this.index=0,this.zero=0}a.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 i.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))}},s.exports=a},{"../utils":32}],19:[function(n,s,o){var i=n("./Uint8ArrayReader");function a(l){i.call(this,l)}n("../utils").inherits(a,i),a.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},s.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,s,o){var i=n("./DataReader");function a(l){i.call(this,l)}n("../utils").inherits(a,i),a.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},a.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},a.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},a.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},s.exports=a},{"../utils":32,"./DataReader":18}],21:[function(n,s,o){var i=n("./ArrayReader");function a(l){i.call(this,l)}n("../utils").inherits(a,i),a.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},s.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(n,s,o){var i=n("../utils"),a=n("../support"),l=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");s.exports=function(f){var h=i.getTypeOf(f);return i.checkSupport(h),h!=="string"||a.uint8array?h==="nodebuffer"?new u(f):a.uint8array?new d(i.transformTo("uint8array",f)):new l(i.transformTo("array",f)):new c(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,s,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,s,o){var i=n("./GenericWorker"),a=n("../utils");function l(c){i.call(this,"ConvertWorker to "+c),this.destType=c}a.inherits(l,i),l.prototype.processChunk=function(c){this.push({data:a.transformTo(this.destType,c.data),meta:c.meta})},s.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(n,s,o){var i=n("./GenericWorker"),a=n("../crc32");function l(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(l,i),l.prototype.processChunk=function(c){this.streamInfo.crc32=a(c.data,this.streamInfo.crc32||0),this.push(c)},s.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,s,o){var i=n("../utils"),a=n("./GenericWorker");function l(c){a.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}i.inherits(l,a),l.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}a.prototype.processChunk.call(this,c)},s.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(n,s,o){var i=n("../utils"),a=n("./GenericWorker");function l(c){a.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=i.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}i.inherits(l,a),l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.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}})},s.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(n,s,o){function i(a){this.name=a||"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}i.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,l){return this._listeners[a].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,l){if(this._listeners[a])for(var c=0;c<this._listeners[a].length;c++)this._listeners[a][c].call(this,l)},pipe:function(a){return a.registerPrevious(this)},registerPrevious:function(a){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=a.streamInfo,this.mergeStreamInfo(),this.previous=a;var l=this;return a.on("data",function(c){l.processChunk(c)}),a.on("end",function(){l.end()}),a.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 a=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),a=!0),this.previous&&this.previous.resume(),!a},flush:function(){},processChunk:function(a){this.push(a)},withStreamInfo:function(a,l){return this.extraStreamInfo[a]=l,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var a in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,a)&&(this.streamInfo[a]=this.extraStreamInfo[a])},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 a="Worker "+this.name;return this.previous?this.previous+" -> "+a:a}},s.exports=i},{}],29:[function(n,s,o){var i=n("../utils"),a=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(v,g){return new d.Promise(function(x,b){var y=[],k=v._internalType,j=v._outputType,S=v._mimeType;v.on("data",function(T,N){y.push(T),g&&g(N)}).on("error",function(T){y=[],b(T)}).on("end",function(){try{var T=(function(N,I,A){switch(N){case"blob":return i.newBlob(i.transformTo("arraybuffer",I),A);case"base64":return c.encode(I);default:return i.transformTo(N,I)}})(j,(function(N,I){var A,O=0,D=null,E=0;for(A=0;A<I.length;A++)E+=I[A].length;switch(N){case"string":return I.join("");case"array":return Array.prototype.concat.apply([],I);case"uint8array":for(D=new Uint8Array(E),A=0;A<I.length;A++)D.set(I[A],O),O+=I[A].length;return D;case"nodebuffer":return Buffer.concat(I);default:throw new Error("concat : unsupported type '"+N+"'")}})(k,y),S);x(T)}catch(N){b(N)}y=[]}).resume()})}function m(v,g,x){var b=g;switch(g){case"blob":case"arraybuffer":b="uint8array";break;case"base64":b="string"}try{this._internalType=b,this._outputType=g,this._mimeType=x,i.checkSupport(b),this._worker=v.pipe(new a(b)),v.lock()}catch(y){this._worker=new l("error"),this._worker.error(y)}}m.prototype={accumulate:function(v){return h(this,v)},on:function(v,g){var x=this;return v==="data"?this._worker.on(v,function(b){g.call(x,b.data,b.meta)}):this._worker.on(v,function(){i.delay(g,arguments,x)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(v){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},v)}},s.exports=m},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,s,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 i=new ArrayBuffer(0);try{o.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(i),o.blob=a.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,s,o){for(var i=n("./utils"),a=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(m){return a.nodebuffer?l.newBufferFrom(m,"utf-8"):(function(v){var g,x,b,y,k,j=v.length,S=0;for(y=0;y<j;y++)(64512&(x=v.charCodeAt(y)))==55296&&y+1<j&&(64512&(b=v.charCodeAt(y+1)))==56320&&(x=65536+(x-55296<<10)+(b-56320),y++),S+=x<128?1:x<2048?2:x<65536?3:4;for(g=a.uint8array?new Uint8Array(S):new Array(S),y=k=0;k<S;y++)(64512&(x=v.charCodeAt(y)))==55296&&y+1<j&&(64512&(b=v.charCodeAt(y+1)))==56320&&(x=65536+(x-55296<<10)+(b-56320),y++),x<128?g[k++]=x:(x<2048?g[k++]=192|x>>>6:(x<65536?g[k++]=224|x>>>12:(g[k++]=240|x>>>18,g[k++]=128|x>>>12&63),g[k++]=128|x>>>6&63),g[k++]=128|63&x);return g})(m)},o.utf8decode=function(m){return a.nodebuffer?i.transformTo("nodebuffer",m).toString("utf-8"):(function(v){var g,x,b,y,k=v.length,j=new Array(2*k);for(g=x=0;g<k;)if((b=v[g++])<128)j[x++]=b;else if(4<(y=u[b]))j[x++]=65533,g+=y-1;else{for(b&=y===2?31:y===3?15:7;1<y&&g<k;)b=b<<6|63&v[g++],y--;1<y?j[x++]=65533:b<65536?j[x++]=b:(b-=65536,j[x++]=55296|b>>10&1023,j[x++]=56320|1023&b)}return j.length!==x&&(j.subarray?j=j.subarray(0,x):j.length=x),i.applyFromCharCode(j)})(m=i.transformTo(a.uint8array?"uint8array":"array",m))},i.inherits(f,c),f.prototype.processChunk=function(m){var v=i.transformTo(a.uint8array?"uint8array":"array",m.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var g=v;(v=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),v.set(g,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var x=(function(y,k){var j;for((k=k||y.length)>y.length&&(k=y.length),j=k-1;0<=j&&(192&y[j])==128;)j--;return j<0||j===0?k:j+u[y[j]]>k?j:k})(v),b=v;x!==v.length&&(a.uint8array?(b=v.subarray(0,x),this.leftOver=v.subarray(x,v.length)):(b=v.slice(0,x),this.leftOver=v.slice(x,v.length))),this.push({data:o.utf8decode(b),meta:m.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=f,i.inherits(h,c),h.prototype.processChunk=function(m){this.push({data:o.utf8encode(m.data),meta:m.meta})},o.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,s,o){var i=n("./support"),a=n("./base64"),l=n("./nodejsUtils"),c=n("./external");function u(g){return g}function d(g,x){for(var b=0;b<g.length;++b)x[b]=255&g.charCodeAt(b);return x}n("setimmediate"),o.newBlob=function(g,x){o.checkSupport("blob");try{return new Blob([g],{type:x})}catch{try{var b=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return b.append(g),b.getBlob(x)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(g,x,b){var y=[],k=0,j=g.length;if(j<=b)return String.fromCharCode.apply(null,g);for(;k<j;)x==="array"||x==="nodebuffer"?y.push(String.fromCharCode.apply(null,g.slice(k,Math.min(k+b,j)))):y.push(String.fromCharCode.apply(null,g.subarray(k,Math.min(k+b,j)))),k+=b;return y.join("")},stringifyByChar:function(g){for(var x="",b=0;b<g.length;b++)x+=String.fromCharCode(g[b]);return x},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,l.allocBuffer(1)).length===1}catch{return!1}})()}};function h(g){var x=65536,b=o.getTypeOf(g),y=!0;if(b==="uint8array"?y=f.applyCanBeUsed.uint8array:b==="nodebuffer"&&(y=f.applyCanBeUsed.nodebuffer),y)for(;1<x;)try{return f.stringifyByChunk(g,b,x)}catch{x=Math.floor(x/2)}return f.stringifyByChar(g)}function m(g,x){for(var b=0;b<g.length;b++)x[b]=g[b];return x}o.applyFromCharCode=h;var v={};v.string={string:u,array:function(g){return d(g,new Array(g.length))},arraybuffer:function(g){return v.string.uint8array(g).buffer},uint8array:function(g){return d(g,new Uint8Array(g.length))},nodebuffer:function(g){return d(g,l.allocBuffer(g.length))}},v.array={string:h,array:u,arraybuffer:function(g){return new Uint8Array(g).buffer},uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return l.newBufferFrom(g)}},v.arraybuffer={string:function(g){return h(new Uint8Array(g))},array:function(g){return m(new Uint8Array(g),new Array(g.byteLength))},arraybuffer:u,uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return l.newBufferFrom(new Uint8Array(g))}},v.uint8array={string:h,array:function(g){return m(g,new Array(g.length))},arraybuffer:function(g){return g.buffer},uint8array:u,nodebuffer:function(g){return l.newBufferFrom(g)}},v.nodebuffer={string:h,array:function(g){return m(g,new Array(g.length))},arraybuffer:function(g){return v.nodebuffer.uint8array(g).buffer},uint8array:function(g){return m(g,new Uint8Array(g.length))},nodebuffer:u},o.transformTo=function(g,x){if(x=x||"",!g)return x;o.checkSupport(g);var b=o.getTypeOf(x);return v[b][g](x)},o.resolve=function(g){for(var x=g.split("/"),b=[],y=0;y<x.length;y++){var k=x[y];k==="."||k===""&&y!==0&&y!==x.length-1||(k===".."?b.pop():b.push(k))}return b.join("/")},o.getTypeOf=function(g){return typeof g=="string"?"string":Object.prototype.toString.call(g)==="[object Array]"?"array":i.nodebuffer&&l.isBuffer(g)?"nodebuffer":i.uint8array&&g instanceof Uint8Array?"uint8array":i.arraybuffer&&g instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(g){if(!i[g.toLowerCase()])throw new Error(g+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(g){var x,b,y="";for(b=0;b<(g||"").length;b++)y+="\\x"+((x=g.charCodeAt(b))<16?"0":"")+x.toString(16).toUpperCase();return y},o.delay=function(g,x,b){setImmediate(function(){g.apply(b||null,x||[])})},o.inherits=function(g,x){function b(){}b.prototype=x.prototype,g.prototype=new b},o.extend=function(){var g,x,b={};for(g=0;g<arguments.length;g++)for(x in arguments[g])Object.prototype.hasOwnProperty.call(arguments[g],x)&&b[x]===void 0&&(b[x]=arguments[g][x]);return b},o.prepareContent=function(g,x,b,y,k){return c.Promise.resolve(x).then(function(j){return i.blob&&(j instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(j))!==-1)&&typeof FileReader<"u"?new c.Promise(function(S,T){var N=new FileReader;N.onload=function(I){S(I.target.result)},N.onerror=function(I){T(I.target.error)},N.readAsArrayBuffer(j)}):j}).then(function(j){var S=o.getTypeOf(j);return S?(S==="arraybuffer"?j=o.transformTo("uint8array",j):S==="string"&&(k?j=a.decode(j):b&&y!==!0&&(j=(function(T){return d(T,i.uint8array?new Uint8Array(T.length):new Array(T.length))})(j))),j):c.Promise.reject(new Error("Can't read the data of '"+g+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,s,o){var i=n("./reader/readerFor"),a=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 ("+a.pretty(h)+", expected "+a.pretty(f)+")")}},isSignature:function(f,h){var m=this.reader.index;this.reader.setIndex(f);var v=this.reader.readString(4)===h;return this.reader.setIndex(m),v},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",m=a.transformTo(h,f);this.zipComment=this.loadOptions.decodeFileName(m)},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,m,v=this.zip64EndOfCentralSize-44;0<v;)f=this.reader.readInt(2),h=this.reader.readInt(4),m=this.reader.readData(h),this.zip64ExtensibleData[f]={id:f,length:h,value:m}},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===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.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 m=this.centralDirOffset+this.centralDirSize;this.zip64&&(m+=20,m+=12+this.zip64EndOfCentralSize);var v=h-m;if(0<v)this.isSignature(h,l.CENTRAL_FILE_HEADER)||(this.reader.zero=v);else if(v<0)throw new Error("Corrupted zip: missing "+Math.abs(v)+" bytes.")},prepareReader:function(f){this.reader=i(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},s.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,s,o){var i=n("./reader/readerFor"),a=n("./utils"),l=n("./compressedObject"),c=n("./crc32"),u=n("./utf8"),d=n("./compressions"),f=n("./support");function h(m,v){this.options=m,this.loadOptions=v}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(m){var v,g;if(m.skip(22),this.fileNameLength=m.readInt(2),g=m.readInt(2),this.fileName=m.readData(this.fileNameLength),m.skip(g),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((v=(function(x){for(var b in d)if(Object.prototype.hasOwnProperty.call(d,b)&&d[b].magic===x)return d[b];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new l(this.compressedSize,this.uncompressedSize,this.crc32,v,m.readData(this.compressedSize))},readCentralPart:function(m){this.versionMadeBy=m.readInt(2),m.skip(2),this.bitFlag=m.readInt(2),this.compressionMethod=m.readString(2),this.date=m.readDate(),this.crc32=m.readInt(4),this.compressedSize=m.readInt(4),this.uncompressedSize=m.readInt(4);var v=m.readInt(2);if(this.extraFieldsLength=m.readInt(2),this.fileCommentLength=m.readInt(2),this.diskNumberStart=m.readInt(2),this.internalFileAttributes=m.readInt(2),this.externalFileAttributes=m.readInt(4),this.localHeaderOffset=m.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");m.skip(v),this.readExtraFields(m),this.parseZIP64ExtraField(m),this.fileComment=m.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var m=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),m==0&&(this.dosPermissions=63&this.externalFileAttributes),m==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var m=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=m.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=m.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=m.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=m.readInt(4))}},readExtraFields:function(m){var v,g,x,b=m.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});m.index+4<b;)v=m.readInt(2),g=m.readInt(2),x=m.readData(g),this.extraFields[v]={id:v,length:g,value:x};m.setIndex(b)},handleUTF8:function(){var m=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var v=this.findExtraFieldUnicodePath();if(v!==null)this.fileNameStr=v;else{var g=a.transformTo(m,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(g)}var x=this.findExtraFieldUnicodeComment();if(x!==null)this.fileCommentStr=x;else{var b=a.transformTo(m,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(b)}}},findExtraFieldUnicodePath:function(){var m=this.extraFields[28789];if(m){var v=i(m.value);return v.readInt(1)!==1||c(this.fileName)!==v.readInt(4)?null:u.utf8decode(v.readData(m.length-5))}return null},findExtraFieldUnicodeComment:function(){var m=this.extraFields[25461];if(m){var v=i(m.value);return v.readInt(1)!==1||c(this.fileComment)!==v.readInt(4)?null:u.utf8decode(v.readData(m.length-5))}return null}},s.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,s,o){function i(v,g,x){this.name=v,this.dir=x.dir,this.date=x.date,this.comment=x.comment,this.unixPermissions=x.unixPermissions,this.dosPermissions=x.dosPermissions,this._data=g,this._dataBinary=x.binary,this.options={compression:x.compression,compressionOptions:x.compressionOptions}}var a=n("./stream/StreamHelper"),l=n("./stream/DataWorker"),c=n("./utf8"),u=n("./compressedObject"),d=n("./stream/GenericWorker");i.prototype={internalStream:function(v){var g=null,x="string";try{if(!v)throw new Error("No output type specified.");var b=(x=v.toLowerCase())==="string"||x==="text";x!=="binarystring"&&x!=="text"||(x="string"),g=this._decompressWorker();var y=!this._dataBinary;y&&!b&&(g=g.pipe(new c.Utf8EncodeWorker)),!y&&b&&(g=g.pipe(new c.Utf8DecodeWorker))}catch(k){(g=new d("error")).error(k)}return new a(g,x,"")},async:function(v,g){return this.internalStream(v).accumulate(g)},nodeStream:function(v,g){return this.internalStream(v||"nodebuffer").toNodejsStream(g)},_compressWorker:function(v,g){if(this._data instanceof u&&this._data.compression.magic===v.magic)return this._data.getCompressedWorker();var x=this._decompressWorker();return this._dataBinary||(x=x.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(x,v,g)},_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.")},m=0;m<f.length;m++)i.prototype[f[m]]=h;s.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,s,o){(function(i){var a,l,c=i.MutationObserver||i.WebKitMutationObserver;if(c){var u=0,d=new c(v),f=i.document.createTextNode("");d.observe(f,{characterData:!0}),a=function(){f.data=u=++u%2}}else if(i.setImmediate||i.MessageChannel===void 0)a="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var g=i.document.createElement("script");g.onreadystatechange=function(){v(),g.onreadystatechange=null,g.parentNode.removeChild(g),g=null},i.document.documentElement.appendChild(g)}:function(){setTimeout(v,0)};else{var h=new i.MessageChannel;h.port1.onmessage=v,a=function(){h.port2.postMessage(0)}}var m=[];function v(){var g,x;l=!0;for(var b=m.length;b;){for(x=m,m=[],g=-1;++g<b;)x[g]();b=m.length}l=!1}s.exports=function(g){m.push(g)!==1||l||a()}}).call(this,typeof mr<"u"?mr:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,s,o){var i=n("immediate");function a(){}var l={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function f(b){if(typeof b!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,b!==a&&g(this,b)}function h(b,y,k){this.promise=b,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function m(b,y,k){i(function(){var j;try{j=y(k)}catch(S){return l.reject(b,S)}j===b?l.reject(b,new TypeError("Cannot resolve promise with itself")):l.resolve(b,j)})}function v(b){var y=b&&b.then;if(b&&(typeof b=="object"||typeof b=="function")&&typeof y=="function")return function(){y.apply(b,arguments)}}function g(b,y){var k=!1;function j(N){k||(k=!0,l.reject(b,N))}function S(N){k||(k=!0,l.resolve(b,N))}var T=x(function(){y(S,j)});T.status==="error"&&j(T.value)}function x(b,y){var k={};try{k.value=b(y),k.status="success"}catch(j){k.status="error",k.value=j}return k}(s.exports=f).prototype.finally=function(b){if(typeof b!="function")return this;var y=this.constructor;return this.then(function(k){return y.resolve(b()).then(function(){return k})},function(k){return y.resolve(b()).then(function(){throw k})})},f.prototype.catch=function(b){return this.then(null,b)},f.prototype.then=function(b,y){if(typeof b!="function"&&this.state===u||typeof y!="function"&&this.state===c)return this;var k=new this.constructor(a);return this.state!==d?m(k,this.state===u?b:y,this.outcome):this.queue.push(new h(k,b,y)),k},h.prototype.callFulfilled=function(b){l.resolve(this.promise,b)},h.prototype.otherCallFulfilled=function(b){m(this.promise,this.onFulfilled,b)},h.prototype.callRejected=function(b){l.reject(this.promise,b)},h.prototype.otherCallRejected=function(b){m(this.promise,this.onRejected,b)},l.resolve=function(b,y){var k=x(v,y);if(k.status==="error")return l.reject(b,k.value);var j=k.value;if(j)g(b,j);else{b.state=u,b.outcome=y;for(var S=-1,T=b.queue.length;++S<T;)b.queue[S].callFulfilled(y)}return b},l.reject=function(b,y){b.state=c,b.outcome=y;for(var k=-1,j=b.queue.length;++k<j;)b.queue[k].callRejected(y);return b},f.resolve=function(b){return b instanceof this?b:l.resolve(new this(a),b)},f.reject=function(b){var y=new this(a);return l.reject(y,b)},f.all=function(b){var y=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=b.length,j=!1;if(!k)return this.resolve([]);for(var S=new Array(k),T=0,N=-1,I=new this(a);++N<k;)A(b[N],N);return I;function A(O,D){y.resolve(O).then(function(E){S[D]=E,++T!==k||j||(j=!0,l.resolve(I,S))},function(E){j||(j=!0,l.reject(I,E))})}},f.race=function(b){var y=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=b.length,j=!1;if(!k)return this.resolve([]);for(var S=-1,T=new this(a);++S<k;)N=b[S],y.resolve(N).then(function(I){j||(j=!0,l.resolve(T,I))},function(I){j||(j=!0,l.reject(T,I))});var N;return T}},{immediate:36}],38:[function(n,s,o){var i={};(0,n("./lib/utils/common").assign)(i,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),s.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,s,o){var i=n("./zlib/deflate"),a=n("./utils/common"),l=n("./utils/strings"),c=n("./zlib/messages"),u=n("./zlib/zstream"),d=Object.prototype.toString,f=0,h=-1,m=0,v=8;function g(b){if(!(this instanceof g))return new g(b);this.options=a.assign({level:h,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,to:""},b||{});var y=this.options;y.raw&&0<y.windowBits?y.windowBits=-y.windowBits:y.gzip&&0<y.windowBits&&y.windowBits<16&&(y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var k=i.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(k!==f)throw new Error(c[k]);if(y.header&&i.deflateSetHeader(this.strm,y.header),y.dictionary){var j;if(j=typeof y.dictionary=="string"?l.string2buf(y.dictionary):d.call(y.dictionary)==="[object ArrayBuffer]"?new Uint8Array(y.dictionary):y.dictionary,(k=i.deflateSetDictionary(this.strm,j))!==f)throw new Error(c[k]);this._dict_set=!0}}function x(b,y){var k=new g(y);if(k.push(b,!0),k.err)throw k.msg||c[k.err];return k.result}g.prototype.push=function(b,y){var k,j,S=this.strm,T=this.options.chunkSize;if(this.ended)return!1;j=y===~~y?y:y===!0?4:0,typeof b=="string"?S.input=l.string2buf(b):d.call(b)==="[object ArrayBuffer]"?S.input=new Uint8Array(b):S.input=b,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new a.Buf8(T),S.next_out=0,S.avail_out=T),(k=i.deflate(S,j))!==1&&k!==f)return this.onEnd(k),!(this.ended=!0);S.avail_out!==0&&(S.avail_in!==0||j!==4&&j!==2)||(this.options.to==="string"?this.onData(l.buf2binstring(a.shrinkBuf(S.output,S.next_out))):this.onData(a.shrinkBuf(S.output,S.next_out)))}while((0<S.avail_in||S.avail_out===0)&&k!==1);return j===4?(k=i.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===f):j!==2||(this.onEnd(f),!(S.avail_out=0))},g.prototype.onData=function(b){this.chunks.push(b)},g.prototype.onEnd=function(b){b===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg},o.Deflate=g,o.deflate=x,o.deflateRaw=function(b,y){return(y=y||{}).raw=!0,x(b,y)},o.gzip=function(b,y){return(y=y||{}).gzip=!0,x(b,y)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,s,o){var i=n("./zlib/inflate"),a=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 m(g){if(!(this instanceof m))return new m(g);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},g||{});var x=this.options;x.raw&&0<=x.windowBits&&x.windowBits<16&&(x.windowBits=-x.windowBits,x.windowBits===0&&(x.windowBits=-15)),!(0<=x.windowBits&&x.windowBits<16)||g&&g.windowBits||(x.windowBits+=32),15<x.windowBits&&x.windowBits<48&&(15&x.windowBits)==0&&(x.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var b=i.inflateInit2(this.strm,x.windowBits);if(b!==c.Z_OK)throw new Error(u[b]);this.header=new f,i.inflateGetHeader(this.strm,this.header)}function v(g,x){var b=new m(x);if(b.push(g,!0),b.err)throw b.msg||u[b.err];return b.result}m.prototype.push=function(g,x){var b,y,k,j,S,T,N=this.strm,I=this.options.chunkSize,A=this.options.dictionary,O=!1;if(this.ended)return!1;y=x===~~x?x:x===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof g=="string"?N.input=l.binstring2buf(g):h.call(g)==="[object ArrayBuffer]"?N.input=new Uint8Array(g):N.input=g,N.next_in=0,N.avail_in=N.input.length;do{if(N.avail_out===0&&(N.output=new a.Buf8(I),N.next_out=0,N.avail_out=I),(b=i.inflate(N,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&A&&(T=typeof A=="string"?l.string2buf(A):h.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,b=i.inflateSetDictionary(this.strm,T)),b===c.Z_BUF_ERROR&&O===!0&&(b=c.Z_OK,O=!1),b!==c.Z_STREAM_END&&b!==c.Z_OK)return this.onEnd(b),!(this.ended=!0);N.next_out&&(N.avail_out!==0&&b!==c.Z_STREAM_END&&(N.avail_in!==0||y!==c.Z_FINISH&&y!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=l.utf8border(N.output,N.next_out),j=N.next_out-k,S=l.buf2string(N.output,k),N.next_out=j,N.avail_out=I-j,j&&a.arraySet(N.output,N.output,k,j,0),this.onData(S)):this.onData(a.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)&&b!==c.Z_STREAM_END);return b===c.Z_STREAM_END&&(y=c.Z_FINISH),y===c.Z_FINISH?(b=i.inflateEnd(this.strm),this.onEnd(b),this.ended=!0,b===c.Z_OK):y!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(N.avail_out=0))},m.prototype.onData=function(g){this.chunks.push(g)},m.prototype.onEnd=function(g){g===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},o.Inflate=m,o.inflate=v,o.inflateRaw=function(g,x){return(x=x||{}).raw=!0,v(g,x)},o.ungzip=v},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,s,o){var i=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 a={arraySet:function(c,u,d,f,h){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+f),h);else for(var m=0;m<f;m++)c[h+m]=u[d+m]},flattenChunks:function(c){var u,d,f,h,m,v;for(u=f=0,d=c.length;u<d;u++)f+=c[u].length;for(v=new Uint8Array(f),u=h=0,d=c.length;u<d;u++)m=c[u],v.set(m,h),h+=m.length;return v}},l={arraySet:function(c,u,d,f,h){for(var m=0;m<f;m++)c[h+m]=u[d+m]},flattenChunks:function(c){return[].concat.apply([],c)}};o.setTyped=function(c){c?(o.Buf8=Uint8Array,o.Buf16=Uint16Array,o.Buf32=Int32Array,o.assign(o,a)):(o.Buf8=Array,o.Buf16=Array,o.Buf32=Array,o.assign(o,l))},o.setTyped(i)},{}],42:[function(n,s,o){var i=n("./common"),a=!0,l=!0;try{String.fromCharCode.apply(null,[0])}catch{a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{l=!1}for(var c=new i.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&&a))return String.fromCharCode.apply(null,i.shrinkBuf(f,h));for(var m="",v=0;v<h;v++)m+=String.fromCharCode(f[v]);return m}c[254]=c[254]=1,o.string2buf=function(f){var h,m,v,g,x,b=f.length,y=0;for(g=0;g<b;g++)(64512&(m=f.charCodeAt(g)))==55296&&g+1<b&&(64512&(v=f.charCodeAt(g+1)))==56320&&(m=65536+(m-55296<<10)+(v-56320),g++),y+=m<128?1:m<2048?2:m<65536?3:4;for(h=new i.Buf8(y),g=x=0;x<y;g++)(64512&(m=f.charCodeAt(g)))==55296&&g+1<b&&(64512&(v=f.charCodeAt(g+1)))==56320&&(m=65536+(m-55296<<10)+(v-56320),g++),m<128?h[x++]=m:(m<2048?h[x++]=192|m>>>6:(m<65536?h[x++]=224|m>>>12:(h[x++]=240|m>>>18,h[x++]=128|m>>>12&63),h[x++]=128|m>>>6&63),h[x++]=128|63&m);return h},o.buf2binstring=function(f){return d(f,f.length)},o.binstring2buf=function(f){for(var h=new i.Buf8(f.length),m=0,v=h.length;m<v;m++)h[m]=f.charCodeAt(m);return h},o.buf2string=function(f,h){var m,v,g,x,b=h||f.length,y=new Array(2*b);for(m=v=0;m<b;)if((g=f[m++])<128)y[v++]=g;else if(4<(x=c[g]))y[v++]=65533,m+=x-1;else{for(g&=x===2?31:x===3?15:7;1<x&&m<b;)g=g<<6|63&f[m++],x--;1<x?y[v++]=65533:g<65536?y[v++]=g:(g-=65536,y[v++]=55296|g>>10&1023,y[v++]=56320|1023&g)}return d(y,v)},o.utf8border=function(f,h){var m;for((h=h||f.length)>f.length&&(h=f.length),m=h-1;0<=m&&(192&f[m])==128;)m--;return m<0||m===0?h:m+c[f[m]]>h?m:h}},{"./common":41}],43:[function(n,s,o){s.exports=function(i,a,l,c){for(var u=65535&i|0,d=i>>>16&65535|0,f=0;l!==0;){for(l-=f=2e3<l?2e3:l;d=d+(u=u+a[c++]|0)|0,--f;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(n,s,o){s.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,s,o){var i=(function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var u=0;u<8;u++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l})();s.exports=function(a,l,c,u){var d=i,f=u+c;a^=-1;for(var h=u;h<f;h++)a=a>>>8^d[255&(a^l[h])];return-1^a}},{}],46:[function(n,s,o){var i,a=n("../utils/common"),l=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),f=0,h=4,m=0,v=-2,g=-1,x=4,b=2,y=8,k=9,j=286,S=30,T=19,N=2*j+1,I=15,A=3,O=258,D=O+A+1,E=42,L=113,_=1,F=2,ee=3,$=4;function H(w,X){return w.msg=d[X],X}function q(w){return(w<<1)-(4<w?9:0)}function ue(w){for(var X=w.length;0<=--X;)w[X]=0}function V(w){var X=w.state,G=X.pending;G>w.avail_out&&(G=w.avail_out),G!==0&&(a.arraySet(w.output,X.pending_buf,X.pending_out,G,w.next_out),w.next_out+=G,X.pending_out+=G,w.total_out+=G,w.avail_out-=G,X.pending-=G,X.pending===0&&(X.pending_out=0))}function W(w,X){l._tr_flush_block(w,0<=w.block_start?w.block_start:-1,w.strstart-w.block_start,X),w.block_start=w.strstart,V(w.strm)}function ce(w,X){w.pending_buf[w.pending++]=X}function U(w,X){w.pending_buf[w.pending++]=X>>>8&255,w.pending_buf[w.pending++]=255&X}function Q(w,X){var G,P,R=w.max_chain_length,B=w.strstart,se=w.prev_length,ne=w.nice_match,Z=w.strstart>w.w_size-D?w.strstart-(w.w_size-D):0,ae=w.window,z=w.w_mask,M=w.prev,J=w.strstart+O,re=ae[B+se-1],ie=ae[B+se];w.prev_length>=w.good_match&&(R>>=2),ne>w.lookahead&&(ne=w.lookahead);do if(ae[(G=X)+se]===ie&&ae[G+se-1]===re&&ae[G]===ae[B]&&ae[++G]===ae[B+1]){B+=2,G++;do;while(ae[++B]===ae[++G]&&ae[++B]===ae[++G]&&ae[++B]===ae[++G]&&ae[++B]===ae[++G]&&ae[++B]===ae[++G]&&ae[++B]===ae[++G]&&ae[++B]===ae[++G]&&ae[++B]===ae[++G]&&B<J);if(P=O-(J-B),B=J-O,se<P){if(w.match_start=X,ne<=(se=P))break;re=ae[B+se-1],ie=ae[B+se]}}while((X=M[X&z])>Z&&--R!=0);return se<=w.lookahead?se:w.lookahead}function Ce(w){var X,G,P,R,B,se,ne,Z,ae,z,M=w.w_size;do{if(R=w.window_size-w.lookahead-w.strstart,w.strstart>=M+(M-D)){for(a.arraySet(w.window,w.window,M,M,0),w.match_start-=M,w.strstart-=M,w.block_start-=M,X=G=w.hash_size;P=w.head[--X],w.head[X]=M<=P?P-M:0,--G;);for(X=G=M;P=w.prev[--X],w.prev[X]=M<=P?P-M:0,--G;);R+=M}if(w.strm.avail_in===0)break;if(se=w.strm,ne=w.window,Z=w.strstart+w.lookahead,ae=R,z=void 0,z=se.avail_in,ae<z&&(z=ae),G=z===0?0:(se.avail_in-=z,a.arraySet(ne,se.input,se.next_in,z,Z),se.state.wrap===1?se.adler=c(se.adler,ne,z,Z):se.state.wrap===2&&(se.adler=u(se.adler,ne,z,Z)),se.next_in+=z,se.total_in+=z,z),w.lookahead+=G,w.lookahead+w.insert>=A)for(B=w.strstart-w.insert,w.ins_h=w.window[B],w.ins_h=(w.ins_h<<w.hash_shift^w.window[B+1])&w.hash_mask;w.insert&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[B+A-1])&w.hash_mask,w.prev[B&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=B,B++,w.insert--,!(w.lookahead+w.insert<A)););}while(w.lookahead<D&&w.strm.avail_in!==0)}function oe(w,X){for(var G,P;;){if(w.lookahead<D){if(Ce(w),w.lookahead<D&&X===f)return _;if(w.lookahead===0)break}if(G=0,w.lookahead>=A&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+A-1])&w.hash_mask,G=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),G!==0&&w.strstart-G<=w.w_size-D&&(w.match_length=Q(w,G)),w.match_length>=A)if(P=l._tr_tally(w,w.strstart-w.match_start,w.match_length-A),w.lookahead-=w.match_length,w.match_length<=w.max_lazy_match&&w.lookahead>=A){for(w.match_length--;w.strstart++,w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+A-1])&w.hash_mask,G=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart,--w.match_length!=0;);w.strstart++}else w.strstart+=w.match_length,w.match_length=0,w.ins_h=w.window[w.strstart],w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+1])&w.hash_mask;else P=l._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++;if(P&&(W(w,!1),w.strm.avail_out===0))return _}return w.insert=w.strstart<A-1?w.strstart:A-1,X===h?(W(w,!0),w.strm.avail_out===0?ee:$):w.last_lit&&(W(w,!1),w.strm.avail_out===0)?_:F}function pe(w,X){for(var G,P,R;;){if(w.lookahead<D){if(Ce(w),w.lookahead<D&&X===f)return _;if(w.lookahead===0)break}if(G=0,w.lookahead>=A&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+A-1])&w.hash_mask,G=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),w.prev_length=w.match_length,w.prev_match=w.match_start,w.match_length=A-1,G!==0&&w.prev_length<w.max_lazy_match&&w.strstart-G<=w.w_size-D&&(w.match_length=Q(w,G),w.match_length<=5&&(w.strategy===1||w.match_length===A&&4096<w.strstart-w.match_start)&&(w.match_length=A-1)),w.prev_length>=A&&w.match_length<=w.prev_length){for(R=w.strstart+w.lookahead-A,P=l._tr_tally(w,w.strstart-1-w.prev_match,w.prev_length-A),w.lookahead-=w.prev_length-1,w.prev_length-=2;++w.strstart<=R&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+A-1])&w.hash_mask,G=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),--w.prev_length!=0;);if(w.match_available=0,w.match_length=A-1,w.strstart++,P&&(W(w,!1),w.strm.avail_out===0))return _}else if(w.match_available){if((P=l._tr_tally(w,0,w.window[w.strstart-1]))&&W(w,!1),w.strstart++,w.lookahead--,w.strm.avail_out===0)return _}else w.match_available=1,w.strstart++,w.lookahead--}return w.match_available&&(P=l._tr_tally(w,0,w.window[w.strstart-1]),w.match_available=0),w.insert=w.strstart<A-1?w.strstart:A-1,X===h?(W(w,!0),w.strm.avail_out===0?ee:$):w.last_lit&&(W(w,!1),w.strm.avail_out===0)?_:F}function ge(w,X,G,P,R){this.good_length=w,this.max_lazy=X,this.nice_length=G,this.max_chain=P,this.func=R}function me(){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=y,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 a.Buf16(2*N),this.dyn_dtree=new a.Buf16(2*(2*S+1)),this.bl_tree=new a.Buf16(2*(2*T+1)),ue(this.dyn_ltree),ue(this.dyn_dtree),ue(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(I+1),this.heap=new a.Buf16(2*j+1),ue(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*j+1),ue(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 xe(w){var X;return w&&w.state?(w.total_in=w.total_out=0,w.data_type=b,(X=w.state).pending=0,X.pending_out=0,X.wrap<0&&(X.wrap=-X.wrap),X.status=X.wrap?E:L,w.adler=X.wrap===2?0:1,X.last_flush=f,l._tr_init(X),m):H(w,v)}function ke(w){var X=xe(w);return X===m&&(function(G){G.window_size=2*G.w_size,ue(G.head),G.max_lazy_match=i[G.level].max_lazy,G.good_match=i[G.level].good_length,G.nice_match=i[G.level].nice_length,G.max_chain_length=i[G.level].max_chain,G.strstart=0,G.block_start=0,G.lookahead=0,G.insert=0,G.match_length=G.prev_length=A-1,G.match_available=0,G.ins_h=0})(w.state),X}function Ae(w,X,G,P,R,B){if(!w)return v;var se=1;if(X===g&&(X=6),P<0?(se=0,P=-P):15<P&&(se=2,P-=16),R<1||k<R||G!==y||P<8||15<P||X<0||9<X||B<0||x<B)return H(w,v);P===8&&(P=9);var ne=new me;return(w.state=ne).strm=w,ne.wrap=se,ne.gzhead=null,ne.w_bits=P,ne.w_size=1<<ne.w_bits,ne.w_mask=ne.w_size-1,ne.hash_bits=R+7,ne.hash_size=1<<ne.hash_bits,ne.hash_mask=ne.hash_size-1,ne.hash_shift=~~((ne.hash_bits+A-1)/A),ne.window=new a.Buf8(2*ne.w_size),ne.head=new a.Buf16(ne.hash_size),ne.prev=new a.Buf16(ne.w_size),ne.lit_bufsize=1<<R+6,ne.pending_buf_size=4*ne.lit_bufsize,ne.pending_buf=new a.Buf8(ne.pending_buf_size),ne.d_buf=1*ne.lit_bufsize,ne.l_buf=3*ne.lit_bufsize,ne.level=X,ne.strategy=B,ne.method=G,ke(w)}i=[new ge(0,0,0,0,function(w,X){var G=65535;for(G>w.pending_buf_size-5&&(G=w.pending_buf_size-5);;){if(w.lookahead<=1){if(Ce(w),w.lookahead===0&&X===f)return _;if(w.lookahead===0)break}w.strstart+=w.lookahead,w.lookahead=0;var P=w.block_start+G;if((w.strstart===0||w.strstart>=P)&&(w.lookahead=w.strstart-P,w.strstart=P,W(w,!1),w.strm.avail_out===0)||w.strstart-w.block_start>=w.w_size-D&&(W(w,!1),w.strm.avail_out===0))return _}return w.insert=0,X===h?(W(w,!0),w.strm.avail_out===0?ee:$):(w.strstart>w.block_start&&(W(w,!1),w.strm.avail_out),_)}),new ge(4,4,8,4,oe),new ge(4,5,16,8,oe),new ge(4,6,32,32,oe),new ge(4,4,16,16,pe),new ge(8,16,32,32,pe),new ge(8,16,128,128,pe),new ge(8,32,128,256,pe),new ge(32,128,258,1024,pe),new ge(32,258,258,4096,pe)],o.deflateInit=function(w,X){return Ae(w,X,y,15,8,0)},o.deflateInit2=Ae,o.deflateReset=ke,o.deflateResetKeep=xe,o.deflateSetHeader=function(w,X){return w&&w.state?w.state.wrap!==2?v:(w.state.gzhead=X,m):v},o.deflate=function(w,X){var G,P,R,B;if(!w||!w.state||5<X||X<0)return w?H(w,v):v;if(P=w.state,!w.output||!w.input&&w.avail_in!==0||P.status===666&&X!==h)return H(w,w.avail_out===0?-5:v);if(P.strm=w,G=P.last_flush,P.last_flush=X,P.status===E)if(P.wrap===2)w.adler=0,ce(P,31),ce(P,139),ce(P,8),P.gzhead?(ce(P,(P.gzhead.text?1:0)+(P.gzhead.hcrc?2:0)+(P.gzhead.extra?4:0)+(P.gzhead.name?8:0)+(P.gzhead.comment?16:0)),ce(P,255&P.gzhead.time),ce(P,P.gzhead.time>>8&255),ce(P,P.gzhead.time>>16&255),ce(P,P.gzhead.time>>24&255),ce(P,P.level===9?2:2<=P.strategy||P.level<2?4:0),ce(P,255&P.gzhead.os),P.gzhead.extra&&P.gzhead.extra.length&&(ce(P,255&P.gzhead.extra.length),ce(P,P.gzhead.extra.length>>8&255)),P.gzhead.hcrc&&(w.adler=u(w.adler,P.pending_buf,P.pending,0)),P.gzindex=0,P.status=69):(ce(P,0),ce(P,0),ce(P,0),ce(P,0),ce(P,0),ce(P,P.level===9?2:2<=P.strategy||P.level<2?4:0),ce(P,3),P.status=L);else{var se=y+(P.w_bits-8<<4)<<8;se|=(2<=P.strategy||P.level<2?0:P.level<6?1:P.level===6?2:3)<<6,P.strstart!==0&&(se|=32),se+=31-se%31,P.status=L,U(P,se),P.strstart!==0&&(U(P,w.adler>>>16),U(P,65535&w.adler)),w.adler=1}if(P.status===69)if(P.gzhead.extra){for(R=P.pending;P.gzindex<(65535&P.gzhead.extra.length)&&(P.pending!==P.pending_buf_size||(P.gzhead.hcrc&&P.pending>R&&(w.adler=u(w.adler,P.pending_buf,P.pending-R,R)),V(w),R=P.pending,P.pending!==P.pending_buf_size));)ce(P,255&P.gzhead.extra[P.gzindex]),P.gzindex++;P.gzhead.hcrc&&P.pending>R&&(w.adler=u(w.adler,P.pending_buf,P.pending-R,R)),P.gzindex===P.gzhead.extra.length&&(P.gzindex=0,P.status=73)}else P.status=73;if(P.status===73)if(P.gzhead.name){R=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>R&&(w.adler=u(w.adler,P.pending_buf,P.pending-R,R)),V(w),R=P.pending,P.pending===P.pending_buf_size)){B=1;break}B=P.gzindex<P.gzhead.name.length?255&P.gzhead.name.charCodeAt(P.gzindex++):0,ce(P,B)}while(B!==0);P.gzhead.hcrc&&P.pending>R&&(w.adler=u(w.adler,P.pending_buf,P.pending-R,R)),B===0&&(P.gzindex=0,P.status=91)}else P.status=91;if(P.status===91)if(P.gzhead.comment){R=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>R&&(w.adler=u(w.adler,P.pending_buf,P.pending-R,R)),V(w),R=P.pending,P.pending===P.pending_buf_size)){B=1;break}B=P.gzindex<P.gzhead.comment.length?255&P.gzhead.comment.charCodeAt(P.gzindex++):0,ce(P,B)}while(B!==0);P.gzhead.hcrc&&P.pending>R&&(w.adler=u(w.adler,P.pending_buf,P.pending-R,R)),B===0&&(P.status=103)}else P.status=103;if(P.status===103&&(P.gzhead.hcrc?(P.pending+2>P.pending_buf_size&&V(w),P.pending+2<=P.pending_buf_size&&(ce(P,255&w.adler),ce(P,w.adler>>8&255),w.adler=0,P.status=L)):P.status=L),P.pending!==0){if(V(w),w.avail_out===0)return P.last_flush=-1,m}else if(w.avail_in===0&&q(X)<=q(G)&&X!==h)return H(w,-5);if(P.status===666&&w.avail_in!==0)return H(w,-5);if(w.avail_in!==0||P.lookahead!==0||X!==f&&P.status!==666){var ne=P.strategy===2?(function(Z,ae){for(var z;;){if(Z.lookahead===0&&(Ce(Z),Z.lookahead===0)){if(ae===f)return _;break}if(Z.match_length=0,z=l._tr_tally(Z,0,Z.window[Z.strstart]),Z.lookahead--,Z.strstart++,z&&(W(Z,!1),Z.strm.avail_out===0))return _}return Z.insert=0,ae===h?(W(Z,!0),Z.strm.avail_out===0?ee:$):Z.last_lit&&(W(Z,!1),Z.strm.avail_out===0)?_:F})(P,X):P.strategy===3?(function(Z,ae){for(var z,M,J,re,ie=Z.window;;){if(Z.lookahead<=O){if(Ce(Z),Z.lookahead<=O&&ae===f)return _;if(Z.lookahead===0)break}if(Z.match_length=0,Z.lookahead>=A&&0<Z.strstart&&(M=ie[J=Z.strstart-1])===ie[++J]&&M===ie[++J]&&M===ie[++J]){re=Z.strstart+O;do;while(M===ie[++J]&&M===ie[++J]&&M===ie[++J]&&M===ie[++J]&&M===ie[++J]&&M===ie[++J]&&M===ie[++J]&&M===ie[++J]&&J<re);Z.match_length=O-(re-J),Z.match_length>Z.lookahead&&(Z.match_length=Z.lookahead)}if(Z.match_length>=A?(z=l._tr_tally(Z,1,Z.match_length-A),Z.lookahead-=Z.match_length,Z.strstart+=Z.match_length,Z.match_length=0):(z=l._tr_tally(Z,0,Z.window[Z.strstart]),Z.lookahead--,Z.strstart++),z&&(W(Z,!1),Z.strm.avail_out===0))return _}return Z.insert=0,ae===h?(W(Z,!0),Z.strm.avail_out===0?ee:$):Z.last_lit&&(W(Z,!1),Z.strm.avail_out===0)?_:F})(P,X):i[P.level].func(P,X);if(ne!==ee&&ne!==$||(P.status=666),ne===_||ne===ee)return w.avail_out===0&&(P.last_flush=-1),m;if(ne===F&&(X===1?l._tr_align(P):X!==5&&(l._tr_stored_block(P,0,0,!1),X===3&&(ue(P.head),P.lookahead===0&&(P.strstart=0,P.block_start=0,P.insert=0))),V(w),w.avail_out===0))return P.last_flush=-1,m}return X!==h?m:P.wrap<=0?1:(P.wrap===2?(ce(P,255&w.adler),ce(P,w.adler>>8&255),ce(P,w.adler>>16&255),ce(P,w.adler>>24&255),ce(P,255&w.total_in),ce(P,w.total_in>>8&255),ce(P,w.total_in>>16&255),ce(P,w.total_in>>24&255)):(U(P,w.adler>>>16),U(P,65535&w.adler)),V(w),0<P.wrap&&(P.wrap=-P.wrap),P.pending!==0?m:1)},o.deflateEnd=function(w){var X;return w&&w.state?(X=w.state.status)!==E&&X!==69&&X!==73&&X!==91&&X!==103&&X!==L&&X!==666?H(w,v):(w.state=null,X===L?H(w,-3):m):v},o.deflateSetDictionary=function(w,X){var G,P,R,B,se,ne,Z,ae,z=X.length;if(!w||!w.state||(B=(G=w.state).wrap)===2||B===1&&G.status!==E||G.lookahead)return v;for(B===1&&(w.adler=c(w.adler,X,z,0)),G.wrap=0,z>=G.w_size&&(B===0&&(ue(G.head),G.strstart=0,G.block_start=0,G.insert=0),ae=new a.Buf8(G.w_size),a.arraySet(ae,X,z-G.w_size,G.w_size,0),X=ae,z=G.w_size),se=w.avail_in,ne=w.next_in,Z=w.input,w.avail_in=z,w.next_in=0,w.input=X,Ce(G);G.lookahead>=A;){for(P=G.strstart,R=G.lookahead-(A-1);G.ins_h=(G.ins_h<<G.hash_shift^G.window[P+A-1])&G.hash_mask,G.prev[P&G.w_mask]=G.head[G.ins_h],G.head[G.ins_h]=P,P++,--R;);G.strstart=P,G.lookahead=A-1,Ce(G)}return G.strstart+=G.lookahead,G.block_start=G.strstart,G.insert=G.lookahead,G.lookahead=0,G.match_length=G.prev_length=A-1,G.match_available=0,w.next_in=ne,w.input=Z,w.avail_in=se,G.wrap=B,m},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,s,o){s.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,s,o){s.exports=function(i,a){var l,c,u,d,f,h,m,v,g,x,b,y,k,j,S,T,N,I,A,O,D,E,L,_,F;l=i.state,c=i.next_in,_=i.input,u=c+(i.avail_in-5),d=i.next_out,F=i.output,f=d-(a-i.avail_out),h=d+(i.avail_out-257),m=l.dmax,v=l.wsize,g=l.whave,x=l.wnext,b=l.window,y=l.hold,k=l.bits,j=l.lencode,S=l.distcode,T=(1<<l.lenbits)-1,N=(1<<l.distbits)-1;e:do{k<15&&(y+=_[c++]<<k,k+=8,y+=_[c++]<<k,k+=8),I=j[y&T];t:for(;;){if(y>>>=A=I>>>24,k-=A,(A=I>>>16&255)===0)F[d++]=65535&I;else{if(!(16&A)){if((64&A)==0){I=j[(65535&I)+(y&(1<<A)-1)];continue t}if(32&A){l.mode=12;break e}i.msg="invalid literal/length code",l.mode=30;break e}O=65535&I,(A&=15)&&(k<A&&(y+=_[c++]<<k,k+=8),O+=y&(1<<A)-1,y>>>=A,k-=A),k<15&&(y+=_[c++]<<k,k+=8,y+=_[c++]<<k,k+=8),I=S[y&N];n:for(;;){if(y>>>=A=I>>>24,k-=A,!(16&(A=I>>>16&255))){if((64&A)==0){I=S[(65535&I)+(y&(1<<A)-1)];continue n}i.msg="invalid distance code",l.mode=30;break e}if(D=65535&I,k<(A&=15)&&(y+=_[c++]<<k,(k+=8)<A&&(y+=_[c++]<<k,k+=8)),m<(D+=y&(1<<A)-1)){i.msg="invalid distance too far back",l.mode=30;break e}if(y>>>=A,k-=A,(A=d-f)<D){if(g<(A=D-A)&&l.sane){i.msg="invalid distance too far back",l.mode=30;break e}if(L=b,(E=0)===x){if(E+=v-A,A<O){for(O-=A;F[d++]=b[E++],--A;);E=d-D,L=F}}else if(x<A){if(E+=v+x-A,(A-=x)<O){for(O-=A;F[d++]=b[E++],--A;);if(E=0,x<O){for(O-=A=x;F[d++]=b[E++],--A;);E=d-D,L=F}}}else if(E+=x-A,A<O){for(O-=A;F[d++]=b[E++],--A;);E=d-D,L=F}for(;2<O;)F[d++]=L[E++],F[d++]=L[E++],F[d++]=L[E++],O-=3;O&&(F[d++]=L[E++],1<O&&(F[d++]=L[E++]))}else{for(E=d-D;F[d++]=F[E++],F[d++]=F[E++],F[d++]=F[E++],2<(O-=3););O&&(F[d++]=F[E++],1<O&&(F[d++]=F[E++]))}break}}break}}while(c<u&&d<h);c-=O=k>>3,y&=(1<<(k-=O<<3))-1,i.next_in=c,i.next_out=d,i.avail_in=c<u?u-c+5:5-(c-u),i.avail_out=d<h?h-d+257:257-(d-h),l.hold=y,l.bits=k}},{}],49:[function(n,s,o){var i=n("../utils/common"),a=n("./adler32"),l=n("./crc32"),c=n("./inffast"),u=n("./inftrees"),d=1,f=2,h=0,m=-2,v=1,g=852,x=592;function b(E){return(E>>>24&255)+(E>>>8&65280)+((65280&E)<<8)+((255&E)<<24)}function y(){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 i.Buf16(320),this.work=new i.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=v,L.last=0,L.havedict=0,L.dmax=32768,L.head=null,L.hold=0,L.bits=0,L.lencode=L.lendyn=new i.Buf32(g),L.distcode=L.distdyn=new i.Buf32(x),L.sane=1,L.back=-1,h):m}function j(E){var L;return E&&E.state?((L=E.state).wsize=0,L.whave=0,L.wnext=0,k(E)):m}function S(E,L){var _,F;return E&&E.state?(F=E.state,L<0?(_=0,L=-L):(_=1+(L>>4),L<48&&(L&=15)),L&&(L<8||15<L)?m:(F.window!==null&&F.wbits!==L&&(F.window=null),F.wrap=_,F.wbits=L,j(E))):m}function T(E,L){var _,F;return E?(F=new y,(E.state=F).window=null,(_=S(E,L))!==h&&(E.state=null),_):m}var N,I,A=!0;function O(E){if(A){var L;for(N=new i.Buf32(512),I=new i.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,I,0,E.work,{bits:5}),A=!1}E.lencode=N,E.lenbits=9,E.distcode=I,E.distbits=5}function D(E,L,_,F){var ee,$=E.state;return $.window===null&&($.wsize=1<<$.wbits,$.wnext=0,$.whave=0,$.window=new i.Buf8($.wsize)),F>=$.wsize?(i.arraySet($.window,L,_-$.wsize,$.wsize,0),$.wnext=0,$.whave=$.wsize):(F<(ee=$.wsize-$.wnext)&&(ee=F),i.arraySet($.window,L,_-F,ee,$.wnext),(F-=ee)?(i.arraySet($.window,L,_-F,F,0),$.wnext=F,$.whave=$.wsize):($.wnext+=ee,$.wnext===$.wsize&&($.wnext=0),$.whave<$.wsize&&($.whave+=ee))),0}o.inflateReset=j,o.inflateReset2=S,o.inflateResetKeep=k,o.inflateInit=function(E){return T(E,15)},o.inflateInit2=T,o.inflate=function(E,L){var _,F,ee,$,H,q,ue,V,W,ce,U,Q,Ce,oe,pe,ge,me,xe,ke,Ae,w,X,G,P,R=0,B=new i.Buf8(4),se=[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 m;(_=E.state).mode===12&&(_.mode=13),H=E.next_out,ee=E.output,ue=E.avail_out,$=E.next_in,F=E.input,q=E.avail_in,V=_.hold,W=_.bits,ce=q,U=ue,X=h;e:for(;;)switch(_.mode){case v:if(_.wrap===0){_.mode=13;break}for(;W<16;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(2&_.wrap&&V===35615){B[_.check=0]=255&V,B[1]=V>>>8&255,_.check=l(_.check,B,2,0),W=V=0,_.mode=2;break}if(_.flags=0,_.head&&(_.head.done=!1),!(1&_.wrap)||(((255&V)<<8)+(V>>8))%31){E.msg="incorrect header check",_.mode=30;break}if((15&V)!=8){E.msg="unknown compression method",_.mode=30;break}if(W-=4,w=8+(15&(V>>>=4)),_.wbits===0)_.wbits=w;else if(w>_.wbits){E.msg="invalid window size",_.mode=30;break}_.dmax=1<<w,E.adler=_.check=1,_.mode=512&V?10:12,W=V=0;break;case 2:for(;W<16;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(_.flags=V,(255&_.flags)!=8){E.msg="unknown compression method",_.mode=30;break}if(57344&_.flags){E.msg="unknown header flags set",_.mode=30;break}_.head&&(_.head.text=V>>8&1),512&_.flags&&(B[0]=255&V,B[1]=V>>>8&255,_.check=l(_.check,B,2,0)),W=V=0,_.mode=3;case 3:for(;W<32;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}_.head&&(_.head.time=V),512&_.flags&&(B[0]=255&V,B[1]=V>>>8&255,B[2]=V>>>16&255,B[3]=V>>>24&255,_.check=l(_.check,B,4,0)),W=V=0,_.mode=4;case 4:for(;W<16;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}_.head&&(_.head.xflags=255&V,_.head.os=V>>8),512&_.flags&&(B[0]=255&V,B[1]=V>>>8&255,_.check=l(_.check,B,2,0)),W=V=0,_.mode=5;case 5:if(1024&_.flags){for(;W<16;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}_.length=V,_.head&&(_.head.extra_len=V),512&_.flags&&(B[0]=255&V,B[1]=V>>>8&255,_.check=l(_.check,B,2,0)),W=V=0}else _.head&&(_.head.extra=null);_.mode=6;case 6:if(1024&_.flags&&(q<(Q=_.length)&&(Q=q),Q&&(_.head&&(w=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),i.arraySet(_.head.extra,F,$,Q,w)),512&_.flags&&(_.check=l(_.check,F,Q,$)),q-=Q,$+=Q,_.length-=Q),_.length))break e;_.length=0,_.mode=7;case 7:if(2048&_.flags){if(q===0)break e;for(Q=0;w=F[$+Q++],_.head&&w&&_.length<65536&&(_.head.name+=String.fromCharCode(w)),w&&Q<q;);if(512&_.flags&&(_.check=l(_.check,F,Q,$)),q-=Q,$+=Q,w)break e}else _.head&&(_.head.name=null);_.length=0,_.mode=8;case 8:if(4096&_.flags){if(q===0)break e;for(Q=0;w=F[$+Q++],_.head&&w&&_.length<65536&&(_.head.comment+=String.fromCharCode(w)),w&&Q<q;);if(512&_.flags&&(_.check=l(_.check,F,Q,$)),q-=Q,$+=Q,w)break e}else _.head&&(_.head.comment=null);_.mode=9;case 9:if(512&_.flags){for(;W<16;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(V!==(65535&_.check)){E.msg="header crc mismatch",_.mode=30;break}W=V=0}_.head&&(_.head.hcrc=_.flags>>9&1,_.head.done=!0),E.adler=_.check=0,_.mode=12;break;case 10:for(;W<32;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}E.adler=_.check=b(V),W=V=0,_.mode=11;case 11:if(_.havedict===0)return E.next_out=H,E.avail_out=ue,E.next_in=$,E.avail_in=q,_.hold=V,_.bits=W,2;E.adler=_.check=1,_.mode=12;case 12:if(L===5||L===6)break e;case 13:if(_.last){V>>>=7&W,W-=7&W,_.mode=27;break}for(;W<3;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}switch(_.last=1&V,W-=1,3&(V>>>=1)){case 0:_.mode=14;break;case 1:if(O(_),_.mode=20,L!==6)break;V>>>=2,W-=2;break e;case 2:_.mode=17;break;case 3:E.msg="invalid block type",_.mode=30}V>>>=2,W-=2;break;case 14:for(V>>>=7&W,W-=7&W;W<32;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if((65535&V)!=(V>>>16^65535)){E.msg="invalid stored block lengths",_.mode=30;break}if(_.length=65535&V,W=V=0,_.mode=15,L===6)break e;case 15:_.mode=16;case 16:if(Q=_.length){if(q<Q&&(Q=q),ue<Q&&(Q=ue),Q===0)break e;i.arraySet(ee,F,$,Q,H),q-=Q,$+=Q,ue-=Q,H+=Q,_.length-=Q;break}_.mode=12;break;case 17:for(;W<14;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(_.nlen=257+(31&V),V>>>=5,W-=5,_.ndist=1+(31&V),V>>>=5,W-=5,_.ncode=4+(15&V),V>>>=4,W-=4,286<_.nlen||30<_.ndist){E.msg="too many length or distance symbols",_.mode=30;break}_.have=0,_.mode=18;case 18:for(;_.have<_.ncode;){for(;W<3;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}_.lens[se[_.have++]]=7&V,V>>>=3,W-=3}for(;_.have<19;)_.lens[se[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,G={bits:_.lenbits},X=u(0,_.lens,0,19,_.lencode,0,_.work,G),_.lenbits=G.bits,X){E.msg="invalid code lengths set",_.mode=30;break}_.have=0,_.mode=19;case 19:for(;_.have<_.nlen+_.ndist;){for(;ge=(R=_.lencode[V&(1<<_.lenbits)-1])>>>16&255,me=65535&R,!((pe=R>>>24)<=W);){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(me<16)V>>>=pe,W-=pe,_.lens[_.have++]=me;else{if(me===16){for(P=pe+2;W<P;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(V>>>=pe,W-=pe,_.have===0){E.msg="invalid bit length repeat",_.mode=30;break}w=_.lens[_.have-1],Q=3+(3&V),V>>>=2,W-=2}else if(me===17){for(P=pe+3;W<P;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}W-=pe,w=0,Q=3+(7&(V>>>=pe)),V>>>=3,W-=3}else{for(P=pe+7;W<P;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}W-=pe,w=0,Q=11+(127&(V>>>=pe)),V>>>=7,W-=7}if(_.have+Q>_.nlen+_.ndist){E.msg="invalid bit length repeat",_.mode=30;break}for(;Q--;)_.lens[_.have++]=w}}if(_.mode===30)break;if(_.lens[256]===0){E.msg="invalid code -- missing end-of-block",_.mode=30;break}if(_.lenbits=9,G={bits:_.lenbits},X=u(d,_.lens,0,_.nlen,_.lencode,0,_.work,G),_.lenbits=G.bits,X){E.msg="invalid literal/lengths set",_.mode=30;break}if(_.distbits=6,_.distcode=_.distdyn,G={bits:_.distbits},X=u(f,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,G),_.distbits=G.bits,X){E.msg="invalid distances set",_.mode=30;break}if(_.mode=20,L===6)break e;case 20:_.mode=21;case 21:if(6<=q&&258<=ue){E.next_out=H,E.avail_out=ue,E.next_in=$,E.avail_in=q,_.hold=V,_.bits=W,c(E,U),H=E.next_out,ee=E.output,ue=E.avail_out,$=E.next_in,F=E.input,q=E.avail_in,V=_.hold,W=_.bits,_.mode===12&&(_.back=-1);break}for(_.back=0;ge=(R=_.lencode[V&(1<<_.lenbits)-1])>>>16&255,me=65535&R,!((pe=R>>>24)<=W);){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(ge&&(240&ge)==0){for(xe=pe,ke=ge,Ae=me;ge=(R=_.lencode[Ae+((V&(1<<xe+ke)-1)>>xe)])>>>16&255,me=65535&R,!(xe+(pe=R>>>24)<=W);){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}V>>>=xe,W-=xe,_.back+=xe}if(V>>>=pe,W-=pe,_.back+=pe,_.length=me,ge===0){_.mode=26;break}if(32&ge){_.back=-1,_.mode=12;break}if(64&ge){E.msg="invalid literal/length code",_.mode=30;break}_.extra=15&ge,_.mode=22;case 22:if(_.extra){for(P=_.extra;W<P;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}_.length+=V&(1<<_.extra)-1,V>>>=_.extra,W-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=23;case 23:for(;ge=(R=_.distcode[V&(1<<_.distbits)-1])>>>16&255,me=65535&R,!((pe=R>>>24)<=W);){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if((240&ge)==0){for(xe=pe,ke=ge,Ae=me;ge=(R=_.distcode[Ae+((V&(1<<xe+ke)-1)>>xe)])>>>16&255,me=65535&R,!(xe+(pe=R>>>24)<=W);){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}V>>>=xe,W-=xe,_.back+=xe}if(V>>>=pe,W-=pe,_.back+=pe,64&ge){E.msg="invalid distance code",_.mode=30;break}_.offset=me,_.extra=15&ge,_.mode=24;case 24:if(_.extra){for(P=_.extra;W<P;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}_.offset+=V&(1<<_.extra)-1,V>>>=_.extra,W-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){E.msg="invalid distance too far back",_.mode=30;break}_.mode=25;case 25:if(ue===0)break e;if(Q=U-ue,_.offset>Q){if((Q=_.offset-Q)>_.whave&&_.sane){E.msg="invalid distance too far back",_.mode=30;break}Ce=Q>_.wnext?(Q-=_.wnext,_.wsize-Q):_.wnext-Q,Q>_.length&&(Q=_.length),oe=_.window}else oe=ee,Ce=H-_.offset,Q=_.length;for(ue<Q&&(Q=ue),ue-=Q,_.length-=Q;ee[H++]=oe[Ce++],--Q;);_.length===0&&(_.mode=21);break;case 26:if(ue===0)break e;ee[H++]=_.length,ue--,_.mode=21;break;case 27:if(_.wrap){for(;W<32;){if(q===0)break e;q--,V|=F[$++]<<W,W+=8}if(U-=ue,E.total_out+=U,_.total+=U,U&&(E.adler=_.check=_.flags?l(_.check,ee,U,H-U):a(_.check,ee,U,H-U)),U=ue,(_.flags?V:b(V))!==_.check){E.msg="incorrect data check",_.mode=30;break}W=V=0}_.mode=28;case 28:if(_.wrap&&_.flags){for(;W<32;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(V!==(4294967295&_.total)){E.msg="incorrect length check",_.mode=30;break}W=V=0}_.mode=29;case 29:X=1;break e;case 30:X=-3;break e;case 31:return-4;default:return m}return E.next_out=H,E.avail_out=ue,E.next_in=$,E.avail_in=q,_.hold=V,_.bits=W,(_.wsize||U!==E.avail_out&&_.mode<30&&(_.mode<27||L!==4))&&D(E,E.output,E.next_out,U-E.avail_out)?(_.mode=31,-4):(ce-=E.avail_in,U-=E.avail_out,E.total_in+=ce,E.total_out+=U,_.total+=U,_.wrap&&U&&(E.adler=_.check=_.flags?l(_.check,ee,U,E.next_out-U):a(_.check,ee,U,E.next_out-U)),E.data_type=_.bits+(_.last?64:0)+(_.mode===12?128:0)+(_.mode===20||_.mode===15?256:0),(ce==0&&U===0||L===4)&&X===h&&(X=-5),X)},o.inflateEnd=function(E){if(!E||!E.state)return m;var L=E.state;return L.window&&(L.window=null),E.state=null,h},o.inflateGetHeader=function(E,L){var _;return E&&E.state?(2&(_=E.state).wrap)==0?m:((_.head=L).done=!1,h):m},o.inflateSetDictionary=function(E,L){var _,F=L.length;return E&&E.state?(_=E.state).wrap!==0&&_.mode!==11?m:_.mode===11&&a(1,L,F,0)!==_.check?-3:D(E,L,F,F)?(_.mode=31,-4):(_.havedict=1,h):m},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,s,o){var i=n("../utils/common"),a=[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];s.exports=function(d,f,h,m,v,g,x,b){var y,k,j,S,T,N,I,A,O,D=b.bits,E=0,L=0,_=0,F=0,ee=0,$=0,H=0,q=0,ue=0,V=0,W=null,ce=0,U=new i.Buf16(16),Q=new i.Buf16(16),Ce=null,oe=0;for(E=0;E<=15;E++)U[E]=0;for(L=0;L<m;L++)U[f[h+L]]++;for(ee=D,F=15;1<=F&&U[F]===0;F--);if(F<ee&&(ee=F),F===0)return v[g++]=20971520,v[g++]=20971520,b.bits=1,0;for(_=1;_<F&&U[_]===0;_++);for(ee<_&&(ee=_),E=q=1;E<=15;E++)if(q<<=1,(q-=U[E])<0)return-1;if(0<q&&(d===0||F!==1))return-1;for(Q[1]=0,E=1;E<15;E++)Q[E+1]=Q[E]+U[E];for(L=0;L<m;L++)f[h+L]!==0&&(x[Q[f[h+L]]++]=L);if(N=d===0?(W=Ce=x,19):d===1?(W=a,ce-=257,Ce=l,oe-=257,256):(W=c,Ce=u,-1),E=_,T=g,H=L=V=0,j=-1,S=(ue=1<<($=ee))-1,d===1&&852<ue||d===2&&592<ue)return 1;for(;;){for(I=E-H,O=x[L]<N?(A=0,x[L]):x[L]>N?(A=Ce[oe+x[L]],W[ce+x[L]]):(A=96,0),y=1<<E-H,_=k=1<<$;v[T+(V>>H)+(k-=y)]=I<<24|A<<16|O|0,k!==0;);for(y=1<<E-1;V&y;)y>>=1;if(y!==0?(V&=y-1,V+=y):V=0,L++,--U[E]==0){if(E===F)break;E=f[h+x[L]]}if(ee<E&&(V&S)!==j){for(H===0&&(H=ee),T+=_,q=1<<($=E-H);$+H<F&&!((q-=U[$+H])<=0);)$++,q<<=1;if(ue+=1<<$,d===1&&852<ue||d===2&&592<ue)return 1;v[j=V&S]=ee<<24|$<<16|T-g|0}}return V!==0&&(v[T+V]=E-H<<24|64<<16|0),b.bits=ee,0}},{"../utils/common":41}],51:[function(n,s,o){s.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,s,o){var i=n("../utils/common"),a=0,l=1;function c(R){for(var B=R.length;0<=--B;)R[B]=0}var u=0,d=29,f=256,h=f+1+d,m=30,v=19,g=2*h+1,x=15,b=16,y=7,k=256,j=16,S=17,T=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],I=[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],D=new Array(2*(h+2));c(D);var E=new Array(2*m);c(E);var L=new Array(512);c(L);var _=new Array(256);c(_);var F=new Array(d);c(F);var ee,$,H,q=new Array(m);function ue(R,B,se,ne,Z){this.static_tree=R,this.extra_bits=B,this.extra_base=se,this.elems=ne,this.max_length=Z,this.has_stree=R&&R.length}function V(R,B){this.dyn_tree=R,this.max_code=0,this.stat_desc=B}function W(R){return R<256?L[R]:L[256+(R>>>7)]}function ce(R,B){R.pending_buf[R.pending++]=255&B,R.pending_buf[R.pending++]=B>>>8&255}function U(R,B,se){R.bi_valid>b-se?(R.bi_buf|=B<<R.bi_valid&65535,ce(R,R.bi_buf),R.bi_buf=B>>b-R.bi_valid,R.bi_valid+=se-b):(R.bi_buf|=B<<R.bi_valid&65535,R.bi_valid+=se)}function Q(R,B,se){U(R,se[2*B],se[2*B+1])}function Ce(R,B){for(var se=0;se|=1&R,R>>>=1,se<<=1,0<--B;);return se>>>1}function oe(R,B,se){var ne,Z,ae=new Array(x+1),z=0;for(ne=1;ne<=x;ne++)ae[ne]=z=z+se[ne-1]<<1;for(Z=0;Z<=B;Z++){var M=R[2*Z+1];M!==0&&(R[2*Z]=Ce(ae[M]++,M))}}function pe(R){var B;for(B=0;B<h;B++)R.dyn_ltree[2*B]=0;for(B=0;B<m;B++)R.dyn_dtree[2*B]=0;for(B=0;B<v;B++)R.bl_tree[2*B]=0;R.dyn_ltree[2*k]=1,R.opt_len=R.static_len=0,R.last_lit=R.matches=0}function ge(R){8<R.bi_valid?ce(R,R.bi_buf):0<R.bi_valid&&(R.pending_buf[R.pending++]=R.bi_buf),R.bi_buf=0,R.bi_valid=0}function me(R,B,se,ne){var Z=2*B,ae=2*se;return R[Z]<R[ae]||R[Z]===R[ae]&&ne[B]<=ne[se]}function xe(R,B,se){for(var ne=R.heap[se],Z=se<<1;Z<=R.heap_len&&(Z<R.heap_len&&me(B,R.heap[Z+1],R.heap[Z],R.depth)&&Z++,!me(B,ne,R.heap[Z],R.depth));)R.heap[se]=R.heap[Z],se=Z,Z<<=1;R.heap[se]=ne}function ke(R,B,se){var ne,Z,ae,z,M=0;if(R.last_lit!==0)for(;ne=R.pending_buf[R.d_buf+2*M]<<8|R.pending_buf[R.d_buf+2*M+1],Z=R.pending_buf[R.l_buf+M],M++,ne===0?Q(R,Z,B):(Q(R,(ae=_[Z])+f+1,B),(z=N[ae])!==0&&U(R,Z-=F[ae],z),Q(R,ae=W(--ne),se),(z=I[ae])!==0&&U(R,ne-=q[ae],z)),M<R.last_lit;);Q(R,k,B)}function Ae(R,B){var se,ne,Z,ae=B.dyn_tree,z=B.stat_desc.static_tree,M=B.stat_desc.has_stree,J=B.stat_desc.elems,re=-1;for(R.heap_len=0,R.heap_max=g,se=0;se<J;se++)ae[2*se]!==0?(R.heap[++R.heap_len]=re=se,R.depth[se]=0):ae[2*se+1]=0;for(;R.heap_len<2;)ae[2*(Z=R.heap[++R.heap_len]=re<2?++re:0)]=1,R.depth[Z]=0,R.opt_len--,M&&(R.static_len-=z[2*Z+1]);for(B.max_code=re,se=R.heap_len>>1;1<=se;se--)xe(R,ae,se);for(Z=J;se=R.heap[1],R.heap[1]=R.heap[R.heap_len--],xe(R,ae,1),ne=R.heap[1],R.heap[--R.heap_max]=se,R.heap[--R.heap_max]=ne,ae[2*Z]=ae[2*se]+ae[2*ne],R.depth[Z]=(R.depth[se]>=R.depth[ne]?R.depth[se]:R.depth[ne])+1,ae[2*se+1]=ae[2*ne+1]=Z,R.heap[1]=Z++,xe(R,ae,1),2<=R.heap_len;);R.heap[--R.heap_max]=R.heap[1],(function(ie,he){var je,Se,ze,Be,At,ln,mt=he.dyn_tree,nt=he.max_code,Yt=he.stat_desc.static_tree,Jn=he.stat_desc.has_stree,$e=he.stat_desc.extra_bits,ft=he.stat_desc.extra_base,Xe=he.stat_desc.max_length,Bt=0;for(Be=0;Be<=x;Be++)ie.bl_count[Be]=0;for(mt[2*ie.heap[ie.heap_max]+1]=0,je=ie.heap_max+1;je<g;je++)Xe<(Be=mt[2*mt[2*(Se=ie.heap[je])+1]+1]+1)&&(Be=Xe,Bt++),mt[2*Se+1]=Be,nt<Se||(ie.bl_count[Be]++,At=0,ft<=Se&&(At=$e[Se-ft]),ln=mt[2*Se],ie.opt_len+=ln*(Be+At),Jn&&(ie.static_len+=ln*(Yt[2*Se+1]+At)));if(Bt!==0){do{for(Be=Xe-1;ie.bl_count[Be]===0;)Be--;ie.bl_count[Be]--,ie.bl_count[Be+1]+=2,ie.bl_count[Xe]--,Bt-=2}while(0<Bt);for(Be=Xe;Be!==0;Be--)for(Se=ie.bl_count[Be];Se!==0;)nt<(ze=ie.heap[--je])||(mt[2*ze+1]!==Be&&(ie.opt_len+=(Be-mt[2*ze+1])*mt[2*ze],mt[2*ze+1]=Be),Se--)}})(R,B),oe(ae,re,R.bl_count)}function w(R,B,se){var ne,Z,ae=-1,z=B[1],M=0,J=7,re=4;for(z===0&&(J=138,re=3),B[2*(se+1)+1]=65535,ne=0;ne<=se;ne++)Z=z,z=B[2*(ne+1)+1],++M<J&&Z===z||(M<re?R.bl_tree[2*Z]+=M:Z!==0?(Z!==ae&&R.bl_tree[2*Z]++,R.bl_tree[2*j]++):M<=10?R.bl_tree[2*S]++:R.bl_tree[2*T]++,ae=Z,re=(M=0)===z?(J=138,3):Z===z?(J=6,3):(J=7,4))}function X(R,B,se){var ne,Z,ae=-1,z=B[1],M=0,J=7,re=4;for(z===0&&(J=138,re=3),ne=0;ne<=se;ne++)if(Z=z,z=B[2*(ne+1)+1],!(++M<J&&Z===z)){if(M<re)for(;Q(R,Z,R.bl_tree),--M!=0;);else Z!==0?(Z!==ae&&(Q(R,Z,R.bl_tree),M--),Q(R,j,R.bl_tree),U(R,M-3,2)):M<=10?(Q(R,S,R.bl_tree),U(R,M-3,3)):(Q(R,T,R.bl_tree),U(R,M-11,7));ae=Z,re=(M=0)===z?(J=138,3):Z===z?(J=6,3):(J=7,4)}}c(q);var G=!1;function P(R,B,se,ne){U(R,(u<<1)+(ne?1:0),3),(function(Z,ae,z,M){ge(Z),ce(Z,z),ce(Z,~z),i.arraySet(Z.pending_buf,Z.window,ae,z,Z.pending),Z.pending+=z})(R,B,se)}o._tr_init=function(R){G||((function(){var B,se,ne,Z,ae,z=new Array(x+1);for(Z=ne=0;Z<d-1;Z++)for(F[Z]=ne,B=0;B<1<<N[Z];B++)_[ne++]=Z;for(_[ne-1]=Z,Z=ae=0;Z<16;Z++)for(q[Z]=ae,B=0;B<1<<I[Z];B++)L[ae++]=Z;for(ae>>=7;Z<m;Z++)for(q[Z]=ae<<7,B=0;B<1<<I[Z]-7;B++)L[256+ae++]=Z;for(se=0;se<=x;se++)z[se]=0;for(B=0;B<=143;)D[2*B+1]=8,B++,z[8]++;for(;B<=255;)D[2*B+1]=9,B++,z[9]++;for(;B<=279;)D[2*B+1]=7,B++,z[7]++;for(;B<=287;)D[2*B+1]=8,B++,z[8]++;for(oe(D,h+1,z),B=0;B<m;B++)E[2*B+1]=5,E[2*B]=Ce(B,5);ee=new ue(D,N,f+1,h,x),$=new ue(E,I,0,m,x),H=new ue(new Array(0),A,0,v,y)})(),G=!0),R.l_desc=new V(R.dyn_ltree,ee),R.d_desc=new V(R.dyn_dtree,$),R.bl_desc=new V(R.bl_tree,H),R.bi_buf=0,R.bi_valid=0,pe(R)},o._tr_stored_block=P,o._tr_flush_block=function(R,B,se,ne){var Z,ae,z=0;0<R.level?(R.strm.data_type===2&&(R.strm.data_type=(function(M){var J,re=4093624447;for(J=0;J<=31;J++,re>>>=1)if(1&re&&M.dyn_ltree[2*J]!==0)return a;if(M.dyn_ltree[18]!==0||M.dyn_ltree[20]!==0||M.dyn_ltree[26]!==0)return l;for(J=32;J<f;J++)if(M.dyn_ltree[2*J]!==0)return l;return a})(R)),Ae(R,R.l_desc),Ae(R,R.d_desc),z=(function(M){var J;for(w(M,M.dyn_ltree,M.l_desc.max_code),w(M,M.dyn_dtree,M.d_desc.max_code),Ae(M,M.bl_desc),J=v-1;3<=J&&M.bl_tree[2*O[J]+1]===0;J--);return M.opt_len+=3*(J+1)+5+5+4,J})(R),Z=R.opt_len+3+7>>>3,(ae=R.static_len+3+7>>>3)<=Z&&(Z=ae)):Z=ae=se+5,se+4<=Z&&B!==-1?P(R,B,se,ne):R.strategy===4||ae===Z?(U(R,2+(ne?1:0),3),ke(R,D,E)):(U(R,4+(ne?1:0),3),(function(M,J,re,ie){var he;for(U(M,J-257,5),U(M,re-1,5),U(M,ie-4,4),he=0;he<ie;he++)U(M,M.bl_tree[2*O[he]+1],3);X(M,M.dyn_ltree,J-1),X(M,M.dyn_dtree,re-1)})(R,R.l_desc.max_code+1,R.d_desc.max_code+1,z+1),ke(R,R.dyn_ltree,R.dyn_dtree)),pe(R),ne&&ge(R)},o._tr_tally=function(R,B,se){return R.pending_buf[R.d_buf+2*R.last_lit]=B>>>8&255,R.pending_buf[R.d_buf+2*R.last_lit+1]=255&B,R.pending_buf[R.l_buf+R.last_lit]=255&se,R.last_lit++,B===0?R.dyn_ltree[2*se]++:(R.matches++,B--,R.dyn_ltree[2*(_[se]+f+1)]++,R.dyn_dtree[2*W(B)]++),R.last_lit===R.lit_bufsize-1},o._tr_align=function(R){U(R,2,3),Q(R,k,D),(function(B){B.bi_valid===16?(ce(B,B.bi_buf),B.bi_buf=0,B.bi_valid=0):8<=B.bi_valid&&(B.pending_buf[B.pending++]=255&B.bi_buf,B.bi_buf>>=8,B.bi_valid-=8)})(R)}},{"../utils/common":41}],53:[function(n,s,o){s.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,s,o){(function(i){(function(a,l){if(!a.setImmediate){var c,u,d,f,h=1,m={},v=!1,g=a.document,x=Object.getPrototypeOf&&Object.getPrototypeOf(a);x=x&&x.setTimeout?x:a,c={}.toString.call(a.process)==="[object process]"?function(j){process.nextTick(function(){y(j)})}:(function(){if(a.postMessage&&!a.importScripts){var j=!0,S=a.onmessage;return a.onmessage=function(){j=!1},a.postMessage("","*"),a.onmessage=S,j}})()?(f="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",k,!1):a.attachEvent("onmessage",k),function(j){a.postMessage(f+j,"*")}):a.MessageChannel?((d=new MessageChannel).port1.onmessage=function(j){y(j.data)},function(j){d.port2.postMessage(j)}):g&&"onreadystatechange"in g.createElement("script")?(u=g.documentElement,function(j){var S=g.createElement("script");S.onreadystatechange=function(){y(j),S.onreadystatechange=null,u.removeChild(S),S=null},u.appendChild(S)}):function(j){setTimeout(y,0,j)},x.setImmediate=function(j){typeof j!="function"&&(j=new Function(""+j));for(var S=new Array(arguments.length-1),T=0;T<S.length;T++)S[T]=arguments[T+1];var N={callback:j,args:S};return m[h]=N,c(h),h++},x.clearImmediate=b}function b(j){delete m[j]}function y(j){if(v)setTimeout(y,0,j);else{var S=m[j];if(S){v=!0;try{(function(T){var N=T.callback,I=T.args;switch(I.length){case 0:N();break;case 1:N(I[0]);break;case 2:N(I[0],I[1]);break;case 3:N(I[0],I[1],I[2]);break;default:N.apply(l,I)}})(S)}finally{b(j),v=!1}}}}function k(j){j.source===a&&typeof j.data=="string"&&j.data.indexOf(f)===0&&y(+j.data.slice(f.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof mr<"u"?mr:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(bi)),bi.exports}var l_=a_();const c_=M0(l_),u_="3.0.12",ca={version:u_},Lf="[REDACTED]",d_=/(^|[-_])(api[-_]?key|authorization|cookie|token|secret|password|access[-_]?token|refresh[-_]?token)([-_]|$)/i,f_=[/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],Oc=200,p_=25e6,Df=50,h_=1e4;function m_(e){return e<1024?`${e} chars`:e<1024*1024?`${Math.ceil(e/1024)} KB`:`${Math.ceil(e/(1024*1024))} MB`}function g_(e){let t=0;for(const n of e)t+=n.rawRequestBody?.length??0,t+=n.responseText?.length??0;return t}function x_(e){if(e.length>Oc)return`Export is limited to ${Oc} logs at once. Narrow the filter and try again.`;const t=g_(e);return t>p_?`Export is too large (${m_(t)} of text). Narrow the filter and try again.`:null}function wr(e){return e?.aborted===!0?{ok:!1,message:"Export canceled.",canceled:!0}:null}async function b_(e,t){try{const n=await Pn(`/api/logs/${e}/chunks`,h_,{signal:t});if(!n.ok)return null;const s=await n.json();return JSON.stringify(s,null,2)}catch{return null}}function v_(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ua(e){if(Array.isArray(e))return e.map(n=>ua(n));if(!v_(e))return e;const t={};for(const[n,s]of Object.entries(e))t[n]=d_.test(n)?Lf:ua(s);return t}function y_(e){const t=n=>{let s=n;for(const o of f_)s=s.replace(o,Lf);return s};try{const n=JSON.parse(e);return t(JSON.stringify(ua(n),null,2))}catch{return t(e)}}function vi(e,t){return t==="redacted"?y_(e):e}function w_(e,t){return{...e,rawRequestBody:null,responseText:null,rawHeaders:t==="raw"?e.rawHeaders:void 0,headers:t==="raw"?e.headers:void 0,streamingChunks:void 0,bodyContentMode:"compact"}}function __(e,t,n,s=new Date().toISOString()){return{version:ca.version,exportedAt:s,mode:t,redacted:t==="redacted",logCount:e.length,logIds:e.map(o=>o.id),streamingChunkExportLimit:Df,streamingChunkLogIds:n.map(o=>o.id)}}async function k_(e,t="redacted",n={}){const s=wr(n.signal);if(s!==null)return s;const o=x_(e);if(o!==null)return{ok:!1,message:o};const i=new c_,a=t==="redacted"?"redacted":"raw",l=e.filter(h=>h.streaming).slice(0,Df);i.file("manifest.json",JSON.stringify(__(e,t,l),null,2)),i.file("logs.json",JSON.stringify(e.map(h=>w_(h,t)),null,2));for(const h of e){const m=wr(n.signal);if(m!==null)return m;h.rawRequestBody!==null&&i.file(`#${h.id}.Request.json`,vi(h.rawRequestBody,t)),h.responseText!==null&&i.file(`#${h.id}.Response.json`,vi(h.responseText,t))}for(const h of l){const m=wr(n.signal);if(m!==null)return m;const v=await b_(h.id,n.signal);v!==null&&i.file(`#${h.id}.SSE.Response.json`,vi(v,t))}const c=await i.generateAsync({type:"blob"}),u=wr(n.signal);if(u!==null)return u;const d=URL.createObjectURL(c),f=document.createElement("a");return f.href=d,f.download=`agent-inspector-export-${a}-${new Date().toISOString().slice(0,10)}.zip`,document.body.appendChild(f),f.click(),document.body.removeChild(f),URL.revokeObjectURL(d),{ok:!0}}function j_(e,t){if(e!==null){e.removeAllRanges();for(const n of t)e.addRange(n)}}function S_(e){if(e===null)return[];const t=[];for(let n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t}function C_(e){if(typeof document>"u")return!1;const t=document.activeElement,n=document.getSelection(),s=S_(n),o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style.position="fixed",o.style.top="0",o.style.left="-9999px",o.style.opacity="0",document.body.appendChild(o),o.focus(),o.select(),o.setSelectionRange(0,e.length);let i=!1;try{i=document.execCommand("copy")}catch{}finally{document.body.removeChild(o),j_(n,s),typeof HTMLElement<"u"&&t instanceof HTMLElement&&t.focus({preventScroll:!0})}return i}async function Mt(e){const t=globalThis.navigator?.clipboard;if(t!==void 0)try{return await t.writeText(e),!0}catch{}return C_(e)}function da(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 yl(e,t,n){return`${da(e,n)} - ${da(t,n)}`}function _r(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function N_(e){switch(e){case"end_turn":case"tool_use":return e;case"max_tokens":return"length";default:return null}}function T_(e){switch(e){case"stop":case"length":return e;case"max_tokens":return"length";default:return null}}function E_(e){switch(e){case"max_output_tokens":case"max_tokens":return!0;default:return!1}}function $f(e){if(e.responseText===null)return null;try{let t=JSON.parse(e.responseText);if(typeof t=="string"&&(t=JSON.parse(t)),!_r(t))return null;if(typeof t.stop_reason=="string")return N_(t.stop_reason);if(Array.isArray(t.choices))for(const n of t.choices){if(!_r(n)||typeof n.finish_reason!="string")continue;const s=T_(n.finish_reason);if(s!==null)return s}if(Array.isArray(t.output)){for(const n of t.output)if(_r(n)&&n.type==="function_call")return"tool_use";if(t.status==="completed")return"stop"}if(t.status==="incomplete"&&_r(t.incomplete_details)){const n=t.incomplete_details.reason;if(typeof n=="string"&&E_(n))return"length"}return null}catch{return null}}function wl(e){return e==="end_turn"||e==="stop"||e==="length"}function Ff(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ff(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function Bf(){for(var e,t,n=0,s="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ff(e))&&(s&&(s+=" "),s+=t);return s}const A_=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},R_=(e,t)=>({classGroupId:e,validator:t}),Uf=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),uo="-",Pc=[],I_="arbitrary..",z_=e=>{const t=P_(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return O_(a);const l=a.split(uo),c=l[0]===""&&l.length>1?1:0;return Wf(l,c,t)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=s[a],u=n[a];return c?u?A_(u,c):c:u||Pc}return n[a]||Pc}}},Wf=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const u=Wf(e,t+1,i);if(u)return u}const a=n.validators;if(a===null)return;const l=t===0?e.join(uo):e.slice(t).join(uo),c=a.length;for(let u=0;u<c;u++){const d=a[u];if(d.validator(l))return d.classGroupId}},O_=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?I_+s:void 0})(),P_=e=>{const{theme:t,classGroups:n}=e;return M_(n,t)},M_=(e,t)=>{const n=Uf();for(const s in e){const o=e[s];_l(o,n,s,t)}return n},_l=(e,t,n,s)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];L_(a,t,n,s)}},L_=(e,t,n,s)=>{if(typeof e=="string"){D_(e,t,n);return}if(typeof e=="function"){$_(e,t,n,s);return}F_(e,t,n,s)},D_=(e,t,n)=>{const s=e===""?t:Hf(t,e);s.classGroupId=n},$_=(e,t,n,s)=>{if(B_(e)){_l(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(R_(n,e))},F_=(e,t,n,s)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[l,c]=o[a];_l(c,Hf(t,l),n,s)}},Hf=(e,t)=>{let n=e;const s=t.split(uo),o=s.length;for(let i=0;i<o;i++){const a=s[i];let l=n.nextPart.get(a);l||(l=Uf(),n.nextPart.set(a,l)),n=l}return n},B_=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,U_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=s[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},fa="!",Mc=":",W_=[],Lc=(e,t,n,s,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:o}),H_=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=o=>{const i=[];let a=0,l=0,c=0,u;const d=o.length;for(let g=0;g<d;g++){const x=o[g];if(a===0&&l===0){if(x===Mc){i.push(o.slice(c,g)),c=g+1;continue}if(x==="/"){u=g;continue}}x==="["?a++:x==="]"?a--:x==="("?l++:x===")"&&l--}const f=i.length===0?o:o.slice(c);let h=f,m=!1;f.endsWith(fa)?(h=f.slice(0,-1),m=!0):f.startsWith(fa)&&(h=f.slice(1),m=!0);const v=u&&u>c?u-c:void 0;return Lc(i,m,h,v)};if(t){const o=t+Mc,i=s;s=a=>a.startsWith(o)?i(a.slice(o.length)):Lc(W_,!1,a,void 0,!0)}if(n){const o=s;s=i=>n({className:i,parseClassName:o})}return s},V_=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let o=[];for(let i=0;i<n.length;i++){const a=n[i],l=a[0]==="[",c=t.has(a);l||c?(o.length>0&&(o.sort(),s.push(...o),o=[]),s.push(a)):o.push(a)}return o.length>0&&(o.sort(),s.push(...o)),s}},Z_=e=>({cache:U_(e.cacheSize),parseClassName:H_(e),sortModifiers:V_(e),...z_(e)}),q_=/\s+/,G_=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],l=e.trim().split(q_);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:h,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:g}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let x=!!g,b=s(x?v.substring(0,g):v);if(!b){if(!x){c=d+(c.length>0?" "+c:c);continue}if(b=s(v),!b){c=d+(c.length>0?" "+c:c);continue}x=!1}const y=h.length===0?"":h.length===1?h[0]:i(h).join(":"),k=m?y+fa:y,j=k+b;if(a.indexOf(j)>-1)continue;a.push(j);const S=o(b,x);for(let T=0;T<S.length;++T){const N=S[T];a.push(k+N)}c=d+(c.length>0?" "+c:c)}return c},K_=(...e)=>{let t=0,n,s,o="";for(;t<e.length;)(n=e[t++])&&(s=Vf(n))&&(o&&(o+=" "),o+=s);return o},Vf=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=Vf(e[s]))&&(n&&(n+=" "),n+=t);return n},J_=(e,...t)=>{let n,s,o,i;const a=c=>{const u=t.reduce((d,f)=>f(d),e());return n=Z_(u),s=n.cache.get,o=n.cache.set,i=l,l(c)},l=c=>{const u=s(c);if(u)return u;const d=G_(c,n);return o(c,d),d};return i=a,(...c)=>i(K_(...c))},Y_=[],Ye=e=>{const t=n=>n[e]||Y_;return t.isThemeGetter=!0,t},Zf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,X_=/^\d+\/\d+$/,Q_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ek=/\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$/,tk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yn=e=>X_.test(e),Ie=e=>!!e&&!Number.isNaN(Number(e)),cn=e=>!!e&&Number.isInteger(Number(e)),yi=e=>e.endsWith("%")&&Ie(e.slice(0,-1)),Xt=e=>Q_.test(e),rk=()=>!0,ok=e=>ek.test(e)&&!tk.test(e),Gf=()=>!1,ik=e=>nk.test(e),ak=e=>sk.test(e),lk=e=>!be(e)&&!ve(e),ck=e=>Ns(e,Yf,Gf),be=e=>Zf.test(e),En=e=>Ns(e,Xf,ok),wi=e=>Ns(e,hk,Ie),Dc=e=>Ns(e,Kf,Gf),uk=e=>Ns(e,Jf,ak),kr=e=>Ns(e,Qf,ik),ve=e=>qf.test(e),zs=e=>Ts(e,Xf),dk=e=>Ts(e,mk),$c=e=>Ts(e,Kf),fk=e=>Ts(e,Yf),pk=e=>Ts(e,Jf),jr=e=>Ts(e,Qf,!0),Ns=(e,t,n)=>{const s=Zf.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},Ts=(e,t,n=!1)=>{const s=qf.exec(e);return s?s[1]?t(s[1]):n:!1},Kf=e=>e==="position"||e==="percentage",Jf=e=>e==="image"||e==="url",Yf=e=>e==="length"||e==="size"||e==="bg-size",Xf=e=>e==="length",hk=e=>e==="number",mk=e=>e==="family-name",Qf=e=>e==="shadow",gk=()=>{const e=Ye("color"),t=Ye("font"),n=Ye("text"),s=Ye("font-weight"),o=Ye("tracking"),i=Ye("leading"),a=Ye("breakpoint"),l=Ye("container"),c=Ye("spacing"),u=Ye("radius"),d=Ye("shadow"),f=Ye("inset-shadow"),h=Ye("text-shadow"),m=Ye("drop-shadow"),v=Ye("blur"),g=Ye("perspective"),x=Ye("aspect"),b=Ye("ease"),y=Ye("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...j(),ve,be],T=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],I=()=>[ve,be,c],A=()=>[Yn,"full","auto",...I()],O=()=>[cn,"none","subgrid",ve,be],D=()=>["auto",{span:["full",cn,ve,be]},cn,ve,be],E=()=>[cn,"auto",ve,be],L=()=>["auto","min","max","fr",ve,be],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...I()],$=()=>[Yn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],H=()=>[e,ve,be],q=()=>[...j(),$c,Dc,{position:[ve,be]}],ue=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",fk,ck,{size:[ve,be]}],W=()=>[yi,zs,En],ce=()=>["","none","full",u,ve,be],U=()=>["",Ie,zs,En],Q=()=>["solid","dashed","dotted","double"],Ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[Ie,yi,$c,Dc],pe=()=>["","none",v,ve,be],ge=()=>["none",Ie,ve,be],me=()=>["none",Ie,ve,be],xe=()=>[Ie,ve,be],ke=()=>[Yn,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xt],breakpoint:[Xt],color:[rk],container:[Xt],"drop-shadow":[Xt],ease:["in","out","in-out"],font:[lk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xt],shadow:[Xt],spacing:["px",Ie],text:[Xt],"text-shadow":[Xt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Yn,be,ve,x]}],container:["container"],columns:[{columns:[Ie,be,ve,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:S()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],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:[cn,"auto",ve,be]}],basis:[{basis:[Yn,"full","auto",l,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ie,Yn,"auto","initial","none",be]}],grow:[{grow:["",Ie,ve,be]}],shrink:[{shrink:["",Ie,ve,be]}],order:[{order:[cn,"first","last","none",ve,be]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:D()}],"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:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[l,"screen",...$()]}],"min-w":[{"min-w":[l,"screen","none",...$()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",n,zs,En]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,ve,wi]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",yi,be]}],"font-family":[{font:[dk,be,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,ve,be]}],"line-clamp":[{"line-clamp":[Ie,"none",ve,wi]}],leading:[{leading:[i,...I()]}],"list-image":[{"list-image":["none",ve,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ie,"from-font","auto",ve,En]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[Ie,"auto",ve,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,be]}],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",ve,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:ue()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},cn,ve,be],radial:["",ve,be],conic:[cn,ve,be]},pk,uk]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ie,ve,be]}],"outline-w":[{outline:["",Ie,zs,En]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",d,jr,kr]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",f,jr,kr]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[Ie,En]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",h,jr,kr]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[Ie,ve,be]}],"mix-blend":[{"mix-blend":[...Ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ce()}],"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":[Ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[ve,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":j()}],"mask-image-conic-pos":[{"mask-conic":[Ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:ue()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,be]}],filter:[{filter:["","none",ve,be]}],blur:[{blur:pe()}],brightness:[{brightness:[Ie,ve,be]}],contrast:[{contrast:[Ie,ve,be]}],"drop-shadow":[{"drop-shadow":["","none",m,jr,kr]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",Ie,ve,be]}],"hue-rotate":[{"hue-rotate":[Ie,ve,be]}],invert:[{invert:["",Ie,ve,be]}],saturate:[{saturate:[Ie,ve,be]}],sepia:[{sepia:["",Ie,ve,be]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,be]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[Ie,ve,be]}],"backdrop-contrast":[{"backdrop-contrast":[Ie,ve,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ie,ve,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ie,ve,be]}],"backdrop-invert":[{"backdrop-invert":["",Ie,ve,be]}],"backdrop-opacity":[{"backdrop-opacity":[Ie,ve,be]}],"backdrop-saturate":[{"backdrop-saturate":[Ie,ve,be]}],"backdrop-sepia":[{"backdrop-sepia":["",Ie,ve,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ie,"initial",ve,be]}],ease:[{ease:["linear","initial",b,ve,be]}],delay:[{delay:[Ie,ve,be]}],animate:[{animate:["none",y,ve,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,ve,be]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[ve,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"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:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",ve,be]}],"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":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",ve,be]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[Ie,zs,En,wi]}],stroke:[{stroke:["none",...H()]}],"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"]}},xk=J_(gk);function le(...e){return xk(Bf(e))}function Fe(e){return e>=1e6?(e/1e6).toFixed(1).replace(/\.0$/,"")+"M":(e/1e3).toFixed(1).replace(/\.0$/,"")+"K"}function ep(e){return e>=1024*1024?(e/(1024*1024)).toFixed(1).replace(/\.0$/,"")+"M":(e/1024).toFixed(1).replace(/\.0$/,"")+"K"}function Fc(e,t,n){const s=e*10;return!Number.isSafeInteger(s)||s%t!==0?null:(s/t/10).toFixed(1).replace(/\.0$/,"")+n}function bk(e){if(!Number.isSafeInteger(e)||e<=0)return e.toString();if(e>=1024*1024){const n=Fc(e,1048576,"M");if(n!==null)return n}const t=Fc(e,1024,"K");return t!==null?t:e.toString()}function vk(e){if(e===void 0||e==="")return 1;switch(e.toLowerCase()){case"k":return 1024;case"m":return 1024*1024;default:return null}}function fo(e){const t=e.trim().replaceAll(",","");if(t==="")return null;const n=/^(\d+(?:\.\d+)?)\s*([kKmM])?$/.exec(t);if(n===null)return null;const s=n[1];if(s===void 0)return null;const o=Number(s),i=n[2],a=vk(i);if(!Number.isFinite(o)||o<=0||a===null||(i===void 0||i==="")&&!Number.isInteger(o))return null;const l=Math.round(o*a);return!Number.isSafeInteger(l)||l<=0?null:l}function yk(e){return e===null?"pending":e>=200&&e<300?"success":e>=400&&e<500?"client_error":e>=500?"server_error":"pending"}const wk=Y({model:C().min(1),contextWindow:K().int().positive().optional(),outputLimit:K().int().positive().optional(),source:Ee(["manual","registry"]).optional(),sourceUrl:C().optional(),updatedAt:C().optional()}),po=Y({id:C(),name:C(),apiKey:C(),model:C().optional(),models:fe(C()).min(1),format:Ee(["anthropic","openai"]).optional(),baseUrl:C().optional(),anthropicBaseUrl:C().optional(),openaiBaseUrl:C().optional(),openaiResponsesBaseUrl:C().optional(),authHeader:Ee(["bearer","x-api-key"]).optional().default("bearer"),apiDocsUrl:C().optional(),modelMetadataUrl:C().optional(),modelMetadata:fe(wk).optional(),source:Ee(["company","personal"]).optional(),createdAt:C(),updatedAt:C()});async function _k(e){return Pt(e,po.array(),void 0,t=>`Failed to fetch ${e}: ${t.status}`)}function tp(){const e=nn("/api/providers?includeSecrets=1",_k,{revalidateOnFocus:!1,revalidateIfStale:!1});return{providers:e.data??[],isLoading:e.isLoading,isError:e.error,mutate:e.mutate}}function Ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Bc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function np(...e){return t=>{let n=!1;const s=e.map(o=>{const i=Bc(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<s.length;o++){const i=s[o];typeof i=="function"?i():Bc(e[o],null)}}}}function De(...e){return p.useCallback(np(...e),e)}function kk(e,t){const n=p.createContext(t),s=i=>{const{children:a,...l}=i,c=p.useMemo(()=>l,Object.values(l));return r.jsx(n.Provider,{value:c,children:a})};s.displayName=e+"Provider";function o(i){const a=p.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[s,o]}function an(e,t=[]){let n=[];function s(i,a){const l=p.createContext(a),c=n.length;n=[...n,a];const u=f=>{const{scope:h,children:m,...v}=f,g=h?.[e]?.[c]||l,x=p.useMemo(()=>v,Object.values(v));return r.jsx(g.Provider,{value:x,children:m})};u.displayName=i+"Provider";function d(f,h){const m=h?.[e]?.[c]||l,v=p.useContext(m);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(a=>p.createContext(a));return function(l){const c=l?.[e]||i;return p.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[s,jk(o,...t)]}function jk(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=s.reduce((l,{useScope:c,scopeName:u})=>{const f=c(i)[`__scope${u}`];return{...l,...f}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var et=globalThis?.document?p.useLayoutEffect:()=>{},Sk=Sd[" useId ".trim().toString()]||(()=>{}),Ck=0;function Vt(e){const[t,n]=p.useState(Sk());return et(()=>{n(s=>s??String(Ck++))},[e]),e||(t?`radix-${t}`:"")}var Nk=Sd[" useInsertionEffect ".trim().toString()]||et;function Ln({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[o,i,a]=Tk({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o;{const d=p.useRef(e!==void 0);p.useEffect(()=>{const f=d.current;f!==l&&console.warn(`${s} 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,s])}const u=p.useCallback(d=>{if(l){const f=Ek(d)?d(e):d;f!==e&&a.current?.(f)}else i(d)},[l,e,i,a]);return[c,u]}function Tk({defaultProp:e,onChange:t}){const[n,s]=p.useState(e),o=p.useRef(n),i=p.useRef(t);return Nk(()=>{i.current=t},[t]),p.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,s,i]}function Ek(e){return typeof e=="function"}function ys(e){const t=Rk(e),n=p.forwardRef((s,o)=>{const{children:i,...a}=s,l=p.Children.toArray(i),c=l.find(zk);if(c){const u=c.props.children,d=l.map(f=>f===c?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:f);return r.jsx(t,{...a,ref:o,children:p.isValidElement(u)?p.cloneElement(u,void 0,d):null})}return r.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var Ak=ys("Slot");function Rk(e){const t=p.forwardRef((n,s)=>{const{children:o,...i}=n;if(p.isValidElement(o)){const a=Pk(o),l=Ok(i,o.props);return o.type!==p.Fragment&&(l.ref=s?np(s,a):a),p.cloneElement(o,l)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sp=Symbol("radix.slottable");function Ik(e){const t=({children:n})=>r.jsx(r.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=sp,t}function zk(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sp}function Ok(e,t){const n={...t};for(const s in t){const o=e[s],i=t[s];/^on[A-Z]/.test(s)?o&&i?n[s]=(...l)=>{const c=i(...l);return o(...l),c}:o&&(n[s]=o):s==="style"?n[s]={...o,...i}:s==="className"&&(n[s]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Pk(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"],Re=Mk.reduce((e,t)=>{const n=ys(`Primitive.${t}`),s=p.forwardRef((o,i)=>{const{asChild:a,...l}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(c,{...l,ref:i})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function Lk(e,t){e&&rr.flushSync(()=>e.dispatchEvent(t))}function dt(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>t.current?.(...n),[])}function Dk(e,t=globalThis?.document){const n=dt(e);p.useEffect(()=>{const s=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var $k="DismissableLayer",pa="dismissableLayer.update",Fk="dismissableLayer.pointerDownOutside",Bk="dismissableLayer.focusOutside",Uc,rp=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wo=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...c}=e,u=p.useContext(rp),[d,f]=p.useState(null),h=d?.ownerDocument??globalThis?.document,[,m]=p.useState({}),v=De(t,N=>f(N)),g=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(x),y=d?g.indexOf(d):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,j=y>=b,S=Hk(N=>{const I=N.target,A=[...u.branches].some(O=>O.contains(I));!j||A||(o?.(N),a?.(N),N.defaultPrevented||l?.())},h),T=Vk(N=>{const I=N.target;[...u.branches].some(O=>O.contains(I))||(i?.(N),a?.(N),N.defaultPrevented||l?.())},h);return Dk(N=>{y===u.layers.size-1&&(s?.(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},h),p.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),Wc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Uc)}},[d,h,n,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Wc())},[d,u]),p.useEffect(()=>{const N=()=>m({});return document.addEventListener(pa,N),()=>document.removeEventListener(pa,N)},[]),r.jsx(Re.div,{...c,ref:v,style:{pointerEvents:k?j?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,S.onPointerDownCapture)})});Wo.displayName=$k;var Uk="DismissableLayerBranch",Wk=p.forwardRef((e,t)=>{const n=p.useContext(rp),s=p.useRef(null),o=De(t,s);return p.useEffect(()=>{const i=s.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),r.jsx(Re.div,{...e,ref:o})});Wk.displayName=Uk;function Hk(e,t=globalThis?.document){const n=dt(e),s=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=l=>{if(l.target&&!s.current){let c=function(){op(Fk,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);s.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function Vk(e,t=globalThis?.document){const n=dt(e),s=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!s.current&&op(Bk,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Wc(){const e=new CustomEvent(pa);document.dispatchEvent(e)}function op(e,t,n,{discrete:s}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),s?Lk(o,i):o.dispatchEvent(i)}var _i="focusScope.autoFocusOnMount",ki="focusScope.autoFocusOnUnmount",Hc={bubbles:!1,cancelable:!0},Zk="FocusScope",kl=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,c]=p.useState(null),u=dt(o),d=dt(i),f=p.useRef(null),h=De(t,g=>c(g)),m=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(s){let g=function(k){if(m.paused||!l)return;const j=k.target;l.contains(j)?f.current=j:hn(f.current,{select:!0})},x=function(k){if(m.paused||!l)return;const j=k.relatedTarget;j!==null&&(l.contains(j)||hn(f.current,{select:!0}))},b=function(k){if(document.activeElement===document.body)for(const S of k)S.removedNodes.length>0&&hn(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const y=new MutationObserver(b);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),y.disconnect()}}},[s,l,m.paused]),p.useEffect(()=>{if(l){Zc.add(m);const g=document.activeElement;if(!l.contains(g)){const b=new CustomEvent(_i,Hc);l.addEventListener(_i,u),l.dispatchEvent(b),b.defaultPrevented||(qk(Xk(ip(l)),{select:!0}),document.activeElement===g&&hn(l))}return()=>{l.removeEventListener(_i,u),setTimeout(()=>{const b=new CustomEvent(ki,Hc);l.addEventListener(ki,d),l.dispatchEvent(b),b.defaultPrevented||hn(g??document.body,{select:!0}),l.removeEventListener(ki,d),Zc.remove(m)},0)}}},[l,u,d,m]);const v=p.useCallback(g=>{if(!n&&!s||m.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(x&&b){const y=g.currentTarget,[k,j]=Gk(y);k&&j?!g.shiftKey&&b===j?(g.preventDefault(),n&&hn(k,{select:!0})):g.shiftKey&&b===k&&(g.preventDefault(),n&&hn(j,{select:!0})):b===y&&g.preventDefault()}},[n,s,m.paused]);return r.jsx(Re.div,{tabIndex:-1,...a,ref:h,onKeyDown:v})});kl.displayName=Zk;function qk(e,{select:t=!1}={}){const n=document.activeElement;for(const s of e)if(hn(s,{select:t}),document.activeElement!==n)return}function Gk(e){const t=ip(e),n=Vc(t,e),s=Vc(t.reverse(),e);return[n,s]}function ip(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const o=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||o?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Vc(e,t){for(const n of e)if(!Kk(n,{upTo:t}))return n}function Kk(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 Jk(e){return e instanceof HTMLInputElement&&"select"in e}function hn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Jk(e)&&t&&e.select()}}var Zc=Yk();function Yk(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=qc(e,t),e.unshift(t)},remove(t){e=qc(e,t),e[0]?.resume()}}}function qc(e,t){const n=[...e],s=n.indexOf(t);return s!==-1&&n.splice(s,1),n}function Xk(e){return e.filter(t=>t.tagName!=="A")}var Qk="Portal",Ho=p.forwardRef((e,t)=>{const{container:n,...s}=e,[o,i]=p.useState(!1);et(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?L0.createPortal(r.jsx(Re.div,{...s,ref:t}),a):null});Ho.displayName=Qk;function e5(e,t){return p.useReducer((n,s)=>t[n][s]??n,e)}var Nt=e=>{const{present:t,children:n}=e,s=t5(t),o=typeof n=="function"?n({present:s.isPresent}):p.Children.only(n),i=De(s.ref,n5(o));return typeof n=="function"||s.isPresent?p.cloneElement(o,{ref:i}):null};Nt.displayName="Presence";function t5(e){const[t,n]=p.useState(),s=p.useRef(null),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[l,c]=e5(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=Sr(s.current);i.current=l==="mounted"?u:"none"},[l]),et(()=>{const u=s.current,d=o.current;if(d!==e){const h=i.current,m=Sr(u);e?c("MOUNT"):m==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),et(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=m=>{const g=Sr(s.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=m=>{m.target===t&&(i.current=Sr(s.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:p.useCallback(u=>{s.current=u?getComputedStyle(u):null,n(u)},[])}}function Sr(e){return e?.animationName||"none"}function n5(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 ji=0;function ap(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Gc()),document.body.insertAdjacentElement("beforeend",e[1]??Gc()),ji++,()=>{ji===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ji--}},[])}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 Ut=function(){return Ut=Object.assign||function(t){for(var n,s=1,o=arguments.length;s<o;s++){n=arguments[s];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ut.apply(this,arguments)};function lp(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n}function s5(e,t,n){if(n||arguments.length===2)for(var s=0,o=t.length,i;s<o;s++)(i||!(s in t))&&(i||(i=Array.prototype.slice.call(t,0,s)),i[s]=t[s]);return e.concat(i||Array.prototype.slice.call(t))}var qr="right-scroll-bar-position",Gr="width-before-scroll-bar",r5="with-scroll-bars-hidden",o5="--removed-body-scroll-bar-size";function Si(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function i5(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(s){var o=n.value;o!==s&&(n.value=s,n.callback(s,o))}}}})[0];return n.callback=t,n.facade}var a5=typeof window<"u"?p.useLayoutEffect:p.useEffect,Kc=new WeakMap;function l5(e,t){var n=i5(null,function(s){return e.forEach(function(o){return Si(o,s)})});return a5(function(){var s=Kc.get(n);if(s){var o=new Set(s),i=new Set(e),a=n.current;o.forEach(function(l){i.has(l)||Si(l,null)}),i.forEach(function(l){o.has(l)||Si(l,a)})}Kc.set(n,e)},[e]),n}function c5(e){return e}function u5(e,t){t===void 0&&(t=c5);var n=[],s=!1,o={read:function(){if(s)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(i){var a=t(i,s);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(s=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){s=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(i),a=n}var c=function(){var d=a;a=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return o}function d5(e){e===void 0&&(e={});var t=u5(null);return t.options=Ut({async:!0,ssr:!1},e),t}var cp=function(e){var t=e.sideCar,n=lp(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return p.createElement(s,Ut({},n))};cp.isSideCarExport=!0;function f5(e,t){return e.useMedium(t),cp}var up=d5(),Ci=function(){},Vo=p.forwardRef(function(e,t){var n=p.useRef(null),s=p.useState({onScrollCapture:Ci,onWheelCapture:Ci,onTouchMoveCapture:Ci}),o=s[0],i=s[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,m=e.noRelative,v=e.noIsolation,g=e.inert,x=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,k=e.gapMode,j=lp(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,T=l5([n,t]),N=Ut(Ut({},j),o);return p.createElement(p.Fragment,null,d&&p.createElement(S,{sideCar:up,removeScrollBar:u,shards:f,noRelative:m,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:k}),a?p.cloneElement(p.Children.only(l),Ut(Ut({},N),{ref:T})):p.createElement(y,Ut({},N,{className:c,ref:T}),l))});Vo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vo.classNames={fullWidth:Gr,zeroRight:qr};var p5=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function h5(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=p5();return t&&e.setAttribute("nonce",t),e}function m5(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function g5(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var x5=function(){var e=0,t=null;return{add:function(n){e==0&&(t=h5())&&(m5(t,n),g5(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},b5=function(){var e=x5();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},dp=function(){var e=b5(),t=function(n){var s=n.styles,o=n.dynamic;return e(s,o),null};return t},v5={left:0,top:0,right:0,gap:0},Ni=function(e){return parseInt(e||"",10)||0},y5=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ni(n),Ni(s),Ni(o)]},w5=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return v5;var t=y5(e),n=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-n+t[2]-t[0])}},_5=dp(),fs="data-scroll-locked",k5=function(e,t,n,s){var o=e.left,i=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
41
|
+
\0`,U+=i(V,2),U+=T.magic,U+=i(k,2),U+=i(j,2),U+=i(ue.crc32,4),U+=i(ue.compressedSize,4),U+=i(ue.uncompressedSize,4),U+=i(I.length,2),U+=i(F.length,2),{fileRecord:f.LOCAL_FILE_HEADER+U+I+F,dirRecord:f.CENTRAL_FILE_HEADER+i(ce,2)+U+i(D.length,2)+"\0\0\0\0"+i(W,4)+i(x,4)+I+F+D}}var l=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),f=n("../signature");function h(m,v,g,x){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=g,this.encodeFileName=x,this.streamFiles=m,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(m){var v=m.meta.percent||0,g=this.entriesCount,x=this._sources.length;this.accumulate?this.contentBuffer.push(m):(this.bytesWritten+=m.data.length,c.prototype.push.call(this,{data:m.data,meta:{currentFile:this.currentFile,percent:g?(v+100*(g-x-1))/g:100}}))},h.prototype.openedSource=function(m){this.currentSourceOffset=this.bytesWritten,this.currentFile=m.file.name;var v=this.streamFiles&&!m.file.dir;if(v){var g=a(m,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(m){this.accumulate=!1;var v=this.streamFiles&&!m.file.dir,g=a(m,v,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),v)this.push({data:(function(x){return f.DATA_DESCRIPTOR+i(x.crc32,4)+i(x.compressedSize,4)+i(x.uncompressedSize,4)})(m),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var m=this.bytesWritten,v=0;v<this.dirRecords.length;v++)this.push({data:this.dirRecords[v],meta:{percent:100}});var g=this.bytesWritten-m,x=(function(b,y,k,j,S){var T=l.transformTo("string",S(j));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(b,2)+i(b,2)+i(y,4)+i(k,4)+i(T.length,2)+T})(this.dirRecords.length,g,m,this.zipComment,this.encodeFileName);this.push({data:x,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(m){this._sources.push(m);var v=this;return m.on("data",function(g){v.processChunk(g)}),m.on("end",function(){v.closedSource(v.previous.streamInfo),v._sources.length?v.prepareNextSource():v.end()}),m.on("error",function(g){v.error(g)}),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(m){var v=this._sources;if(!c.prototype.error.call(this,m))return!1;for(var g=0;g<v.length;g++)try{v[g].error(m)}catch{}return!0},h.prototype.lock=function(){c.prototype.lock.call(this);for(var m=this._sources,v=0;v<m.length;v++)m[v].lock()},s.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,s,o){var i=n("../compressions"),a=n("./ZipFileWorker");o.generateWorker=function(l,c,u){var d=new a(c.streamFiles,u,c.platform,c.encodeFileName),f=0;try{l.forEach(function(h,m){f++;var v=(function(y,k){var j=y||k,S=i[j];if(!S)throw new Error(j+" is not a valid compression method !");return S})(m.options.compression,c.compression),g=m.options.compressionOptions||c.compressionOptions||{},x=m.dir,b=m.date;m._compressWorker(v,g).withStreamInfo("file",{name:h,dir:x,date:b,comment:m.comment||"",unixPermissions:m.unixPermissions,dosPermissions:m.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(h){d.error(h)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,s,o){function i(){if(!(this instanceof i))return new i;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 a=new i;for(var l in this)typeof this[l]!="function"&&(a[l]=this[l]);return a}}(i.prototype=n("./object")).loadAsync=n("./load"),i.support=n("./support"),i.defaults=n("./defaults"),i.version="3.10.1",i.loadAsync=function(a,l){return new i().loadAsync(a,l)},i.external=n("./external"),s.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,s,o){var i=n("./utils"),a=n("./external"),l=n("./utf8"),c=n("./zipEntries"),u=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function f(h){return new a.Promise(function(m,v){var g=h.decompressed.getContentWorker().pipe(new u);g.on("error",function(x){v(x)}).on("end",function(){g.streamInfo.crc32!==h.decompressed.crc32?v(new Error("Corrupted zip : CRC32 mismatch")):m()}).resume()})}s.exports=function(h,m){var v=this;return m=i.extend(m||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:l.utf8decode}),d.isNode&&d.isStream(h)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",h,!0,m.optimizedBinaryString,m.base64).then(function(g){var x=new c(m);return x.load(g),x}).then(function(g){var x=[a.Promise.resolve(g)],b=g.files;if(m.checkCRC32)for(var y=0;y<b.length;y++)x.push(f(b[y]));return a.Promise.all(x)}).then(function(g){for(var x=g.shift(),b=x.files,y=0;y<b.length;y++){var k=b[y],j=k.fileNameStr,S=i.resolve(k.fileNameStr);v.file(S,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:m.createFolders}),k.dir||(v.file(S).unsafeOriginalName=j)}return x.zipComment.length&&(v.comment=x.zipComment),v})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,s,o){var i=n("../utils"),a=n("../stream/GenericWorker");function l(c,u){a.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}i.inherits(l,a),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!!a.prototype.pause.call(this)&&(this._stream.pause(),!0)},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},s.exports=l},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,s,o){var i=n("readable-stream").Readable;function a(l,c,u){i.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(a,i),a.prototype._read=function(){this._helper.resume()},s.exports=a},{"../utils":32,"readable-stream":16}],14:[function(n,s,o){s.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,a){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,a);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,a)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var a=new Buffer(i);return a.fill(0),a},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(n,s,o){function i(S,T,N){var I,A=l.getTypeOf(T),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&&(S=b(S)),O.createFolders&&(I=x(S))&&y.call(this,I,!0);var D=A==="string"&&O.binary===!1&&O.base64===!1;N&&N.binary!==void 0||(O.binary=!D),(T instanceof f&&T.uncompressedSize===0||O.dir||!T||T.length===0)&&(O.base64=!1,O.binary=!0,T="",O.compression="STORE",A="string");var E=null;E=T instanceof f||T instanceof c?T:v.isNode&&v.isStream(T)?new g(S,T):l.prepareContent(S,T,O.binary,O.optimizedBinaryString,O.base64);var L=new h(S,E,O);this.files[S]=L}var a=n("./utf8"),l=n("./utils"),c=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),d=n("./defaults"),f=n("./compressedObject"),h=n("./zipObject"),m=n("./generate"),v=n("./nodejsUtils"),g=n("./nodejs/NodejsStreamInputAdapter"),x=function(S){S.slice(-1)==="/"&&(S=S.substring(0,S.length-1));var T=S.lastIndexOf("/");return 0<T?S.substring(0,T):""},b=function(S){return S.slice(-1)!=="/"&&(S+="/"),S},y=function(S,T){return T=T!==void 0?T:d.createFolders,S=b(S),this.files[S]||i.call(this,S,null,{dir:!0,createFolders:T}),this.files[S]};function k(S){return Object.prototype.toString.call(S)==="[object RegExp]"}var j={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(S){var T,N,I;for(T in this.files)I=this.files[T],(N=T.slice(this.root.length,T.length))&&T.slice(0,this.root.length)===this.root&&S(N,I)},filter:function(S){var T=[];return this.forEach(function(N,I){S(N,I)&&T.push(I)}),T},file:function(S,T,N){if(arguments.length!==1)return S=this.root+S,i.call(this,S,T,N),this;if(k(S)){var I=S;return this.filter(function(O,D){return!D.dir&&I.test(O)})}var A=this.files[this.root+S];return A&&!A.dir?A:null},folder:function(S){if(!S)return this;if(k(S))return this.filter(function(A,O){return O.dir&&S.test(A)});var T=this.root+S,N=y.call(this,T),I=this.clone();return I.root=N.name,I},remove:function(S){S=this.root+S;var T=this.files[S];if(T||(S.slice(-1)!=="/"&&(S+="/"),T=this.files[S]),T&&!T.dir)delete this.files[S];else for(var N=this.filter(function(A,O){return O.name.slice(0,S.length)===S}),I=0;I<N.length;I++)delete this.files[N[I].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(S){var T,N={};try{if((N=l.extend(S||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:a.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 I=N.comment||this.comment||"";T=m.generateWorker(this,N,I)}catch(A){(T=new c("error")).error(A)}return new u(T,N.type||"string",N.mimeType)},generateAsync:function(S,T){return this.generateInternalStream(S).accumulate(T)},generateNodeStream:function(S,T){return(S=S||{}).type||(S.type="nodebuffer"),this.generateInternalStream(S).toNodejsStream(T)}};s.exports=j},{"./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,s,o){s.exports=n("stream")},{stream:void 0}],17:[function(n,s,o){var i=n("./DataReader");function a(l){i.call(this,l);for(var c=0;c<this.data.length;c++)l[c]=255&l[c]}n("../utils").inherits(a,i),a.prototype.byteAt=function(l){return this.data[this.zero+l]},a.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},a.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]},a.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},s.exports=a},{"../utils":32,"./DataReader":18}],18:[function(n,s,o){var i=n("../utils");function a(l){this.data=l,this.length=l.length,this.index=0,this.zero=0}a.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 i.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))}},s.exports=a},{"../utils":32}],19:[function(n,s,o){var i=n("./Uint8ArrayReader");function a(l){i.call(this,l)}n("../utils").inherits(a,i),a.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},s.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,s,o){var i=n("./DataReader");function a(l){i.call(this,l)}n("../utils").inherits(a,i),a.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},a.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},a.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},a.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},s.exports=a},{"../utils":32,"./DataReader":18}],21:[function(n,s,o){var i=n("./ArrayReader");function a(l){i.call(this,l)}n("../utils").inherits(a,i),a.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},s.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(n,s,o){var i=n("../utils"),a=n("../support"),l=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");s.exports=function(f){var h=i.getTypeOf(f);return i.checkSupport(h),h!=="string"||a.uint8array?h==="nodebuffer"?new u(f):a.uint8array?new d(i.transformTo("uint8array",f)):new l(i.transformTo("array",f)):new c(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,s,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,s,o){var i=n("./GenericWorker"),a=n("../utils");function l(c){i.call(this,"ConvertWorker to "+c),this.destType=c}a.inherits(l,i),l.prototype.processChunk=function(c){this.push({data:a.transformTo(this.destType,c.data),meta:c.meta})},s.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(n,s,o){var i=n("./GenericWorker"),a=n("../crc32");function l(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(l,i),l.prototype.processChunk=function(c){this.streamInfo.crc32=a(c.data,this.streamInfo.crc32||0),this.push(c)},s.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,s,o){var i=n("../utils"),a=n("./GenericWorker");function l(c){a.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}i.inherits(l,a),l.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}a.prototype.processChunk.call(this,c)},s.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(n,s,o){var i=n("../utils"),a=n("./GenericWorker");function l(c){a.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=i.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}i.inherits(l,a),l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.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}})},s.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(n,s,o){function i(a){this.name=a||"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}i.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,l){return this._listeners[a].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,l){if(this._listeners[a])for(var c=0;c<this._listeners[a].length;c++)this._listeners[a][c].call(this,l)},pipe:function(a){return a.registerPrevious(this)},registerPrevious:function(a){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=a.streamInfo,this.mergeStreamInfo(),this.previous=a;var l=this;return a.on("data",function(c){l.processChunk(c)}),a.on("end",function(){l.end()}),a.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 a=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),a=!0),this.previous&&this.previous.resume(),!a},flush:function(){},processChunk:function(a){this.push(a)},withStreamInfo:function(a,l){return this.extraStreamInfo[a]=l,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var a in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,a)&&(this.streamInfo[a]=this.extraStreamInfo[a])},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 a="Worker "+this.name;return this.previous?this.previous+" -> "+a:a}},s.exports=i},{}],29:[function(n,s,o){var i=n("../utils"),a=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(v,g){return new d.Promise(function(x,b){var y=[],k=v._internalType,j=v._outputType,S=v._mimeType;v.on("data",function(T,N){y.push(T),g&&g(N)}).on("error",function(T){y=[],b(T)}).on("end",function(){try{var T=(function(N,I,A){switch(N){case"blob":return i.newBlob(i.transformTo("arraybuffer",I),A);case"base64":return c.encode(I);default:return i.transformTo(N,I)}})(j,(function(N,I){var A,O=0,D=null,E=0;for(A=0;A<I.length;A++)E+=I[A].length;switch(N){case"string":return I.join("");case"array":return Array.prototype.concat.apply([],I);case"uint8array":for(D=new Uint8Array(E),A=0;A<I.length;A++)D.set(I[A],O),O+=I[A].length;return D;case"nodebuffer":return Buffer.concat(I);default:throw new Error("concat : unsupported type '"+N+"'")}})(k,y),S);x(T)}catch(N){b(N)}y=[]}).resume()})}function m(v,g,x){var b=g;switch(g){case"blob":case"arraybuffer":b="uint8array";break;case"base64":b="string"}try{this._internalType=b,this._outputType=g,this._mimeType=x,i.checkSupport(b),this._worker=v.pipe(new a(b)),v.lock()}catch(y){this._worker=new l("error"),this._worker.error(y)}}m.prototype={accumulate:function(v){return h(this,v)},on:function(v,g){var x=this;return v==="data"?this._worker.on(v,function(b){g.call(x,b.data,b.meta)}):this._worker.on(v,function(){i.delay(g,arguments,x)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(v){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},v)}},s.exports=m},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,s,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 i=new ArrayBuffer(0);try{o.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(i),o.blob=a.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,s,o){for(var i=n("./utils"),a=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(m){return a.nodebuffer?l.newBufferFrom(m,"utf-8"):(function(v){var g,x,b,y,k,j=v.length,S=0;for(y=0;y<j;y++)(64512&(x=v.charCodeAt(y)))==55296&&y+1<j&&(64512&(b=v.charCodeAt(y+1)))==56320&&(x=65536+(x-55296<<10)+(b-56320),y++),S+=x<128?1:x<2048?2:x<65536?3:4;for(g=a.uint8array?new Uint8Array(S):new Array(S),y=k=0;k<S;y++)(64512&(x=v.charCodeAt(y)))==55296&&y+1<j&&(64512&(b=v.charCodeAt(y+1)))==56320&&(x=65536+(x-55296<<10)+(b-56320),y++),x<128?g[k++]=x:(x<2048?g[k++]=192|x>>>6:(x<65536?g[k++]=224|x>>>12:(g[k++]=240|x>>>18,g[k++]=128|x>>>12&63),g[k++]=128|x>>>6&63),g[k++]=128|63&x);return g})(m)},o.utf8decode=function(m){return a.nodebuffer?i.transformTo("nodebuffer",m).toString("utf-8"):(function(v){var g,x,b,y,k=v.length,j=new Array(2*k);for(g=x=0;g<k;)if((b=v[g++])<128)j[x++]=b;else if(4<(y=u[b]))j[x++]=65533,g+=y-1;else{for(b&=y===2?31:y===3?15:7;1<y&&g<k;)b=b<<6|63&v[g++],y--;1<y?j[x++]=65533:b<65536?j[x++]=b:(b-=65536,j[x++]=55296|b>>10&1023,j[x++]=56320|1023&b)}return j.length!==x&&(j.subarray?j=j.subarray(0,x):j.length=x),i.applyFromCharCode(j)})(m=i.transformTo(a.uint8array?"uint8array":"array",m))},i.inherits(f,c),f.prototype.processChunk=function(m){var v=i.transformTo(a.uint8array?"uint8array":"array",m.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var g=v;(v=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),v.set(g,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var x=(function(y,k){var j;for((k=k||y.length)>y.length&&(k=y.length),j=k-1;0<=j&&(192&y[j])==128;)j--;return j<0||j===0?k:j+u[y[j]]>k?j:k})(v),b=v;x!==v.length&&(a.uint8array?(b=v.subarray(0,x),this.leftOver=v.subarray(x,v.length)):(b=v.slice(0,x),this.leftOver=v.slice(x,v.length))),this.push({data:o.utf8decode(b),meta:m.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=f,i.inherits(h,c),h.prototype.processChunk=function(m){this.push({data:o.utf8encode(m.data),meta:m.meta})},o.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,s,o){var i=n("./support"),a=n("./base64"),l=n("./nodejsUtils"),c=n("./external");function u(g){return g}function d(g,x){for(var b=0;b<g.length;++b)x[b]=255&g.charCodeAt(b);return x}n("setimmediate"),o.newBlob=function(g,x){o.checkSupport("blob");try{return new Blob([g],{type:x})}catch{try{var b=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return b.append(g),b.getBlob(x)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(g,x,b){var y=[],k=0,j=g.length;if(j<=b)return String.fromCharCode.apply(null,g);for(;k<j;)x==="array"||x==="nodebuffer"?y.push(String.fromCharCode.apply(null,g.slice(k,Math.min(k+b,j)))):y.push(String.fromCharCode.apply(null,g.subarray(k,Math.min(k+b,j)))),k+=b;return y.join("")},stringifyByChar:function(g){for(var x="",b=0;b<g.length;b++)x+=String.fromCharCode(g[b]);return x},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,l.allocBuffer(1)).length===1}catch{return!1}})()}};function h(g){var x=65536,b=o.getTypeOf(g),y=!0;if(b==="uint8array"?y=f.applyCanBeUsed.uint8array:b==="nodebuffer"&&(y=f.applyCanBeUsed.nodebuffer),y)for(;1<x;)try{return f.stringifyByChunk(g,b,x)}catch{x=Math.floor(x/2)}return f.stringifyByChar(g)}function m(g,x){for(var b=0;b<g.length;b++)x[b]=g[b];return x}o.applyFromCharCode=h;var v={};v.string={string:u,array:function(g){return d(g,new Array(g.length))},arraybuffer:function(g){return v.string.uint8array(g).buffer},uint8array:function(g){return d(g,new Uint8Array(g.length))},nodebuffer:function(g){return d(g,l.allocBuffer(g.length))}},v.array={string:h,array:u,arraybuffer:function(g){return new Uint8Array(g).buffer},uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return l.newBufferFrom(g)}},v.arraybuffer={string:function(g){return h(new Uint8Array(g))},array:function(g){return m(new Uint8Array(g),new Array(g.byteLength))},arraybuffer:u,uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return l.newBufferFrom(new Uint8Array(g))}},v.uint8array={string:h,array:function(g){return m(g,new Array(g.length))},arraybuffer:function(g){return g.buffer},uint8array:u,nodebuffer:function(g){return l.newBufferFrom(g)}},v.nodebuffer={string:h,array:function(g){return m(g,new Array(g.length))},arraybuffer:function(g){return v.nodebuffer.uint8array(g).buffer},uint8array:function(g){return m(g,new Uint8Array(g.length))},nodebuffer:u},o.transformTo=function(g,x){if(x=x||"",!g)return x;o.checkSupport(g);var b=o.getTypeOf(x);return v[b][g](x)},o.resolve=function(g){for(var x=g.split("/"),b=[],y=0;y<x.length;y++){var k=x[y];k==="."||k===""&&y!==0&&y!==x.length-1||(k===".."?b.pop():b.push(k))}return b.join("/")},o.getTypeOf=function(g){return typeof g=="string"?"string":Object.prototype.toString.call(g)==="[object Array]"?"array":i.nodebuffer&&l.isBuffer(g)?"nodebuffer":i.uint8array&&g instanceof Uint8Array?"uint8array":i.arraybuffer&&g instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(g){if(!i[g.toLowerCase()])throw new Error(g+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(g){var x,b,y="";for(b=0;b<(g||"").length;b++)y+="\\x"+((x=g.charCodeAt(b))<16?"0":"")+x.toString(16).toUpperCase();return y},o.delay=function(g,x,b){setImmediate(function(){g.apply(b||null,x||[])})},o.inherits=function(g,x){function b(){}b.prototype=x.prototype,g.prototype=new b},o.extend=function(){var g,x,b={};for(g=0;g<arguments.length;g++)for(x in arguments[g])Object.prototype.hasOwnProperty.call(arguments[g],x)&&b[x]===void 0&&(b[x]=arguments[g][x]);return b},o.prepareContent=function(g,x,b,y,k){return c.Promise.resolve(x).then(function(j){return i.blob&&(j instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(j))!==-1)&&typeof FileReader<"u"?new c.Promise(function(S,T){var N=new FileReader;N.onload=function(I){S(I.target.result)},N.onerror=function(I){T(I.target.error)},N.readAsArrayBuffer(j)}):j}).then(function(j){var S=o.getTypeOf(j);return S?(S==="arraybuffer"?j=o.transformTo("uint8array",j):S==="string"&&(k?j=a.decode(j):b&&y!==!0&&(j=(function(T){return d(T,i.uint8array?new Uint8Array(T.length):new Array(T.length))})(j))),j):c.Promise.reject(new Error("Can't read the data of '"+g+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,s,o){var i=n("./reader/readerFor"),a=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 ("+a.pretty(h)+", expected "+a.pretty(f)+")")}},isSignature:function(f,h){var m=this.reader.index;this.reader.setIndex(f);var v=this.reader.readString(4)===h;return this.reader.setIndex(m),v},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",m=a.transformTo(h,f);this.zipComment=this.loadOptions.decodeFileName(m)},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,m,v=this.zip64EndOfCentralSize-44;0<v;)f=this.reader.readInt(2),h=this.reader.readInt(4),m=this.reader.readData(h),this.zip64ExtensibleData[f]={id:f,length:h,value:m}},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===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.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 m=this.centralDirOffset+this.centralDirSize;this.zip64&&(m+=20,m+=12+this.zip64EndOfCentralSize);var v=h-m;if(0<v)this.isSignature(h,l.CENTRAL_FILE_HEADER)||(this.reader.zero=v);else if(v<0)throw new Error("Corrupted zip: missing "+Math.abs(v)+" bytes.")},prepareReader:function(f){this.reader=i(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},s.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,s,o){var i=n("./reader/readerFor"),a=n("./utils"),l=n("./compressedObject"),c=n("./crc32"),u=n("./utf8"),d=n("./compressions"),f=n("./support");function h(m,v){this.options=m,this.loadOptions=v}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(m){var v,g;if(m.skip(22),this.fileNameLength=m.readInt(2),g=m.readInt(2),this.fileName=m.readData(this.fileNameLength),m.skip(g),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((v=(function(x){for(var b in d)if(Object.prototype.hasOwnProperty.call(d,b)&&d[b].magic===x)return d[b];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new l(this.compressedSize,this.uncompressedSize,this.crc32,v,m.readData(this.compressedSize))},readCentralPart:function(m){this.versionMadeBy=m.readInt(2),m.skip(2),this.bitFlag=m.readInt(2),this.compressionMethod=m.readString(2),this.date=m.readDate(),this.crc32=m.readInt(4),this.compressedSize=m.readInt(4),this.uncompressedSize=m.readInt(4);var v=m.readInt(2);if(this.extraFieldsLength=m.readInt(2),this.fileCommentLength=m.readInt(2),this.diskNumberStart=m.readInt(2),this.internalFileAttributes=m.readInt(2),this.externalFileAttributes=m.readInt(4),this.localHeaderOffset=m.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");m.skip(v),this.readExtraFields(m),this.parseZIP64ExtraField(m),this.fileComment=m.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var m=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),m==0&&(this.dosPermissions=63&this.externalFileAttributes),m==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var m=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=m.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=m.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=m.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=m.readInt(4))}},readExtraFields:function(m){var v,g,x,b=m.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});m.index+4<b;)v=m.readInt(2),g=m.readInt(2),x=m.readData(g),this.extraFields[v]={id:v,length:g,value:x};m.setIndex(b)},handleUTF8:function(){var m=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var v=this.findExtraFieldUnicodePath();if(v!==null)this.fileNameStr=v;else{var g=a.transformTo(m,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(g)}var x=this.findExtraFieldUnicodeComment();if(x!==null)this.fileCommentStr=x;else{var b=a.transformTo(m,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(b)}}},findExtraFieldUnicodePath:function(){var m=this.extraFields[28789];if(m){var v=i(m.value);return v.readInt(1)!==1||c(this.fileName)!==v.readInt(4)?null:u.utf8decode(v.readData(m.length-5))}return null},findExtraFieldUnicodeComment:function(){var m=this.extraFields[25461];if(m){var v=i(m.value);return v.readInt(1)!==1||c(this.fileComment)!==v.readInt(4)?null:u.utf8decode(v.readData(m.length-5))}return null}},s.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,s,o){function i(v,g,x){this.name=v,this.dir=x.dir,this.date=x.date,this.comment=x.comment,this.unixPermissions=x.unixPermissions,this.dosPermissions=x.dosPermissions,this._data=g,this._dataBinary=x.binary,this.options={compression:x.compression,compressionOptions:x.compressionOptions}}var a=n("./stream/StreamHelper"),l=n("./stream/DataWorker"),c=n("./utf8"),u=n("./compressedObject"),d=n("./stream/GenericWorker");i.prototype={internalStream:function(v){var g=null,x="string";try{if(!v)throw new Error("No output type specified.");var b=(x=v.toLowerCase())==="string"||x==="text";x!=="binarystring"&&x!=="text"||(x="string"),g=this._decompressWorker();var y=!this._dataBinary;y&&!b&&(g=g.pipe(new c.Utf8EncodeWorker)),!y&&b&&(g=g.pipe(new c.Utf8DecodeWorker))}catch(k){(g=new d("error")).error(k)}return new a(g,x,"")},async:function(v,g){return this.internalStream(v).accumulate(g)},nodeStream:function(v,g){return this.internalStream(v||"nodebuffer").toNodejsStream(g)},_compressWorker:function(v,g){if(this._data instanceof u&&this._data.compression.magic===v.magic)return this._data.getCompressedWorker();var x=this._decompressWorker();return this._dataBinary||(x=x.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(x,v,g)},_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.")},m=0;m<f.length;m++)i.prototype[f[m]]=h;s.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,s,o){(function(i){var a,l,c=i.MutationObserver||i.WebKitMutationObserver;if(c){var u=0,d=new c(v),f=i.document.createTextNode("");d.observe(f,{characterData:!0}),a=function(){f.data=u=++u%2}}else if(i.setImmediate||i.MessageChannel===void 0)a="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var g=i.document.createElement("script");g.onreadystatechange=function(){v(),g.onreadystatechange=null,g.parentNode.removeChild(g),g=null},i.document.documentElement.appendChild(g)}:function(){setTimeout(v,0)};else{var h=new i.MessageChannel;h.port1.onmessage=v,a=function(){h.port2.postMessage(0)}}var m=[];function v(){var g,x;l=!0;for(var b=m.length;b;){for(x=m,m=[],g=-1;++g<b;)x[g]();b=m.length}l=!1}s.exports=function(g){m.push(g)!==1||l||a()}}).call(this,typeof mr<"u"?mr:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,s,o){var i=n("immediate");function a(){}var l={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function f(b){if(typeof b!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,b!==a&&g(this,b)}function h(b,y,k){this.promise=b,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function m(b,y,k){i(function(){var j;try{j=y(k)}catch(S){return l.reject(b,S)}j===b?l.reject(b,new TypeError("Cannot resolve promise with itself")):l.resolve(b,j)})}function v(b){var y=b&&b.then;if(b&&(typeof b=="object"||typeof b=="function")&&typeof y=="function")return function(){y.apply(b,arguments)}}function g(b,y){var k=!1;function j(N){k||(k=!0,l.reject(b,N))}function S(N){k||(k=!0,l.resolve(b,N))}var T=x(function(){y(S,j)});T.status==="error"&&j(T.value)}function x(b,y){var k={};try{k.value=b(y),k.status="success"}catch(j){k.status="error",k.value=j}return k}(s.exports=f).prototype.finally=function(b){if(typeof b!="function")return this;var y=this.constructor;return this.then(function(k){return y.resolve(b()).then(function(){return k})},function(k){return y.resolve(b()).then(function(){throw k})})},f.prototype.catch=function(b){return this.then(null,b)},f.prototype.then=function(b,y){if(typeof b!="function"&&this.state===u||typeof y!="function"&&this.state===c)return this;var k=new this.constructor(a);return this.state!==d?m(k,this.state===u?b:y,this.outcome):this.queue.push(new h(k,b,y)),k},h.prototype.callFulfilled=function(b){l.resolve(this.promise,b)},h.prototype.otherCallFulfilled=function(b){m(this.promise,this.onFulfilled,b)},h.prototype.callRejected=function(b){l.reject(this.promise,b)},h.prototype.otherCallRejected=function(b){m(this.promise,this.onRejected,b)},l.resolve=function(b,y){var k=x(v,y);if(k.status==="error")return l.reject(b,k.value);var j=k.value;if(j)g(b,j);else{b.state=u,b.outcome=y;for(var S=-1,T=b.queue.length;++S<T;)b.queue[S].callFulfilled(y)}return b},l.reject=function(b,y){b.state=c,b.outcome=y;for(var k=-1,j=b.queue.length;++k<j;)b.queue[k].callRejected(y);return b},f.resolve=function(b){return b instanceof this?b:l.resolve(new this(a),b)},f.reject=function(b){var y=new this(a);return l.reject(y,b)},f.all=function(b){var y=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=b.length,j=!1;if(!k)return this.resolve([]);for(var S=new Array(k),T=0,N=-1,I=new this(a);++N<k;)A(b[N],N);return I;function A(O,D){y.resolve(O).then(function(E){S[D]=E,++T!==k||j||(j=!0,l.resolve(I,S))},function(E){j||(j=!0,l.reject(I,E))})}},f.race=function(b){var y=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=b.length,j=!1;if(!k)return this.resolve([]);for(var S=-1,T=new this(a);++S<k;)N=b[S],y.resolve(N).then(function(I){j||(j=!0,l.resolve(T,I))},function(I){j||(j=!0,l.reject(T,I))});var N;return T}},{immediate:36}],38:[function(n,s,o){var i={};(0,n("./lib/utils/common").assign)(i,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),s.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,s,o){var i=n("./zlib/deflate"),a=n("./utils/common"),l=n("./utils/strings"),c=n("./zlib/messages"),u=n("./zlib/zstream"),d=Object.prototype.toString,f=0,h=-1,m=0,v=8;function g(b){if(!(this instanceof g))return new g(b);this.options=a.assign({level:h,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,to:""},b||{});var y=this.options;y.raw&&0<y.windowBits?y.windowBits=-y.windowBits:y.gzip&&0<y.windowBits&&y.windowBits<16&&(y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var k=i.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(k!==f)throw new Error(c[k]);if(y.header&&i.deflateSetHeader(this.strm,y.header),y.dictionary){var j;if(j=typeof y.dictionary=="string"?l.string2buf(y.dictionary):d.call(y.dictionary)==="[object ArrayBuffer]"?new Uint8Array(y.dictionary):y.dictionary,(k=i.deflateSetDictionary(this.strm,j))!==f)throw new Error(c[k]);this._dict_set=!0}}function x(b,y){var k=new g(y);if(k.push(b,!0),k.err)throw k.msg||c[k.err];return k.result}g.prototype.push=function(b,y){var k,j,S=this.strm,T=this.options.chunkSize;if(this.ended)return!1;j=y===~~y?y:y===!0?4:0,typeof b=="string"?S.input=l.string2buf(b):d.call(b)==="[object ArrayBuffer]"?S.input=new Uint8Array(b):S.input=b,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new a.Buf8(T),S.next_out=0,S.avail_out=T),(k=i.deflate(S,j))!==1&&k!==f)return this.onEnd(k),!(this.ended=!0);S.avail_out!==0&&(S.avail_in!==0||j!==4&&j!==2)||(this.options.to==="string"?this.onData(l.buf2binstring(a.shrinkBuf(S.output,S.next_out))):this.onData(a.shrinkBuf(S.output,S.next_out)))}while((0<S.avail_in||S.avail_out===0)&&k!==1);return j===4?(k=i.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===f):j!==2||(this.onEnd(f),!(S.avail_out=0))},g.prototype.onData=function(b){this.chunks.push(b)},g.prototype.onEnd=function(b){b===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg},o.Deflate=g,o.deflate=x,o.deflateRaw=function(b,y){return(y=y||{}).raw=!0,x(b,y)},o.gzip=function(b,y){return(y=y||{}).gzip=!0,x(b,y)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,s,o){var i=n("./zlib/inflate"),a=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 m(g){if(!(this instanceof m))return new m(g);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},g||{});var x=this.options;x.raw&&0<=x.windowBits&&x.windowBits<16&&(x.windowBits=-x.windowBits,x.windowBits===0&&(x.windowBits=-15)),!(0<=x.windowBits&&x.windowBits<16)||g&&g.windowBits||(x.windowBits+=32),15<x.windowBits&&x.windowBits<48&&(15&x.windowBits)==0&&(x.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var b=i.inflateInit2(this.strm,x.windowBits);if(b!==c.Z_OK)throw new Error(u[b]);this.header=new f,i.inflateGetHeader(this.strm,this.header)}function v(g,x){var b=new m(x);if(b.push(g,!0),b.err)throw b.msg||u[b.err];return b.result}m.prototype.push=function(g,x){var b,y,k,j,S,T,N=this.strm,I=this.options.chunkSize,A=this.options.dictionary,O=!1;if(this.ended)return!1;y=x===~~x?x:x===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof g=="string"?N.input=l.binstring2buf(g):h.call(g)==="[object ArrayBuffer]"?N.input=new Uint8Array(g):N.input=g,N.next_in=0,N.avail_in=N.input.length;do{if(N.avail_out===0&&(N.output=new a.Buf8(I),N.next_out=0,N.avail_out=I),(b=i.inflate(N,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&A&&(T=typeof A=="string"?l.string2buf(A):h.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,b=i.inflateSetDictionary(this.strm,T)),b===c.Z_BUF_ERROR&&O===!0&&(b=c.Z_OK,O=!1),b!==c.Z_STREAM_END&&b!==c.Z_OK)return this.onEnd(b),!(this.ended=!0);N.next_out&&(N.avail_out!==0&&b!==c.Z_STREAM_END&&(N.avail_in!==0||y!==c.Z_FINISH&&y!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=l.utf8border(N.output,N.next_out),j=N.next_out-k,S=l.buf2string(N.output,k),N.next_out=j,N.avail_out=I-j,j&&a.arraySet(N.output,N.output,k,j,0),this.onData(S)):this.onData(a.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)&&b!==c.Z_STREAM_END);return b===c.Z_STREAM_END&&(y=c.Z_FINISH),y===c.Z_FINISH?(b=i.inflateEnd(this.strm),this.onEnd(b),this.ended=!0,b===c.Z_OK):y!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(N.avail_out=0))},m.prototype.onData=function(g){this.chunks.push(g)},m.prototype.onEnd=function(g){g===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},o.Inflate=m,o.inflate=v,o.inflateRaw=function(g,x){return(x=x||{}).raw=!0,v(g,x)},o.ungzip=v},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,s,o){var i=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 a={arraySet:function(c,u,d,f,h){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+f),h);else for(var m=0;m<f;m++)c[h+m]=u[d+m]},flattenChunks:function(c){var u,d,f,h,m,v;for(u=f=0,d=c.length;u<d;u++)f+=c[u].length;for(v=new Uint8Array(f),u=h=0,d=c.length;u<d;u++)m=c[u],v.set(m,h),h+=m.length;return v}},l={arraySet:function(c,u,d,f,h){for(var m=0;m<f;m++)c[h+m]=u[d+m]},flattenChunks:function(c){return[].concat.apply([],c)}};o.setTyped=function(c){c?(o.Buf8=Uint8Array,o.Buf16=Uint16Array,o.Buf32=Int32Array,o.assign(o,a)):(o.Buf8=Array,o.Buf16=Array,o.Buf32=Array,o.assign(o,l))},o.setTyped(i)},{}],42:[function(n,s,o){var i=n("./common"),a=!0,l=!0;try{String.fromCharCode.apply(null,[0])}catch{a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{l=!1}for(var c=new i.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&&a))return String.fromCharCode.apply(null,i.shrinkBuf(f,h));for(var m="",v=0;v<h;v++)m+=String.fromCharCode(f[v]);return m}c[254]=c[254]=1,o.string2buf=function(f){var h,m,v,g,x,b=f.length,y=0;for(g=0;g<b;g++)(64512&(m=f.charCodeAt(g)))==55296&&g+1<b&&(64512&(v=f.charCodeAt(g+1)))==56320&&(m=65536+(m-55296<<10)+(v-56320),g++),y+=m<128?1:m<2048?2:m<65536?3:4;for(h=new i.Buf8(y),g=x=0;x<y;g++)(64512&(m=f.charCodeAt(g)))==55296&&g+1<b&&(64512&(v=f.charCodeAt(g+1)))==56320&&(m=65536+(m-55296<<10)+(v-56320),g++),m<128?h[x++]=m:(m<2048?h[x++]=192|m>>>6:(m<65536?h[x++]=224|m>>>12:(h[x++]=240|m>>>18,h[x++]=128|m>>>12&63),h[x++]=128|m>>>6&63),h[x++]=128|63&m);return h},o.buf2binstring=function(f){return d(f,f.length)},o.binstring2buf=function(f){for(var h=new i.Buf8(f.length),m=0,v=h.length;m<v;m++)h[m]=f.charCodeAt(m);return h},o.buf2string=function(f,h){var m,v,g,x,b=h||f.length,y=new Array(2*b);for(m=v=0;m<b;)if((g=f[m++])<128)y[v++]=g;else if(4<(x=c[g]))y[v++]=65533,m+=x-1;else{for(g&=x===2?31:x===3?15:7;1<x&&m<b;)g=g<<6|63&f[m++],x--;1<x?y[v++]=65533:g<65536?y[v++]=g:(g-=65536,y[v++]=55296|g>>10&1023,y[v++]=56320|1023&g)}return d(y,v)},o.utf8border=function(f,h){var m;for((h=h||f.length)>f.length&&(h=f.length),m=h-1;0<=m&&(192&f[m])==128;)m--;return m<0||m===0?h:m+c[f[m]]>h?m:h}},{"./common":41}],43:[function(n,s,o){s.exports=function(i,a,l,c){for(var u=65535&i|0,d=i>>>16&65535|0,f=0;l!==0;){for(l-=f=2e3<l?2e3:l;d=d+(u=u+a[c++]|0)|0,--f;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(n,s,o){s.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,s,o){var i=(function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var u=0;u<8;u++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l})();s.exports=function(a,l,c,u){var d=i,f=u+c;a^=-1;for(var h=u;h<f;h++)a=a>>>8^d[255&(a^l[h])];return-1^a}},{}],46:[function(n,s,o){var i,a=n("../utils/common"),l=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),f=0,h=4,m=0,v=-2,g=-1,x=4,b=2,y=8,k=9,j=286,S=30,T=19,N=2*j+1,I=15,A=3,O=258,D=O+A+1,E=42,L=113,_=1,F=2,ee=3,$=4;function H(w,X){return w.msg=d[X],X}function q(w){return(w<<1)-(4<w?9:0)}function ue(w){for(var X=w.length;0<=--X;)w[X]=0}function V(w){var X=w.state,G=X.pending;G>w.avail_out&&(G=w.avail_out),G!==0&&(a.arraySet(w.output,X.pending_buf,X.pending_out,G,w.next_out),w.next_out+=G,X.pending_out+=G,w.total_out+=G,w.avail_out-=G,X.pending-=G,X.pending===0&&(X.pending_out=0))}function W(w,X){l._tr_flush_block(w,0<=w.block_start?w.block_start:-1,w.strstart-w.block_start,X),w.block_start=w.strstart,V(w.strm)}function ce(w,X){w.pending_buf[w.pending++]=X}function U(w,X){w.pending_buf[w.pending++]=X>>>8&255,w.pending_buf[w.pending++]=255&X}function Q(w,X){var G,P,R=w.max_chain_length,B=w.strstart,se=w.prev_length,ne=w.nice_match,Z=w.strstart>w.w_size-D?w.strstart-(w.w_size-D):0,ae=w.window,z=w.w_mask,M=w.prev,J=w.strstart+O,re=ae[B+se-1],ie=ae[B+se];w.prev_length>=w.good_match&&(R>>=2),ne>w.lookahead&&(ne=w.lookahead);do if(ae[(G=X)+se]===ie&&ae[G+se-1]===re&&ae[G]===ae[B]&&ae[++G]===ae[B+1]){B+=2,G++;do;while(ae[++B]===ae[++G]&&ae[++B]===ae[++G]&&ae[++B]===ae[++G]&&ae[++B]===ae[++G]&&ae[++B]===ae[++G]&&ae[++B]===ae[++G]&&ae[++B]===ae[++G]&&ae[++B]===ae[++G]&&B<J);if(P=O-(J-B),B=J-O,se<P){if(w.match_start=X,ne<=(se=P))break;re=ae[B+se-1],ie=ae[B+se]}}while((X=M[X&z])>Z&&--R!=0);return se<=w.lookahead?se:w.lookahead}function Ce(w){var X,G,P,R,B,se,ne,Z,ae,z,M=w.w_size;do{if(R=w.window_size-w.lookahead-w.strstart,w.strstart>=M+(M-D)){for(a.arraySet(w.window,w.window,M,M,0),w.match_start-=M,w.strstart-=M,w.block_start-=M,X=G=w.hash_size;P=w.head[--X],w.head[X]=M<=P?P-M:0,--G;);for(X=G=M;P=w.prev[--X],w.prev[X]=M<=P?P-M:0,--G;);R+=M}if(w.strm.avail_in===0)break;if(se=w.strm,ne=w.window,Z=w.strstart+w.lookahead,ae=R,z=void 0,z=se.avail_in,ae<z&&(z=ae),G=z===0?0:(se.avail_in-=z,a.arraySet(ne,se.input,se.next_in,z,Z),se.state.wrap===1?se.adler=c(se.adler,ne,z,Z):se.state.wrap===2&&(se.adler=u(se.adler,ne,z,Z)),se.next_in+=z,se.total_in+=z,z),w.lookahead+=G,w.lookahead+w.insert>=A)for(B=w.strstart-w.insert,w.ins_h=w.window[B],w.ins_h=(w.ins_h<<w.hash_shift^w.window[B+1])&w.hash_mask;w.insert&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[B+A-1])&w.hash_mask,w.prev[B&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=B,B++,w.insert--,!(w.lookahead+w.insert<A)););}while(w.lookahead<D&&w.strm.avail_in!==0)}function oe(w,X){for(var G,P;;){if(w.lookahead<D){if(Ce(w),w.lookahead<D&&X===f)return _;if(w.lookahead===0)break}if(G=0,w.lookahead>=A&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+A-1])&w.hash_mask,G=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),G!==0&&w.strstart-G<=w.w_size-D&&(w.match_length=Q(w,G)),w.match_length>=A)if(P=l._tr_tally(w,w.strstart-w.match_start,w.match_length-A),w.lookahead-=w.match_length,w.match_length<=w.max_lazy_match&&w.lookahead>=A){for(w.match_length--;w.strstart++,w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+A-1])&w.hash_mask,G=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart,--w.match_length!=0;);w.strstart++}else w.strstart+=w.match_length,w.match_length=0,w.ins_h=w.window[w.strstart],w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+1])&w.hash_mask;else P=l._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++;if(P&&(W(w,!1),w.strm.avail_out===0))return _}return w.insert=w.strstart<A-1?w.strstart:A-1,X===h?(W(w,!0),w.strm.avail_out===0?ee:$):w.last_lit&&(W(w,!1),w.strm.avail_out===0)?_:F}function pe(w,X){for(var G,P,R;;){if(w.lookahead<D){if(Ce(w),w.lookahead<D&&X===f)return _;if(w.lookahead===0)break}if(G=0,w.lookahead>=A&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+A-1])&w.hash_mask,G=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),w.prev_length=w.match_length,w.prev_match=w.match_start,w.match_length=A-1,G!==0&&w.prev_length<w.max_lazy_match&&w.strstart-G<=w.w_size-D&&(w.match_length=Q(w,G),w.match_length<=5&&(w.strategy===1||w.match_length===A&&4096<w.strstart-w.match_start)&&(w.match_length=A-1)),w.prev_length>=A&&w.match_length<=w.prev_length){for(R=w.strstart+w.lookahead-A,P=l._tr_tally(w,w.strstart-1-w.prev_match,w.prev_length-A),w.lookahead-=w.prev_length-1,w.prev_length-=2;++w.strstart<=R&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+A-1])&w.hash_mask,G=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),--w.prev_length!=0;);if(w.match_available=0,w.match_length=A-1,w.strstart++,P&&(W(w,!1),w.strm.avail_out===0))return _}else if(w.match_available){if((P=l._tr_tally(w,0,w.window[w.strstart-1]))&&W(w,!1),w.strstart++,w.lookahead--,w.strm.avail_out===0)return _}else w.match_available=1,w.strstart++,w.lookahead--}return w.match_available&&(P=l._tr_tally(w,0,w.window[w.strstart-1]),w.match_available=0),w.insert=w.strstart<A-1?w.strstart:A-1,X===h?(W(w,!0),w.strm.avail_out===0?ee:$):w.last_lit&&(W(w,!1),w.strm.avail_out===0)?_:F}function ge(w,X,G,P,R){this.good_length=w,this.max_lazy=X,this.nice_length=G,this.max_chain=P,this.func=R}function me(){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=y,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 a.Buf16(2*N),this.dyn_dtree=new a.Buf16(2*(2*S+1)),this.bl_tree=new a.Buf16(2*(2*T+1)),ue(this.dyn_ltree),ue(this.dyn_dtree),ue(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(I+1),this.heap=new a.Buf16(2*j+1),ue(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*j+1),ue(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 xe(w){var X;return w&&w.state?(w.total_in=w.total_out=0,w.data_type=b,(X=w.state).pending=0,X.pending_out=0,X.wrap<0&&(X.wrap=-X.wrap),X.status=X.wrap?E:L,w.adler=X.wrap===2?0:1,X.last_flush=f,l._tr_init(X),m):H(w,v)}function ke(w){var X=xe(w);return X===m&&(function(G){G.window_size=2*G.w_size,ue(G.head),G.max_lazy_match=i[G.level].max_lazy,G.good_match=i[G.level].good_length,G.nice_match=i[G.level].nice_length,G.max_chain_length=i[G.level].max_chain,G.strstart=0,G.block_start=0,G.lookahead=0,G.insert=0,G.match_length=G.prev_length=A-1,G.match_available=0,G.ins_h=0})(w.state),X}function Ae(w,X,G,P,R,B){if(!w)return v;var se=1;if(X===g&&(X=6),P<0?(se=0,P=-P):15<P&&(se=2,P-=16),R<1||k<R||G!==y||P<8||15<P||X<0||9<X||B<0||x<B)return H(w,v);P===8&&(P=9);var ne=new me;return(w.state=ne).strm=w,ne.wrap=se,ne.gzhead=null,ne.w_bits=P,ne.w_size=1<<ne.w_bits,ne.w_mask=ne.w_size-1,ne.hash_bits=R+7,ne.hash_size=1<<ne.hash_bits,ne.hash_mask=ne.hash_size-1,ne.hash_shift=~~((ne.hash_bits+A-1)/A),ne.window=new a.Buf8(2*ne.w_size),ne.head=new a.Buf16(ne.hash_size),ne.prev=new a.Buf16(ne.w_size),ne.lit_bufsize=1<<R+6,ne.pending_buf_size=4*ne.lit_bufsize,ne.pending_buf=new a.Buf8(ne.pending_buf_size),ne.d_buf=1*ne.lit_bufsize,ne.l_buf=3*ne.lit_bufsize,ne.level=X,ne.strategy=B,ne.method=G,ke(w)}i=[new ge(0,0,0,0,function(w,X){var G=65535;for(G>w.pending_buf_size-5&&(G=w.pending_buf_size-5);;){if(w.lookahead<=1){if(Ce(w),w.lookahead===0&&X===f)return _;if(w.lookahead===0)break}w.strstart+=w.lookahead,w.lookahead=0;var P=w.block_start+G;if((w.strstart===0||w.strstart>=P)&&(w.lookahead=w.strstart-P,w.strstart=P,W(w,!1),w.strm.avail_out===0)||w.strstart-w.block_start>=w.w_size-D&&(W(w,!1),w.strm.avail_out===0))return _}return w.insert=0,X===h?(W(w,!0),w.strm.avail_out===0?ee:$):(w.strstart>w.block_start&&(W(w,!1),w.strm.avail_out),_)}),new ge(4,4,8,4,oe),new ge(4,5,16,8,oe),new ge(4,6,32,32,oe),new ge(4,4,16,16,pe),new ge(8,16,32,32,pe),new ge(8,16,128,128,pe),new ge(8,32,128,256,pe),new ge(32,128,258,1024,pe),new ge(32,258,258,4096,pe)],o.deflateInit=function(w,X){return Ae(w,X,y,15,8,0)},o.deflateInit2=Ae,o.deflateReset=ke,o.deflateResetKeep=xe,o.deflateSetHeader=function(w,X){return w&&w.state?w.state.wrap!==2?v:(w.state.gzhead=X,m):v},o.deflate=function(w,X){var G,P,R,B;if(!w||!w.state||5<X||X<0)return w?H(w,v):v;if(P=w.state,!w.output||!w.input&&w.avail_in!==0||P.status===666&&X!==h)return H(w,w.avail_out===0?-5:v);if(P.strm=w,G=P.last_flush,P.last_flush=X,P.status===E)if(P.wrap===2)w.adler=0,ce(P,31),ce(P,139),ce(P,8),P.gzhead?(ce(P,(P.gzhead.text?1:0)+(P.gzhead.hcrc?2:0)+(P.gzhead.extra?4:0)+(P.gzhead.name?8:0)+(P.gzhead.comment?16:0)),ce(P,255&P.gzhead.time),ce(P,P.gzhead.time>>8&255),ce(P,P.gzhead.time>>16&255),ce(P,P.gzhead.time>>24&255),ce(P,P.level===9?2:2<=P.strategy||P.level<2?4:0),ce(P,255&P.gzhead.os),P.gzhead.extra&&P.gzhead.extra.length&&(ce(P,255&P.gzhead.extra.length),ce(P,P.gzhead.extra.length>>8&255)),P.gzhead.hcrc&&(w.adler=u(w.adler,P.pending_buf,P.pending,0)),P.gzindex=0,P.status=69):(ce(P,0),ce(P,0),ce(P,0),ce(P,0),ce(P,0),ce(P,P.level===9?2:2<=P.strategy||P.level<2?4:0),ce(P,3),P.status=L);else{var se=y+(P.w_bits-8<<4)<<8;se|=(2<=P.strategy||P.level<2?0:P.level<6?1:P.level===6?2:3)<<6,P.strstart!==0&&(se|=32),se+=31-se%31,P.status=L,U(P,se),P.strstart!==0&&(U(P,w.adler>>>16),U(P,65535&w.adler)),w.adler=1}if(P.status===69)if(P.gzhead.extra){for(R=P.pending;P.gzindex<(65535&P.gzhead.extra.length)&&(P.pending!==P.pending_buf_size||(P.gzhead.hcrc&&P.pending>R&&(w.adler=u(w.adler,P.pending_buf,P.pending-R,R)),V(w),R=P.pending,P.pending!==P.pending_buf_size));)ce(P,255&P.gzhead.extra[P.gzindex]),P.gzindex++;P.gzhead.hcrc&&P.pending>R&&(w.adler=u(w.adler,P.pending_buf,P.pending-R,R)),P.gzindex===P.gzhead.extra.length&&(P.gzindex=0,P.status=73)}else P.status=73;if(P.status===73)if(P.gzhead.name){R=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>R&&(w.adler=u(w.adler,P.pending_buf,P.pending-R,R)),V(w),R=P.pending,P.pending===P.pending_buf_size)){B=1;break}B=P.gzindex<P.gzhead.name.length?255&P.gzhead.name.charCodeAt(P.gzindex++):0,ce(P,B)}while(B!==0);P.gzhead.hcrc&&P.pending>R&&(w.adler=u(w.adler,P.pending_buf,P.pending-R,R)),B===0&&(P.gzindex=0,P.status=91)}else P.status=91;if(P.status===91)if(P.gzhead.comment){R=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>R&&(w.adler=u(w.adler,P.pending_buf,P.pending-R,R)),V(w),R=P.pending,P.pending===P.pending_buf_size)){B=1;break}B=P.gzindex<P.gzhead.comment.length?255&P.gzhead.comment.charCodeAt(P.gzindex++):0,ce(P,B)}while(B!==0);P.gzhead.hcrc&&P.pending>R&&(w.adler=u(w.adler,P.pending_buf,P.pending-R,R)),B===0&&(P.status=103)}else P.status=103;if(P.status===103&&(P.gzhead.hcrc?(P.pending+2>P.pending_buf_size&&V(w),P.pending+2<=P.pending_buf_size&&(ce(P,255&w.adler),ce(P,w.adler>>8&255),w.adler=0,P.status=L)):P.status=L),P.pending!==0){if(V(w),w.avail_out===0)return P.last_flush=-1,m}else if(w.avail_in===0&&q(X)<=q(G)&&X!==h)return H(w,-5);if(P.status===666&&w.avail_in!==0)return H(w,-5);if(w.avail_in!==0||P.lookahead!==0||X!==f&&P.status!==666){var ne=P.strategy===2?(function(Z,ae){for(var z;;){if(Z.lookahead===0&&(Ce(Z),Z.lookahead===0)){if(ae===f)return _;break}if(Z.match_length=0,z=l._tr_tally(Z,0,Z.window[Z.strstart]),Z.lookahead--,Z.strstart++,z&&(W(Z,!1),Z.strm.avail_out===0))return _}return Z.insert=0,ae===h?(W(Z,!0),Z.strm.avail_out===0?ee:$):Z.last_lit&&(W(Z,!1),Z.strm.avail_out===0)?_:F})(P,X):P.strategy===3?(function(Z,ae){for(var z,M,J,re,ie=Z.window;;){if(Z.lookahead<=O){if(Ce(Z),Z.lookahead<=O&&ae===f)return _;if(Z.lookahead===0)break}if(Z.match_length=0,Z.lookahead>=A&&0<Z.strstart&&(M=ie[J=Z.strstart-1])===ie[++J]&&M===ie[++J]&&M===ie[++J]){re=Z.strstart+O;do;while(M===ie[++J]&&M===ie[++J]&&M===ie[++J]&&M===ie[++J]&&M===ie[++J]&&M===ie[++J]&&M===ie[++J]&&M===ie[++J]&&J<re);Z.match_length=O-(re-J),Z.match_length>Z.lookahead&&(Z.match_length=Z.lookahead)}if(Z.match_length>=A?(z=l._tr_tally(Z,1,Z.match_length-A),Z.lookahead-=Z.match_length,Z.strstart+=Z.match_length,Z.match_length=0):(z=l._tr_tally(Z,0,Z.window[Z.strstart]),Z.lookahead--,Z.strstart++),z&&(W(Z,!1),Z.strm.avail_out===0))return _}return Z.insert=0,ae===h?(W(Z,!0),Z.strm.avail_out===0?ee:$):Z.last_lit&&(W(Z,!1),Z.strm.avail_out===0)?_:F})(P,X):i[P.level].func(P,X);if(ne!==ee&&ne!==$||(P.status=666),ne===_||ne===ee)return w.avail_out===0&&(P.last_flush=-1),m;if(ne===F&&(X===1?l._tr_align(P):X!==5&&(l._tr_stored_block(P,0,0,!1),X===3&&(ue(P.head),P.lookahead===0&&(P.strstart=0,P.block_start=0,P.insert=0))),V(w),w.avail_out===0))return P.last_flush=-1,m}return X!==h?m:P.wrap<=0?1:(P.wrap===2?(ce(P,255&w.adler),ce(P,w.adler>>8&255),ce(P,w.adler>>16&255),ce(P,w.adler>>24&255),ce(P,255&w.total_in),ce(P,w.total_in>>8&255),ce(P,w.total_in>>16&255),ce(P,w.total_in>>24&255)):(U(P,w.adler>>>16),U(P,65535&w.adler)),V(w),0<P.wrap&&(P.wrap=-P.wrap),P.pending!==0?m:1)},o.deflateEnd=function(w){var X;return w&&w.state?(X=w.state.status)!==E&&X!==69&&X!==73&&X!==91&&X!==103&&X!==L&&X!==666?H(w,v):(w.state=null,X===L?H(w,-3):m):v},o.deflateSetDictionary=function(w,X){var G,P,R,B,se,ne,Z,ae,z=X.length;if(!w||!w.state||(B=(G=w.state).wrap)===2||B===1&&G.status!==E||G.lookahead)return v;for(B===1&&(w.adler=c(w.adler,X,z,0)),G.wrap=0,z>=G.w_size&&(B===0&&(ue(G.head),G.strstart=0,G.block_start=0,G.insert=0),ae=new a.Buf8(G.w_size),a.arraySet(ae,X,z-G.w_size,G.w_size,0),X=ae,z=G.w_size),se=w.avail_in,ne=w.next_in,Z=w.input,w.avail_in=z,w.next_in=0,w.input=X,Ce(G);G.lookahead>=A;){for(P=G.strstart,R=G.lookahead-(A-1);G.ins_h=(G.ins_h<<G.hash_shift^G.window[P+A-1])&G.hash_mask,G.prev[P&G.w_mask]=G.head[G.ins_h],G.head[G.ins_h]=P,P++,--R;);G.strstart=P,G.lookahead=A-1,Ce(G)}return G.strstart+=G.lookahead,G.block_start=G.strstart,G.insert=G.lookahead,G.lookahead=0,G.match_length=G.prev_length=A-1,G.match_available=0,w.next_in=ne,w.input=Z,w.avail_in=se,G.wrap=B,m},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,s,o){s.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,s,o){s.exports=function(i,a){var l,c,u,d,f,h,m,v,g,x,b,y,k,j,S,T,N,I,A,O,D,E,L,_,F;l=i.state,c=i.next_in,_=i.input,u=c+(i.avail_in-5),d=i.next_out,F=i.output,f=d-(a-i.avail_out),h=d+(i.avail_out-257),m=l.dmax,v=l.wsize,g=l.whave,x=l.wnext,b=l.window,y=l.hold,k=l.bits,j=l.lencode,S=l.distcode,T=(1<<l.lenbits)-1,N=(1<<l.distbits)-1;e:do{k<15&&(y+=_[c++]<<k,k+=8,y+=_[c++]<<k,k+=8),I=j[y&T];t:for(;;){if(y>>>=A=I>>>24,k-=A,(A=I>>>16&255)===0)F[d++]=65535&I;else{if(!(16&A)){if((64&A)==0){I=j[(65535&I)+(y&(1<<A)-1)];continue t}if(32&A){l.mode=12;break e}i.msg="invalid literal/length code",l.mode=30;break e}O=65535&I,(A&=15)&&(k<A&&(y+=_[c++]<<k,k+=8),O+=y&(1<<A)-1,y>>>=A,k-=A),k<15&&(y+=_[c++]<<k,k+=8,y+=_[c++]<<k,k+=8),I=S[y&N];n:for(;;){if(y>>>=A=I>>>24,k-=A,!(16&(A=I>>>16&255))){if((64&A)==0){I=S[(65535&I)+(y&(1<<A)-1)];continue n}i.msg="invalid distance code",l.mode=30;break e}if(D=65535&I,k<(A&=15)&&(y+=_[c++]<<k,(k+=8)<A&&(y+=_[c++]<<k,k+=8)),m<(D+=y&(1<<A)-1)){i.msg="invalid distance too far back",l.mode=30;break e}if(y>>>=A,k-=A,(A=d-f)<D){if(g<(A=D-A)&&l.sane){i.msg="invalid distance too far back",l.mode=30;break e}if(L=b,(E=0)===x){if(E+=v-A,A<O){for(O-=A;F[d++]=b[E++],--A;);E=d-D,L=F}}else if(x<A){if(E+=v+x-A,(A-=x)<O){for(O-=A;F[d++]=b[E++],--A;);if(E=0,x<O){for(O-=A=x;F[d++]=b[E++],--A;);E=d-D,L=F}}}else if(E+=x-A,A<O){for(O-=A;F[d++]=b[E++],--A;);E=d-D,L=F}for(;2<O;)F[d++]=L[E++],F[d++]=L[E++],F[d++]=L[E++],O-=3;O&&(F[d++]=L[E++],1<O&&(F[d++]=L[E++]))}else{for(E=d-D;F[d++]=F[E++],F[d++]=F[E++],F[d++]=F[E++],2<(O-=3););O&&(F[d++]=F[E++],1<O&&(F[d++]=F[E++]))}break}}break}}while(c<u&&d<h);c-=O=k>>3,y&=(1<<(k-=O<<3))-1,i.next_in=c,i.next_out=d,i.avail_in=c<u?u-c+5:5-(c-u),i.avail_out=d<h?h-d+257:257-(d-h),l.hold=y,l.bits=k}},{}],49:[function(n,s,o){var i=n("../utils/common"),a=n("./adler32"),l=n("./crc32"),c=n("./inffast"),u=n("./inftrees"),d=1,f=2,h=0,m=-2,v=1,g=852,x=592;function b(E){return(E>>>24&255)+(E>>>8&65280)+((65280&E)<<8)+((255&E)<<24)}function y(){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 i.Buf16(320),this.work=new i.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=v,L.last=0,L.havedict=0,L.dmax=32768,L.head=null,L.hold=0,L.bits=0,L.lencode=L.lendyn=new i.Buf32(g),L.distcode=L.distdyn=new i.Buf32(x),L.sane=1,L.back=-1,h):m}function j(E){var L;return E&&E.state?((L=E.state).wsize=0,L.whave=0,L.wnext=0,k(E)):m}function S(E,L){var _,F;return E&&E.state?(F=E.state,L<0?(_=0,L=-L):(_=1+(L>>4),L<48&&(L&=15)),L&&(L<8||15<L)?m:(F.window!==null&&F.wbits!==L&&(F.window=null),F.wrap=_,F.wbits=L,j(E))):m}function T(E,L){var _,F;return E?(F=new y,(E.state=F).window=null,(_=S(E,L))!==h&&(E.state=null),_):m}var N,I,A=!0;function O(E){if(A){var L;for(N=new i.Buf32(512),I=new i.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,I,0,E.work,{bits:5}),A=!1}E.lencode=N,E.lenbits=9,E.distcode=I,E.distbits=5}function D(E,L,_,F){var ee,$=E.state;return $.window===null&&($.wsize=1<<$.wbits,$.wnext=0,$.whave=0,$.window=new i.Buf8($.wsize)),F>=$.wsize?(i.arraySet($.window,L,_-$.wsize,$.wsize,0),$.wnext=0,$.whave=$.wsize):(F<(ee=$.wsize-$.wnext)&&(ee=F),i.arraySet($.window,L,_-F,ee,$.wnext),(F-=ee)?(i.arraySet($.window,L,_-F,F,0),$.wnext=F,$.whave=$.wsize):($.wnext+=ee,$.wnext===$.wsize&&($.wnext=0),$.whave<$.wsize&&($.whave+=ee))),0}o.inflateReset=j,o.inflateReset2=S,o.inflateResetKeep=k,o.inflateInit=function(E){return T(E,15)},o.inflateInit2=T,o.inflate=function(E,L){var _,F,ee,$,H,q,ue,V,W,ce,U,Q,Ce,oe,pe,ge,me,xe,ke,Ae,w,X,G,P,R=0,B=new i.Buf8(4),se=[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 m;(_=E.state).mode===12&&(_.mode=13),H=E.next_out,ee=E.output,ue=E.avail_out,$=E.next_in,F=E.input,q=E.avail_in,V=_.hold,W=_.bits,ce=q,U=ue,X=h;e:for(;;)switch(_.mode){case v:if(_.wrap===0){_.mode=13;break}for(;W<16;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(2&_.wrap&&V===35615){B[_.check=0]=255&V,B[1]=V>>>8&255,_.check=l(_.check,B,2,0),W=V=0,_.mode=2;break}if(_.flags=0,_.head&&(_.head.done=!1),!(1&_.wrap)||(((255&V)<<8)+(V>>8))%31){E.msg="incorrect header check",_.mode=30;break}if((15&V)!=8){E.msg="unknown compression method",_.mode=30;break}if(W-=4,w=8+(15&(V>>>=4)),_.wbits===0)_.wbits=w;else if(w>_.wbits){E.msg="invalid window size",_.mode=30;break}_.dmax=1<<w,E.adler=_.check=1,_.mode=512&V?10:12,W=V=0;break;case 2:for(;W<16;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(_.flags=V,(255&_.flags)!=8){E.msg="unknown compression method",_.mode=30;break}if(57344&_.flags){E.msg="unknown header flags set",_.mode=30;break}_.head&&(_.head.text=V>>8&1),512&_.flags&&(B[0]=255&V,B[1]=V>>>8&255,_.check=l(_.check,B,2,0)),W=V=0,_.mode=3;case 3:for(;W<32;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}_.head&&(_.head.time=V),512&_.flags&&(B[0]=255&V,B[1]=V>>>8&255,B[2]=V>>>16&255,B[3]=V>>>24&255,_.check=l(_.check,B,4,0)),W=V=0,_.mode=4;case 4:for(;W<16;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}_.head&&(_.head.xflags=255&V,_.head.os=V>>8),512&_.flags&&(B[0]=255&V,B[1]=V>>>8&255,_.check=l(_.check,B,2,0)),W=V=0,_.mode=5;case 5:if(1024&_.flags){for(;W<16;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}_.length=V,_.head&&(_.head.extra_len=V),512&_.flags&&(B[0]=255&V,B[1]=V>>>8&255,_.check=l(_.check,B,2,0)),W=V=0}else _.head&&(_.head.extra=null);_.mode=6;case 6:if(1024&_.flags&&(q<(Q=_.length)&&(Q=q),Q&&(_.head&&(w=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),i.arraySet(_.head.extra,F,$,Q,w)),512&_.flags&&(_.check=l(_.check,F,Q,$)),q-=Q,$+=Q,_.length-=Q),_.length))break e;_.length=0,_.mode=7;case 7:if(2048&_.flags){if(q===0)break e;for(Q=0;w=F[$+Q++],_.head&&w&&_.length<65536&&(_.head.name+=String.fromCharCode(w)),w&&Q<q;);if(512&_.flags&&(_.check=l(_.check,F,Q,$)),q-=Q,$+=Q,w)break e}else _.head&&(_.head.name=null);_.length=0,_.mode=8;case 8:if(4096&_.flags){if(q===0)break e;for(Q=0;w=F[$+Q++],_.head&&w&&_.length<65536&&(_.head.comment+=String.fromCharCode(w)),w&&Q<q;);if(512&_.flags&&(_.check=l(_.check,F,Q,$)),q-=Q,$+=Q,w)break e}else _.head&&(_.head.comment=null);_.mode=9;case 9:if(512&_.flags){for(;W<16;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(V!==(65535&_.check)){E.msg="header crc mismatch",_.mode=30;break}W=V=0}_.head&&(_.head.hcrc=_.flags>>9&1,_.head.done=!0),E.adler=_.check=0,_.mode=12;break;case 10:for(;W<32;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}E.adler=_.check=b(V),W=V=0,_.mode=11;case 11:if(_.havedict===0)return E.next_out=H,E.avail_out=ue,E.next_in=$,E.avail_in=q,_.hold=V,_.bits=W,2;E.adler=_.check=1,_.mode=12;case 12:if(L===5||L===6)break e;case 13:if(_.last){V>>>=7&W,W-=7&W,_.mode=27;break}for(;W<3;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}switch(_.last=1&V,W-=1,3&(V>>>=1)){case 0:_.mode=14;break;case 1:if(O(_),_.mode=20,L!==6)break;V>>>=2,W-=2;break e;case 2:_.mode=17;break;case 3:E.msg="invalid block type",_.mode=30}V>>>=2,W-=2;break;case 14:for(V>>>=7&W,W-=7&W;W<32;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if((65535&V)!=(V>>>16^65535)){E.msg="invalid stored block lengths",_.mode=30;break}if(_.length=65535&V,W=V=0,_.mode=15,L===6)break e;case 15:_.mode=16;case 16:if(Q=_.length){if(q<Q&&(Q=q),ue<Q&&(Q=ue),Q===0)break e;i.arraySet(ee,F,$,Q,H),q-=Q,$+=Q,ue-=Q,H+=Q,_.length-=Q;break}_.mode=12;break;case 17:for(;W<14;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(_.nlen=257+(31&V),V>>>=5,W-=5,_.ndist=1+(31&V),V>>>=5,W-=5,_.ncode=4+(15&V),V>>>=4,W-=4,286<_.nlen||30<_.ndist){E.msg="too many length or distance symbols",_.mode=30;break}_.have=0,_.mode=18;case 18:for(;_.have<_.ncode;){for(;W<3;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}_.lens[se[_.have++]]=7&V,V>>>=3,W-=3}for(;_.have<19;)_.lens[se[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,G={bits:_.lenbits},X=u(0,_.lens,0,19,_.lencode,0,_.work,G),_.lenbits=G.bits,X){E.msg="invalid code lengths set",_.mode=30;break}_.have=0,_.mode=19;case 19:for(;_.have<_.nlen+_.ndist;){for(;ge=(R=_.lencode[V&(1<<_.lenbits)-1])>>>16&255,me=65535&R,!((pe=R>>>24)<=W);){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(me<16)V>>>=pe,W-=pe,_.lens[_.have++]=me;else{if(me===16){for(P=pe+2;W<P;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(V>>>=pe,W-=pe,_.have===0){E.msg="invalid bit length repeat",_.mode=30;break}w=_.lens[_.have-1],Q=3+(3&V),V>>>=2,W-=2}else if(me===17){for(P=pe+3;W<P;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}W-=pe,w=0,Q=3+(7&(V>>>=pe)),V>>>=3,W-=3}else{for(P=pe+7;W<P;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}W-=pe,w=0,Q=11+(127&(V>>>=pe)),V>>>=7,W-=7}if(_.have+Q>_.nlen+_.ndist){E.msg="invalid bit length repeat",_.mode=30;break}for(;Q--;)_.lens[_.have++]=w}}if(_.mode===30)break;if(_.lens[256]===0){E.msg="invalid code -- missing end-of-block",_.mode=30;break}if(_.lenbits=9,G={bits:_.lenbits},X=u(d,_.lens,0,_.nlen,_.lencode,0,_.work,G),_.lenbits=G.bits,X){E.msg="invalid literal/lengths set",_.mode=30;break}if(_.distbits=6,_.distcode=_.distdyn,G={bits:_.distbits},X=u(f,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,G),_.distbits=G.bits,X){E.msg="invalid distances set",_.mode=30;break}if(_.mode=20,L===6)break e;case 20:_.mode=21;case 21:if(6<=q&&258<=ue){E.next_out=H,E.avail_out=ue,E.next_in=$,E.avail_in=q,_.hold=V,_.bits=W,c(E,U),H=E.next_out,ee=E.output,ue=E.avail_out,$=E.next_in,F=E.input,q=E.avail_in,V=_.hold,W=_.bits,_.mode===12&&(_.back=-1);break}for(_.back=0;ge=(R=_.lencode[V&(1<<_.lenbits)-1])>>>16&255,me=65535&R,!((pe=R>>>24)<=W);){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(ge&&(240&ge)==0){for(xe=pe,ke=ge,Ae=me;ge=(R=_.lencode[Ae+((V&(1<<xe+ke)-1)>>xe)])>>>16&255,me=65535&R,!(xe+(pe=R>>>24)<=W);){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}V>>>=xe,W-=xe,_.back+=xe}if(V>>>=pe,W-=pe,_.back+=pe,_.length=me,ge===0){_.mode=26;break}if(32&ge){_.back=-1,_.mode=12;break}if(64&ge){E.msg="invalid literal/length code",_.mode=30;break}_.extra=15&ge,_.mode=22;case 22:if(_.extra){for(P=_.extra;W<P;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}_.length+=V&(1<<_.extra)-1,V>>>=_.extra,W-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=23;case 23:for(;ge=(R=_.distcode[V&(1<<_.distbits)-1])>>>16&255,me=65535&R,!((pe=R>>>24)<=W);){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if((240&ge)==0){for(xe=pe,ke=ge,Ae=me;ge=(R=_.distcode[Ae+((V&(1<<xe+ke)-1)>>xe)])>>>16&255,me=65535&R,!(xe+(pe=R>>>24)<=W);){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}V>>>=xe,W-=xe,_.back+=xe}if(V>>>=pe,W-=pe,_.back+=pe,64&ge){E.msg="invalid distance code",_.mode=30;break}_.offset=me,_.extra=15&ge,_.mode=24;case 24:if(_.extra){for(P=_.extra;W<P;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}_.offset+=V&(1<<_.extra)-1,V>>>=_.extra,W-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){E.msg="invalid distance too far back",_.mode=30;break}_.mode=25;case 25:if(ue===0)break e;if(Q=U-ue,_.offset>Q){if((Q=_.offset-Q)>_.whave&&_.sane){E.msg="invalid distance too far back",_.mode=30;break}Ce=Q>_.wnext?(Q-=_.wnext,_.wsize-Q):_.wnext-Q,Q>_.length&&(Q=_.length),oe=_.window}else oe=ee,Ce=H-_.offset,Q=_.length;for(ue<Q&&(Q=ue),ue-=Q,_.length-=Q;ee[H++]=oe[Ce++],--Q;);_.length===0&&(_.mode=21);break;case 26:if(ue===0)break e;ee[H++]=_.length,ue--,_.mode=21;break;case 27:if(_.wrap){for(;W<32;){if(q===0)break e;q--,V|=F[$++]<<W,W+=8}if(U-=ue,E.total_out+=U,_.total+=U,U&&(E.adler=_.check=_.flags?l(_.check,ee,U,H-U):a(_.check,ee,U,H-U)),U=ue,(_.flags?V:b(V))!==_.check){E.msg="incorrect data check",_.mode=30;break}W=V=0}_.mode=28;case 28:if(_.wrap&&_.flags){for(;W<32;){if(q===0)break e;q--,V+=F[$++]<<W,W+=8}if(V!==(4294967295&_.total)){E.msg="incorrect length check",_.mode=30;break}W=V=0}_.mode=29;case 29:X=1;break e;case 30:X=-3;break e;case 31:return-4;default:return m}return E.next_out=H,E.avail_out=ue,E.next_in=$,E.avail_in=q,_.hold=V,_.bits=W,(_.wsize||U!==E.avail_out&&_.mode<30&&(_.mode<27||L!==4))&&D(E,E.output,E.next_out,U-E.avail_out)?(_.mode=31,-4):(ce-=E.avail_in,U-=E.avail_out,E.total_in+=ce,E.total_out+=U,_.total+=U,_.wrap&&U&&(E.adler=_.check=_.flags?l(_.check,ee,U,E.next_out-U):a(_.check,ee,U,E.next_out-U)),E.data_type=_.bits+(_.last?64:0)+(_.mode===12?128:0)+(_.mode===20||_.mode===15?256:0),(ce==0&&U===0||L===4)&&X===h&&(X=-5),X)},o.inflateEnd=function(E){if(!E||!E.state)return m;var L=E.state;return L.window&&(L.window=null),E.state=null,h},o.inflateGetHeader=function(E,L){var _;return E&&E.state?(2&(_=E.state).wrap)==0?m:((_.head=L).done=!1,h):m},o.inflateSetDictionary=function(E,L){var _,F=L.length;return E&&E.state?(_=E.state).wrap!==0&&_.mode!==11?m:_.mode===11&&a(1,L,F,0)!==_.check?-3:D(E,L,F,F)?(_.mode=31,-4):(_.havedict=1,h):m},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,s,o){var i=n("../utils/common"),a=[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];s.exports=function(d,f,h,m,v,g,x,b){var y,k,j,S,T,N,I,A,O,D=b.bits,E=0,L=0,_=0,F=0,ee=0,$=0,H=0,q=0,ue=0,V=0,W=null,ce=0,U=new i.Buf16(16),Q=new i.Buf16(16),Ce=null,oe=0;for(E=0;E<=15;E++)U[E]=0;for(L=0;L<m;L++)U[f[h+L]]++;for(ee=D,F=15;1<=F&&U[F]===0;F--);if(F<ee&&(ee=F),F===0)return v[g++]=20971520,v[g++]=20971520,b.bits=1,0;for(_=1;_<F&&U[_]===0;_++);for(ee<_&&(ee=_),E=q=1;E<=15;E++)if(q<<=1,(q-=U[E])<0)return-1;if(0<q&&(d===0||F!==1))return-1;for(Q[1]=0,E=1;E<15;E++)Q[E+1]=Q[E]+U[E];for(L=0;L<m;L++)f[h+L]!==0&&(x[Q[f[h+L]]++]=L);if(N=d===0?(W=Ce=x,19):d===1?(W=a,ce-=257,Ce=l,oe-=257,256):(W=c,Ce=u,-1),E=_,T=g,H=L=V=0,j=-1,S=(ue=1<<($=ee))-1,d===1&&852<ue||d===2&&592<ue)return 1;for(;;){for(I=E-H,O=x[L]<N?(A=0,x[L]):x[L]>N?(A=Ce[oe+x[L]],W[ce+x[L]]):(A=96,0),y=1<<E-H,_=k=1<<$;v[T+(V>>H)+(k-=y)]=I<<24|A<<16|O|0,k!==0;);for(y=1<<E-1;V&y;)y>>=1;if(y!==0?(V&=y-1,V+=y):V=0,L++,--U[E]==0){if(E===F)break;E=f[h+x[L]]}if(ee<E&&(V&S)!==j){for(H===0&&(H=ee),T+=_,q=1<<($=E-H);$+H<F&&!((q-=U[$+H])<=0);)$++,q<<=1;if(ue+=1<<$,d===1&&852<ue||d===2&&592<ue)return 1;v[j=V&S]=ee<<24|$<<16|T-g|0}}return V!==0&&(v[T+V]=E-H<<24|64<<16|0),b.bits=ee,0}},{"../utils/common":41}],51:[function(n,s,o){s.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,s,o){var i=n("../utils/common"),a=0,l=1;function c(R){for(var B=R.length;0<=--B;)R[B]=0}var u=0,d=29,f=256,h=f+1+d,m=30,v=19,g=2*h+1,x=15,b=16,y=7,k=256,j=16,S=17,T=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],I=[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],D=new Array(2*(h+2));c(D);var E=new Array(2*m);c(E);var L=new Array(512);c(L);var _=new Array(256);c(_);var F=new Array(d);c(F);var ee,$,H,q=new Array(m);function ue(R,B,se,ne,Z){this.static_tree=R,this.extra_bits=B,this.extra_base=se,this.elems=ne,this.max_length=Z,this.has_stree=R&&R.length}function V(R,B){this.dyn_tree=R,this.max_code=0,this.stat_desc=B}function W(R){return R<256?L[R]:L[256+(R>>>7)]}function ce(R,B){R.pending_buf[R.pending++]=255&B,R.pending_buf[R.pending++]=B>>>8&255}function U(R,B,se){R.bi_valid>b-se?(R.bi_buf|=B<<R.bi_valid&65535,ce(R,R.bi_buf),R.bi_buf=B>>b-R.bi_valid,R.bi_valid+=se-b):(R.bi_buf|=B<<R.bi_valid&65535,R.bi_valid+=se)}function Q(R,B,se){U(R,se[2*B],se[2*B+1])}function Ce(R,B){for(var se=0;se|=1&R,R>>>=1,se<<=1,0<--B;);return se>>>1}function oe(R,B,se){var ne,Z,ae=new Array(x+1),z=0;for(ne=1;ne<=x;ne++)ae[ne]=z=z+se[ne-1]<<1;for(Z=0;Z<=B;Z++){var M=R[2*Z+1];M!==0&&(R[2*Z]=Ce(ae[M]++,M))}}function pe(R){var B;for(B=0;B<h;B++)R.dyn_ltree[2*B]=0;for(B=0;B<m;B++)R.dyn_dtree[2*B]=0;for(B=0;B<v;B++)R.bl_tree[2*B]=0;R.dyn_ltree[2*k]=1,R.opt_len=R.static_len=0,R.last_lit=R.matches=0}function ge(R){8<R.bi_valid?ce(R,R.bi_buf):0<R.bi_valid&&(R.pending_buf[R.pending++]=R.bi_buf),R.bi_buf=0,R.bi_valid=0}function me(R,B,se,ne){var Z=2*B,ae=2*se;return R[Z]<R[ae]||R[Z]===R[ae]&&ne[B]<=ne[se]}function xe(R,B,se){for(var ne=R.heap[se],Z=se<<1;Z<=R.heap_len&&(Z<R.heap_len&&me(B,R.heap[Z+1],R.heap[Z],R.depth)&&Z++,!me(B,ne,R.heap[Z],R.depth));)R.heap[se]=R.heap[Z],se=Z,Z<<=1;R.heap[se]=ne}function ke(R,B,se){var ne,Z,ae,z,M=0;if(R.last_lit!==0)for(;ne=R.pending_buf[R.d_buf+2*M]<<8|R.pending_buf[R.d_buf+2*M+1],Z=R.pending_buf[R.l_buf+M],M++,ne===0?Q(R,Z,B):(Q(R,(ae=_[Z])+f+1,B),(z=N[ae])!==0&&U(R,Z-=F[ae],z),Q(R,ae=W(--ne),se),(z=I[ae])!==0&&U(R,ne-=q[ae],z)),M<R.last_lit;);Q(R,k,B)}function Ae(R,B){var se,ne,Z,ae=B.dyn_tree,z=B.stat_desc.static_tree,M=B.stat_desc.has_stree,J=B.stat_desc.elems,re=-1;for(R.heap_len=0,R.heap_max=g,se=0;se<J;se++)ae[2*se]!==0?(R.heap[++R.heap_len]=re=se,R.depth[se]=0):ae[2*se+1]=0;for(;R.heap_len<2;)ae[2*(Z=R.heap[++R.heap_len]=re<2?++re:0)]=1,R.depth[Z]=0,R.opt_len--,M&&(R.static_len-=z[2*Z+1]);for(B.max_code=re,se=R.heap_len>>1;1<=se;se--)xe(R,ae,se);for(Z=J;se=R.heap[1],R.heap[1]=R.heap[R.heap_len--],xe(R,ae,1),ne=R.heap[1],R.heap[--R.heap_max]=se,R.heap[--R.heap_max]=ne,ae[2*Z]=ae[2*se]+ae[2*ne],R.depth[Z]=(R.depth[se]>=R.depth[ne]?R.depth[se]:R.depth[ne])+1,ae[2*se+1]=ae[2*ne+1]=Z,R.heap[1]=Z++,xe(R,ae,1),2<=R.heap_len;);R.heap[--R.heap_max]=R.heap[1],(function(ie,he){var je,Se,ze,Be,At,ln,mt=he.dyn_tree,nt=he.max_code,Yt=he.stat_desc.static_tree,Jn=he.stat_desc.has_stree,$e=he.stat_desc.extra_bits,ft=he.stat_desc.extra_base,Xe=he.stat_desc.max_length,Bt=0;for(Be=0;Be<=x;Be++)ie.bl_count[Be]=0;for(mt[2*ie.heap[ie.heap_max]+1]=0,je=ie.heap_max+1;je<g;je++)Xe<(Be=mt[2*mt[2*(Se=ie.heap[je])+1]+1]+1)&&(Be=Xe,Bt++),mt[2*Se+1]=Be,nt<Se||(ie.bl_count[Be]++,At=0,ft<=Se&&(At=$e[Se-ft]),ln=mt[2*Se],ie.opt_len+=ln*(Be+At),Jn&&(ie.static_len+=ln*(Yt[2*Se+1]+At)));if(Bt!==0){do{for(Be=Xe-1;ie.bl_count[Be]===0;)Be--;ie.bl_count[Be]--,ie.bl_count[Be+1]+=2,ie.bl_count[Xe]--,Bt-=2}while(0<Bt);for(Be=Xe;Be!==0;Be--)for(Se=ie.bl_count[Be];Se!==0;)nt<(ze=ie.heap[--je])||(mt[2*ze+1]!==Be&&(ie.opt_len+=(Be-mt[2*ze+1])*mt[2*ze],mt[2*ze+1]=Be),Se--)}})(R,B),oe(ae,re,R.bl_count)}function w(R,B,se){var ne,Z,ae=-1,z=B[1],M=0,J=7,re=4;for(z===0&&(J=138,re=3),B[2*(se+1)+1]=65535,ne=0;ne<=se;ne++)Z=z,z=B[2*(ne+1)+1],++M<J&&Z===z||(M<re?R.bl_tree[2*Z]+=M:Z!==0?(Z!==ae&&R.bl_tree[2*Z]++,R.bl_tree[2*j]++):M<=10?R.bl_tree[2*S]++:R.bl_tree[2*T]++,ae=Z,re=(M=0)===z?(J=138,3):Z===z?(J=6,3):(J=7,4))}function X(R,B,se){var ne,Z,ae=-1,z=B[1],M=0,J=7,re=4;for(z===0&&(J=138,re=3),ne=0;ne<=se;ne++)if(Z=z,z=B[2*(ne+1)+1],!(++M<J&&Z===z)){if(M<re)for(;Q(R,Z,R.bl_tree),--M!=0;);else Z!==0?(Z!==ae&&(Q(R,Z,R.bl_tree),M--),Q(R,j,R.bl_tree),U(R,M-3,2)):M<=10?(Q(R,S,R.bl_tree),U(R,M-3,3)):(Q(R,T,R.bl_tree),U(R,M-11,7));ae=Z,re=(M=0)===z?(J=138,3):Z===z?(J=6,3):(J=7,4)}}c(q);var G=!1;function P(R,B,se,ne){U(R,(u<<1)+(ne?1:0),3),(function(Z,ae,z,M){ge(Z),ce(Z,z),ce(Z,~z),i.arraySet(Z.pending_buf,Z.window,ae,z,Z.pending),Z.pending+=z})(R,B,se)}o._tr_init=function(R){G||((function(){var B,se,ne,Z,ae,z=new Array(x+1);for(Z=ne=0;Z<d-1;Z++)for(F[Z]=ne,B=0;B<1<<N[Z];B++)_[ne++]=Z;for(_[ne-1]=Z,Z=ae=0;Z<16;Z++)for(q[Z]=ae,B=0;B<1<<I[Z];B++)L[ae++]=Z;for(ae>>=7;Z<m;Z++)for(q[Z]=ae<<7,B=0;B<1<<I[Z]-7;B++)L[256+ae++]=Z;for(se=0;se<=x;se++)z[se]=0;for(B=0;B<=143;)D[2*B+1]=8,B++,z[8]++;for(;B<=255;)D[2*B+1]=9,B++,z[9]++;for(;B<=279;)D[2*B+1]=7,B++,z[7]++;for(;B<=287;)D[2*B+1]=8,B++,z[8]++;for(oe(D,h+1,z),B=0;B<m;B++)E[2*B+1]=5,E[2*B]=Ce(B,5);ee=new ue(D,N,f+1,h,x),$=new ue(E,I,0,m,x),H=new ue(new Array(0),A,0,v,y)})(),G=!0),R.l_desc=new V(R.dyn_ltree,ee),R.d_desc=new V(R.dyn_dtree,$),R.bl_desc=new V(R.bl_tree,H),R.bi_buf=0,R.bi_valid=0,pe(R)},o._tr_stored_block=P,o._tr_flush_block=function(R,B,se,ne){var Z,ae,z=0;0<R.level?(R.strm.data_type===2&&(R.strm.data_type=(function(M){var J,re=4093624447;for(J=0;J<=31;J++,re>>>=1)if(1&re&&M.dyn_ltree[2*J]!==0)return a;if(M.dyn_ltree[18]!==0||M.dyn_ltree[20]!==0||M.dyn_ltree[26]!==0)return l;for(J=32;J<f;J++)if(M.dyn_ltree[2*J]!==0)return l;return a})(R)),Ae(R,R.l_desc),Ae(R,R.d_desc),z=(function(M){var J;for(w(M,M.dyn_ltree,M.l_desc.max_code),w(M,M.dyn_dtree,M.d_desc.max_code),Ae(M,M.bl_desc),J=v-1;3<=J&&M.bl_tree[2*O[J]+1]===0;J--);return M.opt_len+=3*(J+1)+5+5+4,J})(R),Z=R.opt_len+3+7>>>3,(ae=R.static_len+3+7>>>3)<=Z&&(Z=ae)):Z=ae=se+5,se+4<=Z&&B!==-1?P(R,B,se,ne):R.strategy===4||ae===Z?(U(R,2+(ne?1:0),3),ke(R,D,E)):(U(R,4+(ne?1:0),3),(function(M,J,re,ie){var he;for(U(M,J-257,5),U(M,re-1,5),U(M,ie-4,4),he=0;he<ie;he++)U(M,M.bl_tree[2*O[he]+1],3);X(M,M.dyn_ltree,J-1),X(M,M.dyn_dtree,re-1)})(R,R.l_desc.max_code+1,R.d_desc.max_code+1,z+1),ke(R,R.dyn_ltree,R.dyn_dtree)),pe(R),ne&&ge(R)},o._tr_tally=function(R,B,se){return R.pending_buf[R.d_buf+2*R.last_lit]=B>>>8&255,R.pending_buf[R.d_buf+2*R.last_lit+1]=255&B,R.pending_buf[R.l_buf+R.last_lit]=255&se,R.last_lit++,B===0?R.dyn_ltree[2*se]++:(R.matches++,B--,R.dyn_ltree[2*(_[se]+f+1)]++,R.dyn_dtree[2*W(B)]++),R.last_lit===R.lit_bufsize-1},o._tr_align=function(R){U(R,2,3),Q(R,k,D),(function(B){B.bi_valid===16?(ce(B,B.bi_buf),B.bi_buf=0,B.bi_valid=0):8<=B.bi_valid&&(B.pending_buf[B.pending++]=255&B.bi_buf,B.bi_buf>>=8,B.bi_valid-=8)})(R)}},{"../utils/common":41}],53:[function(n,s,o){s.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,s,o){(function(i){(function(a,l){if(!a.setImmediate){var c,u,d,f,h=1,m={},v=!1,g=a.document,x=Object.getPrototypeOf&&Object.getPrototypeOf(a);x=x&&x.setTimeout?x:a,c={}.toString.call(a.process)==="[object process]"?function(j){process.nextTick(function(){y(j)})}:(function(){if(a.postMessage&&!a.importScripts){var j=!0,S=a.onmessage;return a.onmessage=function(){j=!1},a.postMessage("","*"),a.onmessage=S,j}})()?(f="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",k,!1):a.attachEvent("onmessage",k),function(j){a.postMessage(f+j,"*")}):a.MessageChannel?((d=new MessageChannel).port1.onmessage=function(j){y(j.data)},function(j){d.port2.postMessage(j)}):g&&"onreadystatechange"in g.createElement("script")?(u=g.documentElement,function(j){var S=g.createElement("script");S.onreadystatechange=function(){y(j),S.onreadystatechange=null,u.removeChild(S),S=null},u.appendChild(S)}):function(j){setTimeout(y,0,j)},x.setImmediate=function(j){typeof j!="function"&&(j=new Function(""+j));for(var S=new Array(arguments.length-1),T=0;T<S.length;T++)S[T]=arguments[T+1];var N={callback:j,args:S};return m[h]=N,c(h),h++},x.clearImmediate=b}function b(j){delete m[j]}function y(j){if(v)setTimeout(y,0,j);else{var S=m[j];if(S){v=!0;try{(function(T){var N=T.callback,I=T.args;switch(I.length){case 0:N();break;case 1:N(I[0]);break;case 2:N(I[0],I[1]);break;case 3:N(I[0],I[1],I[2]);break;default:N.apply(l,I)}})(S)}finally{b(j),v=!1}}}}function k(j){j.source===a&&typeof j.data=="string"&&j.data.indexOf(f)===0&&y(+j.data.slice(f.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof mr<"u"?mr:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(bi)),bi.exports}var l_=a_();const c_=M0(l_),u_="3.0.13",ca={version:u_},Lf="[REDACTED]",d_=/(^|[-_])(api[-_]?key|authorization|cookie|token|secret|password|access[-_]?token|refresh[-_]?token)([-_]|$)/i,f_=[/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],Oc=200,p_=25e6,Df=50,h_=1e4;function m_(e){return e<1024?`${e} chars`:e<1024*1024?`${Math.ceil(e/1024)} KB`:`${Math.ceil(e/(1024*1024))} MB`}function g_(e){let t=0;for(const n of e)t+=n.rawRequestBody?.length??0,t+=n.responseText?.length??0;return t}function x_(e){if(e.length>Oc)return`Export is limited to ${Oc} logs at once. Narrow the filter and try again.`;const t=g_(e);return t>p_?`Export is too large (${m_(t)} of text). Narrow the filter and try again.`:null}function wr(e){return e?.aborted===!0?{ok:!1,message:"Export canceled.",canceled:!0}:null}async function b_(e,t){try{const n=await Pn(`/api/logs/${e}/chunks`,h_,{signal:t});if(!n.ok)return null;const s=await n.json();return JSON.stringify(s,null,2)}catch{return null}}function v_(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ua(e){if(Array.isArray(e))return e.map(n=>ua(n));if(!v_(e))return e;const t={};for(const[n,s]of Object.entries(e))t[n]=d_.test(n)?Lf:ua(s);return t}function y_(e){const t=n=>{let s=n;for(const o of f_)s=s.replace(o,Lf);return s};try{const n=JSON.parse(e);return t(JSON.stringify(ua(n),null,2))}catch{return t(e)}}function vi(e,t){return t==="redacted"?y_(e):e}function w_(e,t){return{...e,rawRequestBody:null,responseText:null,rawHeaders:t==="raw"?e.rawHeaders:void 0,headers:t==="raw"?e.headers:void 0,streamingChunks:void 0,bodyContentMode:"compact"}}function __(e,t,n,s=new Date().toISOString()){return{version:ca.version,exportedAt:s,mode:t,redacted:t==="redacted",logCount:e.length,logIds:e.map(o=>o.id),streamingChunkExportLimit:Df,streamingChunkLogIds:n.map(o=>o.id)}}async function k_(e,t="redacted",n={}){const s=wr(n.signal);if(s!==null)return s;const o=x_(e);if(o!==null)return{ok:!1,message:o};const i=new c_,a=t==="redacted"?"redacted":"raw",l=e.filter(h=>h.streaming).slice(0,Df);i.file("manifest.json",JSON.stringify(__(e,t,l),null,2)),i.file("logs.json",JSON.stringify(e.map(h=>w_(h,t)),null,2));for(const h of e){const m=wr(n.signal);if(m!==null)return m;h.rawRequestBody!==null&&i.file(`#${h.id}.Request.json`,vi(h.rawRequestBody,t)),h.responseText!==null&&i.file(`#${h.id}.Response.json`,vi(h.responseText,t))}for(const h of l){const m=wr(n.signal);if(m!==null)return m;const v=await b_(h.id,n.signal);v!==null&&i.file(`#${h.id}.SSE.Response.json`,vi(v,t))}const c=await i.generateAsync({type:"blob"}),u=wr(n.signal);if(u!==null)return u;const d=URL.createObjectURL(c),f=document.createElement("a");return f.href=d,f.download=`agent-inspector-export-${a}-${new Date().toISOString().slice(0,10)}.zip`,document.body.appendChild(f),f.click(),document.body.removeChild(f),URL.revokeObjectURL(d),{ok:!0}}function j_(e,t){if(e!==null){e.removeAllRanges();for(const n of t)e.addRange(n)}}function S_(e){if(e===null)return[];const t=[];for(let n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t}function C_(e){if(typeof document>"u")return!1;const t=document.activeElement,n=document.getSelection(),s=S_(n),o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style.position="fixed",o.style.top="0",o.style.left="-9999px",o.style.opacity="0",document.body.appendChild(o),o.focus(),o.select(),o.setSelectionRange(0,e.length);let i=!1;try{i=document.execCommand("copy")}catch{}finally{document.body.removeChild(o),j_(n,s),typeof HTMLElement<"u"&&t instanceof HTMLElement&&t.focus({preventScroll:!0})}return i}async function Mt(e){const t=globalThis.navigator?.clipboard;if(t!==void 0)try{return await t.writeText(e),!0}catch{}return C_(e)}function da(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 yl(e,t,n){return`${da(e,n)} - ${da(t,n)}`}function _r(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function N_(e){switch(e){case"end_turn":case"tool_use":return e;case"max_tokens":return"length";default:return null}}function T_(e){switch(e){case"stop":case"length":return e;case"max_tokens":return"length";default:return null}}function E_(e){switch(e){case"max_output_tokens":case"max_tokens":return!0;default:return!1}}function $f(e){if(e.responseText===null)return null;try{let t=JSON.parse(e.responseText);if(typeof t=="string"&&(t=JSON.parse(t)),!_r(t))return null;if(typeof t.stop_reason=="string")return N_(t.stop_reason);if(Array.isArray(t.choices))for(const n of t.choices){if(!_r(n)||typeof n.finish_reason!="string")continue;const s=T_(n.finish_reason);if(s!==null)return s}if(Array.isArray(t.output)){for(const n of t.output)if(_r(n)&&n.type==="function_call")return"tool_use";if(t.status==="completed")return"stop"}if(t.status==="incomplete"&&_r(t.incomplete_details)){const n=t.incomplete_details.reason;if(typeof n=="string"&&E_(n))return"length"}return null}catch{return null}}function wl(e){return e==="end_turn"||e==="stop"||e==="length"}function Ff(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ff(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function Bf(){for(var e,t,n=0,s="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ff(e))&&(s&&(s+=" "),s+=t);return s}const A_=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},R_=(e,t)=>({classGroupId:e,validator:t}),Uf=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),uo="-",Pc=[],I_="arbitrary..",z_=e=>{const t=P_(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return O_(a);const l=a.split(uo),c=l[0]===""&&l.length>1?1:0;return Wf(l,c,t)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=s[a],u=n[a];return c?u?A_(u,c):c:u||Pc}return n[a]||Pc}}},Wf=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const u=Wf(e,t+1,i);if(u)return u}const a=n.validators;if(a===null)return;const l=t===0?e.join(uo):e.slice(t).join(uo),c=a.length;for(let u=0;u<c;u++){const d=a[u];if(d.validator(l))return d.classGroupId}},O_=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?I_+s:void 0})(),P_=e=>{const{theme:t,classGroups:n}=e;return M_(n,t)},M_=(e,t)=>{const n=Uf();for(const s in e){const o=e[s];_l(o,n,s,t)}return n},_l=(e,t,n,s)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];L_(a,t,n,s)}},L_=(e,t,n,s)=>{if(typeof e=="string"){D_(e,t,n);return}if(typeof e=="function"){$_(e,t,n,s);return}F_(e,t,n,s)},D_=(e,t,n)=>{const s=e===""?t:Hf(t,e);s.classGroupId=n},$_=(e,t,n,s)=>{if(B_(e)){_l(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(R_(n,e))},F_=(e,t,n,s)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[l,c]=o[a];_l(c,Hf(t,l),n,s)}},Hf=(e,t)=>{let n=e;const s=t.split(uo),o=s.length;for(let i=0;i<o;i++){const a=s[i];let l=n.nextPart.get(a);l||(l=Uf(),n.nextPart.set(a,l)),n=l}return n},B_=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,U_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=s[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},fa="!",Mc=":",W_=[],Lc=(e,t,n,s,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:o}),H_=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=o=>{const i=[];let a=0,l=0,c=0,u;const d=o.length;for(let g=0;g<d;g++){const x=o[g];if(a===0&&l===0){if(x===Mc){i.push(o.slice(c,g)),c=g+1;continue}if(x==="/"){u=g;continue}}x==="["?a++:x==="]"?a--:x==="("?l++:x===")"&&l--}const f=i.length===0?o:o.slice(c);let h=f,m=!1;f.endsWith(fa)?(h=f.slice(0,-1),m=!0):f.startsWith(fa)&&(h=f.slice(1),m=!0);const v=u&&u>c?u-c:void 0;return Lc(i,m,h,v)};if(t){const o=t+Mc,i=s;s=a=>a.startsWith(o)?i(a.slice(o.length)):Lc(W_,!1,a,void 0,!0)}if(n){const o=s;s=i=>n({className:i,parseClassName:o})}return s},V_=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let o=[];for(let i=0;i<n.length;i++){const a=n[i],l=a[0]==="[",c=t.has(a);l||c?(o.length>0&&(o.sort(),s.push(...o),o=[]),s.push(a)):o.push(a)}return o.length>0&&(o.sort(),s.push(...o)),s}},Z_=e=>({cache:U_(e.cacheSize),parseClassName:H_(e),sortModifiers:V_(e),...z_(e)}),q_=/\s+/,G_=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],l=e.trim().split(q_);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:h,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:g}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let x=!!g,b=s(x?v.substring(0,g):v);if(!b){if(!x){c=d+(c.length>0?" "+c:c);continue}if(b=s(v),!b){c=d+(c.length>0?" "+c:c);continue}x=!1}const y=h.length===0?"":h.length===1?h[0]:i(h).join(":"),k=m?y+fa:y,j=k+b;if(a.indexOf(j)>-1)continue;a.push(j);const S=o(b,x);for(let T=0;T<S.length;++T){const N=S[T];a.push(k+N)}c=d+(c.length>0?" "+c:c)}return c},K_=(...e)=>{let t=0,n,s,o="";for(;t<e.length;)(n=e[t++])&&(s=Vf(n))&&(o&&(o+=" "),o+=s);return o},Vf=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=Vf(e[s]))&&(n&&(n+=" "),n+=t);return n},J_=(e,...t)=>{let n,s,o,i;const a=c=>{const u=t.reduce((d,f)=>f(d),e());return n=Z_(u),s=n.cache.get,o=n.cache.set,i=l,l(c)},l=c=>{const u=s(c);if(u)return u;const d=G_(c,n);return o(c,d),d};return i=a,(...c)=>i(K_(...c))},Y_=[],Ye=e=>{const t=n=>n[e]||Y_;return t.isThemeGetter=!0,t},Zf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,X_=/^\d+\/\d+$/,Q_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ek=/\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$/,tk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yn=e=>X_.test(e),Ie=e=>!!e&&!Number.isNaN(Number(e)),cn=e=>!!e&&Number.isInteger(Number(e)),yi=e=>e.endsWith("%")&&Ie(e.slice(0,-1)),Xt=e=>Q_.test(e),rk=()=>!0,ok=e=>ek.test(e)&&!tk.test(e),Gf=()=>!1,ik=e=>nk.test(e),ak=e=>sk.test(e),lk=e=>!be(e)&&!ve(e),ck=e=>Ns(e,Yf,Gf),be=e=>Zf.test(e),En=e=>Ns(e,Xf,ok),wi=e=>Ns(e,hk,Ie),Dc=e=>Ns(e,Kf,Gf),uk=e=>Ns(e,Jf,ak),kr=e=>Ns(e,Qf,ik),ve=e=>qf.test(e),zs=e=>Ts(e,Xf),dk=e=>Ts(e,mk),$c=e=>Ts(e,Kf),fk=e=>Ts(e,Yf),pk=e=>Ts(e,Jf),jr=e=>Ts(e,Qf,!0),Ns=(e,t,n)=>{const s=Zf.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},Ts=(e,t,n=!1)=>{const s=qf.exec(e);return s?s[1]?t(s[1]):n:!1},Kf=e=>e==="position"||e==="percentage",Jf=e=>e==="image"||e==="url",Yf=e=>e==="length"||e==="size"||e==="bg-size",Xf=e=>e==="length",hk=e=>e==="number",mk=e=>e==="family-name",Qf=e=>e==="shadow",gk=()=>{const e=Ye("color"),t=Ye("font"),n=Ye("text"),s=Ye("font-weight"),o=Ye("tracking"),i=Ye("leading"),a=Ye("breakpoint"),l=Ye("container"),c=Ye("spacing"),u=Ye("radius"),d=Ye("shadow"),f=Ye("inset-shadow"),h=Ye("text-shadow"),m=Ye("drop-shadow"),v=Ye("blur"),g=Ye("perspective"),x=Ye("aspect"),b=Ye("ease"),y=Ye("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...j(),ve,be],T=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],I=()=>[ve,be,c],A=()=>[Yn,"full","auto",...I()],O=()=>[cn,"none","subgrid",ve,be],D=()=>["auto",{span:["full",cn,ve,be]},cn,ve,be],E=()=>[cn,"auto",ve,be],L=()=>["auto","min","max","fr",ve,be],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...I()],$=()=>[Yn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],H=()=>[e,ve,be],q=()=>[...j(),$c,Dc,{position:[ve,be]}],ue=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",fk,ck,{size:[ve,be]}],W=()=>[yi,zs,En],ce=()=>["","none","full",u,ve,be],U=()=>["",Ie,zs,En],Q=()=>["solid","dashed","dotted","double"],Ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[Ie,yi,$c,Dc],pe=()=>["","none",v,ve,be],ge=()=>["none",Ie,ve,be],me=()=>["none",Ie,ve,be],xe=()=>[Ie,ve,be],ke=()=>[Yn,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xt],breakpoint:[Xt],color:[rk],container:[Xt],"drop-shadow":[Xt],ease:["in","out","in-out"],font:[lk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xt],shadow:[Xt],spacing:["px",Ie],text:[Xt],"text-shadow":[Xt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Yn,be,ve,x]}],container:["container"],columns:[{columns:[Ie,be,ve,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:S()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],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:[cn,"auto",ve,be]}],basis:[{basis:[Yn,"full","auto",l,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ie,Yn,"auto","initial","none",be]}],grow:[{grow:["",Ie,ve,be]}],shrink:[{shrink:["",Ie,ve,be]}],order:[{order:[cn,"first","last","none",ve,be]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:D()}],"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:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[l,"screen",...$()]}],"min-w":[{"min-w":[l,"screen","none",...$()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",n,zs,En]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,ve,wi]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",yi,be]}],"font-family":[{font:[dk,be,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,ve,be]}],"line-clamp":[{"line-clamp":[Ie,"none",ve,wi]}],leading:[{leading:[i,...I()]}],"list-image":[{"list-image":["none",ve,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ie,"from-font","auto",ve,En]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[Ie,"auto",ve,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,be]}],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",ve,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:ue()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},cn,ve,be],radial:["",ve,be],conic:[cn,ve,be]},pk,uk]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ie,ve,be]}],"outline-w":[{outline:["",Ie,zs,En]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",d,jr,kr]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",f,jr,kr]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[Ie,En]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",h,jr,kr]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[Ie,ve,be]}],"mix-blend":[{"mix-blend":[...Ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ce()}],"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":[Ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[ve,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":j()}],"mask-image-conic-pos":[{"mask-conic":[Ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:ue()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,be]}],filter:[{filter:["","none",ve,be]}],blur:[{blur:pe()}],brightness:[{brightness:[Ie,ve,be]}],contrast:[{contrast:[Ie,ve,be]}],"drop-shadow":[{"drop-shadow":["","none",m,jr,kr]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",Ie,ve,be]}],"hue-rotate":[{"hue-rotate":[Ie,ve,be]}],invert:[{invert:["",Ie,ve,be]}],saturate:[{saturate:[Ie,ve,be]}],sepia:[{sepia:["",Ie,ve,be]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,be]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[Ie,ve,be]}],"backdrop-contrast":[{"backdrop-contrast":[Ie,ve,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ie,ve,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ie,ve,be]}],"backdrop-invert":[{"backdrop-invert":["",Ie,ve,be]}],"backdrop-opacity":[{"backdrop-opacity":[Ie,ve,be]}],"backdrop-saturate":[{"backdrop-saturate":[Ie,ve,be]}],"backdrop-sepia":[{"backdrop-sepia":["",Ie,ve,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ie,"initial",ve,be]}],ease:[{ease:["linear","initial",b,ve,be]}],delay:[{delay:[Ie,ve,be]}],animate:[{animate:["none",y,ve,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,ve,be]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[ve,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"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:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",ve,be]}],"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":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",ve,be]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[Ie,zs,En,wi]}],stroke:[{stroke:["none",...H()]}],"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"]}},xk=J_(gk);function le(...e){return xk(Bf(e))}function Fe(e){return e>=1e6?(e/1e6).toFixed(1).replace(/\.0$/,"")+"M":(e/1e3).toFixed(1).replace(/\.0$/,"")+"K"}function ep(e){return e>=1024*1024?(e/(1024*1024)).toFixed(1).replace(/\.0$/,"")+"M":(e/1024).toFixed(1).replace(/\.0$/,"")+"K"}function Fc(e,t,n){const s=e*10;return!Number.isSafeInteger(s)||s%t!==0?null:(s/t/10).toFixed(1).replace(/\.0$/,"")+n}function bk(e){if(!Number.isSafeInteger(e)||e<=0)return e.toString();if(e>=1024*1024){const n=Fc(e,1048576,"M");if(n!==null)return n}const t=Fc(e,1024,"K");return t!==null?t:e.toString()}function vk(e){if(e===void 0||e==="")return 1;switch(e.toLowerCase()){case"k":return 1024;case"m":return 1024*1024;default:return null}}function fo(e){const t=e.trim().replaceAll(",","");if(t==="")return null;const n=/^(\d+(?:\.\d+)?)\s*([kKmM])?$/.exec(t);if(n===null)return null;const s=n[1];if(s===void 0)return null;const o=Number(s),i=n[2],a=vk(i);if(!Number.isFinite(o)||o<=0||a===null||(i===void 0||i==="")&&!Number.isInteger(o))return null;const l=Math.round(o*a);return!Number.isSafeInteger(l)||l<=0?null:l}function yk(e){return e===null?"pending":e>=200&&e<300?"success":e>=400&&e<500?"client_error":e>=500?"server_error":"pending"}const wk=Y({model:C().min(1),contextWindow:K().int().positive().optional(),outputLimit:K().int().positive().optional(),source:Ee(["manual","registry"]).optional(),sourceUrl:C().optional(),updatedAt:C().optional()}),po=Y({id:C(),name:C(),apiKey:C(),model:C().optional(),models:fe(C()).min(1),format:Ee(["anthropic","openai"]).optional(),baseUrl:C().optional(),anthropicBaseUrl:C().optional(),openaiBaseUrl:C().optional(),openaiResponsesBaseUrl:C().optional(),authHeader:Ee(["bearer","x-api-key"]).optional().default("bearer"),apiDocsUrl:C().optional(),modelMetadataUrl:C().optional(),modelMetadata:fe(wk).optional(),source:Ee(["company","personal"]).optional(),createdAt:C(),updatedAt:C()});async function _k(e){return Pt(e,po.array(),void 0,t=>`Failed to fetch ${e}: ${t.status}`)}function tp(){const e=nn("/api/providers?includeSecrets=1",_k,{revalidateOnFocus:!1,revalidateIfStale:!1});return{providers:e.data??[],isLoading:e.isLoading,isError:e.error,mutate:e.mutate}}function Ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Bc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function np(...e){return t=>{let n=!1;const s=e.map(o=>{const i=Bc(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<s.length;o++){const i=s[o];typeof i=="function"?i():Bc(e[o],null)}}}}function De(...e){return p.useCallback(np(...e),e)}function kk(e,t){const n=p.createContext(t),s=i=>{const{children:a,...l}=i,c=p.useMemo(()=>l,Object.values(l));return r.jsx(n.Provider,{value:c,children:a})};s.displayName=e+"Provider";function o(i){const a=p.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[s,o]}function an(e,t=[]){let n=[];function s(i,a){const l=p.createContext(a),c=n.length;n=[...n,a];const u=f=>{const{scope:h,children:m,...v}=f,g=h?.[e]?.[c]||l,x=p.useMemo(()=>v,Object.values(v));return r.jsx(g.Provider,{value:x,children:m})};u.displayName=i+"Provider";function d(f,h){const m=h?.[e]?.[c]||l,v=p.useContext(m);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(a=>p.createContext(a));return function(l){const c=l?.[e]||i;return p.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[s,jk(o,...t)]}function jk(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=s.reduce((l,{useScope:c,scopeName:u})=>{const f=c(i)[`__scope${u}`];return{...l,...f}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var et=globalThis?.document?p.useLayoutEffect:()=>{},Sk=Sd[" useId ".trim().toString()]||(()=>{}),Ck=0;function Vt(e){const[t,n]=p.useState(Sk());return et(()=>{n(s=>s??String(Ck++))},[e]),e||(t?`radix-${t}`:"")}var Nk=Sd[" useInsertionEffect ".trim().toString()]||et;function Ln({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[o,i,a]=Tk({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o;{const d=p.useRef(e!==void 0);p.useEffect(()=>{const f=d.current;f!==l&&console.warn(`${s} 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,s])}const u=p.useCallback(d=>{if(l){const f=Ek(d)?d(e):d;f!==e&&a.current?.(f)}else i(d)},[l,e,i,a]);return[c,u]}function Tk({defaultProp:e,onChange:t}){const[n,s]=p.useState(e),o=p.useRef(n),i=p.useRef(t);return Nk(()=>{i.current=t},[t]),p.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,s,i]}function Ek(e){return typeof e=="function"}function ys(e){const t=Rk(e),n=p.forwardRef((s,o)=>{const{children:i,...a}=s,l=p.Children.toArray(i),c=l.find(zk);if(c){const u=c.props.children,d=l.map(f=>f===c?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:f);return r.jsx(t,{...a,ref:o,children:p.isValidElement(u)?p.cloneElement(u,void 0,d):null})}return r.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var Ak=ys("Slot");function Rk(e){const t=p.forwardRef((n,s)=>{const{children:o,...i}=n;if(p.isValidElement(o)){const a=Pk(o),l=Ok(i,o.props);return o.type!==p.Fragment&&(l.ref=s?np(s,a):a),p.cloneElement(o,l)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sp=Symbol("radix.slottable");function Ik(e){const t=({children:n})=>r.jsx(r.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=sp,t}function zk(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sp}function Ok(e,t){const n={...t};for(const s in t){const o=e[s],i=t[s];/^on[A-Z]/.test(s)?o&&i?n[s]=(...l)=>{const c=i(...l);return o(...l),c}:o&&(n[s]=o):s==="style"?n[s]={...o,...i}:s==="className"&&(n[s]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Pk(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"],Re=Mk.reduce((e,t)=>{const n=ys(`Primitive.${t}`),s=p.forwardRef((o,i)=>{const{asChild:a,...l}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(c,{...l,ref:i})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function Lk(e,t){e&&rr.flushSync(()=>e.dispatchEvent(t))}function dt(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>t.current?.(...n),[])}function Dk(e,t=globalThis?.document){const n=dt(e);p.useEffect(()=>{const s=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var $k="DismissableLayer",pa="dismissableLayer.update",Fk="dismissableLayer.pointerDownOutside",Bk="dismissableLayer.focusOutside",Uc,rp=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wo=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...c}=e,u=p.useContext(rp),[d,f]=p.useState(null),h=d?.ownerDocument??globalThis?.document,[,m]=p.useState({}),v=De(t,N=>f(N)),g=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(x),y=d?g.indexOf(d):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,j=y>=b,S=Hk(N=>{const I=N.target,A=[...u.branches].some(O=>O.contains(I));!j||A||(o?.(N),a?.(N),N.defaultPrevented||l?.())},h),T=Vk(N=>{const I=N.target;[...u.branches].some(O=>O.contains(I))||(i?.(N),a?.(N),N.defaultPrevented||l?.())},h);return Dk(N=>{y===u.layers.size-1&&(s?.(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},h),p.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),Wc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Uc)}},[d,h,n,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Wc())},[d,u]),p.useEffect(()=>{const N=()=>m({});return document.addEventListener(pa,N),()=>document.removeEventListener(pa,N)},[]),r.jsx(Re.div,{...c,ref:v,style:{pointerEvents:k?j?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,S.onPointerDownCapture)})});Wo.displayName=$k;var Uk="DismissableLayerBranch",Wk=p.forwardRef((e,t)=>{const n=p.useContext(rp),s=p.useRef(null),o=De(t,s);return p.useEffect(()=>{const i=s.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),r.jsx(Re.div,{...e,ref:o})});Wk.displayName=Uk;function Hk(e,t=globalThis?.document){const n=dt(e),s=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=l=>{if(l.target&&!s.current){let c=function(){op(Fk,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);s.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function Vk(e,t=globalThis?.document){const n=dt(e),s=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!s.current&&op(Bk,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Wc(){const e=new CustomEvent(pa);document.dispatchEvent(e)}function op(e,t,n,{discrete:s}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),s?Lk(o,i):o.dispatchEvent(i)}var _i="focusScope.autoFocusOnMount",ki="focusScope.autoFocusOnUnmount",Hc={bubbles:!1,cancelable:!0},Zk="FocusScope",kl=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,c]=p.useState(null),u=dt(o),d=dt(i),f=p.useRef(null),h=De(t,g=>c(g)),m=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(s){let g=function(k){if(m.paused||!l)return;const j=k.target;l.contains(j)?f.current=j:hn(f.current,{select:!0})},x=function(k){if(m.paused||!l)return;const j=k.relatedTarget;j!==null&&(l.contains(j)||hn(f.current,{select:!0}))},b=function(k){if(document.activeElement===document.body)for(const S of k)S.removedNodes.length>0&&hn(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const y=new MutationObserver(b);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),y.disconnect()}}},[s,l,m.paused]),p.useEffect(()=>{if(l){Zc.add(m);const g=document.activeElement;if(!l.contains(g)){const b=new CustomEvent(_i,Hc);l.addEventListener(_i,u),l.dispatchEvent(b),b.defaultPrevented||(qk(Xk(ip(l)),{select:!0}),document.activeElement===g&&hn(l))}return()=>{l.removeEventListener(_i,u),setTimeout(()=>{const b=new CustomEvent(ki,Hc);l.addEventListener(ki,d),l.dispatchEvent(b),b.defaultPrevented||hn(g??document.body,{select:!0}),l.removeEventListener(ki,d),Zc.remove(m)},0)}}},[l,u,d,m]);const v=p.useCallback(g=>{if(!n&&!s||m.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(x&&b){const y=g.currentTarget,[k,j]=Gk(y);k&&j?!g.shiftKey&&b===j?(g.preventDefault(),n&&hn(k,{select:!0})):g.shiftKey&&b===k&&(g.preventDefault(),n&&hn(j,{select:!0})):b===y&&g.preventDefault()}},[n,s,m.paused]);return r.jsx(Re.div,{tabIndex:-1,...a,ref:h,onKeyDown:v})});kl.displayName=Zk;function qk(e,{select:t=!1}={}){const n=document.activeElement;for(const s of e)if(hn(s,{select:t}),document.activeElement!==n)return}function Gk(e){const t=ip(e),n=Vc(t,e),s=Vc(t.reverse(),e);return[n,s]}function ip(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const o=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||o?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Vc(e,t){for(const n of e)if(!Kk(n,{upTo:t}))return n}function Kk(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 Jk(e){return e instanceof HTMLInputElement&&"select"in e}function hn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Jk(e)&&t&&e.select()}}var Zc=Yk();function Yk(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=qc(e,t),e.unshift(t)},remove(t){e=qc(e,t),e[0]?.resume()}}}function qc(e,t){const n=[...e],s=n.indexOf(t);return s!==-1&&n.splice(s,1),n}function Xk(e){return e.filter(t=>t.tagName!=="A")}var Qk="Portal",Ho=p.forwardRef((e,t)=>{const{container:n,...s}=e,[o,i]=p.useState(!1);et(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?L0.createPortal(r.jsx(Re.div,{...s,ref:t}),a):null});Ho.displayName=Qk;function e5(e,t){return p.useReducer((n,s)=>t[n][s]??n,e)}var Nt=e=>{const{present:t,children:n}=e,s=t5(t),o=typeof n=="function"?n({present:s.isPresent}):p.Children.only(n),i=De(s.ref,n5(o));return typeof n=="function"||s.isPresent?p.cloneElement(o,{ref:i}):null};Nt.displayName="Presence";function t5(e){const[t,n]=p.useState(),s=p.useRef(null),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[l,c]=e5(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=Sr(s.current);i.current=l==="mounted"?u:"none"},[l]),et(()=>{const u=s.current,d=o.current;if(d!==e){const h=i.current,m=Sr(u);e?c("MOUNT"):m==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),et(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=m=>{const g=Sr(s.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=m=>{m.target===t&&(i.current=Sr(s.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:p.useCallback(u=>{s.current=u?getComputedStyle(u):null,n(u)},[])}}function Sr(e){return e?.animationName||"none"}function n5(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 ji=0;function ap(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Gc()),document.body.insertAdjacentElement("beforeend",e[1]??Gc()),ji++,()=>{ji===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ji--}},[])}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 Ut=function(){return Ut=Object.assign||function(t){for(var n,s=1,o=arguments.length;s<o;s++){n=arguments[s];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ut.apply(this,arguments)};function lp(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n}function s5(e,t,n){if(n||arguments.length===2)for(var s=0,o=t.length,i;s<o;s++)(i||!(s in t))&&(i||(i=Array.prototype.slice.call(t,0,s)),i[s]=t[s]);return e.concat(i||Array.prototype.slice.call(t))}var qr="right-scroll-bar-position",Gr="width-before-scroll-bar",r5="with-scroll-bars-hidden",o5="--removed-body-scroll-bar-size";function Si(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function i5(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(s){var o=n.value;o!==s&&(n.value=s,n.callback(s,o))}}}})[0];return n.callback=t,n.facade}var a5=typeof window<"u"?p.useLayoutEffect:p.useEffect,Kc=new WeakMap;function l5(e,t){var n=i5(null,function(s){return e.forEach(function(o){return Si(o,s)})});return a5(function(){var s=Kc.get(n);if(s){var o=new Set(s),i=new Set(e),a=n.current;o.forEach(function(l){i.has(l)||Si(l,null)}),i.forEach(function(l){o.has(l)||Si(l,a)})}Kc.set(n,e)},[e]),n}function c5(e){return e}function u5(e,t){t===void 0&&(t=c5);var n=[],s=!1,o={read:function(){if(s)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(i){var a=t(i,s);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(s=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){s=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(i),a=n}var c=function(){var d=a;a=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return o}function d5(e){e===void 0&&(e={});var t=u5(null);return t.options=Ut({async:!0,ssr:!1},e),t}var cp=function(e){var t=e.sideCar,n=lp(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return p.createElement(s,Ut({},n))};cp.isSideCarExport=!0;function f5(e,t){return e.useMedium(t),cp}var up=d5(),Ci=function(){},Vo=p.forwardRef(function(e,t){var n=p.useRef(null),s=p.useState({onScrollCapture:Ci,onWheelCapture:Ci,onTouchMoveCapture:Ci}),o=s[0],i=s[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,m=e.noRelative,v=e.noIsolation,g=e.inert,x=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,k=e.gapMode,j=lp(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,T=l5([n,t]),N=Ut(Ut({},j),o);return p.createElement(p.Fragment,null,d&&p.createElement(S,{sideCar:up,removeScrollBar:u,shards:f,noRelative:m,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:k}),a?p.cloneElement(p.Children.only(l),Ut(Ut({},N),{ref:T})):p.createElement(y,Ut({},N,{className:c,ref:T}),l))});Vo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vo.classNames={fullWidth:Gr,zeroRight:qr};var p5=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function h5(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=p5();return t&&e.setAttribute("nonce",t),e}function m5(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function g5(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var x5=function(){var e=0,t=null;return{add:function(n){e==0&&(t=h5())&&(m5(t,n),g5(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},b5=function(){var e=x5();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},dp=function(){var e=b5(),t=function(n){var s=n.styles,o=n.dynamic;return e(s,o),null};return t},v5={left:0,top:0,right:0,gap:0},Ni=function(e){return parseInt(e||"",10)||0},y5=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ni(n),Ni(s),Ni(o)]},w5=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return v5;var t=y5(e),n=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-n+t[2]-t[0])}},_5=dp(),fs="data-scroll-locked",k5=function(e,t,n,s){var o=e.left,i=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
42
42
|
.`.concat(r5,` {
|
|
43
43
|
overflow: hidden `).concat(s,`;
|
|
44
44
|
padding-right: `).concat(l,"px ").concat(s,`;
|
|
@@ -92,7 +92,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
92
92
|
`)}function Oi(e,t,n,s){return{role:e,label:t,text:n,size:Jl(n),characters:Yl(n),path:s}}const PN={format:"anthropic",analyzeRequest(e){if(e===null)return Mn(e);try{const t=JSON.parse(e),n=Ql(t)?.tools.length??null,s=uf.safeParse(t);return s.success?{parsed:s.data,comparisonValue:s.data,messageCount:s.data.messages.length,toolCount:n}:Mn(e)}catch{return Mn(e)}},analyzeResponse(e){if(e===null)return hs;try{let t=JSON.parse(e);typeof t=="string"&&(t=JSON.parse(t));const n=df.safeParse(t);if(!n.success)return hs;const s=n.data.content.filter(o=>o.type==="tool_use").map(o=>o.name);return{parsed:n.data,toolNames:s.length>0?s:null}}catch{return hs}},anatomySegments(e){if(e===null||typeof e!="object")return null;const t=e,n=[];if(t.system!==void 0){const s=zN(t.system);s.length>0&&n.push(Oi("system","system",s,"/system"))}if(Array.isArray(t.messages)&&t.messages.forEach((s,o)=>{if(s===null||typeof s!="object")return;const i=s,a=i.role==="user"||i.role==="assistant"?i.role:"user",l=IN(i.content);n.push(Oi(a,`[${o}] ${a}`,l,`/messages/${o}`))}),Array.isArray(t.tools)&&t.tools.length>0){const s=ON(t.tools);n.push(Oi("tools","tools",s,"/tools"))}return n.length>0?n:null}};function Aa(e){if(typeof e=="string")return e;if(!Array.isArray(e))return"";const t=[];for(const n of e){if(n===null||typeof n!="object")continue;const s=n,o=s.type;(o==="text"||o==="input_text"||o==="output_text")&&typeof s.text=="string"?t.push(s.text):(o==="image_url"||o==="input_image")&&t.push("[image]")}return t.join(`
|
|
93
93
|
`)}function MN(e){const t=[],n=Aa(e.content);n.length>0&&t.push(n);const s=typeof e.reasoning_content=="string"?e.reasoning_content:typeof e.thinking=="string"?e.thinking:typeof e.think=="string"?e.think:"";s.length>0&&t.push(s);const o=e.tool_calls;if(Array.isArray(o))for(const i of o){if(i===null||typeof i!="object")continue;const a=i.function;if(a===void 0)continue;const l=typeof a.name=="string"?a.name:"",c=typeof a.arguments=="string"?a.arguments:"";t.push(`${l} ${c}`.trim())}return t.join(`
|
|
94
94
|
`)}function LN(e){if(!Array.isArray(e))return"";const t=[];for(const n of e){if(n===null||typeof n!="object")continue;const s=ye(n,"function"),o=ye(s,"name")??ye(n,"name"),i=ye(s,"description")??ye(n,"description"),a=ye(s,"parameters")??ye(n,"parameters");typeof o=="string"&&t.push(o),typeof i=="string"&&t.push(i),a!==void 0&&t.push(JSON.stringify(a))}return t.join(`
|
|
95
|
-
`)}function DN(e){return typeof e=="string"?e.length>0?1:0:Array.isArray(e)?e.length:e==null?null:1}function $N(e){if(typeof e=="string")return e;const t=ye(e,"text");if(typeof t=="string")return t;const n=Aa(ye(e,"content"));if(n.length>0)return n;const s=Aa(ye(e,"output"));if(s.length>0)return s;const o=ye(e,"arguments");return typeof o=="string"?o:""}function FN(e){const t=ye(e,"role");if(t==="system"||t==="user"||t==="assistant"||t==="tool")return t;const n=ye(e,"type");return n==="function_call_output"?"tool":"user"}function BN(e){const t=ye(e,"output");if(!Array.isArray(t))return[];const n=[];for(const s of t){if(ye(s,"type")!=="function_call")continue;const o=ye(s,"name");typeof o=="string"&&o.length>0&&n.push(o)}return n}function Ps(e,t,n,s){return{role:e,label:t,text:n,size:Jl(n),characters:Yl(n),path:s}}const UN={format:"openai",analyzeRequest(e){if(e===null)return Mn(e);try{const t=JSON.parse(e),n=Ql(t)?.tools.length??null,s=hf.safeParse(t);if(!s.success){const o=mf.safeParse(t);return o.success?{parsed:o.data,comparisonValue:o.data,messageCount:DN(o.data.input),toolCount:n}:Mn(e)}return{parsed:s.data,comparisonValue:s.data,messageCount:s.data.messages.length,toolCount:n}}catch{return Mn(e)}},analyzeResponse(e){if(e===null)return hs;const t=xf(e);if(t===null){const s=bf(e);if(s===null)return hs;const o=BN(s);return{parsed:s,toolNames:o.length>0?o:null}}const n=t.choices[0]?.message?.tool_calls?.map(s=>s.function?.name??"").filter(s=>s!=="")??[];return{parsed:t,toolNames:n.length>0?n:null}},anatomySegments(e){if(e===null||typeof e!="object")return null;const t=e,n=[];if(typeof t.instructions=="string"&&t.instructions.length>0&&n.push(Ps("system","instructions",t.instructions,"/instructions")),Array.isArray(t.messages)&&t.messages.forEach((s,o)=>{if(s===null||typeof s!="object")return;const i=s,a=i.role==="user"||i.role==="assistant"||i.role==="system"||i.role==="tool"?i.role:"user",l=MN(i);n.push(Ps(a,`[${o}] ${a}`,l,`/messages/${o}`))}),Array.isArray(t.messages)||(typeof t.input=="string"&&t.input.length>0?n.push(Ps("user","input",t.input,"/input")):Array.isArray(t.input)&&t.input.forEach((s,o)=>{const i=FN(s),a=$N(s);n.push(Ps(i,`[${o}] ${i}`,a,`/input/${o}`))})),Array.isArray(t.tools)&&t.tools.length>0){const s=LN(t.tools);n.push(Ps("tools","tools",s,"/tools"))}return n.length>0?n:null}},WN={format:"unknown",analyzeRequest(e){return Mn(e)},analyzeResponse(){return hs},anatomySegments(){return null}},HN={anthropic:PN,openai:UN,unknown:WN};function zm(e){return HN[e]}function Qs(e){const t=Y3(e.path);return t==="unknown"?e.apiFormat:t}const mu="bg-white/[0.045] hover:bg-white/[0.075] inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground";function Pi({icon:e,children:t,title:n,className:s}){return r.jsxs("span",{className:le("bg-white/[0.045] inline-flex h-7 min-w-0 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground",s),title:n,children:[e,r.jsx("span",{className:"min-w-0 font-mono tabular-nums",children:t})]})}function VN(){return r.jsxs("span",{className:"inline-flex h-6 shrink-0 items-center gap-1.5 rounded-md bg-amber-300/[0.10] px-1.5 font-mono text-[10px] uppercase tracking-[0.14em] text-amber-100/90 ring-1 ring-amber-200/10",title:"This session has a turn that has not finished yet",children:[r.jsx(Qe,{className:"size-3 animate-spin"}),"Turn open"]})}function ZN({conversationId:e,startTime:t,endTime:n,totalCalls:s,totalInputTokens:o,totalOutputTokens:i,expanded:a,onToggle:l,providers:c,isLoading:u=!1,userAgent:d,clientPid:f,clientProjectFolder:h,showClientIdentity:m=!0,showProcessMetadata:v=!0,timeDisplayFormat:g,onClear:x}){const[b,y]=p.useState(!1),k=F=>{F.stopPropagation(),x!==void 0&&y(!0)},j=p.useCallback(F=>{F.stopPropagation(),window.open(Cd(e),"_blank","noopener,noreferrer")},[e]),S=c?.map(({provider:F,models:ee})=>({provider:F,tooltip:ee.length===1?ee[0]??F:ee.join(", ")}))??[],T=El({userAgent:d,conversationId:e,clientProjectFolder:h}),N=Go(T),I=d!=null&&d!=="",A=N??d??null,O=N!==null&&I?`${N} - ${d}`:null,D=e.startsWith("PID:")||e.includes("|"),E=e.length>24?e.slice(0,12)+"..."+e.slice(-12):e,L=yl(t,n,g),_=`${s} call${s!==1?"s":""}`;return r.jsxs("div",{role:"button",tabIndex:0,"data-nav-id":`conv-${e}`,"data-nav-action":a?"collapse":"expand",className:le("bg-card/80 shadow-sm relative flex cursor-pointer items-start gap-3 overflow-hidden rounded-[8px] px-3 py-2.5 transition-colors","hover:bg-card","select-none","sticky top-0 z-10 mb-2","focus-visible:ring-1 focus-visible:ring-cyan-300/35 focus-visible:outline-none"),onClick:l,onKeyDown:F=>{F.target===F.currentTarget&&(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),l())},children:[r.jsx(H3,{items:S,ariaLabel:"Models used in this session",className:"mt-0.5"}),r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsxs("span",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[D&&v?f!=null?r.jsxs("span",{className:"min-w-0 max-w-full truncate font-mono text-xs font-semibold text-violet-200",title:`PID ${f}`,children:["PID ",f]}):r.jsx("span",{className:"min-w-0 max-w-full truncate font-mono text-xs font-semibold text-violet-200",title:e,children:e}):r.jsx("span",{className:"min-w-0 max-w-full truncate font-mono text-xs font-semibold text-violet-200",title:e,children:D?"sessionless":E}),!D&&v&&f!==null&&f!==void 0&&r.jsxs("span",{className:"bg-white/[0.045] shrink-0 rounded px-1.5 py-0.5 font-mono text-xs tabular-nums text-muted-foreground",title:`Client process ID ${f}`,children:["PID ",f]}),D&&v&&h!==null&&h!==void 0&&h!==""&&r.jsx("span",{className:"min-w-0 max-w-[240px] truncate font-mono text-xs text-muted-foreground",title:h,children:h}),m&&A!==null&&A!==""&&r.jsxs("span",{className:"bg-white/[0.045] inline-flex min-h-6 shrink-0 flex-wrap items-center gap-1 rounded-md px-1.5 py-0.5 text-xs text-muted-foreground",title:O??A,children:[r.jsx(Ko,{client:T,className:"size-4 shrink-0"}),r.jsx("span",{className:"font-mono leading-snug tabular-nums",children:A})]}),u&&r.jsx(VN,{})]}),r.jsxs("span",{className:"mt-1.5 flex min-w-0 flex-wrap items-center gap-1.5",children:[r.jsx(Pi,{icon:r.jsx(en,{className:"size-3 shrink-0"}),title:L,children:L}),r.jsx(Pi,{icon:r.jsx(Uo,{className:"size-3 shrink-0"}),children:_}),r.jsxs(Pi,{icon:r.jsx(Js,{className:"size-3 shrink-0"}),className:"max-w-full",children:[r.jsx("span",{className:"text-blue-400",children:Fe(o)})," / ",r.jsx("span",{className:"text-amber-400",children:Fe(i)})]})]})]}),r.jsxs("span",{className:"flex shrink-0 items-start gap-1.5",children:[r.jsx("button",{type:"button",onClick:j,onKeyDown:F=>{(F.key==="Enter"||F.key===" ")&&j(F)},"aria-label":`Open session ${e} in a new tab`,title:"Open this session in a new tab",className:mu,children:r.jsx(gl,{className:"size-3.5"})}),x!==void 0&&r.jsx("button",{type:"button",onClick:k,"aria-label":`Clear group (${s} request${s!==1?"s":""})`,title:"Clear this group from the current view",className:mu,children:r.jsx(Wt,{className:"size-3.5"})}),r.jsx("span",{className:"bg-white/[0.045] hover:bg-white/[0.075] inline-flex size-8 shrink-0 items-center justify-center rounded-md text-slate-200","aria-hidden":"true",children:a?r.jsx(ot,{className:"size-4 shrink-0"}):u?r.jsx(Qe,{className:"size-4 shrink-0 animate-spin"}):r.jsx(St,{className:"size-4 shrink-0"})})]}),u&&r.jsx("span",{className:"pointer-events-none absolute inset-x-3 bottom-0 h-px overflow-hidden rounded-full bg-white/[0.06]","aria-hidden":"true",children:r.jsx("span",{className:"absolute inset-y-0 left-0 w-1/3 animate-pulse rounded-full bg-amber-200/65 shadow-[0_0_14px_rgba(252,211,77,0.32)]"})}),r.jsx(Op,{open:b,onOpenChange:y,title:"Clear this group from the current view?",description:`This will hide ${s} request${s!==1?"s":""} from the current view. Stored logs remain reloadable.`,confirmLabel:"Clear",variant:"destructive",onConfirm:()=>{x?.()}})]})}function qN(e){if(e.sessionId!==null&&e.sessionId!==""&&e.sessionId!==void 0)return e.sessionId;if(e.isTest===!0)return"provider-test";const t=e.clientPid!==null&&e.clientPid!==void 0,n=e.clientProjectFolder!==null&&e.clientProjectFolder!==void 0;if(!t&&!n)return"default";const s=t?`PID:${e.clientPid}`:"unknown",o=n?e.clientProjectFolder:"no-folder";return`${s}|${o}`}function GN(e){const t=new Map;for(const s of e){const o=qN(s),i=t.get(o);i!==void 0?i.push(s):t.set(o,[s])}const n=[];for(const[s,o]of t){const i=[...o].sort((a,l)=>a.timestamp.localeCompare(l.timestamp));n.push({id:s,conversationId:s,logs:i})}return n.sort((s,o)=>(s.logs[0]?.timestamp??"").localeCompare(o.logs[0]?.timestamp??"")),n}function KN(e,t,n){const s=new Array(e);return new Proxy(s,{get(o,i,a){if(typeof i=="string"){const l=i.charCodeAt(0);if(l>=48&&l<=57){const c=+i;if(Number.isInteger(c)&&c>=0&&c<e){let u=o[c];if(!u){const d=t[c*2];u=o[c]={index:c,key:n(c),start:d,size:t[c*2+1],end:d+t[c*2+1],lane:0}}return u}}if(i==="length")return e}return Reflect.get(o,i,a)}})}function ns(e,t,n){let s=n.initialDeps??[],o,i=!0;function a(){const l=e();return(l.length!==s.length||l.some((u,d)=>s[d]!==u))&&(s=l,o=t(...l),n?.onChange&&!(i&&n.skipInitialOnChange)&&n.onChange(o),i=!1),o}return a.updateDeps=l=>{s=l},a}function gu(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const xu=(e,t)=>Math.abs(e-t)<1.01,JN=(e,t,n)=>{let s;return function(...o){e.clearTimeout(s),s=e.setTimeout(()=>t.apply(this,o),n)}};let Ms;const bu=()=>{if(Ms!==void 0)return Ms;if(typeof navigator>"u")return Ms=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Ms=!0;const e=navigator.maxTouchPoints;return Ms=navigator.platform==="MacIntel"&&e!==void 0&&e>0},vu=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},YN=e=>e,XN=e=>{const t=Math.max(e.startIndex-e.overscan,0),s=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,o=new Array(s);for(let i=0;i<s;i++)o[i]=t+i;return o},QN=(e,t)=>{const n=e.scrollElement;if(!n)return;const s=e.targetWindow;if(!s)return;const o=a=>{const{width:l,height:c}=a;t({width:Math.round(l),height:Math.round(c)})};if(o(vu(n)),!s.ResizeObserver)return()=>{};const i=new s.ResizeObserver(a=>{const l=()=>{const c=a[0];if(c?.borderBoxSize){const u=c.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(vu(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},er={passive:!0},e4=(e,t)=>{const n=e.scrollElement;if(!n)return;const s=()=>{t({width:n.innerWidth,height:n.innerHeight})};return s(),n.addEventListener("resize",s,er),()=>{n.removeEventListener("resize",s)}},t4=typeof window>"u"?!0:"onscrollend"in window,Om=(e,t,n)=>{const s=e.scrollElement;if(!s)return;const o=e.targetWindow;if(!o)return;const i=e.options.useScrollendEvent&&t4;let a=0;const l=i?null:JN(o,()=>t(a,!1),e.options.isScrollingResetDelay),c=f=>()=>{a=n(s),l?.(),t(a,f)},u=c(!0),d=c(!1);return s.addEventListener("scroll",u,er),i&&s.addEventListener("scrollend",d,er),()=>{s.removeEventListener("scroll",u),i&&s.removeEventListener("scrollend",d)}},n4=(e,t)=>Om(e,t,n=>{const{horizontal:s,isRtl:o}=e.options;return s?n.scrollLeft*(o&&-1||1):n.scrollTop}),s4=(e,t)=>Om(e,t,n=>e.options.horizontal?n.scrollX:n.scrollY),r4=(e,t,n)=>{if(t?.borderBoxSize){const s=t.borderBoxSize[0];if(s)return Math.round(s[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Pm=(e,{adjustments:t=0,behavior:n},s)=>{var o,i;(i=(o=s.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[s.options.horizontal?"left":"top"]:e+t,behavior:n})},o4=Pm,i4=Pm;class a4{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var n,s,o;return((o=(s=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:s.now)==null?void 0:o.call(s))??Date.now()},this.observer=(()=>{let n=null;const s=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(i=>{const a=()=>{const l=i.target,c=this.indexFromElement(l);if(!l.isConnected){this.observer.unobserve(l);for(const[u,d]of this.elementsCache)if(d===l){this.elementsCache.delete(u);break}return}this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(l,i,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var o;(o=s())==null||o.disconnect(),n=null},observe:o=>{var i;return(i=s())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=s())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{var s,o;const i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:YN,rangeExtractor:XN,onChange:()=>{},measureElement:r4,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate"};for(const u in n){const d=n[u];d!==void 0&&(i[u]=d)}const a=this.options;let l=null,c=null;if(a!==void 0&&a.enabled&&i.enabled&&i.anchorTo==="end"&&this.scrollElement!==null){const u=a.count,d=i.count,f=this.getMeasurements(),h=u>0?((s=f[0])==null?void 0:s.key)??a.getItemKey(0):null,m=u>0?((o=f[u-1])==null?void 0:o.key)??a.getItemKey(u-1):null;if(d!==u||u>0&&d>0&&(i.getItemKey(0)!==h||i.getItemKey(d-1)!==m)){const x=u>0?this.getVirtualItemForOffset(this.getScrollOffset())??f[0]:null;x&&(l=[x.key,this.getScrollOffset()-x.start]);const b=i.followOnAppend===!0?"auto":i.followOnAppend||null;b&&d>u&&this.isAtEnd(a.scrollEndThreshold)&&(u===0||i.getItemKey(d-1)!==m)&&(c=b)}}this.options=i,(l||c)&&(this.pendingScrollAnchor=[l?.[0]??null,l?.[1]??0,c])},this.notify=n=>{var s,o;(o=(s=this.options).onChange)==null||o.call(s,this,n)},this.maybeNotify=ns(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}if(this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,a)=>{this._intendedScrollOffset!==null&&Math.abs(i-this._intendedScrollOffset)<1.5&&(i=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=a,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const i=this.scrollElement,a=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},l=()=>{this._iosTouching=!1,!(!bu()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,er),i.addEventListener("touchend",l,er),this.unsubs.push(()=>{i.removeEventListener("touchstart",a),i.removeEventListener("touchend",l),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const o=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,o&&this.scrollElement&&this.options.enabled){const[i,a,l]=o;if(i!==null){const{count:c,getItemKey:u}=this.options;let d=0;for(;d<c&&u(d)!==i;)d++;const f=d<c?this.getMeasurements()[d]:void 0;if(f){const h=f.start+a-this.getScrollOffset();xu(h,0)||this.applyScrollAdjustment(h)}}l&&this.scrollToEnd({behavior:l})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),s=this.getMaxScrollOffset();if(n<0||n>s)return;const o=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=o,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,s)=>{const o=new Map,i=new Map;for(let a=s-1;a>=0;a--){const l=n[a];if(o.has(l.lane))continue;const c=i.get(l.lane);if(c==null||l.end>c.end?i.set(l.lane,l):l.end<c.end&&o.set(l.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((a,l)=>a.end===l.end?a.index-l.index:a.end-l.end)[0]:void 0},this.getMeasurementOptions=ns(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(n,s,o,i,a,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMin=null,{count:n,paddingStart:s,scrollMargin:o,getItemKey:i,enabled:a,lanes:l,laneAssignmentMode:c}),{key:!1}),this.getMeasurements=ns(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:s,scrollMargin:o,getItemKey:i,enabled:a,lanes:l,laneAssignmentMode:c},u)=>{const d=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const v of this.laneAssignments.keys())v>=n&&this.laneAssignments.delete(v);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(v=>{this.itemSizeCache.set(v.key,v.size)}));const f=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),l===1){const v=this.options.gap,g=n*2;let x=this._flatMeasurements;if(!x||x.length<g){const k=new Float64Array(g);x&&f>0&&k.set(x.subarray(0,f*2)),x=k,this._flatMeasurements=x}let b;if(f===0)b=s+o;else{const k=f-1;b=x[k*2]+x[k*2+1]+v}for(let k=f;k<n;k++){const j=i(k),S=d.get(j),T=typeof S=="number"?S:this.options.estimateSize(k);x[k*2]=b,x[k*2+1]=T,b+=T+v}const y=KN(n,x,i);return this.measurementsCache=y,y}const h=this.measurementsCache.slice(0,f),m=new Array(l).fill(void 0);for(let v=0;v<f;v++){const g=h[v];g&&(m[g.lane]=v)}for(let v=f;v<n;v++){const g=i(v),x=this.laneAssignments.get(v);let b,y;const k=c==="estimate"||d.has(g);if(x!==void 0&&this.options.lanes>1){b=x;const N=m[b],I=N!==void 0?h[N]:void 0;y=I?I.end+this.options.gap:s+o}else{const N=this.options.lanes===1?h[v-1]:this.getFurthestMeasurement(h,v);y=N?N.end+this.options.gap:s+o,b=N?N.lane:v%this.options.lanes,this.options.lanes>1&&k&&this.laneAssignments.set(v,b)}const j=d.get(g),S=typeof j=="number"?j:this.options.estimateSize(v),T=y+S;h[v]={index:v,start:y,size:S,end:T,key:g,lane:b},m[b]=v}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ns(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,s,o,i)=>this.range=n.length>0&&s>0?l4({measurements:n,outerSize:s,scrollOffset:o,lanes:i,flat:i===1&&this._flatMeasurements!=null?this._flatMeasurements:null}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ns(()=>{let n=null,s=null;const o=this.calculateRange();return o&&(n=o.startIndex,s=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,s]},(n,s,o,i,a)=>i===null||a===null?[]:n({startIndex:i,endIndex:a,overscan:s,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const s=this.options.indexAttribute,o=n.getAttribute(s);return o?parseInt(o,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var s;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const o=this.scrollState.index??((s=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:s.index);if(o!==void 0&&this.range){const i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,o-i),l=Math.min(this.options.count-1,o+i);return n>=a&&n<=l}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,l)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(l))});return}const s=this.indexFromElement(n),o=this.options.getItemKey(s),i=this.elementsCache.get(o);i!==n&&(i&&this.observer.unobserve(i),this.observer.observe(n),this.elementsCache.set(o,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,s)=>{var o,i;if(n<0||n>=this.options.count)return;let a,l,c;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)c=this.options.getItemKey(n),l=u[n*2],a=u[n*2+1];else{const h=this.measurementsCache[n];if(!h)return;c=h.key,l=h.start,a=h.size}const d=this.itemSizeCache.get(c)??a,f=s-d;if(f!==0){const h=this.options.anchorTo==="end"&&((o=this.scrollState)==null?void 0:o.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=h?this.getTotalSize():0,v=((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[n]??{index:n,key:c,start:l,size:a,end:l+a,lane:0},f,this):l<this.getScrollOffset()+this.scrollAdjustments&&this.scrollDirection!=="backward");(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(c,s),this.itemSizeCacheVersion++,h?this.applyScrollAdjustment(this.getTotalSize()-m):v&&this.applyScrollAdjustment(f),this.notify(!1)}},this.getVirtualItems=ns(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,s)=>{const o=[];for(let i=0,a=n.length;i<a;i++){const l=n[i],c=s[l];o.push(c)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const s=this.getMeasurements();if(s.length===0)return;const o=this._flatMeasurements,i=this.options.lanes===1&&o!=null,a=Mm(0,s.length-1,i?l=>o[l*2]:l=>gu(s[l]).start,n);return gu(s[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,s,o=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),a=this.getScrollOffset();s==="auto"&&(s=n>=a+i?"end":"start"),s==="center"?n+=(o-i)/2:s==="end"&&(n-=i);const l=this.getMaxScrollOffset();return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,s="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.getSize(),i=this.getScrollOffset(),a=this.measurementsCache[n];if(!a)return;if(s==="auto")if(a.end>=i+o-this.options.scrollPaddingEnd)s="end";else if(a.start<=i+this.options.scrollPaddingStart)s="start";else return[i,s];if(s==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),s];const l=s==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,s,a.size),s]},this.scrollToOffset=(n,{align:s="start",behavior:o="auto"}={})=>{const i=this.getOffsetForAlignment(n,s),a=this.now();this.scrollState={index:null,align:s,behavior:o,startedAt:a,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:s="auto",behavior:o="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.getOffsetForIndex(n,s);if(!i)return;const[a,l]=i,c=this.now();this.scrollState={index:n,align:l,behavior:o,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:s="auto"}={})=>{const o=this.getScrollOffset()+n,i=this.now();this.scrollState={index:null,align:"start",behavior:s,startedAt:i,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var n;const s=this.getMeasurements();let o;if(s.length===0)o=this.options.paddingStart;else if(this.options.lanes===1){const i=s.length-1,a=this._flatMeasurements;a!=null?o=a[i*2]+a[i*2+1]:o=((n=s[i])==null?void 0:n.end)??0}else{const i=Array(this.options.lanes).fill(null);let a=s.length-1;for(;a>=0&&i.some(l=>l===null);){const l=s[a];i[l.lane]===null&&(i[l.lane]=l.end),a--}o=Math.max(...i.filter(l=>l!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const n=[];if(this.itemSizeCache.size===0)return n;const s=this.getMeasurements();for(const o of s)o&&this.itemSizeCache.has(o.key)&&n.push({index:o.index,key:o.key,start:o.start,size:o.size,end:o.end,lane:o.lane});return n},this._scrollToOffset=(n,{adjustments:s,behavior:o})=>{this._intendedScrollOffset=n+(s??0),this.options.scrollToFn(n,{behavior:o,adjustments:s},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}applyScrollAdjustment(t,n){t!==0&&(bu()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=t:this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:n}))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const s=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,o=s?s[0]:this.scrollState.lastTargetOffset,i=1,a=o!==this.scrollState.lastTargetOffset;if(!a&&xu(o,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=i){this.getScrollOffset()!==o&&this._scrollToOffset(o,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const l=this.getSize()||600,c=Math.abs(o-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&c>l;this.scrollState.lastTargetOffset=o,u||(this.scrollState.behavior="auto"),this._scrollToOffset(o,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const Mm=(e,t,n,s)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<s)e=o+1;else if(i>s)t=o-1;else return o}return e>0?e-1:0};function l4({measurements:e,outerSize:t,scrollOffset:n,lanes:s,flat:o}){const i=e.length-1,a=o?d=>o[d*2]:d=>e[d].start,l=o?d=>o[d*2]+o[d*2+1]:d=>e[d].end;if(e.length<=s)return{startIndex:0,endIndex:i};let c=Mm(0,i,a,n),u=c;if(s===1)for(;u<i&&l(u)<n+t;)u++;else if(s>1){const d=Array(s).fill(0);for(;u<i&&d.some(h=>h<n+t);){const h=e[u];d[h.lane]=h.end,u++}const f=Array(s).fill(n+t);for(;c>=0&&f.some(h=>h>=n);){const h=e[c];f[h.lane]=h.start,c--}c=Math.max(0,c-c%s),u=Math.min(i,u+(s-1-u%s))}return{startIndex:c,endIndex:u}}const yu=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Lm({useFlushSync:e=!0,...t}){const n=p.useReducer(i=>i+1,0)[1],s={...t,onChange:(i,a)=>{var l;e&&a?rr.flushSync(n):n(),(l=t.onChange)==null||l.call(t,i,a)}},[o]=p.useState(()=>new a4(s));return o.setOptions(s),yu(()=>o._didMount(),[]),yu(()=>o._willUpdate()),o}function c4(e){return Lm({observeElementRect:QN,observeElementOffset:n4,scrollToFn:i4,...e})}function u4(e){return Lm({getScrollElement:()=>typeof document<"u"?window:null,observeElementRect:e4,observeElementOffset:s4,scrollToFn:o4,initialOffset:()=>typeof document<"u"?window.scrollY:0,...e})}const on="agent-inspector:focus-log";function tr(e){window.dispatchEvent(new CustomEvent(on,{detail:e}))}function pi(e){if(typeof CustomEvent>"u"||!(e instanceof CustomEvent))return null;const t=e.detail,n=ye(t,"logId");if(typeof n!="number"||!Number.isInteger(n)||n<0)return null;const s=ye(t,"tab");switch(s){case"anatomy":case"request":case"response":break;case void 0:break;default:return null}const o=ye(t,"source"),i=ye(t,"toolCallIndex"),a=typeof i=="number"&&Number.isInteger(i)&&i>=0?{logId:n,tab:s??"request",toolCallIndex:i}:{logId:n,tab:s??"request"};switch(o){case"virtualizer":return{...a,source:o};case void 0:return a;default:return null}}function Et({className:e,style:t,d:n,eyeStalks:s,eyes:o,legs:i,extras:a}){return r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:t,className:le("inline-block size-5",e),children:[r.jsx("path",{d:n}),s,o,i,a]})}const Tn=r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"6.5",y1:"16",x2:"4.5",y2:"19.5"}),r.jsx("line",{x1:"9",y1:"17.5",x2:"8",y2:"20.5"}),r.jsx("line",{x1:"15",y1:"17.5",x2:"16",y2:"20.5"}),r.jsx("line",{x1:"17.5",y1:"16",x2:"19.5",y2:"19.5"})]}),Dm=r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"7",y1:"16",x2:"5.5",y2:"18.5"}),r.jsx("line",{x1:"9.5",y1:"17",x2:"8.5",y2:"19.5"}),r.jsx("line",{x1:"14.5",y1:"17",x2:"15.5",y2:"19.5"}),r.jsx("line",{x1:"17",y1:"16",x2:"18.5",y2:"18.5"})]});function $m({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),r.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),r.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 d4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"9.5",y1:"6.5",x2:"9.5",y2:"4.5"}),r.jsx("line",{x1:"14.5",y1:"6.5",x2:"14.5",y2:"4.5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"9.5",cy:"4",r:"1.1",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"14.5",cy:"4",r:"1.1",fill:"currentColor",stroke:"none"})]}),legs:Dm,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C4 9.5 2.5 10 3 12 C3.5 13.5 4.5 13 5 12"}),r.jsx("path",{d:"M19 11 C20 9.5 21.5 10 21 12 C20.5 13.5 19.5 13 19 12"})]})})}function f4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"7",y1:"7",x2:"6.5",y2:"4.5"}),r.jsx("line",{x1:"17",y1:"7",x2:"17.5",y2:"4.5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"6.5",cy:"4",r:"0.8",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"17.5",cy:"4",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M4 12 C2.5 10.5 1 11 1.5 13 C2 14.5 3.5 14 4.5 13"}),r.jsx("path",{d:"M20 12 C21.5 10.5 23 11 22.5 13 C22 14.5 20.5 14 19.5 13"})]})})}function p4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"6.5",x2:"10",y2:"3.5"}),r.jsx("line",{x1:"14",y1:"6.5",x2:"14",y2:"3.5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"10",cy:"3",r:"0.7",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"14",cy:"3",r:"0.7",fill:"currentColor",stroke:"none"})]}),legs:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"7",y1:"17",x2:"5",y2:"20.5"}),r.jsx("line",{x1:"9.5",y1:"18.5",x2:"8.5",y2:"21.5"}),r.jsx("line",{x1:"14.5",y1:"18.5",x2:"15.5",y2:"21.5"}),r.jsx("line",{x1:"17",y1:"17",x2:"19",y2:"20.5"})]}),extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M6.5 11 C5 8.5 3 9 3.5 11.5 C4 13.5 5 13 6 12"}),r.jsx("path",{d:"M17.5 11 C19 8.5 21 9 20.5 11.5 C20 13.5 19 13 18 12"})]})})}function h4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),r.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.8",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),r.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 m4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),r.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"}),r.jsx("line",{x1:"13.5",y1:"4",x2:"15.5",y2:"5"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),r.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 g4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"8",x2:"10",y2:"6"}),r.jsx("line",{x1:"14",y1:"8",x2:"14",y2:"6"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"9",y1:"6",x2:"11",y2:"6.5"}),r.jsx("line",{x1:"13",y1:"6",x2:"15",y2:"6.5"})]}),legs:Dm,extras:r.jsxs(r.Fragment,{children:[r.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"}),r.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 x4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),r.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.7",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.7",fill:"currentColor",stroke:"none"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),r.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),r.jsx("line",{x1:"8.5",y1:"4",x2:"10.5",y2:"4.5"}),r.jsx("line",{x1:"15.5",y1:"4",x2:"13.5",y2:"4.5"}),r.jsx("path",{d:"M9 15.5 C10 14.5 14 14.5 15 15.5"})]})})}function b4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),r.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"9.5",cy:"4.5",r:"1.2",fill:"none",stroke:"currentColor"}),r.jsx("circle",{cx:"14.5",cy:"4.5",r:"1.2",fill:"none",stroke:"currentColor"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),r.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),r.jsx("ellipse",{cx:"12",cy:"15",rx:"2",ry:"1.5",fill:"currentColor",stroke:"none"})]})})}function v4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"9.5",y1:"7",x2:"9",y2:"5"}),r.jsx("line",{x1:"14.5",y1:"7",x2:"15",y2:"5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"9",cy:"4.5",r:"1",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"15",cy:"4.5",r:"1",fill:"currentColor",stroke:"none"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C3.5 9 2 9.5 2.5 12 C3 14 4 13 5 12"}),r.jsx("path",{d:"M19 11 C20.5 9 22 9.5 21.5 12 C21 14 20 13 19 12"}),r.jsx("path",{d:"M9 14.5 C10 16 14 16 15 14.5"}),r.jsx("circle",{cx:"7",cy:"13",r:"1",fill:"currentColor",stroke:"none",opacity:"0.3"}),r.jsx("circle",{cx:"17",cy:"13",r:"1",fill:"currentColor",stroke:"none",opacity:"0.3"})]})})}function y4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5.5"}),r.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5.5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"7.5",y1:"5.5",x2:"16.5",y2:"5.5"}),r.jsx("rect",{x:"7",y:"5",width:"4",height:"2",rx:"0.5",fill:"currentColor",stroke:"none"}),r.jsx("rect",{x:"13",y:"5",width:"4",height:"2",rx:"0.5",fill:"currentColor",stroke:"none"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),r.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),r.jsx("path",{d:"M9.5 15 C10.5 16 13.5 16 14.5 15"})]})})}function w4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10.5",y1:"9.5",x2:"10.5",y2:"8"}),r.jsx("line",{x1:"13.5",y1:"9.5",x2:"13.5",y2:"8"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"10.5",cy:"7.5",r:"0.8",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"13.5",cy:"7.5",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"8",y1:"16",x2:"6.5",y2:"18"}),r.jsx("line",{x1:"10",y1:"17",x2:"9.5",y2:"19"}),r.jsx("line",{x1:"14",y1:"17",x2:"14.5",y2:"19"}),r.jsx("line",{x1:"16",y1:"16",x2:"17.5",y2:"18"})]}),extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M7.5 12 C6.5 11 5.5 11.5 6 13 C6.5 14 7 13.5 7.5 13"}),r.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 nr=[$m,d4,f4,p4,h4,m4,g4,x4,b4,v4,y4,w4];function ec(e){return nr[Math.abs(e)%nr.length]??$m}function _4(e){const t=nr.length-2;return t<=0?0:1+((Number.isFinite(e)?Math.trunc(e):0)%t+t)%t}function k4(e){return ec(_4(e))}const j4="x-anthropic-billing-header:";function S4(e){return e.trimStart().toLowerCase().startsWith(j4)}function C4(e){return Xl(e)?Object.prototype.hasOwnProperty.call(e,"system"):!1}function N4(e){if(!Xl(e))return!1;const t=ye(e,"type"),n=ye(e,"text");return typeof t!="string"||t!=="text"||typeof n!="string"?!1:S4(n)}function T4(e){let t;try{t=JSON.parse(e)}catch{return{body:e,removed:0}}if(!C4(t))return{body:e,removed:0};const n=t.system;if(!Array.isArray(n)||n.length===0)return{body:e,removed:0};const s=[];let o=0;for(const i of n){if(N4(i)){o+=1;continue}s.push(i)}return o===0?{body:e,removed:0}:(s.length===0?delete t.system:t.system=s,{body:JSON.stringify(t),removed:o})}const E4=400,wu=2e3;function A4(e){return Array.isArray(e)}function R4(e,t){const n=[e];let s=0;for(;n.length>0;){const o=n.pop();if(o!==void 0){if(s+=1,s>t)return s;if(!(o===null||typeof o!="object")){if(A4(o)){for(const i of o)n.push(i);continue}for(const i of Object.keys(o)){const a=o[i];a!==void 0&&n.push(a)}}}}return s}function I4(e){const t=R4(e,wu+1);return t<=E4?{depth:Number.POSITIVE_INFINITY}:t<=wu?{depth:3}:{depth:2}}function z4(e){try{const t=JSON.parse(e);return{kind:"json",data:ko(t)}}catch{return{kind:"text"}}}function Mi(e){const t=p.useMemo(()=>e===null?null:z4(e),[e]),n=t?.kind==="json"?t.data:null,s=p.useMemo(()=>n===null?null:I4(n),[n]),[o,i]=p.useState(!1),[a,l]=p.useState(0),[c,u]=p.useState(0),[d,f]=p.useTransition(),h=p.useCallback(()=>{const m=!o,v=m&&s!==null?s.depth:0;f(()=>{i(m),l(v),u(g=>g+1)})},[o,s]);return{parsedData:n,policy:s,isExpanded:o,toggle:h,isPending:d,bulkDepth:a,bulkRevision:c}}function ko(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=>ko(n));const t={};for(const n of Object.keys(e)){const s=Object.getOwnPropertyDescriptor(e,n);t[n]=ko(s?.value)}return t}case"bigint":case"symbol":case"function":case"undefined":return String(e)}return null}function Fm({className:e,orientation:t="horizontal",...n}){return r.jsx(b3,{"data-slot":"tabs","data-orientation":t,orientation:t,className:le("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const O4=Tl("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 Bm({className:e,variant:t="default",...n}){return r.jsx(v3,{"data-slot":"tabs-list","data-variant":t,className:le(O4({variant:t}),e),...n})}function kt({className:e,...t}){return r.jsx(y3,{"data-slot":"tabs-trigger",className:le("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 r.jsx(w3,{"data-slot":"tabs-content",className:le("flex-1 outline-none",e),...t})}function mn(e){const[t,n]=p.useState(!1),s=p.useRef(null);p.useEffect(()=>()=>{s.current!==null&&clearTimeout(s.current)},[]);const o=p.useCallback(i=>{i.stopPropagation(),e!==null&&Mt(e).then(a=>{a&&(n(!0),s.current!==null&&clearTimeout(s.current),s.current=setTimeout(()=>n(!1),2e3))})},[e]);return{copied:t,copy:o}}const P4=p.lazy(()=>Un(()=>import("./CompareDrawer-BxgmeTyv.js"),__vite__mapDeps([0,1])).then(e=>({default:e.CompareDrawer}))),M4=p.lazy(()=>Un(()=>import("./ReplayDialog-CMHVUtVB.js"),__vite__mapDeps([2,1,3])).then(e=>({default:e.ReplayDialog}))),L4=p.lazy(()=>Un(()=>import("./RequestAnatomy-CpqHIkD1.js"),__vite__mapDeps([4,1])).then(e=>({default:e.RequestAnatomy}))),D4=p.lazy(()=>Un(()=>import("./ResponseView-BvhBiQ5k.js"),__vite__mapDeps([3,1])).then(e=>({default:e.ResponseView}))),$4=p.lazy(()=>Un(()=>import("./StreamingChunkSequence-CcNvFNPp.js"),__vite__mapDeps([5,1])).then(e=>({default:e.StreamingChunkSequence}))),Ra=p.lazy(()=>Un(()=>import("./json-viewer-DjRQ00mw.js"),__vite__mapDeps([6,1])).then(e=>({default:e.JsonViewer}))),F4=p.lazy(()=>Un(()=>import("./json-viewer-DjRQ00mw.js"),__vite__mapDeps([6,1])).then(e=>({default:e.JsonViewerFromString}))),B4=1200,U4=12;function W4(e){const{containerRef:t,setExpandToPath:n,ensureTabActive:s,highlightMs:o}=e,i=p.useRef(null);return p.useCallback(a=>{s?.(),n(a.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"),i.current!==null&&clearTimeout(i.current),i.current=setTimeout(()=>{f.classList.remove("ring-2","ring-primary/60","ring-offset-1","ring-offset-background","rounded-sm","transition-shadow"),n(null)},o??B4)},u=`[data-anatomy-path="${(f=>typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(f):f.replace(/(["'\\[\](){}])/g,"\\$1"))(a.path)}"]`,d=f=>{const h=t.current;if(h!==null){const m=h.querySelector(u);if(m!==null){l(m);return}}f>0?window.requestAnimationFrame(()=>d(f-1)):n(null)};window.requestAnimationFrame(()=>d(U4))},[t,s,o,n])}const _u="The compact log metadata is still available. Retry if the local server was restarting or the body store was briefly unavailable.";function us(e){return e<1024?`${e.toLocaleString()} B`:e<1024*1024?`${(e/1024).toFixed(1)} KiB`:e<1024*1024*1024?`${(e/1024/1024).toFixed(1)} MiB`:`${(e/1024/1024/1024).toFixed(1)} GiB`}function H4(e,t){const n=[];return e!=null&&n.push(`Request ${us(e)}`),t!=null&&n.push(`Response ${us(t)}`),n.length===0?null:n.join(" · ")}function V4(e){if(e instanceof Fo)return{title:"Full bodies timed out",detail:"The log store did not answer before the UI timeout. Compact metadata is still available; retry loading the bodies."};if(e instanceof Error){const t=e.message.trim();return{title:"Full bodies could not be loaded",detail:t===""?_u:t}}return{title:"Full bodies could not be loaded",detail:_u}}class Um{diff(t,n,s={}){let o;typeof s=="function"?(o=s,s={}):"callback"in s&&(o=s.callback);const i=this.castInput(t,s),a=this.castInput(n,s),l=this.removeEmpty(this.tokenize(i,s)),c=this.removeEmpty(this.tokenize(a,s));return this.diffWithOptionsObj(l,c,s,o)}diffWithOptionsObj(t,n,s,o){var i;const a=y=>{if(y=this.postProcess(y,s),o){setTimeout(function(){o(y)},0);return}else return y},l=n.length,c=t.length;let u=1,d=l+c;s.maxEditLength!=null&&(d=Math.min(d,s.maxEditLength));const f=(i=s.timeout)!==null&&i!==void 0?i:1/0,h=Date.now()+f,m=[{oldPos:-1,lastComponent:void 0}];let v=this.extractCommon(m[0],n,t,0,s);if(m[0].oldPos+1>=c&&v+1>=l)return a(this.buildValues(m[0].lastComponent,n,t));let g=-1/0,x=1/0;const b=()=>{for(let y=Math.max(g,-u);y<=Math.min(x,u);y+=2){let k;const j=m[y-1],S=m[y+1];j&&(m[y-1]=void 0);let T=!1;if(S){const I=S.oldPos-y;T=S&&0<=I&&I<l}const N=j&&j.oldPos+1<c;if(!T&&!N){m[y]=void 0;continue}if(!N||T&&j.oldPos<S.oldPos?k=this.addToPath(S,!0,!1,0,s):k=this.addToPath(j,!1,!0,1,s),v=this.extractCommon(k,n,t,y,s),k.oldPos+1>=c&&v+1>=l)return a(this.buildValues(k.lastComponent,n,t))||!0;m[y]=k,k.oldPos+1>=c&&(x=Math.min(x,y-1)),v+1>=l&&(g=Math.max(g,y+1))}u++};if(o)(function y(){setTimeout(function(){if(u>d||Date.now()>h)return o(void 0);b()||y()},0)})();else for(;u<=d&&Date.now()<=h;){const y=b();if(y)return y}}addToPath(t,n,s,o,i){const a=t.lastComponent;return a&&!i.oneChangePerToken&&a.added===n&&a.removed===s?{oldPos:t.oldPos+o,lastComponent:{count:a.count+1,added:n,removed:s,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:s,previousComponent:a}}}extractCommon(t,n,s,o,i){const a=n.length,l=s.length;let c=t.oldPos,u=c-o,d=0;for(;u+1<a&&c+1<l&&this.equals(s[c+1],n[u+1],i);)u++,c++,d++,i.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!i.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,u}equals(t,n,s){return s.comparator?s.comparator(t,n):t===n||!!s.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let s=0;s<t.length;s++)t[s]&&n.push(t[s]);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,s){const o=[];let i;for(;t;)o.push(t),i=t.previousComponent,delete t.previousComponent,t=i;o.reverse();const a=o.length;let l=0,c=0,u=0;for(;l<a;l++){const d=o[l];if(d.removed)d.value=this.join(s.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,m){const v=s[u+m];return v.length>h.length?v: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 Z4 extends Um{constructor(){super(...arguments),this.tokenize=Hm}equals(t,n,s){return s.ignoreWhitespace?((!s.newlineIsToken||!t.includes(`
|
|
95
|
+
`)}function DN(e){return typeof e=="string"?e.length>0?1:0:Array.isArray(e)?e.length:e==null?null:1}function $N(e){if(typeof e=="string")return e;const t=ye(e,"text");if(typeof t=="string")return t;const n=Aa(ye(e,"content"));if(n.length>0)return n;const s=Aa(ye(e,"output"));if(s.length>0)return s;const o=ye(e,"arguments");return typeof o=="string"?o:""}function FN(e){const t=ye(e,"role");if(t==="system"||t==="user"||t==="assistant"||t==="tool")return t;const n=ye(e,"type");return n==="function_call_output"?"tool":"user"}function BN(e){const t=ye(e,"output");if(!Array.isArray(t))return[];const n=[];for(const s of t){if(ye(s,"type")!=="function_call")continue;const o=ye(s,"name");typeof o=="string"&&o.length>0&&n.push(o)}return n}function Ps(e,t,n,s){return{role:e,label:t,text:n,size:Jl(n),characters:Yl(n),path:s}}const UN={format:"openai",analyzeRequest(e){if(e===null)return Mn(e);try{const t=JSON.parse(e),n=Ql(t)?.tools.length??null,s=hf.safeParse(t);if(!s.success){const o=mf.safeParse(t);return o.success?{parsed:o.data,comparisonValue:o.data,messageCount:DN(o.data.input),toolCount:n}:Mn(e)}return{parsed:s.data,comparisonValue:s.data,messageCount:s.data.messages.length,toolCount:n}}catch{return Mn(e)}},analyzeResponse(e){if(e===null)return hs;const t=xf(e);if(t===null){const s=bf(e);if(s===null)return hs;const o=BN(s);return{parsed:s,toolNames:o.length>0?o:null}}const n=t.choices[0]?.message?.tool_calls?.map(s=>s.function?.name??"").filter(s=>s!=="")??[];return{parsed:t,toolNames:n.length>0?n:null}},anatomySegments(e){if(e===null||typeof e!="object")return null;const t=e,n=[];if(typeof t.instructions=="string"&&t.instructions.length>0&&n.push(Ps("system","instructions",t.instructions,"/instructions")),Array.isArray(t.messages)&&t.messages.forEach((s,o)=>{if(s===null||typeof s!="object")return;const i=s,a=i.role==="user"||i.role==="assistant"||i.role==="system"||i.role==="tool"?i.role:"user",l=MN(i);n.push(Ps(a,`[${o}] ${a}`,l,`/messages/${o}`))}),Array.isArray(t.messages)||(typeof t.input=="string"&&t.input.length>0?n.push(Ps("user","input",t.input,"/input")):Array.isArray(t.input)&&t.input.forEach((s,o)=>{const i=FN(s),a=$N(s);n.push(Ps(i,`[${o}] ${i}`,a,`/input/${o}`))})),Array.isArray(t.tools)&&t.tools.length>0){const s=LN(t.tools);n.push(Ps("tools","tools",s,"/tools"))}return n.length>0?n:null}},WN={format:"unknown",analyzeRequest(e){return Mn(e)},analyzeResponse(){return hs},anatomySegments(){return null}},HN={anthropic:PN,openai:UN,unknown:WN};function zm(e){return HN[e]}function Qs(e){const t=Y3(e.path);return t==="unknown"?e.apiFormat:t}const mu="bg-white/[0.045] hover:bg-white/[0.075] inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground";function Pi({icon:e,children:t,title:n,className:s}){return r.jsxs("span",{className:le("bg-white/[0.045] inline-flex h-7 min-w-0 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground",s),title:n,children:[e,r.jsx("span",{className:"min-w-0 font-mono tabular-nums",children:t})]})}function VN(){return r.jsxs("span",{className:"inline-flex h-6 shrink-0 items-center gap-1.5 rounded-md bg-amber-300/[0.10] px-1.5 font-mono text-[10px] uppercase tracking-[0.14em] text-amber-100/90 ring-1 ring-amber-200/10",title:"This session has a turn that has not finished yet",children:[r.jsx(Qe,{className:"size-3 animate-spin"}),"Turn open"]})}function ZN({conversationId:e,startTime:t,endTime:n,totalCalls:s,totalInputTokens:o,totalOutputTokens:i,expanded:a,onToggle:l,providers:c,isLoading:u=!1,userAgent:d,clientPid:f,clientProjectFolder:h,showClientIdentity:m=!0,showProcessMetadata:v=!0,timeDisplayFormat:g,onClear:x}){const[b,y]=p.useState(!1),k=F=>{F.stopPropagation(),x!==void 0&&y(!0)},j=p.useCallback(F=>{F.stopPropagation(),window.open(Cd(e),"_blank","noopener,noreferrer")},[e]),S=c?.map(({provider:F,models:ee})=>({provider:F,tooltip:ee.length===1?ee[0]??F:ee.join(", ")}))??[],T=El({userAgent:d,conversationId:e,clientProjectFolder:h}),N=Go(T),I=d!=null&&d!=="",A=N??d??null,O=N!==null&&I?`${N} - ${d}`:null,D=e.startsWith("PID:")||e.includes("|"),E=e.length>24?e.slice(0,12)+"..."+e.slice(-12):e,L=yl(t,n,g),_=`${s} call${s!==1?"s":""}`;return r.jsxs("div",{role:"button",tabIndex:0,"data-nav-id":`conv-${e}`,"data-nav-action":a?"collapse":"expand",className:le("bg-card/80 shadow-sm relative flex cursor-pointer items-start gap-3 overflow-hidden rounded-[8px] px-3 py-2.5 transition-colors","hover:bg-card","select-none","sticky top-0 z-10 mb-2","focus-visible:ring-1 focus-visible:ring-cyan-300/35 focus-visible:outline-none"),onClick:l,onKeyDown:F=>{F.target===F.currentTarget&&(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),l())},children:[r.jsx(H3,{items:S,ariaLabel:"Models used in this session",className:"mt-0.5"}),r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsxs("span",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[D&&v?f!=null?r.jsxs("span",{className:"min-w-0 max-w-full truncate font-mono text-xs font-semibold text-violet-200",title:`PID ${f}`,children:["PID ",f]}):r.jsx("span",{className:"min-w-0 max-w-full truncate font-mono text-xs font-semibold text-violet-200",title:e,children:e}):r.jsx("span",{className:"min-w-0 max-w-full truncate font-mono text-xs font-semibold text-violet-200",title:e,children:D?"sessionless":E}),!D&&v&&f!==null&&f!==void 0&&r.jsxs("span",{className:"bg-white/[0.045] shrink-0 rounded px-1.5 py-0.5 font-mono text-xs tabular-nums text-muted-foreground",title:`Client process ID ${f}`,children:["PID ",f]}),D&&v&&h!==null&&h!==void 0&&h!==""&&r.jsx("span",{className:"min-w-0 max-w-[240px] truncate font-mono text-xs text-muted-foreground",title:h,children:h}),m&&A!==null&&A!==""&&r.jsxs("span",{className:"bg-white/[0.045] inline-flex min-h-6 shrink-0 flex-wrap items-center gap-1 rounded-md px-1.5 py-0.5 text-xs text-muted-foreground",title:O??A,children:[r.jsx(Ko,{client:T,className:"size-4 shrink-0"}),r.jsx("span",{className:"font-mono leading-snug tabular-nums",children:A})]}),u&&r.jsx(VN,{})]}),r.jsxs("span",{className:"mt-1.5 flex min-w-0 flex-wrap items-center gap-1.5",children:[r.jsx(Pi,{icon:r.jsx(en,{className:"size-3 shrink-0"}),title:L,children:L}),r.jsx(Pi,{icon:r.jsx(Uo,{className:"size-3 shrink-0"}),children:_}),r.jsxs(Pi,{icon:r.jsx(Js,{className:"size-3 shrink-0"}),className:"max-w-full",children:[r.jsx("span",{className:"text-blue-400",children:Fe(o)})," / ",r.jsx("span",{className:"text-amber-400",children:Fe(i)})]})]})]}),r.jsxs("span",{className:"flex shrink-0 items-start gap-1.5",children:[r.jsx("button",{type:"button",onClick:j,onKeyDown:F=>{(F.key==="Enter"||F.key===" ")&&j(F)},"aria-label":`Open session ${e} in a new tab`,title:"Open this session in a new tab",className:mu,children:r.jsx(gl,{className:"size-3.5"})}),x!==void 0&&r.jsx("button",{type:"button",onClick:k,"aria-label":`Clear group (${s} request${s!==1?"s":""})`,title:"Clear this group from the current view",className:mu,children:r.jsx(Wt,{className:"size-3.5"})}),r.jsx("span",{className:"bg-white/[0.045] hover:bg-white/[0.075] inline-flex size-8 shrink-0 items-center justify-center rounded-md text-slate-200","aria-hidden":"true",children:a?r.jsx(ot,{className:"size-4 shrink-0"}):u?r.jsx(Qe,{className:"size-4 shrink-0 animate-spin"}):r.jsx(St,{className:"size-4 shrink-0"})})]}),u&&r.jsx("span",{className:"pointer-events-none absolute inset-x-3 bottom-0 h-px overflow-hidden rounded-full bg-white/[0.06]","aria-hidden":"true",children:r.jsx("span",{className:"absolute inset-y-0 left-0 w-1/3 animate-pulse rounded-full bg-amber-200/65 shadow-[0_0_14px_rgba(252,211,77,0.32)]"})}),r.jsx(Op,{open:b,onOpenChange:y,title:"Clear this group from the current view?",description:`This will hide ${s} request${s!==1?"s":""} from the current view. Stored logs remain reloadable.`,confirmLabel:"Clear",variant:"destructive",onConfirm:()=>{x?.()}})]})}function qN(e){if(e.sessionId!==null&&e.sessionId!==""&&e.sessionId!==void 0)return e.sessionId;if(e.isTest===!0)return"provider-test";const t=e.clientPid!==null&&e.clientPid!==void 0,n=e.clientProjectFolder!==null&&e.clientProjectFolder!==void 0;if(!t&&!n)return"default";const s=t?`PID:${e.clientPid}`:"unknown",o=n?e.clientProjectFolder:"no-folder";return`${s}|${o}`}function GN(e){const t=new Map;for(const s of e){const o=qN(s),i=t.get(o);i!==void 0?i.push(s):t.set(o,[s])}const n=[];for(const[s,o]of t){const i=[...o].sort((a,l)=>a.timestamp.localeCompare(l.timestamp));n.push({id:s,conversationId:s,logs:i})}return n.sort((s,o)=>(s.logs[0]?.timestamp??"").localeCompare(o.logs[0]?.timestamp??"")),n}function KN(e,t,n){const s=new Array(e);return new Proxy(s,{get(o,i,a){if(typeof i=="string"){const l=i.charCodeAt(0);if(l>=48&&l<=57){const c=+i;if(Number.isInteger(c)&&c>=0&&c<e){let u=o[c];if(!u){const d=t[c*2];u=o[c]={index:c,key:n(c),start:d,size:t[c*2+1],end:d+t[c*2+1],lane:0}}return u}}if(i==="length")return e}return Reflect.get(o,i,a)}})}function ns(e,t,n){let s=n.initialDeps??[],o,i=!0;function a(){const l=e();return(l.length!==s.length||l.some((u,d)=>s[d]!==u))&&(s=l,o=t(...l),n?.onChange&&!(i&&n.skipInitialOnChange)&&n.onChange(o),i=!1),o}return a.updateDeps=l=>{s=l},a}function gu(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const xu=(e,t)=>Math.abs(e-t)<1.01,JN=(e,t,n)=>{let s;return function(...o){e.clearTimeout(s),s=e.setTimeout(()=>t.apply(this,o),n)}};let Ms;const bu=()=>{if(Ms!==void 0)return Ms;if(typeof navigator>"u")return Ms=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Ms=!0;const e=navigator.maxTouchPoints;return Ms=navigator.platform==="MacIntel"&&e!==void 0&&e>0},vu=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},YN=e=>e,XN=e=>{const t=Math.max(e.startIndex-e.overscan,0),s=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,o=new Array(s);for(let i=0;i<s;i++)o[i]=t+i;return o},QN=(e,t)=>{const n=e.scrollElement;if(!n)return;const s=e.targetWindow;if(!s)return;const o=a=>{const{width:l,height:c}=a;t({width:Math.round(l),height:Math.round(c)})};if(o(vu(n)),!s.ResizeObserver)return()=>{};const i=new s.ResizeObserver(a=>{const l=()=>{const c=a[0];if(c?.borderBoxSize){const u=c.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(vu(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},er={passive:!0},e4=(e,t)=>{const n=e.scrollElement;if(!n)return;const s=()=>{t({width:n.innerWidth,height:n.innerHeight})};return s(),n.addEventListener("resize",s,er),()=>{n.removeEventListener("resize",s)}},t4=typeof window>"u"?!0:"onscrollend"in window,Om=(e,t,n)=>{const s=e.scrollElement;if(!s)return;const o=e.targetWindow;if(!o)return;const i=e.options.useScrollendEvent&&t4;let a=0;const l=i?null:JN(o,()=>t(a,!1),e.options.isScrollingResetDelay),c=f=>()=>{a=n(s),l?.(),t(a,f)},u=c(!0),d=c(!1);return s.addEventListener("scroll",u,er),i&&s.addEventListener("scrollend",d,er),()=>{s.removeEventListener("scroll",u),i&&s.removeEventListener("scrollend",d)}},n4=(e,t)=>Om(e,t,n=>{const{horizontal:s,isRtl:o}=e.options;return s?n.scrollLeft*(o&&-1||1):n.scrollTop}),s4=(e,t)=>Om(e,t,n=>e.options.horizontal?n.scrollX:n.scrollY),r4=(e,t,n)=>{if(t?.borderBoxSize){const s=t.borderBoxSize[0];if(s)return Math.round(s[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Pm=(e,{adjustments:t=0,behavior:n},s)=>{var o,i;(i=(o=s.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[s.options.horizontal?"left":"top"]:e+t,behavior:n})},o4=Pm,i4=Pm;class a4{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var n,s,o;return((o=(s=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:s.now)==null?void 0:o.call(s))??Date.now()},this.observer=(()=>{let n=null;const s=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(i=>{const a=()=>{const l=i.target,c=this.indexFromElement(l);if(!l.isConnected){this.observer.unobserve(l);for(const[u,d]of this.elementsCache)if(d===l){this.elementsCache.delete(u);break}return}this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(l,i,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var o;(o=s())==null||o.disconnect(),n=null},observe:o=>{var i;return(i=s())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=s())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{var s,o;const i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:YN,rangeExtractor:XN,onChange:()=>{},measureElement:r4,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate"};for(const u in n){const d=n[u];d!==void 0&&(i[u]=d)}const a=this.options;let l=null,c=null;if(a!==void 0&&a.enabled&&i.enabled&&i.anchorTo==="end"&&this.scrollElement!==null){const u=a.count,d=i.count,f=this.getMeasurements(),h=u>0?((s=f[0])==null?void 0:s.key)??a.getItemKey(0):null,m=u>0?((o=f[u-1])==null?void 0:o.key)??a.getItemKey(u-1):null;if(d!==u||u>0&&d>0&&(i.getItemKey(0)!==h||i.getItemKey(d-1)!==m)){const x=u>0?this.getVirtualItemForOffset(this.getScrollOffset())??f[0]:null;x&&(l=[x.key,this.getScrollOffset()-x.start]);const b=i.followOnAppend===!0?"auto":i.followOnAppend||null;b&&d>u&&this.isAtEnd(a.scrollEndThreshold)&&(u===0||i.getItemKey(d-1)!==m)&&(c=b)}}this.options=i,(l||c)&&(this.pendingScrollAnchor=[l?.[0]??null,l?.[1]??0,c])},this.notify=n=>{var s,o;(o=(s=this.options).onChange)==null||o.call(s,this,n)},this.maybeNotify=ns(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}if(this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,a)=>{this._intendedScrollOffset!==null&&Math.abs(i-this._intendedScrollOffset)<1.5&&(i=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=a,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const i=this.scrollElement,a=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},l=()=>{this._iosTouching=!1,!(!bu()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,er),i.addEventListener("touchend",l,er),this.unsubs.push(()=>{i.removeEventListener("touchstart",a),i.removeEventListener("touchend",l),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const o=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,o&&this.scrollElement&&this.options.enabled){const[i,a,l]=o;if(i!==null){const{count:c,getItemKey:u}=this.options;let d=0;for(;d<c&&u(d)!==i;)d++;const f=d<c?this.getMeasurements()[d]:void 0;if(f){const h=f.start+a-this.getScrollOffset();xu(h,0)||this.applyScrollAdjustment(h)}}l&&this.scrollToEnd({behavior:l})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),s=this.getMaxScrollOffset();if(n<0||n>s)return;const o=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=o,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,s)=>{const o=new Map,i=new Map;for(let a=s-1;a>=0;a--){const l=n[a];if(o.has(l.lane))continue;const c=i.get(l.lane);if(c==null||l.end>c.end?i.set(l.lane,l):l.end<c.end&&o.set(l.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((a,l)=>a.end===l.end?a.index-l.index:a.end-l.end)[0]:void 0},this.getMeasurementOptions=ns(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(n,s,o,i,a,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMin=null,{count:n,paddingStart:s,scrollMargin:o,getItemKey:i,enabled:a,lanes:l,laneAssignmentMode:c}),{key:!1}),this.getMeasurements=ns(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:s,scrollMargin:o,getItemKey:i,enabled:a,lanes:l,laneAssignmentMode:c},u)=>{const d=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const v of this.laneAssignments.keys())v>=n&&this.laneAssignments.delete(v);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(v=>{this.itemSizeCache.set(v.key,v.size)}));const f=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),l===1){const v=this.options.gap,g=n*2;let x=this._flatMeasurements;if(!x||x.length<g){const k=new Float64Array(g);x&&f>0&&k.set(x.subarray(0,f*2)),x=k,this._flatMeasurements=x}let b;if(f===0)b=s+o;else{const k=f-1;b=x[k*2]+x[k*2+1]+v}for(let k=f;k<n;k++){const j=i(k),S=d.get(j),T=typeof S=="number"?S:this.options.estimateSize(k);x[k*2]=b,x[k*2+1]=T,b+=T+v}const y=KN(n,x,i);return this.measurementsCache=y,y}const h=this.measurementsCache.slice(0,f),m=new Array(l).fill(void 0);for(let v=0;v<f;v++){const g=h[v];g&&(m[g.lane]=v)}for(let v=f;v<n;v++){const g=i(v),x=this.laneAssignments.get(v);let b,y;const k=c==="estimate"||d.has(g);if(x!==void 0&&this.options.lanes>1){b=x;const N=m[b],I=N!==void 0?h[N]:void 0;y=I?I.end+this.options.gap:s+o}else{const N=this.options.lanes===1?h[v-1]:this.getFurthestMeasurement(h,v);y=N?N.end+this.options.gap:s+o,b=N?N.lane:v%this.options.lanes,this.options.lanes>1&&k&&this.laneAssignments.set(v,b)}const j=d.get(g),S=typeof j=="number"?j:this.options.estimateSize(v),T=y+S;h[v]={index:v,start:y,size:S,end:T,key:g,lane:b},m[b]=v}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ns(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,s,o,i)=>this.range=n.length>0&&s>0?l4({measurements:n,outerSize:s,scrollOffset:o,lanes:i,flat:i===1&&this._flatMeasurements!=null?this._flatMeasurements:null}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ns(()=>{let n=null,s=null;const o=this.calculateRange();return o&&(n=o.startIndex,s=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,s]},(n,s,o,i,a)=>i===null||a===null?[]:n({startIndex:i,endIndex:a,overscan:s,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const s=this.options.indexAttribute,o=n.getAttribute(s);return o?parseInt(o,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var s;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const o=this.scrollState.index??((s=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:s.index);if(o!==void 0&&this.range){const i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,o-i),l=Math.min(this.options.count-1,o+i);return n>=a&&n<=l}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,l)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(l))});return}const s=this.indexFromElement(n),o=this.options.getItemKey(s),i=this.elementsCache.get(o);i!==n&&(i&&this.observer.unobserve(i),this.observer.observe(n),this.elementsCache.set(o,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,s)=>{var o,i;if(n<0||n>=this.options.count)return;let a,l,c;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)c=this.options.getItemKey(n),l=u[n*2],a=u[n*2+1];else{const h=this.measurementsCache[n];if(!h)return;c=h.key,l=h.start,a=h.size}const d=this.itemSizeCache.get(c)??a,f=s-d;if(f!==0){const h=this.options.anchorTo==="end"&&((o=this.scrollState)==null?void 0:o.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=h?this.getTotalSize():0,v=((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[n]??{index:n,key:c,start:l,size:a,end:l+a,lane:0},f,this):l<this.getScrollOffset()+this.scrollAdjustments&&this.scrollDirection!=="backward");(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(c,s),this.itemSizeCacheVersion++,h?this.applyScrollAdjustment(this.getTotalSize()-m):v&&this.applyScrollAdjustment(f),this.notify(!1)}},this.getVirtualItems=ns(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,s)=>{const o=[];for(let i=0,a=n.length;i<a;i++){const l=n[i],c=s[l];o.push(c)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const s=this.getMeasurements();if(s.length===0)return;const o=this._flatMeasurements,i=this.options.lanes===1&&o!=null,a=Mm(0,s.length-1,i?l=>o[l*2]:l=>gu(s[l]).start,n);return gu(s[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,s,o=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),a=this.getScrollOffset();s==="auto"&&(s=n>=a+i?"end":"start"),s==="center"?n+=(o-i)/2:s==="end"&&(n-=i);const l=this.getMaxScrollOffset();return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,s="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.getSize(),i=this.getScrollOffset(),a=this.measurementsCache[n];if(!a)return;if(s==="auto")if(a.end>=i+o-this.options.scrollPaddingEnd)s="end";else if(a.start<=i+this.options.scrollPaddingStart)s="start";else return[i,s];if(s==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),s];const l=s==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,s,a.size),s]},this.scrollToOffset=(n,{align:s="start",behavior:o="auto"}={})=>{const i=this.getOffsetForAlignment(n,s),a=this.now();this.scrollState={index:null,align:s,behavior:o,startedAt:a,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:s="auto",behavior:o="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.getOffsetForIndex(n,s);if(!i)return;const[a,l]=i,c=this.now();this.scrollState={index:n,align:l,behavior:o,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:s="auto"}={})=>{const o=this.getScrollOffset()+n,i=this.now();this.scrollState={index:null,align:"start",behavior:s,startedAt:i,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var n;const s=this.getMeasurements();let o;if(s.length===0)o=this.options.paddingStart;else if(this.options.lanes===1){const i=s.length-1,a=this._flatMeasurements;a!=null?o=a[i*2]+a[i*2+1]:o=((n=s[i])==null?void 0:n.end)??0}else{const i=Array(this.options.lanes).fill(null);let a=s.length-1;for(;a>=0&&i.some(l=>l===null);){const l=s[a];i[l.lane]===null&&(i[l.lane]=l.end),a--}o=Math.max(...i.filter(l=>l!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const n=[];if(this.itemSizeCache.size===0)return n;const s=this.getMeasurements();for(const o of s)o&&this.itemSizeCache.has(o.key)&&n.push({index:o.index,key:o.key,start:o.start,size:o.size,end:o.end,lane:o.lane});return n},this._scrollToOffset=(n,{adjustments:s,behavior:o})=>{this._intendedScrollOffset=n+(s??0),this.options.scrollToFn(n,{behavior:o,adjustments:s},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}applyScrollAdjustment(t,n){t!==0&&(bu()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=t:this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:n}))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const s=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,o=s?s[0]:this.scrollState.lastTargetOffset,i=1,a=o!==this.scrollState.lastTargetOffset;if(!a&&xu(o,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=i){this.getScrollOffset()!==o&&this._scrollToOffset(o,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const l=this.getSize()||600,c=Math.abs(o-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&c>l;this.scrollState.lastTargetOffset=o,u||(this.scrollState.behavior="auto"),this._scrollToOffset(o,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const Mm=(e,t,n,s)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<s)e=o+1;else if(i>s)t=o-1;else return o}return e>0?e-1:0};function l4({measurements:e,outerSize:t,scrollOffset:n,lanes:s,flat:o}){const i=e.length-1,a=o?d=>o[d*2]:d=>e[d].start,l=o?d=>o[d*2]+o[d*2+1]:d=>e[d].end;if(e.length<=s)return{startIndex:0,endIndex:i};let c=Mm(0,i,a,n),u=c;if(s===1)for(;u<i&&l(u)<n+t;)u++;else if(s>1){const d=Array(s).fill(0);for(;u<i&&d.some(h=>h<n+t);){const h=e[u];d[h.lane]=h.end,u++}const f=Array(s).fill(n+t);for(;c>=0&&f.some(h=>h>=n);){const h=e[c];f[h.lane]=h.start,c--}c=Math.max(0,c-c%s),u=Math.min(i,u+(s-1-u%s))}return{startIndex:c,endIndex:u}}const yu=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Lm({useFlushSync:e=!0,...t}){const n=p.useReducer(i=>i+1,0)[1],s={...t,onChange:(i,a)=>{var l;e&&a?rr.flushSync(n):n(),(l=t.onChange)==null||l.call(t,i,a)}},[o]=p.useState(()=>new a4(s));return o.setOptions(s),yu(()=>o._didMount(),[]),yu(()=>o._willUpdate()),o}function c4(e){return Lm({observeElementRect:QN,observeElementOffset:n4,scrollToFn:i4,...e})}function u4(e){return Lm({getScrollElement:()=>typeof document<"u"?window:null,observeElementRect:e4,observeElementOffset:s4,scrollToFn:o4,initialOffset:()=>typeof document<"u"?window.scrollY:0,...e})}const on="agent-inspector:focus-log";function tr(e){window.dispatchEvent(new CustomEvent(on,{detail:e}))}function pi(e){if(typeof CustomEvent>"u"||!(e instanceof CustomEvent))return null;const t=e.detail,n=ye(t,"logId");if(typeof n!="number"||!Number.isInteger(n)||n<0)return null;const s=ye(t,"tab");switch(s){case"anatomy":case"request":case"response":break;case void 0:break;default:return null}const o=ye(t,"source"),i=ye(t,"toolCallIndex"),a=typeof i=="number"&&Number.isInteger(i)&&i>=0?{logId:n,tab:s??"request",toolCallIndex:i}:{logId:n,tab:s??"request"};switch(o){case"virtualizer":return{...a,source:o};case void 0:return a;default:return null}}function Et({className:e,style:t,d:n,eyeStalks:s,eyes:o,legs:i,extras:a}){return r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:t,className:le("inline-block size-5",e),children:[r.jsx("path",{d:n}),s,o,i,a]})}const Tn=r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"6.5",y1:"16",x2:"4.5",y2:"19.5"}),r.jsx("line",{x1:"9",y1:"17.5",x2:"8",y2:"20.5"}),r.jsx("line",{x1:"15",y1:"17.5",x2:"16",y2:"20.5"}),r.jsx("line",{x1:"17.5",y1:"16",x2:"19.5",y2:"19.5"})]}),Dm=r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"7",y1:"16",x2:"5.5",y2:"18.5"}),r.jsx("line",{x1:"9.5",y1:"17",x2:"8.5",y2:"19.5"}),r.jsx("line",{x1:"14.5",y1:"17",x2:"15.5",y2:"19.5"}),r.jsx("line",{x1:"17",y1:"16",x2:"18.5",y2:"18.5"})]});function $m({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),r.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),r.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 d4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"9.5",y1:"6.5",x2:"9.5",y2:"4.5"}),r.jsx("line",{x1:"14.5",y1:"6.5",x2:"14.5",y2:"4.5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"9.5",cy:"4",r:"1.1",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"14.5",cy:"4",r:"1.1",fill:"currentColor",stroke:"none"})]}),legs:Dm,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C4 9.5 2.5 10 3 12 C3.5 13.5 4.5 13 5 12"}),r.jsx("path",{d:"M19 11 C20 9.5 21.5 10 21 12 C20.5 13.5 19.5 13 19 12"})]})})}function f4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"7",y1:"7",x2:"6.5",y2:"4.5"}),r.jsx("line",{x1:"17",y1:"7",x2:"17.5",y2:"4.5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"6.5",cy:"4",r:"0.8",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"17.5",cy:"4",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M4 12 C2.5 10.5 1 11 1.5 13 C2 14.5 3.5 14 4.5 13"}),r.jsx("path",{d:"M20 12 C21.5 10.5 23 11 22.5 13 C22 14.5 20.5 14 19.5 13"})]})})}function p4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"6.5",x2:"10",y2:"3.5"}),r.jsx("line",{x1:"14",y1:"6.5",x2:"14",y2:"3.5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"10",cy:"3",r:"0.7",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"14",cy:"3",r:"0.7",fill:"currentColor",stroke:"none"})]}),legs:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"7",y1:"17",x2:"5",y2:"20.5"}),r.jsx("line",{x1:"9.5",y1:"18.5",x2:"8.5",y2:"21.5"}),r.jsx("line",{x1:"14.5",y1:"18.5",x2:"15.5",y2:"21.5"}),r.jsx("line",{x1:"17",y1:"17",x2:"19",y2:"20.5"})]}),extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M6.5 11 C5 8.5 3 9 3.5 11.5 C4 13.5 5 13 6 12"}),r.jsx("path",{d:"M17.5 11 C19 8.5 21 9 20.5 11.5 C20 13.5 19 13 18 12"})]})})}function h4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),r.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.8",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),r.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 m4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),r.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"}),r.jsx("line",{x1:"13.5",y1:"4",x2:"15.5",y2:"5"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),r.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 g4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"8",x2:"10",y2:"6"}),r.jsx("line",{x1:"14",y1:"8",x2:"14",y2:"6"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"9",y1:"6",x2:"11",y2:"6.5"}),r.jsx("line",{x1:"13",y1:"6",x2:"15",y2:"6.5"})]}),legs:Dm,extras:r.jsxs(r.Fragment,{children:[r.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"}),r.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 x4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),r.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.7",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.7",fill:"currentColor",stroke:"none"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),r.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),r.jsx("line",{x1:"8.5",y1:"4",x2:"10.5",y2:"4.5"}),r.jsx("line",{x1:"15.5",y1:"4",x2:"13.5",y2:"4.5"}),r.jsx("path",{d:"M9 15.5 C10 14.5 14 14.5 15 15.5"})]})})}function b4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),r.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"9.5",cy:"4.5",r:"1.2",fill:"none",stroke:"currentColor"}),r.jsx("circle",{cx:"14.5",cy:"4.5",r:"1.2",fill:"none",stroke:"currentColor"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),r.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),r.jsx("ellipse",{cx:"12",cy:"15",rx:"2",ry:"1.5",fill:"currentColor",stroke:"none"})]})})}function v4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"9.5",y1:"7",x2:"9",y2:"5"}),r.jsx("line",{x1:"14.5",y1:"7",x2:"15",y2:"5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"9",cy:"4.5",r:"1",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"15",cy:"4.5",r:"1",fill:"currentColor",stroke:"none"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C3.5 9 2 9.5 2.5 12 C3 14 4 13 5 12"}),r.jsx("path",{d:"M19 11 C20.5 9 22 9.5 21.5 12 C21 14 20 13 19 12"}),r.jsx("path",{d:"M9 14.5 C10 16 14 16 15 14.5"}),r.jsx("circle",{cx:"7",cy:"13",r:"1",fill:"currentColor",stroke:"none",opacity:"0.3"}),r.jsx("circle",{cx:"17",cy:"13",r:"1",fill:"currentColor",stroke:"none",opacity:"0.3"})]})})}function y4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5.5"}),r.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5.5"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"7.5",y1:"5.5",x2:"16.5",y2:"5.5"}),r.jsx("rect",{x:"7",y:"5",width:"4",height:"2",rx:"0.5",fill:"currentColor",stroke:"none"}),r.jsx("rect",{x:"13",y:"5",width:"4",height:"2",rx:"0.5",fill:"currentColor",stroke:"none"})]}),legs:Tn,extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),r.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),r.jsx("path",{d:"M9.5 15 C10.5 16 13.5 16 14.5 15"})]})})}function w4({className:e}){return r.jsx(Et,{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:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"10.5",y1:"9.5",x2:"10.5",y2:"8"}),r.jsx("line",{x1:"13.5",y1:"9.5",x2:"13.5",y2:"8"})]}),eyes:r.jsxs(r.Fragment,{children:[r.jsx("circle",{cx:"10.5",cy:"7.5",r:"0.8",fill:"currentColor",stroke:"none"}),r.jsx("circle",{cx:"13.5",cy:"7.5",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"8",y1:"16",x2:"6.5",y2:"18"}),r.jsx("line",{x1:"10",y1:"17",x2:"9.5",y2:"19"}),r.jsx("line",{x1:"14",y1:"17",x2:"14.5",y2:"19"}),r.jsx("line",{x1:"16",y1:"16",x2:"17.5",y2:"18"})]}),extras:r.jsxs(r.Fragment,{children:[r.jsx("path",{d:"M7.5 12 C6.5 11 5.5 11.5 6 13 C6.5 14 7 13.5 7.5 13"}),r.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 nr=[$m,d4,f4,p4,h4,m4,g4,x4,b4,v4,y4,w4];function ec(e){return nr[Math.abs(e)%nr.length]??$m}function _4(e){const t=nr.length-2;return t<=0?0:1+((Number.isFinite(e)?Math.trunc(e):0)%t+t)%t}function k4(e){return ec(_4(e))}const j4="x-anthropic-billing-header:";function S4(e){return e.trimStart().toLowerCase().startsWith(j4)}function C4(e){return Xl(e)?Object.prototype.hasOwnProperty.call(e,"system"):!1}function N4(e){if(!Xl(e))return!1;const t=ye(e,"type"),n=ye(e,"text");return typeof t!="string"||t!=="text"||typeof n!="string"?!1:S4(n)}function T4(e){let t;try{t=JSON.parse(e)}catch{return{body:e,removed:0}}if(!C4(t))return{body:e,removed:0};const n=t.system;if(!Array.isArray(n)||n.length===0)return{body:e,removed:0};const s=[];let o=0;for(const i of n){if(N4(i)){o+=1;continue}s.push(i)}return o===0?{body:e,removed:0}:(s.length===0?delete t.system:t.system=s,{body:JSON.stringify(t),removed:o})}const E4=400,wu=2e3;function A4(e){return Array.isArray(e)}function R4(e,t){const n=[e];let s=0;for(;n.length>0;){const o=n.pop();if(o!==void 0){if(s+=1,s>t)return s;if(!(o===null||typeof o!="object")){if(A4(o)){for(const i of o)n.push(i);continue}for(const i of Object.keys(o)){const a=o[i];a!==void 0&&n.push(a)}}}}return s}function I4(e){const t=R4(e,wu+1);return t<=E4?{depth:Number.POSITIVE_INFINITY}:t<=wu?{depth:3}:{depth:2}}function z4(e){try{const t=JSON.parse(e);return{kind:"json",data:ko(t)}}catch{return{kind:"text"}}}function Mi(e){const t=p.useMemo(()=>e===null?null:z4(e),[e]),n=t?.kind==="json"?t.data:null,s=p.useMemo(()=>n===null?null:I4(n),[n]),[o,i]=p.useState(!1),[a,l]=p.useState(0),[c,u]=p.useState(0),[d,f]=p.useTransition(),h=p.useCallback(()=>{const m=!o,v=m&&s!==null?s.depth:0;f(()=>{i(m),l(v),u(g=>g+1)})},[o,s]);return{parsedData:n,policy:s,isExpanded:o,toggle:h,isPending:d,bulkDepth:a,bulkRevision:c}}function ko(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=>ko(n));const t={};for(const n of Object.keys(e)){const s=Object.getOwnPropertyDescriptor(e,n);t[n]=ko(s?.value)}return t}case"bigint":case"symbol":case"function":case"undefined":return String(e)}return null}function Fm({className:e,orientation:t="horizontal",...n}){return r.jsx(b3,{"data-slot":"tabs","data-orientation":t,orientation:t,className:le("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const O4=Tl("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 Bm({className:e,variant:t="default",...n}){return r.jsx(v3,{"data-slot":"tabs-list","data-variant":t,className:le(O4({variant:t}),e),...n})}function kt({className:e,...t}){return r.jsx(y3,{"data-slot":"tabs-trigger",className:le("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 r.jsx(w3,{"data-slot":"tabs-content",className:le("flex-1 outline-none",e),...t})}function mn(e){const[t,n]=p.useState(!1),s=p.useRef(null);p.useEffect(()=>()=>{s.current!==null&&clearTimeout(s.current)},[]);const o=p.useCallback(i=>{i.stopPropagation(),e!==null&&Mt(e).then(a=>{a&&(n(!0),s.current!==null&&clearTimeout(s.current),s.current=setTimeout(()=>n(!1),2e3))})},[e]);return{copied:t,copy:o}}const P4=p.lazy(()=>Un(()=>import("./CompareDrawer-BRV9ztWd.js"),__vite__mapDeps([0,1])).then(e=>({default:e.CompareDrawer}))),M4=p.lazy(()=>Un(()=>import("./ReplayDialog-B4b6aD0q.js"),__vite__mapDeps([2,1,3])).then(e=>({default:e.ReplayDialog}))),L4=p.lazy(()=>Un(()=>import("./RequestAnatomy-ybH1l2Bp.js"),__vite__mapDeps([4,1])).then(e=>({default:e.RequestAnatomy}))),D4=p.lazy(()=>Un(()=>import("./ResponseView-DpPKgH-Y.js"),__vite__mapDeps([3,1])).then(e=>({default:e.ResponseView}))),$4=p.lazy(()=>Un(()=>import("./StreamingChunkSequence-9f_rtMzz.js"),__vite__mapDeps([5,1])).then(e=>({default:e.StreamingChunkSequence}))),Ra=p.lazy(()=>Un(()=>import("./json-viewer-DFpIPmLo.js"),__vite__mapDeps([6,1])).then(e=>({default:e.JsonViewer}))),F4=p.lazy(()=>Un(()=>import("./json-viewer-DFpIPmLo.js"),__vite__mapDeps([6,1])).then(e=>({default:e.JsonViewerFromString}))),B4=1200,U4=12;function W4(e){const{containerRef:t,setExpandToPath:n,ensureTabActive:s,highlightMs:o}=e,i=p.useRef(null);return p.useCallback(a=>{s?.(),n(a.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"),i.current!==null&&clearTimeout(i.current),i.current=setTimeout(()=>{f.classList.remove("ring-2","ring-primary/60","ring-offset-1","ring-offset-background","rounded-sm","transition-shadow"),n(null)},o??B4)},u=`[data-anatomy-path="${(f=>typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(f):f.replace(/(["'\\[\](){}])/g,"\\$1"))(a.path)}"]`,d=f=>{const h=t.current;if(h!==null){const m=h.querySelector(u);if(m!==null){l(m);return}}f>0?window.requestAnimationFrame(()=>d(f-1)):n(null)};window.requestAnimationFrame(()=>d(U4))},[t,s,o,n])}const _u="The compact log metadata is still available. Retry if the local server was restarting or the body store was briefly unavailable.";function us(e){return e<1024?`${e.toLocaleString()} B`:e<1024*1024?`${(e/1024).toFixed(1)} KiB`:e<1024*1024*1024?`${(e/1024/1024).toFixed(1)} MiB`:`${(e/1024/1024/1024).toFixed(1)} GiB`}function H4(e,t){const n=[];return e!=null&&n.push(`Request ${us(e)}`),t!=null&&n.push(`Response ${us(t)}`),n.length===0?null:n.join(" · ")}function V4(e){if(e instanceof Fo)return{title:"Full bodies timed out",detail:"The log store did not answer before the UI timeout. Compact metadata is still available; retry loading the bodies."};if(e instanceof Error){const t=e.message.trim();return{title:"Full bodies could not be loaded",detail:t===""?_u:t}}return{title:"Full bodies could not be loaded",detail:_u}}class Um{diff(t,n,s={}){let o;typeof s=="function"?(o=s,s={}):"callback"in s&&(o=s.callback);const i=this.castInput(t,s),a=this.castInput(n,s),l=this.removeEmpty(this.tokenize(i,s)),c=this.removeEmpty(this.tokenize(a,s));return this.diffWithOptionsObj(l,c,s,o)}diffWithOptionsObj(t,n,s,o){var i;const a=y=>{if(y=this.postProcess(y,s),o){setTimeout(function(){o(y)},0);return}else return y},l=n.length,c=t.length;let u=1,d=l+c;s.maxEditLength!=null&&(d=Math.min(d,s.maxEditLength));const f=(i=s.timeout)!==null&&i!==void 0?i:1/0,h=Date.now()+f,m=[{oldPos:-1,lastComponent:void 0}];let v=this.extractCommon(m[0],n,t,0,s);if(m[0].oldPos+1>=c&&v+1>=l)return a(this.buildValues(m[0].lastComponent,n,t));let g=-1/0,x=1/0;const b=()=>{for(let y=Math.max(g,-u);y<=Math.min(x,u);y+=2){let k;const j=m[y-1],S=m[y+1];j&&(m[y-1]=void 0);let T=!1;if(S){const I=S.oldPos-y;T=S&&0<=I&&I<l}const N=j&&j.oldPos+1<c;if(!T&&!N){m[y]=void 0;continue}if(!N||T&&j.oldPos<S.oldPos?k=this.addToPath(S,!0,!1,0,s):k=this.addToPath(j,!1,!0,1,s),v=this.extractCommon(k,n,t,y,s),k.oldPos+1>=c&&v+1>=l)return a(this.buildValues(k.lastComponent,n,t))||!0;m[y]=k,k.oldPos+1>=c&&(x=Math.min(x,y-1)),v+1>=l&&(g=Math.max(g,y+1))}u++};if(o)(function y(){setTimeout(function(){if(u>d||Date.now()>h)return o(void 0);b()||y()},0)})();else for(;u<=d&&Date.now()<=h;){const y=b();if(y)return y}}addToPath(t,n,s,o,i){const a=t.lastComponent;return a&&!i.oneChangePerToken&&a.added===n&&a.removed===s?{oldPos:t.oldPos+o,lastComponent:{count:a.count+1,added:n,removed:s,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:s,previousComponent:a}}}extractCommon(t,n,s,o,i){const a=n.length,l=s.length;let c=t.oldPos,u=c-o,d=0;for(;u+1<a&&c+1<l&&this.equals(s[c+1],n[u+1],i);)u++,c++,d++,i.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!i.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,u}equals(t,n,s){return s.comparator?s.comparator(t,n):t===n||!!s.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let s=0;s<t.length;s++)t[s]&&n.push(t[s]);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,s){const o=[];let i;for(;t;)o.push(t),i=t.previousComponent,delete t.previousComponent,t=i;o.reverse();const a=o.length;let l=0,c=0,u=0;for(;l<a;l++){const d=o[l];if(d.removed)d.value=this.join(s.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,m){const v=s[u+m];return v.length>h.length?v: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 Z4 extends Um{constructor(){super(...arguments),this.tokenize=Hm}equals(t,n,s){return s.ignoreWhitespace?((!s.newlineIsToken||!t.includes(`
|
|
96
96
|
`))&&(t=t.trim()),(!s.newlineIsToken||!n.includes(`
|
|
97
97
|
`))&&(n=n.trim())):s.ignoreNewlineAtEof&&!s.newlineIsToken&&(t.endsWith(`
|
|
98
98
|
`)&&(t=t.slice(0,-1)),n.endsWith(`
|