@ripla/godd-mcp 0.1.3-canary.99 → 1.0.0

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 (114) hide show
  1. package/dist/godd.cjs +197 -160
  2. package/dist/godd.js +682 -260
  3. package/dist/index.js +92 -76
  4. package/notes-api/alembic/env.py +2 -0
  5. package/notes-api/alembic/versions/004_add_comments.py +2 -2
  6. package/notes-api/alembic/versions/005_add_github_username.py +25 -0
  7. package/notes-api/alembic/versions/006_add_check_constraints.py +30 -0
  8. package/notes-api/app/config.py +47 -4
  9. package/notes-api/app/database.py +1 -0
  10. package/notes-api/app/main.py +4 -2
  11. package/notes-api/app/models/comment.py +3 -2
  12. package/notes-api/app/models/session.py +12 -1
  13. package/notes-api/app/models/user.py +5 -1
  14. package/notes-api/app/path_validation.py +44 -0
  15. package/notes-api/app/routers/auth.py +84 -20
  16. package/notes-api/app/routers/collab.py +67 -16
  17. package/notes-api/app/routers/comments.py +48 -24
  18. package/notes-api/app/routers/files.py +200 -30
  19. package/notes-api/app/routers/issues.py +190 -0
  20. package/notes-api/app/routers/pr.py +124 -26
  21. package/notes-api/app/routers/settings.py +31 -1
  22. package/notes-api/app/routers/tree.py +30 -17
  23. package/notes-api/app/routers/upload.py +18 -7
  24. package/notes-api/app/routers/users.py +80 -30
  25. package/notes-api/app/schemas/user.py +3 -0
  26. package/notes-api/app/security.py +78 -3
  27. package/notes-api/app/services/business_date.py +39 -2
  28. package/notes-api/app/services/collab.py +25 -8
  29. package/notes-api/app/services/github.py +182 -66
  30. package/notes-api/app/services/github_app_token.py +78 -0
  31. package/notes-api/app/services/github_issues.py +172 -0
  32. package/notes-api/app/services/github_pr.py +219 -25
  33. package/notes-api/app/services/pr_chain.py +309 -23
  34. package/notes-api/app/startup.py +11 -25
  35. package/notes-api/pyproject.toml +1 -1
  36. package/notes-api/tests/test_auth.py +66 -2
  37. package/notes-api/tests/test_business_date.py +57 -1
  38. package/notes-api/tests/test_collab.py +55 -2
  39. package/notes-api/tests/test_comments.py +130 -2
  40. package/notes-api/tests/test_config_warnings.py +74 -0
  41. package/notes-api/tests/test_files.py +417 -4
  42. package/notes-api/tests/test_github_app_token.py +92 -0
  43. package/notes-api/tests/test_github_service.py +72 -1
  44. package/notes-api/tests/test_issues.py +226 -0
  45. package/notes-api/tests/test_path_validation.py +60 -0
  46. package/notes-api/tests/test_pr.py +70 -0
  47. package/notes-api/tests/test_pr_chain.py +506 -5
  48. package/notes-api/tests/test_security.py +100 -1
  49. package/notes-api/tests/test_settings.py +44 -0
  50. package/notes-api/tests/test_tree.py +161 -5
  51. package/notes-api/tests/test_upload.py +12 -0
  52. package/notes-api/tests/test_users.py +26 -1
  53. package/notes-app/docker/Dockerfile.e2e +14 -0
  54. package/notes-app/e2e/file-tree.spec.ts +29 -0
  55. package/notes-app/e2e/file-view.spec.ts +24 -0
  56. package/notes-app/e2e/global-setup.ts +21 -0
  57. package/notes-app/e2e/login.spec.ts +32 -0
  58. package/notes-app/package-lock.json +7200 -1248
  59. package/notes-app/package.json +9 -1
  60. package/notes-app/playwright.config.ts +33 -0
  61. package/notes-app/pnpm-lock.yaml +53 -0
  62. package/notes-app/src/App.tsx +36 -32
  63. package/notes-app/src/components/BranchSelectorModal.tsx +171 -0
  64. package/notes-app/src/components/CodeBlockView.test.tsx +5 -8
  65. package/notes-app/src/components/CodeBlockView.tsx +56 -43
  66. package/notes-app/src/components/DrawioEditor.tsx +91 -0
  67. package/notes-app/src/components/DrawioViewer.tsx +51 -0
  68. package/notes-app/src/components/ErrorBoundary.tsx +2 -1
  69. package/notes-app/src/components/FileContentView.tsx +210 -0
  70. package/notes-app/src/components/FileContextMenu.test.tsx +11 -2
  71. package/notes-app/src/components/FileContextMenu.tsx +8 -5
  72. package/notes-app/src/components/FileDialogs.test.tsx +55 -1
  73. package/notes-app/src/components/FileDialogs.tsx +113 -4
  74. package/notes-app/src/components/IssueDetailView.tsx +301 -0
  75. package/notes-app/src/components/IssueList.tsx +148 -0
  76. package/notes-app/src/components/MarkdownEditor.tsx +23 -14
  77. package/notes-app/src/components/SaveStatusIndicator.test.tsx +4 -4
  78. package/notes-app/src/components/SaveStatusIndicator.tsx +4 -3
  79. package/notes-app/src/components/SpreadsheetEditor.tsx +114 -3
  80. package/notes-app/src/components/ToastContainer.tsx +9 -6
  81. package/notes-app/src/components/TreeNode.tsx +147 -0
  82. package/notes-app/src/hooks/useAutoSave.ts +12 -5
  83. package/notes-app/src/hooks/useCollaboration.ts +78 -54
  84. package/notes-app/src/hooks/useEditSession.test.ts +1 -0
  85. package/notes-app/src/hooks/useEditSession.ts +54 -8
  86. package/notes-app/src/lib/api.test.ts +26 -4
  87. package/notes-app/src/lib/api.ts +166 -9
  88. package/notes-app/src/lib/csv-utils.test.ts +116 -2
  89. package/notes-app/src/lib/csv-utils.ts +110 -9
  90. package/notes-app/src/lib/mermaid-render.ts +61 -0
  91. package/notes-app/src/lib/tree-utils.ts +25 -0
  92. package/notes-app/src/lib/user-colors.ts +12 -0
  93. package/notes-app/src/lib/xlsx-utils.ts +9 -3
  94. package/notes-app/src/pages/LoginPage.tsx +4 -1
  95. package/notes-app/src/pages/MainPage.insertChildEntry.test.ts +88 -0
  96. package/notes-app/src/pages/MainPage.tsx +447 -817
  97. package/notes-app/src/pages/SettingsPage.test.tsx +14 -6
  98. package/notes-app/src/pages/SettingsPage.tsx +8 -3
  99. package/notes-app/src/pages/UserManagementPage.test.tsx +1 -1
  100. package/notes-app/src/pages/UserManagementPage.tsx +3 -2
  101. package/notes-app/src/types.ts +27 -0
  102. package/notes-app/vite.config.ts +11 -0
  103. package/package.json +1 -1
  104. package/templates/prompts/docs-init.hbs +24 -6
  105. package/templates/prompts/notes-deploy.hbs +91 -35
  106. package/templates/terraform/azure/main.tf.hbs +4 -0
  107. package/templates/terraform/gcp/main.tf.hbs +4 -0
  108. package/notes-app/src/components/CommentPanel.tsx +0 -310
  109. package/notes-app/src/components/EditToolbar.test.tsx +0 -188
  110. package/notes-app/src/components/EditToolbar.tsx +0 -196
  111. package/notes-app/src/components/FileInfoPanel.test.tsx +0 -118
  112. package/notes-app/src/components/FileInfoPanel.tsx +0 -234
  113. package/notes-app/src/hooks/useComments.test.tsx +0 -119
  114. package/notes-app/src/hooks/useComments.ts +0 -148
package/dist/godd.cjs CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";var eP=Object.create;var Zu=Object.defineProperty;var tP=Object.getOwnPropertyDescriptor;var rP=Object.getOwnPropertyNames;var nP=Object.getPrototypeOf,oP=Object.prototype.hasOwnProperty;var _=(e,t)=>()=>(e&&(t=e(e=0)),t);var S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zr=(e,t)=>{for(var r in t)Zu(e,r,{get:t[r],enumerable:!0})},iP=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of rP(t))!oP.call(e,o)&&o!==r&&Zu(e,o,{get:()=>t[o],enumerable:!(n=tP(t,o))||n.enumerable});return e};var ft=(e,t,r)=>(r=e!=null?eP(nP(e)):{},iP(t||!e||!e.__esModule?Zu(r,"default",{value:e,enumerable:!0}):r,e));var ee,qu,I,ir,ai=_(()=>{(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(ee||(ee={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(qu||(qu={}));I=ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ir=e=>{switch(typeof e){case"undefined":return I.undefined;case"string":return I.string;case"number":return Number.isNaN(e)?I.nan:I.number;case"boolean":return I.boolean;case"function":return I.function;case"bigint":return I.bigint;case"symbol":return I.symbol;case"object":return Array.isArray(e)?I.array:e===null?I.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?I.promise:typeof Map<"u"&&e instanceof Map?I.map:typeof Set<"u"&&e instanceof Set?I.set:typeof Date<"u"&&e instanceof Date?I.date:I.object;default:return I.unknown}}});var $,sP,ht,Ds=_(()=>{ai();$=ee.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),sP=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ht=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return o(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];r[i]=r[i]||[],r[i].push(t(o))}else n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};ht.create=e=>new ht(e)});var aP,br,Fu=_(()=>{Ds();ai();aP=(e,t)=>{let r;switch(e.code){case $.invalid_type:e.received===I.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case $.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ee.jsonStringifyReplacer)}`;break;case $.unrecognized_keys:r=`Unrecognized key(s) in object: ${ee.joinValues(e.keys,", ")}`;break;case $.invalid_union:r="Invalid input";break;case $.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ee.joinValues(e.options)}`;break;case $.invalid_enum_value:r=`Invalid enum value. Expected ${ee.joinValues(e.options)}, received '${e.received}'`;break;case $.invalid_arguments:r="Invalid function arguments";break;case $.invalid_return_type:r="Invalid function return type";break;case $.invalid_date:r="Invalid date";break;case $.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:ee.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case $.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case $.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case $.custom:r="Invalid input";break;case $.invalid_intersection_types:r="Intersection results could not be merged";break;case $.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case $.not_finite:r="Number must be finite";break;default:r=t.defaultError,ee.assertNever(e)}return{message:r}},br=aP});function cP(e){jg=e}function so(){return jg}var jg,js=_(()=>{Fu();jg=br});function E(e,t){let r=so(),n=ci({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===br?void 0:br].filter(o=>!!o)});e.common.issues.push(n)}var ci,uP,qe,Z,gn,Qe,Ms,Ls,qr,ao,Uu=_(()=>{js();Fu();ci=e=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}},uP=[];qe=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let o of r){if(o.status==="aborted")return Z;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let o of r){let i=await o.key,s=await o.value;n.push({key:i,value:s})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let o of r){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return Z;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(n[i.value]=s.value)}return{status:t.value,value:n}}},Z=Object.freeze({status:"aborted"}),gn=e=>({status:"dirty",value:e}),Qe=e=>({status:"valid",value:e}),Ms=e=>e.status==="aborted",Ls=e=>e.status==="dirty",qr=e=>e.status==="valid",ao=e=>typeof Promise<"u"&&e instanceof Promise});var Mg=_(()=>{});var A,Lg=_(()=>{(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(A||(A={}))});function V(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:o}}function Ug(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function TP(e){return new RegExp(`^${Ug(e)}$`)}function Bg(e){let t=`${Fg}T${Ug(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function PP(e,t){return!!((t==="v4"||!t)&&vP.test(e)||(t==="v6"||!t)&&xP.test(e))}function CP(e,t){if(!mP.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function EP(e,t){return!!((t==="v4"||!t)&&bP.test(e)||(t==="v6"||!t)&&wP.test(e))}function IP(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}function co(e){if(e instanceof gt){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=mt.create(co(n))}return new gt({...e._def,shape:()=>t})}else return e instanceof kr?new kr({...e._def,type:co(e.element)}):e instanceof mt?mt.create(co(e.unwrap())):e instanceof ar?ar.create(co(e.unwrap())):e instanceof sr?sr.create(e.items.map(t=>co(t))):e}function Vu(e,t){let r=ir(e),n=ir(t);if(e===t)return{valid:!0,data:e};if(r===I.object&&n===I.object){let o=ee.objectKeys(t),i=ee.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=Vu(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===I.array&&n===I.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=Vu(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===I.date&&n===I.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function Vg(e,t){return new Pn({values:e,typeName:P.ZodEnum,...V(t)})}function qg(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function Hg(e,t={},r){return e?Ur.create().superRefine((n,o)=>{let i=e(n);if(i instanceof Promise)return i.then(s=>{if(!s){let a=qg(t,n),c=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=qg(t,n),a=s.fatal??r??!0;o.addIssue({code:"custom",...s,fatal:a})}}):Ur.create()}var Rt,Zg,W,lP,pP,dP,fP,hP,mP,gP,yP,_P,Bu,vP,bP,xP,wP,kP,SP,Fg,$P,Fr,yn,_n,vn,bn,uo,xn,wn,Ur,wr,Vt,lo,kr,gt,kn,xr,Zs,Sn,sr,qs,po,fo,Fs,$n,Tn,Pn,Cn,Br,At,mt,ar,En,In,ho,zP,ui,li,zn,RP,P,AP,Gg,Wg,OP,NP,Kg,DP,jP,MP,LP,ZP,qP,FP,UP,BP,Hu,VP,HP,GP,WP,KP,JP,YP,QP,XP,eC,tC,rC,nC,oC,iC,sC,aC,cC,uC,lC,pC,dC,fC,hC,Jg=_(()=>{Ds();js();Lg();Uu();ai();Rt=class{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Zg=(e,t)=>{if(qr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new ht(e.common.issues);return this._error=r,this._error}}};W=class{get description(){return this._def.description}_getType(t){return ir(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:ir(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qe,ctx:{common:t.parent.common,data:t.data,parsedType:ir(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(ao(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ir(t)},o=this._parseSync({data:t,path:n.path,parent:n});return Zg(n,o)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ir(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return qr(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>qr(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ir(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(ao(o)?o:Promise.resolve(o));return Zg(n,i)}refine(t,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,i)=>{let s=t(o),a=()=>i.addIssue({code:$.custom,...n(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new At({schema:this,typeName:P.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return mt.create(this,this._def)}nullable(){return ar.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return kr.create(this)}promise(){return Br.create(this,this._def)}or(t){return kn.create([this,t],this._def)}and(t){return Sn.create(this,t,this._def)}transform(t){return new At({...V(this._def),schema:this,typeName:P.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new En({...V(this._def),innerType:this,defaultValue:r,typeName:P.ZodDefault})}brand(){return new ui({typeName:P.ZodBranded,type:this,...V(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new In({...V(this._def),innerType:this,catchValue:r,typeName:P.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return li.create(this,t)}readonly(){return zn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},lP=/^c[^\s-]{8,}$/i,pP=/^[0-9a-z]+$/,dP=/^[0-9A-HJKMNP-TV-Z]{26}$/i,fP=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,hP=/^[a-z0-9_-]{21}$/i,mP=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gP=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,yP=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_P="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",vP=/^(?:(?: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])$/,bP=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,xP=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,wP=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kP=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,SP=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Fg="((\\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])))",$P=new RegExp(`^${Fg}$`);Fr=class e extends W{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==I.string){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.string,received:i.parsedType}),Z}let n=new qe,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?E(o,{code:$.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&E(o,{code:$.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")yP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"email",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Bu||(Bu=new RegExp(_P,"u")),Bu.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"emoji",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")fP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"uuid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")hP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"nanoid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")lP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cuid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")pP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cuid2",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")dP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"ulid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),E(o,{validation:"url",code:$.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"regex",code:$.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Bg(i).test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?$P.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?TP(i).test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?gP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"duration",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?PP(t.data,i.version)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"ip",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?CP(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"jwt",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?EP(t.data,i.version)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cidr",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?kP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"base64",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?SP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"base64url",code:$.invalid_string,message:i.message}),n.dirty()):ee.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:$.invalid_string,...A.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...A.errToObj(t)})}url(t){return this._addCheck({kind:"url",...A.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...A.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...A.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...A.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...A.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...A.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...A.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...A.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...A.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...A.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...A.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...A.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...A.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...A.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...A.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...A.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...A.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...A.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...A.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...A.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...A.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...A.errToObj(r)})}nonempty(t){return this.min(1,A.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Fr.create=e=>new Fr({checks:[],typeName:P.ZodString,coerce:e?.coerce??!1,...V(e)});yn=class e extends W{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==I.number){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.number,received:i.parsedType}),Z}let n,o=new qe;for(let i of this._def.checks)i.kind==="int"?ee.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),E(n,{code:$.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?IP(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),E(n,{code:$.not_finite,message:i.message}),o.dirty()):ee.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,A.toString(r))}gt(t,r){return this.setLimit("min",t,!1,A.toString(r))}lte(t,r){return this.setLimit("max",t,!0,A.toString(r))}lt(t,r){return this.setLimit("max",t,!1,A.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:A.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:A.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:A.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:A.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:A.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:A.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:A.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:A.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:A.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:A.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ee.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};yn.create=e=>new yn({checks:[],typeName:P.ZodNumber,coerce:e?.coerce||!1,...V(e)});_n=class e extends W{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==I.bigint)return this._getInvalidInput(t);let n,o=new qe;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):ee.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return E(r,{code:$.invalid_type,expected:I.bigint,received:r.parsedType}),Z}gte(t,r){return this.setLimit("min",t,!0,A.toString(r))}gt(t,r){return this.setLimit("min",t,!1,A.toString(r))}lte(t,r){return this.setLimit("max",t,!0,A.toString(r))}lt(t,r){return this.setLimit("max",t,!1,A.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:A.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:A.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:A.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:A.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:A.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:A.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};_n.create=e=>new _n({checks:[],typeName:P.ZodBigInt,coerce:e?.coerce??!1,...V(e)});vn=class extends W{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==I.boolean){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.boolean,received:n.parsedType}),Z}return Qe(t.data)}};vn.create=e=>new vn({typeName:P.ZodBoolean,coerce:e?.coerce||!1,...V(e)});bn=class e extends W{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==I.date){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.date,received:i.parsedType}),Z}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_date}),Z}let n=new qe,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):ee.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:A.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:A.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};bn.create=e=>new bn({checks:[],coerce:e?.coerce||!1,typeName:P.ZodDate,...V(e)});uo=class extends W{_parse(t){if(this._getType(t)!==I.symbol){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.symbol,received:n.parsedType}),Z}return Qe(t.data)}};uo.create=e=>new uo({typeName:P.ZodSymbol,...V(e)});xn=class extends W{_parse(t){if(this._getType(t)!==I.undefined){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.undefined,received:n.parsedType}),Z}return Qe(t.data)}};xn.create=e=>new xn({typeName:P.ZodUndefined,...V(e)});wn=class extends W{_parse(t){if(this._getType(t)!==I.null){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.null,received:n.parsedType}),Z}return Qe(t.data)}};wn.create=e=>new wn({typeName:P.ZodNull,...V(e)});Ur=class extends W{constructor(){super(...arguments),this._any=!0}_parse(t){return Qe(t.data)}};Ur.create=e=>new Ur({typeName:P.ZodAny,...V(e)});wr=class extends W{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Qe(t.data)}};wr.create=e=>new wr({typeName:P.ZodUnknown,...V(e)});Vt=class extends W{_parse(t){let r=this._getOrReturnCtx(t);return E(r,{code:$.invalid_type,expected:I.never,received:r.parsedType}),Z}};Vt.create=e=>new Vt({typeName:P.ZodNever,...V(e)});lo=class extends W{_parse(t){if(this._getType(t)!==I.undefined){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.void,received:n.parsedType}),Z}return Qe(t.data)}};lo.create=e=>new lo({typeName:P.ZodVoid,...V(e)});kr=class e extends W{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==I.array)return E(r,{code:$.invalid_type,expected:I.array,received:r.parsedType}),Z;if(o.exactLength!==null){let s=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(s||a)&&(E(r,{code:s?$.too_big:$.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(E(r,{code:$.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(E(r,{code:$.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>o.type._parseAsync(new Rt(r,s,r.path,a)))).then(s=>qe.mergeArray(n,s));let i=[...r.data].map((s,a)=>o.type._parseSync(new Rt(r,s,r.path,a)));return qe.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:A.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:A.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:A.toString(r)}})}nonempty(t){return this.min(1,t)}};kr.create=(e,t)=>new kr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:P.ZodArray,...V(t)});gt=class e extends W{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=ee.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==I.object){let u=this._getOrReturnCtx(t);return E(u,{code:$.invalid_type,expected:I.object,received:u.parsedType}),Z}let{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Vt&&this._def.unknownKeys==="strip"))for(let u in o.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let p=i[u],l=o.data[u];c.push({key:{status:"valid",value:u},value:p._parse(new Rt(o,l,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof Vt){let u=this._def.unknownKeys;if(u==="passthrough")for(let p of a)c.push({key:{status:"valid",value:p},value:{status:"valid",value:o.data[p]}});else if(u==="strict")a.length>0&&(E(o,{code:$.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let p of a){let l=o.data[p];c.push({key:{status:"valid",value:p},value:u._parse(new Rt(o,l,o.path,p)),alwaysSet:p in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let u=[];for(let p of c){let l=await p.key,d=await p.value;u.push({key:l,value:d,alwaysSet:p.alwaysSet})}return u}).then(u=>qe.mergeObjectSync(n,u)):qe.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return A.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:A.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:P.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of ee.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of ee.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return co(this)}partial(t){let r={};for(let n of ee.objectKeys(this.shape)){let o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of ee.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof mt;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return Vg(ee.objectKeys(this.shape))}};gt.create=(e,t)=>new gt({shape:()=>e,unknownKeys:"strip",catchall:Vt.create(),typeName:P.ZodObject,...V(t)});gt.strictCreate=(e,t)=>new gt({shape:()=>e,unknownKeys:"strict",catchall:Vt.create(),typeName:P.ZodObject,...V(t)});gt.lazycreate=(e,t)=>new gt({shape:e,unknownKeys:"strip",catchall:Vt.create(),typeName:P.ZodObject,...V(t)});kn=class extends W{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new ht(a.ctx.common.issues));return E(r,{code:$.invalid_union,unionErrors:s}),Z}if(r.common.async)return Promise.all(n.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},p=c._parseSync({data:r.data,path:r.path,parent:u});if(p.status==="valid")return p;p.status==="dirty"&&!i&&(i={result:p,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new ht(c));return E(r,{code:$.invalid_union,unionErrors:a}),Z}}get options(){return this._def.options}};kn.create=(e,t)=>new kn({options:e,typeName:P.ZodUnion,...V(t)});xr=e=>e instanceof $n?xr(e.schema):e instanceof At?xr(e.innerType()):e instanceof Tn?[e.value]:e instanceof Pn?e.options:e instanceof Cn?ee.objectValues(e.enum):e instanceof En?xr(e._def.innerType):e instanceof xn?[void 0]:e instanceof wn?[null]:e instanceof mt?[void 0,...xr(e.unwrap())]:e instanceof ar?[null,...xr(e.unwrap())]:e instanceof ui||e instanceof zn?xr(e.unwrap()):e instanceof In?xr(e._def.innerType):[],Zs=class e extends W{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.object)return E(r,{code:$.invalid_type,expected:I.object,received:r.parsedType}),Z;let n=this.discriminator,o=r.data[n],i=this.optionsMap.get(o);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(E(r,{code:$.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Z)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let o=new Map;for(let i of r){let s=xr(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new e({typeName:P.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...V(n)})}};Sn=class extends W{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=(i,s)=>{if(Ms(i)||Ms(s))return Z;let a=Vu(i.value,s.value);return a.valid?((Ls(i)||Ls(s))&&r.dirty(),{status:r.value,value:a.data}):(E(n,{code:$.invalid_intersection_types}),Z)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Sn.create=(e,t,r)=>new Sn({left:e,right:t,typeName:P.ZodIntersection,...V(r)});sr=class e extends W{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.array)return E(n,{code:$.invalid_type,expected:I.array,received:n.parsedType}),Z;if(n.data.length<this._def.items.length)return E(n,{code:$.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Z;!this._def.rest&&n.data.length>this._def.items.length&&(E(n,{code:$.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Rt(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(i).then(s=>qe.mergeArray(r,s)):qe.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};sr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new sr({items:e,typeName:P.ZodTuple,rest:null,...V(t)})};qs=class e extends W{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.object)return E(n,{code:$.invalid_type,expected:I.object,received:n.parsedType}),Z;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in n.data)o.push({key:i._parse(new Rt(n,a,n.path,a)),value:s._parse(new Rt(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?qe.mergeObjectAsync(r,o):qe.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof W?new e({keyType:t,valueType:r,typeName:P.ZodRecord,...V(n)}):new e({keyType:Fr.create(),valueType:t,typeName:P.ZodRecord,...V(r)})}},po=class extends W{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.map)return E(n,{code:$.invalid_type,expected:I.map,received:n.parsedType}),Z;let o=this._def.keyType,i=this._def.valueType,s=[...n.data.entries()].map(([a,c],u)=>({key:o._parse(new Rt(n,a,n.path,[u,"key"])),value:i._parse(new Rt(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,p=await c.value;if(u.status==="aborted"||p.status==="aborted")return Z;(u.status==="dirty"||p.status==="dirty")&&r.dirty(),a.set(u.value,p.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of s){let u=c.key,p=c.value;if(u.status==="aborted"||p.status==="aborted")return Z;(u.status==="dirty"||p.status==="dirty")&&r.dirty(),a.set(u.value,p.value)}return{status:r.value,value:a}}}};po.create=(e,t,r)=>new po({valueType:t,keyType:e,typeName:P.ZodMap,...V(r)});fo=class e extends W{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.set)return E(n,{code:$.invalid_type,expected:I.set,received:n.parsedType}),Z;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(E(n,{code:$.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(E(n,{code:$.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let p of c){if(p.status==="aborted")return Z;p.status==="dirty"&&r.dirty(),u.add(p.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>i._parse(new Rt(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:A.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:A.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};fo.create=(e,t)=>new fo({valueType:e,minSize:null,maxSize:null,typeName:P.ZodSet,...V(t)});Fs=class e extends W{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.function)return E(r,{code:$.invalid_type,expected:I.function,received:r.parsedType}),Z;function n(a,c){return ci({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,so(),br].filter(u=>!!u),issueData:{code:$.invalid_arguments,argumentsError:c}})}function o(a,c){return ci({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,so(),br].filter(u=>!!u),issueData:{code:$.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Br){let a=this;return Qe(async function(...c){let u=new ht([]),p=await a._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(n(c,f)),u}),l=await Reflect.apply(s,this,p);return await a._def.returns._def.type.parseAsync(l,i).catch(f=>{throw u.addIssue(o(l,f)),u})})}else{let a=this;return Qe(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new ht([n(c,u.error)]);let p=Reflect.apply(s,this,u.data),l=a._def.returns.safeParse(p,i);if(!l.success)throw new ht([o(p,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:sr.create(t).rest(wr.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||sr.create([]).rest(wr.create()),returns:r||wr.create(),typeName:P.ZodFunction,...V(n)})}},$n=class extends W{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};$n.create=(e,t)=>new $n({getter:e,typeName:P.ZodLazy,...V(t)});Tn=class extends W{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return E(r,{received:r.data,code:$.invalid_literal,expected:this._def.value}),Z}return{status:"valid",value:t.data}}get value(){return this._def.value}};Tn.create=(e,t)=>new Tn({value:e,typeName:P.ZodLiteral,...V(t)});Pn=class e extends W{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return E(r,{expected:ee.joinValues(n),received:r.parsedType,code:$.invalid_type}),Z}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return E(r,{received:r.data,code:$.invalid_enum_value,options:n}),Z}return Qe(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};Pn.create=Vg;Cn=class extends W{_parse(t){let r=ee.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==I.string&&n.parsedType!==I.number){let o=ee.objectValues(r);return E(n,{expected:ee.joinValues(o),received:n.parsedType,code:$.invalid_type}),Z}if(this._cache||(this._cache=new Set(ee.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=ee.objectValues(r);return E(n,{received:n.data,code:$.invalid_enum_value,options:o}),Z}return Qe(t.data)}get enum(){return this._def.values}};Cn.create=(e,t)=>new Cn({values:e,typeName:P.ZodNativeEnum,...V(t)});Br=class extends W{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.promise&&r.common.async===!1)return E(r,{code:$.invalid_type,expected:I.promise,received:r.parsedType}),Z;let n=r.parsedType===I.promise?r.data:Promise.resolve(r.data);return Qe(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Br.create=(e,t)=>new Br({type:e,typeName:P.ZodPromise,...V(t)});At=class extends W{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{E(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(n.data,i);if(n.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return Z;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?Z:c.status==="dirty"?gn(c.value):r.value==="dirty"?gn(c.value):c});{if(r.value==="aborted")return Z;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?Z:a.status==="dirty"?gn(a.value):r.value==="dirty"?gn(a.value):a}}if(o.type==="refinement"){let s=a=>{let c=o.refinement(a,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Z:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Z:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(o.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!qr(s))return Z;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>qr(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:r.value,value:a})):Z);ee.assertNever(o)}};At.create=(e,t,r)=>new At({schema:e,typeName:P.ZodEffects,effect:t,...V(r)});At.createWithPreprocess=(e,t,r)=>new At({schema:t,effect:{type:"preprocess",transform:e},typeName:P.ZodEffects,...V(r)});mt=class extends W{_parse(t){return this._getType(t)===I.undefined?Qe(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};mt.create=(e,t)=>new mt({innerType:e,typeName:P.ZodOptional,...V(t)});ar=class extends W{_parse(t){return this._getType(t)===I.null?Qe(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ar.create=(e,t)=>new ar({innerType:e,typeName:P.ZodNullable,...V(t)});En=class extends W{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===I.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};En.create=(e,t)=>new En({innerType:e,typeName:P.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...V(t)});In=class extends W{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return ao(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ht(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ht(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};In.create=(e,t)=>new In({innerType:e,typeName:P.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...V(t)});ho=class extends W{_parse(t){if(this._getType(t)!==I.nan){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.nan,received:n.parsedType}),Z}return{status:"valid",value:t.data}}};ho.create=e=>new ho({typeName:P.ZodNaN,...V(e)});zP=Symbol("zod_brand"),ui=class extends W{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},li=class e extends W{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Z:i.status==="dirty"?(r.dirty(),gn(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Z:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:P.ZodPipeline})}},zn=class extends W{_parse(t){let r=this._def.innerType._parse(t),n=o=>(qr(o)&&(o.value=Object.freeze(o.value)),o);return ao(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};zn.create=(e,t)=>new zn({innerType:e,typeName:P.ZodReadonly,...V(t)});RP={object:gt.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(P||(P={}));AP=(e,t={message:`Input not instance of ${e.name}`})=>Hg(r=>r instanceof e,t),Gg=Fr.create,Wg=yn.create,OP=ho.create,NP=_n.create,Kg=vn.create,DP=bn.create,jP=uo.create,MP=xn.create,LP=wn.create,ZP=Ur.create,qP=wr.create,FP=Vt.create,UP=lo.create,BP=kr.create,Hu=gt.create,VP=gt.strictCreate,HP=kn.create,GP=Zs.create,WP=Sn.create,KP=sr.create,JP=qs.create,YP=po.create,QP=fo.create,XP=Fs.create,eC=$n.create,tC=Tn.create,rC=Pn.create,nC=Cn.create,oC=Br.create,iC=At.create,sC=mt.create,aC=ar.create,cC=At.createWithPreprocess,uC=li.create,lC=()=>Gg().optional(),pC=()=>Wg().optional(),dC=()=>Kg().optional(),fC={string:(e=>Fr.create({...e,coerce:!0})),number:(e=>yn.create({...e,coerce:!0})),boolean:(e=>vn.create({...e,coerce:!0})),bigint:(e=>_n.create({...e,coerce:!0})),date:(e=>bn.create({...e,coerce:!0}))},hC=Z});var g={};Zr(g,{BRAND:()=>zP,DIRTY:()=>gn,EMPTY_PATH:()=>uP,INVALID:()=>Z,NEVER:()=>hC,OK:()=>Qe,ParseStatus:()=>qe,Schema:()=>W,ZodAny:()=>Ur,ZodArray:()=>kr,ZodBigInt:()=>_n,ZodBoolean:()=>vn,ZodBranded:()=>ui,ZodCatch:()=>In,ZodDate:()=>bn,ZodDefault:()=>En,ZodDiscriminatedUnion:()=>Zs,ZodEffects:()=>At,ZodEnum:()=>Pn,ZodError:()=>ht,ZodFirstPartyTypeKind:()=>P,ZodFunction:()=>Fs,ZodIntersection:()=>Sn,ZodIssueCode:()=>$,ZodLazy:()=>$n,ZodLiteral:()=>Tn,ZodMap:()=>po,ZodNaN:()=>ho,ZodNativeEnum:()=>Cn,ZodNever:()=>Vt,ZodNull:()=>wn,ZodNullable:()=>ar,ZodNumber:()=>yn,ZodObject:()=>gt,ZodOptional:()=>mt,ZodParsedType:()=>I,ZodPipeline:()=>li,ZodPromise:()=>Br,ZodReadonly:()=>zn,ZodRecord:()=>qs,ZodSchema:()=>W,ZodSet:()=>fo,ZodString:()=>Fr,ZodSymbol:()=>uo,ZodTransformer:()=>At,ZodTuple:()=>sr,ZodType:()=>W,ZodUndefined:()=>xn,ZodUnion:()=>kn,ZodUnknown:()=>wr,ZodVoid:()=>lo,addIssueToContext:()=>E,any:()=>ZP,array:()=>BP,bigint:()=>NP,boolean:()=>Kg,coerce:()=>fC,custom:()=>Hg,date:()=>DP,datetimeRegex:()=>Bg,defaultErrorMap:()=>br,discriminatedUnion:()=>GP,effect:()=>iC,enum:()=>rC,function:()=>XP,getErrorMap:()=>so,getParsedType:()=>ir,instanceof:()=>AP,intersection:()=>WP,isAborted:()=>Ms,isAsync:()=>ao,isDirty:()=>Ls,isValid:()=>qr,late:()=>RP,lazy:()=>eC,literal:()=>tC,makeIssue:()=>ci,map:()=>YP,nan:()=>OP,nativeEnum:()=>nC,never:()=>FP,null:()=>LP,nullable:()=>aC,number:()=>Wg,object:()=>Hu,objectUtil:()=>qu,oboolean:()=>dC,onumber:()=>pC,optional:()=>sC,ostring:()=>lC,pipeline:()=>uC,preprocess:()=>cC,promise:()=>oC,quotelessJson:()=>sP,record:()=>JP,set:()=>QP,setErrorMap:()=>cP,strictObject:()=>VP,string:()=>Gg,symbol:()=>jP,transformer:()=>iC,tuple:()=>KP,undefined:()=>MP,union:()=>HP,unknown:()=>qP,util:()=>ee,void:()=>UP});var Us=_(()=>{js();Uu();Mg();ai();Jg();Ds()});var pi=_(()=>{Us()});function w(e,t,r){function n(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(let p in s.prototype)p in a||Object.defineProperty(a,p,{value:s.prototype[p].bind(a)});a._zod.constr=s,a._zod.def=c}let o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=r?.Parent?new i:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let p of u._zod.deferred)p();return u}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}function $t(e){return e&&Object.assign(Bs,e),Bs}var gC,yC,Sr,Bs,mo=_(()=>{gC=Object.freeze({status:"aborted"});yC=Symbol("zod_brand"),Sr=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Bs={}});var ne={};Zr(ne,{BIGINT_FORMAT_RANGES:()=>Qg,Class:()=>Wu,NUMBER_FORMAT_RANGES:()=>tl,aborted:()=>An,allowsEval:()=>Qu,assert:()=>wC,assertEqual:()=>_C,assertIs:()=>bC,assertNever:()=>xC,assertNotEqual:()=>vC,assignProp:()=>Yu,cached:()=>hi,captureStackTrace:()=>Hs,cleanEnum:()=>NC,cleanRegex:()=>gi,clone:()=>Tt,createTransparentProxy:()=>CC,defineLazy:()=>ye,esc:()=>Rn,escapeRegex:()=>Vr,extend:()=>zC,finalizeIssue:()=>Ht,floatSafeRemainder:()=>Ju,getElementAtPath:()=>kC,getEnumValues:()=>fi,getLengthableOrigin:()=>yi,getParsedType:()=>PC,getSizableOrigin:()=>Xg,isObject:()=>go,isPlainObject:()=>yo,issue:()=>rl,joinValues:()=>Vs,jsonStringifyReplacer:()=>Ku,merge:()=>RC,normalizeParams:()=>q,nullish:()=>mi,numKeys:()=>TC,omit:()=>IC,optionalKeys:()=>el,partial:()=>AC,pick:()=>EC,prefixIssues:()=>cr,primitiveTypes:()=>Yg,promiseAllObject:()=>SC,propertyKeyTypes:()=>Xu,randomString:()=>$C,required:()=>OC,stringifyPrimitive:()=>Gs,unwrapMessage:()=>di});function _C(e){return e}function vC(e){return e}function bC(e){}function xC(e){throw new Error}function wC(e){}function fi(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function Vs(e,t="|"){return e.map(r=>Gs(r)).join(t)}function Ku(e,t){return typeof t=="bigint"?t.toString():t}function hi(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function mi(e){return e==null}function gi(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Ju(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}function ye(e,t,r){Object.defineProperty(e,t,{get(){{let o=r();return e[t]=o,o}throw new Error("cached value already set")},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Yu(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function kC(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function SC(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=n[i];return o})}function $C(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function Rn(e){return JSON.stringify(e)}function go(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function yo(e){if(go(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let r=t.prototype;return!(go(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function TC(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function Vr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Tt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function q(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 new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function CC(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,i){return t??(t=e()),Reflect.set(t,n,o,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function Gs(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function el(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function EC(e,t){let r={},n=e._zod.def;for(let o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(r[o]=n.shape[o])}return Tt(e,{...e._zod.def,shape:r,checks:[]})}function IC(e,t){let r={...e._zod.def.shape},n=e._zod.def;for(let o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete r[o]}return Tt(e,{...e._zod.def,shape:r,checks:[]})}function zC(e,t){if(!yo(t))throw new Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return Yu(this,"shape",n),n},checks:[]};return Tt(e,r)}function RC(e,t){return Tt(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return Yu(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function AC(e,t,r){let n=t._zod.def.shape,o={...n};if(r)for(let i in r){if(!(i in n))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(o[i]=e?new e({type:"optional",innerType:n[i]}):n[i])}else for(let i in n)o[i]=e?new e({type:"optional",innerType:n[i]}):n[i];return Tt(t,{...t._zod.def,shape:o,checks:[]})}function OC(e,t,r){let n=t._zod.def.shape,o={...n};if(r)for(let i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(o[i]=new e({type:"nonoptional",innerType:n[i]}))}else for(let i in n)o[i]=new e({type:"nonoptional",innerType:n[i]});return Tt(t,{...t._zod.def,shape:o,checks:[]})}function An(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function cr(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function di(e){return typeof e=="string"?e:e?.message}function Ht(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=di(e.inst?._zod.def?.error?.(e))??di(t?.error?.(e))??di(r.customError?.(e))??di(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function Xg(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function yi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function rl(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function NC(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Hs,Qu,PC,Xu,Yg,tl,Qg,Wu,ur=_(()=>{Hs=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};Qu=hi(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});PC=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Xu=new Set(["string","number","symbol"]),Yg=new Set(["string","number","bigint","boolean","symbol","undefined"]);tl={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Qg={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Wu=class{constructor(...t){}}});function nl(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function ol(e,t){let r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>o({issues:a}));else if(s.code==="invalid_key")o({issues:s.issues});else if(s.code==="invalid_element")o({issues:s.issues});else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return o(e),n}var ey,Ws,_i,il=_(()=>{mo();ur();ey=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,Ku,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ws=w("$ZodError",ey),_i=w("$ZodError",ey,{Parent:Error})});var sl,al,cl,ul,ll,On,pl,Nn,dl=_(()=>{mo();il();ur();sl=e=>(t,r,n,o)=>{let i=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Sr;if(s.issues.length){let a=new(o?.Err??e)(s.issues.map(c=>Ht(c,i,$t())));throw Hs(a,o?.callee),a}return s.value},al=sl(_i),cl=e=>async(t,r,n,o)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(o?.Err??e)(s.issues.map(c=>Ht(c,i,$t())));throw Hs(a,o?.callee),a}return s.value},ul=cl(_i),ll=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new Sr;return i.issues.length?{success:!1,error:new(e??Ws)(i.issues.map(s=>Ht(s,o,$t())))}:{success:!0,data:i.value}},On=ll(_i),pl=e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Ht(s,o,$t())))}:{success:!0,data:i.value}},Nn=pl(_i)});function ly(){return new RegExp(jC,"u")}function by(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 xy(e){return new RegExp(`^${by(e)}$`)}function wy(e){let t=by({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${_y}T(?:${n})$`)}var ty,ry,ny,oy,iy,sy,ay,cy,fl,uy,jC,py,dy,fy,hy,my,hl,gy,yy,_y,vy,ky,Sy,$y,Ty,Py,Cy,Ey,Js=_(()=>{ty=/^[cC][^\s-]{8,}$/,ry=/^[0-9a-z]+$/,ny=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,oy=/^[0-9a-vA-V]{20}$/,iy=/^[A-Za-z0-9]{27}$/,sy=/^[a-zA-Z0-9_-]{21}$/,ay=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,cy=/^([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})$/,fl=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,uy=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,jC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";py=/^(?:(?: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])$/,dy=/^(([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})$/,fy=/^((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])$/,hy=/^(([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])$/,my=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,hl=/^[A-Za-z0-9_-]*$/,gy=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,yy=/^\+(?:[0-9]){6,14}[0-9]$/,_y="(?:(?:\\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])))",vy=new RegExp(`^${_y}$`);ky=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Sy=/^\d+$/,$y=/^-?\d+(?:\.\d+)?/i,Ty=/true|false/i,Py=/null/i,Cy=/^[^A-Z]*$/,Ey=/^[^a-z]*$/});var Fe,Iy,ml,gl,zy,Ry,Ay,Oy,Ny,vi,Dy,jy,My,Ly,Zy,qy,Fy,Ys=_(()=>{mo();Js();ur();Fe=w("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Iy={number:"number",bigint:"bigint",object:"date"},ml=w("$ZodCheckLessThan",(e,t)=>{Fe.init(e,t);let r=Iy[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),gl=w("$ZodCheckGreaterThan",(e,t)=>{Fe.init(e,t);let r=Iy[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),zy=w("$ZodCheckMultipleOf",(e,t)=>{Fe.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Ju(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Ry=w("$ZodCheckNumberFormat",(e,t)=>{Fe.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=tl[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=o,a.maximum=i,r&&(a.pattern=Sy)}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e})}}),Ay=w("$ZodCheckMaxLength",(e,t)=>{var r;Fe.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!mi(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let o=n.value;if(o.length<=t.maximum)return;let s=yi(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Oy=w("$ZodCheckMinLength",(e,t)=>{var r;Fe.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!mi(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let s=yi(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ny=w("$ZodCheckLengthEquals",(e,t)=>{var r;Fe.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!mi(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{let o=n.value,i=o.length;if(i===t.length)return;let s=yi(o),a=i>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),vi=w("$ZodCheckStringFormat",(e,t)=>{var r,n;Fe.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Dy=w("$ZodCheckRegex",(e,t)=>{vi.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),jy=w("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Cy),vi.init(e,t)}),My=w("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ey),vi.init(e,t)}),Ly=w("$ZodCheckIncludes",(e,t)=>{Fe.init(e,t);let r=Vr(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Zy=w("$ZodCheckStartsWith",(e,t)=>{Fe.init(e,t);let r=new RegExp(`^${Vr(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),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})}}),qy=w("$ZodCheckEndsWith",(e,t)=>{Fe.init(e,t);let r=new RegExp(`.*${Vr(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),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})}}),Fy=w("$ZodCheckOverwrite",(e,t)=>{Fe.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}})});var Qs,yl=_(()=>{Qs=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
1
+ "use strict";var uP=Object.create;var Uu=Object.defineProperty;var lP=Object.getOwnPropertyDescriptor;var pP=Object.getOwnPropertyNames;var dP=Object.getPrototypeOf,fP=Object.prototype.hasOwnProperty;var _=(e,t)=>()=>(e&&(t=e(e=0)),t);var S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Br=(e,t)=>{for(var r in t)Uu(e,r,{get:t[r],enumerable:!0})},hP=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of pP(t))!fP.call(e,o)&&o!==r&&Uu(e,o,{get:()=>t[o],enumerable:!(n=lP(t,o))||n.enumerable});return e};var st=(e,t,r)=>(r=e!=null?uP(dP(e)):{},hP(t||!e||!e.__esModule?Uu(r,"default",{value:e,enumerable:!0}):r,e));var ee,Bu,I,cr,pi=_(()=>{(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(ee||(ee={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Bu||(Bu={}));I=ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),cr=e=>{switch(typeof e){case"undefined":return I.undefined;case"string":return I.string;case"number":return Number.isNaN(e)?I.nan:I.number;case"boolean":return I.boolean;case"function":return I.function;case"bigint":return I.bigint;case"symbol":return I.symbol;case"object":return Array.isArray(e)?I.array:e===null?I.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?I.promise:typeof Map<"u"&&e instanceof Map?I.map:typeof Set<"u"&&e instanceof Set?I.set:typeof Date<"u"&&e instanceof Date?I.date:I.object;default:return I.unknown}}});var $,mP,mt,qs=_(()=>{pi();$=ee.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),mP=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),mt=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return o(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];r[i]=r[i]||[],r[i].push(t(o))}else n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};mt.create=e=>new mt(e)});var gP,kr,Vu=_(()=>{qs();pi();gP=(e,t)=>{let r;switch(e.code){case $.invalid_type:e.received===I.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case $.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ee.jsonStringifyReplacer)}`;break;case $.unrecognized_keys:r=`Unrecognized key(s) in object: ${ee.joinValues(e.keys,", ")}`;break;case $.invalid_union:r="Invalid input";break;case $.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ee.joinValues(e.options)}`;break;case $.invalid_enum_value:r=`Invalid enum value. Expected ${ee.joinValues(e.options)}, received '${e.received}'`;break;case $.invalid_arguments:r="Invalid function arguments";break;case $.invalid_return_type:r="Invalid function return type";break;case $.invalid_date:r="Invalid date";break;case $.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:ee.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case $.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case $.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case $.custom:r="Invalid input";break;case $.invalid_intersection_types:r="Intersection results could not be merged";break;case $.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case $.not_finite:r="Number must be finite";break;default:r=t.defaultError,ee.assertNever(e)}return{message:r}},kr=gP});function yP(e){Vg=e}function lo(){return Vg}var Vg,Fs=_(()=>{Vu();Vg=kr});function E(e,t){let r=lo(),n=di({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===kr?void 0:kr].filter(o=>!!o)});e.common.issues.push(n)}var di,_P,Fe,Z,vn,Xe,Us,Bs,Vr,po,Hu=_(()=>{Fs();Vu();di=e=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}},_P=[];Fe=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let o of r){if(o.status==="aborted")return Z;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let o of r){let i=await o.key,s=await o.value;n.push({key:i,value:s})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let o of r){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return Z;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(n[i.value]=s.value)}return{status:t.value,value:n}}},Z=Object.freeze({status:"aborted"}),vn=e=>({status:"dirty",value:e}),Xe=e=>({status:"valid",value:e}),Us=e=>e.status==="aborted",Bs=e=>e.status==="dirty",Vr=e=>e.status==="valid",po=e=>typeof Promise<"u"&&e instanceof Promise});var Hg=_(()=>{});var A,Gg=_(()=>{(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(A||(A={}))});function V(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:o}}function Yg(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function NP(e){return new RegExp(`^${Yg(e)}$`)}function Qg(e){let t=`${Jg}T${Yg(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function DP(e,t){return!!((t==="v4"||!t)&&CP.test(e)||(t==="v6"||!t)&&IP.test(e))}function jP(e,t){if(!SP.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function MP(e,t){return!!((t==="v4"||!t)&&EP.test(e)||(t==="v6"||!t)&&zP.test(e))}function LP(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}function fo(e){if(e instanceof yt){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=gt.create(fo(n))}return new yt({...e._def,shape:()=>t})}else return e instanceof Tr?new Tr({...e._def,type:fo(e.element)}):e instanceof gt?gt.create(fo(e.unwrap())):e instanceof lr?lr.create(fo(e.unwrap())):e instanceof ur?ur.create(e.items.map(t=>fo(t))):e}function Wu(e,t){let r=cr(e),n=cr(t);if(e===t)return{valid:!0,data:e};if(r===I.object&&n===I.object){let o=ee.objectKeys(t),i=ee.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=Wu(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===I.array&&n===I.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=Wu(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===I.date&&n===I.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function Xg(e,t){return new In({values:e,typeName:P.ZodEnum,...V(t)})}function Kg(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function ey(e,t={},r){return e?Gr.create().superRefine((n,o)=>{let i=e(n);if(i instanceof Promise)return i.then(s=>{if(!s){let a=Kg(t,n),c=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=Kg(t,n),a=s.fatal??r??!0;o.addIssue({code:"custom",...s,fatal:a})}}):Gr.create()}var At,Wg,W,vP,bP,xP,wP,kP,SP,$P,TP,PP,Gu,CP,EP,IP,zP,RP,AP,Jg,OP,Hr,bn,xn,wn,kn,ho,Sn,$n,Gr,$r,Wt,mo,Tr,yt,Tn,Sr,Vs,Pn,ur,Hs,go,yo,Gs,Cn,En,In,zn,Wr,Ot,gt,lr,Rn,An,_o,ZP,fi,hi,On,qP,P,FP,ty,ry,UP,BP,ny,VP,HP,GP,WP,KP,JP,YP,QP,XP,Ku,eC,tC,rC,nC,oC,iC,sC,aC,cC,uC,lC,pC,dC,fC,hC,mC,gC,yC,_C,vC,bC,xC,wC,kC,oy=_(()=>{qs();Fs();Gg();Hu();pi();At=class{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Wg=(e,t)=>{if(Vr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new mt(e.common.issues);return this._error=r,this._error}}};W=class{get description(){return this._def.description}_getType(t){return cr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:cr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Fe,ctx:{common:t.parent.common,data:t.data,parsedType:cr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(po(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:cr(t)},o=this._parseSync({data:t,path:n.path,parent:n});return Wg(n,o)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:cr(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return Vr(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>Vr(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:cr(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(po(o)?o:Promise.resolve(o));return Wg(n,i)}refine(t,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,i)=>{let s=t(o),a=()=>i.addIssue({code:$.custom,...n(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new Ot({schema:this,typeName:P.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return gt.create(this,this._def)}nullable(){return lr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Tr.create(this)}promise(){return Wr.create(this,this._def)}or(t){return Tn.create([this,t],this._def)}and(t){return Pn.create(this,t,this._def)}transform(t){return new Ot({...V(this._def),schema:this,typeName:P.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Rn({...V(this._def),innerType:this,defaultValue:r,typeName:P.ZodDefault})}brand(){return new fi({typeName:P.ZodBranded,type:this,...V(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new An({...V(this._def),innerType:this,catchValue:r,typeName:P.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return hi.create(this,t)}readonly(){return On.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},vP=/^c[^\s-]{8,}$/i,bP=/^[0-9a-z]+$/,xP=/^[0-9A-HJKMNP-TV-Z]{26}$/i,wP=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,kP=/^[a-z0-9_-]{21}$/i,SP=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$P=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,TP=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,PP="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",CP=/^(?:(?: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])$/,EP=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,IP=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,zP=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,RP=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,AP=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Jg="((\\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])))",OP=new RegExp(`^${Jg}$`);Hr=class e extends W{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==I.string){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.string,received:i.parsedType}),Z}let n=new Fe,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?E(o,{code:$.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&E(o,{code:$.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")TP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"email",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Gu||(Gu=new RegExp(PP,"u")),Gu.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"emoji",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")wP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"uuid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")kP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"nanoid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")vP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cuid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")bP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cuid2",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")xP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"ulid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),E(o,{validation:"url",code:$.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"regex",code:$.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Qg(i).test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?OP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?NP(i).test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?$P.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"duration",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?DP(t.data,i.version)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"ip",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?jP(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"jwt",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?MP(t.data,i.version)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cidr",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?RP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"base64",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?AP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"base64url",code:$.invalid_string,message:i.message}),n.dirty()):ee.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:$.invalid_string,...A.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...A.errToObj(t)})}url(t){return this._addCheck({kind:"url",...A.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...A.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...A.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...A.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...A.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...A.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...A.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...A.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...A.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...A.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...A.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...A.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...A.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...A.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...A.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...A.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...A.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...A.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...A.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...A.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...A.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...A.errToObj(r)})}nonempty(t){return this.min(1,A.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Hr.create=e=>new Hr({checks:[],typeName:P.ZodString,coerce:e?.coerce??!1,...V(e)});bn=class e extends W{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==I.number){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.number,received:i.parsedType}),Z}let n,o=new Fe;for(let i of this._def.checks)i.kind==="int"?ee.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),E(n,{code:$.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?LP(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),E(n,{code:$.not_finite,message:i.message}),o.dirty()):ee.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,A.toString(r))}gt(t,r){return this.setLimit("min",t,!1,A.toString(r))}lte(t,r){return this.setLimit("max",t,!0,A.toString(r))}lt(t,r){return this.setLimit("max",t,!1,A.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:A.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:A.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:A.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:A.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:A.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:A.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:A.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:A.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:A.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:A.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ee.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};bn.create=e=>new bn({checks:[],typeName:P.ZodNumber,coerce:e?.coerce||!1,...V(e)});xn=class e extends W{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==I.bigint)return this._getInvalidInput(t);let n,o=new Fe;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):ee.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return E(r,{code:$.invalid_type,expected:I.bigint,received:r.parsedType}),Z}gte(t,r){return this.setLimit("min",t,!0,A.toString(r))}gt(t,r){return this.setLimit("min",t,!1,A.toString(r))}lte(t,r){return this.setLimit("max",t,!0,A.toString(r))}lt(t,r){return this.setLimit("max",t,!1,A.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:A.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:A.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:A.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:A.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:A.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:A.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};xn.create=e=>new xn({checks:[],typeName:P.ZodBigInt,coerce:e?.coerce??!1,...V(e)});wn=class extends W{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==I.boolean){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.boolean,received:n.parsedType}),Z}return Xe(t.data)}};wn.create=e=>new wn({typeName:P.ZodBoolean,coerce:e?.coerce||!1,...V(e)});kn=class e extends W{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==I.date){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.date,received:i.parsedType}),Z}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_date}),Z}let n=new Fe,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):ee.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:A.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:A.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};kn.create=e=>new kn({checks:[],coerce:e?.coerce||!1,typeName:P.ZodDate,...V(e)});ho=class extends W{_parse(t){if(this._getType(t)!==I.symbol){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.symbol,received:n.parsedType}),Z}return Xe(t.data)}};ho.create=e=>new ho({typeName:P.ZodSymbol,...V(e)});Sn=class extends W{_parse(t){if(this._getType(t)!==I.undefined){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.undefined,received:n.parsedType}),Z}return Xe(t.data)}};Sn.create=e=>new Sn({typeName:P.ZodUndefined,...V(e)});$n=class extends W{_parse(t){if(this._getType(t)!==I.null){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.null,received:n.parsedType}),Z}return Xe(t.data)}};$n.create=e=>new $n({typeName:P.ZodNull,...V(e)});Gr=class extends W{constructor(){super(...arguments),this._any=!0}_parse(t){return Xe(t.data)}};Gr.create=e=>new Gr({typeName:P.ZodAny,...V(e)});$r=class extends W{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Xe(t.data)}};$r.create=e=>new $r({typeName:P.ZodUnknown,...V(e)});Wt=class extends W{_parse(t){let r=this._getOrReturnCtx(t);return E(r,{code:$.invalid_type,expected:I.never,received:r.parsedType}),Z}};Wt.create=e=>new Wt({typeName:P.ZodNever,...V(e)});mo=class extends W{_parse(t){if(this._getType(t)!==I.undefined){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.void,received:n.parsedType}),Z}return Xe(t.data)}};mo.create=e=>new mo({typeName:P.ZodVoid,...V(e)});Tr=class e extends W{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==I.array)return E(r,{code:$.invalid_type,expected:I.array,received:r.parsedType}),Z;if(o.exactLength!==null){let s=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(s||a)&&(E(r,{code:s?$.too_big:$.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(E(r,{code:$.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(E(r,{code:$.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>o.type._parseAsync(new At(r,s,r.path,a)))).then(s=>Fe.mergeArray(n,s));let i=[...r.data].map((s,a)=>o.type._parseSync(new At(r,s,r.path,a)));return Fe.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:A.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:A.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:A.toString(r)}})}nonempty(t){return this.min(1,t)}};Tr.create=(e,t)=>new Tr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:P.ZodArray,...V(t)});yt=class e extends W{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=ee.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==I.object){let u=this._getOrReturnCtx(t);return E(u,{code:$.invalid_type,expected:I.object,received:u.parsedType}),Z}let{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Wt&&this._def.unknownKeys==="strip"))for(let u in o.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let p=i[u],l=o.data[u];c.push({key:{status:"valid",value:u},value:p._parse(new At(o,l,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof Wt){let u=this._def.unknownKeys;if(u==="passthrough")for(let p of a)c.push({key:{status:"valid",value:p},value:{status:"valid",value:o.data[p]}});else if(u==="strict")a.length>0&&(E(o,{code:$.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let p of a){let l=o.data[p];c.push({key:{status:"valid",value:p},value:u._parse(new At(o,l,o.path,p)),alwaysSet:p in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let u=[];for(let p of c){let l=await p.key,d=await p.value;u.push({key:l,value:d,alwaysSet:p.alwaysSet})}return u}).then(u=>Fe.mergeObjectSync(n,u)):Fe.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return A.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:A.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:P.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of ee.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of ee.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return fo(this)}partial(t){let r={};for(let n of ee.objectKeys(this.shape)){let o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of ee.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof gt;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return Xg(ee.objectKeys(this.shape))}};yt.create=(e,t)=>new yt({shape:()=>e,unknownKeys:"strip",catchall:Wt.create(),typeName:P.ZodObject,...V(t)});yt.strictCreate=(e,t)=>new yt({shape:()=>e,unknownKeys:"strict",catchall:Wt.create(),typeName:P.ZodObject,...V(t)});yt.lazycreate=(e,t)=>new yt({shape:e,unknownKeys:"strip",catchall:Wt.create(),typeName:P.ZodObject,...V(t)});Tn=class extends W{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new mt(a.ctx.common.issues));return E(r,{code:$.invalid_union,unionErrors:s}),Z}if(r.common.async)return Promise.all(n.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},p=c._parseSync({data:r.data,path:r.path,parent:u});if(p.status==="valid")return p;p.status==="dirty"&&!i&&(i={result:p,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new mt(c));return E(r,{code:$.invalid_union,unionErrors:a}),Z}}get options(){return this._def.options}};Tn.create=(e,t)=>new Tn({options:e,typeName:P.ZodUnion,...V(t)});Sr=e=>e instanceof Cn?Sr(e.schema):e instanceof Ot?Sr(e.innerType()):e instanceof En?[e.value]:e instanceof In?e.options:e instanceof zn?ee.objectValues(e.enum):e instanceof Rn?Sr(e._def.innerType):e instanceof Sn?[void 0]:e instanceof $n?[null]:e instanceof gt?[void 0,...Sr(e.unwrap())]:e instanceof lr?[null,...Sr(e.unwrap())]:e instanceof fi||e instanceof On?Sr(e.unwrap()):e instanceof An?Sr(e._def.innerType):[],Vs=class e extends W{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.object)return E(r,{code:$.invalid_type,expected:I.object,received:r.parsedType}),Z;let n=this.discriminator,o=r.data[n],i=this.optionsMap.get(o);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(E(r,{code:$.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Z)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let o=new Map;for(let i of r){let s=Sr(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new e({typeName:P.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...V(n)})}};Pn=class extends W{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=(i,s)=>{if(Us(i)||Us(s))return Z;let a=Wu(i.value,s.value);return a.valid?((Bs(i)||Bs(s))&&r.dirty(),{status:r.value,value:a.data}):(E(n,{code:$.invalid_intersection_types}),Z)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Pn.create=(e,t,r)=>new Pn({left:e,right:t,typeName:P.ZodIntersection,...V(r)});ur=class e extends W{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.array)return E(n,{code:$.invalid_type,expected:I.array,received:n.parsedType}),Z;if(n.data.length<this._def.items.length)return E(n,{code:$.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Z;!this._def.rest&&n.data.length>this._def.items.length&&(E(n,{code:$.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new At(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(i).then(s=>Fe.mergeArray(r,s)):Fe.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};ur.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ur({items:e,typeName:P.ZodTuple,rest:null,...V(t)})};Hs=class e extends W{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.object)return E(n,{code:$.invalid_type,expected:I.object,received:n.parsedType}),Z;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in n.data)o.push({key:i._parse(new At(n,a,n.path,a)),value:s._parse(new At(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Fe.mergeObjectAsync(r,o):Fe.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof W?new e({keyType:t,valueType:r,typeName:P.ZodRecord,...V(n)}):new e({keyType:Hr.create(),valueType:t,typeName:P.ZodRecord,...V(r)})}},go=class extends W{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.map)return E(n,{code:$.invalid_type,expected:I.map,received:n.parsedType}),Z;let o=this._def.keyType,i=this._def.valueType,s=[...n.data.entries()].map(([a,c],u)=>({key:o._parse(new At(n,a,n.path,[u,"key"])),value:i._parse(new At(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,p=await c.value;if(u.status==="aborted"||p.status==="aborted")return Z;(u.status==="dirty"||p.status==="dirty")&&r.dirty(),a.set(u.value,p.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of s){let u=c.key,p=c.value;if(u.status==="aborted"||p.status==="aborted")return Z;(u.status==="dirty"||p.status==="dirty")&&r.dirty(),a.set(u.value,p.value)}return{status:r.value,value:a}}}};go.create=(e,t,r)=>new go({valueType:t,keyType:e,typeName:P.ZodMap,...V(r)});yo=class e extends W{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.set)return E(n,{code:$.invalid_type,expected:I.set,received:n.parsedType}),Z;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(E(n,{code:$.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(E(n,{code:$.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let p of c){if(p.status==="aborted")return Z;p.status==="dirty"&&r.dirty(),u.add(p.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>i._parse(new At(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:A.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:A.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};yo.create=(e,t)=>new yo({valueType:e,minSize:null,maxSize:null,typeName:P.ZodSet,...V(t)});Gs=class e extends W{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.function)return E(r,{code:$.invalid_type,expected:I.function,received:r.parsedType}),Z;function n(a,c){return di({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,lo(),kr].filter(u=>!!u),issueData:{code:$.invalid_arguments,argumentsError:c}})}function o(a,c){return di({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,lo(),kr].filter(u=>!!u),issueData:{code:$.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Wr){let a=this;return Xe(async function(...c){let u=new mt([]),p=await a._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(n(c,f)),u}),l=await Reflect.apply(s,this,p);return await a._def.returns._def.type.parseAsync(l,i).catch(f=>{throw u.addIssue(o(l,f)),u})})}else{let a=this;return Xe(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new mt([n(c,u.error)]);let p=Reflect.apply(s,this,u.data),l=a._def.returns.safeParse(p,i);if(!l.success)throw new mt([o(p,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ur.create(t).rest($r.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||ur.create([]).rest($r.create()),returns:r||$r.create(),typeName:P.ZodFunction,...V(n)})}},Cn=class extends W{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Cn.create=(e,t)=>new Cn({getter:e,typeName:P.ZodLazy,...V(t)});En=class extends W{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return E(r,{received:r.data,code:$.invalid_literal,expected:this._def.value}),Z}return{status:"valid",value:t.data}}get value(){return this._def.value}};En.create=(e,t)=>new En({value:e,typeName:P.ZodLiteral,...V(t)});In=class e extends W{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return E(r,{expected:ee.joinValues(n),received:r.parsedType,code:$.invalid_type}),Z}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return E(r,{received:r.data,code:$.invalid_enum_value,options:n}),Z}return Xe(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};In.create=Xg;zn=class extends W{_parse(t){let r=ee.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==I.string&&n.parsedType!==I.number){let o=ee.objectValues(r);return E(n,{expected:ee.joinValues(o),received:n.parsedType,code:$.invalid_type}),Z}if(this._cache||(this._cache=new Set(ee.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=ee.objectValues(r);return E(n,{received:n.data,code:$.invalid_enum_value,options:o}),Z}return Xe(t.data)}get enum(){return this._def.values}};zn.create=(e,t)=>new zn({values:e,typeName:P.ZodNativeEnum,...V(t)});Wr=class extends W{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.promise&&r.common.async===!1)return E(r,{code:$.invalid_type,expected:I.promise,received:r.parsedType}),Z;let n=r.parsedType===I.promise?r.data:Promise.resolve(r.data);return Xe(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Wr.create=(e,t)=>new Wr({type:e,typeName:P.ZodPromise,...V(t)});Ot=class extends W{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{E(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(n.data,i);if(n.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return Z;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?Z:c.status==="dirty"?vn(c.value):r.value==="dirty"?vn(c.value):c});{if(r.value==="aborted")return Z;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?Z:a.status==="dirty"?vn(a.value):r.value==="dirty"?vn(a.value):a}}if(o.type==="refinement"){let s=a=>{let c=o.refinement(a,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Z:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Z:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(o.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Vr(s))return Z;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>Vr(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:r.value,value:a})):Z);ee.assertNever(o)}};Ot.create=(e,t,r)=>new Ot({schema:e,typeName:P.ZodEffects,effect:t,...V(r)});Ot.createWithPreprocess=(e,t,r)=>new Ot({schema:t,effect:{type:"preprocess",transform:e},typeName:P.ZodEffects,...V(r)});gt=class extends W{_parse(t){return this._getType(t)===I.undefined?Xe(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};gt.create=(e,t)=>new gt({innerType:e,typeName:P.ZodOptional,...V(t)});lr=class extends W{_parse(t){return this._getType(t)===I.null?Xe(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};lr.create=(e,t)=>new lr({innerType:e,typeName:P.ZodNullable,...V(t)});Rn=class extends W{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===I.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Rn.create=(e,t)=>new Rn({innerType:e,typeName:P.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...V(t)});An=class extends W{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return po(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new mt(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new mt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};An.create=(e,t)=>new An({innerType:e,typeName:P.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...V(t)});_o=class extends W{_parse(t){if(this._getType(t)!==I.nan){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.nan,received:n.parsedType}),Z}return{status:"valid",value:t.data}}};_o.create=e=>new _o({typeName:P.ZodNaN,...V(e)});ZP=Symbol("zod_brand"),fi=class extends W{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},hi=class e extends W{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Z:i.status==="dirty"?(r.dirty(),vn(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Z:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:P.ZodPipeline})}},On=class extends W{_parse(t){let r=this._def.innerType._parse(t),n=o=>(Vr(o)&&(o.value=Object.freeze(o.value)),o);return po(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};On.create=(e,t)=>new On({innerType:e,typeName:P.ZodReadonly,...V(t)});qP={object:yt.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(P||(P={}));FP=(e,t={message:`Input not instance of ${e.name}`})=>ey(r=>r instanceof e,t),ty=Hr.create,ry=bn.create,UP=_o.create,BP=xn.create,ny=wn.create,VP=kn.create,HP=ho.create,GP=Sn.create,WP=$n.create,KP=Gr.create,JP=$r.create,YP=Wt.create,QP=mo.create,XP=Tr.create,Ku=yt.create,eC=yt.strictCreate,tC=Tn.create,rC=Vs.create,nC=Pn.create,oC=ur.create,iC=Hs.create,sC=go.create,aC=yo.create,cC=Gs.create,uC=Cn.create,lC=En.create,pC=In.create,dC=zn.create,fC=Wr.create,hC=Ot.create,mC=gt.create,gC=lr.create,yC=Ot.createWithPreprocess,_C=hi.create,vC=()=>ty().optional(),bC=()=>ry().optional(),xC=()=>ny().optional(),wC={string:(e=>Hr.create({...e,coerce:!0})),number:(e=>bn.create({...e,coerce:!0})),boolean:(e=>wn.create({...e,coerce:!0})),bigint:(e=>xn.create({...e,coerce:!0})),date:(e=>kn.create({...e,coerce:!0}))},kC=Z});var m={};Br(m,{BRAND:()=>ZP,DIRTY:()=>vn,EMPTY_PATH:()=>_P,INVALID:()=>Z,NEVER:()=>kC,OK:()=>Xe,ParseStatus:()=>Fe,Schema:()=>W,ZodAny:()=>Gr,ZodArray:()=>Tr,ZodBigInt:()=>xn,ZodBoolean:()=>wn,ZodBranded:()=>fi,ZodCatch:()=>An,ZodDate:()=>kn,ZodDefault:()=>Rn,ZodDiscriminatedUnion:()=>Vs,ZodEffects:()=>Ot,ZodEnum:()=>In,ZodError:()=>mt,ZodFirstPartyTypeKind:()=>P,ZodFunction:()=>Gs,ZodIntersection:()=>Pn,ZodIssueCode:()=>$,ZodLazy:()=>Cn,ZodLiteral:()=>En,ZodMap:()=>go,ZodNaN:()=>_o,ZodNativeEnum:()=>zn,ZodNever:()=>Wt,ZodNull:()=>$n,ZodNullable:()=>lr,ZodNumber:()=>bn,ZodObject:()=>yt,ZodOptional:()=>gt,ZodParsedType:()=>I,ZodPipeline:()=>hi,ZodPromise:()=>Wr,ZodReadonly:()=>On,ZodRecord:()=>Hs,ZodSchema:()=>W,ZodSet:()=>yo,ZodString:()=>Hr,ZodSymbol:()=>ho,ZodTransformer:()=>Ot,ZodTuple:()=>ur,ZodType:()=>W,ZodUndefined:()=>Sn,ZodUnion:()=>Tn,ZodUnknown:()=>$r,ZodVoid:()=>mo,addIssueToContext:()=>E,any:()=>KP,array:()=>XP,bigint:()=>BP,boolean:()=>ny,coerce:()=>wC,custom:()=>ey,date:()=>VP,datetimeRegex:()=>Qg,defaultErrorMap:()=>kr,discriminatedUnion:()=>rC,effect:()=>hC,enum:()=>pC,function:()=>cC,getErrorMap:()=>lo,getParsedType:()=>cr,instanceof:()=>FP,intersection:()=>nC,isAborted:()=>Us,isAsync:()=>po,isDirty:()=>Bs,isValid:()=>Vr,late:()=>qP,lazy:()=>uC,literal:()=>lC,makeIssue:()=>di,map:()=>sC,nan:()=>UP,nativeEnum:()=>dC,never:()=>YP,null:()=>WP,nullable:()=>gC,number:()=>ry,object:()=>Ku,objectUtil:()=>Bu,oboolean:()=>xC,onumber:()=>bC,optional:()=>mC,ostring:()=>vC,pipeline:()=>_C,preprocess:()=>yC,promise:()=>fC,quotelessJson:()=>mP,record:()=>iC,set:()=>aC,setErrorMap:()=>yP,strictObject:()=>eC,string:()=>ty,symbol:()=>HP,transformer:()=>hC,tuple:()=>oC,undefined:()=>GP,union:()=>tC,unknown:()=>JP,util:()=>ee,void:()=>QP});var Ws=_(()=>{Fs();Hu();Hg();pi();oy();qs()});var mi=_(()=>{Ws()});function w(e,t,r){function n(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(let p in s.prototype)p in a||Object.defineProperty(a,p,{value:s.prototype[p].bind(a)});a._zod.constr=s,a._zod.def=c}let o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=r?.Parent?new i:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let p of u._zod.deferred)p();return u}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}function Tt(e){return e&&Object.assign(Ks,e),Ks}var $C,TC,Pr,Ks,vo=_(()=>{$C=Object.freeze({status:"aborted"});TC=Symbol("zod_brand"),Pr=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ks={}});var ne={};Br(ne,{BIGINT_FORMAT_RANGES:()=>sy,Class:()=>Yu,NUMBER_FORMAT_RANGES:()=>ol,aborted:()=>Dn,allowsEval:()=>tl,assert:()=>zC,assertEqual:()=>PC,assertIs:()=>EC,assertNever:()=>IC,assertNotEqual:()=>CC,assignProp:()=>el,cached:()=>_i,captureStackTrace:()=>Ys,cleanEnum:()=>BC,cleanRegex:()=>bi,clone:()=>Pt,createTransparentProxy:()=>jC,defineLazy:()=>ve,esc:()=>Nn,escapeRegex:()=>Kr,extend:()=>ZC,finalizeIssue:()=>Kt,floatSafeRemainder:()=>Xu,getElementAtPath:()=>RC,getEnumValues:()=>yi,getLengthableOrigin:()=>xi,getParsedType:()=>DC,getSizableOrigin:()=>ay,isObject:()=>bo,isPlainObject:()=>xo,issue:()=>il,joinValues:()=>Js,jsonStringifyReplacer:()=>Qu,merge:()=>qC,normalizeParams:()=>q,nullish:()=>vi,numKeys:()=>NC,omit:()=>LC,optionalKeys:()=>nl,partial:()=>FC,pick:()=>MC,prefixIssues:()=>pr,primitiveTypes:()=>iy,promiseAllObject:()=>AC,propertyKeyTypes:()=>rl,randomString:()=>OC,required:()=>UC,stringifyPrimitive:()=>Qs,unwrapMessage:()=>gi});function PC(e){return e}function CC(e){return e}function EC(e){}function IC(e){throw new Error}function zC(e){}function yi(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function Js(e,t="|"){return e.map(r=>Qs(r)).join(t)}function Qu(e,t){return typeof t=="bigint"?t.toString():t}function _i(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function vi(e){return e==null}function bi(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Xu(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}function ve(e,t,r){Object.defineProperty(e,t,{get(){{let o=r();return e[t]=o,o}throw new Error("cached value already set")},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function el(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function RC(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function AC(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=n[i];return o})}function OC(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function Nn(e){return JSON.stringify(e)}function bo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function xo(e){if(bo(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let r=t.prototype;return!(bo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function NC(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function Kr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Pt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function q(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 new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function jC(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,i){return t??(t=e()),Reflect.set(t,n,o,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function Qs(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function nl(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function MC(e,t){let r={},n=e._zod.def;for(let o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(r[o]=n.shape[o])}return Pt(e,{...e._zod.def,shape:r,checks:[]})}function LC(e,t){let r={...e._zod.def.shape},n=e._zod.def;for(let o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete r[o]}return Pt(e,{...e._zod.def,shape:r,checks:[]})}function ZC(e,t){if(!xo(t))throw new Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return el(this,"shape",n),n},checks:[]};return Pt(e,r)}function qC(e,t){return Pt(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return el(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function FC(e,t,r){let n=t._zod.def.shape,o={...n};if(r)for(let i in r){if(!(i in n))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(o[i]=e?new e({type:"optional",innerType:n[i]}):n[i])}else for(let i in n)o[i]=e?new e({type:"optional",innerType:n[i]}):n[i];return Pt(t,{...t._zod.def,shape:o,checks:[]})}function UC(e,t,r){let n=t._zod.def.shape,o={...n};if(r)for(let i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(o[i]=new e({type:"nonoptional",innerType:n[i]}))}else for(let i in n)o[i]=new e({type:"nonoptional",innerType:n[i]});return Pt(t,{...t._zod.def,shape:o,checks:[]})}function Dn(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function pr(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function gi(e){return typeof e=="string"?e:e?.message}function Kt(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=gi(e.inst?._zod.def?.error?.(e))??gi(t?.error?.(e))??gi(r.customError?.(e))??gi(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function ay(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function xi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function il(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function BC(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Ys,tl,DC,rl,iy,ol,sy,Yu,dr=_(()=>{Ys=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};tl=_i(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});DC=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},rl=new Set(["string","number","symbol"]),iy=new Set(["string","number","bigint","boolean","symbol","undefined"]);ol={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},sy={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Yu=class{constructor(...t){}}});function sl(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function al(e,t){let r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>o({issues:a}));else if(s.code==="invalid_key")o({issues:s.issues});else if(s.code==="invalid_element")o({issues:s.issues});else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return o(e),n}var cy,Xs,wi,cl=_(()=>{vo();dr();cy=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,Qu,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Xs=w("$ZodError",cy),wi=w("$ZodError",cy,{Parent:Error})});var ul,ll,pl,dl,fl,jn,hl,Mn,ml=_(()=>{vo();cl();dr();ul=e=>(t,r,n,o)=>{let i=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Pr;if(s.issues.length){let a=new(o?.Err??e)(s.issues.map(c=>Kt(c,i,Tt())));throw Ys(a,o?.callee),a}return s.value},ll=ul(wi),pl=e=>async(t,r,n,o)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(o?.Err??e)(s.issues.map(c=>Kt(c,i,Tt())));throw Ys(a,o?.callee),a}return s.value},dl=pl(wi),fl=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new Pr;return i.issues.length?{success:!1,error:new(e??Xs)(i.issues.map(s=>Kt(s,o,Tt())))}:{success:!0,data:i.value}},jn=fl(wi),hl=e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Kt(s,o,Tt())))}:{success:!0,data:i.value}},Mn=hl(wi)});function _y(){return new RegExp(HC,"u")}function Cy(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 Ey(e){return new RegExp(`^${Cy(e)}$`)}function Iy(e){let t=Cy({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Ty}T(?:${n})$`)}var uy,ly,py,dy,fy,hy,my,gy,gl,yy,HC,vy,by,xy,wy,ky,yl,Sy,$y,Ty,Py,zy,Ry,Ay,Oy,Ny,Dy,jy,ta=_(()=>{uy=/^[cC][^\s-]{8,}$/,ly=/^[0-9a-z]+$/,py=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,dy=/^[0-9a-vA-V]{20}$/,fy=/^[A-Za-z0-9]{27}$/,hy=/^[a-zA-Z0-9_-]{21}$/,my=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,gy=/^([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})$/,gl=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,yy=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,HC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";vy=/^(?:(?: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])$/,by=/^(([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})$/,xy=/^((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])$/,wy=/^(([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])$/,ky=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,yl=/^[A-Za-z0-9_-]*$/,Sy=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,$y=/^\+(?:[0-9]){6,14}[0-9]$/,Ty="(?:(?:\\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])))",Py=new RegExp(`^${Ty}$`);zy=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ry=/^\d+$/,Ay=/^-?\d+(?:\.\d+)?/i,Oy=/true|false/i,Ny=/null/i,Dy=/^[^A-Z]*$/,jy=/^[^a-z]*$/});var Ue,My,_l,vl,Ly,Zy,qy,Fy,Uy,ki,By,Vy,Hy,Gy,Wy,Ky,Jy,ra=_(()=>{vo();ta();dr();Ue=w("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),My={number:"number",bigint:"bigint",object:"date"},_l=w("$ZodCheckLessThan",(e,t)=>{Ue.init(e,t);let r=My[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vl=w("$ZodCheckGreaterThan",(e,t)=>{Ue.init(e,t);let r=My[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ly=w("$ZodCheckMultipleOf",(e,t)=>{Ue.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Xu(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Zy=w("$ZodCheckNumberFormat",(e,t)=>{Ue.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=ol[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=o,a.maximum=i,r&&(a.pattern=Ry)}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e})}}),qy=w("$ZodCheckMaxLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!vi(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let o=n.value;if(o.length<=t.maximum)return;let s=xi(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Fy=w("$ZodCheckMinLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!vi(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let s=xi(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Uy=w("$ZodCheckLengthEquals",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!vi(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{let o=n.value,i=o.length;if(i===t.length)return;let s=xi(o),a=i>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ki=w("$ZodCheckStringFormat",(e,t)=>{var r,n;Ue.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),By=w("$ZodCheckRegex",(e,t)=>{ki.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Vy=w("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Dy),ki.init(e,t)}),Hy=w("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=jy),ki.init(e,t)}),Gy=w("$ZodCheckIncludes",(e,t)=>{Ue.init(e,t);let r=Kr(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Wy=w("$ZodCheckStartsWith",(e,t)=>{Ue.init(e,t);let r=new RegExp(`^${Kr(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),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})}}),Ky=w("$ZodCheckEndsWith",(e,t)=>{Ue.init(e,t);let r=new RegExp(`.*${Kr(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),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})}}),Jy=w("$ZodCheckOverwrite",(e,t)=>{Ue.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}})});var na,bl=_(()=>{na=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
2
2
  `).filter(s=>s),o=Math.min(...n.map(s=>s.length-s.trimStart().length)),i=n.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,r=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,o.join(`
3
- `))}}});var By,_l=_(()=>{By={major:4,minor:0,patch:0}});function o_(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function MC(e){if(!hl.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return o_(r)}function LC(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}function Vy(e,t,r){e.issues.length&&t.issues.push(...cr(r,e.issues)),t.value[r]=e.value}function Xs(e,t,r){e.issues.length&&t.issues.push(...cr(r,e.issues)),t.value[r]=e.value}function Hy(e,t,r,n){e.issues.length?n[r]===void 0?r in n?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...cr(r,e.issues)):e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function Gy(e,t,r,n){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(i=>Ht(i,n,$t())))}),t}function vl(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(yo(e)&&yo(t)){let r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};for(let i of n){let s=vl(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],i=t[n],s=vl(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Wy(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),An(e))return e;let n=vl(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}function Ky(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function Jy(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function Yy(e,t,r){return An(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}function Qy(e){return e.value=Object.freeze(e.value),e}function Xy(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(rl(o))}}var he,bi,_e,bl,xl,wl,kl,Sl,$l,Tl,Pl,Cl,El,Il,e_,t_,r_,n_,zl,Rl,Al,Ol,Nl,Dl,jl,Ml,ea,Ll,Zl,ql,Fl,Ul,Bl,ta,ra,Vl,Hl,Gl,Wl,Kl,Jl,Yl,Ql,Xl,ep,tp,rp,np,op,ip,i_=_(()=>{Ys();mo();yl();dl();Js();ur();_l();ur();he=w("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=By;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(i,s,a)=>{let c=An(i),u;for(let p of s){if(p._zod.def.when){if(!p._zod.def.when(i))continue}else if(c)continue;let l=i.issues.length,d=p._zod.check(i);if(d instanceof Promise&&a?.async===!1)throw new Sr;if(u||d instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await d,i.issues.length!==l&&(c||(c=An(i,l)))});else{if(i.issues.length===l)continue;c||(c=An(i,l))}}return u?u.then(()=>i):i};e._zod.run=(i,s)=>{let a=e._zod.parse(i,s);if(a instanceof Promise){if(s.async===!1)throw new Sr;return a.then(c=>o(c,n,s))}return o(a,n,s)}}e["~standard"]={validate:o=>{try{let i=On(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Nn(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),bi=w("$ZodString",(e,t)=>{he.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ky(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),_e=w("$ZodStringFormat",(e,t)=>{vi.init(e,t),bi.init(e,t)}),bl=w("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=cy),_e.init(e,t)}),xl=w("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=fl(n))}else t.pattern??(t.pattern=fl());_e.init(e,t)}),wl=w("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=uy),_e.init(e,t)}),kl=w("$ZodURL",(e,t)=>{_e.init(e,t),e._zod.check=r=>{try{let n=r.value,o=new URL(n),i=o.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:gy.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),!n.endsWith("/")&&i.endsWith("/")?r.value=i.slice(0,-1):r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Sl=w("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=ly()),_e.init(e,t)}),$l=w("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=sy),_e.init(e,t)}),Tl=w("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ty),_e.init(e,t)}),Pl=w("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ry),_e.init(e,t)}),Cl=w("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ny),_e.init(e,t)}),El=w("$ZodXID",(e,t)=>{t.pattern??(t.pattern=oy),_e.init(e,t)}),Il=w("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=iy),_e.init(e,t)}),e_=w("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=wy(t)),_e.init(e,t)}),t_=w("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=vy),_e.init(e,t)}),r_=w("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=xy(t)),_e.init(e,t)}),n_=w("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ay),_e.init(e,t)}),zl=w("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=py),_e.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),Rl=w("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=dy),_e.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Al=w("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=fy),_e.init(e,t)}),Ol=w("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=hy),_e.init(e,t),e._zod.check=r=>{let[n,o]=r.value.split("/");try{if(!o)throw new Error;let i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});Nl=w("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=my),_e.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{o_(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});Dl=w("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=hl),_e.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{MC(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),jl=w("$ZodE164",(e,t)=>{t.pattern??(t.pattern=yy),_e.init(e,t)});Ml=w("$ZodJWT",(e,t)=>{_e.init(e,t),e._zod.check=r=>{LC(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),ea=w("$ZodNumber",(e,t)=>{he.init(e,t),e._zod.pattern=e._zod.bag.pattern??$y,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),Ll=w("$ZodNumber",(e,t)=>{Ry.init(e,t),ea.init(e,t)}),Zl=w("$ZodBoolean",(e,t)=>{he.init(e,t),e._zod.pattern=Ty,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),ql=w("$ZodNull",(e,t)=>{he.init(e,t),e._zod.pattern=Py,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),Fl=w("$ZodUnknown",(e,t)=>{he.init(e,t),e._zod.parse=r=>r}),Ul=w("$ZodNever",(e,t)=>{he.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});Bl=w("$ZodArray",(e,t)=>{he.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let i=[];for(let s=0;s<o.length;s++){let a=o[s],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?i.push(c.then(u=>Vy(u,r,s))):Vy(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});ta=w("$ZodObject",(e,t)=>{he.init(e,t);let r=hi(()=>{let l=Object.keys(t.shape);for(let f of l)if(!(t.shape[f]instanceof he))throw new Error(`Invalid element at key "${f}": expected a Zod schema`);let d=el(t.shape);return{shape:t.shape,keys:l,keySet:new Set(l),numKeys:l.length,optionalKeys:new Set(d)}});ye(e._zod,"propValues",()=>{let l=t.shape,d={};for(let f in l){let h=l[f]._zod;if(h.values){d[f]??(d[f]=new Set);for(let m of h.values)d[f].add(m)}}return d});let n=l=>{let d=new Qs(["shape","payload","ctx"]),f=r.value,h=v=>{let k=Rn(v);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};d.write("const input = payload.value;");let m=Object.create(null),y=0;for(let v of f.keys)m[v]=`key_${y++}`;d.write("const newResult = {}");for(let v of f.keys)if(f.optionalKeys.has(v)){let k=m[v];d.write(`const ${k} = ${h(v)};`);let C=Rn(v);d.write(`
3
+ `))}}});var Qy,xl=_(()=>{Qy={major:4,minor:0,patch:0}});function d_(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function GC(e){if(!yl.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return d_(r)}function WC(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}function Xy(e,t,r){e.issues.length&&t.issues.push(...pr(r,e.issues)),t.value[r]=e.value}function oa(e,t,r){e.issues.length&&t.issues.push(...pr(r,e.issues)),t.value[r]=e.value}function e_(e,t,r,n){e.issues.length?n[r]===void 0?r in n?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...pr(r,e.issues)):e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function t_(e,t,r,n){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(i=>Kt(i,n,Tt())))}),t}function wl(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(xo(e)&&xo(t)){let r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};for(let i of n){let s=wl(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],i=t[n],s=wl(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function r_(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Dn(e))return e;let n=wl(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}function n_(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function o_(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function i_(e,t,r){return Dn(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}function s_(e){return e.value=Object.freeze(e.value),e}function a_(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(il(o))}}var me,Si,be,kl,Sl,$l,Tl,Pl,Cl,El,Il,zl,Rl,Al,c_,u_,l_,p_,Ol,Nl,Dl,jl,Ml,Ll,Zl,ql,ia,Fl,Ul,Bl,Vl,Hl,Gl,sa,aa,Wl,Kl,Jl,Yl,Ql,Xl,ep,tp,rp,np,op,ip,sp,ap,cp,f_=_(()=>{ra();vo();bl();ml();ta();dr();xl();dr();me=w("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Qy;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(i,s,a)=>{let c=Dn(i),u;for(let p of s){if(p._zod.def.when){if(!p._zod.def.when(i))continue}else if(c)continue;let l=i.issues.length,d=p._zod.check(i);if(d instanceof Promise&&a?.async===!1)throw new Pr;if(u||d instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await d,i.issues.length!==l&&(c||(c=Dn(i,l)))});else{if(i.issues.length===l)continue;c||(c=Dn(i,l))}}return u?u.then(()=>i):i};e._zod.run=(i,s)=>{let a=e._zod.parse(i,s);if(a instanceof Promise){if(s.async===!1)throw new Pr;return a.then(c=>o(c,n,s))}return o(a,n,s)}}e["~standard"]={validate:o=>{try{let i=jn(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Mn(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Si=w("$ZodString",(e,t)=>{me.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??zy(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),be=w("$ZodStringFormat",(e,t)=>{ki.init(e,t),Si.init(e,t)}),kl=w("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=gy),be.init(e,t)}),Sl=w("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=gl(n))}else t.pattern??(t.pattern=gl());be.init(e,t)}),$l=w("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=yy),be.init(e,t)}),Tl=w("$ZodURL",(e,t)=>{be.init(e,t),e._zod.check=r=>{try{let n=r.value,o=new URL(n),i=o.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Sy.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),!n.endsWith("/")&&i.endsWith("/")?r.value=i.slice(0,-1):r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Pl=w("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=_y()),be.init(e,t)}),Cl=w("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=hy),be.init(e,t)}),El=w("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=uy),be.init(e,t)}),Il=w("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ly),be.init(e,t)}),zl=w("$ZodULID",(e,t)=>{t.pattern??(t.pattern=py),be.init(e,t)}),Rl=w("$ZodXID",(e,t)=>{t.pattern??(t.pattern=dy),be.init(e,t)}),Al=w("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=fy),be.init(e,t)}),c_=w("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Iy(t)),be.init(e,t)}),u_=w("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Py),be.init(e,t)}),l_=w("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ey(t)),be.init(e,t)}),p_=w("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=my),be.init(e,t)}),Ol=w("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=vy),be.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),Nl=w("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=by),be.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Dl=w("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=xy),be.init(e,t)}),jl=w("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=wy),be.init(e,t),e._zod.check=r=>{let[n,o]=r.value.split("/");try{if(!o)throw new Error;let i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});Ml=w("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ky),be.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{d_(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});Ll=w("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=yl),be.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{GC(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Zl=w("$ZodE164",(e,t)=>{t.pattern??(t.pattern=$y),be.init(e,t)});ql=w("$ZodJWT",(e,t)=>{be.init(e,t),e._zod.check=r=>{WC(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),ia=w("$ZodNumber",(e,t)=>{me.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ay,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),Fl=w("$ZodNumber",(e,t)=>{Zy.init(e,t),ia.init(e,t)}),Ul=w("$ZodBoolean",(e,t)=>{me.init(e,t),e._zod.pattern=Oy,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),Bl=w("$ZodNull",(e,t)=>{me.init(e,t),e._zod.pattern=Ny,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),Vl=w("$ZodUnknown",(e,t)=>{me.init(e,t),e._zod.parse=r=>r}),Hl=w("$ZodNever",(e,t)=>{me.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});Gl=w("$ZodArray",(e,t)=>{me.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let i=[];for(let s=0;s<o.length;s++){let a=o[s],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?i.push(c.then(u=>Xy(u,r,s))):Xy(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});sa=w("$ZodObject",(e,t)=>{me.init(e,t);let r=_i(()=>{let l=Object.keys(t.shape);for(let f of l)if(!(t.shape[f]instanceof me))throw new Error(`Invalid element at key "${f}": expected a Zod schema`);let d=nl(t.shape);return{shape:t.shape,keys:l,keySet:new Set(l),numKeys:l.length,optionalKeys:new Set(d)}});ve(e._zod,"propValues",()=>{let l=t.shape,d={};for(let f in l){let h=l[f]._zod;if(h.values){d[f]??(d[f]=new Set);for(let g of h.values)d[f].add(g)}}return d});let n=l=>{let d=new na(["shape","payload","ctx"]),f=r.value,h=v=>{let k=Nn(v);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};d.write("const input = payload.value;");let g=Object.create(null),y=0;for(let v of f.keys)g[v]=`key_${y++}`;d.write("const newResult = {}");for(let v of f.keys)if(f.optionalKeys.has(v)){let k=g[v];d.write(`const ${k} = ${h(v)};`);let C=Nn(v);d.write(`
4
4
  if (${k}.issues.length) {
5
5
  if (input[${C}] === undefined) {
6
6
  if (${C} in input) {
@@ -19,70 +19,70 @@
19
19
  } else {
20
20
  newResult[${C}] = ${k}.value;
21
21
  }
22
- `)}else{let k=m[v];d.write(`const ${k} = ${h(v)};`),d.write(`
22
+ `)}else{let k=g[v];d.write(`const ${k} = ${h(v)};`),d.write(`
23
23
  if (${k}.issues.length) payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
24
24
  ...iss,
25
- path: iss.path ? [${Rn(v)}, ...iss.path] : [${Rn(v)}]
26
- })));`),d.write(`newResult[${Rn(v)}] = ${k}.value`)}d.write("payload.value = newResult;"),d.write("return payload;");let b=d.compile();return(v,k)=>b(l,v,k)},o,i=go,s=!Bs.jitless,c=s&&Qu.value,u=t.catchall,p;e._zod.parse=(l,d)=>{p??(p=r.value);let f=l.value;if(!i(f))return l.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),l;let h=[];if(s&&c&&d?.async===!1&&d.jitless!==!0)o||(o=n(t.shape)),l=o(l,d);else{l.value={};let k=p.shape;for(let C of p.keys){let T=k[C],U=T._zod.run({value:f[C],issues:[]},d),Y=T._zod.optin==="optional"&&T._zod.optout==="optional";U instanceof Promise?h.push(U.then(Ce=>Y?Hy(Ce,l,C,f):Xs(Ce,l,C))):Y?Hy(U,l,C,f):Xs(U,l,C)}}if(!u)return h.length?Promise.all(h).then(()=>l):l;let m=[],y=p.keySet,b=u._zod,v=b.def.type;for(let k of Object.keys(f)){if(y.has(k))continue;if(v==="never"){m.push(k);continue}let C=b.run({value:f[k],issues:[]},d);C instanceof Promise?h.push(C.then(T=>Xs(T,l,k))):Xs(C,l,k)}return m.length&&l.issues.push({code:"unrecognized_keys",keys:m,input:f,inst:e}),h.length?Promise.all(h).then(()=>l):l}});ra=w("$ZodUnion",(e,t)=>{he.init(e,t),ye(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ye(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ye(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ye(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${r.map(n=>gi(n.source)).join("|")})$`)}}),e._zod.parse=(r,n)=>{let o=!1,i=[];for(let s of t.options){let a=s._zod.run({value:r.value,issues:[]},n);if(a instanceof Promise)i.push(a),o=!0;else{if(a.issues.length===0)return a;i.push(a)}}return o?Promise.all(i).then(s=>Gy(s,r,e,n)):Gy(i,r,e,n)}}),Vl=w("$ZodDiscriminatedUnion",(e,t)=>{ra.init(e,t);let r=e._zod.parse;ye(e._zod,"propValues",()=>{let o={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){o[a]||(o[a]=new Set);for(let u of c)o[a].add(u)}}return o});let n=hi(()=>{let o=t.options,i=new Map;for(let s of o){let a=s._zod.propValues[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});e._zod.parse=(o,i)=>{let s=o.value;if(!go(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let a=n.value.get(s?.[t.discriminator]);return a?a._zod.run(o,i):t.unionFallback?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),o)}}),Hl=w("$ZodIntersection",(e,t)=>{he.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>Wy(r,c,u)):Wy(r,i,s)}});Gl=w("$ZodRecord",(e,t)=>{he.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!yo(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let i=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=t.valueType._zod.run({value:o[c],issues:[]},n);u instanceof Promise?i.push(u.then(p=>{p.issues.length&&r.issues.push(...cr(c,p.issues)),r.value[c]=p.value})):(u.issues.length&&r.issues.push(...cr(c,u.issues)),r.value[c]=u.value)}let a;for(let c in o)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:a})}else{r.value={};for(let s of Reflect.ownKeys(o)){if(s==="__proto__")continue;let a=t.keyType._zod.run({value:s,issues:[]},n);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(u=>Ht(u,n,$t())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}let c=t.valueType._zod.run({value:o[s],issues:[]},n);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...cr(s,u.issues)),r.value[a.value]=u.value})):(c.issues.length&&r.issues.push(...cr(s,c.issues)),r.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Wl=w("$ZodEnum",(e,t)=>{he.init(e,t);let r=fi(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(n=>Xu.has(typeof n)).map(n=>typeof n=="string"?Vr(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{let i=n.value;return e._zod.values.has(i)||n.issues.push({code:"invalid_value",values:r,input:i,inst:e}),n}}),Kl=w("$ZodLiteral",(e,t)=>{he.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Vr(r):r?r.toString():String(r)).join("|")})$`),e._zod.parse=(r,n)=>{let o=r.value;return e._zod.values.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),Jl=w("$ZodTransform",(e,t)=>{he.init(e,t),e._zod.parse=(r,n)=>{let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new Sr;return r.value=o,r}}),Yl=w("$ZodOptional",(e,t)=>{he.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ye(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ye(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${gi(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(r,n):r.value===void 0?r:t.innerType._zod.run(r,n)}),Ql=w("$ZodNullable",(e,t)=>{he.init(e,t),ye(e._zod,"optin",()=>t.innerType._zod.optin),ye(e._zod,"optout",()=>t.innerType._zod.optout),ye(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${gi(r.source)}|null)$`):void 0}),ye(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),Xl=w("$ZodDefault",(e,t)=>{he.init(e,t),e._zod.optin="optional",ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Ky(i,t)):Ky(o,t)}});ep=w("$ZodPrefault",(e,t)=>{he.init(e,t),e._zod.optin="optional",ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),tp=w("$ZodNonOptional",(e,t)=>{he.init(e,t),ye(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Jy(i,e)):Jy(o,e)}});rp=w("$ZodCatch",(e,t)=>{he.init(e,t),e._zod.optin="optional",ye(e._zod,"optout",()=>t.innerType._zod.optout),ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Ht(s,n,$t()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>Ht(i,n,$t()))},input:r.value}),r.issues=[]),r)}}),np=w("$ZodPipe",(e,t)=>{he.init(e,t),ye(e._zod,"values",()=>t.in._zod.values),ye(e._zod,"optin",()=>t.in._zod.optin),ye(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(r,n)=>{let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>Yy(i,t,n)):Yy(o,t,n)}});op=w("$ZodReadonly",(e,t)=>{he.init(e,t),ye(e._zod,"propValues",()=>t.innerType._zod.propValues),ye(e._zod,"values",()=>t.innerType._zod.values),ye(e._zod,"optin",()=>t.innerType._zod.optin),ye(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(Qy):Qy(o)}});ip=w("$ZodCustom",(e,t)=>{Fe.init(e,t),he.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>Xy(i,r,n,e));Xy(o,r,n,e)}})});function s_(){return{localeError:qC()}}var ZC,qC,a_=_(()=>{ur();ZC=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},qC=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${ZC(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${Gs(n.values[0])}`:`Invalid option: expected one of ${Vs(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",i=t(n.origin);return i?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",i=t(n.origin);return i?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${i.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${Vs(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}}});var na=_(()=>{});function c_(){return new xi}var FC,UC,xi,Hr,ap=_(()=>{FC=Symbol("ZodOutput"),UC=Symbol("ZodInput"),xi=class{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){let n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};return delete n.id,{...n,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}};Hr=c_()});function cp(e,t){return new e({type:"string",...q(t)})}function up(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...q(t)})}function oa(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...q(t)})}function lp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...q(t)})}function pp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...q(t)})}function dp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...q(t)})}function fp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...q(t)})}function hp(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...q(t)})}function mp(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...q(t)})}function gp(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...q(t)})}function yp(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...q(t)})}function _p(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...q(t)})}function vp(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...q(t)})}function bp(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...q(t)})}function xp(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...q(t)})}function wp(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...q(t)})}function kp(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...q(t)})}function Sp(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...q(t)})}function $p(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...q(t)})}function Tp(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...q(t)})}function Pp(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...q(t)})}function Cp(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...q(t)})}function Ep(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...q(t)})}function u_(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...q(t)})}function l_(e,t){return new e({type:"string",format:"date",check:"string_format",...q(t)})}function p_(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...q(t)})}function d_(e,t){return new e({type:"string",format:"duration",check:"string_format",...q(t)})}function Ip(e,t){return new e({type:"number",checks:[],...q(t)})}function zp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...q(t)})}function Rp(e,t){return new e({type:"boolean",...q(t)})}function Ap(e,t){return new e({type:"null",...q(t)})}function Op(e){return new e({type:"unknown"})}function Np(e,t){return new e({type:"never",...q(t)})}function ia(e,t){return new ml({check:"less_than",...q(t),value:e,inclusive:!1})}function wi(e,t){return new ml({check:"less_than",...q(t),value:e,inclusive:!0})}function sa(e,t){return new gl({check:"greater_than",...q(t),value:e,inclusive:!1})}function ki(e,t){return new gl({check:"greater_than",...q(t),value:e,inclusive:!0})}function aa(e,t){return new zy({check:"multiple_of",...q(t),value:e})}function ca(e,t){return new Ay({check:"max_length",...q(t),maximum:e})}function _o(e,t){return new Oy({check:"min_length",...q(t),minimum:e})}function ua(e,t){return new Ny({check:"length_equals",...q(t),length:e})}function Dp(e,t){return new Dy({check:"string_format",format:"regex",...q(t),pattern:e})}function jp(e){return new jy({check:"string_format",format:"lowercase",...q(e)})}function Mp(e){return new My({check:"string_format",format:"uppercase",...q(e)})}function Lp(e,t){return new Ly({check:"string_format",format:"includes",...q(t),includes:e})}function Zp(e,t){return new Zy({check:"string_format",format:"starts_with",...q(t),prefix:e})}function qp(e,t){return new qy({check:"string_format",format:"ends_with",...q(t),suffix:e})}function Dn(e){return new Fy({check:"overwrite",tx:e})}function Fp(e){return Dn(t=>t.normalize(e))}function Up(){return Dn(e=>e.trim())}function Bp(){return Dn(e=>e.toLowerCase())}function Vp(){return Dn(e=>e.toUpperCase())}function f_(e,t,r){return new e({type:"array",element:t,...q(r)})}function Hp(e,t,r){let n=q(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function Gp(e,t,r){return new e({type:"custom",check:"custom",fn:t,...q(r)})}var h_=_(()=>{Ys();ur()});var m_=_(()=>{});function Wp(e,t){if(e instanceof xi){let n=new la(t),o={};for(let a of e._idmap.entries()){let[c,u]=a;n.process(u)}let i={},s={registry:e,uri:t?.uri,defs:o};for(let a of e._idmap.entries()){let[c,u]=a;i[c]=n.emit(u,{...t,external:s})}if(Object.keys(o).length>0){let a=n.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:o}}return{schemas:i}}let r=new la(t);return r.process(e),r.emit(e,t)}function Me(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;switch(o.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Me(o.element,r);case"object":{for(let i in o.shape)if(Me(o.shape[i],r))return!0;return!1}case"union":{for(let i of o.options)if(Me(i,r))return!0;return!1}case"intersection":return Me(o.left,r)||Me(o.right,r);case"tuple":{for(let i of o.items)if(Me(i,r))return!0;return!!(o.rest&&Me(o.rest,r))}case"record":return Me(o.keyType,r)||Me(o.valueType,r);case"map":return Me(o.keyType,r)||Me(o.valueType,r);case"set":return Me(o.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Me(o.innerType,r);case"lazy":return Me(o.getter(),r);case"default":return Me(o.innerType,r);case"prefault":return Me(o.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Me(o.in,r)||Me(o.out,r);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${o.type}`)}var la,g_=_(()=>{ap();ur();la=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Hr,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,r={path:[],schemaPath:[]}){var n;let o=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);let c=t._zod.toJSONSchema?.();if(c)a.schema=c;else{let l={...r,schemaPath:[...r.schemaPath,t],path:r.path},d=t._zod.parent;if(d)a.ref=d,this.process(d,l),this.seen.get(d).isParent=!0;else{let f=a.schema;switch(o.type){case"string":{let h=f;h.type="string";let{minimum:m,maximum:y,format:b,patterns:v,contentEncoding:k}=t._zod.bag;if(typeof m=="number"&&(h.minLength=m),typeof y=="number"&&(h.maxLength=y),b&&(h.format=i[b]??b,h.format===""&&delete h.format),k&&(h.contentEncoding=k),v&&v.size>0){let C=[...v];C.length===1?h.pattern=C[0].source:C.length>1&&(a.schema.allOf=[...C.map(T=>({...this.target==="draft-7"?{type:"string"}:{},pattern:T.source}))])}break}case"number":{let h=f,{minimum:m,maximum:y,format:b,multipleOf:v,exclusiveMaximum:k,exclusiveMinimum:C}=t._zod.bag;typeof b=="string"&&b.includes("int")?h.type="integer":h.type="number",typeof C=="number"&&(h.exclusiveMinimum=C),typeof m=="number"&&(h.minimum=m,typeof C=="number"&&(C>=m?delete h.minimum:delete h.exclusiveMinimum)),typeof k=="number"&&(h.exclusiveMaximum=k),typeof y=="number"&&(h.maximum=y,typeof k=="number"&&(k<=y?delete h.maximum:delete h.exclusiveMaximum)),typeof v=="number"&&(h.multipleOf=v);break}case"boolean":{let h=f;h.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{f.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{f.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let h=f,{minimum:m,maximum:y}=t._zod.bag;typeof m=="number"&&(h.minItems=m),typeof y=="number"&&(h.maxItems=y),h.type="array",h.items=this.process(o.element,{...l,path:[...l.path,"items"]});break}case"object":{let h=f;h.type="object",h.properties={};let m=o.shape;for(let v in m)h.properties[v]=this.process(m[v],{...l,path:[...l.path,"properties",v]});let y=new Set(Object.keys(m)),b=new Set([...y].filter(v=>{let k=o.shape[v]._zod;return this.io==="input"?k.optin===void 0:k.optout===void 0}));b.size>0&&(h.required=Array.from(b)),o.catchall?._zod.def.type==="never"?h.additionalProperties=!1:o.catchall?o.catchall&&(h.additionalProperties=this.process(o.catchall,{...l,path:[...l.path,"additionalProperties"]})):this.io==="output"&&(h.additionalProperties=!1);break}case"union":{let h=f;h.anyOf=o.options.map((m,y)=>this.process(m,{...l,path:[...l.path,"anyOf",y]}));break}case"intersection":{let h=f,m=this.process(o.left,{...l,path:[...l.path,"allOf",0]}),y=this.process(o.right,{...l,path:[...l.path,"allOf",1]}),b=k=>"allOf"in k&&Object.keys(k).length===1,v=[...b(m)?m.allOf:[m],...b(y)?y.allOf:[y]];h.allOf=v;break}case"tuple":{let h=f;h.type="array";let m=o.items.map((v,k)=>this.process(v,{...l,path:[...l.path,"prefixItems",k]}));if(this.target==="draft-2020-12"?h.prefixItems=m:h.items=m,o.rest){let v=this.process(o.rest,{...l,path:[...l.path,"items"]});this.target==="draft-2020-12"?h.items=v:h.additionalItems=v}o.rest&&(h.items=this.process(o.rest,{...l,path:[...l.path,"items"]}));let{minimum:y,maximum:b}=t._zod.bag;typeof y=="number"&&(h.minItems=y),typeof b=="number"&&(h.maxItems=b);break}case"record":{let h=f;h.type="object",h.propertyNames=this.process(o.keyType,{...l,path:[...l.path,"propertyNames"]}),h.additionalProperties=this.process(o.valueType,{...l,path:[...l.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let h=f,m=fi(o.entries);m.every(y=>typeof y=="number")&&(h.type="number"),m.every(y=>typeof y=="string")&&(h.type="string"),h.enum=m;break}case"literal":{let h=f,m=[];for(let y of o.values)if(y===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof y=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");m.push(Number(y))}else m.push(y);if(m.length!==0)if(m.length===1){let y=m[0];h.type=y===null?"null":typeof y,h.const=y}else m.every(y=>typeof y=="number")&&(h.type="number"),m.every(y=>typeof y=="string")&&(h.type="string"),m.every(y=>typeof y=="boolean")&&(h.type="string"),m.every(y=>y===null)&&(h.type="null"),h.enum=m;break}case"file":{let h=f,m={type:"string",format:"binary",contentEncoding:"binary"},{minimum:y,maximum:b,mime:v}=t._zod.bag;y!==void 0&&(m.minLength=y),b!==void 0&&(m.maxLength=b),v?v.length===1?(m.contentMediaType=v[0],Object.assign(h,m)):h.anyOf=v.map(k=>({...m,contentMediaType:k})):Object.assign(h,m);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let h=this.process(o.innerType,l);f.anyOf=[h,{type:"null"}];break}case"nonoptional":{this.process(o.innerType,l),a.ref=o.innerType;break}case"success":{let h=f;h.type="boolean";break}case"default":{this.process(o.innerType,l),a.ref=o.innerType,f.default=JSON.parse(JSON.stringify(o.defaultValue));break}case"prefault":{this.process(o.innerType,l),a.ref=o.innerType,this.io==="input"&&(f._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break}case"catch":{this.process(o.innerType,l),a.ref=o.innerType;let h;try{h=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}f.default=h;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let h=f,m=t._zod.pattern;if(!m)throw new Error("Pattern not found in template literal");h.type="string",h.pattern=m.source;break}case"pipe":{let h=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(h,l),a.ref=h;break}case"readonly":{this.process(o.innerType,l),a.ref=o.innerType,f.readOnly=!0;break}case"promise":{this.process(o.innerType,l),a.ref=o.innerType;break}case"optional":{this.process(o.innerType,l),a.ref=o.innerType;break}case"lazy":{let h=t._zod.innerType;this.process(h,l),a.ref=h;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let u=this.metadataRegistry.get(t);return u&&Object.assign(a.schema,u),this.io==="input"&&Me(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){let n={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},o=this.seen.get(t);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=p=>{let l=this.target==="draft-2020-12"?"$defs":"definitions";if(n.external){let m=n.external.registry.get(p[0])?.id,y=n.external.uri??(v=>v);if(m)return{ref:y(m)};let b=p[1].defId??p[1].schema.id??`schema${this.counter++}`;return p[1].defId=b,{defId:b,ref:`${y("__shared")}#/${l}/${b}`}}if(p[1]===o)return{ref:"#"};let f=`#/${l}/`,h=p[1].schema.id??`__schema${this.counter++}`;return{defId:h,ref:f+h}},s=p=>{if(p[1].schema.$ref)return;let l=p[1],{ref:d,defId:f}=i(p);l.def={...l.schema},f&&(l.defId=f);let h=l.schema;for(let m in h)delete h[m];h.$ref=d};if(n.cycles==="throw")for(let p of this.seen.entries()){let l=p[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
25
+ path: iss.path ? [${Nn(v)}, ...iss.path] : [${Nn(v)}]
26
+ })));`),d.write(`newResult[${Nn(v)}] = ${k}.value`)}d.write("payload.value = newResult;"),d.write("return payload;");let b=d.compile();return(v,k)=>b(l,v,k)},o,i=bo,s=!Ks.jitless,c=s&&tl.value,u=t.catchall,p;e._zod.parse=(l,d)=>{p??(p=r.value);let f=l.value;if(!i(f))return l.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),l;let h=[];if(s&&c&&d?.async===!1&&d.jitless!==!0)o||(o=n(t.shape)),l=o(l,d);else{l.value={};let k=p.shape;for(let C of p.keys){let T=k[C],F=T._zod.run({value:f[C],issues:[]},d),Y=T._zod.optin==="optional"&&T._zod.optout==="optional";F instanceof Promise?h.push(F.then(Ie=>Y?e_(Ie,l,C,f):oa(Ie,l,C))):Y?e_(F,l,C,f):oa(F,l,C)}}if(!u)return h.length?Promise.all(h).then(()=>l):l;let g=[],y=p.keySet,b=u._zod,v=b.def.type;for(let k of Object.keys(f)){if(y.has(k))continue;if(v==="never"){g.push(k);continue}let C=b.run({value:f[k],issues:[]},d);C instanceof Promise?h.push(C.then(T=>oa(T,l,k))):oa(C,l,k)}return g.length&&l.issues.push({code:"unrecognized_keys",keys:g,input:f,inst:e}),h.length?Promise.all(h).then(()=>l):l}});aa=w("$ZodUnion",(e,t)=>{me.init(e,t),ve(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ve(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ve(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ve(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${r.map(n=>bi(n.source)).join("|")})$`)}}),e._zod.parse=(r,n)=>{let o=!1,i=[];for(let s of t.options){let a=s._zod.run({value:r.value,issues:[]},n);if(a instanceof Promise)i.push(a),o=!0;else{if(a.issues.length===0)return a;i.push(a)}}return o?Promise.all(i).then(s=>t_(s,r,e,n)):t_(i,r,e,n)}}),Wl=w("$ZodDiscriminatedUnion",(e,t)=>{aa.init(e,t);let r=e._zod.parse;ve(e._zod,"propValues",()=>{let o={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){o[a]||(o[a]=new Set);for(let u of c)o[a].add(u)}}return o});let n=_i(()=>{let o=t.options,i=new Map;for(let s of o){let a=s._zod.propValues[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});e._zod.parse=(o,i)=>{let s=o.value;if(!bo(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let a=n.value.get(s?.[t.discriminator]);return a?a._zod.run(o,i):t.unionFallback?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),o)}}),Kl=w("$ZodIntersection",(e,t)=>{me.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>r_(r,c,u)):r_(r,i,s)}});Jl=w("$ZodRecord",(e,t)=>{me.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!xo(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let i=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=t.valueType._zod.run({value:o[c],issues:[]},n);u instanceof Promise?i.push(u.then(p=>{p.issues.length&&r.issues.push(...pr(c,p.issues)),r.value[c]=p.value})):(u.issues.length&&r.issues.push(...pr(c,u.issues)),r.value[c]=u.value)}let a;for(let c in o)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:a})}else{r.value={};for(let s of Reflect.ownKeys(o)){if(s==="__proto__")continue;let a=t.keyType._zod.run({value:s,issues:[]},n);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(u=>Kt(u,n,Tt())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}let c=t.valueType._zod.run({value:o[s],issues:[]},n);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...pr(s,u.issues)),r.value[a.value]=u.value})):(c.issues.length&&r.issues.push(...pr(s,c.issues)),r.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Yl=w("$ZodEnum",(e,t)=>{me.init(e,t);let r=yi(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(n=>rl.has(typeof n)).map(n=>typeof n=="string"?Kr(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{let i=n.value;return e._zod.values.has(i)||n.issues.push({code:"invalid_value",values:r,input:i,inst:e}),n}}),Ql=w("$ZodLiteral",(e,t)=>{me.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Kr(r):r?r.toString():String(r)).join("|")})$`),e._zod.parse=(r,n)=>{let o=r.value;return e._zod.values.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),Xl=w("$ZodTransform",(e,t)=>{me.init(e,t),e._zod.parse=(r,n)=>{let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new Pr;return r.value=o,r}}),ep=w("$ZodOptional",(e,t)=>{me.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ve(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${bi(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(r,n):r.value===void 0?r:t.innerType._zod.run(r,n)}),tp=w("$ZodNullable",(e,t)=>{me.init(e,t),ve(e._zod,"optin",()=>t.innerType._zod.optin),ve(e._zod,"optout",()=>t.innerType._zod.optout),ve(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${bi(r.source)}|null)$`):void 0}),ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),rp=w("$ZodDefault",(e,t)=>{me.init(e,t),e._zod.optin="optional",ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>n_(i,t)):n_(o,t)}});np=w("$ZodPrefault",(e,t)=>{me.init(e,t),e._zod.optin="optional",ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),op=w("$ZodNonOptional",(e,t)=>{me.init(e,t),ve(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>o_(i,e)):o_(o,e)}});ip=w("$ZodCatch",(e,t)=>{me.init(e,t),e._zod.optin="optional",ve(e._zod,"optout",()=>t.innerType._zod.optout),ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Kt(s,n,Tt()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>Kt(i,n,Tt()))},input:r.value}),r.issues=[]),r)}}),sp=w("$ZodPipe",(e,t)=>{me.init(e,t),ve(e._zod,"values",()=>t.in._zod.values),ve(e._zod,"optin",()=>t.in._zod.optin),ve(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(r,n)=>{let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>i_(i,t,n)):i_(o,t,n)}});ap=w("$ZodReadonly",(e,t)=>{me.init(e,t),ve(e._zod,"propValues",()=>t.innerType._zod.propValues),ve(e._zod,"values",()=>t.innerType._zod.values),ve(e._zod,"optin",()=>t.innerType._zod.optin),ve(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s_):s_(o)}});cp=w("$ZodCustom",(e,t)=>{Ue.init(e,t),me.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>a_(i,r,n,e));a_(o,r,n,e)}})});function h_(){return{localeError:JC()}}var KC,JC,m_=_(()=>{dr();KC=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},JC=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${KC(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${Qs(n.values[0])}`:`Invalid option: expected one of ${Js(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",i=t(n.origin);return i?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",i=t(n.origin);return i?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${i.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${Js(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}}});var ca=_(()=>{});function g_(){return new $i}var YC,QC,$i,Jr,lp=_(()=>{YC=Symbol("ZodOutput"),QC=Symbol("ZodInput"),$i=class{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){let n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};return delete n.id,{...n,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}};Jr=g_()});function pp(e,t){return new e({type:"string",...q(t)})}function dp(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...q(t)})}function ua(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...q(t)})}function fp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...q(t)})}function hp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...q(t)})}function mp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...q(t)})}function gp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...q(t)})}function yp(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...q(t)})}function _p(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...q(t)})}function vp(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...q(t)})}function bp(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...q(t)})}function xp(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...q(t)})}function wp(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...q(t)})}function kp(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...q(t)})}function Sp(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...q(t)})}function $p(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...q(t)})}function Tp(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...q(t)})}function Pp(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...q(t)})}function Cp(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...q(t)})}function Ep(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...q(t)})}function Ip(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...q(t)})}function zp(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...q(t)})}function Rp(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...q(t)})}function y_(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...q(t)})}function __(e,t){return new e({type:"string",format:"date",check:"string_format",...q(t)})}function v_(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...q(t)})}function b_(e,t){return new e({type:"string",format:"duration",check:"string_format",...q(t)})}function Ap(e,t){return new e({type:"number",checks:[],...q(t)})}function Op(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...q(t)})}function Np(e,t){return new e({type:"boolean",...q(t)})}function Dp(e,t){return new e({type:"null",...q(t)})}function jp(e){return new e({type:"unknown"})}function Mp(e,t){return new e({type:"never",...q(t)})}function la(e,t){return new _l({check:"less_than",...q(t),value:e,inclusive:!1})}function Ti(e,t){return new _l({check:"less_than",...q(t),value:e,inclusive:!0})}function pa(e,t){return new vl({check:"greater_than",...q(t),value:e,inclusive:!1})}function Pi(e,t){return new vl({check:"greater_than",...q(t),value:e,inclusive:!0})}function da(e,t){return new Ly({check:"multiple_of",...q(t),value:e})}function fa(e,t){return new qy({check:"max_length",...q(t),maximum:e})}function wo(e,t){return new Fy({check:"min_length",...q(t),minimum:e})}function ha(e,t){return new Uy({check:"length_equals",...q(t),length:e})}function Lp(e,t){return new By({check:"string_format",format:"regex",...q(t),pattern:e})}function Zp(e){return new Vy({check:"string_format",format:"lowercase",...q(e)})}function qp(e){return new Hy({check:"string_format",format:"uppercase",...q(e)})}function Fp(e,t){return new Gy({check:"string_format",format:"includes",...q(t),includes:e})}function Up(e,t){return new Wy({check:"string_format",format:"starts_with",...q(t),prefix:e})}function Bp(e,t){return new Ky({check:"string_format",format:"ends_with",...q(t),suffix:e})}function Ln(e){return new Jy({check:"overwrite",tx:e})}function Vp(e){return Ln(t=>t.normalize(e))}function Hp(){return Ln(e=>e.trim())}function Gp(){return Ln(e=>e.toLowerCase())}function Wp(){return Ln(e=>e.toUpperCase())}function x_(e,t,r){return new e({type:"array",element:t,...q(r)})}function Kp(e,t,r){let n=q(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function Jp(e,t,r){return new e({type:"custom",check:"custom",fn:t,...q(r)})}var w_=_(()=>{ra();dr()});var k_=_(()=>{});function Yp(e,t){if(e instanceof $i){let n=new ma(t),o={};for(let a of e._idmap.entries()){let[c,u]=a;n.process(u)}let i={},s={registry:e,uri:t?.uri,defs:o};for(let a of e._idmap.entries()){let[c,u]=a;i[c]=n.emit(u,{...t,external:s})}if(Object.keys(o).length>0){let a=n.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:o}}return{schemas:i}}let r=new ma(t);return r.process(e),r.emit(e,t)}function Le(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;switch(o.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Le(o.element,r);case"object":{for(let i in o.shape)if(Le(o.shape[i],r))return!0;return!1}case"union":{for(let i of o.options)if(Le(i,r))return!0;return!1}case"intersection":return Le(o.left,r)||Le(o.right,r);case"tuple":{for(let i of o.items)if(Le(i,r))return!0;return!!(o.rest&&Le(o.rest,r))}case"record":return Le(o.keyType,r)||Le(o.valueType,r);case"map":return Le(o.keyType,r)||Le(o.valueType,r);case"set":return Le(o.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Le(o.innerType,r);case"lazy":return Le(o.getter(),r);case"default":return Le(o.innerType,r);case"prefault":return Le(o.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Le(o.in,r)||Le(o.out,r);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${o.type}`)}var ma,S_=_(()=>{lp();dr();ma=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Jr,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,r={path:[],schemaPath:[]}){var n;let o=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);let c=t._zod.toJSONSchema?.();if(c)a.schema=c;else{let l={...r,schemaPath:[...r.schemaPath,t],path:r.path},d=t._zod.parent;if(d)a.ref=d,this.process(d,l),this.seen.get(d).isParent=!0;else{let f=a.schema;switch(o.type){case"string":{let h=f;h.type="string";let{minimum:g,maximum:y,format:b,patterns:v,contentEncoding:k}=t._zod.bag;if(typeof g=="number"&&(h.minLength=g),typeof y=="number"&&(h.maxLength=y),b&&(h.format=i[b]??b,h.format===""&&delete h.format),k&&(h.contentEncoding=k),v&&v.size>0){let C=[...v];C.length===1?h.pattern=C[0].source:C.length>1&&(a.schema.allOf=[...C.map(T=>({...this.target==="draft-7"?{type:"string"}:{},pattern:T.source}))])}break}case"number":{let h=f,{minimum:g,maximum:y,format:b,multipleOf:v,exclusiveMaximum:k,exclusiveMinimum:C}=t._zod.bag;typeof b=="string"&&b.includes("int")?h.type="integer":h.type="number",typeof C=="number"&&(h.exclusiveMinimum=C),typeof g=="number"&&(h.minimum=g,typeof C=="number"&&(C>=g?delete h.minimum:delete h.exclusiveMinimum)),typeof k=="number"&&(h.exclusiveMaximum=k),typeof y=="number"&&(h.maximum=y,typeof k=="number"&&(k<=y?delete h.maximum:delete h.exclusiveMaximum)),typeof v=="number"&&(h.multipleOf=v);break}case"boolean":{let h=f;h.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{f.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{f.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let h=f,{minimum:g,maximum:y}=t._zod.bag;typeof g=="number"&&(h.minItems=g),typeof y=="number"&&(h.maxItems=y),h.type="array",h.items=this.process(o.element,{...l,path:[...l.path,"items"]});break}case"object":{let h=f;h.type="object",h.properties={};let g=o.shape;for(let v in g)h.properties[v]=this.process(g[v],{...l,path:[...l.path,"properties",v]});let y=new Set(Object.keys(g)),b=new Set([...y].filter(v=>{let k=o.shape[v]._zod;return this.io==="input"?k.optin===void 0:k.optout===void 0}));b.size>0&&(h.required=Array.from(b)),o.catchall?._zod.def.type==="never"?h.additionalProperties=!1:o.catchall?o.catchall&&(h.additionalProperties=this.process(o.catchall,{...l,path:[...l.path,"additionalProperties"]})):this.io==="output"&&(h.additionalProperties=!1);break}case"union":{let h=f;h.anyOf=o.options.map((g,y)=>this.process(g,{...l,path:[...l.path,"anyOf",y]}));break}case"intersection":{let h=f,g=this.process(o.left,{...l,path:[...l.path,"allOf",0]}),y=this.process(o.right,{...l,path:[...l.path,"allOf",1]}),b=k=>"allOf"in k&&Object.keys(k).length===1,v=[...b(g)?g.allOf:[g],...b(y)?y.allOf:[y]];h.allOf=v;break}case"tuple":{let h=f;h.type="array";let g=o.items.map((v,k)=>this.process(v,{...l,path:[...l.path,"prefixItems",k]}));if(this.target==="draft-2020-12"?h.prefixItems=g:h.items=g,o.rest){let v=this.process(o.rest,{...l,path:[...l.path,"items"]});this.target==="draft-2020-12"?h.items=v:h.additionalItems=v}o.rest&&(h.items=this.process(o.rest,{...l,path:[...l.path,"items"]}));let{minimum:y,maximum:b}=t._zod.bag;typeof y=="number"&&(h.minItems=y),typeof b=="number"&&(h.maxItems=b);break}case"record":{let h=f;h.type="object",h.propertyNames=this.process(o.keyType,{...l,path:[...l.path,"propertyNames"]}),h.additionalProperties=this.process(o.valueType,{...l,path:[...l.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let h=f,g=yi(o.entries);g.every(y=>typeof y=="number")&&(h.type="number"),g.every(y=>typeof y=="string")&&(h.type="string"),h.enum=g;break}case"literal":{let h=f,g=[];for(let y of o.values)if(y===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof y=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");g.push(Number(y))}else g.push(y);if(g.length!==0)if(g.length===1){let y=g[0];h.type=y===null?"null":typeof y,h.const=y}else g.every(y=>typeof y=="number")&&(h.type="number"),g.every(y=>typeof y=="string")&&(h.type="string"),g.every(y=>typeof y=="boolean")&&(h.type="string"),g.every(y=>y===null)&&(h.type="null"),h.enum=g;break}case"file":{let h=f,g={type:"string",format:"binary",contentEncoding:"binary"},{minimum:y,maximum:b,mime:v}=t._zod.bag;y!==void 0&&(g.minLength=y),b!==void 0&&(g.maxLength=b),v?v.length===1?(g.contentMediaType=v[0],Object.assign(h,g)):h.anyOf=v.map(k=>({...g,contentMediaType:k})):Object.assign(h,g);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let h=this.process(o.innerType,l);f.anyOf=[h,{type:"null"}];break}case"nonoptional":{this.process(o.innerType,l),a.ref=o.innerType;break}case"success":{let h=f;h.type="boolean";break}case"default":{this.process(o.innerType,l),a.ref=o.innerType,f.default=JSON.parse(JSON.stringify(o.defaultValue));break}case"prefault":{this.process(o.innerType,l),a.ref=o.innerType,this.io==="input"&&(f._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break}case"catch":{this.process(o.innerType,l),a.ref=o.innerType;let h;try{h=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}f.default=h;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let h=f,g=t._zod.pattern;if(!g)throw new Error("Pattern not found in template literal");h.type="string",h.pattern=g.source;break}case"pipe":{let h=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(h,l),a.ref=h;break}case"readonly":{this.process(o.innerType,l),a.ref=o.innerType,f.readOnly=!0;break}case"promise":{this.process(o.innerType,l),a.ref=o.innerType;break}case"optional":{this.process(o.innerType,l),a.ref=o.innerType;break}case"lazy":{let h=t._zod.innerType;this.process(h,l),a.ref=h;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let u=this.metadataRegistry.get(t);return u&&Object.assign(a.schema,u),this.io==="input"&&Le(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){let n={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},o=this.seen.get(t);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=p=>{let l=this.target==="draft-2020-12"?"$defs":"definitions";if(n.external){let g=n.external.registry.get(p[0])?.id,y=n.external.uri??(v=>v);if(g)return{ref:y(g)};let b=p[1].defId??p[1].schema.id??`schema${this.counter++}`;return p[1].defId=b,{defId:b,ref:`${y("__shared")}#/${l}/${b}`}}if(p[1]===o)return{ref:"#"};let f=`#/${l}/`,h=p[1].schema.id??`__schema${this.counter++}`;return{defId:h,ref:f+h}},s=p=>{if(p[1].schema.$ref)return;let l=p[1],{ref:d,defId:f}=i(p);l.def={...l.schema},f&&(l.defId=f);let h=l.schema;for(let g in h)delete h[g];h.$ref=d};if(n.cycles==="throw")for(let p of this.seen.entries()){let l=p[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
27
27
 
28
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let p of this.seen.entries()){let l=p[1];if(t===p[0]){s(p);continue}if(n.external){let f=n.external.registry.get(p[0])?.id;if(t!==p[0]&&f){s(p);continue}}if(this.metadataRegistry.get(p[0])?.id){s(p);continue}if(l.cycle){s(p);continue}if(l.count>1&&n.reused==="ref"){s(p);continue}}let a=(p,l)=>{let d=this.seen.get(p),f=d.def??d.schema,h={...f};if(d.ref===null)return;let m=d.ref;if(d.ref=null,m){a(m,l);let y=this.seen.get(m).schema;y.$ref&&l.target==="draft-7"?(f.allOf=f.allOf??[],f.allOf.push(y)):(Object.assign(f,y),Object.assign(f,h))}d.isParent||this.override({zodSchema:p,jsonSchema:f,path:d.path??[]})};for(let p of[...this.seen.entries()].reverse())a(p[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),n.external?.uri){let p=n.external.registry.get(t)?.id;if(!p)throw new Error("Schema is missing an `id` property");c.$id=n.external.uri(p)}Object.assign(c,o.def);let u=n.external?.defs??{};for(let p of this.seen.entries()){let l=p[1];l.def&&l.defId&&(u[l.defId]=l.def)}n.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}}});var y_=_(()=>{});var it=_(()=>{mo();dl();il();i_();Ys();_l();ur();Js();na();ap();yl();m_();h_();g_();y_()});var Kp=_(()=>{it()});function Jp(e,t){let r={type:"object",get shape(){return ne.assignProp(this,"shape",{...e}),this.shape},...ne.normalizeParams(t)};return new $E(r)}var SE,$E,__=_(()=>{it();it();Kp();SE=w("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");he.init(e,t),e.def=t,e.parse=(r,n)=>al(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>On(e,r,n),e.parseAsync=async(r,n)=>ul(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Nn(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>Tt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e))}),$E=w("ZodMiniObject",(e,t)=>{ta.init(e,t),SE.init(e,t),ne.defineLazy(e,"shape",()=>t.shape)})});var v_=_(()=>{});var b_=_(()=>{});var x_=_(()=>{});var w_=_(()=>{it();Kp();__();v_();it();na();b_();x_()});var k_=_(()=>{w_()});var Yp=_(()=>{k_()});function Ot(e){return!!e._zod}function Mn(e){let t=Object.values(e);if(t.length===0)return Jp({});let r=t.every(Ot),n=t.every(o=>!Ot(o));if(r)return Jp(e);if(n)return Hu(e);throw new Error("Mixed Zod versions detected in object shape.")}function Gr(e,t){return Ot(e)?On(e,t):e.safeParse(t)}async function pa(e,t){return Ot(e)?await Nn(e,t):await e.safeParseAsync(t)}function Wr(e){if(!e)return;let t;if(Ot(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function vo(e){if(e){if(typeof e=="object"){let t=e,r=e;if(!t._def&&!r._zod){let n=Object.values(e);if(n.length>0&&n.every(o=>typeof o=="object"&&o!==null&&(o._def!==void 0||o._zod!==void 0||typeof o.parse=="function")))return Mn(e)}}if(Ot(e)){let r=e._zod?.def;if(r&&(r.type==="object"||r.shape!==void 0))return e}else if(e.shape!==void 0)return e}}function da(e){if(e&&typeof e=="object"){if("message"in e&&typeof e.message=="string")return e.message;if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0){let t=e.issues[0];if(t&&typeof t=="object"&&"message"in t)return String(t.message)}try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function $_(e){return e.description}function T_(e){if(Ot(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function fa(e){if(Ot(e)){let i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}let r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let n=e.value;if(n!==void 0)return n}var Si=_(()=>{pi();Yp()});var Qp=_(()=>{it()});var $i={};Zr($i,{ZodISODate:()=>C_,ZodISODateTime:()=>P_,ZodISODuration:()=>I_,ZodISOTime:()=>E_,date:()=>ed,datetime:()=>Xp,duration:()=>rd,time:()=>td});function Xp(e){return u_(P_,e)}function ed(e){return l_(C_,e)}function td(e){return p_(E_,e)}function rd(e){return d_(I_,e)}var P_,C_,E_,I_,nd=_(()=>{it();od();P_=w("ZodISODateTime",(e,t)=>{e_.init(e,t),ke.init(e,t)});C_=w("ZodISODate",(e,t)=>{t_.init(e,t),ke.init(e,t)});E_=w("ZodISOTime",(e,t)=>{r_.init(e,t),ke.init(e,t)});I_=w("ZodISODuration",(e,t)=>{n_.init(e,t),ke.init(e,t)})});var z_,b8,Ti,id=_(()=>{it();it();z_=(e,t)=>{Ws.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>ol(e,r)},flatten:{value:r=>nl(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},b8=w("ZodError",z_),Ti=w("ZodError",z_,{Parent:Error})});var R_,A_,O_,N_,sd=_(()=>{it();id();R_=sl(Ti),A_=cl(Ti),O_=ll(Ti),N_=pl(Ti)});function x(e){return cp(NE,e)}function de(e){return Ip(Z_,e)}function j_(e){return zp(XE,e)}function Ze(e){return Rp(eI,e)}function ud(e){return Ap(tI,e)}function Se(){return Op(rI)}function oI(e){return Np(nI,e)}function ie(e,t){return f_(iI,e,t)}function z(e,t){let r={type:"object",get shape(){return ne.assignProp(this,"shape",{...e}),this.shape},...ne.normalizeParams(t)};return new q_(r)}function st(e,t){return new q_({type:"object",get shape(){return ne.assignProp(this,"shape",{...e}),this.shape},catchall:Se(),...ne.normalizeParams(t)})}function ve(e,t){return new F_({type:"union",options:e,...ne.normalizeParams(t)})}function ld(e,t,r){return new sI({type:"union",options:t,discriminator:e,...ne.normalizeParams(r)})}function ma(e,t){return new aI({type:"intersection",left:e,right:t})}function $e(e,t,r){return new cI({type:"record",keyType:e,valueType:t,...ne.normalizeParams(r)})}function yt(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ad({type:"enum",entries:r,...ne.normalizeParams(t)})}function N(e,t){return new uI({type:"literal",values:Array.isArray(e)?e:[e],...ne.normalizeParams(t)})}function U_(e){return new lI({type:"transform",transform:e})}function Ee(e){return new B_({type:"optional",innerType:e})}function M_(e){return new pI({type:"nullable",innerType:e})}function fI(e,t){return new dI({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}function mI(e,t){return new hI({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}function gI(e,t){return new V_({type:"nonoptional",innerType:e,...ne.normalizeParams(t)})}function _I(e,t){return new yI({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function cd(e,t){return new vI({type:"pipe",in:e,out:t})}function xI(e){return new bI({type:"readonly",innerType:e})}function wI(e){let t=new Fe({check:"custom"});return t._zod.check=e,t}function G_(e,t){return Hp(H_,e??(()=>!0),t)}function kI(e,t={}){return Gp(H_,e,t)}function SI(e){let t=wI(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(ne.issue(n,r.value,t._zod.def));else{let o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(ne.issue(o))}},e(r.value,r)));return t}function pd(e,t){return cd(U_(e),t)}var Ie,L_,NE,ke,DE,D_,ha,jE,ME,LE,ZE,qE,FE,UE,BE,VE,HE,GE,WE,KE,JE,YE,QE,Z_,XE,eI,tI,rI,nI,iI,q_,F_,sI,aI,cI,ad,uI,lI,B_,pI,dI,hI,V_,yI,vI,bI,H_,od=_(()=>{it();it();Qp();nd();sd();Ie=w("ZodType",(e,t)=>(he.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>Tt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>R_(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>O_(e,r,n),e.parseAsync=async(r,n)=>A_(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>N_(e,r,n),e.spa=e.safeParseAsync,e.refine=(r,n)=>e.check(kI(r,n)),e.superRefine=r=>e.check(SI(r)),e.overwrite=r=>e.check(Dn(r)),e.optional=()=>Ee(e),e.nullable=()=>M_(e),e.nullish=()=>Ee(M_(e)),e.nonoptional=r=>gI(e,r),e.array=()=>ie(e),e.or=r=>ve([e,r]),e.and=r=>ma(e,r),e.transform=r=>cd(e,U_(r)),e.default=r=>fI(e,r),e.prefault=r=>mI(e,r),e.catch=r=>_I(e,r),e.pipe=r=>cd(e,r),e.readonly=()=>xI(e),e.describe=r=>{let n=e.clone();return Hr.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Hr.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Hr.get(e);let n=e.clone();return Hr.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),L_=w("_ZodString",(e,t)=>{bi.init(e,t),Ie.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(Dp(...n)),e.includes=(...n)=>e.check(Lp(...n)),e.startsWith=(...n)=>e.check(Zp(...n)),e.endsWith=(...n)=>e.check(qp(...n)),e.min=(...n)=>e.check(_o(...n)),e.max=(...n)=>e.check(ca(...n)),e.length=(...n)=>e.check(ua(...n)),e.nonempty=(...n)=>e.check(_o(1,...n)),e.lowercase=n=>e.check(jp(n)),e.uppercase=n=>e.check(Mp(n)),e.trim=()=>e.check(Up()),e.normalize=(...n)=>e.check(Fp(...n)),e.toLowerCase=()=>e.check(Bp()),e.toUpperCase=()=>e.check(Vp())}),NE=w("ZodString",(e,t)=>{bi.init(e,t),L_.init(e,t),e.email=r=>e.check(up(DE,r)),e.url=r=>e.check(hp(jE,r)),e.jwt=r=>e.check(Ep(QE,r)),e.emoji=r=>e.check(mp(ME,r)),e.guid=r=>e.check(oa(D_,r)),e.uuid=r=>e.check(lp(ha,r)),e.uuidv4=r=>e.check(pp(ha,r)),e.uuidv6=r=>e.check(dp(ha,r)),e.uuidv7=r=>e.check(fp(ha,r)),e.nanoid=r=>e.check(gp(LE,r)),e.guid=r=>e.check(oa(D_,r)),e.cuid=r=>e.check(yp(ZE,r)),e.cuid2=r=>e.check(_p(qE,r)),e.ulid=r=>e.check(vp(FE,r)),e.base64=r=>e.check(Tp(KE,r)),e.base64url=r=>e.check(Pp(JE,r)),e.xid=r=>e.check(bp(UE,r)),e.ksuid=r=>e.check(xp(BE,r)),e.ipv4=r=>e.check(wp(VE,r)),e.ipv6=r=>e.check(kp(HE,r)),e.cidrv4=r=>e.check(Sp(GE,r)),e.cidrv6=r=>e.check($p(WE,r)),e.e164=r=>e.check(Cp(YE,r)),e.datetime=r=>e.check(Xp(r)),e.date=r=>e.check(ed(r)),e.time=r=>e.check(td(r)),e.duration=r=>e.check(rd(r))});ke=w("ZodStringFormat",(e,t)=>{_e.init(e,t),L_.init(e,t)}),DE=w("ZodEmail",(e,t)=>{wl.init(e,t),ke.init(e,t)}),D_=w("ZodGUID",(e,t)=>{bl.init(e,t),ke.init(e,t)}),ha=w("ZodUUID",(e,t)=>{xl.init(e,t),ke.init(e,t)}),jE=w("ZodURL",(e,t)=>{kl.init(e,t),ke.init(e,t)}),ME=w("ZodEmoji",(e,t)=>{Sl.init(e,t),ke.init(e,t)}),LE=w("ZodNanoID",(e,t)=>{$l.init(e,t),ke.init(e,t)}),ZE=w("ZodCUID",(e,t)=>{Tl.init(e,t),ke.init(e,t)}),qE=w("ZodCUID2",(e,t)=>{Pl.init(e,t),ke.init(e,t)}),FE=w("ZodULID",(e,t)=>{Cl.init(e,t),ke.init(e,t)}),UE=w("ZodXID",(e,t)=>{El.init(e,t),ke.init(e,t)}),BE=w("ZodKSUID",(e,t)=>{Il.init(e,t),ke.init(e,t)}),VE=w("ZodIPv4",(e,t)=>{zl.init(e,t),ke.init(e,t)}),HE=w("ZodIPv6",(e,t)=>{Rl.init(e,t),ke.init(e,t)}),GE=w("ZodCIDRv4",(e,t)=>{Al.init(e,t),ke.init(e,t)}),WE=w("ZodCIDRv6",(e,t)=>{Ol.init(e,t),ke.init(e,t)}),KE=w("ZodBase64",(e,t)=>{Nl.init(e,t),ke.init(e,t)}),JE=w("ZodBase64URL",(e,t)=>{Dl.init(e,t),ke.init(e,t)}),YE=w("ZodE164",(e,t)=>{jl.init(e,t),ke.init(e,t)}),QE=w("ZodJWT",(e,t)=>{Ml.init(e,t),ke.init(e,t)}),Z_=w("ZodNumber",(e,t)=>{ea.init(e,t),Ie.init(e,t),e.gt=(n,o)=>e.check(sa(n,o)),e.gte=(n,o)=>e.check(ki(n,o)),e.min=(n,o)=>e.check(ki(n,o)),e.lt=(n,o)=>e.check(ia(n,o)),e.lte=(n,o)=>e.check(wi(n,o)),e.max=(n,o)=>e.check(wi(n,o)),e.int=n=>e.check(j_(n)),e.safe=n=>e.check(j_(n)),e.positive=n=>e.check(sa(0,n)),e.nonnegative=n=>e.check(ki(0,n)),e.negative=n=>e.check(ia(0,n)),e.nonpositive=n=>e.check(wi(0,n)),e.multipleOf=(n,o)=>e.check(aa(n,o)),e.step=(n,o)=>e.check(aa(n,o)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});XE=w("ZodNumberFormat",(e,t)=>{Ll.init(e,t),Z_.init(e,t)});eI=w("ZodBoolean",(e,t)=>{Zl.init(e,t),Ie.init(e,t)});tI=w("ZodNull",(e,t)=>{ql.init(e,t),Ie.init(e,t)});rI=w("ZodUnknown",(e,t)=>{Fl.init(e,t),Ie.init(e,t)});nI=w("ZodNever",(e,t)=>{Ul.init(e,t),Ie.init(e,t)});iI=w("ZodArray",(e,t)=>{Bl.init(e,t),Ie.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(_o(r,n)),e.nonempty=r=>e.check(_o(1,r)),e.max=(r,n)=>e.check(ca(r,n)),e.length=(r,n)=>e.check(ua(r,n)),e.unwrap=()=>e.element});q_=w("ZodObject",(e,t)=>{ta.init(e,t),Ie.init(e,t),ne.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>yt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Se()}),e.loose=()=>e.clone({...e._zod.def,catchall:Se()}),e.strict=()=>e.clone({...e._zod.def,catchall:oI()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>ne.extend(e,r),e.merge=r=>ne.merge(e,r),e.pick=r=>ne.pick(e,r),e.omit=r=>ne.omit(e,r),e.partial=(...r)=>ne.partial(B_,e,r[0]),e.required=(...r)=>ne.required(V_,e,r[0])});F_=w("ZodUnion",(e,t)=>{ra.init(e,t),Ie.init(e,t),e.options=t.options});sI=w("ZodDiscriminatedUnion",(e,t)=>{F_.init(e,t),Vl.init(e,t)});aI=w("ZodIntersection",(e,t)=>{Hl.init(e,t),Ie.init(e,t)});cI=w("ZodRecord",(e,t)=>{Gl.init(e,t),Ie.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});ad=w("ZodEnum",(e,t)=>{Wl.init(e,t),Ie.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ad({...t,checks:[],...ne.normalizeParams(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ad({...t,checks:[],...ne.normalizeParams(o),entries:i})}});uI=w("ZodLiteral",(e,t)=>{Kl.init(e,t),Ie.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});lI=w("ZodTransform",(e,t)=>{Jl.init(e,t),Ie.init(e,t),e._zod.parse=(r,n)=>{r.addIssue=i=>{if(typeof i=="string")r.issues.push(ne.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),s.continue??(s.continue=!0),r.issues.push(ne.issue(s))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});B_=w("ZodOptional",(e,t)=>{Yl.init(e,t),Ie.init(e,t),e.unwrap=()=>e._zod.def.innerType});pI=w("ZodNullable",(e,t)=>{Ql.init(e,t),Ie.init(e,t),e.unwrap=()=>e._zod.def.innerType});dI=w("ZodDefault",(e,t)=>{Xl.init(e,t),Ie.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});hI=w("ZodPrefault",(e,t)=>{ep.init(e,t),Ie.init(e,t),e.unwrap=()=>e._zod.def.innerType});V_=w("ZodNonOptional",(e,t)=>{tp.init(e,t),Ie.init(e,t),e.unwrap=()=>e._zod.def.innerType});yI=w("ZodCatch",(e,t)=>{rp.init(e,t),Ie.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});vI=w("ZodPipe",(e,t)=>{np.init(e,t),Ie.init(e,t),e.in=t.in,e.out=t.out});bI=w("ZodReadonly",(e,t)=>{op.init(e,t),Ie.init(e,t)});H_=w("ZodCustom",(e,t)=>{ip.init(e,t),Ie.init(e,t)})});var W_=_(()=>{});var K_=_(()=>{});var J_=_(()=>{it();od();Qp();id();sd();W_();it();a_();na();nd();K_();$t(s_())});var Y_=_(()=>{J_()});var Q_=_(()=>{Y_()});function mv(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function gv(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var fd,X_,Kr,ya,Ue,ev,tv,D8,PI,CI,hd,Pt,Pi,rv,Be,Nt,Dt,Ve,_a,nv,md,ov,iv,gd,Ci,L,yd,sv,av,j8,va,EI,ba,II,Ei,bo,cv,zI,RI,AI,OI,NI,DI,_d,jI,MI,vd,xa,LI,ZI,wa,qI,Ii,zi,FI,Ri,xo,UI,Ai,ka,Sa,$a,M8,Ta,Pa,Ca,uv,lv,pv,bd,dv,Oi,wo,fv,BI,Ea,VI,Ia,HI,xd,GI,za,WI,KI,JI,YI,QI,XI,ez,tz,rz,nz,Ra,oz,iz,Aa,wd,kd,Sd,sz,az,cz,$d,uz,lz,pz,dz,fz,hv,Oa,hz,Na,L8,mz,ko,gz,Z8,Ni,yz,Td,_z,vz,bz,xz,wz,kz,Sz,ga,$z,Tz,Pz,Pd,Cd,Cz,Ez,Iz,zz,Rz,Az,Oz,Nz,Dz,jz,Mz,Lz,Zz,qz,Fz,Uz,Bz,Vz,Da,Hz,Gz,Wz,ja,Kz,Jz,Yz,Ed,Qz,q8,F8,U8,B8,V8,H8,O,dd,Di=_(()=>{Q_();fd="2025-11-25",X_=[fd,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Kr="io.modelcontextprotocol/related-task",ya="2.0",Ue=G_(e=>e!==null&&(typeof e=="object"||typeof e=="function")),ev=ve([x(),de().int()]),tv=x(),D8=st({ttl:ve([de(),ud()]).optional(),pollInterval:de().optional()}),PI=z({ttl:de().optional()}),CI=z({taskId:x()}),hd=st({progressToken:ev.optional(),[Kr]:CI.optional()}),Pt=z({_meta:hd.optional()}),Pi=Pt.extend({task:PI.optional()}),rv=e=>Pi.safeParse(e).success,Be=z({method:x(),params:Pt.loose().optional()}),Nt=z({_meta:hd.optional()}),Dt=z({method:x(),params:Nt.loose().optional()}),Ve=st({_meta:hd.optional()}),_a=ve([x(),de().int()]),nv=z({jsonrpc:N(ya),id:_a,...Be.shape}).strict(),md=e=>nv.safeParse(e).success,ov=z({jsonrpc:N(ya),...Dt.shape}).strict(),iv=e=>ov.safeParse(e).success,gd=z({jsonrpc:N(ya),id:_a,result:Ve}).strict(),Ci=e=>gd.safeParse(e).success;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(L||(L={}));yd=z({jsonrpc:N(ya),id:_a.optional(),error:z({code:de().int(),message:x(),data:Se().optional()})}).strict(),sv=e=>yd.safeParse(e).success,av=ve([nv,ov,gd,yd]),j8=ve([gd,yd]),va=Ve.strict(),EI=Nt.extend({requestId:_a.optional(),reason:x().optional()}),ba=Dt.extend({method:N("notifications/cancelled"),params:EI}),II=z({src:x(),mimeType:x().optional(),sizes:ie(x()).optional(),theme:yt(["light","dark"]).optional()}),Ei=z({icons:ie(II).optional()}),bo=z({name:x(),title:x().optional()}),cv=bo.extend({...bo.shape,...Ei.shape,version:x(),websiteUrl:x().optional(),description:x().optional()}),zI=ma(z({applyDefaults:Ze().optional()}),$e(x(),Se())),RI=pd(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ma(z({form:zI.optional(),url:Ue.optional()}),$e(x(),Se()).optional())),AI=st({list:Ue.optional(),cancel:Ue.optional(),requests:st({sampling:st({createMessage:Ue.optional()}).optional(),elicitation:st({create:Ue.optional()}).optional()}).optional()}),OI=st({list:Ue.optional(),cancel:Ue.optional(),requests:st({tools:st({call:Ue.optional()}).optional()}).optional()}),NI=z({experimental:$e(x(),Ue).optional(),sampling:z({context:Ue.optional(),tools:Ue.optional()}).optional(),elicitation:RI.optional(),roots:z({listChanged:Ze().optional()}).optional(),tasks:AI.optional()}),DI=Pt.extend({protocolVersion:x(),capabilities:NI,clientInfo:cv}),_d=Be.extend({method:N("initialize"),params:DI}),jI=z({experimental:$e(x(),Ue).optional(),logging:Ue.optional(),completions:Ue.optional(),prompts:z({listChanged:Ze().optional()}).optional(),resources:z({subscribe:Ze().optional(),listChanged:Ze().optional()}).optional(),tools:z({listChanged:Ze().optional()}).optional(),tasks:OI.optional()}),MI=Ve.extend({protocolVersion:x(),capabilities:jI,serverInfo:cv,instructions:x().optional()}),vd=Dt.extend({method:N("notifications/initialized"),params:Nt.optional()}),xa=Be.extend({method:N("ping"),params:Pt.optional()}),LI=z({progress:de(),total:Ee(de()),message:Ee(x())}),ZI=z({...Nt.shape,...LI.shape,progressToken:ev}),wa=Dt.extend({method:N("notifications/progress"),params:ZI}),qI=Pt.extend({cursor:tv.optional()}),Ii=Be.extend({params:qI.optional()}),zi=Ve.extend({nextCursor:tv.optional()}),FI=yt(["working","input_required","completed","failed","cancelled"]),Ri=z({taskId:x(),status:FI,ttl:ve([de(),ud()]),createdAt:x(),lastUpdatedAt:x(),pollInterval:Ee(de()),statusMessage:Ee(x())}),xo=Ve.extend({task:Ri}),UI=Nt.merge(Ri),Ai=Dt.extend({method:N("notifications/tasks/status"),params:UI}),ka=Be.extend({method:N("tasks/get"),params:Pt.extend({taskId:x()})}),Sa=Ve.merge(Ri),$a=Be.extend({method:N("tasks/result"),params:Pt.extend({taskId:x()})}),M8=Ve.loose(),Ta=Ii.extend({method:N("tasks/list")}),Pa=zi.extend({tasks:ie(Ri)}),Ca=Be.extend({method:N("tasks/cancel"),params:Pt.extend({taskId:x()})}),uv=Ve.merge(Ri),lv=z({uri:x(),mimeType:Ee(x()),_meta:$e(x(),Se()).optional()}),pv=lv.extend({text:x()}),bd=x().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),dv=lv.extend({blob:bd}),Oi=yt(["user","assistant"]),wo=z({audience:ie(Oi).optional(),priority:de().min(0).max(1).optional(),lastModified:$i.datetime({offset:!0}).optional()}),fv=z({...bo.shape,...Ei.shape,uri:x(),description:Ee(x()),mimeType:Ee(x()),annotations:wo.optional(),_meta:Ee(st({}))}),BI=z({...bo.shape,...Ei.shape,uriTemplate:x(),description:Ee(x()),mimeType:Ee(x()),annotations:wo.optional(),_meta:Ee(st({}))}),Ea=Ii.extend({method:N("resources/list")}),VI=zi.extend({resources:ie(fv)}),Ia=Ii.extend({method:N("resources/templates/list")}),HI=zi.extend({resourceTemplates:ie(BI)}),xd=Pt.extend({uri:x()}),GI=xd,za=Be.extend({method:N("resources/read"),params:GI}),WI=Ve.extend({contents:ie(ve([pv,dv]))}),KI=Dt.extend({method:N("notifications/resources/list_changed"),params:Nt.optional()}),JI=xd,YI=Be.extend({method:N("resources/subscribe"),params:JI}),QI=xd,XI=Be.extend({method:N("resources/unsubscribe"),params:QI}),ez=Nt.extend({uri:x()}),tz=Dt.extend({method:N("notifications/resources/updated"),params:ez}),rz=z({name:x(),description:Ee(x()),required:Ee(Ze())}),nz=z({...bo.shape,...Ei.shape,description:Ee(x()),arguments:Ee(ie(rz)),_meta:Ee(st({}))}),Ra=Ii.extend({method:N("prompts/list")}),oz=zi.extend({prompts:ie(nz)}),iz=Pt.extend({name:x(),arguments:$e(x(),x()).optional()}),Aa=Be.extend({method:N("prompts/get"),params:iz}),wd=z({type:N("text"),text:x(),annotations:wo.optional(),_meta:$e(x(),Se()).optional()}),kd=z({type:N("image"),data:bd,mimeType:x(),annotations:wo.optional(),_meta:$e(x(),Se()).optional()}),Sd=z({type:N("audio"),data:bd,mimeType:x(),annotations:wo.optional(),_meta:$e(x(),Se()).optional()}),sz=z({type:N("tool_use"),name:x(),id:x(),input:$e(x(),Se()),_meta:$e(x(),Se()).optional()}),az=z({type:N("resource"),resource:ve([pv,dv]),annotations:wo.optional(),_meta:$e(x(),Se()).optional()}),cz=fv.extend({type:N("resource_link")}),$d=ve([wd,kd,Sd,cz,az]),uz=z({role:Oi,content:$d}),lz=Ve.extend({description:x().optional(),messages:ie(uz)}),pz=Dt.extend({method:N("notifications/prompts/list_changed"),params:Nt.optional()}),dz=z({title:x().optional(),readOnlyHint:Ze().optional(),destructiveHint:Ze().optional(),idempotentHint:Ze().optional(),openWorldHint:Ze().optional()}),fz=z({taskSupport:yt(["required","optional","forbidden"]).optional()}),hv=z({...bo.shape,...Ei.shape,description:x().optional(),inputSchema:z({type:N("object"),properties:$e(x(),Ue).optional(),required:ie(x()).optional()}).catchall(Se()),outputSchema:z({type:N("object"),properties:$e(x(),Ue).optional(),required:ie(x()).optional()}).catchall(Se()).optional(),annotations:dz.optional(),execution:fz.optional(),_meta:$e(x(),Se()).optional()}),Oa=Ii.extend({method:N("tools/list")}),hz=zi.extend({tools:ie(hv)}),Na=Ve.extend({content:ie($d).default([]),structuredContent:$e(x(),Se()).optional(),isError:Ze().optional()}),L8=Na.or(Ve.extend({toolResult:Se()})),mz=Pi.extend({name:x(),arguments:$e(x(),Se()).optional()}),ko=Be.extend({method:N("tools/call"),params:mz}),gz=Dt.extend({method:N("notifications/tools/list_changed"),params:Nt.optional()}),Z8=z({autoRefresh:Ze().default(!0),debounceMs:de().int().nonnegative().default(300)}),Ni=yt(["debug","info","notice","warning","error","critical","alert","emergency"]),yz=Pt.extend({level:Ni}),Td=Be.extend({method:N("logging/setLevel"),params:yz}),_z=Nt.extend({level:Ni,logger:x().optional(),data:Se()}),vz=Dt.extend({method:N("notifications/message"),params:_z}),bz=z({name:x().optional()}),xz=z({hints:ie(bz).optional(),costPriority:de().min(0).max(1).optional(),speedPriority:de().min(0).max(1).optional(),intelligencePriority:de().min(0).max(1).optional()}),wz=z({mode:yt(["auto","required","none"]).optional()}),kz=z({type:N("tool_result"),toolUseId:x().describe("The unique identifier for the corresponding tool call."),content:ie($d).default([]),structuredContent:z({}).loose().optional(),isError:Ze().optional(),_meta:$e(x(),Se()).optional()}),Sz=ld("type",[wd,kd,Sd]),ga=ld("type",[wd,kd,Sd,sz,kz]),$z=z({role:Oi,content:ve([ga,ie(ga)]),_meta:$e(x(),Se()).optional()}),Tz=Pi.extend({messages:ie($z),modelPreferences:xz.optional(),systemPrompt:x().optional(),includeContext:yt(["none","thisServer","allServers"]).optional(),temperature:de().optional(),maxTokens:de().int(),stopSequences:ie(x()).optional(),metadata:Ue.optional(),tools:ie(hv).optional(),toolChoice:wz.optional()}),Pz=Be.extend({method:N("sampling/createMessage"),params:Tz}),Pd=Ve.extend({model:x(),stopReason:Ee(yt(["endTurn","stopSequence","maxTokens"]).or(x())),role:Oi,content:Sz}),Cd=Ve.extend({model:x(),stopReason:Ee(yt(["endTurn","stopSequence","maxTokens","toolUse"]).or(x())),role:Oi,content:ve([ga,ie(ga)])}),Cz=z({type:N("boolean"),title:x().optional(),description:x().optional(),default:Ze().optional()}),Ez=z({type:N("string"),title:x().optional(),description:x().optional(),minLength:de().optional(),maxLength:de().optional(),format:yt(["email","uri","date","date-time"]).optional(),default:x().optional()}),Iz=z({type:yt(["number","integer"]),title:x().optional(),description:x().optional(),minimum:de().optional(),maximum:de().optional(),default:de().optional()}),zz=z({type:N("string"),title:x().optional(),description:x().optional(),enum:ie(x()),default:x().optional()}),Rz=z({type:N("string"),title:x().optional(),description:x().optional(),oneOf:ie(z({const:x(),title:x()})),default:x().optional()}),Az=z({type:N("string"),title:x().optional(),description:x().optional(),enum:ie(x()),enumNames:ie(x()).optional(),default:x().optional()}),Oz=ve([zz,Rz]),Nz=z({type:N("array"),title:x().optional(),description:x().optional(),minItems:de().optional(),maxItems:de().optional(),items:z({type:N("string"),enum:ie(x())}),default:ie(x()).optional()}),Dz=z({type:N("array"),title:x().optional(),description:x().optional(),minItems:de().optional(),maxItems:de().optional(),items:z({anyOf:ie(z({const:x(),title:x()}))}),default:ie(x()).optional()}),jz=ve([Nz,Dz]),Mz=ve([Az,Oz,jz]),Lz=ve([Mz,Cz,Ez,Iz]),Zz=Pi.extend({mode:N("form").optional(),message:x(),requestedSchema:z({type:N("object"),properties:$e(x(),Lz),required:ie(x()).optional()})}),qz=Pi.extend({mode:N("url"),message:x(),elicitationId:x(),url:x().url()}),Fz=ve([Zz,qz]),Uz=Be.extend({method:N("elicitation/create"),params:Fz}),Bz=Nt.extend({elicitationId:x()}),Vz=Dt.extend({method:N("notifications/elicitation/complete"),params:Bz}),Da=Ve.extend({action:yt(["accept","decline","cancel"]),content:pd(e=>e===null?void 0:e,$e(x(),ve([x(),de(),Ze(),ie(x())])).optional())}),Hz=z({type:N("ref/resource"),uri:x()}),Gz=z({type:N("ref/prompt"),name:x()}),Wz=Pt.extend({ref:ve([Gz,Hz]),argument:z({name:x(),value:x()}),context:z({arguments:$e(x(),x()).optional()}).optional()}),ja=Be.extend({method:N("completion/complete"),params:Wz});Kz=Ve.extend({completion:st({values:ie(x()).max(100),total:Ee(de().int()),hasMore:Ee(Ze())})}),Jz=z({uri:x().startsWith("file://"),name:x().optional(),_meta:$e(x(),Se()).optional()}),Yz=Be.extend({method:N("roots/list"),params:Pt.optional()}),Ed=Ve.extend({roots:ie(Jz)}),Qz=Dt.extend({method:N("notifications/roots/list_changed"),params:Nt.optional()}),q8=ve([xa,_d,ja,Td,Aa,Ra,Ea,Ia,za,YI,XI,ko,Oa,ka,$a,Ta,Ca]),F8=ve([ba,wa,vd,Qz,Ai]),U8=ve([va,Pd,Cd,Da,Ed,Sa,Pa,xo]),B8=ve([xa,Pz,Uz,Yz,ka,$a,Ta,Ca]),V8=ve([ba,wa,vz,tz,KI,gz,pz,Ai,Vz]),H8=ve([va,MI,Kz,lz,oz,VI,HI,WI,Na,hz,Sa,Pa,xo]),O=class e extends Error{constructor(t,r,n){super(`MCP error ${t}: ${r}`),this.code=t,this.data=n,this.name="McpError"}static fromError(t,r,n){if(t===L.UrlElicitationRequired&&n){let o=n;if(o.elicitations)return new dd(o.elicitations,r)}return new e(t,r,n)}},dd=class extends O{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(L.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}});function Jr(e){return e==="completed"||e==="failed"||e==="cancelled"}var yv=_(()=>{});var vv,_v,bv,Ma=_(()=>{vv=Symbol("Let zodToJsonSchema decide on which parser to use"),_v={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},bv=e=>typeof e=="string"?{..._v,name:e}:{..._v,...e}});var xv,Id=_(()=>{Ma();xv=e=>{let t=bv(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,o])=>[o._def,{def:o._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}}});function zd(e,t,r,n){n?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function se(e,t,r,n,o){e[t]=r,zd(e,t,n,o)}var Yr=_(()=>{});var La,Za=_(()=>{La=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")}});function Te(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?La(t,e.currentPath):t.join("/")}}var jt=_(()=>{Za()});function wv(e,t){let r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==P.ZodAny&&(r.items=F(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&se(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&se(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(se(r,"minItems",e.exactLength.value,e.exactLength.message,t),se(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}var Rd=_(()=>{pi();Yr();Ne()});function kv(e,t){let r={type:"integer",format:"int64"};if(!e.checks)return r;for(let n of e.checks)switch(n.kind){case"min":t.target==="jsonSchema7"?n.inclusive?se(r,"minimum",n.value,n.message,t):se(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),se(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?se(r,"maximum",n.value,n.message,t):se(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),se(r,"maximum",n.value,n.message,t));break;case"multipleOf":se(r,"multipleOf",n.value,n.message,t);break}return r}var Ad=_(()=>{Yr()});function Sv(){return{type:"boolean"}}var Od=_(()=>{});function qa(e,t){return F(e.type._def,t)}var Fa=_(()=>{Ne()});var $v,Nd=_(()=>{Ne();$v=(e,t)=>F(e.innerType._def,t)});function Dd(e,t,r){let n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((o,i)=>Dd(e,t,o))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Xz(e,t)}}var Xz,jd=_(()=>{Yr();Xz=(e,t)=>{let r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(let n of e.checks)switch(n.kind){case"min":se(r,"minimum",n.value,n.message,t);break;case"max":se(r,"maximum",n.value,n.message,t);break}return r}});function Tv(e,t){return{...F(e.innerType._def,t),default:e.defaultValue()}}var Md=_(()=>{Ne()});function Pv(e,t){return t.effectStrategy==="input"?F(e.schema._def,t):Te(t)}var Ld=_(()=>{Ne();jt()});function Cv(e){return{type:"string",enum:Array.from(e.values)}}var Zd=_(()=>{});function Ev(e,t){let r=[F(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),F(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),n=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,o=[];return r.forEach(i=>{if(eR(i))o.push(...i.allOf),i.unevaluatedProperties===void 0&&(n=void 0);else{let s=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:a,...c}=i;s=c}else n=void 0;o.push(s)}}),o.length?{allOf:o,...n}:void 0}var eR,qd=_(()=>{Ne();eR=e=>"type"in e&&e.type==="string"?!1:"allOf"in e});function Iv(e,t){let r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}var Fd=_(()=>{});function Ua(e,t){let r={type:"string"};if(e.checks)for(let n of e.checks)switch(n.kind){case"min":se(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t);break;case"max":se(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"email":switch(t.emailStrategy){case"format:email":Wt(r,"email",n.message,t);break;case"format:idn-email":Wt(r,"idn-email",n.message,t);break;case"pattern:zod":at(r,Gt.email,n.message,t);break}break;case"url":Wt(r,"uri",n.message,t);break;case"uuid":Wt(r,"uuid",n.message,t);break;case"regex":at(r,n.regex,n.message,t);break;case"cuid":at(r,Gt.cuid,n.message,t);break;case"cuid2":at(r,Gt.cuid2,n.message,t);break;case"startsWith":at(r,RegExp(`^${Bd(n.value,t)}`),n.message,t);break;case"endsWith":at(r,RegExp(`${Bd(n.value,t)}$`),n.message,t);break;case"datetime":Wt(r,"date-time",n.message,t);break;case"date":Wt(r,"date",n.message,t);break;case"time":Wt(r,"time",n.message,t);break;case"duration":Wt(r,"duration",n.message,t);break;case"length":se(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t),se(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"includes":{at(r,RegExp(Bd(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&Wt(r,"ipv4",n.message,t),n.version!=="v4"&&Wt(r,"ipv6",n.message,t);break}case"base64url":at(r,Gt.base64url,n.message,t);break;case"jwt":at(r,Gt.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&at(r,Gt.ipv4Cidr,n.message,t),n.version!=="v4"&&at(r,Gt.ipv6Cidr,n.message,t);break}case"emoji":at(r,Gt.emoji(),n.message,t);break;case"ulid":{at(r,Gt.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Wt(r,"binary",n.message,t);break}case"contentEncoding:base64":{se(r,"contentEncoding","base64",n.message,t);break}case"pattern:zod":{at(r,Gt.base64,n.message,t);break}}break}case"nanoid":at(r,Gt.nanoid,n.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Bd(e,t){return t.patternStrategy==="escape"?rR(e):e}function rR(e){let t="";for(let r=0;r<e.length;r++)tR.has(e[r])||(t+="\\"),t+=e[r];return t}function Wt(e,t,r,n){e.format||e.anyOf?.some(o=>o.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&n.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):se(e,"format",t,r,n)}function at(e,t,r,n){e.pattern||e.allOf?.some(o=>o.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&n.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:zv(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):se(e,"pattern",zv(t,n),r,n)}function zv(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=r.i?e.source.toLowerCase():e.source,o="",i=!1,s=!1,a=!1;for(let c=0;c<n.length;c++){if(i){o+=n[c],i=!1;continue}if(r.i){if(s){if(n[c].match(/[a-z]/)){a?(o+=n[c],o+=`${n[c-2]}-${n[c]}`.toUpperCase(),a=!1):n[c+1]==="-"&&n[c+2]?.match(/[a-z]/)?(o+=n[c],a=!0):o+=`${n[c]}${n[c].toUpperCase()}`;continue}}else if(n[c].match(/[a-z]/)){o+=`[${n[c]}${n[c].toUpperCase()}]`;continue}}if(r.m){if(n[c]==="^"){o+=`(^|(?<=[\r
28
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let p of this.seen.entries()){let l=p[1];if(t===p[0]){s(p);continue}if(n.external){let f=n.external.registry.get(p[0])?.id;if(t!==p[0]&&f){s(p);continue}}if(this.metadataRegistry.get(p[0])?.id){s(p);continue}if(l.cycle){s(p);continue}if(l.count>1&&n.reused==="ref"){s(p);continue}}let a=(p,l)=>{let d=this.seen.get(p),f=d.def??d.schema,h={...f};if(d.ref===null)return;let g=d.ref;if(d.ref=null,g){a(g,l);let y=this.seen.get(g).schema;y.$ref&&l.target==="draft-7"?(f.allOf=f.allOf??[],f.allOf.push(y)):(Object.assign(f,y),Object.assign(f,h))}d.isParent||this.override({zodSchema:p,jsonSchema:f,path:d.path??[]})};for(let p of[...this.seen.entries()].reverse())a(p[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),n.external?.uri){let p=n.external.registry.get(t)?.id;if(!p)throw new Error("Schema is missing an `id` property");c.$id=n.external.uri(p)}Object.assign(c,o.def);let u=n.external?.defs??{};for(let p of this.seen.entries()){let l=p[1];l.def&&l.defId&&(u[l.defId]=l.def)}n.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}}});var $_=_(()=>{});var at=_(()=>{vo();ml();cl();f_();ra();xl();dr();ta();ca();lp();bl();k_();w_();S_();$_()});var Qp=_(()=>{at()});function Xp(e,t){let r={type:"object",get shape(){return ne.assignProp(this,"shape",{...e}),this.shape},...ne.normalizeParams(t)};return new OE(r)}var AE,OE,T_=_(()=>{at();at();Qp();AE=w("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");me.init(e,t),e.def=t,e.parse=(r,n)=>ll(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>jn(e,r,n),e.parseAsync=async(r,n)=>dl(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Mn(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>Pt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e))}),OE=w("ZodMiniObject",(e,t)=>{sa.init(e,t),AE.init(e,t),ne.defineLazy(e,"shape",()=>t.shape)})});var P_=_(()=>{});var C_=_(()=>{});var E_=_(()=>{});var I_=_(()=>{at();Qp();T_();P_();at();ca();C_();E_()});var z_=_(()=>{I_()});var ed=_(()=>{z_()});function Nt(e){return!!e._zod}function qn(e){let t=Object.values(e);if(t.length===0)return Xp({});let r=t.every(Nt),n=t.every(o=>!Nt(o));if(r)return Xp(e);if(n)return Ku(e);throw new Error("Mixed Zod versions detected in object shape.")}function Yr(e,t){return Nt(e)?jn(e,t):e.safeParse(t)}async function ga(e,t){return Nt(e)?await Mn(e,t):await e.safeParseAsync(t)}function Qr(e){if(!e)return;let t;if(Nt(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function ko(e){if(e){if(typeof e=="object"){let t=e,r=e;if(!t._def&&!r._zod){let n=Object.values(e);if(n.length>0&&n.every(o=>typeof o=="object"&&o!==null&&(o._def!==void 0||o._zod!==void 0||typeof o.parse=="function")))return qn(e)}}if(Nt(e)){let r=e._zod?.def;if(r&&(r.type==="object"||r.shape!==void 0))return e}else if(e.shape!==void 0)return e}}function ya(e){if(e&&typeof e=="object"){if("message"in e&&typeof e.message=="string")return e.message;if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0){let t=e.issues[0];if(t&&typeof t=="object"&&"message"in t)return String(t.message)}try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function A_(e){return e.description}function O_(e){if(Nt(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function _a(e){if(Nt(e)){let i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}let r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let n=e.value;if(n!==void 0)return n}var Ci=_(()=>{mi();ed()});var td=_(()=>{at()});var Ei={};Br(Ei,{ZodISODate:()=>D_,ZodISODateTime:()=>N_,ZodISODuration:()=>M_,ZodISOTime:()=>j_,date:()=>nd,datetime:()=>rd,duration:()=>id,time:()=>od});function rd(e){return y_(N_,e)}function nd(e){return __(D_,e)}function od(e){return v_(j_,e)}function id(e){return b_(M_,e)}var N_,D_,j_,M_,sd=_(()=>{at();ad();N_=w("ZodISODateTime",(e,t)=>{c_.init(e,t),Te.init(e,t)});D_=w("ZodISODate",(e,t)=>{u_.init(e,t),Te.init(e,t)});j_=w("ZodISOTime",(e,t)=>{l_.init(e,t),Te.init(e,t)});M_=w("ZodISODuration",(e,t)=>{p_.init(e,t),Te.init(e,t)})});var L_,L6,Ii,cd=_(()=>{at();at();L_=(e,t)=>{Xs.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>al(e,r)},flatten:{value:r=>sl(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},L6=w("ZodError",L_),Ii=w("ZodError",L_,{Parent:Error})});var Z_,q_,F_,U_,ud=_(()=>{at();cd();Z_=ul(Ii),q_=pl(Ii),F_=fl(Ii),U_=hl(Ii)});function x(e){return pp(BE,e)}function fe(e){return Ap(W_,e)}function V_(e){return Op(cI,e)}function qe(e){return Np(uI,e)}function dd(e){return Dp(lI,e)}function Pe(){return jp(pI)}function fI(e){return Mp(dI,e)}function ie(e,t){return x_(hI,e,t)}function z(e,t){let r={type:"object",get shape(){return ne.assignProp(this,"shape",{...e}),this.shape},...ne.normalizeParams(t)};return new K_(r)}function ct(e,t){return new K_({type:"object",get shape(){return ne.assignProp(this,"shape",{...e}),this.shape},catchall:Pe(),...ne.normalizeParams(t)})}function xe(e,t){return new J_({type:"union",options:e,...ne.normalizeParams(t)})}function fd(e,t,r){return new mI({type:"union",options:t,discriminator:e,...ne.normalizeParams(r)})}function ba(e,t){return new gI({type:"intersection",left:e,right:t})}function Ce(e,t,r){return new yI({type:"record",keyType:e,valueType:t,...ne.normalizeParams(r)})}function _t(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ld({type:"enum",entries:r,...ne.normalizeParams(t)})}function N(e,t){return new _I({type:"literal",values:Array.isArray(e)?e:[e],...ne.normalizeParams(t)})}function Y_(e){return new vI({type:"transform",transform:e})}function ze(e){return new Q_({type:"optional",innerType:e})}function H_(e){return new bI({type:"nullable",innerType:e})}function wI(e,t){return new xI({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}function SI(e,t){return new kI({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}function $I(e,t){return new X_({type:"nonoptional",innerType:e,...ne.normalizeParams(t)})}function PI(e,t){return new TI({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function pd(e,t){return new CI({type:"pipe",in:e,out:t})}function II(e){return new EI({type:"readonly",innerType:e})}function zI(e){let t=new Ue({check:"custom"});return t._zod.check=e,t}function tv(e,t){return Kp(ev,e??(()=>!0),t)}function RI(e,t={}){return Jp(ev,e,t)}function AI(e){let t=zI(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(ne.issue(n,r.value,t._zod.def));else{let o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(ne.issue(o))}},e(r.value,r)));return t}function hd(e,t){return pd(Y_(e),t)}var Re,G_,BE,Te,VE,B_,va,HE,GE,WE,KE,JE,YE,QE,XE,eI,tI,rI,nI,oI,iI,sI,aI,W_,cI,uI,lI,pI,dI,hI,K_,J_,mI,gI,yI,ld,_I,vI,Q_,bI,xI,kI,X_,TI,CI,EI,ev,ad=_(()=>{at();at();td();sd();ud();Re=w("ZodType",(e,t)=>(me.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>Pt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>Z_(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>F_(e,r,n),e.parseAsync=async(r,n)=>q_(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>U_(e,r,n),e.spa=e.safeParseAsync,e.refine=(r,n)=>e.check(RI(r,n)),e.superRefine=r=>e.check(AI(r)),e.overwrite=r=>e.check(Ln(r)),e.optional=()=>ze(e),e.nullable=()=>H_(e),e.nullish=()=>ze(H_(e)),e.nonoptional=r=>$I(e,r),e.array=()=>ie(e),e.or=r=>xe([e,r]),e.and=r=>ba(e,r),e.transform=r=>pd(e,Y_(r)),e.default=r=>wI(e,r),e.prefault=r=>SI(e,r),e.catch=r=>PI(e,r),e.pipe=r=>pd(e,r),e.readonly=()=>II(e),e.describe=r=>{let n=e.clone();return Jr.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Jr.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Jr.get(e);let n=e.clone();return Jr.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),G_=w("_ZodString",(e,t)=>{Si.init(e,t),Re.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(Lp(...n)),e.includes=(...n)=>e.check(Fp(...n)),e.startsWith=(...n)=>e.check(Up(...n)),e.endsWith=(...n)=>e.check(Bp(...n)),e.min=(...n)=>e.check(wo(...n)),e.max=(...n)=>e.check(fa(...n)),e.length=(...n)=>e.check(ha(...n)),e.nonempty=(...n)=>e.check(wo(1,...n)),e.lowercase=n=>e.check(Zp(n)),e.uppercase=n=>e.check(qp(n)),e.trim=()=>e.check(Hp()),e.normalize=(...n)=>e.check(Vp(...n)),e.toLowerCase=()=>e.check(Gp()),e.toUpperCase=()=>e.check(Wp())}),BE=w("ZodString",(e,t)=>{Si.init(e,t),G_.init(e,t),e.email=r=>e.check(dp(VE,r)),e.url=r=>e.check(yp(HE,r)),e.jwt=r=>e.check(Rp(aI,r)),e.emoji=r=>e.check(_p(GE,r)),e.guid=r=>e.check(ua(B_,r)),e.uuid=r=>e.check(fp(va,r)),e.uuidv4=r=>e.check(hp(va,r)),e.uuidv6=r=>e.check(mp(va,r)),e.uuidv7=r=>e.check(gp(va,r)),e.nanoid=r=>e.check(vp(WE,r)),e.guid=r=>e.check(ua(B_,r)),e.cuid=r=>e.check(bp(KE,r)),e.cuid2=r=>e.check(xp(JE,r)),e.ulid=r=>e.check(wp(YE,r)),e.base64=r=>e.check(Ep(oI,r)),e.base64url=r=>e.check(Ip(iI,r)),e.xid=r=>e.check(kp(QE,r)),e.ksuid=r=>e.check(Sp(XE,r)),e.ipv4=r=>e.check($p(eI,r)),e.ipv6=r=>e.check(Tp(tI,r)),e.cidrv4=r=>e.check(Pp(rI,r)),e.cidrv6=r=>e.check(Cp(nI,r)),e.e164=r=>e.check(zp(sI,r)),e.datetime=r=>e.check(rd(r)),e.date=r=>e.check(nd(r)),e.time=r=>e.check(od(r)),e.duration=r=>e.check(id(r))});Te=w("ZodStringFormat",(e,t)=>{be.init(e,t),G_.init(e,t)}),VE=w("ZodEmail",(e,t)=>{$l.init(e,t),Te.init(e,t)}),B_=w("ZodGUID",(e,t)=>{kl.init(e,t),Te.init(e,t)}),va=w("ZodUUID",(e,t)=>{Sl.init(e,t),Te.init(e,t)}),HE=w("ZodURL",(e,t)=>{Tl.init(e,t),Te.init(e,t)}),GE=w("ZodEmoji",(e,t)=>{Pl.init(e,t),Te.init(e,t)}),WE=w("ZodNanoID",(e,t)=>{Cl.init(e,t),Te.init(e,t)}),KE=w("ZodCUID",(e,t)=>{El.init(e,t),Te.init(e,t)}),JE=w("ZodCUID2",(e,t)=>{Il.init(e,t),Te.init(e,t)}),YE=w("ZodULID",(e,t)=>{zl.init(e,t),Te.init(e,t)}),QE=w("ZodXID",(e,t)=>{Rl.init(e,t),Te.init(e,t)}),XE=w("ZodKSUID",(e,t)=>{Al.init(e,t),Te.init(e,t)}),eI=w("ZodIPv4",(e,t)=>{Ol.init(e,t),Te.init(e,t)}),tI=w("ZodIPv6",(e,t)=>{Nl.init(e,t),Te.init(e,t)}),rI=w("ZodCIDRv4",(e,t)=>{Dl.init(e,t),Te.init(e,t)}),nI=w("ZodCIDRv6",(e,t)=>{jl.init(e,t),Te.init(e,t)}),oI=w("ZodBase64",(e,t)=>{Ml.init(e,t),Te.init(e,t)}),iI=w("ZodBase64URL",(e,t)=>{Ll.init(e,t),Te.init(e,t)}),sI=w("ZodE164",(e,t)=>{Zl.init(e,t),Te.init(e,t)}),aI=w("ZodJWT",(e,t)=>{ql.init(e,t),Te.init(e,t)}),W_=w("ZodNumber",(e,t)=>{ia.init(e,t),Re.init(e,t),e.gt=(n,o)=>e.check(pa(n,o)),e.gte=(n,o)=>e.check(Pi(n,o)),e.min=(n,o)=>e.check(Pi(n,o)),e.lt=(n,o)=>e.check(la(n,o)),e.lte=(n,o)=>e.check(Ti(n,o)),e.max=(n,o)=>e.check(Ti(n,o)),e.int=n=>e.check(V_(n)),e.safe=n=>e.check(V_(n)),e.positive=n=>e.check(pa(0,n)),e.nonnegative=n=>e.check(Pi(0,n)),e.negative=n=>e.check(la(0,n)),e.nonpositive=n=>e.check(Ti(0,n)),e.multipleOf=(n,o)=>e.check(da(n,o)),e.step=(n,o)=>e.check(da(n,o)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});cI=w("ZodNumberFormat",(e,t)=>{Fl.init(e,t),W_.init(e,t)});uI=w("ZodBoolean",(e,t)=>{Ul.init(e,t),Re.init(e,t)});lI=w("ZodNull",(e,t)=>{Bl.init(e,t),Re.init(e,t)});pI=w("ZodUnknown",(e,t)=>{Vl.init(e,t),Re.init(e,t)});dI=w("ZodNever",(e,t)=>{Hl.init(e,t),Re.init(e,t)});hI=w("ZodArray",(e,t)=>{Gl.init(e,t),Re.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(wo(r,n)),e.nonempty=r=>e.check(wo(1,r)),e.max=(r,n)=>e.check(fa(r,n)),e.length=(r,n)=>e.check(ha(r,n)),e.unwrap=()=>e.element});K_=w("ZodObject",(e,t)=>{sa.init(e,t),Re.init(e,t),ne.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>_t(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Pe()}),e.loose=()=>e.clone({...e._zod.def,catchall:Pe()}),e.strict=()=>e.clone({...e._zod.def,catchall:fI()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>ne.extend(e,r),e.merge=r=>ne.merge(e,r),e.pick=r=>ne.pick(e,r),e.omit=r=>ne.omit(e,r),e.partial=(...r)=>ne.partial(Q_,e,r[0]),e.required=(...r)=>ne.required(X_,e,r[0])});J_=w("ZodUnion",(e,t)=>{aa.init(e,t),Re.init(e,t),e.options=t.options});mI=w("ZodDiscriminatedUnion",(e,t)=>{J_.init(e,t),Wl.init(e,t)});gI=w("ZodIntersection",(e,t)=>{Kl.init(e,t),Re.init(e,t)});yI=w("ZodRecord",(e,t)=>{Jl.init(e,t),Re.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});ld=w("ZodEnum",(e,t)=>{Yl.init(e,t),Re.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ld({...t,checks:[],...ne.normalizeParams(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ld({...t,checks:[],...ne.normalizeParams(o),entries:i})}});_I=w("ZodLiteral",(e,t)=>{Ql.init(e,t),Re.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});vI=w("ZodTransform",(e,t)=>{Xl.init(e,t),Re.init(e,t),e._zod.parse=(r,n)=>{r.addIssue=i=>{if(typeof i=="string")r.issues.push(ne.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),s.continue??(s.continue=!0),r.issues.push(ne.issue(s))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});Q_=w("ZodOptional",(e,t)=>{ep.init(e,t),Re.init(e,t),e.unwrap=()=>e._zod.def.innerType});bI=w("ZodNullable",(e,t)=>{tp.init(e,t),Re.init(e,t),e.unwrap=()=>e._zod.def.innerType});xI=w("ZodDefault",(e,t)=>{rp.init(e,t),Re.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});kI=w("ZodPrefault",(e,t)=>{np.init(e,t),Re.init(e,t),e.unwrap=()=>e._zod.def.innerType});X_=w("ZodNonOptional",(e,t)=>{op.init(e,t),Re.init(e,t),e.unwrap=()=>e._zod.def.innerType});TI=w("ZodCatch",(e,t)=>{ip.init(e,t),Re.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});CI=w("ZodPipe",(e,t)=>{sp.init(e,t),Re.init(e,t),e.in=t.in,e.out=t.out});EI=w("ZodReadonly",(e,t)=>{ap.init(e,t),Re.init(e,t)});ev=w("ZodCustom",(e,t)=>{cp.init(e,t),Re.init(e,t)})});var rv=_(()=>{});var nv=_(()=>{});var ov=_(()=>{at();ad();td();cd();ud();rv();at();m_();ca();sd();nv();Tt(h_())});var iv=_(()=>{ov()});var sv=_(()=>{iv()});function kv(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Sv(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var gd,av,Xr,wa,Be,cv,uv,tq,DI,jI,yd,Ct,zi,lv,Ve,Dt,jt,He,ka,pv,_d,dv,fv,vd,Ri,L,bd,hv,mv,rq,Sa,MI,$a,LI,Ai,So,gv,ZI,qI,FI,UI,BI,VI,xd,HI,GI,wd,Ta,WI,KI,Pa,JI,Oi,Ni,YI,Di,$o,QI,ji,Ca,Ea,Ia,nq,za,Ra,Aa,yv,_v,vv,kd,bv,Mi,To,xv,XI,Oa,ez,Na,tz,Sd,rz,Da,nz,oz,iz,sz,az,cz,uz,lz,pz,dz,ja,fz,hz,Ma,$d,Td,Pd,mz,gz,yz,Cd,_z,vz,bz,xz,wz,wv,La,kz,Za,oq,Sz,Po,$z,iq,Li,Tz,Ed,Pz,Cz,Ez,Iz,zz,Rz,Az,xa,Oz,Nz,Dz,Id,zd,jz,Mz,Lz,Zz,qz,Fz,Uz,Bz,Vz,Hz,Gz,Wz,Kz,Jz,Yz,Qz,Xz,eR,qa,tR,rR,nR,Fa,oR,iR,sR,Rd,aR,sq,aq,cq,uq,lq,pq,O,md,Zi=_(()=>{sv();gd="2025-11-25",av=[gd,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Xr="io.modelcontextprotocol/related-task",wa="2.0",Be=tv(e=>e!==null&&(typeof e=="object"||typeof e=="function")),cv=xe([x(),fe().int()]),uv=x(),tq=ct({ttl:xe([fe(),dd()]).optional(),pollInterval:fe().optional()}),DI=z({ttl:fe().optional()}),jI=z({taskId:x()}),yd=ct({progressToken:cv.optional(),[Xr]:jI.optional()}),Ct=z({_meta:yd.optional()}),zi=Ct.extend({task:DI.optional()}),lv=e=>zi.safeParse(e).success,Ve=z({method:x(),params:Ct.loose().optional()}),Dt=z({_meta:yd.optional()}),jt=z({method:x(),params:Dt.loose().optional()}),He=ct({_meta:yd.optional()}),ka=xe([x(),fe().int()]),pv=z({jsonrpc:N(wa),id:ka,...Ve.shape}).strict(),_d=e=>pv.safeParse(e).success,dv=z({jsonrpc:N(wa),...jt.shape}).strict(),fv=e=>dv.safeParse(e).success,vd=z({jsonrpc:N(wa),id:ka,result:He}).strict(),Ri=e=>vd.safeParse(e).success;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(L||(L={}));bd=z({jsonrpc:N(wa),id:ka.optional(),error:z({code:fe().int(),message:x(),data:Pe().optional()})}).strict(),hv=e=>bd.safeParse(e).success,mv=xe([pv,dv,vd,bd]),rq=xe([vd,bd]),Sa=He.strict(),MI=Dt.extend({requestId:ka.optional(),reason:x().optional()}),$a=jt.extend({method:N("notifications/cancelled"),params:MI}),LI=z({src:x(),mimeType:x().optional(),sizes:ie(x()).optional(),theme:_t(["light","dark"]).optional()}),Ai=z({icons:ie(LI).optional()}),So=z({name:x(),title:x().optional()}),gv=So.extend({...So.shape,...Ai.shape,version:x(),websiteUrl:x().optional(),description:x().optional()}),ZI=ba(z({applyDefaults:qe().optional()}),Ce(x(),Pe())),qI=hd(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ba(z({form:ZI.optional(),url:Be.optional()}),Ce(x(),Pe()).optional())),FI=ct({list:Be.optional(),cancel:Be.optional(),requests:ct({sampling:ct({createMessage:Be.optional()}).optional(),elicitation:ct({create:Be.optional()}).optional()}).optional()}),UI=ct({list:Be.optional(),cancel:Be.optional(),requests:ct({tools:ct({call:Be.optional()}).optional()}).optional()}),BI=z({experimental:Ce(x(),Be).optional(),sampling:z({context:Be.optional(),tools:Be.optional()}).optional(),elicitation:qI.optional(),roots:z({listChanged:qe().optional()}).optional(),tasks:FI.optional()}),VI=Ct.extend({protocolVersion:x(),capabilities:BI,clientInfo:gv}),xd=Ve.extend({method:N("initialize"),params:VI}),HI=z({experimental:Ce(x(),Be).optional(),logging:Be.optional(),completions:Be.optional(),prompts:z({listChanged:qe().optional()}).optional(),resources:z({subscribe:qe().optional(),listChanged:qe().optional()}).optional(),tools:z({listChanged:qe().optional()}).optional(),tasks:UI.optional()}),GI=He.extend({protocolVersion:x(),capabilities:HI,serverInfo:gv,instructions:x().optional()}),wd=jt.extend({method:N("notifications/initialized"),params:Dt.optional()}),Ta=Ve.extend({method:N("ping"),params:Ct.optional()}),WI=z({progress:fe(),total:ze(fe()),message:ze(x())}),KI=z({...Dt.shape,...WI.shape,progressToken:cv}),Pa=jt.extend({method:N("notifications/progress"),params:KI}),JI=Ct.extend({cursor:uv.optional()}),Oi=Ve.extend({params:JI.optional()}),Ni=He.extend({nextCursor:uv.optional()}),YI=_t(["working","input_required","completed","failed","cancelled"]),Di=z({taskId:x(),status:YI,ttl:xe([fe(),dd()]),createdAt:x(),lastUpdatedAt:x(),pollInterval:ze(fe()),statusMessage:ze(x())}),$o=He.extend({task:Di}),QI=Dt.merge(Di),ji=jt.extend({method:N("notifications/tasks/status"),params:QI}),Ca=Ve.extend({method:N("tasks/get"),params:Ct.extend({taskId:x()})}),Ea=He.merge(Di),Ia=Ve.extend({method:N("tasks/result"),params:Ct.extend({taskId:x()})}),nq=He.loose(),za=Oi.extend({method:N("tasks/list")}),Ra=Ni.extend({tasks:ie(Di)}),Aa=Ve.extend({method:N("tasks/cancel"),params:Ct.extend({taskId:x()})}),yv=He.merge(Di),_v=z({uri:x(),mimeType:ze(x()),_meta:Ce(x(),Pe()).optional()}),vv=_v.extend({text:x()}),kd=x().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),bv=_v.extend({blob:kd}),Mi=_t(["user","assistant"]),To=z({audience:ie(Mi).optional(),priority:fe().min(0).max(1).optional(),lastModified:Ei.datetime({offset:!0}).optional()}),xv=z({...So.shape,...Ai.shape,uri:x(),description:ze(x()),mimeType:ze(x()),annotations:To.optional(),_meta:ze(ct({}))}),XI=z({...So.shape,...Ai.shape,uriTemplate:x(),description:ze(x()),mimeType:ze(x()),annotations:To.optional(),_meta:ze(ct({}))}),Oa=Oi.extend({method:N("resources/list")}),ez=Ni.extend({resources:ie(xv)}),Na=Oi.extend({method:N("resources/templates/list")}),tz=Ni.extend({resourceTemplates:ie(XI)}),Sd=Ct.extend({uri:x()}),rz=Sd,Da=Ve.extend({method:N("resources/read"),params:rz}),nz=He.extend({contents:ie(xe([vv,bv]))}),oz=jt.extend({method:N("notifications/resources/list_changed"),params:Dt.optional()}),iz=Sd,sz=Ve.extend({method:N("resources/subscribe"),params:iz}),az=Sd,cz=Ve.extend({method:N("resources/unsubscribe"),params:az}),uz=Dt.extend({uri:x()}),lz=jt.extend({method:N("notifications/resources/updated"),params:uz}),pz=z({name:x(),description:ze(x()),required:ze(qe())}),dz=z({...So.shape,...Ai.shape,description:ze(x()),arguments:ze(ie(pz)),_meta:ze(ct({}))}),ja=Oi.extend({method:N("prompts/list")}),fz=Ni.extend({prompts:ie(dz)}),hz=Ct.extend({name:x(),arguments:Ce(x(),x()).optional()}),Ma=Ve.extend({method:N("prompts/get"),params:hz}),$d=z({type:N("text"),text:x(),annotations:To.optional(),_meta:Ce(x(),Pe()).optional()}),Td=z({type:N("image"),data:kd,mimeType:x(),annotations:To.optional(),_meta:Ce(x(),Pe()).optional()}),Pd=z({type:N("audio"),data:kd,mimeType:x(),annotations:To.optional(),_meta:Ce(x(),Pe()).optional()}),mz=z({type:N("tool_use"),name:x(),id:x(),input:Ce(x(),Pe()),_meta:Ce(x(),Pe()).optional()}),gz=z({type:N("resource"),resource:xe([vv,bv]),annotations:To.optional(),_meta:Ce(x(),Pe()).optional()}),yz=xv.extend({type:N("resource_link")}),Cd=xe([$d,Td,Pd,yz,gz]),_z=z({role:Mi,content:Cd}),vz=He.extend({description:x().optional(),messages:ie(_z)}),bz=jt.extend({method:N("notifications/prompts/list_changed"),params:Dt.optional()}),xz=z({title:x().optional(),readOnlyHint:qe().optional(),destructiveHint:qe().optional(),idempotentHint:qe().optional(),openWorldHint:qe().optional()}),wz=z({taskSupport:_t(["required","optional","forbidden"]).optional()}),wv=z({...So.shape,...Ai.shape,description:x().optional(),inputSchema:z({type:N("object"),properties:Ce(x(),Be).optional(),required:ie(x()).optional()}).catchall(Pe()),outputSchema:z({type:N("object"),properties:Ce(x(),Be).optional(),required:ie(x()).optional()}).catchall(Pe()).optional(),annotations:xz.optional(),execution:wz.optional(),_meta:Ce(x(),Pe()).optional()}),La=Oi.extend({method:N("tools/list")}),kz=Ni.extend({tools:ie(wv)}),Za=He.extend({content:ie(Cd).default([]),structuredContent:Ce(x(),Pe()).optional(),isError:qe().optional()}),oq=Za.or(He.extend({toolResult:Pe()})),Sz=zi.extend({name:x(),arguments:Ce(x(),Pe()).optional()}),Po=Ve.extend({method:N("tools/call"),params:Sz}),$z=jt.extend({method:N("notifications/tools/list_changed"),params:Dt.optional()}),iq=z({autoRefresh:qe().default(!0),debounceMs:fe().int().nonnegative().default(300)}),Li=_t(["debug","info","notice","warning","error","critical","alert","emergency"]),Tz=Ct.extend({level:Li}),Ed=Ve.extend({method:N("logging/setLevel"),params:Tz}),Pz=Dt.extend({level:Li,logger:x().optional(),data:Pe()}),Cz=jt.extend({method:N("notifications/message"),params:Pz}),Ez=z({name:x().optional()}),Iz=z({hints:ie(Ez).optional(),costPriority:fe().min(0).max(1).optional(),speedPriority:fe().min(0).max(1).optional(),intelligencePriority:fe().min(0).max(1).optional()}),zz=z({mode:_t(["auto","required","none"]).optional()}),Rz=z({type:N("tool_result"),toolUseId:x().describe("The unique identifier for the corresponding tool call."),content:ie(Cd).default([]),structuredContent:z({}).loose().optional(),isError:qe().optional(),_meta:Ce(x(),Pe()).optional()}),Az=fd("type",[$d,Td,Pd]),xa=fd("type",[$d,Td,Pd,mz,Rz]),Oz=z({role:Mi,content:xe([xa,ie(xa)]),_meta:Ce(x(),Pe()).optional()}),Nz=zi.extend({messages:ie(Oz),modelPreferences:Iz.optional(),systemPrompt:x().optional(),includeContext:_t(["none","thisServer","allServers"]).optional(),temperature:fe().optional(),maxTokens:fe().int(),stopSequences:ie(x()).optional(),metadata:Be.optional(),tools:ie(wv).optional(),toolChoice:zz.optional()}),Dz=Ve.extend({method:N("sampling/createMessage"),params:Nz}),Id=He.extend({model:x(),stopReason:ze(_t(["endTurn","stopSequence","maxTokens"]).or(x())),role:Mi,content:Az}),zd=He.extend({model:x(),stopReason:ze(_t(["endTurn","stopSequence","maxTokens","toolUse"]).or(x())),role:Mi,content:xe([xa,ie(xa)])}),jz=z({type:N("boolean"),title:x().optional(),description:x().optional(),default:qe().optional()}),Mz=z({type:N("string"),title:x().optional(),description:x().optional(),minLength:fe().optional(),maxLength:fe().optional(),format:_t(["email","uri","date","date-time"]).optional(),default:x().optional()}),Lz=z({type:_t(["number","integer"]),title:x().optional(),description:x().optional(),minimum:fe().optional(),maximum:fe().optional(),default:fe().optional()}),Zz=z({type:N("string"),title:x().optional(),description:x().optional(),enum:ie(x()),default:x().optional()}),qz=z({type:N("string"),title:x().optional(),description:x().optional(),oneOf:ie(z({const:x(),title:x()})),default:x().optional()}),Fz=z({type:N("string"),title:x().optional(),description:x().optional(),enum:ie(x()),enumNames:ie(x()).optional(),default:x().optional()}),Uz=xe([Zz,qz]),Bz=z({type:N("array"),title:x().optional(),description:x().optional(),minItems:fe().optional(),maxItems:fe().optional(),items:z({type:N("string"),enum:ie(x())}),default:ie(x()).optional()}),Vz=z({type:N("array"),title:x().optional(),description:x().optional(),minItems:fe().optional(),maxItems:fe().optional(),items:z({anyOf:ie(z({const:x(),title:x()}))}),default:ie(x()).optional()}),Hz=xe([Bz,Vz]),Gz=xe([Fz,Uz,Hz]),Wz=xe([Gz,jz,Mz,Lz]),Kz=zi.extend({mode:N("form").optional(),message:x(),requestedSchema:z({type:N("object"),properties:Ce(x(),Wz),required:ie(x()).optional()})}),Jz=zi.extend({mode:N("url"),message:x(),elicitationId:x(),url:x().url()}),Yz=xe([Kz,Jz]),Qz=Ve.extend({method:N("elicitation/create"),params:Yz}),Xz=Dt.extend({elicitationId:x()}),eR=jt.extend({method:N("notifications/elicitation/complete"),params:Xz}),qa=He.extend({action:_t(["accept","decline","cancel"]),content:hd(e=>e===null?void 0:e,Ce(x(),xe([x(),fe(),qe(),ie(x())])).optional())}),tR=z({type:N("ref/resource"),uri:x()}),rR=z({type:N("ref/prompt"),name:x()}),nR=Ct.extend({ref:xe([rR,tR]),argument:z({name:x(),value:x()}),context:z({arguments:Ce(x(),x()).optional()}).optional()}),Fa=Ve.extend({method:N("completion/complete"),params:nR});oR=He.extend({completion:ct({values:ie(x()).max(100),total:ze(fe().int()),hasMore:ze(qe())})}),iR=z({uri:x().startsWith("file://"),name:x().optional(),_meta:Ce(x(),Pe()).optional()}),sR=Ve.extend({method:N("roots/list"),params:Ct.optional()}),Rd=He.extend({roots:ie(iR)}),aR=jt.extend({method:N("notifications/roots/list_changed"),params:Dt.optional()}),sq=xe([Ta,xd,Fa,Ed,Ma,ja,Oa,Na,Da,sz,cz,Po,La,Ca,Ia,za,Aa]),aq=xe([$a,Pa,wd,aR,ji]),cq=xe([Sa,Id,zd,qa,Rd,Ea,Ra,$o]),uq=xe([Ta,Dz,Qz,sR,Ca,Ia,za,Aa]),lq=xe([$a,Pa,Cz,lz,oz,$z,bz,ji,eR]),pq=xe([Sa,GI,oR,vz,fz,ez,tz,nz,Za,kz,Ea,Ra,$o]),O=class e extends Error{constructor(t,r,n){super(`MCP error ${t}: ${r}`),this.code=t,this.data=n,this.name="McpError"}static fromError(t,r,n){if(t===L.UrlElicitationRequired&&n){let o=n;if(o.elicitations)return new md(o.elicitations,r)}return new e(t,r,n)}},md=class extends O{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(L.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}});function en(e){return e==="completed"||e==="failed"||e==="cancelled"}var $v=_(()=>{});var Pv,Tv,Cv,Ua=_(()=>{Pv=Symbol("Let zodToJsonSchema decide on which parser to use"),Tv={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},Cv=e=>typeof e=="string"?{...Tv,name:e}:{...Tv,...e}});var Ev,Ad=_(()=>{Ua();Ev=e=>{let t=Cv(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,o])=>[o._def,{def:o._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}}});function Od(e,t,r,n){n?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function se(e,t,r,n,o){e[t]=r,Od(e,t,n,o)}var tn=_(()=>{});var Ba,Va=_(()=>{Ba=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")}});function Ee(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?Ba(t,e.currentPath):t.join("/")}}var Mt=_(()=>{Va()});function Iv(e,t){let r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==P.ZodAny&&(r.items=U(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&se(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&se(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(se(r,"minItems",e.exactLength.value,e.exactLength.message,t),se(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}var Nd=_(()=>{mi();tn();De()});function zv(e,t){let r={type:"integer",format:"int64"};if(!e.checks)return r;for(let n of e.checks)switch(n.kind){case"min":t.target==="jsonSchema7"?n.inclusive?se(r,"minimum",n.value,n.message,t):se(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),se(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?se(r,"maximum",n.value,n.message,t):se(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),se(r,"maximum",n.value,n.message,t));break;case"multipleOf":se(r,"multipleOf",n.value,n.message,t);break}return r}var Dd=_(()=>{tn()});function Rv(){return{type:"boolean"}}var jd=_(()=>{});function Ha(e,t){return U(e.type._def,t)}var Ga=_(()=>{De()});var Av,Md=_(()=>{De();Av=(e,t)=>U(e.innerType._def,t)});function Ld(e,t,r){let n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((o,i)=>Ld(e,t,o))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return cR(e,t)}}var cR,Zd=_(()=>{tn();cR=(e,t)=>{let r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(let n of e.checks)switch(n.kind){case"min":se(r,"minimum",n.value,n.message,t);break;case"max":se(r,"maximum",n.value,n.message,t);break}return r}});function Ov(e,t){return{...U(e.innerType._def,t),default:e.defaultValue()}}var qd=_(()=>{De()});function Nv(e,t){return t.effectStrategy==="input"?U(e.schema._def,t):Ee(t)}var Fd=_(()=>{De();Mt()});function Dv(e){return{type:"string",enum:Array.from(e.values)}}var Ud=_(()=>{});function jv(e,t){let r=[U(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),U(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),n=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,o=[];return r.forEach(i=>{if(uR(i))o.push(...i.allOf),i.unevaluatedProperties===void 0&&(n=void 0);else{let s=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:a,...c}=i;s=c}else n=void 0;o.push(s)}}),o.length?{allOf:o,...n}:void 0}var uR,Bd=_(()=>{De();uR=e=>"type"in e&&e.type==="string"?!1:"allOf"in e});function Mv(e,t){let r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}var Vd=_(()=>{});function Wa(e,t){let r={type:"string"};if(e.checks)for(let n of e.checks)switch(n.kind){case"min":se(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t);break;case"max":se(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"email":switch(t.emailStrategy){case"format:email":Yt(r,"email",n.message,t);break;case"format:idn-email":Yt(r,"idn-email",n.message,t);break;case"pattern:zod":ut(r,Jt.email,n.message,t);break}break;case"url":Yt(r,"uri",n.message,t);break;case"uuid":Yt(r,"uuid",n.message,t);break;case"regex":ut(r,n.regex,n.message,t);break;case"cuid":ut(r,Jt.cuid,n.message,t);break;case"cuid2":ut(r,Jt.cuid2,n.message,t);break;case"startsWith":ut(r,RegExp(`^${Gd(n.value,t)}`),n.message,t);break;case"endsWith":ut(r,RegExp(`${Gd(n.value,t)}$`),n.message,t);break;case"datetime":Yt(r,"date-time",n.message,t);break;case"date":Yt(r,"date",n.message,t);break;case"time":Yt(r,"time",n.message,t);break;case"duration":Yt(r,"duration",n.message,t);break;case"length":se(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t),se(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"includes":{ut(r,RegExp(Gd(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&Yt(r,"ipv4",n.message,t),n.version!=="v4"&&Yt(r,"ipv6",n.message,t);break}case"base64url":ut(r,Jt.base64url,n.message,t);break;case"jwt":ut(r,Jt.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&ut(r,Jt.ipv4Cidr,n.message,t),n.version!=="v4"&&ut(r,Jt.ipv6Cidr,n.message,t);break}case"emoji":ut(r,Jt.emoji(),n.message,t);break;case"ulid":{ut(r,Jt.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Yt(r,"binary",n.message,t);break}case"contentEncoding:base64":{se(r,"contentEncoding","base64",n.message,t);break}case"pattern:zod":{ut(r,Jt.base64,n.message,t);break}}break}case"nanoid":ut(r,Jt.nanoid,n.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Gd(e,t){return t.patternStrategy==="escape"?pR(e):e}function pR(e){let t="";for(let r=0;r<e.length;r++)lR.has(e[r])||(t+="\\"),t+=e[r];return t}function Yt(e,t,r,n){e.format||e.anyOf?.some(o=>o.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&n.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):se(e,"format",t,r,n)}function ut(e,t,r,n){e.pattern||e.allOf?.some(o=>o.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&n.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:Lv(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):se(e,"pattern",Lv(t,n),r,n)}function Lv(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=r.i?e.source.toLowerCase():e.source,o="",i=!1,s=!1,a=!1;for(let c=0;c<n.length;c++){if(i){o+=n[c],i=!1;continue}if(r.i){if(s){if(n[c].match(/[a-z]/)){a?(o+=n[c],o+=`${n[c-2]}-${n[c]}`.toUpperCase(),a=!1):n[c+1]==="-"&&n[c+2]?.match(/[a-z]/)?(o+=n[c],a=!0):o+=`${n[c]}${n[c].toUpperCase()}`;continue}}else if(n[c].match(/[a-z]/)){o+=`[${n[c]}${n[c].toUpperCase()}]`;continue}}if(r.m){if(n[c]==="^"){o+=`(^|(?<=[\r
29
29
  ]))`;continue}else if(n[c]==="$"){o+=`($|(?=[\r
30
30
  ]))`;continue}}if(r.s&&n[c]==="."){o+=s?`${n[c]}\r
31
31
  `:`[${n[c]}\r
32
- ]`;continue}o+=n[c],n[c]==="\\"?i=!0:s&&n[c]==="]"?s=!1:!s&&n[c]==="["&&(s=!0)}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return o}var Ud,Gt,tR,Ba=_(()=>{Yr();Gt={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Ud===void 0&&(Ud=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Ud),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};tR=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});function Va(e,t){if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&e.keyType?._def.typeName===P.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((n,o)=>({...n,[o]:F(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",o]})??Te(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let r={type:"object",additionalProperties:F(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===P.ZodString&&e.keyType._def.checks?.length){let{type:n,...o}=Ua(e.keyType._def,t);return{...r,propertyNames:o}}else{if(e.keyType?._def.typeName===P.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===P.ZodBranded&&e.keyType._def.type._def.typeName===P.ZodString&&e.keyType._def.type._def.checks?.length){let{type:n,...o}=qa(e.keyType._def,t);return{...r,propertyNames:o}}}return r}var Ha=_(()=>{pi();Ne();Ba();Fa();jt()});function Rv(e,t){if(t.mapStrategy==="record")return Va(e,t);let r=F(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Te(t),n=F(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Te(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}var Vd=_(()=>{Ne();Ha();jt()});function Av(e){let t=e.values,n=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),o=Array.from(new Set(n.map(i=>typeof i)));return{type:o.length===1?o[0]==="string"?"string":"number":["string","number"],enum:n}}var Hd=_(()=>{});function Ov(e){return e.target==="openAi"?void 0:{not:Te({...e,currentPath:[...e.currentPath,"not"]})}}var Gd=_(()=>{jt()});function Nv(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Wd=_(()=>{});function jv(e,t){if(t.target==="openApi3")return Dv(e,t);let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in ji&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((o,i)=>{let s=ji[i._def.typeName];return s&&!o.includes(s)?[...o,s]:o},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){let n=r.reduce((o,i)=>{let s=typeof i._def.value;switch(s){case"string":case"number":case"boolean":return[...o,s];case"bigint":return[...o,"integer"];case"object":if(i._def.value===null)return[...o,"null"];case"symbol":case"undefined":case"function":default:return o}},[]);if(n.length===r.length){let o=n.filter((i,s,a)=>a.indexOf(i)===s);return{type:o.length>1?o:o[0],enum:r.reduce((i,s)=>i.includes(s._def.value)?i:[...i,s._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,o)=>[...n,...o._def.values.filter(i=>!n.includes(i))],[])};return Dv(e,t)}var ji,Dv,Ga=_(()=>{Ne();ji={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};Dv=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,o)=>F(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${o}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0}});function Mv(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:ji[e.innerType._def.typeName],nullable:!0}:{type:[ji[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let n=F(e.innerType._def,{...t,currentPath:[...t.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}let r=F(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}var Kd=_(()=>{Ne();Ga()});function Lv(e,t){let r={type:"number"};if(!e.checks)return r;for(let n of e.checks)switch(n.kind){case"int":r.type="integer",zd(r,"type",n.message,t);break;case"min":t.target==="jsonSchema7"?n.inclusive?se(r,"minimum",n.value,n.message,t):se(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),se(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?se(r,"maximum",n.value,n.message,t):se(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),se(r,"maximum",n.value,n.message,t));break;case"multipleOf":se(r,"multipleOf",n.value,n.message,t);break}return r}var Jd=_(()=>{Yr()});function Zv(e,t){let r=t.target==="openAi",n={type:"object",properties:{}},o=[],i=e.shape();for(let a in i){let c=i[a];if(c===void 0||c._def===void 0)continue;let u=oR(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let p=F(c._def,{...t,currentPath:[...t.currentPath,"properties",a],propertyPath:[...t.currentPath,"properties",a]});p!==void 0&&(n.properties[a]=p,u||o.push(a))}o.length&&(n.required=o);let s=nR(e,t);return s!==void 0&&(n.additionalProperties=s),n}function nR(e,t){if(e.catchall._def.typeName!=="ZodNever")return F(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function oR(e){try{return e.isOptional()}catch{return!0}}var Yd=_(()=>{Ne()});var qv,Qd=_(()=>{Ne();jt();qv=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return F(e.innerType._def,t);let r=F(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Te(t)},r]}:Te(t)}});var Fv,Xd=_(()=>{Ne();Fv=(e,t)=>{if(t.pipeStrategy==="input")return F(e.in._def,t);if(t.pipeStrategy==="output")return F(e.out._def,t);let r=F(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=F(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(o=>o!==void 0)}}});function Uv(e,t){return F(e.type._def,t)}var ef=_(()=>{Ne()});function Bv(e,t){let n={type:"array",uniqueItems:!0,items:F(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&se(n,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&se(n,"maxItems",e.maxSize.value,e.maxSize.message,t),n}var tf=_(()=>{Yr();Ne()});function Vv(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>F(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:F(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>F(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}var rf=_(()=>{Ne()});function Hv(e){return{not:Te(e)}}var nf=_(()=>{jt()});function Gv(e){return Te(e)}var of=_(()=>{jt()});var Wv,sf=_(()=>{Ne();Wv=(e,t)=>F(e.innerType._def,t)});var Kv,af=_(()=>{pi();jt();Rd();Ad();Od();Fa();Nd();jd();Md();Ld();Zd();qd();Fd();Vd();Hd();Gd();Wd();Kd();Jd();Yd();Qd();Xd();ef();Ha();tf();Ba();rf();nf();Ga();of();sf();Kv=(e,t,r)=>{switch(t){case P.ZodString:return Ua(e,r);case P.ZodNumber:return Lv(e,r);case P.ZodObject:return Zv(e,r);case P.ZodBigInt:return kv(e,r);case P.ZodBoolean:return Sv();case P.ZodDate:return Dd(e,r);case P.ZodUndefined:return Hv(r);case P.ZodNull:return Nv(r);case P.ZodArray:return wv(e,r);case P.ZodUnion:case P.ZodDiscriminatedUnion:return jv(e,r);case P.ZodIntersection:return Ev(e,r);case P.ZodTuple:return Vv(e,r);case P.ZodRecord:return Va(e,r);case P.ZodLiteral:return Iv(e,r);case P.ZodEnum:return Cv(e);case P.ZodNativeEnum:return Av(e);case P.ZodNullable:return Mv(e,r);case P.ZodOptional:return qv(e,r);case P.ZodMap:return Rv(e,r);case P.ZodSet:return Bv(e,r);case P.ZodLazy:return()=>e.getter()._def;case P.ZodPromise:return Uv(e,r);case P.ZodNaN:case P.ZodNever:return Ov(r);case P.ZodEffects:return Pv(e,r);case P.ZodAny:return Te(r);case P.ZodUnknown:return Gv(r);case P.ZodDefault:return Tv(e,r);case P.ZodBranded:return qa(e,r);case P.ZodReadonly:return Wv(e,r);case P.ZodCatch:return $v(e,r);case P.ZodPipeline:return Fv(e,r);case P.ZodFunction:case P.ZodVoid:case P.ZodSymbol:return;default:return(n=>{})(t)}}});function F(e,t,r=!1){let n=t.seen.get(e);if(t.override){let a=t.override?.(e,t,n,r);if(a!==vv)return a}if(n&&!r){let a=iR(n,t);if(a!==void 0)return a}let o={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,o);let i=Kv(e,e.typeName,t),s=typeof i=="function"?F(i(),t):i;if(s&&sR(e,t,s),t.postProcess){let a=t.postProcess(s,e,t);return o.jsonSchema=s,a}return o.jsonSchema=s,s}var iR,sR,Ne=_(()=>{Ma();af();Za();jt();iR=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:La(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Te(t)):t.$refStrategy==="seen"?Te(t):void 0}},sR=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r)});var Jv=_(()=>{});var cf,uf=_(()=>{Ne();Id();jt();cf=(e,t)=>{let r=xv(t),n=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,p])=>({...c,[u]:F(p._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??Te(r)}),{}):void 0,o=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=F(e._def,o===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,o]},!1)??Te(r),s=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;s!==void 0&&(i.title=s),r.flags.hasReferencedOpenAiAnyType&&(n||(n={}),n[r.openAiAnyTypeName]||(n[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}));let a=o===void 0?n?{...i,[r.definitionPath]:n}:i:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,o].join("/"),[r.definitionPath]:{...n,[o]:i}};return r.target==="jsonSchema7"?a.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(a.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in a||"oneOf"in a||"allOf"in a||"type"in a&&Array.isArray(a.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),a}});var Yv=_(()=>{Ma();Id();Yr();Za();Ne();Jv();jt();Rd();Ad();Od();Fa();Nd();jd();Md();Ld();Zd();qd();Fd();Vd();Hd();Gd();Wd();Kd();Jd();Yd();Qd();Xd();ef();sf();Ha();tf();Ba();rf();nf();Ga();of();af();uf();uf()});function aR(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function lf(e,t){return Ot(e)?Wp(e,{target:aR(t?.target),io:t?.pipeStrategy??"input"}):cf(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function pf(e){let r=Wr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=fa(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function df(e,t){let r=Gr(e,t);if(!r.success)throw r.error;return r.data}var ff=_(()=>{Yp();Si();Yv()});function Qv(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Xv(e,t){let r={...e};for(let n in t){let o=n,i=t[o];if(i===void 0)continue;let s=r[o];Qv(s)&&Qv(i)?r[o]={...s,...i}:r[o]=i}return r}var cR,Wa,eb=_(()=>{Si();Di();yv();ff();cR=6e4,Wa=class{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(ba,r=>{this._oncancel(r)}),this.setNotificationHandler(wa,r=>{this._onprogress(r)}),this.setRequestHandler(xa,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(ka,async(r,n)=>{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new O(L.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler($a,async(r,n)=>{let o=async()=>{let i=r.params.taskId;if(this._taskMessageQueue){let a;for(;a=await this._taskMessageQueue.dequeue(i,n.sessionId);){if(a.type==="response"||a.type==="error"){let c=a.message,u=c.id,p=this._requestResolvers.get(u);if(p)if(this._requestResolvers.delete(u),a.type==="response")p(c);else{let l=c,d=new O(l.error.code,l.error.message,l.error.data);p(d)}else{let l=a.type==="response"?"Response":"Error";this._onerror(new Error(`${l} handler missing for request ${u}`))}continue}await this._transport?.send(a.message,{relatedRequestId:n.requestId})}}let s=await this._taskStore.getTask(i,n.sessionId);if(!s)throw new O(L.InvalidParams,`Task not found: ${i}`);if(!Jr(s.status))return await this._waitForTaskUpdate(i,n.signal),await o();if(Jr(s.status)){let a=await this._taskStore.getTaskResult(i,n.sessionId);return this._clearTaskQueue(i),{...a,_meta:{...a._meta,[Kr]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(Ta,async(r,n)=>{try{let{tasks:o,nextCursor:i}=await this._taskStore.listTasks(r.params?.cursor,n.sessionId);return{tasks:o,nextCursor:i,_meta:{}}}catch(o){throw new O(L.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(Ca,async(r,n)=>{try{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new O(L.InvalidParams,`Task not found: ${r.params.taskId}`);if(Jr(o.status))throw new O(L.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(r.params.taskId);let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new O(L.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(o){throw o instanceof O?o:new O(L.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,n,o,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(o,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:o})}_resetTimeout(t){let r=this._timeoutInfo.get(t);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),O.fromError(L.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){let r=this._timeoutInfo.get(t);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;let r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=i=>{n?.(i),this._onerror(i)};let o=this._transport?.onmessage;this._transport.onmessage=(i,s)=>{o?.(i,s),Ci(i)||sv(i)?this._onresponse(i):md(i)?this._onrequest(i,s):iv(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){let t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let n of this._requestHandlerAbortControllers.values())n.abort();this._requestHandlerAbortControllers.clear();let r=O.fromError(L.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let n of t.values())n(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){let r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(t,r){let n=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,o=this._transport,i=t.params?._meta?.[Kr]?.taskId;if(n===void 0){let p={jsonrpc:"2.0",id:t.id,error:{code:L.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:p,timestamp:Date.now()},o?.sessionId).catch(l=>this._onerror(new Error(`Failed to enqueue error response: ${l}`))):o?.send(p).catch(l=>this._onerror(new Error(`Failed to send an error response: ${l}`)));return}let s=new AbortController;this._requestHandlerAbortControllers.set(t.id,s);let a=rv(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,o?.sessionId):void 0,u={signal:s.signal,sessionId:o?.sessionId,_meta:t.params?._meta,sendNotification:async p=>{if(s.signal.aborted)return;let l={relatedRequestId:t.id};i&&(l.relatedTask={taskId:i}),await this.notification(p,l)},sendRequest:async(p,l,d)=>{if(s.signal.aborted)throw new O(L.ConnectionClosed,"Request was cancelled");let f={...d,relatedRequestId:t.id};i&&!f.relatedTask&&(f.relatedTask={taskId:i});let h=f.relatedTask?.taskId??i;return h&&c&&await c.updateTaskStatus(h,"input_required"),await this.request(p,l,f)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:a?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(t.method)}).then(()=>n(t,u)).then(async p=>{if(s.signal.aborted)return;let l={result:p,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:l,timestamp:Date.now()},o?.sessionId):await o?.send(l)},async p=>{if(s.signal.aborted)return;let l={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(p.code)?p.code:L.InternalError,message:p.message??"Internal error",...p.data!==void 0&&{data:p.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:l,timestamp:Date.now()},o?.sessionId):await o?.send(l)}).catch(p=>this._onerror(new Error(`Failed to send response: ${p}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:r,...n}=t.params,o=Number(r),i=this._progressHandlers.get(o);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let s=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(c){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),s(c);return}i(n)}_onresponse(t){let r=Number(t.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),Ci(t))n(t);else{let s=new O(t.error.code,t.error.message,t.error.data);n(s)}return}let o=this._responseHandlers.get(r);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let i=!1;if(Ci(t)&&t.result&&typeof t.result=="object"){let s=t.result;if(s.task&&typeof s.task=="object"){let a=s.task;typeof a.taskId=="string"&&(i=!0,this._taskProgressTokens.set(a.taskId,r))}}if(i||this._progressHandlers.delete(r),Ci(t))o(t);else{let s=O.fromError(t.error.code,t.error.message,t.error.data);o(s)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,n){let{task:o}=n??{};if(!o){try{yield{type:"result",result:await this.request(t,r,n)}}catch(s){yield{type:"error",error:s instanceof O?s:new O(L.InternalError,String(s))}}return}let i;try{let s=await this.request(t,xo,n);if(s.task)i=s.task.taskId,yield{type:"taskCreated",task:s.task};else throw new O(L.InternalError,"Task creation did not return a task");for(;;){let a=await this.getTask({taskId:i},n);if(yield{type:"taskStatus",task:a},Jr(a.status)){a.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)}:a.status==="failed"?yield{type:"error",error:new O(L.InternalError,`Task ${i} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new O(L.InternalError,`Task ${i} was cancelled`)});return}if(a.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)};return}let c=a.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),n?.signal?.throwIfAborted()}}catch(s){yield{type:"error",error:s instanceof O?s:new O(L.InternalError,String(s))}}}request(t,r,n){let{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s,task:a,relatedTask:c}=n??{};return new Promise((u,p)=>{let l=v=>{p(v)};if(!this._transport){l(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),a&&this.assertTaskCapability(t.method)}catch(v){l(v);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...t,jsonrpc:"2.0",id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...t.params,_meta:{...t.params?._meta||{},progressToken:d}}),a&&(f.params={...f.params,task:a}),c&&(f.params={...f.params,_meta:{...f.params?._meta||{},[Kr]:c}});let h=v=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:d,reason:String(v)}},{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(C=>this._onerror(new Error(`Failed to send cancellation: ${C}`)));let k=v instanceof O?v:new O(L.RequestTimeout,String(v));p(k)};this._responseHandlers.set(d,v=>{if(!n?.signal?.aborted){if(v instanceof Error)return p(v);try{let k=Gr(r,v.result);k.success?u(k.data):p(k.error)}catch(k){p(k)}}}),n?.signal?.addEventListener("abort",()=>{h(n?.signal?.reason)});let m=n?.timeout??cR,y=()=>h(O.fromError(L.RequestTimeout,"Request timed out",{timeout:m}));this._setupTimeout(d,m,n?.maxTotalTimeout,y,n?.resetTimeoutOnProgress??!1);let b=c?.taskId;if(b){let v=k=>{let C=this._responseHandlers.get(d);C?C(k):this._onerror(new Error(`Response handler missing for side-channeled request ${d}`))};this._requestResolvers.set(d,v),this._enqueueTaskMessage(b,{type:"request",message:f,timestamp:Date.now()}).catch(k=>{this._cleanupTimeout(d),p(k)})}else this._transport.send(f,{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(v=>{this._cleanupTimeout(d),p(v)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},Sa,r)}async getTaskResult(t,r,n){return this.request({method:"tasks/result",params:t},r,n)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},Pa,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},uv,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let n=r?.relatedTask?.taskId;if(n){let a={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Kr]:r.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:a,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let a={...t,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Kr]:r.relatedTask}}}),this._transport?.send(a,r).catch(c=>this._onerror(c))});return}let s={...t,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Kr]:r.relatedTask}}}),await this._transport.send(s,r)}setRequestHandler(t,r){let n=pf(t);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(o,i)=>{let s=df(t,o);return Promise.resolve(r(s,i))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,r){let n=pf(t);this._notificationHandlers.set(n,o=>{let i=df(t,o);return Promise.resolve(r(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let o=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,n,o)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(t,r);for(let o of n)if(o.type==="request"&&md(o.message)){let i=o.message.id,s=this._requestResolvers.get(i);s?(s(new O(L.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,r){let n=this._options?.defaultTaskPollInterval??1e3;try{let o=await this._taskStore?.getTask(t);o?.pollInterval&&(n=o.pollInterval)}catch{}return new Promise((o,i)=>{if(r.aborted){i(new O(L.InvalidRequest,"Request cancelled"));return}let s=setTimeout(o,n);r.addEventListener("abort",()=>{clearTimeout(s),i(new O(L.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async o=>{if(!t)throw new Error("No request provided");return await n.createTask(o,t.id,{method:t.method,params:t.params},r)},getTask:async o=>{let i=await n.getTask(o,r);if(!i)throw new O(L.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(o,i,s)=>{await n.storeTaskResult(o,i,s,r);let a=await n.getTask(o,r);if(a){let c=Ai.parse({method:"notifications/tasks/status",params:a});await this.notification(c),Jr(a.status)&&this._cleanupTaskProgressHandler(o)}},getTaskResult:o=>n.getTaskResult(o,r),updateTaskStatus:async(o,i,s)=>{let a=await n.getTask(o,r);if(!a)throw new O(L.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(Jr(a.status))throw new O(L.InvalidParams,`Cannot update task "${o}" from terminal status "${a.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(o,i,s,r);let c=await n.getTask(o,r);if(c){let u=Ai.parse({method:"notifications/tasks/status",params:c});await this.notification(u),Jr(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>n.listTasks(o,r)}}}});var Zi=S(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.regexpCode=ue.getEsmExportName=ue.getProperty=ue.safeStringify=ue.stringify=ue.strConcat=ue.addCodeArg=ue.str=ue._=ue.nil=ue._Code=ue.Name=ue.IDENTIFIER=ue._CodeOrName=void 0;var Mi=class{};ue._CodeOrName=Mi;ue.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ln=class extends Mi{constructor(t){if(super(),!ue.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ue.Name=Ln;var Mt=class extends Mi{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof Ln&&(r[n.str]=(r[n.str]||0)+1),r),{})}};ue._Code=Mt;ue.nil=new Mt("");function tb(e,...t){let r=[e[0]],n=0;for(;n<t.length;)mf(r,t[n]),r.push(e[++n]);return new Mt(r)}ue._=tb;var hf=new Mt("+");function rb(e,...t){let r=[Li(e[0])],n=0;for(;n<t.length;)r.push(hf),mf(r,t[n]),r.push(hf,Li(e[++n]));return uR(r),new Mt(r)}ue.str=rb;function mf(e,t){t instanceof Mt?e.push(...t._items):t instanceof Ln?e.push(t):e.push(dR(t))}ue.addCodeArg=mf;function uR(e){let t=1;for(;t<e.length-1;){if(e[t]===hf){let r=lR(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function lR(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Ln||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Ln))return`"${e}${t.slice(1)}`}function pR(e,t){return t.emptyStr()?e:e.emptyStr()?t:rb`${e}${t}`}ue.strConcat=pR;function dR(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Li(Array.isArray(e)?e.join(","):e)}function fR(e){return new Mt(Li(e))}ue.stringify=fR;function Li(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ue.safeStringify=Li;function hR(e){return typeof e=="string"&&ue.IDENTIFIER.test(e)?new Mt(`.${e}`):tb`[${e}]`}ue.getProperty=hR;function mR(e){if(typeof e=="string"&&ue.IDENTIFIER.test(e))return new Mt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ue.getEsmExportName=mR;function gR(e){return new Mt(e.toString())}ue.regexpCode=gR});var _f=S(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.ValueScope=vt.ValueScopeName=vt.Scope=vt.varKinds=vt.UsedValueState=void 0;var _t=Zi(),gf=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Ka;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Ka||(vt.UsedValueState=Ka={}));vt.varKinds={const:new _t.Name("const"),let:new _t.Name("let"),var:new _t.Name("var")};var Ja=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof _t.Name?t:this.name(t)}name(t){return new _t.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};vt.Scope=Ja;var Ya=class extends _t.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,_t._)`.${new _t.Name(r)}[${n}]`}};vt.ValueScopeName=Ya;var yR=(0,_t._)`\n`,yf=class extends Ja{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?yR:_t.nil}}get(){return this._scope}name(t){return new Ya(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(t),{prefix:i}=o,s=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[i];if(a){let p=a.get(s);if(p)return p}else a=this._values[i]=new Map;a.set(s,o);let c=this._scope[i]||(this._scope[i]=[]),u=c.length;return c[u]=r.ref,o.setValue(r,{property:i,itemIndex:u}),o}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,_t._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(t,r,n={},o){let i=_t.nil;for(let s in t){let a=t[s];if(!a)continue;let c=n[s]=n[s]||new Map;a.forEach(u=>{if(c.has(u))return;c.set(u,Ka.Started);let p=r(u);if(p){let l=this.opts.es5?vt.varKinds.var:vt.varKinds.const;i=(0,_t._)`${i}${l} ${u} = ${p};${this.opts._n}`}else if(p=o?.(u))i=(0,_t._)`${i}${p}${this.opts._n}`;else throw new gf(u);c.set(u,Ka.Completed)})}return i}};vt.ValueScope=yf});var K=S(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.or=Q.and=Q.not=Q.CodeGen=Q.operators=Q.varKinds=Q.ValueScopeName=Q.ValueScope=Q.Scope=Q.Name=Q.regexpCode=Q.stringify=Q.getProperty=Q.nil=Q.strConcat=Q.str=Q._=void 0;var ae=Zi(),Kt=_f(),Qr=Zi();Object.defineProperty(Q,"_",{enumerable:!0,get:function(){return Qr._}});Object.defineProperty(Q,"str",{enumerable:!0,get:function(){return Qr.str}});Object.defineProperty(Q,"strConcat",{enumerable:!0,get:function(){return Qr.strConcat}});Object.defineProperty(Q,"nil",{enumerable:!0,get:function(){return Qr.nil}});Object.defineProperty(Q,"getProperty",{enumerable:!0,get:function(){return Qr.getProperty}});Object.defineProperty(Q,"stringify",{enumerable:!0,get:function(){return Qr.stringify}});Object.defineProperty(Q,"regexpCode",{enumerable:!0,get:function(){return Qr.regexpCode}});Object.defineProperty(Q,"Name",{enumerable:!0,get:function(){return Qr.Name}});var tc=_f();Object.defineProperty(Q,"Scope",{enumerable:!0,get:function(){return tc.Scope}});Object.defineProperty(Q,"ValueScope",{enumerable:!0,get:function(){return tc.ValueScope}});Object.defineProperty(Q,"ValueScopeName",{enumerable:!0,get:function(){return tc.ValueScopeName}});Object.defineProperty(Q,"varKinds",{enumerable:!0,get:function(){return tc.varKinds}});Q.operators={GT:new ae._Code(">"),GTE:new ae._Code(">="),LT:new ae._Code("<"),LTE:new ae._Code("<="),EQ:new ae._Code("==="),NEQ:new ae._Code("!=="),NOT:new ae._Code("!"),OR:new ae._Code("||"),AND:new ae._Code("&&"),ADD:new ae._Code("+")};var $r=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},vf=class extends $r{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?Kt.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=$o(this.rhs,t,r)),this}get names(){return this.rhs instanceof ae._CodeOrName?this.rhs.names:{}}},Qa=class extends $r{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof ae.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=$o(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ae.Name?{}:{...this.lhs.names};return ec(t,this.rhs)}},bf=class extends Qa{constructor(t,r,n,o){super(t,n,o),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},xf=class extends $r{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},wf=class extends $r{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},kf=class extends $r{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Sf=class extends $r{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=$o(this.code,t,r),this}get names(){return this.code instanceof ae._CodeOrName?this.code.names:{}}},qi=class extends $r{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,o=n.length;for(;o--;){let i=n[o];i.optimizeNames(t,r)||(_R(t,i.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Fn(t,r.names),{})}},Tr=class extends qi{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},$f=class extends qi{},So=class extends Tr{};So.kind="else";var Zn=class e extends Tr{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new So(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(nb(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=$o(this.condition,t,r),this}get names(){let t=super.names;return ec(t,this.condition),this.else&&Fn(t,this.else.names),t}};Zn.kind="if";var qn=class extends Tr{};qn.kind="for";var Tf=class extends qn{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=$o(this.iteration,t,r),this}get names(){return Fn(super.names,this.iteration.names)}},Pf=class extends qn{constructor(t,r,n,o){super(),this.varKind=t,this.name=r,this.from=n,this.to=o}render(t){let r=t.es5?Kt.varKinds.var:this.varKind,{name:n,from:o,to:i}=this;return`for(${r} ${n}=${o}; ${n}<${i}; ${n}++)`+super.render(t)}get names(){let t=ec(super.names,this.from);return ec(t,this.to)}},Xa=class extends qn{constructor(t,r,n,o){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=o}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=$o(this.iterable,t,r),this}get names(){return Fn(super.names,this.iterable.names)}},Fi=class extends Tr{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Fi.kind="func";var Ui=class extends qi{render(t){return"return "+super.render(t)}};Ui.kind="return";var Cf=class extends Tr{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,o;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(o=this.finally)===null||o===void 0||o.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Fn(t,this.catch.names),this.finally&&Fn(t,this.finally.names),t}},Bi=class extends Tr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Bi.kind="catch";var Vi=class extends Tr{render(t){return"finally"+super.render(t)}};Vi.kind="finally";var Ef=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
33
- `:""},this._extScope=t,this._scope=new Kt.Scope({parent:t}),this._nodes=[new $f]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,o){let i=this._scope.toName(r);return n!==void 0&&o&&(this._constants[i.str]=n),this._leafNode(new vf(t,i,n)),i}const(t,r,n){return this._def(Kt.varKinds.const,t,r,n)}let(t,r,n){return this._def(Kt.varKinds.let,t,r,n)}var(t,r,n){return this._def(Kt.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new Qa(t,r,n))}add(t,r){return this._leafNode(new bf(t,Q.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ae.nil&&this._leafNode(new Sf(t)),this}object(...t){let r=["{"];for(let[n,o]of t)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,ae.addCodeArg)(r,o));return r.push("}"),new ae._Code(r)}if(t,r,n){if(this._blockNode(new Zn(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Zn(t))}else(){return this._elseNode(new So)}endIf(){return this._endBlockNode(Zn,So)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Tf(t),r)}forRange(t,r,n,o,i=this.opts.es5?Kt.varKinds.var:Kt.varKinds.let){let s=this._scope.toName(t);return this._for(new Pf(i,s,r,n),()=>o(s))}forOf(t,r,n,o=Kt.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let s=r instanceof ae.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ae._)`${s}.length`,a=>{this.var(i,(0,ae._)`${s}[${a}]`),n(i)})}return this._for(new Xa("of",o,i,r),()=>n(i))}forIn(t,r,n,o=this.opts.es5?Kt.varKinds.var:Kt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ae._)`Object.keys(${r})`,n);let i=this._scope.toName(t);return this._for(new Xa("in",o,i,r),()=>n(i))}endFor(){return this._endBlockNode(qn)}label(t){return this._leafNode(new xf(t))}break(t){return this._leafNode(new wf(t))}return(t){let r=new Ui;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ui)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new Cf;if(this._blockNode(o),this.code(t),r){let i=this.name("e");this._currNode=o.catch=new Bi(i),r(i)}return n&&(this._currNode=o.finally=new Vi,this.code(n)),this._endBlockNode(Bi,Vi)}throw(t){return this._leafNode(new kf(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=ae.nil,n,o){return this._blockNode(new Fi(t,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Fi)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Zn))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};Q.CodeGen=Ef;function Fn(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function ec(e,t){return t instanceof ae._CodeOrName?Fn(e,t.names):e}function $o(e,t,r){if(e instanceof ae.Name)return n(e);if(!o(e))return e;return new ae._Code(e._items.reduce((i,s)=>(s instanceof ae.Name&&(s=n(s)),s instanceof ae._Code?i.push(...s._items):i.push(s),i),[]));function n(i){let s=r[i.str];return s===void 0||t[i.str]!==1?i:(delete t[i.str],s)}function o(i){return i instanceof ae._Code&&i._items.some(s=>s instanceof ae.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function _R(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function nb(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ae._)`!${If(e)}`}Q.not=nb;var vR=ob(Q.operators.AND);function bR(...e){return e.reduce(vR)}Q.and=bR;var xR=ob(Q.operators.OR);function wR(...e){return e.reduce(xR)}Q.or=wR;function ob(e){return(t,r)=>t===ae.nil?r:r===ae.nil?t:(0,ae._)`${If(t)} ${e} ${If(r)}`}function If(e){return e instanceof ae.Name?e:(0,ae._)`(${e})`}});var le=S(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.checkStrictMode=X.getErrorPath=X.Type=X.useFunc=X.setEvaluated=X.evaluatedPropsToName=X.mergeEvaluated=X.eachItem=X.unescapeJsonPointer=X.escapeJsonPointer=X.escapeFragment=X.unescapeFragment=X.schemaRefOrVal=X.schemaHasRulesButRef=X.schemaHasRules=X.checkUnknownRules=X.alwaysValidSchema=X.toHash=void 0;var ge=K(),kR=Zi();function SR(e){let t={};for(let r of e)t[r]=!0;return t}X.toHash=SR;function $R(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(ab(e,t),!cb(t,e.self.RULES.all))}X.alwaysValidSchema=$R;function ab(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let o=n.RULES.keywords;for(let i in t)o[i]||pb(e,`unknown keyword: "${i}"`)}X.checkUnknownRules=ab;function cb(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}X.schemaHasRules=cb;function TR(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}X.schemaHasRulesButRef=TR;function PR({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,ge._)`${r}`}return(0,ge._)`${e}${t}${(0,ge.getProperty)(n)}`}X.schemaRefOrVal=PR;function CR(e){return ub(decodeURIComponent(e))}X.unescapeFragment=CR;function ER(e){return encodeURIComponent(Rf(e))}X.escapeFragment=ER;function Rf(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}X.escapeJsonPointer=Rf;function ub(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}X.unescapeJsonPointer=ub;function IR(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}X.eachItem=IR;function ib({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,i,s,a)=>{let c=s===void 0?i:s instanceof ge.Name?(i instanceof ge.Name?e(o,i,s):t(o,i,s),s):i instanceof ge.Name?(t(o,s,i),i):r(i,s);return a===ge.Name&&!(c instanceof ge.Name)?n(o,c):c}}X.mergeEvaluated={props:ib({mergeNames:(e,t,r)=>e.if((0,ge._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,ge._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,ge._)`${r} || {}`).code((0,ge._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,ge._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,ge._)`${r} || {}`),Af(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:lb}),items:ib({mergeNames:(e,t,r)=>e.if((0,ge._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,ge._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,ge._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,ge._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function lb(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,ge._)`{}`);return t!==void 0&&Af(e,r,t),r}X.evaluatedPropsToName=lb;function Af(e,t,r){Object.keys(r).forEach(n=>e.assign((0,ge._)`${t}${(0,ge.getProperty)(n)}`,!0))}X.setEvaluated=Af;var sb={};function zR(e,t){return e.scopeValue("func",{ref:t,code:sb[t.code]||(sb[t.code]=new kR._Code(t.code))})}X.useFunc=zR;var zf;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(zf||(X.Type=zf={}));function RR(e,t,r){if(e instanceof ge.Name){let n=t===zf.Num;return r?n?(0,ge._)`"[" + ${e} + "]"`:(0,ge._)`"['" + ${e} + "']"`:n?(0,ge._)`"/" + ${e}`:(0,ge._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,ge.getProperty)(e).toString():"/"+Rf(e)}X.getErrorPath=RR;function pb(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}X.checkStrictMode=pb});var Pr=S(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});var Xe=K(),AR={data:new Xe.Name("data"),valCxt:new Xe.Name("valCxt"),instancePath:new Xe.Name("instancePath"),parentData:new Xe.Name("parentData"),parentDataProperty:new Xe.Name("parentDataProperty"),rootData:new Xe.Name("rootData"),dynamicAnchors:new Xe.Name("dynamicAnchors"),vErrors:new Xe.Name("vErrors"),errors:new Xe.Name("errors"),this:new Xe.Name("this"),self:new Xe.Name("self"),scope:new Xe.Name("scope"),json:new Xe.Name("json"),jsonPos:new Xe.Name("jsonPos"),jsonLen:new Xe.Name("jsonLen"),jsonPart:new Xe.Name("jsonPart")};Of.default=AR});var Hi=S(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.extendErrors=et.resetErrorsCount=et.reportExtraError=et.reportError=et.keyword$DataError=et.keywordError=void 0;var ce=K(),rc=le(),ct=Pr();et.keywordError={message:({keyword:e})=>(0,ce.str)`must pass "${e}" keyword validation`};et.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,ce.str)`"${e}" keyword must be ${t} ($data)`:(0,ce.str)`"${e}" keyword is invalid ($data)`};function OR(e,t=et.keywordError,r,n){let{it:o}=e,{gen:i,compositeRule:s,allErrors:a}=o,c=hb(e,t,r);n??(s||a)?db(i,c):fb(o,(0,ce._)`[${c}]`)}et.reportError=OR;function NR(e,t=et.keywordError,r){let{it:n}=e,{gen:o,compositeRule:i,allErrors:s}=n,a=hb(e,t,r);db(o,a),i||s||fb(n,ct.default.vErrors)}et.reportExtraError=NR;function DR(e,t){e.assign(ct.default.errors,t),e.if((0,ce._)`${ct.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,ce._)`${ct.default.vErrors}.length`,t),()=>e.assign(ct.default.vErrors,null)))}et.resetErrorsCount=DR;function jR({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:i}){if(o===void 0)throw new Error("ajv implementation error");let s=e.name("err");e.forRange("i",o,ct.default.errors,a=>{e.const(s,(0,ce._)`${ct.default.vErrors}[${a}]`),e.if((0,ce._)`${s}.instancePath === undefined`,()=>e.assign((0,ce._)`${s}.instancePath`,(0,ce.strConcat)(ct.default.instancePath,i.errorPath))),e.assign((0,ce._)`${s}.schemaPath`,(0,ce.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,ce._)`${s}.schema`,r),e.assign((0,ce._)`${s}.data`,n))})}et.extendErrors=jR;function db(e,t){let r=e.const("err",t);e.if((0,ce._)`${ct.default.vErrors} === null`,()=>e.assign(ct.default.vErrors,(0,ce._)`[${r}]`),(0,ce._)`${ct.default.vErrors}.push(${r})`),e.code((0,ce._)`${ct.default.errors}++`)}function fb(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;o.$async?r.throw((0,ce._)`new ${e.ValidationError}(${t})`):(r.assign((0,ce._)`${n}.errors`,t),r.return(!1))}var Un={keyword:new ce.Name("keyword"),schemaPath:new ce.Name("schemaPath"),params:new ce.Name("params"),propertyName:new ce.Name("propertyName"),message:new ce.Name("message"),schema:new ce.Name("schema"),parentSchema:new ce.Name("parentSchema")};function hb(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,ce._)`{}`:MR(e,t,r)}function MR(e,t,r={}){let{gen:n,it:o}=e,i=[LR(o,r),ZR(e,r)];return qR(e,t,i),n.object(...i)}function LR({errorPath:e},{instancePath:t}){let r=t?(0,ce.str)`${e}${(0,rc.getErrorPath)(t,rc.Type.Str)}`:e;return[ct.default.instancePath,(0,ce.strConcat)(ct.default.instancePath,r)]}function ZR({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:(0,ce.str)`${t}/${e}`;return r&&(o=(0,ce.str)`${o}${(0,rc.getErrorPath)(r,rc.Type.Str)}`),[Un.schemaPath,o]}function qR(e,{params:t,message:r},n){let{keyword:o,data:i,schemaValue:s,it:a}=e,{opts:c,propertyName:u,topSchemaRef:p,schemaPath:l}=a;n.push([Un.keyword,o],[Un.params,typeof t=="function"?t(e):t||(0,ce._)`{}`]),c.messages&&n.push([Un.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([Un.schema,s],[Un.parentSchema,(0,ce._)`${p}${l}`],[ct.default.data,i]),u&&n.push([Un.propertyName,u])}});var gb=S(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.boolOrEmptySchema=To.topBoolOrEmptySchema=void 0;var FR=Hi(),UR=K(),BR=Pr(),VR={message:"boolean schema is false"};function HR(e){let{gen:t,schema:r,validateName:n}=e;r===!1?mb(e,!1):typeof r=="object"&&r.$async===!0?t.return(BR.default.data):(t.assign((0,UR._)`${n}.errors`,null),t.return(!0))}To.topBoolOrEmptySchema=HR;function GR(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),mb(e)):r.var(t,!0)}To.boolOrEmptySchema=GR;function mb(e,t){let{gen:r,data:n}=e,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,FR.reportError)(o,VR,void 0,t)}});var Nf=S(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.getRules=Po.isJSONType=void 0;var WR=["string","number","integer","boolean","null","object","array"],KR=new Set(WR);function JR(e){return typeof e=="string"&&KR.has(e)}Po.isJSONType=JR;function YR(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Po.getRules=YR});var Df=S(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.shouldUseRule=Xr.shouldUseGroup=Xr.schemaHasRulesForType=void 0;function QR({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&yb(e,n)}Xr.schemaHasRulesForType=QR;function yb(e,t){return t.rules.some(r=>_b(e,r))}Xr.shouldUseGroup=yb;function _b(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}Xr.shouldUseRule=_b});var Gi=S(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.reportTypeError=tt.checkDataTypes=tt.checkDataType=tt.coerceAndCheckDataType=tt.getJSONTypes=tt.getSchemaTypes=tt.DataType=void 0;var XR=Nf(),eA=Df(),tA=Hi(),G=K(),vb=le(),Co;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Co||(tt.DataType=Co={}));function rA(e){let t=bb(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}tt.getSchemaTypes=rA;function bb(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(XR.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}tt.getJSONTypes=bb;function nA(e,t){let{gen:r,data:n,opts:o}=e,i=oA(t,o.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,eA.schemaHasRulesForType)(e,t[0]));if(s){let a=Mf(t,n,o.strictNumbers,Co.Wrong);r.if(a,()=>{i.length?iA(e,t,i):Lf(e)})}return s}tt.coerceAndCheckDataType=nA;var xb=new Set(["string","number","integer","boolean","null"]);function oA(e,t){return t?e.filter(r=>xb.has(r)||t==="array"&&r==="array"):[]}function iA(e,t,r){let{gen:n,data:o,opts:i}=e,s=n.let("dataType",(0,G._)`typeof ${o}`),a=n.let("coerced",(0,G._)`undefined`);i.coerceTypes==="array"&&n.if((0,G._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,G._)`${o}[0]`).assign(s,(0,G._)`typeof ${o}`).if(Mf(t,o,i.strictNumbers),()=>n.assign(a,o))),n.if((0,G._)`${a} !== undefined`);for(let u of r)(xb.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);n.else(),Lf(e),n.endIf(),n.if((0,G._)`${a} !== undefined`,()=>{n.assign(o,a),sA(e,a)});function c(u){switch(u){case"string":n.elseIf((0,G._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,G._)`"" + ${o}`).elseIf((0,G._)`${o} === null`).assign(a,(0,G._)`""`);return;case"number":n.elseIf((0,G._)`${s} == "boolean" || ${o} === null
32
+ ]`;continue}o+=n[c],n[c]==="\\"?i=!0:s&&n[c]==="]"?s=!1:!s&&n[c]==="["&&(s=!0)}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return o}var Hd,Jt,lR,Ka=_(()=>{tn();Jt={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Hd===void 0&&(Hd=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Hd),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};lR=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});function Ja(e,t){if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&e.keyType?._def.typeName===P.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((n,o)=>({...n,[o]:U(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",o]})??Ee(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let r={type:"object",additionalProperties:U(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===P.ZodString&&e.keyType._def.checks?.length){let{type:n,...o}=Wa(e.keyType._def,t);return{...r,propertyNames:o}}else{if(e.keyType?._def.typeName===P.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===P.ZodBranded&&e.keyType._def.type._def.typeName===P.ZodString&&e.keyType._def.type._def.checks?.length){let{type:n,...o}=Ha(e.keyType._def,t);return{...r,propertyNames:o}}}return r}var Ya=_(()=>{mi();De();Ka();Ga();Mt()});function Zv(e,t){if(t.mapStrategy==="record")return Ja(e,t);let r=U(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Ee(t),n=U(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Ee(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}var Wd=_(()=>{De();Ya();Mt()});function qv(e){let t=e.values,n=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),o=Array.from(new Set(n.map(i=>typeof i)));return{type:o.length===1?o[0]==="string"?"string":"number":["string","number"],enum:n}}var Kd=_(()=>{});function Fv(e){return e.target==="openAi"?void 0:{not:Ee({...e,currentPath:[...e.currentPath,"not"]})}}var Jd=_(()=>{Mt()});function Uv(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Yd=_(()=>{});function Vv(e,t){if(t.target==="openApi3")return Bv(e,t);let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in qi&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((o,i)=>{let s=qi[i._def.typeName];return s&&!o.includes(s)?[...o,s]:o},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){let n=r.reduce((o,i)=>{let s=typeof i._def.value;switch(s){case"string":case"number":case"boolean":return[...o,s];case"bigint":return[...o,"integer"];case"object":if(i._def.value===null)return[...o,"null"];case"symbol":case"undefined":case"function":default:return o}},[]);if(n.length===r.length){let o=n.filter((i,s,a)=>a.indexOf(i)===s);return{type:o.length>1?o:o[0],enum:r.reduce((i,s)=>i.includes(s._def.value)?i:[...i,s._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,o)=>[...n,...o._def.values.filter(i=>!n.includes(i))],[])};return Bv(e,t)}var qi,Bv,Qa=_(()=>{De();qi={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};Bv=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,o)=>U(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${o}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0}});function Hv(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:qi[e.innerType._def.typeName],nullable:!0}:{type:[qi[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let n=U(e.innerType._def,{...t,currentPath:[...t.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}let r=U(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}var Qd=_(()=>{De();Qa()});function Gv(e,t){let r={type:"number"};if(!e.checks)return r;for(let n of e.checks)switch(n.kind){case"int":r.type="integer",Od(r,"type",n.message,t);break;case"min":t.target==="jsonSchema7"?n.inclusive?se(r,"minimum",n.value,n.message,t):se(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),se(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?se(r,"maximum",n.value,n.message,t):se(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),se(r,"maximum",n.value,n.message,t));break;case"multipleOf":se(r,"multipleOf",n.value,n.message,t);break}return r}var Xd=_(()=>{tn()});function Wv(e,t){let r=t.target==="openAi",n={type:"object",properties:{}},o=[],i=e.shape();for(let a in i){let c=i[a];if(c===void 0||c._def===void 0)continue;let u=fR(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let p=U(c._def,{...t,currentPath:[...t.currentPath,"properties",a],propertyPath:[...t.currentPath,"properties",a]});p!==void 0&&(n.properties[a]=p,u||o.push(a))}o.length&&(n.required=o);let s=dR(e,t);return s!==void 0&&(n.additionalProperties=s),n}function dR(e,t){if(e.catchall._def.typeName!=="ZodNever")return U(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function fR(e){try{return e.isOptional()}catch{return!0}}var ef=_(()=>{De()});var Kv,tf=_(()=>{De();Mt();Kv=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return U(e.innerType._def,t);let r=U(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Ee(t)},r]}:Ee(t)}});var Jv,rf=_(()=>{De();Jv=(e,t)=>{if(t.pipeStrategy==="input")return U(e.in._def,t);if(t.pipeStrategy==="output")return U(e.out._def,t);let r=U(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=U(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(o=>o!==void 0)}}});function Yv(e,t){return U(e.type._def,t)}var nf=_(()=>{De()});function Qv(e,t){let n={type:"array",uniqueItems:!0,items:U(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&se(n,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&se(n,"maxItems",e.maxSize.value,e.maxSize.message,t),n}var of=_(()=>{tn();De()});function Xv(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>U(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:U(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>U(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}var sf=_(()=>{De()});function e0(e){return{not:Ee(e)}}var af=_(()=>{Mt()});function t0(e){return Ee(e)}var cf=_(()=>{Mt()});var r0,uf=_(()=>{De();r0=(e,t)=>U(e.innerType._def,t)});var n0,lf=_(()=>{mi();Mt();Nd();Dd();jd();Ga();Md();Zd();qd();Fd();Ud();Bd();Vd();Wd();Kd();Jd();Yd();Qd();Xd();ef();tf();rf();nf();Ya();of();Ka();sf();af();Qa();cf();uf();n0=(e,t,r)=>{switch(t){case P.ZodString:return Wa(e,r);case P.ZodNumber:return Gv(e,r);case P.ZodObject:return Wv(e,r);case P.ZodBigInt:return zv(e,r);case P.ZodBoolean:return Rv();case P.ZodDate:return Ld(e,r);case P.ZodUndefined:return e0(r);case P.ZodNull:return Uv(r);case P.ZodArray:return Iv(e,r);case P.ZodUnion:case P.ZodDiscriminatedUnion:return Vv(e,r);case P.ZodIntersection:return jv(e,r);case P.ZodTuple:return Xv(e,r);case P.ZodRecord:return Ja(e,r);case P.ZodLiteral:return Mv(e,r);case P.ZodEnum:return Dv(e);case P.ZodNativeEnum:return qv(e);case P.ZodNullable:return Hv(e,r);case P.ZodOptional:return Kv(e,r);case P.ZodMap:return Zv(e,r);case P.ZodSet:return Qv(e,r);case P.ZodLazy:return()=>e.getter()._def;case P.ZodPromise:return Yv(e,r);case P.ZodNaN:case P.ZodNever:return Fv(r);case P.ZodEffects:return Nv(e,r);case P.ZodAny:return Ee(r);case P.ZodUnknown:return t0(r);case P.ZodDefault:return Ov(e,r);case P.ZodBranded:return Ha(e,r);case P.ZodReadonly:return r0(e,r);case P.ZodCatch:return Av(e,r);case P.ZodPipeline:return Jv(e,r);case P.ZodFunction:case P.ZodVoid:case P.ZodSymbol:return;default:return(n=>{})(t)}}});function U(e,t,r=!1){let n=t.seen.get(e);if(t.override){let a=t.override?.(e,t,n,r);if(a!==Pv)return a}if(n&&!r){let a=hR(n,t);if(a!==void 0)return a}let o={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,o);let i=n0(e,e.typeName,t),s=typeof i=="function"?U(i(),t):i;if(s&&mR(e,t,s),t.postProcess){let a=t.postProcess(s,e,t);return o.jsonSchema=s,a}return o.jsonSchema=s,s}var hR,mR,De=_(()=>{Ua();lf();Va();Mt();hR=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Ba(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Ee(t)):t.$refStrategy==="seen"?Ee(t):void 0}},mR=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r)});var o0=_(()=>{});var pf,df=_(()=>{De();Ad();Mt();pf=(e,t)=>{let r=Ev(t),n=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,p])=>({...c,[u]:U(p._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??Ee(r)}),{}):void 0,o=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=U(e._def,o===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,o]},!1)??Ee(r),s=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;s!==void 0&&(i.title=s),r.flags.hasReferencedOpenAiAnyType&&(n||(n={}),n[r.openAiAnyTypeName]||(n[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}));let a=o===void 0?n?{...i,[r.definitionPath]:n}:i:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,o].join("/"),[r.definitionPath]:{...n,[o]:i}};return r.target==="jsonSchema7"?a.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(a.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in a||"oneOf"in a||"allOf"in a||"type"in a&&Array.isArray(a.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),a}});var i0=_(()=>{Ua();Ad();tn();Va();De();o0();Mt();Nd();Dd();jd();Ga();Md();Zd();qd();Fd();Ud();Bd();Vd();Wd();Kd();Jd();Yd();Qd();Xd();ef();tf();rf();nf();uf();Ya();of();Ka();sf();af();Qa();cf();lf();df();df()});function gR(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function ff(e,t){return Nt(e)?Yp(e,{target:gR(t?.target),io:t?.pipeStrategy??"input"}):pf(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function hf(e){let r=Qr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=_a(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function mf(e,t){let r=Yr(e,t);if(!r.success)throw r.error;return r.data}var gf=_(()=>{ed();Ci();i0()});function s0(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function a0(e,t){let r={...e};for(let n in t){let o=n,i=t[o];if(i===void 0)continue;let s=r[o];s0(s)&&s0(i)?r[o]={...s,...i}:r[o]=i}return r}var yR,Xa,c0=_(()=>{Ci();Zi();$v();gf();yR=6e4,Xa=class{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler($a,r=>{this._oncancel(r)}),this.setNotificationHandler(Pa,r=>{this._onprogress(r)}),this.setRequestHandler(Ta,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Ca,async(r,n)=>{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new O(L.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(Ia,async(r,n)=>{let o=async()=>{let i=r.params.taskId;if(this._taskMessageQueue){let a;for(;a=await this._taskMessageQueue.dequeue(i,n.sessionId);){if(a.type==="response"||a.type==="error"){let c=a.message,u=c.id,p=this._requestResolvers.get(u);if(p)if(this._requestResolvers.delete(u),a.type==="response")p(c);else{let l=c,d=new O(l.error.code,l.error.message,l.error.data);p(d)}else{let l=a.type==="response"?"Response":"Error";this._onerror(new Error(`${l} handler missing for request ${u}`))}continue}await this._transport?.send(a.message,{relatedRequestId:n.requestId})}}let s=await this._taskStore.getTask(i,n.sessionId);if(!s)throw new O(L.InvalidParams,`Task not found: ${i}`);if(!en(s.status))return await this._waitForTaskUpdate(i,n.signal),await o();if(en(s.status)){let a=await this._taskStore.getTaskResult(i,n.sessionId);return this._clearTaskQueue(i),{...a,_meta:{...a._meta,[Xr]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(za,async(r,n)=>{try{let{tasks:o,nextCursor:i}=await this._taskStore.listTasks(r.params?.cursor,n.sessionId);return{tasks:o,nextCursor:i,_meta:{}}}catch(o){throw new O(L.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(Aa,async(r,n)=>{try{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new O(L.InvalidParams,`Task not found: ${r.params.taskId}`);if(en(o.status))throw new O(L.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(r.params.taskId);let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new O(L.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(o){throw o instanceof O?o:new O(L.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,n,o,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(o,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:o})}_resetTimeout(t){let r=this._timeoutInfo.get(t);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),O.fromError(L.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){let r=this._timeoutInfo.get(t);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;let r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=i=>{n?.(i),this._onerror(i)};let o=this._transport?.onmessage;this._transport.onmessage=(i,s)=>{o?.(i,s),Ri(i)||hv(i)?this._onresponse(i):_d(i)?this._onrequest(i,s):fv(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){let t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let n of this._requestHandlerAbortControllers.values())n.abort();this._requestHandlerAbortControllers.clear();let r=O.fromError(L.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let n of t.values())n(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){let r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(t,r){let n=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,o=this._transport,i=t.params?._meta?.[Xr]?.taskId;if(n===void 0){let p={jsonrpc:"2.0",id:t.id,error:{code:L.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:p,timestamp:Date.now()},o?.sessionId).catch(l=>this._onerror(new Error(`Failed to enqueue error response: ${l}`))):o?.send(p).catch(l=>this._onerror(new Error(`Failed to send an error response: ${l}`)));return}let s=new AbortController;this._requestHandlerAbortControllers.set(t.id,s);let a=lv(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,o?.sessionId):void 0,u={signal:s.signal,sessionId:o?.sessionId,_meta:t.params?._meta,sendNotification:async p=>{if(s.signal.aborted)return;let l={relatedRequestId:t.id};i&&(l.relatedTask={taskId:i}),await this.notification(p,l)},sendRequest:async(p,l,d)=>{if(s.signal.aborted)throw new O(L.ConnectionClosed,"Request was cancelled");let f={...d,relatedRequestId:t.id};i&&!f.relatedTask&&(f.relatedTask={taskId:i});let h=f.relatedTask?.taskId??i;return h&&c&&await c.updateTaskStatus(h,"input_required"),await this.request(p,l,f)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:a?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(t.method)}).then(()=>n(t,u)).then(async p=>{if(s.signal.aborted)return;let l={result:p,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:l,timestamp:Date.now()},o?.sessionId):await o?.send(l)},async p=>{if(s.signal.aborted)return;let l={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(p.code)?p.code:L.InternalError,message:p.message??"Internal error",...p.data!==void 0&&{data:p.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:l,timestamp:Date.now()},o?.sessionId):await o?.send(l)}).catch(p=>this._onerror(new Error(`Failed to send response: ${p}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:r,...n}=t.params,o=Number(r),i=this._progressHandlers.get(o);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let s=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(c){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),s(c);return}i(n)}_onresponse(t){let r=Number(t.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),Ri(t))n(t);else{let s=new O(t.error.code,t.error.message,t.error.data);n(s)}return}let o=this._responseHandlers.get(r);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let i=!1;if(Ri(t)&&t.result&&typeof t.result=="object"){let s=t.result;if(s.task&&typeof s.task=="object"){let a=s.task;typeof a.taskId=="string"&&(i=!0,this._taskProgressTokens.set(a.taskId,r))}}if(i||this._progressHandlers.delete(r),Ri(t))o(t);else{let s=O.fromError(t.error.code,t.error.message,t.error.data);o(s)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,n){let{task:o}=n??{};if(!o){try{yield{type:"result",result:await this.request(t,r,n)}}catch(s){yield{type:"error",error:s instanceof O?s:new O(L.InternalError,String(s))}}return}let i;try{let s=await this.request(t,$o,n);if(s.task)i=s.task.taskId,yield{type:"taskCreated",task:s.task};else throw new O(L.InternalError,"Task creation did not return a task");for(;;){let a=await this.getTask({taskId:i},n);if(yield{type:"taskStatus",task:a},en(a.status)){a.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)}:a.status==="failed"?yield{type:"error",error:new O(L.InternalError,`Task ${i} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new O(L.InternalError,`Task ${i} was cancelled`)});return}if(a.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)};return}let c=a.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),n?.signal?.throwIfAborted()}}catch(s){yield{type:"error",error:s instanceof O?s:new O(L.InternalError,String(s))}}}request(t,r,n){let{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s,task:a,relatedTask:c}=n??{};return new Promise((u,p)=>{let l=v=>{p(v)};if(!this._transport){l(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),a&&this.assertTaskCapability(t.method)}catch(v){l(v);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...t,jsonrpc:"2.0",id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...t.params,_meta:{...t.params?._meta||{},progressToken:d}}),a&&(f.params={...f.params,task:a}),c&&(f.params={...f.params,_meta:{...f.params?._meta||{},[Xr]:c}});let h=v=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:d,reason:String(v)}},{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(C=>this._onerror(new Error(`Failed to send cancellation: ${C}`)));let k=v instanceof O?v:new O(L.RequestTimeout,String(v));p(k)};this._responseHandlers.set(d,v=>{if(!n?.signal?.aborted){if(v instanceof Error)return p(v);try{let k=Yr(r,v.result);k.success?u(k.data):p(k.error)}catch(k){p(k)}}}),n?.signal?.addEventListener("abort",()=>{h(n?.signal?.reason)});let g=n?.timeout??yR,y=()=>h(O.fromError(L.RequestTimeout,"Request timed out",{timeout:g}));this._setupTimeout(d,g,n?.maxTotalTimeout,y,n?.resetTimeoutOnProgress??!1);let b=c?.taskId;if(b){let v=k=>{let C=this._responseHandlers.get(d);C?C(k):this._onerror(new Error(`Response handler missing for side-channeled request ${d}`))};this._requestResolvers.set(d,v),this._enqueueTaskMessage(b,{type:"request",message:f,timestamp:Date.now()}).catch(k=>{this._cleanupTimeout(d),p(k)})}else this._transport.send(f,{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(v=>{this._cleanupTimeout(d),p(v)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},Ea,r)}async getTaskResult(t,r,n){return this.request({method:"tasks/result",params:t},r,n)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},Ra,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},yv,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let n=r?.relatedTask?.taskId;if(n){let a={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Xr]:r.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:a,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let a={...t,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Xr]:r.relatedTask}}}),this._transport?.send(a,r).catch(c=>this._onerror(c))});return}let s={...t,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Xr]:r.relatedTask}}}),await this._transport.send(s,r)}setRequestHandler(t,r){let n=hf(t);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(o,i)=>{let s=mf(t,o);return Promise.resolve(r(s,i))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,r){let n=hf(t);this._notificationHandlers.set(n,o=>{let i=mf(t,o);return Promise.resolve(r(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let o=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,n,o)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(t,r);for(let o of n)if(o.type==="request"&&_d(o.message)){let i=o.message.id,s=this._requestResolvers.get(i);s?(s(new O(L.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,r){let n=this._options?.defaultTaskPollInterval??1e3;try{let o=await this._taskStore?.getTask(t);o?.pollInterval&&(n=o.pollInterval)}catch{}return new Promise((o,i)=>{if(r.aborted){i(new O(L.InvalidRequest,"Request cancelled"));return}let s=setTimeout(o,n);r.addEventListener("abort",()=>{clearTimeout(s),i(new O(L.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async o=>{if(!t)throw new Error("No request provided");return await n.createTask(o,t.id,{method:t.method,params:t.params},r)},getTask:async o=>{let i=await n.getTask(o,r);if(!i)throw new O(L.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(o,i,s)=>{await n.storeTaskResult(o,i,s,r);let a=await n.getTask(o,r);if(a){let c=ji.parse({method:"notifications/tasks/status",params:a});await this.notification(c),en(a.status)&&this._cleanupTaskProgressHandler(o)}},getTaskResult:o=>n.getTaskResult(o,r),updateTaskStatus:async(o,i,s)=>{let a=await n.getTask(o,r);if(!a)throw new O(L.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(en(a.status))throw new O(L.InvalidParams,`Cannot update task "${o}" from terminal status "${a.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(o,i,s,r);let c=await n.getTask(o,r);if(c){let u=ji.parse({method:"notifications/tasks/status",params:c});await this.notification(u),en(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>n.listTasks(o,r)}}}});var Bi=S(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.regexpCode=ue.getEsmExportName=ue.getProperty=ue.safeStringify=ue.stringify=ue.strConcat=ue.addCodeArg=ue.str=ue._=ue.nil=ue._Code=ue.Name=ue.IDENTIFIER=ue._CodeOrName=void 0;var Fi=class{};ue._CodeOrName=Fi;ue.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Fn=class extends Fi{constructor(t){if(super(),!ue.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ue.Name=Fn;var Lt=class extends Fi{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof Fn&&(r[n.str]=(r[n.str]||0)+1),r),{})}};ue._Code=Lt;ue.nil=new Lt("");function u0(e,...t){let r=[e[0]],n=0;for(;n<t.length;)_f(r,t[n]),r.push(e[++n]);return new Lt(r)}ue._=u0;var yf=new Lt("+");function l0(e,...t){let r=[Ui(e[0])],n=0;for(;n<t.length;)r.push(yf),_f(r,t[n]),r.push(yf,Ui(e[++n]));return _R(r),new Lt(r)}ue.str=l0;function _f(e,t){t instanceof Lt?e.push(...t._items):t instanceof Fn?e.push(t):e.push(xR(t))}ue.addCodeArg=_f;function _R(e){let t=1;for(;t<e.length-1;){if(e[t]===yf){let r=vR(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function vR(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Fn||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Fn))return`"${e}${t.slice(1)}`}function bR(e,t){return t.emptyStr()?e:e.emptyStr()?t:l0`${e}${t}`}ue.strConcat=bR;function xR(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ui(Array.isArray(e)?e.join(","):e)}function wR(e){return new Lt(Ui(e))}ue.stringify=wR;function Ui(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ue.safeStringify=Ui;function kR(e){return typeof e=="string"&&ue.IDENTIFIER.test(e)?new Lt(`.${e}`):u0`[${e}]`}ue.getProperty=kR;function SR(e){if(typeof e=="string"&&ue.IDENTIFIER.test(e))return new Lt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ue.getEsmExportName=SR;function $R(e){return new Lt(e.toString())}ue.regexpCode=$R});var xf=S(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.ValueScope=bt.ValueScopeName=bt.Scope=bt.varKinds=bt.UsedValueState=void 0;var vt=Bi(),vf=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},ec;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(ec||(bt.UsedValueState=ec={}));bt.varKinds={const:new vt.Name("const"),let:new vt.Name("let"),var:new vt.Name("var")};var tc=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof vt.Name?t:this.name(t)}name(t){return new vt.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};bt.Scope=tc;var rc=class extends vt.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,vt._)`.${new vt.Name(r)}[${n}]`}};bt.ValueScopeName=rc;var TR=(0,vt._)`\n`,bf=class extends tc{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?TR:vt.nil}}get(){return this._scope}name(t){return new rc(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(t),{prefix:i}=o,s=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[i];if(a){let p=a.get(s);if(p)return p}else a=this._values[i]=new Map;a.set(s,o);let c=this._scope[i]||(this._scope[i]=[]),u=c.length;return c[u]=r.ref,o.setValue(r,{property:i,itemIndex:u}),o}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,vt._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(t,r,n={},o){let i=vt.nil;for(let s in t){let a=t[s];if(!a)continue;let c=n[s]=n[s]||new Map;a.forEach(u=>{if(c.has(u))return;c.set(u,ec.Started);let p=r(u);if(p){let l=this.opts.es5?bt.varKinds.var:bt.varKinds.const;i=(0,vt._)`${i}${l} ${u} = ${p};${this.opts._n}`}else if(p=o?.(u))i=(0,vt._)`${i}${p}${this.opts._n}`;else throw new vf(u);c.set(u,ec.Completed)})}return i}};bt.ValueScope=bf});var K=S(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.or=Q.and=Q.not=Q.CodeGen=Q.operators=Q.varKinds=Q.ValueScopeName=Q.ValueScope=Q.Scope=Q.Name=Q.regexpCode=Q.stringify=Q.getProperty=Q.nil=Q.strConcat=Q.str=Q._=void 0;var ae=Bi(),Qt=xf(),rn=Bi();Object.defineProperty(Q,"_",{enumerable:!0,get:function(){return rn._}});Object.defineProperty(Q,"str",{enumerable:!0,get:function(){return rn.str}});Object.defineProperty(Q,"strConcat",{enumerable:!0,get:function(){return rn.strConcat}});Object.defineProperty(Q,"nil",{enumerable:!0,get:function(){return rn.nil}});Object.defineProperty(Q,"getProperty",{enumerable:!0,get:function(){return rn.getProperty}});Object.defineProperty(Q,"stringify",{enumerable:!0,get:function(){return rn.stringify}});Object.defineProperty(Q,"regexpCode",{enumerable:!0,get:function(){return rn.regexpCode}});Object.defineProperty(Q,"Name",{enumerable:!0,get:function(){return rn.Name}});var sc=xf();Object.defineProperty(Q,"Scope",{enumerable:!0,get:function(){return sc.Scope}});Object.defineProperty(Q,"ValueScope",{enumerable:!0,get:function(){return sc.ValueScope}});Object.defineProperty(Q,"ValueScopeName",{enumerable:!0,get:function(){return sc.ValueScopeName}});Object.defineProperty(Q,"varKinds",{enumerable:!0,get:function(){return sc.varKinds}});Q.operators={GT:new ae._Code(">"),GTE:new ae._Code(">="),LT:new ae._Code("<"),LTE:new ae._Code("<="),EQ:new ae._Code("==="),NEQ:new ae._Code("!=="),NOT:new ae._Code("!"),OR:new ae._Code("||"),AND:new ae._Code("&&"),ADD:new ae._Code("+")};var Cr=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},wf=class extends Cr{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?Qt.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Eo(this.rhs,t,r)),this}get names(){return this.rhs instanceof ae._CodeOrName?this.rhs.names:{}}},nc=class extends Cr{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof ae.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Eo(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ae.Name?{}:{...this.lhs.names};return ic(t,this.rhs)}},kf=class extends nc{constructor(t,r,n,o){super(t,n,o),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Sf=class extends Cr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},$f=class extends Cr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Tf=class extends Cr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Pf=class extends Cr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Eo(this.code,t,r),this}get names(){return this.code instanceof ae._CodeOrName?this.code.names:{}}},Vi=class extends Cr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,o=n.length;for(;o--;){let i=n[o];i.optimizeNames(t,r)||(PR(t,i.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Vn(t,r.names),{})}},Er=class extends Vi{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Cf=class extends Vi{},Co=class extends Er{};Co.kind="else";var Un=class e extends Er{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Co(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(p0(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Eo(this.condition,t,r),this}get names(){let t=super.names;return ic(t,this.condition),this.else&&Vn(t,this.else.names),t}};Un.kind="if";var Bn=class extends Er{};Bn.kind="for";var Ef=class extends Bn{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Eo(this.iteration,t,r),this}get names(){return Vn(super.names,this.iteration.names)}},If=class extends Bn{constructor(t,r,n,o){super(),this.varKind=t,this.name=r,this.from=n,this.to=o}render(t){let r=t.es5?Qt.varKinds.var:this.varKind,{name:n,from:o,to:i}=this;return`for(${r} ${n}=${o}; ${n}<${i}; ${n}++)`+super.render(t)}get names(){let t=ic(super.names,this.from);return ic(t,this.to)}},oc=class extends Bn{constructor(t,r,n,o){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=o}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Eo(this.iterable,t,r),this}get names(){return Vn(super.names,this.iterable.names)}},Hi=class extends Er{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Hi.kind="func";var Gi=class extends Vi{render(t){return"return "+super.render(t)}};Gi.kind="return";var zf=class extends Er{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,o;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(o=this.finally)===null||o===void 0||o.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Vn(t,this.catch.names),this.finally&&Vn(t,this.finally.names),t}},Wi=class extends Er{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Wi.kind="catch";var Ki=class extends Er{render(t){return"finally"+super.render(t)}};Ki.kind="finally";var Rf=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
33
+ `:""},this._extScope=t,this._scope=new Qt.Scope({parent:t}),this._nodes=[new Cf]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,o){let i=this._scope.toName(r);return n!==void 0&&o&&(this._constants[i.str]=n),this._leafNode(new wf(t,i,n)),i}const(t,r,n){return this._def(Qt.varKinds.const,t,r,n)}let(t,r,n){return this._def(Qt.varKinds.let,t,r,n)}var(t,r,n){return this._def(Qt.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new nc(t,r,n))}add(t,r){return this._leafNode(new kf(t,Q.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ae.nil&&this._leafNode(new Pf(t)),this}object(...t){let r=["{"];for(let[n,o]of t)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,ae.addCodeArg)(r,o));return r.push("}"),new ae._Code(r)}if(t,r,n){if(this._blockNode(new Un(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Un(t))}else(){return this._elseNode(new Co)}endIf(){return this._endBlockNode(Un,Co)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Ef(t),r)}forRange(t,r,n,o,i=this.opts.es5?Qt.varKinds.var:Qt.varKinds.let){let s=this._scope.toName(t);return this._for(new If(i,s,r,n),()=>o(s))}forOf(t,r,n,o=Qt.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let s=r instanceof ae.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ae._)`${s}.length`,a=>{this.var(i,(0,ae._)`${s}[${a}]`),n(i)})}return this._for(new oc("of",o,i,r),()=>n(i))}forIn(t,r,n,o=this.opts.es5?Qt.varKinds.var:Qt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ae._)`Object.keys(${r})`,n);let i=this._scope.toName(t);return this._for(new oc("in",o,i,r),()=>n(i))}endFor(){return this._endBlockNode(Bn)}label(t){return this._leafNode(new Sf(t))}break(t){return this._leafNode(new $f(t))}return(t){let r=new Gi;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Gi)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new zf;if(this._blockNode(o),this.code(t),r){let i=this.name("e");this._currNode=o.catch=new Wi(i),r(i)}return n&&(this._currNode=o.finally=new Ki,this.code(n)),this._endBlockNode(Wi,Ki)}throw(t){return this._leafNode(new Tf(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=ae.nil,n,o){return this._blockNode(new Hi(t,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Hi)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Un))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};Q.CodeGen=Rf;function Vn(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function ic(e,t){return t instanceof ae._CodeOrName?Vn(e,t.names):e}function Eo(e,t,r){if(e instanceof ae.Name)return n(e);if(!o(e))return e;return new ae._Code(e._items.reduce((i,s)=>(s instanceof ae.Name&&(s=n(s)),s instanceof ae._Code?i.push(...s._items):i.push(s),i),[]));function n(i){let s=r[i.str];return s===void 0||t[i.str]!==1?i:(delete t[i.str],s)}function o(i){return i instanceof ae._Code&&i._items.some(s=>s instanceof ae.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function PR(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function p0(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ae._)`!${Af(e)}`}Q.not=p0;var CR=d0(Q.operators.AND);function ER(...e){return e.reduce(CR)}Q.and=ER;var IR=d0(Q.operators.OR);function zR(...e){return e.reduce(IR)}Q.or=zR;function d0(e){return(t,r)=>t===ae.nil?r:r===ae.nil?t:(0,ae._)`${Af(t)} ${e} ${Af(r)}`}function Af(e){return e instanceof ae.Name?e:(0,ae._)`(${e})`}});var le=S(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.checkStrictMode=X.getErrorPath=X.Type=X.useFunc=X.setEvaluated=X.evaluatedPropsToName=X.mergeEvaluated=X.eachItem=X.unescapeJsonPointer=X.escapeJsonPointer=X.escapeFragment=X.unescapeFragment=X.schemaRefOrVal=X.schemaHasRulesButRef=X.schemaHasRules=X.checkUnknownRules=X.alwaysValidSchema=X.toHash=void 0;var _e=K(),RR=Bi();function AR(e){let t={};for(let r of e)t[r]=!0;return t}X.toHash=AR;function OR(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(m0(e,t),!g0(t,e.self.RULES.all))}X.alwaysValidSchema=OR;function m0(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let o=n.RULES.keywords;for(let i in t)o[i]||v0(e,`unknown keyword: "${i}"`)}X.checkUnknownRules=m0;function g0(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}X.schemaHasRules=g0;function NR(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}X.schemaHasRulesButRef=NR;function DR({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,_e._)`${r}`}return(0,_e._)`${e}${t}${(0,_e.getProperty)(n)}`}X.schemaRefOrVal=DR;function jR(e){return y0(decodeURIComponent(e))}X.unescapeFragment=jR;function MR(e){return encodeURIComponent(Nf(e))}X.escapeFragment=MR;function Nf(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}X.escapeJsonPointer=Nf;function y0(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}X.unescapeJsonPointer=y0;function LR(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}X.eachItem=LR;function f0({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,i,s,a)=>{let c=s===void 0?i:s instanceof _e.Name?(i instanceof _e.Name?e(o,i,s):t(o,i,s),s):i instanceof _e.Name?(t(o,s,i),i):r(i,s);return a===_e.Name&&!(c instanceof _e.Name)?n(o,c):c}}X.mergeEvaluated={props:f0({mergeNames:(e,t,r)=>e.if((0,_e._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,_e._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,_e._)`${r} || {}`).code((0,_e._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,_e._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,_e._)`${r} || {}`),Df(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:_0}),items:f0({mergeNames:(e,t,r)=>e.if((0,_e._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,_e._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,_e._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,_e._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function _0(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,_e._)`{}`);return t!==void 0&&Df(e,r,t),r}X.evaluatedPropsToName=_0;function Df(e,t,r){Object.keys(r).forEach(n=>e.assign((0,_e._)`${t}${(0,_e.getProperty)(n)}`,!0))}X.setEvaluated=Df;var h0={};function ZR(e,t){return e.scopeValue("func",{ref:t,code:h0[t.code]||(h0[t.code]=new RR._Code(t.code))})}X.useFunc=ZR;var Of;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Of||(X.Type=Of={}));function qR(e,t,r){if(e instanceof _e.Name){let n=t===Of.Num;return r?n?(0,_e._)`"[" + ${e} + "]"`:(0,_e._)`"['" + ${e} + "']"`:n?(0,_e._)`"/" + ${e}`:(0,_e._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,_e.getProperty)(e).toString():"/"+Nf(e)}X.getErrorPath=qR;function v0(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}X.checkStrictMode=v0});var Ir=S(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});var et=K(),FR={data:new et.Name("data"),valCxt:new et.Name("valCxt"),instancePath:new et.Name("instancePath"),parentData:new et.Name("parentData"),parentDataProperty:new et.Name("parentDataProperty"),rootData:new et.Name("rootData"),dynamicAnchors:new et.Name("dynamicAnchors"),vErrors:new et.Name("vErrors"),errors:new et.Name("errors"),this:new et.Name("this"),self:new et.Name("self"),scope:new et.Name("scope"),json:new et.Name("json"),jsonPos:new et.Name("jsonPos"),jsonLen:new et.Name("jsonLen"),jsonPart:new et.Name("jsonPart")};jf.default=FR});var Ji=S(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.extendErrors=tt.resetErrorsCount=tt.reportExtraError=tt.reportError=tt.keyword$DataError=tt.keywordError=void 0;var ce=K(),ac=le(),lt=Ir();tt.keywordError={message:({keyword:e})=>(0,ce.str)`must pass "${e}" keyword validation`};tt.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,ce.str)`"${e}" keyword must be ${t} ($data)`:(0,ce.str)`"${e}" keyword is invalid ($data)`};function UR(e,t=tt.keywordError,r,n){let{it:o}=e,{gen:i,compositeRule:s,allErrors:a}=o,c=w0(e,t,r);n??(s||a)?b0(i,c):x0(o,(0,ce._)`[${c}]`)}tt.reportError=UR;function BR(e,t=tt.keywordError,r){let{it:n}=e,{gen:o,compositeRule:i,allErrors:s}=n,a=w0(e,t,r);b0(o,a),i||s||x0(n,lt.default.vErrors)}tt.reportExtraError=BR;function VR(e,t){e.assign(lt.default.errors,t),e.if((0,ce._)`${lt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,ce._)`${lt.default.vErrors}.length`,t),()=>e.assign(lt.default.vErrors,null)))}tt.resetErrorsCount=VR;function HR({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:i}){if(o===void 0)throw new Error("ajv implementation error");let s=e.name("err");e.forRange("i",o,lt.default.errors,a=>{e.const(s,(0,ce._)`${lt.default.vErrors}[${a}]`),e.if((0,ce._)`${s}.instancePath === undefined`,()=>e.assign((0,ce._)`${s}.instancePath`,(0,ce.strConcat)(lt.default.instancePath,i.errorPath))),e.assign((0,ce._)`${s}.schemaPath`,(0,ce.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,ce._)`${s}.schema`,r),e.assign((0,ce._)`${s}.data`,n))})}tt.extendErrors=HR;function b0(e,t){let r=e.const("err",t);e.if((0,ce._)`${lt.default.vErrors} === null`,()=>e.assign(lt.default.vErrors,(0,ce._)`[${r}]`),(0,ce._)`${lt.default.vErrors}.push(${r})`),e.code((0,ce._)`${lt.default.errors}++`)}function x0(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;o.$async?r.throw((0,ce._)`new ${e.ValidationError}(${t})`):(r.assign((0,ce._)`${n}.errors`,t),r.return(!1))}var Hn={keyword:new ce.Name("keyword"),schemaPath:new ce.Name("schemaPath"),params:new ce.Name("params"),propertyName:new ce.Name("propertyName"),message:new ce.Name("message"),schema:new ce.Name("schema"),parentSchema:new ce.Name("parentSchema")};function w0(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,ce._)`{}`:GR(e,t,r)}function GR(e,t,r={}){let{gen:n,it:o}=e,i=[WR(o,r),KR(e,r)];return JR(e,t,i),n.object(...i)}function WR({errorPath:e},{instancePath:t}){let r=t?(0,ce.str)`${e}${(0,ac.getErrorPath)(t,ac.Type.Str)}`:e;return[lt.default.instancePath,(0,ce.strConcat)(lt.default.instancePath,r)]}function KR({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:(0,ce.str)`${t}/${e}`;return r&&(o=(0,ce.str)`${o}${(0,ac.getErrorPath)(r,ac.Type.Str)}`),[Hn.schemaPath,o]}function JR(e,{params:t,message:r},n){let{keyword:o,data:i,schemaValue:s,it:a}=e,{opts:c,propertyName:u,topSchemaRef:p,schemaPath:l}=a;n.push([Hn.keyword,o],[Hn.params,typeof t=="function"?t(e):t||(0,ce._)`{}`]),c.messages&&n.push([Hn.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([Hn.schema,s],[Hn.parentSchema,(0,ce._)`${p}${l}`],[lt.default.data,i]),u&&n.push([Hn.propertyName,u])}});var S0=S(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.boolOrEmptySchema=Io.topBoolOrEmptySchema=void 0;var YR=Ji(),QR=K(),XR=Ir(),eA={message:"boolean schema is false"};function tA(e){let{gen:t,schema:r,validateName:n}=e;r===!1?k0(e,!1):typeof r=="object"&&r.$async===!0?t.return(XR.default.data):(t.assign((0,QR._)`${n}.errors`,null),t.return(!0))}Io.topBoolOrEmptySchema=tA;function rA(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),k0(e)):r.var(t,!0)}Io.boolOrEmptySchema=rA;function k0(e,t){let{gen:r,data:n}=e,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,YR.reportError)(o,eA,void 0,t)}});var Mf=S(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.getRules=zo.isJSONType=void 0;var nA=["string","number","integer","boolean","null","object","array"],oA=new Set(nA);function iA(e){return typeof e=="string"&&oA.has(e)}zo.isJSONType=iA;function sA(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}zo.getRules=sA});var Lf=S(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.shouldUseRule=nn.shouldUseGroup=nn.schemaHasRulesForType=void 0;function aA({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&$0(e,n)}nn.schemaHasRulesForType=aA;function $0(e,t){return t.rules.some(r=>T0(e,r))}nn.shouldUseGroup=$0;function T0(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}nn.shouldUseRule=T0});var Yi=S(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.reportTypeError=rt.checkDataTypes=rt.checkDataType=rt.coerceAndCheckDataType=rt.getJSONTypes=rt.getSchemaTypes=rt.DataType=void 0;var cA=Mf(),uA=Lf(),lA=Ji(),G=K(),P0=le(),Ro;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Ro||(rt.DataType=Ro={}));function pA(e){let t=C0(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}rt.getSchemaTypes=pA;function C0(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(cA.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}rt.getJSONTypes=C0;function dA(e,t){let{gen:r,data:n,opts:o}=e,i=fA(t,o.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,uA.schemaHasRulesForType)(e,t[0]));if(s){let a=qf(t,n,o.strictNumbers,Ro.Wrong);r.if(a,()=>{i.length?hA(e,t,i):Ff(e)})}return s}rt.coerceAndCheckDataType=dA;var E0=new Set(["string","number","integer","boolean","null"]);function fA(e,t){return t?e.filter(r=>E0.has(r)||t==="array"&&r==="array"):[]}function hA(e,t,r){let{gen:n,data:o,opts:i}=e,s=n.let("dataType",(0,G._)`typeof ${o}`),a=n.let("coerced",(0,G._)`undefined`);i.coerceTypes==="array"&&n.if((0,G._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,G._)`${o}[0]`).assign(s,(0,G._)`typeof ${o}`).if(qf(t,o,i.strictNumbers),()=>n.assign(a,o))),n.if((0,G._)`${a} !== undefined`);for(let u of r)(E0.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);n.else(),Ff(e),n.endIf(),n.if((0,G._)`${a} !== undefined`,()=>{n.assign(o,a),mA(e,a)});function c(u){switch(u){case"string":n.elseIf((0,G._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,G._)`"" + ${o}`).elseIf((0,G._)`${o} === null`).assign(a,(0,G._)`""`);return;case"number":n.elseIf((0,G._)`${s} == "boolean" || ${o} === null
34
34
  || (${s} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,G._)`+${o}`);return;case"integer":n.elseIf((0,G._)`${s} === "boolean" || ${o} === null
35
35
  || (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,G._)`+${o}`);return;case"boolean":n.elseIf((0,G._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf((0,G._)`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":n.elseIf((0,G._)`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(a,null);return;case"array":n.elseIf((0,G._)`${s} === "string" || ${s} === "number"
36
- || ${s} === "boolean" || ${o} === null`).assign(a,(0,G._)`[${o}]`)}}}function sA({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,G._)`${t} !== undefined`,()=>e.assign((0,G._)`${t}[${r}]`,n))}function jf(e,t,r,n=Co.Correct){let o=n===Co.Correct?G.operators.EQ:G.operators.NEQ,i;switch(e){case"null":return(0,G._)`${t} ${o} null`;case"array":i=(0,G._)`Array.isArray(${t})`;break;case"object":i=(0,G._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s((0,G._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return(0,G._)`typeof ${t} ${o} ${e}`}return n===Co.Correct?i:(0,G.not)(i);function s(a=G.nil){return(0,G.and)((0,G._)`typeof ${t} == "number"`,a,r?(0,G._)`isFinite(${t})`:G.nil)}}tt.checkDataType=jf;function Mf(e,t,r,n){if(e.length===1)return jf(e[0],t,r,n);let o,i=(0,vb.toHash)(e);if(i.array&&i.object){let s=(0,G._)`typeof ${t} != "object"`;o=i.null?s:(0,G._)`!${t} || ${s}`,delete i.null,delete i.array,delete i.object}else o=G.nil;i.number&&delete i.integer;for(let s in i)o=(0,G.and)(o,jf(s,t,r,n));return o}tt.checkDataTypes=Mf;var aA={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,G._)`{type: ${e}}`:(0,G._)`{type: ${t}}`};function Lf(e){let t=cA(e);(0,tA.reportError)(t,aA)}tt.reportTypeError=Lf;function cA(e){let{gen:t,data:r,schema:n}=e,o=(0,vb.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var kb=S(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});nc.assignDefaults=void 0;var Eo=K(),uA=le();function lA(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)wb(e,o,r[o].default);else t==="array"&&Array.isArray(n)&&n.forEach((o,i)=>wb(e,i,o.default))}nc.assignDefaults=lA;function wb(e,t,r){let{gen:n,compositeRule:o,data:i,opts:s}=e;if(r===void 0)return;let a=(0,Eo._)`${i}${(0,Eo.getProperty)(t)}`;if(o){(0,uA.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,Eo._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,Eo._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,Eo._)`${a} = ${(0,Eo.stringify)(r)}`)}});var Lt=S(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.validateUnion=me.validateArray=me.usePattern=me.callValidateCode=me.schemaProperties=me.allSchemaProperties=me.noPropertyInData=me.propertyInData=me.isOwnProperty=me.hasPropFunc=me.reportMissingProp=me.checkMissingProp=me.checkReportMissingProp=void 0;var be=K(),Zf=le(),en=Pr(),pA=le();function dA(e,t){let{gen:r,data:n,it:o}=e;r.if(Ff(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,be._)`${t}`},!0),e.error()})}me.checkReportMissingProp=dA;function fA({gen:e,data:t,it:{opts:r}},n,o){return(0,be.or)(...n.map(i=>(0,be.and)(Ff(e,t,i,r.ownProperties),(0,be._)`${o} = ${i}`)))}me.checkMissingProp=fA;function hA(e,t){e.setParams({missingProperty:t},!0),e.error()}me.reportMissingProp=hA;function Sb(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,be._)`Object.prototype.hasOwnProperty`})}me.hasPropFunc=Sb;function qf(e,t,r){return(0,be._)`${Sb(e)}.call(${t}, ${r})`}me.isOwnProperty=qf;function mA(e,t,r,n){let o=(0,be._)`${t}${(0,be.getProperty)(r)} !== undefined`;return n?(0,be._)`${o} && ${qf(e,t,r)}`:o}me.propertyInData=mA;function Ff(e,t,r,n){let o=(0,be._)`${t}${(0,be.getProperty)(r)} === undefined`;return n?(0,be.or)(o,(0,be.not)(qf(e,t,r))):o}me.noPropertyInData=Ff;function $b(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}me.allSchemaProperties=$b;function gA(e,t){return $b(t).filter(r=>!(0,Zf.alwaysValidSchema)(e,t[r]))}me.schemaProperties=gA;function yA({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:i},it:s},a,c,u){let p=u?(0,be._)`${e}, ${t}, ${n}${o}`:t,l=[[en.default.instancePath,(0,be.strConcat)(en.default.instancePath,i)],[en.default.parentData,s.parentData],[en.default.parentDataProperty,s.parentDataProperty],[en.default.rootData,en.default.rootData]];s.opts.dynamicRef&&l.push([en.default.dynamicAnchors,en.default.dynamicAnchors]);let d=(0,be._)`${p}, ${r.object(...l)}`;return c!==be.nil?(0,be._)`${a}.call(${c}, ${d})`:(0,be._)`${a}(${d})`}me.callValidateCode=yA;var _A=(0,be._)`new RegExp`;function vA({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,i=o(r,n);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,be._)`${o.code==="new RegExp"?_A:(0,pA.useFunc)(e,o)}(${r}, ${n})`})}me.usePattern=vA;function bA(e){let{gen:t,data:r,keyword:n,it:o}=e,i=t.name("valid");if(o.allErrors){let a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(i,!0),s(()=>t.break()),i;function s(a){let c=t.const("len",(0,be._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:n,dataProp:u,dataPropType:Zf.Type.Num},i),t.if((0,be.not)(i),a)})}}me.validateArray=bA;function xA(e){let{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Zf.alwaysValidSchema)(o,c))&&!o.opts.unevaluated)return;let s=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let p=e.subschema({keyword:n,schemaProp:u,compositeRule:!0},a);t.assign(s,(0,be._)`${s} || ${a}`),e.mergeValidEvaluated(p,a)||t.if((0,be.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}me.validateUnion=xA});var Cb=S(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.validateKeywordUsage=lr.validSchemaType=lr.funcKeywordCode=lr.macroKeywordCode=void 0;var ut=K(),Bn=Pr(),wA=Lt(),kA=Hi();function SA(e,t){let{gen:r,keyword:n,schema:o,parentSchema:i,it:s}=e,a=t.macro.call(s.self,o,i,s),c=Pb(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");e.subschema({schema:a,schemaPath:ut.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}lr.macroKeywordCode=SA;function $A(e,t){var r;let{gen:n,keyword:o,schema:i,parentSchema:s,$data:a,it:c}=e;PA(c,t);let u=!a&&t.compile?t.compile.call(c.self,i,s,c):t.validate,p=Pb(n,o,u),l=n.let("valid");e.block$data(l,d),e.ok((r=t.valid)!==null&&r!==void 0?r:l);function d(){if(t.errors===!1)m(),t.modifying&&Tb(e),y(()=>e.error());else{let b=t.async?f():h();t.modifying&&Tb(e),y(()=>TA(e,b))}}function f(){let b=n.let("ruleErrs",null);return n.try(()=>m((0,ut._)`await `),v=>n.assign(l,!1).if((0,ut._)`${v} instanceof ${c.ValidationError}`,()=>n.assign(b,(0,ut._)`${v}.errors`),()=>n.throw(v))),b}function h(){let b=(0,ut._)`${p}.errors`;return n.assign(b,null),m(ut.nil),b}function m(b=t.async?(0,ut._)`await `:ut.nil){let v=c.opts.passContext?Bn.default.this:Bn.default.self,k=!("compile"in t&&!a||t.schema===!1);n.assign(l,(0,ut._)`${b}${(0,wA.callValidateCode)(e,p,v,k)}`,t.modifying)}function y(b){var v;n.if((0,ut.not)((v=t.valid)!==null&&v!==void 0?v:l),b)}}lr.funcKeywordCode=$A;function Tb(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,ut._)`${n.parentData}[${n.parentDataProperty}]`))}function TA(e,t){let{gen:r}=e;r.if((0,ut._)`Array.isArray(${t})`,()=>{r.assign(Bn.default.vErrors,(0,ut._)`${Bn.default.vErrors} === null ? ${t} : ${Bn.default.vErrors}.concat(${t})`).assign(Bn.default.errors,(0,ut._)`${Bn.default.vErrors}.length`),(0,kA.extendErrors)(e)},()=>e.error())}function PA({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Pb(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,ut.stringify)(r)})}function CA(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}lr.validSchemaType=CA;function EA({schema:e,opts:t,self:r,errSchemaPath:n},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");let s=o.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}lr.validateKeywordUsage=EA});var Ib=S(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.extendSubschemaMode=tn.extendSubschemaData=tn.getSubschema=void 0;var pr=K(),Eb=le();function IA(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:i,topSchemaRef:s}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,pr._)`${e.schemaPath}${(0,pr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,pr._)`${e.schemaPath}${(0,pr.getProperty)(t)}${(0,pr.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Eb.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}tn.getSubschema=IA;function zA(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:i,propertyName:s}){if(o!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:u,dataPathArr:p,opts:l}=t,d=a.let("data",(0,pr._)`${t.data}${(0,pr.getProperty)(r)}`,!0);c(d),e.errorPath=(0,pr.str)`${u}${(0,Eb.getErrorPath)(r,n,l.jsPropertySyntax)}`,e.parentDataProperty=(0,pr._)`${r}`,e.dataPathArr=[...p,e.parentDataProperty]}if(o!==void 0){let u=o instanceof pr.Name?o:a.let("data",o,!0);c(u),s!==void 0&&(e.propertyName=s)}i&&(e.dataTypes=i);function c(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}tn.extendSubschemaData=zA;function RA(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){n!==void 0&&(e.compositeRule=n),o!==void 0&&(e.createErrors=o),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}tn.extendSubschemaMode=RA});var Uf=S((cU,zb)=>{"use strict";zb.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var s=i[o];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var Ab=S((uU,Rb)=>{"use strict";var rn=Rb.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};oc(t,n,o,e,"",e)};rn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};rn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};rn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};rn.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function oc(e,t,r,n,o,i,s,a,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,o,i,s,a,c,u);for(var p in n){var l=n[p];if(Array.isArray(l)){if(p in rn.arrayKeywords)for(var d=0;d<l.length;d++)oc(e,t,r,l[d],o+"/"+p+"/"+d,i,o,p,n,d)}else if(p in rn.propsKeywords){if(l&&typeof l=="object")for(var f in l)oc(e,t,r,l[f],o+"/"+p+"/"+AA(f),i,o,p,n,f)}else(p in rn.keywords||e.allKeys&&!(p in rn.skipKeywords))&&oc(e,t,r,l,o+"/"+p,i,o,p,n)}r(n,o,i,s,a,c,u)}}function AA(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Wi=S(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.getSchemaRefs=bt.resolveUrl=bt.normalizeId=bt._getFullPath=bt.getFullPath=bt.inlineRef=void 0;var OA=le(),NA=Uf(),DA=Ab(),jA=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function MA(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Bf(e):t?Ob(e)<=t:!1}bt.inlineRef=MA;var LA=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Bf(e){for(let t in e){if(LA.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Bf)||typeof r=="object"&&Bf(r))return!0}return!1}function Ob(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!jA.has(r)&&(typeof e[r]=="object"&&(0,OA.eachItem)(e[r],n=>t+=Ob(n)),t===1/0))return 1/0}return t}function Nb(e,t="",r){r!==!1&&(t=Io(t));let n=e.parse(t);return Db(e,n)}bt.getFullPath=Nb;function Db(e,t){return e.serialize(t).split("#")[0]+"#"}bt._getFullPath=Db;var ZA=/#\/?$/;function Io(e){return e?e.replace(ZA,""):""}bt.normalizeId=Io;function qA(e,t,r){return r=Io(r),e.resolve(t,r)}bt.resolveUrl=qA;var FA=/^[a-z_][-a-z0-9._]*$/i;function UA(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=Io(e[r]||t),i={"":o},s=Nb(n,o,!1),a={},c=new Set;return DA(e,{allKeys:!0},(l,d,f,h)=>{if(h===void 0)return;let m=s+d,y=i[h];typeof l[r]=="string"&&(y=b.call(this,l[r])),v.call(this,l.$anchor),v.call(this,l.$dynamicAnchor),i[d]=y;function b(k){let C=this.opts.uriResolver.resolve;if(k=Io(y?C(y,k):k),c.has(k))throw p(k);c.add(k);let T=this.refs[k];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?u(l,T.schema,k):k!==Io(m)&&(k[0]==="#"?(u(l,a[k],k),a[k]=l):this.refs[k]=m),k}function v(k){if(typeof k=="string"){if(!FA.test(k))throw new Error(`invalid anchor "${k}"`);b.call(this,`#${k}`)}}}),a;function u(l,d,f){if(d!==void 0&&!NA(l,d))throw p(f)}function p(l){return new Error(`reference "${l}" resolves to more than one schema`)}}bt.getSchemaRefs=UA});var Yi=S(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.getData=nn.KeywordCxt=nn.validateFunctionCode=void 0;var qb=gb(),jb=Gi(),Hf=Df(),ic=Gi(),BA=kb(),Ji=Cb(),Vf=Ib(),D=K(),B=Pr(),VA=Wi(),Cr=le(),Ki=Hi();function HA(e){if(Bb(e)&&(Vb(e),Ub(e))){KA(e);return}Fb(e,()=>(0,qb.topBoolOrEmptySchema)(e))}nn.validateFunctionCode=HA;function Fb({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,(0,D._)`${B.default.data}, ${B.default.valCxt}`,n.$async,()=>{e.code((0,D._)`"use strict"; ${Mb(r,o)}`),WA(e,o),e.code(i)}):e.func(t,(0,D._)`${B.default.data}, ${GA(o)}`,n.$async,()=>e.code(Mb(r,o)).code(i))}function GA(e){return(0,D._)`{${B.default.instancePath}="", ${B.default.parentData}, ${B.default.parentDataProperty}, ${B.default.rootData}=${B.default.data}${e.dynamicRef?(0,D._)`, ${B.default.dynamicAnchors}={}`:D.nil}}={}`}function WA(e,t){e.if(B.default.valCxt,()=>{e.var(B.default.instancePath,(0,D._)`${B.default.valCxt}.${B.default.instancePath}`),e.var(B.default.parentData,(0,D._)`${B.default.valCxt}.${B.default.parentData}`),e.var(B.default.parentDataProperty,(0,D._)`${B.default.valCxt}.${B.default.parentDataProperty}`),e.var(B.default.rootData,(0,D._)`${B.default.valCxt}.${B.default.rootData}`),t.dynamicRef&&e.var(B.default.dynamicAnchors,(0,D._)`${B.default.valCxt}.${B.default.dynamicAnchors}`)},()=>{e.var(B.default.instancePath,(0,D._)`""`),e.var(B.default.parentData,(0,D._)`undefined`),e.var(B.default.parentDataProperty,(0,D._)`undefined`),e.var(B.default.rootData,B.default.data),t.dynamicRef&&e.var(B.default.dynamicAnchors,(0,D._)`{}`)})}function KA(e){let{schema:t,opts:r,gen:n}=e;Fb(e,()=>{r.$comment&&t.$comment&&Gb(e),eO(e),n.let(B.default.vErrors,null),n.let(B.default.errors,0),r.unevaluated&&JA(e),Hb(e),nO(e)})}function JA(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,D._)`${r}.evaluated`),t.if((0,D._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,D._)`${e.evaluated}.props`,(0,D._)`undefined`)),t.if((0,D._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,D._)`${e.evaluated}.items`,(0,D._)`undefined`))}function Mb(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,D._)`/*# sourceURL=${r} */`:D.nil}function YA(e,t){if(Bb(e)&&(Vb(e),Ub(e))){QA(e,t);return}(0,qb.boolOrEmptySchema)(e,t)}function Ub({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function Bb(e){return typeof e.schema!="boolean"}function QA(e,t){let{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&Gb(e),tO(e),rO(e);let i=n.const("_errs",B.default.errors);Hb(e,i),n.var(t,(0,D._)`${i} === ${B.default.errors}`)}function Vb(e){(0,Cr.checkUnknownRules)(e),XA(e)}function Hb(e,t){if(e.opts.jtd)return Lb(e,[],!1,t);let r=(0,jb.getSchemaTypes)(e.schema),n=(0,jb.coerceAndCheckDataType)(e,r);Lb(e,r,!n,t)}function XA(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Cr.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function eO(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Cr.checkStrictMode)(e,"default is ignored in the schema root")}function tO(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,VA.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function rO(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Gb({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let i=r.$comment;if(o.$comment===!0)e.code((0,D._)`${B.default.self}.logger.log(${i})`);else if(typeof o.$comment=="function"){let s=(0,D.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,D._)`${B.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function nO(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if((0,D._)`${B.default.errors} === 0`,()=>t.return(B.default.data),()=>t.throw((0,D._)`new ${o}(${B.default.vErrors})`)):(t.assign((0,D._)`${n}.errors`,B.default.vErrors),i.unevaluated&&oO(e),t.return((0,D._)`${B.default.errors} === 0`))}function oO({gen:e,evaluated:t,props:r,items:n}){r instanceof D.Name&&e.assign((0,D._)`${t}.props`,r),n instanceof D.Name&&e.assign((0,D._)`${t}.items`,n)}function Lb(e,t,r,n){let{gen:o,schema:i,data:s,allErrors:a,opts:c,self:u}=e,{RULES:p}=u;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,Cr.schemaHasRulesButRef)(i,p))){o.block(()=>Kb(e,"$ref",p.all.$ref.definition));return}c.jtd||iO(e,t),o.block(()=>{for(let d of p.rules)l(d);l(p.post)});function l(d){(0,Hf.shouldUseGroup)(i,d)&&(d.type?(o.if((0,ic.checkDataType)(d.type,s,c.strictNumbers)),Zb(e,d),t.length===1&&t[0]===d.type&&r&&(o.else(),(0,ic.reportTypeError)(e)),o.endIf()):Zb(e,d),a||o.if((0,D._)`${B.default.errors} === ${n||0}`))}}function Zb(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,BA.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,Hf.shouldUseRule)(n,i)&&Kb(e,i.keyword,i.definition,t.type)})}function iO(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(sO(e,t),e.opts.allowUnionTypes||aO(e,t),cO(e,e.dataTypes))}function sO(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Wb(e.dataTypes,r)||Gf(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),lO(e,t)}}function aO(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Gf(e,"use allowUnionTypes to allow union type keyword")}function cO(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,Hf.shouldUseRule)(e.schema,o)){let{type:i}=o.definition;i.length&&!i.some(s=>uO(t,s))&&Gf(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function uO(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Wb(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function lO(e,t){let r=[];for(let n of e.dataTypes)Wb(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Gf(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Cr.checkStrictMode)(e,t,e.opts.strictTypes)}var sc=class{constructor(t,r,n){if((0,Ji.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Cr.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Jb(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Ji.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",B.default.errors))}result(t,r,n){this.failResult((0,D.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,D.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,D._)`${r} !== undefined && (${(0,D.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Ki.reportExtraError:Ki.reportError)(this,this.def.error,r)}$dataError(){(0,Ki.reportError)(this,this.def.$dataError||Ki.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ki.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=D.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=D.nil,r=D.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:i,def:s}=this;n.if((0,D.or)((0,D._)`${o} === undefined`,r)),t!==D.nil&&n.assign(t,!0),(i.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==D.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:o,it:i}=this;return(0,D.or)(s(),a());function s(){if(n.length){if(!(r instanceof D.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,D._)`${(0,ic.checkDataTypes)(c,r,i.opts.strictNumbers,ic.DataType.Wrong)}`}return D.nil}function a(){if(o.validateSchema){let c=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,D._)`!${c}(${r})`}return D.nil}}subschema(t,r){let n=(0,Vf.getSubschema)(this.it,t);(0,Vf.extendSubschemaData)(n,this.it,t),(0,Vf.extendSubschemaMode)(n,t);let o={...this.it,...n,items:void 0,props:void 0};return YA(o,r),o}mergeEvaluated(t,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Cr.mergeEvaluated.props(o,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Cr.mergeEvaluated.items(o,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(t,D.Name)),!0}};nn.KeywordCxt=sc;function Kb(e,t,r,n){let o=new sc(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,Ji.funcKeywordCode)(o,r):"macro"in r?(0,Ji.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,Ji.funcKeywordCode)(o,r)}var pO=/^\/(?:[^~]|~0|~1)*$/,dO=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Jb(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(e==="")return B.default.rootData;if(e[0]==="/"){if(!pO.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=B.default.rootData}else{let u=dO.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let p=+u[1];if(o=u[2],o==="#"){if(p>=t)throw new Error(c("property/index",p));return n[t-p]}if(p>t)throw new Error(c("data",p));if(i=r[t-p],!o)return i}let s=i,a=o.split("/");for(let u of a)u&&(i=(0,D._)`${i}${(0,D.getProperty)((0,Cr.unescapeJsonPointer)(u))}`,s=(0,D._)`${s} && ${i}`);return s;function c(u,p){return`Cannot access ${u} ${p} levels up, current level is ${t}`}}nn.getData=Jb});var ac=S(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});var Wf=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Kf.default=Wf});var Qi=S(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var Jf=Wi(),Yf=class extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Jf.resolveUrl)(t,r,n),this.missingSchema=(0,Jf.normalizeId)((0,Jf.getFullPath)(t,this.missingRef))}};Qf.default=Yf});var uc=S(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.resolveSchema=Zt.getCompilingSchema=Zt.resolveRef=Zt.compileSchema=Zt.SchemaEnv=void 0;var Jt=K(),fO=ac(),Vn=Pr(),Yt=Wi(),Yb=le(),hO=Yi(),zo=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Yt.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};Zt.SchemaEnv=zo;function eh(e){let t=Qb.call(this,e);if(t)return t;let r=(0,Yt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:i}=this.opts,s=new Jt.CodeGen(this.scope,{es5:n,lines:o,ownProperties:i}),a;e.$async&&(a=s.scopeValue("Error",{ref:fO.default,code:(0,Jt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:Vn.default.data,parentData:Vn.default.parentData,parentDataProperty:Vn.default.parentDataProperty,dataNames:[Vn.default.data],dataPathArr:[Jt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Jt.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Jt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Jt._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(e),(0,hO.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let l=s.toString();p=`${s.scopeRefs(Vn.default.scope)}return ${l}`,this.opts.code.process&&(p=this.opts.code.process(p,e));let f=new Function(`${Vn.default.self}`,`${Vn.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:c,validateCode:l,scopeValues:s._values}),this.opts.unevaluated){let{props:h,items:m}=u;f.evaluated={props:h instanceof Jt.Name?void 0:h,items:m instanceof Jt.Name?void 0:m,dynamicProps:h instanceof Jt.Name,dynamicItems:m instanceof Jt.Name},f.source&&(f.source.evaluated=(0,Jt.stringify)(f.evaluated))}return e.validate=f,e}catch(l){throw delete e.validate,delete e.validateName,p&&this.logger.error("Error compiling schema, function code:",p),l}finally{this._compilations.delete(e)}}Zt.compileSchema=eh;function mO(e,t,r){var n;r=(0,Yt.resolveUrl)(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let i=_O.call(this,e,r);if(i===void 0){let s=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;s&&(i=new zo({schema:s,schemaId:a,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=gO.call(this,i)}Zt.resolveRef=mO;function gO(e){return(0,Yt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:eh.call(this,e)}function Qb(e){for(let t of this._compilations)if(yO(t,e))return t}Zt.getCompilingSchema=Qb;function yO(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function _O(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||cc.call(this,e,t)}function cc(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Yt._getFullPath)(this.opts.uriResolver,r),o=(0,Yt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return Xf.call(this,r,e);let i=(0,Yt.normalizeId)(n),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=cc.call(this,e,s);return typeof a?.schema!="object"?void 0:Xf.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||eh.call(this,s),i===(0,Yt.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,u=a[c];return u&&(o=(0,Yt.resolveUrl)(this.opts.uriResolver,o,u)),new zo({schema:a,schemaId:c,root:e,baseId:o})}return Xf.call(this,r,s)}}Zt.resolveSchema=cc;var vO=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Xf(e,{baseId:t,schema:r,root:n}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,Yb.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!vO.has(a)&&u&&(t=(0,Yt.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,Yb.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Yt.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=cc.call(this,n,a)}let{schemaId:s}=this.opts;if(i=i||new zo({schema:r,schemaId:s,root:n,baseId:t}),i.schema!==i.root.schema)return i}});var Xb=S((mU,bO)=>{bO.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var rh=S((gU,n0)=>{"use strict";var xO=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t0=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function th(e){let t="",r=0,n=0;for(n=0;n<e.length;n++)if(r=e[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var wO=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function e0(e){return e.length=0,!0}function kO(e,t,r){if(e.length){let n=th(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}function SO(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],i=!1,s=!1,a=kO;for(let c=0;c<e.length;c++){let u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(i===!0&&(s=!0),!a(o,n,r))break;if(++t>7){r.error=!0;break}c>0&&e[c-1]===":"&&(i=!0),n.push(":");continue}else if(u==="%"){if(!a(o,n,r))break;a=e0}else{o.push(u);continue}}return o.length&&(a===e0?r.zone=o.join(""):s?n.push(o.join("")):n.push(th(o))),r.address=n.join(""),r}function r0(e){if($O(e,":")<2)return{host:e,isIPV6:!1};let t=SO(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:n}}}function $O(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}function TO(e){let t=e,r=[],n=-1,o=0;for(;o=t.length;){if(o===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(o===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(o===3&&t==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),r.length!==0&&r.pop();continue}}if((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}function PO(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function CO(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!t0(r)){let n=r0(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}n0.exports={nonSimpleDomain:wO,recomposeAuthority:CO,normalizeComponentEncoding:PO,removeDotSegments:TO,isIPv4:t0,isUUID:xO,normalizeIPv6:r0,stringArrayToHexStripped:th}});var c0=S((yU,a0)=>{"use strict";var{isUUID:EO}=rh(),IO=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,zO=["http","https","ws","wss","urn","urn:uuid"];function RO(e){return zO.indexOf(e)!==-1}function nh(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function o0(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function i0(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function AO(e){return e.secure=nh(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function OO(e){if((e.port===(nh(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function NO(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(IO);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=`${n}:${t.nid||e.nid}`,i=oh(o);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function DO(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,i=oh(o);i&&(e=i.serialize(e,t));let s=e,a=e.nss;return s.path=`${n||t.nid}:${a}`,t.skipEscape=!0,s}function jO(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!EO(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function MO(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var s0={scheme:"http",domainHost:!0,parse:o0,serialize:i0},LO={scheme:"https",domainHost:s0.domainHost,parse:o0,serialize:i0},lc={scheme:"ws",domainHost:!0,parse:AO,serialize:OO},ZO={scheme:"wss",domainHost:lc.domainHost,parse:lc.parse,serialize:lc.serialize},qO={scheme:"urn",parse:NO,serialize:DO,skipNormalize:!0},FO={scheme:"urn:uuid",parse:jO,serialize:MO,skipNormalize:!0},pc={http:s0,https:LO,ws:lc,wss:ZO,urn:qO,"urn:uuid":FO};Object.setPrototypeOf(pc,null);function oh(e){return e&&(pc[e]||pc[e.toLowerCase()])||void 0}a0.exports={wsIsSecure:nh,SCHEMES:pc,isValidSchemeName:RO,getSchemeHandler:oh}});var p0=S((_U,fc)=>{"use strict";var{normalizeIPv6:UO,removeDotSegments:Xi,recomposeAuthority:BO,normalizeComponentEncoding:dc,isIPv4:VO,nonSimpleDomain:HO}=rh(),{SCHEMES:GO,getSchemeHandler:u0}=c0();function WO(e,t){return typeof e=="string"?e=dr(Er(e,t),t):typeof e=="object"&&(e=Er(dr(e,t),t)),e}function KO(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=l0(Er(e,n),Er(t,n),n,!0);return n.skipEscape=!0,dr(o,n)}function l0(e,t,r,n){let o={};return n||(e=Er(dr(e,r),r),t=Er(dr(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Xi(t.path||""),o.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Xi(t.path||""),o.query=t.query):(t.path?(t.path[0]==="/"?o.path=Xi(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?o.path="/"+t.path:e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path,o.path=Xi(o.path)),o.query=t.query):(o.path=e.path,t.query!==void 0?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function JO(e,t,r){return typeof e=="string"?(e=unescape(e),e=dr(dc(Er(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=dr(dc(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=dr(dc(Er(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=dr(dc(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function dr(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),o=[],i=u0(n.scheme||r.scheme);i&&i.serialize&&i.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&o.push(r.scheme,":");let s=BO(r);if(s!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(s),r.path&&r.path[0]!=="/"&&o.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!i||!i.absolutePath)&&(a=Xi(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),o.push(a)}return r.query!==void 0&&o.push("?",r.query),r.fragment!==void 0&&o.push("#",r.fragment),o.join("")}var YO=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Er(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let i=e.match(YO);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host)if(VO(n.host)===!1){let c=UO(n.host);n.host=c.host.toLowerCase(),o=c.isIPV6}else o=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let s=u0(r.scheme||n.scheme);if(!r.unicodeSupport&&(!s||!s.unicodeSupport)&&n.host&&(r.domainHost||s&&s.domainHost)&&o===!1&&HO(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(a){n.error=n.error||"Host's domain name can not be converted to ASCII: "+a}(!s||s&&!s.skipNormalize)&&(e.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=unescape(n.host))),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),s&&s.parse&&s.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var ih={SCHEMES:GO,normalize:WO,resolve:KO,resolveComponent:l0,equal:JO,serialize:dr,parse:Er};fc.exports=ih;fc.exports.default=ih;fc.exports.fastUri=ih});var f0=S(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0});var d0=p0();d0.code='require("ajv/dist/runtime/uri").default';sh.default=d0});var x0=S(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.CodeGen=He.Name=He.nil=He.stringify=He.str=He._=He.KeywordCxt=void 0;var QO=Yi();Object.defineProperty(He,"KeywordCxt",{enumerable:!0,get:function(){return QO.KeywordCxt}});var Ro=K();Object.defineProperty(He,"_",{enumerable:!0,get:function(){return Ro._}});Object.defineProperty(He,"str",{enumerable:!0,get:function(){return Ro.str}});Object.defineProperty(He,"stringify",{enumerable:!0,get:function(){return Ro.stringify}});Object.defineProperty(He,"nil",{enumerable:!0,get:function(){return Ro.nil}});Object.defineProperty(He,"Name",{enumerable:!0,get:function(){return Ro.Name}});Object.defineProperty(He,"CodeGen",{enumerable:!0,get:function(){return Ro.CodeGen}});var XO=ac(),_0=Qi(),eN=Nf(),es=uc(),tN=K(),ts=Wi(),hc=Gi(),ch=le(),h0=Xb(),rN=f0(),v0=(e,t)=>new RegExp(e,t);v0.code="new RegExp";var nN=["removeAdditional","useDefaults","coerceTypes"],oN=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),iN={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},sN={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},m0=200;function aN(e){var t,r,n,o,i,s,a,c,u,p,l,d,f,h,m,y,b,v,k,C,T,U,Y,Ce,dt;let ze=e.strict,Ye=(t=e.code)===null||t===void 0?void 0:t.optimize,zt=Ye===!0||Ye===void 0?1:Ye||0,si=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:v0,io=(o=e.uriResolver)!==null&&o!==void 0?o:rN.default;return{strictSchema:(s=(i=e.strictSchema)!==null&&i!==void 0?i:ze)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:ze)!==null&&c!==void 0?c:!0,strictTypes:(p=(u=e.strictTypes)!==null&&u!==void 0?u:ze)!==null&&p!==void 0?p:"log",strictTuples:(d=(l=e.strictTuples)!==null&&l!==void 0?l:ze)!==null&&d!==void 0?d:"log",strictRequired:(h=(f=e.strictRequired)!==null&&f!==void 0?f:ze)!==null&&h!==void 0?h:!1,code:e.code?{...e.code,optimize:zt,regExp:si}:{optimize:zt,regExp:si},loopRequired:(m=e.loopRequired)!==null&&m!==void 0?m:m0,loopEnum:(y=e.loopEnum)!==null&&y!==void 0?y:m0,meta:(b=e.meta)!==null&&b!==void 0?b:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(k=e.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(C=e.schemaId)!==null&&C!==void 0?C:"$id",addUsedSchema:(T=e.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(U=e.validateSchema)!==null&&U!==void 0?U:!0,validateFormats:(Y=e.validateFormats)!==null&&Y!==void 0?Y:!0,unicodeRegExp:(Ce=e.unicodeRegExp)!==null&&Ce!==void 0?Ce:!0,int32range:(dt=e.int32range)!==null&&dt!==void 0?dt:!0,uriResolver:io}}var rs=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...aN(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new tN.ValueScope({scope:{},prefixes:oN,es5:r,lines:n}),this.logger=fN(t.logger);let o=t.validateFormats;t.validateFormats=!1,this.RULES=(0,eN.getRules)(),g0.call(this,iN,t,"NOT SUPPORTED"),g0.call(this,sN,t,"DEPRECATED","warn"),this._metaOpts=pN.call(this),t.formats&&uN.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&lN.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),cN.call(this),t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,o=h0;n==="id"&&(o={...h0},o.id=o.$id,delete o.$id),r&&t&&this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,t,r);async function o(p,l){await i.call(this,p.$schema);let d=this._addSchema(p,l);return d.validate||s.call(this,d)}async function i(p){p&&!this.getSchema(p)&&await o.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(l){if(!(l instanceof _0.default))throw l;return a.call(this,l),await c.call(this,l.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:l}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${l} cannot be resolved`)}async function c(p){let l=await u.call(this,p);this.refs[p]||await i.call(this,l.$schema),this.refs[p]||this.addSchema(l,p,r)}async function u(p){let l=this._loading[p];if(l)return l;try{return await(this._loading[p]=n(p))}finally{delete this._loading[p]}}}addSchema(t,r,n,o=this.opts.validateSchema){if(Array.isArray(t)){for(let s of t)this.addSchema(s,void 0,n,o);return this}let i;if(typeof t=="object"){let{schemaId:s}=this.opts;if(i=t[s],i!==void 0&&typeof i!="string")throw new Error(`schema ${s} must be string`)}return r=(0,ts.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,o,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,t);if(!o&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return o}getSchema(t){let r;for(;typeof(r=y0.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,o=new es.SchemaEnv({schema:{},schemaId:n});if(r=es.resolveSchema.call(this,o,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=y0.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,ts.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(mN.call(this,n,r),!r)return(0,ch.eachItem)(n,i=>ah.call(this,i)),this;yN.call(this,r);let o={...r,type:(0,hc.getJSONTypes)(r.type),schemaType:(0,hc.getJSONTypes)(r.schemaType)};return(0,ch.eachItem)(n,o.type.length===0?i=>ah.call(this,i,o):i=>o.type.forEach(s=>ah.call(this,i,o,s))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let o=n.rules.findIndex(i=>i.keyword===t);o>=0&&n.rules.splice(o,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,i)=>o+r+i)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let o of r){let i=o.split("/").slice(1),s=t;for(let a of i)s=s[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:u}=c.definition,p=s[a];u&&p&&(s[a]=b0(p))}}return t}_removeAllSchemas(t,r){for(let n in t){let o=t[n];(!r||r.test(n))&&(typeof o=="string"?delete t[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete t[n]))}}_addSchema(t,r,n,o=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof t=="object")s=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,ts.normalizeId)(s||n);let u=ts.getSchemaRefs.call(this,t,n);return c=new es.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:u}),this._cache.set(c.schema,c),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),o&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):es.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{es.compileSchema.call(this,t)}finally{this.opts=r}}};rs.ValidationError=XO.default;rs.MissingRefError=_0.default;He.default=rs;function g0(e,t,r,n="error"){for(let o in e){let i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function y0(e){return e=(0,ts.normalizeId)(e),this.schemas[e]||this.refs[e]}function cN(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function uN(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function lN(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function pN(){let e={...this.opts};for(let t of nN)delete e[t];return e}var dN={log(){},warn(){},error(){}};function fN(e){if(e===!1)return dN;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var hN=/^[a-z_$][a-z0-9_$:-]*$/i;function mN(e,t){let{RULES:r}=this;if((0,ch.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!hN.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function ah(e,t,r){var n;let o=t?.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,s=o?i.post:i.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,hc.getJSONTypes)(t.type),schemaType:(0,hc.getJSONTypes)(t.schemaType)}};t.before?gN.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function gN(e,t,r){let n=e.rules.findIndex(o=>o.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function yN(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=b0(t)),e.validateSchema=this.compile(t,!0))}var _N={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function b0(e){return{anyOf:[e,_N]}}});var w0=S(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});var vN={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};uh.default=vN});var T0=S(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.callRef=Hn.getValidate=void 0;var bN=Qi(),k0=Lt(),xt=K(),Ao=Pr(),S0=uc(),mc=le(),xN={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:i,validateName:s,opts:a,self:c}=n,{root:u}=i;if((r==="#"||r==="#/")&&o===u.baseId)return l();let p=S0.resolveRef.call(c,u,o,r);if(p===void 0)throw new bN.default(n.opts.uriResolver,o,r);if(p instanceof S0.SchemaEnv)return d(p);return f(p);function l(){if(i===u)return gc(e,s,i,i.$async);let h=t.scopeValue("root",{ref:u});return gc(e,(0,xt._)`${h}.validate`,u,u.$async)}function d(h){let m=$0(e,h);gc(e,m,h,h.$async)}function f(h){let m=t.scopeValue("schema",a.code.source===!0?{ref:h,code:(0,xt.stringify)(h)}:{ref:h}),y=t.name("valid"),b=e.subschema({schema:h,dataTypes:[],schemaPath:xt.nil,topSchemaRef:m,errSchemaPath:r},y);e.mergeEvaluated(b),e.ok(y)}}};function $0(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,xt._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Hn.getValidate=$0;function gc(e,t,r,n){let{gen:o,it:i}=e,{allErrors:s,schemaEnv:a,opts:c}=i,u=c.passContext?Ao.default.this:xt.nil;n?p():l();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let h=o.let("valid");o.try(()=>{o.code((0,xt._)`await ${(0,k0.callValidateCode)(e,t,u)}`),f(t),s||o.assign(h,!0)},m=>{o.if((0,xt._)`!(${m} instanceof ${i.ValidationError})`,()=>o.throw(m)),d(m),s||o.assign(h,!1)}),e.ok(h)}function l(){e.result((0,k0.callValidateCode)(e,t,u),()=>f(t),()=>d(t))}function d(h){let m=(0,xt._)`${h}.errors`;o.assign(Ao.default.vErrors,(0,xt._)`${Ao.default.vErrors} === null ? ${m} : ${Ao.default.vErrors}.concat(${m})`),o.assign(Ao.default.errors,(0,xt._)`${Ao.default.vErrors}.length`)}function f(h){var m;if(!i.opts.unevaluated)return;let y=(m=r?.validate)===null||m===void 0?void 0:m.evaluated;if(i.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(i.props=mc.mergeEvaluated.props(o,y.props,i.props));else{let b=o.var("props",(0,xt._)`${h}.evaluated.props`);i.props=mc.mergeEvaluated.props(o,b,i.props,xt.Name)}if(i.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(i.items=mc.mergeEvaluated.items(o,y.items,i.items));else{let b=o.var("items",(0,xt._)`${h}.evaluated.items`);i.items=mc.mergeEvaluated.items(o,b,i.items,xt.Name)}}}Hn.callRef=gc;Hn.default=xN});var P0=S(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});var wN=w0(),kN=T0(),SN=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",wN.default,kN.default];lh.default=SN});var C0=S(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});var yc=K(),on=yc.operators,_c={maximum:{okStr:"<=",ok:on.LTE,fail:on.GT},minimum:{okStr:">=",ok:on.GTE,fail:on.LT},exclusiveMaximum:{okStr:"<",ok:on.LT,fail:on.GTE},exclusiveMinimum:{okStr:">",ok:on.GT,fail:on.LTE}},$N={message:({keyword:e,schemaCode:t})=>(0,yc.str)`must be ${_c[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,yc._)`{comparison: ${_c[e].okStr}, limit: ${t}}`},TN={keyword:Object.keys(_c),type:"number",schemaType:"number",$data:!0,error:$N,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,yc._)`${r} ${_c[t].fail} ${n} || isNaN(${r})`)}};ph.default=TN});var E0=S(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});var ns=K(),PN={message:({schemaCode:e})=>(0,ns.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,ns._)`{multipleOf: ${e}}`},CN={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:PN,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,i=o.opts.multipleOfPrecision,s=t.let("res"),a=i?(0,ns._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,ns._)`${s} !== parseInt(${s})`;e.fail$data((0,ns._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};dh.default=CN});var z0=S(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});function I0(e){let t=e.length,r=0,n=0,o;for(;n<t;)r++,o=e.charCodeAt(n++),o>=55296&&o<=56319&&n<t&&(o=e.charCodeAt(n),(o&64512)===56320&&n++);return r}fh.default=I0;I0.code='require("ajv/dist/runtime/ucs2length").default'});var R0=S(hh=>{"use strict";Object.defineProperty(hh,"__esModule",{value:!0});var Gn=K(),EN=le(),IN=z0(),zN={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Gn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Gn._)`{limit: ${e}}`},RN={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:zN,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,i=t==="maxLength"?Gn.operators.GT:Gn.operators.LT,s=o.opts.unicode===!1?(0,Gn._)`${r}.length`:(0,Gn._)`${(0,EN.useFunc)(e.gen,IN.default)}(${r})`;e.fail$data((0,Gn._)`${s} ${i} ${n}`)}};hh.default=RN});var A0=S(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});var AN=Lt(),vc=K(),ON={message:({schemaCode:e})=>(0,vc.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,vc._)`{pattern: ${e}}`},NN={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:ON,code(e){let{data:t,$data:r,schema:n,schemaCode:o,it:i}=e,s=i.opts.unicodeRegExp?"u":"",a=r?(0,vc._)`(new RegExp(${o}, ${s}))`:(0,AN.usePattern)(e,n);e.fail$data((0,vc._)`!${a}.test(${t})`)}};mh.default=NN});var O0=S(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});var os=K(),DN={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,os.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,os._)`{limit: ${e}}`},jN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:DN,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?os.operators.GT:os.operators.LT;e.fail$data((0,os._)`Object.keys(${r}).length ${o} ${n}`)}};gh.default=jN});var N0=S(yh=>{"use strict";Object.defineProperty(yh,"__esModule",{value:!0});var is=Lt(),ss=K(),MN=le(),LN={message:({params:{missingProperty:e}})=>(0,ss.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,ss._)`{missingProperty: ${e}}`},ZN={keyword:"required",type:"object",schemaType:"array",$data:!0,error:LN,code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:i,it:s}=e,{opts:a}=s;if(!i&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?u():p(),a.strictRequired){let f=e.parentSchema.properties,{definedProperties:h}=e.it;for(let m of r)if(f?.[m]===void 0&&!h.has(m)){let y=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${m}" is not defined at "${y}" (strictRequired)`;(0,MN.checkStrictMode)(s,b,s.opts.strictRequired)}}function u(){if(c||i)e.block$data(ss.nil,l);else for(let f of r)(0,is.checkReportMissingProp)(e,f)}function p(){let f=t.let("missing");if(c||i){let h=t.let("valid",!0);e.block$data(h,()=>d(f,h)),e.ok(h)}else t.if((0,is.checkMissingProp)(e,r,f)),(0,is.reportMissingProp)(e,f),t.else()}function l(){t.forOf("prop",n,f=>{e.setParams({missingProperty:f}),t.if((0,is.noPropertyInData)(t,o,f,a.ownProperties),()=>e.error())})}function d(f,h){e.setParams({missingProperty:f}),t.forOf(f,n,()=>{t.assign(h,(0,is.propertyInData)(t,o,f,a.ownProperties)),t.if((0,ss.not)(h),()=>{e.error(),t.break()})},ss.nil)}}};yh.default=ZN});var D0=S(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});var as=K(),qN={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,as.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,as._)`{limit: ${e}}`},FN={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:qN,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?as.operators.GT:as.operators.LT;e.fail$data((0,as._)`${r}.length ${o} ${n}`)}};_h.default=FN});var bc=S(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});var j0=Uf();j0.code='require("ajv/dist/runtime/equal").default';vh.default=j0});var M0=S(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});var bh=Gi(),Ge=K(),UN=le(),BN=bc(),VN={message:({params:{i:e,j:t}})=>(0,Ge.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Ge._)`{i: ${e}, j: ${t}}`},HN={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:VN,code(e){let{gen:t,data:r,$data:n,schema:o,parentSchema:i,schemaCode:s,it:a}=e;if(!n&&!o)return;let c=t.let("valid"),u=i.items?(0,bh.getSchemaTypes)(i.items):[];e.block$data(c,p,(0,Ge._)`${s} === false`),e.ok(c);function p(){let h=t.let("i",(0,Ge._)`${r}.length`),m=t.let("j");e.setParams({i:h,j:m}),t.assign(c,!0),t.if((0,Ge._)`${h} > 1`,()=>(l()?d:f)(h,m))}function l(){return u.length>0&&!u.some(h=>h==="object"||h==="array")}function d(h,m){let y=t.name("item"),b=(0,bh.checkDataTypes)(u,y,a.opts.strictNumbers,bh.DataType.Wrong),v=t.const("indices",(0,Ge._)`{}`);t.for((0,Ge._)`;${h}--;`,()=>{t.let(y,(0,Ge._)`${r}[${h}]`),t.if(b,(0,Ge._)`continue`),u.length>1&&t.if((0,Ge._)`typeof ${y} == "string"`,(0,Ge._)`${y} += "_"`),t.if((0,Ge._)`typeof ${v}[${y}] == "number"`,()=>{t.assign(m,(0,Ge._)`${v}[${y}]`),e.error(),t.assign(c,!1).break()}).code((0,Ge._)`${v}[${y}] = ${h}`)})}function f(h,m){let y=(0,UN.useFunc)(t,BN.default),b=t.name("outer");t.label(b).for((0,Ge._)`;${h}--;`,()=>t.for((0,Ge._)`${m} = ${h}; ${m}--;`,()=>t.if((0,Ge._)`${y}(${r}[${h}], ${r}[${m}])`,()=>{e.error(),t.assign(c,!1).break(b)})))}}};xh.default=HN});var L0=S(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});var wh=K(),GN=le(),WN=bc(),KN={message:"must be equal to constant",params:({schemaCode:e})=>(0,wh._)`{allowedValue: ${e}}`},JN={keyword:"const",$data:!0,error:KN,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:i}=e;n||i&&typeof i=="object"?e.fail$data((0,wh._)`!${(0,GN.useFunc)(t,WN.default)}(${r}, ${o})`):e.fail((0,wh._)`${i} !== ${r}`)}};kh.default=JN});var Z0=S(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});var cs=K(),YN=le(),QN=bc(),XN={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,cs._)`{allowedValues: ${e}}`},e4={keyword:"enum",schemaType:"array",$data:!0,error:XN,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:i,it:s}=e;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=s.opts.loopEnum,c,u=()=>c??(c=(0,YN.useFunc)(t,QN.default)),p;if(a||n)p=t.let("valid"),e.block$data(p,l);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let f=t.const("vSchema",i);p=(0,cs.or)(...o.map((h,m)=>d(f,m)))}e.pass(p);function l(){t.assign(p,!1),t.forOf("v",i,f=>t.if((0,cs._)`${u()}(${r}, ${f})`,()=>t.assign(p,!0).break()))}function d(f,h){let m=o[h];return typeof m=="object"&&m!==null?(0,cs._)`${u()}(${r}, ${f}[${h}])`:(0,cs._)`${r} === ${m}`}}};Sh.default=e4});var q0=S($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});var t4=C0(),r4=E0(),n4=R0(),o4=A0(),i4=O0(),s4=N0(),a4=D0(),c4=M0(),u4=L0(),l4=Z0(),p4=[t4.default,r4.default,n4.default,o4.default,i4.default,s4.default,a4.default,c4.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u4.default,l4.default];$h.default=p4});var Ph=S(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.validateAdditionalItems=void 0;var Wn=K(),Th=le(),d4={message:({params:{len:e}})=>(0,Wn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Wn._)`{limit: ${e}}`},f4={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:d4,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,Th.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}F0(e,n)}};function F0(e,t){let{gen:r,schema:n,data:o,keyword:i,it:s}=e;s.items=!0;let a=r.const("len",(0,Wn._)`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Wn._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,Th.alwaysValidSchema)(s,n)){let u=r.var("valid",(0,Wn._)`${a} <= ${t.length}`);r.if((0,Wn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,p=>{e.subschema({keyword:i,dataProp:p,dataPropType:Th.Type.Num},u),s.allErrors||r.if((0,Wn.not)(u),()=>r.break())})}}us.validateAdditionalItems=F0;us.default=f4});var Ch=S(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});ls.validateTuple=void 0;var U0=K(),xc=le(),h4=Lt(),m4={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return B0(e,"additionalItems",t);r.items=!0,!(0,xc.alwaysValidSchema)(r,t)&&e.ok((0,h4.validateArray)(e))}};function B0(e,t,r=e.schema){let{gen:n,parentSchema:o,data:i,keyword:s,it:a}=e;p(o),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=xc.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),u=n.const("len",(0,U0._)`${i}.length`);r.forEach((l,d)=>{(0,xc.alwaysValidSchema)(a,l)||(n.if((0,U0._)`${u} > ${d}`,()=>e.subschema({keyword:s,schemaProp:d,dataProp:d},c)),e.ok(c))});function p(l){let{opts:d,errSchemaPath:f}=a,h=r.length,m=h===l.minItems&&(h===l.maxItems||l[t]===!1);if(d.strictTuples&&!m){let y=`"${s}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,xc.checkStrictMode)(a,y,d.strictTuples)}}}ls.validateTuple=B0;ls.default=m4});var V0=S(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});var g4=Ch(),y4={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,g4.validateTuple)(e,"items")};Eh.default=y4});var G0=S(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var H0=K(),_4=le(),v4=Lt(),b4=Ph(),x4={message:({params:{len:e}})=>(0,H0.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,H0._)`{limit: ${e}}`},w4={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:x4,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,!(0,_4.alwaysValidSchema)(n,t)&&(o?(0,b4.validateAdditionalItems)(e,o):e.ok((0,v4.validateArray)(e)))}};Ih.default=w4});var W0=S(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});var qt=K(),wc=le(),k4={message:({params:{min:e,max:t}})=>t===void 0?(0,qt.str)`must contain at least ${e} valid item(s)`:(0,qt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,qt._)`{minContains: ${e}}`:(0,qt._)`{minContains: ${e}, maxContains: ${t}}`},S4={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:k4,code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:i}=e,s,a,{minContains:c,maxContains:u}=n;i.opts.next?(s=c===void 0?1:c,a=u):s=1;let p=t.const("len",(0,qt._)`${o}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,wc.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,wc.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,wc.alwaysValidSchema)(i,r)){let m=(0,qt._)`${p} >= ${s}`;a!==void 0&&(m=(0,qt._)`${m} && ${p} <= ${a}`),e.pass(m);return}i.items=!0;let l=t.name("valid");a===void 0&&s===1?f(l,()=>t.if(l,()=>t.break())):s===0?(t.let(l,!0),a!==void 0&&t.if((0,qt._)`${o}.length > 0`,d)):(t.let(l,!1),d()),e.result(l,()=>e.reset());function d(){let m=t.name("_valid"),y=t.let("count",0);f(m,()=>t.if(m,()=>h(y)))}function f(m,y){t.forRange("i",0,p,b=>{e.subschema({keyword:"contains",dataProp:b,dataPropType:wc.Type.Num,compositeRule:!0},m),y()})}function h(m){t.code((0,qt._)`${m}++`),a===void 0?t.if((0,qt._)`${m} >= ${s}`,()=>t.assign(l,!0).break()):(t.if((0,qt._)`${m} > ${a}`,()=>t.assign(l,!1).break()),s===1?t.assign(l,!0):t.if((0,qt._)`${m} >= ${s}`,()=>t.assign(l,!0)))}}};zh.default=S4});var Y0=S(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.validateSchemaDeps=fr.validatePropertyDeps=fr.error=void 0;var Rh=K(),$4=le(),ps=Lt();fr.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,Rh.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,Rh._)`{property: ${e},
36
+ || ${s} === "boolean" || ${o} === null`).assign(a,(0,G._)`[${o}]`)}}}function mA({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,G._)`${t} !== undefined`,()=>e.assign((0,G._)`${t}[${r}]`,n))}function Zf(e,t,r,n=Ro.Correct){let o=n===Ro.Correct?G.operators.EQ:G.operators.NEQ,i;switch(e){case"null":return(0,G._)`${t} ${o} null`;case"array":i=(0,G._)`Array.isArray(${t})`;break;case"object":i=(0,G._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s((0,G._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return(0,G._)`typeof ${t} ${o} ${e}`}return n===Ro.Correct?i:(0,G.not)(i);function s(a=G.nil){return(0,G.and)((0,G._)`typeof ${t} == "number"`,a,r?(0,G._)`isFinite(${t})`:G.nil)}}rt.checkDataType=Zf;function qf(e,t,r,n){if(e.length===1)return Zf(e[0],t,r,n);let o,i=(0,P0.toHash)(e);if(i.array&&i.object){let s=(0,G._)`typeof ${t} != "object"`;o=i.null?s:(0,G._)`!${t} || ${s}`,delete i.null,delete i.array,delete i.object}else o=G.nil;i.number&&delete i.integer;for(let s in i)o=(0,G.and)(o,Zf(s,t,r,n));return o}rt.checkDataTypes=qf;var gA={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,G._)`{type: ${e}}`:(0,G._)`{type: ${t}}`};function Ff(e){let t=yA(e);(0,lA.reportError)(t,gA)}rt.reportTypeError=Ff;function yA(e){let{gen:t,data:r,schema:n}=e,o=(0,P0.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var z0=S(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});cc.assignDefaults=void 0;var Ao=K(),_A=le();function vA(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)I0(e,o,r[o].default);else t==="array"&&Array.isArray(n)&&n.forEach((o,i)=>I0(e,i,o.default))}cc.assignDefaults=vA;function I0(e,t,r){let{gen:n,compositeRule:o,data:i,opts:s}=e;if(r===void 0)return;let a=(0,Ao._)`${i}${(0,Ao.getProperty)(t)}`;if(o){(0,_A.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,Ao._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,Ao._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,Ao._)`${a} = ${(0,Ao.stringify)(r)}`)}});var Zt=S(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.validateUnion=ge.validateArray=ge.usePattern=ge.callValidateCode=ge.schemaProperties=ge.allSchemaProperties=ge.noPropertyInData=ge.propertyInData=ge.isOwnProperty=ge.hasPropFunc=ge.reportMissingProp=ge.checkMissingProp=ge.checkReportMissingProp=void 0;var ke=K(),Uf=le(),on=Ir(),bA=le();function xA(e,t){let{gen:r,data:n,it:o}=e;r.if(Vf(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,ke._)`${t}`},!0),e.error()})}ge.checkReportMissingProp=xA;function wA({gen:e,data:t,it:{opts:r}},n,o){return(0,ke.or)(...n.map(i=>(0,ke.and)(Vf(e,t,i,r.ownProperties),(0,ke._)`${o} = ${i}`)))}ge.checkMissingProp=wA;function kA(e,t){e.setParams({missingProperty:t},!0),e.error()}ge.reportMissingProp=kA;function R0(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ke._)`Object.prototype.hasOwnProperty`})}ge.hasPropFunc=R0;function Bf(e,t,r){return(0,ke._)`${R0(e)}.call(${t}, ${r})`}ge.isOwnProperty=Bf;function SA(e,t,r,n){let o=(0,ke._)`${t}${(0,ke.getProperty)(r)} !== undefined`;return n?(0,ke._)`${o} && ${Bf(e,t,r)}`:o}ge.propertyInData=SA;function Vf(e,t,r,n){let o=(0,ke._)`${t}${(0,ke.getProperty)(r)} === undefined`;return n?(0,ke.or)(o,(0,ke.not)(Bf(e,t,r))):o}ge.noPropertyInData=Vf;function A0(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}ge.allSchemaProperties=A0;function $A(e,t){return A0(t).filter(r=>!(0,Uf.alwaysValidSchema)(e,t[r]))}ge.schemaProperties=$A;function TA({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:i},it:s},a,c,u){let p=u?(0,ke._)`${e}, ${t}, ${n}${o}`:t,l=[[on.default.instancePath,(0,ke.strConcat)(on.default.instancePath,i)],[on.default.parentData,s.parentData],[on.default.parentDataProperty,s.parentDataProperty],[on.default.rootData,on.default.rootData]];s.opts.dynamicRef&&l.push([on.default.dynamicAnchors,on.default.dynamicAnchors]);let d=(0,ke._)`${p}, ${r.object(...l)}`;return c!==ke.nil?(0,ke._)`${a}.call(${c}, ${d})`:(0,ke._)`${a}(${d})`}ge.callValidateCode=TA;var PA=(0,ke._)`new RegExp`;function CA({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,i=o(r,n);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,ke._)`${o.code==="new RegExp"?PA:(0,bA.useFunc)(e,o)}(${r}, ${n})`})}ge.usePattern=CA;function EA(e){let{gen:t,data:r,keyword:n,it:o}=e,i=t.name("valid");if(o.allErrors){let a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(i,!0),s(()=>t.break()),i;function s(a){let c=t.const("len",(0,ke._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:n,dataProp:u,dataPropType:Uf.Type.Num},i),t.if((0,ke.not)(i),a)})}}ge.validateArray=EA;function IA(e){let{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Uf.alwaysValidSchema)(o,c))&&!o.opts.unevaluated)return;let s=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let p=e.subschema({keyword:n,schemaProp:u,compositeRule:!0},a);t.assign(s,(0,ke._)`${s} || ${a}`),e.mergeValidEvaluated(p,a)||t.if((0,ke.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}ge.validateUnion=IA});var D0=S(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.validateKeywordUsage=fr.validSchemaType=fr.funcKeywordCode=fr.macroKeywordCode=void 0;var pt=K(),Gn=Ir(),zA=Zt(),RA=Ji();function AA(e,t){let{gen:r,keyword:n,schema:o,parentSchema:i,it:s}=e,a=t.macro.call(s.self,o,i,s),c=N0(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");e.subschema({schema:a,schemaPath:pt.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}fr.macroKeywordCode=AA;function OA(e,t){var r;let{gen:n,keyword:o,schema:i,parentSchema:s,$data:a,it:c}=e;DA(c,t);let u=!a&&t.compile?t.compile.call(c.self,i,s,c):t.validate,p=N0(n,o,u),l=n.let("valid");e.block$data(l,d),e.ok((r=t.valid)!==null&&r!==void 0?r:l);function d(){if(t.errors===!1)g(),t.modifying&&O0(e),y(()=>e.error());else{let b=t.async?f():h();t.modifying&&O0(e),y(()=>NA(e,b))}}function f(){let b=n.let("ruleErrs",null);return n.try(()=>g((0,pt._)`await `),v=>n.assign(l,!1).if((0,pt._)`${v} instanceof ${c.ValidationError}`,()=>n.assign(b,(0,pt._)`${v}.errors`),()=>n.throw(v))),b}function h(){let b=(0,pt._)`${p}.errors`;return n.assign(b,null),g(pt.nil),b}function g(b=t.async?(0,pt._)`await `:pt.nil){let v=c.opts.passContext?Gn.default.this:Gn.default.self,k=!("compile"in t&&!a||t.schema===!1);n.assign(l,(0,pt._)`${b}${(0,zA.callValidateCode)(e,p,v,k)}`,t.modifying)}function y(b){var v;n.if((0,pt.not)((v=t.valid)!==null&&v!==void 0?v:l),b)}}fr.funcKeywordCode=OA;function O0(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,pt._)`${n.parentData}[${n.parentDataProperty}]`))}function NA(e,t){let{gen:r}=e;r.if((0,pt._)`Array.isArray(${t})`,()=>{r.assign(Gn.default.vErrors,(0,pt._)`${Gn.default.vErrors} === null ? ${t} : ${Gn.default.vErrors}.concat(${t})`).assign(Gn.default.errors,(0,pt._)`${Gn.default.vErrors}.length`),(0,RA.extendErrors)(e)},()=>e.error())}function DA({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function N0(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,pt.stringify)(r)})}function jA(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}fr.validSchemaType=jA;function MA({schema:e,opts:t,self:r,errSchemaPath:n},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");let s=o.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}fr.validateKeywordUsage=MA});var M0=S(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.extendSubschemaMode=sn.extendSubschemaData=sn.getSubschema=void 0;var hr=K(),j0=le();function LA(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:i,topSchemaRef:s}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,hr._)`${e.schemaPath}${(0,hr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,hr._)`${e.schemaPath}${(0,hr.getProperty)(t)}${(0,hr.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,j0.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}sn.getSubschema=LA;function ZA(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:i,propertyName:s}){if(o!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:u,dataPathArr:p,opts:l}=t,d=a.let("data",(0,hr._)`${t.data}${(0,hr.getProperty)(r)}`,!0);c(d),e.errorPath=(0,hr.str)`${u}${(0,j0.getErrorPath)(r,n,l.jsPropertySyntax)}`,e.parentDataProperty=(0,hr._)`${r}`,e.dataPathArr=[...p,e.parentDataProperty]}if(o!==void 0){let u=o instanceof hr.Name?o:a.let("data",o,!0);c(u),s!==void 0&&(e.propertyName=s)}i&&(e.dataTypes=i);function c(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}sn.extendSubschemaData=ZA;function qA(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){n!==void 0&&(e.compositeRule=n),o!==void 0&&(e.createErrors=o),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}sn.extendSubschemaMode=qA});var Hf=S((PU,L0)=>{"use strict";L0.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var s=i[o];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var q0=S((CU,Z0)=>{"use strict";var an=Z0.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};uc(t,n,o,e,"",e)};an.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};an.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};an.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};an.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function uc(e,t,r,n,o,i,s,a,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,o,i,s,a,c,u);for(var p in n){var l=n[p];if(Array.isArray(l)){if(p in an.arrayKeywords)for(var d=0;d<l.length;d++)uc(e,t,r,l[d],o+"/"+p+"/"+d,i,o,p,n,d)}else if(p in an.propsKeywords){if(l&&typeof l=="object")for(var f in l)uc(e,t,r,l[f],o+"/"+p+"/"+FA(f),i,o,p,n,f)}else(p in an.keywords||e.allKeys&&!(p in an.skipKeywords))&&uc(e,t,r,l,o+"/"+p,i,o,p,n)}r(n,o,i,s,a,c,u)}}function FA(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Qi=S(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.getSchemaRefs=xt.resolveUrl=xt.normalizeId=xt._getFullPath=xt.getFullPath=xt.inlineRef=void 0;var UA=le(),BA=Hf(),VA=q0(),HA=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function GA(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Gf(e):t?F0(e)<=t:!1}xt.inlineRef=GA;var WA=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Gf(e){for(let t in e){if(WA.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Gf)||typeof r=="object"&&Gf(r))return!0}return!1}function F0(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!HA.has(r)&&(typeof e[r]=="object"&&(0,UA.eachItem)(e[r],n=>t+=F0(n)),t===1/0))return 1/0}return t}function U0(e,t="",r){r!==!1&&(t=Oo(t));let n=e.parse(t);return B0(e,n)}xt.getFullPath=U0;function B0(e,t){return e.serialize(t).split("#")[0]+"#"}xt._getFullPath=B0;var KA=/#\/?$/;function Oo(e){return e?e.replace(KA,""):""}xt.normalizeId=Oo;function JA(e,t,r){return r=Oo(r),e.resolve(t,r)}xt.resolveUrl=JA;var YA=/^[a-z_][-a-z0-9._]*$/i;function QA(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=Oo(e[r]||t),i={"":o},s=U0(n,o,!1),a={},c=new Set;return VA(e,{allKeys:!0},(l,d,f,h)=>{if(h===void 0)return;let g=s+d,y=i[h];typeof l[r]=="string"&&(y=b.call(this,l[r])),v.call(this,l.$anchor),v.call(this,l.$dynamicAnchor),i[d]=y;function b(k){let C=this.opts.uriResolver.resolve;if(k=Oo(y?C(y,k):k),c.has(k))throw p(k);c.add(k);let T=this.refs[k];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?u(l,T.schema,k):k!==Oo(g)&&(k[0]==="#"?(u(l,a[k],k),a[k]=l):this.refs[k]=g),k}function v(k){if(typeof k=="string"){if(!YA.test(k))throw new Error(`invalid anchor "${k}"`);b.call(this,`#${k}`)}}}),a;function u(l,d,f){if(d!==void 0&&!BA(l,d))throw p(f)}function p(l){return new Error(`reference "${l}" resolves to more than one schema`)}}xt.getSchemaRefs=QA});var ts=S(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.getData=cn.KeywordCxt=cn.validateFunctionCode=void 0;var K0=S0(),V0=Yi(),Kf=Lf(),lc=Yi(),XA=z0(),es=D0(),Wf=M0(),D=K(),B=Ir(),eO=Qi(),zr=le(),Xi=Ji();function tO(e){if(Q0(e)&&(X0(e),Y0(e))){oO(e);return}J0(e,()=>(0,K0.topBoolOrEmptySchema)(e))}cn.validateFunctionCode=tO;function J0({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,(0,D._)`${B.default.data}, ${B.default.valCxt}`,n.$async,()=>{e.code((0,D._)`"use strict"; ${H0(r,o)}`),nO(e,o),e.code(i)}):e.func(t,(0,D._)`${B.default.data}, ${rO(o)}`,n.$async,()=>e.code(H0(r,o)).code(i))}function rO(e){return(0,D._)`{${B.default.instancePath}="", ${B.default.parentData}, ${B.default.parentDataProperty}, ${B.default.rootData}=${B.default.data}${e.dynamicRef?(0,D._)`, ${B.default.dynamicAnchors}={}`:D.nil}}={}`}function nO(e,t){e.if(B.default.valCxt,()=>{e.var(B.default.instancePath,(0,D._)`${B.default.valCxt}.${B.default.instancePath}`),e.var(B.default.parentData,(0,D._)`${B.default.valCxt}.${B.default.parentData}`),e.var(B.default.parentDataProperty,(0,D._)`${B.default.valCxt}.${B.default.parentDataProperty}`),e.var(B.default.rootData,(0,D._)`${B.default.valCxt}.${B.default.rootData}`),t.dynamicRef&&e.var(B.default.dynamicAnchors,(0,D._)`${B.default.valCxt}.${B.default.dynamicAnchors}`)},()=>{e.var(B.default.instancePath,(0,D._)`""`),e.var(B.default.parentData,(0,D._)`undefined`),e.var(B.default.parentDataProperty,(0,D._)`undefined`),e.var(B.default.rootData,B.default.data),t.dynamicRef&&e.var(B.default.dynamicAnchors,(0,D._)`{}`)})}function oO(e){let{schema:t,opts:r,gen:n}=e;J0(e,()=>{r.$comment&&t.$comment&&tb(e),uO(e),n.let(B.default.vErrors,null),n.let(B.default.errors,0),r.unevaluated&&iO(e),eb(e),dO(e)})}function iO(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,D._)`${r}.evaluated`),t.if((0,D._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,D._)`${e.evaluated}.props`,(0,D._)`undefined`)),t.if((0,D._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,D._)`${e.evaluated}.items`,(0,D._)`undefined`))}function H0(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,D._)`/*# sourceURL=${r} */`:D.nil}function sO(e,t){if(Q0(e)&&(X0(e),Y0(e))){aO(e,t);return}(0,K0.boolOrEmptySchema)(e,t)}function Y0({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function Q0(e){return typeof e.schema!="boolean"}function aO(e,t){let{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&tb(e),lO(e),pO(e);let i=n.const("_errs",B.default.errors);eb(e,i),n.var(t,(0,D._)`${i} === ${B.default.errors}`)}function X0(e){(0,zr.checkUnknownRules)(e),cO(e)}function eb(e,t){if(e.opts.jtd)return G0(e,[],!1,t);let r=(0,V0.getSchemaTypes)(e.schema),n=(0,V0.coerceAndCheckDataType)(e,r);G0(e,r,!n,t)}function cO(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,zr.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function uO(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,zr.checkStrictMode)(e,"default is ignored in the schema root")}function lO(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,eO.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function pO(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function tb({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let i=r.$comment;if(o.$comment===!0)e.code((0,D._)`${B.default.self}.logger.log(${i})`);else if(typeof o.$comment=="function"){let s=(0,D.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,D._)`${B.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function dO(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if((0,D._)`${B.default.errors} === 0`,()=>t.return(B.default.data),()=>t.throw((0,D._)`new ${o}(${B.default.vErrors})`)):(t.assign((0,D._)`${n}.errors`,B.default.vErrors),i.unevaluated&&fO(e),t.return((0,D._)`${B.default.errors} === 0`))}function fO({gen:e,evaluated:t,props:r,items:n}){r instanceof D.Name&&e.assign((0,D._)`${t}.props`,r),n instanceof D.Name&&e.assign((0,D._)`${t}.items`,n)}function G0(e,t,r,n){let{gen:o,schema:i,data:s,allErrors:a,opts:c,self:u}=e,{RULES:p}=u;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,zr.schemaHasRulesButRef)(i,p))){o.block(()=>nb(e,"$ref",p.all.$ref.definition));return}c.jtd||hO(e,t),o.block(()=>{for(let d of p.rules)l(d);l(p.post)});function l(d){(0,Kf.shouldUseGroup)(i,d)&&(d.type?(o.if((0,lc.checkDataType)(d.type,s,c.strictNumbers)),W0(e,d),t.length===1&&t[0]===d.type&&r&&(o.else(),(0,lc.reportTypeError)(e)),o.endIf()):W0(e,d),a||o.if((0,D._)`${B.default.errors} === ${n||0}`))}}function W0(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,XA.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,Kf.shouldUseRule)(n,i)&&nb(e,i.keyword,i.definition,t.type)})}function hO(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(mO(e,t),e.opts.allowUnionTypes||gO(e,t),yO(e,e.dataTypes))}function mO(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{rb(e.dataTypes,r)||Jf(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),vO(e,t)}}function gO(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Jf(e,"use allowUnionTypes to allow union type keyword")}function yO(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,Kf.shouldUseRule)(e.schema,o)){let{type:i}=o.definition;i.length&&!i.some(s=>_O(t,s))&&Jf(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function _O(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function rb(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function vO(e,t){let r=[];for(let n of e.dataTypes)rb(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Jf(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,zr.checkStrictMode)(e,t,e.opts.strictTypes)}var pc=class{constructor(t,r,n){if((0,es.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,zr.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",ob(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,es.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",B.default.errors))}result(t,r,n){this.failResult((0,D.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,D.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,D._)`${r} !== undefined && (${(0,D.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Xi.reportExtraError:Xi.reportError)(this,this.def.error,r)}$dataError(){(0,Xi.reportError)(this,this.def.$dataError||Xi.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Xi.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=D.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=D.nil,r=D.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:i,def:s}=this;n.if((0,D.or)((0,D._)`${o} === undefined`,r)),t!==D.nil&&n.assign(t,!0),(i.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==D.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:o,it:i}=this;return(0,D.or)(s(),a());function s(){if(n.length){if(!(r instanceof D.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,D._)`${(0,lc.checkDataTypes)(c,r,i.opts.strictNumbers,lc.DataType.Wrong)}`}return D.nil}function a(){if(o.validateSchema){let c=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,D._)`!${c}(${r})`}return D.nil}}subschema(t,r){let n=(0,Wf.getSubschema)(this.it,t);(0,Wf.extendSubschemaData)(n,this.it,t),(0,Wf.extendSubschemaMode)(n,t);let o={...this.it,...n,items:void 0,props:void 0};return sO(o,r),o}mergeEvaluated(t,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=zr.mergeEvaluated.props(o,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=zr.mergeEvaluated.items(o,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(t,D.Name)),!0}};cn.KeywordCxt=pc;function nb(e,t,r,n){let o=new pc(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,es.funcKeywordCode)(o,r):"macro"in r?(0,es.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,es.funcKeywordCode)(o,r)}var bO=/^\/(?:[^~]|~0|~1)*$/,xO=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ob(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(e==="")return B.default.rootData;if(e[0]==="/"){if(!bO.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=B.default.rootData}else{let u=xO.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let p=+u[1];if(o=u[2],o==="#"){if(p>=t)throw new Error(c("property/index",p));return n[t-p]}if(p>t)throw new Error(c("data",p));if(i=r[t-p],!o)return i}let s=i,a=o.split("/");for(let u of a)u&&(i=(0,D._)`${i}${(0,D.getProperty)((0,zr.unescapeJsonPointer)(u))}`,s=(0,D._)`${s} && ${i}`);return s;function c(u,p){return`Cannot access ${u} ${p} levels up, current level is ${t}`}}cn.getData=ob});var dc=S(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var Yf=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Qf.default=Yf});var rs=S(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0});var Xf=Qi(),eh=class extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Xf.resolveUrl)(t,r,n),this.missingSchema=(0,Xf.normalizeId)((0,Xf.getFullPath)(t,this.missingRef))}};th.default=eh});var hc=S(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.resolveSchema=qt.getCompilingSchema=qt.resolveRef=qt.compileSchema=qt.SchemaEnv=void 0;var Xt=K(),wO=dc(),Wn=Ir(),er=Qi(),ib=le(),kO=ts(),No=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,er.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};qt.SchemaEnv=No;function nh(e){let t=sb.call(this,e);if(t)return t;let r=(0,er.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:i}=this.opts,s=new Xt.CodeGen(this.scope,{es5:n,lines:o,ownProperties:i}),a;e.$async&&(a=s.scopeValue("Error",{ref:wO.default,code:(0,Xt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:Wn.default.data,parentData:Wn.default.parentData,parentDataProperty:Wn.default.parentDataProperty,dataNames:[Wn.default.data],dataPathArr:[Xt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Xt.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Xt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Xt._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(e),(0,kO.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let l=s.toString();p=`${s.scopeRefs(Wn.default.scope)}return ${l}`,this.opts.code.process&&(p=this.opts.code.process(p,e));let f=new Function(`${Wn.default.self}`,`${Wn.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:c,validateCode:l,scopeValues:s._values}),this.opts.unevaluated){let{props:h,items:g}=u;f.evaluated={props:h instanceof Xt.Name?void 0:h,items:g instanceof Xt.Name?void 0:g,dynamicProps:h instanceof Xt.Name,dynamicItems:g instanceof Xt.Name},f.source&&(f.source.evaluated=(0,Xt.stringify)(f.evaluated))}return e.validate=f,e}catch(l){throw delete e.validate,delete e.validateName,p&&this.logger.error("Error compiling schema, function code:",p),l}finally{this._compilations.delete(e)}}qt.compileSchema=nh;function SO(e,t,r){var n;r=(0,er.resolveUrl)(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let i=PO.call(this,e,r);if(i===void 0){let s=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;s&&(i=new No({schema:s,schemaId:a,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=$O.call(this,i)}qt.resolveRef=SO;function $O(e){return(0,er.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:nh.call(this,e)}function sb(e){for(let t of this._compilations)if(TO(t,e))return t}qt.getCompilingSchema=sb;function TO(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function PO(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||fc.call(this,e,t)}function fc(e,t){let r=this.opts.uriResolver.parse(t),n=(0,er._getFullPath)(this.opts.uriResolver,r),o=(0,er.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return rh.call(this,r,e);let i=(0,er.normalizeId)(n),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=fc.call(this,e,s);return typeof a?.schema!="object"?void 0:rh.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||nh.call(this,s),i===(0,er.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,u=a[c];return u&&(o=(0,er.resolveUrl)(this.opts.uriResolver,o,u)),new No({schema:a,schemaId:c,root:e,baseId:o})}return rh.call(this,r,s)}}qt.resolveSchema=fc;var CO=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function rh(e,{baseId:t,schema:r,root:n}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,ib.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!CO.has(a)&&u&&(t=(0,er.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,ib.schemaHasRulesButRef)(r,this.RULES)){let a=(0,er.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=fc.call(this,n,a)}let{schemaId:s}=this.opts;if(i=i||new No({schema:r,schemaId:s,root:n,baseId:t}),i.schema!==i.root.schema)return i}});var ab=S((OU,EO)=>{EO.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var ih=S((NU,pb)=>{"use strict";var IO=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),ub=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function oh(e){let t="",r=0,n=0;for(n=0;n<e.length;n++)if(r=e[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var zO=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function cb(e){return e.length=0,!0}function RO(e,t,r){if(e.length){let n=oh(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}function AO(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],i=!1,s=!1,a=RO;for(let c=0;c<e.length;c++){let u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(i===!0&&(s=!0),!a(o,n,r))break;if(++t>7){r.error=!0;break}c>0&&e[c-1]===":"&&(i=!0),n.push(":");continue}else if(u==="%"){if(!a(o,n,r))break;a=cb}else{o.push(u);continue}}return o.length&&(a===cb?r.zone=o.join(""):s?n.push(o.join("")):n.push(oh(o))),r.address=n.join(""),r}function lb(e){if(OO(e,":")<2)return{host:e,isIPV6:!1};let t=AO(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:n}}}function OO(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}function NO(e){let t=e,r=[],n=-1,o=0;for(;o=t.length;){if(o===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(o===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(o===3&&t==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),r.length!==0&&r.pop();continue}}if((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}function DO(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function jO(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!ub(r)){let n=lb(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}pb.exports={nonSimpleDomain:zO,recomposeAuthority:jO,normalizeComponentEncoding:DO,removeDotSegments:NO,isIPv4:ub,isUUID:IO,normalizeIPv6:lb,stringArrayToHexStripped:oh}});var gb=S((DU,mb)=>{"use strict";var{isUUID:MO}=ih(),LO=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,ZO=["http","https","ws","wss","urn","urn:uuid"];function qO(e){return ZO.indexOf(e)!==-1}function sh(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function db(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function fb(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function FO(e){return e.secure=sh(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function UO(e){if((e.port===(sh(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function BO(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(LO);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=`${n}:${t.nid||e.nid}`,i=ah(o);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function VO(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,i=ah(o);i&&(e=i.serialize(e,t));let s=e,a=e.nss;return s.path=`${n||t.nid}:${a}`,t.skipEscape=!0,s}function HO(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!MO(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function GO(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var hb={scheme:"http",domainHost:!0,parse:db,serialize:fb},WO={scheme:"https",domainHost:hb.domainHost,parse:db,serialize:fb},mc={scheme:"ws",domainHost:!0,parse:FO,serialize:UO},KO={scheme:"wss",domainHost:mc.domainHost,parse:mc.parse,serialize:mc.serialize},JO={scheme:"urn",parse:BO,serialize:VO,skipNormalize:!0},YO={scheme:"urn:uuid",parse:HO,serialize:GO,skipNormalize:!0},gc={http:hb,https:WO,ws:mc,wss:KO,urn:JO,"urn:uuid":YO};Object.setPrototypeOf(gc,null);function ah(e){return e&&(gc[e]||gc[e.toLowerCase()])||void 0}mb.exports={wsIsSecure:sh,SCHEMES:gc,isValidSchemeName:qO,getSchemeHandler:ah}});var vb=S((jU,_c)=>{"use strict";var{normalizeIPv6:QO,removeDotSegments:ns,recomposeAuthority:XO,normalizeComponentEncoding:yc,isIPv4:eN,nonSimpleDomain:tN}=ih(),{SCHEMES:rN,getSchemeHandler:yb}=gb();function nN(e,t){return typeof e=="string"?e=mr(Rr(e,t),t):typeof e=="object"&&(e=Rr(mr(e,t),t)),e}function oN(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=_b(Rr(e,n),Rr(t,n),n,!0);return n.skipEscape=!0,mr(o,n)}function _b(e,t,r,n){let o={};return n||(e=Rr(mr(e,r),r),t=Rr(mr(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=ns(t.path||""),o.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=ns(t.path||""),o.query=t.query):(t.path?(t.path[0]==="/"?o.path=ns(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?o.path="/"+t.path:e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path,o.path=ns(o.path)),o.query=t.query):(o.path=e.path,t.query!==void 0?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function iN(e,t,r){return typeof e=="string"?(e=unescape(e),e=mr(yc(Rr(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=mr(yc(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=mr(yc(Rr(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=mr(yc(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function mr(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),o=[],i=yb(n.scheme||r.scheme);i&&i.serialize&&i.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&o.push(r.scheme,":");let s=XO(r);if(s!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(s),r.path&&r.path[0]!=="/"&&o.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!i||!i.absolutePath)&&(a=ns(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),o.push(a)}return r.query!==void 0&&o.push("?",r.query),r.fragment!==void 0&&o.push("#",r.fragment),o.join("")}var sN=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Rr(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let i=e.match(sN);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host)if(eN(n.host)===!1){let c=QO(n.host);n.host=c.host.toLowerCase(),o=c.isIPV6}else o=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let s=yb(r.scheme||n.scheme);if(!r.unicodeSupport&&(!s||!s.unicodeSupport)&&n.host&&(r.domainHost||s&&s.domainHost)&&o===!1&&tN(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(a){n.error=n.error||"Host's domain name can not be converted to ASCII: "+a}(!s||s&&!s.skipNormalize)&&(e.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=unescape(n.host))),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),s&&s.parse&&s.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var ch={SCHEMES:rN,normalize:nN,resolve:oN,resolveComponent:_b,equal:iN,serialize:mr,parse:Rr};_c.exports=ch;_c.exports.default=ch;_c.exports.fastUri=ch});var xb=S(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});var bb=vb();bb.code='require("ajv/dist/runtime/uri").default';uh.default=bb});var Eb=S(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.CodeGen=Ge.Name=Ge.nil=Ge.stringify=Ge.str=Ge._=Ge.KeywordCxt=void 0;var aN=ts();Object.defineProperty(Ge,"KeywordCxt",{enumerable:!0,get:function(){return aN.KeywordCxt}});var Do=K();Object.defineProperty(Ge,"_",{enumerable:!0,get:function(){return Do._}});Object.defineProperty(Ge,"str",{enumerable:!0,get:function(){return Do.str}});Object.defineProperty(Ge,"stringify",{enumerable:!0,get:function(){return Do.stringify}});Object.defineProperty(Ge,"nil",{enumerable:!0,get:function(){return Do.nil}});Object.defineProperty(Ge,"Name",{enumerable:!0,get:function(){return Do.Name}});Object.defineProperty(Ge,"CodeGen",{enumerable:!0,get:function(){return Do.CodeGen}});var cN=dc(),Tb=rs(),uN=Mf(),os=hc(),lN=K(),is=Qi(),vc=Yi(),ph=le(),wb=ab(),pN=xb(),Pb=(e,t)=>new RegExp(e,t);Pb.code="new RegExp";var dN=["removeAdditional","useDefaults","coerceTypes"],fN=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),hN={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},mN={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},kb=200;function gN(e){var t,r,n,o,i,s,a,c,u,p,l,d,f,h,g,y,b,v,k,C,T,F,Y,Ie,ht;let we=e.strict,Qe=(t=e.code)===null||t===void 0?void 0:t.optimize,Rt=Qe===!0||Qe===void 0?1:Qe||0,li=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Pb,uo=(o=e.uriResolver)!==null&&o!==void 0?o:pN.default;return{strictSchema:(s=(i=e.strictSchema)!==null&&i!==void 0?i:we)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:we)!==null&&c!==void 0?c:!0,strictTypes:(p=(u=e.strictTypes)!==null&&u!==void 0?u:we)!==null&&p!==void 0?p:"log",strictTuples:(d=(l=e.strictTuples)!==null&&l!==void 0?l:we)!==null&&d!==void 0?d:"log",strictRequired:(h=(f=e.strictRequired)!==null&&f!==void 0?f:we)!==null&&h!==void 0?h:!1,code:e.code?{...e.code,optimize:Rt,regExp:li}:{optimize:Rt,regExp:li},loopRequired:(g=e.loopRequired)!==null&&g!==void 0?g:kb,loopEnum:(y=e.loopEnum)!==null&&y!==void 0?y:kb,meta:(b=e.meta)!==null&&b!==void 0?b:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(k=e.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(C=e.schemaId)!==null&&C!==void 0?C:"$id",addUsedSchema:(T=e.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(F=e.validateSchema)!==null&&F!==void 0?F:!0,validateFormats:(Y=e.validateFormats)!==null&&Y!==void 0?Y:!0,unicodeRegExp:(Ie=e.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(ht=e.int32range)!==null&&ht!==void 0?ht:!0,uriResolver:uo}}var ss=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...gN(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new lN.ValueScope({scope:{},prefixes:fN,es5:r,lines:n}),this.logger=wN(t.logger);let o=t.validateFormats;t.validateFormats=!1,this.RULES=(0,uN.getRules)(),Sb.call(this,hN,t,"NOT SUPPORTED"),Sb.call(this,mN,t,"DEPRECATED","warn"),this._metaOpts=bN.call(this),t.formats&&_N.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&vN.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),yN.call(this),t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,o=wb;n==="id"&&(o={...wb},o.id=o.$id,delete o.$id),r&&t&&this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,t,r);async function o(p,l){await i.call(this,p.$schema);let d=this._addSchema(p,l);return d.validate||s.call(this,d)}async function i(p){p&&!this.getSchema(p)&&await o.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(l){if(!(l instanceof Tb.default))throw l;return a.call(this,l),await c.call(this,l.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:l}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${l} cannot be resolved`)}async function c(p){let l=await u.call(this,p);this.refs[p]||await i.call(this,l.$schema),this.refs[p]||this.addSchema(l,p,r)}async function u(p){let l=this._loading[p];if(l)return l;try{return await(this._loading[p]=n(p))}finally{delete this._loading[p]}}}addSchema(t,r,n,o=this.opts.validateSchema){if(Array.isArray(t)){for(let s of t)this.addSchema(s,void 0,n,o);return this}let i;if(typeof t=="object"){let{schemaId:s}=this.opts;if(i=t[s],i!==void 0&&typeof i!="string")throw new Error(`schema ${s} must be string`)}return r=(0,is.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,o,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,t);if(!o&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return o}getSchema(t){let r;for(;typeof(r=$b.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,o=new os.SchemaEnv({schema:{},schemaId:n});if(r=os.resolveSchema.call(this,o,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=$b.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,is.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(SN.call(this,n,r),!r)return(0,ph.eachItem)(n,i=>lh.call(this,i)),this;TN.call(this,r);let o={...r,type:(0,vc.getJSONTypes)(r.type),schemaType:(0,vc.getJSONTypes)(r.schemaType)};return(0,ph.eachItem)(n,o.type.length===0?i=>lh.call(this,i,o):i=>o.type.forEach(s=>lh.call(this,i,o,s))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let o=n.rules.findIndex(i=>i.keyword===t);o>=0&&n.rules.splice(o,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,i)=>o+r+i)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let o of r){let i=o.split("/").slice(1),s=t;for(let a of i)s=s[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:u}=c.definition,p=s[a];u&&p&&(s[a]=Cb(p))}}return t}_removeAllSchemas(t,r){for(let n in t){let o=t[n];(!r||r.test(n))&&(typeof o=="string"?delete t[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete t[n]))}}_addSchema(t,r,n,o=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof t=="object")s=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,is.normalizeId)(s||n);let u=is.getSchemaRefs.call(this,t,n);return c=new os.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:u}),this._cache.set(c.schema,c),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),o&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):os.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{os.compileSchema.call(this,t)}finally{this.opts=r}}};ss.ValidationError=cN.default;ss.MissingRefError=Tb.default;Ge.default=ss;function Sb(e,t,r,n="error"){for(let o in e){let i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function $b(e){return e=(0,is.normalizeId)(e),this.schemas[e]||this.refs[e]}function yN(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function _N(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function vN(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function bN(){let e={...this.opts};for(let t of dN)delete e[t];return e}var xN={log(){},warn(){},error(){}};function wN(e){if(e===!1)return xN;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var kN=/^[a-z_$][a-z0-9_$:-]*$/i;function SN(e,t){let{RULES:r}=this;if((0,ph.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!kN.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function lh(e,t,r){var n;let o=t?.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,s=o?i.post:i.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,vc.getJSONTypes)(t.type),schemaType:(0,vc.getJSONTypes)(t.schemaType)}};t.before?$N.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function $N(e,t,r){let n=e.rules.findIndex(o=>o.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function TN(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Cb(t)),e.validateSchema=this.compile(t,!0))}var PN={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Cb(e){return{anyOf:[e,PN]}}});var Ib=S(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});var CN={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};dh.default=CN});var Ob=S(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.callRef=Kn.getValidate=void 0;var EN=rs(),zb=Zt(),wt=K(),jo=Ir(),Rb=hc(),bc=le(),IN={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:i,validateName:s,opts:a,self:c}=n,{root:u}=i;if((r==="#"||r==="#/")&&o===u.baseId)return l();let p=Rb.resolveRef.call(c,u,o,r);if(p===void 0)throw new EN.default(n.opts.uriResolver,o,r);if(p instanceof Rb.SchemaEnv)return d(p);return f(p);function l(){if(i===u)return xc(e,s,i,i.$async);let h=t.scopeValue("root",{ref:u});return xc(e,(0,wt._)`${h}.validate`,u,u.$async)}function d(h){let g=Ab(e,h);xc(e,g,h,h.$async)}function f(h){let g=t.scopeValue("schema",a.code.source===!0?{ref:h,code:(0,wt.stringify)(h)}:{ref:h}),y=t.name("valid"),b=e.subschema({schema:h,dataTypes:[],schemaPath:wt.nil,topSchemaRef:g,errSchemaPath:r},y);e.mergeEvaluated(b),e.ok(y)}}};function Ab(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,wt._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Kn.getValidate=Ab;function xc(e,t,r,n){let{gen:o,it:i}=e,{allErrors:s,schemaEnv:a,opts:c}=i,u=c.passContext?jo.default.this:wt.nil;n?p():l();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let h=o.let("valid");o.try(()=>{o.code((0,wt._)`await ${(0,zb.callValidateCode)(e,t,u)}`),f(t),s||o.assign(h,!0)},g=>{o.if((0,wt._)`!(${g} instanceof ${i.ValidationError})`,()=>o.throw(g)),d(g),s||o.assign(h,!1)}),e.ok(h)}function l(){e.result((0,zb.callValidateCode)(e,t,u),()=>f(t),()=>d(t))}function d(h){let g=(0,wt._)`${h}.errors`;o.assign(jo.default.vErrors,(0,wt._)`${jo.default.vErrors} === null ? ${g} : ${jo.default.vErrors}.concat(${g})`),o.assign(jo.default.errors,(0,wt._)`${jo.default.vErrors}.length`)}function f(h){var g;if(!i.opts.unevaluated)return;let y=(g=r?.validate)===null||g===void 0?void 0:g.evaluated;if(i.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(i.props=bc.mergeEvaluated.props(o,y.props,i.props));else{let b=o.var("props",(0,wt._)`${h}.evaluated.props`);i.props=bc.mergeEvaluated.props(o,b,i.props,wt.Name)}if(i.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(i.items=bc.mergeEvaluated.items(o,y.items,i.items));else{let b=o.var("items",(0,wt._)`${h}.evaluated.items`);i.items=bc.mergeEvaluated.items(o,b,i.items,wt.Name)}}}Kn.callRef=xc;Kn.default=IN});var Nb=S(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});var zN=Ib(),RN=Ob(),AN=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",zN.default,RN.default];fh.default=AN});var Db=S(hh=>{"use strict";Object.defineProperty(hh,"__esModule",{value:!0});var wc=K(),un=wc.operators,kc={maximum:{okStr:"<=",ok:un.LTE,fail:un.GT},minimum:{okStr:">=",ok:un.GTE,fail:un.LT},exclusiveMaximum:{okStr:"<",ok:un.LT,fail:un.GTE},exclusiveMinimum:{okStr:">",ok:un.GT,fail:un.LTE}},ON={message:({keyword:e,schemaCode:t})=>(0,wc.str)`must be ${kc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,wc._)`{comparison: ${kc[e].okStr}, limit: ${t}}`},NN={keyword:Object.keys(kc),type:"number",schemaType:"number",$data:!0,error:ON,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,wc._)`${r} ${kc[t].fail} ${n} || isNaN(${r})`)}};hh.default=NN});var jb=S(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});var as=K(),DN={message:({schemaCode:e})=>(0,as.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,as._)`{multipleOf: ${e}}`},jN={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:DN,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,i=o.opts.multipleOfPrecision,s=t.let("res"),a=i?(0,as._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,as._)`${s} !== parseInt(${s})`;e.fail$data((0,as._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};mh.default=jN});var Lb=S(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});function Mb(e){let t=e.length,r=0,n=0,o;for(;n<t;)r++,o=e.charCodeAt(n++),o>=55296&&o<=56319&&n<t&&(o=e.charCodeAt(n),(o&64512)===56320&&n++);return r}gh.default=Mb;Mb.code='require("ajv/dist/runtime/ucs2length").default'});var Zb=S(yh=>{"use strict";Object.defineProperty(yh,"__esModule",{value:!0});var Jn=K(),MN=le(),LN=Lb(),ZN={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Jn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Jn._)`{limit: ${e}}`},qN={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:ZN,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,i=t==="maxLength"?Jn.operators.GT:Jn.operators.LT,s=o.opts.unicode===!1?(0,Jn._)`${r}.length`:(0,Jn._)`${(0,MN.useFunc)(e.gen,LN.default)}(${r})`;e.fail$data((0,Jn._)`${s} ${i} ${n}`)}};yh.default=qN});var qb=S(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});var FN=Zt(),Sc=K(),UN={message:({schemaCode:e})=>(0,Sc.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Sc._)`{pattern: ${e}}`},BN={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:UN,code(e){let{data:t,$data:r,schema:n,schemaCode:o,it:i}=e,s=i.opts.unicodeRegExp?"u":"",a=r?(0,Sc._)`(new RegExp(${o}, ${s}))`:(0,FN.usePattern)(e,n);e.fail$data((0,Sc._)`!${a}.test(${t})`)}};_h.default=BN});var Fb=S(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});var cs=K(),VN={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,cs.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,cs._)`{limit: ${e}}`},HN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:VN,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?cs.operators.GT:cs.operators.LT;e.fail$data((0,cs._)`Object.keys(${r}).length ${o} ${n}`)}};vh.default=HN});var Ub=S(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var us=Zt(),ls=K(),GN=le(),WN={message:({params:{missingProperty:e}})=>(0,ls.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,ls._)`{missingProperty: ${e}}`},KN={keyword:"required",type:"object",schemaType:"array",$data:!0,error:WN,code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:i,it:s}=e,{opts:a}=s;if(!i&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?u():p(),a.strictRequired){let f=e.parentSchema.properties,{definedProperties:h}=e.it;for(let g of r)if(f?.[g]===void 0&&!h.has(g)){let y=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${g}" is not defined at "${y}" (strictRequired)`;(0,GN.checkStrictMode)(s,b,s.opts.strictRequired)}}function u(){if(c||i)e.block$data(ls.nil,l);else for(let f of r)(0,us.checkReportMissingProp)(e,f)}function p(){let f=t.let("missing");if(c||i){let h=t.let("valid",!0);e.block$data(h,()=>d(f,h)),e.ok(h)}else t.if((0,us.checkMissingProp)(e,r,f)),(0,us.reportMissingProp)(e,f),t.else()}function l(){t.forOf("prop",n,f=>{e.setParams({missingProperty:f}),t.if((0,us.noPropertyInData)(t,o,f,a.ownProperties),()=>e.error())})}function d(f,h){e.setParams({missingProperty:f}),t.forOf(f,n,()=>{t.assign(h,(0,us.propertyInData)(t,o,f,a.ownProperties)),t.if((0,ls.not)(h),()=>{e.error(),t.break()})},ls.nil)}}};bh.default=KN});var Bb=S(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});var ps=K(),JN={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,ps.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,ps._)`{limit: ${e}}`},YN={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:JN,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?ps.operators.GT:ps.operators.LT;e.fail$data((0,ps._)`${r}.length ${o} ${n}`)}};xh.default=YN});var $c=S(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});var Vb=Hf();Vb.code='require("ajv/dist/runtime/equal").default';wh.default=Vb});var Hb=S(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});var kh=Yi(),We=K(),QN=le(),XN=$c(),e4={message:({params:{i:e,j:t}})=>(0,We.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,We._)`{i: ${e}, j: ${t}}`},t4={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:e4,code(e){let{gen:t,data:r,$data:n,schema:o,parentSchema:i,schemaCode:s,it:a}=e;if(!n&&!o)return;let c=t.let("valid"),u=i.items?(0,kh.getSchemaTypes)(i.items):[];e.block$data(c,p,(0,We._)`${s} === false`),e.ok(c);function p(){let h=t.let("i",(0,We._)`${r}.length`),g=t.let("j");e.setParams({i:h,j:g}),t.assign(c,!0),t.if((0,We._)`${h} > 1`,()=>(l()?d:f)(h,g))}function l(){return u.length>0&&!u.some(h=>h==="object"||h==="array")}function d(h,g){let y=t.name("item"),b=(0,kh.checkDataTypes)(u,y,a.opts.strictNumbers,kh.DataType.Wrong),v=t.const("indices",(0,We._)`{}`);t.for((0,We._)`;${h}--;`,()=>{t.let(y,(0,We._)`${r}[${h}]`),t.if(b,(0,We._)`continue`),u.length>1&&t.if((0,We._)`typeof ${y} == "string"`,(0,We._)`${y} += "_"`),t.if((0,We._)`typeof ${v}[${y}] == "number"`,()=>{t.assign(g,(0,We._)`${v}[${y}]`),e.error(),t.assign(c,!1).break()}).code((0,We._)`${v}[${y}] = ${h}`)})}function f(h,g){let y=(0,QN.useFunc)(t,XN.default),b=t.name("outer");t.label(b).for((0,We._)`;${h}--;`,()=>t.for((0,We._)`${g} = ${h}; ${g}--;`,()=>t.if((0,We._)`${y}(${r}[${h}], ${r}[${g}])`,()=>{e.error(),t.assign(c,!1).break(b)})))}}};Sh.default=t4});var Gb=S(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var $h=K(),r4=le(),n4=$c(),o4={message:"must be equal to constant",params:({schemaCode:e})=>(0,$h._)`{allowedValue: ${e}}`},i4={keyword:"const",$data:!0,error:o4,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:i}=e;n||i&&typeof i=="object"?e.fail$data((0,$h._)`!${(0,r4.useFunc)(t,n4.default)}(${r}, ${o})`):e.fail((0,$h._)`${i} !== ${r}`)}};Th.default=i4});var Wb=S(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});var ds=K(),s4=le(),a4=$c(),c4={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,ds._)`{allowedValues: ${e}}`},u4={keyword:"enum",schemaType:"array",$data:!0,error:c4,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:i,it:s}=e;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=s.opts.loopEnum,c,u=()=>c??(c=(0,s4.useFunc)(t,a4.default)),p;if(a||n)p=t.let("valid"),e.block$data(p,l);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let f=t.const("vSchema",i);p=(0,ds.or)(...o.map((h,g)=>d(f,g)))}e.pass(p);function l(){t.assign(p,!1),t.forOf("v",i,f=>t.if((0,ds._)`${u()}(${r}, ${f})`,()=>t.assign(p,!0).break()))}function d(f,h){let g=o[h];return typeof g=="object"&&g!==null?(0,ds._)`${u()}(${r}, ${f}[${h}])`:(0,ds._)`${r} === ${g}`}}};Ph.default=u4});var Kb=S(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});var l4=Db(),p4=jb(),d4=Zb(),f4=qb(),h4=Fb(),m4=Ub(),g4=Bb(),y4=Hb(),_4=Gb(),v4=Wb(),b4=[l4.default,p4.default,d4.default,f4.default,h4.default,m4.default,g4.default,y4.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},_4.default,v4.default];Ch.default=b4});var Ih=S(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});fs.validateAdditionalItems=void 0;var Yn=K(),Eh=le(),x4={message:({params:{len:e}})=>(0,Yn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Yn._)`{limit: ${e}}`},w4={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:x4,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,Eh.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Jb(e,n)}};function Jb(e,t){let{gen:r,schema:n,data:o,keyword:i,it:s}=e;s.items=!0;let a=r.const("len",(0,Yn._)`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Yn._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,Eh.alwaysValidSchema)(s,n)){let u=r.var("valid",(0,Yn._)`${a} <= ${t.length}`);r.if((0,Yn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,p=>{e.subschema({keyword:i,dataProp:p,dataPropType:Eh.Type.Num},u),s.allErrors||r.if((0,Yn.not)(u),()=>r.break())})}}fs.validateAdditionalItems=Jb;fs.default=w4});var zh=S(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.validateTuple=void 0;var Yb=K(),Tc=le(),k4=Zt(),S4={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return Qb(e,"additionalItems",t);r.items=!0,!(0,Tc.alwaysValidSchema)(r,t)&&e.ok((0,k4.validateArray)(e))}};function Qb(e,t,r=e.schema){let{gen:n,parentSchema:o,data:i,keyword:s,it:a}=e;p(o),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Tc.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),u=n.const("len",(0,Yb._)`${i}.length`);r.forEach((l,d)=>{(0,Tc.alwaysValidSchema)(a,l)||(n.if((0,Yb._)`${u} > ${d}`,()=>e.subschema({keyword:s,schemaProp:d,dataProp:d},c)),e.ok(c))});function p(l){let{opts:d,errSchemaPath:f}=a,h=r.length,g=h===l.minItems&&(h===l.maxItems||l[t]===!1);if(d.strictTuples&&!g){let y=`"${s}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,Tc.checkStrictMode)(a,y,d.strictTuples)}}}hs.validateTuple=Qb;hs.default=S4});var Xb=S(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});var $4=zh(),T4={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,$4.validateTuple)(e,"items")};Rh.default=T4});var tx=S(Ah=>{"use strict";Object.defineProperty(Ah,"__esModule",{value:!0});var ex=K(),P4=le(),C4=Zt(),E4=Ih(),I4={message:({params:{len:e}})=>(0,ex.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,ex._)`{limit: ${e}}`},z4={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:I4,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,!(0,P4.alwaysValidSchema)(n,t)&&(o?(0,E4.validateAdditionalItems)(e,o):e.ok((0,C4.validateArray)(e)))}};Ah.default=z4});var rx=S(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var Ft=K(),Pc=le(),R4={message:({params:{min:e,max:t}})=>t===void 0?(0,Ft.str)`must contain at least ${e} valid item(s)`:(0,Ft.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Ft._)`{minContains: ${e}}`:(0,Ft._)`{minContains: ${e}, maxContains: ${t}}`},A4={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:R4,code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:i}=e,s,a,{minContains:c,maxContains:u}=n;i.opts.next?(s=c===void 0?1:c,a=u):s=1;let p=t.const("len",(0,Ft._)`${o}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,Pc.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Pc.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Pc.alwaysValidSchema)(i,r)){let g=(0,Ft._)`${p} >= ${s}`;a!==void 0&&(g=(0,Ft._)`${g} && ${p} <= ${a}`),e.pass(g);return}i.items=!0;let l=t.name("valid");a===void 0&&s===1?f(l,()=>t.if(l,()=>t.break())):s===0?(t.let(l,!0),a!==void 0&&t.if((0,Ft._)`${o}.length > 0`,d)):(t.let(l,!1),d()),e.result(l,()=>e.reset());function d(){let g=t.name("_valid"),y=t.let("count",0);f(g,()=>t.if(g,()=>h(y)))}function f(g,y){t.forRange("i",0,p,b=>{e.subschema({keyword:"contains",dataProp:b,dataPropType:Pc.Type.Num,compositeRule:!0},g),y()})}function h(g){t.code((0,Ft._)`${g}++`),a===void 0?t.if((0,Ft._)`${g} >= ${s}`,()=>t.assign(l,!0).break()):(t.if((0,Ft._)`${g} > ${a}`,()=>t.assign(l,!1).break()),s===1?t.assign(l,!0):t.if((0,Ft._)`${g} >= ${s}`,()=>t.assign(l,!0)))}}};Oh.default=A4});var ix=S(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.validateSchemaDeps=gr.validatePropertyDeps=gr.error=void 0;var Nh=K(),O4=le(),ms=Zt();gr.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,Nh.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,Nh._)`{property: ${e},
37
37
  missingProperty: ${n},
38
38
  depsCount: ${t},
39
- deps: ${r}}`};var T4={keyword:"dependencies",type:"object",schemaType:"object",error:fr.error,code(e){let[t,r]=P4(e);K0(e,t),J0(e,r)}};function P4({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let o=Array.isArray(e[n])?t:r;o[n]=e[n]}return[t,r]}function K0(e,t=e.schema){let{gen:r,data:n,it:o}=e;if(Object.keys(t).length===0)return;let i=r.let("missing");for(let s in t){let a=t[s];if(a.length===0)continue;let c=(0,ps.propertyInData)(r,n,s,o.opts.ownProperties);e.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),o.allErrors?r.if(c,()=>{for(let u of a)(0,ps.checkReportMissingProp)(e,u)}):(r.if((0,Rh._)`${c} && (${(0,ps.checkMissingProp)(e,a,i)})`),(0,ps.reportMissingProp)(e,i),r.else())}}fr.validatePropertyDeps=K0;function J0(e,t=e.schema){let{gen:r,data:n,keyword:o,it:i}=e,s=r.name("valid");for(let a in t)(0,$4.alwaysValidSchema)(i,t[a])||(r.if((0,ps.propertyInData)(r,n,a,i.opts.ownProperties),()=>{let c=e.subschema({keyword:o,schemaProp:a},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}fr.validateSchemaDeps=J0;fr.default=T4});var X0=S(Ah=>{"use strict";Object.defineProperty(Ah,"__esModule",{value:!0});var Q0=K(),C4=le(),E4={message:"property name must be valid",params:({params:e})=>(0,Q0._)`{propertyName: ${e.propertyName}}`},I4={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:E4,code(e){let{gen:t,schema:r,data:n,it:o}=e;if((0,C4.alwaysValidSchema)(o,r))return;let i=t.name("valid");t.forIn("key",n,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),t.if((0,Q0.not)(i),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(i)}};Ah.default=I4});var Nh=S(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var kc=Lt(),Qt=K(),z4=Pr(),Sc=le(),R4={message:"must NOT have additional properties",params:({params:e})=>(0,Qt._)`{additionalProperty: ${e.additionalProperty}}`},A4={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:R4,code(e){let{gen:t,schema:r,parentSchema:n,data:o,errsCount:i,it:s}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,Sc.alwaysValidSchema)(s,r))return;let u=(0,kc.allSchemaProperties)(n.properties),p=(0,kc.allSchemaProperties)(n.patternProperties);l(),e.ok((0,Qt._)`${i} === ${z4.default.errors}`);function l(){t.forIn("key",o,y=>{!u.length&&!p.length?h(y):t.if(d(y),()=>h(y))})}function d(y){let b;if(u.length>8){let v=(0,Sc.schemaRefOrVal)(s,n.properties,"properties");b=(0,kc.isOwnProperty)(t,v,y)}else u.length?b=(0,Qt.or)(...u.map(v=>(0,Qt._)`${y} === ${v}`)):b=Qt.nil;return p.length&&(b=(0,Qt.or)(b,...p.map(v=>(0,Qt._)`${(0,kc.usePattern)(e,v)}.test(${y})`))),(0,Qt.not)(b)}function f(y){t.code((0,Qt._)`delete ${o}[${y}]`)}function h(y){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){f(y);return}if(r===!1){e.setParams({additionalProperty:y}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Sc.alwaysValidSchema)(s,r)){let b=t.name("valid");c.removeAdditional==="failing"?(m(y,b,!1),t.if((0,Qt.not)(b),()=>{e.reset(),f(y)})):(m(y,b),a||t.if((0,Qt.not)(b),()=>t.break()))}}function m(y,b,v){let k={keyword:"additionalProperties",dataProp:y,dataPropType:Sc.Type.Str};v===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(k,b)}}};Oh.default=A4});var rx=S(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});var O4=Yi(),ex=Lt(),Dh=le(),tx=Nh(),N4={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:i}=e;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&tx.default.code(new O4.KeywordCxt(i,tx.default,"additionalProperties"));let s=(0,ex.allSchemaProperties)(r);for(let l of s)i.definedProperties.add(l);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Dh.mergeEvaluated.props(t,(0,Dh.toHash)(s),i.props));let a=s.filter(l=>!(0,Dh.alwaysValidSchema)(i,r[l]));if(a.length===0)return;let c=t.name("valid");for(let l of a)u(l)?p(l):(t.if((0,ex.propertyInData)(t,o,l,i.opts.ownProperties)),p(l),i.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(l),e.ok(c);function u(l){return i.opts.useDefaults&&!i.compositeRule&&r[l].default!==void 0}function p(l){e.subschema({keyword:"properties",schemaProp:l,dataProp:l},c)}}};jh.default=N4});var sx=S(Mh=>{"use strict";Object.defineProperty(Mh,"__esModule",{value:!0});var nx=Lt(),$c=K(),ox=le(),ix=le(),D4={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:o,it:i}=e,{opts:s}=i,a=(0,nx.allSchemaProperties)(r),c=a.filter(m=>(0,ox.alwaysValidSchema)(i,r[m]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&o.properties,p=t.name("valid");i.props!==!0&&!(i.props instanceof $c.Name)&&(i.props=(0,ix.evaluatedPropsToName)(t,i.props));let{props:l}=i;d();function d(){for(let m of a)u&&f(m),i.allErrors?h(m):(t.var(p,!0),h(m),t.if(p))}function f(m){for(let y in u)new RegExp(m).test(y)&&(0,ox.checkStrictMode)(i,`property ${y} matches pattern ${m} (use allowMatchingProperties)`)}function h(m){t.forIn("key",n,y=>{t.if((0,$c._)`${(0,nx.usePattern)(e,m)}.test(${y})`,()=>{let b=c.includes(m);b||e.subschema({keyword:"patternProperties",schemaProp:m,dataProp:y,dataPropType:ix.Type.Str},p),i.opts.unevaluated&&l!==!0?t.assign((0,$c._)`${l}[${y}]`,!0):!b&&!i.allErrors&&t.if((0,$c.not)(p),()=>t.break())})})}}};Mh.default=D4});var ax=S(Lh=>{"use strict";Object.defineProperty(Lh,"__esModule",{value:!0});var j4=le(),M4={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,j4.alwaysValidSchema)(n,r)){e.fail();return}let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Lh.default=M4});var cx=S(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:!0});var L4=Lt(),Z4={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:L4.validateUnion,error:{message:"must match a schema in anyOf"}};Zh.default=Z4});var ux=S(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});var Tc=K(),q4=le(),F4={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Tc._)`{passingSchemas: ${e.passing}}`},U4={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:F4,code(e){let{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let i=r,s=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(u),e.result(s,()=>e.reset(),()=>e.error(!0));function u(){i.forEach((p,l)=>{let d;(0,q4.alwaysValidSchema)(o,p)?t.var(c,!0):d=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},c),l>0&&t.if((0,Tc._)`${c} && ${s}`).assign(s,!1).assign(a,(0,Tc._)`[${a}, ${l}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,l),d&&e.mergeEvaluated(d,Tc.Name)})})}}};qh.default=U4});var lx=S(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});var B4=le(),V4={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=t.name("valid");r.forEach((i,s)=>{if((0,B4.alwaysValidSchema)(n,i))return;let a=e.subschema({keyword:"allOf",schemaProp:s},o);e.ok(o),e.mergeEvaluated(a)})}};Fh.default=V4});var fx=S(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});var Pc=K(),dx=le(),H4={message:({params:e})=>(0,Pc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Pc._)`{failingKeyword: ${e.ifClause}}`},G4={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:H4,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,dx.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=px(n,"then"),i=px(n,"else");if(!o&&!i)return;let s=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),o&&i){let p=t.let("ifClause");e.setParams({ifClause:p}),t.if(a,u("then",p),u("else",p))}else o?t.if(a,u("then")):t.if((0,Pc.not)(a),u("else"));e.pass(s,()=>e.error(!0));function c(){let p=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(p)}function u(p,l){return()=>{let d=e.subschema({keyword:p},a);t.assign(s,a),e.mergeValidEvaluated(d,s),l?t.assign(l,(0,Pc._)`${p}`):e.setParams({ifClause:p})}}}};function px(e,t){let r=e.schema[t];return r!==void 0&&!(0,dx.alwaysValidSchema)(e,r)}Uh.default=G4});var hx=S(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});var W4=le(),K4={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,W4.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Bh.default=K4});var mx=S(Vh=>{"use strict";Object.defineProperty(Vh,"__esModule",{value:!0});var J4=Ph(),Y4=V0(),Q4=Ch(),X4=G0(),eD=W0(),tD=Y0(),rD=X0(),nD=Nh(),oD=rx(),iD=sx(),sD=ax(),aD=cx(),cD=ux(),uD=lx(),lD=fx(),pD=hx();function dD(e=!1){let t=[sD.default,aD.default,cD.default,uD.default,lD.default,pD.default,rD.default,nD.default,tD.default,oD.default,iD.default];return e?t.push(Y4.default,X4.default):t.push(J4.default,Q4.default),t.push(eD.default),t}Vh.default=dD});var gx=S(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:!0});var Ae=K(),fD={message:({schemaCode:e})=>(0,Ae.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ae._)`{format: ${e}}`},hD={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:fD,code(e,t){let{gen:r,data:n,$data:o,schema:i,schemaCode:s,it:a}=e,{opts:c,errSchemaPath:u,schemaEnv:p,self:l}=a;if(!c.validateFormats)return;o?d():f();function d(){let h=r.scopeValue("formats",{ref:l.formats,code:c.code.formats}),m=r.const("fDef",(0,Ae._)`${h}[${s}]`),y=r.let("fType"),b=r.let("format");r.if((0,Ae._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(y,(0,Ae._)`${m}.type || "string"`).assign(b,(0,Ae._)`${m}.validate`),()=>r.assign(y,(0,Ae._)`"string"`).assign(b,m)),e.fail$data((0,Ae.or)(v(),k()));function v(){return c.strictSchema===!1?Ae.nil:(0,Ae._)`${s} && !${b}`}function k(){let C=p.$async?(0,Ae._)`(${m}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,Ae._)`${b}(${n})`,T=(0,Ae._)`(typeof ${b} == "function" ? ${C} : ${b}.test(${n}))`;return(0,Ae._)`${b} && ${b} !== true && ${y} === ${t} && !${T}`}}function f(){let h=l.formats[i];if(!h){v();return}if(h===!0)return;let[m,y,b]=k(h);m===t&&e.pass(C());function v(){if(c.strictSchema===!1){l.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function k(T){let U=T instanceof RegExp?(0,Ae.regexpCode)(T):c.code.formats?(0,Ae._)`${c.code.formats}${(0,Ae.getProperty)(i)}`:void 0,Y=r.scopeValue("formats",{key:i,ref:T,code:U});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,Ae._)`${Y}.validate`]:["string",T,Y]}function C(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!p.$async)throw new Error("async format in sync schema");return(0,Ae._)`await ${b}(${n})`}return typeof y=="function"?(0,Ae._)`${b}(${n})`:(0,Ae._)`${b}.test(${n})`}}}};Hh.default=hD});var yx=S(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});var mD=gx(),gD=[mD.default];Gh.default=gD});var _x=S(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.contentVocabulary=Oo.metadataVocabulary=void 0;Oo.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Oo.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var bx=S(Wh=>{"use strict";Object.defineProperty(Wh,"__esModule",{value:!0});var yD=P0(),_D=q0(),vD=mx(),bD=yx(),vx=_x(),xD=[yD.default,_D.default,(0,vD.default)(),bD.default,vx.metadataVocabulary,vx.contentVocabulary];Wh.default=xD});var wx=S(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.DiscrError=void 0;var xx;(function(e){e.Tag="tag",e.Mapping="mapping"})(xx||(Cc.DiscrError=xx={}))});var Sx=S(Jh=>{"use strict";Object.defineProperty(Jh,"__esModule",{value:!0});var No=K(),Kh=wx(),kx=uc(),wD=Qi(),kD=le(),SD={message:({params:{discrError:e,tagName:t}})=>e===Kh.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,No._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},$D={keyword:"discriminator",type:"object",schemaType:"object",error:SD,code(e){let{gen:t,data:r,schema:n,parentSchema:o,it:i}=e,{oneOf:s}=o;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,No._)`${r}${(0,No.getProperty)(a)}`);t.if((0,No._)`typeof ${u} == "string"`,()=>p(),()=>e.error(!1,{discrError:Kh.DiscrError.Tag,tag:u,tagName:a})),e.ok(c);function p(){let f=d();t.if(!1);for(let h in f)t.elseIf((0,No._)`${u} === ${h}`),t.assign(c,l(f[h]));t.else(),e.error(!1,{discrError:Kh.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}function l(f){let h=t.name("valid"),m=e.subschema({keyword:"oneOf",schemaProp:f},h);return e.mergeEvaluated(m,No.Name),h}function d(){var f;let h={},m=b(o),y=!0;for(let C=0;C<s.length;C++){let T=s[C];if(T?.$ref&&!(0,kD.schemaHasRulesButRef)(T,i.self.RULES)){let Y=T.$ref;if(T=kx.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,Y),T instanceof kx.SchemaEnv&&(T=T.schema),T===void 0)throw new wD.default(i.opts.uriResolver,i.baseId,Y)}let U=(f=T?.properties)===null||f===void 0?void 0:f[a];if(typeof U!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(m||b(T)),v(U,C)}if(!y)throw new Error(`discriminator: "${a}" must be required`);return h;function b({required:C}){return Array.isArray(C)&&C.includes(a)}function v(C,T){if(C.const)k(C.const,T);else if(C.enum)for(let U of C.enum)k(U,T);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(C,T){if(typeof C!="string"||C in h)throw new Error(`discriminator: "${a}" values must be unique strings`);h[C]=T}}}};Jh.default=$D});var $x=S((sB,TD)=>{TD.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Qh=S((xe,Yh)=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.MissingRefError=xe.ValidationError=xe.CodeGen=xe.Name=xe.nil=xe.stringify=xe.str=xe._=xe.KeywordCxt=xe.Ajv=void 0;var PD=x0(),CD=bx(),ED=Sx(),Tx=$x(),ID=["/properties"],Ec="http://json-schema.org/draft-07/schema",Do=class extends PD.default{_addVocabularies(){super._addVocabularies(),CD.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(ED.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Tx,ID):Tx;this.addMetaSchema(t,Ec,!1),this.refs["http://json-schema.org/schema"]=Ec}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Ec)?Ec:void 0)}};xe.Ajv=Do;Yh.exports=xe=Do;Yh.exports.Ajv=Do;Object.defineProperty(xe,"__esModule",{value:!0});xe.default=Do;var zD=Yi();Object.defineProperty(xe,"KeywordCxt",{enumerable:!0,get:function(){return zD.KeywordCxt}});var jo=K();Object.defineProperty(xe,"_",{enumerable:!0,get:function(){return jo._}});Object.defineProperty(xe,"str",{enumerable:!0,get:function(){return jo.str}});Object.defineProperty(xe,"stringify",{enumerable:!0,get:function(){return jo.stringify}});Object.defineProperty(xe,"nil",{enumerable:!0,get:function(){return jo.nil}});Object.defineProperty(xe,"Name",{enumerable:!0,get:function(){return jo.Name}});Object.defineProperty(xe,"CodeGen",{enumerable:!0,get:function(){return jo.CodeGen}});var RD=ac();Object.defineProperty(xe,"ValidationError",{enumerable:!0,get:function(){return RD.default}});var AD=Qi();Object.defineProperty(xe,"MissingRefError",{enumerable:!0,get:function(){return AD.default}})});var Ox=S(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.formatNames=mr.fastFormats=mr.fullFormats=void 0;function hr(e,t){return{validate:e,compare:t}}mr.fullFormats={date:hr(Ix,rm),time:hr(em(!0),nm),"date-time":hr(Px(!0),Rx),"iso-time":hr(em(),zx),"iso-date-time":hr(Px(),Ax),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:LD,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:HD,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:ZD,int32:{type:"number",validate:UD},int64:{type:"number",validate:BD},float:{type:"number",validate:Ex},double:{type:"number",validate:Ex},password:!0,binary:!0};mr.fastFormats={...mr.fullFormats,date:hr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,rm),time:hr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,nm),"date-time":hr(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Rx),"iso-time":hr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,zx),"iso-date-time":hr(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Ax),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};mr.formatNames=Object.keys(mr.fullFormats);function OD(e){return e%4===0&&(e%100!==0||e%400===0)}var ND=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,DD=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Ix(e){let t=ND.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&OD(r)?29:DD[n])}function rm(e,t){if(e&&t)return e>t?1:e<t?-1:0}var Xh=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function em(e){return function(r){let n=Xh.exec(r);if(!n)return!1;let o=+n[1],i=+n[2],s=+n[3],a=n[4],c=n[5]==="-"?-1:1,u=+(n[6]||0),p=+(n[7]||0);if(u>23||p>59||e&&!a)return!1;if(o<=23&&i<=59&&s<60)return!0;let l=i-p*c,d=o-u*c-(l<0?1:0);return(d===23||d===-1)&&(l===59||l===-1)&&s<61}}function nm(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n}function zx(e,t){if(!(e&&t))return;let r=Xh.exec(e),n=Xh.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e<t?-1:0}var tm=/t|\s/i;function Px(e){let t=em(e);return function(n){let o=n.split(tm);return o.length===2&&Ix(o[0])&&t(o[1])}}function Rx(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(r&&n)return r-n}function Ax(e,t){if(!(e&&t))return;let[r,n]=e.split(tm),[o,i]=t.split(tm),s=rm(r,o);if(s!==void 0)return s||nm(n,i)}var jD=/\/|:/,MD=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function LD(e){return jD.test(e)&&MD.test(e)}var Cx=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function ZD(e){return Cx.lastIndex=0,Cx.test(e)}var qD=-(2**31),FD=2**31-1;function UD(e){return Number.isInteger(e)&&e<=FD&&e>=qD}function BD(e){return Number.isInteger(e)}function Ex(){return!0}var VD=/[^\\]\\Z/;function HD(e){if(VD.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Nx=S(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.formatLimitDefinition=void 0;var GD=Qh(),Xt=K(),sn=Xt.operators,Ic={formatMaximum:{okStr:"<=",ok:sn.LTE,fail:sn.GT},formatMinimum:{okStr:">=",ok:sn.GTE,fail:sn.LT},formatExclusiveMaximum:{okStr:"<",ok:sn.LT,fail:sn.GTE},formatExclusiveMinimum:{okStr:">",ok:sn.GT,fail:sn.LTE}},WD={message:({keyword:e,schemaCode:t})=>(0,Xt.str)`should be ${Ic[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Xt._)`{comparison: ${Ic[e].okStr}, limit: ${t}}`};Mo.formatLimitDefinition={keyword:Object.keys(Ic),type:"string",schemaType:"string",$data:!0,error:WD,code(e){let{gen:t,data:r,schemaCode:n,keyword:o,it:i}=e,{opts:s,self:a}=i;if(!s.validateFormats)return;let c=new GD.KeywordCxt(i,a.RULES.all.format.definition,"format");c.$data?u():p();function u(){let d=t.scopeValue("formats",{ref:a.formats,code:s.code.formats}),f=t.const("fmt",(0,Xt._)`${d}[${c.schemaCode}]`);e.fail$data((0,Xt.or)((0,Xt._)`typeof ${f} != "object"`,(0,Xt._)`${f} instanceof RegExp`,(0,Xt._)`typeof ${f}.compare != "function"`,l(f)))}function p(){let d=c.schema,f=a.formats[d];if(!f||f===!0)return;if(typeof f!="object"||f instanceof RegExp||typeof f.compare!="function")throw new Error(`"${o}": format "${d}" does not define "compare" function`);let h=t.scopeValue("formats",{key:d,ref:f,code:s.code.formats?(0,Xt._)`${s.code.formats}${(0,Xt.getProperty)(d)}`:void 0});e.fail$data(l(h))}function l(d){return(0,Xt._)`${d}.compare(${r}, ${n}) ${Ic[o].fail} 0`}},dependencies:["format"]};var KD=e=>(e.addKeyword(Mo.formatLimitDefinition),e);Mo.default=KD});var Lx=S((ds,Mx)=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});var Lo=Ox(),JD=Nx(),om=K(),Dx=new om.Name("fullFormats"),YD=new om.Name("fastFormats"),im=(e,t={keywords:!0})=>{if(Array.isArray(t))return jx(e,t,Lo.fullFormats,Dx),e;let[r,n]=t.mode==="fast"?[Lo.fastFormats,YD]:[Lo.fullFormats,Dx],o=t.formats||Lo.formatNames;return jx(e,o,r,n),t.keywords&&(0,JD.default)(e),e};im.get=(e,t="full")=>{let n=(t==="fast"?Lo.fastFormats:Lo.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function jx(e,t,r,n){var o,i;(o=(i=e.opts.code).formats)!==null&&o!==void 0||(i.formats=(0,om._)`require("ajv-formats/dist/formats").${n}`);for(let s of t)e.addFormat(s,r[s])}Mx.exports=ds=im;Object.defineProperty(ds,"__esModule",{value:!0});ds.default=im});function QD(){let e=new Zx.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,qx.default)(e),e}var Zx,qx,zc,Fx=_(()=>{Zx=ft(Qh(),1),qx=ft(Lx(),1);zc=class{constructor(t){this._ajv=t??QD()}getValidator(t){let r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}}});var Rc,Ux=_(()=>{Rc=class{constructor(t){this._server=t}requestStream(t,r,n){return this._server.requestStream(t,r,n)}async getTask(t,r){return this._server.getTask({taskId:t},r)}async getTaskResult(t,r,n){return this._server.getTaskResult({taskId:t},r,n)}async listTasks(t,r){return this._server.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._server.cancelTask({taskId:t},r)}}});function Bx(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break;default:break}}function Vx(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}var Hx=_(()=>{});var Ac,Gx=_(()=>{eb();Di();Fx();Si();Ux();Hx();Ac=class extends Wa{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Ni.options.map((n,o)=>[n,o])),this.isMessageIgnored=(n,o)=>{let i=this._loggingLevels.get(o);return i?this.LOG_LEVEL_SEVERITY.get(n)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=r?.capabilities??{},this._instructions=r?.instructions,this._jsonSchemaValidator=r?.jsonSchemaValidator??new zc,this.setRequestHandler(_d,n=>this._oninitialize(n)),this.setNotificationHandler(vd,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Td,async(n,o)=>{let i=o.sessionId||o.requestInfo?.headers["mcp-session-id"]||void 0,{level:s}=n.params,a=Ni.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new Rc(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Xv(this._capabilities,t)}setRequestHandler(t,r){let o=Wr(t)?.method;if(!o)throw new Error("Schema is missing a method literal");let i;if(Ot(o)){let a=o;i=a._zod?.def?.value??a.value}else{let a=o;i=a._def?.value??a.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let a=async(c,u)=>{let p=Gr(ko,c);if(!p.success){let h=p.error instanceof Error?p.error.message:String(p.error);throw new O(L.InvalidParams,`Invalid tools/call request: ${h}`)}let{params:l}=p.data,d=await Promise.resolve(r(c,u));if(l.task){let h=Gr(xo,d);if(!h.success){let m=h.error instanceof Error?h.error.message:String(h.error);throw new O(L.InvalidParams,`Invalid task creation result: ${m}`)}return h.data}let f=Gr(Na,d);if(!f.success){let h=f.error instanceof Error?f.error.message:String(f.error);throw new O(L.InvalidParams,`Invalid tools/call result: ${h}`)}return f.data};return super.setRequestHandler(t,a)}return super.setRequestHandler(t,r)}assertCapabilityForMethod(t){switch(t){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new Error(`Client does not support sampling (required for ${t})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new Error(`Client does not support elicitation (required for ${t})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new Error(`Client does not support listing roots (required for ${t})`);break;case"ping":break}}assertNotificationCapability(t){switch(t){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${t})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${t})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${t})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new Error(`Client does not support URL elicitation (required for ${t})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${t})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${t})`);break;case"ping":case"initialize":break}}assertTaskCapability(t){Vx(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&Bx(this._capabilities.tasks?.requests,t,"Server")}async _oninitialize(t){let r=t.params.protocolVersion;return this._clientCapabilities=t.params.capabilities,this._clientVersion=t.params.clientInfo,{protocolVersion:X_.includes(r)?r:fd,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},va)}async createMessage(t,r){if((t.tools||t.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){let n=t.messages[t.messages.length-1],o=Array.isArray(n.content)?n.content:[n.content],i=o.some(u=>u.type==="tool_result"),s=t.messages.length>1?t.messages[t.messages.length-2]:void 0,a=s?Array.isArray(s.content)?s.content:[s.content]:[],c=a.some(u=>u.type==="tool_use");if(i){if(o.some(u=>u.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!c)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(c){let u=new Set(a.filter(l=>l.type==="tool_use").map(l=>l.id)),p=new Set(o.filter(l=>l.type==="tool_result").map(l=>l.toolUseId));if(u.size!==p.size||![...u].every(l=>p.has(l)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return t.tools?this.request({method:"sampling/createMessage",params:t},Cd,r):this.request({method:"sampling/createMessage",params:t},Pd,r)}async elicitInput(t,r){switch(t.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");let o=t;return this.request({method:"elicitation/create",params:o},Da,r)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");let o=t.mode==="form"?t:{...t,mode:"form"},i=await this.request({method:"elicitation/create",params:o},Da,r);if(i.action==="accept"&&i.content&&o.requestedSchema)try{let a=this._jsonSchemaValidator.getValidator(o.requestedSchema)(i.content);if(!a.valid)throw new O(L.InvalidParams,`Elicitation response content does not match requested schema: ${a.errorMessage}`)}catch(s){throw s instanceof O?s:new O(L.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return i}}}createElicitationCompletionNotifier(t,r){if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:t}},r)}async listRoots(t,r){return this.request({method:"roots/list",params:t},Ed,r)}async sendLoggingMessage(t,r){if(this._capabilities.logging&&!this.isMessageIgnored(t.level,r))return this.notification({method:"notifications/message",params:t})}async sendResourceUpdated(t){return this.notification({method:"notifications/resources/updated",params:t})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}});function sm(e){return!!e&&typeof e=="object"&&Kx in e}function Jx(e){return e[Kx]?.complete}var Kx,Wx,Yx=_(()=>{Kx=Symbol.for("mcp.completable");(function(e){e.Completable="McpCompletable"})(Wx||(Wx={}))});var Oc,Qx=_(()=>{Oc=class e{static isTemplate(t){return/\{[^}\s]+\}/.test(t)}static validateLength(t,r,n){if(t.length>r)throw new Error(`${n} exceeds maximum length of ${r} characters (got ${t.length})`)}get variableNames(){return this.parts.flatMap(t=>typeof t=="string"?[]:t.names)}constructor(t){e.validateLength(t,1e6,"Template"),this.template=t,this.parts=this.parse(t)}toString(){return this.template}parse(t){let r=[],n="",o=0,i=0;for(;o<t.length;)if(t[o]==="{"){n&&(r.push(n),n="");let s=t.indexOf("}",o);if(s===-1)throw new Error("Unclosed template expression");if(i++,i>1e4)throw new Error("Template contains too many expressions (max 10000)");let a=t.slice(o+1,s),c=this.getOperator(a),u=a.includes("*"),p=this.getNames(a),l=p[0];for(let d of p)e.validateLength(d,1e6,"Variable name");r.push({name:l,operator:c,names:p,exploded:u}),o=s+1}else n+=t[o],o++;return n&&r.push(n),r}getOperator(t){return["+","#",".","/","?","&"].find(n=>t.startsWith(n))||""}getNames(t){let r=this.getOperator(t);return t.slice(r.length).split(",").map(n=>n.replace("*","").trim()).filter(n=>n.length>0)}encodeValue(t,r){return e.validateLength(t,1e6,"Variable value"),r==="+"||r==="#"?encodeURI(t):encodeURIComponent(t)}expandPart(t,r){if(t.operator==="?"||t.operator==="&"){let s=t.names.map(c=>{let u=r[c];if(u===void 0)return"";let p=Array.isArray(u)?u.map(l=>this.encodeValue(l,t.operator)).join(","):this.encodeValue(u.toString(),t.operator);return`${c}=${p}`}).filter(c=>c.length>0);return s.length===0?"":(t.operator==="?"?"?":"&")+s.join("&")}if(t.names.length>1){let s=t.names.map(a=>r[a]).filter(a=>a!==void 0);return s.length===0?"":s.map(a=>Array.isArray(a)?a[0]:a).join(",")}let n=r[t.name];if(n===void 0)return"";let i=(Array.isArray(n)?n:[n]).map(s=>this.encodeValue(s,t.operator));switch(t.operator){case"":return i.join(",");case"+":return i.join(",");case"#":return"#"+i.join(",");case".":return"."+i.join(".");case"/":return"/"+i.join("/");default:return i.join(",")}}expand(t){let r="",n=!1;for(let o of this.parts){if(typeof o=="string"){r+=o;continue}let i=this.expandPart(o,t);i&&((o.operator==="?"||o.operator==="&")&&n?r+=i.replace("?","&"):r+=i,(o.operator==="?"||o.operator==="&")&&(n=!0))}return r}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}partToRegExp(t){let r=[];for(let i of t.names)e.validateLength(i,1e6,"Variable name");if(t.operator==="?"||t.operator==="&"){for(let i=0;i<t.names.length;i++){let s=t.names[i],a=i===0?"\\"+t.operator:"&";r.push({pattern:a+this.escapeRegExp(s)+"=([^&]+)",name:s})}return r}let n,o=t.name;switch(t.operator){case"":n=t.exploded?"([^/,]+(?:,[^/,]+)*)":"([^/,]+)";break;case"+":case"#":n="(.+)";break;case".":n="\\.([^/,]+)";break;case"/":n="/"+(t.exploded?"([^/,]+(?:,[^/,]+)*)":"([^/,]+)");break;default:n="([^/]+)"}return r.push({pattern:n,name:o}),r}match(t){e.validateLength(t,1e6,"URI");let r="^",n=[];for(let a of this.parts)if(typeof a=="string")r+=this.escapeRegExp(a);else{let c=this.partToRegExp(a);for(let{pattern:u,name:p}of c)r+=u,n.push({name:p,exploded:a.exploded})}r+="$",e.validateLength(r,1e6,"Generated regex pattern");let o=new RegExp(r),i=t.match(o);if(!i)return null;let s={};for(let a=0;a<n.length;a++){let{name:c,exploded:u}=n[a],p=i[a+1],l=c.replace("*","");u&&p.includes(",")?s[l]=p.split(","):s[l]=p}return s}}});function ej(e){let t=[];if(e.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!XD.test(e)){let r=e.split("").filter(n=>!/[A-Za-z0-9._-]/.test(n)).filter((n,o,i)=>i.indexOf(n)===o);return t.push(`Tool name contains invalid characters: ${r.map(n=>`"${n}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function tj(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let r of t)console.warn(` - ${r}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function am(e){let t=ej(e);return tj(e,t.warnings),t.isValid}var XD,Xx=_(()=>{XD=/^[A-Za-z0-9._-]{1,128}$/});var Nc,ew=_(()=>{Nc=class{constructor(t){this._mcpServer=t}registerToolTask(t,r,n){let o={taskSupport:"required",...r.execution};if(o.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,r.title,r.description,r.inputSchema,r.outputSchema,r.annotations,o,r._meta,n)}}});var pe=_(()=>{Us();Us()});function nw(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function nj(e){return"_def"in e||"_zod"in e||nw(e)}function cm(e){return typeof e!="object"||e===null||nj(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(nw)}function tw(e){if(e)return cm(e)?Mn(e):e}function oj(e){let t=Wr(e);return t?Object.entries(t).map(([r,n])=>{let o=$_(n),i=T_(n);return{name:r,description:o,required:!i}}):[]}function an(e){let r=Wr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=fa(r);if(typeof n=="string")return n;throw new Error("Schema method literal must be a string")}function rw(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var Dc,hs,rj,fs,ow=_(()=>{Gx();Si();ff();Di();Yx();Qx();Xx();ew();pe();Dc=class{constructor(t,r){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new Ac(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new Nc(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(an(Oa)),this.server.assertCanSetRequestHandler(an(ko)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(Oa,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,r])=>{let n={name:t,title:r.title,description:r.description,inputSchema:(()=>{let o=vo(r.inputSchema);return o?lf(o,{strictUnions:!0,pipeStrategy:"input"}):rj})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){let o=vo(r.outputSchema);o&&(n.outputSchema=lf(o,{strictUnions:!0,pipeStrategy:"output"}))}return n})})),this.server.setRequestHandler(ko,async(t,r)=>{try{let n=this._registeredTools[t.params.name];if(!n)throw new O(L.InvalidParams,`Tool ${t.params.name} not found`);if(!n.enabled)throw new O(L.InvalidParams,`Tool ${t.params.name} disabled`);let o=!!t.params.task,i=n.execution?.taskSupport,s="createTask"in n.handler;if((i==="required"||i==="optional")&&!s)throw new O(L.InternalError,`Tool ${t.params.name} has taskSupport '${i}' but was not registered with registerToolTask`);if(i==="required"&&!o)throw new O(L.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(i==="optional"&&!o&&s)return await this.handleAutomaticTaskPolling(n,t,r);let a=await this.validateToolInput(n,t.params.arguments,t.params.name),c=await this.executeToolHandler(n,a,r);return o||await this.validateToolOutput(n,c,t.params.name),c}catch(n){if(n instanceof O&&n.code===L.UrlElicitationRequired)throw n;return this.createToolError(n instanceof Error?n.message:String(n))}}),this._toolHandlersInitialized=!0)}createToolError(t){return{content:[{type:"text",text:t}],isError:!0}}async validateToolInput(t,r,n){if(!t.inputSchema)return;let i=vo(t.inputSchema)??t.inputSchema,s=await pa(i,r);if(!s.success){let a="error"in s?s.error:"Unknown error",c=da(a);throw new O(L.InvalidParams,`Input validation error: Invalid arguments for tool ${n}: ${c}`)}return s.data}async validateToolOutput(t,r,n){if(!t.outputSchema||!("content"in r)||r.isError)return;if(!r.structuredContent)throw new O(L.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let o=vo(t.outputSchema),i=await pa(o,r.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=da(s);throw new O(L.InvalidParams,`Output validation error: Invalid structured content for tool ${n}: ${a}`)}}async executeToolHandler(t,r,n){let o=t.handler;if("createTask"in o){if(!n.taskStore)throw new Error("No task store provided.");let s={...n,taskStore:n.taskStore};if(t.inputSchema){let a=o;return await Promise.resolve(a.createTask(r,s))}else{let a=o;return await Promise.resolve(a.createTask(s))}}if(t.inputSchema){let s=o;return await Promise.resolve(s(r,n))}else{let s=o;return await Promise.resolve(s(n))}}async handleAutomaticTaskPolling(t,r,n){if(!n.taskStore)throw new Error("No task store provided for task-capable tool.");let o=await this.validateToolInput(t,r.params.arguments,r.params.name),i=t.handler,s={...n,taskStore:n.taskStore},a=o?await Promise.resolve(i.createTask(o,s)):await Promise.resolve(i.createTask(s)),c=a.task.taskId,u=a.task,p=u.pollInterval??5e3;for(;u.status!=="completed"&&u.status!=="failed"&&u.status!=="cancelled";){await new Promise(d=>setTimeout(d,p));let l=await n.taskStore.getTask(c);if(!l)throw new O(L.InternalError,`Task ${c} not found during polling`);u=l}return await n.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(an(ja)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(ja,async t=>{switch(t.params.ref.type){case"ref/prompt":return mv(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return gv(t),this.handleResourceCompletion(t,t.params.ref);default:throw new O(L.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){let n=this._registeredPrompts[r.name];if(!n)throw new O(L.InvalidParams,`Prompt ${r.name} not found`);if(!n.enabled)throw new O(L.InvalidParams,`Prompt ${r.name} disabled`);if(!n.argsSchema)return fs;let i=Wr(n.argsSchema)?.[t.params.argument.name];if(!sm(i))return fs;let s=Jx(i);if(!s)return fs;let a=await s(t.params.argument.value,t.params.context);return rw(a)}async handleResourceCompletion(t,r){let n=Object.values(this._registeredResourceTemplates).find(s=>s.resourceTemplate.uriTemplate.toString()===r.uri);if(!n){if(this._registeredResources[r.uri])return fs;throw new O(L.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let o=n.resourceTemplate.completeCallback(t.params.argument.name);if(!o)return fs;let i=await o(t.params.argument.value,t.params.context);return rw(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(an(Ea)),this.server.assertCanSetRequestHandler(an(Ia)),this.server.assertCanSetRequestHandler(an(za)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Ea,async(t,r)=>{let n=Object.entries(this._registeredResources).filter(([i,s])=>s.enabled).map(([i,s])=>({uri:i,name:s.name,...s.metadata})),o=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let s=await i.resourceTemplate.listCallback(r);for(let a of s.resources)o.push({...i.metadata,...a})}return{resources:[...n,...o]}}),this.server.setRequestHandler(Ia,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,n])=>({name:r,uriTemplate:n.resourceTemplate.uriTemplate.toString(),...n.metadata}))})),this.server.setRequestHandler(za,async(t,r)=>{let n=new URL(t.params.uri),o=this._registeredResources[n.toString()];if(o){if(!o.enabled)throw new O(L.InvalidParams,`Resource ${n} disabled`);return o.readCallback(n,r)}for(let i of Object.values(this._registeredResourceTemplates)){let s=i.resourceTemplate.uriTemplate.match(n.toString());if(s)return i.readCallback(n,s,r)}throw new O(L.InvalidParams,`Resource ${n} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(an(Ra)),this.server.assertCanSetRequestHandler(an(Aa)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Ra,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?oj(r.argsSchema):void 0}))})),this.server.setRequestHandler(Aa,async(t,r)=>{let n=this._registeredPrompts[t.params.name];if(!n)throw new O(L.InvalidParams,`Prompt ${t.params.name} not found`);if(!n.enabled)throw new O(L.InvalidParams,`Prompt ${t.params.name} disabled`);if(n.argsSchema){let o=vo(n.argsSchema),i=await pa(o,t.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",u=da(c);throw new O(L.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${u}`)}let s=i.data,a=n.callback;return await Promise.resolve(a(s,r))}else{let o=n.callback;return await Promise.resolve(o(r))}}),this._promptHandlersInitialized=!0)}resource(t,r,...n){let o;typeof n[0]=="object"&&(o=n.shift());let i=n[0];if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let s=this._createRegisteredResource(t,void 0,r,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let s=this._createRegisteredResourceTemplate(t,void 0,r,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}registerResource(t,r,n,o){if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let i=this._createRegisteredResource(t,n.title,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let i=this._createRegisteredResourceTemplate(t,n.title,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(t,r,n,o,i){let s={name:t,title:r,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({uri:null}),update:a=>{typeof a.uri<"u"&&a.uri!==n&&(delete this._registeredResources[n],a.uri&&(this._registeredResources[a.uri]=s)),typeof a.name<"u"&&(s.name=a.name),typeof a.title<"u"&&(s.title=a.title),typeof a.metadata<"u"&&(s.metadata=a.metadata),typeof a.callback<"u"&&(s.readCallback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendResourceListChanged()}};return this._registeredResources[n]=s,s}_createRegisteredResourceTemplate(t,r,n,o,i){let s={resourceTemplate:n,title:r,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:u=>{typeof u.name<"u"&&u.name!==t&&(delete this._registeredResourceTemplates[t],u.name&&(this._registeredResourceTemplates[u.name]=s)),typeof u.title<"u"&&(s.title=u.title),typeof u.template<"u"&&(s.resourceTemplate=u.template),typeof u.metadata<"u"&&(s.metadata=u.metadata),typeof u.callback<"u"&&(s.readCallback=u.callback),typeof u.enabled<"u"&&(s.enabled=u.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[t]=s;let a=n.uriTemplate.variableNames;return Array.isArray(a)&&a.some(u=>!!n.completeCallback(u))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(t,r,n,o,i){let s={title:r,description:n,argsSchema:o===void 0?void 0:Mn(o),callback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:a=>{typeof a.name<"u"&&a.name!==t&&(delete this._registeredPrompts[t],a.name&&(this._registeredPrompts[a.name]=s)),typeof a.title<"u"&&(s.title=a.title),typeof a.description<"u"&&(s.description=a.description),typeof a.argsSchema<"u"&&(s.argsSchema=Mn(a.argsSchema)),typeof a.callback<"u"&&(s.callback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[t]=s,o&&Object.values(o).some(c=>{let u=c instanceof mt?c._def?.innerType:c;return sm(u)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(t,r,n,o,i,s,a,c,u){am(t);let p={title:r,description:n,inputSchema:tw(o),outputSchema:tw(i),annotations:s,execution:a,_meta:c,handler:u,enabled:!0,disable:()=>p.update({enabled:!1}),enable:()=>p.update({enabled:!0}),remove:()=>p.update({name:null}),update:l=>{typeof l.name<"u"&&l.name!==t&&(typeof l.name=="string"&&am(l.name),delete this._registeredTools[t],l.name&&(this._registeredTools[l.name]=p)),typeof l.title<"u"&&(p.title=l.title),typeof l.description<"u"&&(p.description=l.description),typeof l.paramsSchema<"u"&&(p.inputSchema=Mn(l.paramsSchema)),typeof l.outputSchema<"u"&&(p.outputSchema=Mn(l.outputSchema)),typeof l.callback<"u"&&(p.handler=l.callback),typeof l.annotations<"u"&&(p.annotations=l.annotations),typeof l._meta<"u"&&(p._meta=l._meta),typeof l.enabled<"u"&&(p.enabled=l.enabled),this.sendToolListChanged()}};return this._registeredTools[t]=p,this.setToolRequestHandlers(),this.sendToolListChanged(),p}tool(t,...r){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let n,o,i,s;if(typeof r[0]=="string"&&(n=r.shift()),r.length>1){let c=r[0];cm(c)?(o=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!cm(r[0])&&(s=r.shift())):typeof c=="object"&&c!==null&&(s=r.shift())}let a=r[0];return this._createRegisteredTool(t,void 0,n,o,i,s,{taskSupport:"forbidden"},void 0,a)}registerTool(t,r,n){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let{title:o,description:i,inputSchema:s,outputSchema:a,annotations:c,_meta:u}=r;return this._createRegisteredTool(t,o,i,s,a,c,{taskSupport:"forbidden"},u,n)}prompt(t,...r){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let n;typeof r[0]=="string"&&(n=r.shift());let o;r.length>1&&(o=r.shift());let i=r[0],s=this._createRegisteredPrompt(t,void 0,n,o,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(t,r,n){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let{title:o,description:i,argsSchema:s}=r,a=this._createRegisteredPrompt(t,o,i,s,n);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,r){return this.server.sendLoggingMessage(t,r)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}},hs=class{constructor(t,r){this._callbacks=r,this._uriTemplate=typeof t=="string"?new Oc(t):t}get uriTemplate(){return this._uriTemplate}get listCallback(){return this._callbacks.list}completeCallback(t){return this._callbacks.complete?.[t]}},rj={type:"object",properties:{}};fs={completion:{values:[],hasMore:!1}}});function ij(e){return av.parse(JSON.parse(e))}function iw(e){return JSON.stringify(e)+`
40
- `}var jc,sw=_(()=>{Di();jc=class{append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
41
- `);if(t===-1)return null;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),ij(r)}clear(){this._buffer=void 0}}});var um,Mc,aw=_(()=>{um=ft(require("node:process"),1);sw();Mc=class{constructor(t=um.default.stdin,r=um.default.stdout){this._stdin=t,this._stdout=r,this._readBuffer=new jc,this._started=!1,this._ondata=n=>{this._readBuffer.append(n),this.processReadBuffer()},this._onerror=n=>{this.onerror?.(n)}}async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){for(;;)try{let t=this._readBuffer.readMessage();if(t===null)break;this.onmessage?.(t)}catch(t){this.onerror?.(t)}}async close(){this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.()}send(t){return new Promise(r=>{let n=iw(t);this._stdout.write(n)?r():this._stdout.once("drain",r)})}}});function kw(e){return typeof e>"u"||e===null}function sj(e){return typeof e=="object"&&e!==null}function aj(e){return Array.isArray(e)?e:kw(e)?[]:[e]}function cj(e,t){var r,n,o,i;if(t)for(i=Object.keys(t),r=0,n=i.length;r<n;r+=1)o=i[r],e[o]=t[o];return e}function uj(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function lj(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}function Sw(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
42
-
43
- `+e.mark.snippet),n+" "+r):n}function gs(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Sw(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}function lm(e,t,r,n,o){var i="",s="",a=Math.floor(o/2)-1;return n-t>a&&(i=" ... ",t=n-a+i.length),r-n>a&&(s=" ...",r=n+a-s.length),{str:i+e.slice(t,r).replace(/\t/g,"\u2192")+s,pos:n-t+i.length}}function pm(e,t){return Le.repeat(" ",t-e.length)+e}function yj(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],o=[],i,s=-1;i=r.exec(e.buffer);)o.push(i.index),n.push(i.index+i[0].length),e.position<=i.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var a="",c,u,p=Math.min(e.line+t.linesAfter,o.length).toString().length,l=t.maxLength-(t.indent+p+3);for(c=1;c<=t.linesBefore&&!(s-c<0);c++)u=lm(e.buffer,n[s-c],o[s-c],e.position-(n[s]-n[s-c]),l),a=Le.repeat(" ",t.indent)+pm((e.line-c+1).toString(),p)+" | "+u.str+`
44
- `+a;for(u=lm(e.buffer,n[s],o[s],e.position,l),a+=Le.repeat(" ",t.indent)+pm((e.line+1).toString(),p)+" | "+u.str+`
45
- `,a+=Le.repeat("-",t.indent+p+3+u.pos)+`^
46
- `,c=1;c<=t.linesAfter&&!(s+c>=o.length);c++)u=lm(e.buffer,n[s+c],o[s+c],e.position-(n[s]-n[s+c]),l),a+=Le.repeat(" ",t.indent)+pm((e.line+c+1).toString(),p)+" | "+u.str+`
47
- `;return a.replace(/\n$/,"")}function xj(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function wj(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(vj.indexOf(r)===-1)throw new lt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=xj(t.styleAliases||null),bj.indexOf(this.kind)===-1)throw new lt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}function cw(e,t){var r=[];return e[t].forEach(function(n){var o=r.length;r.forEach(function(i,s){i.tag===n.tag&&i.kind===n.kind&&i.multi===n.multi&&(o=s)}),r[o]=n}),r}function kj(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}function fm(e){return this.extend(e)}function Sj(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function $j(){return null}function Tj(e){return e===null}function Pj(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function Cj(e){return e==="true"||e==="True"||e==="TRUE"}function Ej(e){return Object.prototype.toString.call(e)==="[object Boolean]"}function Ij(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function zj(e){return 48<=e&&e<=55}function Rj(e){return 48<=e&&e<=57}function Aj(e){if(e===null)return!1;var t=e.length,r=0,n=!1,o;if(!t)return!1;if(o=e[r],(o==="-"||o==="+")&&(o=e[++r]),o==="0"){if(r+1===t)return!0;if(o=e[++r],o==="b"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;n=!0}return n&&o!=="_"}if(o==="x"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!Ij(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!zj(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!Rj(e.charCodeAt(r)))return!1;n=!0}return!(!n||o==="_")}function Oj(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function Nj(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Le.isNegativeZero(e)}function jj(e){return!(e===null||!Dj.test(e)||e[e.length-1]==="_")}function Mj(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}function Zj(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Le.isNegativeZero(e))return"-0.0";return r=e.toString(10),Lj.test(r)?r.replace("e",".e"):r}function qj(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Le.isNegativeZero(e))}function Fj(e){return e===null?!1:Dw.exec(e)!==null||jw.exec(e)!==null}function Uj(e){var t,r,n,o,i,s,a,c=0,u=null,p,l,d;if(t=Dw.exec(e),t===null&&(t=jw.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,n,o));if(i=+t[4],s=+t[5],a=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(p=+t[10],l=+(t[11]||0),u=(p*60+l)*6e4,t[9]==="-"&&(u=-u)),d=new Date(Date.UTC(r,n,o,i,s,a,c)),u&&d.setTime(d.getTime()-u),d}function Bj(e){return e.toISOString()}function Vj(e){return e==="<<"||e===null}function Hj(e){if(e===null)return!1;var t,r,n=0,o=e.length,i=_m;for(r=0;r<o;r++)if(t=i.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function Gj(e){var t,r,n=e.replace(/[\r\n=]/g,""),o=n.length,i=_m,s=0,a=[];for(t=0;t<o;t++)t%4===0&&t&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|i.indexOf(n.charAt(t));return r=o%4*6,r===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):r===18?(a.push(s>>10&255),a.push(s>>2&255)):r===12&&a.push(s>>4&255),new Uint8Array(a)}function Wj(e){var t="",r=0,n,o,i=e.length,s=_m;for(n=0;n<i;n++)n%3===0&&n&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[n];return o=i%3,o===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):o===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):o===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function Kj(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function Qj(e){if(e===null)return!0;var t=[],r,n,o,i,s,a=e;for(r=0,n=a.length;r<n;r+=1){if(o=a[r],s=!1,Yj.call(o)!=="[object Object]")return!1;for(i in o)if(Jj.call(o,i))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(i)===-1)t.push(i);else return!1}return!0}function Xj(e){return e!==null?e:[]}function t3(e){if(e===null)return!0;var t,r,n,o,i,s=e;for(i=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(n=s[t],e3.call(n)!=="[object Object]"||(o=Object.keys(n),o.length!==1))return!1;i[t]=[o[0],n[o[0]]]}return!0}function r3(e){if(e===null)return[];var t,r,n,o,i,s=e;for(i=new Array(s.length),t=0,r=s.length;t<r;t+=1)n=s[t],o=Object.keys(n),i[t]=[o[0],n[o[0]]];return i}function o3(e){if(e===null)return!0;var t,r=e;for(t in r)if(n3.call(r,t)&&r[t]!==null)return!1;return!0}function i3(e){return e!==null?e:{}}function lw(e){return Object.prototype.toString.call(e)}function gr(e){return e===10||e===13}function Jn(e){return e===9||e===32}function wt(e){return e===9||e===32||e===10||e===13}function qo(e){return e===44||e===91||e===93||e===123||e===125}function l3(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function p3(e){return e===120?2:e===117?4:e===85?8:0}function d3(e){return 48<=e&&e<=57?e-48:-1}function pw(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
48
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function f3(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Ww(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function h3(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||vm,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Yw(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=_j(r),new lt(t,r)}function j(e,t){throw Yw(e,t)}function qc(e,t){e.onWarning&&e.onWarning.call(null,Yw(e,t))}function cn(e,t,r,n){var o,i,s,a;if(t<r){if(a=e.input.slice(t,r),n)for(o=0,i=a.length;o<i;o+=1)s=a.charCodeAt(o),s===9||32<=s&&s<=1114111||j(e,"expected valid JSON character");else a3.test(a)&&j(e,"the stream contains non-printable characters");e.result+=a}}function fw(e,t,r,n){var o,i,s,a;for(Le.isObject(r)||j(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),s=0,a=o.length;s<a;s+=1)i=o[s],un.call(t,i)||(Ww(t,i,r[i]),n[i]=!0)}function Fo(e,t,r,n,o,i,s,a,c){var u,p;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),u=0,p=o.length;u<p;u+=1)Array.isArray(o[u])&&j(e,"nested arrays are not supported inside keys"),typeof o=="object"&&lw(o[u])==="[object Object]"&&(o[u]="[object Object]");if(typeof o=="object"&&lw(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(u=0,p=i.length;u<p;u+=1)fw(e,t,i[u],r);else fw(e,t,i,r);else!e.json&&!un.call(r,o)&&un.call(t,o)&&(e.line=s||e.line,e.lineStart=a||e.lineStart,e.position=c||e.position,j(e,"duplicated mapping key")),Ww(t,o,i),delete r[o];return t}function bm(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):j(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function De(e,t,r){for(var n=0,o=e.input.charCodeAt(e.position);o!==0;){for(;Jn(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(gr(o))for(bm(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&qc(e,"deficient indentation"),n}function Bc(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||wt(r)))}function xm(e,t){t===1?e.result+=" ":t>1&&(e.result+=Le.repeat(`
49
- `,t-1))}function m3(e,t,r){var n,o,i,s,a,c,u,p,l=e.kind,d=e.result,f;if(f=e.input.charCodeAt(e.position),wt(f)||qo(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(o=e.input.charCodeAt(e.position+1),wt(o)||r&&qo(o)))return!1;for(e.kind="scalar",e.result="",i=s=e.position,a=!1;f!==0;){if(f===58){if(o=e.input.charCodeAt(e.position+1),wt(o)||r&&qo(o))break}else if(f===35){if(n=e.input.charCodeAt(e.position-1),wt(n))break}else{if(e.position===e.lineStart&&Bc(e)||r&&qo(f))break;if(gr(f))if(c=e.line,u=e.lineStart,p=e.lineIndent,De(e,!1,-1),e.lineIndent>=t){a=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=u,e.lineIndent=p;break}}a&&(cn(e,i,s,!1),xm(e,e.line-c),i=s=e.position,a=!1),Jn(f)||(s=e.position+1),f=e.input.charCodeAt(++e.position)}return cn(e,i,s,!1),e.result?!0:(e.kind=l,e.result=d,!1)}function g3(e,t){var r,n,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(cn(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,o=e.position;else return!0;else gr(r)?(cn(e,n,o,!0),xm(e,De(e,!1,t)),n=o=e.position):e.position===e.lineStart&&Bc(e)?j(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);j(e,"unexpected end of the stream within a single quoted scalar")}function y3(e,t){var r,n,o,i,s,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return cn(e,r,e.position,!0),e.position++,!0;if(a===92){if(cn(e,r,e.position,!0),a=e.input.charCodeAt(++e.position),gr(a))De(e,!1,t);else if(a<256&&Kw[a])e.result+=Jw[a],e.position++;else if((s=p3(a))>0){for(o=s,i=0;o>0;o--)a=e.input.charCodeAt(++e.position),(s=l3(a))>=0?i=(i<<4)+s:j(e,"expected hexadecimal character");e.result+=f3(i),e.position++}else j(e,"unknown escape sequence");r=n=e.position}else gr(a)?(cn(e,r,n,!0),xm(e,De(e,!1,t)),r=n=e.position):e.position===e.lineStart&&Bc(e)?j(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}j(e,"unexpected end of the stream within a double quoted scalar")}function _3(e,t){var r=!0,n,o,i,s=e.tag,a,c=e.anchor,u,p,l,d,f,h=Object.create(null),m,y,b,v;if(v=e.input.charCodeAt(e.position),v===91)p=93,f=!1,a=[];else if(v===123)p=125,f=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),v=e.input.charCodeAt(++e.position);v!==0;){if(De(e,!0,t),v=e.input.charCodeAt(e.position),v===p)return e.position++,e.tag=s,e.anchor=c,e.kind=f?"mapping":"sequence",e.result=a,!0;r?v===44&&j(e,"expected the node content, but found ','"):j(e,"missed comma between flow collection entries"),y=m=b=null,l=d=!1,v===63&&(u=e.input.charCodeAt(e.position+1),wt(u)&&(l=d=!0,e.position++,De(e,!0,t))),n=e.line,o=e.lineStart,i=e.position,Uo(e,t,Lc,!1,!0),y=e.tag,m=e.result,De(e,!0,t),v=e.input.charCodeAt(e.position),(d||e.line===n)&&v===58&&(l=!0,v=e.input.charCodeAt(++e.position),De(e,!0,t),Uo(e,t,Lc,!1,!0),b=e.result),f?Fo(e,a,h,y,m,b,n,o,i):l?a.push(Fo(e,null,h,y,m,b,n,o,i)):a.push(m),De(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(r=!0,v=e.input.charCodeAt(++e.position)):r=!1}j(e,"unexpected end of the stream within a flow collection")}function v3(e,t){var r,n,o=dm,i=!1,s=!1,a=t,c=0,u=!1,p,l;if(l=e.input.charCodeAt(e.position),l===124)n=!1;else if(l===62)n=!0;else return!1;for(e.kind="scalar",e.result="";l!==0;)if(l=e.input.charCodeAt(++e.position),l===43||l===45)dm===o?o=l===43?uw:s3:j(e,"repeat of a chomping mode identifier");else if((p=d3(l))>=0)p===0?j(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?j(e,"repeat of an indentation width identifier"):(a=t+p-1,s=!0);else break;if(Jn(l)){do l=e.input.charCodeAt(++e.position);while(Jn(l));if(l===35)do l=e.input.charCodeAt(++e.position);while(!gr(l)&&l!==0)}for(;l!==0;){for(bm(e),e.lineIndent=0,l=e.input.charCodeAt(e.position);(!s||e.lineIndent<a)&&l===32;)e.lineIndent++,l=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>a&&(a=e.lineIndent),gr(l)){c++;continue}if(e.lineIndent<a){o===uw?e.result+=Le.repeat(`
50
- `,i?1+c:c):o===dm&&i&&(e.result+=`
51
- `);break}for(n?Jn(l)?(u=!0,e.result+=Le.repeat(`
52
- `,i?1+c:c)):u?(u=!1,e.result+=Le.repeat(`
53
- `,c+1)):c===0?i&&(e.result+=" "):e.result+=Le.repeat(`
54
- `,c):e.result+=Le.repeat(`
55
- `,i?1+c:c),i=!0,s=!0,c=0,r=e.position;!gr(l)&&l!==0;)l=e.input.charCodeAt(++e.position);cn(e,r,e.position,!1)}return!0}function hw(e,t){var r,n=e.tag,o=e.anchor,i=[],s,a=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=i),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),!(c!==45||(s=e.input.charCodeAt(e.position+1),!wt(s))));){if(a=!0,e.position++,De(e,!0,-1)&&e.lineIndent<=t){i.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,Uo(e,t,Vw,!1,!0),i.push(e.result),De(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)j(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=n,e.anchor=o,e.kind="sequence",e.result=i,!0):!1}function b3(e,t,r){var n,o,i,s,a,c,u=e.tag,p=e.anchor,l={},d=Object.create(null),f=null,h=null,m=null,y=!1,b=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),v=e.input.charCodeAt(e.position);v!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),i=e.line,(v===63||v===58)&&wt(n))v===63?(y&&(Fo(e,l,d,f,h,null,s,a,c),f=h=m=null),b=!0,y=!0,o=!0):y?(y=!1,o=!0):j(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,v=n;else{if(s=e.line,a=e.lineStart,c=e.position,!Uo(e,r,Bw,!1,!0))break;if(e.line===i){for(v=e.input.charCodeAt(e.position);Jn(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),wt(v)||j(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Fo(e,l,d,f,h,null,s,a,c),f=h=m=null),b=!0,y=!1,o=!1,f=e.tag,h=e.result;else if(b)j(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=p,!0}else if(b)j(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=p,!0}if((e.line===i||e.lineIndent>t)&&(y&&(s=e.line,a=e.lineStart,c=e.position),Uo(e,t,Zc,!0,o)&&(y?h=e.result:m=e.result),y||(Fo(e,l,d,f,h,m,s,a,c),f=h=m=null),De(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&v!==0)j(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Fo(e,l,d,f,h,null,s,a,c),b&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=l),b}function x3(e){var t,r=!1,n=!1,o,i,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&j(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(n=!0,o="!!",s=e.input.charCodeAt(++e.position)):o="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(i=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):j(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!wt(s);)s===33&&(n?j(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),Hw.test(o)||j(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),u3.test(i)&&j(e,"tag suffix cannot contain flow indicator characters")}i&&!Gw.test(i)&&j(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{j(e,"tag name is malformed: "+i)}return r?e.tag=i:un.call(e.tagMap,o)?e.tag=e.tagMap[o]+i:o==="!"?e.tag="!"+i:o==="!!"?e.tag="tag:yaml.org,2002:"+i:j(e,'undeclared tag handle "'+o+'"'),!0}function w3(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&j(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!wt(r)&&!qo(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function k3(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!wt(n)&&!qo(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),un.call(e.anchorMap,r)||j(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],De(e,!0,-1),!0}function Uo(e,t,r,n,o){var i,s,a,c=1,u=!1,p=!1,l,d,f,h,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=s=a=Zc===r||Vw===r,n&&De(e,!0,-1)&&(u=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;x3(e)||w3(e);)De(e,!0,-1)?(u=!0,a=i,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):a=!1;if(a&&(a=u||o),(c===1||Zc===r)&&(Lc===r||Bw===r?m=t:m=t+1,y=e.position-e.lineStart,c===1?a&&(hw(e,y)||b3(e,y,m))||_3(e,m)?p=!0:(s&&v3(e,m)||g3(e,m)||y3(e,m)?p=!0:k3(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&j(e,"alias node should not have any properties")):m3(e,m,Lc===r)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(p=a&&hw(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&j(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,d=e.implicitTypes.length;l<d;l+=1)if(h=e.implicitTypes[l],h.resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(un.call(e.typeMap[e.kind||"fallback"],e.tag))h=e.typeMap[e.kind||"fallback"][e.tag];else for(h=null,f=e.typeMap.multi[e.kind||"fallback"],l=0,d=f.length;l<d;l+=1)if(e.tag.slice(0,f[l].tag.length)===f[l].tag){h=f[l];break}h||j(e,"unknown tag !<"+e.tag+">"),e.result!==null&&h.kind!==e.kind&&j(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+h.kind+'", not "'+e.kind+'"'),h.resolve(e.result,e.tag)?(e.result=h.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):j(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}function S3(e){var t=e.position,r,n,o,i=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(De(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(i=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!wt(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),o=[],n.length<1&&j(e,"directive name must not be less than one character in length");s!==0;){for(;Jn(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!gr(s));break}if(gr(s))break;for(r=e.position;s!==0&&!wt(s);)s=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}s!==0&&bm(e),un.call(dw,n)?dw[n](e,n,o):qc(e,'unknown document directive "'+n+'"')}if(De(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,De(e,!0,-1)):i&&j(e,"directives end mark is expected"),Uo(e,e.lineIndent-1,Zc,!1,!0),De(e,!0,-1),e.checkLineBreaks&&c3.test(e.input.slice(t,e.position))&&qc(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Bc(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,De(e,!0,-1));return}if(e.position<e.length-1)j(e,"end of the stream or a document separator is expected");else return}function Qw(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
56
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new h3(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,j(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)S3(r);return r.documents}function $3(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=Qw(e,r);if(typeof t!="function")return n;for(var o=0,i=n.length;o<i;o+=1)t(n[o])}function T3(e,t){var r=Qw(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new lt("expected a single document in the stream, but found more")}}function G3(e,t){var r,n,o,i,s,a,c;if(t===null)return{};for(r={},n=Object.keys(t),o=0,i=n.length;o<i;o+=1)s=n[o],a=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),c=e.compiledTypeMap.fallback[s],c&&tk.call(c.styleAliases,a)&&(a=c.styleAliases[a]),r[s]=a;return r}function W3(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new lt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Le.repeat("0",n-t.length)+t}function J3(e){this.schema=e.schema||vm,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Le.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=G3(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?_s:K3,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function mw(e,t){for(var r=Le.repeat(" ",t),n=0,o=-1,i="",s,a=e.length;n<a;)o=e.indexOf(`
39
+ deps: ${r}}`};var N4={keyword:"dependencies",type:"object",schemaType:"object",error:gr.error,code(e){let[t,r]=D4(e);nx(e,t),ox(e,r)}};function D4({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let o=Array.isArray(e[n])?t:r;o[n]=e[n]}return[t,r]}function nx(e,t=e.schema){let{gen:r,data:n,it:o}=e;if(Object.keys(t).length===0)return;let i=r.let("missing");for(let s in t){let a=t[s];if(a.length===0)continue;let c=(0,ms.propertyInData)(r,n,s,o.opts.ownProperties);e.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),o.allErrors?r.if(c,()=>{for(let u of a)(0,ms.checkReportMissingProp)(e,u)}):(r.if((0,Nh._)`${c} && (${(0,ms.checkMissingProp)(e,a,i)})`),(0,ms.reportMissingProp)(e,i),r.else())}}gr.validatePropertyDeps=nx;function ox(e,t=e.schema){let{gen:r,data:n,keyword:o,it:i}=e,s=r.name("valid");for(let a in t)(0,O4.alwaysValidSchema)(i,t[a])||(r.if((0,ms.propertyInData)(r,n,a,i.opts.ownProperties),()=>{let c=e.subschema({keyword:o,schemaProp:a},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}gr.validateSchemaDeps=ox;gr.default=N4});var ax=S(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var sx=K(),j4=le(),M4={message:"property name must be valid",params:({params:e})=>(0,sx._)`{propertyName: ${e.propertyName}}`},L4={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:M4,code(e){let{gen:t,schema:r,data:n,it:o}=e;if((0,j4.alwaysValidSchema)(o,r))return;let i=t.name("valid");t.forIn("key",n,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),t.if((0,sx.not)(i),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(i)}};Dh.default=L4});var Mh=S(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});var Cc=Zt(),tr=K(),Z4=Ir(),Ec=le(),q4={message:"must NOT have additional properties",params:({params:e})=>(0,tr._)`{additionalProperty: ${e.additionalProperty}}`},F4={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:q4,code(e){let{gen:t,schema:r,parentSchema:n,data:o,errsCount:i,it:s}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,Ec.alwaysValidSchema)(s,r))return;let u=(0,Cc.allSchemaProperties)(n.properties),p=(0,Cc.allSchemaProperties)(n.patternProperties);l(),e.ok((0,tr._)`${i} === ${Z4.default.errors}`);function l(){t.forIn("key",o,y=>{!u.length&&!p.length?h(y):t.if(d(y),()=>h(y))})}function d(y){let b;if(u.length>8){let v=(0,Ec.schemaRefOrVal)(s,n.properties,"properties");b=(0,Cc.isOwnProperty)(t,v,y)}else u.length?b=(0,tr.or)(...u.map(v=>(0,tr._)`${y} === ${v}`)):b=tr.nil;return p.length&&(b=(0,tr.or)(b,...p.map(v=>(0,tr._)`${(0,Cc.usePattern)(e,v)}.test(${y})`))),(0,tr.not)(b)}function f(y){t.code((0,tr._)`delete ${o}[${y}]`)}function h(y){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){f(y);return}if(r===!1){e.setParams({additionalProperty:y}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Ec.alwaysValidSchema)(s,r)){let b=t.name("valid");c.removeAdditional==="failing"?(g(y,b,!1),t.if((0,tr.not)(b),()=>{e.reset(),f(y)})):(g(y,b),a||t.if((0,tr.not)(b),()=>t.break()))}}function g(y,b,v){let k={keyword:"additionalProperties",dataProp:y,dataPropType:Ec.Type.Str};v===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(k,b)}}};jh.default=F4});var lx=S(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:!0});var U4=ts(),cx=Zt(),Lh=le(),ux=Mh(),B4={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:i}=e;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&ux.default.code(new U4.KeywordCxt(i,ux.default,"additionalProperties"));let s=(0,cx.allSchemaProperties)(r);for(let l of s)i.definedProperties.add(l);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Lh.mergeEvaluated.props(t,(0,Lh.toHash)(s),i.props));let a=s.filter(l=>!(0,Lh.alwaysValidSchema)(i,r[l]));if(a.length===0)return;let c=t.name("valid");for(let l of a)u(l)?p(l):(t.if((0,cx.propertyInData)(t,o,l,i.opts.ownProperties)),p(l),i.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(l),e.ok(c);function u(l){return i.opts.useDefaults&&!i.compositeRule&&r[l].default!==void 0}function p(l){e.subschema({keyword:"properties",schemaProp:l,dataProp:l},c)}}};Zh.default=B4});var hx=S(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});var px=Zt(),Ic=K(),dx=le(),fx=le(),V4={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:o,it:i}=e,{opts:s}=i,a=(0,px.allSchemaProperties)(r),c=a.filter(g=>(0,dx.alwaysValidSchema)(i,r[g]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&o.properties,p=t.name("valid");i.props!==!0&&!(i.props instanceof Ic.Name)&&(i.props=(0,fx.evaluatedPropsToName)(t,i.props));let{props:l}=i;d();function d(){for(let g of a)u&&f(g),i.allErrors?h(g):(t.var(p,!0),h(g),t.if(p))}function f(g){for(let y in u)new RegExp(g).test(y)&&(0,dx.checkStrictMode)(i,`property ${y} matches pattern ${g} (use allowMatchingProperties)`)}function h(g){t.forIn("key",n,y=>{t.if((0,Ic._)`${(0,px.usePattern)(e,g)}.test(${y})`,()=>{let b=c.includes(g);b||e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:y,dataPropType:fx.Type.Str},p),i.opts.unevaluated&&l!==!0?t.assign((0,Ic._)`${l}[${y}]`,!0):!b&&!i.allErrors&&t.if((0,Ic.not)(p),()=>t.break())})})}}};qh.default=V4});var mx=S(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});var H4=le(),G4={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,H4.alwaysValidSchema)(n,r)){e.fail();return}let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Fh.default=G4});var gx=S(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});var W4=Zt(),K4={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:W4.validateUnion,error:{message:"must match a schema in anyOf"}};Uh.default=K4});var yx=S(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});var zc=K(),J4=le(),Y4={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,zc._)`{passingSchemas: ${e.passing}}`},Q4={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Y4,code(e){let{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let i=r,s=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(u),e.result(s,()=>e.reset(),()=>e.error(!0));function u(){i.forEach((p,l)=>{let d;(0,J4.alwaysValidSchema)(o,p)?t.var(c,!0):d=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},c),l>0&&t.if((0,zc._)`${c} && ${s}`).assign(s,!1).assign(a,(0,zc._)`[${a}, ${l}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,l),d&&e.mergeEvaluated(d,zc.Name)})})}}};Bh.default=Q4});var _x=S(Vh=>{"use strict";Object.defineProperty(Vh,"__esModule",{value:!0});var X4=le(),eD={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=t.name("valid");r.forEach((i,s)=>{if((0,X4.alwaysValidSchema)(n,i))return;let a=e.subschema({keyword:"allOf",schemaProp:s},o);e.ok(o),e.mergeEvaluated(a)})}};Vh.default=eD});var xx=S(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:!0});var Rc=K(),bx=le(),tD={message:({params:e})=>(0,Rc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Rc._)`{failingKeyword: ${e.ifClause}}`},rD={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:tD,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,bx.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=vx(n,"then"),i=vx(n,"else");if(!o&&!i)return;let s=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),o&&i){let p=t.let("ifClause");e.setParams({ifClause:p}),t.if(a,u("then",p),u("else",p))}else o?t.if(a,u("then")):t.if((0,Rc.not)(a),u("else"));e.pass(s,()=>e.error(!0));function c(){let p=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(p)}function u(p,l){return()=>{let d=e.subschema({keyword:p},a);t.assign(s,a),e.mergeValidEvaluated(d,s),l?t.assign(l,(0,Rc._)`${p}`):e.setParams({ifClause:p})}}}};function vx(e,t){let r=e.schema[t];return r!==void 0&&!(0,bx.alwaysValidSchema)(e,r)}Hh.default=rD});var wx=S(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});var nD=le(),oD={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,nD.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Gh.default=oD});var kx=S(Wh=>{"use strict";Object.defineProperty(Wh,"__esModule",{value:!0});var iD=Ih(),sD=Xb(),aD=zh(),cD=tx(),uD=rx(),lD=ix(),pD=ax(),dD=Mh(),fD=lx(),hD=hx(),mD=mx(),gD=gx(),yD=yx(),_D=_x(),vD=xx(),bD=wx();function xD(e=!1){let t=[mD.default,gD.default,yD.default,_D.default,vD.default,bD.default,pD.default,dD.default,lD.default,fD.default,hD.default];return e?t.push(sD.default,cD.default):t.push(iD.default,aD.default),t.push(uD.default),t}Wh.default=xD});var Sx=S(Kh=>{"use strict";Object.defineProperty(Kh,"__esModule",{value:!0});var Oe=K(),wD={message:({schemaCode:e})=>(0,Oe.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Oe._)`{format: ${e}}`},kD={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:wD,code(e,t){let{gen:r,data:n,$data:o,schema:i,schemaCode:s,it:a}=e,{opts:c,errSchemaPath:u,schemaEnv:p,self:l}=a;if(!c.validateFormats)return;o?d():f();function d(){let h=r.scopeValue("formats",{ref:l.formats,code:c.code.formats}),g=r.const("fDef",(0,Oe._)`${h}[${s}]`),y=r.let("fType"),b=r.let("format");r.if((0,Oe._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>r.assign(y,(0,Oe._)`${g}.type || "string"`).assign(b,(0,Oe._)`${g}.validate`),()=>r.assign(y,(0,Oe._)`"string"`).assign(b,g)),e.fail$data((0,Oe.or)(v(),k()));function v(){return c.strictSchema===!1?Oe.nil:(0,Oe._)`${s} && !${b}`}function k(){let C=p.$async?(0,Oe._)`(${g}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,Oe._)`${b}(${n})`,T=(0,Oe._)`(typeof ${b} == "function" ? ${C} : ${b}.test(${n}))`;return(0,Oe._)`${b} && ${b} !== true && ${y} === ${t} && !${T}`}}function f(){let h=l.formats[i];if(!h){v();return}if(h===!0)return;let[g,y,b]=k(h);g===t&&e.pass(C());function v(){if(c.strictSchema===!1){l.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function k(T){let F=T instanceof RegExp?(0,Oe.regexpCode)(T):c.code.formats?(0,Oe._)`${c.code.formats}${(0,Oe.getProperty)(i)}`:void 0,Y=r.scopeValue("formats",{key:i,ref:T,code:F});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,Oe._)`${Y}.validate`]:["string",T,Y]}function C(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!p.$async)throw new Error("async format in sync schema");return(0,Oe._)`await ${b}(${n})`}return typeof y=="function"?(0,Oe._)`${b}(${n})`:(0,Oe._)`${b}.test(${n})`}}}};Kh.default=kD});var $x=S(Jh=>{"use strict";Object.defineProperty(Jh,"__esModule",{value:!0});var SD=Sx(),$D=[SD.default];Jh.default=$D});var Tx=S(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.contentVocabulary=Mo.metadataVocabulary=void 0;Mo.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Mo.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Cx=S(Yh=>{"use strict";Object.defineProperty(Yh,"__esModule",{value:!0});var TD=Nb(),PD=Kb(),CD=kx(),ED=$x(),Px=Tx(),ID=[TD.default,PD.default,(0,CD.default)(),ED.default,Px.metadataVocabulary,Px.contentVocabulary];Yh.default=ID});var Ix=S(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});Ac.DiscrError=void 0;var Ex;(function(e){e.Tag="tag",e.Mapping="mapping"})(Ex||(Ac.DiscrError=Ex={}))});var Rx=S(Xh=>{"use strict";Object.defineProperty(Xh,"__esModule",{value:!0});var Lo=K(),Qh=Ix(),zx=hc(),zD=rs(),RD=le(),AD={message:({params:{discrError:e,tagName:t}})=>e===Qh.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Lo._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},OD={keyword:"discriminator",type:"object",schemaType:"object",error:AD,code(e){let{gen:t,data:r,schema:n,parentSchema:o,it:i}=e,{oneOf:s}=o;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,Lo._)`${r}${(0,Lo.getProperty)(a)}`);t.if((0,Lo._)`typeof ${u} == "string"`,()=>p(),()=>e.error(!1,{discrError:Qh.DiscrError.Tag,tag:u,tagName:a})),e.ok(c);function p(){let f=d();t.if(!1);for(let h in f)t.elseIf((0,Lo._)`${u} === ${h}`),t.assign(c,l(f[h]));t.else(),e.error(!1,{discrError:Qh.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}function l(f){let h=t.name("valid"),g=e.subschema({keyword:"oneOf",schemaProp:f},h);return e.mergeEvaluated(g,Lo.Name),h}function d(){var f;let h={},g=b(o),y=!0;for(let C=0;C<s.length;C++){let T=s[C];if(T?.$ref&&!(0,RD.schemaHasRulesButRef)(T,i.self.RULES)){let Y=T.$ref;if(T=zx.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,Y),T instanceof zx.SchemaEnv&&(T=T.schema),T===void 0)throw new zD.default(i.opts.uriResolver,i.baseId,Y)}let F=(f=T?.properties)===null||f===void 0?void 0:f[a];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(g||b(T)),v(F,C)}if(!y)throw new Error(`discriminator: "${a}" must be required`);return h;function b({required:C}){return Array.isArray(C)&&C.includes(a)}function v(C,T){if(C.const)k(C.const,T);else if(C.enum)for(let F of C.enum)k(F,T);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(C,T){if(typeof C!="string"||C in h)throw new Error(`discriminator: "${a}" values must be unique strings`);h[C]=T}}}};Xh.default=OD});var Ax=S(($B,ND)=>{ND.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var tm=S((Se,em)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.MissingRefError=Se.ValidationError=Se.CodeGen=Se.Name=Se.nil=Se.stringify=Se.str=Se._=Se.KeywordCxt=Se.Ajv=void 0;var DD=Eb(),jD=Cx(),MD=Rx(),Ox=Ax(),LD=["/properties"],Oc="http://json-schema.org/draft-07/schema",Zo=class extends DD.default{_addVocabularies(){super._addVocabularies(),jD.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(MD.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Ox,LD):Ox;this.addMetaSchema(t,Oc,!1),this.refs["http://json-schema.org/schema"]=Oc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Oc)?Oc:void 0)}};Se.Ajv=Zo;em.exports=Se=Zo;em.exports.Ajv=Zo;Object.defineProperty(Se,"__esModule",{value:!0});Se.default=Zo;var ZD=ts();Object.defineProperty(Se,"KeywordCxt",{enumerable:!0,get:function(){return ZD.KeywordCxt}});var qo=K();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return qo._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return qo.str}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return qo.stringify}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return qo.nil}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return qo.Name}});Object.defineProperty(Se,"CodeGen",{enumerable:!0,get:function(){return qo.CodeGen}});var qD=dc();Object.defineProperty(Se,"ValidationError",{enumerable:!0,get:function(){return qD.default}});var FD=rs();Object.defineProperty(Se,"MissingRefError",{enumerable:!0,get:function(){return FD.default}})});var Fx=S(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.formatNames=_r.fastFormats=_r.fullFormats=void 0;function yr(e,t){return{validate:e,compare:t}}_r.fullFormats={date:yr(Mx,im),time:yr(nm(!0),sm),"date-time":yr(Nx(!0),Zx),"iso-time":yr(nm(),Lx),"iso-date-time":yr(Nx(),qx),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:WD,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:tj,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:KD,int32:{type:"number",validate:QD},int64:{type:"number",validate:XD},float:{type:"number",validate:jx},double:{type:"number",validate:jx},password:!0,binary:!0};_r.fastFormats={..._r.fullFormats,date:yr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,im),time:yr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,sm),"date-time":yr(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Zx),"iso-time":yr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Lx),"iso-date-time":yr(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,qx),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};_r.formatNames=Object.keys(_r.fullFormats);function UD(e){return e%4===0&&(e%100!==0||e%400===0)}var BD=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,VD=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Mx(e){let t=BD.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&UD(r)?29:VD[n])}function im(e,t){if(e&&t)return e>t?1:e<t?-1:0}var rm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function nm(e){return function(r){let n=rm.exec(r);if(!n)return!1;let o=+n[1],i=+n[2],s=+n[3],a=n[4],c=n[5]==="-"?-1:1,u=+(n[6]||0),p=+(n[7]||0);if(u>23||p>59||e&&!a)return!1;if(o<=23&&i<=59&&s<60)return!0;let l=i-p*c,d=o-u*c-(l<0?1:0);return(d===23||d===-1)&&(l===59||l===-1)&&s<61}}function sm(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n}function Lx(e,t){if(!(e&&t))return;let r=rm.exec(e),n=rm.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e<t?-1:0}var om=/t|\s/i;function Nx(e){let t=nm(e);return function(n){let o=n.split(om);return o.length===2&&Mx(o[0])&&t(o[1])}}function Zx(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(r&&n)return r-n}function qx(e,t){if(!(e&&t))return;let[r,n]=e.split(om),[o,i]=t.split(om),s=im(r,o);if(s!==void 0)return s||sm(n,i)}var HD=/\/|:/,GD=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function WD(e){return HD.test(e)&&GD.test(e)}var Dx=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function KD(e){return Dx.lastIndex=0,Dx.test(e)}var JD=-(2**31),YD=2**31-1;function QD(e){return Number.isInteger(e)&&e<=YD&&e>=JD}function XD(e){return Number.isInteger(e)}function jx(){return!0}var ej=/[^\\]\\Z/;function tj(e){if(ej.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Ux=S(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.formatLimitDefinition=void 0;var rj=tm(),rr=K(),ln=rr.operators,Nc={formatMaximum:{okStr:"<=",ok:ln.LTE,fail:ln.GT},formatMinimum:{okStr:">=",ok:ln.GTE,fail:ln.LT},formatExclusiveMaximum:{okStr:"<",ok:ln.LT,fail:ln.GTE},formatExclusiveMinimum:{okStr:">",ok:ln.GT,fail:ln.LTE}},nj={message:({keyword:e,schemaCode:t})=>(0,rr.str)`should be ${Nc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,rr._)`{comparison: ${Nc[e].okStr}, limit: ${t}}`};Fo.formatLimitDefinition={keyword:Object.keys(Nc),type:"string",schemaType:"string",$data:!0,error:nj,code(e){let{gen:t,data:r,schemaCode:n,keyword:o,it:i}=e,{opts:s,self:a}=i;if(!s.validateFormats)return;let c=new rj.KeywordCxt(i,a.RULES.all.format.definition,"format");c.$data?u():p();function u(){let d=t.scopeValue("formats",{ref:a.formats,code:s.code.formats}),f=t.const("fmt",(0,rr._)`${d}[${c.schemaCode}]`);e.fail$data((0,rr.or)((0,rr._)`typeof ${f} != "object"`,(0,rr._)`${f} instanceof RegExp`,(0,rr._)`typeof ${f}.compare != "function"`,l(f)))}function p(){let d=c.schema,f=a.formats[d];if(!f||f===!0)return;if(typeof f!="object"||f instanceof RegExp||typeof f.compare!="function")throw new Error(`"${o}": format "${d}" does not define "compare" function`);let h=t.scopeValue("formats",{key:d,ref:f,code:s.code.formats?(0,rr._)`${s.code.formats}${(0,rr.getProperty)(d)}`:void 0});e.fail$data(l(h))}function l(d){return(0,rr._)`${d}.compare(${r}, ${n}) ${Nc[o].fail} 0`}},dependencies:["format"]};var oj=e=>(e.addKeyword(Fo.formatLimitDefinition),e);Fo.default=oj});var Gx=S((gs,Hx)=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});var Uo=Fx(),ij=Ux(),am=K(),Bx=new am.Name("fullFormats"),sj=new am.Name("fastFormats"),cm=(e,t={keywords:!0})=>{if(Array.isArray(t))return Vx(e,t,Uo.fullFormats,Bx),e;let[r,n]=t.mode==="fast"?[Uo.fastFormats,sj]:[Uo.fullFormats,Bx],o=t.formats||Uo.formatNames;return Vx(e,o,r,n),t.keywords&&(0,ij.default)(e),e};cm.get=(e,t="full")=>{let n=(t==="fast"?Uo.fastFormats:Uo.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function Vx(e,t,r,n){var o,i;(o=(i=e.opts.code).formats)!==null&&o!==void 0||(i.formats=(0,am._)`require("ajv-formats/dist/formats").${n}`);for(let s of t)e.addFormat(s,r[s])}Hx.exports=gs=cm;Object.defineProperty(gs,"__esModule",{value:!0});gs.default=cm});function aj(){let e=new Wx.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,Kx.default)(e),e}var Wx,Kx,Dc,Jx=_(()=>{Wx=st(tm(),1),Kx=st(Gx(),1);Dc=class{constructor(t){this._ajv=t??aj()}getValidator(t){let r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}}});var jc,Yx=_(()=>{jc=class{constructor(t){this._server=t}requestStream(t,r,n){return this._server.requestStream(t,r,n)}async getTask(t,r){return this._server.getTask({taskId:t},r)}async getTaskResult(t,r,n){return this._server.getTaskResult({taskId:t},r,n)}async listTasks(t,r){return this._server.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._server.cancelTask({taskId:t},r)}}});function Qx(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break;default:break}}function Xx(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}var ew=_(()=>{});var Mc,tw=_(()=>{c0();Zi();Jx();Ci();Yx();ew();Mc=class extends Xa{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Li.options.map((n,o)=>[n,o])),this.isMessageIgnored=(n,o)=>{let i=this._loggingLevels.get(o);return i?this.LOG_LEVEL_SEVERITY.get(n)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=r?.capabilities??{},this._instructions=r?.instructions,this._jsonSchemaValidator=r?.jsonSchemaValidator??new Dc,this.setRequestHandler(xd,n=>this._oninitialize(n)),this.setNotificationHandler(wd,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Ed,async(n,o)=>{let i=o.sessionId||o.requestInfo?.headers["mcp-session-id"]||void 0,{level:s}=n.params,a=Li.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new jc(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=a0(this._capabilities,t)}setRequestHandler(t,r){let o=Qr(t)?.method;if(!o)throw new Error("Schema is missing a method literal");let i;if(Nt(o)){let a=o;i=a._zod?.def?.value??a.value}else{let a=o;i=a._def?.value??a.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let a=async(c,u)=>{let p=Yr(Po,c);if(!p.success){let h=p.error instanceof Error?p.error.message:String(p.error);throw new O(L.InvalidParams,`Invalid tools/call request: ${h}`)}let{params:l}=p.data,d=await Promise.resolve(r(c,u));if(l.task){let h=Yr($o,d);if(!h.success){let g=h.error instanceof Error?h.error.message:String(h.error);throw new O(L.InvalidParams,`Invalid task creation result: ${g}`)}return h.data}let f=Yr(Za,d);if(!f.success){let h=f.error instanceof Error?f.error.message:String(f.error);throw new O(L.InvalidParams,`Invalid tools/call result: ${h}`)}return f.data};return super.setRequestHandler(t,a)}return super.setRequestHandler(t,r)}assertCapabilityForMethod(t){switch(t){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new Error(`Client does not support sampling (required for ${t})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new Error(`Client does not support elicitation (required for ${t})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new Error(`Client does not support listing roots (required for ${t})`);break;case"ping":break}}assertNotificationCapability(t){switch(t){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${t})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${t})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${t})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new Error(`Client does not support URL elicitation (required for ${t})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${t})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${t})`);break;case"ping":case"initialize":break}}assertTaskCapability(t){Xx(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&Qx(this._capabilities.tasks?.requests,t,"Server")}async _oninitialize(t){let r=t.params.protocolVersion;return this._clientCapabilities=t.params.capabilities,this._clientVersion=t.params.clientInfo,{protocolVersion:av.includes(r)?r:gd,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},Sa)}async createMessage(t,r){if((t.tools||t.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){let n=t.messages[t.messages.length-1],o=Array.isArray(n.content)?n.content:[n.content],i=o.some(u=>u.type==="tool_result"),s=t.messages.length>1?t.messages[t.messages.length-2]:void 0,a=s?Array.isArray(s.content)?s.content:[s.content]:[],c=a.some(u=>u.type==="tool_use");if(i){if(o.some(u=>u.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!c)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(c){let u=new Set(a.filter(l=>l.type==="tool_use").map(l=>l.id)),p=new Set(o.filter(l=>l.type==="tool_result").map(l=>l.toolUseId));if(u.size!==p.size||![...u].every(l=>p.has(l)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return t.tools?this.request({method:"sampling/createMessage",params:t},zd,r):this.request({method:"sampling/createMessage",params:t},Id,r)}async elicitInput(t,r){switch(t.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");let o=t;return this.request({method:"elicitation/create",params:o},qa,r)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");let o=t.mode==="form"?t:{...t,mode:"form"},i=await this.request({method:"elicitation/create",params:o},qa,r);if(i.action==="accept"&&i.content&&o.requestedSchema)try{let a=this._jsonSchemaValidator.getValidator(o.requestedSchema)(i.content);if(!a.valid)throw new O(L.InvalidParams,`Elicitation response content does not match requested schema: ${a.errorMessage}`)}catch(s){throw s instanceof O?s:new O(L.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return i}}}createElicitationCompletionNotifier(t,r){if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:t}},r)}async listRoots(t,r){return this.request({method:"roots/list",params:t},Rd,r)}async sendLoggingMessage(t,r){if(this._capabilities.logging&&!this.isMessageIgnored(t.level,r))return this.notification({method:"notifications/message",params:t})}async sendResourceUpdated(t){return this.notification({method:"notifications/resources/updated",params:t})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}});function um(e){return!!e&&typeof e=="object"&&nw in e}function ow(e){return e[nw]?.complete}var nw,rw,iw=_(()=>{nw=Symbol.for("mcp.completable");(function(e){e.Completable="McpCompletable"})(rw||(rw={}))});var Lc,sw=_(()=>{Lc=class e{static isTemplate(t){return/\{[^}\s]+\}/.test(t)}static validateLength(t,r,n){if(t.length>r)throw new Error(`${n} exceeds maximum length of ${r} characters (got ${t.length})`)}get variableNames(){return this.parts.flatMap(t=>typeof t=="string"?[]:t.names)}constructor(t){e.validateLength(t,1e6,"Template"),this.template=t,this.parts=this.parse(t)}toString(){return this.template}parse(t){let r=[],n="",o=0,i=0;for(;o<t.length;)if(t[o]==="{"){n&&(r.push(n),n="");let s=t.indexOf("}",o);if(s===-1)throw new Error("Unclosed template expression");if(i++,i>1e4)throw new Error("Template contains too many expressions (max 10000)");let a=t.slice(o+1,s),c=this.getOperator(a),u=a.includes("*"),p=this.getNames(a),l=p[0];for(let d of p)e.validateLength(d,1e6,"Variable name");r.push({name:l,operator:c,names:p,exploded:u}),o=s+1}else n+=t[o],o++;return n&&r.push(n),r}getOperator(t){return["+","#",".","/","?","&"].find(n=>t.startsWith(n))||""}getNames(t){let r=this.getOperator(t);return t.slice(r.length).split(",").map(n=>n.replace("*","").trim()).filter(n=>n.length>0)}encodeValue(t,r){return e.validateLength(t,1e6,"Variable value"),r==="+"||r==="#"?encodeURI(t):encodeURIComponent(t)}expandPart(t,r){if(t.operator==="?"||t.operator==="&"){let s=t.names.map(c=>{let u=r[c];if(u===void 0)return"";let p=Array.isArray(u)?u.map(l=>this.encodeValue(l,t.operator)).join(","):this.encodeValue(u.toString(),t.operator);return`${c}=${p}`}).filter(c=>c.length>0);return s.length===0?"":(t.operator==="?"?"?":"&")+s.join("&")}if(t.names.length>1){let s=t.names.map(a=>r[a]).filter(a=>a!==void 0);return s.length===0?"":s.map(a=>Array.isArray(a)?a[0]:a).join(",")}let n=r[t.name];if(n===void 0)return"";let i=(Array.isArray(n)?n:[n]).map(s=>this.encodeValue(s,t.operator));switch(t.operator){case"":return i.join(",");case"+":return i.join(",");case"#":return"#"+i.join(",");case".":return"."+i.join(".");case"/":return"/"+i.join("/");default:return i.join(",")}}expand(t){let r="",n=!1;for(let o of this.parts){if(typeof o=="string"){r+=o;continue}let i=this.expandPart(o,t);i&&((o.operator==="?"||o.operator==="&")&&n?r+=i.replace("?","&"):r+=i,(o.operator==="?"||o.operator==="&")&&(n=!0))}return r}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}partToRegExp(t){let r=[];for(let i of t.names)e.validateLength(i,1e6,"Variable name");if(t.operator==="?"||t.operator==="&"){for(let i=0;i<t.names.length;i++){let s=t.names[i],a=i===0?"\\"+t.operator:"&";r.push({pattern:a+this.escapeRegExp(s)+"=([^&]+)",name:s})}return r}let n,o=t.name;switch(t.operator){case"":n=t.exploded?"([^/,]+(?:,[^/,]+)*)":"([^/,]+)";break;case"+":case"#":n="(.+)";break;case".":n="\\.([^/,]+)";break;case"/":n="/"+(t.exploded?"([^/,]+(?:,[^/,]+)*)":"([^/,]+)");break;default:n="([^/]+)"}return r.push({pattern:n,name:o}),r}match(t){e.validateLength(t,1e6,"URI");let r="^",n=[];for(let a of this.parts)if(typeof a=="string")r+=this.escapeRegExp(a);else{let c=this.partToRegExp(a);for(let{pattern:u,name:p}of c)r+=u,n.push({name:p,exploded:a.exploded})}r+="$",e.validateLength(r,1e6,"Generated regex pattern");let o=new RegExp(r),i=t.match(o);if(!i)return null;let s={};for(let a=0;a<n.length;a++){let{name:c,exploded:u}=n[a],p=i[a+1],l=c.replace("*","");u&&p.includes(",")?s[l]=p.split(","):s[l]=p}return s}}});function uj(e){let t=[];if(e.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!cj.test(e)){let r=e.split("").filter(n=>!/[A-Za-z0-9._-]/.test(n)).filter((n,o,i)=>i.indexOf(n)===o);return t.push(`Tool name contains invalid characters: ${r.map(n=>`"${n}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function lj(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let r of t)console.warn(` - ${r}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function lm(e){let t=uj(e);return lj(e,t.warnings),t.isValid}var cj,aw=_(()=>{cj=/^[A-Za-z0-9._-]{1,128}$/});var Zc,cw=_(()=>{Zc=class{constructor(t){this._mcpServer=t}registerToolTask(t,r,n){let o={taskSupport:"required",...r.execution};if(o.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,r.title,r.description,r.inputSchema,r.outputSchema,r.annotations,o,r._meta,n)}}});var pe=_(()=>{Ws();Ws()});function pw(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function dj(e){return"_def"in e||"_zod"in e||pw(e)}function pm(e){return typeof e!="object"||e===null||dj(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(pw)}function uw(e){if(e)return pm(e)?qn(e):e}function fj(e){let t=Qr(e);return t?Object.entries(t).map(([r,n])=>{let o=A_(n),i=O_(n);return{name:r,description:o,required:!i}}):[]}function pn(e){let r=Qr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=_a(r);if(typeof n=="string")return n;throw new Error("Schema method literal must be a string")}function lw(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var qc,_s,pj,ys,dw=_(()=>{tw();Ci();gf();Zi();iw();sw();aw();cw();pe();qc=class{constructor(t,r){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new Mc(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new Zc(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(pn(La)),this.server.assertCanSetRequestHandler(pn(Po)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(La,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,r])=>{let n={name:t,title:r.title,description:r.description,inputSchema:(()=>{let o=ko(r.inputSchema);return o?ff(o,{strictUnions:!0,pipeStrategy:"input"}):pj})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){let o=ko(r.outputSchema);o&&(n.outputSchema=ff(o,{strictUnions:!0,pipeStrategy:"output"}))}return n})})),this.server.setRequestHandler(Po,async(t,r)=>{try{let n=this._registeredTools[t.params.name];if(!n)throw new O(L.InvalidParams,`Tool ${t.params.name} not found`);if(!n.enabled)throw new O(L.InvalidParams,`Tool ${t.params.name} disabled`);let o=!!t.params.task,i=n.execution?.taskSupport,s="createTask"in n.handler;if((i==="required"||i==="optional")&&!s)throw new O(L.InternalError,`Tool ${t.params.name} has taskSupport '${i}' but was not registered with registerToolTask`);if(i==="required"&&!o)throw new O(L.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(i==="optional"&&!o&&s)return await this.handleAutomaticTaskPolling(n,t,r);let a=await this.validateToolInput(n,t.params.arguments,t.params.name),c=await this.executeToolHandler(n,a,r);return o||await this.validateToolOutput(n,c,t.params.name),c}catch(n){if(n instanceof O&&n.code===L.UrlElicitationRequired)throw n;return this.createToolError(n instanceof Error?n.message:String(n))}}),this._toolHandlersInitialized=!0)}createToolError(t){return{content:[{type:"text",text:t}],isError:!0}}async validateToolInput(t,r,n){if(!t.inputSchema)return;let i=ko(t.inputSchema)??t.inputSchema,s=await ga(i,r);if(!s.success){let a="error"in s?s.error:"Unknown error",c=ya(a);throw new O(L.InvalidParams,`Input validation error: Invalid arguments for tool ${n}: ${c}`)}return s.data}async validateToolOutput(t,r,n){if(!t.outputSchema||!("content"in r)||r.isError)return;if(!r.structuredContent)throw new O(L.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let o=ko(t.outputSchema),i=await ga(o,r.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=ya(s);throw new O(L.InvalidParams,`Output validation error: Invalid structured content for tool ${n}: ${a}`)}}async executeToolHandler(t,r,n){let o=t.handler;if("createTask"in o){if(!n.taskStore)throw new Error("No task store provided.");let s={...n,taskStore:n.taskStore};if(t.inputSchema){let a=o;return await Promise.resolve(a.createTask(r,s))}else{let a=o;return await Promise.resolve(a.createTask(s))}}if(t.inputSchema){let s=o;return await Promise.resolve(s(r,n))}else{let s=o;return await Promise.resolve(s(n))}}async handleAutomaticTaskPolling(t,r,n){if(!n.taskStore)throw new Error("No task store provided for task-capable tool.");let o=await this.validateToolInput(t,r.params.arguments,r.params.name),i=t.handler,s={...n,taskStore:n.taskStore},a=o?await Promise.resolve(i.createTask(o,s)):await Promise.resolve(i.createTask(s)),c=a.task.taskId,u=a.task,p=u.pollInterval??5e3;for(;u.status!=="completed"&&u.status!=="failed"&&u.status!=="cancelled";){await new Promise(d=>setTimeout(d,p));let l=await n.taskStore.getTask(c);if(!l)throw new O(L.InternalError,`Task ${c} not found during polling`);u=l}return await n.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(pn(Fa)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Fa,async t=>{switch(t.params.ref.type){case"ref/prompt":return kv(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return Sv(t),this.handleResourceCompletion(t,t.params.ref);default:throw new O(L.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){let n=this._registeredPrompts[r.name];if(!n)throw new O(L.InvalidParams,`Prompt ${r.name} not found`);if(!n.enabled)throw new O(L.InvalidParams,`Prompt ${r.name} disabled`);if(!n.argsSchema)return ys;let i=Qr(n.argsSchema)?.[t.params.argument.name];if(!um(i))return ys;let s=ow(i);if(!s)return ys;let a=await s(t.params.argument.value,t.params.context);return lw(a)}async handleResourceCompletion(t,r){let n=Object.values(this._registeredResourceTemplates).find(s=>s.resourceTemplate.uriTemplate.toString()===r.uri);if(!n){if(this._registeredResources[r.uri])return ys;throw new O(L.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let o=n.resourceTemplate.completeCallback(t.params.argument.name);if(!o)return ys;let i=await o(t.params.argument.value,t.params.context);return lw(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(pn(Oa)),this.server.assertCanSetRequestHandler(pn(Na)),this.server.assertCanSetRequestHandler(pn(Da)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Oa,async(t,r)=>{let n=Object.entries(this._registeredResources).filter(([i,s])=>s.enabled).map(([i,s])=>({uri:i,name:s.name,...s.metadata})),o=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let s=await i.resourceTemplate.listCallback(r);for(let a of s.resources)o.push({...i.metadata,...a})}return{resources:[...n,...o]}}),this.server.setRequestHandler(Na,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,n])=>({name:r,uriTemplate:n.resourceTemplate.uriTemplate.toString(),...n.metadata}))})),this.server.setRequestHandler(Da,async(t,r)=>{let n=new URL(t.params.uri),o=this._registeredResources[n.toString()];if(o){if(!o.enabled)throw new O(L.InvalidParams,`Resource ${n} disabled`);return o.readCallback(n,r)}for(let i of Object.values(this._registeredResourceTemplates)){let s=i.resourceTemplate.uriTemplate.match(n.toString());if(s)return i.readCallback(n,s,r)}throw new O(L.InvalidParams,`Resource ${n} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(pn(ja)),this.server.assertCanSetRequestHandler(pn(Ma)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(ja,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?fj(r.argsSchema):void 0}))})),this.server.setRequestHandler(Ma,async(t,r)=>{let n=this._registeredPrompts[t.params.name];if(!n)throw new O(L.InvalidParams,`Prompt ${t.params.name} not found`);if(!n.enabled)throw new O(L.InvalidParams,`Prompt ${t.params.name} disabled`);if(n.argsSchema){let o=ko(n.argsSchema),i=await ga(o,t.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",u=ya(c);throw new O(L.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${u}`)}let s=i.data,a=n.callback;return await Promise.resolve(a(s,r))}else{let o=n.callback;return await Promise.resolve(o(r))}}),this._promptHandlersInitialized=!0)}resource(t,r,...n){let o;typeof n[0]=="object"&&(o=n.shift());let i=n[0];if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let s=this._createRegisteredResource(t,void 0,r,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let s=this._createRegisteredResourceTemplate(t,void 0,r,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}registerResource(t,r,n,o){if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let i=this._createRegisteredResource(t,n.title,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let i=this._createRegisteredResourceTemplate(t,n.title,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(t,r,n,o,i){let s={name:t,title:r,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({uri:null}),update:a=>{typeof a.uri<"u"&&a.uri!==n&&(delete this._registeredResources[n],a.uri&&(this._registeredResources[a.uri]=s)),typeof a.name<"u"&&(s.name=a.name),typeof a.title<"u"&&(s.title=a.title),typeof a.metadata<"u"&&(s.metadata=a.metadata),typeof a.callback<"u"&&(s.readCallback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendResourceListChanged()}};return this._registeredResources[n]=s,s}_createRegisteredResourceTemplate(t,r,n,o,i){let s={resourceTemplate:n,title:r,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:u=>{typeof u.name<"u"&&u.name!==t&&(delete this._registeredResourceTemplates[t],u.name&&(this._registeredResourceTemplates[u.name]=s)),typeof u.title<"u"&&(s.title=u.title),typeof u.template<"u"&&(s.resourceTemplate=u.template),typeof u.metadata<"u"&&(s.metadata=u.metadata),typeof u.callback<"u"&&(s.readCallback=u.callback),typeof u.enabled<"u"&&(s.enabled=u.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[t]=s;let a=n.uriTemplate.variableNames;return Array.isArray(a)&&a.some(u=>!!n.completeCallback(u))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(t,r,n,o,i){let s={title:r,description:n,argsSchema:o===void 0?void 0:qn(o),callback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:a=>{typeof a.name<"u"&&a.name!==t&&(delete this._registeredPrompts[t],a.name&&(this._registeredPrompts[a.name]=s)),typeof a.title<"u"&&(s.title=a.title),typeof a.description<"u"&&(s.description=a.description),typeof a.argsSchema<"u"&&(s.argsSchema=qn(a.argsSchema)),typeof a.callback<"u"&&(s.callback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[t]=s,o&&Object.values(o).some(c=>{let u=c instanceof gt?c._def?.innerType:c;return um(u)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(t,r,n,o,i,s,a,c,u){lm(t);let p={title:r,description:n,inputSchema:uw(o),outputSchema:uw(i),annotations:s,execution:a,_meta:c,handler:u,enabled:!0,disable:()=>p.update({enabled:!1}),enable:()=>p.update({enabled:!0}),remove:()=>p.update({name:null}),update:l=>{typeof l.name<"u"&&l.name!==t&&(typeof l.name=="string"&&lm(l.name),delete this._registeredTools[t],l.name&&(this._registeredTools[l.name]=p)),typeof l.title<"u"&&(p.title=l.title),typeof l.description<"u"&&(p.description=l.description),typeof l.paramsSchema<"u"&&(p.inputSchema=qn(l.paramsSchema)),typeof l.outputSchema<"u"&&(p.outputSchema=qn(l.outputSchema)),typeof l.callback<"u"&&(p.handler=l.callback),typeof l.annotations<"u"&&(p.annotations=l.annotations),typeof l._meta<"u"&&(p._meta=l._meta),typeof l.enabled<"u"&&(p.enabled=l.enabled),this.sendToolListChanged()}};return this._registeredTools[t]=p,this.setToolRequestHandlers(),this.sendToolListChanged(),p}tool(t,...r){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let n,o,i,s;if(typeof r[0]=="string"&&(n=r.shift()),r.length>1){let c=r[0];pm(c)?(o=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!pm(r[0])&&(s=r.shift())):typeof c=="object"&&c!==null&&(s=r.shift())}let a=r[0];return this._createRegisteredTool(t,void 0,n,o,i,s,{taskSupport:"forbidden"},void 0,a)}registerTool(t,r,n){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let{title:o,description:i,inputSchema:s,outputSchema:a,annotations:c,_meta:u}=r;return this._createRegisteredTool(t,o,i,s,a,c,{taskSupport:"forbidden"},u,n)}prompt(t,...r){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let n;typeof r[0]=="string"&&(n=r.shift());let o;r.length>1&&(o=r.shift());let i=r[0],s=this._createRegisteredPrompt(t,void 0,n,o,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(t,r,n){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let{title:o,description:i,argsSchema:s}=r,a=this._createRegisteredPrompt(t,o,i,s,n);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,r){return this.server.sendLoggingMessage(t,r)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}},_s=class{constructor(t,r){this._callbacks=r,this._uriTemplate=typeof t=="string"?new Lc(t):t}get uriTemplate(){return this._uriTemplate}get listCallback(){return this._callbacks.list}completeCallback(t){return this._callbacks.complete?.[t]}},pj={type:"object",properties:{}};ys={completion:{values:[],hasMore:!1}}});function hj(e){return mv.parse(JSON.parse(e))}function fw(e){return JSON.stringify(e)+`
40
+ `}var Fc,hw=_(()=>{Zi();Fc=class{append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
41
+ `);if(t===-1)return null;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),hj(r)}clear(){this._buffer=void 0}}});var dm,Uc,mw=_(()=>{dm=st(require("node:process"),1);hw();Uc=class{constructor(t=dm.default.stdin,r=dm.default.stdout){this._stdin=t,this._stdout=r,this._readBuffer=new Fc,this._started=!1,this._ondata=n=>{this._readBuffer.append(n),this.processReadBuffer()},this._onerror=n=>{this.onerror?.(n)}}async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){for(;;)try{let t=this._readBuffer.readMessage();if(t===null)break;this.onmessage?.(t)}catch(t){this.onerror?.(t)}}async close(){this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.()}send(t){return new Promise(r=>{let n=fw(t);this._stdout.write(n)?r():this._stdout.once("drain",r)})}}});function zw(e){return typeof e>"u"||e===null}function mj(e){return typeof e=="object"&&e!==null}function gj(e){return Array.isArray(e)?e:zw(e)?[]:[e]}function yj(e,t){var r,n,o,i;if(t)for(i=Object.keys(t),r=0,n=i.length;r<n;r+=1)o=i[r],e[o]=t[o];return e}function _j(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function vj(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}function Rw(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
42
+
43
+ `+e.mark.snippet),n+" "+r):n}function bs(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Rw(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}function fm(e,t,r,n,o){var i="",s="",a=Math.floor(o/2)-1;return n-t>a&&(i=" ... ",t=n-a+i.length),r-n>a&&(s=" ...",r=n+a-s.length),{str:i+e.slice(t,r).replace(/\t/g,"\u2192")+s,pos:n-t+i.length}}function hm(e,t){return Ze.repeat(" ",t-e.length)+e}function Tj(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],o=[],i,s=-1;i=r.exec(e.buffer);)o.push(i.index),n.push(i.index+i[0].length),e.position<=i.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var a="",c,u,p=Math.min(e.line+t.linesAfter,o.length).toString().length,l=t.maxLength-(t.indent+p+3);for(c=1;c<=t.linesBefore&&!(s-c<0);c++)u=fm(e.buffer,n[s-c],o[s-c],e.position-(n[s]-n[s-c]),l),a=Ze.repeat(" ",t.indent)+hm((e.line-c+1).toString(),p)+" | "+u.str+`
44
+ `+a;for(u=fm(e.buffer,n[s],o[s],e.position,l),a+=Ze.repeat(" ",t.indent)+hm((e.line+1).toString(),p)+" | "+u.str+`
45
+ `,a+=Ze.repeat("-",t.indent+p+3+u.pos)+`^
46
+ `,c=1;c<=t.linesAfter&&!(s+c>=o.length);c++)u=fm(e.buffer,n[s+c],o[s+c],e.position-(n[s]-n[s+c]),l),a+=Ze.repeat(" ",t.indent)+hm((e.line+c+1).toString(),p)+" | "+u.str+`
47
+ `;return a.replace(/\n$/,"")}function Ij(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function zj(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Cj.indexOf(r)===-1)throw new dt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Ij(t.styleAliases||null),Ej.indexOf(this.kind)===-1)throw new dt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}function gw(e,t){var r=[];return e[t].forEach(function(n){var o=r.length;r.forEach(function(i,s){i.tag===n.tag&&i.kind===n.kind&&i.multi===n.multi&&(o=s)}),r[o]=n}),r}function Rj(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}function gm(e){return this.extend(e)}function Aj(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Oj(){return null}function Nj(e){return e===null}function Dj(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function jj(e){return e==="true"||e==="True"||e==="TRUE"}function Mj(e){return Object.prototype.toString.call(e)==="[object Boolean]"}function Lj(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Zj(e){return 48<=e&&e<=55}function qj(e){return 48<=e&&e<=57}function Fj(e){if(e===null)return!1;var t=e.length,r=0,n=!1,o;if(!t)return!1;if(o=e[r],(o==="-"||o==="+")&&(o=e[++r]),o==="0"){if(r+1===t)return!0;if(o=e[++r],o==="b"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;n=!0}return n&&o!=="_"}if(o==="x"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!Lj(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!Zj(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!qj(e.charCodeAt(r)))return!1;n=!0}return!(!n||o==="_")}function Uj(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function Bj(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ze.isNegativeZero(e)}function Hj(e){return!(e===null||!Vj.test(e)||e[e.length-1]==="_")}function Gj(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}function Kj(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ze.isNegativeZero(e))return"-0.0";return r=e.toString(10),Wj.test(r)?r.replace("e",".e"):r}function Jj(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ze.isNegativeZero(e))}function Yj(e){return e===null?!1:Bw.exec(e)!==null||Vw.exec(e)!==null}function Qj(e){var t,r,n,o,i,s,a,c=0,u=null,p,l,d;if(t=Bw.exec(e),t===null&&(t=Vw.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,n,o));if(i=+t[4],s=+t[5],a=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(p=+t[10],l=+(t[11]||0),u=(p*60+l)*6e4,t[9]==="-"&&(u=-u)),d=new Date(Date.UTC(r,n,o,i,s,a,c)),u&&d.setTime(d.getTime()-u),d}function Xj(e){return e.toISOString()}function e3(e){return e==="<<"||e===null}function t3(e){if(e===null)return!1;var t,r,n=0,o=e.length,i=xm;for(r=0;r<o;r++)if(t=i.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function r3(e){var t,r,n=e.replace(/[\r\n=]/g,""),o=n.length,i=xm,s=0,a=[];for(t=0;t<o;t++)t%4===0&&t&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|i.indexOf(n.charAt(t));return r=o%4*6,r===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):r===18?(a.push(s>>10&255),a.push(s>>2&255)):r===12&&a.push(s>>4&255),new Uint8Array(a)}function n3(e){var t="",r=0,n,o,i=e.length,s=xm;for(n=0;n<i;n++)n%3===0&&n&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[n];return o=i%3,o===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):o===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):o===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function o3(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function a3(e){if(e===null)return!0;var t=[],r,n,o,i,s,a=e;for(r=0,n=a.length;r<n;r+=1){if(o=a[r],s=!1,s3.call(o)!=="[object Object]")return!1;for(i in o)if(i3.call(o,i))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(i)===-1)t.push(i);else return!1}return!0}function c3(e){return e!==null?e:[]}function l3(e){if(e===null)return!0;var t,r,n,o,i,s=e;for(i=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(n=s[t],u3.call(n)!=="[object Object]"||(o=Object.keys(n),o.length!==1))return!1;i[t]=[o[0],n[o[0]]]}return!0}function p3(e){if(e===null)return[];var t,r,n,o,i,s=e;for(i=new Array(s.length),t=0,r=s.length;t<r;t+=1)n=s[t],o=Object.keys(n),i[t]=[o[0],n[o[0]]];return i}function f3(e){if(e===null)return!0;var t,r=e;for(t in r)if(d3.call(r,t)&&r[t]!==null)return!1;return!0}function h3(e){return e!==null?e:{}}function _w(e){return Object.prototype.toString.call(e)}function vr(e){return e===10||e===13}function Xn(e){return e===9||e===32}function kt(e){return e===9||e===32||e===10||e===13}function Vo(e){return e===44||e===91||e===93||e===123||e===125}function v3(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function b3(e){return e===120?2:e===117?4:e===85?8:0}function x3(e){return 48<=e&&e<=57?e-48:-1}function vw(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
48
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function w3(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function rk(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function k3(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||wm,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ik(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Pj(r),new dt(t,r)}function j(e,t){throw ik(e,t)}function Hc(e,t){e.onWarning&&e.onWarning.call(null,ik(e,t))}function dn(e,t,r,n){var o,i,s,a;if(t<r){if(a=e.input.slice(t,r),n)for(o=0,i=a.length;o<i;o+=1)s=a.charCodeAt(o),s===9||32<=s&&s<=1114111||j(e,"expected valid JSON character");else g3.test(a)&&j(e,"the stream contains non-printable characters");e.result+=a}}function xw(e,t,r,n){var o,i,s,a;for(Ze.isObject(r)||j(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),s=0,a=o.length;s<a;s+=1)i=o[s],fn.call(t,i)||(rk(t,i,r[i]),n[i]=!0)}function Ho(e,t,r,n,o,i,s,a,c){var u,p;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),u=0,p=o.length;u<p;u+=1)Array.isArray(o[u])&&j(e,"nested arrays are not supported inside keys"),typeof o=="object"&&_w(o[u])==="[object Object]"&&(o[u]="[object Object]");if(typeof o=="object"&&_w(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(u=0,p=i.length;u<p;u+=1)xw(e,t,i[u],r);else xw(e,t,i,r);else!e.json&&!fn.call(r,o)&&fn.call(t,o)&&(e.line=s||e.line,e.lineStart=a||e.lineStart,e.position=c||e.position,j(e,"duplicated mapping key")),rk(t,o,i),delete r[o];return t}function km(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):j(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function je(e,t,r){for(var n=0,o=e.input.charCodeAt(e.position);o!==0;){for(;Xn(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(vr(o))for(km(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&Hc(e,"deficient indentation"),n}function Kc(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||kt(r)))}function Sm(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ze.repeat(`
49
+ `,t-1))}function S3(e,t,r){var n,o,i,s,a,c,u,p,l=e.kind,d=e.result,f;if(f=e.input.charCodeAt(e.position),kt(f)||Vo(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(o=e.input.charCodeAt(e.position+1),kt(o)||r&&Vo(o)))return!1;for(e.kind="scalar",e.result="",i=s=e.position,a=!1;f!==0;){if(f===58){if(o=e.input.charCodeAt(e.position+1),kt(o)||r&&Vo(o))break}else if(f===35){if(n=e.input.charCodeAt(e.position-1),kt(n))break}else{if(e.position===e.lineStart&&Kc(e)||r&&Vo(f))break;if(vr(f))if(c=e.line,u=e.lineStart,p=e.lineIndent,je(e,!1,-1),e.lineIndent>=t){a=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=u,e.lineIndent=p;break}}a&&(dn(e,i,s,!1),Sm(e,e.line-c),i=s=e.position,a=!1),Xn(f)||(s=e.position+1),f=e.input.charCodeAt(++e.position)}return dn(e,i,s,!1),e.result?!0:(e.kind=l,e.result=d,!1)}function $3(e,t){var r,n,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(dn(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,o=e.position;else return!0;else vr(r)?(dn(e,n,o,!0),Sm(e,je(e,!1,t)),n=o=e.position):e.position===e.lineStart&&Kc(e)?j(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);j(e,"unexpected end of the stream within a single quoted scalar")}function T3(e,t){var r,n,o,i,s,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return dn(e,r,e.position,!0),e.position++,!0;if(a===92){if(dn(e,r,e.position,!0),a=e.input.charCodeAt(++e.position),vr(a))je(e,!1,t);else if(a<256&&nk[a])e.result+=ok[a],e.position++;else if((s=b3(a))>0){for(o=s,i=0;o>0;o--)a=e.input.charCodeAt(++e.position),(s=v3(a))>=0?i=(i<<4)+s:j(e,"expected hexadecimal character");e.result+=w3(i),e.position++}else j(e,"unknown escape sequence");r=n=e.position}else vr(a)?(dn(e,r,n,!0),Sm(e,je(e,!1,t)),r=n=e.position):e.position===e.lineStart&&Kc(e)?j(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}j(e,"unexpected end of the stream within a double quoted scalar")}function P3(e,t){var r=!0,n,o,i,s=e.tag,a,c=e.anchor,u,p,l,d,f,h=Object.create(null),g,y,b,v;if(v=e.input.charCodeAt(e.position),v===91)p=93,f=!1,a=[];else if(v===123)p=125,f=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),v=e.input.charCodeAt(++e.position);v!==0;){if(je(e,!0,t),v=e.input.charCodeAt(e.position),v===p)return e.position++,e.tag=s,e.anchor=c,e.kind=f?"mapping":"sequence",e.result=a,!0;r?v===44&&j(e,"expected the node content, but found ','"):j(e,"missed comma between flow collection entries"),y=g=b=null,l=d=!1,v===63&&(u=e.input.charCodeAt(e.position+1),kt(u)&&(l=d=!0,e.position++,je(e,!0,t))),n=e.line,o=e.lineStart,i=e.position,Go(e,t,Bc,!1,!0),y=e.tag,g=e.result,je(e,!0,t),v=e.input.charCodeAt(e.position),(d||e.line===n)&&v===58&&(l=!0,v=e.input.charCodeAt(++e.position),je(e,!0,t),Go(e,t,Bc,!1,!0),b=e.result),f?Ho(e,a,h,y,g,b,n,o,i):l?a.push(Ho(e,null,h,y,g,b,n,o,i)):a.push(g),je(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(r=!0,v=e.input.charCodeAt(++e.position)):r=!1}j(e,"unexpected end of the stream within a flow collection")}function C3(e,t){var r,n,o=mm,i=!1,s=!1,a=t,c=0,u=!1,p,l;if(l=e.input.charCodeAt(e.position),l===124)n=!1;else if(l===62)n=!0;else return!1;for(e.kind="scalar",e.result="";l!==0;)if(l=e.input.charCodeAt(++e.position),l===43||l===45)mm===o?o=l===43?yw:m3:j(e,"repeat of a chomping mode identifier");else if((p=x3(l))>=0)p===0?j(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?j(e,"repeat of an indentation width identifier"):(a=t+p-1,s=!0);else break;if(Xn(l)){do l=e.input.charCodeAt(++e.position);while(Xn(l));if(l===35)do l=e.input.charCodeAt(++e.position);while(!vr(l)&&l!==0)}for(;l!==0;){for(km(e),e.lineIndent=0,l=e.input.charCodeAt(e.position);(!s||e.lineIndent<a)&&l===32;)e.lineIndent++,l=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>a&&(a=e.lineIndent),vr(l)){c++;continue}if(e.lineIndent<a){o===yw?e.result+=Ze.repeat(`
50
+ `,i?1+c:c):o===mm&&i&&(e.result+=`
51
+ `);break}for(n?Xn(l)?(u=!0,e.result+=Ze.repeat(`
52
+ `,i?1+c:c)):u?(u=!1,e.result+=Ze.repeat(`
53
+ `,c+1)):c===0?i&&(e.result+=" "):e.result+=Ze.repeat(`
54
+ `,c):e.result+=Ze.repeat(`
55
+ `,i?1+c:c),i=!0,s=!0,c=0,r=e.position;!vr(l)&&l!==0;)l=e.input.charCodeAt(++e.position);dn(e,r,e.position,!1)}return!0}function ww(e,t){var r,n=e.tag,o=e.anchor,i=[],s,a=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=i),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),!(c!==45||(s=e.input.charCodeAt(e.position+1),!kt(s))));){if(a=!0,e.position++,je(e,!0,-1)&&e.lineIndent<=t){i.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,Go(e,t,Xw,!1,!0),i.push(e.result),je(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)j(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=n,e.anchor=o,e.kind="sequence",e.result=i,!0):!1}function E3(e,t,r){var n,o,i,s,a,c,u=e.tag,p=e.anchor,l={},d=Object.create(null),f=null,h=null,g=null,y=!1,b=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),v=e.input.charCodeAt(e.position);v!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),i=e.line,(v===63||v===58)&&kt(n))v===63?(y&&(Ho(e,l,d,f,h,null,s,a,c),f=h=g=null),b=!0,y=!0,o=!0):y?(y=!1,o=!0):j(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,v=n;else{if(s=e.line,a=e.lineStart,c=e.position,!Go(e,r,Qw,!1,!0))break;if(e.line===i){for(v=e.input.charCodeAt(e.position);Xn(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),kt(v)||j(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Ho(e,l,d,f,h,null,s,a,c),f=h=g=null),b=!0,y=!1,o=!1,f=e.tag,h=e.result;else if(b)j(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=p,!0}else if(b)j(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=p,!0}if((e.line===i||e.lineIndent>t)&&(y&&(s=e.line,a=e.lineStart,c=e.position),Go(e,t,Vc,!0,o)&&(y?h=e.result:g=e.result),y||(Ho(e,l,d,f,h,g,s,a,c),f=h=g=null),je(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&v!==0)j(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Ho(e,l,d,f,h,null,s,a,c),b&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=l),b}function I3(e){var t,r=!1,n=!1,o,i,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&j(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(n=!0,o="!!",s=e.input.charCodeAt(++e.position)):o="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(i=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):j(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!kt(s);)s===33&&(n?j(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),ek.test(o)||j(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),_3.test(i)&&j(e,"tag suffix cannot contain flow indicator characters")}i&&!tk.test(i)&&j(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{j(e,"tag name is malformed: "+i)}return r?e.tag=i:fn.call(e.tagMap,o)?e.tag=e.tagMap[o]+i:o==="!"?e.tag="!"+i:o==="!!"?e.tag="tag:yaml.org,2002:"+i:j(e,'undeclared tag handle "'+o+'"'),!0}function z3(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&j(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!kt(r)&&!Vo(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function R3(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!kt(n)&&!Vo(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),fn.call(e.anchorMap,r)||j(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],je(e,!0,-1),!0}function Go(e,t,r,n,o){var i,s,a,c=1,u=!1,p=!1,l,d,f,h,g,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=s=a=Vc===r||Xw===r,n&&je(e,!0,-1)&&(u=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;I3(e)||z3(e);)je(e,!0,-1)?(u=!0,a=i,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):a=!1;if(a&&(a=u||o),(c===1||Vc===r)&&(Bc===r||Qw===r?g=t:g=t+1,y=e.position-e.lineStart,c===1?a&&(ww(e,y)||E3(e,y,g))||P3(e,g)?p=!0:(s&&C3(e,g)||$3(e,g)||T3(e,g)?p=!0:R3(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&j(e,"alias node should not have any properties")):S3(e,g,Bc===r)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(p=a&&ww(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&j(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,d=e.implicitTypes.length;l<d;l+=1)if(h=e.implicitTypes[l],h.resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(fn.call(e.typeMap[e.kind||"fallback"],e.tag))h=e.typeMap[e.kind||"fallback"][e.tag];else for(h=null,f=e.typeMap.multi[e.kind||"fallback"],l=0,d=f.length;l<d;l+=1)if(e.tag.slice(0,f[l].tag.length)===f[l].tag){h=f[l];break}h||j(e,"unknown tag !<"+e.tag+">"),e.result!==null&&h.kind!==e.kind&&j(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+h.kind+'", not "'+e.kind+'"'),h.resolve(e.result,e.tag)?(e.result=h.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):j(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}function A3(e){var t=e.position,r,n,o,i=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(je(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(i=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!kt(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),o=[],n.length<1&&j(e,"directive name must not be less than one character in length");s!==0;){for(;Xn(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!vr(s));break}if(vr(s))break;for(r=e.position;s!==0&&!kt(s);)s=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}s!==0&&km(e),fn.call(bw,n)?bw[n](e,n,o):Hc(e,'unknown document directive "'+n+'"')}if(je(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,je(e,!0,-1)):i&&j(e,"directives end mark is expected"),Go(e,e.lineIndent-1,Vc,!1,!0),je(e,!0,-1),e.checkLineBreaks&&y3.test(e.input.slice(t,e.position))&&Hc(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Kc(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,je(e,!0,-1));return}if(e.position<e.length-1)j(e,"end of the stream or a document separator is expected");else return}function sk(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
56
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new k3(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,j(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)A3(r);return r.documents}function O3(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=sk(e,r);if(typeof t!="function")return n;for(var o=0,i=n.length;o<i;o+=1)t(n[o])}function N3(e,t){var r=sk(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new dt("expected a single document in the stream, but found more")}}function rM(e,t){var r,n,o,i,s,a,c;if(t===null)return{};for(r={},n=Object.keys(t),o=0,i=n.length;o<i;o+=1)s=n[o],a=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),c=e.compiledTypeMap.fallback[s],c&&uk.call(c.styleAliases,a)&&(a=c.styleAliases[a]),r[s]=a;return r}function nM(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new dt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Ze.repeat("0",n-t.length)+t}function iM(e){this.schema=e.schema||wm,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ze.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=rM(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?ws:oM,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function kw(e,t){for(var r=Ze.repeat(" ",t),n=0,o=-1,i="",s,a=e.length;n<a;)o=e.indexOf(`
57
57
  `,n),o===-1?(s=e.slice(n),n=a):(s=e.slice(n,o+1),n=o+1),s.length&&s!==`
58
- `&&(i+=r),i+=s;return i}function mm(e,t){return`
59
- `+Le.repeat(" ",e.indent*t)}function Y3(e,t){var r,n,o;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(o=e.implicitTypes[r],o.resolve(t))return!0;return!1}function Uc(e){return e===z3||e===E3}function vs(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==wm||65536<=e&&e<=1114111}function gw(e){return vs(e)&&e!==wm&&e!==I3&&e!==ys}function yw(e,t,r){var n=gw(e),o=n&&!Uc(e);return(r?n:n&&e!==rk&&e!==nk&&e!==ok&&e!==ik&&e!==sk)&&e!==hm&&!(t===Fc&&!o)||gw(t)&&!Uc(t)&&e===hm||t===Fc&&o}function Q3(e){return vs(e)&&e!==wm&&!Uc(e)&&e!==M3&&e!==q3&&e!==Fc&&e!==rk&&e!==nk&&e!==ok&&e!==ik&&e!==sk&&e!==hm&&e!==N3&&e!==j3&&e!==R3&&e!==B3&&e!==L3&&e!==Z3&&e!==D3&&e!==A3&&e!==O3&&e!==F3&&e!==U3}function X3(e){return!Uc(e)&&e!==Fc}function ms(e,t){var r=e.charCodeAt(t),n;return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function ak(e){var t=/^\n* /;return t.test(e)}function eM(e,t,r,n,o,i,s,a){var c,u=0,p=null,l=!1,d=!1,f=n!==-1,h=-1,m=Q3(ms(e,0))&&X3(ms(e,e.length-1));if(t||s)for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=ms(e,c),!vs(u))return Zo;m=m&&yw(u,p,a),p=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=ms(e,c),u===ys)l=!0,f&&(d=d||c-h-1>n&&e[h+1]!==" ",h=c);else if(!vs(u))return Zo;m=m&&yw(u,p,a),p=u}d=d||f&&c-h-1>n&&e[h+1]!==" "}return!l&&!d?m&&!s&&!o(e)?ck:i===_s?Zo:gm:r>9&&ak(e)?Zo:s?i===_s?Zo:gm:d?lk:uk}function tM(e,t,r,n,o){e.dump=(function(){if(t.length===0)return e.quotingType===_s?'""':"''";if(!e.noCompatMode&&(V3.indexOf(t)!==-1||H3.test(t)))return e.quotingType===_s?'"'+t+'"':"'"+t+"'";var i=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),a=n||e.flowLevel>-1&&r>=e.flowLevel;function c(u){return Y3(e,u)}switch(eM(t,a,e.indent,s,c,e.quotingType,e.forceQuotes&&!n,o)){case ck:return t;case gm:return"'"+t.replace(/'/g,"''")+"'";case uk:return"|"+_w(t,e.indent)+vw(mw(t,i));case lk:return">"+_w(t,e.indent)+vw(mw(rM(t,s),i));case Zo:return'"'+nM(t)+'"';default:throw new lt("impossible error: invalid scalar style")}})()}function _w(e,t){var r=ak(e)?String(t):"",n=e[e.length-1]===`
58
+ `&&(i+=r),i+=s;return i}function _m(e,t){return`
59
+ `+Ze.repeat(" ",e.indent*t)}function sM(e,t){var r,n,o;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(o=e.implicitTypes[r],o.resolve(t))return!0;return!1}function Wc(e){return e===Z3||e===M3}function ks(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==$m||65536<=e&&e<=1114111}function Sw(e){return ks(e)&&e!==$m&&e!==L3&&e!==xs}function $w(e,t,r){var n=Sw(e),o=n&&!Wc(e);return(r?n:n&&e!==lk&&e!==pk&&e!==dk&&e!==fk&&e!==hk)&&e!==ym&&!(t===Gc&&!o)||Sw(t)&&!Wc(t)&&e===ym||t===Gc&&o}function aM(e){return ks(e)&&e!==$m&&!Wc(e)&&e!==G3&&e!==J3&&e!==Gc&&e!==lk&&e!==pk&&e!==dk&&e!==fk&&e!==hk&&e!==ym&&e!==B3&&e!==H3&&e!==q3&&e!==X3&&e!==W3&&e!==K3&&e!==V3&&e!==F3&&e!==U3&&e!==Y3&&e!==Q3}function cM(e){return!Wc(e)&&e!==Gc}function vs(e,t){var r=e.charCodeAt(t),n;return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function mk(e){var t=/^\n* /;return t.test(e)}function uM(e,t,r,n,o,i,s,a){var c,u=0,p=null,l=!1,d=!1,f=n!==-1,h=-1,g=aM(vs(e,0))&&cM(vs(e,e.length-1));if(t||s)for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=vs(e,c),!ks(u))return Bo;g=g&&$w(u,p,a),p=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=vs(e,c),u===xs)l=!0,f&&(d=d||c-h-1>n&&e[h+1]!==" ",h=c);else if(!ks(u))return Bo;g=g&&$w(u,p,a),p=u}d=d||f&&c-h-1>n&&e[h+1]!==" "}return!l&&!d?g&&!s&&!o(e)?gk:i===ws?Bo:vm:r>9&&mk(e)?Bo:s?i===ws?Bo:vm:d?_k:yk}function lM(e,t,r,n,o){e.dump=(function(){if(t.length===0)return e.quotingType===ws?'""':"''";if(!e.noCompatMode&&(eM.indexOf(t)!==-1||tM.test(t)))return e.quotingType===ws?'"'+t+'"':"'"+t+"'";var i=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),a=n||e.flowLevel>-1&&r>=e.flowLevel;function c(u){return sM(e,u)}switch(uM(t,a,e.indent,s,c,e.quotingType,e.forceQuotes&&!n,o)){case gk:return t;case vm:return"'"+t.replace(/'/g,"''")+"'";case yk:return"|"+Tw(t,e.indent)+Pw(kw(t,i));case _k:return">"+Tw(t,e.indent)+Pw(kw(pM(t,s),i));case Bo:return'"'+dM(t)+'"';default:throw new dt("impossible error: invalid scalar style")}})()}function Tw(e,t){var r=mk(e)?String(t):"",n=e[e.length-1]===`
60
60
  `,o=n&&(e[e.length-2]===`
61
61
  `||e===`
62
62
  `),i=o?"+":n?"":"-";return r+i+`
63
- `}function vw(e){return e[e.length-1]===`
64
- `?e.slice(0,-1):e}function rM(e,t){for(var r=/(\n+)([^\n]*)/g,n=(function(){var u=e.indexOf(`
65
- `);return u=u!==-1?u:e.length,r.lastIndex=u,bw(e.slice(0,u),t)})(),o=e[0]===`
63
+ `}function Pw(e){return e[e.length-1]===`
64
+ `?e.slice(0,-1):e}function pM(e,t){for(var r=/(\n+)([^\n]*)/g,n=(function(){var u=e.indexOf(`
65
+ `);return u=u!==-1?u:e.length,r.lastIndex=u,Cw(e.slice(0,u),t)})(),o=e[0]===`
66
66
  `||e[0]===" ",i,s;s=r.exec(e);){var a=s[1],c=s[2];i=c[0]===" ",n+=a+(!o&&!i&&c!==""?`
67
- `:"")+bw(c,t),o=i}return n}function bw(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,o=0,i,s=0,a=0,c="";n=r.exec(e);)a=n.index,a-o>t&&(i=s>o?s:a,c+=`
67
+ `:"")+Cw(c,t),o=i}return n}function Cw(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,o=0,i,s=0,a=0,c="";n=r.exec(e);)a=n.index,a-o>t&&(i=s>o?s:a,c+=`
68
68
  `+e.slice(o,i),o=i+1),s=a;return c+=`
69
69
  `,e.length-o>t&&s>o?c+=e.slice(o,s)+`
70
- `+e.slice(s+1):c+=e.slice(o),c.slice(1)}function nM(e){for(var t="",r=0,n,o=0;o<e.length;r>=65536?o+=2:o++)r=ms(e,o),n=rt[r],!n&&vs(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=n||W3(r);return t}function oM(e,t,r){var n="",o=e.tag,i,s,a;for(i=0,s=r.length;i<s;i+=1)a=r[i],e.replacer&&(a=e.replacer.call(r,String(i),a)),(Ir(e,t,a,!1,!1)||typeof a>"u"&&Ir(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=o,e.dump="["+n+"]"}function xw(e,t,r,n){var o="",i=e.tag,s,a,c;for(s=0,a=r.length;s<a;s+=1)c=r[s],e.replacer&&(c=e.replacer.call(r,String(s),c)),(Ir(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&Ir(e,t+1,null,!0,!0,!1,!0))&&((!n||o!=="")&&(o+=mm(e,t)),e.dump&&ys===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=i,e.dump=o||"[]"}function iM(e,t,r){var n="",o=e.tag,i=Object.keys(r),s,a,c,u,p;for(s=0,a=i.length;s<a;s+=1)p="",n!==""&&(p+=", "),e.condenseFlow&&(p+='"'),c=i[s],u=r[c],e.replacer&&(u=e.replacer.call(r,c,u)),Ir(e,t,c,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ir(e,t,u,!1,!1)&&(p+=e.dump,n+=p));e.tag=o,e.dump="{"+n+"}"}function sM(e,t,r,n){var o="",i=e.tag,s=Object.keys(r),a,c,u,p,l,d;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new lt("sortKeys must be a boolean or a function");for(a=0,c=s.length;a<c;a+=1)d="",(!n||o!=="")&&(d+=mm(e,t)),u=s[a],p=r[u],e.replacer&&(p=e.replacer.call(r,u,p)),Ir(e,t+1,u,!0,!0,!0)&&(l=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,l&&(e.dump&&ys===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,l&&(d+=mm(e,t)),Ir(e,t+1,p,!0,l)&&(e.dump&&ys===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,o+=d));e.tag=i,e.dump=o||"{}"}function ww(e,t,r){var n,o,i,s,a,c;for(o=r?e.explicitTypes:e.implicitTypes,i=0,s=o.length;i<s;i+=1)if(a=o[i],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(r?a.multi&&a.representName?e.tag=a.representName(t):e.tag=a.tag:e.tag="?",a.represent){if(c=e.styleMap[a.tag]||a.defaultStyle,ek.call(a.represent)==="[object Function]")n=a.represent(t,c);else if(tk.call(a.represent,c))n=a.represent[c](t,c);else throw new lt("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');e.dump=n}return!0}return!1}function Ir(e,t,r,n,o,i,s){e.tag=null,e.dump=r,ww(e,r,!1)||ww(e,r,!0);var a=ek.call(e.dump),c=n,u;n&&(n=e.flowLevel<0||e.flowLevel>t);var p=a==="[object Object]"||a==="[object Array]",l,d;if(p&&(l=e.duplicates.indexOf(r),d=l!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(o=!1),d&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(p&&d&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),a==="[object Object]")n&&Object.keys(e.dump).length!==0?(sM(e,t,e.dump,o),d&&(e.dump="&ref_"+l+e.dump)):(iM(e,t,e.dump),d&&(e.dump="&ref_"+l+" "+e.dump));else if(a==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?xw(e,t-1,e.dump,o):xw(e,t,e.dump,o),d&&(e.dump="&ref_"+l+e.dump)):(oM(e,t,e.dump),d&&(e.dump="&ref_"+l+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&tM(e,e.dump,t,i,c);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new lt("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}function aM(e,t){var r=[],n=[],o,i;for(ym(e,r,n),o=0,i=n.length;o<i;o+=1)t.duplicates.push(r[n[o]]);t.usedDuplicates=new Array(i)}function ym(e,t,r){var n,o,i;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,i=e.length;o<i;o+=1)ym(e[o],t,r);else for(n=Object.keys(e),o=0,i=n.length;o<i;o+=1)ym(e[n[o]],t,r)}function cM(e,t){t=t||{};var r=new J3(t);r.noRefs||aM(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Ir(r,0,n,!0,!0)?r.dump+`
71
- `:""}function km(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var pj,dj,fj,hj,mj,gj,Le,lt,_j,vj,bj,We,$w,Tw,Pw,Cw,Ew,Iw,zw,Rw,Dj,Lj,Aw,Ow,Nw,Dw,jw,Mw,Lw,_m,Zw,Jj,Yj,qw,e3,Fw,n3,Uw,vm,un,Lc,Bw,Vw,Zc,dm,s3,uw,a3,c3,u3,Hw,Gw,Kw,Jw,Kn,dw,P3,C3,Xw,ek,tk,wm,E3,ys,I3,z3,R3,A3,hm,O3,N3,D3,j3,rk,M3,Fc,L3,Z3,q3,F3,nk,ok,U3,ik,B3,sk,rt,V3,H3,K3,_s,ck,gm,uk,lk,Zo,uM,lM,pM,dM,fM,hM,mM,gM,yM,_M,vM,bM,xM,wM,kM,SM,Bo,Sm=_(()=>{pj=kw,dj=sj,fj=aj,hj=uj,mj=lj,gj=cj,Le={isNothing:pj,isObject:dj,toArray:fj,repeat:hj,isNegativeZero:mj,extend:gj};gs.prototype=Object.create(Error.prototype);gs.prototype.constructor=gs;gs.prototype.toString=function(t){return this.name+": "+Sw(this,t)};lt=gs;_j=yj,vj=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],bj=["scalar","sequence","mapping"];We=wj;fm.prototype.extend=function(t){var r=[],n=[];if(t instanceof We)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new lt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(i){if(!(i instanceof We))throw new lt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new lt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new lt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(i){if(!(i instanceof We))throw new lt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(fm.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(n),o.compiledImplicit=cw(o,"implicit"),o.compiledExplicit=cw(o,"explicit"),o.compiledTypeMap=kj(o.compiledImplicit,o.compiledExplicit),o};$w=fm,Tw=new We("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Pw=new We("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Cw=new We("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Ew=new $w({explicit:[Tw,Pw,Cw]});Iw=new We("tag:yaml.org,2002:null",{kind:"scalar",resolve:Sj,construct:$j,predicate:Tj,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});zw=new We("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Pj,construct:Cj,predicate:Ej,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});Rw=new We("tag:yaml.org,2002:int",{kind:"scalar",resolve:Aj,construct:Oj,predicate:Nj,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Dj=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");Lj=/^[-+]?[0-9]+e/;Aw=new We("tag:yaml.org,2002:float",{kind:"scalar",resolve:jj,construct:Mj,predicate:qj,represent:Zj,defaultStyle:"lowercase"}),Ow=Ew.extend({implicit:[Iw,zw,Rw,Aw]}),Nw=Ow,Dw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),jw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");Mw=new We("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Fj,construct:Uj,instanceOf:Date,represent:Bj});Lw=new We("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Vj}),_m=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
72
- \r`;Zw=new We("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Hj,construct:Gj,predicate:Kj,represent:Wj}),Jj=Object.prototype.hasOwnProperty,Yj=Object.prototype.toString;qw=new We("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Qj,construct:Xj}),e3=Object.prototype.toString;Fw=new We("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:t3,construct:r3}),n3=Object.prototype.hasOwnProperty;Uw=new We("tag:yaml.org,2002:set",{kind:"mapping",resolve:o3,construct:i3}),vm=Nw.extend({implicit:[Mw,Lw],explicit:[Zw,qw,Fw,Uw]}),un=Object.prototype.hasOwnProperty,Lc=1,Bw=2,Vw=3,Zc=4,dm=1,s3=2,uw=3,a3=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c3=/[\x85\u2028\u2029]/,u3=/[,\[\]\{\}]/,Hw=/^(?:!|!!|![a-z\-]+!)$/i,Gw=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;Kw=new Array(256),Jw=new Array(256);for(Kn=0;Kn<256;Kn++)Kw[Kn]=pw(Kn)?1:0,Jw[Kn]=pw(Kn);dw={YAML:function(t,r,n){var o,i,s;t.version!==null&&j(t,"duplication of %YAML directive"),n.length!==1&&j(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),o===null&&j(t,"ill-formed argument of the YAML directive"),i=parseInt(o[1],10),s=parseInt(o[2],10),i!==1&&j(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&qc(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var o,i;n.length!==2&&j(t,"TAG directive accepts exactly two arguments"),o=n[0],i=n[1],Hw.test(o)||j(t,"ill-formed tag handle (first argument) of the TAG directive"),un.call(t.tagMap,o)&&j(t,'there is a previously declared suffix for "'+o+'" tag handle'),Gw.test(i)||j(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{j(t,"tag prefix is malformed: "+i)}t.tagMap[o]=i}};P3=$3,C3=T3,Xw={loadAll:P3,load:C3},ek=Object.prototype.toString,tk=Object.prototype.hasOwnProperty,wm=65279,E3=9,ys=10,I3=13,z3=32,R3=33,A3=34,hm=35,O3=37,N3=38,D3=39,j3=42,rk=44,M3=45,Fc=58,L3=61,Z3=62,q3=63,F3=64,nk=91,ok=93,U3=96,ik=123,B3=124,sk=125,rt={};rt[0]="\\0";rt[7]="\\a";rt[8]="\\b";rt[9]="\\t";rt[10]="\\n";rt[11]="\\v";rt[12]="\\f";rt[13]="\\r";rt[27]="\\e";rt[34]='\\"';rt[92]="\\\\";rt[133]="\\N";rt[160]="\\_";rt[8232]="\\L";rt[8233]="\\P";V3=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],H3=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;K3=1,_s=2;ck=1,gm=2,uk=3,lk=4,Zo=5;uM=cM,lM={dump:uM};pM=We,dM=$w,fM=Ew,hM=Ow,mM=Nw,gM=vm,yM=Xw.load,_M=Xw.loadAll,vM=lM.dump,bM=lt,xM={binary:Zw,float:Aw,map:Cw,null:Iw,pairs:Fw,set:Uw,timestamp:Mw,bool:zw,int:Rw,merge:Lw,omap:qw,seq:Pw,str:Tw},wM=km("safeLoad","load"),kM=km("safeLoadAll","loadAll"),SM=km("safeDump","dump"),Bo={Type:pM,Schema:dM,FAILSAFE_SCHEMA:fM,JSON_SCHEMA:hM,CORE_SCHEMA:mM,DEFAULT_SCHEMA:gM,load:yM,loadAll:_M,dump:vM,YAMLException:bM,types:xM,safeLoad:wM,safeLoadAll:kM,safeDump:SM}});var $M,TM,PM,CM,EM,IM,pk,dk,fk=_(()=>{"use strict";pe();$M=g.object({id:g.string(),label:g.string(),name:g.string(),mindset_template:g.string().optional()}),TM=g.object({name:g.string(),root_dir:g.string().default("frontend"),build_command:g.string(),package_manager:g.string().default("pnpm"),mindset_template:g.string().optional()}),PM=g.object({name:g.string(),root_dir:g.string().default("backend"),architecture:g.string(),dependency_direction:g.string(),package_manager:g.string().default("uv"),mindset_template:g.string().optional()}),CM=g.object({frontend:g.string().optional(),backend:g.string().optional(),preflight_command:g.string().default("pnpm preflight"),summary:g.string().default("format/lint/typecheck/build")}),EM=g.object({name:g.string(),description:g.string(),runtime:g.enum(["python","node","unknown"]).default("unknown"),setup_hint:g.string().optional(),enabled:g.boolean().default(!0)}),IM=g.object({id:g.string(),label:g.string(),category:g.enum(["frontend","backend","testing","infra","devtool","monitoring"]),description:g.string(),url:g.string().optional(),guidance:g.string().optional()}),pk=g.object({name:g.string(),description:g.string().optional(),stacks:g.array($M),frontend:TM.optional(),backend:PM.optional(),quality_gate:CM.optional(),vendor:g.array(EM).optional(),tools:g.array(IM).optional()}),dk=g.object({license_key:g.string(),stack_profile:g.string().optional(),components:g.array(g.string()).optional(),language:g.string().default("en"),registry_url:g.string().default("https://godd-registry.up.railway.app")}).refine(e=>e.stack_profile!==void 0||e.components!==void 0&&e.components.length>0,{message:"Either 'stack_profile' or 'components' must be provided"})});function hk(e){let t=e??process.env.GODD_CONFIG;if(!t)throw new Error(`${ln} \u306E\u30D1\u30B9\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002GODD_CONFIG \u74B0\u5883\u5909\u6570\u3092\u8A2D\u5B9A\u3059\u308B\u304B\u3001\u660E\u793A\u7684\u306B\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002`);if(!(0,Vo.existsSync)(t))throw new Error(`${ln} \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${t}
73
- GODD_CONFIG \u74B0\u5883\u5909\u6570\u307E\u305F\u306F .cursor/mcp.json \u306E env.GODD_CONFIG \u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`);let r=(0,Vo.readFileSync)(t,"utf-8"),n=Bo.load(r);return dk.parse(n)}function zM(e){let t=Bo.load(e);return pk.parse(t)}function Tm(e,t){let r=t??(0,$m.join)(process.cwd(),"stacks"),n=(0,$m.join)(r,`${e}.yaml`);if(!(0,Vo.existsSync)(n))throw new Error(`\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB '${e}' \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${n}`);let o=(0,Vo.readFileSync)(n,"utf-8");return zM(o)}var Vo,$m,ln,Pm=_(()=>{"use strict";Vo=require("node:fs"),$m=require("node:path");Sm();fk();ln="config.godd"});function Ke(e){return e instanceof Error?e.message:String(e)}var Ho=_(()=>{"use strict"});var pt=S(Ct=>{"use strict";Ct.__esModule=!0;Ct.extend=mk;Ct.indexOf=DM;Ct.escapeExpression=jM;Ct.isEmpty=MM;Ct.createFrame=LM;Ct.blockParams=ZM;Ct.appendContextPath=qM;var RM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},AM=/[&<>"'`=]/g,OM=/[&<>"'`=]/;function NM(e){return RM[e]}function mk(e){for(var t=1;t<arguments.length;t++)for(var r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&(e[r]=arguments[t][r]);return e}var Em=Object.prototype.toString;Ct.toString=Em;var Cm=function(t){return typeof t=="function"};Cm(/x/)&&(Ct.isFunction=Cm=function(e){return typeof e=="function"&&Em.call(e)==="[object Function]"});Ct.isFunction=Cm;var gk=Array.isArray||function(e){return e&&typeof e=="object"?Em.call(e)==="[object Array]":!1};Ct.isArray=gk;function DM(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function jM(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return OM.test(e)?e.replace(AM,NM):e}function MM(e){return!e&&e!==0?!0:!!(gk(e)&&e.length===0)}function LM(e){var t=mk({},e);return t._parent=e,t}function ZM(e,t){return e.path=t,e}function qM(e,t){return(e?e+".":"")+t}});var Ft=S((Vc,yk)=>{"use strict";Vc.__esModule=!0;var Im=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function zm(e,t){var r=t&&t.loc,n=void 0,o=void 0,i=void 0,s=void 0;r&&(n=r.start.line,o=r.end.line,i=r.start.column,s=r.end.column,e+=" - "+n+":"+i);for(var a=Error.prototype.constructor.call(this,e),c=0;c<Im.length;c++)this[Im[c]]=a[Im[c]];Error.captureStackTrace&&Error.captureStackTrace(this,zm);try{r&&(this.lineNumber=n,this.endLineNumber=o,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:s,enumerable:!0})):(this.column=i,this.endColumn=s))}catch{}}zm.prototype=new Error;Vc.default=zm;yk.exports=Vc.default});var vk=S((Hc,_k)=>{"use strict";Hc.__esModule=!0;var Rm=pt();Hc.default=function(e){e.registerHelper("blockHelperMissing",function(t,r){var n=r.inverse,o=r.fn;if(t===!0)return o(this);if(t===!1||t==null)return n(this);if(Rm.isArray(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):n(this);if(r.data&&r.ids){var i=Rm.createFrame(r.data);i.contextPath=Rm.appendContextPath(r.data.contextPath,r.name),r={data:i}}return o(t,r)})};_k.exports=Hc.default});var xk=S((Gc,bk)=>{"use strict";Gc.__esModule=!0;function FM(e){return e&&e.__esModule?e:{default:e}}var bs=pt(),UM=Ft(),BM=FM(UM);Gc.default=function(e){e.registerHelper("each",function(t,r){if(!r)throw new BM.default("Must pass iterator to #each");var n=r.fn,o=r.inverse,i=0,s="",a=void 0,c=void 0;r.data&&r.ids&&(c=bs.appendContextPath(r.data.contextPath,r.ids[0])+"."),bs.isFunction(t)&&(t=t.call(this)),r.data&&(a=bs.createFrame(r.data));function u(h,m,y){a&&(a.key=h,a.index=m,a.first=m===0,a.last=!!y,c&&(a.contextPath=c+h)),s=s+n(t[h],{data:a,blockParams:bs.blockParams([t[h],h],[c+h,null])})}if(t&&typeof t=="object")if(bs.isArray(t))for(var p=t.length;i<p;i++)i in t&&u(i,i,i===t.length-1);else if(typeof Symbol=="function"&&t[Symbol.iterator]){for(var l=[],d=t[Symbol.iterator](),f=d.next();!f.done;f=d.next())l.push(f.value);t=l;for(var p=t.length;i<p;i++)u(i,i,i===t.length-1)}else(function(){var h=void 0;Object.keys(t).forEach(function(m){h!==void 0&&u(h,i-1),h=m,i++}),h!==void 0&&u(h,i-1,!0)})();return i===0&&(s=o(this)),s})};bk.exports=Gc.default});var kk=S((Wc,wk)=>{"use strict";Wc.__esModule=!0;function VM(e){return e&&e.__esModule?e:{default:e}}var HM=Ft(),GM=VM(HM);Wc.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new GM.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};wk.exports=Wc.default});var Pk=S((Kc,Tk)=>{"use strict";Kc.__esModule=!0;function WM(e){return e&&e.__esModule?e:{default:e}}var Sk=pt(),KM=Ft(),$k=WM(KM);Kc.default=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2)throw new $k.default("#if requires exactly one argument");return Sk.isFunction(t)&&(t=t.call(this)),!r.hash.includeZero&&!t||Sk.isEmpty(t)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(t,r){if(arguments.length!=2)throw new $k.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};Tk.exports=Kc.default});var Ek=S((Jc,Ck)=>{"use strict";Jc.__esModule=!0;Jc.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)t.push(arguments[n]);var o=1;r.hash.level!=null?o=r.hash.level:r.data&&r.data.level!=null&&(o=r.data.level),t[0]=o,e.log.apply(e,t)})};Ck.exports=Jc.default});var zk=S((Yc,Ik)=>{"use strict";Yc.__esModule=!0;Yc.default=function(e){e.registerHelper("lookup",function(t,r,n){return t&&n.lookupProperty(t,r)})};Ik.exports=Yc.default});var Ak=S((Qc,Rk)=>{"use strict";Qc.__esModule=!0;function JM(e){return e&&e.__esModule?e:{default:e}}var xs=pt(),YM=Ft(),QM=JM(YM);Qc.default=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2)throw new QM.default("#with requires exactly one argument");xs.isFunction(t)&&(t=t.call(this));var n=r.fn;if(xs.isEmpty(t))return r.inverse(this);var o=r.data;return r.data&&r.ids&&(o=xs.createFrame(r.data),o.contextPath=xs.appendContextPath(r.data.contextPath,r.ids[0])),n(t,{data:o,blockParams:xs.blockParams([t],[o&&o.contextPath])})})};Rk.exports=Qc.default});var Am=S(Xc=>{"use strict";Xc.__esModule=!0;Xc.registerDefaultHelpers=fL;Xc.moveHelperToHooks=hL;function Yn(e){return e&&e.__esModule?e:{default:e}}var XM=vk(),eL=Yn(XM),tL=xk(),rL=Yn(tL),nL=kk(),oL=Yn(nL),iL=Pk(),sL=Yn(iL),aL=Ek(),cL=Yn(aL),uL=zk(),lL=Yn(uL),pL=Ak(),dL=Yn(pL);function fL(e){eL.default(e),rL.default(e),oL.default(e),sL.default(e),cL.default(e),lL.default(e),dL.default(e)}function hL(e,t,r){e.helpers[t]&&(e.hooks[t]=e.helpers[t],r||delete e.helpers[t])}});var Nk=S((eu,Ok)=>{"use strict";eu.__esModule=!0;var mL=pt();eu.default=function(e){e.registerDecorator("inline",function(t,r,n,o){var i=t;return r.partials||(r.partials={},i=function(s,a){var c=n.partials;n.partials=mL.extend({},c,r.partials);var u=t(s,a);return n.partials=c,u}),r.partials[o.args[0]]=o.fn,i})};Ok.exports=eu.default});var Dk=S(Om=>{"use strict";Om.__esModule=!0;Om.registerDefaultDecorators=vL;function gL(e){return e&&e.__esModule?e:{default:e}}var yL=Nk(),_L=gL(yL);function vL(e){_L.default(e)}});var Nm=S((tu,jk)=>{"use strict";tu.__esModule=!0;var bL=pt(),Go={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if(typeof t=="string"){var r=bL.indexOf(Go.methodMap,t.toLowerCase());r>=0?t=r:t=parseInt(t,10)}return t},log:function(t){if(t=Go.lookupLevel(t),typeof console<"u"&&Go.lookupLevel(Go.level)<=t){var r=Go.methodMap[t];console[r]||(r="log");for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];console[r].apply(console,o)}}};tu.default=Go;jk.exports=tu.default});var Mk=S(Dm=>{"use strict";Dm.__esModule=!0;Dm.createNewLookupObject=wL;var xL=pt();function wL(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return xL.extend.apply(void 0,[Object.create(null)].concat(t))}});var jm=S(ws=>{"use strict";ws.__esModule=!0;ws.createProtoAccessControl=TL;ws.resultIsAllowed=PL;ws.resetLoggedProperties=EL;function kL(e){return e&&e.__esModule?e:{default:e}}var Lk=Mk(),SL=Nm(),$L=kL(SL),ru=Object.create(null);function TL(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var r=Object.create(null);return r.__proto__=!1,{properties:{whitelist:Lk.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:Lk.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function PL(e,t,r){return Zk(typeof e=="function"?t.methods:t.properties,r)}function Zk(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(CL(t),!1)}function CL(e){ru[e]!==!0&&(ru[e]=!0,$L.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" because it is not an "own property" of its parent.
70
+ `+e.slice(s+1):c+=e.slice(o),c.slice(1)}function dM(e){for(var t="",r=0,n,o=0;o<e.length;r>=65536?o+=2:o++)r=vs(e,o),n=nt[r],!n&&ks(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=n||nM(r);return t}function fM(e,t,r){var n="",o=e.tag,i,s,a;for(i=0,s=r.length;i<s;i+=1)a=r[i],e.replacer&&(a=e.replacer.call(r,String(i),a)),(Ar(e,t,a,!1,!1)||typeof a>"u"&&Ar(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=o,e.dump="["+n+"]"}function Ew(e,t,r,n){var o="",i=e.tag,s,a,c;for(s=0,a=r.length;s<a;s+=1)c=r[s],e.replacer&&(c=e.replacer.call(r,String(s),c)),(Ar(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&Ar(e,t+1,null,!0,!0,!1,!0))&&((!n||o!=="")&&(o+=_m(e,t)),e.dump&&xs===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=i,e.dump=o||"[]"}function hM(e,t,r){var n="",o=e.tag,i=Object.keys(r),s,a,c,u,p;for(s=0,a=i.length;s<a;s+=1)p="",n!==""&&(p+=", "),e.condenseFlow&&(p+='"'),c=i[s],u=r[c],e.replacer&&(u=e.replacer.call(r,c,u)),Ar(e,t,c,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ar(e,t,u,!1,!1)&&(p+=e.dump,n+=p));e.tag=o,e.dump="{"+n+"}"}function mM(e,t,r,n){var o="",i=e.tag,s=Object.keys(r),a,c,u,p,l,d;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new dt("sortKeys must be a boolean or a function");for(a=0,c=s.length;a<c;a+=1)d="",(!n||o!=="")&&(d+=_m(e,t)),u=s[a],p=r[u],e.replacer&&(p=e.replacer.call(r,u,p)),Ar(e,t+1,u,!0,!0,!0)&&(l=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,l&&(e.dump&&xs===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,l&&(d+=_m(e,t)),Ar(e,t+1,p,!0,l)&&(e.dump&&xs===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,o+=d));e.tag=i,e.dump=o||"{}"}function Iw(e,t,r){var n,o,i,s,a,c;for(o=r?e.explicitTypes:e.implicitTypes,i=0,s=o.length;i<s;i+=1)if(a=o[i],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(r?a.multi&&a.representName?e.tag=a.representName(t):e.tag=a.tag:e.tag="?",a.represent){if(c=e.styleMap[a.tag]||a.defaultStyle,ck.call(a.represent)==="[object Function]")n=a.represent(t,c);else if(uk.call(a.represent,c))n=a.represent[c](t,c);else throw new dt("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');e.dump=n}return!0}return!1}function Ar(e,t,r,n,o,i,s){e.tag=null,e.dump=r,Iw(e,r,!1)||Iw(e,r,!0);var a=ck.call(e.dump),c=n,u;n&&(n=e.flowLevel<0||e.flowLevel>t);var p=a==="[object Object]"||a==="[object Array]",l,d;if(p&&(l=e.duplicates.indexOf(r),d=l!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(o=!1),d&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(p&&d&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),a==="[object Object]")n&&Object.keys(e.dump).length!==0?(mM(e,t,e.dump,o),d&&(e.dump="&ref_"+l+e.dump)):(hM(e,t,e.dump),d&&(e.dump="&ref_"+l+" "+e.dump));else if(a==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?Ew(e,t-1,e.dump,o):Ew(e,t,e.dump,o),d&&(e.dump="&ref_"+l+e.dump)):(fM(e,t,e.dump),d&&(e.dump="&ref_"+l+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&lM(e,e.dump,t,i,c);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new dt("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}function gM(e,t){var r=[],n=[],o,i;for(bm(e,r,n),o=0,i=n.length;o<i;o+=1)t.duplicates.push(r[n[o]]);t.usedDuplicates=new Array(i)}function bm(e,t,r){var n,o,i;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,i=e.length;o<i;o+=1)bm(e[o],t,r);else for(n=Object.keys(e),o=0,i=n.length;o<i;o+=1)bm(e[n[o]],t,r)}function yM(e,t){t=t||{};var r=new iM(t);r.noRefs||gM(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Ar(r,0,n,!0,!0)?r.dump+`
71
+ `:""}function Tm(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var bj,xj,wj,kj,Sj,$j,Ze,dt,Pj,Cj,Ej,Ke,Aw,Ow,Nw,Dw,jw,Mw,Lw,Zw,Vj,Wj,qw,Fw,Uw,Bw,Vw,Hw,Gw,xm,Ww,i3,s3,Kw,u3,Jw,d3,Yw,wm,fn,Bc,Qw,Xw,Vc,mm,m3,yw,g3,y3,_3,ek,tk,nk,ok,Qn,bw,D3,j3,ak,ck,uk,$m,M3,xs,L3,Z3,q3,F3,ym,U3,B3,V3,H3,lk,G3,Gc,W3,K3,J3,Y3,pk,dk,Q3,fk,X3,hk,nt,eM,tM,oM,ws,gk,vm,yk,_k,Bo,_M,vM,bM,xM,wM,kM,SM,$M,TM,PM,CM,EM,IM,zM,RM,AM,hn,Pm=_(()=>{bj=zw,xj=mj,wj=gj,kj=_j,Sj=vj,$j=yj,Ze={isNothing:bj,isObject:xj,toArray:wj,repeat:kj,isNegativeZero:Sj,extend:$j};bs.prototype=Object.create(Error.prototype);bs.prototype.constructor=bs;bs.prototype.toString=function(t){return this.name+": "+Rw(this,t)};dt=bs;Pj=Tj,Cj=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ej=["scalar","sequence","mapping"];Ke=zj;gm.prototype.extend=function(t){var r=[],n=[];if(t instanceof Ke)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new dt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(i){if(!(i instanceof Ke))throw new dt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new dt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new dt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(i){if(!(i instanceof Ke))throw new dt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(gm.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(n),o.compiledImplicit=gw(o,"implicit"),o.compiledExplicit=gw(o,"explicit"),o.compiledTypeMap=Rj(o.compiledImplicit,o.compiledExplicit),o};Aw=gm,Ow=new Ke("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Nw=new Ke("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Dw=new Ke("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),jw=new Aw({explicit:[Ow,Nw,Dw]});Mw=new Ke("tag:yaml.org,2002:null",{kind:"scalar",resolve:Aj,construct:Oj,predicate:Nj,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});Lw=new Ke("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Dj,construct:jj,predicate:Mj,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});Zw=new Ke("tag:yaml.org,2002:int",{kind:"scalar",resolve:Fj,construct:Uj,predicate:Bj,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Vj=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");Wj=/^[-+]?[0-9]+e/;qw=new Ke("tag:yaml.org,2002:float",{kind:"scalar",resolve:Hj,construct:Gj,predicate:Jj,represent:Kj,defaultStyle:"lowercase"}),Fw=jw.extend({implicit:[Mw,Lw,Zw,qw]}),Uw=Fw,Bw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Vw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");Hw=new Ke("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Yj,construct:Qj,instanceOf:Date,represent:Xj});Gw=new Ke("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e3}),xm=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
72
+ \r`;Ww=new Ke("tag:yaml.org,2002:binary",{kind:"scalar",resolve:t3,construct:r3,predicate:o3,represent:n3}),i3=Object.prototype.hasOwnProperty,s3=Object.prototype.toString;Kw=new Ke("tag:yaml.org,2002:omap",{kind:"sequence",resolve:a3,construct:c3}),u3=Object.prototype.toString;Jw=new Ke("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:l3,construct:p3}),d3=Object.prototype.hasOwnProperty;Yw=new Ke("tag:yaml.org,2002:set",{kind:"mapping",resolve:f3,construct:h3}),wm=Uw.extend({implicit:[Hw,Gw],explicit:[Ww,Kw,Jw,Yw]}),fn=Object.prototype.hasOwnProperty,Bc=1,Qw=2,Xw=3,Vc=4,mm=1,m3=2,yw=3,g3=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y3=/[\x85\u2028\u2029]/,_3=/[,\[\]\{\}]/,ek=/^(?:!|!!|![a-z\-]+!)$/i,tk=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;nk=new Array(256),ok=new Array(256);for(Qn=0;Qn<256;Qn++)nk[Qn]=vw(Qn)?1:0,ok[Qn]=vw(Qn);bw={YAML:function(t,r,n){var o,i,s;t.version!==null&&j(t,"duplication of %YAML directive"),n.length!==1&&j(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),o===null&&j(t,"ill-formed argument of the YAML directive"),i=parseInt(o[1],10),s=parseInt(o[2],10),i!==1&&j(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Hc(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var o,i;n.length!==2&&j(t,"TAG directive accepts exactly two arguments"),o=n[0],i=n[1],ek.test(o)||j(t,"ill-formed tag handle (first argument) of the TAG directive"),fn.call(t.tagMap,o)&&j(t,'there is a previously declared suffix for "'+o+'" tag handle'),tk.test(i)||j(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{j(t,"tag prefix is malformed: "+i)}t.tagMap[o]=i}};D3=O3,j3=N3,ak={loadAll:D3,load:j3},ck=Object.prototype.toString,uk=Object.prototype.hasOwnProperty,$m=65279,M3=9,xs=10,L3=13,Z3=32,q3=33,F3=34,ym=35,U3=37,B3=38,V3=39,H3=42,lk=44,G3=45,Gc=58,W3=61,K3=62,J3=63,Y3=64,pk=91,dk=93,Q3=96,fk=123,X3=124,hk=125,nt={};nt[0]="\\0";nt[7]="\\a";nt[8]="\\b";nt[9]="\\t";nt[10]="\\n";nt[11]="\\v";nt[12]="\\f";nt[13]="\\r";nt[27]="\\e";nt[34]='\\"';nt[92]="\\\\";nt[133]="\\N";nt[160]="\\_";nt[8232]="\\L";nt[8233]="\\P";eM=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],tM=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;oM=1,ws=2;gk=1,vm=2,yk=3,_k=4,Bo=5;_M=yM,vM={dump:_M};bM=Ke,xM=Aw,wM=jw,kM=Fw,SM=Uw,$M=wm,TM=ak.load,PM=ak.loadAll,CM=vM.dump,EM=dt,IM={binary:Ww,float:qw,map:Dw,null:Mw,pairs:Jw,set:Yw,timestamp:Hw,bool:Lw,int:Zw,merge:Gw,omap:Kw,seq:Nw,str:Ow},zM=Tm("safeLoad","load"),RM=Tm("safeLoadAll","loadAll"),AM=Tm("safeDump","dump"),hn={Type:bM,Schema:xM,FAILSAFE_SCHEMA:wM,JSON_SCHEMA:kM,CORE_SCHEMA:SM,DEFAULT_SCHEMA:$M,load:TM,loadAll:PM,dump:CM,YAMLException:EM,types:IM,safeLoad:zM,safeLoadAll:RM,safeDump:AM}});var OM,NM,DM,jM,MM,LM,vk,bk,xk=_(()=>{"use strict";pe();OM=m.object({id:m.string(),label:m.string(),name:m.string(),mindset_template:m.string().optional()}),NM=m.object({name:m.string(),root_dir:m.string().default("frontend"),build_command:m.string(),package_manager:m.string().default("pnpm"),mindset_template:m.string().optional()}),DM=m.object({name:m.string(),root_dir:m.string().default("backend"),architecture:m.string(),dependency_direction:m.string(),package_manager:m.string().default("uv"),mindset_template:m.string().optional()}),jM=m.object({frontend:m.string().optional(),backend:m.string().optional(),preflight_command:m.string().default("pnpm preflight"),summary:m.string().default("format/lint/typecheck/build")}),MM=m.object({name:m.string(),description:m.string(),runtime:m.enum(["python","node","unknown"]).default("unknown"),setup_hint:m.string().optional(),enabled:m.boolean().default(!0)}),LM=m.object({id:m.string(),label:m.string(),category:m.enum(["frontend","backend","testing","infra","devtool","monitoring"]),description:m.string(),url:m.string().optional(),guidance:m.string().optional()}),vk=m.object({name:m.string(),description:m.string().optional(),stacks:m.array(OM),frontend:NM.optional(),backend:DM.optional(),quality_gate:jM.optional(),vendor:m.array(MM).optional(),tools:m.array(LM).optional()}),bk=m.object({license_key:m.string().min(1,"license_key \u306F\u5FC5\u9808\u3067\u3059"),stack_profile:m.string().optional(),components:m.array(m.string().min(1,"\u7A7A\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u540D\u306F\u7121\u52B9\u3067\u3059")).optional(),language:m.string().default("en"),registry_url:m.string().default("https://godd-registry.up.railway.app")}).refine(e=>e.stack_profile!==void 0||e.components!==void 0&&e.components.length>0,{message:"Either 'stack_profile' or 'components' must be provided"})});function wk(e){let t=e??process.env.GODD_CONFIG;if(!t)throw new Error(`${Ut} \u306E\u30D1\u30B9\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002GODD_CONFIG \u74B0\u5883\u5909\u6570\u3092\u8A2D\u5B9A\u3059\u308B\u304B\u3001\u660E\u793A\u7684\u306B\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002`);if(!(0,Wo.existsSync)(t))throw new Error(`${Ut} \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${t}
73
+ GODD_CONFIG \u74B0\u5883\u5909\u6570\u307E\u305F\u306F .cursor/mcp.json \u306E env.GODD_CONFIG \u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`);let r=(0,Wo.readFileSync)(t,"utf-8"),n=hn.load(r);return bk.parse(n)}function qM(e){let t=hn.load(e);return vk.parse(t)}function Cm(e,t){if(!ZM.test(e))throw new Error(`\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u540D\u304C\u4E0D\u6B63\u3067\u3059: '${e}' \u2014 \u82F1\u6570\u5B57\u30FB\u30CF\u30A4\u30D5\u30F3\u30FB\u30C9\u30C3\u30C8\u30FB\u30A2\u30F3\u30C0\u30FC\u30B9\u30B3\u30A2\u306E\u307F\u4F7F\u7528\u53EF\u80FD\u3067\u3059\u3002`);let r=t??(0,Ss.join)(process.cwd(),"stacks"),n=(0,Ss.resolve)(r,`${e}.yaml`);if(!n.startsWith((0,Ss.resolve)(r)))throw new Error(`\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30B9\u304C\u4E0D\u6B63\u3067\u3059: '${e}'`);if(!(0,Wo.existsSync)(n))throw new Error(`\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB '${e}' \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${n}`);let o=(0,Wo.readFileSync)(n,"utf-8");return qM(o)}var Wo,Ss,ZM,Ut,Em=_(()=>{"use strict";Wo=require("node:fs"),Ss=require("node:path");Pm();xk();ZM=/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/,Ut="config.godd"});function Ne(e){return e instanceof Error?e.message:String(e)}var Ko=_(()=>{"use strict"});var ft=S(Et=>{"use strict";Et.__esModule=!0;Et.extend=kk;Et.indexOf=HM;Et.escapeExpression=GM;Et.isEmpty=WM;Et.createFrame=KM;Et.blockParams=JM;Et.appendContextPath=YM;var FM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},UM=/[&<>"'`=]/g,BM=/[&<>"'`=]/;function VM(e){return FM[e]}function kk(e){for(var t=1;t<arguments.length;t++)for(var r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&(e[r]=arguments[t][r]);return e}var zm=Object.prototype.toString;Et.toString=zm;var Im=function(t){return typeof t=="function"};Im(/x/)&&(Et.isFunction=Im=function(e){return typeof e=="function"&&zm.call(e)==="[object Function]"});Et.isFunction=Im;var Sk=Array.isArray||function(e){return e&&typeof e=="object"?zm.call(e)==="[object Array]":!1};Et.isArray=Sk;function HM(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function GM(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return BM.test(e)?e.replace(UM,VM):e}function WM(e){return!e&&e!==0?!0:!!(Sk(e)&&e.length===0)}function KM(e){var t=kk({},e);return t._parent=e,t}function JM(e,t){return e.path=t,e}function YM(e,t){return(e?e+".":"")+t}});var Bt=S((Jc,$k)=>{"use strict";Jc.__esModule=!0;var Rm=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Am(e,t){var r=t&&t.loc,n=void 0,o=void 0,i=void 0,s=void 0;r&&(n=r.start.line,o=r.end.line,i=r.start.column,s=r.end.column,e+=" - "+n+":"+i);for(var a=Error.prototype.constructor.call(this,e),c=0;c<Rm.length;c++)this[Rm[c]]=a[Rm[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Am);try{r&&(this.lineNumber=n,this.endLineNumber=o,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:s,enumerable:!0})):(this.column=i,this.endColumn=s))}catch{}}Am.prototype=new Error;Jc.default=Am;$k.exports=Jc.default});var Pk=S((Yc,Tk)=>{"use strict";Yc.__esModule=!0;var Om=ft();Yc.default=function(e){e.registerHelper("blockHelperMissing",function(t,r){var n=r.inverse,o=r.fn;if(t===!0)return o(this);if(t===!1||t==null)return n(this);if(Om.isArray(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):n(this);if(r.data&&r.ids){var i=Om.createFrame(r.data);i.contextPath=Om.appendContextPath(r.data.contextPath,r.name),r={data:i}}return o(t,r)})};Tk.exports=Yc.default});var Ek=S((Qc,Ck)=>{"use strict";Qc.__esModule=!0;function QM(e){return e&&e.__esModule?e:{default:e}}var $s=ft(),XM=Bt(),eL=QM(XM);Qc.default=function(e){e.registerHelper("each",function(t,r){if(!r)throw new eL.default("Must pass iterator to #each");var n=r.fn,o=r.inverse,i=0,s="",a=void 0,c=void 0;r.data&&r.ids&&(c=$s.appendContextPath(r.data.contextPath,r.ids[0])+"."),$s.isFunction(t)&&(t=t.call(this)),r.data&&(a=$s.createFrame(r.data));function u(h,g,y){a&&(a.key=h,a.index=g,a.first=g===0,a.last=!!y,c&&(a.contextPath=c+h)),s=s+n(t[h],{data:a,blockParams:$s.blockParams([t[h],h],[c+h,null])})}if(t&&typeof t=="object")if($s.isArray(t))for(var p=t.length;i<p;i++)i in t&&u(i,i,i===t.length-1);else if(typeof Symbol=="function"&&t[Symbol.iterator]){for(var l=[],d=t[Symbol.iterator](),f=d.next();!f.done;f=d.next())l.push(f.value);t=l;for(var p=t.length;i<p;i++)u(i,i,i===t.length-1)}else(function(){var h=void 0;Object.keys(t).forEach(function(g){h!==void 0&&u(h,i-1),h=g,i++}),h!==void 0&&u(h,i-1,!0)})();return i===0&&(s=o(this)),s})};Ck.exports=Qc.default});var zk=S((Xc,Ik)=>{"use strict";Xc.__esModule=!0;function tL(e){return e&&e.__esModule?e:{default:e}}var rL=Bt(),nL=tL(rL);Xc.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new nL.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Ik.exports=Xc.default});var Nk=S((eu,Ok)=>{"use strict";eu.__esModule=!0;function oL(e){return e&&e.__esModule?e:{default:e}}var Rk=ft(),iL=Bt(),Ak=oL(iL);eu.default=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2)throw new Ak.default("#if requires exactly one argument");return Rk.isFunction(t)&&(t=t.call(this)),!r.hash.includeZero&&!t||Rk.isEmpty(t)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(t,r){if(arguments.length!=2)throw new Ak.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};Ok.exports=eu.default});var jk=S((tu,Dk)=>{"use strict";tu.__esModule=!0;tu.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)t.push(arguments[n]);var o=1;r.hash.level!=null?o=r.hash.level:r.data&&r.data.level!=null&&(o=r.data.level),t[0]=o,e.log.apply(e,t)})};Dk.exports=tu.default});var Lk=S((ru,Mk)=>{"use strict";ru.__esModule=!0;ru.default=function(e){e.registerHelper("lookup",function(t,r,n){return t&&n.lookupProperty(t,r)})};Mk.exports=ru.default});var qk=S((nu,Zk)=>{"use strict";nu.__esModule=!0;function sL(e){return e&&e.__esModule?e:{default:e}}var Ts=ft(),aL=Bt(),cL=sL(aL);nu.default=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2)throw new cL.default("#with requires exactly one argument");Ts.isFunction(t)&&(t=t.call(this));var n=r.fn;if(Ts.isEmpty(t))return r.inverse(this);var o=r.data;return r.data&&r.ids&&(o=Ts.createFrame(r.data),o.contextPath=Ts.appendContextPath(r.data.contextPath,r.ids[0])),n(t,{data:o,blockParams:Ts.blockParams([t],[o&&o.contextPath])})})};Zk.exports=nu.default});var Nm=S(ou=>{"use strict";ou.__esModule=!0;ou.registerDefaultHelpers=kL;ou.moveHelperToHooks=SL;function eo(e){return e&&e.__esModule?e:{default:e}}var uL=Pk(),lL=eo(uL),pL=Ek(),dL=eo(pL),fL=zk(),hL=eo(fL),mL=Nk(),gL=eo(mL),yL=jk(),_L=eo(yL),vL=Lk(),bL=eo(vL),xL=qk(),wL=eo(xL);function kL(e){lL.default(e),dL.default(e),hL.default(e),gL.default(e),_L.default(e),bL.default(e),wL.default(e)}function SL(e,t,r){e.helpers[t]&&(e.hooks[t]=e.helpers[t],r||delete e.helpers[t])}});var Uk=S((iu,Fk)=>{"use strict";iu.__esModule=!0;var $L=ft();iu.default=function(e){e.registerDecorator("inline",function(t,r,n,o){var i=t;return r.partials||(r.partials={},i=function(s,a){var c=n.partials;n.partials=$L.extend({},c,r.partials);var u=t(s,a);return n.partials=c,u}),r.partials[o.args[0]]=o.fn,i})};Fk.exports=iu.default});var Bk=S(Dm=>{"use strict";Dm.__esModule=!0;Dm.registerDefaultDecorators=EL;function TL(e){return e&&e.__esModule?e:{default:e}}var PL=Uk(),CL=TL(PL);function EL(e){CL.default(e)}});var jm=S((su,Vk)=>{"use strict";su.__esModule=!0;var IL=ft(),Jo={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if(typeof t=="string"){var r=IL.indexOf(Jo.methodMap,t.toLowerCase());r>=0?t=r:t=parseInt(t,10)}return t},log:function(t){if(t=Jo.lookupLevel(t),typeof console<"u"&&Jo.lookupLevel(Jo.level)<=t){var r=Jo.methodMap[t];console[r]||(r="log");for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];console[r].apply(console,o)}}};su.default=Jo;Vk.exports=su.default});var Hk=S(Mm=>{"use strict";Mm.__esModule=!0;Mm.createNewLookupObject=RL;var zL=ft();function RL(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return zL.extend.apply(void 0,[Object.create(null)].concat(t))}});var Lm=S(Ps=>{"use strict";Ps.__esModule=!0;Ps.createProtoAccessControl=DL;Ps.resultIsAllowed=jL;Ps.resetLoggedProperties=LL;function AL(e){return e&&e.__esModule?e:{default:e}}var Gk=Hk(),OL=jm(),NL=AL(OL),au=Object.create(null);function DL(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var r=Object.create(null);return r.__proto__=!1,{properties:{whitelist:Gk.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:Gk.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function jL(e,t,r){return Wk(typeof e=="function"?t.methods:t.properties,r)}function Wk(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(ML(t),!1)}function ML(e){au[e]!==!0&&(au[e]=!0,NL.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" because it is not an "own property" of its parent.
74
74
  You can add a runtime option to disable the check or this warning:
75
- See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function EL(){Object.keys(ru).forEach(function(e){delete ru[e]})}});var ou=S(yr=>{"use strict";yr.__esModule=!0;yr.HandlebarsEnvironment=Zm;function qk(e){return e&&e.__esModule?e:{default:e}}var Qn=pt(),IL=Ft(),Mm=qk(IL),zL=Am(),RL=Dk(),AL=Nm(),nu=qk(AL),OL=jm(),NL="4.7.8";yr.VERSION=NL;var DL=8;yr.COMPILER_REVISION=DL;var jL=7;yr.LAST_COMPATIBLE_COMPILER_REVISION=jL;var ML={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};yr.REVISION_CHANGES=ML;var Lm="[object Object]";function Zm(e,t,r){this.helpers=e||{},this.partials=t||{},this.decorators=r||{},zL.registerDefaultHelpers(this),RL.registerDefaultDecorators(this)}Zm.prototype={constructor:Zm,logger:nu.default,log:nu.default.log,registerHelper:function(t,r){if(Qn.toString.call(t)===Lm){if(r)throw new Mm.default("Arg not supported with multiple helpers");Qn.extend(this.helpers,t)}else this.helpers[t]=r},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,r){if(Qn.toString.call(t)===Lm)Qn.extend(this.partials,t);else{if(typeof r>"u")throw new Mm.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=r}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,r){if(Qn.toString.call(t)===Lm){if(r)throw new Mm.default("Arg not supported with multiple decorators");Qn.extend(this.decorators,t)}else this.decorators[t]=r},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){OL.resetLoggedProperties()}};var LL=nu.default.log;yr.log=LL;yr.createFrame=Qn.createFrame;yr.logger=nu.default});var Uk=S((iu,Fk)=>{"use strict";iu.__esModule=!0;function qm(e){this.string=e}qm.prototype.toString=qm.prototype.toHTML=function(){return""+this.string};iu.default=qm;Fk.exports=iu.default});var Bk=S(Fm=>{"use strict";Fm.__esModule=!0;Fm.wrapHelper=ZL;function ZL(e,t){if(typeof e!="function")return e;var r=function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=t(o),e.apply(this,arguments)};return r}});var Kk=S(pn=>{"use strict";pn.__esModule=!0;pn.checkRevision=HL;pn.template=GL;pn.wrapProgram=su;pn.resolvePartial=WL;pn.invokePartial=KL;pn.noop=Gk;function qL(e){return e&&e.__esModule?e:{default:e}}function FL(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var UL=pt(),zr=FL(UL),BL=Ft(),Rr=qL(BL),Ar=ou(),Vk=Am(),VL=Bk(),Hk=jm();function HL(e){var t=e&&e[0]||1,r=Ar.COMPILER_REVISION;if(!(t>=Ar.LAST_COMPATIBLE_COMPILER_REVISION&&t<=Ar.COMPILER_REVISION))if(t<Ar.LAST_COMPATIBLE_COMPILER_REVISION){var n=Ar.REVISION_CHANGES[r],o=Ar.REVISION_CHANGES[t];throw new Rr.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+o+").")}else throw new Rr.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}function GL(e,t){if(!t)throw new Rr.default("No environment passed to template");if(!e||!e.main)throw new Rr.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var r=e.compiler&&e.compiler[0]===7;function n(s,a,c){c.hash&&(a=zr.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),s=t.VM.resolvePartial.call(this,s,a,c);var u=zr.extend({},c,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),p=t.VM.invokePartial.call(this,s,a,u);if(p==null&&t.compile&&(c.partials[c.name]=t.compile(s,e.compilerOptions,t),p=c.partials[c.name](a,u)),p!=null){if(c.indent){for(var l=p.split(`
75
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function LL(){Object.keys(au).forEach(function(e){delete au[e]})}});var uu=S(br=>{"use strict";br.__esModule=!0;br.HandlebarsEnvironment=Fm;function Kk(e){return e&&e.__esModule?e:{default:e}}var to=ft(),ZL=Bt(),Zm=Kk(ZL),qL=Nm(),FL=Bk(),UL=jm(),cu=Kk(UL),BL=Lm(),VL="4.7.8";br.VERSION=VL;var HL=8;br.COMPILER_REVISION=HL;var GL=7;br.LAST_COMPATIBLE_COMPILER_REVISION=GL;var WL={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};br.REVISION_CHANGES=WL;var qm="[object Object]";function Fm(e,t,r){this.helpers=e||{},this.partials=t||{},this.decorators=r||{},qL.registerDefaultHelpers(this),FL.registerDefaultDecorators(this)}Fm.prototype={constructor:Fm,logger:cu.default,log:cu.default.log,registerHelper:function(t,r){if(to.toString.call(t)===qm){if(r)throw new Zm.default("Arg not supported with multiple helpers");to.extend(this.helpers,t)}else this.helpers[t]=r},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,r){if(to.toString.call(t)===qm)to.extend(this.partials,t);else{if(typeof r>"u")throw new Zm.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=r}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,r){if(to.toString.call(t)===qm){if(r)throw new Zm.default("Arg not supported with multiple decorators");to.extend(this.decorators,t)}else this.decorators[t]=r},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){BL.resetLoggedProperties()}};var KL=cu.default.log;br.log=KL;br.createFrame=to.createFrame;br.logger=cu.default});var Yk=S((lu,Jk)=>{"use strict";lu.__esModule=!0;function Um(e){this.string=e}Um.prototype.toString=Um.prototype.toHTML=function(){return""+this.string};lu.default=Um;Jk.exports=lu.default});var Qk=S(Bm=>{"use strict";Bm.__esModule=!0;Bm.wrapHelper=JL;function JL(e,t){if(typeof e!="function")return e;var r=function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=t(o),e.apply(this,arguments)};return r}});var nS=S(mn=>{"use strict";mn.__esModule=!0;mn.checkRevision=r9;mn.template=n9;mn.wrapProgram=pu;mn.resolvePartial=o9;mn.invokePartial=i9;mn.noop=tS;function YL(e){return e&&e.__esModule?e:{default:e}}function QL(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var XL=ft(),Or=QL(XL),e9=Bt(),Nr=YL(e9),Dr=uu(),Xk=Nm(),t9=Qk(),eS=Lm();function r9(e){var t=e&&e[0]||1,r=Dr.COMPILER_REVISION;if(!(t>=Dr.LAST_COMPATIBLE_COMPILER_REVISION&&t<=Dr.COMPILER_REVISION))if(t<Dr.LAST_COMPATIBLE_COMPILER_REVISION){var n=Dr.REVISION_CHANGES[r],o=Dr.REVISION_CHANGES[t];throw new Nr.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+o+").")}else throw new Nr.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}function n9(e,t){if(!t)throw new Nr.default("No environment passed to template");if(!e||!e.main)throw new Nr.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var r=e.compiler&&e.compiler[0]===7;function n(s,a,c){c.hash&&(a=Or.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),s=t.VM.resolvePartial.call(this,s,a,c);var u=Or.extend({},c,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),p=t.VM.invokePartial.call(this,s,a,u);if(p==null&&t.compile&&(c.partials[c.name]=t.compile(s,e.compilerOptions,t),p=c.partials[c.name](a,u)),p!=null){if(c.indent){for(var l=p.split(`
76
76
  `),d=0,f=l.length;d<f&&!(!l[d]&&d+1===f);d++)l[d]=c.indent+l[d];p=l.join(`
77
- `)}return p}else throw new Rr.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}var o={strict:function(a,c,u){if(!a||!(c in a))throw new Rr.default('"'+c+'" not defined in '+a,{loc:u});return o.lookupProperty(a,c)},lookupProperty:function(a,c){var u=a[c];if(u==null||Object.prototype.hasOwnProperty.call(a,c)||Hk.resultIsAllowed(u,o.protoAccessControl,c))return u},lookup:function(a,c){for(var u=a.length,p=0;p<u;p++){var l=a[p]&&o.lookupProperty(a[p],c);if(l!=null)return a[p][c]}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:zr.escapeExpression,invokePartial:n,fn:function(a){var c=e[a];return c.decorator=e[a+"_d"],c},programs:[],program:function(a,c,u,p,l){var d=this.programs[a],f=this.fn(a);return c||l||p||u?d=su(this,a,f,c,u,p,l):d||(d=this.programs[a]=su(this,a,f)),d},data:function(a,c){for(;a&&c--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var u=a||c;return a&&c&&a!==c&&(u=zr.extend({},c,a)),u},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function i(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;i._setup(a),!a.partial&&e.useData&&(c=JL(s,c));var u=void 0,p=e.useBlockParams?[]:void 0;e.useDepths&&(a.depths?u=s!=a.depths[0]?[s].concat(a.depths):a.depths:u=[s]);function l(d){return""+e.main(o,d,o.helpers,o.partials,c,p,u)}return l=Wk(e.main,l,o,a.depths||[],c,p),l(s,a)}return i.isTop=!0,i._setup=function(s){if(s.partial)o.protoAccessControl=s.protoAccessControl,o.helpers=s.helpers,o.partials=s.partials,o.decorators=s.decorators,o.hooks=s.hooks;else{var a=zr.extend({},t.helpers,s.helpers);YL(a,o),o.helpers=a,e.usePartial&&(o.partials=o.mergeIfNeeded(s.partials,t.partials)),(e.usePartial||e.useDecorators)&&(o.decorators=zr.extend({},t.decorators,s.decorators)),o.hooks={},o.protoAccessControl=Hk.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;Vk.moveHelperToHooks(o,"helperMissing",c),Vk.moveHelperToHooks(o,"blockHelperMissing",c)}},i._child=function(s,a,c,u){if(e.useBlockParams&&!c)throw new Rr.default("must pass block params");if(e.useDepths&&!u)throw new Rr.default("must pass parent depths");return su(o,s,e[s],a,0,c,u)},i}function su(e,t,r,n,o,i,s){function a(c){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=s;return s&&c!=s[0]&&!(c===e.nullContext&&s[0]===null)&&(p=[c].concat(s)),r(e,c,e.helpers,e.partials,u.data||n,i&&[u.blockParams].concat(i),p)}return a=Wk(r,a,e,s,n,i),a.program=t,a.depth=s?s.length:0,a.blockParams=o||0,a}function WL(e,t,r){return e?!e.call&&!r.name&&(r.name=e,e=r.partials[e]):r.name==="@partial-block"?e=r.data["partial-block"]:e=r.partials[r.name],e}function KL(e,t,r){var n=r.data&&r.data["partial-block"];r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var o=void 0;if(r.fn&&r.fn!==Gk&&(function(){r.data=Ar.createFrame(r.data);var i=r.fn;o=r.data["partial-block"]=function(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=Ar.createFrame(c.data),c.data["partial-block"]=n,i(a,c)},i.partials&&(r.partials=zr.extend({},r.partials,i.partials))})(),e===void 0&&o&&(e=o),e===void 0)throw new Rr.default("The partial "+r.name+" could not be found");if(e instanceof Function)return e(t,r)}function Gk(){return""}function JL(e,t){return(!t||!("root"in t))&&(t=t?Ar.createFrame(t):{},t.root=e),t}function Wk(e,t,r,n,o,i){if(e.decorator){var s={};t=e.decorator(t,s,r,n&&n[0],o,i,n),zr.extend(t,s)}return t}function YL(e,t){Object.keys(e).forEach(function(r){var n=e[r];e[r]=QL(n,t)})}function QL(e,t){var r=t.lookupProperty;return VL.wrapHelper(e,function(n){return zr.extend({lookupProperty:r},n)})}});var Um=S((au,Jk)=>{"use strict";au.__esModule=!0;au.default=function(e){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var t=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=t),e}};Jk.exports=au.default});var tS=S((cu,eS)=>{"use strict";cu.__esModule=!0;function Vm(e){return e&&e.__esModule?e:{default:e}}function Hm(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var XL=ou(),Yk=Hm(XL),e9=Uk(),t9=Vm(e9),r9=Ft(),n9=Vm(r9),o9=pt(),Bm=Hm(o9),i9=Kk(),Qk=Hm(i9),s9=Um(),a9=Vm(s9);function Xk(){var e=new Yk.HandlebarsEnvironment;return Bm.extend(e,Yk),e.SafeString=t9.default,e.Exception=n9.default,e.Utils=Bm,e.escapeExpression=Bm.escapeExpression,e.VM=Qk,e.template=function(t){return Qk.template(t,e)},e}var ks=Xk();ks.create=Xk;a9.default(ks);ks.default=ks;cu.default=ks;eS.exports=cu.default});var Gm=S((uu,nS)=>{"use strict";uu.__esModule=!0;var rS={helpers:{helperExpression:function(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return t.parts.length===1&&!rS.helpers.scopedId(t)&&!t.depth}}};uu.default=rS;nS.exports=uu.default});var iS=S((lu,oS)=>{"use strict";lu.__esModule=!0;var c9=(function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(o,i,s,a,c,u,p){var l=u.length-1;switch(c){case 1:return u[l-1];case 2:this.$=a.prepareProgram(u[l]);break;case 3:this.$=u[l];break;case 4:this.$=u[l];break;case 5:this.$=u[l];break;case 6:this.$=u[l];break;case 7:this.$=u[l];break;case 8:this.$=u[l];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(u[l]),strip:a.stripFlags(u[l],u[l]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:u[l],value:u[l],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(u[l-2],u[l-1],u[l],this._$);break;case 12:this.$={path:u[l-3],params:u[l-2],hash:u[l-1]};break;case 13:this.$=a.prepareBlock(u[l-3],u[l-2],u[l-1],u[l],!1,this._$);break;case 14:this.$=a.prepareBlock(u[l-3],u[l-2],u[l-1],u[l],!0,this._$);break;case 15:this.$={open:u[l-5],path:u[l-4],params:u[l-3],hash:u[l-2],blockParams:u[l-1],strip:a.stripFlags(u[l-5],u[l])};break;case 16:this.$={path:u[l-4],params:u[l-3],hash:u[l-2],blockParams:u[l-1],strip:a.stripFlags(u[l-5],u[l])};break;case 17:this.$={path:u[l-4],params:u[l-3],hash:u[l-2],blockParams:u[l-1],strip:a.stripFlags(u[l-5],u[l])};break;case 18:this.$={strip:a.stripFlags(u[l-1],u[l-1]),program:u[l]};break;case 19:var d=a.prepareBlock(u[l-2],u[l-1],u[l],u[l],!1,this._$),f=a.prepareProgram([d],u[l-1].loc);f.chained=!0,this.$={strip:u[l-2].strip,program:f,chain:!0};break;case 20:this.$=u[l];break;case 21:this.$={path:u[l-1],strip:a.stripFlags(u[l-2],u[l])};break;case 22:this.$=a.prepareMustache(u[l-3],u[l-2],u[l-1],u[l-4],a.stripFlags(u[l-4],u[l]),this._$);break;case 23:this.$=a.prepareMustache(u[l-3],u[l-2],u[l-1],u[l-4],a.stripFlags(u[l-4],u[l]),this._$);break;case 24:this.$={type:"PartialStatement",name:u[l-3],params:u[l-2],hash:u[l-1],indent:"",strip:a.stripFlags(u[l-4],u[l]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(u[l-2],u[l-1],u[l],this._$);break;case 26:this.$={path:u[l-3],params:u[l-2],hash:u[l-1],strip:a.stripFlags(u[l-4],u[l])};break;case 27:this.$=u[l];break;case 28:this.$=u[l];break;case 29:this.$={type:"SubExpression",path:u[l-3],params:u[l-2],hash:u[l-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:u[l],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(u[l-2]),value:u[l],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(u[l-1]);break;case 33:this.$=u[l];break;case 34:this.$=u[l];break;case 35:this.$={type:"StringLiteral",value:u[l],original:u[l],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(u[l]),original:Number(u[l]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:u[l]==="true",original:u[l]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=u[l];break;case 41:this.$=u[l];break;case 42:this.$=a.preparePath(!0,u[l],this._$);break;case 43:this.$=a.preparePath(!1,u[l],this._$);break;case 44:u[l-2].push({part:a.id(u[l]),original:u[l],separator:u[l-1]}),this.$=u[l-2];break;case 45:this.$=[{part:a.id(u[l]),original:u[l]}];break;case 46:this.$=[];break;case 47:u[l-1].push(u[l]);break;case 48:this.$=[];break;case 49:u[l-1].push(u[l]);break;case 50:this.$=[];break;case 51:u[l-1].push(u[l]);break;case 58:this.$=[];break;case 59:u[l-1].push(u[l]);break;case 64:this.$=[];break;case 65:u[l-1].push(u[l]);break;case 70:this.$=[];break;case 71:u[l-1].push(u[l]);break;case 78:this.$=[];break;case 79:u[l-1].push(u[l]);break;case 82:this.$=[];break;case 83:u[l-1].push(u[l]);break;case 86:this.$=[];break;case 87:u[l-1].push(u[l]);break;case 90:this.$=[];break;case 91:u[l-1].push(u[l]);break;case 94:this.$=[];break;case 95:u[l-1].push(u[l]);break;case 98:this.$=[u[l]];break;case 99:u[l-1].push(u[l]);break;case 100:this.$=[u[l]];break;case 101:u[l-1].push(u[l]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(o,i){throw new Error(o)},parse:function(o){var i=this,s=[0],a=[null],c=[],u=this.table,p="",l=0,d=0,f=0,h=2,m=1;this.lexer.setInput(o),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var y=this.lexer.yylloc;c.push(y);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function v(or){s.length=s.length-2*or,a.length=a.length-or,c.length=c.length-or}function k(){var or;return or=i.lexer.lex()||1,typeof or!="number"&&(or=i.symbols_[or]||or),or}for(var C,T,U,Y,Ce,dt,ze={},Ye,zt,si,io;;){if(U=s[s.length-1],this.defaultActions[U]?Y=this.defaultActions[U]:((C===null||typeof C>"u")&&(C=k()),Y=u[U]&&u[U][C]),typeof Y>"u"||!Y.length||!Y[0]){var Lu="";if(!f){io=[];for(Ye in u[U])this.terminals_[Ye]&&Ye>2&&io.push("'"+this.terminals_[Ye]+"'");this.lexer.showPosition?Lu="Parse error on line "+(l+1)+`:
77
+ `)}return p}else throw new Nr.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}var o={strict:function(a,c,u){if(!a||!(c in a))throw new Nr.default('"'+c+'" not defined in '+a,{loc:u});return o.lookupProperty(a,c)},lookupProperty:function(a,c){var u=a[c];if(u==null||Object.prototype.hasOwnProperty.call(a,c)||eS.resultIsAllowed(u,o.protoAccessControl,c))return u},lookup:function(a,c){for(var u=a.length,p=0;p<u;p++){var l=a[p]&&o.lookupProperty(a[p],c);if(l!=null)return a[p][c]}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:Or.escapeExpression,invokePartial:n,fn:function(a){var c=e[a];return c.decorator=e[a+"_d"],c},programs:[],program:function(a,c,u,p,l){var d=this.programs[a],f=this.fn(a);return c||l||p||u?d=pu(this,a,f,c,u,p,l):d||(d=this.programs[a]=pu(this,a,f)),d},data:function(a,c){for(;a&&c--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var u=a||c;return a&&c&&a!==c&&(u=Or.extend({},c,a)),u},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function i(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;i._setup(a),!a.partial&&e.useData&&(c=s9(s,c));var u=void 0,p=e.useBlockParams?[]:void 0;e.useDepths&&(a.depths?u=s!=a.depths[0]?[s].concat(a.depths):a.depths:u=[s]);function l(d){return""+e.main(o,d,o.helpers,o.partials,c,p,u)}return l=rS(e.main,l,o,a.depths||[],c,p),l(s,a)}return i.isTop=!0,i._setup=function(s){if(s.partial)o.protoAccessControl=s.protoAccessControl,o.helpers=s.helpers,o.partials=s.partials,o.decorators=s.decorators,o.hooks=s.hooks;else{var a=Or.extend({},t.helpers,s.helpers);a9(a,o),o.helpers=a,e.usePartial&&(o.partials=o.mergeIfNeeded(s.partials,t.partials)),(e.usePartial||e.useDecorators)&&(o.decorators=Or.extend({},t.decorators,s.decorators)),o.hooks={},o.protoAccessControl=eS.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;Xk.moveHelperToHooks(o,"helperMissing",c),Xk.moveHelperToHooks(o,"blockHelperMissing",c)}},i._child=function(s,a,c,u){if(e.useBlockParams&&!c)throw new Nr.default("must pass block params");if(e.useDepths&&!u)throw new Nr.default("must pass parent depths");return pu(o,s,e[s],a,0,c,u)},i}function pu(e,t,r,n,o,i,s){function a(c){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=s;return s&&c!=s[0]&&!(c===e.nullContext&&s[0]===null)&&(p=[c].concat(s)),r(e,c,e.helpers,e.partials,u.data||n,i&&[u.blockParams].concat(i),p)}return a=rS(r,a,e,s,n,i),a.program=t,a.depth=s?s.length:0,a.blockParams=o||0,a}function o9(e,t,r){return e?!e.call&&!r.name&&(r.name=e,e=r.partials[e]):r.name==="@partial-block"?e=r.data["partial-block"]:e=r.partials[r.name],e}function i9(e,t,r){var n=r.data&&r.data["partial-block"];r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var o=void 0;if(r.fn&&r.fn!==tS&&(function(){r.data=Dr.createFrame(r.data);var i=r.fn;o=r.data["partial-block"]=function(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=Dr.createFrame(c.data),c.data["partial-block"]=n,i(a,c)},i.partials&&(r.partials=Or.extend({},r.partials,i.partials))})(),e===void 0&&o&&(e=o),e===void 0)throw new Nr.default("The partial "+r.name+" could not be found");if(e instanceof Function)return e(t,r)}function tS(){return""}function s9(e,t){return(!t||!("root"in t))&&(t=t?Dr.createFrame(t):{},t.root=e),t}function rS(e,t,r,n,o,i){if(e.decorator){var s={};t=e.decorator(t,s,r,n&&n[0],o,i,n),Or.extend(t,s)}return t}function a9(e,t){Object.keys(e).forEach(function(r){var n=e[r];e[r]=c9(n,t)})}function c9(e,t){var r=t.lookupProperty;return t9.wrapHelper(e,function(n){return Or.extend({lookupProperty:r},n)})}});var Vm=S((du,oS)=>{"use strict";du.__esModule=!0;du.default=function(e){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var t=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=t),e}};oS.exports=du.default});var uS=S((fu,cS)=>{"use strict";fu.__esModule=!0;function Gm(e){return e&&e.__esModule?e:{default:e}}function Wm(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var u9=uu(),iS=Wm(u9),l9=Yk(),p9=Gm(l9),d9=Bt(),f9=Gm(d9),h9=ft(),Hm=Wm(h9),m9=nS(),sS=Wm(m9),g9=Vm(),y9=Gm(g9);function aS(){var e=new iS.HandlebarsEnvironment;return Hm.extend(e,iS),e.SafeString=p9.default,e.Exception=f9.default,e.Utils=Hm,e.escapeExpression=Hm.escapeExpression,e.VM=sS,e.template=function(t){return sS.template(t,e)},e}var Cs=aS();Cs.create=aS;y9.default(Cs);Cs.default=Cs;fu.default=Cs;cS.exports=fu.default});var Km=S((hu,pS)=>{"use strict";hu.__esModule=!0;var lS={helpers:{helperExpression:function(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return t.parts.length===1&&!lS.helpers.scopedId(t)&&!t.depth}}};hu.default=lS;pS.exports=hu.default});var fS=S((mu,dS)=>{"use strict";mu.__esModule=!0;var _9=(function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(o,i,s,a,c,u,p){var l=u.length-1;switch(c){case 1:return u[l-1];case 2:this.$=a.prepareProgram(u[l]);break;case 3:this.$=u[l];break;case 4:this.$=u[l];break;case 5:this.$=u[l];break;case 6:this.$=u[l];break;case 7:this.$=u[l];break;case 8:this.$=u[l];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(u[l]),strip:a.stripFlags(u[l],u[l]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:u[l],value:u[l],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(u[l-2],u[l-1],u[l],this._$);break;case 12:this.$={path:u[l-3],params:u[l-2],hash:u[l-1]};break;case 13:this.$=a.prepareBlock(u[l-3],u[l-2],u[l-1],u[l],!1,this._$);break;case 14:this.$=a.prepareBlock(u[l-3],u[l-2],u[l-1],u[l],!0,this._$);break;case 15:this.$={open:u[l-5],path:u[l-4],params:u[l-3],hash:u[l-2],blockParams:u[l-1],strip:a.stripFlags(u[l-5],u[l])};break;case 16:this.$={path:u[l-4],params:u[l-3],hash:u[l-2],blockParams:u[l-1],strip:a.stripFlags(u[l-5],u[l])};break;case 17:this.$={path:u[l-4],params:u[l-3],hash:u[l-2],blockParams:u[l-1],strip:a.stripFlags(u[l-5],u[l])};break;case 18:this.$={strip:a.stripFlags(u[l-1],u[l-1]),program:u[l]};break;case 19:var d=a.prepareBlock(u[l-2],u[l-1],u[l],u[l],!1,this._$),f=a.prepareProgram([d],u[l-1].loc);f.chained=!0,this.$={strip:u[l-2].strip,program:f,chain:!0};break;case 20:this.$=u[l];break;case 21:this.$={path:u[l-1],strip:a.stripFlags(u[l-2],u[l])};break;case 22:this.$=a.prepareMustache(u[l-3],u[l-2],u[l-1],u[l-4],a.stripFlags(u[l-4],u[l]),this._$);break;case 23:this.$=a.prepareMustache(u[l-3],u[l-2],u[l-1],u[l-4],a.stripFlags(u[l-4],u[l]),this._$);break;case 24:this.$={type:"PartialStatement",name:u[l-3],params:u[l-2],hash:u[l-1],indent:"",strip:a.stripFlags(u[l-4],u[l]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(u[l-2],u[l-1],u[l],this._$);break;case 26:this.$={path:u[l-3],params:u[l-2],hash:u[l-1],strip:a.stripFlags(u[l-4],u[l])};break;case 27:this.$=u[l];break;case 28:this.$=u[l];break;case 29:this.$={type:"SubExpression",path:u[l-3],params:u[l-2],hash:u[l-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:u[l],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(u[l-2]),value:u[l],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(u[l-1]);break;case 33:this.$=u[l];break;case 34:this.$=u[l];break;case 35:this.$={type:"StringLiteral",value:u[l],original:u[l],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(u[l]),original:Number(u[l]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:u[l]==="true",original:u[l]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=u[l];break;case 41:this.$=u[l];break;case 42:this.$=a.preparePath(!0,u[l],this._$);break;case 43:this.$=a.preparePath(!1,u[l],this._$);break;case 44:u[l-2].push({part:a.id(u[l]),original:u[l],separator:u[l-1]}),this.$=u[l-2];break;case 45:this.$=[{part:a.id(u[l]),original:u[l]}];break;case 46:this.$=[];break;case 47:u[l-1].push(u[l]);break;case 48:this.$=[];break;case 49:u[l-1].push(u[l]);break;case 50:this.$=[];break;case 51:u[l-1].push(u[l]);break;case 58:this.$=[];break;case 59:u[l-1].push(u[l]);break;case 64:this.$=[];break;case 65:u[l-1].push(u[l]);break;case 70:this.$=[];break;case 71:u[l-1].push(u[l]);break;case 78:this.$=[];break;case 79:u[l-1].push(u[l]);break;case 82:this.$=[];break;case 83:u[l-1].push(u[l]);break;case 86:this.$=[];break;case 87:u[l-1].push(u[l]);break;case 90:this.$=[];break;case 91:u[l-1].push(u[l]);break;case 94:this.$=[];break;case 95:u[l-1].push(u[l]);break;case 98:this.$=[u[l]];break;case 99:u[l-1].push(u[l]);break;case 100:this.$=[u[l]];break;case 101:u[l-1].push(u[l]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(o,i){throw new Error(o)},parse:function(o){var i=this,s=[0],a=[null],c=[],u=this.table,p="",l=0,d=0,f=0,h=2,g=1;this.lexer.setInput(o),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var y=this.lexer.yylloc;c.push(y);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function v(ar){s.length=s.length-2*ar,a.length=a.length-ar,c.length=c.length-ar}function k(){var ar;return ar=i.lexer.lex()||1,typeof ar!="number"&&(ar=i.symbols_[ar]||ar),ar}for(var C,T,F,Y,Ie,ht,we={},Qe,Rt,li,uo;;){if(F=s[s.length-1],this.defaultActions[F]?Y=this.defaultActions[F]:((C===null||typeof C>"u")&&(C=k()),Y=u[F]&&u[F][C]),typeof Y>"u"||!Y.length||!Y[0]){var Fu="";if(!f){uo=[];for(Qe in u[F])this.terminals_[Qe]&&Qe>2&&uo.push("'"+this.terminals_[Qe]+"'");this.lexer.showPosition?Fu="Parse error on line "+(l+1)+`:
78
78
  `+this.lexer.showPosition()+`
79
- Expecting `+io.join(", ")+", got '"+(this.terminals_[C]||C)+"'":Lu="Parse error on line "+(l+1)+": Unexpected "+(C==1?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(Lu,{text:this.lexer.match,token:this.terminals_[C]||C,line:this.lexer.yylineno,loc:y,expected:io})}}if(Y[0]instanceof Array&&Y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+C);switch(Y[0]){case 1:s.push(C),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(Y[1]),C=null,T?(C=T,T=null):(d=this.lexer.yyleng,p=this.lexer.yytext,l=this.lexer.yylineno,y=this.lexer.yylloc,f>0&&f--);break;case 2:if(zt=this.productions_[Y[1]][1],ze.$=a[a.length-zt],ze._$={first_line:c[c.length-(zt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(zt||1)].first_column,last_column:c[c.length-1].last_column},b&&(ze._$.range=[c[c.length-(zt||1)].range[0],c[c.length-1].range[1]]),dt=this.performAction.call(ze,p,d,l,this.yy,Y[1],a,c),typeof dt<"u")return dt;zt&&(s=s.slice(0,-1*zt*2),a=a.slice(0,-1*zt),c=c.slice(0,-1*zt)),s.push(this.productions_[Y[1]][0]),a.push(ze.$),c.push(ze._$),si=u[s[s.length-2]][s[s.length-1]],s.push(si);break;case 3:return!0}}return!0}},t=(function(){var n={EOF:1,parseError:function(i,s){if(this.yy.parser)this.yy.parser.parseError(i,s);else throw new Error(i)},setInput:function(i){return this._input=i,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var s=i.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var s=i.length,a=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-s]),this},more:function(){return this._more=!0,this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),s=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
79
+ Expecting `+uo.join(", ")+", got '"+(this.terminals_[C]||C)+"'":Fu="Parse error on line "+(l+1)+": Unexpected "+(C==1?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(Fu,{text:this.lexer.match,token:this.terminals_[C]||C,line:this.lexer.yylineno,loc:y,expected:uo})}}if(Y[0]instanceof Array&&Y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+C);switch(Y[0]){case 1:s.push(C),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(Y[1]),C=null,T?(C=T,T=null):(d=this.lexer.yyleng,p=this.lexer.yytext,l=this.lexer.yylineno,y=this.lexer.yylloc,f>0&&f--);break;case 2:if(Rt=this.productions_[Y[1]][1],we.$=a[a.length-Rt],we._$={first_line:c[c.length-(Rt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Rt||1)].first_column,last_column:c[c.length-1].last_column},b&&(we._$.range=[c[c.length-(Rt||1)].range[0],c[c.length-1].range[1]]),ht=this.performAction.call(we,p,d,l,this.yy,Y[1],a,c),typeof ht<"u")return ht;Rt&&(s=s.slice(0,-1*Rt*2),a=a.slice(0,-1*Rt),c=c.slice(0,-1*Rt)),s.push(this.productions_[Y[1]][0]),a.push(we.$),c.push(we._$),li=u[s[s.length-2]][s[s.length-1]],s.push(li);break;case 3:return!0}}return!0}},t=(function(){var n={EOF:1,parseError:function(i,s){if(this.yy.parser)this.yy.parser.parseError(i,s);else throw new Error(i)},setInput:function(i){return this._input=i,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var s=i.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var s=i.length,a=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-s]),this},more:function(){return this._more=!0,this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),s=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
80
80
  `+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,s,a,c,u,p;this._more||(this.yytext="",this.match="");for(var l=this._currentRules(),d=0;d<l.length&&(a=this._input.match(this.rules[l[d]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,c=d,!this.options.flex)));d++);return s?(p=s[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],i=this.performAction.call(this,this.yy,this,l[c],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
81
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var i=this.next();return typeof i<"u"?i:this.lex()},begin:function(i){this.conditionStack.push(i)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(i){this.begin(i)}};return n.options={},n.performAction=function(i,s,a,c){function u(l,d){return s.yytext=s.yytext.substring(l,s.yyleng-d+l)}var p=c;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(u(0,1),this.begin("emu")):this.begin("mu"),s.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(u(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(s.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return s.yytext=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=u(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return s.yytext=s.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();e.lexer=t;function r(){this.yy={}}return r.prototype=e,e.Parser=r,new r})();lu.default=c9;oS.exports=lu.default});var hu=S((fu,cS)=>{"use strict";fu.__esModule=!0;function u9(e){return e&&e.__esModule?e:{default:e}}var l9=Ft(),Wm=u9(l9);function pu(){this.parents=[]}pu.prototype={constructor:pu,mutating:!1,acceptKey:function(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!pu.prototype[n.type])throw new Wm.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+t.type);t[r]=n}},acceptRequired:function(t,r){if(this.acceptKey(t,r),!t[r])throw new Wm.default(t.type+" requires "+r)},acceptArray:function(t){for(var r=0,n=t.length;r<n;r++)this.acceptKey(t,r),t[r]||(t.splice(r,1),r--,n--)},accept:function(t){if(t){if(!this[t.type])throw new Wm.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var r=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return t}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:du,Decorator:du,BlockStatement:sS,DecoratorBlock:sS,PartialStatement:aS,PartialBlockStatement:function(t){aS.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:du,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}};function du(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function sS(e){du.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function aS(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}fu.default=pu;cS.exports=fu.default});var lS=S((mu,uS)=>{"use strict";mu.__esModule=!0;function p9(e){return e&&e.__esModule?e:{default:e}}var d9=hu(),f9=p9(d9);function _r(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}_r.prototype=new f9.default;_r.prototype.Program=function(e){var t=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=e.body,o=0,i=n.length;o<i;o++){var s=n[o],a=this.accept(s);if(a){var c=Km(n,o,r),u=Jm(n,o,r),p=a.openStandalone&&c,l=a.closeStandalone&&u,d=a.inlineStandalone&&c&&u;a.close&&Xn(n,o,!0),a.open&&dn(n,o,!0),t&&d&&(Xn(n,o),dn(n,o)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[o-1].original)[1])),t&&p&&(Xn((s.program||s.inverse).body),dn(n,o)),t&&l&&(Xn(n,o),dn((s.inverse||s.program).body))}}return e};_r.prototype.BlockStatement=_r.prototype.DecoratorBlock=_r.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,r=e.program&&e.inverse,n=r,o=r;if(r&&r.chained)for(n=r.body[0].program;o.chained;)o=o.body[o.body.length-1].program;var i={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:Jm(t.body),closeStandalone:Km((n||t).body)};if(e.openStrip.close&&Xn(t.body,null,!0),r){var s=e.inverseStrip;s.open&&dn(t.body,null,!0),s.close&&Xn(n.body,null,!0),e.closeStrip.open&&dn(o.body,null,!0),!this.options.ignoreStandalone&&Km(t.body)&&Jm(n.body)&&(dn(t.body),Xn(n.body))}else e.closeStrip.open&&dn(t.body,null,!0);return i};_r.prototype.Decorator=_r.prototype.MustacheStatement=function(e){return e.strip};_r.prototype.PartialStatement=_r.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function Km(e,t,r){t===void 0&&(t=e.length);var n=e[t-1],o=e[t-2];if(!n)return r;if(n.type==="ContentStatement")return(o||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function Jm(e,t,r){t===void 0&&(t=-1);var n=e[t+1],o=e[t+2];if(!n)return r;if(n.type==="ContentStatement")return(o||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function Xn(e,t,r){var n=e[t==null?0:t+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var o=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==o}}function dn(e,t,r){var n=e[t==null?e.length-1:t-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var o=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==o,n.leftStripped}}mu.default=_r;uS.exports=mu.default});var pS=S(Ut=>{"use strict";Ut.__esModule=!0;Ut.SourceLocation=g9;Ut.id=y9;Ut.stripFlags=_9;Ut.stripComment=v9;Ut.preparePath=b9;Ut.prepareMustache=x9;Ut.prepareRawBlock=w9;Ut.prepareBlock=k9;Ut.prepareProgram=S9;Ut.preparePartialBlock=$9;function h9(e){return e&&e.__esModule?e:{default:e}}var m9=Ft(),Ym=h9(m9);function Qm(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new Ym.default(e.path.original+" doesn't match "+t,r)}}function g9(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}function y9(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function _9(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}function v9(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function b9(e,t,r){r=this.locInfo(r);for(var n=e?"@":"",o=[],i=0,s=0,a=t.length;s<a;s++){var c=t[s].part,u=t[s].original!==c;if(n+=(t[s].separator||"")+c,!u&&(c===".."||c==="."||c==="this")){if(o.length>0)throw new Ym.default("Invalid path: "+n,{loc:r});c===".."&&i++}else o.push(c)}return{type:"PathExpression",data:e,depth:i,parts:o,original:n,loc:r}}function x9(e,t,r,n,o,i){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:a,strip:o,loc:this.locInfo(i)}}function w9(e,t,r,n){Qm(e,r),n=this.locInfo(n);var o={type:"Program",body:t,strip:{},loc:n};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:o,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function k9(e,t,r,n,o,i){n&&n.path&&Qm(e,n);var s=/\*/.test(e.open);t.blockParams=e.blockParams;var a=void 0,c=void 0;if(r){if(s)throw new Ym.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,a=r.program}return o&&(o=a,a=t,t=o),{type:s?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:a,openStrip:e.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(i)}}function S9(e,t){if(!t&&e.length){var r=e[0].loc,n=e[e.length-1].loc;r&&n&&(t={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:e,strip:{},loc:t}}function $9(e,t,r,n){return Qm(e,r),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var hS=S(Ss=>{"use strict";Ss.__esModule=!0;Ss.parseWithoutProcessing=fS;Ss.parse=A9;function T9(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function dS(e){return e&&e.__esModule?e:{default:e}}var P9=iS(),Xm=dS(P9),C9=lS(),E9=dS(C9),I9=pS(),z9=T9(I9),R9=pt();Ss.parser=Xm.default;var gu={};R9.extend(gu,z9);function fS(e,t){if(e.type==="Program")return e;Xm.default.yy=gu,gu.locInfo=function(n){return new gu.SourceLocation(t&&t.srcName,n)};var r=Xm.default.parse(e);return r}function A9(e,t){var r=fS(e,t),n=new E9.default(t);return n.accept(r)}});var _S=S(Cs=>{"use strict";Cs.__esModule=!0;Cs.Compiler=eg;Cs.precompile=j9;Cs.compile=M9;function gS(e){return e&&e.__esModule?e:{default:e}}var O9=Ft(),Ts=gS(O9),Ps=pt(),N9=Gm(),$s=gS(N9),D9=[].slice;function eg(){}eg.prototype={compiler:eg,equals:function(t){var r=this.opcodes.length;if(t.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var o=this.opcodes[n],i=t.opcodes[n];if(o.opcode!==i.opcode||!yS(o.args,i.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},guid:0,compile:function(t,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=Ps.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(t)},compileProgram:function(t){var r=new this.compiler,n=r.compile(t,this.options),o=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[o]=n,this.useDepths=this.useDepths||n.useDepths,o},accept:function(t){if(!this[t.type])throw new Ts.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var r=this[t.type](t);return this.sourceNode.shift(),r},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var r=t.body,n=r.length,o=0;o<n;o++)this.accept(r[o]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){mS(t);var r=t.program,n=t.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var o=this.classifySexpr(t);o==="helper"?this.helperSexpr(t,r,n):o==="simple"?(this.simpleSexpr(t),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var r=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,r,void 0),o=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,o.original)},PartialStatement:function(t){this.usePartial=!0;var r=t.program;r&&(r=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new Ts.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var o=t.name.original,i=t.name.type==="SubExpression";i&&this.accept(t.name),this.setupFullMustacheParams(t,r,void 0,!0);var s=t.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",i,o,s),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){mS(t);var r=this.classifySexpr(t);r==="simple"?this.simpleSexpr(t):r==="helper"?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,r,n){var o=t.path,i=o.parts[0],s=r!=null||n!=null;this.opcode("getContext",o.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",n),o.strict=!0,this.accept(o),this.opcode("invokeAmbiguous",i,s)},simpleSexpr:function(t){var r=t.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,r,n){var o=this.setupFullMustacheParams(t,r,n),i=t.path,s=i.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",o.length,s);else{if(this.options.knownHelpersOnly)throw new Ts.default("You specified knownHelpersOnly, but used the unknown helper "+s,t);i.strict=!0,i.falsy=!0,this.accept(i),this.opcode("invokeHelper",o.length,i.original,$s.default.helpers.simpleId(i))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var r=t.parts[0],n=$s.default.helpers.scopedId(t),o=!t.depth&&!n&&this.blockParamIndex(r);o?this.opcode("lookupBlockParam",o,t.parts):r?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var r=t.pairs,n=0,o=r.length;for(this.opcode("pushHash");n<o;n++)this.pushParam(r[n].value);for(;n--;)this.opcode("assignToHash",r[n].key);this.opcode("popHash")},opcode:function(t){this.opcodes.push({opcode:t,args:D9.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var r=$s.default.helpers.simpleId(t.path),n=r&&!!this.blockParamIndex(t.path.parts[0]),o=!n&&$s.default.helpers.helperExpression(t),i=!n&&(o||r);if(i&&!o){var s=t.path.parts[0],a=this.options;a.knownHelpers[s]?o=!0:a.knownHelpersOnly&&(i=!1)}return o?"helper":i?"ambiguous":"simple"},pushParams:function(t){for(var r=0,n=t.length;r<n;r++)this.pushParam(t[r])},pushParam:function(t){var r=t.value!=null?t.value:t.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",r,t.type),t.type==="SubExpression"&&this.accept(t);else{if(this.trackIds){var n=void 0;if(t.parts&&!$s.default.helpers.scopedId(t)&&!t.depth&&(n=this.blockParamIndex(t.parts[0])),n){var o=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,o)}else r=t.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,r)}this.accept(t)}},setupFullMustacheParams:function(t,r,n,o){var i=t.params;return this.pushParams(i),this.opcode("pushProgram",r),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",o),i},blockParamIndex:function(t){for(var r=0,n=this.options.blockParams.length;r<n;r++){var o=this.options.blockParams[r],i=o&&Ps.indexOf(o,t);if(o&&i>=0)return[r,i]}}};function j9(e,t,r){if(e==null||typeof e!="string"&&e.type!=="Program")throw new Ts.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);t=t||{},"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=r.parse(e,t),o=new r.Compiler().compile(n,t);return new r.JavaScriptCompiler().compile(o,t)}function M9(e,t,r){if(t===void 0&&(t={}),e==null||typeof e!="string"&&e.type!=="Program")throw new Ts.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=Ps.extend({},t),"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=void 0;function o(){var s=r.parse(e,t),a=new r.Compiler().compile(s,t),c=new r.JavaScriptCompiler().compile(a,t,void 0,!0);return r.template(c)}function i(s,a){return n||(n=o()),n.call(this,s,a)}return i._setup=function(s){return n||(n=o()),n._setup(s)},i._child=function(s,a,c,u){return n||(n=o()),n._child(s,a,c,u)},i}function yS(e,t){if(e===t)return!0;if(Ps.isArray(e)&&Ps.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++)if(!yS(e[r],t[r]))return!1;return!0}}function mS(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}});var bS=S(tg=>{var vS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");tg.encode=function(e){if(0<=e&&e<vS.length)return vS[e];throw new TypeError("Must be between 0 and 63: "+e)};tg.decode=function(e){var t=65,r=90,n=97,o=122,i=48,s=57,a=43,c=47,u=26,p=52;return t<=e&&e<=r?e-t:n<=e&&e<=o?e-n+u:i<=e&&e<=s?e-i+p:e==a?62:e==c?63:-1}});var og=S(ng=>{var xS=bS(),rg=5,wS=1<<rg,kS=wS-1,SS=wS;function L9(e){return e<0?(-e<<1)+1:(e<<1)+0}function Z9(e){var t=(e&1)===1,r=e>>1;return t?-r:r}ng.encode=function(t){var r="",n,o=L9(t);do n=o&kS,o>>>=rg,o>0&&(n|=SS),r+=xS.encode(n);while(o>0);return r};ng.decode=function(t,r,n){var o=t.length,i=0,s=0,a,c;do{if(r>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(c=xS.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));a=!!(c&SS),c&=kS,i=i+(c<<s),s+=rg}while(a);n.value=Z9(i),n.rest=r}});var Jo=S(nt=>{function q9(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}nt.getArg=q9;var $S=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,F9=/^data:.+\,.+$/;function Es(e){var t=e.match($S);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}nt.urlParse=Es;function Wo(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}nt.urlGenerate=Wo;function ig(e){var t=e,r=Es(e);if(r){if(!r.path)return e;t=r.path}for(var n=nt.isAbsolute(t),o=t.split(/\/+/),i,s=0,a=o.length-1;a>=0;a--)i=o[a],i==="."?o.splice(a,1):i===".."?s++:s>0&&(i===""?(o.splice(a+1,s),s=0):(o.splice(a,2),s--));return t=o.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,Wo(r)):t}nt.normalize=ig;function TS(e,t){e===""&&(e="."),t===""&&(t=".");var r=Es(t),n=Es(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Wo(r);if(r||t.match(F9))return t;if(n&&!n.host&&!n.path)return n.host=t,Wo(n);var o=t.charAt(0)==="/"?t:ig(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,Wo(n)):o}nt.join=TS;nt.isAbsolute=function(e){return e.charAt(0)==="/"||$S.test(e)};function U9(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}nt.relative=U9;var PS=(function(){var e=Object.create(null);return!("__proto__"in e)})();function CS(e){return e}function B9(e){return ES(e)?"$"+e:e}nt.toSetString=PS?CS:B9;function V9(e){return ES(e)?e.slice(1):e}nt.fromSetString=PS?CS:V9;function ES(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function H9(e,t,r){var n=Ko(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:Ko(e.name,t.name)}nt.compareByOriginalPositions=H9;function G9(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=Ko(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:Ko(e.name,t.name)}nt.compareByGeneratedPositionsDeflated=G9;function Ko(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function W9(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=Ko(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:Ko(e.name,t.name)}nt.compareByGeneratedPositionsInflated=W9;function K9(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}nt.parseSourceMapInput=K9;function J9(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=Es(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1))}t=TS(Wo(n),t)}return ig(t)}nt.computeSourceURL=J9});var cg=S(IS=>{var sg=Jo(),ag=Object.prototype.hasOwnProperty,eo=typeof Map<"u";function Or(){this._array=[],this._set=eo?new Map:Object.create(null)}Or.fromArray=function(t,r){for(var n=new Or,o=0,i=t.length;o<i;o++)n.add(t[o],r);return n};Or.prototype.size=function(){return eo?this._set.size:Object.getOwnPropertyNames(this._set).length};Or.prototype.add=function(t,r){var n=eo?t:sg.toSetString(t),o=eo?this.has(t):ag.call(this._set,n),i=this._array.length;(!o||r)&&this._array.push(t),o||(eo?this._set.set(t,i):this._set[n]=i)};Or.prototype.has=function(t){if(eo)return this._set.has(t);var r=sg.toSetString(t);return ag.call(this._set,r)};Or.prototype.indexOf=function(t){if(eo){var r=this._set.get(t);if(r>=0)return r}else{var n=sg.toSetString(t);if(ag.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};Or.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};Or.prototype.toArray=function(){return this._array.slice()};IS.ArraySet=Or});var AS=S(RS=>{var zS=Jo();function Y9(e,t){var r=e.generatedLine,n=t.generatedLine,o=e.generatedColumn,i=t.generatedColumn;return n>r||n==r&&i>=o||zS.compareByGeneratedPositionsInflated(e,t)<=0}function yu(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}yu.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};yu.prototype.add=function(t){Y9(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};yu.prototype.toArray=function(){return this._sorted||(this._array.sort(zS.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};RS.MappingList=yu});var ug=S(OS=>{var Is=og(),je=Jo(),_u=cg().ArraySet,Q9=AS().MappingList;function Bt(e){e||(e={}),this._file=je.getArg(e,"file",null),this._sourceRoot=je.getArg(e,"sourceRoot",null),this._skipValidation=je.getArg(e,"skipValidation",!1),this._sources=new _u,this._names=new _u,this._mappings=new Q9,this._sourcesContents=null}Bt.prototype._version=3;Bt.fromSourceMap=function(t){var r=t.sourceRoot,n=new Bt({file:t.file,sourceRoot:r});return t.eachMapping(function(o){var i={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(i.source=o.source,r!=null&&(i.source=je.relative(r,i.source)),i.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(i.name=o.name)),n.addMapping(i)}),t.sources.forEach(function(o){var i=o;r!==null&&(i=je.relative(r,o)),n._sources.has(i)||n._sources.add(i);var s=t.sourceContentFor(o);s!=null&&n.setSourceContent(o,s)}),n};Bt.prototype.addMapping=function(t){var r=je.getArg(t,"generated"),n=je.getArg(t,"original",null),o=je.getArg(t,"source",null),i=je.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,o,i),o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:o,name:i})};Bt.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=je.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[je.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[je.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Bt.prototype.applySourceMap=function(t,r,n){var o=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=t.file}var i=this._sourceRoot;i!=null&&(o=je.relative(i,o));var s=new _u,a=new _u;this._mappings.unsortedForEach(function(c){if(c.source===o&&c.originalLine!=null){var u=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=je.join(n,c.source)),i!=null&&(c.source=je.relative(i,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var p=c.source;p!=null&&!s.has(p)&&s.add(p);var l=c.name;l!=null&&!a.has(l)&&a.add(l)},this),this._sources=s,this._names=a,t.sources.forEach(function(c){var u=t.sourceContentFor(c);u!=null&&(n!=null&&(c=je.join(n,c)),i!=null&&(c=je.relative(i,c)),this.setSourceContent(c,u))},this)};Bt.prototype._validateMapping=function(t,r,n,o){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!o)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:o}))}};Bt.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,o=0,i=0,s=0,a="",c,u,p,l,d=this._mappings.toArray(),f=0,h=d.length;f<h;f++){if(u=d[f],c="",u.generatedLine!==r)for(t=0;u.generatedLine!==r;)c+=";",r++;else if(f>0){if(!je.compareByGeneratedPositionsInflated(u,d[f-1]))continue;c+=","}c+=Is.encode(u.generatedColumn-t),t=u.generatedColumn,u.source!=null&&(l=this._sources.indexOf(u.source),c+=Is.encode(l-s),s=l,c+=Is.encode(u.originalLine-1-o),o=u.originalLine-1,c+=Is.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(p=this._names.indexOf(u.name),c+=Is.encode(p-i),i=p)),a+=c}return a};Bt.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=je.relative(r,n));var o=je.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};Bt.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};Bt.prototype.toString=function(){return JSON.stringify(this.toJSON())};OS.SourceMapGenerator=Bt});var NS=S(to=>{to.GREATEST_LOWER_BOUND=1;to.LEAST_UPPER_BOUND=2;function lg(e,t,r,n,o,i){var s=Math.floor((t-e)/2)+e,a=o(r,n[s],!0);return a===0?s:a>0?t-s>1?lg(s,t,r,n,o,i):i==to.LEAST_UPPER_BOUND?t<n.length?t:-1:s:s-e>1?lg(e,s,r,n,o,i):i==to.LEAST_UPPER_BOUND?s:e<0?-1:e}to.search=function(t,r,n,o){if(r.length===0)return-1;var i=lg(-1,r.length,t,r,n,o||to.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&n(r[i],r[i-1],!0)===0;)--i;return i}});var jS=S(DS=>{function pg(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function X9(e,t){return Math.round(e+Math.random()*(t-e))}function dg(e,t,r,n){if(r<n){var o=X9(r,n),i=r-1;pg(e,o,n);for(var s=e[n],a=r;a<n;a++)t(e[a],s)<=0&&(i+=1,pg(e,i,a));pg(e,i+1,a);var c=i+1;dg(e,t,r,c-1),dg(e,t,c+1,n)}}DS.quickSort=function(e,t){dg(e,t,0,e.length-1)}});var LS=S(vu=>{var R=Jo(),fg=NS(),Yo=cg().ArraySet,eZ=og(),zs=jS().quickSort;function we(e,t){var r=e;return typeof e=="string"&&(r=R.parseSourceMapInput(e)),r.sections!=null?new er(r,t):new Je(r,t)}we.fromSourceMap=function(e,t){return Je.fromSourceMap(e,t)};we.prototype._version=3;we.prototype.__generatedMappings=null;Object.defineProperty(we.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});we.prototype.__originalMappings=null;Object.defineProperty(we.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});we.prototype._charIsMappingSeparator=function(t,r){var n=t.charAt(r);return n===";"||n===","};we.prototype._parseMappings=function(t,r){throw new Error("Subclasses must implement _parseMappings")};we.GENERATED_ORDER=1;we.ORIGINAL_ORDER=2;we.GREATEST_LOWER_BOUND=1;we.LEAST_UPPER_BOUND=2;we.prototype.eachMapping=function(t,r,n){var o=r||null,i=n||we.GENERATED_ORDER,s;switch(i){case we.GENERATED_ORDER:s=this._generatedMappings;break;case we.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(c){var u=c.source===null?null:this._sources.at(c.source);return u=R.computeSourceURL(a,u,this._sourceMapURL),{source:u,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(t,o)};we.prototype.allGeneratedPositionsFor=function(t){var r=R.getArg(t,"line"),n={source:R.getArg(t,"source"),originalLine:r,originalColumn:R.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var o=[],i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",R.compareByOriginalPositions,fg.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(t.column===void 0)for(var a=s.originalLine;s&&s.originalLine===a;)o.push({line:R.getArg(s,"generatedLine",null),column:R.getArg(s,"generatedColumn",null),lastColumn:R.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var c=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==c;)o.push({line:R.getArg(s,"generatedLine",null),column:R.getArg(s,"generatedColumn",null),lastColumn:R.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return o};vu.SourceMapConsumer=we;function Je(e,t){var r=e;typeof e=="string"&&(r=R.parseSourceMapInput(e));var n=R.getArg(r,"version"),o=R.getArg(r,"sources"),i=R.getArg(r,"names",[]),s=R.getArg(r,"sourceRoot",null),a=R.getArg(r,"sourcesContent",null),c=R.getArg(r,"mappings"),u=R.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=R.normalize(s)),o=o.map(String).map(R.normalize).map(function(p){return s&&R.isAbsolute(s)&&R.isAbsolute(p)?R.relative(s,p):p}),this._names=Yo.fromArray(i.map(String),!0),this._sources=Yo.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(p){return R.computeSourceURL(s,p,t)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=t,this.file=u}Je.prototype=Object.create(we.prototype);Je.prototype.consumer=we;Je.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=R.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};Je.fromSourceMap=function(t,r){var n=Object.create(Je.prototype),o=n._names=Yo.fromArray(t._names.toArray(),!0),i=n._sources=Yo.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(f){return R.computeSourceURL(n.sourceRoot,f,r)});for(var s=t._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],u=0,p=s.length;u<p;u++){var l=s[u],d=new MS;d.generatedLine=l.generatedLine,d.generatedColumn=l.generatedColumn,l.source&&(d.source=i.indexOf(l.source),d.originalLine=l.originalLine,d.originalColumn=l.originalColumn,l.name&&(d.name=o.indexOf(l.name)),c.push(d)),a.push(d)}return zs(n.__originalMappings,R.compareByOriginalPositions),n};Je.prototype._version=3;Object.defineProperty(Je.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function MS(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Je.prototype._parseMappings=function(t,r){for(var n=1,o=0,i=0,s=0,a=0,c=0,u=t.length,p=0,l={},d={},f=[],h=[],m,y,b,v,k;p<u;)if(t.charAt(p)===";")n++,p++,o=0;else if(t.charAt(p)===",")p++;else{for(m=new MS,m.generatedLine=n,v=p;v<u&&!this._charIsMappingSeparator(t,v);v++);if(y=t.slice(p,v),b=l[y],b)p+=y.length;else{for(b=[];p<v;)eZ.decode(t,p,d),k=d.value,p=d.rest,b.push(k);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");l[y]=b}m.generatedColumn=o+b[0],o=m.generatedColumn,b.length>1&&(m.source=a+b[1],a+=b[1],m.originalLine=i+b[2],i=m.originalLine,m.originalLine+=1,m.originalColumn=s+b[3],s=m.originalColumn,b.length>4&&(m.name=c+b[4],c+=b[4])),h.push(m),typeof m.originalLine=="number"&&f.push(m)}zs(h,R.compareByGeneratedPositionsDeflated),this.__generatedMappings=h,zs(f,R.compareByOriginalPositions),this.__originalMappings=f};Je.prototype._findMapping=function(t,r,n,o,i,s){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[o]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[o]);return fg.search(t,r,i,s)};Je.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};Je.prototype.originalPositionFor=function(t){var r={generatedLine:R.getArg(t,"line"),generatedColumn:R.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",R.compareByGeneratedPositionsDeflated,R.getArg(t,"bias",we.GREATEST_LOWER_BOUND));if(n>=0){var o=this._generatedMappings[n];if(o.generatedLine===r.generatedLine){var i=R.getArg(o,"source",null);i!==null&&(i=this._sources.at(i),i=R.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=R.getArg(o,"name",null);return s!==null&&(s=this._names.at(s)),{source:i,line:R.getArg(o,"originalLine",null),column:R.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Je.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};Je.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var o=t;this.sourceRoot!=null&&(o=R.relative(this.sourceRoot,o));var i;if(this.sourceRoot!=null&&(i=R.urlParse(this.sourceRoot))){var s=o.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!i.path||i.path=="/")&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(r)return null;throw new Error('"'+o+'" is not in the SourceMap.')};Je.prototype.generatedPositionFor=function(t){var r=R.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:R.getArg(t,"line"),originalColumn:R.getArg(t,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",R.compareByOriginalPositions,R.getArg(t,"bias",we.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source)return{line:R.getArg(i,"generatedLine",null),column:R.getArg(i,"generatedColumn",null),lastColumn:R.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};vu.BasicSourceMapConsumer=Je;function er(e,t){var r=e;typeof e=="string"&&(r=R.parseSourceMapInput(e));var n=R.getArg(r,"version"),o=R.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Yo,this._names=new Yo;var i={line:-1,column:0};this._sections=o.map(function(s){if(s.url)throw new Error("Support for url field in sections not implemented.");var a=R.getArg(s,"offset"),c=R.getArg(a,"line"),u=R.getArg(a,"column");if(c<i.line||c===i.line&&u<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=a,{generatedOffset:{generatedLine:c+1,generatedColumn:u+1},consumer:new we(R.getArg(s,"map"),t)}})}er.prototype=Object.create(we.prototype);er.prototype.constructor=we;er.prototype._version=3;Object.defineProperty(er.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});er.prototype.originalPositionFor=function(t){var r={generatedLine:R.getArg(t,"line"),generatedColumn:R.getArg(t,"column")},n=fg.search(r,this._sections,function(i,s){var a=i.generatedLine-s.generatedOffset.generatedLine;return a||i.generatedColumn-s.generatedOffset.generatedColumn}),o=this._sections[n];return o?o.consumer.originalPositionFor({line:r.generatedLine-(o.generatedOffset.generatedLine-1),column:r.generatedColumn-(o.generatedOffset.generatedLine===r.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}};er.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};er.prototype.sourceContentFor=function(t,r){for(var n=0;n<this._sections.length;n++){var o=this._sections[n],i=o.consumer.sourceContentFor(t,!0);if(i)return i}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')};er.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(R.getArg(t,"source"))!==-1){var o=n.consumer.generatedPositionFor(t);if(o){var i={line:o.line+(n.generatedOffset.generatedLine-1),column:o.column+(n.generatedOffset.generatedLine===o.line?n.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}};er.prototype._parseMappings=function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var o=this._sections[n],i=o.consumer._generatedMappings,s=0;s<i.length;s++){var a=i[s],c=o.consumer._sources.at(a.source);c=R.computeSourceURL(o.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var u=null;a.name&&(u=o.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var p={source:c,generatedLine:a.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(o.generatedOffset.generatedLine===a.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}zs(this.__generatedMappings,R.compareByGeneratedPositionsDeflated),zs(this.__originalMappings,R.compareByOriginalPositions)};vu.IndexedSourceMapConsumer=er});var qS=S(ZS=>{var tZ=ug().SourceMapGenerator,bu=Jo(),rZ=/(\r?\n)/,nZ=10,Qo="$$$isSourceNode$$$";function Et(e,t,r,n,o){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=o??null,this[Qo]=!0,n!=null&&this.add(n)}Et.fromStringWithSourceMap=function(t,r,n){var o=new Et,i=t.split(rZ),s=0,a=function(){var d=h(),f=h()||"";return d+f;function h(){return s<i.length?i[s++]:void 0}},c=1,u=0,p=null;return r.eachMapping(function(d){if(p!==null)if(c<d.generatedLine)l(p,a()),c++,u=0;else{var f=i[s]||"",h=f.substr(0,d.generatedColumn-u);i[s]=f.substr(d.generatedColumn-u),u=d.generatedColumn,l(p,h),p=d;return}for(;c<d.generatedLine;)o.add(a()),c++;if(u<d.generatedColumn){var f=i[s]||"";o.add(f.substr(0,d.generatedColumn)),i[s]=f.substr(d.generatedColumn),u=d.generatedColumn}p=d},this),s<i.length&&(p&&l(p,a()),o.add(i.splice(s).join(""))),r.sources.forEach(function(d){var f=r.sourceContentFor(d);f!=null&&(n!=null&&(d=bu.join(n,d)),o.setSourceContent(d,f))}),o;function l(d,f){if(d===null||d.source===void 0)o.add(f);else{var h=n?bu.join(n,d.source):d.source;o.add(new Et(d.originalLine,d.originalColumn,h,f,d.name))}}};Et.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[Qo]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};Et.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[Qo]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};Et.prototype.walk=function(t){for(var r,n=0,o=this.children.length;n<o;n++)r=this.children[n],r[Qo]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Et.prototype.join=function(t){var r,n,o=this.children.length;if(o>0){for(r=[],n=0;n<o-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this};Et.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[Qo]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this};Et.prototype.setSourceContent=function(t,r){this.sourceContents[bu.toSetString(t)]=r};Et.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Qo]&&this.children[r].walkSourceContents(t);for(var o=Object.keys(this.sourceContents),r=0,n=o.length;r<n;r++)t(bu.fromSetString(o[r]),this.sourceContents[o[r]])};Et.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t};Et.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new tZ(t),o=!1,i=null,s=null,a=null,c=null;return this.walk(function(u,p){r.code+=u,p.source!==null&&p.line!==null&&p.column!==null?((i!==p.source||s!==p.line||a!==p.column||c!==p.name)&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name}),i=p.source,s=p.line,a=p.column,c=p.name,o=!0):o&&(n.addMapping({generated:{line:r.line,column:r.column}}),i=null,o=!1);for(var l=0,d=u.length;l<d;l++)u.charCodeAt(l)===nZ?(r.line++,r.column=0,l+1===d?(i=null,o=!1):o&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name})):r.column++}),this.walkSourceContents(function(u,p){n.setSourceContent(u,p)}),{code:r.code,map:n}};ZS.SourceNode=Et});var FS=S(xu=>{xu.SourceMapGenerator=ug().SourceMapGenerator;xu.SourceMapConsumer=LS().SourceMapConsumer;xu.SourceNode=qS().SourceNode});var HS=S((wu,VS)=>{"use strict";wu.__esModule=!0;var mg=pt(),ro=void 0;try{(typeof define!="function"||!define.amd)&&(US=FS(),ro=US.SourceNode)}catch{}var US;ro||(ro=function(e,t,r,n){this.src="",n&&this.add(n)},ro.prototype={add:function(t){mg.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){mg.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function hg(e,t,r){if(mg.isArray(e)){for(var n=[],o=0,i=e.length;o<i;o++)n.push(t.wrap(e[o],r));return n}else if(typeof e=="boolean"||typeof e=="number")return e+"";return e}function BS(e){this.srcFile=e,this.source=[]}BS.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,r){this.source.unshift(this.wrap(t,r))},push:function(t,r){this.source.push(this.wrap(t,r))},merge:function(){var t=this.empty();return this.each(function(r){t.add([" ",r,`
82
- `])}),t},each:function(t){for(var r=0,n=this.source.length;r<n;r++)t(this.source[r])},empty:function(){var t=this.currentLocation||{start:{}};return new ro(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return t instanceof ro?t:(t=hg(t,this,r),new ro(r.start.line,r.start.column,this.srcFile,t))},functionCall:function(t,r,n){return n=this.generateList(n),this.wrap([t,r?"."+r+"(":"(",n,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var r=this,n=[];Object.keys(t).forEach(function(i){var s=hg(t[i],r);s!=="undefined"&&n.push([r.quotedString(i),":",s])});var o=this.generateList(n);return o.prepend("{"),o.add("}"),o},generateList:function(t){for(var r=this.empty(),n=0,o=t.length;n<o;n++)n&&r.add(","),r.add(hg(t[n],this));return r},generateArray:function(t){var r=this.generateList(t);return r.prepend("["),r.add("]"),r}};wu.default=BS;VS.exports=wu.default});var YS=S((ku,JS)=>{"use strict";ku.__esModule=!0;function KS(e){return e&&e.__esModule?e:{default:e}}var GS=ou(),oZ=Ft(),gg=KS(oZ),iZ=pt(),sZ=HS(),WS=KS(sZ);function Xo(e){this.value=e}function ei(){}ei.prototype={nameLookup:function(t,r){return this.internalNameLookup(t,r)},depthedLookup:function(t){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(t),")"]},compilerInfo:function(){var t=GS.COMPILER_REVISION,r=GS.REVISION_CHANGES[t];return[t,r]},appendToBuffer:function(t,r,n){return iZ.isArray(t)||(t=[t]),t=this.source.wrap(t,r),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(t,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",t,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(t,r,n,o){this.environment=t,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!o,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,r),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var i=t.opcodes,s=void 0,a=void 0,c=void 0,u=void 0;for(c=0,u=i.length;c<u;c++)s=i[c],this.source.currentLocation=s.loc,a=a||s.loc,this[s.opcode].apply(this,s.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new gg.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
81
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var i=this.next();return typeof i<"u"?i:this.lex()},begin:function(i){this.conditionStack.push(i)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(i){this.begin(i)}};return n.options={},n.performAction=function(i,s,a,c){function u(l,d){return s.yytext=s.yytext.substring(l,s.yyleng-d+l)}var p=c;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(u(0,1),this.begin("emu")):this.begin("mu"),s.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(u(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(s.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return s.yytext=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=u(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return s.yytext=s.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();e.lexer=t;function r(){this.yy={}}return r.prototype=e,e.Parser=r,new r})();mu.default=_9;dS.exports=mu.default});var vu=S((_u,gS)=>{"use strict";_u.__esModule=!0;function v9(e){return e&&e.__esModule?e:{default:e}}var b9=Bt(),Jm=v9(b9);function gu(){this.parents=[]}gu.prototype={constructor:gu,mutating:!1,acceptKey:function(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!gu.prototype[n.type])throw new Jm.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+t.type);t[r]=n}},acceptRequired:function(t,r){if(this.acceptKey(t,r),!t[r])throw new Jm.default(t.type+" requires "+r)},acceptArray:function(t){for(var r=0,n=t.length;r<n;r++)this.acceptKey(t,r),t[r]||(t.splice(r,1),r--,n--)},accept:function(t){if(t){if(!this[t.type])throw new Jm.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var r=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return t}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:yu,Decorator:yu,BlockStatement:hS,DecoratorBlock:hS,PartialStatement:mS,PartialBlockStatement:function(t){mS.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:yu,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}};function yu(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function hS(e){yu.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function mS(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}_u.default=gu;gS.exports=_u.default});var _S=S((bu,yS)=>{"use strict";bu.__esModule=!0;function x9(e){return e&&e.__esModule?e:{default:e}}var w9=vu(),k9=x9(w9);function xr(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}xr.prototype=new k9.default;xr.prototype.Program=function(e){var t=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=e.body,o=0,i=n.length;o<i;o++){var s=n[o],a=this.accept(s);if(a){var c=Ym(n,o,r),u=Qm(n,o,r),p=a.openStandalone&&c,l=a.closeStandalone&&u,d=a.inlineStandalone&&c&&u;a.close&&ro(n,o,!0),a.open&&gn(n,o,!0),t&&d&&(ro(n,o),gn(n,o)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[o-1].original)[1])),t&&p&&(ro((s.program||s.inverse).body),gn(n,o)),t&&l&&(ro(n,o),gn((s.inverse||s.program).body))}}return e};xr.prototype.BlockStatement=xr.prototype.DecoratorBlock=xr.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,r=e.program&&e.inverse,n=r,o=r;if(r&&r.chained)for(n=r.body[0].program;o.chained;)o=o.body[o.body.length-1].program;var i={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:Qm(t.body),closeStandalone:Ym((n||t).body)};if(e.openStrip.close&&ro(t.body,null,!0),r){var s=e.inverseStrip;s.open&&gn(t.body,null,!0),s.close&&ro(n.body,null,!0),e.closeStrip.open&&gn(o.body,null,!0),!this.options.ignoreStandalone&&Ym(t.body)&&Qm(n.body)&&(gn(t.body),ro(n.body))}else e.closeStrip.open&&gn(t.body,null,!0);return i};xr.prototype.Decorator=xr.prototype.MustacheStatement=function(e){return e.strip};xr.prototype.PartialStatement=xr.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function Ym(e,t,r){t===void 0&&(t=e.length);var n=e[t-1],o=e[t-2];if(!n)return r;if(n.type==="ContentStatement")return(o||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function Qm(e,t,r){t===void 0&&(t=-1);var n=e[t+1],o=e[t+2];if(!n)return r;if(n.type==="ContentStatement")return(o||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function ro(e,t,r){var n=e[t==null?0:t+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var o=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==o}}function gn(e,t,r){var n=e[t==null?e.length-1:t-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var o=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==o,n.leftStripped}}bu.default=xr;yS.exports=bu.default});var vS=S(Vt=>{"use strict";Vt.__esModule=!0;Vt.SourceLocation=T9;Vt.id=P9;Vt.stripFlags=C9;Vt.stripComment=E9;Vt.preparePath=I9;Vt.prepareMustache=z9;Vt.prepareRawBlock=R9;Vt.prepareBlock=A9;Vt.prepareProgram=O9;Vt.preparePartialBlock=N9;function S9(e){return e&&e.__esModule?e:{default:e}}var $9=Bt(),Xm=S9($9);function eg(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new Xm.default(e.path.original+" doesn't match "+t,r)}}function T9(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}function P9(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function C9(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}function E9(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function I9(e,t,r){r=this.locInfo(r);for(var n=e?"@":"",o=[],i=0,s=0,a=t.length;s<a;s++){var c=t[s].part,u=t[s].original!==c;if(n+=(t[s].separator||"")+c,!u&&(c===".."||c==="."||c==="this")){if(o.length>0)throw new Xm.default("Invalid path: "+n,{loc:r});c===".."&&i++}else o.push(c)}return{type:"PathExpression",data:e,depth:i,parts:o,original:n,loc:r}}function z9(e,t,r,n,o,i){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:a,strip:o,loc:this.locInfo(i)}}function R9(e,t,r,n){eg(e,r),n=this.locInfo(n);var o={type:"Program",body:t,strip:{},loc:n};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:o,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function A9(e,t,r,n,o,i){n&&n.path&&eg(e,n);var s=/\*/.test(e.open);t.blockParams=e.blockParams;var a=void 0,c=void 0;if(r){if(s)throw new Xm.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,a=r.program}return o&&(o=a,a=t,t=o),{type:s?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:a,openStrip:e.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(i)}}function O9(e,t){if(!t&&e.length){var r=e[0].loc,n=e[e.length-1].loc;r&&n&&(t={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:e,strip:{},loc:t}}function N9(e,t,r,n){return eg(e,r),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var wS=S(Es=>{"use strict";Es.__esModule=!0;Es.parseWithoutProcessing=xS;Es.parse=U9;function D9(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function bS(e){return e&&e.__esModule?e:{default:e}}var j9=fS(),tg=bS(j9),M9=_S(),L9=bS(M9),Z9=vS(),q9=D9(Z9),F9=ft();Es.parser=tg.default;var xu={};F9.extend(xu,q9);function xS(e,t){if(e.type==="Program")return e;tg.default.yy=xu,xu.locInfo=function(n){return new xu.SourceLocation(t&&t.srcName,n)};var r=tg.default.parse(e);return r}function U9(e,t){var r=xS(e,t),n=new L9.default(t);return n.accept(r)}});var TS=S(As=>{"use strict";As.__esModule=!0;As.Compiler=rg;As.precompile=G9;As.compile=W9;function SS(e){return e&&e.__esModule?e:{default:e}}var B9=Bt(),zs=SS(B9),Rs=ft(),V9=Km(),Is=SS(V9),H9=[].slice;function rg(){}rg.prototype={compiler:rg,equals:function(t){var r=this.opcodes.length;if(t.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var o=this.opcodes[n],i=t.opcodes[n];if(o.opcode!==i.opcode||!$S(o.args,i.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},guid:0,compile:function(t,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=Rs.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(t)},compileProgram:function(t){var r=new this.compiler,n=r.compile(t,this.options),o=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[o]=n,this.useDepths=this.useDepths||n.useDepths,o},accept:function(t){if(!this[t.type])throw new zs.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var r=this[t.type](t);return this.sourceNode.shift(),r},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var r=t.body,n=r.length,o=0;o<n;o++)this.accept(r[o]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){kS(t);var r=t.program,n=t.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var o=this.classifySexpr(t);o==="helper"?this.helperSexpr(t,r,n):o==="simple"?(this.simpleSexpr(t),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var r=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,r,void 0),o=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,o.original)},PartialStatement:function(t){this.usePartial=!0;var r=t.program;r&&(r=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new zs.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var o=t.name.original,i=t.name.type==="SubExpression";i&&this.accept(t.name),this.setupFullMustacheParams(t,r,void 0,!0);var s=t.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",i,o,s),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){kS(t);var r=this.classifySexpr(t);r==="simple"?this.simpleSexpr(t):r==="helper"?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,r,n){var o=t.path,i=o.parts[0],s=r!=null||n!=null;this.opcode("getContext",o.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",n),o.strict=!0,this.accept(o),this.opcode("invokeAmbiguous",i,s)},simpleSexpr:function(t){var r=t.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,r,n){var o=this.setupFullMustacheParams(t,r,n),i=t.path,s=i.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",o.length,s);else{if(this.options.knownHelpersOnly)throw new zs.default("You specified knownHelpersOnly, but used the unknown helper "+s,t);i.strict=!0,i.falsy=!0,this.accept(i),this.opcode("invokeHelper",o.length,i.original,Is.default.helpers.simpleId(i))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var r=t.parts[0],n=Is.default.helpers.scopedId(t),o=!t.depth&&!n&&this.blockParamIndex(r);o?this.opcode("lookupBlockParam",o,t.parts):r?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var r=t.pairs,n=0,o=r.length;for(this.opcode("pushHash");n<o;n++)this.pushParam(r[n].value);for(;n--;)this.opcode("assignToHash",r[n].key);this.opcode("popHash")},opcode:function(t){this.opcodes.push({opcode:t,args:H9.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var r=Is.default.helpers.simpleId(t.path),n=r&&!!this.blockParamIndex(t.path.parts[0]),o=!n&&Is.default.helpers.helperExpression(t),i=!n&&(o||r);if(i&&!o){var s=t.path.parts[0],a=this.options;a.knownHelpers[s]?o=!0:a.knownHelpersOnly&&(i=!1)}return o?"helper":i?"ambiguous":"simple"},pushParams:function(t){for(var r=0,n=t.length;r<n;r++)this.pushParam(t[r])},pushParam:function(t){var r=t.value!=null?t.value:t.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",r,t.type),t.type==="SubExpression"&&this.accept(t);else{if(this.trackIds){var n=void 0;if(t.parts&&!Is.default.helpers.scopedId(t)&&!t.depth&&(n=this.blockParamIndex(t.parts[0])),n){var o=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,o)}else r=t.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,r)}this.accept(t)}},setupFullMustacheParams:function(t,r,n,o){var i=t.params;return this.pushParams(i),this.opcode("pushProgram",r),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",o),i},blockParamIndex:function(t){for(var r=0,n=this.options.blockParams.length;r<n;r++){var o=this.options.blockParams[r],i=o&&Rs.indexOf(o,t);if(o&&i>=0)return[r,i]}}};function G9(e,t,r){if(e==null||typeof e!="string"&&e.type!=="Program")throw new zs.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);t=t||{},"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=r.parse(e,t),o=new r.Compiler().compile(n,t);return new r.JavaScriptCompiler().compile(o,t)}function W9(e,t,r){if(t===void 0&&(t={}),e==null||typeof e!="string"&&e.type!=="Program")throw new zs.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=Rs.extend({},t),"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=void 0;function o(){var s=r.parse(e,t),a=new r.Compiler().compile(s,t),c=new r.JavaScriptCompiler().compile(a,t,void 0,!0);return r.template(c)}function i(s,a){return n||(n=o()),n.call(this,s,a)}return i._setup=function(s){return n||(n=o()),n._setup(s)},i._child=function(s,a,c,u){return n||(n=o()),n._child(s,a,c,u)},i}function $S(e,t){if(e===t)return!0;if(Rs.isArray(e)&&Rs.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++)if(!$S(e[r],t[r]))return!1;return!0}}function kS(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}});var CS=S(ng=>{var PS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ng.encode=function(e){if(0<=e&&e<PS.length)return PS[e];throw new TypeError("Must be between 0 and 63: "+e)};ng.decode=function(e){var t=65,r=90,n=97,o=122,i=48,s=57,a=43,c=47,u=26,p=52;return t<=e&&e<=r?e-t:n<=e&&e<=o?e-n+u:i<=e&&e<=s?e-i+p:e==a?62:e==c?63:-1}});var sg=S(ig=>{var ES=CS(),og=5,IS=1<<og,zS=IS-1,RS=IS;function K9(e){return e<0?(-e<<1)+1:(e<<1)+0}function J9(e){var t=(e&1)===1,r=e>>1;return t?-r:r}ig.encode=function(t){var r="",n,o=K9(t);do n=o&zS,o>>>=og,o>0&&(n|=RS),r+=ES.encode(n);while(o>0);return r};ig.decode=function(t,r,n){var o=t.length,i=0,s=0,a,c;do{if(r>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(c=ES.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));a=!!(c&RS),c&=zS,i=i+(c<<s),s+=og}while(a);n.value=J9(i),n.rest=r}});var Xo=S(ot=>{function Y9(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}ot.getArg=Y9;var AS=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Q9=/^data:.+\,.+$/;function Os(e){var t=e.match(AS);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}ot.urlParse=Os;function Yo(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}ot.urlGenerate=Yo;function ag(e){var t=e,r=Os(e);if(r){if(!r.path)return e;t=r.path}for(var n=ot.isAbsolute(t),o=t.split(/\/+/),i,s=0,a=o.length-1;a>=0;a--)i=o[a],i==="."?o.splice(a,1):i===".."?s++:s>0&&(i===""?(o.splice(a+1,s),s=0):(o.splice(a,2),s--));return t=o.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,Yo(r)):t}ot.normalize=ag;function OS(e,t){e===""&&(e="."),t===""&&(t=".");var r=Os(t),n=Os(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Yo(r);if(r||t.match(Q9))return t;if(n&&!n.host&&!n.path)return n.host=t,Yo(n);var o=t.charAt(0)==="/"?t:ag(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,Yo(n)):o}ot.join=OS;ot.isAbsolute=function(e){return e.charAt(0)==="/"||AS.test(e)};function X9(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}ot.relative=X9;var NS=(function(){var e=Object.create(null);return!("__proto__"in e)})();function DS(e){return e}function eZ(e){return jS(e)?"$"+e:e}ot.toSetString=NS?DS:eZ;function tZ(e){return jS(e)?e.slice(1):e}ot.fromSetString=NS?DS:tZ;function jS(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function rZ(e,t,r){var n=Qo(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:Qo(e.name,t.name)}ot.compareByOriginalPositions=rZ;function nZ(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=Qo(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:Qo(e.name,t.name)}ot.compareByGeneratedPositionsDeflated=nZ;function Qo(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function oZ(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=Qo(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:Qo(e.name,t.name)}ot.compareByGeneratedPositionsInflated=oZ;function iZ(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}ot.parseSourceMapInput=iZ;function sZ(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=Os(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1))}t=OS(Yo(n),t)}return ag(t)}ot.computeSourceURL=sZ});var lg=S(MS=>{var cg=Xo(),ug=Object.prototype.hasOwnProperty,no=typeof Map<"u";function jr(){this._array=[],this._set=no?new Map:Object.create(null)}jr.fromArray=function(t,r){for(var n=new jr,o=0,i=t.length;o<i;o++)n.add(t[o],r);return n};jr.prototype.size=function(){return no?this._set.size:Object.getOwnPropertyNames(this._set).length};jr.prototype.add=function(t,r){var n=no?t:cg.toSetString(t),o=no?this.has(t):ug.call(this._set,n),i=this._array.length;(!o||r)&&this._array.push(t),o||(no?this._set.set(t,i):this._set[n]=i)};jr.prototype.has=function(t){if(no)return this._set.has(t);var r=cg.toSetString(t);return ug.call(this._set,r)};jr.prototype.indexOf=function(t){if(no){var r=this._set.get(t);if(r>=0)return r}else{var n=cg.toSetString(t);if(ug.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};jr.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};jr.prototype.toArray=function(){return this._array.slice()};MS.ArraySet=jr});var qS=S(ZS=>{var LS=Xo();function aZ(e,t){var r=e.generatedLine,n=t.generatedLine,o=e.generatedColumn,i=t.generatedColumn;return n>r||n==r&&i>=o||LS.compareByGeneratedPositionsInflated(e,t)<=0}function wu(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}wu.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};wu.prototype.add=function(t){aZ(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};wu.prototype.toArray=function(){return this._sorted||(this._array.sort(LS.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};ZS.MappingList=wu});var pg=S(FS=>{var Ns=sg(),Me=Xo(),ku=lg().ArraySet,cZ=qS().MappingList;function Ht(e){e||(e={}),this._file=Me.getArg(e,"file",null),this._sourceRoot=Me.getArg(e,"sourceRoot",null),this._skipValidation=Me.getArg(e,"skipValidation",!1),this._sources=new ku,this._names=new ku,this._mappings=new cZ,this._sourcesContents=null}Ht.prototype._version=3;Ht.fromSourceMap=function(t){var r=t.sourceRoot,n=new Ht({file:t.file,sourceRoot:r});return t.eachMapping(function(o){var i={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(i.source=o.source,r!=null&&(i.source=Me.relative(r,i.source)),i.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(i.name=o.name)),n.addMapping(i)}),t.sources.forEach(function(o){var i=o;r!==null&&(i=Me.relative(r,o)),n._sources.has(i)||n._sources.add(i);var s=t.sourceContentFor(o);s!=null&&n.setSourceContent(o,s)}),n};Ht.prototype.addMapping=function(t){var r=Me.getArg(t,"generated"),n=Me.getArg(t,"original",null),o=Me.getArg(t,"source",null),i=Me.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,o,i),o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:o,name:i})};Ht.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=Me.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Me.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Me.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Ht.prototype.applySourceMap=function(t,r,n){var o=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=t.file}var i=this._sourceRoot;i!=null&&(o=Me.relative(i,o));var s=new ku,a=new ku;this._mappings.unsortedForEach(function(c){if(c.source===o&&c.originalLine!=null){var u=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=Me.join(n,c.source)),i!=null&&(c.source=Me.relative(i,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var p=c.source;p!=null&&!s.has(p)&&s.add(p);var l=c.name;l!=null&&!a.has(l)&&a.add(l)},this),this._sources=s,this._names=a,t.sources.forEach(function(c){var u=t.sourceContentFor(c);u!=null&&(n!=null&&(c=Me.join(n,c)),i!=null&&(c=Me.relative(i,c)),this.setSourceContent(c,u))},this)};Ht.prototype._validateMapping=function(t,r,n,o){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!o)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:o}))}};Ht.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,o=0,i=0,s=0,a="",c,u,p,l,d=this._mappings.toArray(),f=0,h=d.length;f<h;f++){if(u=d[f],c="",u.generatedLine!==r)for(t=0;u.generatedLine!==r;)c+=";",r++;else if(f>0){if(!Me.compareByGeneratedPositionsInflated(u,d[f-1]))continue;c+=","}c+=Ns.encode(u.generatedColumn-t),t=u.generatedColumn,u.source!=null&&(l=this._sources.indexOf(u.source),c+=Ns.encode(l-s),s=l,c+=Ns.encode(u.originalLine-1-o),o=u.originalLine-1,c+=Ns.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(p=this._names.indexOf(u.name),c+=Ns.encode(p-i),i=p)),a+=c}return a};Ht.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Me.relative(r,n));var o=Me.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};Ht.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};Ht.prototype.toString=function(){return JSON.stringify(this.toJSON())};FS.SourceMapGenerator=Ht});var US=S(oo=>{oo.GREATEST_LOWER_BOUND=1;oo.LEAST_UPPER_BOUND=2;function dg(e,t,r,n,o,i){var s=Math.floor((t-e)/2)+e,a=o(r,n[s],!0);return a===0?s:a>0?t-s>1?dg(s,t,r,n,o,i):i==oo.LEAST_UPPER_BOUND?t<n.length?t:-1:s:s-e>1?dg(e,s,r,n,o,i):i==oo.LEAST_UPPER_BOUND?s:e<0?-1:e}oo.search=function(t,r,n,o){if(r.length===0)return-1;var i=dg(-1,r.length,t,r,n,o||oo.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&n(r[i],r[i-1],!0)===0;)--i;return i}});var VS=S(BS=>{function fg(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function uZ(e,t){return Math.round(e+Math.random()*(t-e))}function hg(e,t,r,n){if(r<n){var o=uZ(r,n),i=r-1;fg(e,o,n);for(var s=e[n],a=r;a<n;a++)t(e[a],s)<=0&&(i+=1,fg(e,i,a));fg(e,i+1,a);var c=i+1;hg(e,t,r,c-1),hg(e,t,c+1,n)}}BS.quickSort=function(e,t){hg(e,t,0,e.length-1)}});var GS=S(Su=>{var R=Xo(),mg=US(),ei=lg().ArraySet,lZ=sg(),Ds=VS().quickSort;function $e(e,t){var r=e;return typeof e=="string"&&(r=R.parseSourceMapInput(e)),r.sections!=null?new nr(r,t):new Je(r,t)}$e.fromSourceMap=function(e,t){return Je.fromSourceMap(e,t)};$e.prototype._version=3;$e.prototype.__generatedMappings=null;Object.defineProperty($e.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});$e.prototype.__originalMappings=null;Object.defineProperty($e.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});$e.prototype._charIsMappingSeparator=function(t,r){var n=t.charAt(r);return n===";"||n===","};$e.prototype._parseMappings=function(t,r){throw new Error("Subclasses must implement _parseMappings")};$e.GENERATED_ORDER=1;$e.ORIGINAL_ORDER=2;$e.GREATEST_LOWER_BOUND=1;$e.LEAST_UPPER_BOUND=2;$e.prototype.eachMapping=function(t,r,n){var o=r||null,i=n||$e.GENERATED_ORDER,s;switch(i){case $e.GENERATED_ORDER:s=this._generatedMappings;break;case $e.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(c){var u=c.source===null?null:this._sources.at(c.source);return u=R.computeSourceURL(a,u,this._sourceMapURL),{source:u,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(t,o)};$e.prototype.allGeneratedPositionsFor=function(t){var r=R.getArg(t,"line"),n={source:R.getArg(t,"source"),originalLine:r,originalColumn:R.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var o=[],i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",R.compareByOriginalPositions,mg.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(t.column===void 0)for(var a=s.originalLine;s&&s.originalLine===a;)o.push({line:R.getArg(s,"generatedLine",null),column:R.getArg(s,"generatedColumn",null),lastColumn:R.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var c=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==c;)o.push({line:R.getArg(s,"generatedLine",null),column:R.getArg(s,"generatedColumn",null),lastColumn:R.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return o};Su.SourceMapConsumer=$e;function Je(e,t){var r=e;typeof e=="string"&&(r=R.parseSourceMapInput(e));var n=R.getArg(r,"version"),o=R.getArg(r,"sources"),i=R.getArg(r,"names",[]),s=R.getArg(r,"sourceRoot",null),a=R.getArg(r,"sourcesContent",null),c=R.getArg(r,"mappings"),u=R.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=R.normalize(s)),o=o.map(String).map(R.normalize).map(function(p){return s&&R.isAbsolute(s)&&R.isAbsolute(p)?R.relative(s,p):p}),this._names=ei.fromArray(i.map(String),!0),this._sources=ei.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(p){return R.computeSourceURL(s,p,t)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=t,this.file=u}Je.prototype=Object.create($e.prototype);Je.prototype.consumer=$e;Je.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=R.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};Je.fromSourceMap=function(t,r){var n=Object.create(Je.prototype),o=n._names=ei.fromArray(t._names.toArray(),!0),i=n._sources=ei.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(f){return R.computeSourceURL(n.sourceRoot,f,r)});for(var s=t._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],u=0,p=s.length;u<p;u++){var l=s[u],d=new HS;d.generatedLine=l.generatedLine,d.generatedColumn=l.generatedColumn,l.source&&(d.source=i.indexOf(l.source),d.originalLine=l.originalLine,d.originalColumn=l.originalColumn,l.name&&(d.name=o.indexOf(l.name)),c.push(d)),a.push(d)}return Ds(n.__originalMappings,R.compareByOriginalPositions),n};Je.prototype._version=3;Object.defineProperty(Je.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function HS(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Je.prototype._parseMappings=function(t,r){for(var n=1,o=0,i=0,s=0,a=0,c=0,u=t.length,p=0,l={},d={},f=[],h=[],g,y,b,v,k;p<u;)if(t.charAt(p)===";")n++,p++,o=0;else if(t.charAt(p)===",")p++;else{for(g=new HS,g.generatedLine=n,v=p;v<u&&!this._charIsMappingSeparator(t,v);v++);if(y=t.slice(p,v),b=l[y],b)p+=y.length;else{for(b=[];p<v;)lZ.decode(t,p,d),k=d.value,p=d.rest,b.push(k);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");l[y]=b}g.generatedColumn=o+b[0],o=g.generatedColumn,b.length>1&&(g.source=a+b[1],a+=b[1],g.originalLine=i+b[2],i=g.originalLine,g.originalLine+=1,g.originalColumn=s+b[3],s=g.originalColumn,b.length>4&&(g.name=c+b[4],c+=b[4])),h.push(g),typeof g.originalLine=="number"&&f.push(g)}Ds(h,R.compareByGeneratedPositionsDeflated),this.__generatedMappings=h,Ds(f,R.compareByOriginalPositions),this.__originalMappings=f};Je.prototype._findMapping=function(t,r,n,o,i,s){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[o]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[o]);return mg.search(t,r,i,s)};Je.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};Je.prototype.originalPositionFor=function(t){var r={generatedLine:R.getArg(t,"line"),generatedColumn:R.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",R.compareByGeneratedPositionsDeflated,R.getArg(t,"bias",$e.GREATEST_LOWER_BOUND));if(n>=0){var o=this._generatedMappings[n];if(o.generatedLine===r.generatedLine){var i=R.getArg(o,"source",null);i!==null&&(i=this._sources.at(i),i=R.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=R.getArg(o,"name",null);return s!==null&&(s=this._names.at(s)),{source:i,line:R.getArg(o,"originalLine",null),column:R.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Je.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};Je.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var o=t;this.sourceRoot!=null&&(o=R.relative(this.sourceRoot,o));var i;if(this.sourceRoot!=null&&(i=R.urlParse(this.sourceRoot))){var s=o.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!i.path||i.path=="/")&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(r)return null;throw new Error('"'+o+'" is not in the SourceMap.')};Je.prototype.generatedPositionFor=function(t){var r=R.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:R.getArg(t,"line"),originalColumn:R.getArg(t,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",R.compareByOriginalPositions,R.getArg(t,"bias",$e.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source)return{line:R.getArg(i,"generatedLine",null),column:R.getArg(i,"generatedColumn",null),lastColumn:R.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Su.BasicSourceMapConsumer=Je;function nr(e,t){var r=e;typeof e=="string"&&(r=R.parseSourceMapInput(e));var n=R.getArg(r,"version"),o=R.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new ei,this._names=new ei;var i={line:-1,column:0};this._sections=o.map(function(s){if(s.url)throw new Error("Support for url field in sections not implemented.");var a=R.getArg(s,"offset"),c=R.getArg(a,"line"),u=R.getArg(a,"column");if(c<i.line||c===i.line&&u<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=a,{generatedOffset:{generatedLine:c+1,generatedColumn:u+1},consumer:new $e(R.getArg(s,"map"),t)}})}nr.prototype=Object.create($e.prototype);nr.prototype.constructor=$e;nr.prototype._version=3;Object.defineProperty(nr.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});nr.prototype.originalPositionFor=function(t){var r={generatedLine:R.getArg(t,"line"),generatedColumn:R.getArg(t,"column")},n=mg.search(r,this._sections,function(i,s){var a=i.generatedLine-s.generatedOffset.generatedLine;return a||i.generatedColumn-s.generatedOffset.generatedColumn}),o=this._sections[n];return o?o.consumer.originalPositionFor({line:r.generatedLine-(o.generatedOffset.generatedLine-1),column:r.generatedColumn-(o.generatedOffset.generatedLine===r.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}};nr.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};nr.prototype.sourceContentFor=function(t,r){for(var n=0;n<this._sections.length;n++){var o=this._sections[n],i=o.consumer.sourceContentFor(t,!0);if(i)return i}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')};nr.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(R.getArg(t,"source"))!==-1){var o=n.consumer.generatedPositionFor(t);if(o){var i={line:o.line+(n.generatedOffset.generatedLine-1),column:o.column+(n.generatedOffset.generatedLine===o.line?n.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}};nr.prototype._parseMappings=function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var o=this._sections[n],i=o.consumer._generatedMappings,s=0;s<i.length;s++){var a=i[s],c=o.consumer._sources.at(a.source);c=R.computeSourceURL(o.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var u=null;a.name&&(u=o.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var p={source:c,generatedLine:a.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(o.generatedOffset.generatedLine===a.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}Ds(this.__generatedMappings,R.compareByGeneratedPositionsDeflated),Ds(this.__originalMappings,R.compareByOriginalPositions)};Su.IndexedSourceMapConsumer=nr});var KS=S(WS=>{var pZ=pg().SourceMapGenerator,$u=Xo(),dZ=/(\r?\n)/,fZ=10,ti="$$$isSourceNode$$$";function It(e,t,r,n,o){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=o??null,this[ti]=!0,n!=null&&this.add(n)}It.fromStringWithSourceMap=function(t,r,n){var o=new It,i=t.split(dZ),s=0,a=function(){var d=h(),f=h()||"";return d+f;function h(){return s<i.length?i[s++]:void 0}},c=1,u=0,p=null;return r.eachMapping(function(d){if(p!==null)if(c<d.generatedLine)l(p,a()),c++,u=0;else{var f=i[s]||"",h=f.substr(0,d.generatedColumn-u);i[s]=f.substr(d.generatedColumn-u),u=d.generatedColumn,l(p,h),p=d;return}for(;c<d.generatedLine;)o.add(a()),c++;if(u<d.generatedColumn){var f=i[s]||"";o.add(f.substr(0,d.generatedColumn)),i[s]=f.substr(d.generatedColumn),u=d.generatedColumn}p=d},this),s<i.length&&(p&&l(p,a()),o.add(i.splice(s).join(""))),r.sources.forEach(function(d){var f=r.sourceContentFor(d);f!=null&&(n!=null&&(d=$u.join(n,d)),o.setSourceContent(d,f))}),o;function l(d,f){if(d===null||d.source===void 0)o.add(f);else{var h=n?$u.join(n,d.source):d.source;o.add(new It(d.originalLine,d.originalColumn,h,f,d.name))}}};It.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[ti]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};It.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[ti]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};It.prototype.walk=function(t){for(var r,n=0,o=this.children.length;n<o;n++)r=this.children[n],r[ti]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})};It.prototype.join=function(t){var r,n,o=this.children.length;if(o>0){for(r=[],n=0;n<o-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this};It.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[ti]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this};It.prototype.setSourceContent=function(t,r){this.sourceContents[$u.toSetString(t)]=r};It.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][ti]&&this.children[r].walkSourceContents(t);for(var o=Object.keys(this.sourceContents),r=0,n=o.length;r<n;r++)t($u.fromSetString(o[r]),this.sourceContents[o[r]])};It.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t};It.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new pZ(t),o=!1,i=null,s=null,a=null,c=null;return this.walk(function(u,p){r.code+=u,p.source!==null&&p.line!==null&&p.column!==null?((i!==p.source||s!==p.line||a!==p.column||c!==p.name)&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name}),i=p.source,s=p.line,a=p.column,c=p.name,o=!0):o&&(n.addMapping({generated:{line:r.line,column:r.column}}),i=null,o=!1);for(var l=0,d=u.length;l<d;l++)u.charCodeAt(l)===fZ?(r.line++,r.column=0,l+1===d?(i=null,o=!1):o&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name})):r.column++}),this.walkSourceContents(function(u,p){n.setSourceContent(u,p)}),{code:r.code,map:n}};WS.SourceNode=It});var JS=S(Tu=>{Tu.SourceMapGenerator=pg().SourceMapGenerator;Tu.SourceMapConsumer=GS().SourceMapConsumer;Tu.SourceNode=KS().SourceNode});var e1=S((Pu,XS)=>{"use strict";Pu.__esModule=!0;var yg=ft(),io=void 0;try{(typeof define!="function"||!define.amd)&&(YS=JS(),io=YS.SourceNode)}catch{}var YS;io||(io=function(e,t,r,n){this.src="",n&&this.add(n)},io.prototype={add:function(t){yg.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){yg.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function gg(e,t,r){if(yg.isArray(e)){for(var n=[],o=0,i=e.length;o<i;o++)n.push(t.wrap(e[o],r));return n}else if(typeof e=="boolean"||typeof e=="number")return e+"";return e}function QS(e){this.srcFile=e,this.source=[]}QS.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,r){this.source.unshift(this.wrap(t,r))},push:function(t,r){this.source.push(this.wrap(t,r))},merge:function(){var t=this.empty();return this.each(function(r){t.add([" ",r,`
82
+ `])}),t},each:function(t){for(var r=0,n=this.source.length;r<n;r++)t(this.source[r])},empty:function(){var t=this.currentLocation||{start:{}};return new io(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return t instanceof io?t:(t=gg(t,this,r),new io(r.start.line,r.start.column,this.srcFile,t))},functionCall:function(t,r,n){return n=this.generateList(n),this.wrap([t,r?"."+r+"(":"(",n,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var r=this,n=[];Object.keys(t).forEach(function(i){var s=gg(t[i],r);s!=="undefined"&&n.push([r.quotedString(i),":",s])});var o=this.generateList(n);return o.prepend("{"),o.add("}"),o},generateList:function(t){for(var r=this.empty(),n=0,o=t.length;n<o;n++)n&&r.add(","),r.add(gg(t[n],this));return r},generateArray:function(t){var r=this.generateList(t);return r.prepend("["),r.add("]"),r}};Pu.default=QS;XS.exports=Pu.default});var i1=S((Cu,o1)=>{"use strict";Cu.__esModule=!0;function n1(e){return e&&e.__esModule?e:{default:e}}var t1=uu(),hZ=Bt(),_g=n1(hZ),mZ=ft(),gZ=e1(),r1=n1(gZ);function ri(e){this.value=e}function ni(){}ni.prototype={nameLookup:function(t,r){return this.internalNameLookup(t,r)},depthedLookup:function(t){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(t),")"]},compilerInfo:function(){var t=t1.COMPILER_REVISION,r=t1.REVISION_CHANGES[t];return[t,r]},appendToBuffer:function(t,r,n){return mZ.isArray(t)||(t=[t]),t=this.source.wrap(t,r),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(t,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",t,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(t,r,n,o){this.environment=t,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!o,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,r),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var i=t.opcodes,s=void 0,a=void 0,c=void 0,u=void 0;for(c=0,u=i.length;c<u;c++)s=i[c],this.source.currentLocation=s.loc,a=a||s.loc,this[s.opcode].apply(this,s.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new _g.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
83
83
  `]),this.decorators.push("return fn;"),o?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
84
84
  `),this.decorators.push(`}
85
- `),this.decorators=this.decorators.merge()));var p=this.createFunctionContext(o);if(this.isChild)return p;var l={compiler:this.compilerInfo(),main:p};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var d=this.context,f=d.programs,h=d.decorators;for(c=0,u=f.length;c<u;c++)f[c]&&(l[c]=f[c],h[c]&&(l[c+"_d"]=h[c],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),o?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),r.srcName?(l=l.toStringWithSourceMap({file:r.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new WS.default(this.options.srcName),this.decorators=new WS.default(this.options.srcName)},createFunctionContext:function(t){var r=this,n="",o=this.stackVars.concat(this.registers.list);o.length>0&&(n+=", "+o.join(", "));var i=0;Object.keys(this.aliases).forEach(function(c){var u=r.aliases[c];u.children&&u.referenceCount>1&&(n+=", alias"+ ++i+"="+c,u.children[0]="alias"+i)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(n);return t?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
85
+ `),this.decorators=this.decorators.merge()));var p=this.createFunctionContext(o);if(this.isChild)return p;var l={compiler:this.compilerInfo(),main:p};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var d=this.context,f=d.programs,h=d.decorators;for(c=0,u=f.length;c<u;c++)f[c]&&(l[c]=f[c],h[c]&&(l[c+"_d"]=h[c],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),o?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),r.srcName?(l=l.toStringWithSourceMap({file:r.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new r1.default(this.options.srcName),this.decorators=new r1.default(this.options.srcName)},createFunctionContext:function(t){var r=this,n="",o=this.stackVars.concat(this.registers.list);o.length>0&&(n+=", "+o.join(", "));var i=0;Object.keys(this.aliases).forEach(function(c){var u=r.aliases[c];u.children&&u.referenceCount>1&&(n+=", alias"+ ++i+"="+c,u.children[0]="alias"+i)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(n);return t?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
86
86
  `,a,"}"])},mergeSource:function(t){var r=this.environment.isSimple,n=!this.forceBuffer,o=void 0,i=void 0,s=void 0,a=void 0;return this.source.each(function(c){c.appendToBuffer?(s?c.prepend(" + "):s=c,a=c):(s&&(i?s.prepend("buffer += "):o=!0,a.add(";"),s=a=void 0),i=!0,r||(n=!1))}),n?s?(s.prepend("return "),a.add(";")):i||this.source.push('return "";'):(t+=", buffer = "+(o?"":this.initializeBuffer()),s?(s.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(o?"":`;
87
87
  `)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
88
88
  lookupProperty = container.lookupProperty || function(parent, propertyName) {
@@ -91,26 +91,26 @@ Expecting `+io.join(", ")+", got '"+(this.terminals_[C]||C)+"'":Lu="Parse error
91
91
  }
92
92
  return undefined
93
93
  }
94
- `.trim()},blockValue:function(t){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var o=this.popStack();n.splice(1,0,o),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var t=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(t,"call",r),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,r,n,o){var i=0;!o&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(t[i++])):this.pushContext(),this.resolvePath("context",t,i,r,n)},lookupBlockParam:function(t,r){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(t,r,n){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(t,r,n,o,i){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(aZ(this.options.strict&&i,this,r,n,t));return}for(var a=r.length;n<a;n++)this.replaceStack(function(c){var u=s.nameLookup(c,r[n],t);return o?[" && ",u]:[" != null ? ",u," : ",c]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof t=="string"?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){t!=null?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,r){var n=this.nameLookup("decorators",r,"decorator"),o=this.setupHelperArgs(r,t);this.decorators.push(["fn = ",this.decorators.functionCall(n,"",["fn","props","container",o])," || fn;"])},invokeHelper:function(t,r,n){var o=this.popStack(),i=this.setupHelper(t,r),s=[];n&&s.push(i.name),s.push(o),this.options.strict||s.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(s,"||"),")"],c=this.source.functionCall(a,"call",i.callParams);this.push(c)},itemsSeparatedBy:function(t,r){var n=[];n.push(t[0]);for(var o=1;o<t.length;o++)n.push(r,t[o]);return n},invokeKnownHelper:function(t,r){var n=this.setupHelper(t,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(t,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var o=this.setupHelper(0,t,r),i=this.lastHelper=this.nameLookup("helpers",t,"helper"),s=["(","(helper = ",i," || ",n,")"];this.options.strict||(s[0]="(helper = ",s.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",s,o.paramsInit?["),(",o.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",o.callParams)," : helper))"])},invokePartial:function(t,r,n){var o=[],i=this.setupParams(r,1,o);t&&(r=this.popStack(),delete i.name),n&&(i.indent=JSON.stringify(n)),i.helpers="helpers",i.partials="partials",i.decorators="container.decorators",t?o.unshift(r):o.unshift(this.nameLookup("partials",r,"partial")),this.options.compat&&(i.depths="depths"),i=this.objectLiteral(i),o.push(i),this.push(this.source.functionCall("container.invokePartial","",o))},assignToHash:function(t){var r=this.popStack(),n=void 0,o=void 0,i=void 0;this.trackIds&&(i=this.popStack()),this.stringParams&&(o=this.popStack(),n=this.popStack());var s=this.hash;n&&(s.contexts[t]=n),o&&(s.types[t]=o),i&&(s.ids[t]=i),s.values[t]=r},pushId:function(t,r,n){t==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):t==="PathExpression"?this.pushString(r):t==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:ei,compileChildren:function(t,r){for(var n=t.children,o=void 0,i=void 0,s=0,a=n.length;s<a;s++){o=n[s],i=new this.compiler;var c=this.matchExistingProgram(o);if(c==null){this.context.programs.push("");var u=this.context.programs.length;o.index=u,o.name="program"+u,this.context.programs[u]=i.compile(o,r,this.context,!this.precompile),this.context.decorators[u]=i.decorators,this.context.environments[u]=o,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams,o.useDepths=this.useDepths,o.useBlockParams=this.useBlockParams}else o.index=c.index,o.name="program"+c.index,this.useDepths=this.useDepths||c.useDepths,this.useBlockParams=this.useBlockParams||c.useBlockParams}},matchExistingProgram:function(t){for(var r=0,n=this.context.environments.length;r<n;r++){var o=this.context.environments[r];if(o&&o.equals(t))return o}},programExpression:function(t){var r=this.environment.children[t],n=[r.index,"data",r.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof Xo||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new Xo(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var r=["("],n=void 0,o=void 0,i=void 0;if(!this.isInline())throw new gg.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Xo)n=[s.value],r=["(",n],i=!0;else{o=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var c=t.call(this,n);i||this.popStack(),o&&this.stackSlot--,this.push(r.concat(c,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var r=0,n=t.length;r<n;r++){var o=t[r];if(o instanceof Xo)this.compileStack.push(o);else{var i=this.incrStack();this.pushSource([i," = ",o,";"]),this.compileStack.push(i)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!t&&n instanceof Xo)return n.value;if(!r){if(!this.stackSlot)throw new gg.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,r=t[t.length-1];return r instanceof Xo?r.value:r},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var r=this.aliases[t];return r?(r.referenceCount++,r):(r=this.aliases[t]=this.source.wrap(t),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(t,r,n){var o=[],i=this.setupHelperArgs(r,t,o,n),s=this.nameLookup("helpers",r,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:o,paramsInit:i,name:s,callParams:[a].concat(o)}},setupParams:function(t,r,n){var o={},i=[],s=[],a=[],c=!n,u=void 0;c&&(n=[]),o.name=this.quotedString(t),o.hash=this.popStack(),this.trackIds&&(o.hashIds=this.popStack()),this.stringParams&&(o.hashTypes=this.popStack(),o.hashContexts=this.popStack());var p=this.popStack(),l=this.popStack();(l||p)&&(o.fn=l||"container.noop",o.inverse=p||"container.noop");for(var d=r;d--;)u=this.popStack(),n[d]=u,this.trackIds&&(a[d]=this.popStack()),this.stringParams&&(s[d]=this.popStack(),i[d]=this.popStack());return c&&(o.args=this.source.generateArray(n)),this.trackIds&&(o.ids=this.source.generateArray(a)),this.stringParams&&(o.types=this.source.generateArray(s),o.contexts=this.source.generateArray(i)),this.options.data&&(o.data="data"),this.useBlockParams&&(o.blockParams="blockParams"),o},setupHelperArgs:function(t,r,n,o){var i=this.setupParams(t,r,n);return i.loc=JSON.stringify(this.source.currentLocation),i=this.objectLiteral(i),o?(this.useRegister("options"),n.push("options"),["options=",i]):n?(n.push(i),""):i}};(function(){for(var e="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),t=ei.RESERVED_WORDS={},r=0,n=e.length;r<n;r++)t[e[r]]=!0})();ei.isValidJavaScriptVariableName=function(e){return!ei.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function aZ(e,t,r,n,o){var i=t.popStack(),s=r.length;for(e&&s--;n<s;n++)i=t.nameLookup(i,r[n],o);return e?[t.aliasable("container.strict"),"(",i,", ",t.quotedString(r[n]),", ",JSON.stringify(t.source.currentLocation)," )"]:i}ku.default=ei;JS.exports=ku.default});var e1=S((Su,XS)=>{"use strict";Su.__esModule=!0;function Rs(e){return e&&e.__esModule?e:{default:e}}var cZ=tS(),uZ=Rs(cZ),lZ=Gm(),pZ=Rs(lZ),yg=hS(),_g=_S(),dZ=YS(),fZ=Rs(dZ),hZ=hu(),mZ=Rs(hZ),gZ=Um(),yZ=Rs(gZ),_Z=uZ.default.create;function QS(){var e=_Z();return e.compile=function(t,r){return _g.compile(t,r,e)},e.precompile=function(t,r){return _g.precompile(t,r,e)},e.AST=pZ.default,e.Compiler=_g.Compiler,e.JavaScriptCompiler=fZ.default,e.Parser=yg.parser,e.parse=yg.parse,e.parseWithoutProcessing=yg.parseWithoutProcessing,e}var ti=QS();ti.create=QS;yZ.default(ti);ti.Visitor=mZ.default;ti.default=ti;Su.default=ti;XS.exports=Su.default});var t1=S($u=>{"use strict";$u.__esModule=!0;$u.print=wZ;$u.PrintVisitor=Re;function vZ(e){return e&&e.__esModule?e:{default:e}}var bZ=hu(),xZ=vZ(bZ);function wZ(e){return new Re().accept(e)}function Re(){this.padding=0}Re.prototype=new xZ.default;Re.prototype.pad=function(e){for(var t="",r=0,n=this.padding;r<n;r++)t+=" ";return t+=e+`
95
- `,t};Re.prototype.Program=function(e){var t="",r=e.body,n=void 0,o=void 0;if(e.blockParams){var i="BLOCK PARAMS: [";for(n=0,o=e.blockParams.length;n<o;n++)i+=" "+e.blockParams[n];i+=" ]",t+=this.pad(i)}for(n=0,o=r.length;n<o;n++)t+=this.accept(r[n]);return this.padding--,t};Re.prototype.MustacheStatement=function(e){return this.pad("{{ "+this.SubExpression(e)+" }}")};Re.prototype.Decorator=function(e){return this.pad("{{ DIRECTIVE "+this.SubExpression(e)+" }}")};Re.prototype.BlockStatement=Re.prototype.DecoratorBlock=function(e){var t="";return t+=this.pad((e.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,t+=this.pad(this.SubExpression(e)),e.program&&(t+=this.pad("PROGRAM:"),this.padding++,t+=this.accept(e.program),this.padding--),e.inverse&&(e.program&&this.padding++,t+=this.pad("{{^}}"),this.padding++,t+=this.accept(e.inverse),this.padding--,e.program&&this.padding--),this.padding--,t};Re.prototype.PartialStatement=function(e){var t="PARTIAL:"+e.name.original;return e.params[0]&&(t+=" "+this.accept(e.params[0])),e.hash&&(t+=" "+this.accept(e.hash)),this.pad("{{> "+t+" }}")};Re.prototype.PartialBlockStatement=function(e){var t="PARTIAL BLOCK:"+e.name.original;return e.params[0]&&(t+=" "+this.accept(e.params[0])),e.hash&&(t+=" "+this.accept(e.hash)),t+=" "+this.pad("PROGRAM:"),this.padding++,t+=this.accept(e.program),this.padding--,this.pad("{{> "+t+" }}")};Re.prototype.ContentStatement=function(e){return this.pad("CONTENT[ '"+e.value+"' ]")};Re.prototype.CommentStatement=function(e){return this.pad("{{! '"+e.value+"' }}")};Re.prototype.SubExpression=function(e){for(var t=e.params,r=[],n=void 0,o=0,i=t.length;o<i;o++)r.push(this.accept(t[o]));return t="["+r.join(", ")+"]",n=e.hash?" "+this.accept(e.hash):"",this.accept(e.path)+" "+t+n};Re.prototype.PathExpression=function(e){var t=e.parts.join("/");return(e.data?"@":"")+"PATH:"+t};Re.prototype.StringLiteral=function(e){return'"'+e.value+'"'};Re.prototype.NumberLiteral=function(e){return"NUMBER{"+e.value+"}"};Re.prototype.BooleanLiteral=function(e){return"BOOLEAN{"+e.value+"}"};Re.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Re.prototype.NullLiteral=function(){return"NULL"};Re.prototype.Hash=function(e){for(var t=e.pairs,r=[],n=0,o=t.length;n<o;n++)r.push(this.accept(t[n]));return"HASH{"+r.join(", ")+"}"};Re.prototype.HashPair=function(e){return e.key+"="+this.accept(e.value)}});var vg=S((mV,o1)=>{var Tu=e1().default,n1=t1();Tu.PrintVisitor=n1.PrintVisitor;Tu.print=n1.print;o1.exports=Tu;function r1(e,t){var r=require("fs"),n=r.readFileSync(t,"utf8");e.exports=Tu.compile(n)}typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=r1,require.extensions[".hbs"]=r1)});function As(e,t){Pu.default.registerPartial(e,t)}function Nr(e,t){kZ.set(e,t),bg.set(e,Pu.default.compile(t))}function SZ(e,t){return{profile_name:e.name,stacks:e.stacks,frontend:e.frontend?{...e.frontend,mindset:""}:void 0,backend:e.backend?{...e.backend,mindset:""}:void 0,quality_gate:e.quality_gate,tools:e.tools??[],vendor:e.vendor??[],...t}}function i1(e,t){let r=bg.get(`mindset:${e}`);return r?r(t):`[Mindset '${e}' not found]`}function s1(e,t,r){let n=bg.get(`prompt:${e}`);if(!n)throw new Error(`\u30D7\u30ED\u30F3\u30D7\u30C8\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8 '${e}' \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093`);let o=SZ(t,r);if(t.frontend?.mindset_template){let i=i1(t.frontend.mindset_template,o);o.frontend.mindset=i}if(t.backend?.mindset_template){let i=i1(t.backend.mindset_template,o);o.backend.mindset=i}return n(o)}var Pu,bg,kZ,Cu=_(()=>{"use strict";Pu=ft(vg(),1);Pu.default.registerHelper("eq",function(e,t){return e===t});bg=new Map,kZ=new Map});function Eu(e,t){if((0,ri.existsSync)(e))for(let r of(0,ri.readdirSync)(e)){if(!r.endsWith(".hbs"))continue;let n=(0,Dr.basename)(r,".hbs");try{let o=(0,ri.readFileSync)((0,Dr.join)(e,r),"utf-8");t(n,o)}catch(o){console.error(`[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u8AAD\u307F\u8FBC\u307F\u30B9\u30AD\u30C3\u30D7: ${(0,Dr.join)(e,r)} \u2014 ${Ke(o)}`)}}}function xg(e){Eu((0,Dr.join)(e,"partials"),(t,r)=>As(t,r)),Eu((0,Dr.join)(e,"prompts"),(t,r)=>Nr(`prompt:${t}`,r)),Eu((0,Dr.join)(e,"mindsets"),(t,r)=>Nr(`mindset:${t}`,r)),Eu((0,Dr.join)(e,"agents"),(t,r)=>Nr(`agent:${t}`,r))}async function $Z(e,t){let{pbkdf2:r}=await import("node:crypto");return new Promise((n,o)=>{r(e,t,1e5,32,"sha256",(i,s)=>{i?o(i):n(s)})})}async function TZ(e,t){let r;try{r=JSON.parse(e)}catch(p){throw new Error(`\u6697\u53F7\u5316\u30D0\u30F3\u30C9\u30EB\u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${Ke(p)}`)}if(r.version!==1)throw new Error(`\u672A\u5BFE\u5FDC\u306E\u30D0\u30F3\u30C9\u30EB\u30D0\u30FC\u30B8\u30E7\u30F3: ${r.version}`);let n=Buffer.from(r.salt,"hex"),o=Buffer.from(r.iv,"hex"),i=Buffer.from(r.tag,"hex"),s=Buffer.from(r.data,"base64"),a=await $Z(t,n),c=(0,a1.createDecipheriv)("aes-256-gcm",a,o);c.setAuthTag(i);let u=Buffer.concat([c.update(s),c.final()]);for(let[p,l]of Object.entries(r.templates)){let d=u.subarray(l.offset,l.offset+l.length).toString("utf-8");l.type==="partial"?As(p,d):Nr(`${l.type}:${p}`,d)}}async function c1(e){return!1}var ri,Dr,a1,u1=_(()=>{"use strict";ri=require("node:fs"),Dr=require("node:path"),a1=require("node:crypto");Cu();Ho()});function PZ(){let e=`${(0,p1.hostname)()}-${process.env.USERNAME??process.env.USER??"unknown"}`;return(0,l1.createHash)("sha256").update(e).digest("hex").slice(0,32)}async function d1(e){let t=`${e.registry_url}/v1/auth/validate`,r=PZ(),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({license_key:e.license_key,machine_id:r})});if(!n.ok)throw new Error(`Registry API \u8A8D\u8A3C\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${n.status} ${n.statusText}`);let o=await n.text();try{return JSON.parse(o)}catch{throw new Error(`Registry API \u306E\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u4E0D\u6B63\u306A JSON \u3067\u3059: ${o.slice(0,200)}`)}}async function f1(e,t){let r=e.components??[];if(r.length===0)return null;let n=new URLSearchParams({components:r.join(","),language:e.language}),o=`${e.registry_url}/v1/bundle?${n.toString()}`,i={Authorization:`Bearer ${e.license_key}`};t&&(i["If-None-Match"]=`"${t}"`);let s=await fetch(o,{headers:i});if(s.status===304)return null;if(!s.ok){let p=await s.text();throw new Error(`Registry API \u30D0\u30F3\u30C9\u30EB\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${s.status} \u2014 ${p}`)}let a=await s.text(),c;try{c=JSON.parse(a)}catch{throw new Error(`Registry API \u306E\u30D0\u30F3\u30C9\u30EB\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u4E0D\u6B63\u306A JSON \u3067\u3059: ${a.slice(0,200)}`)}let u=s.headers.get("ETag")?.replace(/"/g,"")??"";return{bundle:c,etag:u}}async function h1(e,t){let{pbkdf2:r}=await import("node:crypto"),{createDecipheriv:n}=await import("node:crypto"),o=Buffer.from(e.salt,"hex"),i=Buffer.from(e.iv,"hex"),s=Buffer.from(e.tag,"hex"),a=Buffer.from(e.data,"base64"),c=await new Promise((l,d)=>{r(t,o,1e5,32,"sha256",(f,h)=>{f?d(f):l(h)})}),u=n("aes-256-gcm",c,i);u.setAuthTag(s);let p=Buffer.concat([u.update(a),u.final()]);try{return JSON.parse(p.toString("utf-8"))}catch(l){throw new Error(`Registry API \u30D0\u30F3\u30C9\u30EB\u306E\u5FA9\u53F7\u7D50\u679C\u304C\u4E0D\u6B63\u306A JSON \u3067\u3059: ${Ke(l)}`)}}var l1,p1,m1=_(()=>{"use strict";l1=require("node:crypto"),p1=require("node:os");Ho()});function wg(){let e=process.env.HOME??process.env.USERPROFILE??(0,g1.homedir)(),t=(0,no.join)(e,".godd","cache");return(0,kt.existsSync)(t)||(0,kt.mkdirSync)(t,{recursive:!0}),t}function kg(e,t){let r=`${e.sort().join(",")}_${t}`;return(0,tr.createHash)("sha256").update(r).digest("hex").slice(0,16)}function y1(e,t){return new Promise((r,n)=>{(0,tr.pbkdf2)(e,t,5e4,32,"sha256",(o,i)=>{o?n(o):r(i)})})}async function EZ(e,t){let r=(0,tr.randomBytes)(32),n=await y1(t,r),o=(0,tr.randomBytes)(12),i=(0,tr.createCipheriv)("aes-256-gcm",n,o),s=Buffer.concat([i.update(e),i.final()]),a=i.getAuthTag();return Buffer.concat([r,o,a,s])}async function IZ(e,t){let r=e.subarray(0,32),n=e.subarray(32,44),o=e.subarray(44,60),i=e.subarray(60),s=await y1(t,r),a=(0,tr.createDecipheriv)("aes-256-gcm",s,n);return a.setAuthTag(o),Buffer.concat([a.update(i),a.final()])}async function _1(e,t,r,n,o){let i=wg(),s=kg(r,n),a=await EZ(Buffer.from(e,"utf-8"),o);(0,kt.writeFileSync)((0,no.join)(i,`bundle-${s}.enc`),a);let c={etag:t,timestamp:Date.now(),components:r,language:n,profileHash:s};(0,kt.writeFileSync)((0,no.join)(i,"meta.json"),JSON.stringify(c,null,2),"utf-8")}async function v1(e,t,r){let n=wg(),o=(0,no.join)(n,"meta.json");if(!(0,kt.existsSync)(o))return null;let i;try{i=JSON.parse((0,kt.readFileSync)(o,"utf-8"))}catch{return null}let s=kg(e,t);if(i.profileHash!==s)return null;let a=(0,no.join)(n,`bundle-${s}.enc`);if(!(0,kt.existsSync)(a))return null;try{let c=(0,kt.readFileSync)(a);return{data:(await IZ(c,r)).toString("utf-8"),etag:i.etag,isExpired:Date.now()-i.timestamp>CZ}}catch{return null}}function b1(e,t){let r=wg(),n=(0,no.join)(r,"meta.json");if((0,kt.existsSync)(n))try{let o=JSON.parse((0,kt.readFileSync)(n,"utf-8")),i=kg(e,t);return o.profileHash!==i?void 0:o.etag}catch{return}}var tr,kt,g1,no,CZ,x1=_(()=>{"use strict";tr=require("node:crypto"),kt=require("node:fs"),g1=require("node:os"),no=require("node:path"),CZ=600*60*1e3});function Os(e){for(let[t,r]of Object.entries(e.partials))As(t,r);for(let[t,r]of Object.entries(e.prompts))Nr(`prompt:${t}`,r);for(let[t,r]of Object.entries(e.agents))Nr(`agent:${t}`,r);for(let[t,r]of Object.entries(e.mindsets))Nr(`mindset:${t}`,r)}var w1=_(()=>{"use strict";Cu()});function zu(e){let t=e??process.cwd();try{let r=(0,k1.execSync)("git config --get remote.origin.url",{encoding:"utf-8",cwd:t,timeout:5e3}).trim();if(r)return r}catch{}try{let r=(0,S1.join)(t,".git","config");return(0,Iu.existsSync)(r)?(0,Iu.readFileSync)(r,"utf-8").match(/\[remote\s+"origin"\][^[]*url\s*=\s*(.+)/)?.[1]?.trim()??null:null}catch{return null}}var k1,Iu,S1,Sg=_(()=>{"use strict";k1=require("node:child_process"),Iu=require("node:fs"),S1=require("node:path")});async function Tg(e,t){let r=zu();if(!r)throw new Error("Git \u30EA\u30E2\u30FC\u30C8 (origin) \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002godd init \u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002");let n=await fetch(`${e}/v1/repos/register`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({remote_url:r}),signal:AbortSignal.timeout(1e4)});if(!n.ok){let o=await n.json().catch(()=>({detail:n.statusText}));throw new Error(`\u30EA\u30DD\u30B8\u30C8\u30EA\u691C\u8A3C\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${o.detail??n.statusText}`)}$g={verified:!0,verifiedAt:Date.now()}}function RZ(){return $g?Date.now()-$g.verifiedAt<zZ:!1}async function $1(e,t){RZ()||await Tg(e,t)}var zZ,$g,T1=_(()=>{"use strict";Sg();zZ=3600*1e3,$g=null});function ni(e){try{return(0,te.existsSync)(e)?JSON.parse((0,te.readFileSync)(e,"utf-8")):null}catch{return null}}function jr(e,t=4096){try{return(0,te.existsSync)(e)?(0,te.readFileSync)(e).subarray(0,t).toString("utf-8"):""}catch{return""}}function OZ(e){let t=(0,H.join)(e,"vendor");if(!(0,te.existsSync)(t))return[];let r=[];try{for(let n of(0,te.readdirSync)(t)){let o=(0,H.join)(t,n);if(!(0,te.statSync)(o).isDirectory())continue;let i=AZ[n];if(i)r.push({name:n,path:o,description:i.description,runtime:i.runtime,setupHint:i.setupHint});else{let s=(0,te.existsSync)((0,H.join)(o,"pyproject.toml")),a=(0,te.existsSync)((0,H.join)(o,"package.json")),c=s?"python":a?"node":"unknown";r.push({name:n,path:o,description:`vendor/${n}`,runtime:c,setupHint:c==="python"?"uv sync":"pnpm install"})}}}catch{}return r}function NZ(e){let t=[],r=(0,H.join)(e,"backend","pyproject.toml"),n=(0,H.join)(e,"backend","requirements.txt");if((0,te.existsSync)(r)){let y=jr(r);y.includes("fastapi")&&t.push({id:"fastapi",label:"FastAPI",evidence:"backend/pyproject.toml \u306B fastapi \u3092\u691C\u51FA"}),y.includes("django")&&t.push({id:"django",label:"Django",evidence:"backend/pyproject.toml \u306B django \u3092\u691C\u51FA"})}else(0,te.existsSync)(n)&&jr(n).includes("fastapi")&&t.push({id:"fastapi",label:"FastAPI",evidence:"backend/requirements.txt \u306B fastapi \u3092\u691C\u51FA"});let o=ni((0,H.join)(e,"frontend","package.json")),i=ni((0,H.join)(e,"package.json")),s=ni((0,H.join)(e,"src","package.json"));for(let[y,b]of[["frontend/package.json",o],["package.json",i],["src/package.json",s]]){if(!b)continue;let v={...b.dependencies,...b.devDependencies};v.react&&t.push({id:"react",label:"React",evidence:`${y} \u306B react \u3092\u691C\u51FA`}),v.next&&t.push({id:"nextjs",label:"Next.js",evidence:`${y} \u306B next \u3092\u691C\u51FA`}),v.vue&&t.push({id:"vue",label:"Vue.js",evidence:`${y} \u306B vue \u3092\u691C\u51FA`}),v.svelte&&t.push({id:"svelte",label:"Svelte",evidence:`${y} \u306B svelte \u3092\u691C\u51FA`}),v.electron&&t.push({id:"electron",label:"Electron",evidence:`${y} \u306B electron \u3092\u691C\u51FA`})}let a=(0,H.join)(e,"pubspec.yaml");if((0,te.existsSync)(a)){let y=jr(a);t.push({id:"dart",label:"Dart",evidence:"pubspec.yaml \u3092\u691C\u51FA"}),y.includes("flutter")&&t.push({id:"flutter",label:"Flutter",evidence:"pubspec.yaml \u306B flutter \u3092\u691C\u51FA"})}let c=(0,te.existsSync)((0,H.join)(e,"Package.swift")),u=(0,H.join)(e,"ios"),p=(0,te.existsSync)(u)&&(()=>{try{return(0,te.readdirSync)(u).some(y=>y.endsWith(".xcodeproj")||y.endsWith(".xcworkspace"))}catch{return!1}})();(c||p)&&t.push({id:"swift",label:"Swift",evidence:c?"Package.swift \u3092\u691C\u51FA":"ios/*.xcodeproj \u3092\u691C\u51FA"});let l=(0,te.existsSync)((0,H.join)(e,"build.gradle.kts")),d=(0,te.existsSync)((0,H.join)(e,"build.gradle")),f=(0,H.join)(e,"android"),h=(0,te.existsSync)((0,H.join)(f,"build.gradle.kts"))||(0,te.existsSync)((0,H.join)(f,"build.gradle"));(l||d||h)&&t.push({id:"kotlin",label:"Kotlin",evidence:l?"build.gradle.kts \u3092\u691C\u51FA":d?"build.gradle \u3092\u691C\u51FA":"android/build.gradle \u3092\u691C\u51FA"});let m=jr((0,H.join)(e,"docker-compose.yml"));return m&&m.includes("postgres")&&t.push({id:"postgres",label:"Postgres",evidence:"docker-compose.yml \u306B postgres \u3092\u691C\u51FA"}),((0,te.existsSync)((0,H.join)(e,"prisma","schema.prisma"))||(0,te.existsSync)((0,H.join)(e,"backend","prisma","schema.prisma")))&&t.push({id:"prisma",label:"Prisma",evidence:"prisma/schema.prisma \u3092\u691C\u51FA"}),t}function jZ(e){let t={},r=new Map,n=[(0,H.join)(e,"package.json"),(0,H.join)(e,"frontend","package.json"),(0,H.join)(e,"src","package.json")];for(let o of n){let i=ni(o);if(!i)continue;let s=o.replace(e,"").replace(/^[\\/]/,""),a=i.dependencies,c=i.devDependencies;for(let[u,p]of Object.entries({...a,...c}))t[u]=p,r.set(u,s)}return{deps:t,sources:r}}function MZ(e){let t=new Set,r="";for(let n of[(0,H.join)(e,"backend"),e]){let o=(0,H.join)(n,"pyproject.toml");if((0,te.existsSync)(o)){let a=jr(o,16384).matchAll(/["']([a-zA-Z][\w.-]*)(?:\[.*?\])?(?:>=|<=|==|~=|!=|<|>)?/g);for(let c of a)t.add(c[1].toLowerCase().replace(/-/g,"-"));r=o.replace(e,"").replace(/^[\\/]/,"");break}let i=(0,H.join)(n,"requirements.txt");if((0,te.existsSync)(i)){let s=jr(i,16384);for(let a of s.split(`
96
- `)){let c=a.trim();if(!c||c.startsWith("#"))continue;let u=c.match(/^([a-zA-Z][\w.-]*)/);u&&t.add(u[1].toLowerCase().replace(/-/g,"-"))}r=i.replace(e,"").replace(/^[\\/]/,"");break}}return{deps:t,source:r}}function LZ(e){let t=[],r=new Set,{deps:n,sources:o}=jZ(e),{deps:i,source:s}=MZ(e),a="";for(let c of["docker-compose.yml","docker-compose.yaml","compose.yml","compose.yaml"]){let u=jr((0,H.join)(e,c));if(u){a=u;break}}for(let c of DZ)if(!r.has(c.id)){if(c.npmPackage&&c.npmPackage in n){let u=o.get(c.npmPackage)??"package.json";r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`${u} \u306B ${c.npmPackage} \u3092\u691C\u51FA`,version:n[c.npmPackage],url:c.url});continue}if(c.pyPackage&&i.has(c.pyPackage.toLowerCase().replace(/-/g,"-"))){r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`${s} \u306B ${c.pyPackage} \u3092\u691C\u51FA`,url:c.url});continue}if(c.configFiles){for(let u of c.configFiles)if((0,te.existsSync)((0,H.join)(e,u))){r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`${u} \u3092\u691C\u51FA`,url:c.url});break}if(r.has(c.id))continue}c.dockerPattern&&a.includes(c.dockerPattern)&&(r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`docker-compose.yml \u306B ${c.dockerPattern} \u3092\u691C\u51FA`,url:c.url}))}return t}function ZZ(e){let t=jr((0,H.join)(e,"docker-compose.yml"));if(!t)return[];let r=[],n=/^\s{2}(\w[\w-]*):\s*$/gm,o;for(;(o=n.exec(t))!==null;)r.push(o[1]);return r}function qZ(e){let t=(0,H.join)(e,"docs"),r=(0,te.existsSync)((0,H.join)(e,"godd-mcp-server","notes-app","package.json")),n=(0,te.existsSync)((0,H.join)(e,"godd-mcp-server","notes-api","pyproject.toml"));if(!(0,te.existsSync)(t))return{exists:!1,sections:[],files:[],has_notes_app:r,has_notes_api:n};let o=[],i=[];function s(a,c){try{for(let u of(0,te.readdirSync)(a)){if(u.startsWith("."))continue;let p=(0,H.join)(a,u),l=c?`${c}/${u}`:u;(0,te.statSync)(p).isDirectory()?(c||o.push(u),s(p,l)):i.push(l)}}catch{}}return s(t,""),{exists:!0,sections:o,files:i,has_notes_app:r,has_notes_api:n}}function P1(e){let t=ni((0,H.join)(e,"package.json"))?.name||(0,H.basename)(e),r=[];try{for(let u of(0,te.readdirSync)(e)){if(u.startsWith(".")||u==="node_modules")continue;let p=(0,H.join)(e,u);(0,te.statSync)(p).isDirectory()&&r.push(u)}}catch{}let o=["package.json","pyproject.toml","docker-compose.yml","docker-compose.yaml","Dockerfile","tsconfig.json",".env.example","env.example","AGENTS.md","README.md","Makefile",".mise.toml","turbo.json","pnpm-workspace.yaml"].filter(u=>(0,te.existsSync)((0,H.join)(e,u))),s=ni((0,H.join)(e,"package.json"))?.scripts??{},a=[];try{for(let u of(0,te.readdirSync)(e))(u.match(/^env.*\.example$/)||u.match(/^\.env.*\.example$/))&&a.push(u)}catch{}let c=jr((0,H.join)(e,"README.md"),500);return{root:e,name:t,detected_stacks:NZ(e),detected_tools:LZ(e),vendor_items:OZ(e),key_files:o,directories:r,scripts:s,docker_services:ZZ(e),env_templates:a,readme_excerpt:c,question_list_path:(0,H.join)(e,"docs","003_requirements","questions.csv"),docs_structure:qZ(e)}}var te,H,AZ,DZ,C1=_(()=>{"use strict";te=require("node:fs"),H=require("node:path");AZ={"browser-use":{description:"Python AI \u30D6\u30E9\u30A6\u30B6\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8 \u2014 Web\u30D6\u30E9\u30A6\u30B6\u3092\u81EA\u52D5\u64CD\u4F5C",runtime:"python",setupHint:"uv sync && uv run browser-use install"},"android-use":{description:"Python Android AI \u30A8\u30FC\u30B8\u30A7\u30F3\u30C8 \u2014 Android\u7AEF\u672B\u3092ADB\u3067\u81EA\u52D5\u64CD\u4F5C",runtime:"python",setupHint:"python -m venv .venv && pip install -r requirements.txt"},"react-grab":{description:"Node.js React \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B3\u30D4\u30FC\u30C4\u30FC\u30EB \u2014 React\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30C4\u30EA\u30FC\u3092\u62BD\u51FA",runtime:"node",setupHint:"pnpm install && pnpm build"}};DZ=[{id:"orval",label:"Orval",category:"frontend",description:"OpenAPI \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u30B3\u30FC\u30C9\u81EA\u52D5\u751F\u6210",url:"https://github.com/orval-labs/orval",npmPackage:"orval",configFiles:["orval.config.ts","orval.config.js","orval.config.cjs"]},{id:"tanstack-query",label:"TanStack Query",category:"frontend",description:"\u975E\u540C\u671F\u30C7\u30FC\u30BF\u30D5\u30A7\u30C3\u30C1\u30F3\u30B0/\u30AD\u30E3\u30C3\u30B7\u30E5\u7BA1\u7406",url:"https://github.com/TanStack/query",npmPackage:"@tanstack/react-query"},{id:"vite",label:"Vite",category:"frontend",description:"\u9AD8\u901F\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9\u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",url:"https://vitejs.dev/",npmPackage:"vite",configFiles:["vite.config.ts","vite.config.js","vite.config.mts"]},{id:"biome",label:"Biome",category:"devtool",description:"\u9AD8\u901F Linter / Formatter\uFF08Rust\u88FD\uFF09",url:"https://biomejs.dev/",npmPackage:"@biomejs/biome",configFiles:["biome.json","biome.jsonc"]},{id:"storybook",label:"Storybook",category:"frontend",description:"UI\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u958B\u767A/\u30AB\u30BF\u30ED\u30B0\u30C4\u30FC\u30EB",url:"https://storybook.js.org/",npmPackage:"storybook",configFiles:[".storybook/main.ts",".storybook/main.js"]},{id:"ruff",label:"Ruff",category:"devtool",description:"\u8D85\u9AD8\u901F Python Linter / Formatter\uFF08Rust\u88FD\uFF09",url:"https://docs.astral.sh/ruff/",pyPackage:"ruff",configFiles:["ruff.toml",".ruff.toml"]},{id:"uv",label:"uv",category:"devtool",description:"\u9AD8\u901F Python \u30D1\u30C3\u30B1\u30FC\u30B8\u30DE\u30CD\u30FC\u30B8\u30E3\uFF08Rust\u88FD\uFF09",url:"https://docs.astral.sh/uv/",configFiles:["uv.lock"]},{id:"sqlmodel",label:"SQLModel",category:"backend",description:"SQLAlchemy + Pydantic \u30D9\u30FC\u30B9\u306E Python ORM",url:"https://sqlmodel.tiangolo.com/",pyPackage:"sqlmodel"},{id:"alembic",label:"Alembic",category:"backend",description:"SQLAlchemy \u30D9\u30FC\u30B9\u306E DB \u30DE\u30A4\u30B0\u30EC\u30FC\u30B7\u30E7\u30F3\u30C4\u30FC\u30EB",url:"https://alembic.sqlalchemy.org/",pyPackage:"alembic",configFiles:["alembic.ini","backend/alembic.ini"]},{id:"fastapi-users",label:"FastAPI Users",category:"backend",description:"FastAPI \u5411\u3051\u8A8D\u8A3C/\u30E6\u30FC\u30B6\u30FC\u7BA1\u7406\u30E9\u30A4\u30D6\u30E9\u30EA",url:"https://fastapi-users.github.io/fastapi-users/",pyPackage:"fastapi-users"},{id:"pytest",label:"Pytest",category:"testing",description:"Python \u30C6\u30B9\u30C8\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF",url:"https://docs.pytest.org/",pyPackage:"pytest",configFiles:["pytest.ini","pyproject.toml"]},{id:"httpx",label:"HTTPX",category:"testing",description:"Python \u975E\u540C\u671F HTTP \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\uFF08\u30C6\u30B9\u30C8\u7528\uFF09",url:"https://www.python-httpx.org/",pyPackage:"httpx"},{id:"playwright",label:"Playwright",category:"testing",description:"\u30AF\u30ED\u30B9\u30D6\u30E9\u30A6\u30B6 E2E \u30C6\u30B9\u30C8\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF",url:"https://playwright.dev/",npmPackage:"@playwright/test",pyPackage:"playwright",configFiles:["playwright.config.ts","playwright.config.js"]},{id:"docker-compose",label:"Docker Compose",category:"infra",description:"\u30DE\u30EB\u30C1\u30B3\u30F3\u30C6\u30CA\u30AA\u30FC\u30B1\u30B9\u30C8\u30EC\u30FC\u30B7\u30E7\u30F3",url:"https://docs.docker.com/compose/",configFiles:["docker-compose.yml","docker-compose.yaml","compose.yml","compose.yaml"]},{id:"caddy",label:"Caddy",category:"infra",description:"\u81EA\u52D5 HTTPS \u5BFE\u5FDC\u30EA\u30D0\u30FC\u30B9\u30D7\u30ED\u30AD\u30B7",url:"https://caddyserver.com/",configFiles:["Caddyfile"],dockerPattern:"caddy"},{id:"traefik",label:"Traefik",category:"infra",description:"\u30AF\u30E9\u30A6\u30C9\u30CD\u30A4\u30C6\u30A3\u30D6 \u30EA\u30D0\u30FC\u30B9\u30D7\u30ED\u30AD\u30B7 / \u30ED\u30FC\u30C9\u30D0\u30E9\u30F3\u30B5",url:"https://traefik.io/",configFiles:["traefik.yml","traefik.toml"],dockerPattern:"traefik"},{id:"flutter",label:"Flutter",category:"frontend",description:"\u30AF\u30ED\u30B9\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0 UI \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\uFF08Dart\uFF09",url:"https://flutter.dev/",configFiles:["pubspec.yaml"]},{id:"cocoapods",label:"CocoaPods",category:"devtool",description:"iOS / macOS \u4F9D\u5B58\u7BA1\u7406\u30C4\u30FC\u30EB",url:"https://cocoapods.org/",configFiles:["Podfile","ios/Podfile"]},{id:"gradle",label:"Gradle",category:"devtool",description:"Android / JVM \u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",url:"https://gradle.org/",configFiles:["build.gradle.kts","build.gradle","android/build.gradle.kts","android/build.gradle"]},{id:"swiftpm",label:"Swift Package Manager",category:"devtool",description:"Swift \u30D1\u30C3\u30B1\u30FC\u30B8\u7BA1\u7406\u30FB\u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",url:"https://www.swift.org/package-manager/",configFiles:["Package.swift"]},{id:"sentry",label:"Sentry",category:"monitoring",description:"\u30A8\u30E9\u30FC\u8FFD\u8DE1 / \u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u76E3\u8996",url:"https://sentry.io/",npmPackage:"@sentry/react",pyPackage:"sentry-sdk",configFiles:["sentry.properties"]}]});function FZ(e,t){let r=t??process.env.GODD_PROJECT_ROOT??process.cwd();if(e.projectContext?.root===r)return e.projectContext;let n=P1(r);return e.projectContext=n,n}function M(e,t,r,n,o){let i=FZ(e,n),s=e.config.language??"en",a=s1(t,e.profile,{project:i,language:s,...o});return`${s!=="en"?`> **Output Language**: Respond entirely in ${s}.
94
+ `.trim()},blockValue:function(t){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var o=this.popStack();n.splice(1,0,o),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var t=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(t,"call",r),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,r,n,o){var i=0;!o&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(t[i++])):this.pushContext(),this.resolvePath("context",t,i,r,n)},lookupBlockParam:function(t,r){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(t,r,n){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(t,r,n,o,i){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(yZ(this.options.strict&&i,this,r,n,t));return}for(var a=r.length;n<a;n++)this.replaceStack(function(c){var u=s.nameLookup(c,r[n],t);return o?[" && ",u]:[" != null ? ",u," : ",c]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof t=="string"?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){t!=null?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,r){var n=this.nameLookup("decorators",r,"decorator"),o=this.setupHelperArgs(r,t);this.decorators.push(["fn = ",this.decorators.functionCall(n,"",["fn","props","container",o])," || fn;"])},invokeHelper:function(t,r,n){var o=this.popStack(),i=this.setupHelper(t,r),s=[];n&&s.push(i.name),s.push(o),this.options.strict||s.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(s,"||"),")"],c=this.source.functionCall(a,"call",i.callParams);this.push(c)},itemsSeparatedBy:function(t,r){var n=[];n.push(t[0]);for(var o=1;o<t.length;o++)n.push(r,t[o]);return n},invokeKnownHelper:function(t,r){var n=this.setupHelper(t,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(t,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var o=this.setupHelper(0,t,r),i=this.lastHelper=this.nameLookup("helpers",t,"helper"),s=["(","(helper = ",i," || ",n,")"];this.options.strict||(s[0]="(helper = ",s.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",s,o.paramsInit?["),(",o.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",o.callParams)," : helper))"])},invokePartial:function(t,r,n){var o=[],i=this.setupParams(r,1,o);t&&(r=this.popStack(),delete i.name),n&&(i.indent=JSON.stringify(n)),i.helpers="helpers",i.partials="partials",i.decorators="container.decorators",t?o.unshift(r):o.unshift(this.nameLookup("partials",r,"partial")),this.options.compat&&(i.depths="depths"),i=this.objectLiteral(i),o.push(i),this.push(this.source.functionCall("container.invokePartial","",o))},assignToHash:function(t){var r=this.popStack(),n=void 0,o=void 0,i=void 0;this.trackIds&&(i=this.popStack()),this.stringParams&&(o=this.popStack(),n=this.popStack());var s=this.hash;n&&(s.contexts[t]=n),o&&(s.types[t]=o),i&&(s.ids[t]=i),s.values[t]=r},pushId:function(t,r,n){t==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):t==="PathExpression"?this.pushString(r):t==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:ni,compileChildren:function(t,r){for(var n=t.children,o=void 0,i=void 0,s=0,a=n.length;s<a;s++){o=n[s],i=new this.compiler;var c=this.matchExistingProgram(o);if(c==null){this.context.programs.push("");var u=this.context.programs.length;o.index=u,o.name="program"+u,this.context.programs[u]=i.compile(o,r,this.context,!this.precompile),this.context.decorators[u]=i.decorators,this.context.environments[u]=o,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams,o.useDepths=this.useDepths,o.useBlockParams=this.useBlockParams}else o.index=c.index,o.name="program"+c.index,this.useDepths=this.useDepths||c.useDepths,this.useBlockParams=this.useBlockParams||c.useBlockParams}},matchExistingProgram:function(t){for(var r=0,n=this.context.environments.length;r<n;r++){var o=this.context.environments[r];if(o&&o.equals(t))return o}},programExpression:function(t){var r=this.environment.children[t],n=[r.index,"data",r.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof ri||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new ri(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var r=["("],n=void 0,o=void 0,i=void 0;if(!this.isInline())throw new _g.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof ri)n=[s.value],r=["(",n],i=!0;else{o=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var c=t.call(this,n);i||this.popStack(),o&&this.stackSlot--,this.push(r.concat(c,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var r=0,n=t.length;r<n;r++){var o=t[r];if(o instanceof ri)this.compileStack.push(o);else{var i=this.incrStack();this.pushSource([i," = ",o,";"]),this.compileStack.push(i)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!t&&n instanceof ri)return n.value;if(!r){if(!this.stackSlot)throw new _g.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,r=t[t.length-1];return r instanceof ri?r.value:r},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var r=this.aliases[t];return r?(r.referenceCount++,r):(r=this.aliases[t]=this.source.wrap(t),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(t,r,n){var o=[],i=this.setupHelperArgs(r,t,o,n),s=this.nameLookup("helpers",r,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:o,paramsInit:i,name:s,callParams:[a].concat(o)}},setupParams:function(t,r,n){var o={},i=[],s=[],a=[],c=!n,u=void 0;c&&(n=[]),o.name=this.quotedString(t),o.hash=this.popStack(),this.trackIds&&(o.hashIds=this.popStack()),this.stringParams&&(o.hashTypes=this.popStack(),o.hashContexts=this.popStack());var p=this.popStack(),l=this.popStack();(l||p)&&(o.fn=l||"container.noop",o.inverse=p||"container.noop");for(var d=r;d--;)u=this.popStack(),n[d]=u,this.trackIds&&(a[d]=this.popStack()),this.stringParams&&(s[d]=this.popStack(),i[d]=this.popStack());return c&&(o.args=this.source.generateArray(n)),this.trackIds&&(o.ids=this.source.generateArray(a)),this.stringParams&&(o.types=this.source.generateArray(s),o.contexts=this.source.generateArray(i)),this.options.data&&(o.data="data"),this.useBlockParams&&(o.blockParams="blockParams"),o},setupHelperArgs:function(t,r,n,o){var i=this.setupParams(t,r,n);return i.loc=JSON.stringify(this.source.currentLocation),i=this.objectLiteral(i),o?(this.useRegister("options"),n.push("options"),["options=",i]):n?(n.push(i),""):i}};(function(){for(var e="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),t=ni.RESERVED_WORDS={},r=0,n=e.length;r<n;r++)t[e[r]]=!0})();ni.isValidJavaScriptVariableName=function(e){return!ni.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function yZ(e,t,r,n,o){var i=t.popStack(),s=r.length;for(e&&s--;n<s;n++)i=t.nameLookup(i,r[n],o);return e?[t.aliasable("container.strict"),"(",i,", ",t.quotedString(r[n]),", ",JSON.stringify(t.source.currentLocation)," )"]:i}Cu.default=ni;o1.exports=Cu.default});var c1=S((Eu,a1)=>{"use strict";Eu.__esModule=!0;function js(e){return e&&e.__esModule?e:{default:e}}var _Z=uS(),vZ=js(_Z),bZ=Km(),xZ=js(bZ),vg=wS(),bg=TS(),wZ=i1(),kZ=js(wZ),SZ=vu(),$Z=js(SZ),TZ=Vm(),PZ=js(TZ),CZ=vZ.default.create;function s1(){var e=CZ();return e.compile=function(t,r){return bg.compile(t,r,e)},e.precompile=function(t,r){return bg.precompile(t,r,e)},e.AST=xZ.default,e.Compiler=bg.Compiler,e.JavaScriptCompiler=kZ.default,e.Parser=vg.parser,e.parse=vg.parse,e.parseWithoutProcessing=vg.parseWithoutProcessing,e}var oi=s1();oi.create=s1;PZ.default(oi);oi.Visitor=$Z.default;oi.default=oi;Eu.default=oi;a1.exports=Eu.default});var u1=S(Iu=>{"use strict";Iu.__esModule=!0;Iu.print=RZ;Iu.PrintVisitor=Ae;function EZ(e){return e&&e.__esModule?e:{default:e}}var IZ=vu(),zZ=EZ(IZ);function RZ(e){return new Ae().accept(e)}function Ae(){this.padding=0}Ae.prototype=new zZ.default;Ae.prototype.pad=function(e){for(var t="",r=0,n=this.padding;r<n;r++)t+=" ";return t+=e+`
95
+ `,t};Ae.prototype.Program=function(e){var t="",r=e.body,n=void 0,o=void 0;if(e.blockParams){var i="BLOCK PARAMS: [";for(n=0,o=e.blockParams.length;n<o;n++)i+=" "+e.blockParams[n];i+=" ]",t+=this.pad(i)}for(n=0,o=r.length;n<o;n++)t+=this.accept(r[n]);return this.padding--,t};Ae.prototype.MustacheStatement=function(e){return this.pad("{{ "+this.SubExpression(e)+" }}")};Ae.prototype.Decorator=function(e){return this.pad("{{ DIRECTIVE "+this.SubExpression(e)+" }}")};Ae.prototype.BlockStatement=Ae.prototype.DecoratorBlock=function(e){var t="";return t+=this.pad((e.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,t+=this.pad(this.SubExpression(e)),e.program&&(t+=this.pad("PROGRAM:"),this.padding++,t+=this.accept(e.program),this.padding--),e.inverse&&(e.program&&this.padding++,t+=this.pad("{{^}}"),this.padding++,t+=this.accept(e.inverse),this.padding--,e.program&&this.padding--),this.padding--,t};Ae.prototype.PartialStatement=function(e){var t="PARTIAL:"+e.name.original;return e.params[0]&&(t+=" "+this.accept(e.params[0])),e.hash&&(t+=" "+this.accept(e.hash)),this.pad("{{> "+t+" }}")};Ae.prototype.PartialBlockStatement=function(e){var t="PARTIAL BLOCK:"+e.name.original;return e.params[0]&&(t+=" "+this.accept(e.params[0])),e.hash&&(t+=" "+this.accept(e.hash)),t+=" "+this.pad("PROGRAM:"),this.padding++,t+=this.accept(e.program),this.padding--,this.pad("{{> "+t+" }}")};Ae.prototype.ContentStatement=function(e){return this.pad("CONTENT[ '"+e.value+"' ]")};Ae.prototype.CommentStatement=function(e){return this.pad("{{! '"+e.value+"' }}")};Ae.prototype.SubExpression=function(e){for(var t=e.params,r=[],n=void 0,o=0,i=t.length;o<i;o++)r.push(this.accept(t[o]));return t="["+r.join(", ")+"]",n=e.hash?" "+this.accept(e.hash):"",this.accept(e.path)+" "+t+n};Ae.prototype.PathExpression=function(e){var t=e.parts.join("/");return(e.data?"@":"")+"PATH:"+t};Ae.prototype.StringLiteral=function(e){return'"'+e.value+'"'};Ae.prototype.NumberLiteral=function(e){return"NUMBER{"+e.value+"}"};Ae.prototype.BooleanLiteral=function(e){return"BOOLEAN{"+e.value+"}"};Ae.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Ae.prototype.NullLiteral=function(){return"NULL"};Ae.prototype.Hash=function(e){for(var t=e.pairs,r=[],n=0,o=t.length;n<o;n++)r.push(this.accept(t[n]));return"HASH{"+r.join(", ")+"}"};Ae.prototype.HashPair=function(e){return e.key+"="+this.accept(e.value)}});var xg=S((OV,d1)=>{var zu=c1().default,p1=u1();zu.PrintVisitor=p1.PrintVisitor;zu.print=p1.print;d1.exports=zu;function l1(e,t){var r=require("fs"),n=r.readFileSync(t,"utf8");e.exports=zu.compile(n)}typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=l1,require.extensions[".hbs"]=l1)});function Ms(e,t){Ru.default.registerPartial(e,t)}function Mr(e,t){AZ.set(e,t),wg.set(e,Ru.default.compile(t))}function OZ(e,t){return{profile_name:e.name,stacks:e.stacks,frontend:e.frontend?{...e.frontend,mindset:""}:void 0,backend:e.backend?{...e.backend,mindset:""}:void 0,quality_gate:e.quality_gate,tools:e.tools??[],vendor:e.vendor??[],...t}}function f1(e,t){let r=wg.get(`mindset:${e}`);return r?r(t):`[Mindset '${e}' not found]`}function h1(e,t,r){let n=wg.get(`prompt:${e}`);if(!n)throw new Error(`\u30D7\u30ED\u30F3\u30D7\u30C8\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8 '${e}' \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093`);let o=OZ(t,r);if(t.frontend?.mindset_template){let i=f1(t.frontend.mindset_template,o);o.frontend.mindset=i}if(t.backend?.mindset_template){let i=f1(t.backend.mindset_template,o);o.backend.mindset=i}return n(o)}var Ru,wg,AZ,Au=_(()=>{"use strict";Ru=st(xg(),1);Ru.default.registerHelper("eq",function(e,t){return e===t});wg=new Map,AZ=new Map});function Ou(e,t){if((0,ii.existsSync)(e))for(let r of(0,ii.readdirSync)(e)){if(!r.endsWith(".hbs"))continue;let n=(0,Lr.basename)(r,".hbs");try{let o=(0,ii.readFileSync)((0,Lr.join)(e,r),"utf-8");t(n,o)}catch(o){console.error(`[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u8AAD\u307F\u8FBC\u307F\u30B9\u30AD\u30C3\u30D7: ${(0,Lr.join)(e,r)} \u2014 ${Ne(o)}`)}}}function kg(e){Ou((0,Lr.join)(e,"partials"),(t,r)=>Ms(t,r)),Ou((0,Lr.join)(e,"prompts"),(t,r)=>Mr(`prompt:${t}`,r)),Ou((0,Lr.join)(e,"mindsets"),(t,r)=>Mr(`mindset:${t}`,r)),Ou((0,Lr.join)(e,"agents"),(t,r)=>Mr(`agent:${t}`,r))}async function NZ(e,t){let{pbkdf2:r}=await import("node:crypto");return new Promise((n,o)=>{r(e,t,1e5,32,"sha256",(i,s)=>{i?o(i):n(s)})})}async function DZ(e,t){let r;try{r=JSON.parse(e)}catch(p){throw new Error(`\u6697\u53F7\u5316\u30D0\u30F3\u30C9\u30EB\u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${Ne(p)}`)}if(r.version!==1)throw new Error(`\u672A\u5BFE\u5FDC\u306E\u30D0\u30F3\u30C9\u30EB\u30D0\u30FC\u30B8\u30E7\u30F3: ${r.version}`);let n=Buffer.from(r.salt,"hex"),o=Buffer.from(r.iv,"hex"),i=Buffer.from(r.tag,"hex"),s=Buffer.from(r.data,"base64"),a=await NZ(t,n),c=(0,m1.createDecipheriv)("aes-256-gcm",a,o);c.setAuthTag(i);let u=Buffer.concat([c.update(s),c.final()]);for(let[p,l]of Object.entries(r.templates)){if(!Number.isInteger(l.offset)||!Number.isInteger(l.length)||l.offset<0||l.length<0||l.offset+l.length>u.length)throw new Error(`\u30D0\u30F3\u30C9\u30EB\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8 "${p}" \u306E offset/length \u304C\u4E0D\u6B63\u3067\u3059 (offset=${l.offset}, length=${l.length}, bufferSize=${u.length})`);let d=u.subarray(l.offset,l.offset+l.length).toString("utf-8"),f=p.includes(":")?p.split(":").slice(1).join(":"):p;l.type==="partial"?Ms(f,d):Mr(`${l.type}:${f}`,d)}}async function g1(e){return!1}var ii,Lr,m1,y1=_(()=>{"use strict";ii=require("node:fs"),Lr=require("node:path"),m1=require("node:crypto");Au();Ko()});function jZ(){let e=`${(0,v1.hostname)()}-${process.env.USERNAME??process.env.USER??"unknown"}`;return(0,_1.createHash)("sha256").update(e).digest("hex").slice(0,32)}async function b1(e){let t=`${e.registry_url}/v1/auth/validate`,r=jZ(),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({license_key:e.license_key,machine_id:r}),signal:AbortSignal.timeout(1e4)});if(!n.ok)throw new Error(`Registry API \u8A8D\u8A3C\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${n.status} ${n.statusText}`);let o=await n.text(),i;try{i=JSON.parse(o)}catch{throw new Error(`Registry API \u306E\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u4E0D\u6B63\u306A JSON \u3067\u3059: ${o.slice(0,200)}`)}let s=MZ.safeParse(i);if(!s.success)throw new Error(`Registry API \u306E\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u30B9\u30AD\u30FC\u30DE\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093: ${s.error.message}`);return s.data}async function x1(e,t){let r=e.components??[];if(r.length===0)return null;let n=new URLSearchParams({components:r.join(","),language:e.language}),o=`${e.registry_url}/v1/bundle?${n.toString()}`,i={Authorization:`Bearer ${e.license_key}`};t&&(i["If-None-Match"]=`"${t}"`);let s=await fetch(o,{headers:i,signal:AbortSignal.timeout(1e4)});if(s.status===304)return null;if(!s.ok){let d=await s.text();throw new Error(`Registry API \u30D0\u30F3\u30C9\u30EB\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${s.status} \u2014 ${d}`)}let a=await s.text(),c;try{c=JSON.parse(a)}catch{throw new Error(`Registry API \u306E\u30D0\u30F3\u30C9\u30EB\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u4E0D\u6B63\u306A JSON \u3067\u3059: ${a.slice(0,200)}`)}let u=LZ.safeParse(c);if(!u.success)throw new Error(`Registry API \u306E\u30D0\u30F3\u30C9\u30EB\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u30B9\u30AD\u30FC\u30DE\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093: ${u.error.message}`);let p=u.data,l=s.headers.get("ETag")?.replace(/"/g,"")??"";return{bundle:p,etag:l}}async function w1(e,t){let{pbkdf2:r}=await import("node:crypto"),{createDecipheriv:n}=await import("node:crypto"),o=Buffer.from(e.salt,"hex"),i=Buffer.from(e.iv,"hex"),s=Buffer.from(e.tag,"hex"),a=Buffer.from(e.data,"base64"),c=await new Promise((l,d)=>{r(t,o,1e5,32,"sha256",(f,h)=>{f?d(f):l(h)})}),u=n("aes-256-gcm",c,i);u.setAuthTag(s);let p=Buffer.concat([u.update(a),u.final()]);try{return JSON.parse(p.toString("utf-8"))}catch(l){throw new Error(`Registry API \u30D0\u30F3\u30C9\u30EB\u306E\u5FA9\u53F7\u7D50\u679C\u304C\u4E0D\u6B63\u306A JSON \u3067\u3059: ${Ne(l)}`)}}var _1,v1,MZ,LZ,k1=_(()=>{"use strict";_1=require("node:crypto"),v1=require("node:os");pe();Ko();MZ=m.object({valid:m.boolean(),expires_at:m.string().nullable().optional().default(null),error:m.string().nullable().optional().default(null)});LZ=m.object({version:m.number(),salt:m.string(),iv:m.string(),tag:m.string(),data:m.string(),templates:m.record(m.object({type:m.string()}))})});function Sg(){let e=process.env.HOME??process.env.USERPROFILE??(0,S1.homedir)(),t=(0,so.join)(e,".godd","cache");return(0,St.existsSync)(t)||(0,St.mkdirSync)(t,{recursive:!0}),t}function $g(e,t){let r=`${[...e].sort().join(",")}_${t}`;return(0,or.createHash)("sha256").update(r).digest("hex").slice(0,16)}function $1(e,t){return new Promise((r,n)=>{(0,or.pbkdf2)(e,t,5e4,32,"sha256",(o,i)=>{o?n(o):r(i)})})}async function qZ(e,t){let r=(0,or.randomBytes)(32),n=await $1(t,r),o=(0,or.randomBytes)(12),i=(0,or.createCipheriv)("aes-256-gcm",n,o),s=Buffer.concat([i.update(e),i.final()]),a=i.getAuthTag();return Buffer.concat([r,o,a,s])}async function FZ(e,t){let r=e.subarray(0,32),n=e.subarray(32,44),o=e.subarray(44,60),i=e.subarray(60),s=await $1(t,r),a=(0,or.createDecipheriv)("aes-256-gcm",s,n);return a.setAuthTag(o),Buffer.concat([a.update(i),a.final()])}async function T1(e,t,r,n,o){let i=Sg(),s=$g(r,n),a=await qZ(Buffer.from(e,"utf-8"),o);(0,St.writeFileSync)((0,so.join)(i,`bundle-${s}.enc`),a);let c={etag:t,timestamp:Date.now(),components:r,language:n,profileHash:s};(0,St.writeFileSync)((0,so.join)(i,"meta.json"),JSON.stringify(c,null,2),"utf-8")}async function P1(e,t,r){let n=Sg(),o=(0,so.join)(n,"meta.json");if(!(0,St.existsSync)(o))return null;let i;try{i=JSON.parse((0,St.readFileSync)(o,"utf-8"))}catch{return null}let s=$g(e,t);if(i.profileHash!==s)return null;let a=(0,so.join)(n,`bundle-${s}.enc`);if(!(0,St.existsSync)(a))return null;try{let c=(0,St.readFileSync)(a);return{data:(await FZ(c,r)).toString("utf-8"),etag:i.etag,isExpired:Date.now()-i.timestamp>ZZ}}catch{return null}}function C1(e,t){let r=Sg(),n=(0,so.join)(r,"meta.json");if((0,St.existsSync)(n))try{let o=JSON.parse((0,St.readFileSync)(n,"utf-8")),i=$g(e,t);return o.profileHash!==i?void 0:o.etag}catch{return}}var or,St,S1,so,ZZ,E1=_(()=>{"use strict";or=require("node:crypto"),St=require("node:fs"),S1=require("node:os"),so=require("node:path"),ZZ=600*60*1e3});function Ls(e){for(let[t,r]of Object.entries(e.partials))Ms(t,r);for(let[t,r]of Object.entries(e.prompts))Mr(`prompt:${t}`,r);for(let[t,r]of Object.entries(e.agents))Mr(`agent:${t}`,r);for(let[t,r]of Object.entries(e.mindsets))Mr(`mindset:${t}`,r)}var I1=_(()=>{"use strict";Au()});function Zs(e){let t=e??process.cwd();try{let r=(0,z1.execSync)("git config --get remote.origin.url",{encoding:"utf-8",cwd:t,timeout:5e3}).trim();if(r)return r}catch{}try{let r=(0,R1.join)(t,".git","config");return(0,Nu.existsSync)(r)?(0,Nu.readFileSync)(r,"utf-8").match(/\[remote\s+"origin"\][^[]*url\s*=\s*(.+)/)?.[1]?.trim()??null:null}catch{return null}}var z1,Nu,R1,Tg=_(()=>{"use strict";z1=require("node:child_process"),Nu=require("node:fs"),R1=require("node:path")});async function Cg(e,t){let r=Zs();if(!r)throw new Error("Git \u30EA\u30E2\u30FC\u30C8 (origin) \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002godd init \u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002");let n=await fetch(`${e}/v1/repos/register`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({remote_url:r}),signal:AbortSignal.timeout(1e4)});if(!n.ok){let i=(await n.json().catch(()=>({detail:n.statusText}))).detail,s=typeof i=="string"?i:i!=null?JSON.stringify(i):n.statusText;throw new Error(`\u30EA\u30DD\u30B8\u30C8\u30EA\u691C\u8A3C\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${s}`)}Pg.set(r,{verified:!0,verifiedAt:Date.now()})}function UZ(e){if(e){let t=Pg.get(e);return t?Date.now()-t.verifiedAt<A1:!1}for(let t of Pg.values())if(Date.now()-t.verifiedAt<A1)return!0;return!1}async function O1(e,t){let r=Zs();r&&UZ(r)||await Cg(e,t)}var A1,Pg,N1=_(()=>{"use strict";Tg();A1=3600*1e3,Pg=new Map});function si(e){try{return(0,te.existsSync)(e)?JSON.parse((0,te.readFileSync)(e,"utf-8")):null}catch{return null}}function Zr(e,t=4096){try{return(0,te.existsSync)(e)?(0,te.readFileSync)(e).subarray(0,t).toString("utf-8"):""}catch{return""}}function VZ(e){let t=(0,H.join)(e,"vendor");if(!(0,te.existsSync)(t))return[];let r=[];try{for(let n of(0,te.readdirSync)(t)){let o=(0,H.join)(t,n);if(!(0,te.statSync)(o).isDirectory())continue;let i=BZ[n];if(i)r.push({name:n,path:o,description:i.description,runtime:i.runtime,setupHint:i.setupHint});else{let s=(0,te.existsSync)((0,H.join)(o,"pyproject.toml")),a=(0,te.existsSync)((0,H.join)(o,"package.json")),c=s?"python":a?"node":"unknown";r.push({name:n,path:o,description:`vendor/${n}`,runtime:c,setupHint:c==="python"?"uv sync":"pnpm install"})}}}catch{}return r}function HZ(e){let t=[],r=(0,H.join)(e,"backend","pyproject.toml"),n=(0,H.join)(e,"backend","requirements.txt");if((0,te.existsSync)(r)){let y=Zr(r);y.includes("fastapi")&&t.push({id:"fastapi",label:"FastAPI",evidence:"backend/pyproject.toml \u306B fastapi \u3092\u691C\u51FA"}),y.includes("django")&&t.push({id:"django",label:"Django",evidence:"backend/pyproject.toml \u306B django \u3092\u691C\u51FA"})}else(0,te.existsSync)(n)&&Zr(n).includes("fastapi")&&t.push({id:"fastapi",label:"FastAPI",evidence:"backend/requirements.txt \u306B fastapi \u3092\u691C\u51FA"});let o=si((0,H.join)(e,"frontend","package.json")),i=si((0,H.join)(e,"package.json")),s=si((0,H.join)(e,"src","package.json"));for(let[y,b]of[["frontend/package.json",o],["package.json",i],["src/package.json",s]]){if(!b)continue;let v={...b.dependencies,...b.devDependencies};v.react&&t.push({id:"react",label:"React",evidence:`${y} \u306B react \u3092\u691C\u51FA`}),v.next&&t.push({id:"nextjs",label:"Next.js",evidence:`${y} \u306B next \u3092\u691C\u51FA`}),v.vue&&t.push({id:"vue",label:"Vue.js",evidence:`${y} \u306B vue \u3092\u691C\u51FA`}),v.svelte&&t.push({id:"svelte",label:"Svelte",evidence:`${y} \u306B svelte \u3092\u691C\u51FA`}),v.electron&&t.push({id:"electron",label:"Electron",evidence:`${y} \u306B electron \u3092\u691C\u51FA`})}let a=(0,H.join)(e,"pubspec.yaml");if((0,te.existsSync)(a)){let y=Zr(a);t.push({id:"dart",label:"Dart",evidence:"pubspec.yaml \u3092\u691C\u51FA"}),y.includes("flutter")&&t.push({id:"flutter",label:"Flutter",evidence:"pubspec.yaml \u306B flutter \u3092\u691C\u51FA"})}let c=(0,te.existsSync)((0,H.join)(e,"Package.swift")),u=(0,H.join)(e,"ios"),p=(0,te.existsSync)(u)&&(()=>{try{return(0,te.readdirSync)(u).some(y=>y.endsWith(".xcodeproj")||y.endsWith(".xcworkspace"))}catch{return!1}})();(c||p)&&t.push({id:"swift",label:"Swift",evidence:c?"Package.swift \u3092\u691C\u51FA":"ios/*.xcodeproj \u3092\u691C\u51FA"});let l=(0,te.existsSync)((0,H.join)(e,"build.gradle.kts")),d=(0,te.existsSync)((0,H.join)(e,"build.gradle")),f=(0,H.join)(e,"android"),h=(0,te.existsSync)((0,H.join)(f,"build.gradle.kts"))||(0,te.existsSync)((0,H.join)(f,"build.gradle"));(l||d||h)&&t.push({id:"kotlin",label:"Kotlin",evidence:l?"build.gradle.kts \u3092\u691C\u51FA":d?"build.gradle \u3092\u691C\u51FA":"android/build.gradle \u3092\u691C\u51FA"});let g=Zr((0,H.join)(e,"docker-compose.yml"));return g&&g.includes("postgres")&&t.push({id:"postgres",label:"Postgres",evidence:"docker-compose.yml \u306B postgres \u3092\u691C\u51FA"}),((0,te.existsSync)((0,H.join)(e,"prisma","schema.prisma"))||(0,te.existsSync)((0,H.join)(e,"backend","prisma","schema.prisma")))&&t.push({id:"prisma",label:"Prisma",evidence:"prisma/schema.prisma \u3092\u691C\u51FA"}),t}function WZ(e){let t={},r=new Map,n=[(0,H.join)(e,"package.json"),(0,H.join)(e,"frontend","package.json"),(0,H.join)(e,"src","package.json")];for(let o of n){let i=si(o);if(!i)continue;let s=o.replace(e,"").replace(/^[\\/]/,""),a=i.dependencies,c=i.devDependencies;for(let[u,p]of Object.entries({...a,...c}))t[u]=p,r.set(u,s)}return{deps:t,sources:r}}function KZ(e){let t=new Set,r="";for(let n of[(0,H.join)(e,"backend"),e]){let o=(0,H.join)(n,"pyproject.toml");if((0,te.existsSync)(o)){let a=Zr(o,16384).matchAll(/["']([a-zA-Z][\w.-]*)(?:\[.*?\])?(?:>=|<=|==|~=|!=|<|>)?/g);for(let c of a)t.add(c[1].toLowerCase().replace(/[-_.]+/g,"-"));r=o.replace(e,"").replace(/^[\\/]/,"");break}let i=(0,H.join)(n,"requirements.txt");if((0,te.existsSync)(i)){let s=Zr(i,16384);for(let a of s.split(`
96
+ `)){let c=a.trim();if(!c||c.startsWith("#"))continue;let u=c.match(/^([a-zA-Z][\w.-]*)/);u&&t.add(u[1].toLowerCase().replace(/[-_.]+/g,"-"))}r=i.replace(e,"").replace(/^[\\/]/,"");break}}return{deps:t,source:r}}function JZ(e){let t=[],r=new Set,{deps:n,sources:o}=WZ(e),{deps:i,source:s}=KZ(e),a="";for(let c of["docker-compose.yml","docker-compose.yaml","compose.yml","compose.yaml"]){let u=Zr((0,H.join)(e,c));if(u){a=u;break}}for(let c of GZ)if(!r.has(c.id)){if(c.npmPackage&&c.npmPackage in n){let u=o.get(c.npmPackage)??"package.json";r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`${u} \u306B ${c.npmPackage} \u3092\u691C\u51FA`,version:n[c.npmPackage],url:c.url});continue}if(c.pyPackage&&i.has(c.pyPackage.toLowerCase().replace(/[-_.]+/g,"-"))){r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`${s} \u306B ${c.pyPackage} \u3092\u691C\u51FA`,url:c.url});continue}if(c.configFiles){for(let u of c.configFiles)if((0,te.existsSync)((0,H.join)(e,u))){r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`${u} \u3092\u691C\u51FA`,url:c.url});break}if(r.has(c.id))continue}c.dockerPattern&&a.includes(c.dockerPattern)&&(r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`docker-compose.yml \u306B ${c.dockerPattern} \u3092\u691C\u51FA`,url:c.url}))}return t}function YZ(e){let t;for(let i of["docker-compose.yml","docker-compose.yaml","compose.yml","compose.yaml"])if(t=Zr((0,H.join)(e,i)),t)break;if(!t)return[];let r=[],n=/^\s{2}(\w[\w-]*):\s*$/gm,o;for(;(o=n.exec(t))!==null;)r.push(o[1]);return r}function QZ(e){let t=(0,H.join)(e,"docs"),r=(0,te.existsSync)((0,H.join)(e,"godd-mcp-server","notes-app","package.json")),n=(0,te.existsSync)((0,H.join)(e,"godd-mcp-server","notes-api","pyproject.toml"));if(!(0,te.existsSync)(t))return{exists:!1,sections:[],files:[],has_notes_app:r,has_notes_api:n};let o=[],i=[];function s(a,c){try{for(let u of(0,te.readdirSync)(a)){if(u.startsWith("."))continue;let p=(0,H.join)(a,u),l=c?`${c}/${u}`:u;(0,te.statSync)(p).isDirectory()?(c||o.push(u),s(p,l)):i.push(l)}}catch{}}return s(t,""),{exists:!0,sections:o,files:i,has_notes_app:r,has_notes_api:n}}function D1(e){let t=si((0,H.join)(e,"package.json"))?.name||(0,H.basename)(e),r=[];try{for(let u of(0,te.readdirSync)(e)){if(u.startsWith(".")||u==="node_modules")continue;let p=(0,H.join)(e,u);(0,te.statSync)(p).isDirectory()&&r.push(u)}}catch{}let o=["package.json","pyproject.toml","docker-compose.yml","docker-compose.yaml","Dockerfile","tsconfig.json",".env.example","env.example","AGENTS.md","README.md","Makefile",".mise.toml","turbo.json","pnpm-workspace.yaml"].filter(u=>(0,te.existsSync)((0,H.join)(e,u))),s=si((0,H.join)(e,"package.json"))?.scripts??{},a=[];try{for(let u of(0,te.readdirSync)(e))(u.match(/^env.*\.example$/)||u.match(/^\.env.*\.example$/))&&a.push(u)}catch{}let c=Zr((0,H.join)(e,"README.md"),500);return{root:e,name:t,detected_stacks:HZ(e),detected_tools:JZ(e),vendor_items:VZ(e),key_files:o,directories:r,scripts:s,docker_services:YZ(e),env_templates:a,readme_excerpt:c,question_list_path:(0,H.join)(e,"docs","003_requirements","questions.csv"),docs_structure:QZ(e)}}var te,H,BZ,GZ,j1=_(()=>{"use strict";te=require("node:fs"),H=require("node:path");BZ={"browser-use":{description:"Python AI \u30D6\u30E9\u30A6\u30B6\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8 \u2014 Web\u30D6\u30E9\u30A6\u30B6\u3092\u81EA\u52D5\u64CD\u4F5C",runtime:"python",setupHint:"uv sync && uv run browser-use install"},"android-use":{description:"Python Android AI \u30A8\u30FC\u30B8\u30A7\u30F3\u30C8 \u2014 Android\u7AEF\u672B\u3092ADB\u3067\u81EA\u52D5\u64CD\u4F5C",runtime:"python",setupHint:"python -m venv .venv && pip install -r requirements.txt"},"react-grab":{description:"Node.js React \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B3\u30D4\u30FC\u30C4\u30FC\u30EB \u2014 React\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30C4\u30EA\u30FC\u3092\u62BD\u51FA",runtime:"node",setupHint:"pnpm install && pnpm build"}};GZ=[{id:"orval",label:"Orval",category:"frontend",description:"OpenAPI \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u30B3\u30FC\u30C9\u81EA\u52D5\u751F\u6210",url:"https://github.com/orval-labs/orval",npmPackage:"orval",configFiles:["orval.config.ts","orval.config.js","orval.config.cjs"]},{id:"tanstack-query",label:"TanStack Query",category:"frontend",description:"\u975E\u540C\u671F\u30C7\u30FC\u30BF\u30D5\u30A7\u30C3\u30C1\u30F3\u30B0/\u30AD\u30E3\u30C3\u30B7\u30E5\u7BA1\u7406",url:"https://github.com/TanStack/query",npmPackage:"@tanstack/react-query"},{id:"vite",label:"Vite",category:"frontend",description:"\u9AD8\u901F\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9\u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",url:"https://vitejs.dev/",npmPackage:"vite",configFiles:["vite.config.ts","vite.config.js","vite.config.mts"]},{id:"biome",label:"Biome",category:"devtool",description:"\u9AD8\u901F Linter / Formatter\uFF08Rust\u88FD\uFF09",url:"https://biomejs.dev/",npmPackage:"@biomejs/biome",configFiles:["biome.json","biome.jsonc"]},{id:"storybook",label:"Storybook",category:"frontend",description:"UI\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u958B\u767A/\u30AB\u30BF\u30ED\u30B0\u30C4\u30FC\u30EB",url:"https://storybook.js.org/",npmPackage:"storybook",configFiles:[".storybook/main.ts",".storybook/main.js"]},{id:"ruff",label:"Ruff",category:"devtool",description:"\u8D85\u9AD8\u901F Python Linter / Formatter\uFF08Rust\u88FD\uFF09",url:"https://docs.astral.sh/ruff/",pyPackage:"ruff",configFiles:["ruff.toml",".ruff.toml"]},{id:"uv",label:"uv",category:"devtool",description:"\u9AD8\u901F Python \u30D1\u30C3\u30B1\u30FC\u30B8\u30DE\u30CD\u30FC\u30B8\u30E3\uFF08Rust\u88FD\uFF09",url:"https://docs.astral.sh/uv/",configFiles:["uv.lock"]},{id:"sqlmodel",label:"SQLModel",category:"backend",description:"SQLAlchemy + Pydantic \u30D9\u30FC\u30B9\u306E Python ORM",url:"https://sqlmodel.tiangolo.com/",pyPackage:"sqlmodel"},{id:"alembic",label:"Alembic",category:"backend",description:"SQLAlchemy \u30D9\u30FC\u30B9\u306E DB \u30DE\u30A4\u30B0\u30EC\u30FC\u30B7\u30E7\u30F3\u30C4\u30FC\u30EB",url:"https://alembic.sqlalchemy.org/",pyPackage:"alembic",configFiles:["alembic.ini","backend/alembic.ini"]},{id:"fastapi-users",label:"FastAPI Users",category:"backend",description:"FastAPI \u5411\u3051\u8A8D\u8A3C/\u30E6\u30FC\u30B6\u30FC\u7BA1\u7406\u30E9\u30A4\u30D6\u30E9\u30EA",url:"https://fastapi-users.github.io/fastapi-users/",pyPackage:"fastapi-users"},{id:"pytest",label:"Pytest",category:"testing",description:"Python \u30C6\u30B9\u30C8\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF",url:"https://docs.pytest.org/",pyPackage:"pytest",configFiles:["pytest.ini","pyproject.toml"]},{id:"httpx",label:"HTTPX",category:"testing",description:"Python \u975E\u540C\u671F HTTP \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\uFF08\u30C6\u30B9\u30C8\u7528\uFF09",url:"https://www.python-httpx.org/",pyPackage:"httpx"},{id:"playwright",label:"Playwright",category:"testing",description:"\u30AF\u30ED\u30B9\u30D6\u30E9\u30A6\u30B6 E2E \u30C6\u30B9\u30C8\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF",url:"https://playwright.dev/",npmPackage:"@playwright/test",pyPackage:"playwright",configFiles:["playwright.config.ts","playwright.config.js"]},{id:"docker-compose",label:"Docker Compose",category:"infra",description:"\u30DE\u30EB\u30C1\u30B3\u30F3\u30C6\u30CA\u30AA\u30FC\u30B1\u30B9\u30C8\u30EC\u30FC\u30B7\u30E7\u30F3",url:"https://docs.docker.com/compose/",configFiles:["docker-compose.yml","docker-compose.yaml","compose.yml","compose.yaml"]},{id:"caddy",label:"Caddy",category:"infra",description:"\u81EA\u52D5 HTTPS \u5BFE\u5FDC\u30EA\u30D0\u30FC\u30B9\u30D7\u30ED\u30AD\u30B7",url:"https://caddyserver.com/",configFiles:["Caddyfile"],dockerPattern:"caddy"},{id:"traefik",label:"Traefik",category:"infra",description:"\u30AF\u30E9\u30A6\u30C9\u30CD\u30A4\u30C6\u30A3\u30D6 \u30EA\u30D0\u30FC\u30B9\u30D7\u30ED\u30AD\u30B7 / \u30ED\u30FC\u30C9\u30D0\u30E9\u30F3\u30B5",url:"https://traefik.io/",configFiles:["traefik.yml","traefik.toml"],dockerPattern:"traefik"},{id:"flutter",label:"Flutter",category:"frontend",description:"\u30AF\u30ED\u30B9\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0 UI \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\uFF08Dart\uFF09",url:"https://flutter.dev/",configFiles:["pubspec.yaml"]},{id:"cocoapods",label:"CocoaPods",category:"devtool",description:"iOS / macOS \u4F9D\u5B58\u7BA1\u7406\u30C4\u30FC\u30EB",url:"https://cocoapods.org/",configFiles:["Podfile","ios/Podfile"]},{id:"gradle",label:"Gradle",category:"devtool",description:"Android / JVM \u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",url:"https://gradle.org/",configFiles:["build.gradle.kts","build.gradle","android/build.gradle.kts","android/build.gradle"]},{id:"swiftpm",label:"Swift Package Manager",category:"devtool",description:"Swift \u30D1\u30C3\u30B1\u30FC\u30B8\u7BA1\u7406\u30FB\u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",url:"https://www.swift.org/package-manager/",configFiles:["Package.swift"]},{id:"sentry",label:"Sentry",category:"monitoring",description:"\u30A8\u30E9\u30FC\u8FFD\u8DE1 / \u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u76E3\u8996",url:"https://sentry.io/",npmPackage:"@sentry/react",pyPackage:"sentry-sdk",configFiles:["sentry.properties"]}]});function XZ(e,t){let r=t??process.env.GODD_PROJECT_ROOT??process.cwd();if(e.projectContext?.root===r)return e.projectContext;let n=D1(r);return e.projectContext=n,n}function M(e,t,r,n,o){let i=XZ(e,n),s=e.config.language??"en",a=h1(t,e.profile,{project:i,language:s,...o});return`${s!=="en"?`> **Output Language**: Respond entirely in ${s}.
97
97
 
98
98
  `:""}${a}
99
99
 
100
100
  ---
101
101
 
102
- ${r}`}var fe=_(()=>{"use strict";Cu();C1()});function R1(e,t){let r=[`## \u4F9D\u983C
102
+ ${r}`}var he=_(()=>{"use strict";Au();j1()});function q1(e,t){let r=[`## \u4F9D\u983C
103
103
  ${t.task??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.completion_criteria&&r.push(`## \u5B8C\u4E86\u6761\u4EF6
104
104
  ${t.completion_criteria}`),t.slug&&r.push(`## Slug
105
105
  ${t.slug}`),t.constraints&&r.push(`## \u5236\u7D04
106
106
  ${t.constraints}`),t.context&&r.push(`## \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8
107
107
  ${t.context}`),M(e,"dev",r.join(`
108
108
 
109
- `),t.project_root)}var E1,I1,z1,A1=_(()=>{"use strict";pe();fe();E1="godd_dev",I1="\u958B\u767A\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u652F\u63F4\u3002\u81EA\u7136\u8A00\u8A9E\u306E\u4F9D\u983C\u304B\u3089\u3001Spec\u78BA\u8A8D\u30FB\u5F71\u97FF\u8ABF\u67FB\u30FB\u5B9F\u88C5\u30FB\u54C1\u8CEA\u30B2\u30FC\u30C8\u30FBPR\u672C\u6587\u751F\u6210\u307E\u3067\u3092\u4E00\u8CAB\u3057\u3066\u884C\u3044\u307E\u3059\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u30D6\u30E9\u30F3\u30C1\u4E0A\u3067\u547C\u3073\u51FA\u3055\u308C\u305F\u5834\u5408\u306F feat/<slug>-<YYYYMMDD> \u30D6\u30E9\u30F3\u30C1\u3092\u81EA\u52D5\u4F5C\u6210\u3057\u3001\u5B8C\u4E86\u5F8C\u306F\u5909\u66F4\u3092\u8CAC\u52D9\u5225\u306B\u5206\u5272\u30B3\u30DF\u30C3\u30C8\u3057\u307E\u3059\u3002",z1=g.object({task:g.string().optional().describe("\u5B9F\u88C5\u3057\u305F\u3044\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\u3067\u8A18\u8FF0\uFF09"),context:g.string().optional().describe("\u95A2\u9023\u3059\u308B\u30B3\u30FC\u30C9\u3084\u4ED5\u69D8\u306E\u60C5\u5831\uFF08\u4EFB\u610F\uFF09"),completion_criteria:g.string().optional().describe("\u5B8C\u4E86\u6761\u4EF6\uFF08\u6E2C\u5B9A\u53EF\u80FD\u306B\uFF09"),slug:g.string().optional().describe("\u30C1\u30B1\u30C3\u30C8/\u77ED\u3044\u8B58\u5225\u5B50"),constraints:g.string().optional().describe("\u5236\u7D04\u4E8B\u9805"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function j1(e,t){let r=[`## \u30C1\u30A7\u30C3\u30AF\u5BFE\u8C61
109
+ `),t.project_root)}var M1,L1,Z1,F1=_(()=>{"use strict";pe();he();M1="godd_dev",L1="\u958B\u767A\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u652F\u63F4\u3002\u81EA\u7136\u8A00\u8A9E\u306E\u4F9D\u983C\u304B\u3089\u3001Spec\u78BA\u8A8D\u30FB\u5F71\u97FF\u8ABF\u67FB\u30FB\u5B9F\u88C5\u30FB\u54C1\u8CEA\u30B2\u30FC\u30C8\u30FBPR\u672C\u6587\u751F\u6210\u307E\u3067\u3092\u4E00\u8CAB\u3057\u3066\u884C\u3044\u307E\u3059\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u30D6\u30E9\u30F3\u30C1\u4E0A\u3067\u547C\u3073\u51FA\u3055\u308C\u305F\u5834\u5408\u306F feat/<slug>-<YYYYMMDD> \u30D6\u30E9\u30F3\u30C1\u3092\u81EA\u52D5\u4F5C\u6210\u3057\u3001\u5B8C\u4E86\u5F8C\u306F\u5909\u66F4\u3092\u8CAC\u52D9\u5225\u306B\u5206\u5272\u30B3\u30DF\u30C3\u30C8\u3057\u307E\u3059\u3002",Z1=m.object({task:m.string().max(2e5).optional().describe("\u5B9F\u88C5\u3057\u305F\u3044\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\u3067\u8A18\u8FF0\uFF09"),context:m.string().max(2e5).optional().describe("\u95A2\u9023\u3059\u308B\u30B3\u30FC\u30C9\u3084\u4ED5\u69D8\u306E\u60C5\u5831\uFF08\u4EFB\u610F\uFF09"),completion_criteria:m.string().max(2e5).optional().describe("\u5B8C\u4E86\u6761\u4EF6\uFF08\u6E2C\u5B9A\u53EF\u80FD\u306B\uFF09"),slug:m.string().max(1e3).optional().describe("\u30C1\u30B1\u30C3\u30C8/\u77ED\u3044\u8B58\u5225\u5B50"),constraints:m.string().max(2e5).optional().describe("\u5236\u7D04\u4E8B\u9805"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function H1(e,t){let r=[`## \u30C1\u30A7\u30C3\u30AF\u5BFE\u8C61
110
110
  ${t.target??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.check_type&&r.push(`## \u30C1\u30A7\u30C3\u30AF\u7A2E\u5225
111
111
  ${t.check_type}`),M(e,"check",r.join(`
112
112
 
113
- `),t.project_root)}var O1,N1,D1,M1=_(()=>{"use strict";pe();fe();O1="godd_check",N1="\u54C1\u8CEA\u30C1\u30A7\u30C3\u30AF\u3002\u5BFE\u8C61\u3092\u53D7\u3051\u53D6\u308A\u3001Spec\u6574\u5408\u30FB\u5F71\u97FF\u7BC4\u56F2\u30FB\u30C6\u30B9\u30C8\u8A08\u753B\u30FB\u4E92\u63DB\u6027\u30FB\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u89B3\u70B9\u304B\u3089\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\u3092\u884C\u3044\u307E\u3059\u3002",D1=g.object({target:g.string().optional().describe("\u30C1\u30A7\u30C3\u30AF\u5BFE\u8C61\uFF08\u5909\u66F4\u5185\u5BB9\u306E\u8AAC\u660E\u3001\u5DEE\u5206\u3001\u30D5\u30A1\u30A4\u30EB\u30EA\u30B9\u30C8\u7B49\uFF09"),check_type:g.string().optional().describe("\u30C1\u30A7\u30C3\u30AF\u7A2E\u5225\uFF08\u4F8B: pre-submit, spec, security, full\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function F1(e,t){let r=[];return t.context&&r.push(`## \u80CC\u666F
113
+ `),t.project_root)}var U1,B1,V1,G1=_(()=>{"use strict";pe();he();U1="godd_check",B1="\u54C1\u8CEA\u30C1\u30A7\u30C3\u30AF\u3002\u5BFE\u8C61\u3092\u53D7\u3051\u53D6\u308A\u3001Spec\u6574\u5408\u30FB\u5F71\u97FF\u7BC4\u56F2\u30FB\u30C6\u30B9\u30C8\u8A08\u753B\u30FB\u4E92\u63DB\u6027\u30FB\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u89B3\u70B9\u304B\u3089\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\u3092\u884C\u3044\u307E\u3059\u3002",V1=m.object({target:m.string().max(2e5).optional().describe("\u30C1\u30A7\u30C3\u30AF\u5BFE\u8C61\uFF08\u5909\u66F4\u5185\u5BB9\u306E\u8AAC\u660E\u3001\u5DEE\u5206\u3001\u30D5\u30A1\u30A4\u30EB\u30EA\u30B9\u30C8\u7B49\uFF09"),check_type:m.string().max(1e3).optional().describe("\u30C1\u30A7\u30C3\u30AF\u7A2E\u5225\uFF08\u4F8B: pre-submit, spec, security, full\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function Y1(e,t){let r=[];return t.context&&r.push(`## \u80CC\u666F
114
114
  ${t.context}`),t.review_scope&&r.push(`## \u30EC\u30D3\u30E5\u30FC\u7BC4\u56F2
115
115
  ${t.review_scope}`),t.severity_threshold&&r.push(`## \u6700\u4F4E\u91CD\u5927\u5EA6\u30D5\u30A3\u30EB\u30BF
116
116
  ${t.severity_threshold} \u4EE5\u4E0A\u306E\u307F\u51FA\u529B`),t.focus_areas&&r.push(`## \u91CD\u70B9\u30EC\u30D3\u30E5\u30FC\u9818\u57DF
@@ -119,176 +119,192 @@ ${t.focus_areas}`),t.file_path&&r.push(`## \u30D5\u30A1\u30A4\u30EB: ${t.file_pa
119
119
  ${t.code}
120
120
  \`\`\``),M(e,"review",r.join(`
121
121
 
122
- `),t.project_root)}var L1,Z1,q1,U1=_(()=>{"use strict";pe();fe();L1="godd_review",Z1="CTO \u30EC\u30D9\u30EB\u306E\u30B3\u30FC\u30C9\u30EC\u30D3\u30E5\u30FC\u3002\u30B3\u30FC\u30C9\u306E\u5DEE\u5206\u3092\u53D7\u3051\u53D6\u308A\u3001\u8A2D\u8A08\u30FB\u578B\u5B89\u5168\u30FB\u30C6\u30B9\u30C8\u30FB\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u904B\u7528\u30FB\u30D3\u30B8\u30CD\u30B9\u30A4\u30F3\u30D1\u30AF\u30C8\u306E\u89B3\u70B9\u304B\u3089\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002\u91CD\u5927\u5EA6\uFF08Critical/Major/Minor/Suggestion\uFF09\u4ED8\u304D\u306E\u69CB\u9020\u5316\u30EC\u30D3\u30E5\u30FC\u7D50\u679C\u3092\u51FA\u529B\u3057\u307E\u3059\u3002",q1=g.object({code:g.string().optional().describe("\u30EC\u30D3\u30E5\u30FC\u5BFE\u8C61\u306E\u30B3\u30FC\u30C9\uFF08\u5DEE\u5206\u307E\u305F\u306F\u30D5\u30A1\u30A4\u30EB\u5185\u5BB9\uFF09"),file_path:g.string().optional().describe("\u30D5\u30A1\u30A4\u30EB\u30D1\u30B9"),context:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684"),review_scope:g.enum(["file","pr","directory"]).optional().describe("\u30EC\u30D3\u30E5\u30FC\u7BC4\u56F2\uFF08file: \u5358\u4E00\u30D5\u30A1\u30A4\u30EB\u3001pr: PR \u5168\u4F53\u5DEE\u5206\u3001directory: \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\uFF09"),severity_threshold:g.enum(["critical","major","minor","suggestion"]).optional().describe("\u51FA\u529B\u3059\u308B\u6700\u4F4E\u91CD\u5927\u5EA6\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: suggestion = \u5168\u4EF6\u51FA\u529B\uFF09"),focus_areas:g.string().optional().describe("\u91CD\u70B9\u30EC\u30D3\u30E5\u30FC\u9818\u57DF\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A: architecture, security, performance, testing \u7B49\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function G1(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
122
+ `),t.project_root)}var W1,K1,J1,Q1=_(()=>{"use strict";pe();he();W1="godd_review",K1="CTO \u30EC\u30D9\u30EB\u306E\u30B3\u30FC\u30C9\u30EC\u30D3\u30E5\u30FC\u3002\u30B3\u30FC\u30C9\u306E\u5DEE\u5206\u3092\u53D7\u3051\u53D6\u308A\u3001\u8A2D\u8A08\u30FB\u578B\u5B89\u5168\u30FB\u30C6\u30B9\u30C8\u30FB\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u904B\u7528\u30FB\u30D3\u30B8\u30CD\u30B9\u30A4\u30F3\u30D1\u30AF\u30C8\u306E\u89B3\u70B9\u304B\u3089\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002\u91CD\u5927\u5EA6\uFF08Critical/Major/Minor/Suggestion\uFF09\u4ED8\u304D\u306E\u69CB\u9020\u5316\u30EC\u30D3\u30E5\u30FC\u7D50\u679C\u3092\u51FA\u529B\u3057\u307E\u3059\u3002",J1=m.object({code:m.string().max(2e5).optional().describe("\u30EC\u30D3\u30E5\u30FC\u5BFE\u8C61\u306E\u30B3\u30FC\u30C9\uFF08\u5DEE\u5206\u307E\u305F\u306F\u30D5\u30A1\u30A4\u30EB\u5185\u5BB9\uFF09"),file_path:m.string().max(1e3).optional().describe("\u30D5\u30A1\u30A4\u30EB\u30D1\u30B9"),context:m.string().max(2e5).optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684"),review_scope:m.enum(["file","pr","directory"]).optional().describe("\u30EC\u30D3\u30E5\u30FC\u7BC4\u56F2\uFF08file: \u5358\u4E00\u30D5\u30A1\u30A4\u30EB\u3001pr: PR \u5168\u4F53\u5DEE\u5206\u3001directory: \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\uFF09"),severity_threshold:m.enum(["critical","major","minor","suggestion"]).optional().describe("\u51FA\u529B\u3059\u308B\u6700\u4F4E\u91CD\u5927\u5EA6\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: suggestion = \u5168\u4EF6\u51FA\u529B\uFF09"),focus_areas:m.string().max(1e3).optional().describe("\u91CD\u70B9\u30EC\u30D3\u30E5\u30FC\u9818\u57DF\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A: architecture, security, performance, testing \u7B49\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function r2(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
123
123
  ${t.changes??"(git diff \u304B\u3089\u81EA\u52D5\u53D6\u5F97)"}`];return t.context&&r.push(`## \u80CC\u666F
124
124
  ${t.context}`),M(e,"commit",r.join(`
125
125
 
126
- `),t.project_root,{auto_confirm:t.auto_confirm??!1})}var B1,V1,H1,W1=_(()=>{"use strict";pe();fe();B1="godd_commit",V1="\u8CAC\u52D9\u5358\u4F4D\u30B3\u30DF\u30C3\u30C8\u3002\u5909\u66F4\u5185\u5BB9\u3092\u9069\u5207\u306A\u7C92\u5EA6\uFF081\u30B3\u30DF\u30C3\u30C8=1\u8CAC\u52D9\uFF09\u3067\u5206\u5272\u3057\u3001\u30EB\u30FC\u30EB\u306B\u5247\u3063\u305F\u30B3\u30DF\u30C3\u30C8\u30E1\u30C3\u30BB\u30FC\u30B8\u3068\u5171\u306B\u30B3\u30DF\u30C3\u30C8\u3092\u5B9F\u884C\u3057\u307E\u3059\u3002",H1=g.object({changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08diff \u307E\u305F\u306F\u30D5\u30A1\u30A4\u30EB\u30EA\u30B9\u30C8\uFF09"),context:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684"),auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u30B3\u30DF\u30C3\u30C8\u8A08\u753B\u306E\u30E6\u30FC\u30B6\u30FC\u627F\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u5373\u5EA7\u306B\u5B9F\u884C\u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function Q1(e,t){let r=[`## \u8981\u6C42
126
+ `),t.project_root,{auto_confirm:t.auto_confirm??!1})}var X1,e2,t2,n2=_(()=>{"use strict";pe();he();X1="godd_commit",e2="\u8CAC\u52D9\u5358\u4F4D\u30B3\u30DF\u30C3\u30C8\u3002\u5909\u66F4\u5185\u5BB9\u3092\u9069\u5207\u306A\u7C92\u5EA6\uFF081\u30B3\u30DF\u30C3\u30C8=1\u8CAC\u52D9\uFF09\u3067\u5206\u5272\u3057\u3001\u30EB\u30FC\u30EB\u306B\u5247\u3063\u305F\u30B3\u30DF\u30C3\u30C8\u30E1\u30C3\u30BB\u30FC\u30B8\u3068\u5171\u306B\u30B3\u30DF\u30C3\u30C8\u3092\u5B9F\u884C\u3057\u307E\u3059\u3002",t2=m.object({changes:m.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08diff \u307E\u305F\u306F\u30D5\u30A1\u30A4\u30EB\u30EA\u30B9\u30C8\uFF09"),context:m.string().max(2e5).optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684"),auto_confirm:m.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u30B3\u30DF\u30C3\u30C8\u8A08\u753B\u306E\u30E6\u30FC\u30B6\u30FC\u627F\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u5373\u5EA7\u306B\u5B9F\u884C\u3059\u308B"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function a2(e,t){let r=[`## \u8981\u6C42
127
127
  ${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.spec_types?.length&&r.push(`## \u5FC5\u8981\u306ASpec\u306E\u7A2E\u985E
128
128
  ${t.spec_types.join(", ")}`),t.context&&r.push(`## \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8
129
129
  ${t.context}`),M(e,"spec",r.join(`
130
130
 
131
- `),t.project_root)}var K1,J1,Y1,X1=_(()=>{"use strict";pe();fe();K1="godd_spec",J1="\u8981\u6C42\u2192\u4ED5\u69D8\u5909\u63DB\u3002\u8981\u6C42\u3092\u53D7\u3051\u53D6\u308A\u3001\u5B9F\u88C5\u53EF\u80FD\u306A\u7C92\u5EA6\u306ESpec\uFF08API/UI/DB/Feature/Usecase\uFF09\u306B\u5909\u63DB\u3057\u307E\u3059\u3002",Y1=g.object({requirements:g.string().optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),spec_types:g.array(g.enum(["api","ui","db","feature","usecase","error_codes"])).optional().describe("\u5FC5\u8981\u306ASpec\u306E\u7A2E\u985E\uFF08\u672A\u6307\u5B9A\u306A\u3089\u81EA\u52D5\u5224\u5B9A\uFF09"),context:g.string().optional().describe("\u65E2\u5B58\u306E\u4ED5\u69D8\u3084\u5236\u7D04"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function n2(e,t){let r=[`## \u5909\u66F4\u6982\u8981
131
+ `),t.project_root)}var o2,i2,s2,c2=_(()=>{"use strict";pe();he();o2="godd_spec",i2="\u8981\u6C42\u2192\u4ED5\u69D8\u5909\u63DB\u3002\u8981\u6C42\u3092\u53D7\u3051\u53D6\u308A\u3001\u5B9F\u88C5\u53EF\u80FD\u306A\u7C92\u5EA6\u306ESpec\uFF08API/UI/DB/Feature/Usecase\uFF09\u306B\u5909\u63DB\u3057\u307E\u3059\u3002",s2=m.object({requirements:m.string().max(2e5).optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),spec_types:m.array(m.enum(["api","ui","db","feature","usecase","error_codes"])).optional().describe("\u5FC5\u8981\u306ASpec\u306E\u7A2E\u985E\uFF08\u672A\u6307\u5B9A\u306A\u3089\u81EA\u52D5\u5224\u5B9A\uFF09"),context:m.string().max(2e5).optional().describe("\u65E2\u5B58\u306E\u4ED5\u69D8\u3084\u5236\u7D04"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function d2(e,t){let r=[`## \u5909\u66F4\u6982\u8981
132
132
  ${t.change_summary??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,`## \u5BFE\u8C61\u30E2\u30B8\u30E5\u30FC\u30EB
133
133
  ${t.target_modules??"(\u81EA\u52D5\u691C\u51FA)"}`];return t.breaking_changes!==void 0&&r.push(`## \u7834\u58CA\u7684\u5909\u66F4
134
134
  ${t.breaking_changes?"\u3042\u308A":"\u306A\u3057"}`),M(e,"impact-analysis",r.join(`
135
135
 
136
- `),t.project_root)}var e2,t2,r2,o2=_(()=>{"use strict";pe();fe();e2="godd_impact",t2="\u5F71\u97FF\u5206\u6790\u3002\u5909\u66F4\u5185\u5BB9\u306E\u5F71\u97FF\u7BC4\u56F2\u3092\u6D17\u3044\u51FA\u3057\u3001\u629C\u3051\u6F0F\u308C\u3092\u9632\u304E\u307E\u3059\u3002",r2=g.object({change_summary:g.string().optional().describe("\u5909\u66F4\u6982\u8981\uFF08\u4F55\u3092/\u306A\u305C\uFF09"),target_modules:g.string().optional().describe("\u5BFE\u8C61\u30E2\u30B8\u30E5\u30FC\u30EB"),breaking_changes:g.boolean().optional().describe("\u7834\u58CA\u7684\u5909\u66F4\u306E\u6709\u7121"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function c2(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
136
+ `),t.project_root)}var u2,l2,p2,f2=_(()=>{"use strict";pe();he();u2="godd_impact",l2="\u5F71\u97FF\u5206\u6790\u3002\u5909\u66F4\u5185\u5BB9\u306E\u5F71\u97FF\u7BC4\u56F2\u3092\u6D17\u3044\u51FA\u3057\u3001\u629C\u3051\u6F0F\u308C\u3092\u9632\u304E\u307E\u3059\u3002",p2=m.object({change_summary:m.string().max(2e5).optional().describe("\u5909\u66F4\u6982\u8981\uFF08\u4F55\u3092/\u306A\u305C\uFF09"),target_modules:m.string().max(2e5).optional().describe("\u5BFE\u8C61\u30E2\u30B8\u30E5\u30FC\u30EB"),breaking_changes:m.boolean().optional().describe("\u7834\u58CA\u7684\u5909\u66F4\u306E\u6709\u7121"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function y2(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
137
137
  ${t.changes??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.failure_points&&r.push(`## \u5931\u6557\u30DD\u30A4\u30F3\u30C8
138
138
  ${t.failure_points}`),M(e,"test-plan",r.join(`
139
139
 
140
- `),t.project_root)}var i2,s2,a2,u2=_(()=>{"use strict";pe();fe();i2="godd_test_plan",s2="\u30C6\u30B9\u30C8\u8A08\u753B\u4F5C\u6210\u3002\u5909\u66F4\u5185\u5BB9\u306B\u57FA\u3065\u304D\u3001unit/integration/e2e\u306E\u5FC5\u8981\u6027\u3068\u5177\u4F53\u7684\u306A\u30C6\u30B9\u30C8\u9805\u76EE\u3092\u7B56\u5B9A\u3057\u307E\u3059\u3002",a2=g.object({changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08Spec/\u5B9F\u88C5\u5DEE\u5206\uFF09"),failure_points:g.string().optional().describe("\u5931\u6557\u3057\u3046\u308B\u30DD\u30A4\u30F3\u30C8\uFF08\u5883\u754C\u5024/\u7570\u5E38\u7CFB\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function f2(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
140
+ `),t.project_root)}var h2,m2,g2,_2=_(()=>{"use strict";pe();he();h2="godd_test_plan",m2="\u30C6\u30B9\u30C8\u8A08\u753B\u4F5C\u6210\u3002\u5909\u66F4\u5185\u5BB9\u306B\u57FA\u3065\u304D\u3001unit/integration/e2e\u306E\u5FC5\u8981\u6027\u3068\u5177\u4F53\u7684\u306A\u30C6\u30B9\u30C8\u9805\u76EE\u3092\u7B56\u5B9A\u3057\u307E\u3059\u3002",g2=m.object({changes:m.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08Spec/\u5B9F\u88C5\u5DEE\u5206\uFF09"),failure_points:m.string().max(2e5).optional().describe("\u5931\u6557\u3057\u3046\u308B\u30DD\u30A4\u30F3\u30C8\uFF08\u5883\u754C\u5024/\u7570\u5E38\u7CFB\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function w2(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
141
141
  ${t.changes??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.doc_type&&r.push(`## \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7A2E\u5225
142
142
  ${t.doc_type}`),M(e,"auto-documentation",r.join(`
143
143
 
144
- `),t.project_root)}var l2,p2,d2,h2=_(()=>{"use strict";pe();fe();l2="godd_documentation",p2="\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u66F4\u65B0\u652F\u63F4\u3002\u5909\u66F4\u5185\u5BB9\u304B\u3089\u5FC5\u8981\u306A\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u66F4\u65B0\uFF08Spec/README/\u8A2D\u5B9A\u8AAC\u660E/\u6280\u8853\u30B9\u30BF\u30C3\u30AF\uFF09\u3092\u6D17\u3044\u51FA\u3057\u3001\u5DEE\u5206\u6848\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002",d2=g.object({changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u5BFE\u8C61\u30D5\u30A1\u30A4\u30EB/\u6319\u52D5\u5DEE\u5206\uFF09"),doc_type:g.string().optional().describe("\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7A2E\u5225\uFF08\u4F8B: spec, readme, config, tech-stack\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function _2(e,t){let r=[`## \u80CC\u666F
144
+ `),t.project_root)}var v2,b2,x2,k2=_(()=>{"use strict";pe();he();v2="godd_documentation",b2="\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u66F4\u65B0\u652F\u63F4\u3002\u5909\u66F4\u5185\u5BB9\u304B\u3089\u5FC5\u8981\u306A\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u66F4\u65B0\uFF08Spec/README/\u8A2D\u5B9A\u8AAC\u660E/\u6280\u8853\u30B9\u30BF\u30C3\u30AF\uFF09\u3092\u6D17\u3044\u51FA\u3057\u3001\u5DEE\u5206\u6848\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002",x2=m.object({changes:m.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u5BFE\u8C61\u30D5\u30A1\u30A4\u30EB/\u6319\u52D5\u5DEE\u5206\uFF09"),doc_type:m.string().max(1e3).optional().describe("\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7A2E\u5225\uFF08\u4F8B: spec, readme, config, tech-stack\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function P2(e,t){let r=[`## \u80CC\u666F
145
145
  ${t.background??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,`## \u5909\u66F4\u5185\u5BB9
146
146
  ${t.changes??"(git diff \u304B\u3089\u81EA\u52D5\u53D6\u5F97)"}`];return t.scope&&r.push(`## \u5F71\u97FF\u7BC4\u56F2
147
147
  ${t.scope}`),t.breaking_changes&&r.push(`## \u4E92\u63DB\u6027/\u79FB\u884C
148
148
  ${t.breaking_changes}`),t.verification&&r.push(`## \u52D5\u4F5C\u78BA\u8A8D
149
149
  ${t.verification}`),M(e,"pr-analyze",r.join(`
150
150
 
151
- `),t.project_root)}var m2,g2,y2,v2=_(()=>{"use strict";pe();fe();m2="godd_pr_analyze",g2="PR\u5206\u6790\u3002PR\u306E\u5DEE\u5206\u3092\u8AAD\u307F\u3001\u30EC\u30D3\u30E5\u30FC\u89B3\u70B9\u30FB\u30EA\u30B9\u30AF\u30FB\u8FFD\u52A0\u3067\u5FC5\u8981\u306A\u60C5\u5831\u3092\u6574\u7406\u3057\u307E\u3059\u3002",y2=g.object({background:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F/\u76EE\u7684"),changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u30D5\u30A1\u30A4\u30EB/\u6A5F\u80FD\u5358\u4F4D\uFF09"),scope:g.string().optional().describe("\u5F71\u97FF\u7BC4\u56F2"),breaking_changes:g.string().optional().describe("\u4E92\u63DB\u6027/\u79FB\u884C\u306E\u6709\u7121"),verification:g.string().optional().describe("\u52D5\u4F5C\u78BA\u8A8D\uFF08\u30B3\u30DE\u30F3\u30C9/\u624B\u52D5\u624B\u9806\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function k2(e,t){if(t.mode==="generate-config"){let n=["## GoDD MCP Config \u81EA\u52D5\u751F\u6210\u30E2\u30FC\u30C9","","\u4EE5\u4E0B\u306E\u60C5\u5831\u3092\u3082\u3068\u306B `config.godd` \u3068 `.cursor/mcp.json` \u3092\u751F\u6210\u3057\u3066\u304F\u3060\u3055\u3044\u3002",""];if(t.components&&t.components.length>0){n.push("### \u9078\u629E\u3055\u308C\u305F\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8"),n.push("```yaml"),n.push("components:");for(let o of t.components)n.push(` - ${o}`);n.push("```")}else n.push("### \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u672A\u6307\u5B9A"),n.push("\u30E6\u30FC\u30B6\u30FC\u306B\u4F7F\u7528\u3059\u308B\u6280\u8853\u30B9\u30BF\u30C3\u30AF\u3092\u8CEA\u554F\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),n.push(`
152
- **\u5229\u7528\u53EF\u80FD\u306A\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8**: ${UZ}`);t.license_key?n.push(`
153
- ### \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC: \`${t.license_key}\``):n.push(`
151
+ `),t.project_root)}var S2,$2,T2,C2=_(()=>{"use strict";pe();he();S2="godd_pr_analyze",$2="PR\u5206\u6790\u3002PR\u306E\u5DEE\u5206\u3092\u8AAD\u307F\u3001\u30EC\u30D3\u30E5\u30FC\u89B3\u70B9\u30FB\u30EA\u30B9\u30AF\u30FB\u8FFD\u52A0\u3067\u5FC5\u8981\u306A\u60C5\u5831\u3092\u6574\u7406\u3057\u307E\u3059\u3002",T2=m.object({background:m.string().max(2e5).optional().describe("\u5909\u66F4\u306E\u80CC\u666F/\u76EE\u7684"),changes:m.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u30D5\u30A1\u30A4\u30EB/\u6A5F\u80FD\u5358\u4F4D\uFF09"),scope:m.string().max(2e5).optional().describe("\u5F71\u97FF\u7BC4\u56F2"),breaking_changes:m.string().max(2e5).optional().describe("\u4E92\u63DB\u6027/\u79FB\u884C\u306E\u6709\u7121"),verification:m.string().max(2e5).optional().describe("\u52D5\u4F5C\u78BA\u8A8D\uFF08\u30B3\u30DE\u30F3\u30C9/\u624B\u52D5\u624B\u9806\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function Eg(e){return e.length<=8?"****":e.slice(0,4)+"****"+e.slice(-4)}function R2(e,t){if(t.mode==="generate-config"){let n=["## GoDD MCP Config \u81EA\u52D5\u751F\u6210\u30E2\u30FC\u30C9","","\u4EE5\u4E0B\u306E\u60C5\u5831\u3092\u3082\u3068\u306B `config.godd` \u3068 `.cursor/mcp.json` \u3092\u751F\u6210\u3057\u3066\u304F\u3060\u3055\u3044\u3002",""];if(t.components&&t.components.length>0){n.push("### \u9078\u629E\u3055\u308C\u305F\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8"),n.push("```yaml"),n.push("components:");for(let o of t.components)n.push(` - ${o}`);n.push("```")}else n.push("### \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u672A\u6307\u5B9A"),n.push("\u30E6\u30FC\u30B6\u30FC\u306B\u4F7F\u7528\u3059\u308B\u6280\u8853\u30B9\u30BF\u30C3\u30AF\u3092\u8CEA\u554F\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),n.push(`
152
+ **\u5229\u7528\u53EF\u80FD\u306A\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8**: ${e5}`);t.license_key?n.push(`
153
+ ### \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC: \`${Eg(t.license_key)}\`\uFF08\u8A2D\u5B9A\u6E08\u307F\uFF09`):n.push(`
154
154
  ### \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u304C\u672A\u6307\u5B9A\u3067\u3059\u3002\u30E6\u30FC\u30B6\u30FC\u306B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`),n.push(`
155
155
  ### \u8A00\u8A9E: ${t.language??"ja"}`),n.push(`
156
- ### \u751F\u6210\u3059\u308B\u30D5\u30A1\u30A4\u30EB`),n.push("1. **config.godd** \u2014 \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u306B\u914D\u7F6E"),n.push("```yaml"),n.push(`license_key: "${t.license_key??"YOUR_LICENSE_KEY"}"`),n.push("components:");for(let o of t.components??["fastapi","react","postgresql"])n.push(` - ${o}`);return n.push(`language: "${t.language??"ja"}"`),n.push("```"),n.push(""),n.push("2. **`.cursor/mcp.json`** \u2014 Cursor IDE \u7528 MCP \u767B\u9332"),n.push("```json"),n.push(JSON.stringify({mcpServers:{godd:{command:"node",args:["path/to/godd-mcp-server/dist/index.js"],env:{GODD_CONFIG:"./config.godd"}}}},null,2)),n.push("```"),n.join(`
156
+ ### \u751F\u6210\u3059\u308B\u30D5\u30A1\u30A4\u30EB`),n.push("1. **config.godd** \u2014 \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u306B\u914D\u7F6E"),n.push("```yaml"),n.push(`license_key: "${t.license_key?Eg(t.license_key):"YOUR_LICENSE_KEY"}" # \u5B9F\u969B\u306E\u30AD\u30FC\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044`),n.push("components:");for(let o of t.components??["fastapi","react","postgresql"])n.push(` - ${o}`);return n.push(`language: "${t.language??"ja"}"`),n.push("```"),n.push(""),n.push("2. **`.cursor/mcp.json`** \u2014 Cursor IDE \u7528 MCP \u767B\u9332"),n.push("```json"),n.push(JSON.stringify({mcpServers:{godd:{command:"node",args:["path/to/godd-mcp-server/dist/index.js"],env:{GODD_CONFIG:"./config.godd"}}}},null,2)),n.push("```"),n.join(`
157
157
  `)}let r=[`## \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u30E2\u30FC\u30C9: ${t.mode??"full"}`];return t.license_key&&r.push(`## \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC
158
- \`${t.license_key}\``),t.stack_profile&&r.push(`## \u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB
158
+ \`${Eg(t.license_key)}\`\uFF08\u8A2D\u5B9A\u6E08\u307F\uFF09`),t.stack_profile&&r.push(`## \u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB
159
159
  ${t.stack_profile}`),t.components&&t.components.length>0&&r.push(`## \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8
160
160
  ${t.components.join(", ")}`),t.environment&&r.push(`## \u74B0\u5883\u60C5\u5831
161
161
  ${t.environment}`),t.issues&&r.push(`## \u554F\u984C
162
162
  ${t.issues}`),M(e,"setup",r.join(`
163
163
 
164
- `),t.project_root)}var b2,x2,w2,UZ,S2=_(()=>{"use strict";pe();fe();b2="godd_setup",x2="\u74B0\u5883\u69CB\u7BC9\u652F\u63F4\u3002GoDD MCP \u306E config.godd / .cursor/mcp.json \u751F\u6210\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E .env \u4F5C\u6210\u3001\u4F9D\u5B58\u5C0E\u5165\u3001Docker \u8D77\u52D5\u307E\u3067\u4E00\u62EC\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3057\u307E\u3059\u3002components \u3092\u6307\u5B9A\u3059\u308B\u3068 config.godd \u3092\u81EA\u52D5\u751F\u6210\u3067\u304D\u307E\u3059\u3002",w2=g.object({mode:g.enum(["full","godd-only","project-only","generate-config"]).optional().default("full").describe("\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u7BC4\u56F2: full=GoDD+\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5168\u4F53, godd-only=GoDD MCP \u8A2D\u5B9A\u306E\u307F, project-only=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u74B0\u5883\u306E\u307F, generate-config=config.godd \u81EA\u52D5\u751F\u6210"),environment:g.string().optional().describe("\u74B0\u5883\u60C5\u5831\uFF08OS\u3001\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u30C4\u30FC\u30EB\u7B49\uFF09"),license_key:g.string().optional().describe("GoDD \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\uFF08config.godd \u306B\u66F8\u304D\u8FBC\u3080\uFF09"),stack_profile:g.string().optional().describe("\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u540D\uFF08\u4F8B: fastapi-react\uFF09"),components:g.array(g.string()).optional().describe('\u6280\u8853\u30B9\u30BF\u30C3\u30AF\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u540D\u306E\u914D\u5217\uFF08\u4F8B: ["fastapi", "react", "postgresql"]\uFF09\u3002generate-config \u30E2\u30FC\u30C9\u3067\u4F7F\u7528\u3002'),language:g.string().optional().describe("\u30DE\u30A4\u30F3\u30C9\u30BB\u30C3\u30C8\u8A00\u8A9E\uFF08\u4F8B: ja, en\uFF09"),issues:g.string().optional().describe("\u56F0\u3063\u3066\u3044\u308B\u3053\u3068\uFF08\u30A8\u30E9\u30FC\u30E1\u30C3\u30BB\u30FC\u30B8\u7B49\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")}),UZ=["python, typescript, javascript, go, php, ruby, c, html, css","react, nextjs, vue, angular, svelte, vite, tailwind, sass, electron","fastapi, django, flask, express, fastify, nestjs, gin, echo, fiber, laravel, symfony, wordpress, rails, sinatra, koa","node, agent-stdio","postgresql, mysql, mongodb, redis","sqlalchemy, celery","docker, terraform","ddd-clean-architecture"].join(", ")});function C2(e,t){let r=[`## \u5909\u66F4\u70B9
164
+ `),t.project_root)}var E2,I2,z2,e5,A2=_(()=>{"use strict";pe();he();E2="godd_setup",I2="\u74B0\u5883\u69CB\u7BC9\u652F\u63F4\u3002GoDD MCP \u306E config.godd / .cursor/mcp.json \u751F\u6210\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E .env \u4F5C\u6210\u3001\u4F9D\u5B58\u5C0E\u5165\u3001Docker \u8D77\u52D5\u307E\u3067\u4E00\u62EC\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3057\u307E\u3059\u3002components \u3092\u6307\u5B9A\u3059\u308B\u3068 config.godd \u3092\u81EA\u52D5\u751F\u6210\u3067\u304D\u307E\u3059\u3002",z2=m.object({mode:m.enum(["full","godd-only","project-only","generate-config"]).optional().default("full").describe("\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u7BC4\u56F2: full=GoDD+\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5168\u4F53, godd-only=GoDD MCP \u8A2D\u5B9A\u306E\u307F, project-only=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u74B0\u5883\u306E\u307F, generate-config=config.godd \u81EA\u52D5\u751F\u6210"),environment:m.string().max(2e5).optional().describe("\u74B0\u5883\u60C5\u5831\uFF08OS\u3001\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u30C4\u30FC\u30EB\u7B49\uFF09"),license_key:m.string().max(1e3).optional().describe("GoDD \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\uFF08config.godd \u306B\u66F8\u304D\u8FBC\u3080\uFF09"),stack_profile:m.string().max(1e3).optional().describe("\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u540D\uFF08\u4F8B: fastapi-react\uFF09"),components:m.array(m.string().max(1e3)).optional().describe('\u6280\u8853\u30B9\u30BF\u30C3\u30AF\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u540D\u306E\u914D\u5217\uFF08\u4F8B: ["fastapi", "react", "postgresql"]\uFF09\u3002generate-config \u30E2\u30FC\u30C9\u3067\u4F7F\u7528\u3002'),language:m.string().max(1e3).optional().describe("\u30DE\u30A4\u30F3\u30C9\u30BB\u30C3\u30C8\u8A00\u8A9E\uFF08\u4F8B: ja, en\uFF09"),issues:m.string().max(2e5).optional().describe("\u56F0\u3063\u3066\u3044\u308B\u3053\u3068\uFF08\u30A8\u30E9\u30FC\u30E1\u30C3\u30BB\u30FC\u30B8\u7B49\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")}),e5=["python, typescript, javascript, go, php, ruby, c, html, css","react, nextjs, vue, angular, svelte, vite, tailwind, sass, electron","fastapi, django, flask, express, fastify, nestjs, gin, echo, fiber, laravel, symfony, wordpress, rails, sinatra, koa","node, agent-stdio","postgresql, mysql, mongodb, redis","sqlalchemy, celery","docker, terraform","ddd-clean-architecture"].join(", ")});function j2(e,t){let r=[`## \u5909\u66F4\u70B9
165
165
  ${t.changes??"(git log \u304B\u3089\u81EA\u52D5\u53D6\u5F97)"}`];return t.compatibility&&r.push(`## \u4E92\u63DB\u6027/\u79FB\u884C
166
166
  ${t.compatibility}`),t.known_issues&&r.push(`## \u65E2\u77E5\u306E\u554F\u984C
167
167
  ${t.known_issues}`),M(e,"release-notes",r.join(`
168
168
 
169
- `),t.project_root)}var $2,T2,P2,E2=_(()=>{"use strict";pe();fe();$2="godd_release_notes",T2="\u30EA\u30EA\u30FC\u30B9\u30CE\u30FC\u30C8\u4F5C\u6210\u3002\u5909\u66F4\u70B9\u30FB\u4E92\u63DB\u6027\u30FB\u65E2\u77E5\u306E\u554F\u984C\u3092\u307E\u3068\u3081\u305F\u30EA\u30EA\u30FC\u30B9\u30CE\u30FC\u30C8\u3092\u751F\u6210\u3057\u307E\u3059\u3002",P2=g.object({changes:g.string().optional().describe("\u5909\u66F4\u70B9\uFF08\u8FFD\u52A0/\u5909\u66F4/\u4FEE\u6B63\uFF09"),compatibility:g.string().optional().describe("\u4E92\u63DB\u6027/\u79FB\u884C\u306E\u6709\u7121"),known_issues:g.string().optional().describe("\u65E2\u77E5\u306E\u554F\u984C"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function A2(e,t){let r=[`## Decision
169
+ `),t.project_root)}var O2,N2,D2,M2=_(()=>{"use strict";pe();he();O2="godd_release_notes",N2="\u30EA\u30EA\u30FC\u30B9\u30CE\u30FC\u30C8\u4F5C\u6210\u3002\u5909\u66F4\u70B9\u30FB\u4E92\u63DB\u6027\u30FB\u65E2\u77E5\u306E\u554F\u984C\u3092\u307E\u3068\u3081\u305F\u30EA\u30EA\u30FC\u30B9\u30CE\u30FC\u30C8\u3092\u751F\u6210\u3057\u307E\u3059\u3002",D2=m.object({changes:m.string().max(2e5).optional().describe("\u5909\u66F4\u70B9\uFF08\u8FFD\u52A0/\u5909\u66F4/\u4FEE\u6B63\uFF09"),compatibility:m.string().max(2e5).optional().describe("\u4E92\u63DB\u6027/\u79FB\u884C\u306E\u6709\u7121"),known_issues:m.string().max(2e5).optional().describe("\u65E2\u77E5\u306E\u554F\u984C"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function F2(e,t){let r=[`## Decision
170
170
  ${t.decision??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,`## Context
171
171
  ${t.context??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.options&&r.push(`## Options
172
172
  ${t.options}`),M(e,"adr",r.join(`
173
173
 
174
- `),t.project_root)}var I2,z2,R2,O2=_(()=>{"use strict";pe();fe();I2="godd_adr",z2="ADR\uFF08Architecture Decision Record\uFF09\u4F5C\u6210\u3002\u8A2D\u8A08\u5224\u65AD\u3092\u30C8\u30EC\u30FC\u30C9\u30AA\u30D5\u30FB\u30ED\u30FC\u30EB\u30D0\u30C3\u30AF\u542B\u3081\u3066\u8A18\u9332\u3057\u307E\u3059\u3002",R2=g.object({decision:g.string().optional().describe("\u4F55\u3092\u6C7A\u3081\u308B\u304B\uFF08Decision\uFF09"),context:g.string().optional().describe("\u80CC\u666F\uFF08Context\uFF09"),options:g.string().optional().describe("\u4EE3\u66FF\u6848\uFF08Options\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function M2(e,t){return M(e,"sync","",t.project_root)}var N2,D2,j2,L2=_(()=>{"use strict";pe();fe();N2="godd_sync",D2="\u30C7\u30D5\u30A9\u30EB\u30C8\u30D6\u30E9\u30F3\u30C1\u540C\u671F\u3002\u73FE\u5728\u306E\u4F5C\u696D\u30D6\u30E9\u30F3\u30C1\u306B main \u306E\u6700\u65B0\u5909\u66F4\u3092\u53D6\u308A\u8FBC\u307F\u3001\u30DE\u30FC\u30B8\u30B3\u30F3\u30D5\u30EA\u30AF\u30C8\u304C\u767A\u751F\u3057\u305F\u5834\u5408\u306F SSOT \u6E96\u62E0\u5074\u3092\u512A\u5148\u3057\u3066\u89E3\u6D88\u3057\u307E\u3059\u3002",j2=g.object({project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function U2(e,t){let r=[`## \u30D6\u30E9\u30F3\u30C1\u540D
174
+ `),t.project_root)}var L2,Z2,q2,U2=_(()=>{"use strict";pe();he();L2="godd_adr",Z2="ADR\uFF08Architecture Decision Record\uFF09\u4F5C\u6210\u3002\u8A2D\u8A08\u5224\u65AD\u3092\u30C8\u30EC\u30FC\u30C9\u30AA\u30D5\u30FB\u30ED\u30FC\u30EB\u30D0\u30C3\u30AF\u542B\u3081\u3066\u8A18\u9332\u3057\u307E\u3059\u3002",q2=m.object({decision:m.string().max(2e5).optional().describe("\u4F55\u3092\u6C7A\u3081\u308B\u304B\uFF08Decision\uFF09"),context:m.string().max(2e5).optional().describe("\u80CC\u666F\uFF08Context\uFF09"),options:m.string().max(2e5).optional().describe("\u4EE3\u66FF\u6848\uFF08Options\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function G2(e,t){return M(e,"sync","",t.project_root)}var B2,V2,H2,W2=_(()=>{"use strict";pe();he();B2="godd_sync",V2="\u30C7\u30D5\u30A9\u30EB\u30C8\u30D6\u30E9\u30F3\u30C1\u540C\u671F\u3002\u73FE\u5728\u306E\u4F5C\u696D\u30D6\u30E9\u30F3\u30C1\u306B main \u306E\u6700\u65B0\u5909\u66F4\u3092\u53D6\u308A\u8FBC\u307F\u3001\u30DE\u30FC\u30B8\u30B3\u30F3\u30D5\u30EA\u30AF\u30C8\u304C\u767A\u751F\u3057\u305F\u5834\u5408\u306F SSOT \u6E96\u62E0\u5074\u3092\u512A\u5148\u3057\u3066\u89E3\u6D88\u3057\u307E\u3059\u3002",H2=m.object({project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function Q2(e,t){let r=[`## \u30D6\u30E9\u30F3\u30C1\u540D
175
175
  ${t.branch_name??"(\u30BF\u30B9\u30AF\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210)"}`];return t.base_branch&&r.push(`## \u8D77\u70B9\u30D6\u30E9\u30F3\u30C1
176
176
  ${t.base_branch}`),M(e,"new-branch",r.join(`
177
177
 
178
- `),t.project_root)}var Z2,q2,F2,B2=_(()=>{"use strict";pe();fe();Z2="godd_new_branch",q2="\u65B0\u30D6\u30E9\u30F3\u30C1\u4F5C\u6210\u3002\u4F5C\u696D\u4E2D\u306E\u5909\u66F4\u3092\u5B89\u5168\u306B\u9000\u907F\u3057\u3001\u6700\u65B0\u306E main \u304B\u3089\u65B0\u3057\u3044\u30D6\u30E9\u30F3\u30C1\u3092\u4F5C\u6210\u3057\u3066\u9000\u907F\u3057\u305F\u5909\u66F4\u3092\u5FA9\u5143\u3057\u307E\u3059\u3002",F2=g.object({branch_name:g.string().optional().describe("\u4F5C\u6210\u3059\u308B\u30D6\u30E9\u30F3\u30C1\u540D\uFF08\u4F8B: feat/add-auth\uFF09"),base_branch:g.string().optional().describe("\u8D77\u70B9\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: origin/main\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function W2(e,t){let r=[`## \u30D6\u30E9\u30F3\u30C1\u540D
178
+ `),t.project_root)}var K2,J2,Y2,X2=_(()=>{"use strict";pe();he();K2="godd_new_branch",J2="\u65B0\u30D6\u30E9\u30F3\u30C1\u4F5C\u6210\u3002\u4F5C\u696D\u4E2D\u306E\u5909\u66F4\u3092\u5B89\u5168\u306B\u9000\u907F\u3057\u3001\u6700\u65B0\u306E main \u304B\u3089\u65B0\u3057\u3044\u30D6\u30E9\u30F3\u30C1\u3092\u4F5C\u6210\u3057\u3066\u9000\u907F\u3057\u305F\u5909\u66F4\u3092\u5FA9\u5143\u3057\u307E\u3059\u3002",Y2=m.object({branch_name:m.string().max(1e3).optional().describe("\u4F5C\u6210\u3059\u308B\u30D6\u30E9\u30F3\u30C1\u540D\uFF08\u4F8B: feat/add-auth\uFF09"),base_branch:m.string().max(1e3).optional().describe("\u8D77\u70B9\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: origin/main\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function n$(e,t){let r=[`## \u30D6\u30E9\u30F3\u30C1\u540D
179
179
  ${t.branch_name??"(\u30BF\u30B9\u30AF\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210)"}`];return t.purpose&&r.push(`## \u76EE\u7684
180
180
  ${t.purpose}`),M(e,"git-workflow",r.join(`
181
181
 
182
- `),t.project_root,{auto_confirm:t.auto_confirm??!1})}var V2,H2,G2,K2=_(()=>{"use strict";pe();fe();V2="godd_git_workflow",H2="Git \u4E00\u9023\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u30D6\u30E9\u30F3\u30C1\u540C\u671F \u2192 \u65B0\u30D6\u30E9\u30F3\u30C1\u4F5C\u6210 \u2192 \u9069\u5207\u306A\u7C92\u5EA6\u3067\u30B3\u30DF\u30C3\u30C8\u3092\u4E00\u62EC\u5B9F\u884C\u3057\u307E\u3059\u3002",G2=g.object({branch_name:g.string().optional().describe("\u4F5C\u6210\u3059\u308B\u30D6\u30E9\u30F3\u30C1\u540D\uFF08\u4F8B: feat/add-auth\uFF09"),purpose:g.string().optional().describe("\u30D6\u30E9\u30F3\u30C1\u306E\u76EE\u7684\uFF08\u30B3\u30DF\u30C3\u30C8\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u7CBE\u5EA6\u5411\u4E0A\u306B\u4F7F\u7528\uFF09"),auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u5168 Phase \u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u4E00\u6C17\u901A\u8CAB\u3067\u5B9F\u884C\u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function X2(e,t){return M(e,"push","",t.project_root)}var J2,Y2,Q2,e$=_(()=>{"use strict";pe();fe();J2="godd_push",Y2="\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\u3002push/PR\u63D0\u51FA\u524D\u306B\u5FC5\u8981\u306A\u78BA\u8A8D\u4E8B\u9805\uFF08\u54C1\u8CEA\u30B2\u30FC\u30C8\u30FBSpec\u6574\u5408\u30FB\u6A5F\u5BC6\u60C5\u5831\u30C1\u30A7\u30C3\u30AF\u7B49\uFF09\u3092\u6F0F\u308C\u306A\u304F\u6574\u7406\u3057\u307E\u3059\u3002",Q2=g.object({project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function o$(e,t){return M(e,"push-execute","",t.project_root,{auto_confirm:t.auto_confirm??!1})}var t$,r$,n$,i$=_(()=>{"use strict";pe();fe();t$="godd_push_execute",r$="\u30EA\u30E2\u30FC\u30C8\u30D7\u30C3\u30B7\u30E5\u5B9F\u884C\u3002\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\uFF08\u54C1\u8CEA\u30B2\u30FC\u30C8\u30FBSpec\u6574\u5408\u30FB\u6A5F\u5BC6\u60C5\u5831\u30C1\u30A7\u30C3\u30AF\uFF09\u3092\u884C\u3044\u3001\u901A\u904E\u5F8C\u306B git push \u3092\u5B9F\u884C\u3057\u307E\u3059\u3002",n$=g.object({auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\u901A\u904E\u5F8C\u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u5373\u5EA7\u306B push \u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function u$(e,t){let r=[];return t.title&&r.push(`## PR\u30BF\u30A4\u30C8\u30EB
182
+ `),t.project_root,{auto_confirm:t.auto_confirm??!1})}var e$,t$,r$,o$=_(()=>{"use strict";pe();he();e$="godd_git_workflow",t$="Git \u4E00\u9023\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u30D6\u30E9\u30F3\u30C1\u540C\u671F \u2192 \u65B0\u30D6\u30E9\u30F3\u30C1\u4F5C\u6210 \u2192 \u9069\u5207\u306A\u7C92\u5EA6\u3067\u30B3\u30DF\u30C3\u30C8\u3092\u4E00\u62EC\u5B9F\u884C\u3057\u307E\u3059\u3002",r$=m.object({branch_name:m.string().max(1e3).optional().describe("\u4F5C\u6210\u3059\u308B\u30D6\u30E9\u30F3\u30C1\u540D\uFF08\u4F8B: feat/add-auth\uFF09"),purpose:m.string().max(2e5).optional().describe("\u30D6\u30E9\u30F3\u30C1\u306E\u76EE\u7684\uFF08\u30B3\u30DF\u30C3\u30C8\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u7CBE\u5EA6\u5411\u4E0A\u306B\u4F7F\u7528\uFF09"),auto_confirm:m.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u5168 Phase \u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u4E00\u6C17\u901A\u8CAB\u3067\u5B9F\u884C\u3059\u308B"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function c$(e,t){return M(e,"push","",t.project_root)}var i$,s$,a$,u$=_(()=>{"use strict";pe();he();i$="godd_push",s$="\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\u3002push/PR\u63D0\u51FA\u524D\u306B\u5FC5\u8981\u306A\u78BA\u8A8D\u4E8B\u9805\uFF08\u54C1\u8CEA\u30B2\u30FC\u30C8\u30FBSpec\u6574\u5408\u30FB\u6A5F\u5BC6\u60C5\u5831\u30C1\u30A7\u30C3\u30AF\u7B49\uFF09\u3092\u6F0F\u308C\u306A\u304F\u6574\u7406\u3057\u307E\u3059\u3002",a$=m.object({project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function f$(e,t){return M(e,"push-execute","",t.project_root,{auto_confirm:t.auto_confirm??!1})}var l$,p$,d$,h$=_(()=>{"use strict";pe();he();l$="godd_push_execute",p$="\u30EA\u30E2\u30FC\u30C8\u30D7\u30C3\u30B7\u30E5\u5B9F\u884C\u3002\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\uFF08\u54C1\u8CEA\u30B2\u30FC\u30C8\u30FBSpec\u6574\u5408\u30FB\u6A5F\u5BC6\u60C5\u5831\u30C1\u30A7\u30C3\u30AF\uFF09\u3092\u884C\u3044\u3001\u901A\u904E\u5F8C\u306B git push \u3092\u5B9F\u884C\u3057\u307E\u3059\u3002",d$=m.object({auto_confirm:m.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\u901A\u904E\u5F8C\u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u5373\u5EA7\u306B push \u3059\u308B"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function _$(e,t){let r=[];return t.title&&r.push(`## PR\u30BF\u30A4\u30C8\u30EB
183
183
  ${t.title}`),t.base_branch&&r.push(`## \u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1
184
184
  ${t.base_branch}`),t.context&&r.push(`## \u80CC\u666F
185
185
  ${t.context}`),M(e,"pr-create",r.join(`
186
186
 
187
- `),t.project_root,{auto_confirm:t.auto_confirm??!1,draft:t.draft??!1})}var s$,a$,c$,l$=_(()=>{"use strict";pe();fe();s$="godd_pr_create",a$="PR\u4F5C\u6210\u3002\u5909\u66F4\u5185\u5BB9\u3092\u5206\u6790\u3057\u3001PR\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u6E96\u62E0\u3057\u305F\u672C\u6587\u3092\u751F\u6210\u3057\u3066GitHub\u4E0A\u306BPR\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002",c$=g.object({title:g.string().optional().describe("PR\u30BF\u30A4\u30C8\u30EB\uFF08\u672A\u6307\u5B9A\u306E\u5834\u5408\u306F\u30D6\u30E9\u30F3\u30C1\u540D\u30FB\u5909\u66F4\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210\uFF09"),base_branch:g.string().optional().describe("\u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: main\uFF09"),context:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684\uFF08PR\u672C\u6587\u306E\u7CBE\u5EA6\u5411\u4E0A\u306B\u4F7F\u7528\uFF09"),draft:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068 Draft PR \u3068\u3057\u3066\u4F5C\u6210\u3059\u308B"),auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068PR\u672C\u6587\u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u5373\u5EA7\u306B\u4F5C\u6210\u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function h$(e,t){let r=[];return t.title&&r.push(`## PR\u30BF\u30A4\u30C8\u30EB
187
+ `),t.project_root,{auto_confirm:t.auto_confirm??!1,draft:t.draft??!1})}var m$,g$,y$,v$=_(()=>{"use strict";pe();he();m$="godd_pr_create",g$="PR\u4F5C\u6210\u3002\u5909\u66F4\u5185\u5BB9\u3092\u5206\u6790\u3057\u3001PR\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u6E96\u62E0\u3057\u305F\u672C\u6587\u3092\u751F\u6210\u3057\u3066GitHub\u4E0A\u306BPR\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002",y$=m.object({title:m.string().max(1e3).optional().describe("PR\u30BF\u30A4\u30C8\u30EB\uFF08\u672A\u6307\u5B9A\u306E\u5834\u5408\u306F\u30D6\u30E9\u30F3\u30C1\u540D\u30FB\u5909\u66F4\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210\uFF09"),base_branch:m.string().max(1e3).optional().describe("\u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: main\uFF09"),context:m.string().max(2e5).optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684\uFF08PR\u672C\u6587\u306E\u7CBE\u5EA6\u5411\u4E0A\u306B\u4F7F\u7528\uFF09"),draft:m.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068 Draft PR \u3068\u3057\u3066\u4F5C\u6210\u3059\u308B"),auto_confirm:m.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068PR\u672C\u6587\u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u5373\u5EA7\u306B\u4F5C\u6210\u3059\u308B"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function k$(e,t){let r=[];return t.title&&r.push(`## PR\u30BF\u30A4\u30C8\u30EB
188
188
  ${t.title}`),t.base_branch&&r.push(`## \u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1
189
189
  ${t.base_branch}`),t.context&&r.push(`## \u80CC\u666F
190
190
  ${t.context}`),M(e,"submit",r.join(`
191
191
 
192
- `),t.project_root,{auto_confirm:t.auto_confirm??!1,draft:t.draft??!1})}var p$,d$,f$,m$=_(()=>{"use strict";pe();fe();p$="godd_submit",d$="\u63D0\u51FA\u4E00\u62EC\u5B9F\u884C\u3002\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF \u2192 git push \u2192 PR\u4F5C\u6210\u3092\u4E00\u9023\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3068\u3057\u3066\u5B9F\u884C\u3057\u307E\u3059\u3002",f$=g.object({title:g.string().optional().describe("PR\u30BF\u30A4\u30C8\u30EB\uFF08\u672A\u6307\u5B9A\u306E\u5834\u5408\u306F\u30D6\u30E9\u30F3\u30C1\u540D\u30FB\u5909\u66F4\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210\uFF09"),base_branch:g.string().optional().describe("\u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: main\uFF09"),context:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684\uFF08PR\u672C\u6587\u306E\u7CBE\u5EA6\u5411\u4E0A\u306B\u4F7F\u7528\uFF09"),draft:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068 Draft PR \u3068\u3057\u3066\u4F5C\u6210\u3059\u308B"),auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u5168\u30B9\u30C6\u30C3\u30D7\u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u4E00\u6C17\u901A\u8CAB\u3067\u5B9F\u884C\u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function v$(e,t){return M(e,"agent-dev-workflow","",t.project_root)}var g$,y$,_$,b$=_(()=>{"use strict";pe();fe();g$="godd_dev_workflow",y$="\u958B\u767A\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u5168\u4F53\u7BA1\u7406\u3002\u30BF\u30FC\u30DF\u30CA\u30EB\u4E0D\u8981\u3067\u74B0\u5883\u69CB\u7BC9\u2192\u5B9F\u88C5\u2192\u30C6\u30B9\u30C8\u2192\u30B3\u30DF\u30C3\u30C8\u2192push\u2192PR\u4F5C\u6210\u307E\u3067\u4E00\u8CAB\u3057\u3066\u5B9F\u884C\u3057\u307E\u3059\u3002",_$=g.object({project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function S$(e,t){let r=[`## \u5831\u544A\u5BFE\u8C61
192
+ `),t.project_root,{auto_confirm:t.auto_confirm??!1,draft:t.draft??!1})}var b$,x$,w$,S$=_(()=>{"use strict";pe();he();b$="godd_submit",x$="\u63D0\u51FA\u4E00\u62EC\u5B9F\u884C\u3002\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF \u2192 git push \u2192 PR\u4F5C\u6210\u3092\u4E00\u9023\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3068\u3057\u3066\u5B9F\u884C\u3057\u307E\u3059\u3002",w$=m.object({title:m.string().max(1e3).optional().describe("PR\u30BF\u30A4\u30C8\u30EB\uFF08\u672A\u6307\u5B9A\u306E\u5834\u5408\u306F\u30D6\u30E9\u30F3\u30C1\u540D\u30FB\u5909\u66F4\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210\uFF09"),base_branch:m.string().max(1e3).optional().describe("\u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: main\uFF09"),context:m.string().max(2e5).optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684\uFF08PR\u672C\u6587\u306E\u7CBE\u5EA6\u5411\u4E0A\u306B\u4F7F\u7528\uFF09"),draft:m.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068 Draft PR \u3068\u3057\u3066\u4F5C\u6210\u3059\u308B"),auto_confirm:m.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u5168\u30B9\u30C6\u30C3\u30D7\u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u4E00\u6C17\u901A\u8CAB\u3067\u5B9F\u884C\u3059\u308B"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function C$(e,t){return M(e,"agent-dev-workflow","",t.project_root)}var $$,T$,P$,E$=_(()=>{"use strict";pe();he();$$="godd_dev_workflow",T$="\u958B\u767A\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u5168\u4F53\u7BA1\u7406\u3002\u30BF\u30FC\u30DF\u30CA\u30EB\u4E0D\u8981\u3067\u74B0\u5883\u69CB\u7BC9\u2192\u5B9F\u88C5\u2192\u30C6\u30B9\u30C8\u2192\u30B3\u30DF\u30C3\u30C8\u2192push\u2192PR\u4F5C\u6210\u307E\u3067\u4E00\u8CAB\u3057\u3066\u5B9F\u884C\u3057\u307E\u3059\u3002",P$=m.object({project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function A$(e,t){let r=[`## \u5831\u544A\u5BFE\u8C61
193
193
  ${t.target??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.report_type&&r.push(`## \u5831\u544A\u30BF\u30A4\u30D7
194
194
  ${t.report_type}`),M(e,"analyze-report",r.join(`
195
195
 
196
- `),t.project_root)}var x$,w$,k$,$$=_(()=>{"use strict";pe();fe();x$="godd_report",w$="\u5B8C\u4E86\u5831\u544A\u751F\u6210\u3002\u30BF\u30B9\u30AF\u5B8C\u4E86\u6642\u306E\u5909\u66F4\u6982\u8981\u30FB\u5F71\u97FF\u7BC4\u56F2\u30FB\u691C\u8A3C\u7D50\u679C\u30FB\u6B8B\u30EA\u30B9\u30AF\u3092\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u6CBF\u3063\u3066\u6574\u7406\u3057\u307E\u3059\u3002",k$=g.object({target:g.string().optional().describe("\u5831\u544A\u5BFE\u8C61\uFF08\u5909\u66F4\u5185\u5BB9\u306E\u6982\u8981\u307E\u305F\u306F\u30BF\u30B9\u30AF\u540D\uFF09"),report_type:g.string().optional().describe("\u5831\u544A\u30BF\u30A4\u30D7\uFF08\u4F8B: task-completion, incident, investigation\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function E$(e,t){return M(e,"requirements-to-business-flow",`## \u8981\u6C42
197
- ${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var T$,P$,C$,I$=_(()=>{"use strict";pe();fe();T$="godd_req_to_flow",P$="\u8981\u6C42\u2192\u30D3\u30B8\u30CD\u30B9\u30D5\u30ED\u30FC\u5909\u63DB\u3002\u81EA\u7136\u8A00\u8A9E\u306E\u8981\u6C42\u304B\u3089As-Is/To-Be\u30D5\u30ED\u30FC\u3068\u30E6\u30FC\u30B9\u30B1\u30FC\u30B9\u3092\u751F\u6210\u3057\u307E\u3059\u3002",C$=g.object({requirements:g.string().optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function O$(e,t){return M(e,"requirements-to-tickets",`## \u8981\u6C42
198
- ${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var z$,R$,A$,N$=_(()=>{"use strict";pe();fe();z$="godd_req_to_tickets",R$="\u8981\u6C42\u2192\u30C1\u30B1\u30C3\u30C8\u5206\u89E3\u3002\u8981\u6C42\u3092\u5B9F\u88C5\u30BF\u30B9\u30AF\uFF08\u30C1\u30B1\u30C3\u30C8\uFF09\u306B\u5206\u89E3\u3057\u3001\u4F9D\u5B58\u95A2\u4FC2\u3068\u691C\u8A3C\u65B9\u6CD5\u3092\u542B\u3081\u3066\u4E00\u89A7\u5316\u3057\u307E\u3059\u3002",A$=g.object({requirements:g.string().optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function L$(e,t){return M(e,"specification-to-tickets",`## \u5BFE\u8C61Spec
199
- ${t.specification??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var D$,j$,M$,Z$=_(()=>{"use strict";pe();fe();D$="godd_spec_to_tickets",j$="\u4ED5\u69D8\u2192\u30C1\u30B1\u30C3\u30C8\u5909\u63DB\u3002Spec\uFF08docs/009_spec/\uFF09\u304B\u3089\u5B9F\u88C5\u53EF\u80FD\u306A\u30BF\u30B9\u30AF\u30EA\u30B9\u30C8\u3092\u751F\u6210\u3057\u3001\u5F71\u97FF\u30EC\u30A4\u30E4\u30FC\u30FB\u30C6\u30B9\u30C8\u89B3\u70B9\u30FB\u30EA\u30B9\u30AF\u3092\u4ED8\u4E0E\u3057\u307E\u3059\u3002",M$=g.object({specification:g.string().optional().describe("\u5BFE\u8C61Spec\uFF08API/UI/DB/Feature/Usecase/Error Codes\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function B$(e,t){return M(e,"install",`## \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5BFE\u8C61
200
- ${t.target}`,t.project_root)}var q$,F$,U$,V$=_(()=>{"use strict";pe();fe();q$="godd_install",F$="\u30C4\u30FC\u30EB/MCP\u30B5\u30FC\u30D0\u30FC\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3002\u6307\u5B9A\u3055\u308C\u305F\u30C4\u30FC\u30EB\u306E\u74B0\u5883\u306B\u9069\u3057\u305F\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u624B\u9806\u30FB\u8A2D\u5B9A\u30FB\u758E\u901A\u78BA\u8A8D\u3092\u6848\u5185\u3057\u307E\u3059\u3002",U$=g.object({target:g.string().describe("\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5BFE\u8C61\u306E\u30C4\u30FC\u30EB/MCP\u540D\uFF08\u4F8B: context7, chrome-devtools-mcp, markitdown-mcp, mcp-ocr, serena, vibe-odf-read-mcp\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function K$(e,t){let r=[`## \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D
196
+ `),t.project_root)}var I$,z$,R$,O$=_(()=>{"use strict";pe();he();I$="godd_report",z$="\u5B8C\u4E86\u5831\u544A\u751F\u6210\u3002\u30BF\u30B9\u30AF\u5B8C\u4E86\u6642\u306E\u5909\u66F4\u6982\u8981\u30FB\u5F71\u97FF\u7BC4\u56F2\u30FB\u691C\u8A3C\u7D50\u679C\u30FB\u6B8B\u30EA\u30B9\u30AF\u3092\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u6CBF\u3063\u3066\u6574\u7406\u3057\u307E\u3059\u3002",R$=m.object({target:m.string().max(2e5).optional().describe("\u5831\u544A\u5BFE\u8C61\uFF08\u5909\u66F4\u5185\u5BB9\u306E\u6982\u8981\u307E\u305F\u306F\u30BF\u30B9\u30AF\u540D\uFF09"),report_type:m.string().max(1e3).optional().describe("\u5831\u544A\u30BF\u30A4\u30D7\uFF08\u4F8B: task-completion, incident, investigation\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function M$(e,t){return M(e,"requirements-to-business-flow",`## \u8981\u6C42
197
+ ${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var N$,D$,j$,L$=_(()=>{"use strict";pe();he();N$="godd_req_to_flow",D$="\u8981\u6C42\u2192\u30D3\u30B8\u30CD\u30B9\u30D5\u30ED\u30FC\u5909\u63DB\u3002\u81EA\u7136\u8A00\u8A9E\u306E\u8981\u6C42\u304B\u3089As-Is/To-Be\u30D5\u30ED\u30FC\u3068\u30E6\u30FC\u30B9\u30B1\u30FC\u30B9\u3092\u751F\u6210\u3057\u307E\u3059\u3002",j$=m.object({requirements:m.string().max(2e5).optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function U$(e,t){return M(e,"requirements-to-tickets",`## \u8981\u6C42
198
+ ${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var Z$,q$,F$,B$=_(()=>{"use strict";pe();he();Z$="godd_req_to_tickets",q$="\u8981\u6C42\u2192\u30C1\u30B1\u30C3\u30C8\u5206\u89E3\u3002\u8981\u6C42\u3092\u5B9F\u88C5\u30BF\u30B9\u30AF\uFF08\u30C1\u30B1\u30C3\u30C8\uFF09\u306B\u5206\u89E3\u3057\u3001\u4F9D\u5B58\u95A2\u4FC2\u3068\u691C\u8A3C\u65B9\u6CD5\u3092\u542B\u3081\u3066\u4E00\u89A7\u5316\u3057\u307E\u3059\u3002",F$=m.object({requirements:m.string().max(2e5).optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function W$(e,t){return M(e,"specification-to-tickets",`## \u5BFE\u8C61Spec
199
+ ${t.specification??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var V$,H$,G$,K$=_(()=>{"use strict";pe();he();V$="godd_spec_to_tickets",H$="\u4ED5\u69D8\u2192\u30C1\u30B1\u30C3\u30C8\u5909\u63DB\u3002Spec\uFF08docs/009_spec/\uFF09\u304B\u3089\u5B9F\u88C5\u53EF\u80FD\u306A\u30BF\u30B9\u30AF\u30EA\u30B9\u30C8\u3092\u751F\u6210\u3057\u3001\u5F71\u97FF\u30EC\u30A4\u30E4\u30FC\u30FB\u30C6\u30B9\u30C8\u89B3\u70B9\u30FB\u30EA\u30B9\u30AF\u3092\u4ED8\u4E0E\u3057\u307E\u3059\u3002",G$=m.object({specification:m.string().max(2e5).optional().describe("\u5BFE\u8C61Spec\uFF08API/UI/DB/Feature/Usecase/Error Codes\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function X$(e,t){return M(e,"install",`## \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5BFE\u8C61
200
+ ${t.target}`,t.project_root)}var J$,Y$,Q$,eT=_(()=>{"use strict";pe();he();J$="godd_install",Y$="\u30C4\u30FC\u30EB/MCP\u30B5\u30FC\u30D0\u30FC\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3002\u6307\u5B9A\u3055\u308C\u305F\u30C4\u30FC\u30EB\u306E\u74B0\u5883\u306B\u9069\u3057\u305F\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u624B\u9806\u30FB\u8A2D\u5B9A\u30FB\u758E\u901A\u78BA\u8A8D\u3092\u6848\u5185\u3057\u307E\u3059\u3002",Q$=m.object({target:m.string().max(1e3).describe("\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5BFE\u8C61\u306E\u30C4\u30FC\u30EB/MCP\u540D\uFF08\u4F8B: context7, chrome-devtools-mcp, markitdown-mcp, mcp-ocr, serena, vibe-odf-read-mcp\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function oT(e,t){let r=[`## \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D
201
201
  ${t.project_name??"(\u81EA\u52D5\u691C\u51FA)"}`];return t.roles?.length&&r.push(`## \u30ED\u30FC\u30EB
202
202
  ${t.roles.map(n=>`- ${n}`).join(`
203
203
  `)}`),t.screens?.length&&r.push(`## \u753B\u9762ID
204
204
  ${t.screens.map(n=>`- ${n}`).join(`
205
205
  `)}`),M(e,"docs-init",r.join(`
206
206
 
207
- `),t.project_root)}var H$,G$,W$,J$=_(()=>{"use strict";pe();fe();H$="godd_docs_init",G$="\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306B docs/ \u30D5\u30A9\u30EB\u30C0\u69CB\u9020\u3092\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304B\u3089\u751F\u6210\u3057\u307E\u3059\u3002ripla Notes \u3067\u95B2\u89A7\u30FB\u7DE8\u96C6\u53EF\u80FD\u306A MD/CSV/drawio \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u521D\u671F\u69CB\u9020\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002",W$=g.object({project_name:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D"),roles:g.array(g.string()).optional().describe("\u30ED\u30FC\u30EB\u540D\u4E00\u89A7\uFF08\u4F8B: \u7BA1\u7406\u8005, \u904B\u55B6\u8005, \u5229\u7528\u8005\uFF09"),screens:g.array(g.string()).optional().describe("\u753B\u9762ID\u4E00\u89A7\uFF08\u4F8B: SC-OP-01, SC-US-01\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function eT(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
207
+ `),t.project_root)}var tT,rT,nT,iT=_(()=>{"use strict";pe();he();tT="godd_docs_init",rT="\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306B docs/ \u30D5\u30A9\u30EB\u30C0\u69CB\u9020\u3092\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304B\u3089\u751F\u6210\u3057\u307E\u3059\u3002ripla Notes \u3067\u95B2\u89A7\u30FB\u7DE8\u96C6\u53EF\u80FD\u306A MD/CSV/drawio \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u521D\u671F\u69CB\u9020\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002",nT=m.object({project_name:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D"),roles:m.array(m.string().max(1e3)).optional().describe("\u30ED\u30FC\u30EB\u540D\u4E00\u89A7\uFF08\u4F8B: \u7BA1\u7406\u8005, \u904B\u55B6\u8005, \u5229\u7528\u8005\uFF09"),screens:m.array(m.string().max(1e3)).optional().describe("\u753B\u9762ID\u4E00\u89A7\uFF08\u4F8B: SC-OP-01, SC-US-01\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function uT(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
208
208
  ${t.changes??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.target_sections?.length&&r.push(`## \u66F4\u65B0\u5BFE\u8C61\u30BB\u30AF\u30B7\u30E7\u30F3
209
209
  ${t.target_sections.map(n=>`- ${n}`).join(`
210
210
  `)}`),M(e,"docs-update",r.join(`
211
211
 
212
- `),t.project_root)}var Y$,Q$,X$,tT=_(()=>{"use strict";pe();fe();Y$="godd_docs_update",Q$="\u30B3\u30FC\u30C9\u5909\u66F4\u5F8C\u306B docs/ \u5185\u306E\u95A2\u9023\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\uFF08MD/CSV\uFF09\u3092\u540C\u671F\u30FB\u66F4\u65B0\u3057\u307E\u3059\u3002\u5909\u66F4\u5185\u5BB9\u304B\u3089\u5F71\u97FF\u3059\u308B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u7279\u5B9A\u3057\u3001\u66F4\u65B0\u5DEE\u5206\u3092\u63D0\u6848\u3057\u307E\u3059\u3002",X$=g.object({changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u30B3\u30FC\u30C9\u5909\u66F4\u306E\u6982\u8981\uFF09"),target_sections:g.array(g.string()).optional().describe("\u66F4\u65B0\u5BFE\u8C61\u30BB\u30AF\u30B7\u30E7\u30F3\uFF08\u4F8B: 001_project, 003_requirements\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function iT(e,t){let r=[];return t.deploy_target&&r.push(`## \u30C7\u30D7\u30ED\u30A4\u5148
212
+ `),t.project_root)}var sT,aT,cT,lT=_(()=>{"use strict";pe();he();sT="godd_docs_update",aT="\u30B3\u30FC\u30C9\u5909\u66F4\u5F8C\u306B docs/ \u5185\u306E\u95A2\u9023\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\uFF08MD/CSV\uFF09\u3092\u540C\u671F\u30FB\u66F4\u65B0\u3057\u307E\u3059\u3002\u5909\u66F4\u5185\u5BB9\u304B\u3089\u5F71\u97FF\u3059\u308B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u7279\u5B9A\u3057\u3001\u66F4\u65B0\u5DEE\u5206\u3092\u63D0\u6848\u3057\u307E\u3059\u3002",cT=m.object({changes:m.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u30B3\u30FC\u30C9\u5909\u66F4\u306E\u6982\u8981\uFF09"),target_sections:m.array(m.string().max(1e3)).optional().describe("\u66F4\u65B0\u5BFE\u8C61\u30BB\u30AF\u30B7\u30E7\u30F3\uFF08\u4F8B: 001_project, 003_requirements\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function hT(e,t){let r=[];return t.deploy_target&&r.push(`## \u30C7\u30D7\u30ED\u30A4\u5148
213
213
  ${t.deploy_target}`),t.github_repo&&r.push(`## \u5BFE\u8C61\u30EA\u30DD\u30B8\u30C8\u30EA
214
214
  ${t.github_repo}`),M(e,"notes-deploy",r.join(`
215
215
 
216
- `)||"\u30C7\u30D7\u30ED\u30A4\u624B\u9806\u3092\u6848\u5185\u3057\u3066\u304F\u3060\u3055\u3044\u3002",t.project_root)}var rT,nT,oT,sT=_(()=>{"use strict";pe();fe();rT="godd_notes_deploy",nT="notes-app (React) / notes-api (FastAPI) \u306E\u30C7\u30D7\u30ED\u30A4\u6848\u5185\u3092\u751F\u6210\u3057\u307E\u3059\u3002compose\uFF08\u30ED\u30FC\u30AB\u30EB Docker Compose\uFF09\u3001deploy\uFF08AWS \u5B9F\u30C7\u30D7\u30ED\u30A4\uFF09\u3001infra\uFF08Terraform \u69CB\u7BC9\uFF09\u306E\u624B\u9806\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002",oT=g.object({deploy_target:g.string().optional().describe("\u30C7\u30D7\u30ED\u30A4\u65B9\u5F0F\uFF08compose, deploy, infra \u306E\u3044\u305A\u308C\u304B\uFF09"),github_repo:g.string().optional().describe("\u5BFE\u8C61 GitHub \u30EA\u30DD\u30B8\u30C8\u30EA\uFF08owner/repo \u5F62\u5F0F\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function BZ(){let e=process.env.GODD_CONFIG;if(!e)throw new Error(`GODD_CONFIG \u74B0\u5883\u5909\u6570\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002${ln} \u306E\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002`);return e}function lT(e){let t=BZ();if(e.action==="show"){if(!(0,fn.existsSync)(t))return`## ${ln} \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
216
+ `)||"\u30C7\u30D7\u30ED\u30A4\u624B\u9806\u3092\u6848\u5185\u3057\u3066\u304F\u3060\u3055\u3044\u3002",t.project_root)}var pT,dT,fT,mT=_(()=>{"use strict";pe();he();pT="godd_notes_deploy",dT="ripla Notes \u3092\u30C7\u30D7\u30ED\u30A4\u3057\u307E\u3059\u3002AI \u304C\u81EA\u5F8B\u5B9F\u884C\u53EF\u80FD\u306A\u624B\u9806\u3092\u8FD4\u3057\u307E\u3059\u3002compose --auto\uFF08\u30ED\u30FC\u30AB\u30EB\u81EA\u52D5\u30C7\u30D7\u30ED\u30A4\uFF09/ compose --config\uFF08\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u6307\u5B9A\uFF09/ deploy -y\uFF08AWS \u5B9F\u30C7\u30D7\u30ED\u30A4\uFF09/ status\uFF08\u72B6\u614B\u78BA\u8A8D\uFF09\u306E\u624B\u9806\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002",fT=m.object({deploy_target:m.string().max(1e3).optional().describe("\u30C7\u30D7\u30ED\u30A4\u65B9\u5F0F\uFF08compose, deploy, infra \u306E\u3044\u305A\u308C\u304B\uFF09"),github_repo:m.string().max(1e3).optional().describe("\u5BFE\u8C61 GitHub \u30EA\u30DD\u30B8\u30C8\u30EA\uFF08owner/repo \u5F62\u5F0F\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function t5(){let e=process.env.GODD_CONFIG;if(!e)throw new Error(`GODD_CONFIG \u74B0\u5883\u5909\u6570\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002${Ut} \u306E\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002`);return e}function gT(e){let t;try{t=hn.load(e)}catch{return e.replace(/(license_key\s*:\s*["']?)([^"'\n]+)(["']?)/g,"$1****$3")}if(typeof t=="object"&&t!==null&&!Array.isArray(t)){let r=t;return typeof r.license_key=="string"&&r.license_key.length>0&&(r.license_key="****"),hn.dump(r,{lineWidth:-1,quotingType:'"'})}return e}function bT(e){let t=t5();if(e.action==="show"){if(!(0,yn.existsSync)(t))return`## ${Ut} \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
217
217
 
218
218
  \u30D1\u30B9: \`${t}\`
219
219
 
220
- \`godd init\` \u3092\u5B9F\u884C\u3057\u3066\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3057\u3066\u304F\u3060\u3055\u3044\u3002`;let s=(0,fn.readFileSync)(t,"utf-8");return`## \u73FE\u5728\u306E ${ln}
220
+ \`godd init\` \u3092\u5B9F\u884C\u3057\u3066\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3057\u3066\u304F\u3060\u3055\u3044\u3002`;let a;try{a=(0,yn.readFileSync)(t,"utf-8")}catch(c){let u=c instanceof Error?c.message:String(c);return`## \u30A8\u30E9\u30FC: ${Ut} \u306E\u8AAD\u307F\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F
221
+
222
+ \u30D1\u30B9: \`${t}\`
223
+
224
+ ${u}`}return`## \u73FE\u5728\u306E ${Ut}
221
225
 
222
226
  \u30D1\u30B9: \`${t}\`
223
227
 
224
228
  \`\`\`yaml
225
- ${s}\`\`\``}if(!(0,fn.existsSync)(t))return`## \u30A8\u30E9\u30FC: ${ln} \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
229
+ ${gT(a)}\`\`\``}if(!(0,yn.existsSync)(t))return`## \u30A8\u30E9\u30FC: ${Ut} \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
230
+
231
+ \u30D1\u30B9: \`${t}\`
232
+
233
+ \`godd init\` \u3092\u5148\u306B\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002`;let r;try{r=(0,yn.readFileSync)(t,"utf-8")}catch(a){let c=a instanceof Error?a.message:String(a);return`## \u30A8\u30E9\u30FC: ${Ut} \u306E\u8AAD\u307F\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F
234
+
235
+ \u30D1\u30B9: \`${t}\`
236
+
237
+ ${c}`}let n=hn.load(r);if(typeof n!="object"||n===null||Array.isArray(n))return`## \u30A8\u30E9\u30FC: ${Ut} \u306E\u5F62\u5F0F\u304C\u4E0D\u6B63\u3067\u3059
226
238
 
227
239
  \u30D1\u30B9: \`${t}\`
228
240
 
229
- \`godd init\` \u3092\u5148\u306B\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002`;let r=(0,fn.readFileSync)(t,"utf-8"),n=Bo.load(r),o=[];if(e.license_key!==void 0&&(n.license_key=e.license_key,o.push(`license_key \u2192 \`${e.license_key.slice(0,8)}...\``)),e.components!==void 0&&(n.components=e.components,delete n.stack_profile,o.push(`components \u2192 [${e.components.join(", ")}]`)),e.language!==void 0&&(n.language=e.language,o.push(`language \u2192 \`${e.language}\``)),e.registry_url!==void 0&&(n.registry_url=e.registry_url,o.push(`registry_url \u2192 \`${e.registry_url}\``)),o.length===0)return`## \u66F4\u65B0\u306A\u3057
241
+ \u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u306F YAML \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u5F62\u5F0F\u3067\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002`;let o=n,i=[];if(e.license_key!==void 0&&(o.license_key=e.license_key,i.push("license_key \u2192 `****` (\u66F4\u65B0\u6E08\u307F)")),e.components!==void 0&&(o.components=e.components,delete o.stack_profile,i.push(`components \u2192 [${e.components.join(", ")}]`)),e.language!==void 0&&(o.language=e.language,i.push(`language \u2192 \`${e.language}\``)),e.registry_url!==void 0&&(o.registry_url=e.registry_url,i.push(`registry_url \u2192 \`${e.registry_url}\``)),i.length===0)return`## \u66F4\u65B0\u306A\u3057
230
242
 
231
- \u66F4\u65B0\u3059\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\uFF08license_key, components, language, registry_url\uFF09\u3002`;let i=Bo.dump(n,{lineWidth:-1,quotingType:'"'});return(0,fn.writeFileSync)(t,i,"utf-8"),`## ${ln} \u3092\u66F4\u65B0\u3057\u307E\u3057\u305F
243
+ \u66F4\u65B0\u3059\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\uFF08license_key, components, language, registry_url\uFF09\u3002`;let s=hn.dump(o,{lineWidth:-1,quotingType:'"'});try{(0,yn.writeFileSync)(t,s,"utf-8")}catch(a){let c=a instanceof Error?a.message:String(a);return`## \u30A8\u30E9\u30FC: ${Ut} \u306E\u66F8\u304D\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F
244
+
245
+ \u30D1\u30B9: \`${t}\`
246
+
247
+ ${c}`}return`## ${Ut} \u3092\u66F4\u65B0\u3057\u307E\u3057\u305F
232
248
 
233
249
  \u30D1\u30B9: \`${t}\`
234
250
 
235
251
  ### \u66F4\u65B0\u5185\u5BB9
236
- ${o.map(s=>`- ${s}`).join(`
252
+ ${i.map(a=>`- ${a}`).join(`
237
253
  `)}
238
254
 
239
255
  ### \u66F4\u65B0\u5F8C\u306E\u8A2D\u5B9A
240
256
  \`\`\`yaml
241
- ${i}\`\`\`
257
+ ${gT(s)}\`\`\`
242
258
 
243
- \u26A0 MCP \u30B5\u30FC\u30D0\u30FC\u306E\u518D\u8D77\u52D5\u304C\u5FC5\u8981\u3067\u3059\uFF08Cursor IDE \u3092\u518D\u8D77\u52D5\u3057\u3066\u304F\u3060\u3055\u3044\uFF09\u3002`}var fn,aT,cT,uT,pT=_(()=>{"use strict";pe();fn=require("node:fs");Sm();Pm();aT="godd_config",cT="config.godd \u306E\u8868\u793A\u30FB\u66F4\u65B0\u3092\u884C\u3044\u307E\u3059\u3002show \u3067\u73FE\u5728\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3001update \u3067\u6307\u5B9A\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u66F4\u65B0\u3057\u307E\u3059\u3002GODD_CONFIG \u74B0\u5883\u5909\u6570\u3067\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002",uT=g.object({action:g.enum(["show","update"]).describe("show=\u73FE\u5728\u306E\u8A2D\u5B9A\u3092\u8868\u793A, update=\u8A2D\u5B9A\u3092\u66F4\u65B0"),license_key:g.string().optional().describe("\u66F4\u65B0\u3059\u308B\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\uFF08action=update \u6642\u306E\u307F\uFF09"),components:g.array(g.string()).optional().describe("\u66F4\u65B0\u3059\u308B\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u914D\u5217\uFF08action=update \u6642\u306E\u307F\uFF09"),language:g.string().optional().describe("\u66F4\u65B0\u3059\u308B\u8A00\u8A9E\uFF08action=update \u6642\u306E\u307F\uFF09"),registry_url:g.string().optional().describe("\u66F4\u65B0\u3059\u308B Registry URL\uFF08action=update \u6642\u306E\u307F\uFF09")})});function fT(e){Pg=e}function dT(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");return Buffer.from(t,"base64")}function VZ(e){let t=e.split(".");if(t.length!==2)throw new rr("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306E\u5F62\u5F0F\u304C\u4E0D\u6B63\u3067\u3059");let[r,n]=t;if(Pg){let a=(0,Ru.createPublicKey)(Pg),c=dT(n);if(!(0,Ru.verify)(null,Buffer.from(r),a,c))throw new rr("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306E\u7F72\u540D\u304C\u7121\u52B9\u3067\u3059")}let o=dT(r).toString("utf-8"),i;try{i=JSON.parse(o)}catch{throw new rr("\u30E9\u30A4\u30BB\u30F3\u30B9\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F")}if(i.v!==1)throw new rr(`\u672A\u5BFE\u5FDC\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3: ${i.v}`);let s=new Date(i.exp);if(isNaN(s.getTime()))throw new rr("\u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u6709\u52B9\u671F\u9650\u304C\u4E0D\u6B63\u3067\u3059");if(s<new Date)throw new rr(`\u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u6709\u52B9\u671F\u9650\u304C\u5207\u308C\u3066\u3044\u307E\u3059\uFF08${i.exp}\uFF09`);return i}function hT(e,t){let r=VZ(e);if(r.stack&&r.stack!==t)throw new rr(`\u3053\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\u306F\u30B9\u30BF\u30C3\u30AF '${r.stack}' \u5C02\u7528\u3067\u3059\uFF08\u8981\u6C42: '${t}'\uFF09`);return r}var Ru,Pg,rr,mT=_(()=>{"use strict";Ru=require("node:crypto"),Pg="";rr=class extends Error{constructor(t){super(t),this.name="LicenseError"}}});var yT={};Zr(yT,{startServer:()=>gT});async function HZ(e){let t=e.components??[];if(t.length===0)return null;let r=await v1(t,e.language,e.license_key);if(r&&!r.isExpired){console.error("[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u30AD\u30E3\u30C3\u30B7\u30E5\u304B\u3089\u30ED\u30FC\u30C9\u3057\u307E\u3057\u305F");try{let n=JSON.parse(r.data);return Os(n),n}catch{console.error("[GoDD] \u30AD\u30E3\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002Registry API \u304B\u3089\u518D\u30D5\u30A7\u30C3\u30C1\u3057\u307E\u3059")}}try{let n=b1(t,e.language),o=await f1(e,n);if(o===null&&r){console.error("[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306F\u30AD\u30E3\u30C3\u30B7\u30E5\u3068\u540C\u4E00\u3067\u3059\uFF08304\uFF09");try{let i=JSON.parse(r.data);return Os(i),i}catch{console.error("[GoDD] 304 \u30AD\u30E3\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F")}}if(o){let i=await h1(o.bundle,e.license_key);Os(i);let s=JSON.stringify(i);return await _1(s,o.etag,t,e.language,e.license_key),console.error("[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092 Registry API \u304B\u3089\u30D5\u30A7\u30C3\u30C1\u3057\u307E\u3057\u305F"),i}}catch(n){console.error(`[GoDD] Registry API \u3078\u306E\u63A5\u7D9A\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${Ke(n)}`)}if(r){console.error("[GoDD] \u8B66\u544A: \u671F\u9650\u5207\u308C\u30AD\u30E3\u30C3\u30B7\u30E5\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\uFF08Registry API \u5230\u9054\u4E0D\u80FD\uFF09");try{let n=JSON.parse(r.data);return Os(n),n}catch{console.error("[GoDD] \u671F\u9650\u5207\u308C\u30AD\u30E3\u30C3\u30B7\u30E5\u306E JSON \u30D1\u30FC\u30B9\u306B\u3082\u5931\u6557\u3057\u307E\u3057\u305F")}}return null}async function gT(){let e=hk(),t=e.components&&e.components.length>0,r;if(t){try{let d=await d1(e);d.valid||(console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC: ${d.error??"\u4E0D\u660E\u306A\u30A8\u30E9\u30FC"}`),process.exit(1))}catch(d){console.error(`[GoDD] Registry \u30E9\u30A4\u30BB\u30F3\u30B9\u691C\u8A3C\u5931\u6557\u3002\u30ED\u30FC\u30AB\u30EB\u691C\u8A3C\u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF: ${Ke(d)}`)}try{await Tg(e.registry_url,e.license_key)}catch(d){console.error("\u30EA\u30DD\u30B8\u30C8\u30EA\u691C\u8A3C\u30A8\u30E9\u30FC:",Ke(d)),console.error(" godd init \u3092\u518D\u5B9F\u884C\u3059\u308B\u304B\u3001Registry API \u304C\u8D77\u52D5\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)}let l=await HZ(e);if(l)r={name:`registry:${e.components.join("+")}`,stacks:e.components.map(d=>({id:d,label:d,name:d})),quality_gate:l.quality_gate?{frontend:l.quality_gate.frontend,backend:l.quality_gate.backend,preflight_command:l.quality_gate.preflight??"pnpm preflight",summary:"format/lint/typecheck/build"}:void 0,tools:l.tools?.map(d=>({id:d.id,label:d.label,category:d.category,description:d.description,guidance:d.guidance}))};else{console.error("[GoDD] Registry/\u30AD\u30E3\u30C3\u30B7\u30E5\u5229\u7528\u4E0D\u53EF\u3002\u30ED\u30FC\u30AB\u30EB\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF"),xg((0,Mr.join)(oo,"..","templates"));let d=e.stack_profile??"fastapi-react";try{r=Tm(d,(0,Mr.join)(oo,"..","stacks"))}catch(f){console.error(`[GoDD] \u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB '${d}' \u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${Ke(f)}`),console.error("[GoDD] \u6700\u5C0F\u9650\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u3067\u8D77\u52D5\u3057\u307E\u3059"),r={name:d,stacks:[]}}}}else{let l=(0,Mr.join)(oo,"..",".keys","public.pem");(0,Au.existsSync)(l)&&fT((0,Au.readFileSync)(l,"utf-8"));try{hT(e.license_key,e.stack_profile??"fastapi-react")}catch(f){f instanceof rr&&(console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC: ${f.message}`),process.exit(1))}r=Tm(e.stack_profile??"fastapi-react",(0,Mr.join)(oo,"..","stacks")),await c1(e.license_key)||xg((0,Mr.join)(oo,"..","templates"))}let n={profile:r,config:e},o=new Dc({name:"godd-mcp-server",version:"0.1.0"});async function i(l){return t&&await $1(e.registry_url,e.license_key),l()}let s=[];function a(l,d,f,h){let m=f.shape;o.tool(l,d,m,async y=>({content:[{type:"text",text:await i(()=>h(n,f.parse(y)))}]})),s.push({name:l,description:d,params:Object.keys(m)})}function c(l,d,f,h){let m=f.shape;o.tool(l,d,m,async y=>({content:[{type:"text",text:await h(f.parse(y))}]})),s.push({name:l,description:d,params:Object.keys(m)})}a(E1,I1,z1,R1),a(O1,N1,D1,j1),a(L1,Z1,q1,F1),a(B1,V1,H1,G1),a(K1,J1,Y1,Q1),a(e2,t2,r2,n2),a(i2,s2,a2,c2),a(l2,p2,d2,f2),a(m2,g2,y2,_2),a(b2,x2,w2,k2),a($2,T2,P2,C2),a(I2,z2,R2,A2),a(N2,D2,j2,M2),a(Z2,q2,F2,U2),a(V2,H2,G2,W2),a(J2,Y2,Q2,X2),a(t$,r$,n$,o$),a(s$,a$,c$,u$),a(p$,d$,f$,h$),a(g$,y$,_$,v$),a(x$,w$,k$,S$),a(T$,P$,C$,E$),a(z$,R$,A$,O$),a(D$,j$,M$,L$),a(q$,F$,U$,B$),a(H$,G$,W$,K$),a(Y$,Q$,X$,eT),a(rT,nT,oT,iT),c(aT,cT,uT,lT);let u=r?.tools??[];u.length>0&&o.resource("ecosystem-tool",new hs("godd://tools/{toolId}",{list:async()=>({resources:u.map(l=>({uri:`godd://tools/${l.id}`,name:l.label,description:l.description,mimeType:"text/plain"}))})}),async(l,{toolId:d})=>{let f=u.find(m=>m.id===String(d));if(!f)return{contents:[{uri:l.href,text:"Tool not found"}]};let h=[`# ${f.label}`,"",`- **\u30AB\u30C6\u30B4\u30EA**: ${f.category}`,`- **\u8AAC\u660E**: ${f.description}`];return f.guidance&&h.push("","## \u5229\u7528\u30AC\u30A4\u30C0\u30F3\u30B9","",f.guidance),"url"in f&&f.url&&h.push("",`- **\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8**: ${f.url}`),{contents:[{uri:l.href,text:h.join(`
244
- `),mimeType:"text/plain"}]}}),o.resource("mcp-tool",new hs("godd://mcp-tools/{toolName}",{list:async()=>({resources:s.map(l=>({uri:`godd://mcp-tools/${l.name}`,name:l.name,description:l.description,mimeType:"text/plain"}))})}),async(l,{toolName:d})=>{let f=s.find(m=>m.name===String(d));if(!f)return{contents:[{uri:l.href,text:"Tool not found"}]};let h=[`# ${f.name}`,"",f.description,"","## \u30D1\u30E9\u30E1\u30FC\u30BF","",...f.params.map(m=>`- \`${m}\``)];return{contents:[{uri:l.href,text:h.join(`
245
- `),mimeType:"text/plain"}]}});let p=new Mc;await o.connect(p)}var Mr,Cg,Au,_T,oo,GZ,vT=_(()=>{"use strict";ow();aw();Pm();Ho();u1();m1();x1();w1();T1();A1();M1();U1();W1();X1();o2();u2();h2();v2();S2();E2();O2();L2();B2();K2();e$();i$();l$();m$();b$();$$();I$();N$();Z$();V$();J$();tT();sT();pT();mT();Mr=require("node:path"),Cg=require("node:url"),Au=require("node:fs"),_T={};try{oo=(0,Mr.dirname)((0,Cg.fileURLToPath)(_T.url))}catch{oo=(0,Mr.dirname)(process.execPath)}GZ=(()=>{try{let e=(0,Cg.fileURLToPath)(_T.url);return process.argv[1]===e}catch{return!process.env.__GODD_CLI__}})();GZ&&gT().catch(e=>{console.error("GoDD MCP Server \u8D77\u52D5\u30A8\u30E9\u30FC:",e),process.exit(1)})});var $T={};Zr($T,{buildMcpServerEntry:()=>Eg,runInit:()=>ST});function oi(e){return new Promise(t=>{kT.question(e,r=>t(r.trim()))})}function WZ(e){let t=new Map;for(let n of e){let o=YZ[n.name]??n.category,i=t.get(o)??[];i.push(n),t.set(o,i)}return["language","frontend-ui","frontend-css","frontend-build","frontend","backend-api","backend-orm","backend-task","backend","runtime","database","infra","architecture"].filter(n=>t.has(n)).map(n=>({category:n,components:t.get(n)}))}function QZ(e,t){let r=JZ[e];return r===void 0||r.length===0?!0:r.some(n=>t.has(n))}function XZ(){return!!process.pkg}async function e5(e,t){try{let r=await fetch(`${e}/v1/components`,{headers:{Authorization:`Bearer ${t}`}});return r.ok?await r.json():null}catch{return null}}function t5(e,t,r,n){return["# GoDD MCP Server Configuration","# Generated by godd-init","",`license_key: "${e}"`,"","# \u6280\u8853\u30B9\u30BF\u30C3\u30AF\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8","components:",...t.map(i=>` - ${i}`),"",`language: "${r}"`,"","# Registry API URL (default: production endpoint)",`# registry_url: "${n}"`,""].join(`
246
- `)}function Eg(e){if(XZ())return{command:"godd",args:["server"],env:{GODD_CONFIG:e}};let t;try{t=(0,Ig.fileURLToPath)(TT.url)}catch{typeof __filename<"u"?t=__filename:(t=process.argv[1]??process.execPath,console.warn(`[GoDD] import.meta.url / __filename \u304C\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3002process.argv[1] \u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF: ${t}`))}let r=(0,St.dirname)(t),n=t.includes("src")?(0,St.resolve)(r,"..","..","dist","godd.js"):(0,St.resolve)(r,"godd.js");return{command:process.execPath,args:[n,"server"],env:{GODD_CONFIG:e}}}async function ST(){console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 GoDD MCP Server \u2014 \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log("");let e=await oi("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: ");e||(console.error("\u30A8\u30E9\u30FC: \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1));let r=await oi("\u4F7F\u7528\u8A00\u8A9E\u3092\u9078\u629E [ja/en/zh/ru/kz/tr] (default: ja): ")||"ja",o=await oi("Registry API URL (default: http://localhost:8100): ")||"http://localhost:8100",i=zu();i||(console.error(`
259
+ \u26A0 MCP \u30B5\u30FC\u30D0\u30FC\u306E\u518D\u8D77\u52D5\u304C\u5FC5\u8981\u3067\u3059\uFF08Cursor IDE \u3092\u518D\u8D77\u52D5\u3057\u3066\u304F\u3060\u3055\u3044\uFF09\u3002`}var yn,yT,_T,vT,xT=_(()=>{"use strict";pe();yn=require("node:fs");Pm();Em();yT="godd_config",_T="config.godd \u306E\u8868\u793A\u30FB\u66F4\u65B0\u3092\u884C\u3044\u307E\u3059\u3002show \u3067\u73FE\u5728\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3001update \u3067\u6307\u5B9A\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u66F4\u65B0\u3057\u307E\u3059\u3002GODD_CONFIG \u74B0\u5883\u5909\u6570\u3067\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002",vT=m.object({action:m.enum(["show","update"]).describe("show=\u73FE\u5728\u306E\u8A2D\u5B9A\u3092\u8868\u793A, update=\u8A2D\u5B9A\u3092\u66F4\u65B0"),license_key:m.string().min(1,"license_key \u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093").max(1e3).optional().describe("\u66F4\u65B0\u3059\u308B\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\uFF08action=update \u6642\u306E\u307F\uFF09"),components:m.array(m.string().min(1).max(1e3)).min(1,"components \u306F\u7A7A\u914D\u5217\u306B\u3067\u304D\u307E\u305B\u3093").optional().describe("\u66F4\u65B0\u3059\u308B\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u914D\u5217\uFF08action=update \u6642\u306E\u307F\uFF09"),language:m.string().min(1,"language \u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093").max(1e3).optional().describe("\u66F4\u65B0\u3059\u308B\u8A00\u8A9E\uFF08action=update \u6642\u306E\u307F\uFF09"),registry_url:m.string().min(1,"registry_url \u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093").url("registry_url \u306F\u6709\u52B9\u306A URL \u3067\u306A\u3051\u308C\u3070\u306A\u308A\u307E\u305B\u3093").max(1e3).optional().describe("\u66F4\u65B0\u3059\u308B Registry URL\uFF08action=update \u6642\u306E\u307F\uFF09")})});function zg(e){Ig=e}function wT(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");return Buffer.from(t,"base64")}function r5(e){let t=e.split(".");if(t.length!==2)throw new zt("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306E\u5F62\u5F0F\u304C\u4E0D\u6B63\u3067\u3059");let[r,n]=t;if(Ig){let a=(0,Du.createPublicKey)(Ig),c=wT(n);if(!(0,Du.verify)(null,Buffer.from(r),a,c))throw new zt("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306E\u7F72\u540D\u304C\u7121\u52B9\u3067\u3059")}else if(process.env.SKIP_LICENSE_VERIFY!=="true")throw new zt("\u516C\u958B\u9375\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u30E9\u30A4\u30BB\u30F3\u30B9\u691C\u8A3C\u304C\u3067\u304D\u307E\u305B\u3093");let o=wT(r).toString("utf-8"),i;try{i=JSON.parse(o)}catch{throw new zt("\u30E9\u30A4\u30BB\u30F3\u30B9\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F")}if(i.v!==1)throw new zt(`\u672A\u5BFE\u5FDC\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3: ${i.v}`);let s=new Date(i.exp);if(isNaN(s.getTime()))throw new zt("\u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u6709\u52B9\u671F\u9650\u304C\u4E0D\u6B63\u3067\u3059");if(s<new Date)throw new zt(`\u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u6709\u52B9\u671F\u9650\u304C\u5207\u308C\u3066\u3044\u307E\u3059\uFF08${i.exp}\uFF09`);return i}function Rg(e,t){let r=r5(e);if(r.stack&&r.stack!==t)throw new zt(`\u3053\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\u306F\u30B9\u30BF\u30C3\u30AF '${r.stack}' \u5C02\u7528\u3067\u3059\uFF08\u8981\u6C42: '${t}'\uFF09`);return r}var Du,Ig,zt,kT=_(()=>{"use strict";Du=require("node:crypto"),Ig="";zt=class extends Error{constructor(t){super(t),this.name="LicenseError"}}});var $T={};Br($T,{startServer:()=>ST});function n5(){try{let e=(0,ir.join)(qr,"..","package.json");return JSON.parse((0,ao.readFileSync)(e,"utf-8")).version??"0.0.0"}catch{return"0.0.0"}}async function o5(e){let t=e.components??[];if(t.length===0)return null;let r=await P1(t,e.language,e.license_key);if(r&&!r.isExpired){console.error("[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u30AD\u30E3\u30C3\u30B7\u30E5\u304B\u3089\u30ED\u30FC\u30C9\u3057\u307E\u3057\u305F");try{let n=JSON.parse(r.data);return Ls(n),n}catch{console.error("[GoDD] \u30AD\u30E3\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002Registry API \u304B\u3089\u518D\u30D5\u30A7\u30C3\u30C1\u3057\u307E\u3059")}}try{let n=C1(t,e.language),o=await x1(e,n);if(o===null&&r){console.error("[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306F\u30AD\u30E3\u30C3\u30B7\u30E5\u3068\u540C\u4E00\u3067\u3059\uFF08304\uFF09");try{let i=JSON.parse(r.data);return Ls(i),i}catch{console.error("[GoDD] 304 \u30AD\u30E3\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F")}}if(o){let i=await w1(o.bundle,e.license_key);Ls(i);let s=JSON.stringify(i);return await T1(s,o.etag,t,e.language,e.license_key),console.error("[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092 Registry API \u304B\u3089\u30D5\u30A7\u30C3\u30C1\u3057\u307E\u3057\u305F"),i}}catch(n){console.error(`[GoDD] Registry API \u3078\u306E\u63A5\u7D9A\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${Ne(n)}`)}if(r){console.error("[GoDD] \u8B66\u544A: \u671F\u9650\u5207\u308C\u30AD\u30E3\u30C3\u30B7\u30E5\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\uFF08Registry API \u5230\u9054\u4E0D\u80FD\uFF09");try{let n=JSON.parse(r.data);return Ls(n),n}catch{console.error("[GoDD] \u671F\u9650\u5207\u308C\u30AD\u30E3\u30C3\u30B7\u30E5\u306E JSON \u30D1\u30FC\u30B9\u306B\u3082\u5931\u6557\u3057\u307E\u3057\u305F")}}return null}async function ST(){let e=wk(),t=e.components&&e.components.length>0,r;if(t){try{let d=await b1(e);d.valid||(console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC: ${d.error??"\u4E0D\u660E\u306A\u30A8\u30E9\u30FC"}`),process.exit(1))}catch(d){console.error(`[GoDD] Registry \u30E9\u30A4\u30BB\u30F3\u30B9\u691C\u8A3C\u5931\u6557\u3002\u30ED\u30FC\u30AB\u30EB\u691C\u8A3C\u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF: ${Ne(d)}`);let f=(0,ir.join)(qr,"..",".keys","public.pem");(0,ao.existsSync)(f)&&zg((0,ao.readFileSync)(f,"utf-8"));try{let h=e.components?.[0]??e.stack_profile??"fastapi-react";Rg(e.license_key,h)}catch(h){h instanceof zt?console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC (\u30ED\u30FC\u30AB\u30EB\u691C\u8A3C): ${h.message}`):console.error(`[GoDD] \u30ED\u30FC\u30AB\u30EB\u30E9\u30A4\u30BB\u30F3\u30B9\u691C\u8A3C\u3067\u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC: ${Ne(h)}`),process.exit(1)}}try{await Cg(e.registry_url,e.license_key)}catch(d){console.error("\u30EA\u30DD\u30B8\u30C8\u30EA\u691C\u8A3C\u30A8\u30E9\u30FC:",Ne(d)),console.error(" godd init \u3092\u518D\u5B9F\u884C\u3059\u308B\u304B\u3001Registry API \u304C\u8D77\u52D5\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)}let l=await o5(e);if(l)r={name:`registry:${e.components.join("+")}`,stacks:e.components.map(d=>({id:d,label:d,name:d})),quality_gate:l.quality_gate?{frontend:l.quality_gate.frontend,backend:l.quality_gate.backend,preflight_command:l.quality_gate.preflight??"pnpm preflight",summary:"format/lint/typecheck/build"}:void 0,tools:l.tools?.map(d=>({id:d.id,label:d.label,category:d.category,description:d.description,guidance:d.guidance}))};else{console.error("[GoDD] Registry/\u30AD\u30E3\u30C3\u30B7\u30E5\u5229\u7528\u4E0D\u53EF\u3002\u30ED\u30FC\u30AB\u30EB\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF"),kg((0,ir.join)(qr,"..","templates"));let d=e.stack_profile??"fastapi-react";try{r=Cm(d,(0,ir.join)(qr,"..","stacks"))}catch(f){console.error(`[GoDD] \u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB '${d}' \u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${Ne(f)}`),console.error("[GoDD] \u6700\u5C0F\u9650\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u3067\u8D77\u52D5\u3057\u307E\u3059"),r={name:d,stacks:[]}}}}else{let l=(0,ir.join)(qr,"..",".keys","public.pem");(0,ao.existsSync)(l)&&zg((0,ao.readFileSync)(l,"utf-8"));try{Rg(e.license_key,e.stack_profile??"fastapi-react")}catch(h){h instanceof zt&&(console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC: ${h.message}`),process.exit(1)),console.error(`[GoDD] \u30E9\u30A4\u30BB\u30F3\u30B9\u691C\u8A3C\u3067\u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC: ${Ne(h)}`),process.exit(1)}let d=e.stack_profile??"fastapi-react";try{r=Cm(d,(0,ir.join)(qr,"..","stacks"))}catch(h){console.error(`[GoDD] \u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB '${d}' \u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${Ne(h)}`),console.error("[GoDD] \u6700\u5C0F\u9650\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u3067\u8D77\u52D5\u3057\u307E\u3059"),r={name:d,stacks:[]}}await g1(e.license_key)||kg((0,ir.join)(qr,"..","templates"))}let n={profile:r,config:e},o=new qc({name:"godd-mcp-server",version:n5()});async function i(l){return t&&await O1(e.registry_url,e.license_key),l()}let s=[];function a(l,d,f,h){let g=f.shape;o.tool(l,d,g,async y=>({content:[{type:"text",text:await i(()=>h(n,f.parse(y)))}]})),s.push({name:l,description:d,params:Object.keys(g)})}function c(l,d,f,h){let g=f.shape;o.tool(l,d,g,async y=>({content:[{type:"text",text:await h(f.parse(y))}]})),s.push({name:l,description:d,params:Object.keys(g)})}a(M1,L1,Z1,q1),a(U1,B1,V1,H1),a(W1,K1,J1,Y1),a(X1,e2,t2,r2),a(o2,i2,s2,a2),a(u2,l2,p2,d2),a(h2,m2,g2,y2),a(v2,b2,x2,w2),a(S2,$2,T2,P2),a(E2,I2,z2,R2),a(O2,N2,D2,j2),a(L2,Z2,q2,F2),a(B2,V2,H2,G2),a(K2,J2,Y2,Q2),a(e$,t$,r$,n$),a(i$,s$,a$,c$),a(l$,p$,d$,f$),a(m$,g$,y$,_$),a(b$,x$,w$,k$),a($$,T$,P$,C$),a(I$,z$,R$,A$),a(N$,D$,j$,M$),a(Z$,q$,F$,U$),a(V$,H$,G$,W$),a(J$,Y$,Q$,X$),a(tT,rT,nT,oT),a(sT,aT,cT,uT),a(pT,dT,fT,hT),c(yT,_T,vT,bT);let u=r?.tools??[];u.length>0&&o.resource("ecosystem-tool",new _s("godd://tools/{toolId}",{list:async()=>({resources:u.map(l=>({uri:`godd://tools/${l.id}`,name:l.label,description:l.description,mimeType:"text/plain"}))})}),async(l,{toolId:d})=>{let f=u.find(g=>g.id===String(d));if(!f)return{contents:[{uri:l.href,text:"Tool not found"}]};let h=[`# ${f.label}`,"",`- **\u30AB\u30C6\u30B4\u30EA**: ${f.category}`,`- **\u8AAC\u660E**: ${f.description}`];return f.guidance&&h.push("","## \u5229\u7528\u30AC\u30A4\u30C0\u30F3\u30B9","",f.guidance),"url"in f&&f.url&&h.push("",`- **\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8**: ${f.url}`),{contents:[{uri:l.href,text:h.join(`
260
+ `),mimeType:"text/plain"}]}}),o.resource("mcp-tool",new _s("godd://mcp-tools/{toolName}",{list:async()=>({resources:s.map(l=>({uri:`godd://mcp-tools/${l.name}`,name:l.name,description:l.description,mimeType:"text/plain"}))})}),async(l,{toolName:d})=>{let f=s.find(g=>g.name===String(d));if(!f)return{contents:[{uri:l.href,text:"Tool not found"}]};let h=[`# ${f.name}`,"",f.description,"","## \u30D1\u30E9\u30E1\u30FC\u30BF","",...f.params.map(g=>`- \`${g}\``)];return{contents:[{uri:l.href,text:h.join(`
261
+ `),mimeType:"text/plain"}]}});let p=new Uc;await o.connect(p)}var ir,Ag,ao,TT,qr,i5,PT=_(()=>{"use strict";dw();mw();Em();Ko();y1();k1();E1();I1();N1();F1();G1();Q1();n2();c2();f2();_2();k2();C2();A2();M2();U2();W2();X2();o$();u$();h$();v$();S$();E$();O$();L$();B$();K$();eT();iT();lT();mT();xT();kT();ir=require("node:path"),Ag=require("node:url"),ao=require("node:fs"),TT={};try{qr=(0,ir.dirname)((0,Ag.fileURLToPath)(TT.url))}catch{qr=(0,ir.dirname)(process.execPath)}i5=(()=>{try{let e=(0,Ag.fileURLToPath)(TT.url);return process.argv[1]===e}catch{return!process.env.__GODD_CLI__}})();i5&&ST().catch(e=>{console.error("GoDD MCP Server \u8D77\u52D5\u30A8\u30E9\u30FC:",e),process.exit(1)})});var AT={};Br(AT,{buildMcpServerEntry:()=>Og,runInit:()=>RT});function ai(e){return new Promise(t=>{zT.question(e,r=>t(r.trim()))})}function s5(e){let t=new Map;for(let n of e){let o=u5[n.name]??n.category,i=t.get(o)??[];i.push(n),t.set(o,i)}return["language","frontend-ui","frontend-css","frontend-build","frontend","backend-api","backend-orm","backend-task","backend","runtime","database","infra","architecture"].filter(n=>t.has(n)).map(n=>({category:n,components:t.get(n)}))}function l5(e,t){let r=c5[e];return r===void 0||r.length===0?!0:r.some(n=>t.has(n))}function p5(){return!!process.pkg}async function d5(e,t){try{let r=await fetch(`${e}/v1/components`,{headers:{Authorization:`Bearer ${t}`}});return r.ok?await r.json():null}catch{return null}}function f5(e,t,r,n){return["# GoDD MCP Server Configuration","# Generated by godd-init","",`license_key: "${e}"`,"","# \u6280\u8853\u30B9\u30BF\u30C3\u30AF\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8","components:",...t.map(i=>` - ${i}`),"",`language: "${r}"`,"","# Registry API URL (default: production endpoint)",`# registry_url: "${n}"`,""].join(`
262
+ `)}function Og(e){if(p5())return{command:"godd",args:["server"],env:{GODD_CONFIG:e}};let t;try{t=(0,Ng.fileURLToPath)(OT.url)}catch{typeof __filename<"u"?t=__filename:(t=process.argv[1]??process.execPath,console.warn(`[GoDD] import.meta.url / __filename \u304C\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3002process.argv[1] \u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF: ${t}`))}let r=(0,$t.dirname)(t),n=t.includes("src")?(0,$t.resolve)(r,"..","..","dist","godd.js"):(0,$t.resolve)(r,"godd.js");return{command:process.execPath,args:[n,"server"],env:{GODD_CONFIG:e}}}async function RT(){console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 GoDD MCP Server \u2014 \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log("");let e=await ai("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: ");e||(console.error("\u30A8\u30E9\u30FC: \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1));let r=await ai("\u4F7F\u7528\u8A00\u8A9E\u3092\u9078\u629E [ja/en/zh/ru/kz/tr] (default: ja): ")||"ja",o=await ai("Registry API URL (default: http://localhost:8100): ")||"http://localhost:8100",i=Zs();i||(console.error(`
247
263
  \u30A8\u30E9\u30FC: Git \u30EA\u30E2\u30FC\u30C8 (origin) \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002`),console.error(" git remote add origin <url> \u3067\u30EA\u30E2\u30FC\u30C8\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)),console.log(`
248
- \u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u767B\u9332\u4E2D: ${i}`);try{let T=await fetch(`${o}/v1/repos/register`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({remote_url:i}),signal:AbortSignal.timeout(1e4)});if(!T.ok){let U=await T.json().catch(()=>({detail:T.statusText}));console.error(`
249
- \u30A8\u30E9\u30FC: \u30EA\u30DD\u30B8\u30C8\u30EA\u767B\u9332\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002`),console.error(` ${U.detail??T.statusText}`),T.status===401?console.error(" \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u304C\u7121\u52B9\u3067\u3059\u3002"):T.status===403&&console.error(" \u30EA\u30DD\u30B8\u30C8\u30EA\u6570\u306E\u4E0A\u9650\u306B\u9054\u3057\u3066\u3044\u307E\u3059\u3002\u7BA1\u7406\u8005\u306B\u9023\u7D61\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)}console.log("\u2713 \u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u767B\u9332\u3057\u307E\u3057\u305F")}catch{console.error(`
264
+ \u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u767B\u9332\u4E2D: ${i}`);try{let T=await fetch(`${o}/v1/repos/register`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({remote_url:i}),signal:AbortSignal.timeout(1e4)});if(!T.ok){let F=await T.json().catch(()=>({detail:T.statusText}));console.error(`
265
+ \u30A8\u30E9\u30FC: \u30EA\u30DD\u30B8\u30C8\u30EA\u767B\u9332\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002`),console.error(` ${F.detail??T.statusText}`),T.status===401?console.error(" \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u304C\u7121\u52B9\u3067\u3059\u3002"):T.status===403&&console.error(" \u30EA\u30DD\u30B8\u30C8\u30EA\u6570\u306E\u4E0A\u9650\u306B\u9054\u3057\u3066\u3044\u307E\u3059\u3002\u7BA1\u7406\u8005\u306B\u9023\u7D61\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)}console.log("\u2713 \u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u767B\u9332\u3057\u307E\u3057\u305F")}catch{console.error(`
250
266
  \u30A8\u30E9\u30FC: Registry API \u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3002`),console.error(` ${o} \u304C\u8D77\u52D5\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`),process.exit(1)}console.log(`
251
- \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u53D6\u5F97\u4E2D...`);let s=await e5(o,e)??bT;console.log(s===bT?" Registry API \u306B\u63A5\u7D9A\u3067\u304D\u306A\u3044\u305F\u3081\u3001\u30D3\u30EB\u30C8\u30A4\u30F3\u30EA\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002":` ${s.length} \u4EF6\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F\u3002`);let a=WZ(s),c=new Set,u=new Set;function p(T){return a.find(U=>U.category===T)}async function l(T,U){let Y=KZ[T.category]??T.category,Ce=U?T.components.filter(ze=>QZ(ze.name,u)):T.components;if(Ce.length===0){console.log(` \u3010${Y}\u3011 \u2014 \u5BFE\u5FDC\u3059\u308B\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306F\u3042\u308A\u307E\u305B\u3093\uFF08\u30B9\u30AD\u30C3\u30D7\uFF09`);return}console.log(`
252
- \u3010${Y}\u3011`),Ce.forEach((ze,Ye)=>{console.log(` ${String(Ye+1).padStart(2)}. ${ze.label.padEnd(25)} ${ze.description}`)});let dt=await oi(" \u9078\u629E (\u4F8B: 1,3): ");if(dt.toLowerCase()==="all")for(let ze of Ce)c.add(ze.name);else if(dt){let ze=dt.split(",").map(Ye=>parseInt(Ye.trim(),10));for(let Ye of ze)Ye>=1&&Ye<=Ce.length&&c.add(Ce[Ye-1].name)}}let d=[{step:1,title:"\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E",categories:["language"]},{step:2,title:"\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF / \u30E9\u30A4\u30D6\u30E9\u30EA",categories:["frontend-ui","backend-api","frontend","backend"]},{step:3,title:"\u95A2\u9023\u30C4\u30FC\u30EB\uFF08CSS / \u30D3\u30EB\u30C9 / ORM / \u30BF\u30B9\u30AF\u30AD\u30E5\u30FC / \u30E9\u30F3\u30BF\u30A4\u30E0\uFF09",categories:["frontend-css","frontend-build","backend-orm","backend-task","runtime"]},{step:4,title:"\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9",categories:["database"]},{step:5,title:"\u30A4\u30F3\u30D5\u30E9",categories:["infra"]}],f=d.length;console.log(`
267
+ \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u53D6\u5F97\u4E2D...`);let s=await d5(o,e)??CT;console.log(s===CT?" Registry API \u306B\u63A5\u7D9A\u3067\u304D\u306A\u3044\u305F\u3081\u3001\u30D3\u30EB\u30C8\u30A4\u30F3\u30EA\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002":` ${s.length} \u4EF6\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F\u3002`);let a=s5(s),c=new Set,u=new Set;function p(T){return a.find(F=>F.category===T)}async function l(T,F){let Y=a5[T.category]??T.category,Ie=F?T.components.filter(we=>l5(we.name,u)):T.components;if(Ie.length===0){console.log(` \u3010${Y}\u3011 \u2014 \u5BFE\u5FDC\u3059\u308B\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306F\u3042\u308A\u307E\u305B\u3093\uFF08\u30B9\u30AD\u30C3\u30D7\uFF09`);return}console.log(`
268
+ \u3010${Y}\u3011`),Ie.forEach((we,Qe)=>{console.log(` ${String(Qe+1).padStart(2)}. ${we.label.padEnd(25)} ${we.description}`)});let ht=await ai(" \u9078\u629E (\u4F8B: 1,3): ");if(ht.toLowerCase()==="all")for(let we of Ie)c.add(we.name);else if(ht){let we=ht.split(",").map(Qe=>parseInt(Qe.trim(),10));for(let Qe of we)Qe>=1&&Qe<=Ie.length&&c.add(Ie[Qe-1].name)}}let d=[{step:1,title:"\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E",categories:["language"]},{step:2,title:"\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF / \u30E9\u30A4\u30D6\u30E9\u30EA",categories:["frontend-ui","backend-api","frontend","backend"]},{step:3,title:"\u95A2\u9023\u30C4\u30FC\u30EB\uFF08CSS / \u30D3\u30EB\u30C9 / ORM / \u30BF\u30B9\u30AF\u30AD\u30E5\u30FC / \u30E9\u30F3\u30BF\u30A4\u30E0\uFF09",categories:["frontend-css","frontend-build","backend-orm","backend-task","runtime"]},{step:4,title:"\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9",categories:["database"]},{step:5,title:"\u30A4\u30F3\u30D5\u30E9",categories:["infra"]}],f=d.length;console.log(`
253
269
  \u2501\u2501\u2501 \u6280\u8853\u30B9\u30BF\u30C3\u30AF\u9078\u629E\uFF08${f} \u30B9\u30C6\u30C3\u30D7 + \u81EA\u52D5\u8A2D\u5B9A\uFF09\u2501\u2501\u2501`),console.log(`\u8907\u6570\u9078\u629E: "1,3,5" / \u5168\u9078\u629E: "all" / \u30B9\u30AD\u30C3\u30D7: Enter
254
270
  `);for(let T of d){console.log(`
255
- \u2554\u2500 Step ${T.step}/${f}: ${T.title}`);for(let U of T.categories){let Y=p(U);Y&&await l(Y,T.step!==1)}if(T.step===1){let U=p("language");if(U)for(let Y of U.components)c.has(Y.name)&&u.add(Y.name);u.size===0&&(console.error(`
271
+ \u2554\u2500 Step ${T.step}/${f}: ${T.title}`);for(let F of T.categories){let Y=p(F);Y&&await l(Y,T.step!==1)}if(T.step===1){let F=p("language");if(F)for(let Y of F.components)c.has(Y.name)&&u.add(Y.name);u.size===0&&(console.error(`
256
272
  \u30A8\u30E9\u30FC: \u4F7F\u7528\u3059\u308B\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30921\u3064\u4EE5\u4E0A\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002`),process.exit(1)),console.log(`
257
- \u2192 \u9078\u629E\u8A00\u8A9E: ${[...u].join(", ")}`),console.log(" \u4EE5\u964D\u306F\u9078\u629E\u3055\u308C\u305F\u8A00\u8A9E\u306B\u5BFE\u5FDC\u3059\u308B\u6280\u8853\u306E\u307F\u8868\u793A\u3057\u307E\u3059\u3002")}console.log(`\u255A\u2500 Step ${T.step} \u5B8C\u4E86`)}let h=p("architecture");if(h){for(let U of h.components)c.add(U.name);let T=h.components.map(U=>U.label).join(", ");console.log(`
273
+ \u2192 \u9078\u629E\u8A00\u8A9E: ${[...u].join(", ")}`),console.log(" \u4EE5\u964D\u306F\u9078\u629E\u3055\u308C\u305F\u8A00\u8A9E\u306B\u5BFE\u5FDC\u3059\u308B\u6280\u8853\u306E\u307F\u8868\u793A\u3057\u307E\u3059\u3002")}console.log(`\u255A\u2500 Step ${T.step} \u5B8C\u4E86`)}let h=p("architecture");if(h){for(let F of h.components)c.add(F.name);let T=h.components.map(F=>F.label).join(", ");console.log(`
258
274
  \u2714 \u8A2D\u8A08\u30D1\u30BF\u30FC\u30F3\u3092\u81EA\u52D5\u8A2D\u5B9A\u3057\u307E\u3057\u305F: ${T}`)}c.size===0&&(console.error(`
259
275
  \u30A8\u30E9\u30FC: \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C1\u3064\u3082\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002`),process.exit(1)),console.log(`
260
- \u2501\u2501\u2501 \u9078\u629E\u3055\u308C\u305F\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8 (${c.size} \u4EF6) \u2501\u2501\u2501`);for(let T of c){let U=s.find(Y=>Y.name===T);console.log(` \u2713 ${U?.label??T}`)}let m=process.cwd(),y=(0,St.join)(m,"config.godd"),v=await oi(`
261
- config.godd \u306E\u4FDD\u5B58\u5148 (default: ${y}): `)||y,k=t5(e,[...c],r,o);if((0,vr.writeFileSync)(v,k,"utf-8"),console.log(`
262
- \u2713 config.godd \u3092\u751F\u6210\u3057\u307E\u3057\u305F: ${v}`),(await oi(".cursor/mcp.json \u3092\u751F\u6210\u3057\u307E\u3059\u304B\uFF1F [Y/n]: ")).toLowerCase()!=="n"){let T=(0,St.join)(m,".cursor"),U=(0,St.resolve)((0,St.join)(T,"mcp.json")),Y=(0,St.resolve)((0,St.join)((0,wT.homedir)(),".cursor","mcp.json"));if(U===Y){let Ce={godd:Eg((0,St.resolve)(v))};console.log(`
276
+ \u2501\u2501\u2501 \u9078\u629E\u3055\u308C\u305F\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8 (${c.size} \u4EF6) \u2501\u2501\u2501`);for(let T of c){let F=s.find(Y=>Y.name===T);console.log(` \u2713 ${F?.label??T}`)}let g=process.cwd(),y=(0,$t.join)(g,"config.godd"),v=await ai(`
277
+ config.godd \u306E\u4FDD\u5B58\u5148 (default: ${y}): `)||y,k=f5(e,[...c],r,o);if((0,Gt.writeFileSync)(v,k,"utf-8"),console.log(`
278
+ \u2713 config.godd \u3092\u751F\u6210\u3057\u307E\u3057\u305F: ${v}`),(await ai(".cursor/mcp.json \u3092\u751F\u6210\u3057\u307E\u3059\u304B\uFF1F [Y/n]: ")).toLowerCase()!=="n"){let T=(0,$t.join)(g,".cursor"),F=(0,$t.resolve)((0,$t.join)(T,"mcp.json")),Y=(0,$t.resolve)((0,$t.join)((0,IT.homedir)(),".cursor","mcp.json"));if(F===Y){let Ie={godd:Og((0,$t.resolve)(v))};console.log(`
263
279
  \u26A0 \u30E6\u30FC\u30B6\u30FC\u30B0\u30ED\u30FC\u30D0\u30EB\u306E MCP \u8A2D\u5B9A\u3092\u4E0A\u66F8\u304D\u3057\u306A\u3044\u305F\u3081\u3001\u30D5\u30A1\u30A4\u30EB\u306B\u306F\u66F8\u304D\u8FBC\u307F\u307E\u305B\u3093\u3002`),console.log(` \u4EE5\u4E0B\u306E\u30D6\u30ED\u30C3\u30AF\u3092\u624B\u52D5\u3067 ${Y} \u306E mcpServers \u306B\u8FFD\u8A18\u3057\u3066\u304F\u3060\u3055\u3044:
264
- `),console.log(JSON.stringify(Ce,null,2)),console.log("")}else{(0,vr.existsSync)(T)||(0,vr.mkdirSync)(T,{recursive:!0});let Ce={mcpServers:{}};if((0,vr.existsSync)(U))try{Ce={...JSON.parse((0,vr.readFileSync)(U,"utf-8"))},(typeof Ce.mcpServers!="object"||Ce.mcpServers===null)&&(Ce.mcpServers={})}catch{}let dt={...Ce.mcpServers};dt.godd=Eg((0,St.resolve)(v)),Ce.mcpServers=dt,(0,vr.writeFileSync)(U,JSON.stringify(Ce,null,2),"utf-8"),console.log(`\u2713 .cursor/mcp.json \u3092\u751F\u6210\u3057\u307E\u3057\u305F: ${U}`)}}console.log(`
265
- \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557`),console.log("\u2551 \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B8C\u4E86\uFF01 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log(""),console.log("\u6B21\u306E\u30B9\u30C6\u30C3\u30D7:"),console.log(" 1. Cursor IDE \u3092\u518D\u8D77\u52D5\u3057\u3066\u304F\u3060\u3055\u3044"),console.log(" 2. \u30C1\u30E3\u30C3\u30C8\u3067 GoDD MCP \u30C4\u30FC\u30EB\u304C\u4F7F\u3048\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3059"),console.log(" - godd_dev: \u958B\u767A\u652F\u63F4"),console.log(" - godd_check: \u30B3\u30FC\u30C9\u30C1\u30A7\u30C3\u30AF"),console.log(" - godd_review: \u30B3\u30FC\u30C9\u30EC\u30D3\u30E5\u30FC"),console.log(" - godd_setup: \u74B0\u5883\u69CB\u7BC9\u652F\u63F4"),console.log(" \u4ED6 12 \u30C4\u30FC\u30EB"),console.log(""),kT.close()}var xT,vr,St,Ig,wT,TT,bT,kT,KZ,JZ,YZ,r5,PT=_(()=>{"use strict";xT=ft(require("node:readline"),1),vr=require("node:fs"),St=require("node:path"),Ig=require("node:url"),wT=require("node:os");Sg();TT={},bT=[{id:"",name:"python",category:"language",label:"Python",description:"\u6C4E\u7528\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E"},{id:"",name:"typescript",category:"language",label:"TypeScript",description:"\u578B\u5B89\u5168\u306A JavaScript \u30B9\u30FC\u30D1\u30FC\u30BB\u30C3\u30C8"},{id:"",name:"javascript",category:"language",label:"JavaScript",description:"\u52D5\u7684\u30B9\u30AF\u30EA\u30D7\u30C8\u8A00\u8A9E (ES2024+)"},{id:"",name:"go",category:"language",label:"Go",description:"\u9759\u7684\u578B\u4ED8\u3051\u30B3\u30F3\u30D1\u30A4\u30EB\u8A00\u8A9E"},{id:"",name:"php",category:"language",label:"PHP",description:"\u6C4E\u7528\u30B9\u30AF\u30EA\u30D7\u30C8\u8A00\u8A9E"},{id:"",name:"ruby",category:"language",label:"Ruby",description:"\u52D5\u7684\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u6307\u5411\u8A00\u8A9E"},{id:"",name:"c",category:"language",label:"C",description:"\u30B7\u30B9\u30C6\u30E0\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E"},{id:"",name:"html",category:"language",label:"HTML",description:"HyperText Markup Language"},{id:"",name:"css",category:"language",label:"CSS",description:"Cascading Style Sheets"},{id:"",name:"react",category:"frontend",label:"React",description:"React UI \u30E9\u30A4\u30D6\u30E9\u30EA"},{id:"",name:"nextjs",category:"frontend",label:"Next.js",description:"React \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (SSR/SSG/ISR)"},{id:"",name:"vue",category:"frontend",label:"Vue.js",description:"\u30D7\u30ED\u30B0\u30EC\u30C3\u30B7\u30D6 JavaScript \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"angular",category:"frontend",label:"Angular",description:"TypeScript \u30D9\u30FC\u30B9 Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"svelte",category:"frontend",label:"Svelte",description:"\u30B3\u30F3\u30D1\u30A4\u30EB\u6642 UI \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"vite",category:"frontend",label:"Vite",description:"\u9AD8\u901F\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9\u30D3\u30EB\u30C9\u30C4\u30FC\u30EB"},{id:"",name:"tailwind",category:"frontend",label:"Tailwind CSS",description:"\u30E6\u30FC\u30C6\u30A3\u30EA\u30C6\u30A3\u30D5\u30A1\u30FC\u30B9\u30C8 CSS"},{id:"",name:"sass",category:"frontend",label:"Sass",description:"CSS \u30D7\u30EA\u30D7\u30ED\u30BB\u30C3\u30B5"},{id:"",name:"electron",category:"frontend",label:"Electron",description:"\u30C7\u30B9\u30AF\u30C8\u30C3\u30D7\u30A2\u30D7\u30EA\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fastapi",category:"backend",label:"FastAPI",description:"\u9AD8\u901F Python Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"django",category:"backend",label:"Django",description:"Python Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (batteries included)"},{id:"",name:"flask",category:"backend",label:"Flask",description:"Python \u30DE\u30A4\u30AF\u30ED Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"express",category:"backend",label:"Express",description:"\u6700\u5C0F\u9650\u306E Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fastify",category:"backend",label:"Fastify",description:"\u9AD8\u901F Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"nestjs",category:"backend",label:"NestJS",description:"\u30D7\u30ED\u30B0\u30EC\u30C3\u30B7\u30D6 Node.js \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"gin",category:"backend",label:"Gin",description:"Go HTTP Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"echo",category:"backend",label:"Echo",description:"\u9AD8\u6027\u80FD Go Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fiber",category:"backend",label:"Fiber",description:"Express \u98A8 Go Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"laravel",category:"backend",label:"Laravel",description:"PHP Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"symfony",category:"backend",label:"Symfony",description:"PHP \u30A8\u30F3\u30BF\u30FC\u30D7\u30E9\u30A4\u30BA\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"wordpress",category:"backend",label:"WordPress",description:"PHP CMS \u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0"},{id:"",name:"rails",category:"backend",label:"Ruby on Rails",description:"Ruby Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (MVC)"},{id:"",name:"sinatra",category:"backend",label:"Sinatra",description:"Ruby \u30DE\u30A4\u30AF\u30ED Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"koa",category:"backend",label:"Koa",description:"\u6B21\u4E16\u4EE3 Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"node",category:"runtime",label:"Node.js",description:"JavaScript \u30E9\u30F3\u30BF\u30A4\u30E0"},{id:"",name:"agent-stdio",category:"runtime",label:"Agent Stdio",description:"MCP Agent stdio \u5B9F\u884C\u30E9\u30F3\u30BF\u30A4\u30E0"},{id:"",name:"postgresql",category:"database",label:"PostgreSQL",description:"\u30AA\u30FC\u30D7\u30F3\u30BD\u30FC\u30B9 RDB"},{id:"",name:"mysql",category:"database",label:"MySQL",description:"\u30AA\u30FC\u30D7\u30F3\u30BD\u30FC\u30B9 RDB"},{id:"",name:"mongodb",category:"database",label:"MongoDB",description:"\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u6307\u5411 NoSQL DB"},{id:"",name:"redis",category:"database",label:"Redis",description:"\u30A4\u30F3\u30E1\u30E2\u30EA KVS / \u30AD\u30E3\u30C3\u30B7\u30E5"},{id:"",name:"sqlalchemy",category:"backend",label:"SQLAlchemy",description:"Python SQL \u30C4\u30FC\u30EB\u30AD\u30C3\u30C8 + ORM"},{id:"",name:"celery",category:"backend",label:"Celery",description:"\u5206\u6563\u30BF\u30B9\u30AF\u30AD\u30E5\u30FC"},{id:"",name:"docker",category:"infra",label:"Docker",description:"\u30B3\u30F3\u30C6\u30CA\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0"},{id:"",name:"terraform",category:"infra",label:"Terraform",description:"IaC \u30C4\u30FC\u30EB (HashiCorp)"},{id:"",name:"ddd-clean-architecture",category:"architecture",label:"DDD / Clean Architecture",description:"\u30C9\u30E1\u30A4\u30F3\u99C6\u52D5\u8A2D\u8A08 + Clean Architecture"}],kT=xT.createInterface({input:process.stdin,output:process.stdout});KZ={language:"\u8A00\u8A9E","frontend-ui":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 UI \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF","frontend-css":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 CSS","frontend-build":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 \u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",frontend:"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 \u305D\u306E\u4ED6","backend-api":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 API \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF","backend-orm":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 ORM / DB \u30C4\u30FC\u30EB","backend-task":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 \u30BF\u30B9\u30AF\u30AD\u30E5\u30FC",backend:"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 \u305D\u306E\u4ED6",runtime:"\u30E9\u30F3\u30BF\u30A4\u30E0",database:"\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9",infra:"\u30A4\u30F3\u30D5\u30E9",architecture:"\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3"},JZ={fastapi:["python"],django:["python"],flask:["python"],sqlalchemy:["python"],celery:["python"],express:["typescript","javascript"],fastify:["typescript","javascript"],nestjs:["typescript","javascript"],koa:["typescript","javascript"],gin:["go"],echo:["go"],fiber:["go"],laravel:["php"],symfony:["php"],wordpress:["php"],rails:["ruby"],sinatra:["ruby"],react:["typescript","javascript"],nextjs:["typescript","javascript"],vue:["typescript","javascript"],angular:["typescript","javascript"],svelte:["typescript","javascript"],vite:["typescript","javascript"],electron:["typescript","javascript"],tailwind:[],sass:[],node:["typescript","javascript"],"agent-stdio":[]},YZ={react:"frontend-ui",nextjs:"frontend-ui",vue:"frontend-ui",angular:"frontend-ui",svelte:"frontend-ui",electron:"frontend-ui",tailwind:"frontend-css",sass:"frontend-css",vite:"frontend-build",fastapi:"backend-api",django:"backend-api",flask:"backend-api",express:"backend-api",fastify:"backend-api",nestjs:"backend-api",gin:"backend-api",echo:"backend-api",fiber:"backend-api",laravel:"backend-api",symfony:"backend-api",wordpress:"backend-api",rails:"backend-api",sinatra:"backend-api",koa:"backend-api",sqlalchemy:"backend-orm",celery:"backend-task"};r5=(()=>{try{let e=(0,Ig.fileURLToPath)(TT.url);return process.argv[1]===e}catch{return!process.env.__GODD_CLI__}})();r5&&ST().catch(e=>{console.error("\u30A8\u30E9\u30FC:",e),process.exit(1)})});var zT={};Zr(zT,{runInstall:()=>a5});function n5(){if(process.platform==="win32"){let e=process.env.LOCALAPPDATA??(0,hn.join)((0,Ou.homedir)(),"AppData","Local");return(0,hn.join)(e,"GoDD")}return(0,hn.join)((0,Ou.homedir)(),".godd","bin")}function o5(){return process.platform==="win32"?"godd.exe":"godd"}function IT(e){let t=process.env.PATH??"",r=process.platform==="win32"?";":":";return t.split(r).map(o=>o.replace(/[\\/]+$/,"").toLowerCase()).includes(e.replace(/[\\/]+$/,"").toLowerCase())}function i5(e){if(IT(e)){console.log(" PATH: \u65E2\u306B\u767B\u9332\u6E08\u307F\u3067\u3059\u3002");return}try{let t=["$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')","if ($currentPath -and $currentPath.Length -gt 0) {",` $newPath = $currentPath + ';' + '${e.replace(/'/g,"''")}'`,"} else {",` $newPath = '${e.replace(/'/g,"''")}'`,"}","[Environment]::SetEnvironmentVariable('PATH', $newPath, 'User')"].join("; ");(0,CT.execSync)(`powershell -NoProfile -Command "${t}"`,{stdio:"pipe"}),console.log(" PATH: \u30E6\u30FC\u30B6\u30FC\u74B0\u5883\u5909\u6570\u306B\u8FFD\u52A0\u3057\u307E\u3057\u305F\u3002")}catch{console.error(` PATH: \u81EA\u52D5\u767B\u9332\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u4EE5\u4E0B\u3092\u624B\u52D5\u3067 PATH \u306B\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044:
266
- ${e}`)}}function s5(e){if(IT(e)){console.log(" PATH: \u65E2\u306B\u767B\u9332\u6E08\u307F\u3067\u3059\u3002");return}let t=`
280
+ `),console.log(JSON.stringify(Ie,null,2)),console.log("")}else{(0,Gt.existsSync)(T)||(0,Gt.mkdirSync)(T,{recursive:!0});let Ie={mcpServers:{}};if((0,Gt.existsSync)(F))try{Ie={...JSON.parse((0,Gt.readFileSync)(F,"utf-8"))},(typeof Ie.mcpServers!="object"||Ie.mcpServers===null)&&(Ie.mcpServers={})}catch{console.warn(`\u26A0 \u65E2\u5B58\u306E ${F} \u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u65E2\u5B58\u8A2D\u5B9A\u3092\u4FDD\u6301\u3057\u305F\u307E\u307E godd \u30A8\u30F3\u30C8\u30EA\u306E\u307F\u8FFD\u52A0\u3057\u307E\u3059\u3002`);let we=`${F}.bak`;(0,Gt.writeFileSync)(we,(0,Gt.readFileSync)(F,"utf-8"),"utf-8"),console.warn(` \u30D0\u30C3\u30AF\u30A2\u30C3\u30D7: ${we}`)}let ht={...Ie.mcpServers};ht.godd=Og((0,$t.resolve)(v)),Ie.mcpServers=ht,(0,Gt.writeFileSync)(F,JSON.stringify(Ie,null,2),"utf-8"),console.log(`\u2713 .cursor/mcp.json \u3092\u751F\u6210\u3057\u307E\u3057\u305F: ${F}`)}}console.log(`
281
+ \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557`),console.log("\u2551 \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B8C\u4E86\uFF01 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log(""),console.log("\u6B21\u306E\u30B9\u30C6\u30C3\u30D7:"),console.log(" 1. Cursor IDE \u3092\u518D\u8D77\u52D5\u3057\u3066\u304F\u3060\u3055\u3044"),console.log(" 2. \u30C1\u30E3\u30C3\u30C8\u3067 GoDD MCP \u30C4\u30FC\u30EB\u304C\u4F7F\u3048\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3059"),console.log(" - godd_dev: \u958B\u767A\u652F\u63F4"),console.log(" - godd_check: \u30B3\u30FC\u30C9\u30C1\u30A7\u30C3\u30AF"),console.log(" - godd_review: \u30B3\u30FC\u30C9\u30EC\u30D3\u30E5\u30FC"),console.log(" - godd_setup: \u74B0\u5883\u69CB\u7BC9\u652F\u63F4"),console.log(" \u4ED6 12 \u30C4\u30FC\u30EB"),console.log(""),zT.close()}var ET,Gt,$t,Ng,IT,OT,CT,zT,a5,c5,u5,h5,NT=_(()=>{"use strict";ET=st(require("node:readline"),1),Gt=require("node:fs"),$t=require("node:path"),Ng=require("node:url"),IT=require("node:os");Tg();OT={},CT=[{id:"",name:"python",category:"language",label:"Python",description:"\u6C4E\u7528\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E"},{id:"",name:"typescript",category:"language",label:"TypeScript",description:"\u578B\u5B89\u5168\u306A JavaScript \u30B9\u30FC\u30D1\u30FC\u30BB\u30C3\u30C8"},{id:"",name:"javascript",category:"language",label:"JavaScript",description:"\u52D5\u7684\u30B9\u30AF\u30EA\u30D7\u30C8\u8A00\u8A9E (ES2024+)"},{id:"",name:"go",category:"language",label:"Go",description:"\u9759\u7684\u578B\u4ED8\u3051\u30B3\u30F3\u30D1\u30A4\u30EB\u8A00\u8A9E"},{id:"",name:"php",category:"language",label:"PHP",description:"\u6C4E\u7528\u30B9\u30AF\u30EA\u30D7\u30C8\u8A00\u8A9E"},{id:"",name:"ruby",category:"language",label:"Ruby",description:"\u52D5\u7684\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u6307\u5411\u8A00\u8A9E"},{id:"",name:"c",category:"language",label:"C",description:"\u30B7\u30B9\u30C6\u30E0\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E"},{id:"",name:"html",category:"language",label:"HTML",description:"HyperText Markup Language"},{id:"",name:"css",category:"language",label:"CSS",description:"Cascading Style Sheets"},{id:"",name:"react",category:"frontend",label:"React",description:"React UI \u30E9\u30A4\u30D6\u30E9\u30EA"},{id:"",name:"nextjs",category:"frontend",label:"Next.js",description:"React \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (SSR/SSG/ISR)"},{id:"",name:"vue",category:"frontend",label:"Vue.js",description:"\u30D7\u30ED\u30B0\u30EC\u30C3\u30B7\u30D6 JavaScript \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"angular",category:"frontend",label:"Angular",description:"TypeScript \u30D9\u30FC\u30B9 Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"svelte",category:"frontend",label:"Svelte",description:"\u30B3\u30F3\u30D1\u30A4\u30EB\u6642 UI \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"vite",category:"frontend",label:"Vite",description:"\u9AD8\u901F\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9\u30D3\u30EB\u30C9\u30C4\u30FC\u30EB"},{id:"",name:"tailwind",category:"frontend",label:"Tailwind CSS",description:"\u30E6\u30FC\u30C6\u30A3\u30EA\u30C6\u30A3\u30D5\u30A1\u30FC\u30B9\u30C8 CSS"},{id:"",name:"sass",category:"frontend",label:"Sass",description:"CSS \u30D7\u30EA\u30D7\u30ED\u30BB\u30C3\u30B5"},{id:"",name:"electron",category:"frontend",label:"Electron",description:"\u30C7\u30B9\u30AF\u30C8\u30C3\u30D7\u30A2\u30D7\u30EA\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fastapi",category:"backend",label:"FastAPI",description:"\u9AD8\u901F Python Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"django",category:"backend",label:"Django",description:"Python Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (batteries included)"},{id:"",name:"flask",category:"backend",label:"Flask",description:"Python \u30DE\u30A4\u30AF\u30ED Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"express",category:"backend",label:"Express",description:"\u6700\u5C0F\u9650\u306E Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fastify",category:"backend",label:"Fastify",description:"\u9AD8\u901F Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"nestjs",category:"backend",label:"NestJS",description:"\u30D7\u30ED\u30B0\u30EC\u30C3\u30B7\u30D6 Node.js \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"gin",category:"backend",label:"Gin",description:"Go HTTP Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"echo",category:"backend",label:"Echo",description:"\u9AD8\u6027\u80FD Go Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fiber",category:"backend",label:"Fiber",description:"Express \u98A8 Go Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"laravel",category:"backend",label:"Laravel",description:"PHP Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"symfony",category:"backend",label:"Symfony",description:"PHP \u30A8\u30F3\u30BF\u30FC\u30D7\u30E9\u30A4\u30BA\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"wordpress",category:"backend",label:"WordPress",description:"PHP CMS \u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0"},{id:"",name:"rails",category:"backend",label:"Ruby on Rails",description:"Ruby Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (MVC)"},{id:"",name:"sinatra",category:"backend",label:"Sinatra",description:"Ruby \u30DE\u30A4\u30AF\u30ED Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"koa",category:"backend",label:"Koa",description:"\u6B21\u4E16\u4EE3 Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"node",category:"runtime",label:"Node.js",description:"JavaScript \u30E9\u30F3\u30BF\u30A4\u30E0"},{id:"",name:"agent-stdio",category:"runtime",label:"Agent Stdio",description:"MCP Agent stdio \u5B9F\u884C\u30E9\u30F3\u30BF\u30A4\u30E0"},{id:"",name:"postgresql",category:"database",label:"PostgreSQL",description:"\u30AA\u30FC\u30D7\u30F3\u30BD\u30FC\u30B9 RDB"},{id:"",name:"mysql",category:"database",label:"MySQL",description:"\u30AA\u30FC\u30D7\u30F3\u30BD\u30FC\u30B9 RDB"},{id:"",name:"mongodb",category:"database",label:"MongoDB",description:"\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u6307\u5411 NoSQL DB"},{id:"",name:"redis",category:"database",label:"Redis",description:"\u30A4\u30F3\u30E1\u30E2\u30EA KVS / \u30AD\u30E3\u30C3\u30B7\u30E5"},{id:"",name:"sqlalchemy",category:"backend",label:"SQLAlchemy",description:"Python SQL \u30C4\u30FC\u30EB\u30AD\u30C3\u30C8 + ORM"},{id:"",name:"celery",category:"backend",label:"Celery",description:"\u5206\u6563\u30BF\u30B9\u30AF\u30AD\u30E5\u30FC"},{id:"",name:"docker",category:"infra",label:"Docker",description:"\u30B3\u30F3\u30C6\u30CA\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0"},{id:"",name:"terraform",category:"infra",label:"Terraform",description:"IaC \u30C4\u30FC\u30EB (HashiCorp)"},{id:"",name:"ddd-clean-architecture",category:"architecture",label:"DDD / Clean Architecture",description:"\u30C9\u30E1\u30A4\u30F3\u99C6\u52D5\u8A2D\u8A08 + Clean Architecture"}],zT=ET.createInterface({input:process.stdin,output:process.stdout});a5={language:"\u8A00\u8A9E","frontend-ui":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 UI \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF","frontend-css":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 CSS","frontend-build":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 \u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",frontend:"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 \u305D\u306E\u4ED6","backend-api":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 API \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF","backend-orm":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 ORM / DB \u30C4\u30FC\u30EB","backend-task":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 \u30BF\u30B9\u30AF\u30AD\u30E5\u30FC",backend:"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 \u305D\u306E\u4ED6",runtime:"\u30E9\u30F3\u30BF\u30A4\u30E0",database:"\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9",infra:"\u30A4\u30F3\u30D5\u30E9",architecture:"\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3"},c5={fastapi:["python"],django:["python"],flask:["python"],sqlalchemy:["python"],celery:["python"],express:["typescript","javascript"],fastify:["typescript","javascript"],nestjs:["typescript","javascript"],koa:["typescript","javascript"],gin:["go"],echo:["go"],fiber:["go"],laravel:["php"],symfony:["php"],wordpress:["php"],rails:["ruby"],sinatra:["ruby"],react:["typescript","javascript"],nextjs:["typescript","javascript"],vue:["typescript","javascript"],angular:["typescript","javascript"],svelte:["typescript","javascript"],vite:["typescript","javascript"],electron:["typescript","javascript"],tailwind:[],sass:[],node:["typescript","javascript"],"agent-stdio":[]},u5={react:"frontend-ui",nextjs:"frontend-ui",vue:"frontend-ui",angular:"frontend-ui",svelte:"frontend-ui",electron:"frontend-ui",tailwind:"frontend-css",sass:"frontend-css",vite:"frontend-build",fastapi:"backend-api",django:"backend-api",flask:"backend-api",express:"backend-api",fastify:"backend-api",nestjs:"backend-api",gin:"backend-api",echo:"backend-api",fiber:"backend-api",laravel:"backend-api",symfony:"backend-api",wordpress:"backend-api",rails:"backend-api",sinatra:"backend-api",koa:"backend-api",sqlalchemy:"backend-orm",celery:"backend-task"};h5=(()=>{try{let e=(0,Ng.fileURLToPath)(OT.url);return process.argv[1]===e}catch{return!process.env.__GODD_CLI__}})();h5&&RT().catch(e=>{console.error("\u30A8\u30E9\u30FC:",e),process.exit(1)})});var LT={};Br(LT,{runInstall:()=>v5});function m5(){if(process.platform==="win32"){let e=process.env.LOCALAPPDATA??(0,_n.join)((0,ju.homedir)(),"AppData","Local");return(0,_n.join)(e,"GoDD")}return(0,_n.join)((0,ju.homedir)(),".godd","bin")}function g5(){return process.platform==="win32"?"godd.exe":"godd"}function MT(e){let t=process.env.PATH??"",r=process.platform==="win32"?";":":";return t.split(r).map(o=>o.replace(/[\\/]+$/,"").toLowerCase()).includes(e.replace(/[\\/]+$/,"").toLowerCase())}function y5(e){if(MT(e)){console.log(" PATH: \u65E2\u306B\u767B\u9332\u6E08\u307F\u3067\u3059\u3002");return}try{let t=["$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')","if ($currentPath -and $currentPath.Length -gt 0) {",` $newPath = $currentPath + ';' + '${e.replace(/'/g,"''")}'`,"} else {",` $newPath = '${e.replace(/'/g,"''")}'`,"}","[Environment]::SetEnvironmentVariable('PATH', $newPath, 'User')"].join("; ");(0,DT.execSync)(`powershell -NoProfile -Command "${t}"`,{stdio:"pipe"}),console.log(" PATH: \u30E6\u30FC\u30B6\u30FC\u74B0\u5883\u5909\u6570\u306B\u8FFD\u52A0\u3057\u307E\u3057\u305F\u3002")}catch{console.error(` PATH: \u81EA\u52D5\u767B\u9332\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u4EE5\u4E0B\u3092\u624B\u52D5\u3067 PATH \u306B\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044:
282
+ ${e}`)}}function _5(e){if(MT(e)){console.log(" PATH: \u65E2\u306B\u767B\u9332\u6E08\u307F\u3067\u3059\u3002");return}let t=`
267
283
  # GoDD CLI
268
284
  export PATH="${e}:$PATH"
269
- `,r=(0,Ou.homedir)(),n=[],o=(0,hn.join)(r,".zshrc"),i=(0,hn.join)(r,".bashrc"),s=(0,hn.join)(r,".bash_profile");if((0,nr.existsSync)(o)&&n.push(o),(0,nr.existsSync)(i)?n.push(i):(0,nr.existsSync)(s)&&n.push(s),n.length===0){let a=process.platform==="darwin"?o:i;n.push(a)}for(let a of n){try{if((0,Nu.readFileSync)(a,"utf-8").includes(e)){console.log(` PATH: ${a} \u306B\u65E2\u306B\u767B\u9332\u6E08\u307F\u3067\u3059\u3002`);continue}}catch{}(0,Nu.appendFileSync)(a,t,"utf-8"),console.log(` PATH: ${a} \u306B\u8FFD\u52A0\u3057\u307E\u3057\u305F\u3002`)}}async function a5(){console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 GoDD CLI \u2014 \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log("");let e=n5(),t=o5(),r=(0,hn.join)(e,t),n=process.execPath;console.log(`\u30BD\u30FC\u30B9: ${n}`),console.log(`\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5148: ${r}`),console.log(""),(0,nr.existsSync)(e)||((0,nr.mkdirSync)(e,{recursive:!0}),console.log(`\u2713 \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3057\u307E\u3057\u305F: ${e}`));let o=n.replace(/\\/g,"/").toLowerCase(),i=r.replace(/\\/g,"/").toLowerCase();if(o===i?console.log("\u2713 \u65E2\u306B\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5148\u304B\u3089\u5B9F\u884C\u3055\u308C\u3066\u3044\u307E\u3059\uFF08\u30B3\u30D4\u30FC\u3092\u30B9\u30AD\u30C3\u30D7\uFF09\u3002"):((0,nr.copyFileSync)(n,r),console.log("\u2713 \u30D0\u30A4\u30CA\u30EA\u3092\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F\u3002"),process.platform!=="win32"&&(0,nr.chmodSync)(r,493)),console.log(""),process.platform==="win32"?i5(e):s5(e),console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5B8C\u4E86\uFF01 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log(""),console.log("\u6B21\u306E\u30B9\u30C6\u30C3\u30D7:"),console.log(" 1. \u30BF\u30FC\u30DF\u30CA\u30EB\u3092\u518D\u8D77\u52D5\u3057\u3066\u304F\u3060\u3055\u3044\uFF08PATH \u3092\u53CD\u6620\u3059\u308B\u305F\u3081\uFF09"),console.log(" 2. \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067 godd init \u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044"),console.log(""),console.log("\u4F7F\u3044\u65B9:"),console.log(" godd init \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7"),console.log(" godd server MCP \u30B5\u30FC\u30D0\u30FC\u8D77\u52D5\uFF08Cursor \u304C\u81EA\u52D5\u5B9F\u884C\uFF09"),console.log(" godd version \u30D0\u30FC\u30B8\u30E7\u30F3\u8868\u793A"),console.log(" godd help \u30D8\u30EB\u30D7\u8868\u793A"),console.log(""),process.platform==="win32"&&!process.env.TERM&&!process.env.CI){let s=ET.createInterface({input:process.stdin,output:process.stdout});await new Promise(a=>{s.question("Enter \u30AD\u30FC\u3092\u62BC\u3057\u3066\u9589\u3058\u307E\u3059...",()=>{s.close(),a()})})}}var nr,hn,Ou,CT,Nu,ET,RT=_(()=>{"use strict";nr=require("node:fs"),hn=require("node:path"),Ou=require("node:os"),CT=require("node:child_process"),Nu=require("node:fs"),ET=ft(require("node:readline"),1)});var DT={};Zr(DT,{PROVIDER_LABELS:()=>zg,runNotesInfra:()=>S5});function c5(){return AT.createInterface({input:process.stdin,output:process.stdout})}function re(e,t){return new Promise(r=>{e.question(t,n=>r(n.trim()))})}function u5(){try{return(0,J.dirname)((0,OT.fileURLToPath)($5.url))}catch{return(0,J.dirname)(process.execPath)}}function l5(e){let t=u5(),r=(0,J.resolve)(t,".."),n=(0,J.join)(r,"templates","terraform",e),o=(0,J.join)(r,"templates","github-actions",e);return(0,oe.existsSync)(n)&&(0,oe.existsSync)(o)?{terraformDir:n,ghaDir:o}:null}function p5(e){let t=(0,J.join)(e,Rg);if(!(0,oe.existsSync)(t))return null;try{return JSON.parse((0,oe.readFileSync)(t,"utf-8"))}catch{return null}}function d5(e){let t=(0,J.join)(e.outputDir,Rg),r={...e};(0,oe.writeFileSync)(t,JSON.stringify(r,null,2)+`
270
- `,"utf-8")}async function f5(e,t){console.log(`
271
- --- \u30AF\u30E9\u30A6\u30C9\u30D7\u30ED\u30D0\u30A4\u30C0\u9078\u629E ---`);let r=Object.entries(zg);for(let s=0;s<r.length;s++){let[a,c]=r[s],u=a===(t??"aws");console.log(` ${s+1}. ${c}${u?" [\u30C7\u30D5\u30A9\u30EB\u30C8]":""}`)}let n=r.findIndex(([s])=>s===(t??"aws"))+1,o=await re(e,`
272
- \u9078\u629E [${n}]: `)||String(n),i=parseInt(o,10)-1;return(i<0||i>=r.length)&&(console.error("\u30A8\u30E9\u30FC: \u7121\u52B9\u306A\u9078\u629E\u3067\u3059\u3002"),process.exit(1)),r[i][0]}async function h5(e,t){console.log(`
285
+ `,r=(0,ju.homedir)(),n=[],o=(0,_n.join)(r,".zshrc"),i=(0,_n.join)(r,".bashrc"),s=(0,_n.join)(r,".bash_profile");if((0,sr.existsSync)(o)&&n.push(o),(0,sr.existsSync)(i)?n.push(i):(0,sr.existsSync)(s)&&n.push(s),n.length===0){let a=process.platform==="darwin"?o:i;n.push(a)}for(let a of n){try{if((0,Mu.readFileSync)(a,"utf-8").includes(e)){console.log(` PATH: ${a} \u306B\u65E2\u306B\u767B\u9332\u6E08\u307F\u3067\u3059\u3002`);continue}}catch{}(0,Mu.appendFileSync)(a,t,"utf-8"),console.log(` PATH: ${a} \u306B\u8FFD\u52A0\u3057\u307E\u3057\u305F\u3002`)}}async function v5(){console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 GoDD CLI \u2014 \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log("");let e=m5(),t=g5(),r=(0,_n.join)(e,t),n=process.execPath;console.log(`\u30BD\u30FC\u30B9: ${n}`),console.log(`\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5148: ${r}`),console.log(""),(0,sr.existsSync)(e)||((0,sr.mkdirSync)(e,{recursive:!0}),console.log(`\u2713 \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3057\u307E\u3057\u305F: ${e}`));let o=n.replace(/\\/g,"/").toLowerCase(),i=r.replace(/\\/g,"/").toLowerCase();if(o===i?console.log("\u2713 \u65E2\u306B\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5148\u304B\u3089\u5B9F\u884C\u3055\u308C\u3066\u3044\u307E\u3059\uFF08\u30B3\u30D4\u30FC\u3092\u30B9\u30AD\u30C3\u30D7\uFF09\u3002"):((0,sr.copyFileSync)(n,r),console.log("\u2713 \u30D0\u30A4\u30CA\u30EA\u3092\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F\u3002"),process.platform!=="win32"&&(0,sr.chmodSync)(r,493)),console.log(""),process.platform==="win32"?y5(e):_5(e),console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5B8C\u4E86\uFF01 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log(""),console.log("\u6B21\u306E\u30B9\u30C6\u30C3\u30D7:"),console.log(" 1. \u30BF\u30FC\u30DF\u30CA\u30EB\u3092\u518D\u8D77\u52D5\u3057\u3066\u304F\u3060\u3055\u3044\uFF08PATH \u3092\u53CD\u6620\u3059\u308B\u305F\u3081\uFF09"),console.log(" 2. \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067 godd init \u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044"),console.log(""),console.log("\u4F7F\u3044\u65B9:"),console.log(" godd init \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7"),console.log(" godd server MCP \u30B5\u30FC\u30D0\u30FC\u8D77\u52D5\uFF08Cursor \u304C\u81EA\u52D5\u5B9F\u884C\uFF09"),console.log(" godd version \u30D0\u30FC\u30B8\u30E7\u30F3\u8868\u793A"),console.log(" godd help \u30D8\u30EB\u30D7\u8868\u793A"),console.log(""),process.platform==="win32"&&!process.env.TERM&&!process.env.CI){let s=jT.createInterface({input:process.stdin,output:process.stdout});await new Promise(a=>{s.question("Enter \u30AD\u30FC\u3092\u62BC\u3057\u3066\u9589\u3058\u307E\u3059...",()=>{s.close(),a()})})}}var sr,_n,ju,DT,Mu,jT,ZT=_(()=>{"use strict";sr=require("node:fs"),_n=require("node:path"),ju=require("node:os"),DT=require("node:child_process"),Mu=require("node:fs"),jT=st(require("node:readline"),1)});var BT={};Br(BT,{PROVIDER_LABELS:()=>Dg,runNotesInfra:()=>D5});function b5(){return qT.createInterface({input:process.stdin,output:process.stdout})}function re(e,t){return new Promise(r=>{e.question(t,n=>r(n.trim()))})}function x5(){try{return(0,J.dirname)((0,FT.fileURLToPath)(j5.url))}catch{return(0,J.dirname)(process.execPath)}}function w5(e){let t=x5(),r=(0,J.resolve)(t,".."),n=(0,J.join)(r,"templates","terraform",e),o=(0,J.join)(r,"templates","github-actions",e);return(0,oe.existsSync)(n)&&(0,oe.existsSync)(o)?{terraformDir:n,ghaDir:o}:null}function k5(e){let t=(0,J.join)(e,jg);if(!(0,oe.existsSync)(t))return null;try{return JSON.parse((0,oe.readFileSync)(t,"utf-8"))}catch{return null}}function S5(e){let t=(0,J.join)(e.outputDir,jg),r={...e};(0,oe.writeFileSync)(t,JSON.stringify(r,null,2)+`
286
+ `,"utf-8")}async function $5(e,t){console.log(`
287
+ --- \u30AF\u30E9\u30A6\u30C9\u30D7\u30ED\u30D0\u30A4\u30C0\u9078\u629E ---`);let r=Object.entries(Dg);for(let s=0;s<r.length;s++){let[a,c]=r[s],u=a===(t??"aws");console.log(` ${s+1}. ${c}${u?" [\u30C7\u30D5\u30A9\u30EB\u30C8]":""}`)}let n=r.findIndex(([s])=>s===(t??"aws"))+1,o=await re(e,`
288
+ \u9078\u629E [${n}]: `)||String(n),i=parseInt(o,10)-1;return(i<0||i>=r.length)&&(console.error("\u30A8\u30E9\u30FC: \u7121\u52B9\u306A\u9078\u629E\u3067\u3059\u3002"),process.exit(1)),r[i][0]}async function T5(e,t){console.log(`
273
289
  --- AWS \u30A2\u30AB\u30A6\u30F3\u30C8\u8A2D\u5B9A ---`);let r=await re(e,`AWS \u30A2\u30AB\u30A6\u30F3\u30C8 ID${t.accountId?` [${t.accountId}]`:""}: `)||t.accountId||"";(!r||!/^\d{12}$/.test(r))&&(console.error("\u30A8\u30E9\u30FC: 12\u6841\u306E AWS \u30A2\u30AB\u30A6\u30F3\u30C8 ID \u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let n=await re(e,`AWS \u30EA\u30FC\u30B8\u30E7\u30F3 [${t.region??"ap-northeast-1"}]: `)||t.region||"ap-northeast-1",o=await re(e,`\u74B0\u5883\u540D (dev/staging/prod) [${t.env??"dev"}]: `)||t.env||"dev";console.log(`
274
290
  --- GitHub \u30EA\u30DD\u30B8\u30C8\u30EA ---`);let i=await re(e,`GitHub Owner${t.githubOwner?` [${t.githubOwner}]`:""}: `)||t.githubOwner||"",s=await re(e,`GitHub Repo${t.githubRepo?` [${t.githubRepo}]`:""}: `)||t.githubRepo||"";(!i||!s)&&(console.error("\u30A8\u30E9\u30FC: GitHub Owner \u3068 Repo \u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1)),console.log(`
275
291
  --- \u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u8A2D\u5B9A ---`);let a=await re(e,`VPC CIDR [${t.vpcCidr??"10.2.0.0/16"}]: `)||t.vpcCidr||"10.2.0.0/16";console.log(`
276
292
  --- \u30EA\u30BD\u30FC\u30B9\u30B5\u30A4\u30BA ---`);let c=await re(e,`RDS \u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u30AF\u30E9\u30B9 [${t.rdsInstanceClass??"db.t4g.micro"}]: `)||t.rdsInstanceClass||"db.t4g.micro",u=await re(e,`ECS CPU (vCPU \u5358\u4F4D) [${t.ecsCpu??256}]: `)||String(t.ecsCpu??256),p=await re(e,`ECS \u30E1\u30E2\u30EA (MB) [${t.ecsMemory??512}]: `)||String(t.ecsMemory??512);console.log(`
277
- --- \u51FA\u529B\u5148 ---`);let l=await re(e,`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [${t.outputDir??"."}]: `)||t.outputDir||".";return{provider:"aws",accountId:r,region:n,env:o,githubOwner:i,githubRepo:s,vpcCidr:a,rdsInstanceClass:c,ecsCpu:parseInt(u,10),ecsMemory:parseInt(p,10),outputDir:(0,J.resolve)(l)}}async function m5(e,t){console.log(`
293
+ --- \u51FA\u529B\u5148 ---`);let l=await re(e,`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [${t.outputDir??"."}]: `)||t.outputDir||".",d=parseInt(u,10),f=parseInt(p,10);return{provider:"aws",accountId:r,region:n,env:o,githubOwner:i,githubRepo:s,vpcCidr:a,rdsInstanceClass:c,ecsCpu:Number.isFinite(d)?d:256,ecsMemory:Number.isFinite(f)?f:512,outputDir:(0,J.resolve)(l)}}async function P5(e,t){console.log(`
278
294
  --- GCP \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u8A2D\u5B9A ---`);let r=await re(e,`GCP \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8 ID${t.projectId?` [${t.projectId}]`:""}: `)||t.projectId||"";r||(console.error("\u30A8\u30E9\u30FC: GCP \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8 ID \u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1));let n=await re(e,`GCP \u30EA\u30FC\u30B8\u30E7\u30F3 [${t.region??"asia-northeast1"}]: `)||t.region||"asia-northeast1",o=await re(e,`\u74B0\u5883\u540D (dev/staging/prod) [${t.env??"dev"}]: `)||t.env||"dev";console.log(`
279
295
  --- GitHub \u30EA\u30DD\u30B8\u30C8\u30EA ---`);let i=await re(e,`GitHub Owner${t.githubOwner?` [${t.githubOwner}]`:""}: `)||t.githubOwner||"",s=await re(e,`GitHub Repo${t.githubRepo?` [${t.githubRepo}]`:""}: `)||t.githubRepo||"";(!i||!s)&&(console.error("\u30A8\u30E9\u30FC: GitHub Owner \u3068 Repo \u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1)),console.log(`
280
296
  --- \u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u8A2D\u5B9A ---`);let a=await re(e,`VPC CIDR [${t.vpcCidr??"10.0.0.0/16"}]: `)||t.vpcCidr||"10.0.0.0/16";console.log(`
281
297
  --- \u30EA\u30BD\u30FC\u30B9\u30B5\u30A4\u30BA ---`);let c=await re(e,`Cloud SQL \u30C6\u30A3\u30A2 [${t.dbTier??"db-f1-micro"}]: `)||t.dbTier||"db-f1-micro",u=await re(e,`Cloud Run CPU [${t.cpuLimit??"1"}]: `)||t.cpuLimit||"1",p=await re(e,`Cloud Run \u30E1\u30E2\u30EA [${t.memoryLimit??"512Mi"}]: `)||t.memoryLimit||"512Mi";console.log(`
282
- --- \u51FA\u529B\u5148 ---`);let l=await re(e,`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [${t.outputDir??"."}]: `)||t.outputDir||".";return{provider:"gcp",projectId:r,region:n,env:o,githubOwner:i,githubRepo:s,vpcCidr:a,dbTier:c,cpuLimit:u,memoryLimit:p,outputDir:(0,J.resolve)(l)}}async function g5(e,t){console.log(`
298
+ --- \u51FA\u529B\u5148 ---`);let l=await re(e,`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [${t.outputDir??"."}]: `)||t.outputDir||".";return{provider:"gcp",projectId:r,region:n,env:o,githubOwner:i,githubRepo:s,vpcCidr:a,dbTier:c,cpuLimit:u,memoryLimit:p,outputDir:(0,J.resolve)(l)}}async function C5(e,t){console.log(`
283
299
  --- Azure \u30B5\u30D6\u30B9\u30AF\u30EA\u30D7\u30B7\u30E7\u30F3\u8A2D\u5B9A ---`);let r=await re(e,`Azure Subscription ID${t.subscriptionId?` [${t.subscriptionId}]`:""}: `)||t.subscriptionId||"";r||(console.error("\u30A8\u30E9\u30FC: Azure Subscription ID \u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1));let n=await re(e,`Azure \u30EA\u30FC\u30B8\u30E7\u30F3 [${t.region??"japaneast"}]: `)||t.region||"japaneast",o=await re(e,`\u74B0\u5883\u540D (dev/staging/prod) [${t.env??"dev"}]: `)||t.env||"dev";console.log(`
284
300
  --- GitHub \u30EA\u30DD\u30B8\u30C8\u30EA ---`);let i=await re(e,`GitHub Owner${t.githubOwner?` [${t.githubOwner}]`:""}: `)||t.githubOwner||"",s=await re(e,`GitHub Repo${t.githubRepo?` [${t.githubRepo}]`:""}: `)||t.githubRepo||"";(!i||!s)&&(console.error("\u30A8\u30E9\u30FC: GitHub Owner \u3068 Repo \u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1)),console.log(`
285
301
  --- \u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u8A2D\u5B9A ---`);let a=await re(e,`VNet CIDR [${t.vpcCidr??"10.0.0.0/16"}]: `)||t.vpcCidr||"10.0.0.0/16";console.log(`
286
302
  --- \u30EA\u30BD\u30FC\u30B9\u30B5\u30A4\u30BA ---`);let c=await re(e,`PostgreSQL SKU [${t.dbSku??"B_Standard_B1ms"}]: `)||t.dbSku||"B_Standard_B1ms",u=await re(e,`Container App CPU [${t.cpuLimit??.25}]: `)||String(t.cpuLimit??.25),p=await re(e,`Container App \u30E1\u30E2\u30EA [${t.memoryLimit??"0.5Gi"}]: `)||t.memoryLimit||"0.5Gi";console.log(`
287
- --- \u51FA\u529B\u5148 ---`);let l=await re(e,`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [${t.outputDir??"."}]: `)||t.outputDir||".";return{provider:"azure",subscriptionId:r,region:n,env:o,githubOwner:i,githubRepo:s,vpcCidr:a,dbSku:c,cpuLimit:parseFloat(u),memoryLimit:p,outputDir:(0,J.resolve)(l)}}async function y5(e,t){console.log(`
303
+ --- \u51FA\u529B\u5148 ---`);let l=await re(e,`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [${t.outputDir??"."}]: `)||t.outputDir||".",d=parseFloat(u);return{provider:"azure",subscriptionId:r,region:n,env:o,githubOwner:i,githubRepo:s,vpcCidr:a,dbSku:c,cpuLimit:Number.isFinite(d)?d:.25,memoryLimit:p,outputDir:(0,J.resolve)(l)}}async function E5(e,t){console.log(`
288
304
  --- Vercel + Railway \u8A2D\u5B9A ---`);let r=await re(e,`\u74B0\u5883\u540D (dev/staging/prod) [${t.env??"dev"}]: `)||t.env||"dev";console.log(`
289
305
  --- GitHub \u30EA\u30DD\u30B8\u30C8\u30EA ---`);let n=await re(e,`GitHub Owner${t.githubOwner?` [${t.githubOwner}]`:""}: `)||t.githubOwner||"",o=await re(e,`GitHub Repo${t.githubRepo?` [${t.githubRepo}]`:""}: `)||t.githubRepo||"";(!n||!o)&&(console.error("\u30A8\u30E9\u30FC: GitHub Owner \u3068 Repo \u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1)),console.log(`
290
306
  --- Railway \u8A2D\u5B9A ---`);let i=await re(e,`Railway API URL${t.railwayApiUrl?` [${t.railwayApiUrl}]`:""}: `)||t.railwayApiUrl||"";i||console.log(" \u203B Railway \u30C7\u30D7\u30ED\u30A4\u5F8C\u306B URL \u304C\u767A\u884C\u3055\u308C\u307E\u3059\u3002\u5F8C\u304B\u3089 .godd-notes-infra.json \u3067\u8A2D\u5B9A\u53EF\u80FD\u3067\u3059\u3002"),console.log(`
291
- --- \u51FA\u529B\u5148 ---`);let s=await re(e,`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [${t.outputDir??"."}]: `)||t.outputDir||".";return{provider:"vercel-railway",env:r,githubOwner:n,githubRepo:o,railwayApiUrl:i||"https://your-api.up.railway.app",outputDir:(0,J.resolve)(s)}}async function _5(e){console.log(`
307
+ --- \u51FA\u529B\u5148 ---`);let s=await re(e,`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [${t.outputDir??"."}]: `)||t.outputDir||".";return{provider:"vercel-railway",env:r,githubOwner:n,githubRepo:o,railwayApiUrl:i||"https://your-api.up.railway.app",outputDir:(0,J.resolve)(s)}}async function I5(e){console.log(`
292
308
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
293
309
  \u2551 ripla Notes \u30A4\u30F3\u30D5\u30E9\u69CB\u7BC9\u30A6\u30A3\u30B6\u30FC\u30C9 \u2551
294
310
  \u2551 Terraform + GitHub Actions \u81EA\u52D5\u751F\u6210 \u2551
@@ -296,17 +312,17 @@ export PATH="${e}:$PATH"
296
312
  \u2551 \u5BFE\u5FDC\u30D7\u30ED\u30D0\u30A4\u30C0: \u2551
297
313
  \u2551 AWS / GCP / Azure / Vercel\xD7Railway \u2551
298
314
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
299
- `);let t=p5(process.cwd());switch(await f5(e,t?.provider)){case"aws":return h5(e,t??{});case"gcp":return m5(e,t??{});case"azure":return g5(e,t??{});case"vercel-railway":return y5(e,t??{})}}function Lr(e,t){let r;try{r=(0,oe.readFileSync)(e,"utf-8")}catch(n){throw new Error(`\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30D5\u30A1\u30A4\u30EB\u304C\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093: ${e} \u2014 ${Ke(n)}`,{cause:n})}try{return NT.default.compile(r,{noEscape:!0})(t)}catch(n){throw new Error(`\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u30B3\u30F3\u30D1\u30A4\u30EB/\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${e} \u2014 ${Ke(n)}`,{cause:n})}}function v5(e){switch(console.log(`
300
- --- \u8A2D\u5B9A\u306E\u78BA\u8A8D ---`),console.log(` \u30D7\u30ED\u30D0\u30A4\u30C0: ${zg[e.provider]}`),console.log(` \u74B0\u5883: ${e.env}`),console.log(` GitHub: ${e.githubOwner}/${e.githubRepo}`),e.provider){case"aws":console.log(` AWS \u30A2\u30AB\u30A6\u30F3\u30C8: ${e.accountId}`),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${e.region}`),console.log(` VPC CIDR: ${e.vpcCidr}`),console.log(` RDS: ${e.rdsInstanceClass}`),console.log(` ECS: ${e.ecsCpu} CPU / ${e.ecsMemory} MB`);break;case"gcp":console.log(` \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8: ${e.projectId}`),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${e.region}`),console.log(` Cloud SQL: ${e.dbTier}`),console.log(` Cloud Run: ${e.cpuLimit} CPU / ${e.memoryLimit}`);break;case"azure":console.log(` Subscription: ${e.subscriptionId}`),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${e.region}`),console.log(` PostgreSQL: ${e.dbSku}`),console.log(` Container App: ${e.cpuLimit} CPU / ${e.memoryLimit}`);break;case"vercel-railway":console.log(` Railway API: ${e.railwayApiUrl}`);break}console.log(` \u51FA\u529B\u5148: ${e.outputDir}`)}function b5(e){let t=l5(e.provider);t||(console.error(`\u30A8\u30E9\u30FC: ${e.provider} \u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002`),process.exit(1));let{terraformDir:r,ghaDir:n}=t,o=e;e.provider==="aws"?x5(r,n,e,o):w5(r,n,e,o),d5(e),console.log(`
301
- \u2713 \u8A2D\u5B9A\u3092 ${(0,J.join)(e.outputDir,Rg)} \u306B\u4FDD\u5B58\u3057\u307E\u3057\u305F`)}function x5(e,t,r,n){let o=(0,J.join)(r.outputDir,"terraform","godd-notes",r.env),i=(0,J.join)(r.outputDir,"terraform","godd-notes",`${r.env}-iam`),s=(0,J.join)(r.outputDir,".github","workflows");(0,oe.mkdirSync)(o,{recursive:!0}),(0,oe.mkdirSync)(i,{recursive:!0}),(0,oe.mkdirSync)(s,{recursive:!0});let a=(0,oe.readdirSync)(e).filter(k=>k.endsWith(".tf.hbs")),c=["iam.tf.hbs"],u=a.filter(k=>!c.includes(k)),p=(0,J.resolve)(e,"..","..","scripts","aws"),l=(0,J.join)(p,"terraform-backend-setup.sh.hbs"),d=(0,oe.existsSync)(l),f=d?4:3,h=[];console.log(`
302
- [1/${f}] Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${o}`);for(let k of u){let C=k.replace(".hbs",""),T=Lr((0,J.join)(e,k),n);(0,oe.writeFileSync)((0,J.join)(o,C),T,"utf-8"),console.log(` \u2713 ${C}`)}console.log(`
303
- [2/${f}] IAM Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${i}`);for(let k of c){let C=k.replace(".hbs",""),T=Lr((0,J.join)(e,k),n);(0,oe.writeFileSync)((0,J.join)(i,C),T,"utf-8"),console.log(` \u2713 ${C}`)}let m=(0,J.join)(e,"local.tf.hbs");if((0,oe.existsSync)(m)){let k=Lr(m,n);(0,oe.writeFileSync)((0,J.join)(i,"local.tf"),k,"utf-8"),console.log(" \u2713 local.tf")}else console.warn(` \u26A0 local.tf.hbs \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${m}`),h.push("local.tf.hbs");let y=(0,J.join)(e,"provider.tf.hbs");if((0,oe.existsSync)(y)){let k=Lr(y,n);(0,oe.writeFileSync)((0,J.join)(i,"provider.tf"),k,"utf-8"),console.log(" \u2713 provider.tf")}else console.warn(` \u26A0 provider.tf.hbs \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${y}`),h.push("provider.tf.hbs");let b=(0,J.join)(e,"backend.tf.hbs");if((0,oe.existsSync)(b)){let k=Lr(b,{...n,env:`${r.env}-iam`});(0,oe.writeFileSync)((0,J.join)(i,"backend.tf"),k,"utf-8"),console.log(" \u2713 backend.tf")}else console.warn(` \u26A0 backend.tf.hbs \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${b}`),h.push("backend.tf.hbs");console.log(`
304
- [3/${f}] GitHub Actions \u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u751F\u6210: ${s}`);let v=(0,oe.readdirSync)(t).filter(k=>k.endsWith(".yml.hbs"));for(let k of v){let C=k.replace(".hbs",""),T=Lr((0,J.join)(t,k),n);(0,oe.writeFileSync)((0,J.join)(s,C),T,"utf-8"),console.log(` \u2713 ${C}`)}if(d){let k=(0,J.join)(r.outputDir,"scripts");(0,oe.mkdirSync)(k,{recursive:!0}),console.log(`
305
- [4/${f}] \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u751F\u6210: ${k}`);let C=Lr(l,n),T=(0,J.join)(k,"terraform-backend-setup.sh");(0,oe.writeFileSync)(T,C,"utf-8");try{(0,oe.chmodSync)(T,493)}catch{}console.log(" \u2713 terraform-backend-setup.sh")}else console.warn(`
315
+ `);let t=k5(process.cwd());switch(await $5(e,t?.provider)){case"aws":return T5(e,t??{});case"gcp":return P5(e,t??{});case"azure":return C5(e,t??{});case"vercel-railway":return E5(e,t??{})}}function Fr(e,t){let r;try{r=(0,oe.readFileSync)(e,"utf-8")}catch(n){throw new Error(`\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30D5\u30A1\u30A4\u30EB\u304C\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093: ${e} \u2014 ${Ne(n)}`,{cause:n})}try{return UT.default.compile(r,{noEscape:!0})(t)}catch(n){throw new Error(`\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u30B3\u30F3\u30D1\u30A4\u30EB/\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${e} \u2014 ${Ne(n)}`,{cause:n})}}function z5(e){switch(console.log(`
316
+ --- \u8A2D\u5B9A\u306E\u78BA\u8A8D ---`),console.log(` \u30D7\u30ED\u30D0\u30A4\u30C0: ${Dg[e.provider]}`),console.log(` \u74B0\u5883: ${e.env}`),console.log(` GitHub: ${e.githubOwner}/${e.githubRepo}`),e.provider){case"aws":console.log(` AWS \u30A2\u30AB\u30A6\u30F3\u30C8: ${e.accountId}`),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${e.region}`),console.log(` VPC CIDR: ${e.vpcCidr}`),console.log(` RDS: ${e.rdsInstanceClass}`),console.log(` ECS: ${e.ecsCpu} CPU / ${e.ecsMemory} MB`);break;case"gcp":console.log(` \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8: ${e.projectId}`),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${e.region}`),console.log(` Cloud SQL: ${e.dbTier}`),console.log(` Cloud Run: ${e.cpuLimit} CPU / ${e.memoryLimit}`);break;case"azure":console.log(` Subscription: ${e.subscriptionId}`),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${e.region}`),console.log(` PostgreSQL: ${e.dbSku}`),console.log(` Container App: ${e.cpuLimit} CPU / ${e.memoryLimit}`);break;case"vercel-railway":console.log(` Railway API: ${e.railwayApiUrl}`);break}console.log(` \u51FA\u529B\u5148: ${e.outputDir}`)}function R5(e){let t=w5(e.provider);t||(console.error(`\u30A8\u30E9\u30FC: ${e.provider} \u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002`),process.exit(1));let{terraformDir:r,ghaDir:n}=t,o=e;e.provider==="aws"?A5(r,n,e,o):O5(r,n,e,o),S5(e),console.log(`
317
+ \u2713 \u8A2D\u5B9A\u3092 ${(0,J.join)(e.outputDir,jg)} \u306B\u4FDD\u5B58\u3057\u307E\u3057\u305F`)}function A5(e,t,r,n){let o=(0,J.join)(r.outputDir,"terraform","godd-notes",r.env),i=(0,J.join)(r.outputDir,"terraform","godd-notes",`${r.env}-iam`),s=(0,J.join)(r.outputDir,".github","workflows");(0,oe.mkdirSync)(o,{recursive:!0}),(0,oe.mkdirSync)(i,{recursive:!0}),(0,oe.mkdirSync)(s,{recursive:!0});let a=(0,oe.readdirSync)(e).filter(k=>k.endsWith(".tf.hbs")),c=["iam.tf.hbs"],u=a.filter(k=>!c.includes(k)),p=(0,J.resolve)(e,"..","..","scripts","aws"),l=(0,J.join)(p,"terraform-backend-setup.sh.hbs"),d=(0,oe.existsSync)(l),f=d?4:3,h=[];console.log(`
318
+ [1/${f}] Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${o}`);for(let k of u){let C=k.replace(".hbs",""),T=Fr((0,J.join)(e,k),n);(0,oe.writeFileSync)((0,J.join)(o,C),T,"utf-8"),console.log(` \u2713 ${C}`)}console.log(`
319
+ [2/${f}] IAM Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${i}`);for(let k of c){let C=k.replace(".hbs",""),T=Fr((0,J.join)(e,k),n);(0,oe.writeFileSync)((0,J.join)(i,C),T,"utf-8"),console.log(` \u2713 ${C}`)}let g=(0,J.join)(e,"local.tf.hbs");if((0,oe.existsSync)(g)){let k=Fr(g,n);(0,oe.writeFileSync)((0,J.join)(i,"local.tf"),k,"utf-8"),console.log(" \u2713 local.tf")}else console.warn(` \u26A0 local.tf.hbs \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${g}`),h.push("local.tf.hbs");let y=(0,J.join)(e,"provider.tf.hbs");if((0,oe.existsSync)(y)){let k=Fr(y,n);(0,oe.writeFileSync)((0,J.join)(i,"provider.tf"),k,"utf-8"),console.log(" \u2713 provider.tf")}else console.warn(` \u26A0 provider.tf.hbs \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${y}`),h.push("provider.tf.hbs");let b=(0,J.join)(e,"backend.tf.hbs");if((0,oe.existsSync)(b)){let k=Fr(b,{...n,env:`${r.env}-iam`});(0,oe.writeFileSync)((0,J.join)(i,"backend.tf"),k,"utf-8"),console.log(" \u2713 backend.tf")}else console.warn(` \u26A0 backend.tf.hbs \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${b}`),h.push("backend.tf.hbs");console.log(`
320
+ [3/${f}] GitHub Actions \u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u751F\u6210: ${s}`);let v=(0,oe.readdirSync)(t).filter(k=>k.endsWith(".yml.hbs"));for(let k of v){let C=k.replace(".hbs",""),T=Fr((0,J.join)(t,k),n);(0,oe.writeFileSync)((0,J.join)(s,C),T,"utf-8"),console.log(` \u2713 ${C}`)}if(d){let k=(0,J.join)(r.outputDir,"scripts");(0,oe.mkdirSync)(k,{recursive:!0}),console.log(`
321
+ [4/${f}] \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u751F\u6210: ${k}`);let C=Fr(l,n),T=(0,J.join)(k,"terraform-backend-setup.sh");(0,oe.writeFileSync)(T,C,"utf-8");try{(0,oe.chmodSync)(T,493)}catch{}console.log(" \u2713 terraform-backend-setup.sh")}else console.warn(`
306
322
  \u26A0 \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u30B9\u30AF\u30EA\u30D7\u30C8\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: `+l),h.push("terraform-backend-setup.sh.hbs");if(h.length>0){console.warn(`
307
- \u26A0 \u30B9\u30AD\u30C3\u30D7\u3055\u308C\u305F\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8 (${h.length} \u4EF6):`);for(let k of h)console.warn(` - ${k}`)}}function w5(e,t,r,n){let o=(0,J.join)(r.outputDir,"terraform","godd-notes",r.env),i=(0,J.join)(r.outputDir,".github","workflows");(0,oe.mkdirSync)(o,{recursive:!0}),(0,oe.mkdirSync)(i,{recursive:!0});let s=(0,oe.readdirSync)(e).filter(c=>c.endsWith(".tf.hbs"));console.log(`
308
- [1/2] Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${o}`);for(let c of s){let u=c.replace(".hbs",""),p=Lr((0,J.join)(e,c),n);(0,oe.writeFileSync)((0,J.join)(o,u),p,"utf-8"),console.log(` \u2713 ${u}`)}console.log(`
309
- [2/2] GitHub Actions \u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u751F\u6210: ${i}`);let a=(0,oe.readdirSync)(t).filter(c=>c.endsWith(".yml.hbs"));for(let c of a){let u=c.replace(".hbs",""),p=Lr((0,J.join)(t,c),n);(0,oe.writeFileSync)((0,J.join)(i,u),p,"utf-8"),console.log(` \u2713 ${u}`)}}function k5(e){switch(e.provider){case"aws":console.log(`
323
+ \u26A0 \u30B9\u30AD\u30C3\u30D7\u3055\u308C\u305F\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8 (${h.length} \u4EF6):`);for(let k of h)console.warn(` - ${k}`)}}function O5(e,t,r,n){let o=(0,J.join)(r.outputDir,"terraform","godd-notes",r.env),i=(0,J.join)(r.outputDir,".github","workflows");(0,oe.mkdirSync)(o,{recursive:!0}),(0,oe.mkdirSync)(i,{recursive:!0});let s=(0,oe.readdirSync)(e).filter(c=>c.endsWith(".tf.hbs"));console.log(`
324
+ [1/2] Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${o}`);for(let c of s){let u=c.replace(".hbs",""),p=Fr((0,J.join)(e,c),n);(0,oe.writeFileSync)((0,J.join)(o,u),p,"utf-8"),console.log(` \u2713 ${u}`)}console.log(`
325
+ [2/2] GitHub Actions \u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u751F\u6210: ${i}`);let a=(0,oe.readdirSync)(t).filter(c=>c.endsWith(".yml.hbs"));for(let c of a){let u=c.replace(".hbs",""),p=Fr((0,J.join)(t,c),n);(0,oe.writeFileSync)((0,J.join)(i,u),p,"utf-8"),console.log(` \u2713 ${u}`)}}function N5(e){switch(e.provider){case"aws":console.log(`
310
326
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
311
327
  \u2551 AWS \u30A4\u30F3\u30D5\u30E9\u30D5\u30A1\u30A4\u30EB\u751F\u6210\u5B8C\u4E86 \u2551
312
328
  \u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563
@@ -393,7 +409,7 @@ export PATH="${e}:$PATH"
393
409
  \u2551 terraform init && terraform apply \u2551
394
410
  \u2551 \u2551
395
411
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
396
- `);break}}async function S5(e){if(e.includes("--help")||e.includes("-h")){console.log(`
412
+ `);break}}async function D5(e){if(e.includes("--help")||e.includes("-h")){console.log(`
397
413
  GoDD Notes Infra \u2014 \u30DE\u30EB\u30C1\u30AF\u30E9\u30A6\u30C9 \u30A4\u30F3\u30D5\u30E9\u81EA\u52D5\u751F\u6210
398
414
 
399
415
  Usage: godd notes infra [options]
@@ -410,19 +426,19 @@ Usage: godd notes infra [options]
410
426
 
411
427
  Options:
412
428
  --help, -h \u3053\u306E\u30D8\u30EB\u30D7\u3092\u8868\u793A
413
- `);return}let t=c5();try{let r=await _5(t);if(v5(r),(await re(t,`
414
- \u3053\u306E\u8A2D\u5B9A\u3067\u751F\u6210\u3057\u307E\u3059\u304B\uFF1F [Y/n]: `)).toLowerCase()==="n"){console.log("\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002");return}b5(r),k5(r)}finally{t.close()}}var AT,oe,J,OT,NT,$5,zg,Rg,jT=_(()=>{"use strict";AT=ft(require("node:readline"),1),oe=require("node:fs"),J=require("node:path"),OT=require("node:url"),NT=ft(vg(),1);Ho();$5={},zg={aws:"AWS (ECS Fargate + S3/CloudFront + RDS)",gcp:"GCP (Cloud Run + GCS + Cloud SQL)",azure:"Azure (Container Apps + Blob Storage + PostgreSQL)","vercel-railway":"Vercel \xD7 Railway (PaaS)"};Rg=".godd-notes-infra.json"});var WT={};Zr(WT,{checkAwsPrerequisites:()=>BT,checkDocker:()=>Ng,deployToAws:()=>VT,generateEnvFile:()=>HT,generateSecret:()=>ju,getTerraformOutputs:()=>UT,loadInfraConfig:()=>FT,parseDeployFlags:()=>GT,runNotes:()=>D5});function ZT(){return MT.createInterface({input:process.stdin,output:process.stdout})}function ot(e,t){return new Promise(r=>{e.question(t,n=>r(n.trim()))})}function ju(e=48){return LT.randomBytes(e).toString("base64url").slice(0,e)}function Ng(){try{return It.execSync("docker --version",{stdio:"ignore",timeout:ii}),It.execSync("docker compose version",{stdio:"ignore",timeout:ii}),!0}catch{return!1}}function T5(){try{return(0,Oe.dirname)((0,Og.fileURLToPath)(KT.url))}catch{return(0,Oe.dirname)(process.execPath)}}function qT(){let e=T5(),t=(0,Oe.resolve)(e,".."),r=(0,Oe.join)(t,"notes-api"),n=(0,Oe.join)(t,"notes-app"),o=(0,Oe.join)(t,"templates","notes-compose.yml");return(0,Pe.existsSync)(r)&&(0,Pe.existsSync)(n)&&(0,Pe.existsSync)(o)?{apiDir:r,appDir:n,composeTemplate:o}:null}function Ag(e,t){(0,Pe.mkdirSync)(t,{recursive:!0});for(let r of(0,Pe.readdirSync)(e)){if(P5.has(r)||r.endsWith(".pyc")||r.endsWith(".tsbuildinfo"))continue;let n=(0,Oe.join)(e,r),o=(0,Oe.join)(t,r);(0,Pe.statSync)(n).isDirectory()?Ag(n,o):(0,Pe.copyFileSync)(n,o)}}function C5(e,t){return new Promise(r=>{It.spawn("docker",["compose",...t],{cwd:e,stdio:"inherit",shell:!0}).on("close",o=>r(o??1))})}async function E5(e,t=12e4){let r=Date.now(),n=3e3;for(;Date.now()-r<t;)try{return It.execSync(`node -e "const http=require('http');const r=http.get('${e}',{timeout:3000},res=>{process.exit(res.statusCode===200?0:1)});r.on('error',()=>process.exit(1))"`,{stdio:"ignore",timeout:5e3}),!0}catch{await new Promise(o=>setTimeout(o,n))}return!1}function FT(e){let t=(0,Oe.join)(e,I5);if(!(0,Pe.existsSync)(t))return null;try{return JSON.parse((0,Pe.readFileSync)(t,"utf-8"))}catch{return null}}function UT(e){if(!(0,Pe.existsSync)(e))throw new Error(`Terraform \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${e}`);let t;try{t=It.execSync("terraform output -json",{cwd:e,encoding:"utf-8",stdio:["pipe","pipe","pipe"]})}catch(s){throw new Error(`terraform output \u306E\u5B9F\u884C\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002terraform init && terraform apply \u3092\u5148\u306B\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002
415
- ${Ke(s)}`)}let r;try{r=JSON.parse(t)}catch{throw new Error(`terraform output \u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${t.slice(0,200)}`)}let n=["ecr_repository_url","ecs_cluster_name","ecs_service_name","s3_bucket_name","cloudfront_distribution_id","cloudfront_domain","notes_app_url","notes_api_url"],o=n.filter(s=>!r[s]?.value);if(o.length>0)throw new Error(`Terraform output \u306B\u5FC5\u8981\u306A\u5024\u304C\u3042\u308A\u307E\u305B\u3093: ${o.join(", ")}`);let i={};for(let s of n)i[s]=r[s].value;return i}function BT(){let e=[];try{It.execSync("aws --version",{stdio:"pipe",timeout:ii})}catch{e.push("AWS CLI \u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002https://aws.amazon.com/cli/")}try{It.execSync("aws sts get-caller-identity",{stdio:"pipe",timeout:ii})}catch{e.push("AWS \u8A8D\u8A3C\u60C5\u5831\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002aws configure \u307E\u305F\u306F AWS SSO \u3067\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}try{It.execSync("docker --version",{stdio:"pipe",timeout:ii})}catch{e.push("Docker \u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002")}try{It.execSync("pnpm --version",{stdio:"pipe",timeout:ii})}catch{e.push("pnpm \u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002npm install -g pnpm")}return{ok:e.length===0,errors:e}}function mn(e,t={}){let{cwd:r,label:n}=t;n&&console.log(` ${n}...`);try{It.execSync(e,{cwd:r,stdio:"inherit"})}catch(o){throw new Error(`\u30B3\u30DE\u30F3\u30C9\u5931\u6557: ${e}
416
- ${Ke(o)}`)}}async function VT(e,t,r){let n=t.region??"ap-northeast-1",i=`${t.accountId??""}.dkr.ecr.${n}.amazonaws.com`;console.log(`
429
+ `);return}let t=b5();try{let r=await I5(t);if(z5(r),(await re(t,`
430
+ \u3053\u306E\u8A2D\u5B9A\u3067\u751F\u6210\u3057\u307E\u3059\u304B\uFF1F [Y/n]: `)).toLowerCase()==="n"){console.log("\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002");return}R5(r),N5(r)}finally{t.close()}}var qT,oe,J,FT,UT,j5,Dg,jg,VT=_(()=>{"use strict";qT=st(require("node:readline"),1),oe=require("node:fs"),J=require("node:path"),FT=require("node:url"),UT=st(xg(),1);Ko();j5={},Dg={aws:"AWS (ECS Fargate + S3/CloudFront + RDS)",gcp:"GCP (Cloud Run + GCS + Cloud SQL)",azure:"Azure (Container Apps + Blob Storage + PostgreSQL)","vercel-railway":"Vercel \xD7 Railway (PaaS)"};jg=".godd-notes-infra.json"});var nP={};Br(nP,{checkAwsPrerequisites:()=>JT,checkDocker:()=>qg,deployToAws:()=>YT,generateEnvFile:()=>QT,generateSecret:()=>wr,getTerraformOutputs:()=>Ug,loadInfraConfig:()=>Fg,parseComposeFlags:()=>tP,parseDeployFlags:()=>eP,runNotes:()=>Y5});function WT(){return HT.createInterface({input:process.stdin,output:process.stdout})}function it(e,t){return new Promise(r=>{e.question(t,n=>r(n.trim()))})}function wr(e=48){return GT.randomBytes(e).toString("base64url").slice(0,e)}function qg(){try{return Ye.execSync("docker --version",{stdio:"ignore",timeout:ci}),Ye.execSync("docker compose version",{stdio:"ignore",timeout:ci}),!0}catch{return!1}}function M5(){try{return(0,ye.dirname)((0,Zg.fileURLToPath)(oP.url))}catch{return(0,ye.dirname)(process.execPath)}}function KT(){let e=M5(),t=(0,ye.resolve)(e,".."),r=(0,ye.join)(t,"notes-api"),n=(0,ye.join)(t,"notes-app"),o=(0,ye.join)(t,"templates","notes-compose.yml");return(0,de.existsSync)(r)&&(0,de.existsSync)(n)&&(0,de.existsSync)(o)?{apiDir:r,appDir:n,composeTemplate:o}:null}function Mg(e,t){(0,de.mkdirSync)(t,{recursive:!0});for(let r of(0,de.readdirSync)(e)){if(L5.has(r)||r.endsWith(".pyc")||r.endsWith(".tsbuildinfo"))continue;let n=(0,ye.join)(e,r),o=(0,ye.join)(t,r);(0,de.statSync)(n).isDirectory()?Mg(n,o):(0,de.copyFileSync)(n,o)}}function Z5(e,t){return new Promise((r,n)=>{let o=Ye.spawn("docker",["compose",...t],{cwd:e,stdio:"inherit"});o.on("error",i=>n(i)),o.on("close",i=>r(i??1))})}async function q5(e,t=12e4){let r=Date.now(),n=3e3;for(;Date.now()-r<t;){if(await new Promise(i=>{let s=Lg.get(e,{timeout:3e3},a=>{a.resume(),i(a.statusCode===200)});s.on("error",()=>i(!1)),s.on("timeout",()=>{s.destroy(),i(!1)})}))return!0;await new Promise(i=>setTimeout(i,n))}return!1}function Fg(e){let t=(0,ye.join)(e,F5);if(!(0,de.existsSync)(t))return null;try{return JSON.parse((0,de.readFileSync)(t,"utf-8"))}catch{return null}}function Ug(e){if(!(0,de.existsSync)(e))throw new Error(`Terraform \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${e}`);let t;try{t=Ye.execSync("terraform output -json",{cwd:e,encoding:"utf-8",stdio:["pipe","pipe","pipe"]})}catch(s){throw new Error(`terraform output \u306E\u5B9F\u884C\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002terraform init && terraform apply \u3092\u5148\u306B\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002
431
+ ${Ne(s)}`)}let r;try{r=JSON.parse(t)}catch{throw new Error(`terraform output \u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${t.slice(0,200)}`)}let n=["ecr_repository_url","ecs_cluster_name","ecs_service_name","s3_bucket_name","cloudfront_distribution_id","cloudfront_domain","notes_app_url","notes_api_url"],o=n.filter(s=>!r[s]?.value);if(o.length>0)throw new Error(`Terraform output \u306B\u5FC5\u8981\u306A\u5024\u304C\u3042\u308A\u307E\u305B\u3093: ${o.join(", ")}`);let i={};for(let s of n)i[s]=r[s].value;return i}function JT(){let e=[];try{Ye.execSync("aws --version",{stdio:"pipe",timeout:ci})}catch{e.push("AWS CLI \u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002https://aws.amazon.com/cli/")}try{Ye.execSync("aws sts get-caller-identity",{stdio:"pipe",timeout:ci})}catch{e.push("AWS \u8A8D\u8A3C\u60C5\u5831\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002aws configure \u307E\u305F\u306F AWS SSO \u3067\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}try{Ye.execSync("docker --version",{stdio:"pipe",timeout:ci})}catch{e.push("Docker \u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002")}try{Ye.execSync("pnpm --version",{stdio:"pipe",timeout:ci})}catch{e.push("pnpm \u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002npm install -g pnpm")}return{ok:e.length===0,errors:e}}function co(e,t,r={}){let{cwd:n,label:o}=r;o&&console.log(` ${o}...`);let i=Ye.spawnSync(e,t,{cwd:n,stdio:"inherit"});if(i.error)throw new Error(`\u30B3\u30DE\u30F3\u30C9\u8D77\u52D5\u5931\u6557: ${e}
432
+ ${Ne(i.error)}`);if(i.status!==0)throw new Error(`\u30B3\u30DE\u30F3\u30C9\u5931\u6557 (exit ${i.status}): ${e} ${t.join(" ")}`)}async function YT(e,t,r){let n=t.region??"ap-northeast-1",i=`${t.accountId??""}.dkr.ecr.${n}.amazonaws.com`;console.log(`
417
433
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
418
434
  \u2551 ripla Notes \u2014 AWS \u30C7\u30D7\u30ED\u30A4\u958B\u59CB \u2551
419
435
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
420
- `),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${n}`),console.log(` ECR: ${e.ecr_repository_url}`),console.log(` ECS \u30AF\u30E9\u30B9\u30BF: ${e.ecs_cluster_name}`),console.log(` S3 \u30D0\u30B1\u30C3\u30C8: ${e.s3_bucket_name}`),console.log(` CloudFront: ${e.cloudfront_distribution_id}`),console.log(),console.log("[1/6] ECR \u306B\u30ED\u30B0\u30A4\u30F3..."),mn(`aws ecr get-login-password --region ${n} | docker login --username AWS --password-stdin ${i}`),console.log(" \u2713 ECR \u30ED\u30B0\u30A4\u30F3\u5B8C\u4E86"),console.log(`
421
- [2/6] Notes API \u306E Docker \u30A4\u30E1\u30FC\u30B8\u3092\u30D3\u30EB\u30C9...`);let s=`${e.ecr_repository_url}:latest`;mn(`docker build --platform linux/arm64 -t ${s} -f docker/Dockerfile .`,{cwd:r.apiDir}),console.log(" \u2713 \u30A4\u30E1\u30FC\u30B8\u30D3\u30EB\u30C9\u5B8C\u4E86"),console.log(`
422
- [3/6] ECR \u306B\u30D7\u30C3\u30B7\u30E5...`),mn(`docker push ${s}`),console.log(" \u2713 ECR \u30D7\u30C3\u30B7\u30E5\u5B8C\u4E86"),console.log(`
423
- [4/6] ECS \u30B5\u30FC\u30D3\u30B9\u3092\u66F4\u65B0...`),mn(`aws ecs update-service --cluster ${e.ecs_cluster_name} --service ${e.ecs_service_name} --force-new-deployment --region ${n}`),console.log(" \u2713 ECS \u30C7\u30D7\u30ED\u30A4\u958B\u59CB\uFF08\u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u3067\u5B89\u5B9A\u5316\u5F85\u3061\uFF09"),console.log(`
424
- [5/6] Notes App \u3092\u30D3\u30EB\u30C9\u3057\u3066 S3 \u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9...`);let a=(0,Oe.join)(r.appDir,"node_modules");(0,Pe.existsSync)(a)||mn("npm install",{cwd:r.appDir,label:"\u4F9D\u5B58\u95A2\u4FC2\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB"}),mn("npx vite build",{cwd:r.appDir,label:"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9\u30D3\u30EB\u30C9"}),mn(`aws s3 sync dist/ s3://${e.s3_bucket_name} --delete --region ${n}`,{cwd:r.appDir,label:"S3 \u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"}),console.log(" \u2713 S3 \u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u5B8C\u4E86"),console.log(`
425
- [6/6] CloudFront \u30AD\u30E3\u30C3\u30B7\u30E5\u3092\u7121\u52B9\u5316...`),mn(`aws cloudfront create-invalidation --distribution-id ${e.cloudfront_distribution_id} --paths "/*"`),console.log(" \u2713 CloudFront \u7121\u52B9\u5316\u30EA\u30AF\u30A8\u30B9\u30C8\u9001\u4FE1"),console.log(`
436
+ `),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${n}`),console.log(` ECR: ${e.ecr_repository_url}`),console.log(` ECS \u30AF\u30E9\u30B9\u30BF: ${e.ecs_cluster_name}`),console.log(` S3 \u30D0\u30B1\u30C3\u30C8: ${e.s3_bucket_name}`),console.log(` CloudFront: ${e.cloudfront_distribution_id}`),console.log(),console.log("[1/6] ECR \u306B\u30ED\u30B0\u30A4\u30F3...");{let c=Ye.spawnSync("aws",["ecr","get-login-password","--region",n],{encoding:"utf-8"});if(c.status!==0||!c.stdout)throw new Error(`ECR \u30ED\u30B0\u30A4\u30F3\u30D1\u30B9\u30EF\u30FC\u30C9\u53D6\u5F97\u5931\u6557: ${c.stderr??""}`);if(Ye.spawnSync("docker",["login","--username","AWS","--password-stdin",i],{input:c.stdout,stdio:["pipe","inherit","inherit"]}).status!==0)throw new Error("docker login \u5931\u6557")}console.log(" \u2713 ECR \u30ED\u30B0\u30A4\u30F3\u5B8C\u4E86"),console.log(`
437
+ [2/6] Notes API \u306E Docker \u30A4\u30E1\u30FC\u30B8\u3092\u30D3\u30EB\u30C9...`);let s=`${e.ecr_repository_url}:latest`;co("docker",["build","--platform","linux/arm64","-t",s,"-f","docker/Dockerfile","."],{cwd:r.apiDir}),console.log(" \u2713 \u30A4\u30E1\u30FC\u30B8\u30D3\u30EB\u30C9\u5B8C\u4E86"),console.log(`
438
+ [3/6] ECR \u306B\u30D7\u30C3\u30B7\u30E5...`),co("docker",["push",s]),console.log(" \u2713 ECR \u30D7\u30C3\u30B7\u30E5\u5B8C\u4E86"),console.log(`
439
+ [4/6] ECS \u30B5\u30FC\u30D3\u30B9\u3092\u66F4\u65B0...`),co("aws",["ecs","update-service","--cluster",e.ecs_cluster_name,"--service",e.ecs_service_name,"--force-new-deployment","--region",n]),console.log(" \u2713 ECS \u30C7\u30D7\u30ED\u30A4\u958B\u59CB\uFF08\u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u3067\u5B89\u5B9A\u5316\u5F85\u3061\uFF09"),console.log(`
440
+ [5/6] Notes App \u3092\u30D3\u30EB\u30C9\u3057\u3066 S3 \u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9...`);let a=(0,ye.join)(r.appDir,"node_modules");(0,de.existsSync)(a)||co("pnpm",["install","--frozen-lockfile"],{cwd:r.appDir,label:"\u4F9D\u5B58\u95A2\u4FC2\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB"}),co("pnpm",["exec","vite","build"],{cwd:r.appDir,label:"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9\u30D3\u30EB\u30C9"}),co("aws",["s3","sync","dist/",`s3://${e.s3_bucket_name}`,"--delete","--region",n],{cwd:r.appDir,label:"S3 \u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"}),console.log(" \u2713 S3 \u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u5B8C\u4E86"),console.log(`
441
+ [6/6] CloudFront \u30AD\u30E3\u30C3\u30B7\u30E5\u3092\u7121\u52B9\u5316...`),co("aws",["cloudfront","create-invalidation","--distribution-id",e.cloudfront_distribution_id,"--paths","/*"]),console.log(" \u2713 CloudFront \u7121\u52B9\u5316\u30EA\u30AF\u30A8\u30B9\u30C8\u9001\u4FE1"),console.log(`
426
442
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
427
443
  \u2551 ripla Notes \u2014 AWS \u30C7\u30D7\u30ED\u30A4\u5B8C\u4E86 \u2551
428
444
  \u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563
@@ -437,34 +453,35 @@ ${Ke(o)}`)}}async function VT(e,t,r){let n=t.region??"ap-northeast-1",i=`${t.acc
437
453
  \u2551 --services ${e.ecs_service_name.padEnd(32)}\u2551
438
454
  \u2551 \u2551
439
455
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
440
- `)}async function z5(e){console.log(`
456
+ `)}async function U5(e){console.log(`
441
457
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
442
458
  \u2551 ripla Notes \u30C7\u30D7\u30ED\u30A4\u30A6\u30A3\u30B6\u30FC\u30C9 \u2551
443
459
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
444
- `);let t=await ot(e,"\u30C7\u30D7\u30ED\u30A4\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [./ripla-notes]: ")||"./ripla-notes";console.log(`
445
- --- PostgreSQL \u8A2D\u5B9A ---`);let r=await ot(e,"DB \u30E6\u30FC\u30B6\u30FC [app_user]: ")||"app_user",n=await ot(e,"DB \u30D1\u30B9\u30EF\u30FC\u30C9 [\u81EA\u52D5\u751F\u6210]: ")||ju(24),o=await ot(e,"DB \u540D [ripla_notes]: ")||"ripla_notes",i=await ot(e,"PostgreSQL \u30DD\u30FC\u30C8 [5432]: ")||"5432";console.log(`
446
- --- \u30DD\u30FC\u30C8\u8A2D\u5B9A ---`);let s=await ot(e,"Notes API \u30DD\u30FC\u30C8 [3100]: ")||"3100",a=await ot(e,"Notes App \u30DD\u30FC\u30C8 [5175]: ")||"5175";console.log(`
447
- --- GitHub \u9023\u643A ---`);let c=await ot(e,"GitHub Token (ghp_xxx): "),u=await ot(e,"GitHub Owner (\u7D44\u7E54 or \u30E6\u30FC\u30B6\u30FC\u540D): "),p=await ot(e,"GitHub Repo (\u30EA\u30DD\u30B8\u30C8\u30EA\u540D): "),l=await ot(e,"GitHub Branch [main]: ")||"main";console.log(`
448
- --- \u30BB\u30AD\u30E5\u30EA\u30C6\u30A3 ---`);let d=await ot(e,"JWT \u30B7\u30FC\u30AF\u30EC\u30C3\u30C8 [\u81EA\u52D5\u751F\u6210]: ")||ju(48);console.log(`
449
- --- \u7BA1\u7406\u8005\u30A2\u30AB\u30A6\u30F3\u30C8 ---`);let f=await ot(e,"\u7BA1\u7406\u8005\u30E6\u30FC\u30B6\u30FC\u540D [admin]: ")||"admin",h=await ot(e,"\u7BA1\u7406\u8005\u30D1\u30B9\u30EF\u30FC\u30C9: ")||ju(16);return{deployDir:(0,Oe.resolve)(t),postgresUser:r,postgresPassword:n,postgresDb:o,postgresPort:i,notesApiPort:s,notesAppPort:a,githubToken:c,githubOwner:u,githubRepo:p,githubBranch:l,jwtSecret:d,adminUsername:f,adminPassword:h}}function HT(e){return["# ripla Notes \u74B0\u5883\u5909\u6570\uFF08\u81EA\u52D5\u751F\u6210\uFF09",`POSTGRES_USER=${e.postgresUser}`,`POSTGRES_PASSWORD=${e.postgresPassword}`,`POSTGRES_DB=${e.postgresDb}`,`POSTGRES_PORT=${e.postgresPort}`,`NOTES_API_PORT=${e.notesApiPort}`,`NOTES_APP_PORT=${e.notesAppPort}`,`GITHUB_TOKEN=${e.githubToken}`,`GITHUB_OWNER=${e.githubOwner}`,`GITHUB_REPO=${e.githubRepo}`,`GITHUB_BRANCH=${e.githubBranch}`,`JWT_SECRET=${e.jwtSecret}`,`NOTES_ADMIN_USERNAME=${e.adminUsername}`,`NOTES_ADMIN_PASSWORD=${e.adminPassword}`,""].join(`
450
- `)}async function R5(e){let t=qT();t||(console.error("\u30A8\u30E9\u30FC: notes-api / notes-app \u306E\u30BD\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002"),console.error("npm \u30D1\u30C3\u30B1\u30FC\u30B8\u304C\u6B63\u3057\u304F\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u308B\u304B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let{apiDir:r,appDir:n,composeTemplate:o}=t;console.log(`
451
- [1/5] \u30C7\u30D7\u30ED\u30A4\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u6E96\u5099: ${e.deployDir}`),(0,Pe.mkdirSync)(e.deployDir,{recursive:!0}),console.log("[2/5] notes-api \u3092\u30B3\u30D4\u30FC..."),Ag(r,(0,Oe.join)(e.deployDir,"notes-api")),console.log("[3/5] notes-app \u3092\u30B3\u30D4\u30FC..."),Ag(n,(0,Oe.join)(e.deployDir,"notes-app")),console.log("[4/5] docker-compose.yml \u3068 .env \u3092\u751F\u6210...");let i=(0,Pe.readFileSync)(o,"utf-8");(0,Pe.writeFileSync)((0,Oe.join)(e.deployDir,"docker-compose.yml"),i,"utf-8"),(0,Pe.writeFileSync)((0,Oe.join)(e.deployDir,".env"),HT(e),"utf-8"),console.log("[5/5] Docker Compose \u3067\u30B5\u30FC\u30D3\u30B9\u3092\u8D77\u52D5..."),await C5(e.deployDir,["up","-d","--build"])!==0&&(console.error(`
460
+ `);let t=await it(e,"\u30C7\u30D7\u30ED\u30A4\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [./ripla-notes]: ")||"./ripla-notes";console.log(`
461
+ --- PostgreSQL \u8A2D\u5B9A ---`);let r=await it(e,"DB \u30E6\u30FC\u30B6\u30FC [app_user]: ")||"app_user",n=await it(e,"DB \u30D1\u30B9\u30EF\u30FC\u30C9 [\u81EA\u52D5\u751F\u6210]: ")||wr(24),o=await it(e,"DB \u540D [ripla_notes]: ")||"ripla_notes",i=await it(e,"PostgreSQL \u30DD\u30FC\u30C8 [5432]: ")||"5432";console.log(`
462
+ --- \u30DD\u30FC\u30C8\u8A2D\u5B9A ---`);let s=await it(e,"Notes API \u30DD\u30FC\u30C8 [3100]: ")||"3100",a=await it(e,"Notes App \u30DD\u30FC\u30C8 [5175]: ")||"5175";console.log(`
463
+ --- GitHub \u9023\u643A ---`);let c=await it(e,"GitHub Token (ghp_xxx): "),u=await it(e,"GitHub Owner (\u7D44\u7E54 or \u30E6\u30FC\u30B6\u30FC\u540D): "),p=await it(e,"GitHub Repo (\u30EA\u30DD\u30B8\u30C8\u30EA\u540D): "),l=await it(e,"GitHub Branch [main]: ")||"main";console.log(`
464
+ --- \u30BB\u30AD\u30E5\u30EA\u30C6\u30A3 ---`);let d=await it(e,"JWT \u30B7\u30FC\u30AF\u30EC\u30C3\u30C8 [\u81EA\u52D5\u751F\u6210]: ")||wr(48);console.log(`
465
+ --- \u7BA1\u7406\u8005\u30A2\u30AB\u30A6\u30F3\u30C8 ---`);let f=await it(e,"\u7BA1\u7406\u8005\u30E6\u30FC\u30B6\u30FC\u540D [admin]: ")||"admin",h=await it(e,"\u7BA1\u7406\u8005\u30D1\u30B9\u30EF\u30FC\u30C9: ")||wr(16);return{deployDir:(0,ye.resolve)(t),postgresUser:r,postgresPassword:n,postgresDb:o,postgresPort:i,notesApiPort:s,notesAppPort:a,githubToken:c,githubOwner:u,githubRepo:p,githubBranch:l,jwtSecret:d,adminUsername:f,adminPassword:h}}function QT(e){return["# ripla Notes \u74B0\u5883\u5909\u6570\uFF08\u81EA\u52D5\u751F\u6210\uFF09",`POSTGRES_USER=${e.postgresUser}`,`POSTGRES_PASSWORD=${e.postgresPassword}`,`POSTGRES_DB=${e.postgresDb}`,`POSTGRES_PORT=${e.postgresPort}`,`NOTES_API_PORT=${e.notesApiPort}`,`NOTES_APP_PORT=${e.notesAppPort}`,`GITHUB_TOKEN=${e.githubToken}`,`GITHUB_OWNER=${e.githubOwner}`,`GITHUB_REPO=${e.githubRepo}`,`GITHUB_BRANCH=${e.githubBranch}`,`JWT_SECRET=${e.jwtSecret}`,`NOTES_ADMIN_USERNAME=${e.adminUsername}`,`NOTES_ADMIN_PASSWORD=${e.adminPassword}`,""].join(`
466
+ `)}async function XT(e){let t=KT();t||(console.error("\u30A8\u30E9\u30FC: notes-api / notes-app \u306E\u30BD\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002"),console.error("npm \u30D1\u30C3\u30B1\u30FC\u30B8\u304C\u6B63\u3057\u304F\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u308B\u304B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let{apiDir:r,appDir:n,composeTemplate:o}=t;try{console.log(`
467
+ [1/5] \u30C7\u30D7\u30ED\u30A4\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u6E96\u5099: ${e.deployDir}`),(0,de.mkdirSync)(e.deployDir,{recursive:!0}),console.log("[2/5] notes-api \u3092\u30B3\u30D4\u30FC..."),Mg(r,(0,ye.join)(e.deployDir,"notes-api")),console.log("[3/5] notes-app \u3092\u30B3\u30D4\u30FC..."),Mg(n,(0,ye.join)(e.deployDir,"notes-app")),console.log("[4/5] docker-compose.yml \u3068 .env \u3092\u751F\u6210...");let p=(0,de.readFileSync)(o,"utf-8");(0,de.writeFileSync)((0,ye.join)(e.deployDir,"docker-compose.yml"),p,"utf-8"),(0,de.writeFileSync)((0,ye.join)(e.deployDir,".env"),QT(e),"utf-8")}catch(p){let l=p instanceof Error?p.message:String(p);console.error(`
468
+ \u30A8\u30E9\u30FC: \u30D5\u30A1\u30A4\u30EB\u64CD\u4F5C\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${l}`),console.error(`\u30C7\u30D7\u30ED\u30A4\u5148\u306E\u30D1\u30B9\u3068\u30A2\u30AF\u30BB\u30B9\u6A29\u9650\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044: ${e.deployDir}`),process.exit(1)}console.log("[5/5] Docker Compose \u3067\u30B5\u30FC\u30D3\u30B9\u3092\u8D77\u52D5..."),await Z5(e.deployDir,["up","-d","--build"])!==0&&(console.error(`
452
469
  \u30A8\u30E9\u30FC: docker compose up \u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002`),console.error(`\u30ED\u30B0\u3092\u78BA\u8A8D: cd ${e.deployDir} && docker compose logs`),process.exit(1)),console.log(`
453
- \u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF\u5F85\u6A5F\u4E2D...`);let a=`http://localhost:${e.notesApiPort}/api/health`;await E5(a)||(console.warn(`
454
- \u8B66\u544A: \u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF\u304C\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\u3057\u307E\u3057\u305F\u3002`),console.warn("\u30B5\u30FC\u30D3\u30B9\u306E\u8D77\u52D5\u306B\u6642\u9593\u304C\u304B\u304B\u3063\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002"),console.warn(`\u624B\u52D5\u3067\u78BA\u8A8D: curl ${a}`));let u=`http://localhost:${e.notesAppPort}`,p=`http://localhost:${e.notesApiPort}`;console.log(`
470
+ \u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF\u5F85\u6A5F\u4E2D...`);let s=`http://localhost:${e.notesApiPort}/api/health`;await q5(s)||(console.warn(`
471
+ \u8B66\u544A: \u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF\u304C\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\u3057\u307E\u3057\u305F\u3002`),console.warn("\u30B5\u30FC\u30D3\u30B9\u306E\u8D77\u52D5\u306B\u6642\u9593\u304C\u304B\u304B\u3063\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002"),console.warn(`\u624B\u52D5\u3067\u78BA\u8A8D: curl ${s}`));let c=`http://localhost:${e.notesAppPort}`,u=`http://localhost:${e.notesApiPort}`;console.log(`
455
472
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
456
473
  \u2551 ripla Notes \u30C7\u30D7\u30ED\u30A4\u5B8C\u4E86 \u2551
457
474
  \u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563
458
475
  \u2551 \u2551
459
- \u2551 Notes App: ${u.padEnd(35)}\u2551
460
- \u2551 Notes API: ${p.padEnd(35)}\u2551
461
- \u2551 API Docs: ${(p+"/docs").padEnd(35)}\u2551
476
+ \u2551 Notes App: ${c.padEnd(35)}\u2551
477
+ \u2551 Notes API: ${u.padEnd(35)}\u2551
478
+ \u2551 API Docs: ${(u+"/docs").padEnd(35)}\u2551
462
479
  \u2551 \u2551
463
480
  \u2551 \u30C7\u30D7\u30ED\u30A4\u5148: ${e.deployDir.slice(0,33).padEnd(35)}\u2551
464
481
  \u2551 \u2551
465
482
  \u2551 \u7BA1\u7406\u8005: \u2551
466
483
  \u2551 \u30E6\u30FC\u30B6\u30FC\u540D: ${e.adminUsername.padEnd(33)}\u2551
467
- \u2551 \u30D1\u30B9\u30EF\u30FC\u30C9: ${e.adminPassword.padEnd(33)}\u2551
484
+ \u2551 \u30D1\u30B9\u30EF\u30FC\u30C9: ${"(\u521D\u56DE\u30ED\u30B0\u30A4\u30F3\u5F8C\u306B\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044)".padEnd(33)}\u2551
468
485
  \u2551 \u2551
469
486
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
470
487
 
@@ -474,9 +491,12 @@ ${Ke(o)}`)}}async function VT(e,t,r){let n=t.region??"ap-northeast-1",i=`${t.acc
474
491
  docker compose stop # \u505C\u6B62
475
492
  docker compose start # \u518D\u958B
476
493
  docker compose down -v # \u5B8C\u5168\u524A\u9664
477
- `)}async function A5(e){Ng()||(console.error("\u30A8\u30E9\u30FC: Docker \u304A\u3088\u3073 Docker Compose \u304C\u5FC5\u8981\u3067\u3059\u3002"),console.error("https://docs.docker.com/get-docker/ \u304B\u3089\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let t=await z5(e);if(console.log(`
478
- --- \u30C7\u30D7\u30ED\u30A4\u8A2D\u5B9A\u306E\u78BA\u8A8D ---`),console.log(` \u30C7\u30D7\u30ED\u30A4\u5148: ${t.deployDir}`),console.log(` DB: ${t.postgresUser}@localhost:${t.postgresPort}/${t.postgresDb}`),console.log(` API \u30DD\u30FC\u30C8: ${t.notesApiPort}`),console.log(` App \u30DD\u30FC\u30C8: ${t.notesAppPort}`),console.log(` GitHub: ${t.githubOwner}/${t.githubRepo} (${t.githubBranch})`),console.log(` \u7BA1\u7406\u8005: ${t.adminUsername}`),(await ot(e,`
479
- \u3053\u306E\u8A2D\u5B9A\u3067\u30C7\u30D7\u30ED\u30A4\u3057\u307E\u3059\u304B\uFF1F [Y/n]: `)).toLowerCase()==="n"){console.log("\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002");return}await R5(t)}function GT(e){let t=!1;for(let r=0;r<e.length;r++)(e[r]==="--yes"||e[r]==="-y")&&(t=!0);return{yes:t}}function Du(){console.log(`
494
+ `)}async function B5(e){qg()||(console.error("\u30A8\u30E9\u30FC: Docker \u304A\u3088\u3073 Docker Compose \u304C\u5FC5\u8981\u3067\u3059\u3002"),console.error("https://docs.docker.com/get-docker/ \u304B\u3089\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let t=await U5(e);if(console.log(`
495
+ --- \u30C7\u30D7\u30ED\u30A4\u8A2D\u5B9A\u306E\u78BA\u8A8D ---`),console.log(` \u30C7\u30D7\u30ED\u30A4\u5148: ${t.deployDir}`),console.log(` DB: ${t.postgresUser}@localhost:${t.postgresPort}/${t.postgresDb}`),console.log(` API \u30DD\u30FC\u30C8: ${t.notesApiPort}`),console.log(` App \u30DD\u30FC\u30C8: ${t.notesAppPort}`),console.log(` GitHub: ${t.githubOwner}/${t.githubRepo} (${t.githubBranch})`),console.log(` \u7BA1\u7406\u8005: ${t.adminUsername}`),(await it(e,`
496
+ \u3053\u306E\u8A2D\u5B9A\u3067\u30C7\u30D7\u30ED\u30A4\u3057\u307E\u3059\u304B\uFF1F [Y/n]: `)).toLowerCase()==="n"){console.log("\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002");return}await XT(t)}function eP(e){let t=!1;for(let r=0;r<e.length;r++)(e[r]==="--yes"||e[r]==="-y")&&(t=!0);return{yes:t}}function tP(e){let t=!1,r=null;for(let n=0;n<e.length;n++)e[n]==="--auto"?t=!0:e[n]==="--config"&&n+1<e.length&&(r=e[++n]);return{auto:t,configPath:r}}function V5(e){if(!(0,de.existsSync)(e))throw new Error(`\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${e}`);let t;try{t=JSON.parse((0,de.readFileSync)(e,"utf-8"))}catch{throw new Error(`\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\uFF08JSON \u5F62\u5F0F\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\uFF09: ${e}`)}return{deployDir:(0,ye.resolve)(t.deployDir??"./ripla-notes"),postgresUser:t.postgresUser??"app_user",postgresPassword:t.postgresPassword??wr(24),postgresDb:t.postgresDb??"ripla_notes",postgresPort:t.postgresPort??"5432",notesApiPort:t.notesApiPort??"3100",notesAppPort:t.notesAppPort??"5175",githubToken:t.githubToken??"",githubOwner:t.githubOwner??"",githubRepo:t.githubRepo??"",githubBranch:t.githubBranch??"main",jwtSecret:t.jwtSecret??wr(48),adminUsername:t.adminUsername??"admin",adminPassword:t.adminPassword??wr(16)}}function H5(){return{deployDir:(0,ye.resolve)("./ripla-notes"),postgresUser:"app_user",postgresPassword:wr(24),postgresDb:"ripla_notes",postgresPort:"5432",notesApiPort:"3100",notesAppPort:"5175",githubToken:process.env.GITHUB_TOKEN??"",githubOwner:process.env.GITHUB_OWNER??"",githubRepo:process.env.GITHUB_REPO??"",githubBranch:process.env.GITHUB_BRANCH??"main",jwtSecret:wr(48),adminUsername:"admin",adminPassword:wr(16)}}function G5(e){let{postgresPassword:t,jwtSecret:r,adminPassword:n,githubToken:o,...i}=e;(0,de.writeFileSync)(rP,JSON.stringify(i,null,2)+`
497
+ `,"utf-8")}async function W5(){let e=process.cwd(),t=Fg(e);console.log(`
498
+ --- ripla Notes \u30B9\u30C6\u30FC\u30BF\u30B9\u78BA\u8A8D ---
499
+ `);let r=(0,de.existsSync)((0,ye.join)(e,"ripla-notes"))?(0,ye.join)(e,"ripla-notes"):e;if((0,de.existsSync)((0,ye.join)(r,"docker-compose.yml"))){console.log("[Docker Compose]");try{Ye.spawnSync("docker",["compose","ps"],{cwd:r,stdio:"inherit"})}catch{console.log(" Docker Compose \u304C\u8D77\u52D5\u3057\u3066\u3044\u307E\u305B\u3093\u3002")}console.log()}if(t?.provider==="aws"){console.log("[AWS ECS]");let c=t.region??"ap-northeast-1";try{let u=t.env??"dev",p=(0,ye.join)(t.outputDir??e,"terraform","godd-notes",u),l=Ug(p);Ye.spawnSync("aws",["ecs","describe-services","--cluster",l.ecs_cluster_name,"--services",l.ecs_service_name,"--region",c,"--query","services[0].{status:status,running:runningCount,desired:desiredCount,deployments:length(deployments)}","--output","table"],{stdio:"inherit"})}catch(u){console.log(` ECS \u30B9\u30C6\u30FC\u30BF\u30B9\u53D6\u5F97\u306B\u5931\u6557: ${Ne(u)}`)}console.log()}let o=(0,ye.join)(e,rP),s=((0,de.existsSync)(o)?(()=>{try{return JSON.parse((0,de.readFileSync)(o,"utf-8"))}catch{return null}})():null)?.notesApiPort??"3100",a=[s,...s!=="8000"?["8000"]:[]];console.log("[\u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF]");for(let c of a){let u=`http://localhost:${c}/api/health`,p=await new Promise(l=>{let d=Lg.get(u,{timeout:3e3},f=>{f.resume(),l(f.statusCode===200)});d.on("error",()=>l(!1)),d.on("timeout",()=>{d.destroy(),l(!1)})});console.log(` ${u}: ${p?"\u2713 OK":"\u2717 \u5FDC\u7B54\u306A\u3057"}`)}}function Lu(){console.log(`
480
500
  GoDD Notes \u2014 ripla Notes \u30C7\u30D7\u30ED\u30A4\u7BA1\u7406
481
501
 
482
502
  Usage: godd notes <command> [options]
@@ -485,12 +505,19 @@ Commands:
485
505
  compose \u30ED\u30FC\u30AB\u30EB Docker Compose \u3067\u30C7\u30D7\u30ED\u30A4
486
506
  deploy AWS \u306B\u76F4\u63A5\u30C7\u30D7\u30ED\u30A4\uFF08ECR push \u2192 ECS \u66F4\u65B0 \u2192 S3 sync \u2192 CloudFront \u7121\u52B9\u5316\uFF09
487
507
  infra \u30AF\u30E9\u30A6\u30C9\u30A4\u30F3\u30D5\u30E9\u3092 Terraform + GitHub Actions \u3067\u69CB\u7BC9
508
+ status \u30C7\u30D7\u30ED\u30A4\u72B6\u614B\u30FB\u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF\u3092\u78BA\u8A8D
509
+
510
+ compose \u30AA\u30D7\u30B7\u30E7\u30F3:
511
+ --auto \u5168\u8A2D\u5B9A\u3092\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u3067\u81EA\u52D5\u751F\u6210\uFF08AI \u5411\u3051\u975E\u5BFE\u8A71\u30E2\u30FC\u30C9\uFF09
512
+ --config <path> JSON \u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u8AAD\u307F\u8FBC\u307F\uFF08AI \u5411\u3051\u975E\u5BFE\u8A71\u30E2\u30FC\u30C9\uFF09
488
513
 
489
514
  deploy \u30AA\u30D7\u30B7\u30E7\u30F3:
490
515
  --yes, -y \u78BA\u8A8D\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u30B9\u30AD\u30C3\u30D7
516
+
517
+ \u5171\u901A:
491
518
  --help, -h \u30D8\u30EB\u30D7\u3092\u8868\u793A
492
519
 
493
- .godd-notes-infra.json \u304C\u5B58\u5728\u3057 provider \u304C aws \u306E\u5834\u5408\u306B\u5229\u7528\u53EF\u80FD\u3002
520
+ .godd-notes-infra.json \u304C\u5B58\u5728\u3057 provider \u304C aws \u306E\u5834\u5408\u306B deploy \u304C\u5229\u7528\u53EF\u80FD\u3002
494
521
 
495
522
  \u5BFE\u5FDC\u30D7\u30ED\u30D0\u30A4\u30C0 (infra):
496
523
  AWS ECS Fargate + S3/CloudFront + RDS [\u30C7\u30D5\u30A9\u30EB\u30C8]
@@ -499,23 +526,33 @@ deploy \u30AA\u30D7\u30B7\u30E7\u30F3:
499
526
  Vercel\xD7Railway PaaS \u69CB\u6210\uFF08\u30D5\u30ED\u30F3\u30C8: Vercel / API: Railway\uFF09
500
527
 
501
528
  Examples:
502
- godd notes compose \u30ED\u30FC\u30AB\u30EB Docker Compose \u3067\u30C7\u30D7\u30ED\u30A4
503
- godd notes deploy AWS \u306B\u30C7\u30D7\u30ED\u30A4\uFF08\u5BFE\u8A71\u5F62\u5F0F\u3067\u78BA\u8A8D\uFF09
504
- godd notes deploy -y \u78BA\u8A8D\u306A\u3057\u3067 AWS \u306B\u30C7\u30D7\u30ED\u30A4
505
- godd notes infra Terraform + CI/CD \u30D5\u30A1\u30A4\u30EB\u751F\u6210
529
+ godd notes compose \u30ED\u30FC\u30AB\u30EB Docker Compose \u3067\u30C7\u30D7\u30ED\u30A4\uFF08\u5BFE\u8A71\u5F0F\uFF09
530
+ godd notes compose --auto \u5168\u81EA\u52D5\u3067\u30C7\u30D7\u30ED\u30A4\uFF08\u74B0\u5883\u5909\u6570\u304B\u3089 GitHub \u8A2D\u5B9A\u3092\u53D6\u5F97\uFF09
531
+ godd notes compose --config config.json \u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30C7\u30D7\u30ED\u30A4
532
+ godd notes deploy AWS \u306B\u30C7\u30D7\u30ED\u30A4\uFF08\u5BFE\u8A71\u5F62\u5F0F\u3067\u78BA\u8A8D\uFF09
533
+ godd notes deploy -y \u78BA\u8A8D\u306A\u3057\u3067 AWS \u306B\u30C7\u30D7\u30ED\u30A4
534
+ godd notes infra Terraform + CI/CD \u30D5\u30A1\u30A4\u30EB\u751F\u6210
535
+ godd notes status \u30C7\u30D7\u30ED\u30A4\u72B6\u614B\u3092\u78BA\u8A8D
536
+
537
+ AI \u9023\u643A:
538
+ AI \u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306F\u4EE5\u4E0B\u306E\u6D41\u308C\u3067\u81EA\u5F8B\u30C7\u30D7\u30ED\u30A4\u53EF\u80FD:
539
+ 1. JSON \u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210
540
+ 2. godd notes compose --config <path> \u3067\u975E\u5BFE\u8A71\u30C7\u30D7\u30ED\u30A4
541
+ 3. godd notes status \u3067\u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF\u78BA\u8A8D
506
542
 
507
543
  \u8A2D\u5B9A\u306E\u6C38\u7D9A\u5316:
508
- infra \u30B3\u30DE\u30F3\u30C9\u306F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3054\u3068\u306B .godd-notes-infra.json \u3092\u4FDD\u5B58\u3057\u3001
509
- \u6B21\u56DE\u5B9F\u884C\u6642\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u3068\u3057\u3066\u518D\u5229\u7528\u3057\u307E\u3059\u3002
510
- `)}async function O5(e,t,r){console.log(`
511
- \u524D\u63D0\u6761\u4EF6\u3092\u78BA\u8A8D\u4E2D...`);let n=BT();if(!n.ok){console.error(`
544
+ infra \u30B3\u30DE\u30F3\u30C9\u306F .godd-notes-infra.json \u3092\u4FDD\u5B58\u3057\u518D\u5229\u7528\u3002
545
+ compose --config/--auto \u306F .godd-notes-compose.json \u3092\u4FDD\u5B58\u3057\u518D\u5229\u7528\u3002
546
+ `)}async function K5(e,t,r){console.log(`
547
+ \u524D\u63D0\u6761\u4EF6\u3092\u78BA\u8A8D\u4E2D...`);let n=JT();if(!n.ok){console.error(`
512
548
  \u30A8\u30E9\u30FC: AWS \u30C7\u30D7\u30ED\u30A4\u306E\u524D\u63D0\u6761\u4EF6\u3092\u6E80\u305F\u3057\u3066\u3044\u307E\u305B\u3093:`);for(let u of n.errors)console.error(` - ${u}`);process.exit(1)}console.log(` \u2713 \u524D\u63D0\u6761\u4EF6 OK
513
- `);let o=e.env??"dev",i=e.outputDir??t,s=(0,Oe.join)(i,"terraform","godd-notes",o);console.log(`Terraform output \u3092\u53D6\u5F97\u4E2D... (${s})`);let a=UT(s);console.log(` \u2713 Terraform output \u53D6\u5F97\u5B8C\u4E86
514
- `);let c=qT();if(c||(console.error("\u30A8\u30E9\u30FC: notes-api / notes-app \u306E\u30BD\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002"),process.exit(1)),console.log("--- AWS \u30C7\u30D7\u30ED\u30A4\u8A2D\u5B9A\u306E\u78BA\u8A8D ---"),console.log(` ECR: ${a.ecr_repository_url}`),console.log(` ECS: ${a.ecs_cluster_name} / ${a.ecs_service_name}`),console.log(` S3: ${a.s3_bucket_name}`),console.log(` CloudFront: ${a.cloudfront_distribution_id}`),console.log(` App URL: ${a.notes_app_url}`),!r){let u=ZT();try{if((await ot(u,`
515
- \u3053\u306E\u8A2D\u5B9A\u3067 AWS \u306B\u30C7\u30D7\u30ED\u30A4\u3057\u307E\u3059\u304B\uFF1F [Y/n]: `)).toLowerCase()==="n"){console.log("\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002");return}}finally{u.close()}}await VT(a,e,c)}async function N5(){try{let e=(0,Oe.join)((0,Oe.dirname)((0,Og.fileURLToPath)(KT.url)),"..","..","package.json");if(!(0,Pe.existsSync)(e))return;let t=JSON.parse((0,Pe.readFileSync)(e,"utf-8")),r=It.execSync(`npm view ${t.name} dist-tags.latest --json 2>/dev/null`,{encoding:"utf-8",timeout:5e3}).trim(),n=JSON.parse(r);n&&n!==t.version&&(console.log(`
516
- \u26A0 @ripla/godd-mcp \u306E\u65B0\u3057\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u3042\u308A\u307E\u3059: ${n}\uFF08\u73FE\u5728: ${t.version}\uFF09`),console.log(` \u66F4\u65B0: npm install -g ${t.name}@latest
517
- `))}catch{}}async function D5(e){let t=e[0]??"help";switch(t){case"compose":{if(e.includes("--help")||e.includes("-h")){Du();return}Ng()||(console.error("\u30A8\u30E9\u30FC: Docker \u304A\u3088\u3073 Docker Compose \u304C\u5FC5\u8981\u3067\u3059\u3002"),console.error("https://docs.docker.com/get-docker/ \u304B\u3089\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let r=ZT();try{await A5(r)}finally{r.close()}break}case"deploy":{if(e.includes("--help")||e.includes("-h")){Du();return}await N5();let{yes:r}=GT(e),n=process.cwd(),o=FT(n);(!o||o.provider!=="aws")&&(console.error("\u30A8\u30E9\u30FC: .godd-notes-infra.json \u304C\u898B\u3064\u304B\u3089\u306A\u3044\u304B\u3001provider \u304C aws \u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002"),console.error("\u5148\u306B godd notes infra \u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)),await O5(o,n,r);break}case"infra":{let{runNotesInfra:r}=await Promise.resolve().then(()=>(jT(),DT));await r(e.slice(1));break}case"help":case"--help":case"-h":Du();break;default:console.error(`\u4E0D\u660E\u306A\u30B5\u30D6\u30B3\u30DE\u30F3\u30C9: ${t}`),Du(),process.exit(1)}}var MT,LT,Pe,Oe,It,Og,KT,ii,P5,I5,JT=_(()=>{"use strict";MT=ft(require("node:readline"),1),LT=ft(require("node:crypto"),1),Pe=require("node:fs"),Oe=require("node:path"),It=ft(require("node:child_process"),1),Og=require("node:url");Ho();KT={};ii=1e4;P5=new Set([".venv","__pycache__",".pytest_cache",".ruff_cache","node_modules",".git",".env","dist"]);I5=".godd-notes-infra.json"});var QT=require("node:fs"),Ns=require("node:path"),Dg=require("node:os");process.env.__GODD_CLI__="1";var XT="0.1.0";function j5(){let e=process.platform==="win32"?"godd.exe":"godd",t=process.platform==="win32"?(0,Ns.join)(process.env.LOCALAPPDATA??(0,Ns.join)((0,Dg.homedir)(),"AppData","Local"),"GoDD"):(0,Ns.join)((0,Dg.homedir)(),".godd","bin");return(0,QT.existsSync)((0,Ns.join)(t,e))}var M5={i:"install",s:"server",n:"notes",v:"version",h:"help"};function L5(){return j5()?"help":"install"}var Mu=process.argv[2],Z5=Mu?M5[Mu]??Mu:L5();function YT(){console.log(`
518
- GoDD CLI v${XT}
549
+ `);let o=e.env??"dev",i=e.outputDir??t,s=(0,ye.join)(i,"terraform","godd-notes",o);console.log(`Terraform output \u3092\u53D6\u5F97\u4E2D... (${s})`);let a=Ug(s);console.log(` \u2713 Terraform output \u53D6\u5F97\u5B8C\u4E86
550
+ `);let c=KT();if(c||(console.error("\u30A8\u30E9\u30FC: notes-api / notes-app \u306E\u30BD\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002"),process.exit(1)),console.log("--- AWS \u30C7\u30D7\u30ED\u30A4\u8A2D\u5B9A\u306E\u78BA\u8A8D ---"),console.log(` ECR: ${a.ecr_repository_url}`),console.log(` ECS: ${a.ecs_cluster_name} / ${a.ecs_service_name}`),console.log(` S3: ${a.s3_bucket_name}`),console.log(` CloudFront: ${a.cloudfront_distribution_id}`),console.log(` App URL: ${a.notes_app_url}`),!r){let u=WT();try{if((await it(u,`
551
+ \u3053\u306E\u8A2D\u5B9A\u3067 AWS \u306B\u30C7\u30D7\u30ED\u30A4\u3057\u307E\u3059\u304B\uFF1F [Y/n]: `)).toLowerCase()==="n"){console.log("\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002");return}}finally{u.close()}}await YT(a,e,c)}async function J5(){try{let e=(0,ye.join)((0,ye.dirname)((0,Zg.fileURLToPath)(oP.url)),"..","..","package.json");if(!(0,de.existsSync)(e))return;let t=JSON.parse((0,de.readFileSync)(e,"utf-8")),r=Ye.spawnSync("npm",["view",t.name,"dist-tags.latest","--json"],{encoding:"utf-8",timeout:5e3});if(r.status!==0||!r.stdout)return;let n=r.stdout.trim(),o=JSON.parse(n);o&&o!==t.version&&(console.log(`
552
+ \u26A0 @ripla/godd-mcp \u306E\u65B0\u3057\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u3042\u308A\u307E\u3059: ${o}\uFF08\u73FE\u5728: ${t.version}\uFF09`),console.log(` \u66F4\u65B0: npm install -g ${t.name}@latest
553
+ `))}catch{}}async function Y5(e){let t=e[0]??"help";switch(t){case"compose":{if(e.includes("--help")||e.includes("-h")){Lu();return}qg()||(console.error("\u30A8\u30E9\u30FC: Docker \u304A\u3088\u3073 Docker Compose \u304C\u5FC5\u8981\u3067\u3059\u3002"),console.error("https://docs.docker.com/get-docker/ \u304B\u3089\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let r=tP(e.slice(1));if(r.auto||r.configPath){let n=r.configPath?V5(r.configPath):H5();n.githubToken||(console.error("\u30A8\u30E9\u30FC: githubToken \u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"),console.error("--config \u30D5\u30A1\u30A4\u30EB\u5185\u306B githubToken \u3092\u6307\u5B9A\u3059\u308B\u304B\u3001\u74B0\u5883\u5909\u6570 GITHUB_TOKEN \u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)),console.log(`
554
+ --- \u975E\u5BFE\u8A71\u30E2\u30FC\u30C9: \u30C7\u30D7\u30ED\u30A4\u8A2D\u5B9A ---`),console.log(` \u30C7\u30D7\u30ED\u30A4\u5148: ${n.deployDir}`),console.log(` DB: ${n.postgresUser}@localhost:${n.postgresPort}/${n.postgresDb}`),console.log(` API \u30DD\u30FC\u30C8: ${n.notesApiPort}`),console.log(` App \u30DD\u30FC\u30C8: ${n.notesAppPort}`),console.log(` GitHub: ${n.githubOwner}/${n.githubRepo} (${n.githubBranch})`),console.log(` \u7BA1\u7406\u8005: ${n.adminUsername}`),G5(n),await XT(n)}else{let n=WT();try{await B5(n)}finally{n.close()}}break}case"deploy":{if(e.includes("--help")||e.includes("-h")){Lu();return}await J5();let{yes:r}=eP(e),n=process.cwd(),o=Fg(n);(!o||o.provider!=="aws")&&(console.error("\u30A8\u30E9\u30FC: .godd-notes-infra.json \u304C\u898B\u3064\u304B\u3089\u306A\u3044\u304B\u3001provider \u304C aws \u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002"),console.error("\u5148\u306B godd notes infra \u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)),await K5(o,n,r);break}case"infra":{let{runNotesInfra:r}=await Promise.resolve().then(()=>(VT(),BT));await r(e.slice(1));break}case"status":{await W5();break}case"help":case"--help":case"-h":Lu();break;default:console.error(`\u4E0D\u660E\u306A\u30B5\u30D6\u30B3\u30DE\u30F3\u30C9: ${t}`),Lu(),process.exit(1)}}var HT,GT,de,ye,Ye,Lg,Zg,oP,ci,L5,F5,rP,iP=_(()=>{"use strict";HT=st(require("node:readline"),1),GT=st(require("node:crypto"),1),de=require("node:fs"),ye=require("node:path"),Ye=st(require("node:child_process"),1),Lg=st(require("node:http"),1),Zg=require("node:url");Ko();oP={};ci=1e4;L5=new Set([".venv","__pycache__",".pytest_cache",".ruff_cache","node_modules",".git",".env","dist"]);F5=".godd-notes-infra.json";rP=".godd-notes-compose.json"});var qu=require("node:fs"),Ur=require("node:path"),Bg=require("node:os"),cP=require("node:url"),s8={};process.env.__GODD_CLI__="1";var Q5=(0,cP.fileURLToPath)(s8.url),sP=(0,Ur.dirname)(Q5);function X5(){for(let e of[(0,Ur.join)(sP,"..","package.json"),(0,Ur.join)(sP,"..","..","package.json")])try{let t=JSON.parse((0,qu.readFileSync)(e,"utf-8"));if(t.version)return t.version}catch{}return"0.0.0"}var ui=X5();function e8(){return ui.includes("-canary")?`${ui} (canary)`:ui==="0.0.0"?`${ui} (development)`:`${ui} (latest)`}function t8(){let e=process.platform==="win32"?"godd.exe":"godd",t=process.platform==="win32"?(0,Ur.join)(process.env.LOCALAPPDATA??(0,Ur.join)((0,Bg.homedir)(),"AppData","Local"),"GoDD"):(0,Ur.join)((0,Bg.homedir)(),".godd","bin");return(0,qu.existsSync)((0,Ur.join)(t,e))}var r8={i:"install",s:"server",n:"notes",v:"version",h:"help"};function n8(){return t8()?"help":"install"}var Zu=process.argv[2],o8=Zu?r8[Zu]??Zu:n8();function aP(){console.log(`
555
+ GoDD CLI v${ui}
519
556
 
520
557
  Usage: godd <command>
521
558
 
@@ -534,7 +571,7 @@ Examples:
534
571
  godd notes deploy AWS \u306B\u30C7\u30D7\u30ED\u30A4\uFF08ECR/ECS/S3/CloudFront\uFF09
535
572
  godd notes infra \u30AF\u30E9\u30A6\u30C9\u30A4\u30F3\u30D5\u30E9\u3092\u5BFE\u8A71\u5F62\u5F0F\u3067\u69CB\u7BC9 (AWS/GCP/Azure/Vercel\xD7Railway)
536
573
  godd version \u30D0\u30FC\u30B8\u30E7\u30F3\u78BA\u8A8D
537
- `)}async function q5(){switch(Z5){case"server":{let{startServer:e}=await Promise.resolve().then(()=>(vT(),yT));await e();break}case"init":{let{runInit:e}=await Promise.resolve().then(()=>(PT(),$T));await e();break}case"install":{let{runInstall:e}=await Promise.resolve().then(()=>(RT(),zT));await e();break}case"notes":{let{runNotes:e}=await Promise.resolve().then(()=>(JT(),WT));await e(process.argv.slice(3));break}case"version":console.log(`GoDD CLI v${XT}`);break;case"help":YT();break;default:console.error(`\u4E0D\u660E\u306A\u30B3\u30DE\u30F3\u30C9: ${Mu}`),YT(),process.exit(1)}}q5().catch(e=>{console.error("GoDD CLI \u30A8\u30E9\u30FC:",e),process.exit(1)});
574
+ `)}async function i8(){switch(o8){case"server":{let{startServer:e}=await Promise.resolve().then(()=>(PT(),$T));await e();break}case"init":{let{runInit:e}=await Promise.resolve().then(()=>(NT(),AT));await e();break}case"install":{let{runInstall:e}=await Promise.resolve().then(()=>(ZT(),LT));await e();break}case"notes":{let{runNotes:e}=await Promise.resolve().then(()=>(iP(),nP));await e(process.argv.slice(3));break}case"version":console.log(`GoDD CLI v${e8()}`);break;case"help":aP();break;default:console.error(`\u4E0D\u660E\u306A\u30B3\u30DE\u30F3\u30C9: ${Zu}`),aP(),process.exit(1)}}i8().catch(e=>{console.error("GoDD CLI \u30A8\u30E9\u30FC:",e),process.exit(1)});
538
575
  /*! Bundled license information:
539
576
 
540
577
  js-yaml/dist/js-yaml.mjs: