@tonyclaw/agent-inspector 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/.output/cli.js +7 -1
  2. package/.output/nitro.json +1 -1
  3. package/.output/public/assets/{CompareDrawer-ZL1yvIH6.js → CompareDrawer-BgcAk1te.js} +1 -1
  4. package/.output/public/assets/{ProxyViewerContainer-vhfV449d.js → ProxyViewerContainer-7b_uwvT7.js} +4 -4
  5. package/.output/public/assets/{ReplayDialog-D-gDSuhe.js → ReplayDialog-7Pvhjbjk.js} +1 -1
  6. package/.output/public/assets/{RequestAnatomy-CVt2vHih.js → RequestAnatomy-BX-UKYQg.js} +1 -1
  7. package/.output/public/assets/{ResponseView-zVdHc0mv.js → ResponseView-zFxGX8xH.js} +2 -2
  8. package/.output/public/assets/{StreamingChunkSequence-DQFhpV_4.js → StreamingChunkSequence-DzXzVtBF.js} +1 -1
  9. package/.output/public/assets/{_sessionId-DeeeQcS9.js → _sessionId-CmsUOEIS.js} +1 -1
  10. package/.output/public/assets/{index-_inxJ5Yi.js → index-DXR7RB48.js} +1 -1
  11. package/.output/public/assets/index-MfTE52Ty.js +1 -0
  12. package/.output/public/assets/{json-viewer-B9gYSlz7.js → json-viewer-CiMN_9sG.js} +1 -1
  13. package/.output/public/assets/{main-Do_fjInc.js → main-Ba9x64uY.js} +2 -2
  14. package/.output/server/{_sessionId-D1XraBbJ.mjs → _sessionId-B8GZtC4P.mjs} +2 -2
  15. package/.output/server/_ssr/{CompareDrawer-Ot4EsLht.mjs → CompareDrawer-SBDtZDAp.mjs} +2 -2
  16. package/.output/server/_ssr/{ProxyViewerContainer-Cb4ZWwFC.mjs → ProxyViewerContainer-B__2O0zh.mjs} +8 -8
  17. package/.output/server/_ssr/{ReplayDialog-B5m_dFdr.mjs → ReplayDialog-D0u1VHz_.mjs} +3 -3
  18. package/.output/server/_ssr/{RequestAnatomy-OUrXKyoI.mjs → RequestAnatomy-ClvQ3RFh.mjs} +2 -2
  19. package/.output/server/_ssr/{ResponseView-DV1N1gQ8.mjs → ResponseView-B4UAvUym.mjs} +2 -2
  20. package/.output/server/_ssr/{StreamingChunkSequence-CJl70SsF.mjs → StreamingChunkSequence-D_aiGGzz.mjs} +2 -2
  21. package/.output/server/_ssr/{index-CztmjZ0i.mjs → index-DuWacKr6.mjs} +2 -2
  22. package/.output/server/_ssr/index.mjs +2 -2
  23. package/.output/server/_ssr/{json-viewer-CO0sbce_.mjs → json-viewer-CmNMVinH.mjs} +2 -2
  24. package/.output/server/_ssr/{router-BxWKty_9.mjs → router-BP46kVrE.mjs} +24 -4
  25. package/.output/server/{_tanstack-start-manifest_v-BvJ2LKGG.mjs → _tanstack-start-manifest_v-DltuTRfm.mjs} +1 -1
  26. package/.output/server/index.mjs +63 -63
  27. package/package.json +1 -1
  28. package/src/cli.ts +9 -1
  29. package/src/proxy/sessionProcess.ts +22 -1
  30. package/.output/public/assets/index-BJvPLWvO.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CompareDrawer-ZL1yvIH6.js","assets/main-Do_fjInc.js","assets/ReplayDialog-D-gDSuhe.js","assets/ResponseView-zVdHc0mv.js","assets/RequestAnatomy-CVt2vHih.js","assets/StreamingChunkSequence-DQFhpV_4.js","assets/json-viewer-B9gYSlz7.js"])))=>i.map(i=>d[i]);
2
- import{u as In,a as nd,r as p,j as s,c as rs,g as ug,b as rd,d as Hr,e as dg,f as lt,h as sd,_ as zn}from"./main-Do_fjInc.js";function ee(e,t,n){function r(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 m=d[f];m in l||(l[m]=u[m].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;r(u,l),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:r}),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 Xn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class od extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const id={};function an(e){return id}function ad(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Mi(e,t){return typeof t=="bigint"?t.toString():t}function yo(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ta(e){return e==null}function Ea(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function fg(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const c=r.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const 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 Ul=Symbol("evaluating");function ze(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ul)return r===void 0&&(r=Ul,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Pn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function fn(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Wl(e){return JSON.stringify(e)}function pg(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ld="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Rr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const hg=yo(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function rr(e){if(Rr(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Rr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function cd(e){return rr(e)?{...e}:Array.isArray(e)?[...e]:e}const mg=new Set(["string","number","symbol"]);function sr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pn(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function ke(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 gg(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const xg={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 bg(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=fn(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 Pn(this,"shape",a),a},checks:[]});return pn(e,i)}function vg(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=fn(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 Pn(this,"shape",a),a},checks:[]});return pn(e,i)}function yg(e,t){if(!rr(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=fn(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Pn(this,"shape",i),i}});return pn(e,o)}function wg(e,t){if(!rr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=fn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Pn(this,"shape",r),r}});return pn(e,n)}function kg(e,t){const n=fn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Pn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return pn(e,n)}function _g(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=fn(t._zod.def,{get shape(){const l=t._zod.def.shape,c={...l};if(n)for(const u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(const u in l)c[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return Pn(this,"shape",c),c},checks:[]});return pn(t,a)}function jg(e,t,n){const r=fn(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 Pn(this,"shape",i),i}});return pn(t,r)}function Kn(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 Jn(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ss(e){return typeof e=="string"?e:e?.message}function ln(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=ss(e.inst?._zod.def?.error?.(e))??ss(t?.error?.(e))??ss(n.customError?.(e))??ss(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Aa(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ir(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const ud=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Mi,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},dd=ee("$ZodError",ud),fd=ee("$ZodError",ud,{Parent:Error});function Sg(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Cg(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>r({issues:a}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({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 r(e),n}const Ra=e=>(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Xn;if(a.issues.length){const l=new(o?.Err??e)(a.issues.map(c=>ln(c,i,an())));throw ld(l,o?.callee),l}return a.value},Ia=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{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=>ln(c,i,an())));throw ld(l,o?.callee),l}return a.value},wo=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new Xn;return i.issues.length?{success:!1,error:new(e??dd)(i.issues.map(a=>ln(a,o,an())))}:{success:!0,data:i.value}},Ng=wo(fd),ko=e=>async(t,n,r)=>{const o=r?Object.assign(r,{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=>ln(a,o,an())))}:{success:!0,data:i.value}},Tg=ko(fd),Eg=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ra(e)(t,n,o)},Ag=e=>(t,n,r)=>Ra(e)(t,n,r),Rg=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ia(e)(t,n,o)},Ig=e=>async(t,n,r)=>Ia(e)(t,n,r),zg=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return wo(e)(t,n,o)},Pg=e=>(t,n,r)=>wo(e)(t,n,r),Og=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ko(e)(t,n,o)},Mg=e=>async(t,n,r)=>ko(e)(t,n,r),Lg=/^[cC][^\s-]{8,}$/,Dg=/^[0-9a-z]+$/,$g=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Fg=/^[0-9a-vA-V]{20}$/,Bg=/^[A-Za-z0-9]{27}$/,Ug=/^[a-zA-Z0-9_-]{21}$/,Wg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Hg=/^([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})$/,Hl=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)$/,Zg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Vg="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function qg(){return new RegExp(Vg,"u")}const Gg=/^(?:(?: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])$/,Kg=/^(([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}|:))$/,Jg=/^((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])$/,Yg=/^(([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])$/,Xg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pd=/^[A-Za-z0-9_-]*$/,Qg=/^\+[1-9]\d{6,14}$/,hd="(?:(?:\\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])))",ex=new RegExp(`^${hd}$`);function md(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 tx(e){return new RegExp(`^${md(e)}$`)}function nx(e){const t=md({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${hd}T(?:${r})$`)}const rx=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},sx=/^-?\d+$/,gd=/^-?\d+(?:\.\d+)?$/,ox=/^(?:true|false)$/i,ix=/^null$/i,ax=/^[^A-Z]*$/,lx=/^[^a-z]*$/,ct=ee("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),xd={number:"number",bigint:"bigint",object:"date"},bd=ee("$ZodCheckLessThan",(e,t)=>{ct.init(e,t);const n=xd[typeof t.value];e._zod.onattach.push(r=>{const o=r._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=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vd=ee("$ZodCheckGreaterThan",(e,t)=>{ct.init(e,t);const n=xd[typeof t.value];e._zod.onattach.push(r=>{const o=r._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=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),cx=ee("$ZodCheckMultipleOf",(e,t)=>{ct.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):fg(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})}}),ux=ee("$ZodCheckNumberFormat",(e,t)=>{ct.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=xg[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=sx)}),e._zod.check=a=>{const l=a.value;if(n){if(!Number.isInteger(l)){a.issues.push({expected:r,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:r,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:r,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})}}),dx=ee("$ZodCheckMaxLength",(e,t)=>{var n;ct.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ta(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const a=Aa(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),fx=ee("$ZodCheckMinLength",(e,t)=>{var n;ct.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ta(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const a=Aa(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),px=ee("$ZodCheckLengthEquals",(e,t)=>{var n;ct.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ta(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===t.length)return;const a=Aa(o),l=i>t.length;r.issues.push({origin:a,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),_o=ee("$ZodCheckStringFormat",(e,t)=>{var n,r;ct.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})}):(r=e._zod).check??(r.check=()=>{})}),hx=ee("$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})}}),mx=ee("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ax),_o.init(e,t)}),gx=ee("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=lx),_o.init(e,t)}),xx=ee("$ZodCheckIncludes",(e,t)=>{ct.init(e,t);const n=sr(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),bx=ee("$ZodCheckStartsWith",(e,t)=>{ct.init(e,t);const n=new RegExp(`^${sr(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),vx=ee("$ZodCheckEndsWith",(e,t)=>{ct.init(e,t);const n=new RegExp(`.*${sr(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),yx=ee("$ZodCheckOverwrite",(e,t)=>{ct.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class wx{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CompareDrawer-BgcAk1te.js","assets/main-Ba9x64uY.js","assets/ReplayDialog-7Pvhjbjk.js","assets/ResponseView-zFxGX8xH.js","assets/RequestAnatomy-BX-UKYQg.js","assets/StreamingChunkSequence-DzXzVtBF.js","assets/json-viewer-CiMN_9sG.js"])))=>i.map(i=>d[i]);
2
+ import{u as In,a as nd,r as p,j as s,c as rs,g as ug,b as rd,d as Hr,e as dg,f as lt,h as sd,_ as zn}from"./main-Ba9x64uY.js";function ee(e,t,n){function r(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 m=d[f];m in l||(l[m]=u[m].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;r(u,l),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:r}),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 Xn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class od extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const id={};function an(e){return id}function ad(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Mi(e,t){return typeof t=="bigint"?t.toString():t}function yo(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ta(e){return e==null}function Ea(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function fg(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const c=r.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const 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 Ul=Symbol("evaluating");function ze(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ul)return r===void 0&&(r=Ul,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Pn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function fn(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Wl(e){return JSON.stringify(e)}function pg(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ld="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Rr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const hg=yo(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function rr(e){if(Rr(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Rr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function cd(e){return rr(e)?{...e}:Array.isArray(e)?[...e]:e}const mg=new Set(["string","number","symbol"]);function sr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pn(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function ke(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 gg(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const xg={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 bg(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=fn(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 Pn(this,"shape",a),a},checks:[]});return pn(e,i)}function vg(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=fn(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 Pn(this,"shape",a),a},checks:[]});return pn(e,i)}function yg(e,t){if(!rr(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=fn(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Pn(this,"shape",i),i}});return pn(e,o)}function wg(e,t){if(!rr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=fn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Pn(this,"shape",r),r}});return pn(e,n)}function kg(e,t){const n=fn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Pn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return pn(e,n)}function _g(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=fn(t._zod.def,{get shape(){const l=t._zod.def.shape,c={...l};if(n)for(const u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(const u in l)c[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return Pn(this,"shape",c),c},checks:[]});return pn(t,a)}function jg(e,t,n){const r=fn(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 Pn(this,"shape",i),i}});return pn(t,r)}function Kn(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 Jn(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ss(e){return typeof e=="string"?e:e?.message}function ln(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=ss(e.inst?._zod.def?.error?.(e))??ss(t?.error?.(e))??ss(n.customError?.(e))??ss(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Aa(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ir(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const ud=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Mi,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},dd=ee("$ZodError",ud),fd=ee("$ZodError",ud,{Parent:Error});function Sg(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Cg(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>r({issues:a}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({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 r(e),n}const Ra=e=>(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Xn;if(a.issues.length){const l=new(o?.Err??e)(a.issues.map(c=>ln(c,i,an())));throw ld(l,o?.callee),l}return a.value},Ia=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{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=>ln(c,i,an())));throw ld(l,o?.callee),l}return a.value},wo=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new Xn;return i.issues.length?{success:!1,error:new(e??dd)(i.issues.map(a=>ln(a,o,an())))}:{success:!0,data:i.value}},Ng=wo(fd),ko=e=>async(t,n,r)=>{const o=r?Object.assign(r,{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=>ln(a,o,an())))}:{success:!0,data:i.value}},Tg=ko(fd),Eg=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ra(e)(t,n,o)},Ag=e=>(t,n,r)=>Ra(e)(t,n,r),Rg=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ia(e)(t,n,o)},Ig=e=>async(t,n,r)=>Ia(e)(t,n,r),zg=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return wo(e)(t,n,o)},Pg=e=>(t,n,r)=>wo(e)(t,n,r),Og=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ko(e)(t,n,o)},Mg=e=>async(t,n,r)=>ko(e)(t,n,r),Lg=/^[cC][^\s-]{8,}$/,Dg=/^[0-9a-z]+$/,$g=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Fg=/^[0-9a-vA-V]{20}$/,Bg=/^[A-Za-z0-9]{27}$/,Ug=/^[a-zA-Z0-9_-]{21}$/,Wg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Hg=/^([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})$/,Hl=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)$/,Zg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Vg="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function qg(){return new RegExp(Vg,"u")}const Gg=/^(?:(?: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])$/,Kg=/^(([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}|:))$/,Jg=/^((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])$/,Yg=/^(([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])$/,Xg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pd=/^[A-Za-z0-9_-]*$/,Qg=/^\+[1-9]\d{6,14}$/,hd="(?:(?:\\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])))",ex=new RegExp(`^${hd}$`);function md(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 tx(e){return new RegExp(`^${md(e)}$`)}function nx(e){const t=md({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${hd}T(?:${r})$`)}const rx=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},sx=/^-?\d+$/,gd=/^-?\d+(?:\.\d+)?$/,ox=/^(?:true|false)$/i,ix=/^null$/i,ax=/^[^A-Z]*$/,lx=/^[^a-z]*$/,ct=ee("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),xd={number:"number",bigint:"bigint",object:"date"},bd=ee("$ZodCheckLessThan",(e,t)=>{ct.init(e,t);const n=xd[typeof t.value];e._zod.onattach.push(r=>{const o=r._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=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vd=ee("$ZodCheckGreaterThan",(e,t)=>{ct.init(e,t);const n=xd[typeof t.value];e._zod.onattach.push(r=>{const o=r._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=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),cx=ee("$ZodCheckMultipleOf",(e,t)=>{ct.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):fg(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})}}),ux=ee("$ZodCheckNumberFormat",(e,t)=>{ct.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=xg[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=sx)}),e._zod.check=a=>{const l=a.value;if(n){if(!Number.isInteger(l)){a.issues.push({expected:r,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:r,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:r,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})}}),dx=ee("$ZodCheckMaxLength",(e,t)=>{var n;ct.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ta(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const a=Aa(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),fx=ee("$ZodCheckMinLength",(e,t)=>{var n;ct.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ta(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const a=Aa(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),px=ee("$ZodCheckLengthEquals",(e,t)=>{var n;ct.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ta(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===t.length)return;const a=Aa(o),l=i>t.length;r.issues.push({origin:a,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),_o=ee("$ZodCheckStringFormat",(e,t)=>{var n,r;ct.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})}):(r=e._zod).check??(r.check=()=>{})}),hx=ee("$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})}}),mx=ee("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ax),_o.init(e,t)}),gx=ee("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=lx),_o.init(e,t)}),xx=ee("$ZodCheckIncludes",(e,t)=>{ct.init(e,t);const n=sr(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),bx=ee("$ZodCheckStartsWith",(e,t)=>{ct.init(e,t);const n=new RegExp(`^${sr(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),vx=ee("$ZodCheckEndsWith",(e,t)=>{ct.init(e,t);const n=new RegExp(`.*${sr(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),yx=ee("$ZodCheckOverwrite",(e,t)=>{ct.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class wx{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
3
3
  `).filter(a=>a),o=Math.min(...r.map(a=>a.length-a.trimStart().length)),i=r.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 kx={major:4,minor:3,patch:6},He=ee("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=kx;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const i of o._zod.onattach)i(e);if(r.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=Kn(a),d;for(const f of l){if(f._zod.def.when){if(!f._zod.def.when(a))continue}else if(u)continue;const m=a.issues.length,h=f._zod.check(a);if(h instanceof Promise&&c?.async===!1)throw new Xn;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,a.issues.length!==m&&(u||(u=Kn(a,m)))});else{if(a.issues.length===m)continue;u||(u=Kn(a,m))}}return d?d.then(()=>a):a},i=(a,l,c)=>{if(Kn(a))return a.aborted=!0,a;const u=o(l,r,c);if(u instanceof Promise){if(c.async===!1)throw new Xn;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 Xn;return c.then(u=>o(u,r,l))}return o(c,r,l)}}ze(e,"~standard",()=>({validate:o=>{try{const i=Ng(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Tg(e,o).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),za=ee("$ZodString",(e,t)=>{He.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??rx(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ve=ee("$ZodStringFormat",(e,t)=>{_o.init(e,t),za.init(e,t)}),_x=ee("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Hg),Ve.init(e,t)}),jx=ee("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Hl(r))}else t.pattern??(t.pattern=Hl());Ve.init(e,t)}),Sx=ee("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Zg),Ve.init(e,t)}),Cx=ee("$ZodURL",(e,t)=>{Ve.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Nx=ee("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=qg()),Ve.init(e,t)}),Tx=ee("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ug),Ve.init(e,t)}),Ex=ee("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Lg),Ve.init(e,t)}),Ax=ee("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Dg),Ve.init(e,t)}),Rx=ee("$ZodULID",(e,t)=>{t.pattern??(t.pattern=$g),Ve.init(e,t)}),Ix=ee("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Fg),Ve.init(e,t)}),zx=ee("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Bg),Ve.init(e,t)}),Px=ee("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=nx(t)),Ve.init(e,t)}),Ox=ee("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ex),Ve.init(e,t)}),Mx=ee("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=tx(t)),Ve.init(e,t)}),Lx=ee("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Wg),Ve.init(e,t)}),Dx=ee("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Gg),Ve.init(e,t),e._zod.bag.format="ipv4"}),$x=ee("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Kg),Ve.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=ee("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Jg),Ve.init(e,t)}),Bx=ee("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Yg),Ve.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,i]=r;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 yd(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Ux=ee("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Xg),Ve.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{yd(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Wx(e){if(!pd.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return yd(n)}const Hx=ee("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=pd),Ve.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Wx(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Zx=ee("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Qg),Ve.init(e,t)});function Vx(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const qx=ee("$ZodJWT",(e,t)=>{Ve.init(e,t),e._zod.check=n=>{Vx(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),wd=ee("$ZodNumber",(e,t)=>{He.init(e,t),e._zod.pattern=e._zod.bag.pattern??gd,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const 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}}),Gx=ee("$ZodNumberFormat",(e,t)=>{ux.init(e,t),wd.init(e,t)}),Kx=ee("$ZodBoolean",(e,t)=>{He.init(e,t),e._zod.pattern=ox,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),Jx=ee("$ZodNull",(e,t)=>{He.init(e,t),e._zod.pattern=ix,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),Yx=ee("$ZodUnknown",(e,t)=>{He.init(e,t),e._zod.parse=n=>n}),Xx=ee("$ZodNever",(e,t)=>{He.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Zl(e,t,n){e.issues.length&&t.issues.push(...Jn(n,e.issues)),t.value[n]=e.value}const Qx=ee("$ZodArray",(e,t)=>{He.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let a=0;a<o.length;a++){const l=o[a],c=t.element._zod.run({value:l,issues:[]},r);c instanceof Promise?i.push(c.then(u=>Zl(u,n,a))):Zl(c,n,a)}return i.length?Promise.all(i).then(()=>n):n}});function $s(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...Jn(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function kd(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=gg(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function _d(e,t,n,r,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 m=c.run({value:t[f],issues:[]},r);m instanceof Promise?e.push(m.then(h=>$s(h,n,f,t,d))):$s(m,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 e0=ee("$ZodObject",(e,t)=>{if(He.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...l};return Object.defineProperty(t,"shape",{value:c}),c}})}const r=yo(()=>kd(t));ze(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=Rr,i=t.catchall;let a;e._zod.parse=(l,c)=>{a??(a=r.value);const u=l.value;if(!o(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};const d=[],f=a.shape;for(const m of a.keys){const h=f[m],v=h._zod.optout==="optional",g=h._zod.run({value:u[m],issues:[]},c);g instanceof Promise?d.push(g.then(x=>$s(x,l,m,u,v))):$s(g,l,m,u,v)}return i?_d(d,u,l,c,r.value,e):d.length?Promise.all(d).then(()=>l):l}}),t0=ee("$ZodObjectJIT",(e,t)=>{e0.init(e,t);const n=e._zod.parse,r=yo(()=>kd(t)),o=m=>{const h=new wx(["shape","payload","ctx"]),v=r.value,g=_=>{const j=Wl(_);return`shape[${j}]._zod.run({ value: input[${j}], issues: [] }, ctx)`};h.write("const input = payload.value;");const x=Object.create(null);let b=0;for(const _ of v.keys)x[_]=`key_${b++}`;h.write("const newResult = {};");for(const _ of v.keys){const j=x[_],S=Wl(_),C=m[_]?._zod?.optout==="optional";h.write(`const ${j} = ${g(_)};`),C?h.write(`
5
5
  if (${j}.issues.length) {
@@ -38,7 +38,7 @@ import{u as In,a as nd,r as p,j as s,c as rs,g as ug,b as rd,d as Hr,e as dg,f a
38
38
  `)}h.write("payload.value = newResult;"),h.write("return payload;");const y=h.compile();return(_,j)=>y(m,_,j)};let i;const a=Rr,l=!id.jitless,u=l&&hg.value,d=t.catchall;let f;e._zod.parse=(m,h)=>{f??(f=r.value);const v=m.value;return a(v)?l&&u&&h?.async===!1&&h.jitless!==!0?(i||(i=o(t.shape)),m=i(m,h),d?_d([],v,m,h,f,e):m):n(m,h):(m.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),m)}});function Vl(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!Kn(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=>ln(a,r,an())))}),t)}const jd=ee("$ZodUnion",(e,t)=>{He.init(e,t),ze(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ze(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ze(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ze(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=>Ea(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(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=>Vl(c,o,e,i)):Vl(l,o,e,i)}}),n0=ee("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,jd.init(e,t);const n=e._zod.parse;ze(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 r=yo(()=>{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(!Rr(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;const l=r.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)}}),r0=ee("$ZodIntersection",(e,t)=>{He.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),a=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,u])=>ql(n,c,u)):ql(n,i,a)}});function Li(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(rr(e)&&rr(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const a=Li(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 r=0;r<e.length;r++){const o=e[r],i=t[r],a=Li(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ql(e,t,n){const r=new Map;let o;for(const l of t.issues)if(l.code==="unrecognized_keys"){o??(o=l);for(const c of l.keys)r.has(c)||r.set(c,{}),r.get(c).l=!0}else e.issues.push(l);for(const l of n.issues)if(l.code==="unrecognized_keys")for(const c of l.keys)r.has(c)||r.set(c,{}),r.get(c).r=!0;else e.issues.push(l);const i=[...r].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(i.length&&o&&e.issues.push({...o,keys:i}),Kn(e))return e;const a=Li(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 s0=ee("$ZodRecord",(e,t)=>{He.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!rr(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:[]},r);d instanceof Promise?i.push(d.then(f=>{f.issues.length&&n.issues.push(...Jn(u,f.issues)),n.value[u]=f.value})):(d.issues.length&&n.issues.push(...Jn(u,d.issues)),n.value[u]=d.value)}let c;for(const u in o)l.has(u)||(c=c??[],c.push(u));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c})}else{n.value={};for(const l of Reflect.ownKeys(o)){if(l==="__proto__")continue;let c=t.keyType._zod.run({value:l,issues:[]},r);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&gd.test(l)&&c.issues.length){const f=t.keyType._zod.run({value:Number(l),issues:[]},r);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");f.issues.length===0&&(c=f)}if(c.issues.length){t.mode==="loose"?n.value[l]=o[l]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(f=>ln(f,r,an())),input:l,path:[l],inst:e});continue}const d=t.valueType._zod.run({value:o[l],issues:[]},r);d instanceof Promise?i.push(d.then(f=>{f.issues.length&&n.issues.push(...Jn(l,f.issues)),n.value[c.value]=f.value})):(d.issues.length&&n.issues.push(...Jn(l,d.issues)),n.value[c.value]=d.value)}}return i.length?Promise.all(i).then(()=>n):n}}),o0=ee("$ZodEnum",(e,t)=>{He.init(e,t);const n=ad(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>mg.has(typeof o)).map(o=>typeof o=="string"?sr(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const a=o.value;return r.has(a)||o.issues.push({code:"invalid_value",values:n,input:a,inst:e}),o}}),i0=ee("$ZodLiteral",(e,t)=>{if(He.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?sr(r):r?sr(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),a0=ee("$ZodTransform",(e,t)=>{He.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new od(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(n.value=a,n));if(o instanceof Promise)throw new Xn;return n.value=o,n}});function Gl(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Sd=ee("$ZodOptional",(e,t)=>{He.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ze(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ze(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ea(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Gl(i,n.value)):Gl(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),l0=ee("$ZodExactOptional",(e,t)=>{Sd.init(e,t),ze(e._zod,"values",()=>t.innerType._zod.values),ze(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),c0=ee("$ZodNullable",(e,t)=>{He.init(e,t),ze(e._zod,"optin",()=>t.innerType._zod.optin),ze(e._zod,"optout",()=>t.innerType._zod.optout),ze(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ea(n.source)}|null)$`):void 0}),ze(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),u0=ee("$ZodDefault",(e,t)=>{He.init(e,t),e._zod.optin="optional",ze(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Kl(i,t)):Kl(o,t)}});function Kl(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const d0=ee("$ZodPrefault",(e,t)=>{He.init(e,t),e._zod.optin="optional",ze(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),f0=ee("$ZodNonOptional",(e,t)=>{He.init(e,t),ze(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Jl(i,e)):Jl(o,e)}});function Jl(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const p0=ee("$ZodCatch",(e,t)=>{He.init(e,t),ze(e._zod,"optin",()=>t.innerType._zod.optin),ze(e._zod,"optout",()=>t.innerType._zod.optout),ze(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>ln(a,r,an()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>ln(i,r,an()))},input:n.value}),n.issues=[]),n)}}),h0=ee("$ZodPipe",(e,t)=>{He.init(e,t),ze(e._zod,"values",()=>t.in._zod.values),ze(e._zod,"optin",()=>t.in._zod.optin),ze(e._zod,"optout",()=>t.out._zod.optout),ze(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(a=>os(a,t.in,r)):os(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>os(i,t.out,r)):os(o,t.out,r)}});function os(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const m0=ee("$ZodReadonly",(e,t)=>{He.init(e,t),ze(e._zod,"propValues",()=>t.innerType._zod.propValues),ze(e._zod,"values",()=>t.innerType._zod.values),ze(e._zod,"optin",()=>t.innerType?._zod?.optin),ze(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Yl):Yl(o)}});function Yl(e){return e.value=Object.freeze(e.value),e}const g0=ee("$ZodLazy",(e,t)=>{He.init(e,t),ze(e._zod,"innerType",()=>t.getter()),ze(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),ze(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),ze(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),ze(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),x0=ee("$ZodCustom",(e,t)=>{ct.init(e,t),He.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>Xl(i,n,r,e));Xl(o,n,r,e)}});function Xl(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(Ir(o))}}var Ql;class b0{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function v0(){return new b0}(Ql=globalThis).__zod_globalRegistry??(Ql.__zod_globalRegistry=v0());const Nr=globalThis.__zod_globalRegistry;function y0(e,t){return new e({type:"string",...ke(t)})}function w0(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ke(t)})}function ec(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ke(t)})}function k0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ke(t)})}function _0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ke(t)})}function j0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ke(t)})}function S0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ke(t)})}function C0(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ke(t)})}function N0(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ke(t)})}function T0(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ke(t)})}function E0(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ke(t)})}function A0(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ke(t)})}function R0(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ke(t)})}function I0(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ke(t)})}function z0(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ke(t)})}function P0(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ke(t)})}function O0(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ke(t)})}function M0(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ke(t)})}function L0(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ke(t)})}function D0(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ke(t)})}function $0(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ke(t)})}function F0(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ke(t)})}function B0(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ke(t)})}function U0(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ke(t)})}function W0(e,t){return new e({type:"string",format:"date",check:"string_format",...ke(t)})}function H0(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ke(t)})}function Z0(e,t){return new e({type:"string",format:"duration",check:"string_format",...ke(t)})}function V0(e,t){return new e({type:"number",checks:[],...ke(t)})}function q0(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ke(t)})}function G0(e,t){return new e({type:"boolean",...ke(t)})}function K0(e,t){return new e({type:"null",...ke(t)})}function J0(e){return new e({type:"unknown"})}function Y0(e,t){return new e({type:"never",...ke(t)})}function tc(e,t){return new bd({check:"less_than",...ke(t),value:e,inclusive:!1})}function Qo(e,t){return new bd({check:"less_than",...ke(t),value:e,inclusive:!0})}function nc(e,t){return new vd({check:"greater_than",...ke(t),value:e,inclusive:!1})}function ei(e,t){return new vd({check:"greater_than",...ke(t),value:e,inclusive:!0})}function rc(e,t){return new cx({check:"multiple_of",...ke(t),value:e})}function Cd(e,t){return new dx({check:"max_length",...ke(t),maximum:e})}function Fs(e,t){return new fx({check:"min_length",...ke(t),minimum:e})}function Nd(e,t){return new px({check:"length_equals",...ke(t),length:e})}function X0(e,t){return new hx({check:"string_format",format:"regex",...ke(t),pattern:e})}function Q0(e){return new mx({check:"string_format",format:"lowercase",...ke(e)})}function eb(e){return new gx({check:"string_format",format:"uppercase",...ke(e)})}function tb(e,t){return new xx({check:"string_format",format:"includes",...ke(t),includes:e})}function nb(e,t){return new bx({check:"string_format",format:"starts_with",...ke(t),prefix:e})}function rb(e,t){return new vx({check:"string_format",format:"ends_with",...ke(t),suffix:e})}function dr(e){return new yx({check:"overwrite",tx:e})}function sb(e){return dr(t=>t.normalize(e))}function ob(){return dr(e=>e.trim())}function ib(){return dr(e=>e.toLowerCase())}function ab(){return dr(e=>e.toUpperCase())}function lb(){return dr(e=>pg(e))}function cb(e,t,n){return new e({type:"array",element:t,...ke(n)})}function ub(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ke(n)})}function db(e){const t=fb(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Ir(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(Ir(o))}},e(n.value,n)));return t}function fb(e,t){const n=new ct({check:"custom",...ke(t)});return n._zod.check=e,n}function Td(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??Nr,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ge(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,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 m=a.schema,h=t.processors[o.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);h(e,t,m,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"&&ot(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Ed(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const a of e.seen.entries()){const l=e.metadataRegistry.get(a[0])?.id;if(l){const c=r.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.`);r.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,m=e.external.uri??(v=>v);if(f)return{ref:m(f)};const h=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=h,{defId:h,ref:`${m("__shared")}#/${l}/${h}`}}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 Ad(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=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){r(d);const m=e.seen.get(d),h=m.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(h)):Object.assign(c,h),Object.assign(c,u),a._zod.parent===d)for(const g in c)g==="$ref"||g==="allOf"||g in u||delete c[g];if(h.$ref&&m.def)for(const g in c)g==="$ref"||g==="allOf"||g in m.def&&JSON.stringify(c[g])===JSON.stringify(m.def[g])&&delete c[g]}const f=a._zod.parent;if(f&&f!==d){r(f);const m=e.seen.get(f);if(m?.schema.$ref&&(c.$ref=m.schema.$ref,m.def))for(const h in c)h==="$ref"||h==="allOf"||h in m.def&&JSON.stringify(c[h])===JSON.stringify(m.def[h])&&delete c[h]}e.override({zodSchema:a,jsonSchema:c,path:l.path??[]})};for(const a of[...e.seen.entries()].reverse())r(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:Bs(t,"input",e.processors),output:Bs(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function ot(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return ot(r.element,n);if(r.type==="set")return ot(r.valueType,n);if(r.type==="lazy")return ot(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return ot(r.innerType,n);if(r.type==="intersection")return ot(r.left,n)||ot(r.right,n);if(r.type==="record"||r.type==="map")return ot(r.keyType,n)||ot(r.valueType,n);if(r.type==="pipe")return ot(r.in,n)||ot(r.out,n);if(r.type==="object"){for(const o in r.shape)if(ot(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(ot(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(ot(o,n))return!0;return!!(r.rest&&ot(r.rest,n))}return!1}const pb=(e,t={})=>n=>{const r=Td({...n,processors:t});return Ge(e,r),Ed(r,e),Ad(r,e)},Bs=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},a=Td({...o??{},target:i,io:t,processors:n});return Ge(e,a),Ed(a,e),Ad(a,e)},hb={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},mb=(e,t,n,r)=>{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=hb[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}))])}},gb=(e,t,n,r)=>{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)},xb=(e,t,n,r)=>{n.type="boolean"},bb=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},vb=(e,t,n,r)=>{n.not={}},yb=(e,t,n,r)=>{},wb=(e,t,n,r)=>{const o=e._zod.def,i=ad(o.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},kb=(e,t,n,r)=>{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},_b=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},jb=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Sb=(e,t,n,r)=>{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,{...r,path:[...r.path,"items"]})},Cb=(e,t,n,r)=>{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,{...r,path:[...r.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,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Nb=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,a=o.options.map((l,c)=>Ge(l,t,{...r,path:[...r.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=a:n.anyOf=a},Tb=(e,t,n,r)=>{const o=e._zod.def,i=Ge(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=Ge(o.right,t,{...r,path:[...r.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},Eb=(e,t,n,r)=>{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,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const f of c)o.patternProperties[f.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Ge(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Ge(i.valueType,t,{...r,path:[...r.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)}},Ab=(e,t,n,r)=>{const o=e._zod.def,i=Ge(o.innerType,t,r),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},Rb=(e,t,n,r)=>{const o=e._zod.def;Ge(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},Ib=(e,t,n,r)=>{const o=e._zod.def;Ge(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},zb=(e,t,n,r)=>{const o=e._zod.def;Ge(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Pb=(e,t,n,r)=>{const o=e._zod.def;Ge(o.innerType,t,r);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},Ob=(e,t,n,r)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Ge(i,t,r);const a=t.seen.get(e);a.ref=i},Mb=(e,t,n,r)=>{const o=e._zod.def;Ge(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},Rd=(e,t,n,r)=>{const o=e._zod.def;Ge(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},Lb=(e,t,n,r)=>{const o=e._zod.innerType;Ge(o,t,r);const i=t.seen.get(e);i.ref=o},Db=ee("ZodISODateTime",(e,t)=>{Px.init(e,t),qe.init(e,t)});function $b(e){return U0(Db,e)}const Fb=ee("ZodISODate",(e,t)=>{Ox.init(e,t),qe.init(e,t)});function Bb(e){return W0(Fb,e)}const Ub=ee("ZodISOTime",(e,t)=>{Mx.init(e,t),qe.init(e,t)});function Wb(e){return H0(Ub,e)}const Hb=ee("ZodISODuration",(e,t)=>{Lx.init(e,t),qe.init(e,t)});function Zb(e){return Z0(Hb,e)}const Vb=(e,t)=>{dd.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Cg(e,n)},flatten:{value:n=>Sg(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Mi,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Mi,2)}},isEmpty:{get(){return e.issues.length===0}}})},bt=ee("ZodError",Vb,{Parent:Error}),qb=Ra(bt),Gb=Ia(bt),Kb=wo(bt),Jb=ko(bt),Yb=Eg(bt),Xb=Ag(bt),Qb=Rg(bt),ev=Ig(bt),tv=zg(bt),nv=Pg(bt),rv=Og(bt),sv=Mg(bt),Ze=ee("ZodType",(e,t)=>(He.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Bs(e,"input"),output:Bs(e,"output")}}),e.toJSONSchema=pb(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(fn(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>pn(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>qb(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Kb(e,n,r),e.parseAsync=async(n,r)=>Gb(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Jb(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Yb(e,n,r),e.decode=(n,r)=>Xb(e,n,r),e.encodeAsync=async(n,r)=>Qb(e,n,r),e.decodeAsync=async(n,r)=>ev(e,n,r),e.safeEncode=(n,r)=>tv(e,n,r),e.safeDecode=(n,r)=>nv(e,n,r),e.safeEncodeAsync=async(n,r)=>rv(e,n,r),e.safeDecodeAsync=async(n,r)=>sv(e,n,r),e.refine=(n,r)=>e.check(e1(n,r)),e.superRefine=n=>e.check(t1(n)),e.overwrite=n=>e.check(dr(n)),e.optional=()=>ic(e),e.exactOptional=()=>$v(e),e.nullable=()=>ac(e),e.nullish=()=>ic(ac(e)),e.nonoptional=n=>Zv(e,n),e.array=()=>me(e),e.or=n=>$t([e,n]),e.and=n=>zv(e,n),e.transform=n=>lc(e,Lv(n)),e.default=n=>Uv(e,n),e.prefault=n=>Hv(e,n),e.catch=n=>qv(e,n),e.pipe=n=>lc(e,n),e.readonly=()=>Jv(e),e.describe=n=>{const r=e.clone();return Nr.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Nr.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Nr.get(e);const r=e.clone();return Nr.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Id=ee("_ZodString",(e,t)=>{za.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(r,o,i)=>mb(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(X0(...r)),e.includes=(...r)=>e.check(tb(...r)),e.startsWith=(...r)=>e.check(nb(...r)),e.endsWith=(...r)=>e.check(rb(...r)),e.min=(...r)=>e.check(Fs(...r)),e.max=(...r)=>e.check(Cd(...r)),e.length=(...r)=>e.check(Nd(...r)),e.nonempty=(...r)=>e.check(Fs(1,...r)),e.lowercase=r=>e.check(Q0(r)),e.uppercase=r=>e.check(eb(r)),e.trim=()=>e.check(ob()),e.normalize=(...r)=>e.check(sb(...r)),e.toLowerCase=()=>e.check(ib()),e.toUpperCase=()=>e.check(ab()),e.slugify=()=>e.check(lb())}),ov=ee("ZodString",(e,t)=>{za.init(e,t),Id.init(e,t),e.email=n=>e.check(w0(iv,n)),e.url=n=>e.check(C0(av,n)),e.jwt=n=>e.check(B0(kv,n)),e.emoji=n=>e.check(N0(lv,n)),e.guid=n=>e.check(ec(sc,n)),e.uuid=n=>e.check(k0(is,n)),e.uuidv4=n=>e.check(_0(is,n)),e.uuidv6=n=>e.check(j0(is,n)),e.uuidv7=n=>e.check(S0(is,n)),e.nanoid=n=>e.check(T0(cv,n)),e.guid=n=>e.check(ec(sc,n)),e.cuid=n=>e.check(E0(uv,n)),e.cuid2=n=>e.check(A0(dv,n)),e.ulid=n=>e.check(R0(fv,n)),e.base64=n=>e.check(D0(vv,n)),e.base64url=n=>e.check($0(yv,n)),e.xid=n=>e.check(I0(pv,n)),e.ksuid=n=>e.check(z0(hv,n)),e.ipv4=n=>e.check(P0(mv,n)),e.ipv6=n=>e.check(O0(gv,n)),e.cidrv4=n=>e.check(M0(xv,n)),e.cidrv6=n=>e.check(L0(bv,n)),e.e164=n=>e.check(F0(wv,n)),e.datetime=n=>e.check($b(n)),e.date=n=>e.check(Bb(n)),e.time=n=>e.check(Wb(n)),e.duration=n=>e.check(Zb(n))});function N(e){return y0(ov,e)}const qe=ee("ZodStringFormat",(e,t)=>{Ve.init(e,t),Id.init(e,t)}),iv=ee("ZodEmail",(e,t)=>{Sx.init(e,t),qe.init(e,t)}),sc=ee("ZodGUID",(e,t)=>{_x.init(e,t),qe.init(e,t)}),is=ee("ZodUUID",(e,t)=>{jx.init(e,t),qe.init(e,t)}),av=ee("ZodURL",(e,t)=>{Cx.init(e,t),qe.init(e,t)}),lv=ee("ZodEmoji",(e,t)=>{Nx.init(e,t),qe.init(e,t)}),cv=ee("ZodNanoID",(e,t)=>{Tx.init(e,t),qe.init(e,t)}),uv=ee("ZodCUID",(e,t)=>{Ex.init(e,t),qe.init(e,t)}),dv=ee("ZodCUID2",(e,t)=>{Ax.init(e,t),qe.init(e,t)}),fv=ee("ZodULID",(e,t)=>{Rx.init(e,t),qe.init(e,t)}),pv=ee("ZodXID",(e,t)=>{Ix.init(e,t),qe.init(e,t)}),hv=ee("ZodKSUID",(e,t)=>{zx.init(e,t),qe.init(e,t)}),mv=ee("ZodIPv4",(e,t)=>{Dx.init(e,t),qe.init(e,t)}),gv=ee("ZodIPv6",(e,t)=>{$x.init(e,t),qe.init(e,t)}),xv=ee("ZodCIDRv4",(e,t)=>{Fx.init(e,t),qe.init(e,t)}),bv=ee("ZodCIDRv6",(e,t)=>{Bx.init(e,t),qe.init(e,t)}),vv=ee("ZodBase64",(e,t)=>{Ux.init(e,t),qe.init(e,t)}),yv=ee("ZodBase64URL",(e,t)=>{Hx.init(e,t),qe.init(e,t)}),wv=ee("ZodE164",(e,t)=>{Zx.init(e,t),qe.init(e,t)}),kv=ee("ZodJWT",(e,t)=>{qx.init(e,t),qe.init(e,t)}),zd=ee("ZodNumber",(e,t)=>{wd.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(r,o,i)=>gb(e,r,o),e.gt=(r,o)=>e.check(nc(r,o)),e.gte=(r,o)=>e.check(ei(r,o)),e.min=(r,o)=>e.check(ei(r,o)),e.lt=(r,o)=>e.check(tc(r,o)),e.lte=(r,o)=>e.check(Qo(r,o)),e.max=(r,o)=>e.check(Qo(r,o)),e.int=r=>e.check(oc(r)),e.safe=r=>e.check(oc(r)),e.positive=r=>e.check(nc(0,r)),e.nonnegative=r=>e.check(ei(0,r)),e.negative=r=>e.check(tc(0,r)),e.nonpositive=r=>e.check(Qo(0,r)),e.multipleOf=(r,o)=>e.check(rc(r,o)),e.step=(r,o)=>e.check(rc(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function J(e){return V0(zd,e)}const _v=ee("ZodNumberFormat",(e,t)=>{Gx.init(e,t),zd.init(e,t)});function oc(e){return q0(_v,e)}const jv=ee("ZodBoolean",(e,t)=>{Kx.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xb(e,n,r)});function $e(e){return G0(jv,e)}const Sv=ee("ZodNull",(e,t)=>{Jx.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bb(e,n,r)});function Us(e){return K0(Sv,e)}const Cv=ee("ZodUnknown",(e,t)=>{Yx.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yb()});function _n(){return J0(Cv)}const Nv=ee("ZodNever",(e,t)=>{Xx.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vb(e,n,r)});function Tv(e){return Y0(Nv,e)}const Ev=ee("ZodArray",(e,t)=>{Qx.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Sb(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Fs(n,r)),e.nonempty=n=>e.check(Fs(1,n)),e.max=(n,r)=>e.check(Cd(n,r)),e.length=(n,r)=>e.check(Nd(n,r)),e.unwrap=()=>e.element});function me(e,t){return cb(Ev,e,t)}const Av=ee("ZodObject",(e,t)=>{t0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Cb(e,n,r,o),ze(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:_n()}),e.loose=()=>e.clone({...e._zod.def,catchall:_n()}),e.strict=()=>e.clone({...e._zod.def,catchall:Tv()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>yg(e,n),e.safeExtend=n=>wg(e,n),e.merge=n=>kg(e,n),e.pick=n=>bg(e,n),e.omit=n=>vg(e,n),e.partial=(...n)=>_g(Od,e,n[0]),e.required=(...n)=>jg(Md,e,n[0])});function Y(e,t){const n={type:"object",shape:e??{},...ke(t)};return new Av(n)}const Pd=ee("ZodUnion",(e,t)=>{jd.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Nb(e,n,r,o),e.options=t.options});function $t(e,t){return new Pd({type:"union",options:e,...ke(t)})}const Rv=ee("ZodDiscriminatedUnion",(e,t)=>{Pd.init(e,t),n0.init(e,t)});function On(e,t,n){return new Rv({type:"union",options:t,discriminator:e,...ke(n)})}const Iv=ee("ZodIntersection",(e,t)=>{r0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Tb(e,n,r,o)});function zv(e,t){return new Iv({type:"intersection",left:e,right:t})}const Pv=ee("ZodRecord",(e,t)=>{s0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Eb(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function Ke(e,t,n){return new Pv({type:"record",keyType:e,valueType:t,...ke(n)})}const Di=ee("ZodEnum",(e,t)=>{o0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(r,o,i)=>wb(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const a of r)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Di({...t,checks:[],...ke(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const a of r)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Di({...t,checks:[],...ke(o),entries:i})}});function Ee(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Di({type:"enum",entries:n,...ke(t)})}const Ov=ee("ZodLiteral",(e,t)=>{i0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>kb(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Te(e,t){return new Ov({type:"literal",values:Array.isArray(e)?e:[e],...ke(t)})}const Mv=ee("ZodTransform",(e,t)=>{a0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jb(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new od(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ir(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(Ir(a))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function Lv(e){return new Mv({type:"transform",transform:e})}const Od=ee("ZodOptional",(e,t)=>{Sd.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Rd(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function ic(e){return new Od({type:"optional",innerType:e})}const Dv=ee("ZodExactOptional",(e,t)=>{l0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Rd(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function $v(e){return new Dv({type:"optional",innerType:e})}const Fv=ee("ZodNullable",(e,t)=>{c0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ab(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function ac(e){return new Fv({type:"nullable",innerType:e})}const Bv=ee("ZodDefault",(e,t)=>{u0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ib(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Uv(e,t){return new Bv({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():cd(t)}})}const Wv=ee("ZodPrefault",(e,t)=>{d0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zb(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Hv(e,t){return new Wv({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():cd(t)}})}const Md=ee("ZodNonOptional",(e,t)=>{f0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Rb(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Zv(e,t){return new Md({type:"nonoptional",innerType:e,...ke(t)})}const Vv=ee("ZodCatch",(e,t)=>{p0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Pb(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function qv(e,t){return new Vv({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Gv=ee("ZodPipe",(e,t)=>{h0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ob(e,n,r,o),e.in=t.in,e.out=t.out});function lc(e,t){return new Gv({type:"pipe",in:e,out:t})}const Kv=ee("ZodReadonly",(e,t)=>{m0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Mb(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Jv(e){return new Kv({type:"readonly",innerType:e})}const Yv=ee("ZodLazy",(e,t)=>{g0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Lb(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});function Xv(e){return new Yv({type:"lazy",getter:e})}const Qv=ee("ZodCustom",(e,t)=>{x0.init(e,t),Ze.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_b(e,n)});function e1(e,t={}){return ub(Qv,e,t)}function t1(e){return db(e)}const et=Xv(()=>$t([N(),J(),$e(),Us(),me(et),Ke(N(),et)]));const Ld=Y({index:J(),timestamp:J(),type:N(),data:et}),n1=Y({chunks:me(Ld),truncated:$e().optional().default(!1)}),r1=Ee(["request","response"]),s1=Y({logId:J().int().positive(),part:r1,text:N(),offset:J().int().nonnegative(),limit:J().int().positive(),totalBytes:J().int().nonnegative(),textBytes:J().int().nonnegative(),nextOffset:J().int().nonnegative().nullable(),hasMore:$e(),contentMode:Ee(["empty","partial","full"])}),zr=Y({id:J(),timestamp:N(),method:N(),path:N(),model:N().nullable(),sessionId:N().nullable(),rawRequestBody:N().nullable(),responseStatus:J().nullable(),responseText:N().nullable(),inputTokens:J().nullable(),outputTokens:J().nullable(),cacheCreationInputTokens:J().nullable(),cacheReadInputTokens:J().nullable(),elapsedMs:J().nullable(),firstChunkMs:J().nullable().optional(),totalStreamMs:J().nullable().optional(),tokensPerSecond:J().nullable().optional(),streaming:$e(),userAgent:N().nullable(),origin:N().nullable(),rawHeaders:Ke(N(),N()).optional(),headers:Ke(N(),N()).optional(),apiFormat:Ee(["anthropic","openai","unknown"]).default("unknown"),isTest:$e().optional().default(!1),replayOfLogId:J().nullable().optional(),providerName:N().nullable().optional(),clientPort:J().nullable().optional(),clientPid:J().nullable().optional(),clientCwd:N().nullable().optional(),clientProjectFolder:N().nullable().optional(),streamingChunks:n1.optional(),streamingChunksPath:N().nullable().optional(),rawRequestBodyBytes:J().int().nonnegative().nullable().optional(),responseTextBytes:J().int().nonnegative().nullable().optional(),bodyContentMode:Ee(["full","compact","truncated"]).optional(),warnings:me(N()).optional(),error:N().nullable().optional()}),Pa=Y({type:N(),ttl:N().optional(),scope:N().optional()}),Oa=Y({type:Te("text"),text:N(),cache_control:Pa.optional()}),Dd=Y({type:Te("thinking"),thinking:N(),signature:N().optional()}),o1=Y({type:Te("think"),thinking:N(),signature:N().optional()}),i1=Y({type:Te("base64"),media_type:N(),data:N()}),$d=Y({type:Te("image"),source:i1}),Fd=Y({type:Te("tool_use"),id:N(),name:N(),input:Ke(N(),et)}),a1=On("type",[Oa,$d]),l1=Y({type:Te("tool_result"),tool_use_id:N().optional(),content:$t([N(),me(a1)]),is_error:$e().optional()}),c1=On("type",[Oa,Dd,$d,Fd,l1]),u1=$t([N(),me(c1)]),d1=Y({role:Ee(["user","assistant"]),content:u1}),f1=Y({type:Te("text"),text:N(),cache_control:Pa.optional()}),p1=Y({type:N(),properties:Ke(N(),Ke(N(),et)).optional(),required:me(N()).optional(),additionalProperties:$e().optional(),$schema:N().optional()}),h1=Y({name:N(),description:N().optional(),input_schema:p1.optional(),cache_control:Pa.optional()}),m1=On("type",[Y({type:Te("enabled"),budget_tokens:J()}),Y({type:Te("disabled")}),Y({type:Te("adaptive")})]),Bd=Y({model:N(),messages:me(d1),system:me(f1).optional(),tools:me(h1).optional(),max_tokens:J().optional(),temperature:J().optional(),stream:$e().optional(),thinking:m1.optional(),metadata:Y({user_id:N().optional()}).optional()}),Ma=On("type",[Oa,Dd,o1,Fd]),g1=Y({input_tokens:J().nullable().optional(),output_tokens:J().nullable().optional(),cache_creation_input_tokens:J().nullable().optional(),cache_read_input_tokens:J().nullable().optional()}).passthrough(),Ud=Y({id:N(),type:Te("message"),model:N(),role:Te("assistant"),content:me(Ma),stop_reason:N().nullable(),stop_sequence:N().nullable().optional(),usage:g1}).passthrough(),x1=Y({type:Te("message_start"),message:Y({id:N(),type:Te("message"),model:N(),role:Te("assistant"),content:me(Ma),stop_reason:Us(),stop_sequence:Us(),usage:Y({input_tokens:J(),cache_creation_input_tokens:J().optional(),cache_read_input_tokens:J().optional()}).passthrough()})}),b1=Y({type:Te("content_block_start"),index:J(),content_block:Ma}),v1=On("type",[Y({type:Te("text_delta"),text:N()}),Y({type:Te("input_json_delta"),partial_json:N()}),Y({type:Te("thinking_delta"),thinking:N()}),Y({type:Te("signature_delta"),signature:N()})]),y1=Y({type:Te("content_block_delta"),index:J(),delta:v1}),w1=Y({type:Te("content_block_stop"),index:J()}),k1=Y({type:Te("message_delta"),delta:Y({stop_reason:N().nullable(),stop_sequence:N().nullable().optional()}),usage:Y({output_tokens:J(),input_tokens:J().optional(),cache_creation_input_tokens:J().optional(),cache_read_input_tokens:J().optional()}).passthrough()}),_1=Y({type:Te("message_stop")}),j1=Y({type:Te("ping")}),S1=Y({type:Te("error"),error:Y({type:N(),message:N()})}),C1=On("type",[x1,b1,y1,w1,k1,_1,j1,S1]),N1=$t([N(),me(On("type",[Y({type:Te("text"),text:N()}),Y({type:Te("image_url"),image_url:Y({url:N(),detail:N().optional()})})]))]),Wd=Y({role:Ee(["system","user","assistant","tool"]),content:N1,name:N().optional(),reasoning_content:N().optional(),thinking:N().optional(),think:N().optional()}),T1=Y({name:N(),arguments:N()}),Hd=Y({index:J().optional(),id:N().optional(),type:Te("function").optional(),function:Y({name:N().optional(),arguments:N().optional()})});Wd.extend({content:$t([N(),me(Y({type:Te("text"),text:N()}))]).optional(),function_call:T1.optional(),tool_calls:me(Hd).optional()});const E1=Y({type:Te("function"),function:Y({name:N(),description:N().optional(),parameters:Ke(N(),et)})}),Zd=Y({model:N(),messages:me(Wd),temperature:J().optional(),max_tokens:J().optional(),stream:$e().optional(),tools:me(E1).optional(),tool_choice:$t([Ee(["auto","none","required"]),Y({type:Te("auto")}),Y({type:Te("none")}),Y({type:Te("function"),function:Y({name:N()})})]).optional(),user:N().optional()}),A1=Y({type:N(),name:N().optional(),description:N().optional(),parameters:et.optional(),function:Y({name:N().optional(),description:N().optional(),parameters:et.optional()}).optional()}).passthrough(),Vd=Y({model:N(),input:_n().optional(),instructions:$t([N(),Us()]).optional(),stream:$e().optional(),tools:me(A1).optional(),tool_choice:_n().optional(),max_output_tokens:J().optional(),temperature:J().optional(),user:N().optional(),metadata:Ke(N(),_n()).optional()}).passthrough(),qd=Y({role:Ee(["assistant"]).optional(),content:N().nullable().optional(),reasoning_content:N().nullable().optional(),thinking:N().nullable().optional(),think:N().nullable().optional(),function_call:Y({name:N().optional(),arguments:N().optional()}).nullable().optional(),tool_calls:me(Y({index:J(),id:N().optional(),type:Te("function").optional(),function:Y({name:N().optional(),arguments:N().optional()})})).nullable().optional()}),R1=Y({index:J(),message:Y({role:Ee(["assistant"]),content:N().nullable(),reasoning_content:N().optional(),thinking:N().optional(),think:N().optional(),function_call:Y({name:N(),arguments:N()}).nullable().optional(),tool_calls:me(Hd).optional()}).optional(),delta:qd.optional(),finish_reason:N().nullable()}),I1=Y({id:N(),object:Te("chat.completion"),created:J(),model:N(),choices:me(R1),usage:Y({prompt_tokens:J().nullable().optional(),completion_tokens:J().nullable().optional(),total_tokens:J().nullable().optional()}).passthrough(),service_tier:N().nullable().optional(),system_fingerprint:N().nullable().optional()}).passthrough(),z1=Y({id:N(),object:Te("chat.completion.chunk"),created:J(),model:N(),choices:me(Y({index:J(),delta:qd,finish_reason:N().nullable().optional()})),usage:Y({prompt_tokens:J().nullable().optional(),completion_tokens:J().nullable().optional(),total_tokens:J().nullable().optional()}).passthrough().nullable().optional()}).passthrough(),P1=Y({input_tokens:J().nullable().optional(),output_tokens:J().nullable().optional(),total_tokens:J().nullable().optional(),input_tokens_details:Y({cached_tokens:J().nullable().optional()}).passthrough().nullable().optional(),output_tokens_details:Y({reasoning_tokens:J().nullable().optional()}).passthrough().nullable().optional()}).passthrough(),O1=Y({type:N()}).passthrough(),Ws=Y({id:N(),object:Te("response").optional(),created_at:J().optional(),status:N().nullable().optional(),model:N().optional(),output:me(O1).optional(),output_text:N().optional(),usage:P1.nullable().optional(),error:_n().optional()}).passthrough(),M1=Y({type:N()}).passthrough();function Gd(e){try{const t=JSON.parse(e),n=I1.safeParse(t);return n.success?n.data:null}catch{return null}}function Kd(e){try{const t=JSON.parse(e),n=Ws.safeParse(t);return n.success?n.data:null}catch{return null}}const L1=Y({error:N()});async function xt(e,t){const n=await e.json();return t.parse(n)}async function Pt(e,t){try{const n=await e.json(),r=L1.safeParse(n);return r.success?r.data.error:t}catch{return t}}async function cn(e,t,n,r){const o=await fetch(e,n);if(!o.ok){const i=r?.(o)??`Request failed with status ${o.status}`;throw new Error(await Pt(o,i))}return xt(o,t)}function D1(e){return e<1e3?`${String(e)}ms`:`${String(Math.round(e/1e3))}s`}class La extends Error{constructor(t){super(`Request timed out after ${D1(t)}`),this.name="ApiTimeoutError"}}async function or(e,t,n,r,o){const i=new AbortController,a=setTimeout(()=>i.abort(),n);try{return await cn(e,t,{...r,signal:i.signal},o)}catch(l){throw l instanceof DOMException&&l.name==="AbortError"?new La(n):l}finally{clearTimeout(a)}}const Jd=Y({input:J().int().nonnegative(),output:J().int().nonnegative(),cacheCreate:J().int().nonnegative(),cacheRead:J().int().nonnegative(),total:J().int().nonnegative()}),$1=Y({id:J().int().positive(),sessionLogNumber:J().int().positive().optional(),timestamp:N(),provider:N().nullable(),model:N().nullable(),apiFormat:Ee(["anthropic","openai","unknown"]),method:N(),path:N(),status:J().nullable(),isStreaming:$e(),hasError:$e(),error:N().nullable(),latencyMs:J().nullable(),firstChunkMs:J().nullable().optional(),totalStreamMs:J().nullable().optional(),tokensPerSecond:J().nullable().optional(),tokens:Y({input:J().nullable(),output:J().nullable(),cacheCreate:J().nullable(),cacheRead:J().nullable()}),sessionId:N().nullable(),userAgent:N().nullable().optional(),clientPid:J().nullable().optional(),clientProjectFolder:N().nullable().optional()}),Yd=Y({id:N(),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:N().nullable(),updatedAt:N().nullable(),requestCount:J().int().nonnegative(),activeRequests:J().int().nonnegative(),completedRequests:J().int().nonnegative(),failedRequests:J().int().nonnegative(),queuedTasks:J().int().nonnegative(),runningTasks:J().int().nonnegative(),lastTaskError:N().nullable(),logCount:J().int().nonnegative(),errorCount:J().int().nonnegative(),models:me(N()),providers:me(N()),tokenUsage:Jd,lastLogId:J().nullable(),lastModel:N().nullable(),clientUserAgent:N().nullable().optional(),clientPid:J().nullable(),clientProjectFolder:N().nullable(),inspectorPath:N(),inspectorUrl:N(),apiPath:N(),apiUrl:N(),compactLogsPath:N(),compactLogsUrl:N(),latestLogLimit:J().int().positive(),latestLogs:me($1)}),Zr=Ee(["created","running","completed","failed","cancelled"]),Da=Y({jsonPath:N(),markdownPath:N(),htmlPath:N(),exportedAt:N()}),F1=Ee(["run-created","session-started","request","session-finished","evidence-exported"]),B1=Ee(["info","success","warning","error"]),U1=Y({timestamp:N(),kind:F1,severity:B1,title:N(),details:N(),logId:J().int().positive().nullable(),status:J().nullable(),model:N().nullable(),provider:N().nullable(),latencyMs:J().nullable(),isStreaming:$e().nullable()}),W1=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"]),Xd=Y({outcome:Ee(["success","failure","active","unknown"]),severity:Ee(["none","low","medium","high"]),category:W1,summary:N(),evidenceLogIds:me(J().int().positive()),hints:me(N())}),$a=Y({status:Ee(["PASS","FAIL","RUNNING","UNKNOWN"]),summary:N(),markdown:N()}),Qd=$a,Fa=Y({id:N(),sessionId:N(),groupId:N().nullable().default(null),title:N(),task:N().nullable(),project:N().nullable(),agent:N().nullable(),status:Zr,tags:me(N()),metadata:Ke(N(),et),evidence:Da.nullable(),createdAt:N(),updatedAt:N()});Y({runId:N().min(1).optional(),sessionId:N().min(1).optional(),groupId:N().min(1).nullable().optional(),title:N().min(1).optional(),task:N().nullable().optional(),project:N().nullable().optional(),agent:N().nullable().optional(),status:Zr.optional(),tags:me(N()).optional(),metadata:Ke(N(),et).optional()}).optional();Y({sessionId:N().min(1).optional(),groupId:N().min(1).nullable().optional(),title:N().min(1).optional(),task:N().nullable().optional(),project:N().nullable().optional(),agent:N().nullable().optional(),status:Zr.optional(),tags:me(N()).optional(),metadata:Ke(N(),et).optional()});Y({includeHistory:$e().optional(),latestLogLimit:J().int().positive().max(50).optional()}).optional();Y({run:Fa,evidence:Da,session:Yd.nullable(),timeline:me(U1),classification:Xd,jenkinsReport:$a});const H1=Y({run:Fa,classification:Xd,evidence:Da.nullable(),jenkinsReport:$a.nullable(),sessionId:N(),inspectorUrl:N().nullable(),evidenceMarkdownPath:N().nullable(),updatedAt:N()});Y({failures:me(H1),total:J().int().nonnegative(),limit:J().int().positive()});const Ba=Ee(["created","running","completed","failed","cancelled"]),Ua=Ee(["evaluation","batch","manual"]),Wa=Y({jsonPath:N(),markdownPath:N(),htmlPath:N(),exportedAt:N()}),ef=Y({id:N(),groupId:N(),sessionId:N(),runId:N().nullable(),label:N().nullable(),agent:N().nullable(),provider:N().nullable(),model:N().nullable(),status:Zr.nullable(),metadata:Ke(N(),et),addedAt:N(),updatedAt:N()}),Ha=Y({id:N(),title:N(),kind:Ua,task:N().nullable(),project:N().nullable(),status:Ba,tags:me(N()),metadata:Ke(N(),et),evidence:Wa.nullable(),members:me(ef),createdAt:N(),updatedAt:N()});Y({groupId:N().min(1).optional(),title:N().min(1).optional(),kind:Ua.optional(),task:N().nullable().optional(),project:N().nullable().optional(),status:Ba.optional(),tags:me(N()).optional(),metadata:Ke(N(),et).optional()}).optional();Y({title:N().min(1).optional(),kind:Ua.optional(),task:N().nullable().optional(),project:N().nullable().optional(),status:Ba.optional(),tags:me(N()).optional(),metadata:Ke(N(),et).optional()});Y({memberId:N().min(1).optional(),sessionId:N().min(1),runId:N().min(1).nullable().optional(),label:N().min(1).nullable().optional(),agent:N().min(1).nullable().optional(),provider:N().min(1).nullable().optional(),model:N().min(1).nullable().optional(),status:Zr.nullable().optional(),metadata:Ke(N(),et).optional()});Y({includeHistory:$e().optional(),latestLogLimit:J().int().positive().max(50).optional()}).optional();Y({deleteEvidence:$e().optional()});const tf=Y({groupId:N(),deleted:$e(),evidenceDeleted:$e(),evidencePath:N().nullable()}),Z1=Y({deleted:J().int().nonnegative(),groups:me(tf)}),nf=Y({member:ef,run:Fa.nullable(),session:Yd.nullable()}),rf=Y({memberCount:J().int().nonnegative(),sessionsWithData:J().int().nonnegative(),missingSessions:J().int().nonnegative(),requestCount:J().int().nonnegative(),errorCount:J().int().nonnegative(),tokenUsage:Jd,models:me(N()),providers:me(N()),completedMembers:J().int().nonnegative(),failedMembers:J().int().nonnegative(),runningMembers:J().int().nonnegative()}),V1=Y({group:Ha,evidence:Wa,members:me(nf).nullable(),markdown:N(),summary:rf.nullable(),report:Qd.nullable()}),q1=Y({group:Ha,evidence:Wa,members:me(nf),summary:rf,jenkinsReport:Qd}),sf=Y({groups:me(Ha)}),G1=Y({sessionId:N(),imported:J().int().nonnegative(),skipped:J().int().nonnegative(),warnings:me(N()),logs:me(zr)}),Hs=10,$i=600,Zs=60,Fi=600,Vs="time",Za="simple",of=Ee(["time","full"]),K1=Ee(["simple","full"]),jo=Y({stripClaudeCodeBillingHeader:$e(),hasSeenOnboarding:$e().default(!1),slowResponseThresholdSeconds:J().int().min(0).max($i).default(Hs),providerTestTimeoutSeconds:J().int().min(1).max(Fi).default(Zs),timeDisplayFormat:of.default(Vs),captureMode:K1.default(Za)}),Gn="/api/config";async function J1(e){return cn(e,jo,void 0,t=>`Failed to fetch ${e}: ${t.status}`)}async function as(e){return cn(Gn,jo,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)},t=>`PATCH failed with status ${t.status}`)}function Va(){const e=In(Gn,J1,{revalidateOnFocus:!1,revalidateIfStale:!1}),{mutate:t}=nd(),n=e.data?.stripClaudeCodeBillingHeader??!1,r=e.data?.captureMode??Za,o=e.data?.slowResponseThresholdSeconds??Hs,i=e.data?.providerTestTimeoutSeconds??Zs,a=e.data?.timeDisplayFormat??Vs,l=m=>({stripClaudeCodeBillingHeader:e.data?.stripClaudeCodeBillingHeader??!1,hasSeenOnboarding:e.data?.hasSeenOnboarding??!1,slowResponseThresholdSeconds:e.data?.slowResponseThresholdSeconds??Hs,providerTestTimeoutSeconds:e.data?.providerTestTimeoutSeconds??Zs,timeDisplayFormat:e.data?.timeDisplayFormat??Vs,captureMode:r,...m}),c=async m=>{await t(Gn,as({stripClaudeCodeBillingHeader:m}),{optimisticData:l({stripClaudeCodeBillingHeader:m}),rollbackOnError:!0,revalidate:!1})},u=async m=>{await t(Gn,as({slowResponseThresholdSeconds:m}),{optimisticData:l({slowResponseThresholdSeconds:m}),rollbackOnError:!0,revalidate:!1})},d=async m=>{await t(Gn,as({timeDisplayFormat:m}),{optimisticData:l({timeDisplayFormat:m}),rollbackOnError:!0,revalidate:!1})},f=async m=>{await t(Gn,as({providerTestTimeoutSeconds:m}),{optimisticData:l({providerTestTimeoutSeconds:m}),rollbackOnError:!0,revalidate:!1})};return{strip:n,captureMode:r,slowResponseThresholdSeconds:o,providerTestTimeoutSeconds:i,timeDisplayFormat:a,isLoading:e.isLoading,isError:e.error!==void 0,setStrip:c,setSlowResponseThresholdSeconds:u,setProviderTestTimeoutSeconds:f,setTimeDisplayFormat:d}}const af=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Y1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const X1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const cc=e=>{const t=X1(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Q1={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 ey=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const ty=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},c)=>p.createElement("svg",{ref:c,...Q1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:af("lucide",o),...!i&&!ey(l)&&{"aria-hidden":"true"},...l},[...a.map(([u,d])=>p.createElement(u,d)),...Array.isArray(i)?i:[i]]));const he=(e,t)=>{const n=p.forwardRef(({className:r,...o},i)=>p.createElement(ty,{ref:i,iconNode:t,className:af(`lucide-${Y1(cc(e))}`,`lucide-${e}`,r),...o}));return n.displayName=cc(e),n};const ny=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],ry=he("arrow-down-right",ny);const sy=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],oy=he("arrow-down",sy);const iy=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ay=he("arrow-left",iy);const ly=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],cy=he("arrow-up-right",ly);const uy=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],dy=he("arrow-up",uy);const fy=[["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"}]],py=he("bell",fy);const hy=[["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"}]],my=he("blocks",hy);const gy=[["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"}]],lf=he("brain",gy);const xy=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Xe=he("check",xy);const by=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],at=he("chevron-down",by);const vy=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],yy=he("chevron-left",vy);const wy=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],At=he("chevron-right",wy);const ky=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],qa=he("chevron-up",ky);const _y=[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]],jy=he("chevrons-down",_y);const Sy=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],Cy=he("chevrons-left",Sy);const Ny=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],Ty=he("chevrons-right",Ny);const Ey=[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]],Ay=he("chevrons-up",Ey);const Ry=[["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"}]],Pr=he("circle-alert",Ry);const Iy=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],zy=he("circle-check-big",Iy);const Py=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Bi=he("circle-check",Py);const Oy=[["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"}]],My=he("circle-question-mark",Oy);const Ly=[["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"}]],cf=he("circle-x",Ly);const Dy=[["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"}]],$y=he("clapperboard",Dy);const Fy=[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],By=he("clock-3",Fy);const Uy=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Zt=he("clock",Uy);const Wy=[["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"}]],Hy=he("cloud-upload",Wy);const Zy=[["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"}]],Vy=he("code-xml",Zy);const qy=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],Gy=he("columns-2",qy);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"}]],Ft=he("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"}]],Yy=he("cpu",Jy);const Xy=[["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"}]],So=he("download",Xy);const Qy=[["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"}]],e2=he("ellipsis",Qy);const t2=[["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"}]],Ga=he("external-link",t2);const n2=[["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"}]],Ka=he("eye-off",n2);const r2=[["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"}]],Ja=he("eye",r2);const s2=[["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"}]],o2=he("file-braces",s2);const i2=[["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"}]],a2=he("file-diff",i2);const l2=[["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"}]],c2=he("file-search",l2);const u2=[["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"}]],d2=he("file-terminal",u2);const f2=[["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"}]],p2=he("file-text",f2);const h2=[["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"}]],m2=he("flag",h2);const g2=[["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"}]],x2=he("folder-open",g2);const b2=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Ya=he("gauge",b2);const v2=[["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"}]],y2=he("git-compare-arrows",v2);const w2=[["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"}]],uf=he("globe",w2);const k2=[["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"}]],_2=he("history",k2);const j2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],S2=he("info",j2);const C2=[["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"}]],uc=he("layers",C2);const N2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],st=he("loader-circle",N2);const T2=[["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"}]],E2=he("lock",T2);const A2=[["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"}]],Co=he("message-square",A2);const R2=[["path",{d:"M5 12h14",key:"1ays0h"}]],I2=he("minus",R2);const z2=[["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"}]],P2=he("monitor",z2);const O2=[["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"}]],M2=he("mouse-pointer-click",O2);const L2=[["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"}]],D2=he("octagon-alert",L2);const $2=[["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"}]],df=he("pencil",$2);const F2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ui=he("plus",F2);const B2=[["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"}]],dc=he("radio",B2);const U2=[["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"}]],Or=he("refresh-cw",U2);const W2=[["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"}]],H2=he("rotate-ccw",W2);const Z2=[["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"}]],Wi=he("rotate-cw",Z2);const V2=[["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"}]],q2=he("rows-3",V2);const G2=[["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"}]],K2=he("save",G2);const J2=[["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"}]],Y2=he("scan",J2);const X2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ff=he("search",X2);const Q2=[["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"}]],ew=he("server",Q2);const tw=[["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"}]],nw=he("settings",tw);const rw=[["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"}]],sw=he("shield-alert",rw);const ow=[["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"}]],fc=he("shield-check",ow);const iw=[["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"}]],Hi=he("siren",iw);const aw=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Xa=he("terminal",aw);const lw=[["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"}]],cw=he("timer",lw);const uw=[["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"}]],Cn=he("trash-2",uw);const dw=[["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"}]],on=he("triangle-alert",dw);const fw=[["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"}]],pf=he("upload",fw);const pw=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],hw=he("wifi-off",pw);const mw=[["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"}]],gw=he("wifi",mw);const xw=[["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"}]],Vr=he("wrench",xw);const bw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],qr=he("x",bw);const vw=[["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"}]],Mr=he("zap",vw),Zi="/api/config";async function yw(e){return cn(e,jo,void 0,t=>`Failed to fetch ${e}: ${t.status}`)}async function ww(e){return cn(Zi,jo,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)},t=>`PATCH failed with status ${t.status}`)}function kw(){const e=In(Zi,yw,{revalidateOnFocus:!1,revalidateIfStale:!1}),{mutate:t}=nd(),n=e.data?.hasSeenOnboarding??!1,r=e.data?.captureMode??Za,o=async()=>{await t(Zi,ww({hasSeenOnboarding:!0}),{optimisticData:{stripClaudeCodeBillingHeader:e.data?.stripClaudeCodeBillingHeader??!1,hasSeenOnboarding:!0,slowResponseThresholdSeconds:e.data?.slowResponseThresholdSeconds??Hs,providerTestTimeoutSeconds:e.data?.providerTestTimeoutSeconds??Zs,timeDisplayFormat:e.data?.timeDisplayFormat??Vs,captureMode:r},rollbackOnError:!0,revalidate:!1})};return{hasSeenOnboarding:n,captureMode:r,isLoading:e.isLoading,markSeen:o}}function _w(){const{hasSeenOnboarding:e,isLoading:t,markSeen:n}=kw(),[r,o]=p.useState(!1);if(t||e)return null;const i=r?"grid":"hidden sm:grid";return s.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:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(S2,{className:"mt-0.5 size-4 shrink-0 text-amber-300","aria-hidden":"true"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[s.jsx("span",{className:"font-medium text-amber-200",children:"Inspector ready"}),s.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"Request, response, tool, timing, token, replay, and memory signals are active."})]}),s.jsx("div",{className:"mt-1 text-xs leading-relaxed text-muted-foreground sm:hidden",children:"Core capture is active."}),s.jsxs("div",{className:`${i} mt-2 gap-x-4 gap-y-1 text-xs leading-relaxed text-muted-foreground sm:grid-cols-2`,children:[s.jsxs("div",{children:[s.jsx("strong",{children:"Evidence"}),": logs, sessions, groups, and MCP exports are available."]}),s.jsxs("div",{children:[s.jsx("strong",{children:"Network"}),": replace ",s.jsx("code",{children:"localhost"})," if containers differ."]})]})]}),s.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":r,"aria-label":r?"Hide onboarding details":"Show onboarding details",children:s.jsx(at,{className:`size-3.5 transition-transform ${r?"rotate-180":""}`})}),s.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:[s.jsx(Xe,{className:"size-3.5"}),"Got it"]}),s.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:s.jsx(qr,{className:"size-3.5"})})]})})}function ls(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 ti={exports:{}};var pc;function jw(){return pc||(pc=1,(function(e,t){(function(n){e.exports=n()})(function(){return(function n(r,o,i){function a(u,d){if(!o[u]){if(!r[u]){var f=typeof ls=="function"&&ls;if(!d&&f)return f(u,!0);if(l)return l(u,!0);var m=new Error("Cannot find module '"+u+"'");throw m.code="MODULE_NOT_FOUND",m}var h=o[u]={exports:{}};r[u][0].call(h.exports,function(v){var g=r[u][1][v];return a(g||v)},h,h.exports,n,r,o,i)}return o[u].exports}for(var l=typeof ls=="function"&&ls,c=0;c<i.length;c++)a(i[c]);return a})({1:[function(n,r,o){var i=n("./utils"),a=n("./support"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.encode=function(c){for(var u,d,f,m,h,v,g,x=[],b=0,y=c.length,_=y,j=i.getTypeOf(c)!=="string";b<c.length;)_=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),m=u>>2,h=(3&u)<<4|d>>4,v=1<_?(15&d)<<2|f>>6:64,g=2<_?63&f:64,x.push(l.charAt(m)+l.charAt(h)+l.charAt(v)+l.charAt(g));return x.join("")},o.decode=function(c){var u,d,f,m,h,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,_=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===l.charAt(64)&&_--,c.charAt(c.length-2)===l.charAt(64)&&_--,_%1!=0)throw new Error("Invalid base64 input, bad content length.");for(y=a.uint8array?new Uint8Array(0|_):new Array(0|_);g<c.length;)u=l.indexOf(c.charAt(g++))<<2|(m=l.indexOf(c.charAt(g++)))>>4,d=(15&m)<<4|(h=l.indexOf(c.charAt(g++)))>>2,f=(3&h)<<6|(v=l.indexOf(c.charAt(g++))),y[x++]=u,h!==64&&(y[x++]=d),v!==64&&(y[x++]=f);return y}},{"./support":30,"./utils":32}],2:[function(n,r,o){var i=n("./external"),a=n("./stream/DataWorker"),l=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function u(d,f,m,h,v){this.compressedSize=d,this.uncompressedSize=f,this.crc32=m,this.compression=h,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,m){return d.pipe(new l).pipe(new c("uncompressedSize")).pipe(f.compressWorker(m)).pipe(new c("compressedSize")).withStreamInfo("compression",f)},r.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,o){var 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,r,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})();r.exports=function(l,c){return l!==void 0&&l.length?i.getTypeOf(l)!=="string"?(function(u,d,f,m){var h=a,v=m+f;u^=-1;for(var g=m;g<v;g++)u=u>>>8^h[255&(u^d[g])];return-1^u})(0|c,l,l.length,0):(function(u,d,f,m){var h=a,v=m+f;u^=-1;for(var g=m;g<v;g++)u=u>>>8^h[255&(u^d.charCodeAt(g))];return-1^u})(0|c,l,l.length,0):0}},{"./utils":32}],5:[function(n,r,o){o.base64=!1,o.binary=!1,o.dir=!1,o.createFolders=!0,o.date=null,o.compression=null,o.compressionOptions=null,o.comment=null,o.unixPermissions=null,o.dosPermissions=null},{}],6:[function(n,r,o){var i=null;i=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:i}},{lie:37}],7:[function(n,r,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,m){c.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=m,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(m){f.push({data:m,meta:f.meta})}},o.compressWorker=function(f){return new d("Deflate",f)},o.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,o){function i(h,v){var g,x="";for(g=0;g<v;g++)x+=String.fromCharCode(255&h),h>>>=8;return x}function a(h,v,g,x,b,y){var _,j,S=h.file,E=h.compression,C=y!==u.utf8encode,A=l.transformTo("string",y(S.name)),I=l.transformTo("string",u.utf8encode(S.name)),P=S.comment,G=l.transformTo("string",y(P)),T=l.transformTo("string",u.utf8encode(P)),D=I.length!==S.name.length,k=T.length!==P.length,F="",Q="",$="",Z=S.dir,q=S.date,ue={crc32:0,compressedSize:0,uncompressedSize:0};v&&!g||(ue.crc32=h.crc32,ue.compressedSize=h.compressedSize,ue.uncompressedSize=h.uncompressedSize);var U=0;v&&(U|=8),C||!D&&!k||(U|=2048);var W=0,ae=0;Z&&(W|=16),b==="UNIX"?(ae=798,W|=(function(X,_e){var ce=X;return X||(ce=_e?16893:33204),(65535&ce)<<16})(S.unixPermissions,Z)):(ae=20,W|=(function(X){return 63&(X||0)})(S.dosPermissions)),_=q.getUTCHours(),_<<=6,_|=q.getUTCMinutes(),_<<=5,_|=q.getUTCSeconds()/2,j=q.getUTCFullYear()-1980,j<<=4,j|=q.getUTCMonth()+1,j<<=5,j|=q.getUTCDate(),D&&(Q=i(1,1)+i(d(A),4)+I,F+="up"+i(Q.length,2)+Q),k&&($=i(1,1)+i(d(G),4)+T,F+="uc"+i($.length,2)+$);var B="";return B+=`
41
- \0`,B+=i(U,2),B+=E.magic,B+=i(_,2),B+=i(j,2),B+=i(ue.crc32,4),B+=i(ue.compressedSize,4),B+=i(ue.uncompressedSize,4),B+=i(A.length,2),B+=i(F.length,2),{fileRecord:f.LOCAL_FILE_HEADER+B+A+F,dirRecord:f.CENTRAL_FILE_HEADER+i(ae,2)+B+i(G.length,2)+"\0\0\0\0"+i(W,4)+i(x,4)+A+F+G}}var l=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),f=n("../signature");function m(h,v,g,x){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=g,this.encodeFileName=x,this.streamFiles=h,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(m,c),m.prototype.push=function(h){var v=h.meta.percent||0,g=this.entriesCount,x=this._sources.length;this.accumulate?this.contentBuffer.push(h):(this.bytesWritten+=h.data.length,c.prototype.push.call(this,{data:h.data,meta:{currentFile:this.currentFile,percent:g?(v+100*(g-x-1))/g:100}}))},m.prototype.openedSource=function(h){this.currentSourceOffset=this.bytesWritten,this.currentFile=h.file.name;var v=this.streamFiles&&!h.file.dir;if(v){var g=a(h,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(h){this.accumulate=!1;var v=this.streamFiles&&!h.file.dir,g=a(h,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)})(h),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var h=this.bytesWritten,v=0;v<this.dirRecords.length;v++)this.push({data:this.dirRecords[v],meta:{percent:100}});var g=this.bytesWritten-h,x=(function(b,y,_,j,S){var E=l.transformTo("string",S(j));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(b,2)+i(b,2)+i(y,4)+i(_,4)+i(E.length,2)+E})(this.dirRecords.length,g,h,this.zipComment,this.encodeFileName);this.push({data:x,meta:{percent:100}})},m.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},m.prototype.registerPrevious=function(h){this._sources.push(h);var v=this;return h.on("data",function(g){v.processChunk(g)}),h.on("end",function(){v.closedSource(v.previous.streamInfo),v._sources.length?v.prepareNextSource():v.end()}),h.on("error",function(g){v.error(g)}),this},m.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))},m.prototype.error=function(h){var v=this._sources;if(!c.prototype.error.call(this,h))return!1;for(var g=0;g<v.length;g++)try{v[g].error(h)}catch{}return!0},m.prototype.lock=function(){c.prototype.lock.call(this);for(var h=this._sources,v=0;v<h.length;v++)h[v].lock()},r.exports=m},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,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(m,h){f++;var v=(function(y,_){var j=y||_,S=i[j];if(!S)throw new Error(j+" is not a valid compression method !");return S})(h.options.compression,c.compression),g=h.options.compressionOptions||c.compressionOptions||{},x=h.dir,b=h.date;h._compressWorker(v,g).withStreamInfo("file",{name:m,dir:x,date:b,comment:h.comment||"",unixPermissions:h.unixPermissions,dosPermissions:h.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(m){d.error(m)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,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"),r.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,o){var i=n("./utils"),a=n("./external"),l=n("./utf8"),c=n("./zipEntries"),u=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function f(m){return new a.Promise(function(h,v){var g=m.decompressed.getContentWorker().pipe(new u);g.on("error",function(x){v(x)}).on("end",function(){g.streamInfo.crc32!==m.decompressed.crc32?v(new Error("Corrupted zip : CRC32 mismatch")):h()}).resume()})}r.exports=function(m,h){var v=this;return h=i.extend(h||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:l.utf8decode}),d.isNode&&d.isStream(m)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",m,!0,h.optimizedBinaryString,h.base64).then(function(g){var x=new c(h);return x.load(g),x}).then(function(g){var x=[a.Promise.resolve(g)],b=g.files;if(h.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 _=b[y],j=_.fileNameStr,S=i.resolve(_.fileNameStr);v.file(S,_.decompressed,{binary:!0,optimizedBinaryString:!0,date:_.date,dir:_.dir,comment:_.fileCommentStr.length?_.fileCommentStr:null,unixPermissions:_.unixPermissions,dosPermissions:_.dosPermissions,createFolders:h.createFolders}),_.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,r,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)},r.exports=l},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,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,m){d.push(f)||d._helper.pause(),u&&u(m)}).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()},r.exports=a},{"../utils":32,"readable-stream":16}],14:[function(n,r,o){r.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,r,o){function i(S,E,C){var A,I=l.getTypeOf(E),P=l.extend(C||{},d);P.date=P.date||new Date,P.compression!==null&&(P.compression=P.compression.toUpperCase()),typeof P.unixPermissions=="string"&&(P.unixPermissions=parseInt(P.unixPermissions,8)),P.unixPermissions&&16384&P.unixPermissions&&(P.dir=!0),P.dosPermissions&&16&P.dosPermissions&&(P.dir=!0),P.dir&&(S=b(S)),P.createFolders&&(A=x(S))&&y.call(this,A,!0);var G=I==="string"&&P.binary===!1&&P.base64===!1;C&&C.binary!==void 0||(P.binary=!G),(E instanceof f&&E.uncompressedSize===0||P.dir||!E||E.length===0)&&(P.base64=!1,P.binary=!0,E="",P.compression="STORE",I="string");var T=null;T=E instanceof f||E instanceof c?E:v.isNode&&v.isStream(E)?new g(S,E):l.prepareContent(S,E,P.binary,P.optimizedBinaryString,P.base64);var D=new m(S,T,P);this.files[S]=D}var a=n("./utf8"),l=n("./utils"),c=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),d=n("./defaults"),f=n("./compressedObject"),m=n("./zipObject"),h=n("./generate"),v=n("./nodejsUtils"),g=n("./nodejs/NodejsStreamInputAdapter"),x=function(S){S.slice(-1)==="/"&&(S=S.substring(0,S.length-1));var E=S.lastIndexOf("/");return 0<E?S.substring(0,E):""},b=function(S){return S.slice(-1)!=="/"&&(S+="/"),S},y=function(S,E){return E=E!==void 0?E:d.createFolders,S=b(S),this.files[S]||i.call(this,S,null,{dir:!0,createFolders:E}),this.files[S]};function _(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 E,C,A;for(E in this.files)A=this.files[E],(C=E.slice(this.root.length,E.length))&&E.slice(0,this.root.length)===this.root&&S(C,A)},filter:function(S){var E=[];return this.forEach(function(C,A){S(C,A)&&E.push(A)}),E},file:function(S,E,C){if(arguments.length!==1)return S=this.root+S,i.call(this,S,E,C),this;if(_(S)){var A=S;return this.filter(function(P,G){return!G.dir&&A.test(P)})}var I=this.files[this.root+S];return I&&!I.dir?I:null},folder:function(S){if(!S)return this;if(_(S))return this.filter(function(I,P){return P.dir&&S.test(I)});var E=this.root+S,C=y.call(this,E),A=this.clone();return A.root=C.name,A},remove:function(S){S=this.root+S;var E=this.files[S];if(E||(S.slice(-1)!=="/"&&(S+="/"),E=this.files[S]),E&&!E.dir)delete this.files[S];else for(var C=this.filter(function(I,P){return P.name.slice(0,S.length)===S}),A=0;A<C.length;A++)delete this.files[C[A].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 E,C={};try{if((C=l.extend(S||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:a.utf8encode})).type=C.type.toLowerCase(),C.compression=C.compression.toUpperCase(),C.type==="binarystring"&&(C.type="string"),!C.type)throw new Error("No output type specified.");l.checkSupport(C.type),C.platform!=="darwin"&&C.platform!=="freebsd"&&C.platform!=="linux"&&C.platform!=="sunos"||(C.platform="UNIX"),C.platform==="win32"&&(C.platform="DOS");var A=C.comment||this.comment||"";E=h.generateWorker(this,C,A)}catch(I){(E=new c("error")).error(I)}return new u(E,C.type||"string",C.mimeType)},generateAsync:function(S,E){return this.generateInternalStream(S).accumulate(E)},generateNodeStream:function(S,E){return(S=S||{}).type||(S.type="nodebuffer"),this.generateInternalStream(S).toNodejsStream(E)}};r.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,r,o){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,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),m=this.length-4;0<=m;--m)if(this.data[m]===c&&this.data[m+1]===u&&this.data[m+2]===d&&this.data[m+3]===f)return m-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),m=this.readData(4);return c===m[0]&&u===m[1]&&d===m[2]&&f===m[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},r.exports=a},{"../utils":32,"./DataReader":18}],18:[function(n,r,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))}},r.exports=a},{"../utils":32}],19:[function(n,r,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},r.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,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},r.exports=a},{"../utils":32,"./DataReader":18}],21:[function(n,r,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},r.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,o){var i=n("../utils"),a=n("../support"),l=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(f){var m=i.getTypeOf(f);return i.checkSupport(m),m!=="string"||a.uint8array?m==="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,r,o){o.LOCAL_FILE_HEADER="PK",o.CENTRAL_FILE_HEADER="PK",o.CENTRAL_DIRECTORY_END="PK",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,o){var 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})},r.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,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)},r.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,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)},r.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,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}})},r.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,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}},r.exports=i},{}],29:[function(n,r,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 m(v,g){return new d.Promise(function(x,b){var y=[],_=v._internalType,j=v._outputType,S=v._mimeType;v.on("data",function(E,C){y.push(E),g&&g(C)}).on("error",function(E){y=[],b(E)}).on("end",function(){try{var E=(function(C,A,I){switch(C){case"blob":return i.newBlob(i.transformTo("arraybuffer",A),I);case"base64":return c.encode(A);default:return i.transformTo(C,A)}})(j,(function(C,A){var I,P=0,G=null,T=0;for(I=0;I<A.length;I++)T+=A[I].length;switch(C){case"string":return A.join("");case"array":return Array.prototype.concat.apply([],A);case"uint8array":for(G=new Uint8Array(T),I=0;I<A.length;I++)G.set(A[I],P),P+=A[I].length;return G;case"nodebuffer":return Buffer.concat(A);default:throw new Error("concat : unsupported type '"+C+"'")}})(_,y),S);x(E)}catch(C){b(C)}y=[]}).resume()})}function h(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)}}h.prototype={accumulate:function(v){return m(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)}},r.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,o){if(o.base64=!0,o.array=!0,o.string=!0,o.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o.nodebuffer=typeof Buffer<"u",o.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")o.blob=!1;else{var 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,r,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 m(){c.call(this,"utf-8 encode")}o.utf8encode=function(h){return a.nodebuffer?l.newBufferFrom(h,"utf-8"):(function(v){var g,x,b,y,_,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=_=0;_<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[_++]=x:(x<2048?g[_++]=192|x>>>6:(x<65536?g[_++]=224|x>>>12:(g[_++]=240|x>>>18,g[_++]=128|x>>>12&63),g[_++]=128|x>>>6&63),g[_++]=128|63&x);return g})(h)},o.utf8decode=function(h){return a.nodebuffer?i.transformTo("nodebuffer",h).toString("utf-8"):(function(v){var g,x,b,y,_=v.length,j=new Array(2*_);for(g=x=0;g<_;)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<_;)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)})(h=i.transformTo(a.uint8array?"uint8array":"array",h))},i.inherits(f,c),f.prototype.processChunk=function(h){var v=i.transformTo(a.uint8array?"uint8array":"array",h.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,_){var j;for((_=_||y.length)>y.length&&(_=y.length),j=_-1;0<=j&&(192&y[j])==128;)j--;return j<0||j===0?_:j+u[y[j]]>_?j:_})(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:h.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(m,c),m.prototype.processChunk=function(h){this.push({data:o.utf8encode(h.data),meta:h.meta})},o.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,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=[],_=0,j=g.length;if(j<=b)return String.fromCharCode.apply(null,g);for(;_<j;)x==="array"||x==="nodebuffer"?y.push(String.fromCharCode.apply(null,g.slice(_,Math.min(_+b,j)))):y.push(String.fromCharCode.apply(null,g.subarray(_,Math.min(_+b,j)))),_+=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 m(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 h(g,x){for(var b=0;b<g.length;b++)x[b]=g[b];return x}o.applyFromCharCode=m;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:m,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 m(new Uint8Array(g))},array:function(g){return h(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:m,array:function(g){return h(g,new Array(g.length))},arraybuffer:function(g){return g.buffer},uint8array:u,nodebuffer:function(g){return l.newBufferFrom(g)}},v.nodebuffer={string:m,array:function(g){return h(g,new Array(g.length))},arraybuffer:function(g){return v.nodebuffer.uint8array(g).buffer},uint8array:function(g){return h(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 _=x[y];_==="."||_===""&&y!==0&&y!==x.length-1||(_===".."?b.pop():b.push(_))}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,_){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,E){var C=new FileReader;C.onload=function(A){S(A.target.result)},C.onerror=function(A){E(A.target.error)},C.readAsArrayBuffer(j)}):j}).then(function(j){var S=o.getTypeOf(j);return S?(S==="arraybuffer"?j=o.transformTo("uint8array",j):S==="string"&&(_?j=a.decode(j):b&&y!==!0&&(j=(function(E){return d(E,i.uint8array?new Uint8Array(E.length):new Array(E.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,r,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 m=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+a.pretty(m)+", expected "+a.pretty(f)+")")}},isSignature:function(f,m){var h=this.reader.index;this.reader.setIndex(f);var v=this.reader.readString(4)===m;return this.reader.setIndex(h),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),m=u.uint8array?"uint8array":"array",h=a.transformTo(m,f);this.zipComment=this.loadOptions.decodeFileName(h)},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,m,h,v=this.zip64EndOfCentralSize-44;0<v;)f=this.reader.readInt(2),m=this.reader.readInt(4),h=this.reader.readData(m),this.zip64ExtensibleData[f]={id:f,length:m,value:h}},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,m;for(f=0;f<this.files.length;f++)m=this.files[f],this.reader.setIndex(m.localHeaderOffset),this.checkSignature(l.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.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 m=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 h=this.centralDirOffset+this.centralDirSize;this.zip64&&(h+=20,h+=12+this.zip64EndOfCentralSize);var v=m-h;if(0<v)this.isSignature(m,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()}},r.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,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 m(h,v){this.options=h,this.loadOptions=v}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(h){var v,g;if(h.skip(22),this.fileNameLength=h.readInt(2),g=h.readInt(2),this.fileName=h.readData(this.fileNameLength),h.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,h.readData(this.compressedSize))},readCentralPart:function(h){this.versionMadeBy=h.readInt(2),h.skip(2),this.bitFlag=h.readInt(2),this.compressionMethod=h.readString(2),this.date=h.readDate(),this.crc32=h.readInt(4),this.compressedSize=h.readInt(4),this.uncompressedSize=h.readInt(4);var v=h.readInt(2);if(this.extraFieldsLength=h.readInt(2),this.fileCommentLength=h.readInt(2),this.diskNumberStart=h.readInt(2),this.internalFileAttributes=h.readInt(2),this.externalFileAttributes=h.readInt(4),this.localHeaderOffset=h.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");h.skip(v),this.readExtraFields(h),this.parseZIP64ExtraField(h),this.fileComment=h.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var h=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),h==0&&(this.dosPermissions=63&this.externalFileAttributes),h==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var h=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=h.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=h.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=h.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=h.readInt(4))}},readExtraFields:function(h){var v,g,x,b=h.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});h.index+4<b;)v=h.readInt(2),g=h.readInt(2),x=h.readData(g),this.extraFields[v]={id:v,length:g,value:x};h.setIndex(b)},handleUTF8:function(){var h=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(h,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(g)}var x=this.findExtraFieldUnicodeComment();if(x!==null)this.fileCommentStr=x;else{var b=a.transformTo(h,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(b)}}},findExtraFieldUnicodePath:function(){var h=this.extraFields[28789];if(h){var v=i(h.value);return v.readInt(1)!==1||c(this.fileName)!==v.readInt(4)?null:u.utf8decode(v.readData(h.length-5))}return null},findExtraFieldUnicodeComment:function(){var h=this.extraFields[25461];if(h){var v=i(h.value);return v.readInt(1)!==1||c(this.fileComment)!==v.readInt(4)?null:u.utf8decode(v.readData(h.length-5))}return null}},r.exports=m},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,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(_){(g=new d("error")).error(_)}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"],m=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<f.length;h++)i.prototype[f[h]]=m;r.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,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 m=new i.MessageChannel;m.port1.onmessage=v,a=function(){m.port2.postMessage(0)}}var h=[];function v(){var g,x;l=!0;for(var b=h.length;b;){for(x=h,h=[],g=-1;++g<b;)x[g]();b=h.length}l=!1}r.exports=function(g){h.push(g)!==1||l||a()}}).call(this,typeof rs<"u"?rs:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,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 m(b,y,_){this.promise=b,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof _=="function"&&(this.onRejected=_,this.callRejected=this.otherCallRejected)}function h(b,y,_){i(function(){var j;try{j=y(_)}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 _=!1;function j(C){_||(_=!0,l.reject(b,C))}function S(C){_||(_=!0,l.resolve(b,C))}var E=x(function(){y(S,j)});E.status==="error"&&j(E.value)}function x(b,y){var _={};try{_.value=b(y),_.status="success"}catch(j){_.status="error",_.value=j}return _}(r.exports=f).prototype.finally=function(b){if(typeof b!="function")return this;var y=this.constructor;return this.then(function(_){return y.resolve(b()).then(function(){return _})},function(_){return y.resolve(b()).then(function(){throw _})})},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 _=new this.constructor(a);return this.state!==d?h(_,this.state===u?b:y,this.outcome):this.queue.push(new m(_,b,y)),_},m.prototype.callFulfilled=function(b){l.resolve(this.promise,b)},m.prototype.otherCallFulfilled=function(b){h(this.promise,this.onFulfilled,b)},m.prototype.callRejected=function(b){l.reject(this.promise,b)},m.prototype.otherCallRejected=function(b){h(this.promise,this.onRejected,b)},l.resolve=function(b,y){var _=x(v,y);if(_.status==="error")return l.reject(b,_.value);var j=_.value;if(j)g(b,j);else{b.state=u,b.outcome=y;for(var S=-1,E=b.queue.length;++S<E;)b.queue[S].callFulfilled(y)}return b},l.reject=function(b,y){b.state=c,b.outcome=y;for(var _=-1,j=b.queue.length;++_<j;)b.queue[_].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 _=b.length,j=!1;if(!_)return this.resolve([]);for(var S=new Array(_),E=0,C=-1,A=new this(a);++C<_;)I(b[C],C);return A;function I(P,G){y.resolve(P).then(function(T){S[G]=T,++E!==_||j||(j=!0,l.resolve(A,S))},function(T){j||(j=!0,l.reject(A,T))})}},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 _=b.length,j=!1;if(!_)return this.resolve([]);for(var S=-1,E=new this(a);++S<_;)C=b[S],y.resolve(C).then(function(A){j||(j=!0,l.resolve(E,A))},function(A){j||(j=!0,l.reject(E,A))});var C;return E}},{immediate:36}],38:[function(n,r,o){var i={};(0,n("./lib/utils/common").assign)(i,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,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,m=-1,h=0,v=8;function g(b){if(!(this instanceof g))return new g(b);this.options=a.assign({level:m,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,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 _=i.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(_!==f)throw new Error(c[_]);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,(_=i.deflateSetDictionary(this.strm,j))!==f)throw new Error(c[_]);this._dict_set=!0}}function x(b,y){var _=new g(y);if(_.push(b,!0),_.err)throw _.msg||c[_.err];return _.result}g.prototype.push=function(b,y){var _,j,S=this.strm,E=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(E),S.next_out=0,S.avail_out=E),(_=i.deflate(S,j))!==1&&_!==f)return this.onEnd(_),!(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)&&_!==1);return j===4?(_=i.deflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===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,r,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"),m=Object.prototype.toString;function h(g){if(!(this instanceof h))return new h(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 h(x);if(b.push(g,!0),b.err)throw b.msg||u[b.err];return b.result}h.prototype.push=function(g,x){var b,y,_,j,S,E,C=this.strm,A=this.options.chunkSize,I=this.options.dictionary,P=!1;if(this.ended)return!1;y=x===~~x?x:x===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof g=="string"?C.input=l.binstring2buf(g):m.call(g)==="[object ArrayBuffer]"?C.input=new Uint8Array(g):C.input=g,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new a.Buf8(A),C.next_out=0,C.avail_out=A),(b=i.inflate(C,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&I&&(E=typeof I=="string"?l.string2buf(I):m.call(I)==="[object ArrayBuffer]"?new Uint8Array(I):I,b=i.inflateSetDictionary(this.strm,E)),b===c.Z_BUF_ERROR&&P===!0&&(b=c.Z_OK,P=!1),b!==c.Z_STREAM_END&&b!==c.Z_OK)return this.onEnd(b),!(this.ended=!0);C.next_out&&(C.avail_out!==0&&b!==c.Z_STREAM_END&&(C.avail_in!==0||y!==c.Z_FINISH&&y!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(_=l.utf8border(C.output,C.next_out),j=C.next_out-_,S=l.buf2string(C.output,_),C.next_out=j,C.avail_out=A-j,j&&a.arraySet(C.output,C.output,_,j,0),this.onData(S)):this.onData(a.shrinkBuf(C.output,C.next_out)))),C.avail_in===0&&C.avail_out===0&&(P=!0)}while((0<C.avail_in||C.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),!(C.avail_out=0))},h.prototype.onData=function(g){this.chunks.push(g)},h.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=h,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,r,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,m){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+f),m);else for(var h=0;h<f;h++)c[m+h]=u[d+h]},flattenChunks:function(c){var u,d,f,m,h,v;for(u=f=0,d=c.length;u<d;u++)f+=c[u].length;for(v=new Uint8Array(f),u=m=0,d=c.length;u<d;u++)h=c[u],v.set(h,m),m+=h.length;return v}},l={arraySet:function(c,u,d,f,m){for(var h=0;h<f;h++)c[m+h]=u[d+h]},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,r,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,m){if(m<65537&&(f.subarray&&l||!f.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(f,m));for(var h="",v=0;v<m;v++)h+=String.fromCharCode(f[v]);return h}c[254]=c[254]=1,o.string2buf=function(f){var m,h,v,g,x,b=f.length,y=0;for(g=0;g<b;g++)(64512&(h=f.charCodeAt(g)))==55296&&g+1<b&&(64512&(v=f.charCodeAt(g+1)))==56320&&(h=65536+(h-55296<<10)+(v-56320),g++),y+=h<128?1:h<2048?2:h<65536?3:4;for(m=new i.Buf8(y),g=x=0;x<y;g++)(64512&(h=f.charCodeAt(g)))==55296&&g+1<b&&(64512&(v=f.charCodeAt(g+1)))==56320&&(h=65536+(h-55296<<10)+(v-56320),g++),h<128?m[x++]=h:(h<2048?m[x++]=192|h>>>6:(h<65536?m[x++]=224|h>>>12:(m[x++]=240|h>>>18,m[x++]=128|h>>>12&63),m[x++]=128|h>>>6&63),m[x++]=128|63&h);return m},o.buf2binstring=function(f){return d(f,f.length)},o.binstring2buf=function(f){for(var m=new i.Buf8(f.length),h=0,v=m.length;h<v;h++)m[h]=f.charCodeAt(h);return m},o.buf2string=function(f,m){var h,v,g,x,b=m||f.length,y=new Array(2*b);for(h=v=0;h<b;)if((g=f[h++])<128)y[v++]=g;else if(4<(x=c[g]))y[v++]=65533,h+=x-1;else{for(g&=x===2?31:x===3?15:7;1<x&&h<b;)g=g<<6|63&f[h++],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,m){var h;for((m=m||f.length)>f.length&&(m=f.length),h=m-1;0<=h&&(192&f[h])==128;)h--;return h<0||h===0?m:h+c[f[h]]>m?h:m}},{"./common":41}],43:[function(n,r,o){r.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,r,o){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,o){var 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})();r.exports=function(a,l,c,u){var d=i,f=u+c;a^=-1;for(var m=u;m<f;m++)a=a>>>8^d[255&(a^l[m])];return-1^a}},{}],46:[function(n,r,o){var i,a=n("../utils/common"),l=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),f=0,m=4,h=0,v=-2,g=-1,x=4,b=2,y=8,_=9,j=286,S=30,E=19,C=2*j+1,A=15,I=3,P=258,G=P+I+1,T=42,D=113,k=1,F=2,Q=3,$=4;function Z(w,K){return w.msg=d[K],K}function q(w){return(w<<1)-(4<w?9:0)}function ue(w){for(var K=w.length;0<=--K;)w[K]=0}function U(w){var K=w.state,H=K.pending;H>w.avail_out&&(H=w.avail_out),H!==0&&(a.arraySet(w.output,K.pending_buf,K.pending_out,H,w.next_out),w.next_out+=H,K.pending_out+=H,w.total_out+=H,w.avail_out-=H,K.pending-=H,K.pending===0&&(K.pending_out=0))}function W(w,K){l._tr_flush_block(w,0<=w.block_start?w.block_start:-1,w.strstart-w.block_start,K),w.block_start=w.strstart,U(w.strm)}function ae(w,K){w.pending_buf[w.pending++]=K}function B(w,K){w.pending_buf[w.pending++]=K>>>8&255,w.pending_buf[w.pending++]=255&K}function X(w,K){var H,z,R=w.max_chain_length,M=w.strstart,re=w.prev_length,ne=w.nice_match,V=w.strstart>w.w_size-G?w.strstart-(w.w_size-G):0,oe=w.window,O=w.w_mask,L=w.prev,te=w.strstart+P,fe=oe[M+re-1],ie=oe[M+re];w.prev_length>=w.good_match&&(R>>=2),ne>w.lookahead&&(ne=w.lookahead);do if(oe[(H=K)+re]===ie&&oe[H+re-1]===fe&&oe[H]===oe[M]&&oe[++H]===oe[M+1]){M+=2,H++;do;while(oe[++M]===oe[++H]&&oe[++M]===oe[++H]&&oe[++M]===oe[++H]&&oe[++M]===oe[++H]&&oe[++M]===oe[++H]&&oe[++M]===oe[++H]&&oe[++M]===oe[++H]&&oe[++M]===oe[++H]&&M<te);if(z=P-(te-M),M=te-P,re<z){if(w.match_start=K,ne<=(re=z))break;fe=oe[M+re-1],ie=oe[M+re]}}while((K=L[K&O])>V&&--R!=0);return re<=w.lookahead?re:w.lookahead}function _e(w){var K,H,z,R,M,re,ne,V,oe,O,L=w.w_size;do{if(R=w.window_size-w.lookahead-w.strstart,w.strstart>=L+(L-G)){for(a.arraySet(w.window,w.window,L,L,0),w.match_start-=L,w.strstart-=L,w.block_start-=L,K=H=w.hash_size;z=w.head[--K],w.head[K]=L<=z?z-L:0,--H;);for(K=H=L;z=w.prev[--K],w.prev[K]=L<=z?z-L:0,--H;);R+=L}if(w.strm.avail_in===0)break;if(re=w.strm,ne=w.window,V=w.strstart+w.lookahead,oe=R,O=void 0,O=re.avail_in,oe<O&&(O=oe),H=O===0?0:(re.avail_in-=O,a.arraySet(ne,re.input,re.next_in,O,V),re.state.wrap===1?re.adler=c(re.adler,ne,O,V):re.state.wrap===2&&(re.adler=u(re.adler,ne,O,V)),re.next_in+=O,re.total_in+=O,O),w.lookahead+=H,w.lookahead+w.insert>=I)for(M=w.strstart-w.insert,w.ins_h=w.window[M],w.ins_h=(w.ins_h<<w.hash_shift^w.window[M+1])&w.hash_mask;w.insert&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[M+I-1])&w.hash_mask,w.prev[M&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=M,M++,w.insert--,!(w.lookahead+w.insert<I)););}while(w.lookahead<G&&w.strm.avail_in!==0)}function ce(w,K){for(var H,z;;){if(w.lookahead<G){if(_e(w),w.lookahead<G&&K===f)return k;if(w.lookahead===0)break}if(H=0,w.lookahead>=I&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+I-1])&w.hash_mask,H=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),H!==0&&w.strstart-H<=w.w_size-G&&(w.match_length=X(w,H)),w.match_length>=I)if(z=l._tr_tally(w,w.strstart-w.match_start,w.match_length-I),w.lookahead-=w.match_length,w.match_length<=w.max_lazy_match&&w.lookahead>=I){for(w.match_length--;w.strstart++,w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+I-1])&w.hash_mask,H=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 z=l._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++;if(z&&(W(w,!1),w.strm.avail_out===0))return k}return w.insert=w.strstart<I-1?w.strstart:I-1,K===m?(W(w,!0),w.strm.avail_out===0?Q:$):w.last_lit&&(W(w,!1),w.strm.avail_out===0)?k:F}function xe(w,K){for(var H,z,R;;){if(w.lookahead<G){if(_e(w),w.lookahead<G&&K===f)return k;if(w.lookahead===0)break}if(H=0,w.lookahead>=I&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+I-1])&w.hash_mask,H=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=I-1,H!==0&&w.prev_length<w.max_lazy_match&&w.strstart-H<=w.w_size-G&&(w.match_length=X(w,H),w.match_length<=5&&(w.strategy===1||w.match_length===I&&4096<w.strstart-w.match_start)&&(w.match_length=I-1)),w.prev_length>=I&&w.match_length<=w.prev_length){for(R=w.strstart+w.lookahead-I,z=l._tr_tally(w,w.strstart-1-w.prev_match,w.prev_length-I),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+I-1])&w.hash_mask,H=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=I-1,w.strstart++,z&&(W(w,!1),w.strm.avail_out===0))return k}else if(w.match_available){if((z=l._tr_tally(w,0,w.window[w.strstart-1]))&&W(w,!1),w.strstart++,w.lookahead--,w.strm.avail_out===0)return k}else w.match_available=1,w.strstart++,w.lookahead--}return w.match_available&&(z=l._tr_tally(w,0,w.window[w.strstart-1]),w.match_available=0),w.insert=w.strstart<I-1?w.strstart:I-1,K===m?(W(w,!0),w.strm.avail_out===0?Q:$):w.last_lit&&(W(w,!1),w.strm.avail_out===0)?k:F}function pe(w,K,H,z,R){this.good_length=w,this.max_lazy=K,this.nice_length=H,this.max_chain=z,this.func=R}function ge(){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*C),this.dyn_dtree=new a.Buf16(2*(2*S+1)),this.bl_tree=new a.Buf16(2*(2*E+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(A+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 se(w){var K;return w&&w.state?(w.total_in=w.total_out=0,w.data_type=b,(K=w.state).pending=0,K.pending_out=0,K.wrap<0&&(K.wrap=-K.wrap),K.status=K.wrap?T:D,w.adler=K.wrap===2?0:1,K.last_flush=f,l._tr_init(K),h):Z(w,v)}function de(w){var K=se(w);return K===h&&(function(H){H.window_size=2*H.w_size,ue(H.head),H.max_lazy_match=i[H.level].max_lazy,H.good_match=i[H.level].good_length,H.nice_match=i[H.level].nice_length,H.max_chain_length=i[H.level].max_chain,H.strstart=0,H.block_start=0,H.lookahead=0,H.insert=0,H.match_length=H.prev_length=I-1,H.match_available=0,H.ins_h=0})(w.state),K}function be(w,K,H,z,R,M){if(!w)return v;var re=1;if(K===g&&(K=6),z<0?(re=0,z=-z):15<z&&(re=2,z-=16),R<1||_<R||H!==y||z<8||15<z||K<0||9<K||M<0||x<M)return Z(w,v);z===8&&(z=9);var ne=new ge;return(w.state=ne).strm=w,ne.wrap=re,ne.gzhead=null,ne.w_bits=z,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+I-1)/I),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=K,ne.strategy=M,ne.method=H,de(w)}i=[new pe(0,0,0,0,function(w,K){var H=65535;for(H>w.pending_buf_size-5&&(H=w.pending_buf_size-5);;){if(w.lookahead<=1){if(_e(w),w.lookahead===0&&K===f)return k;if(w.lookahead===0)break}w.strstart+=w.lookahead,w.lookahead=0;var z=w.block_start+H;if((w.strstart===0||w.strstart>=z)&&(w.lookahead=w.strstart-z,w.strstart=z,W(w,!1),w.strm.avail_out===0)||w.strstart-w.block_start>=w.w_size-G&&(W(w,!1),w.strm.avail_out===0))return k}return w.insert=0,K===m?(W(w,!0),w.strm.avail_out===0?Q:$):(w.strstart>w.block_start&&(W(w,!1),w.strm.avail_out),k)}),new pe(4,4,8,4,ce),new pe(4,5,16,8,ce),new pe(4,6,32,32,ce),new pe(4,4,16,16,xe),new pe(8,16,32,32,xe),new pe(8,16,128,128,xe),new pe(8,32,128,256,xe),new pe(32,128,258,1024,xe),new pe(32,258,258,4096,xe)],o.deflateInit=function(w,K){return be(w,K,y,15,8,0)},o.deflateInit2=be,o.deflateReset=de,o.deflateResetKeep=se,o.deflateSetHeader=function(w,K){return w&&w.state?w.state.wrap!==2?v:(w.state.gzhead=K,h):v},o.deflate=function(w,K){var H,z,R,M;if(!w||!w.state||5<K||K<0)return w?Z(w,v):v;if(z=w.state,!w.output||!w.input&&w.avail_in!==0||z.status===666&&K!==m)return Z(w,w.avail_out===0?-5:v);if(z.strm=w,H=z.last_flush,z.last_flush=K,z.status===T)if(z.wrap===2)w.adler=0,ae(z,31),ae(z,139),ae(z,8),z.gzhead?(ae(z,(z.gzhead.text?1:0)+(z.gzhead.hcrc?2:0)+(z.gzhead.extra?4:0)+(z.gzhead.name?8:0)+(z.gzhead.comment?16:0)),ae(z,255&z.gzhead.time),ae(z,z.gzhead.time>>8&255),ae(z,z.gzhead.time>>16&255),ae(z,z.gzhead.time>>24&255),ae(z,z.level===9?2:2<=z.strategy||z.level<2?4:0),ae(z,255&z.gzhead.os),z.gzhead.extra&&z.gzhead.extra.length&&(ae(z,255&z.gzhead.extra.length),ae(z,z.gzhead.extra.length>>8&255)),z.gzhead.hcrc&&(w.adler=u(w.adler,z.pending_buf,z.pending,0)),z.gzindex=0,z.status=69):(ae(z,0),ae(z,0),ae(z,0),ae(z,0),ae(z,0),ae(z,z.level===9?2:2<=z.strategy||z.level<2?4:0),ae(z,3),z.status=D);else{var re=y+(z.w_bits-8<<4)<<8;re|=(2<=z.strategy||z.level<2?0:z.level<6?1:z.level===6?2:3)<<6,z.strstart!==0&&(re|=32),re+=31-re%31,z.status=D,B(z,re),z.strstart!==0&&(B(z,w.adler>>>16),B(z,65535&w.adler)),w.adler=1}if(z.status===69)if(z.gzhead.extra){for(R=z.pending;z.gzindex<(65535&z.gzhead.extra.length)&&(z.pending!==z.pending_buf_size||(z.gzhead.hcrc&&z.pending>R&&(w.adler=u(w.adler,z.pending_buf,z.pending-R,R)),U(w),R=z.pending,z.pending!==z.pending_buf_size));)ae(z,255&z.gzhead.extra[z.gzindex]),z.gzindex++;z.gzhead.hcrc&&z.pending>R&&(w.adler=u(w.adler,z.pending_buf,z.pending-R,R)),z.gzindex===z.gzhead.extra.length&&(z.gzindex=0,z.status=73)}else z.status=73;if(z.status===73)if(z.gzhead.name){R=z.pending;do{if(z.pending===z.pending_buf_size&&(z.gzhead.hcrc&&z.pending>R&&(w.adler=u(w.adler,z.pending_buf,z.pending-R,R)),U(w),R=z.pending,z.pending===z.pending_buf_size)){M=1;break}M=z.gzindex<z.gzhead.name.length?255&z.gzhead.name.charCodeAt(z.gzindex++):0,ae(z,M)}while(M!==0);z.gzhead.hcrc&&z.pending>R&&(w.adler=u(w.adler,z.pending_buf,z.pending-R,R)),M===0&&(z.gzindex=0,z.status=91)}else z.status=91;if(z.status===91)if(z.gzhead.comment){R=z.pending;do{if(z.pending===z.pending_buf_size&&(z.gzhead.hcrc&&z.pending>R&&(w.adler=u(w.adler,z.pending_buf,z.pending-R,R)),U(w),R=z.pending,z.pending===z.pending_buf_size)){M=1;break}M=z.gzindex<z.gzhead.comment.length?255&z.gzhead.comment.charCodeAt(z.gzindex++):0,ae(z,M)}while(M!==0);z.gzhead.hcrc&&z.pending>R&&(w.adler=u(w.adler,z.pending_buf,z.pending-R,R)),M===0&&(z.status=103)}else z.status=103;if(z.status===103&&(z.gzhead.hcrc?(z.pending+2>z.pending_buf_size&&U(w),z.pending+2<=z.pending_buf_size&&(ae(z,255&w.adler),ae(z,w.adler>>8&255),w.adler=0,z.status=D)):z.status=D),z.pending!==0){if(U(w),w.avail_out===0)return z.last_flush=-1,h}else if(w.avail_in===0&&q(K)<=q(H)&&K!==m)return Z(w,-5);if(z.status===666&&w.avail_in!==0)return Z(w,-5);if(w.avail_in!==0||z.lookahead!==0||K!==f&&z.status!==666){var ne=z.strategy===2?(function(V,oe){for(var O;;){if(V.lookahead===0&&(_e(V),V.lookahead===0)){if(oe===f)return k;break}if(V.match_length=0,O=l._tr_tally(V,0,V.window[V.strstart]),V.lookahead--,V.strstart++,O&&(W(V,!1),V.strm.avail_out===0))return k}return V.insert=0,oe===m?(W(V,!0),V.strm.avail_out===0?Q:$):V.last_lit&&(W(V,!1),V.strm.avail_out===0)?k:F})(z,K):z.strategy===3?(function(V,oe){for(var O,L,te,fe,ie=V.window;;){if(V.lookahead<=P){if(_e(V),V.lookahead<=P&&oe===f)return k;if(V.lookahead===0)break}if(V.match_length=0,V.lookahead>=I&&0<V.strstart&&(L=ie[te=V.strstart-1])===ie[++te]&&L===ie[++te]&&L===ie[++te]){fe=V.strstart+P;do;while(L===ie[++te]&&L===ie[++te]&&L===ie[++te]&&L===ie[++te]&&L===ie[++te]&&L===ie[++te]&&L===ie[++te]&&L===ie[++te]&&te<fe);V.match_length=P-(fe-te),V.match_length>V.lookahead&&(V.match_length=V.lookahead)}if(V.match_length>=I?(O=l._tr_tally(V,1,V.match_length-I),V.lookahead-=V.match_length,V.strstart+=V.match_length,V.match_length=0):(O=l._tr_tally(V,0,V.window[V.strstart]),V.lookahead--,V.strstart++),O&&(W(V,!1),V.strm.avail_out===0))return k}return V.insert=0,oe===m?(W(V,!0),V.strm.avail_out===0?Q:$):V.last_lit&&(W(V,!1),V.strm.avail_out===0)?k:F})(z,K):i[z.level].func(z,K);if(ne!==Q&&ne!==$||(z.status=666),ne===k||ne===Q)return w.avail_out===0&&(z.last_flush=-1),h;if(ne===F&&(K===1?l._tr_align(z):K!==5&&(l._tr_stored_block(z,0,0,!1),K===3&&(ue(z.head),z.lookahead===0&&(z.strstart=0,z.block_start=0,z.insert=0))),U(w),w.avail_out===0))return z.last_flush=-1,h}return K!==m?h:z.wrap<=0?1:(z.wrap===2?(ae(z,255&w.adler),ae(z,w.adler>>8&255),ae(z,w.adler>>16&255),ae(z,w.adler>>24&255),ae(z,255&w.total_in),ae(z,w.total_in>>8&255),ae(z,w.total_in>>16&255),ae(z,w.total_in>>24&255)):(B(z,w.adler>>>16),B(z,65535&w.adler)),U(w),0<z.wrap&&(z.wrap=-z.wrap),z.pending!==0?h:1)},o.deflateEnd=function(w){var K;return w&&w.state?(K=w.state.status)!==T&&K!==69&&K!==73&&K!==91&&K!==103&&K!==D&&K!==666?Z(w,v):(w.state=null,K===D?Z(w,-3):h):v},o.deflateSetDictionary=function(w,K){var H,z,R,M,re,ne,V,oe,O=K.length;if(!w||!w.state||(M=(H=w.state).wrap)===2||M===1&&H.status!==T||H.lookahead)return v;for(M===1&&(w.adler=c(w.adler,K,O,0)),H.wrap=0,O>=H.w_size&&(M===0&&(ue(H.head),H.strstart=0,H.block_start=0,H.insert=0),oe=new a.Buf8(H.w_size),a.arraySet(oe,K,O-H.w_size,H.w_size,0),K=oe,O=H.w_size),re=w.avail_in,ne=w.next_in,V=w.input,w.avail_in=O,w.next_in=0,w.input=K,_e(H);H.lookahead>=I;){for(z=H.strstart,R=H.lookahead-(I-1);H.ins_h=(H.ins_h<<H.hash_shift^H.window[z+I-1])&H.hash_mask,H.prev[z&H.w_mask]=H.head[H.ins_h],H.head[H.ins_h]=z,z++,--R;);H.strstart=z,H.lookahead=I-1,_e(H)}return H.strstart+=H.lookahead,H.block_start=H.strstart,H.insert=H.lookahead,H.lookahead=0,H.match_length=H.prev_length=I-1,H.match_available=0,w.next_in=ne,w.input=V,w.avail_in=re,H.wrap=M,h},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,o){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,o){r.exports=function(i,a){var l,c,u,d,f,m,h,v,g,x,b,y,_,j,S,E,C,A,I,P,G,T,D,k,F;l=i.state,c=i.next_in,k=i.input,u=c+(i.avail_in-5),d=i.next_out,F=i.output,f=d-(a-i.avail_out),m=d+(i.avail_out-257),h=l.dmax,v=l.wsize,g=l.whave,x=l.wnext,b=l.window,y=l.hold,_=l.bits,j=l.lencode,S=l.distcode,E=(1<<l.lenbits)-1,C=(1<<l.distbits)-1;e:do{_<15&&(y+=k[c++]<<_,_+=8,y+=k[c++]<<_,_+=8),A=j[y&E];t:for(;;){if(y>>>=I=A>>>24,_-=I,(I=A>>>16&255)===0)F[d++]=65535&A;else{if(!(16&I)){if((64&I)==0){A=j[(65535&A)+(y&(1<<I)-1)];continue t}if(32&I){l.mode=12;break e}i.msg="invalid literal/length code",l.mode=30;break e}P=65535&A,(I&=15)&&(_<I&&(y+=k[c++]<<_,_+=8),P+=y&(1<<I)-1,y>>>=I,_-=I),_<15&&(y+=k[c++]<<_,_+=8,y+=k[c++]<<_,_+=8),A=S[y&C];n:for(;;){if(y>>>=I=A>>>24,_-=I,!(16&(I=A>>>16&255))){if((64&I)==0){A=S[(65535&A)+(y&(1<<I)-1)];continue n}i.msg="invalid distance code",l.mode=30;break e}if(G=65535&A,_<(I&=15)&&(y+=k[c++]<<_,(_+=8)<I&&(y+=k[c++]<<_,_+=8)),h<(G+=y&(1<<I)-1)){i.msg="invalid distance too far back",l.mode=30;break e}if(y>>>=I,_-=I,(I=d-f)<G){if(g<(I=G-I)&&l.sane){i.msg="invalid distance too far back",l.mode=30;break e}if(D=b,(T=0)===x){if(T+=v-I,I<P){for(P-=I;F[d++]=b[T++],--I;);T=d-G,D=F}}else if(x<I){if(T+=v+x-I,(I-=x)<P){for(P-=I;F[d++]=b[T++],--I;);if(T=0,x<P){for(P-=I=x;F[d++]=b[T++],--I;);T=d-G,D=F}}}else if(T+=x-I,I<P){for(P-=I;F[d++]=b[T++],--I;);T=d-G,D=F}for(;2<P;)F[d++]=D[T++],F[d++]=D[T++],F[d++]=D[T++],P-=3;P&&(F[d++]=D[T++],1<P&&(F[d++]=D[T++]))}else{for(T=d-G;F[d++]=F[T++],F[d++]=F[T++],F[d++]=F[T++],2<(P-=3););P&&(F[d++]=F[T++],1<P&&(F[d++]=F[T++]))}break}}break}}while(c<u&&d<m);c-=P=_>>3,y&=(1<<(_-=P<<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<m?m-d+257:257-(d-m),l.hold=y,l.bits=_}},{}],49:[function(n,r,o){var i=n("../utils/common"),a=n("./adler32"),l=n("./crc32"),c=n("./inffast"),u=n("./inftrees"),d=1,f=2,m=0,h=-2,v=1,g=852,x=592;function b(T){return(T>>>24&255)+(T>>>8&65280)+((65280&T)<<8)+((255&T)<<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 _(T){var D;return T&&T.state?(D=T.state,T.total_in=T.total_out=D.total=0,T.msg="",D.wrap&&(T.adler=1&D.wrap),D.mode=v,D.last=0,D.havedict=0,D.dmax=32768,D.head=null,D.hold=0,D.bits=0,D.lencode=D.lendyn=new i.Buf32(g),D.distcode=D.distdyn=new i.Buf32(x),D.sane=1,D.back=-1,m):h}function j(T){var D;return T&&T.state?((D=T.state).wsize=0,D.whave=0,D.wnext=0,_(T)):h}function S(T,D){var k,F;return T&&T.state?(F=T.state,D<0?(k=0,D=-D):(k=1+(D>>4),D<48&&(D&=15)),D&&(D<8||15<D)?h:(F.window!==null&&F.wbits!==D&&(F.window=null),F.wrap=k,F.wbits=D,j(T))):h}function E(T,D){var k,F;return T?(F=new y,(T.state=F).window=null,(k=S(T,D))!==m&&(T.state=null),k):h}var C,A,I=!0;function P(T){if(I){var D;for(C=new i.Buf32(512),A=new i.Buf32(32),D=0;D<144;)T.lens[D++]=8;for(;D<256;)T.lens[D++]=9;for(;D<280;)T.lens[D++]=7;for(;D<288;)T.lens[D++]=8;for(u(d,T.lens,0,288,C,0,T.work,{bits:9}),D=0;D<32;)T.lens[D++]=5;u(f,T.lens,0,32,A,0,T.work,{bits:5}),I=!1}T.lencode=C,T.lenbits=9,T.distcode=A,T.distbits=5}function G(T,D,k,F){var Q,$=T.state;return $.window===null&&($.wsize=1<<$.wbits,$.wnext=0,$.whave=0,$.window=new i.Buf8($.wsize)),F>=$.wsize?(i.arraySet($.window,D,k-$.wsize,$.wsize,0),$.wnext=0,$.whave=$.wsize):(F<(Q=$.wsize-$.wnext)&&(Q=F),i.arraySet($.window,D,k-F,Q,$.wnext),(F-=Q)?(i.arraySet($.window,D,k-F,F,0),$.wnext=F,$.whave=$.wsize):($.wnext+=Q,$.wnext===$.wsize&&($.wnext=0),$.whave<$.wsize&&($.whave+=Q))),0}o.inflateReset=j,o.inflateReset2=S,o.inflateResetKeep=_,o.inflateInit=function(T){return E(T,15)},o.inflateInit2=E,o.inflate=function(T,D){var k,F,Q,$,Z,q,ue,U,W,ae,B,X,_e,ce,xe,pe,ge,se,de,be,w,K,H,z,R=0,M=new i.Buf8(4),re=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!T||!T.state||!T.output||!T.input&&T.avail_in!==0)return h;(k=T.state).mode===12&&(k.mode=13),Z=T.next_out,Q=T.output,ue=T.avail_out,$=T.next_in,F=T.input,q=T.avail_in,U=k.hold,W=k.bits,ae=q,B=ue,K=m;e:for(;;)switch(k.mode){case v:if(k.wrap===0){k.mode=13;break}for(;W<16;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(2&k.wrap&&U===35615){M[k.check=0]=255&U,M[1]=U>>>8&255,k.check=l(k.check,M,2,0),W=U=0,k.mode=2;break}if(k.flags=0,k.head&&(k.head.done=!1),!(1&k.wrap)||(((255&U)<<8)+(U>>8))%31){T.msg="incorrect header check",k.mode=30;break}if((15&U)!=8){T.msg="unknown compression method",k.mode=30;break}if(W-=4,w=8+(15&(U>>>=4)),k.wbits===0)k.wbits=w;else if(w>k.wbits){T.msg="invalid window size",k.mode=30;break}k.dmax=1<<w,T.adler=k.check=1,k.mode=512&U?10:12,W=U=0;break;case 2:for(;W<16;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(k.flags=U,(255&k.flags)!=8){T.msg="unknown compression method",k.mode=30;break}if(57344&k.flags){T.msg="unknown header flags set",k.mode=30;break}k.head&&(k.head.text=U>>8&1),512&k.flags&&(M[0]=255&U,M[1]=U>>>8&255,k.check=l(k.check,M,2,0)),W=U=0,k.mode=3;case 3:for(;W<32;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}k.head&&(k.head.time=U),512&k.flags&&(M[0]=255&U,M[1]=U>>>8&255,M[2]=U>>>16&255,M[3]=U>>>24&255,k.check=l(k.check,M,4,0)),W=U=0,k.mode=4;case 4:for(;W<16;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}k.head&&(k.head.xflags=255&U,k.head.os=U>>8),512&k.flags&&(M[0]=255&U,M[1]=U>>>8&255,k.check=l(k.check,M,2,0)),W=U=0,k.mode=5;case 5:if(1024&k.flags){for(;W<16;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}k.length=U,k.head&&(k.head.extra_len=U),512&k.flags&&(M[0]=255&U,M[1]=U>>>8&255,k.check=l(k.check,M,2,0)),W=U=0}else k.head&&(k.head.extra=null);k.mode=6;case 6:if(1024&k.flags&&(q<(X=k.length)&&(X=q),X&&(k.head&&(w=k.head.extra_len-k.length,k.head.extra||(k.head.extra=new Array(k.head.extra_len)),i.arraySet(k.head.extra,F,$,X,w)),512&k.flags&&(k.check=l(k.check,F,X,$)),q-=X,$+=X,k.length-=X),k.length))break e;k.length=0,k.mode=7;case 7:if(2048&k.flags){if(q===0)break e;for(X=0;w=F[$+X++],k.head&&w&&k.length<65536&&(k.head.name+=String.fromCharCode(w)),w&&X<q;);if(512&k.flags&&(k.check=l(k.check,F,X,$)),q-=X,$+=X,w)break e}else k.head&&(k.head.name=null);k.length=0,k.mode=8;case 8:if(4096&k.flags){if(q===0)break e;for(X=0;w=F[$+X++],k.head&&w&&k.length<65536&&(k.head.comment+=String.fromCharCode(w)),w&&X<q;);if(512&k.flags&&(k.check=l(k.check,F,X,$)),q-=X,$+=X,w)break e}else k.head&&(k.head.comment=null);k.mode=9;case 9:if(512&k.flags){for(;W<16;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(U!==(65535&k.check)){T.msg="header crc mismatch",k.mode=30;break}W=U=0}k.head&&(k.head.hcrc=k.flags>>9&1,k.head.done=!0),T.adler=k.check=0,k.mode=12;break;case 10:for(;W<32;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}T.adler=k.check=b(U),W=U=0,k.mode=11;case 11:if(k.havedict===0)return T.next_out=Z,T.avail_out=ue,T.next_in=$,T.avail_in=q,k.hold=U,k.bits=W,2;T.adler=k.check=1,k.mode=12;case 12:if(D===5||D===6)break e;case 13:if(k.last){U>>>=7&W,W-=7&W,k.mode=27;break}for(;W<3;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}switch(k.last=1&U,W-=1,3&(U>>>=1)){case 0:k.mode=14;break;case 1:if(P(k),k.mode=20,D!==6)break;U>>>=2,W-=2;break e;case 2:k.mode=17;break;case 3:T.msg="invalid block type",k.mode=30}U>>>=2,W-=2;break;case 14:for(U>>>=7&W,W-=7&W;W<32;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if((65535&U)!=(U>>>16^65535)){T.msg="invalid stored block lengths",k.mode=30;break}if(k.length=65535&U,W=U=0,k.mode=15,D===6)break e;case 15:k.mode=16;case 16:if(X=k.length){if(q<X&&(X=q),ue<X&&(X=ue),X===0)break e;i.arraySet(Q,F,$,X,Z),q-=X,$+=X,ue-=X,Z+=X,k.length-=X;break}k.mode=12;break;case 17:for(;W<14;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(k.nlen=257+(31&U),U>>>=5,W-=5,k.ndist=1+(31&U),U>>>=5,W-=5,k.ncode=4+(15&U),U>>>=4,W-=4,286<k.nlen||30<k.ndist){T.msg="too many length or distance symbols",k.mode=30;break}k.have=0,k.mode=18;case 18:for(;k.have<k.ncode;){for(;W<3;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}k.lens[re[k.have++]]=7&U,U>>>=3,W-=3}for(;k.have<19;)k.lens[re[k.have++]]=0;if(k.lencode=k.lendyn,k.lenbits=7,H={bits:k.lenbits},K=u(0,k.lens,0,19,k.lencode,0,k.work,H),k.lenbits=H.bits,K){T.msg="invalid code lengths set",k.mode=30;break}k.have=0,k.mode=19;case 19:for(;k.have<k.nlen+k.ndist;){for(;pe=(R=k.lencode[U&(1<<k.lenbits)-1])>>>16&255,ge=65535&R,!((xe=R>>>24)<=W);){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(ge<16)U>>>=xe,W-=xe,k.lens[k.have++]=ge;else{if(ge===16){for(z=xe+2;W<z;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(U>>>=xe,W-=xe,k.have===0){T.msg="invalid bit length repeat",k.mode=30;break}w=k.lens[k.have-1],X=3+(3&U),U>>>=2,W-=2}else if(ge===17){for(z=xe+3;W<z;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}W-=xe,w=0,X=3+(7&(U>>>=xe)),U>>>=3,W-=3}else{for(z=xe+7;W<z;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}W-=xe,w=0,X=11+(127&(U>>>=xe)),U>>>=7,W-=7}if(k.have+X>k.nlen+k.ndist){T.msg="invalid bit length repeat",k.mode=30;break}for(;X--;)k.lens[k.have++]=w}}if(k.mode===30)break;if(k.lens[256]===0){T.msg="invalid code -- missing end-of-block",k.mode=30;break}if(k.lenbits=9,H={bits:k.lenbits},K=u(d,k.lens,0,k.nlen,k.lencode,0,k.work,H),k.lenbits=H.bits,K){T.msg="invalid literal/lengths set",k.mode=30;break}if(k.distbits=6,k.distcode=k.distdyn,H={bits:k.distbits},K=u(f,k.lens,k.nlen,k.ndist,k.distcode,0,k.work,H),k.distbits=H.bits,K){T.msg="invalid distances set",k.mode=30;break}if(k.mode=20,D===6)break e;case 20:k.mode=21;case 21:if(6<=q&&258<=ue){T.next_out=Z,T.avail_out=ue,T.next_in=$,T.avail_in=q,k.hold=U,k.bits=W,c(T,B),Z=T.next_out,Q=T.output,ue=T.avail_out,$=T.next_in,F=T.input,q=T.avail_in,U=k.hold,W=k.bits,k.mode===12&&(k.back=-1);break}for(k.back=0;pe=(R=k.lencode[U&(1<<k.lenbits)-1])>>>16&255,ge=65535&R,!((xe=R>>>24)<=W);){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(pe&&(240&pe)==0){for(se=xe,de=pe,be=ge;pe=(R=k.lencode[be+((U&(1<<se+de)-1)>>se)])>>>16&255,ge=65535&R,!(se+(xe=R>>>24)<=W);){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}U>>>=se,W-=se,k.back+=se}if(U>>>=xe,W-=xe,k.back+=xe,k.length=ge,pe===0){k.mode=26;break}if(32&pe){k.back=-1,k.mode=12;break}if(64&pe){T.msg="invalid literal/length code",k.mode=30;break}k.extra=15&pe,k.mode=22;case 22:if(k.extra){for(z=k.extra;W<z;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}k.length+=U&(1<<k.extra)-1,U>>>=k.extra,W-=k.extra,k.back+=k.extra}k.was=k.length,k.mode=23;case 23:for(;pe=(R=k.distcode[U&(1<<k.distbits)-1])>>>16&255,ge=65535&R,!((xe=R>>>24)<=W);){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if((240&pe)==0){for(se=xe,de=pe,be=ge;pe=(R=k.distcode[be+((U&(1<<se+de)-1)>>se)])>>>16&255,ge=65535&R,!(se+(xe=R>>>24)<=W);){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}U>>>=se,W-=se,k.back+=se}if(U>>>=xe,W-=xe,k.back+=xe,64&pe){T.msg="invalid distance code",k.mode=30;break}k.offset=ge,k.extra=15&pe,k.mode=24;case 24:if(k.extra){for(z=k.extra;W<z;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}k.offset+=U&(1<<k.extra)-1,U>>>=k.extra,W-=k.extra,k.back+=k.extra}if(k.offset>k.dmax){T.msg="invalid distance too far back",k.mode=30;break}k.mode=25;case 25:if(ue===0)break e;if(X=B-ue,k.offset>X){if((X=k.offset-X)>k.whave&&k.sane){T.msg="invalid distance too far back",k.mode=30;break}_e=X>k.wnext?(X-=k.wnext,k.wsize-X):k.wnext-X,X>k.length&&(X=k.length),ce=k.window}else ce=Q,_e=Z-k.offset,X=k.length;for(ue<X&&(X=ue),ue-=X,k.length-=X;Q[Z++]=ce[_e++],--X;);k.length===0&&(k.mode=21);break;case 26:if(ue===0)break e;Q[Z++]=k.length,ue--,k.mode=21;break;case 27:if(k.wrap){for(;W<32;){if(q===0)break e;q--,U|=F[$++]<<W,W+=8}if(B-=ue,T.total_out+=B,k.total+=B,B&&(T.adler=k.check=k.flags?l(k.check,Q,B,Z-B):a(k.check,Q,B,Z-B)),B=ue,(k.flags?U:b(U))!==k.check){T.msg="incorrect data check",k.mode=30;break}W=U=0}k.mode=28;case 28:if(k.wrap&&k.flags){for(;W<32;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(U!==(4294967295&k.total)){T.msg="incorrect length check",k.mode=30;break}W=U=0}k.mode=29;case 29:K=1;break e;case 30:K=-3;break e;case 31:return-4;default:return h}return T.next_out=Z,T.avail_out=ue,T.next_in=$,T.avail_in=q,k.hold=U,k.bits=W,(k.wsize||B!==T.avail_out&&k.mode<30&&(k.mode<27||D!==4))&&G(T,T.output,T.next_out,B-T.avail_out)?(k.mode=31,-4):(ae-=T.avail_in,B-=T.avail_out,T.total_in+=ae,T.total_out+=B,k.total+=B,k.wrap&&B&&(T.adler=k.check=k.flags?l(k.check,Q,B,T.next_out-B):a(k.check,Q,B,T.next_out-B)),T.data_type=k.bits+(k.last?64:0)+(k.mode===12?128:0)+(k.mode===20||k.mode===15?256:0),(ae==0&&B===0||D===4)&&K===m&&(K=-5),K)},o.inflateEnd=function(T){if(!T||!T.state)return h;var D=T.state;return D.window&&(D.window=null),T.state=null,m},o.inflateGetHeader=function(T,D){var k;return T&&T.state?(2&(k=T.state).wrap)==0?h:((k.head=D).done=!1,m):h},o.inflateSetDictionary=function(T,D){var k,F=D.length;return T&&T.state?(k=T.state).wrap!==0&&k.mode!==11?h:k.mode===11&&a(1,D,F,0)!==k.check?-3:G(T,D,F,F)?(k.mode=31,-4):(k.havedict=1,m):h},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,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];r.exports=function(d,f,m,h,v,g,x,b){var y,_,j,S,E,C,A,I,P,G=b.bits,T=0,D=0,k=0,F=0,Q=0,$=0,Z=0,q=0,ue=0,U=0,W=null,ae=0,B=new i.Buf16(16),X=new i.Buf16(16),_e=null,ce=0;for(T=0;T<=15;T++)B[T]=0;for(D=0;D<h;D++)B[f[m+D]]++;for(Q=G,F=15;1<=F&&B[F]===0;F--);if(F<Q&&(Q=F),F===0)return v[g++]=20971520,v[g++]=20971520,b.bits=1,0;for(k=1;k<F&&B[k]===0;k++);for(Q<k&&(Q=k),T=q=1;T<=15;T++)if(q<<=1,(q-=B[T])<0)return-1;if(0<q&&(d===0||F!==1))return-1;for(X[1]=0,T=1;T<15;T++)X[T+1]=X[T]+B[T];for(D=0;D<h;D++)f[m+D]!==0&&(x[X[f[m+D]]++]=D);if(C=d===0?(W=_e=x,19):d===1?(W=a,ae-=257,_e=l,ce-=257,256):(W=c,_e=u,-1),T=k,E=g,Z=D=U=0,j=-1,S=(ue=1<<($=Q))-1,d===1&&852<ue||d===2&&592<ue)return 1;for(;;){for(A=T-Z,P=x[D]<C?(I=0,x[D]):x[D]>C?(I=_e[ce+x[D]],W[ae+x[D]]):(I=96,0),y=1<<T-Z,k=_=1<<$;v[E+(U>>Z)+(_-=y)]=A<<24|I<<16|P|0,_!==0;);for(y=1<<T-1;U&y;)y>>=1;if(y!==0?(U&=y-1,U+=y):U=0,D++,--B[T]==0){if(T===F)break;T=f[m+x[D]]}if(Q<T&&(U&S)!==j){for(Z===0&&(Z=Q),E+=k,q=1<<($=T-Z);$+Z<F&&!((q-=B[$+Z])<=0);)$++,q<<=1;if(ue+=1<<$,d===1&&852<ue||d===2&&592<ue)return 1;v[j=U&S]=Q<<24|$<<16|E-g|0}}return U!==0&&(v[E+U]=T-Z<<24|64<<16|0),b.bits=Q,0}},{"../utils/common":41}],51:[function(n,r,o){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,o){var i=n("../utils/common"),a=0,l=1;function c(R){for(var M=R.length;0<=--M;)R[M]=0}var u=0,d=29,f=256,m=f+1+d,h=30,v=19,g=2*m+1,x=15,b=16,y=7,_=256,j=16,S=17,E=18,C=[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],A=[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],I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G=new Array(2*(m+2));c(G);var T=new Array(2*h);c(T);var D=new Array(512);c(D);var k=new Array(256);c(k);var F=new Array(d);c(F);var Q,$,Z,q=new Array(h);function ue(R,M,re,ne,V){this.static_tree=R,this.extra_bits=M,this.extra_base=re,this.elems=ne,this.max_length=V,this.has_stree=R&&R.length}function U(R,M){this.dyn_tree=R,this.max_code=0,this.stat_desc=M}function W(R){return R<256?D[R]:D[256+(R>>>7)]}function ae(R,M){R.pending_buf[R.pending++]=255&M,R.pending_buf[R.pending++]=M>>>8&255}function B(R,M,re){R.bi_valid>b-re?(R.bi_buf|=M<<R.bi_valid&65535,ae(R,R.bi_buf),R.bi_buf=M>>b-R.bi_valid,R.bi_valid+=re-b):(R.bi_buf|=M<<R.bi_valid&65535,R.bi_valid+=re)}function X(R,M,re){B(R,re[2*M],re[2*M+1])}function _e(R,M){for(var re=0;re|=1&R,R>>>=1,re<<=1,0<--M;);return re>>>1}function ce(R,M,re){var ne,V,oe=new Array(x+1),O=0;for(ne=1;ne<=x;ne++)oe[ne]=O=O+re[ne-1]<<1;for(V=0;V<=M;V++){var L=R[2*V+1];L!==0&&(R[2*V]=_e(oe[L]++,L))}}function xe(R){var M;for(M=0;M<m;M++)R.dyn_ltree[2*M]=0;for(M=0;M<h;M++)R.dyn_dtree[2*M]=0;for(M=0;M<v;M++)R.bl_tree[2*M]=0;R.dyn_ltree[2*_]=1,R.opt_len=R.static_len=0,R.last_lit=R.matches=0}function pe(R){8<R.bi_valid?ae(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 ge(R,M,re,ne){var V=2*M,oe=2*re;return R[V]<R[oe]||R[V]===R[oe]&&ne[M]<=ne[re]}function se(R,M,re){for(var ne=R.heap[re],V=re<<1;V<=R.heap_len&&(V<R.heap_len&&ge(M,R.heap[V+1],R.heap[V],R.depth)&&V++,!ge(M,ne,R.heap[V],R.depth));)R.heap[re]=R.heap[V],re=V,V<<=1;R.heap[re]=ne}function de(R,M,re){var ne,V,oe,O,L=0;if(R.last_lit!==0)for(;ne=R.pending_buf[R.d_buf+2*L]<<8|R.pending_buf[R.d_buf+2*L+1],V=R.pending_buf[R.l_buf+L],L++,ne===0?X(R,V,M):(X(R,(oe=k[V])+f+1,M),(O=C[oe])!==0&&B(R,V-=F[oe],O),X(R,oe=W(--ne),re),(O=A[oe])!==0&&B(R,ne-=q[oe],O)),L<R.last_lit;);X(R,_,M)}function be(R,M){var re,ne,V,oe=M.dyn_tree,O=M.stat_desc.static_tree,L=M.stat_desc.has_stree,te=M.stat_desc.elems,fe=-1;for(R.heap_len=0,R.heap_max=g,re=0;re<te;re++)oe[2*re]!==0?(R.heap[++R.heap_len]=fe=re,R.depth[re]=0):oe[2*re+1]=0;for(;R.heap_len<2;)oe[2*(V=R.heap[++R.heap_len]=fe<2?++fe:0)]=1,R.depth[V]=0,R.opt_len--,L&&(R.static_len-=O[2*V+1]);for(M.max_code=fe,re=R.heap_len>>1;1<=re;re--)se(R,oe,re);for(V=te;re=R.heap[1],R.heap[1]=R.heap[R.heap_len--],se(R,oe,1),ne=R.heap[1],R.heap[--R.heap_max]=re,R.heap[--R.heap_max]=ne,oe[2*V]=oe[2*re]+oe[2*ne],R.depth[V]=(R.depth[re]>=R.depth[ne]?R.depth[re]:R.depth[ne])+1,oe[2*re+1]=oe[2*ne+1]=V,R.heap[1]=V++,se(R,oe,1),2<=R.heap_len;);R.heap[--R.heap_max]=R.heap[1],(function(ie,Ce){var Ie,je,We,Be,bn,xr,kt=Ce.dyn_tree,_t=Ce.max_code,Ln=Ce.stat_desc.static_tree,Yo=Ce.stat_desc.has_stree,Ue=Ce.stat_desc.extra_bits,It=Ce.stat_desc.extra_base,tt=Ce.stat_desc.max_length,Yt=0;for(Be=0;Be<=x;Be++)ie.bl_count[Be]=0;for(kt[2*ie.heap[ie.heap_max]+1]=0,Ie=ie.heap_max+1;Ie<g;Ie++)tt<(Be=kt[2*kt[2*(je=ie.heap[Ie])+1]+1]+1)&&(Be=tt,Yt++),kt[2*je+1]=Be,_t<je||(ie.bl_count[Be]++,bn=0,It<=je&&(bn=Ue[je-It]),xr=kt[2*je],ie.opt_len+=xr*(Be+bn),Yo&&(ie.static_len+=xr*(Ln[2*je+1]+bn)));if(Yt!==0){do{for(Be=tt-1;ie.bl_count[Be]===0;)Be--;ie.bl_count[Be]--,ie.bl_count[Be+1]+=2,ie.bl_count[tt]--,Yt-=2}while(0<Yt);for(Be=tt;Be!==0;Be--)for(je=ie.bl_count[Be];je!==0;)_t<(We=ie.heap[--Ie])||(kt[2*We+1]!==Be&&(ie.opt_len+=(Be-kt[2*We+1])*kt[2*We],kt[2*We+1]=Be),je--)}})(R,M),ce(oe,fe,R.bl_count)}function w(R,M,re){var ne,V,oe=-1,O=M[1],L=0,te=7,fe=4;for(O===0&&(te=138,fe=3),M[2*(re+1)+1]=65535,ne=0;ne<=re;ne++)V=O,O=M[2*(ne+1)+1],++L<te&&V===O||(L<fe?R.bl_tree[2*V]+=L:V!==0?(V!==oe&&R.bl_tree[2*V]++,R.bl_tree[2*j]++):L<=10?R.bl_tree[2*S]++:R.bl_tree[2*E]++,oe=V,fe=(L=0)===O?(te=138,3):V===O?(te=6,3):(te=7,4))}function K(R,M,re){var ne,V,oe=-1,O=M[1],L=0,te=7,fe=4;for(O===0&&(te=138,fe=3),ne=0;ne<=re;ne++)if(V=O,O=M[2*(ne+1)+1],!(++L<te&&V===O)){if(L<fe)for(;X(R,V,R.bl_tree),--L!=0;);else V!==0?(V!==oe&&(X(R,V,R.bl_tree),L--),X(R,j,R.bl_tree),B(R,L-3,2)):L<=10?(X(R,S,R.bl_tree),B(R,L-3,3)):(X(R,E,R.bl_tree),B(R,L-11,7));oe=V,fe=(L=0)===O?(te=138,3):V===O?(te=6,3):(te=7,4)}}c(q);var H=!1;function z(R,M,re,ne){B(R,(u<<1)+(ne?1:0),3),(function(V,oe,O,L){pe(V),ae(V,O),ae(V,~O),i.arraySet(V.pending_buf,V.window,oe,O,V.pending),V.pending+=O})(R,M,re)}o._tr_init=function(R){H||((function(){var M,re,ne,V,oe,O=new Array(x+1);for(V=ne=0;V<d-1;V++)for(F[V]=ne,M=0;M<1<<C[V];M++)k[ne++]=V;for(k[ne-1]=V,V=oe=0;V<16;V++)for(q[V]=oe,M=0;M<1<<A[V];M++)D[oe++]=V;for(oe>>=7;V<h;V++)for(q[V]=oe<<7,M=0;M<1<<A[V]-7;M++)D[256+oe++]=V;for(re=0;re<=x;re++)O[re]=0;for(M=0;M<=143;)G[2*M+1]=8,M++,O[8]++;for(;M<=255;)G[2*M+1]=9,M++,O[9]++;for(;M<=279;)G[2*M+1]=7,M++,O[7]++;for(;M<=287;)G[2*M+1]=8,M++,O[8]++;for(ce(G,m+1,O),M=0;M<h;M++)T[2*M+1]=5,T[2*M]=_e(M,5);Q=new ue(G,C,f+1,m,x),$=new ue(T,A,0,h,x),Z=new ue(new Array(0),I,0,v,y)})(),H=!0),R.l_desc=new U(R.dyn_ltree,Q),R.d_desc=new U(R.dyn_dtree,$),R.bl_desc=new U(R.bl_tree,Z),R.bi_buf=0,R.bi_valid=0,xe(R)},o._tr_stored_block=z,o._tr_flush_block=function(R,M,re,ne){var V,oe,O=0;0<R.level?(R.strm.data_type===2&&(R.strm.data_type=(function(L){var te,fe=4093624447;for(te=0;te<=31;te++,fe>>>=1)if(1&fe&&L.dyn_ltree[2*te]!==0)return a;if(L.dyn_ltree[18]!==0||L.dyn_ltree[20]!==0||L.dyn_ltree[26]!==0)return l;for(te=32;te<f;te++)if(L.dyn_ltree[2*te]!==0)return l;return a})(R)),be(R,R.l_desc),be(R,R.d_desc),O=(function(L){var te;for(w(L,L.dyn_ltree,L.l_desc.max_code),w(L,L.dyn_dtree,L.d_desc.max_code),be(L,L.bl_desc),te=v-1;3<=te&&L.bl_tree[2*P[te]+1]===0;te--);return L.opt_len+=3*(te+1)+5+5+4,te})(R),V=R.opt_len+3+7>>>3,(oe=R.static_len+3+7>>>3)<=V&&(V=oe)):V=oe=re+5,re+4<=V&&M!==-1?z(R,M,re,ne):R.strategy===4||oe===V?(B(R,2+(ne?1:0),3),de(R,G,T)):(B(R,4+(ne?1:0),3),(function(L,te,fe,ie){var Ce;for(B(L,te-257,5),B(L,fe-1,5),B(L,ie-4,4),Ce=0;Ce<ie;Ce++)B(L,L.bl_tree[2*P[Ce]+1],3);K(L,L.dyn_ltree,te-1),K(L,L.dyn_dtree,fe-1)})(R,R.l_desc.max_code+1,R.d_desc.max_code+1,O+1),de(R,R.dyn_ltree,R.dyn_dtree)),xe(R),ne&&pe(R)},o._tr_tally=function(R,M,re){return R.pending_buf[R.d_buf+2*R.last_lit]=M>>>8&255,R.pending_buf[R.d_buf+2*R.last_lit+1]=255&M,R.pending_buf[R.l_buf+R.last_lit]=255&re,R.last_lit++,M===0?R.dyn_ltree[2*re]++:(R.matches++,M--,R.dyn_ltree[2*(k[re]+f+1)]++,R.dyn_dtree[2*W(M)]++),R.last_lit===R.lit_bufsize-1},o._tr_align=function(R){B(R,2,3),X(R,_,G),(function(M){M.bi_valid===16?(ae(M,M.bi_buf),M.bi_buf=0,M.bi_valid=0):8<=M.bi_valid&&(M.pending_buf[M.pending++]=255&M.bi_buf,M.bi_buf>>=8,M.bi_valid-=8)})(R)}},{"../utils/common":41}],53:[function(n,r,o){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,o){(function(i){(function(a,l){if(!a.setImmediate){var c,u,d,f,m=1,h={},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",_,!1):a.attachEvent("onmessage",_),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),E=0;E<S.length;E++)S[E]=arguments[E+1];var C={callback:j,args:S};return h[m]=C,c(m),m++},x.clearImmediate=b}function b(j){delete h[j]}function y(j){if(v)setTimeout(y,0,j);else{var S=h[j];if(S){v=!0;try{(function(E){var C=E.callback,A=E.args;switch(A.length){case 0:C();break;case 1:C(A[0]);break;case 2:C(A[0],A[1]);break;case 3:C(A[0],A[1],A[2]);break;default:C.apply(l,A)}})(S)}finally{b(j),v=!1}}}}function _(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 rs<"u"?rs:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ti)),ti.exports}var Sw=jw();const Cw=ug(Sw),Nw="3.0.0",Vi={version:Nw},hf="[REDACTED]",Tw=/(^|[-_])(api[-_]?key|authorization|cookie|token|secret|password|access[-_]?token|refresh[-_]?token)([-_]|$)/i,Ew=[/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],hc=200,Aw=25e6,mf=50;function Rw(e){return e<1024?`${e} chars`:e<1024*1024?`${Math.ceil(e/1024)} KB`:`${Math.ceil(e/(1024*1024))} MB`}function Iw(e){let t=0;for(const n of e)t+=n.rawRequestBody?.length??0,t+=n.responseText?.length??0;return t}function zw(e){if(e.length>hc)return`Export is limited to ${hc} logs at once. Narrow the filter and try again.`;const t=Iw(e);return t>Aw?`Export is too large (${Rw(t)} of text). Narrow the filter and try again.`:null}async function Pw(e){try{const t=await fetch(`/api/logs/${e}/chunks`);if(!t.ok)return null;const n=await t.json();return JSON.stringify(n,null,2)}catch{return null}}function Ow(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function qi(e){if(Array.isArray(e))return e.map(n=>qi(n));if(!Ow(e))return e;const t={};for(const[n,r]of Object.entries(e))t[n]=Tw.test(n)?hf:qi(r);return t}function Mw(e){const t=n=>{let r=n;for(const o of Ew)r=r.replace(o,hf);return r};try{const n=JSON.parse(e);return t(JSON.stringify(qi(n),null,2))}catch{return t(e)}}function ni(e,t){return t==="redacted"?Mw(e):e}function Lw(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 Dw(e,t,n,r=new Date().toISOString()){return{version:Vi.version,exportedAt:r,mode:t,redacted:t==="redacted",logCount:e.length,logIds:e.map(o=>o.id),streamingChunkExportLimit:mf,streamingChunkLogIds:n.map(o=>o.id)}}async function $w(e,t="redacted"){const n=zw(e);if(n!==null)return{ok:!1,message:n};const r=new Cw,o=t==="redacted"?"redacted":"raw",i=e.filter(u=>u.streaming).slice(0,mf);r.file("manifest.json",JSON.stringify(Dw(e,t,i),null,2)),r.file("logs.json",JSON.stringify(e.map(u=>Lw(u,t)),null,2));for(const u of e)u.rawRequestBody!==null&&r.file(`#${u.id}.Request.json`,ni(u.rawRequestBody,t)),u.responseText!==null&&r.file(`#${u.id}.Response.json`,ni(u.responseText,t));for(const u of i){const d=await Pw(u.id);d!==null&&r.file(`#${u.id}.SSE.Response.json`,ni(d,t))}const a=await r.generateAsync({type:"blob"}),l=URL.createObjectURL(a),c=document.createElement("a");return c.href=l,c.download=`agent-inspector-export-${o}-${new Date().toISOString().slice(0,10)}.zip`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(l),{ok:!0}}function Fw(e,t){if(e!==null){e.removeAllRanges();for(const n of t)e.addRange(n)}}function Bw(e){if(e===null)return[];const t=[];for(let n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t}function Uw(e){if(typeof document>"u")return!1;const t=document.activeElement,n=document.getSelection(),r=Bw(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),Fw(n,r),typeof HTMLElement<"u"&&t instanceof HTMLElement&&t.focus({preventScroll:!0})}return i}async function Kt(e){const t=globalThis.navigator?.clipboard;if(t!==void 0)try{return await t.writeText(e),!0}catch{}return Uw(e)}function Gi(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 Qa(e,t,n){return`${Gi(e,n)} - ${Gi(t,n)}`}function cs(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ww(e){switch(e){case"end_turn":case"tool_use":return e;default:return null}}function Hw(e){switch(e){case"stop":case"length":return e;default:return null}}function Zw(e){switch(e){case"max_output_tokens":case"max_tokens":return!0;default:return!1}}function gf(e){if(e.responseText===null)return null;try{let t=JSON.parse(e.responseText);if(typeof t=="string"&&(t=JSON.parse(t)),!cs(t))return null;if(typeof t.stop_reason=="string")return Ww(t.stop_reason);if(Array.isArray(t.choices))for(const n of t.choices){if(!cs(n)||typeof n.finish_reason!="string")continue;const r=Hw(n.finish_reason);if(r!==null)return r}if(Array.isArray(t.output)){for(const n of t.output)if(cs(n)&&n.type==="function_call")return"tool_use";if(t.status==="completed")return"stop"}if(t.status==="incomplete"&&cs(t.incomplete_details)){const n=t.incomplete_details.reason;if(typeof n=="string"&&Zw(n))return"length"}return null}catch{return null}}function el(e){return e==="end_turn"||e==="stop"||e==="length"}function xf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=xf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bf(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=xf(e))&&(r&&(r+=" "),r+=t);return r}const Vw=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},qw=(e,t)=>({classGroupId:e,validator:t}),vf=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qs="-",mc=[],Gw="arbitrary..",Kw=e=>{const t=Yw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Jw(a);const l=a.split(qs),c=l[0]===""&&l.length>1?1:0;return yf(l,c,t)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=r[a],u=n[a];return c?u?Vw(u,c):c:u||mc}return n[a]||mc}}},yf=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const u=yf(e,t+1,i);if(u)return u}const a=n.validators;if(a===null)return;const l=t===0?e.join(qs):e.slice(t).join(qs),c=a.length;for(let u=0;u<c;u++){const d=a[u];if(d.validator(l))return d.classGroupId}},Jw=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Gw+r:void 0})(),Yw=e=>{const{theme:t,classGroups:n}=e;return Xw(n,t)},Xw=(e,t)=>{const n=vf();for(const r in e){const o=e[r];tl(o,n,r,t)}return n},tl=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];Qw(a,t,n,r)}},Qw=(e,t,n,r)=>{if(typeof e=="string"){ek(e,t,n);return}if(typeof e=="function"){tk(e,t,n,r);return}nk(e,t,n,r)},ek=(e,t,n)=>{const r=e===""?t:wf(t,e);r.classGroupId=n},tk=(e,t,n,r)=>{if(rk(e)){tl(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(qw(n,e))},nk=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[l,c]=o[a];tl(c,wf(t,l),n,r)}},wf=(e,t)=>{let n=e;const r=t.split(qs),o=r.length;for(let i=0;i<o;i++){const a=r[i];let l=n.nextPart.get(a);l||(l=vf(),n.nextPart.set(a,l)),n=l}return n},rk=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,sk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},Ki="!",gc=":",ok=[],xc=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),ik=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=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===gc){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 m=f,h=!1;f.endsWith(Ki)?(m=f.slice(0,-1),h=!0):f.startsWith(Ki)&&(m=f.slice(1),h=!0);const v=u&&u>c?u-c:void 0;return xc(i,h,m,v)};if(t){const o=t+gc,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):xc(ok,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},ak=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];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(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},lk=e=>({cache:sk(e.cacheSize),parseClassName:ik(e),sortModifiers:ak(e),...Kw(e)}),ck=/\s+/,uk=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],l=e.trim().split(ck);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:m,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:g}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let x=!!g,b=r(x?v.substring(0,g):v);if(!b){if(!x){c=d+(c.length>0?" "+c:c);continue}if(b=r(v),!b){c=d+(c.length>0?" "+c:c);continue}x=!1}const y=m.length===0?"":m.length===1?m[0]:i(m).join(":"),_=h?y+Ki:y,j=_+b;if(a.indexOf(j)>-1)continue;a.push(j);const S=o(b,x);for(let E=0;E<S.length;++E){const C=S[E];a.push(_+C)}c=d+(c.length>0?" "+c:c)}return c},dk=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=kf(n))&&(o&&(o+=" "),o+=r);return o},kf=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=kf(e[r]))&&(n&&(n+=" "),n+=t);return n},fk=(e,...t)=>{let n,r,o,i;const a=c=>{const u=t.reduce((d,f)=>f(d),e());return n=lk(u),r=n.cache.get,o=n.cache.set,i=l,l(c)},l=c=>{const u=r(c);if(u)return u;const d=uk(c,n);return o(c,d),d};return i=a,(...c)=>i(dk(...c))},pk=[],Ye=e=>{const t=n=>n[e]||pk;return t.isThemeGetter=!0,t},_f=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hk=/^\d+\/\d+$/,mk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gk=/\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$/,xk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,bk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dn=e=>hk.test(e),Re=e=>!!e&&!Number.isNaN(Number(e)),Xt=e=>!!e&&Number.isInteger(Number(e)),ri=e=>e.endsWith("%")&&Re(e.slice(0,-1)),Wt=e=>mk.test(e),yk=()=>!0,wk=e=>gk.test(e)&&!xk.test(e),Sf=()=>!1,kk=e=>bk.test(e),_k=e=>vk.test(e),jk=e=>!ve(e)&&!ye(e),Sk=e=>fr(e,Tf,Sf),ve=e=>_f.test(e),vn=e=>fr(e,Ef,wk),si=e=>fr(e,Ak,Re),bc=e=>fr(e,Cf,Sf),Ck=e=>fr(e,Nf,_k),us=e=>fr(e,Af,kk),ye=e=>jf.test(e),br=e=>pr(e,Ef),Nk=e=>pr(e,Rk),vc=e=>pr(e,Cf),Tk=e=>pr(e,Tf),Ek=e=>pr(e,Nf),ds=e=>pr(e,Af,!0),fr=(e,t,n)=>{const r=_f.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},pr=(e,t,n=!1)=>{const r=jf.exec(e);return r?r[1]?t(r[1]):n:!1},Cf=e=>e==="position"||e==="percentage",Nf=e=>e==="image"||e==="url",Tf=e=>e==="length"||e==="size"||e==="bg-size",Ef=e=>e==="length",Ak=e=>e==="number",Rk=e=>e==="family-name",Af=e=>e==="shadow",Ik=()=>{const e=Ye("color"),t=Ye("font"),n=Ye("text"),r=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"),m=Ye("text-shadow"),h=Ye("drop-shadow"),v=Ye("blur"),g=Ye("perspective"),x=Ye("aspect"),b=Ye("ease"),y=Ye("animate"),_=()=>["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(),ye,ve],E=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],A=()=>[ye,ve,c],I=()=>[Dn,"full","auto",...A()],P=()=>[Xt,"none","subgrid",ye,ve],G=()=>["auto",{span:["full",Xt,ye,ve]},Xt,ye,ve],T=()=>[Xt,"auto",ye,ve],D=()=>["auto","min","max","fr",ye,ve],k=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],Q=()=>["auto",...A()],$=()=>[Dn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],Z=()=>[e,ye,ve],q=()=>[...j(),vc,bc,{position:[ye,ve]}],ue=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",Tk,Sk,{size:[ye,ve]}],W=()=>[ri,br,vn],ae=()=>["","none","full",u,ye,ve],B=()=>["",Re,br,vn],X=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>[Re,ri,vc,bc],xe=()=>["","none",v,ye,ve],pe=()=>["none",Re,ye,ve],ge=()=>["none",Re,ye,ve],se=()=>[Re,ye,ve],de=()=>[Dn,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Wt],breakpoint:[Wt],color:[yk],container:[Wt],"drop-shadow":[Wt],ease:["in","out","in-out"],font:[jk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Wt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Wt],shadow:[Wt],spacing:["px",Re],text:[Wt],"text-shadow":[Wt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Dn,ve,ye,x]}],container:["container"],columns:[{columns:[Re,ve,ye,l]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Xt,"auto",ye,ve]}],basis:[{basis:[Dn,"full","auto",l,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,Dn,"auto","initial","none",ve]}],grow:[{grow:["",Re,ye,ve]}],shrink:[{shrink:["",Re,ye,ve]}],order:[{order:[Xt,"first","last","none",ye,ve]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...k(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...k()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"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,br,vn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ye,si]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ri,ve]}],"font-family":[{font:[Nk,ve,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,ye,ve]}],"line-clamp":[{"line-clamp":[Re,"none",ye,si]}],leading:[{leading:[i,...A()]}],"list-image":[{"list-image":["none",ye,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",ye,vn]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[Re,"auto",ye,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ve]}],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",ye,ve]}],"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:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Xt,ye,ve],radial:["",ye,ve],conic:[Xt,ye,ve]},Ek,Ck]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,ye,ve]}],"outline-w":[{outline:["",Re,br,vn]}],"outline-color":[{outline:Z()}],shadow:[{shadow:["","none",d,ds,us]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",f,ds,us]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[Re,vn]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":Z()}],"text-shadow":[{"text-shadow":["none",m,ds,us]}],"text-shadow-color":[{"text-shadow":Z()}],opacity:[{opacity:[Re,ye,ve]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"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":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":Z()}],"mask-image-linear-to-color":[{"mask-linear-to":Z()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":Z()}],"mask-image-t-to-color":[{"mask-t-to":Z()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":Z()}],"mask-image-r-to-color":[{"mask-r-to":Z()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":Z()}],"mask-image-b-to-color":[{"mask-b-to":Z()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":Z()}],"mask-image-l-to-color":[{"mask-l-to":Z()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":Z()}],"mask-image-x-to-color":[{"mask-x-to":Z()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":Z()}],"mask-image-y-to-color":[{"mask-y-to":Z()}],"mask-image-radial":[{"mask-radial":[ye,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":Z()}],"mask-image-radial-to-color":[{"mask-radial-to":Z()}],"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":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":Z()}],"mask-image-conic-to-color":[{"mask-conic-to":Z()}],"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:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ve]}],filter:[{filter:["","none",ye,ve]}],blur:[{blur:xe()}],brightness:[{brightness:[Re,ye,ve]}],contrast:[{contrast:[Re,ye,ve]}],"drop-shadow":[{"drop-shadow":["","none",h,ds,us]}],"drop-shadow-color":[{"drop-shadow":Z()}],grayscale:[{grayscale:["",Re,ye,ve]}],"hue-rotate":[{"hue-rotate":[Re,ye,ve]}],invert:[{invert:["",Re,ye,ve]}],saturate:[{saturate:[Re,ye,ve]}],sepia:[{sepia:["",Re,ye,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ve]}],"backdrop-blur":[{"backdrop-blur":xe()}],"backdrop-brightness":[{"backdrop-brightness":[Re,ye,ve]}],"backdrop-contrast":[{"backdrop-contrast":[Re,ye,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,ye,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,ye,ve]}],"backdrop-invert":[{"backdrop-invert":["",Re,ye,ve]}],"backdrop-opacity":[{"backdrop-opacity":[Re,ye,ve]}],"backdrop-saturate":[{"backdrop-saturate":[Re,ye,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,ye,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",ye,ve]}],ease:[{ease:["linear","initial",b,ye,ve]}],delay:[{delay:[Re,ye,ve]}],animate:[{animate:["none",y,ye,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,ye,ve]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[ye,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"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",ye,ve]}],"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":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",ye,ve]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[Re,br,vn,si]}],stroke:[{stroke:["none",...Z()]}],"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"]}},zk=fk(Ik);function le(...e){return zk(bf(e))}function De(e){return e>=1e6?(e/1e6).toFixed(1).replace(/\.0$/,"")+"M":(e/1e3).toFixed(1).replace(/\.0$/,"")+"K"}function Rf(e){return e>=1024*1024?(e/(1024*1024)).toFixed(1).replace(/\.0$/,"")+"M":(e/1024).toFixed(1).replace(/\.0$/,"")+"K"}function yc(e,t,n){const r=e*10;return!Number.isSafeInteger(r)||r%t!==0?null:(r/t/10).toFixed(1).replace(/\.0$/,"")+n}function Pk(e){if(!Number.isSafeInteger(e)||e<=0)return e.toString();if(e>=1024*1024){const n=yc(e,1048576,"M");if(n!==null)return n}const t=yc(e,1024,"K");return t!==null?t:e.toString()}function Ok(e){if(e===void 0||e==="")return 1;switch(e.toLowerCase()){case"k":return 1024;case"m":return 1024*1024;default:return null}}function Gs(e){const t=e.trim().replaceAll(",","");if(t==="")return null;const n=/^(\d+(?:\.\d+)?)\s*([kKmM])?$/.exec(t);if(n===null)return null;const r=n[1];if(r===void 0)return null;const o=Number(r),i=n[2],a=Ok(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 Mk(e){return e===null?"pending":e>=200&&e<300?"success":e>=400&&e<500?"client_error":e>=500?"server_error":"pending"}const Lk=Y({model:N().min(1),contextWindow:J().int().positive().optional(),outputLimit:J().int().positive().optional(),source:Ee(["manual","registry"]).optional(),sourceUrl:N().optional(),updatedAt:N().optional()}),Ks=Y({id:N(),name:N(),apiKey:N(),model:N().optional(),models:me(N()).min(1),format:Ee(["anthropic","openai"]).optional(),baseUrl:N().optional(),anthropicBaseUrl:N().optional(),openaiBaseUrl:N().optional(),openaiResponsesBaseUrl:N().optional(),authHeader:Ee(["bearer","x-api-key"]).optional().default("bearer"),apiDocsUrl:N().optional(),modelMetadataUrl:N().optional(),modelMetadata:me(Lk).optional(),source:Ee(["company","personal"]).optional(),createdAt:N(),updatedAt:N()});async function Dk(e){return cn(e,Ks.array(),void 0,t=>`Failed to fetch ${e}: ${t.status}`)}function If(){const e=In("/api/providers?includeSecrets=1",Dk,{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 wc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zf(...e){return t=>{let n=!1;const r=e.map(o=>{const i=wc(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():wc(e[o],null)}}}}function Le(...e){return p.useCallback(zf(...e),e)}function $k(e,t){const n=p.createContext(t),r=i=>{const{children:a,...l}=i,c=p.useMemo(()=>l,Object.values(l));return s.jsx(n.Provider,{value:c,children:a})};r.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[r,o]}function Jt(e,t=[]){let n=[];function r(i,a){const l=p.createContext(a),c=n.length;n=[...n,a];const u=f=>{const{scope:m,children:h,...v}=f,g=m?.[e]?.[c]||l,x=p.useMemo(()=>v,Object.values(v));return s.jsx(g.Provider,{value:x,children:h})};u.displayName=i+"Provider";function d(f,m){const h=m?.[e]?.[c]||l,v=p.useContext(h);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,[r,Fk(o,...t)]}function Fk(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.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 Qe=globalThis?.document?p.useLayoutEffect:()=>{},Bk=rd[" useId ".trim().toString()]||(()=>{}),Uk=0;function Mt(e){const[t,n]=p.useState(Bk());return Qe(()=>{n(r=>r??String(Uk++))},[e]),e||(t?`radix-${t}`:"")}var Wk=rd[" useInsertionEffect ".trim().toString()]||Qe;function Nn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=Hk({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(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const u=p.useCallback(d=>{if(l){const f=Zk(d)?d(e):d;f!==e&&a.current?.(f)}else i(d)},[l,e,i,a]);return[c,u]}function Hk({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),o=p.useRef(n),i=p.useRef(t);return Wk(()=>{i.current=t},[t]),p.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function Zk(e){return typeof e=="function"}function ir(e){const t=qk(e),n=p.forwardRef((r,o)=>{const{children:i,...a}=r,l=p.Children.toArray(i),c=l.find(Kk);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 s.jsx(t,{...a,ref:o,children:p.isValidElement(u)?p.cloneElement(u,void 0,d):null})}return s.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var Vk=ir("Slot");function qk(e){const t=p.forwardRef((n,r)=>{const{children:o,...i}=n;if(p.isValidElement(o)){const a=Yk(o),l=Jk(i,o.props);return o.type!==p.Fragment&&(l.ref=r?zf(r,a):a),p.cloneElement(o,l)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pf=Symbol("radix.slottable");function Gk(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Pf,t}function Kk(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pf}function Jk(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const c=i(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Yk(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 Xk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=Xk.reduce((e,t)=>{const n=ir(`Primitive.${t}`),r=p.forwardRef((o,i)=>{const{asChild:a,...l}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Qk(e,t){e&&Hr.flushSync(()=>e.dispatchEvent(t))}function it(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>t.current?.(...n),[])}function e_(e,t=globalThis?.document){const n=it(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var t_="DismissableLayer",Ji="dismissableLayer.update",n_="dismissableLayer.pointerDownOutside",r_="dismissableLayer.focusOutside",kc,Of=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),No=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...c}=e,u=p.useContext(Of),[d,f]=p.useState(null),m=d?.ownerDocument??globalThis?.document,[,h]=p.useState({}),v=Le(t,C=>f(C)),g=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(x),y=d?g.indexOf(d):-1,_=u.layersWithOutsidePointerEventsDisabled.size>0,j=y>=b,S=i_(C=>{const A=C.target,I=[...u.branches].some(P=>P.contains(A));!j||I||(o?.(C),a?.(C),C.defaultPrevented||l?.())},m),E=a_(C=>{const A=C.target;[...u.branches].some(P=>P.contains(A))||(i?.(C),a?.(C),C.defaultPrevented||l?.())},m);return e_(C=>{y===u.layers.size-1&&(r?.(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},m),p.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(kc=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),_c(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=kc)}},[d,m,n,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),_c())},[d,u]),p.useEffect(()=>{const C=()=>h({});return document.addEventListener(Ji,C),()=>document.removeEventListener(Ji,C)},[]),s.jsx(Ae.div,{...c,ref:v,style:{pointerEvents:_?j?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,S.onPointerDownCapture)})});No.displayName=t_;var s_="DismissableLayerBranch",o_=p.forwardRef((e,t)=>{const n=p.useContext(Of),r=p.useRef(null),o=Le(t,r);return p.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),s.jsx(Ae.div,{...e,ref:o})});o_.displayName=s_;function i_(e,t=globalThis?.document){const n=it(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){Mf(n_,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function a_(e,t=globalThis?.document){const n=it(e),r=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!r.current&&Mf(r_,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function _c(){const e=new CustomEvent(Ji);document.dispatchEvent(e)}function Mf(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Qk(o,i):o.dispatchEvent(i)}var oi="focusScope.autoFocusOnMount",ii="focusScope.autoFocusOnUnmount",jc={bubbles:!1,cancelable:!0},l_="FocusScope",nl=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,c]=p.useState(null),u=it(o),d=it(i),f=p.useRef(null),m=Le(t,g=>c(g)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let g=function(_){if(h.paused||!l)return;const j=_.target;l.contains(j)?f.current=j:nn(f.current,{select:!0})},x=function(_){if(h.paused||!l)return;const j=_.relatedTarget;j!==null&&(l.contains(j)||nn(f.current,{select:!0}))},b=function(_){if(document.activeElement===document.body)for(const S of _)S.removedNodes.length>0&&nn(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()}}},[r,l,h.paused]),p.useEffect(()=>{if(l){Cc.add(h);const g=document.activeElement;if(!l.contains(g)){const b=new CustomEvent(oi,jc);l.addEventListener(oi,u),l.dispatchEvent(b),b.defaultPrevented||(c_(h_(Lf(l)),{select:!0}),document.activeElement===g&&nn(l))}return()=>{l.removeEventListener(oi,u),setTimeout(()=>{const b=new CustomEvent(ii,jc);l.addEventListener(ii,d),l.dispatchEvent(b),b.defaultPrevented||nn(g??document.body,{select:!0}),l.removeEventListener(ii,d),Cc.remove(h)},0)}}},[l,u,d,h]);const v=p.useCallback(g=>{if(!n&&!r||h.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(x&&b){const y=g.currentTarget,[_,j]=u_(y);_&&j?!g.shiftKey&&b===j?(g.preventDefault(),n&&nn(_,{select:!0})):g.shiftKey&&b===_&&(g.preventDefault(),n&&nn(j,{select:!0})):b===y&&g.preventDefault()}},[n,r,h.paused]);return s.jsx(Ae.div,{tabIndex:-1,...a,ref:m,onKeyDown:v})});nl.displayName=l_;function c_(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(nn(r,{select:t}),document.activeElement!==n)return}function u_(e){const t=Lf(e),n=Sc(t,e),r=Sc(t.reverse(),e);return[n,r]}function Lf(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Sc(e,t){for(const n of e)if(!d_(n,{upTo:t}))return n}function d_(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 f_(e){return e instanceof HTMLInputElement&&"select"in e}function nn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&f_(e)&&t&&e.select()}}var Cc=p_();function p_(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Nc(e,t),e.unshift(t)},remove(t){e=Nc(e,t),e[0]?.resume()}}}function Nc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function h_(e){return e.filter(t=>t.tagName!=="A")}var m_="Portal",To=p.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=p.useState(!1);Qe(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?dg.createPortal(s.jsx(Ae.div,{...r,ref:t}),a):null});To.displayName=m_;function g_(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var vt=e=>{const{present:t,children:n}=e,r=x_(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=Le(r.ref,b_(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};vt.displayName="Presence";function x_(e){const[t,n]=p.useState(),r=p.useRef(null),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[l,c]=g_(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=fs(r.current);i.current=l==="mounted"?u:"none"},[l]),Qe(()=>{const u=r.current,d=o.current;if(d!==e){const m=i.current,h=fs(u);e?c("MOUNT"):h==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Qe(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=h=>{const g=fs(r.current).includes(CSS.escape(h.animationName));if(h.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)})}},m=h=>{h.target===t&&(i.current=fs(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function fs(e){return e?.animationName||"none"}function b_(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 ai=0;function Df(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Tc()),document.body.insertAdjacentElement("beforeend",e[1]??Tc()),ai++,()=>{ai===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ai--}},[])}function Tc(){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 zt=function(){return zt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},zt.apply(this,arguments)};function $f(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function v_(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var zs="right-scroll-bar-position",Ps="width-before-scroll-bar",y_="with-scroll-bars-hidden",w_="--removed-body-scroll-bar-size";function li(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function k_(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var __=typeof window<"u"?p.useLayoutEffect:p.useEffect,Ec=new WeakMap;function j_(e,t){var n=k_(null,function(r){return e.forEach(function(o){return li(o,r)})});return __(function(){var r=Ec.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(l){i.has(l)||li(l,null)}),i.forEach(function(l){o.has(l)||li(l,a)})}Ec.set(n,e)},[e]),n}function S_(e){return e}function C_(e,t){t===void 0&&(t=S_);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!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 N_(e){e===void 0&&(e={});var t=C_(null);return t.options=zt({async:!0,ssr:!1},e),t}var Ff=function(e){var t=e.sideCar,n=$f(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,zt({},n))};Ff.isSideCarExport=!0;function T_(e,t){return e.useMedium(t),Ff}var Bf=N_(),ci=function(){},Eo=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:ci,onWheelCapture:ci,onTouchMoveCapture:ci}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,h=e.noRelative,v=e.noIsolation,g=e.inert,x=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,_=e.gapMode,j=$f(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,E=j_([n,t]),C=zt(zt({},j),o);return p.createElement(p.Fragment,null,d&&p.createElement(S,{sideCar:Bf,removeScrollBar:u,shards:f,noRelative:h,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:_}),a?p.cloneElement(p.Children.only(l),zt(zt({},C),{ref:E})):p.createElement(y,zt({},C,{className:c,ref:E}),l))});Eo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Eo.classNames={fullWidth:Ps,zeroRight:zs};var E_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function A_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=E_();return t&&e.setAttribute("nonce",t),e}function R_(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function I_(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var z_=function(){var e=0,t=null;return{add:function(n){e==0&&(t=A_())&&(R_(t,n),I_(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},P_=function(){var e=z_();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Uf=function(){var e=P_(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},O_={left:0,top:0,right:0,gap:0},ui=function(e){return parseInt(e||"",10)||0},M_=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ui(n),ui(r),ui(o)]},L_=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return O_;var t=M_(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},D_=Uf(),Qn="data-scroll-locked",$_=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),`
41
+ \0`,B+=i(U,2),B+=E.magic,B+=i(_,2),B+=i(j,2),B+=i(ue.crc32,4),B+=i(ue.compressedSize,4),B+=i(ue.uncompressedSize,4),B+=i(A.length,2),B+=i(F.length,2),{fileRecord:f.LOCAL_FILE_HEADER+B+A+F,dirRecord:f.CENTRAL_FILE_HEADER+i(ae,2)+B+i(G.length,2)+"\0\0\0\0"+i(W,4)+i(x,4)+A+F+G}}var l=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),f=n("../signature");function m(h,v,g,x){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=g,this.encodeFileName=x,this.streamFiles=h,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(m,c),m.prototype.push=function(h){var v=h.meta.percent||0,g=this.entriesCount,x=this._sources.length;this.accumulate?this.contentBuffer.push(h):(this.bytesWritten+=h.data.length,c.prototype.push.call(this,{data:h.data,meta:{currentFile:this.currentFile,percent:g?(v+100*(g-x-1))/g:100}}))},m.prototype.openedSource=function(h){this.currentSourceOffset=this.bytesWritten,this.currentFile=h.file.name;var v=this.streamFiles&&!h.file.dir;if(v){var g=a(h,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(h){this.accumulate=!1;var v=this.streamFiles&&!h.file.dir,g=a(h,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)})(h),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var h=this.bytesWritten,v=0;v<this.dirRecords.length;v++)this.push({data:this.dirRecords[v],meta:{percent:100}});var g=this.bytesWritten-h,x=(function(b,y,_,j,S){var E=l.transformTo("string",S(j));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(b,2)+i(b,2)+i(y,4)+i(_,4)+i(E.length,2)+E})(this.dirRecords.length,g,h,this.zipComment,this.encodeFileName);this.push({data:x,meta:{percent:100}})},m.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},m.prototype.registerPrevious=function(h){this._sources.push(h);var v=this;return h.on("data",function(g){v.processChunk(g)}),h.on("end",function(){v.closedSource(v.previous.streamInfo),v._sources.length?v.prepareNextSource():v.end()}),h.on("error",function(g){v.error(g)}),this},m.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))},m.prototype.error=function(h){var v=this._sources;if(!c.prototype.error.call(this,h))return!1;for(var g=0;g<v.length;g++)try{v[g].error(h)}catch{}return!0},m.prototype.lock=function(){c.prototype.lock.call(this);for(var h=this._sources,v=0;v<h.length;v++)h[v].lock()},r.exports=m},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,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(m,h){f++;var v=(function(y,_){var j=y||_,S=i[j];if(!S)throw new Error(j+" is not a valid compression method !");return S})(h.options.compression,c.compression),g=h.options.compressionOptions||c.compressionOptions||{},x=h.dir,b=h.date;h._compressWorker(v,g).withStreamInfo("file",{name:m,dir:x,date:b,comment:h.comment||"",unixPermissions:h.unixPermissions,dosPermissions:h.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(m){d.error(m)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,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"),r.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,o){var i=n("./utils"),a=n("./external"),l=n("./utf8"),c=n("./zipEntries"),u=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function f(m){return new a.Promise(function(h,v){var g=m.decompressed.getContentWorker().pipe(new u);g.on("error",function(x){v(x)}).on("end",function(){g.streamInfo.crc32!==m.decompressed.crc32?v(new Error("Corrupted zip : CRC32 mismatch")):h()}).resume()})}r.exports=function(m,h){var v=this;return h=i.extend(h||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:l.utf8decode}),d.isNode&&d.isStream(m)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",m,!0,h.optimizedBinaryString,h.base64).then(function(g){var x=new c(h);return x.load(g),x}).then(function(g){var x=[a.Promise.resolve(g)],b=g.files;if(h.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 _=b[y],j=_.fileNameStr,S=i.resolve(_.fileNameStr);v.file(S,_.decompressed,{binary:!0,optimizedBinaryString:!0,date:_.date,dir:_.dir,comment:_.fileCommentStr.length?_.fileCommentStr:null,unixPermissions:_.unixPermissions,dosPermissions:_.dosPermissions,createFolders:h.createFolders}),_.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,r,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)},r.exports=l},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,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,m){d.push(f)||d._helper.pause(),u&&u(m)}).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()},r.exports=a},{"../utils":32,"readable-stream":16}],14:[function(n,r,o){r.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,r,o){function i(S,E,C){var A,I=l.getTypeOf(E),P=l.extend(C||{},d);P.date=P.date||new Date,P.compression!==null&&(P.compression=P.compression.toUpperCase()),typeof P.unixPermissions=="string"&&(P.unixPermissions=parseInt(P.unixPermissions,8)),P.unixPermissions&&16384&P.unixPermissions&&(P.dir=!0),P.dosPermissions&&16&P.dosPermissions&&(P.dir=!0),P.dir&&(S=b(S)),P.createFolders&&(A=x(S))&&y.call(this,A,!0);var G=I==="string"&&P.binary===!1&&P.base64===!1;C&&C.binary!==void 0||(P.binary=!G),(E instanceof f&&E.uncompressedSize===0||P.dir||!E||E.length===0)&&(P.base64=!1,P.binary=!0,E="",P.compression="STORE",I="string");var T=null;T=E instanceof f||E instanceof c?E:v.isNode&&v.isStream(E)?new g(S,E):l.prepareContent(S,E,P.binary,P.optimizedBinaryString,P.base64);var D=new m(S,T,P);this.files[S]=D}var a=n("./utf8"),l=n("./utils"),c=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),d=n("./defaults"),f=n("./compressedObject"),m=n("./zipObject"),h=n("./generate"),v=n("./nodejsUtils"),g=n("./nodejs/NodejsStreamInputAdapter"),x=function(S){S.slice(-1)==="/"&&(S=S.substring(0,S.length-1));var E=S.lastIndexOf("/");return 0<E?S.substring(0,E):""},b=function(S){return S.slice(-1)!=="/"&&(S+="/"),S},y=function(S,E){return E=E!==void 0?E:d.createFolders,S=b(S),this.files[S]||i.call(this,S,null,{dir:!0,createFolders:E}),this.files[S]};function _(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 E,C,A;for(E in this.files)A=this.files[E],(C=E.slice(this.root.length,E.length))&&E.slice(0,this.root.length)===this.root&&S(C,A)},filter:function(S){var E=[];return this.forEach(function(C,A){S(C,A)&&E.push(A)}),E},file:function(S,E,C){if(arguments.length!==1)return S=this.root+S,i.call(this,S,E,C),this;if(_(S)){var A=S;return this.filter(function(P,G){return!G.dir&&A.test(P)})}var I=this.files[this.root+S];return I&&!I.dir?I:null},folder:function(S){if(!S)return this;if(_(S))return this.filter(function(I,P){return P.dir&&S.test(I)});var E=this.root+S,C=y.call(this,E),A=this.clone();return A.root=C.name,A},remove:function(S){S=this.root+S;var E=this.files[S];if(E||(S.slice(-1)!=="/"&&(S+="/"),E=this.files[S]),E&&!E.dir)delete this.files[S];else for(var C=this.filter(function(I,P){return P.name.slice(0,S.length)===S}),A=0;A<C.length;A++)delete this.files[C[A].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 E,C={};try{if((C=l.extend(S||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:a.utf8encode})).type=C.type.toLowerCase(),C.compression=C.compression.toUpperCase(),C.type==="binarystring"&&(C.type="string"),!C.type)throw new Error("No output type specified.");l.checkSupport(C.type),C.platform!=="darwin"&&C.platform!=="freebsd"&&C.platform!=="linux"&&C.platform!=="sunos"||(C.platform="UNIX"),C.platform==="win32"&&(C.platform="DOS");var A=C.comment||this.comment||"";E=h.generateWorker(this,C,A)}catch(I){(E=new c("error")).error(I)}return new u(E,C.type||"string",C.mimeType)},generateAsync:function(S,E){return this.generateInternalStream(S).accumulate(E)},generateNodeStream:function(S,E){return(S=S||{}).type||(S.type="nodebuffer"),this.generateInternalStream(S).toNodejsStream(E)}};r.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,r,o){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,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),m=this.length-4;0<=m;--m)if(this.data[m]===c&&this.data[m+1]===u&&this.data[m+2]===d&&this.data[m+3]===f)return m-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),m=this.readData(4);return c===m[0]&&u===m[1]&&d===m[2]&&f===m[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},r.exports=a},{"../utils":32,"./DataReader":18}],18:[function(n,r,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))}},r.exports=a},{"../utils":32}],19:[function(n,r,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},r.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,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},r.exports=a},{"../utils":32,"./DataReader":18}],21:[function(n,r,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},r.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,o){var i=n("../utils"),a=n("../support"),l=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(f){var m=i.getTypeOf(f);return i.checkSupport(m),m!=="string"||a.uint8array?m==="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,r,o){o.LOCAL_FILE_HEADER="PK",o.CENTRAL_FILE_HEADER="PK",o.CENTRAL_DIRECTORY_END="PK",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,o){var 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})},r.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,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)},r.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,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)},r.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,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}})},r.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,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}},r.exports=i},{}],29:[function(n,r,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 m(v,g){return new d.Promise(function(x,b){var y=[],_=v._internalType,j=v._outputType,S=v._mimeType;v.on("data",function(E,C){y.push(E),g&&g(C)}).on("error",function(E){y=[],b(E)}).on("end",function(){try{var E=(function(C,A,I){switch(C){case"blob":return i.newBlob(i.transformTo("arraybuffer",A),I);case"base64":return c.encode(A);default:return i.transformTo(C,A)}})(j,(function(C,A){var I,P=0,G=null,T=0;for(I=0;I<A.length;I++)T+=A[I].length;switch(C){case"string":return A.join("");case"array":return Array.prototype.concat.apply([],A);case"uint8array":for(G=new Uint8Array(T),I=0;I<A.length;I++)G.set(A[I],P),P+=A[I].length;return G;case"nodebuffer":return Buffer.concat(A);default:throw new Error("concat : unsupported type '"+C+"'")}})(_,y),S);x(E)}catch(C){b(C)}y=[]}).resume()})}function h(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)}}h.prototype={accumulate:function(v){return m(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)}},r.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,o){if(o.base64=!0,o.array=!0,o.string=!0,o.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o.nodebuffer=typeof Buffer<"u",o.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")o.blob=!1;else{var 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,r,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 m(){c.call(this,"utf-8 encode")}o.utf8encode=function(h){return a.nodebuffer?l.newBufferFrom(h,"utf-8"):(function(v){var g,x,b,y,_,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=_=0;_<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[_++]=x:(x<2048?g[_++]=192|x>>>6:(x<65536?g[_++]=224|x>>>12:(g[_++]=240|x>>>18,g[_++]=128|x>>>12&63),g[_++]=128|x>>>6&63),g[_++]=128|63&x);return g})(h)},o.utf8decode=function(h){return a.nodebuffer?i.transformTo("nodebuffer",h).toString("utf-8"):(function(v){var g,x,b,y,_=v.length,j=new Array(2*_);for(g=x=0;g<_;)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<_;)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)})(h=i.transformTo(a.uint8array?"uint8array":"array",h))},i.inherits(f,c),f.prototype.processChunk=function(h){var v=i.transformTo(a.uint8array?"uint8array":"array",h.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,_){var j;for((_=_||y.length)>y.length&&(_=y.length),j=_-1;0<=j&&(192&y[j])==128;)j--;return j<0||j===0?_:j+u[y[j]]>_?j:_})(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:h.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(m,c),m.prototype.processChunk=function(h){this.push({data:o.utf8encode(h.data),meta:h.meta})},o.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,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=[],_=0,j=g.length;if(j<=b)return String.fromCharCode.apply(null,g);for(;_<j;)x==="array"||x==="nodebuffer"?y.push(String.fromCharCode.apply(null,g.slice(_,Math.min(_+b,j)))):y.push(String.fromCharCode.apply(null,g.subarray(_,Math.min(_+b,j)))),_+=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 m(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 h(g,x){for(var b=0;b<g.length;b++)x[b]=g[b];return x}o.applyFromCharCode=m;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:m,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 m(new Uint8Array(g))},array:function(g){return h(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:m,array:function(g){return h(g,new Array(g.length))},arraybuffer:function(g){return g.buffer},uint8array:u,nodebuffer:function(g){return l.newBufferFrom(g)}},v.nodebuffer={string:m,array:function(g){return h(g,new Array(g.length))},arraybuffer:function(g){return v.nodebuffer.uint8array(g).buffer},uint8array:function(g){return h(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 _=x[y];_==="."||_===""&&y!==0&&y!==x.length-1||(_===".."?b.pop():b.push(_))}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,_){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,E){var C=new FileReader;C.onload=function(A){S(A.target.result)},C.onerror=function(A){E(A.target.error)},C.readAsArrayBuffer(j)}):j}).then(function(j){var S=o.getTypeOf(j);return S?(S==="arraybuffer"?j=o.transformTo("uint8array",j):S==="string"&&(_?j=a.decode(j):b&&y!==!0&&(j=(function(E){return d(E,i.uint8array?new Uint8Array(E.length):new Array(E.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,r,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 m=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+a.pretty(m)+", expected "+a.pretty(f)+")")}},isSignature:function(f,m){var h=this.reader.index;this.reader.setIndex(f);var v=this.reader.readString(4)===m;return this.reader.setIndex(h),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),m=u.uint8array?"uint8array":"array",h=a.transformTo(m,f);this.zipComment=this.loadOptions.decodeFileName(h)},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,m,h,v=this.zip64EndOfCentralSize-44;0<v;)f=this.reader.readInt(2),m=this.reader.readInt(4),h=this.reader.readData(m),this.zip64ExtensibleData[f]={id:f,length:m,value:h}},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,m;for(f=0;f<this.files.length;f++)m=this.files[f],this.reader.setIndex(m.localHeaderOffset),this.checkSignature(l.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.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 m=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 h=this.centralDirOffset+this.centralDirSize;this.zip64&&(h+=20,h+=12+this.zip64EndOfCentralSize);var v=m-h;if(0<v)this.isSignature(m,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()}},r.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,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 m(h,v){this.options=h,this.loadOptions=v}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(h){var v,g;if(h.skip(22),this.fileNameLength=h.readInt(2),g=h.readInt(2),this.fileName=h.readData(this.fileNameLength),h.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,h.readData(this.compressedSize))},readCentralPart:function(h){this.versionMadeBy=h.readInt(2),h.skip(2),this.bitFlag=h.readInt(2),this.compressionMethod=h.readString(2),this.date=h.readDate(),this.crc32=h.readInt(4),this.compressedSize=h.readInt(4),this.uncompressedSize=h.readInt(4);var v=h.readInt(2);if(this.extraFieldsLength=h.readInt(2),this.fileCommentLength=h.readInt(2),this.diskNumberStart=h.readInt(2),this.internalFileAttributes=h.readInt(2),this.externalFileAttributes=h.readInt(4),this.localHeaderOffset=h.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");h.skip(v),this.readExtraFields(h),this.parseZIP64ExtraField(h),this.fileComment=h.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var h=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),h==0&&(this.dosPermissions=63&this.externalFileAttributes),h==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var h=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=h.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=h.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=h.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=h.readInt(4))}},readExtraFields:function(h){var v,g,x,b=h.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});h.index+4<b;)v=h.readInt(2),g=h.readInt(2),x=h.readData(g),this.extraFields[v]={id:v,length:g,value:x};h.setIndex(b)},handleUTF8:function(){var h=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(h,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(g)}var x=this.findExtraFieldUnicodeComment();if(x!==null)this.fileCommentStr=x;else{var b=a.transformTo(h,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(b)}}},findExtraFieldUnicodePath:function(){var h=this.extraFields[28789];if(h){var v=i(h.value);return v.readInt(1)!==1||c(this.fileName)!==v.readInt(4)?null:u.utf8decode(v.readData(h.length-5))}return null},findExtraFieldUnicodeComment:function(){var h=this.extraFields[25461];if(h){var v=i(h.value);return v.readInt(1)!==1||c(this.fileComment)!==v.readInt(4)?null:u.utf8decode(v.readData(h.length-5))}return null}},r.exports=m},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,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(_){(g=new d("error")).error(_)}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"],m=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<f.length;h++)i.prototype[f[h]]=m;r.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,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 m=new i.MessageChannel;m.port1.onmessage=v,a=function(){m.port2.postMessage(0)}}var h=[];function v(){var g,x;l=!0;for(var b=h.length;b;){for(x=h,h=[],g=-1;++g<b;)x[g]();b=h.length}l=!1}r.exports=function(g){h.push(g)!==1||l||a()}}).call(this,typeof rs<"u"?rs:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,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 m(b,y,_){this.promise=b,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof _=="function"&&(this.onRejected=_,this.callRejected=this.otherCallRejected)}function h(b,y,_){i(function(){var j;try{j=y(_)}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 _=!1;function j(C){_||(_=!0,l.reject(b,C))}function S(C){_||(_=!0,l.resolve(b,C))}var E=x(function(){y(S,j)});E.status==="error"&&j(E.value)}function x(b,y){var _={};try{_.value=b(y),_.status="success"}catch(j){_.status="error",_.value=j}return _}(r.exports=f).prototype.finally=function(b){if(typeof b!="function")return this;var y=this.constructor;return this.then(function(_){return y.resolve(b()).then(function(){return _})},function(_){return y.resolve(b()).then(function(){throw _})})},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 _=new this.constructor(a);return this.state!==d?h(_,this.state===u?b:y,this.outcome):this.queue.push(new m(_,b,y)),_},m.prototype.callFulfilled=function(b){l.resolve(this.promise,b)},m.prototype.otherCallFulfilled=function(b){h(this.promise,this.onFulfilled,b)},m.prototype.callRejected=function(b){l.reject(this.promise,b)},m.prototype.otherCallRejected=function(b){h(this.promise,this.onRejected,b)},l.resolve=function(b,y){var _=x(v,y);if(_.status==="error")return l.reject(b,_.value);var j=_.value;if(j)g(b,j);else{b.state=u,b.outcome=y;for(var S=-1,E=b.queue.length;++S<E;)b.queue[S].callFulfilled(y)}return b},l.reject=function(b,y){b.state=c,b.outcome=y;for(var _=-1,j=b.queue.length;++_<j;)b.queue[_].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 _=b.length,j=!1;if(!_)return this.resolve([]);for(var S=new Array(_),E=0,C=-1,A=new this(a);++C<_;)I(b[C],C);return A;function I(P,G){y.resolve(P).then(function(T){S[G]=T,++E!==_||j||(j=!0,l.resolve(A,S))},function(T){j||(j=!0,l.reject(A,T))})}},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 _=b.length,j=!1;if(!_)return this.resolve([]);for(var S=-1,E=new this(a);++S<_;)C=b[S],y.resolve(C).then(function(A){j||(j=!0,l.resolve(E,A))},function(A){j||(j=!0,l.reject(E,A))});var C;return E}},{immediate:36}],38:[function(n,r,o){var i={};(0,n("./lib/utils/common").assign)(i,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,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,m=-1,h=0,v=8;function g(b){if(!(this instanceof g))return new g(b);this.options=a.assign({level:m,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,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 _=i.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(_!==f)throw new Error(c[_]);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,(_=i.deflateSetDictionary(this.strm,j))!==f)throw new Error(c[_]);this._dict_set=!0}}function x(b,y){var _=new g(y);if(_.push(b,!0),_.err)throw _.msg||c[_.err];return _.result}g.prototype.push=function(b,y){var _,j,S=this.strm,E=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(E),S.next_out=0,S.avail_out=E),(_=i.deflate(S,j))!==1&&_!==f)return this.onEnd(_),!(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)&&_!==1);return j===4?(_=i.deflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===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,r,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"),m=Object.prototype.toString;function h(g){if(!(this instanceof h))return new h(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 h(x);if(b.push(g,!0),b.err)throw b.msg||u[b.err];return b.result}h.prototype.push=function(g,x){var b,y,_,j,S,E,C=this.strm,A=this.options.chunkSize,I=this.options.dictionary,P=!1;if(this.ended)return!1;y=x===~~x?x:x===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof g=="string"?C.input=l.binstring2buf(g):m.call(g)==="[object ArrayBuffer]"?C.input=new Uint8Array(g):C.input=g,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new a.Buf8(A),C.next_out=0,C.avail_out=A),(b=i.inflate(C,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&I&&(E=typeof I=="string"?l.string2buf(I):m.call(I)==="[object ArrayBuffer]"?new Uint8Array(I):I,b=i.inflateSetDictionary(this.strm,E)),b===c.Z_BUF_ERROR&&P===!0&&(b=c.Z_OK,P=!1),b!==c.Z_STREAM_END&&b!==c.Z_OK)return this.onEnd(b),!(this.ended=!0);C.next_out&&(C.avail_out!==0&&b!==c.Z_STREAM_END&&(C.avail_in!==0||y!==c.Z_FINISH&&y!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(_=l.utf8border(C.output,C.next_out),j=C.next_out-_,S=l.buf2string(C.output,_),C.next_out=j,C.avail_out=A-j,j&&a.arraySet(C.output,C.output,_,j,0),this.onData(S)):this.onData(a.shrinkBuf(C.output,C.next_out)))),C.avail_in===0&&C.avail_out===0&&(P=!0)}while((0<C.avail_in||C.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),!(C.avail_out=0))},h.prototype.onData=function(g){this.chunks.push(g)},h.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=h,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,r,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,m){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+f),m);else for(var h=0;h<f;h++)c[m+h]=u[d+h]},flattenChunks:function(c){var u,d,f,m,h,v;for(u=f=0,d=c.length;u<d;u++)f+=c[u].length;for(v=new Uint8Array(f),u=m=0,d=c.length;u<d;u++)h=c[u],v.set(h,m),m+=h.length;return v}},l={arraySet:function(c,u,d,f,m){for(var h=0;h<f;h++)c[m+h]=u[d+h]},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,r,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,m){if(m<65537&&(f.subarray&&l||!f.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(f,m));for(var h="",v=0;v<m;v++)h+=String.fromCharCode(f[v]);return h}c[254]=c[254]=1,o.string2buf=function(f){var m,h,v,g,x,b=f.length,y=0;for(g=0;g<b;g++)(64512&(h=f.charCodeAt(g)))==55296&&g+1<b&&(64512&(v=f.charCodeAt(g+1)))==56320&&(h=65536+(h-55296<<10)+(v-56320),g++),y+=h<128?1:h<2048?2:h<65536?3:4;for(m=new i.Buf8(y),g=x=0;x<y;g++)(64512&(h=f.charCodeAt(g)))==55296&&g+1<b&&(64512&(v=f.charCodeAt(g+1)))==56320&&(h=65536+(h-55296<<10)+(v-56320),g++),h<128?m[x++]=h:(h<2048?m[x++]=192|h>>>6:(h<65536?m[x++]=224|h>>>12:(m[x++]=240|h>>>18,m[x++]=128|h>>>12&63),m[x++]=128|h>>>6&63),m[x++]=128|63&h);return m},o.buf2binstring=function(f){return d(f,f.length)},o.binstring2buf=function(f){for(var m=new i.Buf8(f.length),h=0,v=m.length;h<v;h++)m[h]=f.charCodeAt(h);return m},o.buf2string=function(f,m){var h,v,g,x,b=m||f.length,y=new Array(2*b);for(h=v=0;h<b;)if((g=f[h++])<128)y[v++]=g;else if(4<(x=c[g]))y[v++]=65533,h+=x-1;else{for(g&=x===2?31:x===3?15:7;1<x&&h<b;)g=g<<6|63&f[h++],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,m){var h;for((m=m||f.length)>f.length&&(m=f.length),h=m-1;0<=h&&(192&f[h])==128;)h--;return h<0||h===0?m:h+c[f[h]]>m?h:m}},{"./common":41}],43:[function(n,r,o){r.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,r,o){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,o){var 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})();r.exports=function(a,l,c,u){var d=i,f=u+c;a^=-1;for(var m=u;m<f;m++)a=a>>>8^d[255&(a^l[m])];return-1^a}},{}],46:[function(n,r,o){var i,a=n("../utils/common"),l=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),f=0,m=4,h=0,v=-2,g=-1,x=4,b=2,y=8,_=9,j=286,S=30,E=19,C=2*j+1,A=15,I=3,P=258,G=P+I+1,T=42,D=113,k=1,F=2,Q=3,$=4;function Z(w,K){return w.msg=d[K],K}function q(w){return(w<<1)-(4<w?9:0)}function ue(w){for(var K=w.length;0<=--K;)w[K]=0}function U(w){var K=w.state,H=K.pending;H>w.avail_out&&(H=w.avail_out),H!==0&&(a.arraySet(w.output,K.pending_buf,K.pending_out,H,w.next_out),w.next_out+=H,K.pending_out+=H,w.total_out+=H,w.avail_out-=H,K.pending-=H,K.pending===0&&(K.pending_out=0))}function W(w,K){l._tr_flush_block(w,0<=w.block_start?w.block_start:-1,w.strstart-w.block_start,K),w.block_start=w.strstart,U(w.strm)}function ae(w,K){w.pending_buf[w.pending++]=K}function B(w,K){w.pending_buf[w.pending++]=K>>>8&255,w.pending_buf[w.pending++]=255&K}function X(w,K){var H,z,R=w.max_chain_length,M=w.strstart,re=w.prev_length,ne=w.nice_match,V=w.strstart>w.w_size-G?w.strstart-(w.w_size-G):0,oe=w.window,O=w.w_mask,L=w.prev,te=w.strstart+P,fe=oe[M+re-1],ie=oe[M+re];w.prev_length>=w.good_match&&(R>>=2),ne>w.lookahead&&(ne=w.lookahead);do if(oe[(H=K)+re]===ie&&oe[H+re-1]===fe&&oe[H]===oe[M]&&oe[++H]===oe[M+1]){M+=2,H++;do;while(oe[++M]===oe[++H]&&oe[++M]===oe[++H]&&oe[++M]===oe[++H]&&oe[++M]===oe[++H]&&oe[++M]===oe[++H]&&oe[++M]===oe[++H]&&oe[++M]===oe[++H]&&oe[++M]===oe[++H]&&M<te);if(z=P-(te-M),M=te-P,re<z){if(w.match_start=K,ne<=(re=z))break;fe=oe[M+re-1],ie=oe[M+re]}}while((K=L[K&O])>V&&--R!=0);return re<=w.lookahead?re:w.lookahead}function _e(w){var K,H,z,R,M,re,ne,V,oe,O,L=w.w_size;do{if(R=w.window_size-w.lookahead-w.strstart,w.strstart>=L+(L-G)){for(a.arraySet(w.window,w.window,L,L,0),w.match_start-=L,w.strstart-=L,w.block_start-=L,K=H=w.hash_size;z=w.head[--K],w.head[K]=L<=z?z-L:0,--H;);for(K=H=L;z=w.prev[--K],w.prev[K]=L<=z?z-L:0,--H;);R+=L}if(w.strm.avail_in===0)break;if(re=w.strm,ne=w.window,V=w.strstart+w.lookahead,oe=R,O=void 0,O=re.avail_in,oe<O&&(O=oe),H=O===0?0:(re.avail_in-=O,a.arraySet(ne,re.input,re.next_in,O,V),re.state.wrap===1?re.adler=c(re.adler,ne,O,V):re.state.wrap===2&&(re.adler=u(re.adler,ne,O,V)),re.next_in+=O,re.total_in+=O,O),w.lookahead+=H,w.lookahead+w.insert>=I)for(M=w.strstart-w.insert,w.ins_h=w.window[M],w.ins_h=(w.ins_h<<w.hash_shift^w.window[M+1])&w.hash_mask;w.insert&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[M+I-1])&w.hash_mask,w.prev[M&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=M,M++,w.insert--,!(w.lookahead+w.insert<I)););}while(w.lookahead<G&&w.strm.avail_in!==0)}function ce(w,K){for(var H,z;;){if(w.lookahead<G){if(_e(w),w.lookahead<G&&K===f)return k;if(w.lookahead===0)break}if(H=0,w.lookahead>=I&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+I-1])&w.hash_mask,H=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),H!==0&&w.strstart-H<=w.w_size-G&&(w.match_length=X(w,H)),w.match_length>=I)if(z=l._tr_tally(w,w.strstart-w.match_start,w.match_length-I),w.lookahead-=w.match_length,w.match_length<=w.max_lazy_match&&w.lookahead>=I){for(w.match_length--;w.strstart++,w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+I-1])&w.hash_mask,H=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 z=l._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++;if(z&&(W(w,!1),w.strm.avail_out===0))return k}return w.insert=w.strstart<I-1?w.strstart:I-1,K===m?(W(w,!0),w.strm.avail_out===0?Q:$):w.last_lit&&(W(w,!1),w.strm.avail_out===0)?k:F}function xe(w,K){for(var H,z,R;;){if(w.lookahead<G){if(_e(w),w.lookahead<G&&K===f)return k;if(w.lookahead===0)break}if(H=0,w.lookahead>=I&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+I-1])&w.hash_mask,H=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=I-1,H!==0&&w.prev_length<w.max_lazy_match&&w.strstart-H<=w.w_size-G&&(w.match_length=X(w,H),w.match_length<=5&&(w.strategy===1||w.match_length===I&&4096<w.strstart-w.match_start)&&(w.match_length=I-1)),w.prev_length>=I&&w.match_length<=w.prev_length){for(R=w.strstart+w.lookahead-I,z=l._tr_tally(w,w.strstart-1-w.prev_match,w.prev_length-I),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+I-1])&w.hash_mask,H=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=I-1,w.strstart++,z&&(W(w,!1),w.strm.avail_out===0))return k}else if(w.match_available){if((z=l._tr_tally(w,0,w.window[w.strstart-1]))&&W(w,!1),w.strstart++,w.lookahead--,w.strm.avail_out===0)return k}else w.match_available=1,w.strstart++,w.lookahead--}return w.match_available&&(z=l._tr_tally(w,0,w.window[w.strstart-1]),w.match_available=0),w.insert=w.strstart<I-1?w.strstart:I-1,K===m?(W(w,!0),w.strm.avail_out===0?Q:$):w.last_lit&&(W(w,!1),w.strm.avail_out===0)?k:F}function pe(w,K,H,z,R){this.good_length=w,this.max_lazy=K,this.nice_length=H,this.max_chain=z,this.func=R}function ge(){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*C),this.dyn_dtree=new a.Buf16(2*(2*S+1)),this.bl_tree=new a.Buf16(2*(2*E+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(A+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 se(w){var K;return w&&w.state?(w.total_in=w.total_out=0,w.data_type=b,(K=w.state).pending=0,K.pending_out=0,K.wrap<0&&(K.wrap=-K.wrap),K.status=K.wrap?T:D,w.adler=K.wrap===2?0:1,K.last_flush=f,l._tr_init(K),h):Z(w,v)}function de(w){var K=se(w);return K===h&&(function(H){H.window_size=2*H.w_size,ue(H.head),H.max_lazy_match=i[H.level].max_lazy,H.good_match=i[H.level].good_length,H.nice_match=i[H.level].nice_length,H.max_chain_length=i[H.level].max_chain,H.strstart=0,H.block_start=0,H.lookahead=0,H.insert=0,H.match_length=H.prev_length=I-1,H.match_available=0,H.ins_h=0})(w.state),K}function be(w,K,H,z,R,M){if(!w)return v;var re=1;if(K===g&&(K=6),z<0?(re=0,z=-z):15<z&&(re=2,z-=16),R<1||_<R||H!==y||z<8||15<z||K<0||9<K||M<0||x<M)return Z(w,v);z===8&&(z=9);var ne=new ge;return(w.state=ne).strm=w,ne.wrap=re,ne.gzhead=null,ne.w_bits=z,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+I-1)/I),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=K,ne.strategy=M,ne.method=H,de(w)}i=[new pe(0,0,0,0,function(w,K){var H=65535;for(H>w.pending_buf_size-5&&(H=w.pending_buf_size-5);;){if(w.lookahead<=1){if(_e(w),w.lookahead===0&&K===f)return k;if(w.lookahead===0)break}w.strstart+=w.lookahead,w.lookahead=0;var z=w.block_start+H;if((w.strstart===0||w.strstart>=z)&&(w.lookahead=w.strstart-z,w.strstart=z,W(w,!1),w.strm.avail_out===0)||w.strstart-w.block_start>=w.w_size-G&&(W(w,!1),w.strm.avail_out===0))return k}return w.insert=0,K===m?(W(w,!0),w.strm.avail_out===0?Q:$):(w.strstart>w.block_start&&(W(w,!1),w.strm.avail_out),k)}),new pe(4,4,8,4,ce),new pe(4,5,16,8,ce),new pe(4,6,32,32,ce),new pe(4,4,16,16,xe),new pe(8,16,32,32,xe),new pe(8,16,128,128,xe),new pe(8,32,128,256,xe),new pe(32,128,258,1024,xe),new pe(32,258,258,4096,xe)],o.deflateInit=function(w,K){return be(w,K,y,15,8,0)},o.deflateInit2=be,o.deflateReset=de,o.deflateResetKeep=se,o.deflateSetHeader=function(w,K){return w&&w.state?w.state.wrap!==2?v:(w.state.gzhead=K,h):v},o.deflate=function(w,K){var H,z,R,M;if(!w||!w.state||5<K||K<0)return w?Z(w,v):v;if(z=w.state,!w.output||!w.input&&w.avail_in!==0||z.status===666&&K!==m)return Z(w,w.avail_out===0?-5:v);if(z.strm=w,H=z.last_flush,z.last_flush=K,z.status===T)if(z.wrap===2)w.adler=0,ae(z,31),ae(z,139),ae(z,8),z.gzhead?(ae(z,(z.gzhead.text?1:0)+(z.gzhead.hcrc?2:0)+(z.gzhead.extra?4:0)+(z.gzhead.name?8:0)+(z.gzhead.comment?16:0)),ae(z,255&z.gzhead.time),ae(z,z.gzhead.time>>8&255),ae(z,z.gzhead.time>>16&255),ae(z,z.gzhead.time>>24&255),ae(z,z.level===9?2:2<=z.strategy||z.level<2?4:0),ae(z,255&z.gzhead.os),z.gzhead.extra&&z.gzhead.extra.length&&(ae(z,255&z.gzhead.extra.length),ae(z,z.gzhead.extra.length>>8&255)),z.gzhead.hcrc&&(w.adler=u(w.adler,z.pending_buf,z.pending,0)),z.gzindex=0,z.status=69):(ae(z,0),ae(z,0),ae(z,0),ae(z,0),ae(z,0),ae(z,z.level===9?2:2<=z.strategy||z.level<2?4:0),ae(z,3),z.status=D);else{var re=y+(z.w_bits-8<<4)<<8;re|=(2<=z.strategy||z.level<2?0:z.level<6?1:z.level===6?2:3)<<6,z.strstart!==0&&(re|=32),re+=31-re%31,z.status=D,B(z,re),z.strstart!==0&&(B(z,w.adler>>>16),B(z,65535&w.adler)),w.adler=1}if(z.status===69)if(z.gzhead.extra){for(R=z.pending;z.gzindex<(65535&z.gzhead.extra.length)&&(z.pending!==z.pending_buf_size||(z.gzhead.hcrc&&z.pending>R&&(w.adler=u(w.adler,z.pending_buf,z.pending-R,R)),U(w),R=z.pending,z.pending!==z.pending_buf_size));)ae(z,255&z.gzhead.extra[z.gzindex]),z.gzindex++;z.gzhead.hcrc&&z.pending>R&&(w.adler=u(w.adler,z.pending_buf,z.pending-R,R)),z.gzindex===z.gzhead.extra.length&&(z.gzindex=0,z.status=73)}else z.status=73;if(z.status===73)if(z.gzhead.name){R=z.pending;do{if(z.pending===z.pending_buf_size&&(z.gzhead.hcrc&&z.pending>R&&(w.adler=u(w.adler,z.pending_buf,z.pending-R,R)),U(w),R=z.pending,z.pending===z.pending_buf_size)){M=1;break}M=z.gzindex<z.gzhead.name.length?255&z.gzhead.name.charCodeAt(z.gzindex++):0,ae(z,M)}while(M!==0);z.gzhead.hcrc&&z.pending>R&&(w.adler=u(w.adler,z.pending_buf,z.pending-R,R)),M===0&&(z.gzindex=0,z.status=91)}else z.status=91;if(z.status===91)if(z.gzhead.comment){R=z.pending;do{if(z.pending===z.pending_buf_size&&(z.gzhead.hcrc&&z.pending>R&&(w.adler=u(w.adler,z.pending_buf,z.pending-R,R)),U(w),R=z.pending,z.pending===z.pending_buf_size)){M=1;break}M=z.gzindex<z.gzhead.comment.length?255&z.gzhead.comment.charCodeAt(z.gzindex++):0,ae(z,M)}while(M!==0);z.gzhead.hcrc&&z.pending>R&&(w.adler=u(w.adler,z.pending_buf,z.pending-R,R)),M===0&&(z.status=103)}else z.status=103;if(z.status===103&&(z.gzhead.hcrc?(z.pending+2>z.pending_buf_size&&U(w),z.pending+2<=z.pending_buf_size&&(ae(z,255&w.adler),ae(z,w.adler>>8&255),w.adler=0,z.status=D)):z.status=D),z.pending!==0){if(U(w),w.avail_out===0)return z.last_flush=-1,h}else if(w.avail_in===0&&q(K)<=q(H)&&K!==m)return Z(w,-5);if(z.status===666&&w.avail_in!==0)return Z(w,-5);if(w.avail_in!==0||z.lookahead!==0||K!==f&&z.status!==666){var ne=z.strategy===2?(function(V,oe){for(var O;;){if(V.lookahead===0&&(_e(V),V.lookahead===0)){if(oe===f)return k;break}if(V.match_length=0,O=l._tr_tally(V,0,V.window[V.strstart]),V.lookahead--,V.strstart++,O&&(W(V,!1),V.strm.avail_out===0))return k}return V.insert=0,oe===m?(W(V,!0),V.strm.avail_out===0?Q:$):V.last_lit&&(W(V,!1),V.strm.avail_out===0)?k:F})(z,K):z.strategy===3?(function(V,oe){for(var O,L,te,fe,ie=V.window;;){if(V.lookahead<=P){if(_e(V),V.lookahead<=P&&oe===f)return k;if(V.lookahead===0)break}if(V.match_length=0,V.lookahead>=I&&0<V.strstart&&(L=ie[te=V.strstart-1])===ie[++te]&&L===ie[++te]&&L===ie[++te]){fe=V.strstart+P;do;while(L===ie[++te]&&L===ie[++te]&&L===ie[++te]&&L===ie[++te]&&L===ie[++te]&&L===ie[++te]&&L===ie[++te]&&L===ie[++te]&&te<fe);V.match_length=P-(fe-te),V.match_length>V.lookahead&&(V.match_length=V.lookahead)}if(V.match_length>=I?(O=l._tr_tally(V,1,V.match_length-I),V.lookahead-=V.match_length,V.strstart+=V.match_length,V.match_length=0):(O=l._tr_tally(V,0,V.window[V.strstart]),V.lookahead--,V.strstart++),O&&(W(V,!1),V.strm.avail_out===0))return k}return V.insert=0,oe===m?(W(V,!0),V.strm.avail_out===0?Q:$):V.last_lit&&(W(V,!1),V.strm.avail_out===0)?k:F})(z,K):i[z.level].func(z,K);if(ne!==Q&&ne!==$||(z.status=666),ne===k||ne===Q)return w.avail_out===0&&(z.last_flush=-1),h;if(ne===F&&(K===1?l._tr_align(z):K!==5&&(l._tr_stored_block(z,0,0,!1),K===3&&(ue(z.head),z.lookahead===0&&(z.strstart=0,z.block_start=0,z.insert=0))),U(w),w.avail_out===0))return z.last_flush=-1,h}return K!==m?h:z.wrap<=0?1:(z.wrap===2?(ae(z,255&w.adler),ae(z,w.adler>>8&255),ae(z,w.adler>>16&255),ae(z,w.adler>>24&255),ae(z,255&w.total_in),ae(z,w.total_in>>8&255),ae(z,w.total_in>>16&255),ae(z,w.total_in>>24&255)):(B(z,w.adler>>>16),B(z,65535&w.adler)),U(w),0<z.wrap&&(z.wrap=-z.wrap),z.pending!==0?h:1)},o.deflateEnd=function(w){var K;return w&&w.state?(K=w.state.status)!==T&&K!==69&&K!==73&&K!==91&&K!==103&&K!==D&&K!==666?Z(w,v):(w.state=null,K===D?Z(w,-3):h):v},o.deflateSetDictionary=function(w,K){var H,z,R,M,re,ne,V,oe,O=K.length;if(!w||!w.state||(M=(H=w.state).wrap)===2||M===1&&H.status!==T||H.lookahead)return v;for(M===1&&(w.adler=c(w.adler,K,O,0)),H.wrap=0,O>=H.w_size&&(M===0&&(ue(H.head),H.strstart=0,H.block_start=0,H.insert=0),oe=new a.Buf8(H.w_size),a.arraySet(oe,K,O-H.w_size,H.w_size,0),K=oe,O=H.w_size),re=w.avail_in,ne=w.next_in,V=w.input,w.avail_in=O,w.next_in=0,w.input=K,_e(H);H.lookahead>=I;){for(z=H.strstart,R=H.lookahead-(I-1);H.ins_h=(H.ins_h<<H.hash_shift^H.window[z+I-1])&H.hash_mask,H.prev[z&H.w_mask]=H.head[H.ins_h],H.head[H.ins_h]=z,z++,--R;);H.strstart=z,H.lookahead=I-1,_e(H)}return H.strstart+=H.lookahead,H.block_start=H.strstart,H.insert=H.lookahead,H.lookahead=0,H.match_length=H.prev_length=I-1,H.match_available=0,w.next_in=ne,w.input=V,w.avail_in=re,H.wrap=M,h},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,o){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,o){r.exports=function(i,a){var l,c,u,d,f,m,h,v,g,x,b,y,_,j,S,E,C,A,I,P,G,T,D,k,F;l=i.state,c=i.next_in,k=i.input,u=c+(i.avail_in-5),d=i.next_out,F=i.output,f=d-(a-i.avail_out),m=d+(i.avail_out-257),h=l.dmax,v=l.wsize,g=l.whave,x=l.wnext,b=l.window,y=l.hold,_=l.bits,j=l.lencode,S=l.distcode,E=(1<<l.lenbits)-1,C=(1<<l.distbits)-1;e:do{_<15&&(y+=k[c++]<<_,_+=8,y+=k[c++]<<_,_+=8),A=j[y&E];t:for(;;){if(y>>>=I=A>>>24,_-=I,(I=A>>>16&255)===0)F[d++]=65535&A;else{if(!(16&I)){if((64&I)==0){A=j[(65535&A)+(y&(1<<I)-1)];continue t}if(32&I){l.mode=12;break e}i.msg="invalid literal/length code",l.mode=30;break e}P=65535&A,(I&=15)&&(_<I&&(y+=k[c++]<<_,_+=8),P+=y&(1<<I)-1,y>>>=I,_-=I),_<15&&(y+=k[c++]<<_,_+=8,y+=k[c++]<<_,_+=8),A=S[y&C];n:for(;;){if(y>>>=I=A>>>24,_-=I,!(16&(I=A>>>16&255))){if((64&I)==0){A=S[(65535&A)+(y&(1<<I)-1)];continue n}i.msg="invalid distance code",l.mode=30;break e}if(G=65535&A,_<(I&=15)&&(y+=k[c++]<<_,(_+=8)<I&&(y+=k[c++]<<_,_+=8)),h<(G+=y&(1<<I)-1)){i.msg="invalid distance too far back",l.mode=30;break e}if(y>>>=I,_-=I,(I=d-f)<G){if(g<(I=G-I)&&l.sane){i.msg="invalid distance too far back",l.mode=30;break e}if(D=b,(T=0)===x){if(T+=v-I,I<P){for(P-=I;F[d++]=b[T++],--I;);T=d-G,D=F}}else if(x<I){if(T+=v+x-I,(I-=x)<P){for(P-=I;F[d++]=b[T++],--I;);if(T=0,x<P){for(P-=I=x;F[d++]=b[T++],--I;);T=d-G,D=F}}}else if(T+=x-I,I<P){for(P-=I;F[d++]=b[T++],--I;);T=d-G,D=F}for(;2<P;)F[d++]=D[T++],F[d++]=D[T++],F[d++]=D[T++],P-=3;P&&(F[d++]=D[T++],1<P&&(F[d++]=D[T++]))}else{for(T=d-G;F[d++]=F[T++],F[d++]=F[T++],F[d++]=F[T++],2<(P-=3););P&&(F[d++]=F[T++],1<P&&(F[d++]=F[T++]))}break}}break}}while(c<u&&d<m);c-=P=_>>3,y&=(1<<(_-=P<<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<m?m-d+257:257-(d-m),l.hold=y,l.bits=_}},{}],49:[function(n,r,o){var i=n("../utils/common"),a=n("./adler32"),l=n("./crc32"),c=n("./inffast"),u=n("./inftrees"),d=1,f=2,m=0,h=-2,v=1,g=852,x=592;function b(T){return(T>>>24&255)+(T>>>8&65280)+((65280&T)<<8)+((255&T)<<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 _(T){var D;return T&&T.state?(D=T.state,T.total_in=T.total_out=D.total=0,T.msg="",D.wrap&&(T.adler=1&D.wrap),D.mode=v,D.last=0,D.havedict=0,D.dmax=32768,D.head=null,D.hold=0,D.bits=0,D.lencode=D.lendyn=new i.Buf32(g),D.distcode=D.distdyn=new i.Buf32(x),D.sane=1,D.back=-1,m):h}function j(T){var D;return T&&T.state?((D=T.state).wsize=0,D.whave=0,D.wnext=0,_(T)):h}function S(T,D){var k,F;return T&&T.state?(F=T.state,D<0?(k=0,D=-D):(k=1+(D>>4),D<48&&(D&=15)),D&&(D<8||15<D)?h:(F.window!==null&&F.wbits!==D&&(F.window=null),F.wrap=k,F.wbits=D,j(T))):h}function E(T,D){var k,F;return T?(F=new y,(T.state=F).window=null,(k=S(T,D))!==m&&(T.state=null),k):h}var C,A,I=!0;function P(T){if(I){var D;for(C=new i.Buf32(512),A=new i.Buf32(32),D=0;D<144;)T.lens[D++]=8;for(;D<256;)T.lens[D++]=9;for(;D<280;)T.lens[D++]=7;for(;D<288;)T.lens[D++]=8;for(u(d,T.lens,0,288,C,0,T.work,{bits:9}),D=0;D<32;)T.lens[D++]=5;u(f,T.lens,0,32,A,0,T.work,{bits:5}),I=!1}T.lencode=C,T.lenbits=9,T.distcode=A,T.distbits=5}function G(T,D,k,F){var Q,$=T.state;return $.window===null&&($.wsize=1<<$.wbits,$.wnext=0,$.whave=0,$.window=new i.Buf8($.wsize)),F>=$.wsize?(i.arraySet($.window,D,k-$.wsize,$.wsize,0),$.wnext=0,$.whave=$.wsize):(F<(Q=$.wsize-$.wnext)&&(Q=F),i.arraySet($.window,D,k-F,Q,$.wnext),(F-=Q)?(i.arraySet($.window,D,k-F,F,0),$.wnext=F,$.whave=$.wsize):($.wnext+=Q,$.wnext===$.wsize&&($.wnext=0),$.whave<$.wsize&&($.whave+=Q))),0}o.inflateReset=j,o.inflateReset2=S,o.inflateResetKeep=_,o.inflateInit=function(T){return E(T,15)},o.inflateInit2=E,o.inflate=function(T,D){var k,F,Q,$,Z,q,ue,U,W,ae,B,X,_e,ce,xe,pe,ge,se,de,be,w,K,H,z,R=0,M=new i.Buf8(4),re=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!T||!T.state||!T.output||!T.input&&T.avail_in!==0)return h;(k=T.state).mode===12&&(k.mode=13),Z=T.next_out,Q=T.output,ue=T.avail_out,$=T.next_in,F=T.input,q=T.avail_in,U=k.hold,W=k.bits,ae=q,B=ue,K=m;e:for(;;)switch(k.mode){case v:if(k.wrap===0){k.mode=13;break}for(;W<16;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(2&k.wrap&&U===35615){M[k.check=0]=255&U,M[1]=U>>>8&255,k.check=l(k.check,M,2,0),W=U=0,k.mode=2;break}if(k.flags=0,k.head&&(k.head.done=!1),!(1&k.wrap)||(((255&U)<<8)+(U>>8))%31){T.msg="incorrect header check",k.mode=30;break}if((15&U)!=8){T.msg="unknown compression method",k.mode=30;break}if(W-=4,w=8+(15&(U>>>=4)),k.wbits===0)k.wbits=w;else if(w>k.wbits){T.msg="invalid window size",k.mode=30;break}k.dmax=1<<w,T.adler=k.check=1,k.mode=512&U?10:12,W=U=0;break;case 2:for(;W<16;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(k.flags=U,(255&k.flags)!=8){T.msg="unknown compression method",k.mode=30;break}if(57344&k.flags){T.msg="unknown header flags set",k.mode=30;break}k.head&&(k.head.text=U>>8&1),512&k.flags&&(M[0]=255&U,M[1]=U>>>8&255,k.check=l(k.check,M,2,0)),W=U=0,k.mode=3;case 3:for(;W<32;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}k.head&&(k.head.time=U),512&k.flags&&(M[0]=255&U,M[1]=U>>>8&255,M[2]=U>>>16&255,M[3]=U>>>24&255,k.check=l(k.check,M,4,0)),W=U=0,k.mode=4;case 4:for(;W<16;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}k.head&&(k.head.xflags=255&U,k.head.os=U>>8),512&k.flags&&(M[0]=255&U,M[1]=U>>>8&255,k.check=l(k.check,M,2,0)),W=U=0,k.mode=5;case 5:if(1024&k.flags){for(;W<16;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}k.length=U,k.head&&(k.head.extra_len=U),512&k.flags&&(M[0]=255&U,M[1]=U>>>8&255,k.check=l(k.check,M,2,0)),W=U=0}else k.head&&(k.head.extra=null);k.mode=6;case 6:if(1024&k.flags&&(q<(X=k.length)&&(X=q),X&&(k.head&&(w=k.head.extra_len-k.length,k.head.extra||(k.head.extra=new Array(k.head.extra_len)),i.arraySet(k.head.extra,F,$,X,w)),512&k.flags&&(k.check=l(k.check,F,X,$)),q-=X,$+=X,k.length-=X),k.length))break e;k.length=0,k.mode=7;case 7:if(2048&k.flags){if(q===0)break e;for(X=0;w=F[$+X++],k.head&&w&&k.length<65536&&(k.head.name+=String.fromCharCode(w)),w&&X<q;);if(512&k.flags&&(k.check=l(k.check,F,X,$)),q-=X,$+=X,w)break e}else k.head&&(k.head.name=null);k.length=0,k.mode=8;case 8:if(4096&k.flags){if(q===0)break e;for(X=0;w=F[$+X++],k.head&&w&&k.length<65536&&(k.head.comment+=String.fromCharCode(w)),w&&X<q;);if(512&k.flags&&(k.check=l(k.check,F,X,$)),q-=X,$+=X,w)break e}else k.head&&(k.head.comment=null);k.mode=9;case 9:if(512&k.flags){for(;W<16;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(U!==(65535&k.check)){T.msg="header crc mismatch",k.mode=30;break}W=U=0}k.head&&(k.head.hcrc=k.flags>>9&1,k.head.done=!0),T.adler=k.check=0,k.mode=12;break;case 10:for(;W<32;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}T.adler=k.check=b(U),W=U=0,k.mode=11;case 11:if(k.havedict===0)return T.next_out=Z,T.avail_out=ue,T.next_in=$,T.avail_in=q,k.hold=U,k.bits=W,2;T.adler=k.check=1,k.mode=12;case 12:if(D===5||D===6)break e;case 13:if(k.last){U>>>=7&W,W-=7&W,k.mode=27;break}for(;W<3;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}switch(k.last=1&U,W-=1,3&(U>>>=1)){case 0:k.mode=14;break;case 1:if(P(k),k.mode=20,D!==6)break;U>>>=2,W-=2;break e;case 2:k.mode=17;break;case 3:T.msg="invalid block type",k.mode=30}U>>>=2,W-=2;break;case 14:for(U>>>=7&W,W-=7&W;W<32;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if((65535&U)!=(U>>>16^65535)){T.msg="invalid stored block lengths",k.mode=30;break}if(k.length=65535&U,W=U=0,k.mode=15,D===6)break e;case 15:k.mode=16;case 16:if(X=k.length){if(q<X&&(X=q),ue<X&&(X=ue),X===0)break e;i.arraySet(Q,F,$,X,Z),q-=X,$+=X,ue-=X,Z+=X,k.length-=X;break}k.mode=12;break;case 17:for(;W<14;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(k.nlen=257+(31&U),U>>>=5,W-=5,k.ndist=1+(31&U),U>>>=5,W-=5,k.ncode=4+(15&U),U>>>=4,W-=4,286<k.nlen||30<k.ndist){T.msg="too many length or distance symbols",k.mode=30;break}k.have=0,k.mode=18;case 18:for(;k.have<k.ncode;){for(;W<3;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}k.lens[re[k.have++]]=7&U,U>>>=3,W-=3}for(;k.have<19;)k.lens[re[k.have++]]=0;if(k.lencode=k.lendyn,k.lenbits=7,H={bits:k.lenbits},K=u(0,k.lens,0,19,k.lencode,0,k.work,H),k.lenbits=H.bits,K){T.msg="invalid code lengths set",k.mode=30;break}k.have=0,k.mode=19;case 19:for(;k.have<k.nlen+k.ndist;){for(;pe=(R=k.lencode[U&(1<<k.lenbits)-1])>>>16&255,ge=65535&R,!((xe=R>>>24)<=W);){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(ge<16)U>>>=xe,W-=xe,k.lens[k.have++]=ge;else{if(ge===16){for(z=xe+2;W<z;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(U>>>=xe,W-=xe,k.have===0){T.msg="invalid bit length repeat",k.mode=30;break}w=k.lens[k.have-1],X=3+(3&U),U>>>=2,W-=2}else if(ge===17){for(z=xe+3;W<z;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}W-=xe,w=0,X=3+(7&(U>>>=xe)),U>>>=3,W-=3}else{for(z=xe+7;W<z;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}W-=xe,w=0,X=11+(127&(U>>>=xe)),U>>>=7,W-=7}if(k.have+X>k.nlen+k.ndist){T.msg="invalid bit length repeat",k.mode=30;break}for(;X--;)k.lens[k.have++]=w}}if(k.mode===30)break;if(k.lens[256]===0){T.msg="invalid code -- missing end-of-block",k.mode=30;break}if(k.lenbits=9,H={bits:k.lenbits},K=u(d,k.lens,0,k.nlen,k.lencode,0,k.work,H),k.lenbits=H.bits,K){T.msg="invalid literal/lengths set",k.mode=30;break}if(k.distbits=6,k.distcode=k.distdyn,H={bits:k.distbits},K=u(f,k.lens,k.nlen,k.ndist,k.distcode,0,k.work,H),k.distbits=H.bits,K){T.msg="invalid distances set",k.mode=30;break}if(k.mode=20,D===6)break e;case 20:k.mode=21;case 21:if(6<=q&&258<=ue){T.next_out=Z,T.avail_out=ue,T.next_in=$,T.avail_in=q,k.hold=U,k.bits=W,c(T,B),Z=T.next_out,Q=T.output,ue=T.avail_out,$=T.next_in,F=T.input,q=T.avail_in,U=k.hold,W=k.bits,k.mode===12&&(k.back=-1);break}for(k.back=0;pe=(R=k.lencode[U&(1<<k.lenbits)-1])>>>16&255,ge=65535&R,!((xe=R>>>24)<=W);){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(pe&&(240&pe)==0){for(se=xe,de=pe,be=ge;pe=(R=k.lencode[be+((U&(1<<se+de)-1)>>se)])>>>16&255,ge=65535&R,!(se+(xe=R>>>24)<=W);){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}U>>>=se,W-=se,k.back+=se}if(U>>>=xe,W-=xe,k.back+=xe,k.length=ge,pe===0){k.mode=26;break}if(32&pe){k.back=-1,k.mode=12;break}if(64&pe){T.msg="invalid literal/length code",k.mode=30;break}k.extra=15&pe,k.mode=22;case 22:if(k.extra){for(z=k.extra;W<z;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}k.length+=U&(1<<k.extra)-1,U>>>=k.extra,W-=k.extra,k.back+=k.extra}k.was=k.length,k.mode=23;case 23:for(;pe=(R=k.distcode[U&(1<<k.distbits)-1])>>>16&255,ge=65535&R,!((xe=R>>>24)<=W);){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if((240&pe)==0){for(se=xe,de=pe,be=ge;pe=(R=k.distcode[be+((U&(1<<se+de)-1)>>se)])>>>16&255,ge=65535&R,!(se+(xe=R>>>24)<=W);){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}U>>>=se,W-=se,k.back+=se}if(U>>>=xe,W-=xe,k.back+=xe,64&pe){T.msg="invalid distance code",k.mode=30;break}k.offset=ge,k.extra=15&pe,k.mode=24;case 24:if(k.extra){for(z=k.extra;W<z;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}k.offset+=U&(1<<k.extra)-1,U>>>=k.extra,W-=k.extra,k.back+=k.extra}if(k.offset>k.dmax){T.msg="invalid distance too far back",k.mode=30;break}k.mode=25;case 25:if(ue===0)break e;if(X=B-ue,k.offset>X){if((X=k.offset-X)>k.whave&&k.sane){T.msg="invalid distance too far back",k.mode=30;break}_e=X>k.wnext?(X-=k.wnext,k.wsize-X):k.wnext-X,X>k.length&&(X=k.length),ce=k.window}else ce=Q,_e=Z-k.offset,X=k.length;for(ue<X&&(X=ue),ue-=X,k.length-=X;Q[Z++]=ce[_e++],--X;);k.length===0&&(k.mode=21);break;case 26:if(ue===0)break e;Q[Z++]=k.length,ue--,k.mode=21;break;case 27:if(k.wrap){for(;W<32;){if(q===0)break e;q--,U|=F[$++]<<W,W+=8}if(B-=ue,T.total_out+=B,k.total+=B,B&&(T.adler=k.check=k.flags?l(k.check,Q,B,Z-B):a(k.check,Q,B,Z-B)),B=ue,(k.flags?U:b(U))!==k.check){T.msg="incorrect data check",k.mode=30;break}W=U=0}k.mode=28;case 28:if(k.wrap&&k.flags){for(;W<32;){if(q===0)break e;q--,U+=F[$++]<<W,W+=8}if(U!==(4294967295&k.total)){T.msg="incorrect length check",k.mode=30;break}W=U=0}k.mode=29;case 29:K=1;break e;case 30:K=-3;break e;case 31:return-4;default:return h}return T.next_out=Z,T.avail_out=ue,T.next_in=$,T.avail_in=q,k.hold=U,k.bits=W,(k.wsize||B!==T.avail_out&&k.mode<30&&(k.mode<27||D!==4))&&G(T,T.output,T.next_out,B-T.avail_out)?(k.mode=31,-4):(ae-=T.avail_in,B-=T.avail_out,T.total_in+=ae,T.total_out+=B,k.total+=B,k.wrap&&B&&(T.adler=k.check=k.flags?l(k.check,Q,B,T.next_out-B):a(k.check,Q,B,T.next_out-B)),T.data_type=k.bits+(k.last?64:0)+(k.mode===12?128:0)+(k.mode===20||k.mode===15?256:0),(ae==0&&B===0||D===4)&&K===m&&(K=-5),K)},o.inflateEnd=function(T){if(!T||!T.state)return h;var D=T.state;return D.window&&(D.window=null),T.state=null,m},o.inflateGetHeader=function(T,D){var k;return T&&T.state?(2&(k=T.state).wrap)==0?h:((k.head=D).done=!1,m):h},o.inflateSetDictionary=function(T,D){var k,F=D.length;return T&&T.state?(k=T.state).wrap!==0&&k.mode!==11?h:k.mode===11&&a(1,D,F,0)!==k.check?-3:G(T,D,F,F)?(k.mode=31,-4):(k.havedict=1,m):h},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,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];r.exports=function(d,f,m,h,v,g,x,b){var y,_,j,S,E,C,A,I,P,G=b.bits,T=0,D=0,k=0,F=0,Q=0,$=0,Z=0,q=0,ue=0,U=0,W=null,ae=0,B=new i.Buf16(16),X=new i.Buf16(16),_e=null,ce=0;for(T=0;T<=15;T++)B[T]=0;for(D=0;D<h;D++)B[f[m+D]]++;for(Q=G,F=15;1<=F&&B[F]===0;F--);if(F<Q&&(Q=F),F===0)return v[g++]=20971520,v[g++]=20971520,b.bits=1,0;for(k=1;k<F&&B[k]===0;k++);for(Q<k&&(Q=k),T=q=1;T<=15;T++)if(q<<=1,(q-=B[T])<0)return-1;if(0<q&&(d===0||F!==1))return-1;for(X[1]=0,T=1;T<15;T++)X[T+1]=X[T]+B[T];for(D=0;D<h;D++)f[m+D]!==0&&(x[X[f[m+D]]++]=D);if(C=d===0?(W=_e=x,19):d===1?(W=a,ae-=257,_e=l,ce-=257,256):(W=c,_e=u,-1),T=k,E=g,Z=D=U=0,j=-1,S=(ue=1<<($=Q))-1,d===1&&852<ue||d===2&&592<ue)return 1;for(;;){for(A=T-Z,P=x[D]<C?(I=0,x[D]):x[D]>C?(I=_e[ce+x[D]],W[ae+x[D]]):(I=96,0),y=1<<T-Z,k=_=1<<$;v[E+(U>>Z)+(_-=y)]=A<<24|I<<16|P|0,_!==0;);for(y=1<<T-1;U&y;)y>>=1;if(y!==0?(U&=y-1,U+=y):U=0,D++,--B[T]==0){if(T===F)break;T=f[m+x[D]]}if(Q<T&&(U&S)!==j){for(Z===0&&(Z=Q),E+=k,q=1<<($=T-Z);$+Z<F&&!((q-=B[$+Z])<=0);)$++,q<<=1;if(ue+=1<<$,d===1&&852<ue||d===2&&592<ue)return 1;v[j=U&S]=Q<<24|$<<16|E-g|0}}return U!==0&&(v[E+U]=T-Z<<24|64<<16|0),b.bits=Q,0}},{"../utils/common":41}],51:[function(n,r,o){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,o){var i=n("../utils/common"),a=0,l=1;function c(R){for(var M=R.length;0<=--M;)R[M]=0}var u=0,d=29,f=256,m=f+1+d,h=30,v=19,g=2*m+1,x=15,b=16,y=7,_=256,j=16,S=17,E=18,C=[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],A=[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],I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G=new Array(2*(m+2));c(G);var T=new Array(2*h);c(T);var D=new Array(512);c(D);var k=new Array(256);c(k);var F=new Array(d);c(F);var Q,$,Z,q=new Array(h);function ue(R,M,re,ne,V){this.static_tree=R,this.extra_bits=M,this.extra_base=re,this.elems=ne,this.max_length=V,this.has_stree=R&&R.length}function U(R,M){this.dyn_tree=R,this.max_code=0,this.stat_desc=M}function W(R){return R<256?D[R]:D[256+(R>>>7)]}function ae(R,M){R.pending_buf[R.pending++]=255&M,R.pending_buf[R.pending++]=M>>>8&255}function B(R,M,re){R.bi_valid>b-re?(R.bi_buf|=M<<R.bi_valid&65535,ae(R,R.bi_buf),R.bi_buf=M>>b-R.bi_valid,R.bi_valid+=re-b):(R.bi_buf|=M<<R.bi_valid&65535,R.bi_valid+=re)}function X(R,M,re){B(R,re[2*M],re[2*M+1])}function _e(R,M){for(var re=0;re|=1&R,R>>>=1,re<<=1,0<--M;);return re>>>1}function ce(R,M,re){var ne,V,oe=new Array(x+1),O=0;for(ne=1;ne<=x;ne++)oe[ne]=O=O+re[ne-1]<<1;for(V=0;V<=M;V++){var L=R[2*V+1];L!==0&&(R[2*V]=_e(oe[L]++,L))}}function xe(R){var M;for(M=0;M<m;M++)R.dyn_ltree[2*M]=0;for(M=0;M<h;M++)R.dyn_dtree[2*M]=0;for(M=0;M<v;M++)R.bl_tree[2*M]=0;R.dyn_ltree[2*_]=1,R.opt_len=R.static_len=0,R.last_lit=R.matches=0}function pe(R){8<R.bi_valid?ae(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 ge(R,M,re,ne){var V=2*M,oe=2*re;return R[V]<R[oe]||R[V]===R[oe]&&ne[M]<=ne[re]}function se(R,M,re){for(var ne=R.heap[re],V=re<<1;V<=R.heap_len&&(V<R.heap_len&&ge(M,R.heap[V+1],R.heap[V],R.depth)&&V++,!ge(M,ne,R.heap[V],R.depth));)R.heap[re]=R.heap[V],re=V,V<<=1;R.heap[re]=ne}function de(R,M,re){var ne,V,oe,O,L=0;if(R.last_lit!==0)for(;ne=R.pending_buf[R.d_buf+2*L]<<8|R.pending_buf[R.d_buf+2*L+1],V=R.pending_buf[R.l_buf+L],L++,ne===0?X(R,V,M):(X(R,(oe=k[V])+f+1,M),(O=C[oe])!==0&&B(R,V-=F[oe],O),X(R,oe=W(--ne),re),(O=A[oe])!==0&&B(R,ne-=q[oe],O)),L<R.last_lit;);X(R,_,M)}function be(R,M){var re,ne,V,oe=M.dyn_tree,O=M.stat_desc.static_tree,L=M.stat_desc.has_stree,te=M.stat_desc.elems,fe=-1;for(R.heap_len=0,R.heap_max=g,re=0;re<te;re++)oe[2*re]!==0?(R.heap[++R.heap_len]=fe=re,R.depth[re]=0):oe[2*re+1]=0;for(;R.heap_len<2;)oe[2*(V=R.heap[++R.heap_len]=fe<2?++fe:0)]=1,R.depth[V]=0,R.opt_len--,L&&(R.static_len-=O[2*V+1]);for(M.max_code=fe,re=R.heap_len>>1;1<=re;re--)se(R,oe,re);for(V=te;re=R.heap[1],R.heap[1]=R.heap[R.heap_len--],se(R,oe,1),ne=R.heap[1],R.heap[--R.heap_max]=re,R.heap[--R.heap_max]=ne,oe[2*V]=oe[2*re]+oe[2*ne],R.depth[V]=(R.depth[re]>=R.depth[ne]?R.depth[re]:R.depth[ne])+1,oe[2*re+1]=oe[2*ne+1]=V,R.heap[1]=V++,se(R,oe,1),2<=R.heap_len;);R.heap[--R.heap_max]=R.heap[1],(function(ie,Ce){var Ie,je,We,Be,bn,xr,kt=Ce.dyn_tree,_t=Ce.max_code,Ln=Ce.stat_desc.static_tree,Yo=Ce.stat_desc.has_stree,Ue=Ce.stat_desc.extra_bits,It=Ce.stat_desc.extra_base,tt=Ce.stat_desc.max_length,Yt=0;for(Be=0;Be<=x;Be++)ie.bl_count[Be]=0;for(kt[2*ie.heap[ie.heap_max]+1]=0,Ie=ie.heap_max+1;Ie<g;Ie++)tt<(Be=kt[2*kt[2*(je=ie.heap[Ie])+1]+1]+1)&&(Be=tt,Yt++),kt[2*je+1]=Be,_t<je||(ie.bl_count[Be]++,bn=0,It<=je&&(bn=Ue[je-It]),xr=kt[2*je],ie.opt_len+=xr*(Be+bn),Yo&&(ie.static_len+=xr*(Ln[2*je+1]+bn)));if(Yt!==0){do{for(Be=tt-1;ie.bl_count[Be]===0;)Be--;ie.bl_count[Be]--,ie.bl_count[Be+1]+=2,ie.bl_count[tt]--,Yt-=2}while(0<Yt);for(Be=tt;Be!==0;Be--)for(je=ie.bl_count[Be];je!==0;)_t<(We=ie.heap[--Ie])||(kt[2*We+1]!==Be&&(ie.opt_len+=(Be-kt[2*We+1])*kt[2*We],kt[2*We+1]=Be),je--)}})(R,M),ce(oe,fe,R.bl_count)}function w(R,M,re){var ne,V,oe=-1,O=M[1],L=0,te=7,fe=4;for(O===0&&(te=138,fe=3),M[2*(re+1)+1]=65535,ne=0;ne<=re;ne++)V=O,O=M[2*(ne+1)+1],++L<te&&V===O||(L<fe?R.bl_tree[2*V]+=L:V!==0?(V!==oe&&R.bl_tree[2*V]++,R.bl_tree[2*j]++):L<=10?R.bl_tree[2*S]++:R.bl_tree[2*E]++,oe=V,fe=(L=0)===O?(te=138,3):V===O?(te=6,3):(te=7,4))}function K(R,M,re){var ne,V,oe=-1,O=M[1],L=0,te=7,fe=4;for(O===0&&(te=138,fe=3),ne=0;ne<=re;ne++)if(V=O,O=M[2*(ne+1)+1],!(++L<te&&V===O)){if(L<fe)for(;X(R,V,R.bl_tree),--L!=0;);else V!==0?(V!==oe&&(X(R,V,R.bl_tree),L--),X(R,j,R.bl_tree),B(R,L-3,2)):L<=10?(X(R,S,R.bl_tree),B(R,L-3,3)):(X(R,E,R.bl_tree),B(R,L-11,7));oe=V,fe=(L=0)===O?(te=138,3):V===O?(te=6,3):(te=7,4)}}c(q);var H=!1;function z(R,M,re,ne){B(R,(u<<1)+(ne?1:0),3),(function(V,oe,O,L){pe(V),ae(V,O),ae(V,~O),i.arraySet(V.pending_buf,V.window,oe,O,V.pending),V.pending+=O})(R,M,re)}o._tr_init=function(R){H||((function(){var M,re,ne,V,oe,O=new Array(x+1);for(V=ne=0;V<d-1;V++)for(F[V]=ne,M=0;M<1<<C[V];M++)k[ne++]=V;for(k[ne-1]=V,V=oe=0;V<16;V++)for(q[V]=oe,M=0;M<1<<A[V];M++)D[oe++]=V;for(oe>>=7;V<h;V++)for(q[V]=oe<<7,M=0;M<1<<A[V]-7;M++)D[256+oe++]=V;for(re=0;re<=x;re++)O[re]=0;for(M=0;M<=143;)G[2*M+1]=8,M++,O[8]++;for(;M<=255;)G[2*M+1]=9,M++,O[9]++;for(;M<=279;)G[2*M+1]=7,M++,O[7]++;for(;M<=287;)G[2*M+1]=8,M++,O[8]++;for(ce(G,m+1,O),M=0;M<h;M++)T[2*M+1]=5,T[2*M]=_e(M,5);Q=new ue(G,C,f+1,m,x),$=new ue(T,A,0,h,x),Z=new ue(new Array(0),I,0,v,y)})(),H=!0),R.l_desc=new U(R.dyn_ltree,Q),R.d_desc=new U(R.dyn_dtree,$),R.bl_desc=new U(R.bl_tree,Z),R.bi_buf=0,R.bi_valid=0,xe(R)},o._tr_stored_block=z,o._tr_flush_block=function(R,M,re,ne){var V,oe,O=0;0<R.level?(R.strm.data_type===2&&(R.strm.data_type=(function(L){var te,fe=4093624447;for(te=0;te<=31;te++,fe>>>=1)if(1&fe&&L.dyn_ltree[2*te]!==0)return a;if(L.dyn_ltree[18]!==0||L.dyn_ltree[20]!==0||L.dyn_ltree[26]!==0)return l;for(te=32;te<f;te++)if(L.dyn_ltree[2*te]!==0)return l;return a})(R)),be(R,R.l_desc),be(R,R.d_desc),O=(function(L){var te;for(w(L,L.dyn_ltree,L.l_desc.max_code),w(L,L.dyn_dtree,L.d_desc.max_code),be(L,L.bl_desc),te=v-1;3<=te&&L.bl_tree[2*P[te]+1]===0;te--);return L.opt_len+=3*(te+1)+5+5+4,te})(R),V=R.opt_len+3+7>>>3,(oe=R.static_len+3+7>>>3)<=V&&(V=oe)):V=oe=re+5,re+4<=V&&M!==-1?z(R,M,re,ne):R.strategy===4||oe===V?(B(R,2+(ne?1:0),3),de(R,G,T)):(B(R,4+(ne?1:0),3),(function(L,te,fe,ie){var Ce;for(B(L,te-257,5),B(L,fe-1,5),B(L,ie-4,4),Ce=0;Ce<ie;Ce++)B(L,L.bl_tree[2*P[Ce]+1],3);K(L,L.dyn_ltree,te-1),K(L,L.dyn_dtree,fe-1)})(R,R.l_desc.max_code+1,R.d_desc.max_code+1,O+1),de(R,R.dyn_ltree,R.dyn_dtree)),xe(R),ne&&pe(R)},o._tr_tally=function(R,M,re){return R.pending_buf[R.d_buf+2*R.last_lit]=M>>>8&255,R.pending_buf[R.d_buf+2*R.last_lit+1]=255&M,R.pending_buf[R.l_buf+R.last_lit]=255&re,R.last_lit++,M===0?R.dyn_ltree[2*re]++:(R.matches++,M--,R.dyn_ltree[2*(k[re]+f+1)]++,R.dyn_dtree[2*W(M)]++),R.last_lit===R.lit_bufsize-1},o._tr_align=function(R){B(R,2,3),X(R,_,G),(function(M){M.bi_valid===16?(ae(M,M.bi_buf),M.bi_buf=0,M.bi_valid=0):8<=M.bi_valid&&(M.pending_buf[M.pending++]=255&M.bi_buf,M.bi_buf>>=8,M.bi_valid-=8)})(R)}},{"../utils/common":41}],53:[function(n,r,o){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,o){(function(i){(function(a,l){if(!a.setImmediate){var c,u,d,f,m=1,h={},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",_,!1):a.attachEvent("onmessage",_),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),E=0;E<S.length;E++)S[E]=arguments[E+1];var C={callback:j,args:S};return h[m]=C,c(m),m++},x.clearImmediate=b}function b(j){delete h[j]}function y(j){if(v)setTimeout(y,0,j);else{var S=h[j];if(S){v=!0;try{(function(E){var C=E.callback,A=E.args;switch(A.length){case 0:C();break;case 1:C(A[0]);break;case 2:C(A[0],A[1]);break;case 3:C(A[0],A[1],A[2]);break;default:C.apply(l,A)}})(S)}finally{b(j),v=!1}}}}function _(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 rs<"u"?rs:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ti)),ti.exports}var Sw=jw();const Cw=ug(Sw),Nw="3.0.1",Vi={version:Nw},hf="[REDACTED]",Tw=/(^|[-_])(api[-_]?key|authorization|cookie|token|secret|password|access[-_]?token|refresh[-_]?token)([-_]|$)/i,Ew=[/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],hc=200,Aw=25e6,mf=50;function Rw(e){return e<1024?`${e} chars`:e<1024*1024?`${Math.ceil(e/1024)} KB`:`${Math.ceil(e/(1024*1024))} MB`}function Iw(e){let t=0;for(const n of e)t+=n.rawRequestBody?.length??0,t+=n.responseText?.length??0;return t}function zw(e){if(e.length>hc)return`Export is limited to ${hc} logs at once. Narrow the filter and try again.`;const t=Iw(e);return t>Aw?`Export is too large (${Rw(t)} of text). Narrow the filter and try again.`:null}async function Pw(e){try{const t=await fetch(`/api/logs/${e}/chunks`);if(!t.ok)return null;const n=await t.json();return JSON.stringify(n,null,2)}catch{return null}}function Ow(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function qi(e){if(Array.isArray(e))return e.map(n=>qi(n));if(!Ow(e))return e;const t={};for(const[n,r]of Object.entries(e))t[n]=Tw.test(n)?hf:qi(r);return t}function Mw(e){const t=n=>{let r=n;for(const o of Ew)r=r.replace(o,hf);return r};try{const n=JSON.parse(e);return t(JSON.stringify(qi(n),null,2))}catch{return t(e)}}function ni(e,t){return t==="redacted"?Mw(e):e}function Lw(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 Dw(e,t,n,r=new Date().toISOString()){return{version:Vi.version,exportedAt:r,mode:t,redacted:t==="redacted",logCount:e.length,logIds:e.map(o=>o.id),streamingChunkExportLimit:mf,streamingChunkLogIds:n.map(o=>o.id)}}async function $w(e,t="redacted"){const n=zw(e);if(n!==null)return{ok:!1,message:n};const r=new Cw,o=t==="redacted"?"redacted":"raw",i=e.filter(u=>u.streaming).slice(0,mf);r.file("manifest.json",JSON.stringify(Dw(e,t,i),null,2)),r.file("logs.json",JSON.stringify(e.map(u=>Lw(u,t)),null,2));for(const u of e)u.rawRequestBody!==null&&r.file(`#${u.id}.Request.json`,ni(u.rawRequestBody,t)),u.responseText!==null&&r.file(`#${u.id}.Response.json`,ni(u.responseText,t));for(const u of i){const d=await Pw(u.id);d!==null&&r.file(`#${u.id}.SSE.Response.json`,ni(d,t))}const a=await r.generateAsync({type:"blob"}),l=URL.createObjectURL(a),c=document.createElement("a");return c.href=l,c.download=`agent-inspector-export-${o}-${new Date().toISOString().slice(0,10)}.zip`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(l),{ok:!0}}function Fw(e,t){if(e!==null){e.removeAllRanges();for(const n of t)e.addRange(n)}}function Bw(e){if(e===null)return[];const t=[];for(let n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t}function Uw(e){if(typeof document>"u")return!1;const t=document.activeElement,n=document.getSelection(),r=Bw(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),Fw(n,r),typeof HTMLElement<"u"&&t instanceof HTMLElement&&t.focus({preventScroll:!0})}return i}async function Kt(e){const t=globalThis.navigator?.clipboard;if(t!==void 0)try{return await t.writeText(e),!0}catch{}return Uw(e)}function Gi(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 Qa(e,t,n){return`${Gi(e,n)} - ${Gi(t,n)}`}function cs(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ww(e){switch(e){case"end_turn":case"tool_use":return e;default:return null}}function Hw(e){switch(e){case"stop":case"length":return e;default:return null}}function Zw(e){switch(e){case"max_output_tokens":case"max_tokens":return!0;default:return!1}}function gf(e){if(e.responseText===null)return null;try{let t=JSON.parse(e.responseText);if(typeof t=="string"&&(t=JSON.parse(t)),!cs(t))return null;if(typeof t.stop_reason=="string")return Ww(t.stop_reason);if(Array.isArray(t.choices))for(const n of t.choices){if(!cs(n)||typeof n.finish_reason!="string")continue;const r=Hw(n.finish_reason);if(r!==null)return r}if(Array.isArray(t.output)){for(const n of t.output)if(cs(n)&&n.type==="function_call")return"tool_use";if(t.status==="completed")return"stop"}if(t.status==="incomplete"&&cs(t.incomplete_details)){const n=t.incomplete_details.reason;if(typeof n=="string"&&Zw(n))return"length"}return null}catch{return null}}function el(e){return e==="end_turn"||e==="stop"||e==="length"}function xf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=xf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bf(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=xf(e))&&(r&&(r+=" "),r+=t);return r}const Vw=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},qw=(e,t)=>({classGroupId:e,validator:t}),vf=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qs="-",mc=[],Gw="arbitrary..",Kw=e=>{const t=Yw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Jw(a);const l=a.split(qs),c=l[0]===""&&l.length>1?1:0;return yf(l,c,t)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=r[a],u=n[a];return c?u?Vw(u,c):c:u||mc}return n[a]||mc}}},yf=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const u=yf(e,t+1,i);if(u)return u}const a=n.validators;if(a===null)return;const l=t===0?e.join(qs):e.slice(t).join(qs),c=a.length;for(let u=0;u<c;u++){const d=a[u];if(d.validator(l))return d.classGroupId}},Jw=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Gw+r:void 0})(),Yw=e=>{const{theme:t,classGroups:n}=e;return Xw(n,t)},Xw=(e,t)=>{const n=vf();for(const r in e){const o=e[r];tl(o,n,r,t)}return n},tl=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];Qw(a,t,n,r)}},Qw=(e,t,n,r)=>{if(typeof e=="string"){ek(e,t,n);return}if(typeof e=="function"){tk(e,t,n,r);return}nk(e,t,n,r)},ek=(e,t,n)=>{const r=e===""?t:wf(t,e);r.classGroupId=n},tk=(e,t,n,r)=>{if(rk(e)){tl(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(qw(n,e))},nk=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[l,c]=o[a];tl(c,wf(t,l),n,r)}},wf=(e,t)=>{let n=e;const r=t.split(qs),o=r.length;for(let i=0;i<o;i++){const a=r[i];let l=n.nextPart.get(a);l||(l=vf(),n.nextPart.set(a,l)),n=l}return n},rk=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,sk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},Ki="!",gc=":",ok=[],xc=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),ik=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=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===gc){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 m=f,h=!1;f.endsWith(Ki)?(m=f.slice(0,-1),h=!0):f.startsWith(Ki)&&(m=f.slice(1),h=!0);const v=u&&u>c?u-c:void 0;return xc(i,h,m,v)};if(t){const o=t+gc,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):xc(ok,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},ak=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];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(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},lk=e=>({cache:sk(e.cacheSize),parseClassName:ik(e),sortModifiers:ak(e),...Kw(e)}),ck=/\s+/,uk=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],l=e.trim().split(ck);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:m,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:g}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let x=!!g,b=r(x?v.substring(0,g):v);if(!b){if(!x){c=d+(c.length>0?" "+c:c);continue}if(b=r(v),!b){c=d+(c.length>0?" "+c:c);continue}x=!1}const y=m.length===0?"":m.length===1?m[0]:i(m).join(":"),_=h?y+Ki:y,j=_+b;if(a.indexOf(j)>-1)continue;a.push(j);const S=o(b,x);for(let E=0;E<S.length;++E){const C=S[E];a.push(_+C)}c=d+(c.length>0?" "+c:c)}return c},dk=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=kf(n))&&(o&&(o+=" "),o+=r);return o},kf=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=kf(e[r]))&&(n&&(n+=" "),n+=t);return n},fk=(e,...t)=>{let n,r,o,i;const a=c=>{const u=t.reduce((d,f)=>f(d),e());return n=lk(u),r=n.cache.get,o=n.cache.set,i=l,l(c)},l=c=>{const u=r(c);if(u)return u;const d=uk(c,n);return o(c,d),d};return i=a,(...c)=>i(dk(...c))},pk=[],Ye=e=>{const t=n=>n[e]||pk;return t.isThemeGetter=!0,t},_f=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hk=/^\d+\/\d+$/,mk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gk=/\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$/,xk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,bk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dn=e=>hk.test(e),Re=e=>!!e&&!Number.isNaN(Number(e)),Xt=e=>!!e&&Number.isInteger(Number(e)),ri=e=>e.endsWith("%")&&Re(e.slice(0,-1)),Wt=e=>mk.test(e),yk=()=>!0,wk=e=>gk.test(e)&&!xk.test(e),Sf=()=>!1,kk=e=>bk.test(e),_k=e=>vk.test(e),jk=e=>!ve(e)&&!ye(e),Sk=e=>fr(e,Tf,Sf),ve=e=>_f.test(e),vn=e=>fr(e,Ef,wk),si=e=>fr(e,Ak,Re),bc=e=>fr(e,Cf,Sf),Ck=e=>fr(e,Nf,_k),us=e=>fr(e,Af,kk),ye=e=>jf.test(e),br=e=>pr(e,Ef),Nk=e=>pr(e,Rk),vc=e=>pr(e,Cf),Tk=e=>pr(e,Tf),Ek=e=>pr(e,Nf),ds=e=>pr(e,Af,!0),fr=(e,t,n)=>{const r=_f.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},pr=(e,t,n=!1)=>{const r=jf.exec(e);return r?r[1]?t(r[1]):n:!1},Cf=e=>e==="position"||e==="percentage",Nf=e=>e==="image"||e==="url",Tf=e=>e==="length"||e==="size"||e==="bg-size",Ef=e=>e==="length",Ak=e=>e==="number",Rk=e=>e==="family-name",Af=e=>e==="shadow",Ik=()=>{const e=Ye("color"),t=Ye("font"),n=Ye("text"),r=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"),m=Ye("text-shadow"),h=Ye("drop-shadow"),v=Ye("blur"),g=Ye("perspective"),x=Ye("aspect"),b=Ye("ease"),y=Ye("animate"),_=()=>["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(),ye,ve],E=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],A=()=>[ye,ve,c],I=()=>[Dn,"full","auto",...A()],P=()=>[Xt,"none","subgrid",ye,ve],G=()=>["auto",{span:["full",Xt,ye,ve]},Xt,ye,ve],T=()=>[Xt,"auto",ye,ve],D=()=>["auto","min","max","fr",ye,ve],k=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],Q=()=>["auto",...A()],$=()=>[Dn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],Z=()=>[e,ye,ve],q=()=>[...j(),vc,bc,{position:[ye,ve]}],ue=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",Tk,Sk,{size:[ye,ve]}],W=()=>[ri,br,vn],ae=()=>["","none","full",u,ye,ve],B=()=>["",Re,br,vn],X=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>[Re,ri,vc,bc],xe=()=>["","none",v,ye,ve],pe=()=>["none",Re,ye,ve],ge=()=>["none",Re,ye,ve],se=()=>[Re,ye,ve],de=()=>[Dn,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Wt],breakpoint:[Wt],color:[yk],container:[Wt],"drop-shadow":[Wt],ease:["in","out","in-out"],font:[jk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Wt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Wt],shadow:[Wt],spacing:["px",Re],text:[Wt],"text-shadow":[Wt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Dn,ve,ye,x]}],container:["container"],columns:[{columns:[Re,ve,ye,l]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Xt,"auto",ye,ve]}],basis:[{basis:[Dn,"full","auto",l,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,Dn,"auto","initial","none",ve]}],grow:[{grow:["",Re,ye,ve]}],shrink:[{shrink:["",Re,ye,ve]}],order:[{order:[Xt,"first","last","none",ye,ve]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...k(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...k()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"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,br,vn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ye,si]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ri,ve]}],"font-family":[{font:[Nk,ve,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,ye,ve]}],"line-clamp":[{"line-clamp":[Re,"none",ye,si]}],leading:[{leading:[i,...A()]}],"list-image":[{"list-image":["none",ye,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",ye,vn]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[Re,"auto",ye,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ve]}],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",ye,ve]}],"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:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Xt,ye,ve],radial:["",ye,ve],conic:[Xt,ye,ve]},Ek,Ck]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,ye,ve]}],"outline-w":[{outline:["",Re,br,vn]}],"outline-color":[{outline:Z()}],shadow:[{shadow:["","none",d,ds,us]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",f,ds,us]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[Re,vn]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":Z()}],"text-shadow":[{"text-shadow":["none",m,ds,us]}],"text-shadow-color":[{"text-shadow":Z()}],opacity:[{opacity:[Re,ye,ve]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"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":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":Z()}],"mask-image-linear-to-color":[{"mask-linear-to":Z()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":Z()}],"mask-image-t-to-color":[{"mask-t-to":Z()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":Z()}],"mask-image-r-to-color":[{"mask-r-to":Z()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":Z()}],"mask-image-b-to-color":[{"mask-b-to":Z()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":Z()}],"mask-image-l-to-color":[{"mask-l-to":Z()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":Z()}],"mask-image-x-to-color":[{"mask-x-to":Z()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":Z()}],"mask-image-y-to-color":[{"mask-y-to":Z()}],"mask-image-radial":[{"mask-radial":[ye,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":Z()}],"mask-image-radial-to-color":[{"mask-radial-to":Z()}],"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":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":Z()}],"mask-image-conic-to-color":[{"mask-conic-to":Z()}],"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:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ve]}],filter:[{filter:["","none",ye,ve]}],blur:[{blur:xe()}],brightness:[{brightness:[Re,ye,ve]}],contrast:[{contrast:[Re,ye,ve]}],"drop-shadow":[{"drop-shadow":["","none",h,ds,us]}],"drop-shadow-color":[{"drop-shadow":Z()}],grayscale:[{grayscale:["",Re,ye,ve]}],"hue-rotate":[{"hue-rotate":[Re,ye,ve]}],invert:[{invert:["",Re,ye,ve]}],saturate:[{saturate:[Re,ye,ve]}],sepia:[{sepia:["",Re,ye,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ve]}],"backdrop-blur":[{"backdrop-blur":xe()}],"backdrop-brightness":[{"backdrop-brightness":[Re,ye,ve]}],"backdrop-contrast":[{"backdrop-contrast":[Re,ye,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,ye,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,ye,ve]}],"backdrop-invert":[{"backdrop-invert":["",Re,ye,ve]}],"backdrop-opacity":[{"backdrop-opacity":[Re,ye,ve]}],"backdrop-saturate":[{"backdrop-saturate":[Re,ye,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,ye,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",ye,ve]}],ease:[{ease:["linear","initial",b,ye,ve]}],delay:[{delay:[Re,ye,ve]}],animate:[{animate:["none",y,ye,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,ye,ve]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[ye,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"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",ye,ve]}],"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":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",ye,ve]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[Re,br,vn,si]}],stroke:[{stroke:["none",...Z()]}],"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"]}},zk=fk(Ik);function le(...e){return zk(bf(e))}function De(e){return e>=1e6?(e/1e6).toFixed(1).replace(/\.0$/,"")+"M":(e/1e3).toFixed(1).replace(/\.0$/,"")+"K"}function Rf(e){return e>=1024*1024?(e/(1024*1024)).toFixed(1).replace(/\.0$/,"")+"M":(e/1024).toFixed(1).replace(/\.0$/,"")+"K"}function yc(e,t,n){const r=e*10;return!Number.isSafeInteger(r)||r%t!==0?null:(r/t/10).toFixed(1).replace(/\.0$/,"")+n}function Pk(e){if(!Number.isSafeInteger(e)||e<=0)return e.toString();if(e>=1024*1024){const n=yc(e,1048576,"M");if(n!==null)return n}const t=yc(e,1024,"K");return t!==null?t:e.toString()}function Ok(e){if(e===void 0||e==="")return 1;switch(e.toLowerCase()){case"k":return 1024;case"m":return 1024*1024;default:return null}}function Gs(e){const t=e.trim().replaceAll(",","");if(t==="")return null;const n=/^(\d+(?:\.\d+)?)\s*([kKmM])?$/.exec(t);if(n===null)return null;const r=n[1];if(r===void 0)return null;const o=Number(r),i=n[2],a=Ok(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 Mk(e){return e===null?"pending":e>=200&&e<300?"success":e>=400&&e<500?"client_error":e>=500?"server_error":"pending"}const Lk=Y({model:N().min(1),contextWindow:J().int().positive().optional(),outputLimit:J().int().positive().optional(),source:Ee(["manual","registry"]).optional(),sourceUrl:N().optional(),updatedAt:N().optional()}),Ks=Y({id:N(),name:N(),apiKey:N(),model:N().optional(),models:me(N()).min(1),format:Ee(["anthropic","openai"]).optional(),baseUrl:N().optional(),anthropicBaseUrl:N().optional(),openaiBaseUrl:N().optional(),openaiResponsesBaseUrl:N().optional(),authHeader:Ee(["bearer","x-api-key"]).optional().default("bearer"),apiDocsUrl:N().optional(),modelMetadataUrl:N().optional(),modelMetadata:me(Lk).optional(),source:Ee(["company","personal"]).optional(),createdAt:N(),updatedAt:N()});async function Dk(e){return cn(e,Ks.array(),void 0,t=>`Failed to fetch ${e}: ${t.status}`)}function If(){const e=In("/api/providers?includeSecrets=1",Dk,{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 wc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zf(...e){return t=>{let n=!1;const r=e.map(o=>{const i=wc(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():wc(e[o],null)}}}}function Le(...e){return p.useCallback(zf(...e),e)}function $k(e,t){const n=p.createContext(t),r=i=>{const{children:a,...l}=i,c=p.useMemo(()=>l,Object.values(l));return s.jsx(n.Provider,{value:c,children:a})};r.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[r,o]}function Jt(e,t=[]){let n=[];function r(i,a){const l=p.createContext(a),c=n.length;n=[...n,a];const u=f=>{const{scope:m,children:h,...v}=f,g=m?.[e]?.[c]||l,x=p.useMemo(()=>v,Object.values(v));return s.jsx(g.Provider,{value:x,children:h})};u.displayName=i+"Provider";function d(f,m){const h=m?.[e]?.[c]||l,v=p.useContext(h);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,[r,Fk(o,...t)]}function Fk(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.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 Qe=globalThis?.document?p.useLayoutEffect:()=>{},Bk=rd[" useId ".trim().toString()]||(()=>{}),Uk=0;function Mt(e){const[t,n]=p.useState(Bk());return Qe(()=>{n(r=>r??String(Uk++))},[e]),e||(t?`radix-${t}`:"")}var Wk=rd[" useInsertionEffect ".trim().toString()]||Qe;function Nn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=Hk({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(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const u=p.useCallback(d=>{if(l){const f=Zk(d)?d(e):d;f!==e&&a.current?.(f)}else i(d)},[l,e,i,a]);return[c,u]}function Hk({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),o=p.useRef(n),i=p.useRef(t);return Wk(()=>{i.current=t},[t]),p.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function Zk(e){return typeof e=="function"}function ir(e){const t=qk(e),n=p.forwardRef((r,o)=>{const{children:i,...a}=r,l=p.Children.toArray(i),c=l.find(Kk);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 s.jsx(t,{...a,ref:o,children:p.isValidElement(u)?p.cloneElement(u,void 0,d):null})}return s.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var Vk=ir("Slot");function qk(e){const t=p.forwardRef((n,r)=>{const{children:o,...i}=n;if(p.isValidElement(o)){const a=Yk(o),l=Jk(i,o.props);return o.type!==p.Fragment&&(l.ref=r?zf(r,a):a),p.cloneElement(o,l)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pf=Symbol("radix.slottable");function Gk(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Pf,t}function Kk(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pf}function Jk(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const c=i(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Yk(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 Xk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=Xk.reduce((e,t)=>{const n=ir(`Primitive.${t}`),r=p.forwardRef((o,i)=>{const{asChild:a,...l}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Qk(e,t){e&&Hr.flushSync(()=>e.dispatchEvent(t))}function it(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>t.current?.(...n),[])}function e_(e,t=globalThis?.document){const n=it(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var t_="DismissableLayer",Ji="dismissableLayer.update",n_="dismissableLayer.pointerDownOutside",r_="dismissableLayer.focusOutside",kc,Of=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),No=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...c}=e,u=p.useContext(Of),[d,f]=p.useState(null),m=d?.ownerDocument??globalThis?.document,[,h]=p.useState({}),v=Le(t,C=>f(C)),g=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(x),y=d?g.indexOf(d):-1,_=u.layersWithOutsidePointerEventsDisabled.size>0,j=y>=b,S=i_(C=>{const A=C.target,I=[...u.branches].some(P=>P.contains(A));!j||I||(o?.(C),a?.(C),C.defaultPrevented||l?.())},m),E=a_(C=>{const A=C.target;[...u.branches].some(P=>P.contains(A))||(i?.(C),a?.(C),C.defaultPrevented||l?.())},m);return e_(C=>{y===u.layers.size-1&&(r?.(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},m),p.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(kc=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),_c(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=kc)}},[d,m,n,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),_c())},[d,u]),p.useEffect(()=>{const C=()=>h({});return document.addEventListener(Ji,C),()=>document.removeEventListener(Ji,C)},[]),s.jsx(Ae.div,{...c,ref:v,style:{pointerEvents:_?j?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,S.onPointerDownCapture)})});No.displayName=t_;var s_="DismissableLayerBranch",o_=p.forwardRef((e,t)=>{const n=p.useContext(Of),r=p.useRef(null),o=Le(t,r);return p.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),s.jsx(Ae.div,{...e,ref:o})});o_.displayName=s_;function i_(e,t=globalThis?.document){const n=it(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){Mf(n_,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function a_(e,t=globalThis?.document){const n=it(e),r=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!r.current&&Mf(r_,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function _c(){const e=new CustomEvent(Ji);document.dispatchEvent(e)}function Mf(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Qk(o,i):o.dispatchEvent(i)}var oi="focusScope.autoFocusOnMount",ii="focusScope.autoFocusOnUnmount",jc={bubbles:!1,cancelable:!0},l_="FocusScope",nl=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,c]=p.useState(null),u=it(o),d=it(i),f=p.useRef(null),m=Le(t,g=>c(g)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let g=function(_){if(h.paused||!l)return;const j=_.target;l.contains(j)?f.current=j:nn(f.current,{select:!0})},x=function(_){if(h.paused||!l)return;const j=_.relatedTarget;j!==null&&(l.contains(j)||nn(f.current,{select:!0}))},b=function(_){if(document.activeElement===document.body)for(const S of _)S.removedNodes.length>0&&nn(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()}}},[r,l,h.paused]),p.useEffect(()=>{if(l){Cc.add(h);const g=document.activeElement;if(!l.contains(g)){const b=new CustomEvent(oi,jc);l.addEventListener(oi,u),l.dispatchEvent(b),b.defaultPrevented||(c_(h_(Lf(l)),{select:!0}),document.activeElement===g&&nn(l))}return()=>{l.removeEventListener(oi,u),setTimeout(()=>{const b=new CustomEvent(ii,jc);l.addEventListener(ii,d),l.dispatchEvent(b),b.defaultPrevented||nn(g??document.body,{select:!0}),l.removeEventListener(ii,d),Cc.remove(h)},0)}}},[l,u,d,h]);const v=p.useCallback(g=>{if(!n&&!r||h.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(x&&b){const y=g.currentTarget,[_,j]=u_(y);_&&j?!g.shiftKey&&b===j?(g.preventDefault(),n&&nn(_,{select:!0})):g.shiftKey&&b===_&&(g.preventDefault(),n&&nn(j,{select:!0})):b===y&&g.preventDefault()}},[n,r,h.paused]);return s.jsx(Ae.div,{tabIndex:-1,...a,ref:m,onKeyDown:v})});nl.displayName=l_;function c_(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(nn(r,{select:t}),document.activeElement!==n)return}function u_(e){const t=Lf(e),n=Sc(t,e),r=Sc(t.reverse(),e);return[n,r]}function Lf(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Sc(e,t){for(const n of e)if(!d_(n,{upTo:t}))return n}function d_(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 f_(e){return e instanceof HTMLInputElement&&"select"in e}function nn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&f_(e)&&t&&e.select()}}var Cc=p_();function p_(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Nc(e,t),e.unshift(t)},remove(t){e=Nc(e,t),e[0]?.resume()}}}function Nc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function h_(e){return e.filter(t=>t.tagName!=="A")}var m_="Portal",To=p.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=p.useState(!1);Qe(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?dg.createPortal(s.jsx(Ae.div,{...r,ref:t}),a):null});To.displayName=m_;function g_(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var vt=e=>{const{present:t,children:n}=e,r=x_(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=Le(r.ref,b_(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};vt.displayName="Presence";function x_(e){const[t,n]=p.useState(),r=p.useRef(null),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[l,c]=g_(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=fs(r.current);i.current=l==="mounted"?u:"none"},[l]),Qe(()=>{const u=r.current,d=o.current;if(d!==e){const m=i.current,h=fs(u);e?c("MOUNT"):h==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Qe(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=h=>{const g=fs(r.current).includes(CSS.escape(h.animationName));if(h.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)})}},m=h=>{h.target===t&&(i.current=fs(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function fs(e){return e?.animationName||"none"}function b_(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 ai=0;function Df(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Tc()),document.body.insertAdjacentElement("beforeend",e[1]??Tc()),ai++,()=>{ai===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ai--}},[])}function Tc(){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 zt=function(){return zt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},zt.apply(this,arguments)};function $f(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function v_(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var zs="right-scroll-bar-position",Ps="width-before-scroll-bar",y_="with-scroll-bars-hidden",w_="--removed-body-scroll-bar-size";function li(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function k_(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var __=typeof window<"u"?p.useLayoutEffect:p.useEffect,Ec=new WeakMap;function j_(e,t){var n=k_(null,function(r){return e.forEach(function(o){return li(o,r)})});return __(function(){var r=Ec.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(l){i.has(l)||li(l,null)}),i.forEach(function(l){o.has(l)||li(l,a)})}Ec.set(n,e)},[e]),n}function S_(e){return e}function C_(e,t){t===void 0&&(t=S_);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!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 N_(e){e===void 0&&(e={});var t=C_(null);return t.options=zt({async:!0,ssr:!1},e),t}var Ff=function(e){var t=e.sideCar,n=$f(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,zt({},n))};Ff.isSideCarExport=!0;function T_(e,t){return e.useMedium(t),Ff}var Bf=N_(),ci=function(){},Eo=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:ci,onWheelCapture:ci,onTouchMoveCapture:ci}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,h=e.noRelative,v=e.noIsolation,g=e.inert,x=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,_=e.gapMode,j=$f(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,E=j_([n,t]),C=zt(zt({},j),o);return p.createElement(p.Fragment,null,d&&p.createElement(S,{sideCar:Bf,removeScrollBar:u,shards:f,noRelative:h,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:_}),a?p.cloneElement(p.Children.only(l),zt(zt({},C),{ref:E})):p.createElement(y,zt({},C,{className:c,ref:E}),l))});Eo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Eo.classNames={fullWidth:Ps,zeroRight:zs};var E_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function A_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=E_();return t&&e.setAttribute("nonce",t),e}function R_(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function I_(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var z_=function(){var e=0,t=null;return{add:function(n){e==0&&(t=A_())&&(R_(t,n),I_(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},P_=function(){var e=z_();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Uf=function(){var e=P_(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},O_={left:0,top:0,right:0,gap:0},ui=function(e){return parseInt(e||"",10)||0},M_=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ui(n),ui(r),ui(o)]},L_=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return O_;var t=M_(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},D_=Uf(),Qn="data-scroll-locked",$_=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),`
42
42
  .`.concat(y_,` {
43
43
  overflow: hidden `).concat(r,`;
44
44
  padding-right: `).concat(l,"px ").concat(r,`;
@@ -92,7 +92,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
92
92
  `)}function xi(e,t,n,r){return{role:e,label:t,text:n,size:Rl(n),characters:Il(n),path:r}}const BN={format:"anthropic",analyzeRequest(e){if(e===null)return jn(e);try{const t=Bd.safeParse(JSON.parse(e));return t.success?{parsed:t.data,comparisonValue:t.data,messageCount:t.data.messages.length,toolCount:t.data.tools!==void 0&&t.data.tools.length>0?t.data.tools.length:null}:jn(e)}catch{return jn(e)}},analyzeResponse(e){if(e===null)return tr;try{let t=JSON.parse(e);typeof t=="string"&&(t=JSON.parse(t));const n=Ud.safeParse(t);if(!n.success)return tr;const r=n.data.content.filter(o=>o.type==="tool_use").map(o=>o.name);return{parsed:n.data,toolNames:r.length>0?r:null}}catch{return tr}},anatomySegments(e){if(e===null||typeof e!="object")return null;const t=e,n=[];if(t.system!==void 0){const r=$N(t.system);r.length>0&&n.push(xi("system","system",r,"/system"))}if(Array.isArray(t.messages)&&t.messages.forEach((r,o)=>{if(r===null||typeof r!="object")return;const i=r,a=i.role==="user"||i.role==="assistant"?i.role:"user",l=DN(i.content);n.push(xi(a,`[${o}] ${a}`,l,`/messages/${o}`))}),Array.isArray(t.tools)&&t.tools.length>0){const r=FN(t.tools);n.push(xi("tools","tools",r,"/tools"))}return n.length>0?n:null}};function zl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function we(e,t){return e===null||typeof e!="object"||Array.isArray(e)?void 0:Object.getOwnPropertyDescriptor(e,t)?.value}function fa(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 r=n,o=r.type;(o==="text"||o==="input_text"||o==="output_text")&&typeof r.text=="string"?t.push(r.text):(o==="image_url"||o==="input_image")&&t.push("[image]")}return t.join(`
93
93
  `)}function UN(e){const t=[],n=fa(e.content);n.length>0&&t.push(n);const r=typeof e.reasoning_content=="string"?e.reasoning_content:typeof e.thinking=="string"?e.thinking:typeof e.think=="string"?e.think:"";r.length>0&&t.push(r);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 WN(e){if(!Array.isArray(e))return"";const t=[];for(const n of e){if(n===null||typeof n!="object")continue;const r=we(n,"function"),o=we(r,"name")??we(n,"name"),i=we(r,"description")??we(n,"description"),a=we(r,"parameters")??we(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 HN(e){return typeof e=="string"?e.length>0?1:0:Array.isArray(e)?e.length:e==null?null:1}function ZN(e){if(typeof e=="string")return e;const t=we(e,"text");if(typeof t=="string")return t;const n=fa(we(e,"content"));if(n.length>0)return n;const r=fa(we(e,"output"));if(r.length>0)return r;const o=we(e,"arguments");return typeof o=="string"?o:""}function VN(e){const t=we(e,"role");if(t==="system"||t==="user"||t==="assistant"||t==="tool")return t;const n=we(e,"type");return n==="function_call_output"?"tool":"user"}function qN(e){const t=we(e,"output");if(!Array.isArray(t))return[];const n=[];for(const r of t){if(we(r,"type")!=="function_call")continue;const o=we(r,"name");typeof o=="string"&&o.length>0&&n.push(o)}return n}function vr(e,t,n,r){return{role:e,label:t,text:n,size:Rl(n),characters:Il(n),path:r}}const GN={format:"openai",analyzeRequest(e){if(e===null)return jn(e);try{const t=Zd.safeParse(JSON.parse(e));if(!t.success){const n=Vd.safeParse(JSON.parse(e));return n.success?{parsed:n.data,comparisonValue:n.data,messageCount:HN(n.data.input),toolCount:n.data.tools!==void 0&&n.data.tools.length>0?n.data.tools.length:null}:jn(e)}return{parsed:t.data,comparisonValue:t.data,messageCount:t.data.messages.length,toolCount:t.data.tools!==void 0&&t.data.tools.length>0?t.data.tools.length:null}}catch{return jn(e)}},analyzeResponse(e){if(e===null)return tr;const t=Gd(e);if(t===null){const r=Kd(e);if(r===null)return tr;const o=qN(r);return{parsed:r,toolNames:o.length>0?o:null}}const n=t.choices[0]?.message?.tool_calls?.map(r=>r.function?.name??"").filter(r=>r!=="")??[];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(vr("system","instructions",t.instructions,"/instructions")),Array.isArray(t.messages)&&t.messages.forEach((r,o)=>{if(r===null||typeof r!="object")return;const i=r,a=i.role==="user"||i.role==="assistant"||i.role==="system"||i.role==="tool"?i.role:"user",l=UN(i);n.push(vr(a,`[${o}] ${a}`,l,`/messages/${o}`))}),Array.isArray(t.messages)||(typeof t.input=="string"&&t.input.length>0?n.push(vr("user","input",t.input,"/input")):Array.isArray(t.input)&&t.input.forEach((r,o)=>{const i=VN(r),a=ZN(r);n.push(vr(i,`[${o}] ${i}`,a,`/input/${o}`))})),Array.isArray(t.tools)&&t.tools.length>0){const r=WN(t.tools);n.push(vr("tools","tools",r,"/tools"))}return n.length>0?n:null}},KN={format:"unknown",analyzeRequest(e){return jn(e)},analyzeResponse(){return tr},anatomySegments(){return null}},JN={anthropic:BN,openai:GN,unknown:KN};function om(e){return JN[e]}function $r(e){const t=uN(e.path);return t==="unknown"?e.apiFormat:t}const Kc="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 bi({icon:e,children:t,title:n,className:r}){return s.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",r),title:n,children:[e,s.jsx("span",{className:"min-w-0 font-mono tabular-nums",children:t})]})}function YN(){return s.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:[s.jsx(st,{className:"size-3 animate-spin"}),"Turn open"]})}function XN({conversationId:e,startTime:t,endTime:n,totalCalls:r,totalInputTokens:o,totalOutputTokens:i,expanded:a,onToggle:l,providers:c,isLoading:u=!1,userAgent:d,clientPid:f,clientProjectFolder:m,showClientIdentity:h=!0,showProcessMetadata:v=!0,timeDisplayFormat:g,onClear:x}){const[b,y]=p.useState(!1),_=F=>{F.stopPropagation(),x!==void 0&&y(!0)},j=p.useCallback(F=>{F.stopPropagation(),window.open(sd(e),"_blank","noopener,noreferrer")},[e]),S=c?.map(({provider:F,models:Q})=>({provider:F,tooltip:Q.length===1?Q[0]??F:Q.join(", ")}))??[],E=cl({userAgent:d,conversationId:e,clientProjectFolder:m}),C=Ro(E),A=d!=null&&d!=="",I=C??d??null,P=C!==null&&A?`${C} - ${d}`:null,G=e.startsWith("PID:")||e.includes("|"),T=e.length>24?e.slice(0,12)+"..."+e.slice(-12):e,D=Qa(t,n,g),k=`${r} call${r!==1?"s":""}`;return s.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:[s.jsx(rN,{items:S,ariaLabel:"Models used in this session",className:"mt-0.5"}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsxs("span",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[G&&v?f!=null?s.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]}):s.jsx("span",{className:"min-w-0 max-w-full truncate font-mono text-xs font-semibold text-violet-200",title:e,children:e}):s.jsx("span",{className:"min-w-0 max-w-full truncate font-mono text-xs font-semibold text-violet-200",title:e,children:G?"sessionless":T}),!G&&v&&f!==null&&f!==void 0&&s.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]}),G&&v&&m!==null&&m!==void 0&&m!==""&&s.jsx("span",{className:"min-w-0 max-w-[240px] truncate font-mono text-xs text-muted-foreground",title:m,children:m}),h&&I!==null&&I!==""&&s.jsxs("span",{className:"bg-white/[0.045] inline-flex h-6 max-w-[180px] shrink-0 items-center gap-1 rounded-md px-1.5 text-xs text-muted-foreground",title:P??I,children:[s.jsx(ul,{client:E,className:"size-4 shrink-0"}),s.jsx("span",{className:"truncate font-mono tabular-nums",children:I})]}),u&&s.jsx(YN,{})]}),s.jsxs("span",{className:"mt-1.5 flex min-w-0 flex-wrap items-center gap-1.5",children:[s.jsx(bi,{icon:s.jsx(Zt,{className:"size-3 shrink-0"}),title:D,children:D}),s.jsx(bi,{icon:s.jsx(Co,{className:"size-3 shrink-0"}),children:k}),s.jsxs(bi,{icon:s.jsx(Mr,{className:"size-3 shrink-0"}),className:"max-w-full",children:[s.jsx("span",{className:"text-blue-400",children:De(o)})," / ",s.jsx("span",{className:"text-amber-400",children:De(i)})]})]})]}),s.jsxs("span",{className:"flex shrink-0 items-start gap-1.5",children:[s.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:Kc,children:s.jsx(Ga,{className:"size-3.5"})}),x!==void 0&&s.jsx("button",{type:"button",onClick:_,"aria-label":`Clear group (${r} request${r!==1?"s":""})`,title:"Clear this group",className:Kc,children:s.jsx(Cn,{className:"size-3.5"})}),s.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?s.jsx(at,{className:"size-4 shrink-0"}):u?s.jsx(st,{className:"size-4 shrink-0 animate-spin"}):s.jsx(At,{className:"size-4 shrink-0"})})]}),u&&s.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:s.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)]"})}),s.jsx(up,{open:b,onOpenChange:y,title:"Clear this group?",description:`This will remove ${r} request${r!==1?"s":""} from this conversation. This action cannot be undone.`,confirmLabel:"Clear",variant:"destructive",onConfirm:()=>{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 r=t?`PID:${e.clientPid}`:"unknown",o=n?e.clientProjectFolder:"no-folder";return`${r}|${o}`}function e3(e){const t=new Map;for(const r of e){const o=QN(r),i=t.get(o);i!==void 0?i.push(r):t.set(o,[r])}const n=[];for(const[r,o]of t){const i=[...o].sort((a,l)=>a.timestamp.localeCompare(l.timestamp));n.push({id:r,conversationId:r,logs:i})}return n.sort((r,o)=>(r.logs[0]?.timestamp??"").localeCompare(o.logs[0]?.timestamp??"")),n}function t3(e,t,n){const r=new Array(e);return new Proxy(r,{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 Un(e,t,n){let r=n.initialDeps??[],o,i=!0;function a(){const l=e();return(l.length!==r.length||l.some((u,d)=>r[d]!==u))&&(r=l,o=t(...l),n?.onChange&&!(i&&n.skipInitialOnChange)&&n.onChange(o),i=!1),o}return a.updateDeps=l=>{r=l},a}function Jc(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Yc=(e,t)=>Math.abs(e-t)<1.01,n3=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,o),n)}};let yr;const Xc=()=>{if(yr!==void 0)return yr;if(typeof navigator>"u")return yr=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return yr=!0;const e=navigator.maxTouchPoints;return yr=navigator.platform==="MacIntel"&&e!==void 0&&e>0},Qc=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},r3=e=>e,s3=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,o=new Array(r);for(let i=0;i<r;i++)o[i]=t+i;return o},o3=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=a=>{const{width:l,height:c}=a;t({width:Math.round(l),height:Math.round(c)})};if(o(Qc(n)),!r.ResizeObserver)return()=>{};const i=new r.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(Qc(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},Fr={passive:!0},i3=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=()=>{t({width:n.innerWidth,height:n.innerHeight})};return r(),n.addEventListener("resize",r,Fr),()=>{n.removeEventListener("resize",r)}},a3=typeof window>"u"?!0:"onscrollend"in window,im=(e,t,n)=>{const r=e.scrollElement;if(!r)return;const o=e.targetWindow;if(!o)return;const i=e.options.useScrollendEvent&&a3;let a=0;const l=i?null:n3(o,()=>t(a,!1),e.options.isScrollingResetDelay),c=f=>()=>{a=n(r),l?.(),t(a,f)},u=c(!0),d=c(!1);return r.addEventListener("scroll",u,Fr),i&&r.addEventListener("scrollend",d,Fr),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",d)}},l3=(e,t)=>im(e,t,n=>{const{horizontal:r,isRtl:o}=e.options;return r?n.scrollLeft*(o&&-1||1):n.scrollTop}),c3=(e,t)=>im(e,t,n=>e.options.horizontal?n.scrollX:n.scrollY),u3=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},am=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;(i=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[r.options.horizontal?"left":"top"]:e+t,behavior:n})},d3=am,f3=am;class p3{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,r,o;return((o=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:o.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>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=r())==null||o.disconnect(),n=null},observe:o=>{var i;return(i=r())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=r())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{var r,o;const i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:r3,rangeExtractor:s3,onChange:()=>{},measureElement:u3,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(),m=u>0?((r=f[0])==null?void 0:r.key)??a.getItemKey(0):null,h=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)!==m||i.getItemKey(d-1)!==h)){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)!==h)&&(c=b)}}this.options=i,(l||c)&&(this.pendingScrollAnchor=[l?.[0]??null,l?.[1]??0,c])},this.notify=n=>{var r,o;(o=(r=this.options).onChange)==null||o.call(r,this,n)},this.maybeNotify=Un(()=>(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 r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}if(this.scrollElement=r,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,!(!Xc()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,Fr),i.addEventListener("touchend",l,Fr),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 m=f.start+a-this.getScrollOffset();Yc(m,0)||this.applyScrollAdjustment(m)}}l&&this.scrollToEnd({behavior:l})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),r=this.getMaxScrollOffset();if(n<0||n>r)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,r)=>{const o=new Map,i=new Map;for(let a=r-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=Un(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(n,r,o,i,a,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMin=null,{count:n,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:a,lanes:l,laneAssignmentMode:c}),{key:!1}),this.getMeasurements=Un(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:r,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 _=new Float64Array(g);x&&f>0&&_.set(x.subarray(0,f*2)),x=_,this._flatMeasurements=x}let b;if(f===0)b=r+o;else{const _=f-1;b=x[_*2]+x[_*2+1]+v}for(let _=f;_<n;_++){const j=i(_),S=d.get(j),E=typeof S=="number"?S:this.options.estimateSize(_);x[_*2]=b,x[_*2+1]=E,b+=E+v}const y=t3(n,x,i);return this.measurementsCache=y,y}const m=this.measurementsCache.slice(0,f),h=new Array(l).fill(void 0);for(let v=0;v<f;v++){const g=m[v];g&&(h[g.lane]=v)}for(let v=f;v<n;v++){const g=i(v),x=this.laneAssignments.get(v);let b,y;const _=c==="estimate"||d.has(g);if(x!==void 0&&this.options.lanes>1){b=x;const C=h[b],A=C!==void 0?m[C]:void 0;y=A?A.end+this.options.gap:r+o}else{const C=this.options.lanes===1?m[v-1]:this.getFurthestMeasurement(m,v);y=C?C.end+this.options.gap:r+o,b=C?C.lane:v%this.options.lanes,this.options.lanes>1&&_&&this.laneAssignments.set(v,b)}const j=d.get(g),S=typeof j=="number"?j:this.options.estimateSize(v),E=y+S;m[v]={index:v,start:y,size:S,end:E,key:g,lane:b},h[b]=v}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Un(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,o,i)=>this.range=n.length>0&&r>0?h3({measurements:n,outerSize:r,scrollOffset:o,lanes:i,flat:i===1&&this._flatMeasurements!=null?this._flatMeasurements:null}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Un(()=>{let n=null,r=null;const o=this.calculateRange();return o&&(n=o.startIndex,r=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,o,i,a)=>i===null||a===null?[]:n({startIndex:i,endIndex:a,overscan:r,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,o=n.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const o=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.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 r=this.indexFromElement(n),o=this.options.getItemKey(r),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(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{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 m=this.measurementsCache[n];if(!m)return;c=m.key,l=m.start,a=m.size}const d=this.itemSizeCache.get(c)??a,f=r-d;if(f!==0){const m=this.options.anchorTo==="end"&&((o=this.scrollState)==null?void 0:o.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,h=m?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,r),this.itemSizeCacheVersion++,m?this.applyScrollAdjustment(this.getTotalSize()-h):v&&this.applyScrollAdjustment(f),this.notify(!1)}},this.getVirtualItems=Un(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const o=[];for(let i=0,a=n.length;i<a;i++){const l=n[i],c=r[l];o.push(c)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length===0)return;const o=this._flatMeasurements,i=this.options.lanes===1&&o!=null,a=lm(0,r.length-1,i?l=>o[l*2]:l=>Jc(r[l]).start,n);return Jc(r[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,r,o=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=n>=a+i?"end":"start"),r==="center"?n+=(o-i)/2:r==="end"&&(n-=i);const l=this.getMaxScrollOffset();return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="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(r==="auto")if(a.end>=i+o-this.options.scrollPaddingEnd)r="end";else if(a.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const l=r==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,r,a.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:o="auto"}={})=>{const i=this.getOffsetForAlignment(n,r),a=this.now();this.scrollState={index:null,align:r,behavior:o,startedAt:a,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:o="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.getOffsetForIndex(n,r);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:r="auto"}={})=>{const o=this.getScrollOffset()+n,i=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:i,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:r}),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 r=this.getMeasurements();let o;if(r.length===0)o=this.options.paddingStart;else if(this.options.lanes===1){const i=r.length-1,a=this._flatMeasurements;a!=null?o=a[i*2]+a[i*2+1]:o=((n=r[i])==null?void 0:n.end)??0}else{const i=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&i.some(l=>l===null);){const l=r[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 r=this.getMeasurements();for(const o of r)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:r,behavior:o})=>{this._intendedScrollOffset=n+(r??0),this.options.scrollToFn(n,{behavior:o,adjustments:r},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&&(Xc()&&(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 r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,o=r?r[0]:this.scrollState.lastTargetOffset,i=1,a=o!==this.scrollState.lastTargetOffset;if(!a&&Yc(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 lm=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<r)e=o+1;else if(i>r)t=o-1;else return o}return e>0?e-1:0};function h3({measurements:e,outerSize:t,scrollOffset:n,lanes:r,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<=r)return{startIndex:0,endIndex:i};let c=lm(0,i,a,n),u=c;if(r===1)for(;u<i&&l(u)<n+t;)u++;else if(r>1){const d=Array(r).fill(0);for(;u<i&&d.some(m=>m<n+t);){const m=e[u];d[m.lane]=m.end,u++}const f=Array(r).fill(n+t);for(;c>=0&&f.some(m=>m>=n);){const m=e[c];f[m.lane]=m.start,c--}c=Math.max(0,c-c%r),u=Math.min(i,u+(r-1-u%r))}return{startIndex:c,endIndex:u}}const eu=typeof document<"u"?p.useLayoutEffect:p.useEffect;function cm({useFlushSync:e=!0,...t}){const n=p.useReducer(i=>i+1,0)[1],r={...t,onChange:(i,a)=>{var l;e&&a?Hr.flushSync(n):n(),(l=t.onChange)==null||l.call(t,i,a)}},[o]=p.useState(()=>new p3(r));return o.setOptions(r),eu(()=>o._didMount(),[]),eu(()=>o._willUpdate()),o}function m3(e){return cm({observeElementRect:o3,observeElementOffset:l3,scrollToFn:f3,...e})}function g3(e){return cm({getScrollElement:()=>typeof document<"u"?window:null,observeElementRect:i3,observeElementOffset:c3,scrollToFn:d3,initialOffset:()=>typeof document<"u"?window.scrollY:0,...e})}const Gt="agent-inspector:focus-log";function Br(e){window.dispatchEvent(new CustomEvent(Gt,{detail:e}))}function Ko(e){if(typeof CustomEvent>"u"||!(e instanceof CustomEvent))return null;const t=e.detail,n=we(t,"logId");if(typeof n!="number"||!Number.isInteger(n)||n<0)return null;const r=we(t,"tab");switch(r){case"anatomy":case"request":case"response":break;case void 0:break;default:return null}const o=we(t,"source"),i=we(t,"toolCallIndex"),a=typeof i=="number"&&Number.isInteger(i)&&i>=0?{logId:n,tab:r??"request",toolCallIndex:i}:{logId:n,tab:r??"request"};switch(o){case"virtualizer":return{...a,source:o};case void 0:return a;default:return null}}function wt({className:e,style:t,d:n,eyeStalks:r,eyes:o,legs:i,extras:a}){return s.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:[s.jsx("path",{d:n}),r,o,i,a]})}const xn=s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"6.5",y1:"16",x2:"4.5",y2:"19.5"}),s.jsx("line",{x1:"9",y1:"17.5",x2:"8",y2:"20.5"}),s.jsx("line",{x1:"15",y1:"17.5",x2:"16",y2:"20.5"}),s.jsx("line",{x1:"17.5",y1:"16",x2:"19.5",y2:"19.5"})]}),um=s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"7",y1:"16",x2:"5.5",y2:"18.5"}),s.jsx("line",{x1:"9.5",y1:"17",x2:"8.5",y2:"19.5"}),s.jsx("line",{x1:"14.5",y1:"17",x2:"15.5",y2:"19.5"}),s.jsx("line",{x1:"17",y1:"16",x2:"18.5",y2:"18.5"})]});function dm({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),s.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),s.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 x3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"9.5",y1:"6.5",x2:"9.5",y2:"4.5"}),s.jsx("line",{x1:"14.5",y1:"6.5",x2:"14.5",y2:"4.5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"9.5",cy:"4",r:"1.1",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"14.5",cy:"4",r:"1.1",fill:"currentColor",stroke:"none"})]}),legs:um,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C4 9.5 2.5 10 3 12 C3.5 13.5 4.5 13 5 12"}),s.jsx("path",{d:"M19 11 C20 9.5 21.5 10 21 12 C20.5 13.5 19.5 13 19 12"})]})})}function b3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"7",y1:"7",x2:"6.5",y2:"4.5"}),s.jsx("line",{x1:"17",y1:"7",x2:"17.5",y2:"4.5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"6.5",cy:"4",r:"0.8",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"17.5",cy:"4",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M4 12 C2.5 10.5 1 11 1.5 13 C2 14.5 3.5 14 4.5 13"}),s.jsx("path",{d:"M20 12 C21.5 10.5 23 11 22.5 13 C22 14.5 20.5 14 19.5 13"})]})})}function v3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"6.5",x2:"10",y2:"3.5"}),s.jsx("line",{x1:"14",y1:"6.5",x2:"14",y2:"3.5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"10",cy:"3",r:"0.7",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"14",cy:"3",r:"0.7",fill:"currentColor",stroke:"none"})]}),legs:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"7",y1:"17",x2:"5",y2:"20.5"}),s.jsx("line",{x1:"9.5",y1:"18.5",x2:"8.5",y2:"21.5"}),s.jsx("line",{x1:"14.5",y1:"18.5",x2:"15.5",y2:"21.5"}),s.jsx("line",{x1:"17",y1:"17",x2:"19",y2:"20.5"})]}),extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M6.5 11 C5 8.5 3 9 3.5 11.5 C4 13.5 5 13 6 12"}),s.jsx("path",{d:"M17.5 11 C19 8.5 21 9 20.5 11.5 C20 13.5 19 13 18 12"})]})})}function y3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),s.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.8",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),s.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 w3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),s.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"}),s.jsx("line",{x1:"13.5",y1:"4",x2:"15.5",y2:"5"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),s.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 k3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"8",x2:"10",y2:"6"}),s.jsx("line",{x1:"14",y1:"8",x2:"14",y2:"6"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"9",y1:"6",x2:"11",y2:"6.5"}),s.jsx("line",{x1:"13",y1:"6",x2:"15",y2:"6.5"})]}),legs:um,extras:s.jsxs(s.Fragment,{children:[s.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"}),s.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 _3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),s.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.7",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.7",fill:"currentColor",stroke:"none"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),s.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),s.jsx("line",{x1:"8.5",y1:"4",x2:"10.5",y2:"4.5"}),s.jsx("line",{x1:"15.5",y1:"4",x2:"13.5",y2:"4.5"}),s.jsx("path",{d:"M9 15.5 C10 14.5 14 14.5 15 15.5"})]})})}function j3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),s.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"9.5",cy:"4.5",r:"1.2",fill:"none",stroke:"currentColor"}),s.jsx("circle",{cx:"14.5",cy:"4.5",r:"1.2",fill:"none",stroke:"currentColor"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),s.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),s.jsx("ellipse",{cx:"12",cy:"15",rx:"2",ry:"1.5",fill:"currentColor",stroke:"none"})]})})}function S3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"9.5",y1:"7",x2:"9",y2:"5"}),s.jsx("line",{x1:"14.5",y1:"7",x2:"15",y2:"5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"9",cy:"4.5",r:"1",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"15",cy:"4.5",r:"1",fill:"currentColor",stroke:"none"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C3.5 9 2 9.5 2.5 12 C3 14 4 13 5 12"}),s.jsx("path",{d:"M19 11 C20.5 9 22 9.5 21.5 12 C21 14 20 13 19 12"}),s.jsx("path",{d:"M9 14.5 C10 16 14 16 15 14.5"}),s.jsx("circle",{cx:"7",cy:"13",r:"1",fill:"currentColor",stroke:"none",opacity:"0.3"}),s.jsx("circle",{cx:"17",cy:"13",r:"1",fill:"currentColor",stroke:"none",opacity:"0.3"})]})})}function C3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5.5"}),s.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5.5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"7.5",y1:"5.5",x2:"16.5",y2:"5.5"}),s.jsx("rect",{x:"7",y:"5",width:"4",height:"2",rx:"0.5",fill:"currentColor",stroke:"none"}),s.jsx("rect",{x:"13",y:"5",width:"4",height:"2",rx:"0.5",fill:"currentColor",stroke:"none"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),s.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),s.jsx("path",{d:"M9.5 15 C10.5 16 13.5 16 14.5 15"})]})})}function N3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10.5",y1:"9.5",x2:"10.5",y2:"8"}),s.jsx("line",{x1:"13.5",y1:"9.5",x2:"13.5",y2:"8"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"10.5",cy:"7.5",r:"0.8",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"13.5",cy:"7.5",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"8",y1:"16",x2:"6.5",y2:"18"}),s.jsx("line",{x1:"10",y1:"17",x2:"9.5",y2:"19"}),s.jsx("line",{x1:"14",y1:"17",x2:"14.5",y2:"19"}),s.jsx("line",{x1:"16",y1:"16",x2:"17.5",y2:"18"})]}),extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M7.5 12 C6.5 11 5.5 11.5 6 13 C6.5 14 7 13.5 7.5 13"}),s.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 Ur=[dm,x3,b3,v3,y3,w3,k3,_3,j3,S3,C3,N3];function Pl(e){return Ur[Math.abs(e)%Ur.length]??dm}function T3(e){const t=Ur.length-2;return t<=0?0:1+((Number.isFinite(e)?Math.trunc(e):0)%t+t)%t}function E3(e){return Pl(T3(e))}const A3="x-anthropic-billing-header:";function R3(e){return e.trimStart().toLowerCase().startsWith(A3)}function I3(e){return zl(e)?Object.prototype.hasOwnProperty.call(e,"system"):!1}function z3(e){if(!zl(e))return!1;const t=we(e,"type"),n=we(e,"text");return typeof t!="string"||t!=="text"||typeof n!="string"?!1:R3(n)}function P3(e){let t;try{t=JSON.parse(e)}catch{return{body:e,removed:0}}if(!I3(t))return{body:e,removed:0};const n=t.system;if(!Array.isArray(n)||n.length===0)return{body:e,removed:0};const r=[];let o=0;for(const i of n){if(z3(i)){o+=1;continue}r.push(i)}return o===0?{body:e,removed:0}:(r.length===0?delete t.system:t.system=r,{body:JSON.stringify(t),removed:o})}const O3=400,tu=2e3;function M3(e){return Array.isArray(e)}function L3(e,t){const n=[e];let r=0;for(;n.length>0;){const o=n.pop();if(o!==void 0){if(r+=1,r>t)return r;if(!(o===null||typeof o!="object")){if(M3(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 r}function D3(e){const t=L3(e,tu+1);return t<=O3?{depth:Number.POSITIVE_INFINITY}:t<=tu?{depth:3}:{depth:2}}function $3(e){try{const t=JSON.parse(e);return{kind:"json",data:oo(t)}}catch{return{kind:"text"}}}function vi(e){const t=p.useMemo(()=>e===null?null:$3(e),[e]),n=t?.kind==="json"?t.data:null,r=p.useMemo(()=>n===null?null:D3(n),[n]),[o,i]=p.useState(!1),[a,l]=p.useState(0),[c,u]=p.useState(0),[d,f]=p.useTransition(),m=p.useCallback(()=>{const h=!o,v=h&&r!==null?r.depth:0;f(()=>{i(h),l(v),u(g=>g+1)})},[o,r]);return{parsedData:n,policy:r,isExpanded:o,toggle:m,isPending:d,bulkDepth:a,bulkRevision:c}}function oo(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=>oo(n));const t={};for(const n of Object.keys(e)){const r=Object.getOwnPropertyDescriptor(e,n);t[n]=oo(r?.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 s.jsx(RC,{"data-slot":"tabs","data-orientation":t,orientation:t,className:le("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const F3=ll("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 pm({className:e,variant:t="default",...n}){return s.jsx(IC,{"data-slot":"tabs-list","data-variant":t,className:le(F3({variant:t}),e),...n})}function mt({className:e,...t}){return s.jsx(zC,{"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 gt({className:e,...t}){return s.jsx(PC,{"data-slot":"tabs-content",className:le("flex-1 outline-none",e),...t})}function rn(e){const[t,n]=p.useState(!1),r=p.useRef(null);p.useEffect(()=>()=>{r.current!==null&&clearTimeout(r.current)},[]);const o=p.useCallback(i=>{i.stopPropagation(),e!==null&&Kt(e).then(a=>{a&&(n(!0),r.current!==null&&clearTimeout(r.current),r.current=setTimeout(()=>n(!1),2e3))})},[e]);return{copied:t,copy:o}}const B3=p.lazy(()=>zn(()=>import("./CompareDrawer-ZL1yvIH6.js"),__vite__mapDeps([0,1])).then(e=>({default:e.CompareDrawer}))),U3=p.lazy(()=>zn(()=>import("./ReplayDialog-D-gDSuhe.js"),__vite__mapDeps([2,1,3])).then(e=>({default:e.ReplayDialog}))),W3=p.lazy(()=>zn(()=>import("./RequestAnatomy-CVt2vHih.js"),__vite__mapDeps([4,1])).then(e=>({default:e.RequestAnatomy}))),H3=p.lazy(()=>zn(()=>import("./ResponseView-zVdHc0mv.js"),__vite__mapDeps([3,1])).then(e=>({default:e.ResponseView}))),Z3=p.lazy(()=>zn(()=>import("./StreamingChunkSequence-DQFhpV_4.js"),__vite__mapDeps([5,1])).then(e=>({default:e.StreamingChunkSequence}))),pa=p.lazy(()=>zn(()=>import("./json-viewer-B9gYSlz7.js"),__vite__mapDeps([6,1])).then(e=>({default:e.JsonViewer}))),V3=p.lazy(()=>zn(()=>import("./json-viewer-B9gYSlz7.js"),__vite__mapDeps([6,1])).then(e=>({default:e.JsonViewerFromString}))),q3=1200,G3=12;function K3(e){const{containerRef:t,setExpandToPath:n,ensureTabActive:r,highlightMs:o}=e,i=p.useRef(null);return p.useCallback(a=>{r?.(),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??q3)},u=`[data-anatomy-path="${(f=>typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(f):f.replace(/(["'\\[\](){}])/g,"\\$1"))(a.path)}"]`,d=f=>{const m=t.current;if(m!==null){const h=m.querySelector(u);if(h!==null){l(h);return}}f>0?window.requestAnimationFrame(()=>d(f-1)):n(null)};window.requestAnimationFrame(()=>d(G3))},[t,r,o,n])}const nu="The compact log metadata is still available. Retry if the local server was restarting or the body store was briefly unavailable.";function Yn(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 J3(e,t){const n=[];return e!=null&&n.push(`Request ${Yn(e)}`),t!=null&&n.push(`Response ${Yn(t)}`),n.length===0?null:n.join(" · ")}function Y3(e){if(e instanceof La)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===""?nu:t}}return{title:"Full bodies could not be loaded",detail:nu}}class hm{diff(t,n,r={}){let o;typeof r=="function"?(o=r,r={}):"callback"in r&&(o=r.callback);const i=this.castInput(t,r),a=this.castInput(n,r),l=this.removeEmpty(this.tokenize(i,r)),c=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(l,c,r,o)}diffWithOptionsObj(t,n,r,o){var i;const a=y=>{if(y=this.postProcess(y,r),o){setTimeout(function(){o(y)},0);return}else return y},l=n.length,c=t.length;let u=1,d=l+c;r.maxEditLength!=null&&(d=Math.min(d,r.maxEditLength));const f=(i=r.timeout)!==null&&i!==void 0?i:1/0,m=Date.now()+f,h=[{oldPos:-1,lastComponent:void 0}];let v=this.extractCommon(h[0],n,t,0,r);if(h[0].oldPos+1>=c&&v+1>=l)return a(this.buildValues(h[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 _;const j=h[y-1],S=h[y+1];j&&(h[y-1]=void 0);let E=!1;if(S){const A=S.oldPos-y;E=S&&0<=A&&A<l}const C=j&&j.oldPos+1<c;if(!E&&!C){h[y]=void 0;continue}if(!C||E&&j.oldPos<S.oldPos?_=this.addToPath(S,!0,!1,0,r):_=this.addToPath(j,!1,!0,1,r),v=this.extractCommon(_,n,t,y,r),_.oldPos+1>=c&&v+1>=l)return a(this.buildValues(_.lastComponent,n,t))||!0;h[y]=_,_.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()>m)return o(void 0);b()||y()},0)})();else for(;u<=d&&Date.now()<=m;){const y=b();if(y)return y}}addToPath(t,n,r,o,i){const a=t.lastComponent;return a&&!i.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+o,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,o,i){const a=n.length,l=r.length;let c=t.oldPos,u=c-o,d=0;for(;u+1<a&&c+1<l&&this.equals(r[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,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const o=[];let 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(r.slice(u,u+d.count)),u+=d.count;else{if(!d.added&&this.useLongestToken){let f=n.slice(c,c+d.count);f=f.map(function(m,h){const v=r[u+h];return v.length>m.length?v:m}),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 X3 extends hm{constructor(){super(...arguments),this.tokenize=gm}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
95
+ `)}function HN(e){return typeof e=="string"?e.length>0?1:0:Array.isArray(e)?e.length:e==null?null:1}function ZN(e){if(typeof e=="string")return e;const t=we(e,"text");if(typeof t=="string")return t;const n=fa(we(e,"content"));if(n.length>0)return n;const r=fa(we(e,"output"));if(r.length>0)return r;const o=we(e,"arguments");return typeof o=="string"?o:""}function VN(e){const t=we(e,"role");if(t==="system"||t==="user"||t==="assistant"||t==="tool")return t;const n=we(e,"type");return n==="function_call_output"?"tool":"user"}function qN(e){const t=we(e,"output");if(!Array.isArray(t))return[];const n=[];for(const r of t){if(we(r,"type")!=="function_call")continue;const o=we(r,"name");typeof o=="string"&&o.length>0&&n.push(o)}return n}function vr(e,t,n,r){return{role:e,label:t,text:n,size:Rl(n),characters:Il(n),path:r}}const GN={format:"openai",analyzeRequest(e){if(e===null)return jn(e);try{const t=Zd.safeParse(JSON.parse(e));if(!t.success){const n=Vd.safeParse(JSON.parse(e));return n.success?{parsed:n.data,comparisonValue:n.data,messageCount:HN(n.data.input),toolCount:n.data.tools!==void 0&&n.data.tools.length>0?n.data.tools.length:null}:jn(e)}return{parsed:t.data,comparisonValue:t.data,messageCount:t.data.messages.length,toolCount:t.data.tools!==void 0&&t.data.tools.length>0?t.data.tools.length:null}}catch{return jn(e)}},analyzeResponse(e){if(e===null)return tr;const t=Gd(e);if(t===null){const r=Kd(e);if(r===null)return tr;const o=qN(r);return{parsed:r,toolNames:o.length>0?o:null}}const n=t.choices[0]?.message?.tool_calls?.map(r=>r.function?.name??"").filter(r=>r!=="")??[];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(vr("system","instructions",t.instructions,"/instructions")),Array.isArray(t.messages)&&t.messages.forEach((r,o)=>{if(r===null||typeof r!="object")return;const i=r,a=i.role==="user"||i.role==="assistant"||i.role==="system"||i.role==="tool"?i.role:"user",l=UN(i);n.push(vr(a,`[${o}] ${a}`,l,`/messages/${o}`))}),Array.isArray(t.messages)||(typeof t.input=="string"&&t.input.length>0?n.push(vr("user","input",t.input,"/input")):Array.isArray(t.input)&&t.input.forEach((r,o)=>{const i=VN(r),a=ZN(r);n.push(vr(i,`[${o}] ${i}`,a,`/input/${o}`))})),Array.isArray(t.tools)&&t.tools.length>0){const r=WN(t.tools);n.push(vr("tools","tools",r,"/tools"))}return n.length>0?n:null}},KN={format:"unknown",analyzeRequest(e){return jn(e)},analyzeResponse(){return tr},anatomySegments(){return null}},JN={anthropic:BN,openai:GN,unknown:KN};function om(e){return JN[e]}function $r(e){const t=uN(e.path);return t==="unknown"?e.apiFormat:t}const Kc="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 bi({icon:e,children:t,title:n,className:r}){return s.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",r),title:n,children:[e,s.jsx("span",{className:"min-w-0 font-mono tabular-nums",children:t})]})}function YN(){return s.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:[s.jsx(st,{className:"size-3 animate-spin"}),"Turn open"]})}function XN({conversationId:e,startTime:t,endTime:n,totalCalls:r,totalInputTokens:o,totalOutputTokens:i,expanded:a,onToggle:l,providers:c,isLoading:u=!1,userAgent:d,clientPid:f,clientProjectFolder:m,showClientIdentity:h=!0,showProcessMetadata:v=!0,timeDisplayFormat:g,onClear:x}){const[b,y]=p.useState(!1),_=F=>{F.stopPropagation(),x!==void 0&&y(!0)},j=p.useCallback(F=>{F.stopPropagation(),window.open(sd(e),"_blank","noopener,noreferrer")},[e]),S=c?.map(({provider:F,models:Q})=>({provider:F,tooltip:Q.length===1?Q[0]??F:Q.join(", ")}))??[],E=cl({userAgent:d,conversationId:e,clientProjectFolder:m}),C=Ro(E),A=d!=null&&d!=="",I=C??d??null,P=C!==null&&A?`${C} - ${d}`:null,G=e.startsWith("PID:")||e.includes("|"),T=e.length>24?e.slice(0,12)+"..."+e.slice(-12):e,D=Qa(t,n,g),k=`${r} call${r!==1?"s":""}`;return s.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:[s.jsx(rN,{items:S,ariaLabel:"Models used in this session",className:"mt-0.5"}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsxs("span",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[G&&v?f!=null?s.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]}):s.jsx("span",{className:"min-w-0 max-w-full truncate font-mono text-xs font-semibold text-violet-200",title:e,children:e}):s.jsx("span",{className:"min-w-0 max-w-full truncate font-mono text-xs font-semibold text-violet-200",title:e,children:G?"sessionless":T}),!G&&v&&f!==null&&f!==void 0&&s.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]}),G&&v&&m!==null&&m!==void 0&&m!==""&&s.jsx("span",{className:"min-w-0 max-w-[240px] truncate font-mono text-xs text-muted-foreground",title:m,children:m}),h&&I!==null&&I!==""&&s.jsxs("span",{className:"bg-white/[0.045] inline-flex h-6 max-w-[180px] shrink-0 items-center gap-1 rounded-md px-1.5 text-xs text-muted-foreground",title:P??I,children:[s.jsx(ul,{client:E,className:"size-4 shrink-0"}),s.jsx("span",{className:"truncate font-mono tabular-nums",children:I})]}),u&&s.jsx(YN,{})]}),s.jsxs("span",{className:"mt-1.5 flex min-w-0 flex-wrap items-center gap-1.5",children:[s.jsx(bi,{icon:s.jsx(Zt,{className:"size-3 shrink-0"}),title:D,children:D}),s.jsx(bi,{icon:s.jsx(Co,{className:"size-3 shrink-0"}),children:k}),s.jsxs(bi,{icon:s.jsx(Mr,{className:"size-3 shrink-0"}),className:"max-w-full",children:[s.jsx("span",{className:"text-blue-400",children:De(o)})," / ",s.jsx("span",{className:"text-amber-400",children:De(i)})]})]})]}),s.jsxs("span",{className:"flex shrink-0 items-start gap-1.5",children:[s.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:Kc,children:s.jsx(Ga,{className:"size-3.5"})}),x!==void 0&&s.jsx("button",{type:"button",onClick:_,"aria-label":`Clear group (${r} request${r!==1?"s":""})`,title:"Clear this group",className:Kc,children:s.jsx(Cn,{className:"size-3.5"})}),s.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?s.jsx(at,{className:"size-4 shrink-0"}):u?s.jsx(st,{className:"size-4 shrink-0 animate-spin"}):s.jsx(At,{className:"size-4 shrink-0"})})]}),u&&s.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:s.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)]"})}),s.jsx(up,{open:b,onOpenChange:y,title:"Clear this group?",description:`This will remove ${r} request${r!==1?"s":""} from this conversation. This action cannot be undone.`,confirmLabel:"Clear",variant:"destructive",onConfirm:()=>{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 r=t?`PID:${e.clientPid}`:"unknown",o=n?e.clientProjectFolder:"no-folder";return`${r}|${o}`}function e3(e){const t=new Map;for(const r of e){const o=QN(r),i=t.get(o);i!==void 0?i.push(r):t.set(o,[r])}const n=[];for(const[r,o]of t){const i=[...o].sort((a,l)=>a.timestamp.localeCompare(l.timestamp));n.push({id:r,conversationId:r,logs:i})}return n.sort((r,o)=>(r.logs[0]?.timestamp??"").localeCompare(o.logs[0]?.timestamp??"")),n}function t3(e,t,n){const r=new Array(e);return new Proxy(r,{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 Un(e,t,n){let r=n.initialDeps??[],o,i=!0;function a(){const l=e();return(l.length!==r.length||l.some((u,d)=>r[d]!==u))&&(r=l,o=t(...l),n?.onChange&&!(i&&n.skipInitialOnChange)&&n.onChange(o),i=!1),o}return a.updateDeps=l=>{r=l},a}function Jc(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Yc=(e,t)=>Math.abs(e-t)<1.01,n3=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,o),n)}};let yr;const Xc=()=>{if(yr!==void 0)return yr;if(typeof navigator>"u")return yr=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return yr=!0;const e=navigator.maxTouchPoints;return yr=navigator.platform==="MacIntel"&&e!==void 0&&e>0},Qc=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},r3=e=>e,s3=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,o=new Array(r);for(let i=0;i<r;i++)o[i]=t+i;return o},o3=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=a=>{const{width:l,height:c}=a;t({width:Math.round(l),height:Math.round(c)})};if(o(Qc(n)),!r.ResizeObserver)return()=>{};const i=new r.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(Qc(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},Fr={passive:!0},i3=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=()=>{t({width:n.innerWidth,height:n.innerHeight})};return r(),n.addEventListener("resize",r,Fr),()=>{n.removeEventListener("resize",r)}},a3=typeof window>"u"?!0:"onscrollend"in window,im=(e,t,n)=>{const r=e.scrollElement;if(!r)return;const o=e.targetWindow;if(!o)return;const i=e.options.useScrollendEvent&&a3;let a=0;const l=i?null:n3(o,()=>t(a,!1),e.options.isScrollingResetDelay),c=f=>()=>{a=n(r),l?.(),t(a,f)},u=c(!0),d=c(!1);return r.addEventListener("scroll",u,Fr),i&&r.addEventListener("scrollend",d,Fr),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",d)}},l3=(e,t)=>im(e,t,n=>{const{horizontal:r,isRtl:o}=e.options;return r?n.scrollLeft*(o&&-1||1):n.scrollTop}),c3=(e,t)=>im(e,t,n=>e.options.horizontal?n.scrollX:n.scrollY),u3=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},am=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;(i=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[r.options.horizontal?"left":"top"]:e+t,behavior:n})},d3=am,f3=am;class p3{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,r,o;return((o=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:o.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>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=r())==null||o.disconnect(),n=null},observe:o=>{var i;return(i=r())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=r())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{var r,o;const i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:r3,rangeExtractor:s3,onChange:()=>{},measureElement:u3,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(),m=u>0?((r=f[0])==null?void 0:r.key)??a.getItemKey(0):null,h=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)!==m||i.getItemKey(d-1)!==h)){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)!==h)&&(c=b)}}this.options=i,(l||c)&&(this.pendingScrollAnchor=[l?.[0]??null,l?.[1]??0,c])},this.notify=n=>{var r,o;(o=(r=this.options).onChange)==null||o.call(r,this,n)},this.maybeNotify=Un(()=>(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 r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}if(this.scrollElement=r,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,!(!Xc()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,Fr),i.addEventListener("touchend",l,Fr),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 m=f.start+a-this.getScrollOffset();Yc(m,0)||this.applyScrollAdjustment(m)}}l&&this.scrollToEnd({behavior:l})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),r=this.getMaxScrollOffset();if(n<0||n>r)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,r)=>{const o=new Map,i=new Map;for(let a=r-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=Un(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(n,r,o,i,a,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMin=null,{count:n,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:a,lanes:l,laneAssignmentMode:c}),{key:!1}),this.getMeasurements=Un(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:r,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 _=new Float64Array(g);x&&f>0&&_.set(x.subarray(0,f*2)),x=_,this._flatMeasurements=x}let b;if(f===0)b=r+o;else{const _=f-1;b=x[_*2]+x[_*2+1]+v}for(let _=f;_<n;_++){const j=i(_),S=d.get(j),E=typeof S=="number"?S:this.options.estimateSize(_);x[_*2]=b,x[_*2+1]=E,b+=E+v}const y=t3(n,x,i);return this.measurementsCache=y,y}const m=this.measurementsCache.slice(0,f),h=new Array(l).fill(void 0);for(let v=0;v<f;v++){const g=m[v];g&&(h[g.lane]=v)}for(let v=f;v<n;v++){const g=i(v),x=this.laneAssignments.get(v);let b,y;const _=c==="estimate"||d.has(g);if(x!==void 0&&this.options.lanes>1){b=x;const C=h[b],A=C!==void 0?m[C]:void 0;y=A?A.end+this.options.gap:r+o}else{const C=this.options.lanes===1?m[v-1]:this.getFurthestMeasurement(m,v);y=C?C.end+this.options.gap:r+o,b=C?C.lane:v%this.options.lanes,this.options.lanes>1&&_&&this.laneAssignments.set(v,b)}const j=d.get(g),S=typeof j=="number"?j:this.options.estimateSize(v),E=y+S;m[v]={index:v,start:y,size:S,end:E,key:g,lane:b},h[b]=v}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Un(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,o,i)=>this.range=n.length>0&&r>0?h3({measurements:n,outerSize:r,scrollOffset:o,lanes:i,flat:i===1&&this._flatMeasurements!=null?this._flatMeasurements:null}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Un(()=>{let n=null,r=null;const o=this.calculateRange();return o&&(n=o.startIndex,r=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,o,i,a)=>i===null||a===null?[]:n({startIndex:i,endIndex:a,overscan:r,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,o=n.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const o=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.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 r=this.indexFromElement(n),o=this.options.getItemKey(r),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(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{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 m=this.measurementsCache[n];if(!m)return;c=m.key,l=m.start,a=m.size}const d=this.itemSizeCache.get(c)??a,f=r-d;if(f!==0){const m=this.options.anchorTo==="end"&&((o=this.scrollState)==null?void 0:o.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,h=m?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,r),this.itemSizeCacheVersion++,m?this.applyScrollAdjustment(this.getTotalSize()-h):v&&this.applyScrollAdjustment(f),this.notify(!1)}},this.getVirtualItems=Un(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const o=[];for(let i=0,a=n.length;i<a;i++){const l=n[i],c=r[l];o.push(c)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length===0)return;const o=this._flatMeasurements,i=this.options.lanes===1&&o!=null,a=lm(0,r.length-1,i?l=>o[l*2]:l=>Jc(r[l]).start,n);return Jc(r[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,r,o=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=n>=a+i?"end":"start"),r==="center"?n+=(o-i)/2:r==="end"&&(n-=i);const l=this.getMaxScrollOffset();return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="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(r==="auto")if(a.end>=i+o-this.options.scrollPaddingEnd)r="end";else if(a.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const l=r==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,r,a.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:o="auto"}={})=>{const i=this.getOffsetForAlignment(n,r),a=this.now();this.scrollState={index:null,align:r,behavior:o,startedAt:a,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:o="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.getOffsetForIndex(n,r);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:r="auto"}={})=>{const o=this.getScrollOffset()+n,i=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:i,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:r}),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 r=this.getMeasurements();let o;if(r.length===0)o=this.options.paddingStart;else if(this.options.lanes===1){const i=r.length-1,a=this._flatMeasurements;a!=null?o=a[i*2]+a[i*2+1]:o=((n=r[i])==null?void 0:n.end)??0}else{const i=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&i.some(l=>l===null);){const l=r[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 r=this.getMeasurements();for(const o of r)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:r,behavior:o})=>{this._intendedScrollOffset=n+(r??0),this.options.scrollToFn(n,{behavior:o,adjustments:r},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&&(Xc()&&(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 r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,o=r?r[0]:this.scrollState.lastTargetOffset,i=1,a=o!==this.scrollState.lastTargetOffset;if(!a&&Yc(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 lm=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<r)e=o+1;else if(i>r)t=o-1;else return o}return e>0?e-1:0};function h3({measurements:e,outerSize:t,scrollOffset:n,lanes:r,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<=r)return{startIndex:0,endIndex:i};let c=lm(0,i,a,n),u=c;if(r===1)for(;u<i&&l(u)<n+t;)u++;else if(r>1){const d=Array(r).fill(0);for(;u<i&&d.some(m=>m<n+t);){const m=e[u];d[m.lane]=m.end,u++}const f=Array(r).fill(n+t);for(;c>=0&&f.some(m=>m>=n);){const m=e[c];f[m.lane]=m.start,c--}c=Math.max(0,c-c%r),u=Math.min(i,u+(r-1-u%r))}return{startIndex:c,endIndex:u}}const eu=typeof document<"u"?p.useLayoutEffect:p.useEffect;function cm({useFlushSync:e=!0,...t}){const n=p.useReducer(i=>i+1,0)[1],r={...t,onChange:(i,a)=>{var l;e&&a?Hr.flushSync(n):n(),(l=t.onChange)==null||l.call(t,i,a)}},[o]=p.useState(()=>new p3(r));return o.setOptions(r),eu(()=>o._didMount(),[]),eu(()=>o._willUpdate()),o}function m3(e){return cm({observeElementRect:o3,observeElementOffset:l3,scrollToFn:f3,...e})}function g3(e){return cm({getScrollElement:()=>typeof document<"u"?window:null,observeElementRect:i3,observeElementOffset:c3,scrollToFn:d3,initialOffset:()=>typeof document<"u"?window.scrollY:0,...e})}const Gt="agent-inspector:focus-log";function Br(e){window.dispatchEvent(new CustomEvent(Gt,{detail:e}))}function Ko(e){if(typeof CustomEvent>"u"||!(e instanceof CustomEvent))return null;const t=e.detail,n=we(t,"logId");if(typeof n!="number"||!Number.isInteger(n)||n<0)return null;const r=we(t,"tab");switch(r){case"anatomy":case"request":case"response":break;case void 0:break;default:return null}const o=we(t,"source"),i=we(t,"toolCallIndex"),a=typeof i=="number"&&Number.isInteger(i)&&i>=0?{logId:n,tab:r??"request",toolCallIndex:i}:{logId:n,tab:r??"request"};switch(o){case"virtualizer":return{...a,source:o};case void 0:return a;default:return null}}function wt({className:e,style:t,d:n,eyeStalks:r,eyes:o,legs:i,extras:a}){return s.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:[s.jsx("path",{d:n}),r,o,i,a]})}const xn=s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"6.5",y1:"16",x2:"4.5",y2:"19.5"}),s.jsx("line",{x1:"9",y1:"17.5",x2:"8",y2:"20.5"}),s.jsx("line",{x1:"15",y1:"17.5",x2:"16",y2:"20.5"}),s.jsx("line",{x1:"17.5",y1:"16",x2:"19.5",y2:"19.5"})]}),um=s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"7",y1:"16",x2:"5.5",y2:"18.5"}),s.jsx("line",{x1:"9.5",y1:"17",x2:"8.5",y2:"19.5"}),s.jsx("line",{x1:"14.5",y1:"17",x2:"15.5",y2:"19.5"}),s.jsx("line",{x1:"17",y1:"16",x2:"18.5",y2:"18.5"})]});function dm({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),s.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),s.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 x3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"9.5",y1:"6.5",x2:"9.5",y2:"4.5"}),s.jsx("line",{x1:"14.5",y1:"6.5",x2:"14.5",y2:"4.5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"9.5",cy:"4",r:"1.1",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"14.5",cy:"4",r:"1.1",fill:"currentColor",stroke:"none"})]}),legs:um,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C4 9.5 2.5 10 3 12 C3.5 13.5 4.5 13 5 12"}),s.jsx("path",{d:"M19 11 C20 9.5 21.5 10 21 12 C20.5 13.5 19.5 13 19 12"})]})})}function b3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"7",y1:"7",x2:"6.5",y2:"4.5"}),s.jsx("line",{x1:"17",y1:"7",x2:"17.5",y2:"4.5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"6.5",cy:"4",r:"0.8",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"17.5",cy:"4",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M4 12 C2.5 10.5 1 11 1.5 13 C2 14.5 3.5 14 4.5 13"}),s.jsx("path",{d:"M20 12 C21.5 10.5 23 11 22.5 13 C22 14.5 20.5 14 19.5 13"})]})})}function v3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"6.5",x2:"10",y2:"3.5"}),s.jsx("line",{x1:"14",y1:"6.5",x2:"14",y2:"3.5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"10",cy:"3",r:"0.7",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"14",cy:"3",r:"0.7",fill:"currentColor",stroke:"none"})]}),legs:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"7",y1:"17",x2:"5",y2:"20.5"}),s.jsx("line",{x1:"9.5",y1:"18.5",x2:"8.5",y2:"21.5"}),s.jsx("line",{x1:"14.5",y1:"18.5",x2:"15.5",y2:"21.5"}),s.jsx("line",{x1:"17",y1:"17",x2:"19",y2:"20.5"})]}),extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M6.5 11 C5 8.5 3 9 3.5 11.5 C4 13.5 5 13 6 12"}),s.jsx("path",{d:"M17.5 11 C19 8.5 21 9 20.5 11.5 C20 13.5 19 13 18 12"})]})})}function y3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),s.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.8",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),s.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 w3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),s.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.9",fill:"currentColor",stroke:"none"}),s.jsx("line",{x1:"13.5",y1:"4",x2:"15.5",y2:"5"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),s.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 k3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"8",x2:"10",y2:"6"}),s.jsx("line",{x1:"14",y1:"8",x2:"14",y2:"6"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"9",y1:"6",x2:"11",y2:"6.5"}),s.jsx("line",{x1:"13",y1:"6",x2:"15",y2:"6.5"})]}),legs:um,extras:s.jsxs(s.Fragment,{children:[s.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"}),s.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 _3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),s.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"9.5",cy:"4.5",r:"0.7",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"14.5",cy:"4.5",r:"0.7",fill:"currentColor",stroke:"none"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),s.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),s.jsx("line",{x1:"8.5",y1:"4",x2:"10.5",y2:"4.5"}),s.jsx("line",{x1:"15.5",y1:"4",x2:"13.5",y2:"4.5"}),s.jsx("path",{d:"M9 15.5 C10 14.5 14 14.5 15 15.5"})]})})}function j3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5"}),s.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"9.5",cy:"4.5",r:"1.2",fill:"none",stroke:"currentColor"}),s.jsx("circle",{cx:"14.5",cy:"4.5",r:"1.2",fill:"none",stroke:"currentColor"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),s.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),s.jsx("ellipse",{cx:"12",cy:"15",rx:"2",ry:"1.5",fill:"currentColor",stroke:"none"})]})})}function S3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"9.5",y1:"7",x2:"9",y2:"5"}),s.jsx("line",{x1:"14.5",y1:"7",x2:"15",y2:"5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"9",cy:"4.5",r:"1",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"15",cy:"4.5",r:"1",fill:"currentColor",stroke:"none"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C3.5 9 2 9.5 2.5 12 C3 14 4 13 5 12"}),s.jsx("path",{d:"M19 11 C20.5 9 22 9.5 21.5 12 C21 14 20 13 19 12"}),s.jsx("path",{d:"M9 14.5 C10 16 14 16 15 14.5"}),s.jsx("circle",{cx:"7",cy:"13",r:"1",fill:"currentColor",stroke:"none",opacity:"0.3"}),s.jsx("circle",{cx:"17",cy:"13",r:"1",fill:"currentColor",stroke:"none",opacity:"0.3"})]})})}function C3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10",y1:"7",x2:"9.5",y2:"5.5"}),s.jsx("line",{x1:"14",y1:"7",x2:"14.5",y2:"5.5"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"7.5",y1:"5.5",x2:"16.5",y2:"5.5"}),s.jsx("rect",{x:"7",y:"5",width:"4",height:"2",rx:"0.5",fill:"currentColor",stroke:"none"}),s.jsx("rect",{x:"13",y:"5",width:"4",height:"2",rx:"0.5",fill:"currentColor",stroke:"none"})]}),legs:xn,extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M5 11 C3.5 9.5 1.5 10 2 12.5 C2.5 14 4 13.5 5 12.5"}),s.jsx("path",{d:"M19 11 C20.5 9.5 22.5 10 22 12.5 C21.5 14 20 13.5 19 12.5"}),s.jsx("path",{d:"M9.5 15 C10.5 16 13.5 16 14.5 15"})]})})}function N3({className:e}){return s.jsx(wt,{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:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"10.5",y1:"9.5",x2:"10.5",y2:"8"}),s.jsx("line",{x1:"13.5",y1:"9.5",x2:"13.5",y2:"8"})]}),eyes:s.jsxs(s.Fragment,{children:[s.jsx("circle",{cx:"10.5",cy:"7.5",r:"0.8",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"13.5",cy:"7.5",r:"0.8",fill:"currentColor",stroke:"none"})]}),legs:s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"8",y1:"16",x2:"6.5",y2:"18"}),s.jsx("line",{x1:"10",y1:"17",x2:"9.5",y2:"19"}),s.jsx("line",{x1:"14",y1:"17",x2:"14.5",y2:"19"}),s.jsx("line",{x1:"16",y1:"16",x2:"17.5",y2:"18"})]}),extras:s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M7.5 12 C6.5 11 5.5 11.5 6 13 C6.5 14 7 13.5 7.5 13"}),s.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 Ur=[dm,x3,b3,v3,y3,w3,k3,_3,j3,S3,C3,N3];function Pl(e){return Ur[Math.abs(e)%Ur.length]??dm}function T3(e){const t=Ur.length-2;return t<=0?0:1+((Number.isFinite(e)?Math.trunc(e):0)%t+t)%t}function E3(e){return Pl(T3(e))}const A3="x-anthropic-billing-header:";function R3(e){return e.trimStart().toLowerCase().startsWith(A3)}function I3(e){return zl(e)?Object.prototype.hasOwnProperty.call(e,"system"):!1}function z3(e){if(!zl(e))return!1;const t=we(e,"type"),n=we(e,"text");return typeof t!="string"||t!=="text"||typeof n!="string"?!1:R3(n)}function P3(e){let t;try{t=JSON.parse(e)}catch{return{body:e,removed:0}}if(!I3(t))return{body:e,removed:0};const n=t.system;if(!Array.isArray(n)||n.length===0)return{body:e,removed:0};const r=[];let o=0;for(const i of n){if(z3(i)){o+=1;continue}r.push(i)}return o===0?{body:e,removed:0}:(r.length===0?delete t.system:t.system=r,{body:JSON.stringify(t),removed:o})}const O3=400,tu=2e3;function M3(e){return Array.isArray(e)}function L3(e,t){const n=[e];let r=0;for(;n.length>0;){const o=n.pop();if(o!==void 0){if(r+=1,r>t)return r;if(!(o===null||typeof o!="object")){if(M3(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 r}function D3(e){const t=L3(e,tu+1);return t<=O3?{depth:Number.POSITIVE_INFINITY}:t<=tu?{depth:3}:{depth:2}}function $3(e){try{const t=JSON.parse(e);return{kind:"json",data:oo(t)}}catch{return{kind:"text"}}}function vi(e){const t=p.useMemo(()=>e===null?null:$3(e),[e]),n=t?.kind==="json"?t.data:null,r=p.useMemo(()=>n===null?null:D3(n),[n]),[o,i]=p.useState(!1),[a,l]=p.useState(0),[c,u]=p.useState(0),[d,f]=p.useTransition(),m=p.useCallback(()=>{const h=!o,v=h&&r!==null?r.depth:0;f(()=>{i(h),l(v),u(g=>g+1)})},[o,r]);return{parsedData:n,policy:r,isExpanded:o,toggle:m,isPending:d,bulkDepth:a,bulkRevision:c}}function oo(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=>oo(n));const t={};for(const n of Object.keys(e)){const r=Object.getOwnPropertyDescriptor(e,n);t[n]=oo(r?.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 s.jsx(RC,{"data-slot":"tabs","data-orientation":t,orientation:t,className:le("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const F3=ll("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 pm({className:e,variant:t="default",...n}){return s.jsx(IC,{"data-slot":"tabs-list","data-variant":t,className:le(F3({variant:t}),e),...n})}function mt({className:e,...t}){return s.jsx(zC,{"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 gt({className:e,...t}){return s.jsx(PC,{"data-slot":"tabs-content",className:le("flex-1 outline-none",e),...t})}function rn(e){const[t,n]=p.useState(!1),r=p.useRef(null);p.useEffect(()=>()=>{r.current!==null&&clearTimeout(r.current)},[]);const o=p.useCallback(i=>{i.stopPropagation(),e!==null&&Kt(e).then(a=>{a&&(n(!0),r.current!==null&&clearTimeout(r.current),r.current=setTimeout(()=>n(!1),2e3))})},[e]);return{copied:t,copy:o}}const B3=p.lazy(()=>zn(()=>import("./CompareDrawer-BgcAk1te.js"),__vite__mapDeps([0,1])).then(e=>({default:e.CompareDrawer}))),U3=p.lazy(()=>zn(()=>import("./ReplayDialog-7Pvhjbjk.js"),__vite__mapDeps([2,1,3])).then(e=>({default:e.ReplayDialog}))),W3=p.lazy(()=>zn(()=>import("./RequestAnatomy-BX-UKYQg.js"),__vite__mapDeps([4,1])).then(e=>({default:e.RequestAnatomy}))),H3=p.lazy(()=>zn(()=>import("./ResponseView-zFxGX8xH.js"),__vite__mapDeps([3,1])).then(e=>({default:e.ResponseView}))),Z3=p.lazy(()=>zn(()=>import("./StreamingChunkSequence-DzXzVtBF.js"),__vite__mapDeps([5,1])).then(e=>({default:e.StreamingChunkSequence}))),pa=p.lazy(()=>zn(()=>import("./json-viewer-CiMN_9sG.js"),__vite__mapDeps([6,1])).then(e=>({default:e.JsonViewer}))),V3=p.lazy(()=>zn(()=>import("./json-viewer-CiMN_9sG.js"),__vite__mapDeps([6,1])).then(e=>({default:e.JsonViewerFromString}))),q3=1200,G3=12;function K3(e){const{containerRef:t,setExpandToPath:n,ensureTabActive:r,highlightMs:o}=e,i=p.useRef(null);return p.useCallback(a=>{r?.(),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??q3)},u=`[data-anatomy-path="${(f=>typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(f):f.replace(/(["'\\[\](){}])/g,"\\$1"))(a.path)}"]`,d=f=>{const m=t.current;if(m!==null){const h=m.querySelector(u);if(h!==null){l(h);return}}f>0?window.requestAnimationFrame(()=>d(f-1)):n(null)};window.requestAnimationFrame(()=>d(G3))},[t,r,o,n])}const nu="The compact log metadata is still available. Retry if the local server was restarting or the body store was briefly unavailable.";function Yn(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 J3(e,t){const n=[];return e!=null&&n.push(`Request ${Yn(e)}`),t!=null&&n.push(`Response ${Yn(t)}`),n.length===0?null:n.join(" · ")}function Y3(e){if(e instanceof La)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===""?nu:t}}return{title:"Full bodies could not be loaded",detail:nu}}class hm{diff(t,n,r={}){let o;typeof r=="function"?(o=r,r={}):"callback"in r&&(o=r.callback);const i=this.castInput(t,r),a=this.castInput(n,r),l=this.removeEmpty(this.tokenize(i,r)),c=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(l,c,r,o)}diffWithOptionsObj(t,n,r,o){var i;const a=y=>{if(y=this.postProcess(y,r),o){setTimeout(function(){o(y)},0);return}else return y},l=n.length,c=t.length;let u=1,d=l+c;r.maxEditLength!=null&&(d=Math.min(d,r.maxEditLength));const f=(i=r.timeout)!==null&&i!==void 0?i:1/0,m=Date.now()+f,h=[{oldPos:-1,lastComponent:void 0}];let v=this.extractCommon(h[0],n,t,0,r);if(h[0].oldPos+1>=c&&v+1>=l)return a(this.buildValues(h[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 _;const j=h[y-1],S=h[y+1];j&&(h[y-1]=void 0);let E=!1;if(S){const A=S.oldPos-y;E=S&&0<=A&&A<l}const C=j&&j.oldPos+1<c;if(!E&&!C){h[y]=void 0;continue}if(!C||E&&j.oldPos<S.oldPos?_=this.addToPath(S,!0,!1,0,r):_=this.addToPath(j,!1,!0,1,r),v=this.extractCommon(_,n,t,y,r),_.oldPos+1>=c&&v+1>=l)return a(this.buildValues(_.lastComponent,n,t))||!0;h[y]=_,_.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()>m)return o(void 0);b()||y()},0)})();else for(;u<=d&&Date.now()<=m;){const y=b();if(y)return y}}addToPath(t,n,r,o,i){const a=t.lastComponent;return a&&!i.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+o,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,o,i){const a=n.length,l=r.length;let c=t.oldPos,u=c-o,d=0;for(;u+1<a&&c+1<l&&this.equals(r[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,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const o=[];let 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(r.slice(u,u+d.count)),u+=d.count;else{if(!d.added&&this.useLongestToken){let f=n.slice(c,c+d.count);f=f.map(function(m,h){const v=r[u+h];return v.length>m.length?v:m}),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 X3 extends hm{constructor(){super(...arguments),this.tokenize=gm}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
96
96
  `))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
97
97
  `))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
98
98
  `)&&(t=t.slice(0,-1)),n.endsWith(`