@puddle-code/cli 0.3.9 → 0.3.11

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 (74) hide show
  1. package/CHANGELOG.md +3 -14
  2. package/dist/host-control.mjs +228 -171
  3. package/dist/index.js +259 -200
  4. package/dist/public/assets/App-CNB4a07v.js +2 -0
  5. package/dist/public/assets/Dashboard-v3OproVW.js +1 -0
  6. package/dist/public/assets/{EditorTabClose-BolUnwz9.js → EditorTabClose-DwhahpvS.js} +1 -1
  7. package/dist/public/assets/{FindWidget-BUmuGtbd.js → FindWidget-CVH9U-_P.js} +1 -1
  8. package/dist/public/assets/{LazyTerminal-BRPy9Nm5.js → LazyTerminal-CgQryH0p.js} +2 -2
  9. package/dist/public/assets/{ModelRefcount-DdSmsCyg.js → ModelRefcount-njA_f4bS.js} +1 -1
  10. package/dist/public/assets/NewProjectDialog-BT8rR4yn.js +1 -0
  11. package/dist/public/assets/NotebookWidget-Cwd77EGL.js +7 -0
  12. package/dist/public/assets/PaneEditorBody-RaUBrZPu.js +303 -0
  13. package/dist/public/assets/PdfViewer-Bppu4-0-.js +2 -0
  14. package/dist/public/assets/SettingsDialog-CaHklYzG.js +8 -0
  15. package/dist/public/assets/{Terminal-WzMZyNl-.js → Terminal-_10Xyj1h.js} +5 -5
  16. package/dist/public/assets/Workspace-GgVr1uYN.js +20 -0
  17. package/dist/public/assets/_virtual_notebook-widget-runtime-Dro422xS.js +6966 -0
  18. package/dist/public/assets/api-i6xNY3bF.js +1 -0
  19. package/dist/public/assets/auth-GfOuXpIe.js +64 -0
  20. package/dist/public/assets/{buffer-store-BcKRO2bQ.js → buffer-store-eMnMxbpI.js} +1 -1
  21. package/dist/public/assets/{button-Chvl9hcE.js → button-BgeBH2Uc.js} +1 -1
  22. package/dist/public/assets/{command-CaE1P1RF.js → command-D7m0dmA-.js} +1 -1
  23. package/dist/public/assets/context-DW21k43a.js +1 -0
  24. package/dist/public/assets/{context-menu-BTe3xVbd.js → context-menu-CMWkmDu6.js} +1 -1
  25. package/dist/public/assets/dialog-BMWRC2HO.js +41 -0
  26. package/dist/public/assets/disclosure-CHXbNzgZ.js +1 -0
  27. package/dist/public/assets/dist-BOS6OKSE.js +1 -0
  28. package/dist/public/assets/{dist-BYGE8AQe.js → dist-C_x5-hi8.js} +1 -1
  29. package/dist/public/assets/{dist-CYLjuW55.js → dist-Cde1E3eV.js} +1 -1
  30. package/dist/public/assets/{dist-gLP0NXk8.js → dist-Ds3438NL.js} +1 -1
  31. package/dist/public/assets/errors-O9DWXa3f.js +1 -0
  32. package/dist/public/assets/forward-link-RM7_5Shu.js +1 -0
  33. package/dist/public/assets/hotkeys-1uTWFYAL.js +1 -0
  34. package/dist/public/assets/index-CPHfr3MU.css +2 -0
  35. package/dist/public/assets/{index-Dp8dqiUy.js → index-np8JXeG6.js} +3 -3
  36. package/dist/public/assets/input-CxgRsoVg.js +1 -0
  37. package/dist/public/assets/jsx-runtime-By8HlURe.js +1 -0
  38. package/dist/public/assets/{markdown-mermaid-BX4brFyy.js → markdown-mermaid-CNYDlgGt.js} +1 -1
  39. package/dist/public/assets/media-refresh-store-Bu4kWCGq.js +1 -0
  40. package/dist/public/assets/notification-delivery-Dfvdt_1U.js +1 -0
  41. package/dist/public/assets/{popover-C20E0SGw.js → popover-CCHRaCvX.js} +1 -1
  42. package/dist/public/assets/protocol-support-BGmIChNK.js +1 -0
  43. package/dist/public/assets/{jsx-runtime-ffCh33zF.js → react-dom-cJyBB_A4.js} +1 -1
  44. package/dist/public/assets/{scroll-restoration-DTBzWrDT.js → scroll-restoration-OVgiE4G9.js} +1 -1
  45. package/dist/public/assets/select-Bg0rWqco.js +1 -0
  46. package/dist/public/assets/selection-actions-D875GPFU.js +1 -0
  47. package/dist/public/assets/{session-order-iDEtZwje.js → session-order-f7QxTbVD.js} +1 -1
  48. package/dist/public/assets/{switch-B1uGC2PW.js → switch-DhNyUV8C.js} +1 -1
  49. package/dist/public/assets/use-ui-state-CHqXhyx4.js +1 -0
  50. package/dist/public/assets/{ws-DfRorDqa.js → ws-CMPCIzY4.js} +1 -1
  51. package/dist/public/index.html +5 -4
  52. package/dist/pudl.js +245 -188
  53. package/package.json +1 -1
  54. package/dist/public/assets/App-BaLhdtWg.js +0 -2
  55. package/dist/public/assets/Dashboard-LVU8bCcQ.js +0 -1
  56. package/dist/public/assets/NewProjectDialog-BFguzZCI.js +0 -1
  57. package/dist/public/assets/PaneEditorBody-DBW-O4q7.js +0 -303
  58. package/dist/public/assets/PdfViewer-Q6yROHsM.js +0 -2
  59. package/dist/public/assets/SettingsDialog-DoVdLwtQ.js +0 -8
  60. package/dist/public/assets/Workspace-BxGgvBCU.js +0 -20
  61. package/dist/public/assets/auth-ngM0Ffss.js +0 -64
  62. package/dist/public/assets/dialog-yvLGI8FJ.js +0 -41
  63. package/dist/public/assets/disclosure-0ZiECVHr.js +0 -1
  64. package/dist/public/assets/dist-CwwiP1WN.js +0 -1
  65. package/dist/public/assets/errors-yaab6YK_.js +0 -1
  66. package/dist/public/assets/forward-link-kfVuUsZP.js +0 -1
  67. package/dist/public/assets/index-CItoWyyj.css +0 -2
  68. package/dist/public/assets/input-DDhYsCUG.js +0 -1
  69. package/dist/public/assets/media-refresh-store-D3rBSq4q.js +0 -1
  70. package/dist/public/assets/notification-delivery-B__ASJZR.js +0 -1
  71. package/dist/public/assets/protocol-support-BNUfFPAF.js +0 -1
  72. package/dist/public/assets/select-DQmSVYUL.js +0 -1
  73. package/dist/public/assets/selection-actions-JLWPcaUH.js +0 -1
  74. package/dist/public/assets/use-ui-state-jAfsiEpt.js +0 -1
@@ -0,0 +1 @@
1
+ import{G as e,n as t,o as n,r}from"./auth-GfOuXpIe.js";var i=class extends Error{status;code;details;constructor(e,t,n,r){super(n),this.status=e,this.code=t,this.details=r,this.name=`ApiError`}};async function a(a,o,s){let c=r.get(),l=n(),u=l?await l.request(a,o,s):await fetch(o,{method:a,headers:{...c?{authorization:`Bearer ${c}`}:{},...s===void 0?{}:{"content-type":`application/json`}},body:s===void 0?void 0:JSON.stringify(s)});if(u.status!==204){if(!u.ok){let n=e.safeParse(await u.json().catch(()=>null));throw n.success?(n.data.error.code===`browser_rejected`&&t(),new i(u.status,n.data.error.code,n.data.error.message,n.data.error.details)):new i(u.status,`unknown`,`${a} ${o} failed with ${u.status}`)}return await u.json()}}function o(){let e=r.get();return e?{authorization:`Bearer ${e}`}:{}}async function s(r,a,s){if(n())throw new i(403,`remote_unavailable`,`Raw file transfers are unavailable remotely`);let c=await fetch(a,{...s,method:r,headers:{...o(),...s?.headers}});if(!c.ok){let n=e.safeParse(await c.json().catch(()=>null));throw n.success?(n.data.error.code===`browser_rejected`&&t(),new i(c.status,n.data.error.code,n.data.error.message,n.data.error.details)):new i(c.status,`unknown`,`${r} ${a} failed with ${c.status}`)}return c}export{o as i,a as n,s as r,i as t};
@@ -0,0 +1,64 @@
1
+ var e;function t(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var n=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},r=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(e=globalThis).__zod_globalConfig??(e.__zod_globalConfig={});var i=globalThis.__zod_globalConfig;function a(e){return e&&Object.assign(i,e),i}function o(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function s(e,t){return typeof t==`bigint`?t.toString():t}function c(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function l(e){return e==null}function u(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function d(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var ee=Symbol(`evaluating`);function f(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ee)return r===void 0&&(r=ee,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function p(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function m(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function te(e){return JSON.stringify(e)}function ne(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var re=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function ie(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ae=c(()=>{if(i.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function oe(e){if(ie(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(ie(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function se(e){return oe(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ce=new Set([`string`,`number`,`symbol`]);function h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function g(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function _(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw 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 le(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ue={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function de(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return g(e,m(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return p(this,`shape`,e),e},checks:[]}))}function fe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return g(e,m(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return p(this,`shape`,r),r},checks:[]}))}function pe(e,t){if(!oe(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return g(e,m(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return p(this,`shape`,n),n}}))}function me(e,t){if(!oe(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return g(e,m(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return p(this,`shape`,n),n}}))}function he(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return g(e,m(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return p(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ge(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return g(t,m(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return p(this,`shape`,i),i},checks:[]}))}function _e(e,t,n){return g(t,m(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return p(this,`shape`,i),i}}))}function ve(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 ye(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function be(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function xe(e){return typeof e==`string`?e:e?.message}function v(e,t,n){let r=e.message?e.message:xe(e.inst?._zod.def?.error?.(e))??xe(t?.error?.(e))??xe(n.customError?.(e))??xe(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function Se(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Ce(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var we=(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,s,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Te=t(`$ZodError`,we),Ee=t(`$ZodError`,we,{Parent:Error});function De(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Oe(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var ke=e=>(t,r,i,o)=>{let s=i?{...i,async:!1}:{async:!1},c=t._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new n;if(c.issues.length){let t=new((o?.Err)??e)(c.issues.map(e=>v(e,s,a())));throw re(t,o?.callee),t}return c.value},Ae=e=>async(t,n,r,i)=>{let o=r?{...r,async:!0}:{async:!0},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let t=new((i?.Err)??e)(s.issues.map(e=>v(e,o,a())));throw re(t,i?.callee),t}return s.value},je=e=>(t,r,i)=>{let o=i?{...i,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new n;return s.issues.length?{success:!1,error:new(e??Te)(s.issues.map(e=>v(e,o,a())))}:{success:!0,data:s.value}},Me=je(Ee),Ne=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>v(e,i,a())))}:{success:!0,data:o.value}},Pe=Ne(Ee),Fe=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ke(e)(t,n,i)},Ie=e=>(t,n,r)=>ke(e)(t,n,r),Le=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ae(e)(t,n,i)},Re=e=>async(t,n,r)=>Ae(e)(t,n,r),ze=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return je(e)(t,n,i)},Be=e=>(t,n,r)=>je(e)(t,n,r),Ve=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ne(e)(t,n,i)},He=e=>async(t,n,r)=>Ne(e)(t,n,r),Ue=/^[cC][0-9a-z]{6,}$/,We=/^[0-9a-z]+$/,Ge=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ke=/^[0-9a-vA-V]{20}$/,qe=/^[A-Za-z0-9]{27}$/,Je=/^[a-zA-Z0-9_-]{21}$/,Ye=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xe=/^([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})$/,Ze=e=>e?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)$/,Qe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$e=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function et(){return new RegExp($e,`u`)}var tt=/^(?:(?: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])$/,nt=/^(([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}|:))$/,rt=/^((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])$/,it=/^(([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])$/,at=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ot=/^[A-Za-z0-9_-]*$/,st=/^https?$/,ct=/^\+[1-9]\d{6,14}$/,lt=`(?:(?:\\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])))`,ut=RegExp(`^${lt}$`);function dt(e){let 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 ft(e){return RegExp(`^${dt(e)}$`)}function pt(e){let t=dt({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${lt}T(?:${r})$`)}var mt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},ht=/^-?\d+$/,gt=/^-?\d+(?:\.\d+)?$/,_t=/^(?:true|false)$/i,vt=/^[^A-Z]*$/,yt=/^[^a-z]*$/,y=t(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),bt={number:`number`,bigint:`bigint`,object:`date`},xt=t(`$ZodCheckLessThan`,(e,t)=>{y.init(e,t);let n=bt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.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})}}),St=t(`$ZodCheckGreaterThan`,(e,t)=>{y.init(e,t);let n=bt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.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})}}),Ct=t(`$ZodCheckMultipleOf`,(e,t)=>{y.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):d(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})}}),wt=t(`$ZodCheckNumberFormat`,(e,t)=>{y.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ue[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=ht)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Tt=t(`$ZodCheckMaxLength`,(e,t)=>{var n;y.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!l(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Se(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Et=t(`$ZodCheckMinLength`,(e,t)=>{var n;y.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!l(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Se(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Dt=t(`$ZodCheckLengthEquals`,(e,t)=>{var n;y.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!l(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Se(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ot=t(`$ZodCheckStringFormat`,(e,t)=>{var n,r;y.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),kt=t(`$ZodCheckRegex`,(e,t)=>{Ot.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})}}),At=t(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=vt,Ot.init(e,t)}),jt=t(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=yt,Ot.init(e,t)}),Mt=t(`$ZodCheckIncludes`,(e,t)=>{y.init(e,t);let n=h(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Nt=t(`$ZodCheckStartsWith`,(e,t)=>{y.init(e,t);let n=RegExp(`^${h(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Pt=t(`$ZodCheckEndsWith`,(e,t)=>{y.init(e,t);let n=RegExp(`.*${h(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Ft=t(`$ZodCheckOverwrite`,(e,t)=>{y.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),It=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
2
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
3
+ `))}},Lt={major:4,minor:4,patch:3},b=t(`$ZodType`,(e,t)=>{var r;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Lt;let i=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&i.unshift(e);for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,r)=>{let i=ve(e),a;for(let o of t){if(o._zod.def.when){if(ye(e)||!o._zod.def.when(e))continue}else if(i)continue;let t=e.issues.length,s=o._zod.check(e);if(s instanceof Promise&&r?.async===!1)throw new n;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,e.issues.length!==t&&(i||=ve(e,t))});else{if(e.issues.length===t)continue;i||=ve(e,t)}}return a?a.then(()=>e):e},r=(r,a,o)=>{if(ve(r))return r.aborted=!0,r;let s=t(a,i,o);if(s instanceof Promise){if(o.async===!1)throw new n;return s.then(t=>e._zod.parse(t,o))}return e._zod.parse(s,o)};e._zod.run=(a,o)=>{if(o.skipChecks)return e._zod.parse(a,o);if(o.direction===`backward`){let t=e._zod.parse({value:a.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,a,o)):r(t,a,o)}let s=e._zod.parse(a,o);if(s instanceof Promise){if(o.async===!1)throw new n;return s.then(e=>t(e,i,o))}return t(s,i,o)}}f(e,`~standard`,()=>({validate:t=>{try{let n=Me(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Pe(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Rt=t(`$ZodString`,(e,t)=>{b.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??mt(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}}),x=t(`$ZodStringFormat`,(e,t)=>{Ot.init(e,t),Rt.init(e,t)}),zt=t(`$ZodGUID`,(e,t)=>{t.pattern??=Xe,x.init(e,t)}),Bt=t(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Ze(e)}else t.pattern??=Ze();x.init(e,t)}),Vt=t(`$ZodEmail`,(e,t)=>{t.pattern??=Qe,x.init(e,t)}),Ht=t(`$ZodURL`,(e,t)=>{x.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===st.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.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(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.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=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Ut=t(`$ZodEmoji`,(e,t)=>{t.pattern??=et(),x.init(e,t)}),Wt=t(`$ZodNanoID`,(e,t)=>{t.pattern??=Je,x.init(e,t)}),Gt=t(`$ZodCUID`,(e,t)=>{t.pattern??=Ue,x.init(e,t)}),Kt=t(`$ZodCUID2`,(e,t)=>{t.pattern??=We,x.init(e,t)}),qt=t(`$ZodULID`,(e,t)=>{t.pattern??=Ge,x.init(e,t)}),Jt=t(`$ZodXID`,(e,t)=>{t.pattern??=Ke,x.init(e,t)}),Yt=t(`$ZodKSUID`,(e,t)=>{t.pattern??=qe,x.init(e,t)}),Xt=t(`$ZodISODateTime`,(e,t)=>{t.pattern??=pt(t),x.init(e,t)}),Zt=t(`$ZodISODate`,(e,t)=>{t.pattern??=ut,x.init(e,t)}),Qt=t(`$ZodISOTime`,(e,t)=>{t.pattern??=ft(t),x.init(e,t)}),$t=t(`$ZodISODuration`,(e,t)=>{t.pattern??=Ye,x.init(e,t)}),en=t(`$ZodIPv4`,(e,t)=>{t.pattern??=tt,x.init(e,t),e._zod.bag.format=`ipv4`}),tn=t(`$ZodIPv6`,(e,t)=>{t.pattern??=nt,x.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})}}}),nn=t(`$ZodCIDRv4`,(e,t)=>{t.pattern??=rt,x.init(e,t)}),rn=t(`$ZodCIDRv6`,(e,t)=>{t.pattern??=it,x.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function an(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var on=t(`$ZodBase64`,(e,t)=>{t.pattern??=at,x.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{an(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function sn(e){if(!ot.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return an(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var cn=t(`$ZodBase64URL`,(e,t)=>{t.pattern??=ot,x.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{sn(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),ln=t(`$ZodE164`,(e,t)=>{t.pattern??=ct,x.init(e,t)});function un(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var dn=t(`$ZodJWT`,(e,t)=>{x.init(e,t),e._zod.check=n=>{un(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),fn=t(`$ZodNumber`,(e,t)=>{b.init(e,t),e._zod.pattern=e._zod.bag.pattern??gt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),pn=t(`$ZodNumberFormat`,(e,t)=>{wt.init(e,t),fn.init(e,t)}),mn=t(`$ZodBoolean`,(e,t)=>{b.init(e,t),e._zod.pattern=_t,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),hn=t(`$ZodUnknown`,(e,t)=>{b.init(e,t),e._zod.parse=e=>e}),gn=t(`$ZodNever`,(e,t)=>{b.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function _n(e,t,n){e.issues.length&&t.issues.push(...be(n,e.issues)),t.value[n]=e.value}var vn=t(`$ZodArray`,(e,t)=>{b.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>_n(t,n,e))):_n(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function yn(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...be(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function bn(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=le(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function xn(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>yn(e,n,i,t,u,d))):yn(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Sn=t(`$ZodObject`,(e,t)=>{if(b.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=c(()=>bn(t));f(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=ie,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>yn(n,t,e,s,r,i))):yn(a,t,e,s,r,i)}return i?xn(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Cn=t(`$ZodObjectJIT`,(e,t)=>{Sn.init(e,t);let n=e._zod.parse,r=c(()=>bn(t)),a=e=>{let t=new It([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=te(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=te(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
4
+ if (${n}.issues.length) {
5
+ if (${o} in input) {
6
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
7
+ ...iss,
8
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
9
+ })));
10
+ }
11
+ }
12
+
13
+ if (${n}.value === undefined) {
14
+ if (${o} in input) {
15
+ newResult[${o}] = undefined;
16
+ }
17
+ } else {
18
+ newResult[${o}] = ${n}.value;
19
+ }
20
+
21
+ `):c?t.write(`
22
+ if (${n}.issues.length) {
23
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
24
+ ...iss,
25
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
26
+ })));
27
+ }
28
+
29
+ if (${n}.value === undefined) {
30
+ if (${o} in input) {
31
+ newResult[${o}] = undefined;
32
+ }
33
+ } else {
34
+ newResult[${o}] = ${n}.value;
35
+ }
36
+
37
+ `):t.write(`
38
+ const ${n}_present = ${o} in input;
39
+ if (${n}.issues.length) {
40
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
41
+ ...iss,
42
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
43
+ })));
44
+ }
45
+ if (!${n}_present && !${n}.issues.length) {
46
+ payload.issues.push({
47
+ code: "invalid_type",
48
+ expected: "nonoptional",
49
+ input: undefined,
50
+ path: [${o}]
51
+ });
52
+ }
53
+
54
+ if (${n}_present) {
55
+ if (${n}.value === undefined) {
56
+ newResult[${o}] = undefined;
57
+ } else {
58
+ newResult[${o}] = ${n}.value;
59
+ }
60
+ }
61
+
62
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},o,s=ie,l=!i.jitless,u=l&&ae.value,d=t.catchall,ee;e._zod.parse=(i,c)=>{ee??=r.value;let f=i.value;return s(f)?l&&u&&c?.async===!1&&c.jitless!==!0?(o||=a(t.shape),i=o(i,c),d?xn([],f,i,c,ee,e):i):n(i,c):(i.issues.push({expected:`object`,code:`invalid_type`,input:f,inst:e}),i)}});function wn(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!ve(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>v(e,r,a())))}),t)}var Tn=t(`$ZodUnion`,(e,t)=>{b.init(e,t),f(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),f(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),f(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),f(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>u(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>wn(t,r,e,i)):wn(o,r,e,i)}}),En=t(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Tn.init(e,t);let n=e._zod.parse;f(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=c(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!ie(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Dn=t(`$ZodIntersection`,(e,t)=>{b.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>kn(e,t,n)):kn(e,i,a)}});function On(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(oe(e)&&oe(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=On(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=On(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function kn(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),ve(e))return e;let o=On(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var An=t(`$ZodRecord`,(e,t)=>{b.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!oe(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let o=[],s=t.keyType._zod.values;if(s){n.value={};let c=new Set;for(let l of s)if(typeof l==`string`||typeof l==`number`||typeof l==`symbol`){c.add(typeof l==`number`?l.toString():l);let s=t.keyType._zod.run({value:l,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>v(e,r,a())),input:l,path:[l],inst:e});continue}let u=s.value,d=t.valueType._zod.run({value:i[l],issues:[]},r);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&n.issues.push(...be(l,e.issues)),n.value[u]=e.value})):(d.issues.length&&n.issues.push(...be(l,d.issues)),n.value[u]=d.value)}let l;for(let e in i)c.has(e)||(l??=[],l.push(e));l&&l.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:l})}else{n.value={};for(let s of Reflect.ownKeys(i)){if(s===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},r);if(c instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof s==`string`&&gt.test(s)&&c.issues.length){let e=t.keyType._zod.run({value:Number(s),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(c=e)}if(c.issues.length){t.mode===`loose`?n.value[s]=i[s]:n.issues.push({code:`invalid_key`,origin:`record`,issues:c.issues.map(e=>v(e,r,a())),input:s,path:[s],inst:e});continue}let l=t.valueType._zod.run({value:i[s],issues:[]},r);l instanceof Promise?o.push(l.then(e=>{e.issues.length&&n.issues.push(...be(s,e.issues)),n.value[c.value]=e.value})):(l.issues.length&&n.issues.push(...be(s,l.issues)),n.value[c.value]=l.value)}}return o.length?Promise.all(o).then(()=>n):n}}),jn=t(`$ZodEnum`,(e,t)=>{b.init(e,t);let n=o(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ce.has(typeof e)).map(e=>typeof e==`string`?h(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Mn=t(`$ZodLiteral`,(e,t)=>{if(b.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?h(e):e?h(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Nn=t(`$ZodTransform`,(e,t)=>{b.init(e,t),e._zod.optin=`optional`,e._zod.parse=(i,a)=>{if(a.direction===`backward`)throw new r(e.constructor.name);let o=t.transform(i.value,i);if(a.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(i.value=e,i.fallback=!0,i));if(o instanceof Promise)throw new n;return i.value=o,i.fallback=!0,i}});function Pn(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Fn=t(`$ZodOptional`,(e,t)=>{b.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,f(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),f(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${u(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Pn(e,r)):Pn(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),In=t(`$ZodExactOptional`,(e,t)=>{Fn.init(e,t),f(e._zod,`values`,()=>t.innerType._zod.values),f(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ln=t(`$ZodNullable`,(e,t)=>{b.init(e,t),f(e._zod,`optin`,()=>t.innerType._zod.optin),f(e._zod,`optout`,()=>t.innerType._zod.optout),f(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${u(e.source)}|null)$`):void 0}),f(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Rn=t(`$ZodDefault`,(e,t)=>{b.init(e,t),e._zod.optin=`optional`,f(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>zn(e,t)):zn(r,t)}});function zn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Bn=t(`$ZodPrefault`,(e,t)=>{b.init(e,t),e._zod.optin=`optional`,f(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Vn=t(`$ZodNonOptional`,(e,t)=>{b.init(e,t),f(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Hn(t,e)):Hn(i,e)}});function Hn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Un=t(`$ZodCatch`,(e,t)=>{b.init(e,t),e._zod.optin=`optional`,f(e._zod,`optout`,()=>t.innerType._zod.optout),f(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>v(e,n,a()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>v(e,n,a()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Wn=t(`$ZodPipe`,(e,t)=>{b.init(e,t),f(e._zod,`values`,()=>t.in._zod.values),f(e._zod,`optin`,()=>t.in._zod.optin),f(e._zod,`optout`,()=>t.out._zod.optout),f(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Gn(e,t.in,n)):Gn(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Gn(e,t.out,n)):Gn(r,t.out,n)}});function Gn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Kn=t(`$ZodReadonly`,(e,t)=>{b.init(e,t),f(e._zod,`propValues`,()=>t.innerType._zod.propValues),f(e._zod,`values`,()=>t.innerType._zod.values),f(e._zod,`optin`,()=>t.innerType?._zod?.optin),f(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(qn):qn(r)}});function qn(e){return e.value=Object.freeze(e.value),e}var Jn=t(`$ZodLazy`,(e,t)=>{b.init(e,t),f(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),f(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),f(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),f(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),f(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Yn=t(`$ZodCustom`,(e,t)=>{y.init(e,t),b.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Xn(t,n,r,e));Xn(i,n,r,e)}});function Xn(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ce(e))}}var Zn,Qn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function $n(){return new Qn}(Zn=globalThis).__zod_globalRegistry??(Zn.__zod_globalRegistry=$n());var er=globalThis.__zod_globalRegistry;function tr(e,t){return new e({type:`string`,..._(t)})}function nr(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,..._(t)})}function rr(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,..._(t)})}function ir(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,..._(t)})}function ar(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,..._(t)})}function or(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,..._(t)})}function sr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,..._(t)})}function cr(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,..._(t)})}function lr(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,..._(t)})}function ur(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,..._(t)})}function dr(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,..._(t)})}function fr(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,..._(t)})}function pr(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,..._(t)})}function mr(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,..._(t)})}function hr(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,..._(t)})}function gr(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,..._(t)})}function _r(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,..._(t)})}function vr(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,..._(t)})}function yr(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,..._(t)})}function br(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,..._(t)})}function xr(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,..._(t)})}function Sr(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,..._(t)})}function Cr(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,..._(t)})}function wr(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,..._(t)})}function Tr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,..._(t)})}function Er(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,..._(t)})}function Dr(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,..._(t)})}function Or(e,t){return new e({type:`number`,checks:[],..._(t)})}function kr(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,..._(t)})}function Ar(e,t){return new e({type:`boolean`,..._(t)})}function jr(e){return new e({type:`unknown`})}function Mr(e,t){return new e({type:`never`,..._(t)})}function Nr(e,t){return new xt({check:`less_than`,..._(t),value:e,inclusive:!1})}function Pr(e,t){return new xt({check:`less_than`,..._(t),value:e,inclusive:!0})}function Fr(e,t){return new St({check:`greater_than`,..._(t),value:e,inclusive:!1})}function Ir(e,t){return new St({check:`greater_than`,..._(t),value:e,inclusive:!0})}function Lr(e,t){return new Ct({check:`multiple_of`,..._(t),value:e})}function Rr(e,t){return new Tt({check:`max_length`,..._(t),maximum:e})}function zr(e,t){return new Et({check:`min_length`,..._(t),minimum:e})}function Br(e,t){return new Dt({check:`length_equals`,..._(t),length:e})}function Vr(e,t){return new kt({check:`string_format`,format:`regex`,..._(t),pattern:e})}function Hr(e){return new At({check:`string_format`,format:`lowercase`,..._(e)})}function Ur(e){return new jt({check:`string_format`,format:`uppercase`,..._(e)})}function Wr(e,t){return new Mt({check:`string_format`,format:`includes`,..._(t),includes:e})}function Gr(e,t){return new Nt({check:`string_format`,format:`starts_with`,..._(t),prefix:e})}function Kr(e,t){return new Pt({check:`string_format`,format:`ends_with`,..._(t),suffix:e})}function S(e){return new Ft({check:`overwrite`,tx:e})}function qr(e){return S(t=>t.normalize(e))}function Jr(){return S(e=>e.trim())}function Yr(){return S(e=>e.toLowerCase())}function Xr(){return S(e=>e.toUpperCase())}function Zr(){return S(e=>ne(e))}function Qr(e,t,n){return new e({type:`array`,element:t,..._(n)})}function $r(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,..._(n)})}function ei(e,t){let n=ti(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ce(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ce(r))}},e(t.value,t)),t);return n}function ti(e,t){let n=new y({check:`custom`,..._(t)});return n._zod.check=e,n}function ni(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??er,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 C(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,C(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&w(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function ri(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
63
+
64
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function ii(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:oi(t,`input`,e.processors),output:oi(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function w(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return w(r.element,n);if(r.type===`set`)return w(r.valueType,n);if(r.type===`lazy`)return w(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 w(r.innerType,n);if(r.type===`intersection`)return w(r.left,n)||w(r.right,n);if(r.type===`record`||r.type===`map`)return w(r.keyType,n)||w(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:w(r.in,n)||w(r.out,n);if(r.type===`object`){for(let e in r.shape)if(w(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(w(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(w(e,n))return!0;return!!(r.rest&&w(r.rest,n))}return!1}var ai=(e,t={})=>n=>{let r=ni({...n,processors:t});return C(e,r),ri(r,e),ii(r,e)},oi=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ni({...i??{},target:a,io:t,processors:n});return C(e,o),ri(o,e),ii(o,e)},si={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ci=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=si[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},li=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),ee=typeof l==`number`&&l<=(o??1/0),f=t.target===`draft-04`||t.target===`openapi-3.0`;d?f?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),ee?f?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},ui=(e,t,n,r)=>{n.type=`boolean`},di=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},fi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},pi=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},mi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},hi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},gi=(e,t,n,r)=>{n.not={}},_i=(e,t,n,r)=>{},vi=(e,t,n,r)=>{},yi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},bi=(e,t,n,r)=>{let i=e._zod.def,a=o(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},xi=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Si=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},Ci=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},wi=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},Ti=(e,t,n,r)=>{n.type=`boolean`},Ei=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Di=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},Oi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},ki=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},Ai=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},ji=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=C(a.element,t,{...r,path:[...r.path,`items`]})},Mi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=C(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=C(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Ni=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>C(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Pi=(e,t,n,r)=>{let i=e._zod.def,a=C(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=C(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Fi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>C(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?C(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},Ii=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=C(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=C(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=C(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Li=(e,t,n,r)=>{let i=e._zod.def,a=C(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ri=(e,t,n,r)=>{let i=e._zod.def;C(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},zi=(e,t,n,r)=>{let i=e._zod.def;C(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Bi=(e,t,n,r)=>{let i=e._zod.def;C(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Vi=(e,t,n,r)=>{let i=e._zod.def;C(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Hi=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;C(o,t,r);let s=t.seen.get(e);s.ref=o},Ui=(e,t,n,r)=>{let i=e._zod.def;C(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Wi=(e,t,n,r)=>{let i=e._zod.def;C(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Gi=(e,t,n,r)=>{let i=e._zod.def;C(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ki=(e,t,n,r)=>{let i=e._zod.innerType;C(i,t,r);let a=t.seen.get(e);a.ref=i},qi={string:ci,number:li,boolean:ui,bigint:di,symbol:fi,null:pi,undefined:mi,void:hi,never:gi,any:_i,unknown:vi,date:yi,enum:bi,literal:xi,nan:Si,template_literal:Ci,file:wi,success:Ti,custom:Ei,function:Di,transform:Oi,map:ki,set:Ai,array:ji,object:Mi,union:Ni,intersection:Pi,tuple:Fi,record:Ii,nullable:Li,nonoptional:Ri,default:zi,prefault:Bi,catch:Vi,pipe:Hi,readonly:Ui,promise:Wi,optional:Gi,lazy:Ki};function Ji(e,t){if(`_idmap`in e){let n=e,r=ni({...t,processors:qi}),i={};for(let e of n._idmap.entries()){let[t,n]=e;C(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;ri(r,n),a[t]=ii(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=ni({...t,processors:qi});return C(e,n),ri(n,e),ii(n,e)}var Yi=t(`ZodISODateTime`,(e,t)=>{Xt.init(e,t),O.init(e,t)});function Xi(e){return wr(Yi,e)}var Zi=t(`ZodISODate`,(e,t)=>{Zt.init(e,t),O.init(e,t)});function Qi(e){return Tr(Zi,e)}var $i=t(`ZodISOTime`,(e,t)=>{Qt.init(e,t),O.init(e,t)});function ea(e){return Er($i,e)}var ta=t(`ZodISODuration`,(e,t)=>{$t.init(e,t),O.init(e,t)});function na(e){return Dr(ta,e)}var T=t(`ZodError`,(e,t)=>{Te.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Oe(e,t)},flatten:{value:t=>De(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,s,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,s,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),ra=ke(T),ia=Ae(T),aa=je(T),oa=Ne(T),sa=Fe(T),ca=Ie(T),la=Le(T),ua=Re(T),da=ze(T),fa=Be(T),pa=Ve(T),ma=He(T),ha=new WeakMap;function ga(e,t,n){let r=Object.getPrototypeOf(e),i=ha.get(r);if(i||(i=new Set,ha.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var E=t(`ZodType`,(e,t)=>(b.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:oi(e,`input`),output:oi(e,`output`)}}),e.toJSONSchema=ai(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>ra(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>aa(e,t,n),e.parseAsync=async(t,n)=>ia(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>oa(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>sa(e,t,n),e.decode=(t,n)=>ca(e,t,n),e.encodeAsync=async(t,n)=>la(e,t,n),e.decodeAsync=async(t,n)=>ua(e,t,n),e.safeEncode=(t,n)=>da(e,t,n),e.safeDecode=(t,n)=>fa(e,t,n),e.safeEncodeAsync=async(t,n)=>pa(e,t,n),e.safeDecodeAsync=async(t,n)=>ma(e,t,n),ga(e,`ZodType`,{check(...e){let t=this.def;return this.clone(m(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return g(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(wo(e,t))},superRefine(e,t){return this.check(To(e,t))},overwrite(e){return this.check(S(e))},optional(){return ro(this)},exactOptional(){return ao(this)},nullable(){return so(this)},nullish(){return ro(so(this))},nonoptional(e){return mo(this,e)},array(){return N(this)},or(e){return I([this,e])},and(e){return Xa(this,e)},transform(e){return vo(this,to(e))},default(e){return lo(this,e)},prefault(e){return fo(this,e)},catch(e){return go(this,e)},pipe(e){return vo(this,e)},readonly(){return bo(this)},describe(e){let t=this.clone();return er.add(t,{description:e}),t},meta(...e){if(e.length===0)return er.get(this);let t=this.clone();return er.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return er.get(e)?.description},configurable:!0}),e)),_a=t(`_ZodString`,(e,t)=>{Rt.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ci(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ga(e,`_ZodString`,{regex(...e){return this.check(Vr(...e))},includes(...e){return this.check(Wr(...e))},startsWith(...e){return this.check(Gr(...e))},endsWith(...e){return this.check(Kr(...e))},min(...e){return this.check(zr(...e))},max(...e){return this.check(Rr(...e))},length(...e){return this.check(Br(...e))},nonempty(...e){return this.check(zr(1,...e))},lowercase(e){return this.check(Hr(e))},uppercase(e){return this.check(Ur(e))},trim(){return this.check(Jr())},normalize(...e){return this.check(qr(...e))},toLowerCase(){return this.check(Yr())},toUpperCase(){return this.check(Xr())},slugify(){return this.check(Zr())}})}),va=t(`ZodString`,(e,t)=>{Rt.init(e,t),_a.init(e,t),e.email=t=>e.check(nr(ya,t)),e.url=t=>e.check(cr(Sa,t)),e.jwt=t=>e.check(Cr(La,t)),e.emoji=t=>e.check(lr(Ca,t)),e.guid=t=>e.check(rr(ba,t)),e.uuid=t=>e.check(ir(xa,t)),e.uuidv4=t=>e.check(ar(xa,t)),e.uuidv6=t=>e.check(or(xa,t)),e.uuidv7=t=>e.check(sr(xa,t)),e.nanoid=t=>e.check(ur(wa,t)),e.guid=t=>e.check(rr(ba,t)),e.cuid=t=>e.check(dr(Ta,t)),e.cuid2=t=>e.check(fr(Ea,t)),e.ulid=t=>e.check(pr(Da,t)),e.base64=t=>e.check(br(Pa,t)),e.base64url=t=>e.check(xr(Fa,t)),e.xid=t=>e.check(mr(Oa,t)),e.ksuid=t=>e.check(hr(ka,t)),e.ipv4=t=>e.check(gr(Aa,t)),e.ipv6=t=>e.check(_r(ja,t)),e.cidrv4=t=>e.check(vr(Ma,t)),e.cidrv6=t=>e.check(yr(Na,t)),e.e164=t=>e.check(Sr(Ia,t)),e.datetime=t=>e.check(Xi(t)),e.date=t=>e.check(Qi(t)),e.time=t=>e.check(ea(t)),e.duration=t=>e.check(na(t))});function D(e){return tr(va,e)}var O=t(`ZodStringFormat`,(e,t)=>{x.init(e,t),_a.init(e,t)}),ya=t(`ZodEmail`,(e,t)=>{Vt.init(e,t),O.init(e,t)}),ba=t(`ZodGUID`,(e,t)=>{zt.init(e,t),O.init(e,t)}),xa=t(`ZodUUID`,(e,t)=>{Bt.init(e,t),O.init(e,t)});function k(e){return ir(xa,e)}var Sa=t(`ZodURL`,(e,t)=>{Ht.init(e,t),O.init(e,t)}),Ca=t(`ZodEmoji`,(e,t)=>{Ut.init(e,t),O.init(e,t)}),wa=t(`ZodNanoID`,(e,t)=>{Wt.init(e,t),O.init(e,t)}),Ta=t(`ZodCUID`,(e,t)=>{Gt.init(e,t),O.init(e,t)}),Ea=t(`ZodCUID2`,(e,t)=>{Kt.init(e,t),O.init(e,t)}),Da=t(`ZodULID`,(e,t)=>{qt.init(e,t),O.init(e,t)}),Oa=t(`ZodXID`,(e,t)=>{Jt.init(e,t),O.init(e,t)}),ka=t(`ZodKSUID`,(e,t)=>{Yt.init(e,t),O.init(e,t)}),Aa=t(`ZodIPv4`,(e,t)=>{en.init(e,t),O.init(e,t)}),ja=t(`ZodIPv6`,(e,t)=>{tn.init(e,t),O.init(e,t)}),Ma=t(`ZodCIDRv4`,(e,t)=>{nn.init(e,t),O.init(e,t)}),Na=t(`ZodCIDRv6`,(e,t)=>{rn.init(e,t),O.init(e,t)}),Pa=t(`ZodBase64`,(e,t)=>{on.init(e,t),O.init(e,t)}),Fa=t(`ZodBase64URL`,(e,t)=>{cn.init(e,t),O.init(e,t)}),Ia=t(`ZodE164`,(e,t)=>{ln.init(e,t),O.init(e,t)}),La=t(`ZodJWT`,(e,t)=>{dn.init(e,t),O.init(e,t)}),Ra=t(`ZodNumber`,(e,t)=>{fn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>li(e,t,n,r),ga(e,`ZodNumber`,{gt(e,t){return this.check(Fr(e,t))},gte(e,t){return this.check(Ir(e,t))},min(e,t){return this.check(Ir(e,t))},lt(e,t){return this.check(Nr(e,t))},lte(e,t){return this.check(Pr(e,t))},max(e,t){return this.check(Pr(e,t))},int(e){return this.check(Ba(e))},safe(e){return this.check(Ba(e))},positive(e){return this.check(Fr(0,e))},nonnegative(e){return this.check(Ir(0,e))},negative(e){return this.check(Nr(0,e))},nonpositive(e){return this.check(Pr(0,e))},multipleOf(e,t){return this.check(Lr(e,t))},step(e,t){return this.check(Lr(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function A(e){return Or(Ra,e)}var za=t(`ZodNumberFormat`,(e,t)=>{pn.init(e,t),Ra.init(e,t)});function Ba(e){return kr(za,e)}var Va=t(`ZodBoolean`,(e,t)=>{mn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ui(e,t,n,r)});function j(e){return Ar(Va,e)}var Ha=t(`ZodUnknown`,(e,t)=>{hn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function M(){return jr(Ha)}var Ua=t(`ZodNever`,(e,t)=>{gn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gi(e,t,n,r)});function Wa(e){return Mr(Ua,e)}var Ga=t(`ZodArray`,(e,t)=>{vn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ji(e,t,n,r),e.element=t.element,ga(e,`ZodArray`,{min(e,t){return this.check(zr(e,t))},nonempty(e){return this.check(zr(1,e))},max(e,t){return this.check(Rr(e,t))},length(e,t){return this.check(Br(e,t))},unwrap(){return this.element}})});function N(e,t){return Qr(Ga,e,t)}var Ka=t(`ZodObject`,(e,t)=>{Cn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mi(e,t,n,r),f(e,`shape`,()=>t.shape),ga(e,`ZodObject`,{keyof(){return z(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:M()})},loose(){return this.clone({...this._zod.def,catchall:M()})},strict(){return this.clone({...this._zod.def,catchall:Wa()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return pe(this,e)},safeExtend(e){return me(this,e)},merge(e){return he(this,e)},pick(e){return de(this,e)},omit(e){return fe(this,e)},partial(...e){return ge(no,this,e[0])},required(...e){return _e(po,this,e[0])}})});function P(e,t){return new Ka({type:`object`,shape:e??{},..._(t)})}function F(e,t){return new Ka({type:`object`,shape:e,catchall:M(),..._(t)})}var qa=t(`ZodUnion`,(e,t)=>{Tn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ni(e,t,n,r),e.options=t.options});function I(e,t){return new qa({type:`union`,options:e,..._(t)})}var Ja=t(`ZodDiscriminatedUnion`,(e,t)=>{qa.init(e,t),En.init(e,t)});function L(e,t,n){return new Ja({type:`union`,options:t,discriminator:e,..._(n)})}var Ya=t(`ZodIntersection`,(e,t)=>{Dn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pi(e,t,n,r)});function Xa(e,t){return new Ya({type:`intersection`,left:e,right:t})}var Za=t(`ZodRecord`,(e,t)=>{An.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ii(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function R(e,t,n){return!t||!t._zod?new Za({type:`record`,keyType:D(),valueType:e,..._(t)}):new Za({type:`record`,keyType:e,valueType:t,..._(n)})}var Qa=t(`ZodEnum`,(e,t)=>{jn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bi(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Qa({...t,checks:[],..._(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Qa({...t,checks:[],..._(r),entries:i})}});function z(e,t){return new Qa({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,..._(t)})}var $a=t(`ZodLiteral`,(e,t)=>{Mn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xi(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function B(e,t){return new $a({type:`literal`,values:Array.isArray(e)?e:[e],..._(t)})}var eo=t(`ZodTransform`,(e,t)=>{Nn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r),e._zod.parse=(n,i)=>{if(i.direction===`backward`)throw new r(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ce(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Ce(t))}};let a=t.transform(n.value,n);return a instanceof Promise?a.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=a,n.fallback=!0,n)}});function to(e){return new eo({type:`transform`,transform:e})}var no=t(`ZodOptional`,(e,t)=>{Fn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ro(e){return new no({type:`optional`,innerType:e})}var io=t(`ZodExactOptional`,(e,t)=>{In.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ao(e){return new io({type:`optional`,innerType:e})}var oo=t(`ZodNullable`,(e,t)=>{Ln.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Li(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function so(e){return new oo({type:`nullable`,innerType:e})}var co=t(`ZodDefault`,(e,t)=>{Rn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function lo(e,t){return new co({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():se(t)}})}var uo=t(`ZodPrefault`,(e,t)=>{Bn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fo(e,t){return new uo({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():se(t)}})}var po=t(`ZodNonOptional`,(e,t)=>{Vn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ri(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function mo(e,t){return new po({type:`nonoptional`,innerType:e,..._(t)})}var ho=t(`ZodCatch`,(e,t)=>{Un.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function go(e,t){return new ho({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var _o=t(`ZodPipe`,(e,t)=>{Wn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hi(e,t,n,r),e.in=t.in,e.out=t.out});function vo(e,t){return new _o({type:`pipe`,in:e,out:t})}var yo=t(`ZodReadonly`,(e,t)=>{Kn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ui(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bo(e){return new yo({type:`readonly`,innerType:e})}var xo=t(`ZodLazy`,(e,t)=>{Jn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ki(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function So(e){return new xo({type:`lazy`,getter:e})}var Co=t(`ZodCustom`,(e,t)=>{Yn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ei(e,t,n,r)});function wo(e,t={}){return $r(Co,e,t)}function To(e,t){return ei(e,t)}var Eo=P({error:P({code:D(),message:D(),details:R(D(),M()).optional()})}),V=Xi({offset:!0}),H=A().int().positive(),U=k(),W=D().regex(/^[0-9a-f]{10}$/),G=D().regex(/^[0-9a-f]{10}$/),Do=P({desktop:j().default(!0),sound:j().default(!1),when_focused:j().default(!0),muted_projects:N(D()).default([])}),Oo=P({project:W,session:U,host:D().uuid().optional()}).strict(),ko=P({title:D().min(1).max(160),body:D().min(1).max(256),project:W,session:U}).strict();P({id:D().min(1).max(128),title:D().min(1).max(160),subtitle:D().min(1).max(160).optional(),body:D().min(1).max(256),target:Oo.optional()}).strict();var Ao=P({state:z([`unverified`,`shown`,`failed`,`unsupported`]),message:D().max(512).nullable()}),jo=P({t:B(`agent-notification`),id:D().uuid(),session:D().uuid(),reason:z([`waiting_input`,`exited`]),content:ko.optional()}),Mo=P({version:D(),remote_notifications:j().optional(),remote_notification_previews:j().optional(),remote_image_uploads:j().optional(),protocol:P({major:A().int().nonnegative(),minor:A().int().nonnegative()})});I([P({nonce:D().min(16),state:z([`working`,`waiting_input`])}),P({nonce:D().min(16),event:z([`session_start`,`session_end`]),agent_session_ref:D().min(1).optional(),cwd:D().min(1),source:z([`startup`,`resume`,`clear`,`fork`,`compact`,`exit`,`other`]),parent_agent_session_ref:D().min(1).optional(),native_title:D().optional(),native_created_at:Xi({offset:!0}).optional(),native_updated_at:Xi({offset:!0}).optional()}),P({nonce:D().min(16).max(200),event:z([`turn_start`,`turn_complete`,`turn_failed`]),agent_session_ref:D().min(1).max(200),turn_id:D().min(1).max(200),prompt_hash:D().regex(/^[a-f0-9]{64}$/).optional(),reply:D().max(256*1024).refine(e=>new TextEncoder().encode(e).length<=256*1024).optional(),error:D().max(4096).optional()})]);var K={port:A().int().min(1).max(65535),autoResume:j(),fetchIntervalMinutes:A().int().min(1),logMaxBytes:A().int().min(64*1024),replayBytes:A().int().min(1024),uiStateRetentionDays:A().int().min(1),agentPath:D(),displayName:D().max(64)};P({port:K.port.default(7434),autoResume:K.autoResume.default(!0),fetchIntervalMinutes:K.fetchIntervalMinutes.default(15),logMaxBytes:K.logMaxBytes.default(10*1024*1024),replayBytes:K.replayBytes.default(256*1024),uiStateRetentionDays:K.uiStateRetentionDays.default(90),agentPath:K.agentPath.default(`~/.local/bin:~/bin:/opt/homebrew/bin:/usr/local/bin`),displayName:K.displayName.default(``)}),P(K).partial(),P({entries:N(P({path:D(),name:D(),is_git:j()}))}),P({username:D(),hostname:D(),home:D(),displayName:D().optional()});var No=D().min(1).max(64).regex(/^[A-Za-z0-9][A-Za-z0-9._-]*$/,`letters, digits, dot, underscore and hyphen only`),Po=`puddle/`,Fo="This is a freshly created git worktree for this task. Before starting, set up the environment as appropriate by reading any setup rules (see below) and inspecting the codebase. If the user states a rule for all future worktrees, write the complete updated rules to `.puddle/onboarding-notes.md` in this worktree. Setup rules:{{rules}}",Io=`You are joining an existing branch and worktree that other agents may be working in; files and git status may change concurrently.`,Lo=`This session has been resumed. Your work and processes may or may not have been survived, and you may or may not have unfinished tasks. Please continue working or waiting as appropriate.`,Ro=[[`name`,`the resolved display name: user rename, else agent name, else sequence, else id`],[`title`,`the user rename override only (empty when unset)`],[`agentName`,`the agent's own session name (empty when the agent has not named it)`],[`sequence`,`the terminal-title name the process set (empty when it set none)`],[`branch`,`the git branch`],[`cwd`,`the worktree directory's name`],[`id`,`the first 8 characters of the session id`],[`status`,`the session status (running, waiting_input, …)`],[`agent`,`the agent type (empty for terminal sessions)`],[`separator`,`an em dash that appears only between two non-empty neighbours`]],zo="${name}",Bo=[`navy`,`gold`,`blue`,`green`,`red`,`violet`,`cyan`];P({id:G,name:No,branch_prefix:D(),icon:D().nullable().default(null),icon_colour:D().nullable().default(null),created_at:V}),P({name:No,branch_prefix:D().max(64).optional()}),P({name:No.optional(),branch_prefix:D().max(64).optional(),icon:D().max(64).nullable().optional(),icon_colour:D().max(32).nullable().optional()});var Vo=F({baseBranch:D().optional(),separateBranch:j().optional(),separateWorktree:j().optional()}),Ho=F({agent:Vo.optional(),terminal:Vo.optional()});F({allowSkipPermissions:j().default(!1),captureSessionEnv:j().default(!0),terminalAppShortcuts:j().default(!0),onboardingTemplate:D().optional(),concurrentTemplate:D().optional(),restartTemplate:D().optional(),tabTitleTemplate:D().optional(),projectOrder:N(D()).optional(),sessionDefaults:Ho.optional(),hotkeys:R(D(),D()).optional()}),R(D(),M());var Uo=D().regex(/^untitled-\d+\.md$/);P({name:Uo}),P({name:Uo,content:D(),mtime_ms:A()}),P({content:D()}),P({mtime_ms:A()}),P({id:H,profile_id:G,agent_type:D(),label:D(),config_dir:D(),skip_permissions_default:j(),logged_in:j(),created_at:V}),P({profile_id:G,agent_type:D().min(1),label:No,skip_permissions_default:j().optional(),import_dir:D().min(1).optional()}),P({label:No.optional(),skip_permissions_default:j().optional()}),P({stream:D(),term:D(),hint:D().optional()}),F({account_id:H,logged_in:j(),session_count:A().int().nonnegative(),active_session_count:A().int().nonnegative(),last_activity_at:V.nullable(),agent_usage:P({input_tokens:A().int().nonnegative(),output_tokens:A().int().nonnegative(),cache_read_input_tokens:A().int().nonnegative(),cache_creation_input_tokens:A().int().nonnegative(),message_count:A().int().nonnegative()}).nullable(),live_usage:P({captured_at:V,context_used_percentage:A().nullable(),total_cost_usd:A().nullable(),model:D().nullable()}).nullable(),subscription:P({windows:N(P({key:D(),label:D(),used_percentage:A(),resets:D().nullable()}))}).nullable()}),P({id:D(),display_name:D(),capabilities:P({resume:j(),skip_permissions:j()}),binary:D().optional(),available:j().optional()}),P({id:H,path:D(),default_base_branch:D(),onboarding_notes:D().nullable(),fetch_enabled:j(),last_fetched_at:V.nullable()}).extend({orphan_worktrees:N(D())}),P({path:D().min(1),default_base_branch:D().optional(),onboarding_notes:D().nullable().optional(),fetch_enabled:j().optional()}),P({branches:N(P({name:D(),is_session:j(),session_title:D().nullable()}))});var Wo=P({path:D(),branch:D().nullable(),is_primary:j(),dirty:j().optional(),local_only:j().optional()}),Go=P({name:D(),local_only:j()});P({worktrees:N(Wo),orphan_branches:N(Go)}),P({default_base_branch:D().optional(),onboarding_notes:D().nullable().optional(),fetch_enabled:j().optional()});var Ko=z([`starting`,`running`,`waiting_input`,`exited`,`interrupted`,`archived`]),qo=z([`agent`,`terminal`]),Jo=z([`interactive`,`headless`]),Yo=P({id:U,project_id:W,account_id:H.nullable(),worktree_path:D(),base_branch:D(),branch:D(),separate_branch:j(),kind:qo,agent_type:D().nullable(),agent_mode:Jo.optional(),detected_agent_type:D().nullable().optional(),agent_session_ref:D().nullable(),conversation_id:H.nullable().optional(),parent_conversation_id:H.nullable().optional(),title:D().nullable(),agent_title:D().nullable().optional(),conversation_missing:j().optional(),branch_owner:j().optional(),native_sync:z([`pending`,`full`,`fallback`]).optional(),osc_title:D().nullable().optional(),status:Ko,cwd:D().nullable().optional(),skip_permissions:j(),created_at:V,updated_at:V,last_activity_at:V.nullable(),worktree_missing:j().optional(),stale_running:j().optional(),git_summary:P({ahead:A().int().nonnegative(),behind:A().int().nonnegative(),dirty_files:A().int().nonnegative()}).nullable().optional()});P({project_id:W,account_id:H.optional(),kind:qo.optional(),base_branch:D().min(1).optional(),branch:D().min(1).max(200).optional(),separate_branch:j().optional(),separate_worktree:j().optional(),join_worktree:D().optional(),cwd:D().optional(),title:D().min(1).max(200).optional(),prompt:D().optional(),skip_permissions:j().optional()}),P({title:D().max(200)}),P({account_id:H}),P({account_id:H}),P({vars:N(P({name:D(),bytes:A().int().nonnegative(),value:D().optional()}))}),P({cleared:A().int().nonnegative()}),P({force:j().default(!1),delete_branch:j().default(!1)});var Xo=D().min(1).max(5),Zo=z(Bo),Qo=P({id:W,profile_id:G,repo_id:H,name:D(),abbrev:Xo.nullable().default(null),colour:Zo.nullable().optional(),archived:j().default(!1),created_at:V,updated_at:V});P({profile_id:G,repo_id:H,name:D().min(1).max(100),abbrev:Xo.optional(),colour:Zo.nullable().optional()}),P({name:D().min(1).max(100).optional(),abbrev:Xo.optional(),colour:Zo.nullable().optional(),archived:j().optional()}),P({project:Qo,sessions:N(Yo)});var $o=z([`project`,`profile`]);P({id:H,profile_id:G,scope:$o,project_id:W.nullable(),title:D().nullable(),body:D(),tags:N(D()),agent_type:D().nullable(),position:A(),created_at:V,updated_at:V}),P({profile_id:G,scope:$o,project_id:W.optional(),title:D().max(200).optional(),body:D().min(1),tags:N(D()).optional(),agent_type:D().optional()}),P({scope:$o.optional(),project_id:W.nullable().optional(),title:D().max(200).nullable().optional(),body:D().min(1).optional(),tags:N(D()).optional(),agent_type:D().nullable().optional(),position:A().optional()});var es=z([`on_demand`,`eager`]),q=P({session:U,path:D().min(1),root:D().min(1).optional()}),J=D().regex(/^[a-z][a-z0-9_-]*$/);P({providers:N(P({id:J,display_name:D().min(1),extensions:N(D().regex(/^[a-z0-9]+$/)).min(1),input_extensions:N(D().regex(/^[a-z0-9]+$/)).min(1),available:j(),executor:D().min(1).nullable(),eager:j(),action:z([`compile`,`run`]).optional(),terminal:j().optional()}))});var ts=P({source:q,provider:J.optional(),profile_id:G.optional(),project_id:W.optional()}),ns=P({role:D().min(1),media_type:D().min(1),file:q}),rs=P({source:q,severity:z([`error`,`warning`,`info`]),message:D().min(1),line:A().int().positive(),column:A().int().positive().optional(),end_line:A().int().positive().optional(),end_column:A().int().positive().optional()}),is=P({source:q.optional(),output:D().optional(),diagnostics:N(rs).optional()}),as=is.extend({message:D().min(1)}),os=P({provider:J,executor:D().min(1),revision:A().int().nonnegative(),source:q,artifacts:N(ns),terminal:Yo.optional(),navigation:P({kind:D().min(1)}).optional()});ts.extend({mode:es}),P({provider:J,mode:es,state:z([`idle`,`running`,`succeeded`,`failed`]),revision:A().int().nonnegative(),result:os.nullable(),error:as.nullable()});var ss=P({placeholder:D().regex(/^\{\{[a-z][a-z0-9_]*\}\}$/),description:D().min(1)}),cs=P({mode:es,run_when:z([`when_clicked`,`upon_file_change`]),default_command:D().min(1).nullable(),override_command:D().min(1).nullable(),inherited_command:D().min(1).nullable().optional()}),ls=ts.extend({profile_id:G,project_id:W}),us=P({provider:J,display_name:D().min(1),file_type:D().regex(/^[a-z0-9][a-z0-9_-]*$/),file_path:D().min(1),variables:N(ss),commands:N(cs).min(1)}),ds=ls.extend({mode:es,command:D().trim().min(1).max(16384).nullable()}),fs=P({profile_id:G,provider:J});us.omit({file_type:!0,file_path:!0}),fs.extend({mode:es,command:ds.shape.command});var ps=`00000000-0000-0000-0000-000000000000`,ms=P({session:U,path:D(),kind:z([`file`,`diff`,`commit`,`external`,`untitled`]).optional(),sha:D().optional(),git_area:z([`staged`,`unstaged`]).optional(),root:D().optional(),view:z([`source`,`preview`,`linked`,`locked`]).optional(),compile_mode:es.optional(),generated_by:J.optional()}),hs=L(`type`,[P({type:B(`editor`),tab:ms}),P({type:B(`terminal`),session:U})]),gs=P({kind:B(`leaf`),id:D(),tabs:N(hs).default([]),activeKey:D().nullable().default(null),previewKey:D().nullable().default(null)}),Y=So(()=>L(`kind`,[gs,P({kind:B(`split`),id:D(),direction:z([`row`,`col`]),children:N(Y),sizes:N(A())})])),_s=F({layout_tree:Y.nullable().default(null),active_session:U.nullable().default(null),layout_ref:H.nullable().default(null)}),vs=F({session_tabs:N(U).default([]),active_session:U.nullable().default(null),editor_tabs:N(ms).default([]),layout:F({}).default({}),explorer_pin:U.nullable().default(null),active_editor_tab:ms.nullable().default(null),explorer_open:j().default(!0),sidebar_mode:z([`files`,`diff`,`history`,`changes`,`search`,`worktrees`]).default(`files`),sidebar_collapsed:j().default(!1),sessions_collapsed:j().default(!1),right_panel:z([`sessions`,`scratchpad`]).optional(),session_order:N(U).default([]),layout_tree:Y.nullable().default(null),layout_mode:z([`profile`,`project`]).optional(),project_layouts:R(D(),_s).default({}),layout_ref:H.nullable().default(null)});P({ui_state:vs}),P({ui_state:vs,updated_at:V});var ys=z([`project`,`profile`]);P({id:H,profile_id:G,scope:ys,project_id:W.nullable(),name:D(),layout_tree:Y.nullable(),active_session:U.nullable(),created_at:V,updated_at:V}),P({profile_id:G,scope:ys,project_id:W.optional(),name:D().min(1).max(200),layout_tree:Y.nullable(),active_session:U.nullable().optional()}),P({name:D().min(1).max(200).optional(),layout_tree:Y.nullable().optional(),active_session:U.nullable().optional()});var bs=P({name:D().min(1),display_name:D().min(1),language:D()});P({available:j(),kernels:N(bs),error:D().optional()});var xs=P({source:q}),Ss=D().trim().min(1).max(4096).refine(e=>!e.includes(`\0`)),Cs=P({python:Ss,label:D(),ipykernel:j(),nbconvert:j(),error:D().optional()});P({environments:N(Cs)}),P({state:z([`stopped`,`starting`,`idle`,`busy`,`dead`]),kernel:D().nullable(),error:D().optional(),environment:Cs.optional()}),L(`action`,[xs.extend({action:B(`select`),kernel:D().min(1).max(256)}),xs.extend({action:z([`interrupt`,`restart`,`shutdown`])}),xs.extend({action:B(`select-python`),python:Ss}),xs.extend({action:B(`install-python`),python:Ss})]),q.extend({root:D().min(1),page:A().int().positive(),x:A().finite().nonnegative(),y:A().finite().nonnegative()});var ws=q.extend({line:A().int().positive(),column:A().int().nonnegative().optional()}),Ts=z([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]);P({mime:Ts,data:D().min(1)});var Es=P({path:D()});P({path:D(),line:A().int().nullable(),kind:z([`file`,`dir`]).optional(),relative_path:D().optional(),root:D().optional()});var Ds=P({name:D(),type:z([`file`,`dir`,`symlink`]),size:A().int().nonnegative().nullable(),symlink:j().default(!1)});P({path:D(),entries:N(Ds)});var Os=P({path:D(),content:D().nullable(),binary:j(),size:A().int().nonnegative(),mtime_ms:A()}),ks=P({mime:D().min(1).max(128),data:D().max(4*2796203)});P({content:D(),expected_mtime_ms:A().optional()}),P({path:D(),mtime_ms:A(),size:A().int().nonnegative()}),P({files:N(P({path:D(),size:A().int().nonnegative()}))}),P({path:D().min(1),kind:z([`file`,`dir`])}),P({from:D().min(1),to:D().min(1)}),P({from:D().min(1),to:D().min(1)}),P({operation:z([`copy`,`move`]),source:P({session_id:U,root:D().optional()}),from:D().min(1),to:D().min(1)}),P({path:D().min(1)}),P({ok:B(!0),path:D()});var As=z([`added`,`modified`,`deleted`,`renamed`]),js=z([`staged`,`unstaged`]),Ms=P({path:D(),status:As,old_path:D().nullable()}),Ns=P({against:D(),base_ref:D().nullable(),entries:N(Ms),area:js.optional()}),Ps=z([`untracked`,`modified`,`added`,`deleted`,`renamed`,`conflicted`,`ignored`]),Fs=P({path:D(),status:Ps});P({entries:N(Fs)});var Is=P({path:D(),status:Ps.exclude([`ignored`]),old_path:D().nullable()});P({repositories:N(P({root:D(),relative_path:D(),name:D(),owning:j(),submodule:j(),initialised:j(),head:D().nullable(),branch:D().nullable(),detached:j(),upstream:D().nullable(),ahead:A().int().nonnegative(),behind:A().int().nonnegative(),has_remote:j(),staged:N(Is),unstaged:N(Is),conflicts:N(Is)})),entries:N(Fs)});var Ls=P({repository:D().min(1)});Ls.extend({paths:N(D().min(1)).min(1)}),Ls.extend({message:D().trim().min(1),stage_all:j().optional()}),Ls.extend({set_upstream:j().optional()}),P({ok:B(!0),sha:D().optional()}),P({path:D(),content:D().nullable(),binary:j(),exists:j()}),P({path:D(),repository:D().nullable(),repository_path:D().nullable(),head:D().nullable(),content:D().nullable(),binary:j(),exists:j(),tracked:j(),ignored:j()});var Rs=P({path:D(),ref:D(),content:D().nullable(),binary:j()}),zs=P({sha:D(),subject:D(),author_name:D(),author_email:D(),authored_at:V,parents:N(D()).optional()});P({commits:N(zs),has_more:j()}),P({commit:zs.extend({body:D()}),parents:N(D()),files:N(Ms)});var Bs=P({line:A().int().positive(),text:D()}),Vs=P({path:D(),matches:N(Bs)});P({query:D(),files:N(D()),content:N(Vs),truncated:j()}),P({ports:N(P({port:A().int().min(1).max(65535),pid:A().int(),command:D(),address:D()})),scanned_at:V}),P({refreshId:D().uuid()}).strict();var Hs=P({status:B(`refreshing`),refreshId:D().uuid(),instance:D().uuid()}),Us=P({name:z([`Finder`,`File Explorer`,`File Manager`]).nullable()});P({path:D().min(1).max(4096).refine(e=>!e.includes(`\0`))}).strict();var Ws=D().regex(/^(agent|shell-[0-9]+)$/),Gs=`home`,Ks={cols:A().int().min(2).max(1e3),rows:A().int().min(2).max(500)},qs=L(`t`,[P({t:B(`auth`),token:D().max(128),resource:D().regex(/^[a-f0-9]{64}$/).optional()}),P({t:B(`attach`),session:D(),term:Ws,...Ks}),P({t:B(`stdin`),session:D(),term:Ws,data:D()}),P({t:B(`resize`),session:D(),term:Ws,...Ks}),P({t:B(`detach`),session:D(),term:Ws}),P({t:B(`spawn-shell`),session:D()}),P({t:B(`kill-shell`),session:D(),term:Ws}),P({t:B(`subscribe-status`)}),P({t:B(`theme`),fg:D().regex(/^#[0-9a-fA-F]{6}$/),bg:D().regex(/^#[0-9a-fA-F]{6}$/)})]),Js=L(`t`,[jo,P({t:B(`authenticated`)}),P({t:B(`shell-spawned`),session:D(),term:D()}),P({t:B(`replay`),session:D(),term:D(),data:D()}),P({t:B(`output`),session:D(),term:D(),data:D()}),P({t:B(`status`),session:D(),status:Ko,last_activity_at:D().nullable()}),P({t:B(`renamed`),session:D(),title:D().nullable(),agent_title:D().nullable().optional(),osc_title:D().nullable().optional()}),P({t:B(`exit`),session:D(),term:D(),code:A()}),P({t:B(`notice`),level:z([`error`,`warning`]),title:D(),detail:D().optional(),session:D().optional(),term:D().optional()}),P({t:B(`account`),account_id:A(),profile_id:D(),logged_in:j()}),P({t:B(`session-switched`),source_session:D(),target_session:D(),target_project:D(),cause:z([`clear`,`resume`,`fork`]),outcome:z([`rebound`,`focused-existing`])}),P({t:B(`sessions-changed`),project_ids:N(D())}),P({t:B(`error`),message:D()})]),Ys={chunkBytes:32*1024,frameBytes:48*1024,requestBytes:256*1024,responseBytes:16*1024*1024,queueBytes:1024*1024,relayQueueBytes:64*1024*1024,requests:8,connectionsPerHost:8,connectionsPerAccount:16,connections:128,handshakeMs:1e4,invitationMs:3e5,idleMs:720*60*60*1e3,absoluteMs:2160*60*60*1e3},X=D().uuid(),Z=D().regex(/^[a-f0-9]{64}$/),Xs=D().min(20).max(128),Q=D().min(1).max(128),Zs=D().trim().min(1).max(80).regex(/^[^\u0000-\u001f\u007f]+$/),$=D().url().refine(e=>{try{let t=new URL(e);return t.protocol===`https:`&&t.origin===e&&!t.username&&!t.password}catch{return!1}},`An exact HTTPS origin is required`),Qs=P({version:B(4),service:$,host:X,peer:Xs,invitation:Z,expires:A().int().positive()}).strict();P({t:B(`connect`),host:X}).strict(),L(`t`,[P({t:B(`registered`),host:X}).strict(),P({t:B(`open`),connection:X,account:Q}).strict(),P({t:B(`ready`),connection:X,account:Q}).strict()]);var $s=P({id:X,peer:Xs,account:Q,label:Zs,created:A(),lastUsed:A(),expires:A(),status:z([`pending`,`approved`,`revoked`])}),ec=L(`t`,[P({t:B(`status`)}).strict(),P({t:B(`pair`)}).strict(),P({t:B(`devices`)}).strict(),P({t:B(`approve`),id:X}).strict(),P({t:B(`revoke`),id:X}).strict(),P({t:B(`disable`)}).strict()]),tc=P({enabled:j().optional(),connected:j().optional(),host:X.optional(),peer:Xs.optional(),invitation:Qs.optional(),url:D().url().optional(),devices:N($s).optional(),error:D().max(256).optional()}).strict();L(`t`,[P({t:B(`hello`),account:Q,label:Zs,invitation:Z.optional()}).strict(),P({t:B(`pending`),device:$s}).strict(),P({t:B(`admitted`),generation:X,device:X}).strict(),P({t:B(`challenge`),nonce:Z,generation:X}).strict(),P({t:B(`participate`),nonce:Z,generation:X,resources:N(X).max(Ys.requests+1)}).strict(),P({t:B(`request`),id:X,method:z([`GET`,`POST`,`PATCH`]),path:D().max(8192),body:M().optional()}).strict(),P({t:B(`response`),id:X,status:A().int().min(100).max(599),body:M()}).strict(),P({t:B(`cancel`),id:X}).strict(),P({t:B(`stream`),id:X}).strict(),P({t:B(`terminal`),id:X,message:qs}).strict(),P({t:B(`event`),message:Js}).strict(),P({t:B(`sent`),id:X}).strict(),P({t:B(`admin`),id:X,request:ec}).strict(),P({t:B(`admin-result`),id:X,result:tc}).strict(),P({t:B(`error`),code:z([`rejected`,`expired`,`unavailable`,`protocol_mismatch`]),message:D().max(256)}).strict()]),P({id:X,index:A().int().min(0).max(8192),end:j(),data:D().max(Ys.chunkBytes)}).strict(),P({id:X,label:Zs,online:j()}),P({push_public_key:D().max(100).optional(),push_encrypted_previews:j().optional(),providers:N(z([`google`,`github`])),protocol:B(4)}),P({user:P({id:Q,name:D(),email:D(),emailVerified:j(),twoFactorEnabled:j()}).nullable(),mfaRequired:j()}),P({label:Zs}).strict(),P({host:X,code:Z,expires:A()}).strict(),P({code:Z}).strict(),P({credential:Z}).strict();var nc=P({challenge:Z,label:Zs,service:$,app:$,expires:A().int().positive()}).strict(),rc=P({ready:j()}).strict();P({host:X,account:Q,credential:Z}).strict().extend({service:$,app:$,enabled:j()}).strict();var ic=P({service:$.optional(),app:$.optional(),code:Z.optional(),managed:j().default(!0)}).strict(),ac=N(A().int().min(0).max(255)).min(32).max(256);P({host:X,peer:Xs,account:Q,service:$,label:D(),privateKey:ac}).strict();var oc=I([ec,P({t:B(`delete_registration`)}).strict()]);I([oc,P({t:B(`enable`),registration:P({service:$,app:$,code:Z}).strict().optional()}).strict(),P({t:B(`reset`)}).strict()]),P({service:$,code:Z}).strict();var sc=P({availability:z([`ready`,`not_installed`,`upgrade_required`]),configured:j(),enabled:j(),connected:j(),canDeleteRegistration:j().optional(),supervisor:z([`systemd`,`launchd`]).nullable(),host:X.optional(),peer:Xs.optional(),service:$.optional(),app:$.optional(),devices:N($s)});P({profile:G}).strict(),P({profile:G,request:oc}).strict(),P({profile:G,setup:ic}).strict();var cc=D().regex(/^[a-f0-9]{64}$/),lc=D().regex(/^cn_[a-f0-9]{64}$/),uc=D().regex(/^br_[a-f0-9]{64}$/),dc=D().regex(/^iv_[a-f0-9]{64}$/);z([`browser_rejected`,`upstream_expired`,`upstream_unavailable`,`protocol_mismatch`]),L(`t`,[P({t:B(`open`),profile:G.optional()}).strict(),P({t:B(`renew`),resources:N(cc).max(2048)}).strict(),P({t:B(`close`)}).strict()]);var fc=P({t:B(`inspection`),port:A().int().min(1).max(65535),version:Mo,liveSessions:A().int().nonnegative()});L(`t`,[P({t:B(`authority`),generation:D().uuid(),token:lc.optional(),validForMs:A().int().positive().max(45e3),port:A().int().min(1).max(65535),version:Mo}).strict(),fc,P({t:B(`error`),code:z([`unavailable`,`rejected`,`invalid_control`])}).strict()]),P({invitation:dc}).strict();var pc=P({credential:uc});P({status:B(`revoked`)}),P({session:D().uuid(),port:A().int().min(1).max(65535)}).extend({path:D().max(8192).default(`/`)});var mc=P({url:D().url()});P({invitation:dc}).strict(),P({t:B(`invite`),secret:D().max(128).optional()}).strict(),P({url:D().url()}).strict();var hc=P({instance:D().uuid(),refreshId:D().uuid().nullable(),upstream:z([`ready`,`upstream_expired`,`upstream_unavailable`,`protocol_mismatch`])}),gc=P({id:D(),hash:D(),lastUsed:A()}),_c=P({hash:D(),browser:D(),prefix:D()});P({version:B(1),origin:D(),target:D(),browsers:N(gc),proxies:N(_c)});var vc={imageBytes:4*1024*1024,chunkBytes:64*1024,idleMs:6e4,lifetimeMs:5*6e4};L(`action`,[P({action:B(`start`),upload:D().uuid(),mime:Ts,size:A().int().positive().max(vc.imageBytes)}).strict(),P({action:B(`chunk`),upload:D().uuid(),offset:A().int().nonnegative().max(vc.imageBytes),data:D().min(4).max(4*Math.ceil(vc.chunkBytes/3)).regex(/^[A-Za-z0-9+/]+={0,2}$/).refine(e=>{let t=e.endsWith(`==`)?2:+!!e.endsWith(`=`);return e.length%4==0&&e.length/4*3-t<=vc.chunkBytes},`Image chunk is too large or malformed`)}).strict(),P({action:B(`finish`),upload:D().uuid()}).strict(),P({action:B(`cancel`),upload:D().uuid()}).strict()]);var yc=P({received:A().int().nonnegative().max(vc.imageBytes)}),bc=P({id:X,secret:Z}).strict(),xc=P({key:X,iv:D().regex(/^[a-f0-9]{24}$/),ciphertext:D().min(32).max(3072).regex(/^(?:[a-f0-9]{2})+$/)}).strict();P({subscription:P({endpoint:D().max(2048).url().refine(e=>{let t;try{t=new URL(e)}catch{return!1}let n=t.hostname;return t.protocol===`https:`&&!t.username&&!t.password&&!t.port&&!t.hash&&(n===`fcm.googleapis.com`||n===`updates.push.services.mozilla.com`||n===`web.push.apple.com`||n.endsWith(`.notify.windows.com`))},`Unsupported push service`),expirationTime:A().positive().nullable().optional(),keys:P({p256dh:D().regex(/^[A-Za-z0-9_-]{87}={0,1}$/),auth:D().regex(/^[A-Za-z0-9_-]{22}={0,2}$/)}).strict()}).strict().nullable(),preview_key:bc.optional()}).strict().omit({preview_key:!0}).extend({credential:Z,device:X}).strict(),P({credential:Z,devices:N(X).min(1).max(64),id:X,preview:xc.optional()}).strict(),P({id:X,host:X,preview:xc.optional()}).strict(),P({t:B(`notify`),id:X,content:ko.optional()}).strict(),P({accepted:A().int().nonnegative(),failed:A().int().nonnegative()}).strict(),P({enabled:j()}).strict();var Sc=256*1024,Cc=D().min(1).max(Sc).refine(e=>new TextEncoder().encode(e).length<=Sc,`Source exceeds 256 KiB`),wc=P({agent:D().min(1).max(100),mode:Jo.optional(),account:I([D().min(1).max(100),A().int().positive()]).optional(),project:D().min(1).max(200).optional(),worktree:D().min(1).max(4096).optional(),path:D().min(1).max(4096).optional(),title:D().min(1).max(200).optional()}).refine(e=>!!e.path!=!!e.project,`Choose path or project`).refine(e=>!e.path||!e.worktree,`worktree requires project`),Tc=P({runtime_id:k(),session_id:U}),Ec=P({prompt:D().min(1).max(128*1024),output_schema:R(D(),M()).optional()}),Dc=P({id:k(),source:Cc,input:M().optional(),accounts:R(D(),I([D(),A().int().positive()])).default({}),max_turns:A().int().min(1).max(1e3).default(50),max_agents:A().int().min(1).max(32).default(8),timeout_ms:A().int().min(1e3).max(1440*60*1e3).default(3600*1e3)});P({id:k(),profile_id:G,source_hash:D(),status:z([`running`,`completed`,`failed`,`cancelled`,`interrupted`]),result:M().nullable(),error:D().nullable(),created_at:D(),updated_at:D()}),P({events:N(P({sequence:A().int(),run_id:k(),type:D(),data:M(),created_at:D()}))});var Oc=L(`op`,[P({op:B(`spawn`),options:wc}),P({op:B(`attach`),reference:D().min(1).max(100)}),P({op:B(`ask`),handle:Tc,request:Ec}),P({op:B(`stop`),handle:Tc})]);L(`type`,[P({type:B(`operation`),id:A().int(),operation:Oc}),P({type:B(`finished`),result:M().optional(),error:D().max(8192).optional()})]),L(`type`,[P({type:B(`start`),source:Cc,input:M().optional()}),P({type:B(`reply`),id:A().int(),value:M().optional(),error:D().optional()})]),P({profile:P({id:G,name:D()}),projects:N(P({id:D(),name:D(),path:D()})),accounts:N(P({id:A(),label:D(),agent:D(),logged_in:j()})),agents:N(P({id:D(),scripted_turns:j(),modes:N(Jo).optional()}))}),P({jsonrpc:B(`2.0`),id:I([D(),A()]).optional(),method:D(),params:R(D(),M()).optional()}),P({name:D(),arguments:M().optional()});var kc=Dc,Ac=P({id:k()}),jc=Ac.extend({after:A().int().nonnegative().default(0)});[[`puddlang_context`,`List this host profile, projects, accounts and supported agents.`,P({}).strict(),!0],[`puddlang_run`,`Execute a trusted single-file TypeScript programme on the host. Imports: puddlang (spawn, attach, input, z), zod, node: built-ins. Returns immediately with a durable run id; use status/events. Supply a fresh UUID id, or reuse it with identical input to recover an uncertain submission. spawn({agent:"codex",project:"name",account:"label"}); await agent.ask("task"); export default result. Supports structured ask({prompt,input,schema:z.object(...)}) and agent.stop().`,kc,!1],[`puddlang_status`,`Read a run and its final default export, if finished.`,Ac,!0],[`puddlang_events`,`Read up to 100 events after a sequence; paginate until empty.`,jc,!0],[`puddlang_cancel`,`Cancel a run, interrupt its pending asks, and stop agents it created. Attached agents are retained.`,Ac,!1]].map(([e,t,n,r])=>({name:e,description:t,inputSchema:Ji(n,{io:`input`}),annotations:{readOnlyHint:r,destructiveHint:!r,idempotentHint:!0,openWorldHint:!r}}));var Mc=P({id:D().min(1).max(128),source:D().max(1024*1024)});P({source:q,cells:N(Mc).min(1).max(2e3),kernel:D().min(1).max(256).optional()}).refine(e=>new Set(e.cells.map(e=>e.id)).size===e.cells.length,`Cell ids must be unique`).refine(e=>e.cells.reduce((e,t)=>e+t.source.length,0)<=1024*1024,`Cell sources exceed 1 MiB`);var Nc=Mc.extend({revision:A().int().nonnegative().default(0),state:z([`queued`,`running`,`succeeded`,`failed`,`cancelled`]),execution_count:A().int().nullable(),outputs:N(F({output_type:D()})),elapsed_ms:A().nonnegative().optional()}),Pc=P({id:D().uuid(),prompt:D().max(4096),password:j()}),Fc=P({id:D().uuid(),revision:A().int().nonnegative(),state:z([`running`,`succeeded`,`failed`,`cancelled`]),cells:N(Nc).max(2e3),input:Pc.optional(),error:D().max(32768).optional()});P({source:q}),P({execution:Fc.nullable()}),P({source:q,run_id:D().uuid(),input_id:D().uuid(),value:D().max(65536)}),P({source:q,kind:z([`complete`,`inspect`]),code:D().max(65536),cursor:A().int().nonnegative().max(65536)}).refine(e=>e.cursor<=[...e.code].length,`Cursor is outside the cell`),P({matches:N(D().max(512)).max(200),start:A().int().nonnegative(),end:A().int().nonnegative(),documentation:D().max(32768)});var Ic=D().min(1).max(128),Lc=R(D(),M()),Rc=D().max(2*1024*1024).regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/),zc=P({msg_id:Ic,parent_id:D().max(128).default(``),msg_type:z([`comm_open`,`comm_msg`,`comm_close`,`status`]),content:Lc,metadata:Lc.default({}),buffers:N(Rc).max(128).default([])}),Bc=P({version_major:B(2),version_minor:B(0),state:R(Ic,P({model_name:D().max(256),model_module:D().max(256),model_module_version:D().max(128),state:Lc,buffers:N(P({encoding:B(`base64`),path:N(I([D().max(256),A().int().nonnegative()])).max(64),data:Rc})).max(128).optional()})).refine(e=>Object.keys(e).length<=1024,`Too many widget models`)});P({source:q,generation:D().uuid().optional(),after:A().int().nonnegative().optional()});var Vc=P({generation:D().uuid().nullable(),revision:A().int().nonnegative(),snapshot:Bc.optional(),events:N(zc).max(256),error:D().max(1024).optional()}),Hc=P({source:q,generation:D().uuid(),message:zc.extend({msg_type:z([`comm_open`,`comm_msg`,`comm_close`]),content:P({comm_id:Ic,target_name:B(`jupyter.widget`).optional(),data:Lc})})}),Uc=null;function Wc(){return Uc}function Gc(e){return e}function Kc(e){let t=new Set;return{get:()=>localStorage.getItem(Gc(e)),set(n){n===null?localStorage.removeItem(Gc(e)):localStorage.setItem(Gc(e),n);for(let e of t)e()},subscribe(e){return t.add(e),()=>t.delete(e)}}}var qc=Kc(`puddle.browser-authorisation`);async function Jc(){localStorage.removeItem(`puddle.token`);let e=new URLSearchParams(window.location.hash.slice(1)),t=e.get(`invite`);if(e.has(`invite`)||e.has(`token`)){let e=new URL(window.location.href);e.hash=``,history.replaceState(null,``,e)}if(t)try{let e=await fetch(`/cockpit/bootstrap`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({invitation:t})});if(!e.ok)return;qc.set(pc.parse(await e.json()).credential)}catch{}}function Yc(){qc.set(null)}export{I as $,hs as A,Ro as B,Rs as C,Es as D,Ts as E,Io as F,Eo as G,Ao as H,Fo as I,B as J,z as K,Lo as L,is as M,as as N,ws as O,Po as P,D as Q,zo as R,Ns as S,ks as T,Do as U,Mo as V,Oo as W,A as X,F as Y,R as Z,Ys as _,Gc as a,Us as b,Bc as c,yc as d,M as et,hc as f,rc as g,nc as h,Kc as i,vs as j,ps as k,Vc as l,sc as m,Yc as n,Wc as o,mc as p,N as q,qc as r,Hc as s,Jc as t,vc as u,tc as v,Os as w,Hs as x,Gs as y,Bo as z};
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cssMode-CSjHtANE.js","assets/editor.api2-4X9Vh9Zw.js","assets/rolldown-runtime-QTnfLwEv.js","assets/editor-Br_kD0ds.css","assets/workers-Ck67TJT4.js","assets/lspLanguageFeatures-x2nWJpem.js","assets/htmlMode-CIHMS93l.js","assets/jsonMode-BijgXT6I.js","assets/freemarker2-DsOTa0Uq.js","assets/handlebars-DGS-lUwt.js","assets/html-eVYoRhea.js","assets/javascript-Cq9FwqGi.js","assets/typescript-DvKdOnR-.js","assets/liquid-BcLxSFu3.js","assets/mdx-BDgbCiou.js","assets/python-D5mUty3a.js","assets/razor-DAAn8j2s.js","assets/xml-DDMTG7kD.js","assets/yaml-hCGJvPOb.js"])))=>i.map(i=>d[i]);
2
- import{n as e,r as t}from"./rolldown-runtime-QTnfLwEv.js";import{t as n}from"./react-CZI7_Jkm.js";import{t as r}from"./preload-helper-Czpn1I53.js";import{a as i,i as a}from"./index-Dp8dqiUy.js";import{a as o,c as s,d as c,f as l,h as u,i as d,l as ee,m as te,n as f,o as p,p as m,r as ne,s as h,t as g,u as re}from"./editor.api2-4X9Vh9Zw.js";import{t as _}from"./workers-Ck67TJT4.js";import{t as v}from"./monaco.contribution-C0TYpF88.js";import{n as y,t as b}from"./buffer-logic-BAkSBQT7.js";var x=e({cssDefaults:()=>ie,lessDefaults:()=>ae,scssDefaults:()=>T}),S=class{constructor(e,t,n){this._onDidChange=new f,this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},C={validate:!0,lint:{compatibleVendorPrefixes:`ignore`,vendorPrefix:`warning`,duplicateProperties:`warning`,emptyRules:`warning`,importStatement:`ignore`,boxModel:`ignore`,universalSelector:`ignore`,zeroUnits:`ignore`,fontFaceProperties:`warning`,hexColorLength:`error`,argumentsInColorFunction:`error`,unknownProperties:`warning`,ieHack:`ignore`,unknownVendorSpecificProperties:`ignore`,propertyIgnoredDueToDisplay:`warning`,important:`ignore`,float:`ignore`,idSelector:`ignore`},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:`collapse`,maxPreserveNewLines:void 0,preserveNewLines:!0}},w={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},ie=new S(`css`,C,w),T=new S(`scss`,C,w),ae=new S(`less`,C,w);function oe(){return r(()=>import(`./cssMode-CSjHtANE.js`),__vite__mapDeps([0,1,2,3,4,5]))}u.onLanguage(`less`,()=>{oe().then(e=>e.setupMode(ae))}),u.onLanguage(`scss`,()=>{oe().then(e=>e.setupMode(T))}),u.onLanguage(`css`,()=>{oe().then(e=>e.setupMode(ie))});var se=e({handlebarDefaults:()=>ge,handlebarLanguageService:()=>he,htmlDefaults:()=>me,htmlLanguageService:()=>pe,razorDefaults:()=>ve,razorLanguageService:()=>_e,registerHTMLLanguageService:()=>be}),ce=class{constructor(e,t,n){this._onDidChange=new f,this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},E={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:`default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var`,contentUnformatted:`pre`,indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:`head, body, /html`,wrapAttributes:`auto`},suggest:{},data:{useDefaultDataProvider:!0}};function le(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===ue,documentFormattingEdits:e===ue,documentRangeFormattingEdits:e===ue}}var ue=`html`,de=`handlebars`,fe=`razor`,pe=be(ue,E,le(ue)),me=pe.defaults,he=be(de,E,le(de)),ge=he.defaults,_e=be(fe,E,le(fe)),ve=_e.defaults;function ye(){return r(()=>import(`./htmlMode-CIHMS93l.js`),__vite__mapDeps([6,1,2,3,4,5]))}function be(e,t=E,n=le(e)){let r=new ce(e,t,n),i,a=u.onLanguage(e,async()=>{i=(await ye()).setupMode(r)});return{defaults:r,dispose(){a.dispose(),i?.dispose(),i=void 0}}}var xe=e({getWorker:()=>Ce,jsonDefaults:()=>Se}),Se=new class{constructor(e,t,n){this._onDidChange=new f,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}(`json`,{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:`warning`,schemaValidation:`warning`,comments:`error`,trailingCommas:`error`},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0}),Ce=()=>we().then(e=>e.getWorker());function we(){return r(()=>import(`./jsonMode-BijgXT6I.js`),__vite__mapDeps([7,1,2,3,4,5]))}u.register({id:`json`,extensions:[`.json`,`.bowerrc`,`.jshintrc`,`.jscsrc`,`.eslintrc`,`.babelrc`,`.har`],aliases:[`JSON`,`json`],mimetypes:[`application/json`]}),u.onLanguage(`json`,()=>{we().then(e=>e.setupMode(Se))});var Te={},Ee={},De=class e{static getOrCreate(t){return Ee[t]||(Ee[t]=new e(t)),Ee[t]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,Te[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function D(e){let t=e.id;Te[t]=e,u.register(e);let n=De.getOrCreate(t);u.registerTokensProviderFactory(t,{create:async()=>(await n.load()).language}),u.onLanguageEncountered(t,async()=>{let e=await n.load();u.setLanguageConfiguration(t,e.conf)})}D({id:`abap`,extensions:[`.abap`],aliases:[`abap`,`ABAP`],loader:()=>r(()=>import(`./abap-08VXUWAP.js`),[])}),D({id:`apex`,extensions:[`.cls`],aliases:[`Apex`,`apex`],mimetypes:[`text/x-apex-source`,`text/x-apex`],loader:()=>r(()=>import(`./apex-BWPQTe0t.js`),[])}),D({id:`azcli`,extensions:[`.azcli`],aliases:[`Azure CLI`,`azcli`],loader:()=>r(()=>import(`./azcli-Bc_sGQ0U.js`),[])}),D({id:`bat`,extensions:[`.bat`,`.cmd`],aliases:[`Batch`,`bat`],loader:()=>r(()=>import(`./bat-i0X4ZdIN.js`),[])}),D({id:`bicep`,extensions:[`.bicep`],aliases:[`Bicep`],loader:()=>r(()=>import(`./bicep-B5-_aFwp.js`),[])}),D({id:`cameligo`,extensions:[`.mligo`],aliases:[`Cameligo`],loader:()=>r(()=>import(`./cameligo-DMUM7wLl.js`),[])}),D({id:`clojure`,extensions:[`.clj`,`.cljs`,`.cljc`,`.edn`],aliases:[`clojure`,`Clojure`],loader:()=>r(()=>import(`./clojure-Cm7r79vr.js`),[])}),D({id:`coffeescript`,extensions:[`.coffee`],aliases:[`CoffeeScript`,`coffeescript`,`coffee`],mimetypes:[`text/x-coffeescript`,`text/coffeescript`],loader:()=>r(()=>import(`./coffee-Ba7i2nA0.js`),[])}),D({id:`c`,extensions:[`.c`,`.h`],aliases:[`C`,`c`],loader:()=>r(()=>import(`./cpp-C7h46wYY.js`),[])}),D({id:`cpp`,extensions:[`.cpp`,`.cc`,`.cxx`,`.hpp`,`.hh`,`.hxx`],aliases:[`C++`,`Cpp`,`cpp`],loader:()=>r(()=>import(`./cpp-C7h46wYY.js`),[])}),D({id:`csharp`,extensions:[`.cs`,`.csx`,`.cake`],aliases:[`C#`,`csharp`],loader:()=>r(()=>import(`./csharp-BKxtCVv1.js`),[])}),D({id:`csp`,extensions:[`.csp`],aliases:[`CSP`,`csp`],loader:()=>r(()=>import(`./csp-bTuwJoIa.js`),[])}),D({id:`css`,extensions:[`.css`],aliases:[`CSS`,`css`],mimetypes:[`text/css`],loader:()=>r(()=>import(`./css-DIMkf-bt.js`),[])}),D({id:`cypher`,extensions:[`.cypher`,`.cyp`],aliases:[`Cypher`,`OpenCypher`],loader:()=>r(()=>import(`./cypher-CVaqCwHa.js`),[])}),D({id:`dart`,extensions:[`.dart`],aliases:[`Dart`,`dart`],mimetypes:[`text/x-dart-source`,`text/x-dart`],loader:()=>r(()=>import(`./dart-onAF5SnQ.js`),[])}),D({id:`dockerfile`,extensions:[`.dockerfile`],filenames:[`Dockerfile`],aliases:[`Dockerfile`],loader:()=>r(()=>import(`./dockerfile-DZFCIeNp.js`),[])}),D({id:`ecl`,extensions:[`.ecl`],aliases:[`ECL`,`Ecl`,`ecl`],loader:()=>r(()=>import(`./ecl-D05T4iGw.js`),[])}),D({id:`elixir`,extensions:[`.ex`,`.exs`],aliases:[`Elixir`,`elixir`,`ex`],loader:()=>r(()=>import(`./elixir-6RTg0lbw.js`),[])}),D({id:`flow9`,extensions:[`.flow`],aliases:[`Flow9`,`Flow`,`flow9`,`flow`],loader:()=>r(()=>import(`./flow9-C5_-GSwl.js`),[])}),D({id:`fsharp`,extensions:[`.fs`,`.fsi`,`.ml`,`.mli`,`.fsx`,`.fsscript`],aliases:[`F#`,`FSharp`,`fsharp`],loader:()=>r(()=>import(`./fsharp-C8Ef5oNN.js`),[])}),D({id:`freemarker2`,extensions:[`.ftl`,`.ftlh`,`.ftlx`],aliases:[`FreeMarker2`,`Apache FreeMarker2`],loader:()=>r(()=>import(`./freemarker2-DsOTa0Uq.js`).then(e=>e.TagAutoInterpolationDollar),__vite__mapDeps([8,1,2,3]))}),D({id:`freemarker2.tag-angle.interpolation-dollar`,aliases:[`FreeMarker2 (Angle/Dollar)`,`Apache FreeMarker2 (Angle/Dollar)`],loader:()=>r(()=>import(`./freemarker2-DsOTa0Uq.js`).then(e=>e.TagAngleInterpolationDollar),__vite__mapDeps([8,1,2,3]))}),D({id:`freemarker2.tag-bracket.interpolation-dollar`,aliases:[`FreeMarker2 (Bracket/Dollar)`,`Apache FreeMarker2 (Bracket/Dollar)`],loader:()=>r(()=>import(`./freemarker2-DsOTa0Uq.js`).then(e=>e.TagBracketInterpolationDollar),__vite__mapDeps([8,1,2,3]))}),D({id:`freemarker2.tag-angle.interpolation-bracket`,aliases:[`FreeMarker2 (Angle/Bracket)`,`Apache FreeMarker2 (Angle/Bracket)`],loader:()=>r(()=>import(`./freemarker2-DsOTa0Uq.js`).then(e=>e.TagAngleInterpolationBracket),__vite__mapDeps([8,1,2,3]))}),D({id:`freemarker2.tag-bracket.interpolation-bracket`,aliases:[`FreeMarker2 (Bracket/Bracket)`,`Apache FreeMarker2 (Bracket/Bracket)`],loader:()=>r(()=>import(`./freemarker2-DsOTa0Uq.js`).then(e=>e.TagBracketInterpolationBracket),__vite__mapDeps([8,1,2,3]))}),D({id:`freemarker2.tag-auto.interpolation-dollar`,aliases:[`FreeMarker2 (Auto/Dollar)`,`Apache FreeMarker2 (Auto/Dollar)`],loader:()=>r(()=>import(`./freemarker2-DsOTa0Uq.js`).then(e=>e.TagAutoInterpolationDollar),__vite__mapDeps([8,1,2,3]))}),D({id:`freemarker2.tag-auto.interpolation-bracket`,aliases:[`FreeMarker2 (Auto/Bracket)`,`Apache FreeMarker2 (Auto/Bracket)`],loader:()=>r(()=>import(`./freemarker2-DsOTa0Uq.js`).then(e=>e.TagAutoInterpolationBracket),__vite__mapDeps([8,1,2,3]))}),D({id:`go`,extensions:[`.go`],aliases:[`Go`],loader:()=>r(()=>import(`./go-C-y9NEjX.js`),[])}),D({id:`graphql`,extensions:[`.graphql`,`.gql`],aliases:[`GraphQL`,`graphql`,`gql`],mimetypes:[`application/graphql`],loader:()=>r(()=>import(`./graphql-fmXr3nnJ.js`),[])}),D({id:`handlebars`,extensions:[`.handlebars`,`.hbs`],aliases:[`Handlebars`,`handlebars`,`hbs`],mimetypes:[`text/x-handlebars-template`],loader:()=>r(()=>import(`./handlebars-DGS-lUwt.js`),__vite__mapDeps([9,1,2,3]))}),D({id:`hcl`,extensions:[`.tf`,`.tfvars`,`.hcl`],aliases:[`Terraform`,`tf`,`HCL`,`hcl`],loader:()=>r(()=>import(`./hcl-CpzslTdj.js`),[])}),D({id:`html`,extensions:[`.html`,`.htm`,`.shtml`,`.xhtml`,`.mdoc`,`.jsp`,`.asp`,`.aspx`,`.jshtm`],aliases:[`HTML`,`htm`,`html`,`xhtml`],mimetypes:[`text/html`,`text/x-jshtm`,`text/template`,`text/ng-template`],loader:()=>r(()=>import(`./html-eVYoRhea.js`),__vite__mapDeps([10,1,2,3]))}),D({id:`ini`,extensions:[`.ini`,`.properties`,`.gitconfig`],filenames:[`config`,`.gitattributes`,`.gitconfig`,`.editorconfig`],aliases:[`Ini`,`ini`],loader:()=>r(()=>import(`./ini-sBoK_t0W.js`),[])}),D({id:`java`,extensions:[`.java`,`.jav`],aliases:[`Java`,`java`],mimetypes:[`text/x-java-source`,`text/x-java`],loader:()=>r(()=>import(`./java-BEtHBSE6.js`),[])}),D({id:`javascript`,extensions:[`.js`,`.es6`,`.jsx`,`.mjs`,`.cjs`],firstLine:`^#!.*\\bnode`,filenames:[`jakefile`],aliases:[`JavaScript`,`javascript`,`js`],mimetypes:[`text/javascript`],loader:()=>r(()=>import(`./javascript-Cq9FwqGi.js`),__vite__mapDeps([11,12,1,2,3]))}),D({id:`julia`,extensions:[`.jl`],aliases:[`julia`,`Julia`],loader:()=>r(()=>import(`./julia-Bri6UV-V.js`),[])}),D({id:`kotlin`,extensions:[`.kt`,`.kts`],aliases:[`Kotlin`,`kotlin`],mimetypes:[`text/x-kotlin-source`,`text/x-kotlin`],loader:()=>r(()=>import(`./kotlin-BOotOW0E.js`),[])}),D({id:`less`,extensions:[`.less`],aliases:[`Less`,`less`],mimetypes:[`text/x-less`,`text/less`],loader:()=>r(()=>import(`./less-B9JPFI3C.js`),[])}),D({id:`lexon`,extensions:[`.lex`],aliases:[`Lexon`],loader:()=>r(()=>import(`./lexon-CfSJPG6W.js`),[])}),D({id:`lua`,extensions:[`.lua`],aliases:[`Lua`,`lua`],loader:()=>r(()=>import(`./lua-CsQS60Ue.js`),[])}),D({id:`liquid`,extensions:[`.liquid`,`.html.liquid`],aliases:[`Liquid`,`liquid`],mimetypes:[`application/liquid`],loader:()=>r(()=>import(`./liquid-BcLxSFu3.js`),__vite__mapDeps([13,1,2,3]))}),D({id:`m3`,extensions:[`.m3`,`.i3`,`.mg`,`.ig`],aliases:[`Modula-3`,`Modula3`,`modula3`,`m3`],loader:()=>r(()=>import(`./m3-D-oSqn_W.js`),[])}),D({id:`markdown`,extensions:[`.md`,`.markdown`,`.mdown`,`.mkdn`,`.mkd`,`.mdwn`,`.mdtxt`,`.mdtext`],aliases:[`Markdown`,`markdown`],loader:()=>r(()=>import(`./markdown-Cimd5fb3.js`),[])}),D({id:`mdx`,extensions:[`.mdx`],aliases:[`MDX`,`mdx`],loader:()=>r(()=>import(`./mdx-BDgbCiou.js`),__vite__mapDeps([14,1,2,3]))}),D({id:`mips`,extensions:[`.s`],aliases:[`MIPS`,`MIPS-V`],mimetypes:[`text/x-mips`,`text/mips`,`text/plaintext`],loader:()=>r(()=>import(`./mips-CIPQ_RoX.js`),[])}),D({id:`msdax`,extensions:[`.dax`,`.msdax`],aliases:[`DAX`,`MSDAX`],loader:()=>r(()=>import(`./msdax-DauUninz.js`),[])}),D({id:`mysql`,extensions:[],aliases:[`MySQL`,`mysql`],loader:()=>r(()=>import(`./mysql-SOo6toE5.js`),[])}),D({id:`objective-c`,extensions:[`.m`],aliases:[`Objective-C`],loader:()=>r(()=>import(`./objective-c-FvmIjYaQ.js`),[])}),D({id:`pascal`,extensions:[`.pas`,`.p`,`.pp`],aliases:[`Pascal`,`pas`],mimetypes:[`text/x-pascal-source`,`text/x-pascal`],loader:()=>r(()=>import(`./pascal-DrH0SRf2.js`),[])}),D({id:`pascaligo`,extensions:[`.ligo`],aliases:[`Pascaligo`,`ligo`],loader:()=>r(()=>import(`./pascaligo-D-ptJ9y-.js`),[])}),D({id:`perl`,extensions:[`.pl`,`.pm`],aliases:[`Perl`,`pl`],loader:()=>r(()=>import(`./perl-oz_6vUea.js`),[])}),D({id:`pgsql`,extensions:[],aliases:[`PostgreSQL`,`postgres`,`pg`,`postgre`],loader:()=>r(()=>import(`./pgsql-DTj74zXo.js`),[])}),D({id:`php`,extensions:[`.php`,`.php4`,`.php5`,`.phtml`,`.ctp`],aliases:[`PHP`,`php`],mimetypes:[`application/x-php`],loader:()=>r(()=>import(`./php-nr791fC2.js`),[])}),D({id:`pla`,extensions:[`.pla`],loader:()=>r(()=>import(`./pla-CopQ2nXW.js`),[])}),D({id:`postiats`,extensions:[`.dats`,`.sats`,`.hats`],aliases:[`ATS`,`ATS/Postiats`],loader:()=>r(()=>import(`./postiats-43DmfD33.js`),[])}),D({id:`powerquery`,extensions:[`.pq`,`.pqm`],aliases:[`PQ`,`M`,`Power Query`,`Power Query M`],loader:()=>r(()=>import(`./powerquery-D3hlyOfw.js`),[])}),D({id:`powershell`,extensions:[`.ps1`,`.psm1`,`.psd1`],aliases:[`PowerShell`,`powershell`,`ps`,`ps1`],loader:()=>r(()=>import(`./powershell-DmHpPYUd.js`),[])}),D({id:`proto`,extensions:[`.proto`],aliases:[`protobuf`,`Protocol Buffers`],loader:()=>r(()=>import(`./protobuf-C531GsRP.js`),[])}),D({id:`pug`,extensions:[`.jade`,`.pug`],aliases:[`Pug`,`Jade`,`jade`],loader:()=>r(()=>import(`./pug-Z5eAx3Zn.js`),[])}),D({id:`python`,extensions:[`.py`,`.rpy`,`.pyw`,`.cpy`,`.gyp`,`.gypi`],aliases:[`Python`,`py`],firstLine:`^#!/.*\\bpython[0-9.-]*\\b`,loader:()=>r(()=>import(`./python-D5mUty3a.js`),__vite__mapDeps([15,1,2,3]))}),D({id:`qsharp`,extensions:[`.qs`],aliases:[`Q#`,`qsharp`],loader:()=>r(()=>import(`./qsharp-DkqhCAOL.js`),[])}),D({id:`r`,extensions:[`.r`,`.rhistory`,`.rmd`,`.rprofile`,`.rt`],aliases:[`R`,`r`],loader:()=>r(()=>import(`./r-BwWrilGY.js`),[])}),D({id:`razor`,extensions:[`.cshtml`],aliases:[`Razor`,`razor`],mimetypes:[`text/x-cshtml`],loader:()=>r(()=>import(`./razor-DAAn8j2s.js`),__vite__mapDeps([16,1,2,3]))}),D({id:`redis`,extensions:[`.redis`],aliases:[`redis`],loader:()=>r(()=>import(`./redis-ClamHrr6.js`),[])}),D({id:`redshift`,extensions:[],aliases:[`Redshift`,`redshift`],loader:()=>r(()=>import(`./redshift-DT7zqm-g.js`),[])}),D({id:`restructuredtext`,extensions:[`.rst`],aliases:[`reStructuredText`,`restructuredtext`],loader:()=>r(()=>import(`./restructuredtext-BYgofb2h.js`),[])}),D({id:`ruby`,extensions:[`.rb`,`.rbx`,`.rjs`,`.gemspec`,`.pp`],filenames:[`rakefile`,`Gemfile`],aliases:[`Ruby`,`rb`],loader:()=>r(()=>import(`./ruby-DezsRK8O.js`),[])}),D({id:`rust`,extensions:[`.rs`,`.rlib`],aliases:[`Rust`,`rust`],loader:()=>r(()=>import(`./rust-DdL9SqIa.js`),[])}),D({id:`sb`,extensions:[`.sb`],aliases:[`Small Basic`,`sb`],loader:()=>r(()=>import(`./sb-CcwsVR0C.js`),[])}),D({id:`scala`,extensions:[`.scala`,`.sc`,`.sbt`],aliases:[`Scala`,`scala`,`SBT`,`Sbt`,`sbt`,`Dotty`,`dotty`],mimetypes:[`text/x-scala-source`,`text/x-scala`,`text/x-sbt`,`text/x-dotty`],loader:()=>r(()=>import(`./scala-DHpiXF5c.js`),[])}),D({id:`scheme`,extensions:[`.scm`,`.ss`,`.sch`,`.rkt`],aliases:[`scheme`,`Scheme`],loader:()=>r(()=>import(`./scheme-BeGwcela.js`),[])}),D({id:`scss`,extensions:[`.scss`],aliases:[`Sass`,`sass`,`scss`],mimetypes:[`text/x-scss`,`text/scss`],loader:()=>r(()=>import(`./scss-gp-XZpBa.js`),[])}),D({id:`shell`,extensions:[`.sh`,`.bash`],aliases:[`Shell`,`sh`],loader:()=>r(()=>import(`./shell-CC2rA5mh.js`),[])}),D({id:`sol`,extensions:[`.sol`],aliases:[`sol`,`solidity`,`Solidity`],loader:()=>r(()=>import(`./solidity-BEEn4gHE.js`),[])}),D({id:`aes`,extensions:[`.aes`],aliases:[`aes`,`sophia`,`Sophia`],loader:()=>r(()=>import(`./sophia-CRfGWb83.js`),[])}),D({id:`sparql`,extensions:[`.rq`],aliases:[`sparql`,`SPARQL`],loader:()=>r(()=>import(`./sparql-D_Lu-MrJ.js`),[])}),D({id:`sql`,extensions:[`.sql`],aliases:[`SQL`],loader:()=>r(()=>import(`./sql-NEE52Syq.js`),[])}),D({id:`st`,extensions:[`.st`,`.iecst`,`.iecplc`,`.lc3lib`,`.TcPOU`,`.TcDUT`,`.TcGVL`,`.TcIO`],aliases:[`StructuredText`,`scl`,`stl`],loader:()=>r(()=>import(`./st-DbInun42.js`),[])}),D({id:`swift`,aliases:[`Swift`,`swift`],extensions:[`.swift`],mimetypes:[`text/swift`],loader:()=>r(()=>import(`./swift-Bxkupp3x.js`),[])}),D({id:`systemverilog`,extensions:[`.sv`,`.svh`],aliases:[`SV`,`sv`,`SystemVerilog`,`systemverilog`],loader:()=>r(()=>import(`./systemverilog-Bz4Y3fRF.js`),[])}),D({id:`verilog`,extensions:[`.v`,`.vh`],aliases:[`V`,`v`,`Verilog`,`verilog`],loader:()=>r(()=>import(`./systemverilog-Bz4Y3fRF.js`),[])}),D({id:`tcl`,extensions:[`.tcl`],aliases:[`tcl`,`Tcl`,`tcltk`,`TclTk`,`tcl/tk`,`Tcl/Tk`],loader:()=>r(()=>import(`./tcl-DISqw1ZD.js`),[])}),D({id:`twig`,extensions:[`.twig`],aliases:[`Twig`,`twig`],mimetypes:[`text/x-twig`],loader:()=>r(()=>import(`./twig-De2hgUGE.js`),[])}),D({id:`typescript`,extensions:[`.ts`,`.tsx`,`.cts`,`.mts`],aliases:[`TypeScript`,`ts`,`typescript`],mimetypes:[`text/typescript`],loader:()=>r(()=>import(`./typescript-DvKdOnR-.js`),__vite__mapDeps([12,1,2,3]))}),D({id:`typespec`,extensions:[`.tsp`],aliases:[`TypeSpec`],loader:()=>r(()=>import(`./typespec-B8J7ngcE.js`),[])}),D({id:`vb`,extensions:[`.vb`],aliases:[`Visual Basic`,`vb`],loader:()=>r(()=>import(`./vb-DV3o63ZY.js`),[])}),D({id:`wgsl`,extensions:[`.wgsl`],aliases:[`WebGPU Shading Language`,`WGSL`,`wgsl`],loader:()=>r(()=>import(`./wgsl-DpFanUEy.js`),[])}),D({id:`xml`,extensions:[`.xml`,`.xsd`,`.dtd`,`.ascx`,`.csproj`,`.config`,`.props`,`.targets`,`.wxi`,`.wxl`,`.wxs`,`.xaml`,`.svg`,`.svgz`,`.opf`,`.xslt`,`.xsl`],firstLine:`(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)`,aliases:[`XML`,`xml`],mimetypes:[`text/xml`,`application/xml`,`application/xaml+xml`,`application/xml-dtd`],loader:()=>r(()=>import(`./xml-DDMTG7kD.js`),__vite__mapDeps([17,1,2,3]))}),D({id:`yaml`,extensions:[`.yaml`,`.yml`],aliases:[`YAML`,`yaml`,`YML`,`yml`],mimetypes:[`application/x-yaml`,`text/x-yaml`],loader:()=>r(()=>import(`./yaml-hCGJvPOb.js`),__vite__mapDeps([18,1,2,3]))});var Oe=e({MonacoLspClient:()=>gr,WebSocketTransport:()=>yr,createTransportToIFrame:()=>Sr,createTransportToWorker:()=>xr}),ke=Object.defineProperty,Ae=(e,t,n)=>t in e?ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,O=(e,t,n)=>Ae(e,typeof t==`symbol`?t:t+``,n),je,Me,Ne,Pe,Fe;function Ie(e){return e.method!==void 0}var Le;(function(e){function t(e){return e}e.create=t})(Le||={});var k;(function(e){e.parseError=-32700,e.invalidRequest=-32600,e.methodNotFound=-32601,e.invalidParams=-32602,e.internalError=-32603;function t(e){return-32099<=e&&e<=-32e3}e.isServerError=t;function n(e){if(!t(e))throw Error(`Invalid range for a server error.`);return e}e.serverError=n,e.unexpectedServerError=-32e3;function r(e){return!0}e.isApplicationError=r;function i(e){return e}e.applicationError=i,e.genericApplicationError=-320100})(k||={});var Re=class{constructor(){O(this,`listeners`,new Set),O(this,`event`,e=>(this.listeners.add(e),{dispose:()=>{this.listeners.delete(e)}}))}fire(e){this.listeners.forEach(t=>t(e))}},ze=class{constructor(e){O(this,`_value`),O(this,`eventEmitter`),this._value=e,this.eventEmitter=new Re}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.eventEmitter.fire(e))}get onChange(){return this.eventEmitter.event}};function Be(e,t){let n=setTimeout(t,e);return{dispose:()=>clearTimeout(n)}}function Ve(e,t,n){return e instanceof Set?(e.add(t),{dispose:()=>e.delete(t)}):(e.set(t,n),{dispose:()=>e.delete(t)})}var He=class{constructor(){O(this,`_state`,`none`),O(this,`promise`),O(this,`resolve`,()=>{}),O(this,`reject`,()=>{}),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}get state(){return this._state}},Ue=(je=class{constructor(){O(this,`_unprocessedMessages`,[]),O(this,`_messageListener`),O(this,`id`,je.id++),O(this,`_state`,new ze({state:`open`})),O(this,`state`,this._state)}setListener(e){if(this._messageListener=e,e)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){let e=this._unprocessedMessages.shift();this._messageListener(e)}}send(e){return this._sendImpl(e)}_dispatchReceivedMessage(e){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(e):this._unprocessedMessages.push(e)}_onConnectionClosed(){this._state.value={state:`closed`,error:void 0}}log(e){return new We(this,e??new Ge)}},O(je,`id`,0),je),We=class{constructor(e,t){O(this,`baseStream`),O(this,`logger`),this.baseStream=e,this.logger=t}get state(){return this.baseStream.state}setListener(e){if(e===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(t=>{this.logger.log(this.baseStream,`incoming`,t),e(t)})}send(e){return this.logger.log(this.baseStream,`outgoing`,e),this.baseStream.send(e)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},Ge=class{log(e,t,n){console.log(`${t===`incoming`?`<-`:`->`} [${e.toString()}] ${JSON.stringify(n)}`)}},Ke=class e{constructor(e){O(this,`connect`),this.connect=e}mapContext(t){return new e(e=>this.connect(e?qe(e,t):void 0))}};function qe(e,t){return{handleNotification:(n,r)=>e.handleNotification(n,t(r)),handleRequest:(n,r,i)=>e.handleRequest(n,r,t(i))}}var Je=class e{constructor(e,t,n){O(this,`_stream`),O(this,`_listener`),O(this,`_logger`),O(this,`_unprocessedResponses`,new Map),O(this,`_lastUsedRequestId`,0),this._stream=e,this._listener=t,this._logger=n,this._stream.setListener(e=>{Ie(e)?e.id===void 0?this._processNotification(e):this._processRequest(e):this._processResponse(e)})}static createChannel(t,n){let r=!1;return new Ke(i=>{if(r)throw Error(`A channel to the stream ${t} was already constructed!`);return r=!0,new e(t,i,n)})}get state(){return this._stream.state}async _processNotification(e){if(e.id!==void 0)throw Error();if(!this._listener){this._logger&&this._logger.debug({text:`Notification ignored`,message:e});return}try{await this._listener.handleNotification({method:e.method,params:e.params||null})}catch(t){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${t}`,exception:t,message:e})}}async _processRequest(e){if(e.id===void 0)throw Error();let t;if(this._listener)try{t=await this._listener.handleRequest({method:e.method,params:e.params||null},e.id)}catch(n){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${n}`,message:e,exception:n}),t={error:{code:k.internalError,message:`An unexpected exception was thrown.`,data:void 0}}}else this._logger&&this._logger.debug({text:`Received request even though not listening for requests`,message:e}),t={error:{code:k.methodNotFound,message:`This endpoint does not listen for requests or notifications.`,data:void 0}};let n;n=`result`in t?{jsonrpc:`2.0`,id:e.id,result:t.result}:{jsonrpc:`2.0`,id:e.id,error:t.error},await this._stream.send(n)}_processResponse(e){let t=``+e.id,n=this._unprocessedResponses.get(t);if(!n){this._logger&&this._logger.debug({text:`Got an unexpected response message`,message:e});return}this._unprocessedResponses.delete(t),n(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,n){let r={jsonrpc:`2.0`,id:this._newRequestId(),method:e.method,params:e.params||void 0};return n&&n(r.id),new Promise((e,t)=>{let n=``+r.id;this._unprocessedResponses.set(n,n=>{`result`in n?e({result:n.result}):(n.error||t(Error(`Response had neither 'result' nor 'error' field set.`)),e({error:n.error}))}),this._stream.send(r).then(void 0,e=>{this._unprocessedResponses.delete(n),t(e)})})}sendNotification(e,t){let n={jsonrpc:`2.0`,id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(n)}toString(){return`StreamChannel/`+this._stream.toString()}},A;(function(e){function t(){return{deserializeFromJson:e=>({hasErrors:!1,value:e}),serializeToJson:e=>e}}e.sAny=t;function n(){return{deserializeFromJson:e=>({hasErrors:!1,value:{}}),serializeToJson:e=>({})}}e.sEmptyObject=n;function r(){return{deserializeFromJson:e=>({hasErrors:!1,value:void 0}),serializeToJson:e=>null}}e.sVoidFromNull=r})(A||={});var Ye=Symbol(`OptionalMethodNotFound`),Xe=class{contextualize(e){return new Ze(this,e)}},Ze=class extends Xe{constructor(e,t){super(),O(this,`underylingTypedChannel`),O(this,`converters`),this.underylingTypedChannel=e,this.converters=t}async request(e,t,n){let r=await this.converters.getSendContext(n);return this.underylingTypedChannel.request(e,t,r)}async notify(e,t,n){let r=await this.converters.getSendContext(n);return this.underylingTypedChannel.notify(e,t,r)}registerNotificationHandler(e,t){return this.underylingTypedChannel.registerNotificationHandler(e,async(e,n)=>await t(e,await this.converters.getNewContext(n)))}registerRequestHandler(e,t){return this.underylingTypedChannel.registerRequestHandler(e,async(e,n,r)=>await t(e,n,await this.converters.getNewContext(r)))}},Qe=class e extends Xe{constructor(e,t={}){super(),O(this,`channelCtor`),O(this,`_requestSender`),O(this,`_handler`,new Map),O(this,`_unknownNotificationHandler`,new Set),O(this,`_timeout`),O(this,`sendExceptionDetails`,!1),O(this,`_logger`),O(this,`listeningDeferred`,new He),O(this,`onListening`,this.listeningDeferred.promise),O(this,`_requestDidErrorEventEmitter`,new Re),O(this,`onRequestDidError`,this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=Be(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}static fromTransport(t,n={}){return new e(Je.createChannel(t,n.logger),n)}startListen(){if(this._requestSender)throw Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&=(this._timeout.dispose(),void 0),this._requestSender=this.channelCtor.connect({handleRequest:(e,t,n)=>this.handleRequest(e,t,n),handleNotification:(e,t)=>this.handleNotification(e,t)}),this.listeningDeferred.resolve()}checkChannel(e){if(!e)throw Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(e,t,n){let r=this._handler.get(e.method);if(!r)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:k.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(r.kind!=`request`){let t=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:t,data:{requestObject:e}}),{error:{code:k.invalidRequest,message:t,data:{method:e.method}}}}let i=r.requestType.paramsSerializer.deserializeFromJson(e.params);if(i.hasErrors){let t=`Got invalid params: ${i.errorMessage}`;return this._logger&&this._logger.debug({text:t,data:{requestObject:e,errorMessage:i.errorMessage}}),{error:{code:k.invalidParams,message:t,data:{errors:i.errorMessage}}}}else{let a=i.value,o;try{let e=await r.handler(a,t,n);if(`error`in e||`errorMessage`in e){let t=e.error?r.requestType.errorSerializer.serializeToJson(e.error):void 0;o={error:{code:e.errorCode||k.genericApplicationError,message:e.errorMessage||`An error was returned`,data:t}}}else o={result:r.requestType.resultSerializer.serializeToJson(e.ok)}}catch(t){t instanceof et?o={error:{code:t.code,message:t.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${t}.`,exception:t,data:{requestObject:e}}),o={error:{code:k.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${t}.`:`Server has thrown an unexpected exception`}})}return o}}async handleNotification(e,t){let n=this._handler.get(e.method);if(!n){for(let t of this._unknownNotificationHandler)t(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(n.kind!=`notification`){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}let r=n.notificationType.paramsSerializer.deserializeFromJson(e.params);if(r.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${r}`,data:{requestObject:e,errorMessage:r.errorMessage}});return}let i=r.value;for(let r of n.handlers)try{r(i,t)}catch(t){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${t}.`,exception:t,data:{requestObject:e}})}}registerUnknownNotificationHandler(e){return Ve(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw Error(`Handler with method "${e.method}" already registered.`);return Ve(this._handler,e.method,{kind:`request`,requestType:e,handler:t})}registerNotificationHandler(e,t){let n=this._handler.get(e.method);if(!n)n={kind:`notification`,notificationType:e,handlers:new Set},this._handler.set(e.method,n);else{if(n.kind!==`notification`)throw Error(`Method "${e.method}" was already registered as request handler.`);if(n.notificationType!==e)throw Error(`Method "${e.method}" was registered for a different type.`)}return Ve(n.handlers,t)}getRegisteredTypes(){let e=[];for(let t of this._handler.values())t.kind===`notification`?e.push(t.notificationType):t.kind===`request`&&e.push(t.requestType);return e}async request(e,t,n){if(!this.checkChannel(this._requestSender))throw Error(`Impossible`);let r=e.paramsSerializer.serializeToJson(t);$e(r);let i=await this._requestSender.sendRequest({method:e.method,params:r},n);if(`error`in i){if(e.isOptional&&i.error.code===k.methodNotFound)return Ye;let t;if(i.error.data!==void 0){let n=e.errorSerializer.deserializeFromJson(i.error.data);if(n.hasErrors)throw Error(n.errorMessage);t=n.value}else t=void 0;let n=new et(i.error.message,t,i.error.code);throw this._requestDidErrorEventEmitter.fire({error:n}),n}else{let t=e.resultSerializer.deserializeFromJson(i.result);if(t.hasErrors)throw Error(`Could not deserialize response: `+t.errorMessage+`
2
+ import{n as e,r as t}from"./rolldown-runtime-QTnfLwEv.js";import{t as n}from"./react-CZI7_Jkm.js";import{t as r}from"./preload-helper-Czpn1I53.js";import{a as i,i as a}from"./index-np8JXeG6.js";import{a as o,c as s,d as c,f as l,h as u,i as d,l as ee,m as te,n as f,o as p,p as m,r as ne,s as h,t as g,u as re}from"./editor.api2-4X9Vh9Zw.js";import{t as _}from"./workers-Ck67TJT4.js";import{t as v}from"./monaco.contribution-C0TYpF88.js";import{n as y,t as b}from"./buffer-logic-BAkSBQT7.js";var x=e({cssDefaults:()=>ie,lessDefaults:()=>ae,scssDefaults:()=>T}),S=class{constructor(e,t,n){this._onDidChange=new f,this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},C={validate:!0,lint:{compatibleVendorPrefixes:`ignore`,vendorPrefix:`warning`,duplicateProperties:`warning`,emptyRules:`warning`,importStatement:`ignore`,boxModel:`ignore`,universalSelector:`ignore`,zeroUnits:`ignore`,fontFaceProperties:`warning`,hexColorLength:`error`,argumentsInColorFunction:`error`,unknownProperties:`warning`,ieHack:`ignore`,unknownVendorSpecificProperties:`ignore`,propertyIgnoredDueToDisplay:`warning`,important:`ignore`,float:`ignore`,idSelector:`ignore`},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:`collapse`,maxPreserveNewLines:void 0,preserveNewLines:!0}},w={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},ie=new S(`css`,C,w),T=new S(`scss`,C,w),ae=new S(`less`,C,w);function oe(){return r(()=>import(`./cssMode-CSjHtANE.js`),__vite__mapDeps([0,1,2,3,4,5]))}u.onLanguage(`less`,()=>{oe().then(e=>e.setupMode(ae))}),u.onLanguage(`scss`,()=>{oe().then(e=>e.setupMode(T))}),u.onLanguage(`css`,()=>{oe().then(e=>e.setupMode(ie))});var se=e({handlebarDefaults:()=>ge,handlebarLanguageService:()=>he,htmlDefaults:()=>me,htmlLanguageService:()=>pe,razorDefaults:()=>ve,razorLanguageService:()=>_e,registerHTMLLanguageService:()=>be}),ce=class{constructor(e,t,n){this._onDidChange=new f,this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},E={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:`default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var`,contentUnformatted:`pre`,indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:`head, body, /html`,wrapAttributes:`auto`},suggest:{},data:{useDefaultDataProvider:!0}};function le(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===ue,documentFormattingEdits:e===ue,documentRangeFormattingEdits:e===ue}}var ue=`html`,de=`handlebars`,fe=`razor`,pe=be(ue,E,le(ue)),me=pe.defaults,he=be(de,E,le(de)),ge=he.defaults,_e=be(fe,E,le(fe)),ve=_e.defaults;function ye(){return r(()=>import(`./htmlMode-CIHMS93l.js`),__vite__mapDeps([6,1,2,3,4,5]))}function be(e,t=E,n=le(e)){let r=new ce(e,t,n),i,a=u.onLanguage(e,async()=>{i=(await ye()).setupMode(r)});return{defaults:r,dispose(){a.dispose(),i?.dispose(),i=void 0}}}var xe=e({getWorker:()=>Ce,jsonDefaults:()=>Se}),Se=new class{constructor(e,t,n){this._onDidChange=new f,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}(`json`,{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:`warning`,schemaValidation:`warning`,comments:`error`,trailingCommas:`error`},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0}),Ce=()=>we().then(e=>e.getWorker());function we(){return r(()=>import(`./jsonMode-BijgXT6I.js`),__vite__mapDeps([7,1,2,3,4,5]))}u.register({id:`json`,extensions:[`.json`,`.bowerrc`,`.jshintrc`,`.jscsrc`,`.eslintrc`,`.babelrc`,`.har`],aliases:[`JSON`,`json`],mimetypes:[`application/json`]}),u.onLanguage(`json`,()=>{we().then(e=>e.setupMode(Se))});var Te={},Ee={},De=class e{static getOrCreate(t){return Ee[t]||(Ee[t]=new e(t)),Ee[t]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,Te[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function D(e){let t=e.id;Te[t]=e,u.register(e);let n=De.getOrCreate(t);u.registerTokensProviderFactory(t,{create:async()=>(await n.load()).language}),u.onLanguageEncountered(t,async()=>{let e=await n.load();u.setLanguageConfiguration(t,e.conf)})}D({id:`abap`,extensions:[`.abap`],aliases:[`abap`,`ABAP`],loader:()=>r(()=>import(`./abap-08VXUWAP.js`),[])}),D({id:`apex`,extensions:[`.cls`],aliases:[`Apex`,`apex`],mimetypes:[`text/x-apex-source`,`text/x-apex`],loader:()=>r(()=>import(`./apex-BWPQTe0t.js`),[])}),D({id:`azcli`,extensions:[`.azcli`],aliases:[`Azure CLI`,`azcli`],loader:()=>r(()=>import(`./azcli-Bc_sGQ0U.js`),[])}),D({id:`bat`,extensions:[`.bat`,`.cmd`],aliases:[`Batch`,`bat`],loader:()=>r(()=>import(`./bat-i0X4ZdIN.js`),[])}),D({id:`bicep`,extensions:[`.bicep`],aliases:[`Bicep`],loader:()=>r(()=>import(`./bicep-B5-_aFwp.js`),[])}),D({id:`cameligo`,extensions:[`.mligo`],aliases:[`Cameligo`],loader:()=>r(()=>import(`./cameligo-DMUM7wLl.js`),[])}),D({id:`clojure`,extensions:[`.clj`,`.cljs`,`.cljc`,`.edn`],aliases:[`clojure`,`Clojure`],loader:()=>r(()=>import(`./clojure-Cm7r79vr.js`),[])}),D({id:`coffeescript`,extensions:[`.coffee`],aliases:[`CoffeeScript`,`coffeescript`,`coffee`],mimetypes:[`text/x-coffeescript`,`text/coffeescript`],loader:()=>r(()=>import(`./coffee-Ba7i2nA0.js`),[])}),D({id:`c`,extensions:[`.c`,`.h`],aliases:[`C`,`c`],loader:()=>r(()=>import(`./cpp-C7h46wYY.js`),[])}),D({id:`cpp`,extensions:[`.cpp`,`.cc`,`.cxx`,`.hpp`,`.hh`,`.hxx`],aliases:[`C++`,`Cpp`,`cpp`],loader:()=>r(()=>import(`./cpp-C7h46wYY.js`),[])}),D({id:`csharp`,extensions:[`.cs`,`.csx`,`.cake`],aliases:[`C#`,`csharp`],loader:()=>r(()=>import(`./csharp-BKxtCVv1.js`),[])}),D({id:`csp`,extensions:[`.csp`],aliases:[`CSP`,`csp`],loader:()=>r(()=>import(`./csp-bTuwJoIa.js`),[])}),D({id:`css`,extensions:[`.css`],aliases:[`CSS`,`css`],mimetypes:[`text/css`],loader:()=>r(()=>import(`./css-DIMkf-bt.js`),[])}),D({id:`cypher`,extensions:[`.cypher`,`.cyp`],aliases:[`Cypher`,`OpenCypher`],loader:()=>r(()=>import(`./cypher-CVaqCwHa.js`),[])}),D({id:`dart`,extensions:[`.dart`],aliases:[`Dart`,`dart`],mimetypes:[`text/x-dart-source`,`text/x-dart`],loader:()=>r(()=>import(`./dart-onAF5SnQ.js`),[])}),D({id:`dockerfile`,extensions:[`.dockerfile`],filenames:[`Dockerfile`],aliases:[`Dockerfile`],loader:()=>r(()=>import(`./dockerfile-DZFCIeNp.js`),[])}),D({id:`ecl`,extensions:[`.ecl`],aliases:[`ECL`,`Ecl`,`ecl`],loader:()=>r(()=>import(`./ecl-D05T4iGw.js`),[])}),D({id:`elixir`,extensions:[`.ex`,`.exs`],aliases:[`Elixir`,`elixir`,`ex`],loader:()=>r(()=>import(`./elixir-6RTg0lbw.js`),[])}),D({id:`flow9`,extensions:[`.flow`],aliases:[`Flow9`,`Flow`,`flow9`,`flow`],loader:()=>r(()=>import(`./flow9-C5_-GSwl.js`),[])}),D({id:`fsharp`,extensions:[`.fs`,`.fsi`,`.ml`,`.mli`,`.fsx`,`.fsscript`],aliases:[`F#`,`FSharp`,`fsharp`],loader:()=>r(()=>import(`./fsharp-C8Ef5oNN.js`),[])}),D({id:`freemarker2`,extensions:[`.ftl`,`.ftlh`,`.ftlx`],aliases:[`FreeMarker2`,`Apache FreeMarker2`],loader:()=>r(()=>import(`./freemarker2-DsOTa0Uq.js`).then(e=>e.TagAutoInterpolationDollar),__vite__mapDeps([8,1,2,3]))}),D({id:`freemarker2.tag-angle.interpolation-dollar`,aliases:[`FreeMarker2 (Angle/Dollar)`,`Apache FreeMarker2 (Angle/Dollar)`],loader:()=>r(()=>import(`./freemarker2-DsOTa0Uq.js`).then(e=>e.TagAngleInterpolationDollar),__vite__mapDeps([8,1,2,3]))}),D({id:`freemarker2.tag-bracket.interpolation-dollar`,aliases:[`FreeMarker2 (Bracket/Dollar)`,`Apache FreeMarker2 (Bracket/Dollar)`],loader:()=>r(()=>import(`./freemarker2-DsOTa0Uq.js`).then(e=>e.TagBracketInterpolationDollar),__vite__mapDeps([8,1,2,3]))}),D({id:`freemarker2.tag-angle.interpolation-bracket`,aliases:[`FreeMarker2 (Angle/Bracket)`,`Apache FreeMarker2 (Angle/Bracket)`],loader:()=>r(()=>import(`./freemarker2-DsOTa0Uq.js`).then(e=>e.TagAngleInterpolationBracket),__vite__mapDeps([8,1,2,3]))}),D({id:`freemarker2.tag-bracket.interpolation-bracket`,aliases:[`FreeMarker2 (Bracket/Bracket)`,`Apache FreeMarker2 (Bracket/Bracket)`],loader:()=>r(()=>import(`./freemarker2-DsOTa0Uq.js`).then(e=>e.TagBracketInterpolationBracket),__vite__mapDeps([8,1,2,3]))}),D({id:`freemarker2.tag-auto.interpolation-dollar`,aliases:[`FreeMarker2 (Auto/Dollar)`,`Apache FreeMarker2 (Auto/Dollar)`],loader:()=>r(()=>import(`./freemarker2-DsOTa0Uq.js`).then(e=>e.TagAutoInterpolationDollar),__vite__mapDeps([8,1,2,3]))}),D({id:`freemarker2.tag-auto.interpolation-bracket`,aliases:[`FreeMarker2 (Auto/Bracket)`,`Apache FreeMarker2 (Auto/Bracket)`],loader:()=>r(()=>import(`./freemarker2-DsOTa0Uq.js`).then(e=>e.TagAutoInterpolationBracket),__vite__mapDeps([8,1,2,3]))}),D({id:`go`,extensions:[`.go`],aliases:[`Go`],loader:()=>r(()=>import(`./go-C-y9NEjX.js`),[])}),D({id:`graphql`,extensions:[`.graphql`,`.gql`],aliases:[`GraphQL`,`graphql`,`gql`],mimetypes:[`application/graphql`],loader:()=>r(()=>import(`./graphql-fmXr3nnJ.js`),[])}),D({id:`handlebars`,extensions:[`.handlebars`,`.hbs`],aliases:[`Handlebars`,`handlebars`,`hbs`],mimetypes:[`text/x-handlebars-template`],loader:()=>r(()=>import(`./handlebars-DGS-lUwt.js`),__vite__mapDeps([9,1,2,3]))}),D({id:`hcl`,extensions:[`.tf`,`.tfvars`,`.hcl`],aliases:[`Terraform`,`tf`,`HCL`,`hcl`],loader:()=>r(()=>import(`./hcl-CpzslTdj.js`),[])}),D({id:`html`,extensions:[`.html`,`.htm`,`.shtml`,`.xhtml`,`.mdoc`,`.jsp`,`.asp`,`.aspx`,`.jshtm`],aliases:[`HTML`,`htm`,`html`,`xhtml`],mimetypes:[`text/html`,`text/x-jshtm`,`text/template`,`text/ng-template`],loader:()=>r(()=>import(`./html-eVYoRhea.js`),__vite__mapDeps([10,1,2,3]))}),D({id:`ini`,extensions:[`.ini`,`.properties`,`.gitconfig`],filenames:[`config`,`.gitattributes`,`.gitconfig`,`.editorconfig`],aliases:[`Ini`,`ini`],loader:()=>r(()=>import(`./ini-sBoK_t0W.js`),[])}),D({id:`java`,extensions:[`.java`,`.jav`],aliases:[`Java`,`java`],mimetypes:[`text/x-java-source`,`text/x-java`],loader:()=>r(()=>import(`./java-BEtHBSE6.js`),[])}),D({id:`javascript`,extensions:[`.js`,`.es6`,`.jsx`,`.mjs`,`.cjs`],firstLine:`^#!.*\\bnode`,filenames:[`jakefile`],aliases:[`JavaScript`,`javascript`,`js`],mimetypes:[`text/javascript`],loader:()=>r(()=>import(`./javascript-Cq9FwqGi.js`),__vite__mapDeps([11,12,1,2,3]))}),D({id:`julia`,extensions:[`.jl`],aliases:[`julia`,`Julia`],loader:()=>r(()=>import(`./julia-Bri6UV-V.js`),[])}),D({id:`kotlin`,extensions:[`.kt`,`.kts`],aliases:[`Kotlin`,`kotlin`],mimetypes:[`text/x-kotlin-source`,`text/x-kotlin`],loader:()=>r(()=>import(`./kotlin-BOotOW0E.js`),[])}),D({id:`less`,extensions:[`.less`],aliases:[`Less`,`less`],mimetypes:[`text/x-less`,`text/less`],loader:()=>r(()=>import(`./less-B9JPFI3C.js`),[])}),D({id:`lexon`,extensions:[`.lex`],aliases:[`Lexon`],loader:()=>r(()=>import(`./lexon-CfSJPG6W.js`),[])}),D({id:`lua`,extensions:[`.lua`],aliases:[`Lua`,`lua`],loader:()=>r(()=>import(`./lua-CsQS60Ue.js`),[])}),D({id:`liquid`,extensions:[`.liquid`,`.html.liquid`],aliases:[`Liquid`,`liquid`],mimetypes:[`application/liquid`],loader:()=>r(()=>import(`./liquid-BcLxSFu3.js`),__vite__mapDeps([13,1,2,3]))}),D({id:`m3`,extensions:[`.m3`,`.i3`,`.mg`,`.ig`],aliases:[`Modula-3`,`Modula3`,`modula3`,`m3`],loader:()=>r(()=>import(`./m3-D-oSqn_W.js`),[])}),D({id:`markdown`,extensions:[`.md`,`.markdown`,`.mdown`,`.mkdn`,`.mkd`,`.mdwn`,`.mdtxt`,`.mdtext`],aliases:[`Markdown`,`markdown`],loader:()=>r(()=>import(`./markdown-Cimd5fb3.js`),[])}),D({id:`mdx`,extensions:[`.mdx`],aliases:[`MDX`,`mdx`],loader:()=>r(()=>import(`./mdx-BDgbCiou.js`),__vite__mapDeps([14,1,2,3]))}),D({id:`mips`,extensions:[`.s`],aliases:[`MIPS`,`MIPS-V`],mimetypes:[`text/x-mips`,`text/mips`,`text/plaintext`],loader:()=>r(()=>import(`./mips-CIPQ_RoX.js`),[])}),D({id:`msdax`,extensions:[`.dax`,`.msdax`],aliases:[`DAX`,`MSDAX`],loader:()=>r(()=>import(`./msdax-DauUninz.js`),[])}),D({id:`mysql`,extensions:[],aliases:[`MySQL`,`mysql`],loader:()=>r(()=>import(`./mysql-SOo6toE5.js`),[])}),D({id:`objective-c`,extensions:[`.m`],aliases:[`Objective-C`],loader:()=>r(()=>import(`./objective-c-FvmIjYaQ.js`),[])}),D({id:`pascal`,extensions:[`.pas`,`.p`,`.pp`],aliases:[`Pascal`,`pas`],mimetypes:[`text/x-pascal-source`,`text/x-pascal`],loader:()=>r(()=>import(`./pascal-DrH0SRf2.js`),[])}),D({id:`pascaligo`,extensions:[`.ligo`],aliases:[`Pascaligo`,`ligo`],loader:()=>r(()=>import(`./pascaligo-D-ptJ9y-.js`),[])}),D({id:`perl`,extensions:[`.pl`,`.pm`],aliases:[`Perl`,`pl`],loader:()=>r(()=>import(`./perl-oz_6vUea.js`),[])}),D({id:`pgsql`,extensions:[],aliases:[`PostgreSQL`,`postgres`,`pg`,`postgre`],loader:()=>r(()=>import(`./pgsql-DTj74zXo.js`),[])}),D({id:`php`,extensions:[`.php`,`.php4`,`.php5`,`.phtml`,`.ctp`],aliases:[`PHP`,`php`],mimetypes:[`application/x-php`],loader:()=>r(()=>import(`./php-nr791fC2.js`),[])}),D({id:`pla`,extensions:[`.pla`],loader:()=>r(()=>import(`./pla-CopQ2nXW.js`),[])}),D({id:`postiats`,extensions:[`.dats`,`.sats`,`.hats`],aliases:[`ATS`,`ATS/Postiats`],loader:()=>r(()=>import(`./postiats-43DmfD33.js`),[])}),D({id:`powerquery`,extensions:[`.pq`,`.pqm`],aliases:[`PQ`,`M`,`Power Query`,`Power Query M`],loader:()=>r(()=>import(`./powerquery-D3hlyOfw.js`),[])}),D({id:`powershell`,extensions:[`.ps1`,`.psm1`,`.psd1`],aliases:[`PowerShell`,`powershell`,`ps`,`ps1`],loader:()=>r(()=>import(`./powershell-DmHpPYUd.js`),[])}),D({id:`proto`,extensions:[`.proto`],aliases:[`protobuf`,`Protocol Buffers`],loader:()=>r(()=>import(`./protobuf-C531GsRP.js`),[])}),D({id:`pug`,extensions:[`.jade`,`.pug`],aliases:[`Pug`,`Jade`,`jade`],loader:()=>r(()=>import(`./pug-Z5eAx3Zn.js`),[])}),D({id:`python`,extensions:[`.py`,`.rpy`,`.pyw`,`.cpy`,`.gyp`,`.gypi`],aliases:[`Python`,`py`],firstLine:`^#!/.*\\bpython[0-9.-]*\\b`,loader:()=>r(()=>import(`./python-D5mUty3a.js`),__vite__mapDeps([15,1,2,3]))}),D({id:`qsharp`,extensions:[`.qs`],aliases:[`Q#`,`qsharp`],loader:()=>r(()=>import(`./qsharp-DkqhCAOL.js`),[])}),D({id:`r`,extensions:[`.r`,`.rhistory`,`.rmd`,`.rprofile`,`.rt`],aliases:[`R`,`r`],loader:()=>r(()=>import(`./r-BwWrilGY.js`),[])}),D({id:`razor`,extensions:[`.cshtml`],aliases:[`Razor`,`razor`],mimetypes:[`text/x-cshtml`],loader:()=>r(()=>import(`./razor-DAAn8j2s.js`),__vite__mapDeps([16,1,2,3]))}),D({id:`redis`,extensions:[`.redis`],aliases:[`redis`],loader:()=>r(()=>import(`./redis-ClamHrr6.js`),[])}),D({id:`redshift`,extensions:[],aliases:[`Redshift`,`redshift`],loader:()=>r(()=>import(`./redshift-DT7zqm-g.js`),[])}),D({id:`restructuredtext`,extensions:[`.rst`],aliases:[`reStructuredText`,`restructuredtext`],loader:()=>r(()=>import(`./restructuredtext-BYgofb2h.js`),[])}),D({id:`ruby`,extensions:[`.rb`,`.rbx`,`.rjs`,`.gemspec`,`.pp`],filenames:[`rakefile`,`Gemfile`],aliases:[`Ruby`,`rb`],loader:()=>r(()=>import(`./ruby-DezsRK8O.js`),[])}),D({id:`rust`,extensions:[`.rs`,`.rlib`],aliases:[`Rust`,`rust`],loader:()=>r(()=>import(`./rust-DdL9SqIa.js`),[])}),D({id:`sb`,extensions:[`.sb`],aliases:[`Small Basic`,`sb`],loader:()=>r(()=>import(`./sb-CcwsVR0C.js`),[])}),D({id:`scala`,extensions:[`.scala`,`.sc`,`.sbt`],aliases:[`Scala`,`scala`,`SBT`,`Sbt`,`sbt`,`Dotty`,`dotty`],mimetypes:[`text/x-scala-source`,`text/x-scala`,`text/x-sbt`,`text/x-dotty`],loader:()=>r(()=>import(`./scala-DHpiXF5c.js`),[])}),D({id:`scheme`,extensions:[`.scm`,`.ss`,`.sch`,`.rkt`],aliases:[`scheme`,`Scheme`],loader:()=>r(()=>import(`./scheme-BeGwcela.js`),[])}),D({id:`scss`,extensions:[`.scss`],aliases:[`Sass`,`sass`,`scss`],mimetypes:[`text/x-scss`,`text/scss`],loader:()=>r(()=>import(`./scss-gp-XZpBa.js`),[])}),D({id:`shell`,extensions:[`.sh`,`.bash`],aliases:[`Shell`,`sh`],loader:()=>r(()=>import(`./shell-CC2rA5mh.js`),[])}),D({id:`sol`,extensions:[`.sol`],aliases:[`sol`,`solidity`,`Solidity`],loader:()=>r(()=>import(`./solidity-BEEn4gHE.js`),[])}),D({id:`aes`,extensions:[`.aes`],aliases:[`aes`,`sophia`,`Sophia`],loader:()=>r(()=>import(`./sophia-CRfGWb83.js`),[])}),D({id:`sparql`,extensions:[`.rq`],aliases:[`sparql`,`SPARQL`],loader:()=>r(()=>import(`./sparql-D_Lu-MrJ.js`),[])}),D({id:`sql`,extensions:[`.sql`],aliases:[`SQL`],loader:()=>r(()=>import(`./sql-NEE52Syq.js`),[])}),D({id:`st`,extensions:[`.st`,`.iecst`,`.iecplc`,`.lc3lib`,`.TcPOU`,`.TcDUT`,`.TcGVL`,`.TcIO`],aliases:[`StructuredText`,`scl`,`stl`],loader:()=>r(()=>import(`./st-DbInun42.js`),[])}),D({id:`swift`,aliases:[`Swift`,`swift`],extensions:[`.swift`],mimetypes:[`text/swift`],loader:()=>r(()=>import(`./swift-Bxkupp3x.js`),[])}),D({id:`systemverilog`,extensions:[`.sv`,`.svh`],aliases:[`SV`,`sv`,`SystemVerilog`,`systemverilog`],loader:()=>r(()=>import(`./systemverilog-Bz4Y3fRF.js`),[])}),D({id:`verilog`,extensions:[`.v`,`.vh`],aliases:[`V`,`v`,`Verilog`,`verilog`],loader:()=>r(()=>import(`./systemverilog-Bz4Y3fRF.js`),[])}),D({id:`tcl`,extensions:[`.tcl`],aliases:[`tcl`,`Tcl`,`tcltk`,`TclTk`,`tcl/tk`,`Tcl/Tk`],loader:()=>r(()=>import(`./tcl-DISqw1ZD.js`),[])}),D({id:`twig`,extensions:[`.twig`],aliases:[`Twig`,`twig`],mimetypes:[`text/x-twig`],loader:()=>r(()=>import(`./twig-De2hgUGE.js`),[])}),D({id:`typescript`,extensions:[`.ts`,`.tsx`,`.cts`,`.mts`],aliases:[`TypeScript`,`ts`,`typescript`],mimetypes:[`text/typescript`],loader:()=>r(()=>import(`./typescript-DvKdOnR-.js`),__vite__mapDeps([12,1,2,3]))}),D({id:`typespec`,extensions:[`.tsp`],aliases:[`TypeSpec`],loader:()=>r(()=>import(`./typespec-B8J7ngcE.js`),[])}),D({id:`vb`,extensions:[`.vb`],aliases:[`Visual Basic`,`vb`],loader:()=>r(()=>import(`./vb-DV3o63ZY.js`),[])}),D({id:`wgsl`,extensions:[`.wgsl`],aliases:[`WebGPU Shading Language`,`WGSL`,`wgsl`],loader:()=>r(()=>import(`./wgsl-DpFanUEy.js`),[])}),D({id:`xml`,extensions:[`.xml`,`.xsd`,`.dtd`,`.ascx`,`.csproj`,`.config`,`.props`,`.targets`,`.wxi`,`.wxl`,`.wxs`,`.xaml`,`.svg`,`.svgz`,`.opf`,`.xslt`,`.xsl`],firstLine:`(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)`,aliases:[`XML`,`xml`],mimetypes:[`text/xml`,`application/xml`,`application/xaml+xml`,`application/xml-dtd`],loader:()=>r(()=>import(`./xml-DDMTG7kD.js`),__vite__mapDeps([17,1,2,3]))}),D({id:`yaml`,extensions:[`.yaml`,`.yml`],aliases:[`YAML`,`yaml`,`YML`,`yml`],mimetypes:[`application/x-yaml`,`text/x-yaml`],loader:()=>r(()=>import(`./yaml-hCGJvPOb.js`),__vite__mapDeps([18,1,2,3]))});var Oe=e({MonacoLspClient:()=>gr,WebSocketTransport:()=>yr,createTransportToIFrame:()=>Sr,createTransportToWorker:()=>xr}),ke=Object.defineProperty,Ae=(e,t,n)=>t in e?ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,O=(e,t,n)=>Ae(e,typeof t==`symbol`?t:t+``,n),je,Me,Ne,Pe,Fe;function Ie(e){return e.method!==void 0}var Le;(function(e){function t(e){return e}e.create=t})(Le||={});var k;(function(e){e.parseError=-32700,e.invalidRequest=-32600,e.methodNotFound=-32601,e.invalidParams=-32602,e.internalError=-32603;function t(e){return-32099<=e&&e<=-32e3}e.isServerError=t;function n(e){if(!t(e))throw Error(`Invalid range for a server error.`);return e}e.serverError=n,e.unexpectedServerError=-32e3;function r(e){return!0}e.isApplicationError=r;function i(e){return e}e.applicationError=i,e.genericApplicationError=-320100})(k||={});var Re=class{constructor(){O(this,`listeners`,new Set),O(this,`event`,e=>(this.listeners.add(e),{dispose:()=>{this.listeners.delete(e)}}))}fire(e){this.listeners.forEach(t=>t(e))}},ze=class{constructor(e){O(this,`_value`),O(this,`eventEmitter`),this._value=e,this.eventEmitter=new Re}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.eventEmitter.fire(e))}get onChange(){return this.eventEmitter.event}};function Be(e,t){let n=setTimeout(t,e);return{dispose:()=>clearTimeout(n)}}function Ve(e,t,n){return e instanceof Set?(e.add(t),{dispose:()=>e.delete(t)}):(e.set(t,n),{dispose:()=>e.delete(t)})}var He=class{constructor(){O(this,`_state`,`none`),O(this,`promise`),O(this,`resolve`,()=>{}),O(this,`reject`,()=>{}),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}get state(){return this._state}},Ue=(je=class{constructor(){O(this,`_unprocessedMessages`,[]),O(this,`_messageListener`),O(this,`id`,je.id++),O(this,`_state`,new ze({state:`open`})),O(this,`state`,this._state)}setListener(e){if(this._messageListener=e,e)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){let e=this._unprocessedMessages.shift();this._messageListener(e)}}send(e){return this._sendImpl(e)}_dispatchReceivedMessage(e){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(e):this._unprocessedMessages.push(e)}_onConnectionClosed(){this._state.value={state:`closed`,error:void 0}}log(e){return new We(this,e??new Ge)}},O(je,`id`,0),je),We=class{constructor(e,t){O(this,`baseStream`),O(this,`logger`),this.baseStream=e,this.logger=t}get state(){return this.baseStream.state}setListener(e){if(e===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(t=>{this.logger.log(this.baseStream,`incoming`,t),e(t)})}send(e){return this.logger.log(this.baseStream,`outgoing`,e),this.baseStream.send(e)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},Ge=class{log(e,t,n){console.log(`${t===`incoming`?`<-`:`->`} [${e.toString()}] ${JSON.stringify(n)}`)}},Ke=class e{constructor(e){O(this,`connect`),this.connect=e}mapContext(t){return new e(e=>this.connect(e?qe(e,t):void 0))}};function qe(e,t){return{handleNotification:(n,r)=>e.handleNotification(n,t(r)),handleRequest:(n,r,i)=>e.handleRequest(n,r,t(i))}}var Je=class e{constructor(e,t,n){O(this,`_stream`),O(this,`_listener`),O(this,`_logger`),O(this,`_unprocessedResponses`,new Map),O(this,`_lastUsedRequestId`,0),this._stream=e,this._listener=t,this._logger=n,this._stream.setListener(e=>{Ie(e)?e.id===void 0?this._processNotification(e):this._processRequest(e):this._processResponse(e)})}static createChannel(t,n){let r=!1;return new Ke(i=>{if(r)throw Error(`A channel to the stream ${t} was already constructed!`);return r=!0,new e(t,i,n)})}get state(){return this._stream.state}async _processNotification(e){if(e.id!==void 0)throw Error();if(!this._listener){this._logger&&this._logger.debug({text:`Notification ignored`,message:e});return}try{await this._listener.handleNotification({method:e.method,params:e.params||null})}catch(t){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${t}`,exception:t,message:e})}}async _processRequest(e){if(e.id===void 0)throw Error();let t;if(this._listener)try{t=await this._listener.handleRequest({method:e.method,params:e.params||null},e.id)}catch(n){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${n}`,message:e,exception:n}),t={error:{code:k.internalError,message:`An unexpected exception was thrown.`,data:void 0}}}else this._logger&&this._logger.debug({text:`Received request even though not listening for requests`,message:e}),t={error:{code:k.methodNotFound,message:`This endpoint does not listen for requests or notifications.`,data:void 0}};let n;n=`result`in t?{jsonrpc:`2.0`,id:e.id,result:t.result}:{jsonrpc:`2.0`,id:e.id,error:t.error},await this._stream.send(n)}_processResponse(e){let t=``+e.id,n=this._unprocessedResponses.get(t);if(!n){this._logger&&this._logger.debug({text:`Got an unexpected response message`,message:e});return}this._unprocessedResponses.delete(t),n(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,n){let r={jsonrpc:`2.0`,id:this._newRequestId(),method:e.method,params:e.params||void 0};return n&&n(r.id),new Promise((e,t)=>{let n=``+r.id;this._unprocessedResponses.set(n,n=>{`result`in n?e({result:n.result}):(n.error||t(Error(`Response had neither 'result' nor 'error' field set.`)),e({error:n.error}))}),this._stream.send(r).then(void 0,e=>{this._unprocessedResponses.delete(n),t(e)})})}sendNotification(e,t){let n={jsonrpc:`2.0`,id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(n)}toString(){return`StreamChannel/`+this._stream.toString()}},A;(function(e){function t(){return{deserializeFromJson:e=>({hasErrors:!1,value:e}),serializeToJson:e=>e}}e.sAny=t;function n(){return{deserializeFromJson:e=>({hasErrors:!1,value:{}}),serializeToJson:e=>({})}}e.sEmptyObject=n;function r(){return{deserializeFromJson:e=>({hasErrors:!1,value:void 0}),serializeToJson:e=>null}}e.sVoidFromNull=r})(A||={});var Ye=Symbol(`OptionalMethodNotFound`),Xe=class{contextualize(e){return new Ze(this,e)}},Ze=class extends Xe{constructor(e,t){super(),O(this,`underylingTypedChannel`),O(this,`converters`),this.underylingTypedChannel=e,this.converters=t}async request(e,t,n){let r=await this.converters.getSendContext(n);return this.underylingTypedChannel.request(e,t,r)}async notify(e,t,n){let r=await this.converters.getSendContext(n);return this.underylingTypedChannel.notify(e,t,r)}registerNotificationHandler(e,t){return this.underylingTypedChannel.registerNotificationHandler(e,async(e,n)=>await t(e,await this.converters.getNewContext(n)))}registerRequestHandler(e,t){return this.underylingTypedChannel.registerRequestHandler(e,async(e,n,r)=>await t(e,n,await this.converters.getNewContext(r)))}},Qe=class e extends Xe{constructor(e,t={}){super(),O(this,`channelCtor`),O(this,`_requestSender`),O(this,`_handler`,new Map),O(this,`_unknownNotificationHandler`,new Set),O(this,`_timeout`),O(this,`sendExceptionDetails`,!1),O(this,`_logger`),O(this,`listeningDeferred`,new He),O(this,`onListening`,this.listeningDeferred.promise),O(this,`_requestDidErrorEventEmitter`,new Re),O(this,`onRequestDidError`,this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=Be(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}static fromTransport(t,n={}){return new e(Je.createChannel(t,n.logger),n)}startListen(){if(this._requestSender)throw Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&=(this._timeout.dispose(),void 0),this._requestSender=this.channelCtor.connect({handleRequest:(e,t,n)=>this.handleRequest(e,t,n),handleNotification:(e,t)=>this.handleNotification(e,t)}),this.listeningDeferred.resolve()}checkChannel(e){if(!e)throw Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(e,t,n){let r=this._handler.get(e.method);if(!r)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:k.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(r.kind!=`request`){let t=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:t,data:{requestObject:e}}),{error:{code:k.invalidRequest,message:t,data:{method:e.method}}}}let i=r.requestType.paramsSerializer.deserializeFromJson(e.params);if(i.hasErrors){let t=`Got invalid params: ${i.errorMessage}`;return this._logger&&this._logger.debug({text:t,data:{requestObject:e,errorMessage:i.errorMessage}}),{error:{code:k.invalidParams,message:t,data:{errors:i.errorMessage}}}}else{let a=i.value,o;try{let e=await r.handler(a,t,n);if(`error`in e||`errorMessage`in e){let t=e.error?r.requestType.errorSerializer.serializeToJson(e.error):void 0;o={error:{code:e.errorCode||k.genericApplicationError,message:e.errorMessage||`An error was returned`,data:t}}}else o={result:r.requestType.resultSerializer.serializeToJson(e.ok)}}catch(t){t instanceof et?o={error:{code:t.code,message:t.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${t}.`,exception:t,data:{requestObject:e}}),o={error:{code:k.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${t}.`:`Server has thrown an unexpected exception`}})}return o}}async handleNotification(e,t){let n=this._handler.get(e.method);if(!n){for(let t of this._unknownNotificationHandler)t(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(n.kind!=`notification`){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}let r=n.notificationType.paramsSerializer.deserializeFromJson(e.params);if(r.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${r}`,data:{requestObject:e,errorMessage:r.errorMessage}});return}let i=r.value;for(let r of n.handlers)try{r(i,t)}catch(t){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${t}.`,exception:t,data:{requestObject:e}})}}registerUnknownNotificationHandler(e){return Ve(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw Error(`Handler with method "${e.method}" already registered.`);return Ve(this._handler,e.method,{kind:`request`,requestType:e,handler:t})}registerNotificationHandler(e,t){let n=this._handler.get(e.method);if(!n)n={kind:`notification`,notificationType:e,handlers:new Set},this._handler.set(e.method,n);else{if(n.kind!==`notification`)throw Error(`Method "${e.method}" was already registered as request handler.`);if(n.notificationType!==e)throw Error(`Method "${e.method}" was registered for a different type.`)}return Ve(n.handlers,t)}getRegisteredTypes(){let e=[];for(let t of this._handler.values())t.kind===`notification`?e.push(t.notificationType):t.kind===`request`&&e.push(t.requestType);return e}async request(e,t,n){if(!this.checkChannel(this._requestSender))throw Error(`Impossible`);let r=e.paramsSerializer.serializeToJson(t);$e(r);let i=await this._requestSender.sendRequest({method:e.method,params:r},n);if(`error`in i){if(e.isOptional&&i.error.code===k.methodNotFound)return Ye;let t;if(i.error.data!==void 0){let n=e.errorSerializer.deserializeFromJson(i.error.data);if(n.hasErrors)throw Error(n.errorMessage);t=n.value}else t=void 0;let n=new et(i.error.message,t,i.error.code);throw this._requestDidErrorEventEmitter.fire({error:n}),n}else{let t=e.resultSerializer.deserializeFromJson(i.result);if(t.hasErrors)throw Error(`Could not deserialize response: `+t.errorMessage+`
3
3
 
4
4
  ${JSON.stringify(i,null,2)}`);return t.value}}async notify(e,t,n){if(!this.checkChannel(this._requestSender))throw Error();let r=e.paramsSerializer.serializeToJson(t);$e(r),this._requestSender.sendNotification({method:e.method,params:r},n)}};function $e(e){if(e!==null&&Array.isArray(e)&&typeof e!=`object`)throw Error(`Invalid value! Only null, array and object is allowed.`)}var et=class e extends Error{constructor(t,n,r=k.genericApplicationError){super(t),O(this,`data`),O(this,`code`),this.data=n,this.code=r,Object.setPrototypeOf(this,e.prototype)}},tt=class e{constructor(e,t,n,r,i=!1){O(this,`method`),O(this,`paramsSerializer`),O(this,`resultSerializer`),O(this,`errorSerializer`),O(this,`isOptional`),O(this,`kind`,`request`),this.method=e,this.paramsSerializer=t,this.resultSerializer=n,this.errorSerializer=r,this.isOptional=i}withMethod(t){return new e(t,this.paramsSerializer,this.resultSerializer,this.errorSerializer)}optional(){return new e(this.method,this.paramsSerializer,this.resultSerializer,this.errorSerializer,!0)}},nt=class e{constructor(e,t){O(this,`method`),O(this,`paramsSerializer`),O(this,`kind`,`notification`),this.method=e,this.paramsSerializer=t}withMethod(t){return new e(t,this.paramsSerializer)}};function j(e){return new tt((e||{}).method,A.sAny(),A.sAny(),A.sAny())}function M(e){return new nt((e||{}).method,A.sAny())}var rt=(Me=Symbol(),Ne=class{constructor(e){O(this,`error`),O(this,Me),this.error=e}},O(Ne,`factory`,e=>new Ne(e)),Ne);function it(e){let t=at(e.server),n=at(e.client);return new ot(e.tags||[],t,n)}function at(e){let t={};for(let[n,r]of Object.entries(e)){let e=r.method?r.method:n;t[n]=r.withMethod(e)}return t}var ot=class e{constructor(e=[],t,n){O(this,`tags`),O(this,`server`),O(this,`client`),this.tags=e,this.server=t,this.client=n}_onlyDesignTime(){return Error(`This property is not meant to be accessed at runtime`)}get TContractObject(){throw this._onlyDesignTime()}get TClientInterface(){throw this._onlyDesignTime()}get TServerInterface(){throw this._onlyDesignTime()}get TClientHandler(){throw this._onlyDesignTime()}get TServerHandler(){throw this._onlyDesignTime()}get TTags(){throw this._onlyDesignTime()}getInterface(e,t,n,r){let i=this.buildCounterpart(e,n),a=this.registerHandlers(e,t,r,i);return{counterpart:i,dispose:()=>a.dispose()}}buildCounterpart(e,t){let n={};for(let[r,i]of Object.entries(t)){let t;t=i.kind===`request`?i.isOptional?async(t,n)=>{t===void 0&&(t={});try{return await e.request(i,t,n)}catch(e){if(e&&e.code===k.methodNotFound)return Ye;throw e}}:(t,n)=>(t===void 0&&(t={}),e.request(i,t,n)):(t,n)=>(t===void 0&&(t={}),e.notify(i,t,n)),n[r]=t}return n}registerHandlers(e,t,n,r){let i=[];for(let[a,o]of Object.entries(t))if(o.kind===`request`){let t=n[a];if(!t)continue;let s=this.createRequestHandler(r,t);i.push(e.registerRequestHandler(o,s))}else{let t=n[a];t&&i.push(e.registerNotificationHandler(o,(e,n)=>{t(e,{context:n,counterpart:r})}))}return{dispose:()=>i.forEach(e=>e.dispose())}}createRequestHandler(e,t){return async(n,r,i)=>{let a=await t(n,{context:i,counterpart:e,newErr:rt.factory,requestId:r});return a instanceof rt?a.error:{ok:a}}}static getServerFromStream(e,t,n,r){let i=Qe.fromTransport(t,n),{server:a}=e.getServer(i,r);return i.startListen(),{channel:i,server:a}}static registerServerToStream(e,t,n,r){let i=Qe.fromTransport(t,n),{client:a}=e.registerServer(i,r);return i.startListen(),{channel:i,client:a}}getServer(e,t){let{counterpart:n,dispose:r}=this.getInterface(e,this.client,this.server,t);return{server:n,dispose:r}}registerServer(e,t){let{counterpart:n,dispose:r}=this.getInterface(e,this.server,this.client,t);return{client:n,dispose:r}}withContext(){return new e(this.tags,this.server,this.client)}},N=(function(e){return e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`,e})({}),P=(function(e){return e[e.File=1]=`File`,e[e.Module=2]=`Module`,e[e.Namespace=3]=`Namespace`,e[e.Package=4]=`Package`,e[e.Class=5]=`Class`,e[e.Method=6]=`Method`,e[e.Property=7]=`Property`,e[e.Field=8]=`Field`,e[e.Constructor=9]=`Constructor`,e[e.Enum=10]=`Enum`,e[e.Interface=11]=`Interface`,e[e.Function=12]=`Function`,e[e.Variable=13]=`Variable`,e[e.Constant=14]=`Constant`,e[e.String=15]=`String`,e[e.Number=16]=`Number`,e[e.Boolean=17]=`Boolean`,e[e.Array=18]=`Array`,e[e.Object=19]=`Object`,e[e.Key=20]=`Key`,e[e.Null=21]=`Null`,e[e.EnumMember=22]=`EnumMember`,e[e.Struct=23]=`Struct`,e[e.Event=24]=`Event`,e[e.Operator=25]=`Operator`,e[e.TypeParameter=26]=`TypeParameter`,e})({}),st=(function(e){return e[e.Deprecated=1]=`Deprecated`,e})({}),ct=(function(e){return e[e.Type=1]=`Type`,e[e.Parameter=2]=`Parameter`,e})({}),lt=(function(e){return e[e.None=0]=`None`,e[e.Full=1]=`Full`,e[e.Incremental=2]=`Incremental`,e})({}),F=(function(e){return e[e.Text=1]=`Text`,e[e.Method=2]=`Method`,e[e.Function=3]=`Function`,e[e.Constructor=4]=`Constructor`,e[e.Field=5]=`Field`,e[e.Variable=6]=`Variable`,e[e.Class=7]=`Class`,e[e.Interface=8]=`Interface`,e[e.Module=9]=`Module`,e[e.Property=10]=`Property`,e[e.Unit=11]=`Unit`,e[e.Value=12]=`Value`,e[e.Enum=13]=`Enum`,e[e.Keyword=14]=`Keyword`,e[e.Snippet=15]=`Snippet`,e[e.Color=16]=`Color`,e[e.File=17]=`File`,e[e.Reference=18]=`Reference`,e[e.Folder=19]=`Folder`,e[e.EnumMember=20]=`EnumMember`,e[e.Constant=21]=`Constant`,e[e.Struct=22]=`Struct`,e[e.Event=23]=`Event`,e[e.Operator=24]=`Operator`,e[e.TypeParameter=25]=`TypeParameter`,e})({}),ut=(function(e){return e[e.Deprecated=1]=`Deprecated`,e})({}),dt=(function(e){return e[e.PlainText=1]=`PlainText`,e[e.Snippet=2]=`Snippet`,e})({}),ft=(function(e){return e[e.Text=1]=`Text`,e[e.Read=2]=`Read`,e[e.Write=3]=`Write`,e})({}),I=(function(e){return e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`,e})({}),pt=(function(e){return e.PlainText=`plaintext`,e.Markdown=`markdown`,e})({}),L=(function(e){return e[e.Error=1]=`Error`,e[e.Warning=2]=`Warning`,e[e.Information=3]=`Information`,e[e.Hint=4]=`Hint`,e})({}),mt=(function(e){return e[e.Unnecessary=1]=`Unnecessary`,e[e.Deprecated=2]=`Deprecated`,e})({}),ht=(function(e){return e[e.Invoked=1]=`Invoked`,e[e.TriggerCharacter=2]=`TriggerCharacter`,e[e.TriggerForIncompleteCompletions=3]=`TriggerForIncompleteCompletions`,e})({}),gt=(function(e){return e[e.Invoked=1]=`Invoked`,e[e.TriggerCharacter=2]=`TriggerCharacter`,e[e.ContentChange=3]=`ContentChange`,e})({}),_t=(function(e){return e[e.Invoked=1]=`Invoked`,e[e.Automatic=2]=`Automatic`,e})({}),vt=(function(e){return e.Relative=`relative`,e})({}),R=class{constructor(e){this.method=e}},z={textDocumentImplementation:new R(`textDocument/implementation`),textDocumentTypeDefinition:new R(`textDocument/typeDefinition`),textDocumentDocumentColor:new R(`textDocument/documentColor`),textDocumentColorPresentation:new R(`textDocument/colorPresentation`),textDocumentFoldingRange:new R(`textDocument/foldingRange`),textDocumentDeclaration:new R(`textDocument/declaration`),textDocumentSelectionRange:new R(`textDocument/selectionRange`),textDocumentPrepareCallHierarchy:new R(`textDocument/prepareCallHierarchy`),textDocumentSemanticTokensFull:new R(`textDocument/semanticTokens/full`),textDocumentSemanticTokensFullDelta:new R(`textDocument/semanticTokens/full/delta`),textDocumentLinkedEditingRange:new R(`textDocument/linkedEditingRange`),workspaceWillCreateFiles:new R(`workspace/willCreateFiles`),workspaceWillRenameFiles:new R(`workspace/willRenameFiles`),workspaceWillDeleteFiles:new R(`workspace/willDeleteFiles`),textDocumentMoniker:new R(`textDocument/moniker`),textDocumentPrepareTypeHierarchy:new R(`textDocument/prepareTypeHierarchy`),textDocumentInlineValue:new R(`textDocument/inlineValue`),textDocumentInlayHint:new R(`textDocument/inlayHint`),textDocumentDiagnostic:new R(`textDocument/diagnostic`),textDocumentInlineCompletion:new R(`textDocument/inlineCompletion`),textDocumentWillSaveWaitUntil:new R(`textDocument/willSaveWaitUntil`),textDocumentCompletion:new R(`textDocument/completion`),textDocumentHover:new R(`textDocument/hover`),textDocumentSignatureHelp:new R(`textDocument/signatureHelp`),textDocumentDefinition:new R(`textDocument/definition`),textDocumentReferences:new R(`textDocument/references`),textDocumentDocumentHighlight:new R(`textDocument/documentHighlight`),textDocumentDocumentSymbol:new R(`textDocument/documentSymbol`),textDocumentCodeAction:new R(`textDocument/codeAction`),workspaceSymbol:new R(`workspace/symbol`),textDocumentCodeLens:new R(`textDocument/codeLens`),textDocumentDocumentLink:new R(`textDocument/documentLink`),textDocumentFormatting:new R(`textDocument/formatting`),textDocumentRangeFormatting:new R(`textDocument/rangeFormatting`),textDocumentRangesFormatting:new R(`textDocument/rangesFormatting`),textDocumentOnTypeFormatting:new R(`textDocument/onTypeFormatting`),textDocumentRename:new R(`textDocument/rename`),workspaceExecuteCommand:new R(`workspace/executeCommand`),workspaceDidCreateFiles:new R(`workspace/didCreateFiles`),workspaceDidRenameFiles:new R(`workspace/didRenameFiles`),workspaceDidDeleteFiles:new R(`workspace/didDeleteFiles`),workspaceDidChangeConfiguration:new R(`workspace/didChangeConfiguration`),textDocumentDidOpen:new R(`textDocument/didOpen`),textDocumentDidChange:new R(`textDocument/didChange`),textDocumentDidClose:new R(`textDocument/didClose`),textDocumentDidSave:new R(`textDocument/didSave`),textDocumentWillSave:new R(`textDocument/willSave`),workspaceDidChangeWatchedFiles:new R(`workspace/didChangeWatchedFiles`)},yt=it({server:{textDocumentImplementation:j({method:`textDocument/implementation`}),textDocumentTypeDefinition:j({method:`textDocument/typeDefinition`}),textDocumentDocumentColor:j({method:`textDocument/documentColor`}),textDocumentColorPresentation:j({method:`textDocument/colorPresentation`}),textDocumentFoldingRange:j({method:`textDocument/foldingRange`}),textDocumentDeclaration:j({method:`textDocument/declaration`}),textDocumentSelectionRange:j({method:`textDocument/selectionRange`}),textDocumentPrepareCallHierarchy:j({method:`textDocument/prepareCallHierarchy`}),callHierarchyIncomingCalls:j({method:`callHierarchy/incomingCalls`}),callHierarchyOutgoingCalls:j({method:`callHierarchy/outgoingCalls`}),textDocumentSemanticTokensFull:j({method:`textDocument/semanticTokens/full`}),textDocumentSemanticTokensFullDelta:j({method:`textDocument/semanticTokens/full/delta`}),textDocumentSemanticTokensRange:j({method:`textDocument/semanticTokens/range`}),textDocumentLinkedEditingRange:j({method:`textDocument/linkedEditingRange`}),workspaceWillCreateFiles:j({method:`workspace/willCreateFiles`}),workspaceWillRenameFiles:j({method:`workspace/willRenameFiles`}),workspaceWillDeleteFiles:j({method:`workspace/willDeleteFiles`}),textDocumentMoniker:j({method:`textDocument/moniker`}),textDocumentPrepareTypeHierarchy:j({method:`textDocument/prepareTypeHierarchy`}),typeHierarchySupertypes:j({method:`typeHierarchy/supertypes`}),typeHierarchySubtypes:j({method:`typeHierarchy/subtypes`}),textDocumentInlineValue:j({method:`textDocument/inlineValue`}),textDocumentInlayHint:j({method:`textDocument/inlayHint`}),inlayHintResolve:j({method:`inlayHint/resolve`}),textDocumentDiagnostic:j({method:`textDocument/diagnostic`}),workspaceDiagnostic:j({method:`workspace/diagnostic`}),textDocumentInlineCompletion:j({method:`textDocument/inlineCompletion`}),initialize:j({method:`initialize`}),shutdown:j({method:`shutdown`}),textDocumentWillSaveWaitUntil:j({method:`textDocument/willSaveWaitUntil`}),textDocumentCompletion:j({method:`textDocument/completion`}),completionItemResolve:j({method:`completionItem/resolve`}),textDocumentHover:j({method:`textDocument/hover`}),textDocumentSignatureHelp:j({method:`textDocument/signatureHelp`}),textDocumentDefinition:j({method:`textDocument/definition`}),textDocumentReferences:j({method:`textDocument/references`}),textDocumentDocumentHighlight:j({method:`textDocument/documentHighlight`}),textDocumentDocumentSymbol:j({method:`textDocument/documentSymbol`}),textDocumentCodeAction:j({method:`textDocument/codeAction`}),codeActionResolve:j({method:`codeAction/resolve`}),workspaceSymbol:j({method:`workspace/symbol`}),workspaceSymbolResolve:j({method:`workspaceSymbol/resolve`}),textDocumentCodeLens:j({method:`textDocument/codeLens`}),codeLensResolve:j({method:`codeLens/resolve`}),textDocumentDocumentLink:j({method:`textDocument/documentLink`}),documentLinkResolve:j({method:`documentLink/resolve`}),textDocumentFormatting:j({method:`textDocument/formatting`}),textDocumentRangeFormatting:j({method:`textDocument/rangeFormatting`}),textDocumentRangesFormatting:j({method:`textDocument/rangesFormatting`}),textDocumentOnTypeFormatting:j({method:`textDocument/onTypeFormatting`}),textDocumentRename:j({method:`textDocument/rename`}),textDocumentPrepareRename:j({method:`textDocument/prepareRename`}),workspaceExecuteCommand:j({method:`workspace/executeCommand`}),workspaceDidChangeWorkspaceFolders:M({method:`workspace/didChangeWorkspaceFolders`}),windowWorkDoneProgressCancel:M({method:`window/workDoneProgress/cancel`}),workspaceDidCreateFiles:M({method:`workspace/didCreateFiles`}),workspaceDidRenameFiles:M({method:`workspace/didRenameFiles`}),workspaceDidDeleteFiles:M({method:`workspace/didDeleteFiles`}),notebookDocumentDidOpen:M({method:`notebookDocument/didOpen`}),notebookDocumentDidChange:M({method:`notebookDocument/didChange`}),notebookDocumentDidSave:M({method:`notebookDocument/didSave`}),notebookDocumentDidClose:M({method:`notebookDocument/didClose`}),initialized:M({method:`initialized`}),exit:M({method:`exit`}),workspaceDidChangeConfiguration:M({method:`workspace/didChangeConfiguration`}),textDocumentDidOpen:M({method:`textDocument/didOpen`}),textDocumentDidChange:M({method:`textDocument/didChange`}),textDocumentDidClose:M({method:`textDocument/didClose`}),textDocumentDidSave:M({method:`textDocument/didSave`}),textDocumentWillSave:M({method:`textDocument/willSave`}),workspaceDidChangeWatchedFiles:M({method:`workspace/didChangeWatchedFiles`}),setTrace:M({method:`$/setTrace`}),cancelRequest:M({method:`$/cancelRequest`}),progress:M({method:`$/progress`})},client:{workspaceWorkspaceFolders:j({method:`workspace/workspaceFolders`}).optional(),workspaceConfiguration:j({method:`workspace/configuration`}).optional(),workspaceFoldingRangeRefresh:j({method:`workspace/foldingRange/refresh`}).optional(),windowWorkDoneProgressCreate:j({method:`window/workDoneProgress/create`}).optional(),workspaceSemanticTokensRefresh:j({method:`workspace/semanticTokens/refresh`}).optional(),windowShowDocument:j({method:`window/showDocument`}).optional(),workspaceInlineValueRefresh:j({method:`workspace/inlineValue/refresh`}).optional(),workspaceInlayHintRefresh:j({method:`workspace/inlayHint/refresh`}).optional(),workspaceDiagnosticRefresh:j({method:`workspace/diagnostic/refresh`}).optional(),clientRegisterCapability:j({method:`client/registerCapability`}).optional(),clientUnregisterCapability:j({method:`client/unregisterCapability`}).optional(),windowShowMessageRequest:j({method:`window/showMessageRequest`}).optional(),workspaceCodeLensRefresh:j({method:`workspace/codeLens/refresh`}).optional(),workspaceApplyEdit:j({method:`workspace/applyEdit`}).optional(),windowShowMessage:M({method:`window/showMessage`}),windowLogMessage:M({method:`window/logMessage`}),telemetryEvent:M({method:`telemetry/event`}),textDocumentPublishDiagnostics:M({method:`textDocument/publishDiagnostics`}),logTrace:M({method:`$/logTrace`}),cancelRequest:M({method:`$/cancelRequest`}),progress:M({method:`$/progress`})}});function B(e,t){if(e.textModel!==t)throw Error(`Expected text model to be ${t}, but got ${e.textModel}`);return e}var V=(Pe=class{constructor(){O(this,`_store`,new bt)}dispose(){this._store.dispose()}_register(e){if(e===this)throw Error(`Cannot register a disposable on itself!`);return this._store.add(e)}},O(Pe,`None`,Object.freeze({dispose(){}})),Pe),bt=(Fe=class{constructor(){O(this,`_toDispose`,new Set),O(this,`_isDisposed`,!1)}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){if(this._toDispose.size!==0)try{for(let e of this._toDispose)e.dispose()}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw Error(`Cannot register a disposable on itself!`);return this._isDisposed?Fe.DISABLE_DISPOSED_WARNING||console.warn(Error(`Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!`).stack):this._toDispose.add(e),e}},O(Fe,`DISABLE_DISPOSED_WARNING`,!1),Fe),xt=new Map([[I.Empty,``],[I.QuickFix,`quickfix`],[I.Refactor,`refactor`],[I.RefactorExtract,`refactor.extract`],[I.RefactorInline,`refactor.inline`],[I.RefactorRewrite,`refactor.rewrite`],[I.Source,`source`],[I.SourceOrganizeImports,`source.organizeImports`],[I.SourceFixAll,`source.fixAll`]]);function St(e){if(e)return xt.get(e)??e}var Ct=new Map([[u.CodeActionTriggerType.Invoke,_t.Invoked],[u.CodeActionTriggerType.Auto,_t.Automatic]]);function wt(e){return Ct.get(e)??_t.Invoked}var Tt=new Map([[F.Text,u.CompletionItemKind.Text],[F.Method,u.CompletionItemKind.Method],[F.Function,u.CompletionItemKind.Function],[F.Constructor,u.CompletionItemKind.Constructor],[F.Field,u.CompletionItemKind.Field],[F.Variable,u.CompletionItemKind.Variable],[F.Class,u.CompletionItemKind.Class],[F.Interface,u.CompletionItemKind.Interface],[F.Module,u.CompletionItemKind.Module],[F.Property,u.CompletionItemKind.Property],[F.Unit,u.CompletionItemKind.Unit],[F.Value,u.CompletionItemKind.Value],[F.Enum,u.CompletionItemKind.Enum],[F.Keyword,u.CompletionItemKind.Keyword],[F.Snippet,u.CompletionItemKind.Snippet],[F.Color,u.CompletionItemKind.Color],[F.File,u.CompletionItemKind.File],[F.Reference,u.CompletionItemKind.Reference],[F.Folder,u.CompletionItemKind.Folder],[F.EnumMember,u.CompletionItemKind.EnumMember],[F.Constant,u.CompletionItemKind.Constant],[F.Struct,u.CompletionItemKind.Struct],[F.Event,u.CompletionItemKind.Event],[F.Operator,u.CompletionItemKind.Operator],[F.TypeParameter,u.CompletionItemKind.TypeParameter]]);function Et(e){return e?Tt.get(e)??u.CompletionItemKind.Text:u.CompletionItemKind.Text}var Dt=new Map([[ut.Deprecated,u.CompletionItemTag.Deprecated]]);function Ot(e){return Dt.get(e)}var kt=new Map([[u.CompletionTriggerKind.Invoke,ht.Invoked],[u.CompletionTriggerKind.TriggerCharacter,ht.TriggerCharacter],[u.CompletionTriggerKind.TriggerForIncompleteCompletions,ht.TriggerForIncompleteCompletions]]);function At(e){return kt.get(e)??ht.Invoked}var jt=new Map([[dt.Snippet,u.CompletionItemInsertTextRule.InsertAsSnippet]]);function Mt(e){if(e)return jt.get(e)}var Nt=new Map([[P.File,u.SymbolKind.File],[P.Module,u.SymbolKind.Module],[P.Namespace,u.SymbolKind.Namespace],[P.Package,u.SymbolKind.Package],[P.Class,u.SymbolKind.Class],[P.Method,u.SymbolKind.Method],[P.Property,u.SymbolKind.Property],[P.Field,u.SymbolKind.Field],[P.Constructor,u.SymbolKind.Constructor],[P.Enum,u.SymbolKind.Enum],[P.Interface,u.SymbolKind.Interface],[P.Function,u.SymbolKind.Function],[P.Variable,u.SymbolKind.Variable],[P.Constant,u.SymbolKind.Constant],[P.String,u.SymbolKind.String],[P.Number,u.SymbolKind.Number],[P.Boolean,u.SymbolKind.Boolean],[P.Array,u.SymbolKind.Array],[P.Object,u.SymbolKind.Object],[P.Key,u.SymbolKind.Key],[P.Null,u.SymbolKind.Null],[P.EnumMember,u.SymbolKind.EnumMember],[P.Struct,u.SymbolKind.Struct],[P.Event,u.SymbolKind.Event],[P.Operator,u.SymbolKind.Operator],[P.TypeParameter,u.SymbolKind.TypeParameter]]);function Pt(e){return Nt.get(e)??u.SymbolKind.File}var Ft=new Map([[st.Deprecated,u.SymbolTag.Deprecated]]);function It(e){return Ft.get(e)}var Lt=new Map([[ft.Text,u.DocumentHighlightKind.Text],[ft.Read,u.DocumentHighlightKind.Read],[ft.Write,u.DocumentHighlightKind.Write]]);function Rt(e){return e?Lt.get(e)??u.DocumentHighlightKind.Text:u.DocumentHighlightKind.Text}var zt=new Map([[N.Comment,u.FoldingRangeKind.Comment],[N.Imports,u.FoldingRangeKind.Imports],[N.Region,u.FoldingRangeKind.Region]]);function Bt(e){if(e)return zt.get(e)}var Vt=new Map([[o.Error,L.Error],[o.Warning,L.Warning],[o.Info,L.Information],[o.Hint,L.Hint]]);function Ht(e){return Vt.get(e)??L.Error}var Ut=new Map([[L.Error,o.Error],[L.Warning,o.Warning],[L.Information,o.Info],[L.Hint,o.Hint]]);function Wt(e){return e?Ut.get(e)??o.Error:o.Error}var Gt=new Map([[mt.Unnecessary,p.Unnecessary],[mt.Deprecated,p.Deprecated]]);function Kt(e){return Gt.get(e)}var qt=new Map([[u.SignatureHelpTriggerKind.Invoke,gt.Invoked],[u.SignatureHelpTriggerKind.TriggerCharacter,gt.TriggerCharacter],[u.SignatureHelpTriggerKind.ContentChange,gt.ContentChange]]);function Jt(e){return qt.get(e)??gt.Invoked}function H(e){if(e)return{id:e.command,title:e.title,arguments:e.arguments}}var Yt=new Map([[ct.Type,u.InlayHintKind.Type],[ct.Parameter,u.InlayHintKind.Parameter]]);function Xt(e){return e?Yt.get(e)??u.InlayHintKind.Type:u.InlayHintKind.Type}function U(e,t){if(`targetUri`in e){let n=t.bridge.translateBackRange({uri:e.targetUri},e.targetRange);return{uri:n.textModel.uri,range:n.range,originSelectionRange:e.originSelectionRange?t.bridge.translateBackRange({uri:e.targetUri},e.originSelectionRange).range:void 0,targetSelectionRange:e.targetSelectionRange?t.bridge.translateBackRange({uri:e.targetUri},e.targetSelectionRange).range:void 0}}else{let n=t.bridge.translateBackRange({uri:e.uri},e.range);return{uri:n.textModel.uri,range:n.range}}}function W(e){return!e||e.length===0?{language:`*`}:e.map(e=>`notebook`in e?typeof e.notebook==`string`?{notebookType:e.notebook,language:e.language}:{notebookType:e.notebook.notebookType,language:e.language,pattern:e.notebook.pattern,scheme:e.notebook.scheme}:{language:e.language,pattern:e.pattern,scheme:e.scheme})}function Zt(e,t){if(!t)return!0;let n=e.getLanguageId();if(e.uri.toString(!0),!t||t.length===0)return!0;for(let e of t)if(!(e.language&&e.language!==`*`&&e.language!==n))return!0;return!1}function Qt(e){let t={severity:Wt(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,source:e.source,code:typeof e.code==`string`?e.code:e.code?.toString()};return e.tags&&(t.tags=e.tags.map(e=>Kt(e)).filter(e=>e!==void 0)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(e=>({resource:l.parse(e.location.uri),startLineNumber:e.location.range.start.line+1,startColumn:e.location.range.start.character+1,endLineNumber:e.location.range.end.line+1,endColumn:e.location.range.end.character+1,message:e.message}))),t}var $t=class extends V{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{completion:{dynamicRegistration:!0,contextSupport:!0,completionItemKind:{valueSet:Array.from(Tt.keys())},completionItem:{tagSupport:{valueSet:Array.from(Dt.keys())},commitCharactersSupport:!0,deprecatedSupport:!0,preselectSupport:!0}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(z.textDocumentCompletion,!0,e=>u.registerCompletionItemProvider(W(e.documentSelector),new en(this._connection,e))))}},en=class{constructor(e,t){O(this,`resolveCompletionItem`),this._client=e,this._capabilities=t,t.resolveProvider&&(this.resolveCompletionItem=async(e,t)=>(nn(e,await this._client.server.completionItemResolve(e._lspItem),this._client.bridge,e._translated,e._model),e))}get triggerCharacters(){return this._capabilities.triggerCharacters}async provideCompletionItems(e,t,n,r){let i=this._client.bridge.translate(e,t),a=await this._client.server.textDocumentCompletion({textDocument:i.textDocument,position:i.position,context:n.triggerCharacter?{triggerKind:At(n.triggerKind),triggerCharacter:n.triggerCharacter}:void 0});return a?{suggestions:(Array.isArray(a)?a:a.items).map(n=>({...tn(n,this._client.bridge,i,e,t),_lspItem:n,_translated:i,_model:e}))}:{suggestions:[]}}};function tn(e,t,n,r,i){let a=e.insertText||e.label,o;e.textEdit&&(`range`in e.textEdit?(a=e.textEdit.newText,o=B(t.translateBackRange(n.textDocument,e.textEdit.range),r).range):(a=e.textEdit.newText,o={insert:B(t.translateBackRange(n.textDocument,e.textEdit.insert),r).range,replace:B(t.translateBackRange(n.textDocument,e.textEdit.replace),r).range})),o||=s.fromPositions(i,i);let c={label:e.label,kind:Et(e.kind),insertText:a,sortText:e.sortText,filterText:e.filterText,preselect:e.preselect,commitCharacters:e.commitCharacters,range:o};return nn(c,e,t,n,r),c}function nn(e,t,n,r,i){t.detail!==void 0&&(e.detail=t.detail),t.documentation!==void 0&&(e.documentation=rn(t.documentation)),t.insertTextFormat!==void 0&&(e.insertTextRules=Mt(t.insertTextFormat)),t.tags&&t.tags.length>0&&(e.tags=t.tags.map(Ot).filter(e=>e!==void 0)),t.additionalTextEdits&&t.additionalTextEdits.length>0&&(e.additionalTextEdits=t.additionalTextEdits.map(e=>({range:B(n.translateBackRange(r.textDocument,e.range),i).range,text:e.newText}))),t.command&&(e.command=H(t.command))}function rn(e){if(e)return typeof e==`string`?e:{value:e.value,isTrusted:!0}}var an=class extends V{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{hover:{dynamicRegistration:!0,contentFormat:[pt.Markdown,pt.PlainText]}}})),this._register(this._connection.capabilities.registerCapabilityHandler(z.textDocumentHover,!0,e=>u.registerHoverProvider(W(e.documentSelector),new on(this._connection,e))))}},on=class{constructor(e,t){this._client=e,this._capabilities=t}async provideHover(e,t,n){let r=this._client.bridge.translate(e,t),i=await this._client.server.textDocumentHover({textDocument:r.textDocument,position:r.position});return!i||!i.contents?null:{contents:sn(i.contents),range:i.range?this._client.bridge.translateBackRange(r.textDocument,i.range).range:void 0}}};function sn(e){return Array.isArray(e)?e.map(e=>cn(e)):[cn(e)]}function cn(e){return typeof e==`string`?{value:e,isTrusted:!0}:`kind`in e?{value:e.value,isTrusted:!0}:{value:`\`\`\`${e.language}
5
5
  ${e.value}
@@ -1 +1 @@
1
- import"./rolldown-runtime-QTnfLwEv.js";import{t as e}from"./react-CZI7_Jkm.js";import{t}from"./jsx-runtime-ffCh33zF.js";import{i as n,n as r,r as i}from"./x-DCpy1q13.js";var a=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,o=i,s=(e,t)=>n=>{if(t?.variants==null)return o(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,s=Object.keys(r).map(e=>{let t=n?.[e],o=i?.[e];if(t===null)return null;let s=a(t)||a(o);return r[e][s]}),c=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return o(e,s,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...c}[t]):{...i,...c}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)};e();var c=t(),l=s(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-medium transition-colors duration-150 disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-3.5 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-action text-action-ink hover:bg-action-hover active:opacity-85`,secondary:`bg-elevated text-fg hover:bg-border/70 active:bg-border`,ghost:`text-fg-secondary hover:bg-elevated hover:text-fg active:bg-border/70`,danger:`bg-danger text-ground hover:opacity-90 active:opacity-80`},size:{default:`h-8 px-3 text-sm`,sm:`h-7 px-2 text-xs`,lg:`h-9 px-4 text-sm`,icon:`h-8 w-8`}},defaultVariants:{variant:`default`,size:`default`}});function u({className:e,variant:t,size:i,asChild:a=!1,...o}){return(0,c.jsx)(a?n:`button`,{className:r(l({variant:t,size:i}),e),...o})}export{u as t};
1
+ import"./rolldown-runtime-QTnfLwEv.js";import{t as e}from"./react-CZI7_Jkm.js";import{t}from"./jsx-runtime-By8HlURe.js";import{i as n,n as r,r as i}from"./x-DCpy1q13.js";var a=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,o=i,s=(e,t)=>n=>{if(t?.variants==null)return o(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,s=Object.keys(r).map(e=>{let t=n?.[e],o=i?.[e];if(t===null)return null;let s=a(t)||a(o);return r[e][s]}),c=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return o(e,s,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...c}[t]):{...i,...c}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)};e();var c=t(),l=s(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-medium transition-colors duration-150 disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-3.5 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-action text-action-ink hover:bg-action-hover active:opacity-85`,secondary:`bg-elevated text-fg hover:bg-border/70 active:bg-border`,ghost:`text-fg-secondary hover:bg-elevated hover:text-fg active:bg-border/70`,danger:`bg-danger text-ground hover:opacity-90 active:opacity-80`},size:{default:`h-8 px-3 text-sm`,sm:`h-7 px-2 text-xs`,lg:`h-9 px-4 text-sm`,icon:`h-8 w-8`}},defaultVariants:{variant:`default`,size:`default`}});function u({className:e,variant:t,size:i,asChild:a=!1,...o}){return(0,c.jsx)(a?n:`button`,{className:r(l({variant:t,size:i}),e),...o})}export{u as t};