@redocly/cli 2.71.0 → 2.71.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/THIRD_PARTY_NOTICES +3 -3
  2. package/lib/chunks/{SXIMN47K.js → 25RSTUQA.js} +1 -1
  3. package/lib/chunks/{N37OGNC4.js → 2IUGP2IH.js} +3 -3
  4. package/lib/chunks/{STAMDB3P.js → 2NYYNBAC.js} +1 -1
  5. package/lib/chunks/{YDGFDJ2K.js → 3N7LKSDD.js} +1 -1
  6. package/lib/chunks/4DUOPCYP.js +7 -0
  7. package/lib/chunks/{QAPQYNI3.js → 54EKLNNI.js} +1 -1
  8. package/lib/chunks/5BQNATJZ.js +20 -0
  9. package/lib/chunks/{PF43QQZA.js → 5DW3QRJB.js} +2 -2
  10. package/lib/chunks/{E4MPGN3Z.js → 5SSWNONM.js} +1 -1
  11. package/lib/chunks/{B5KSRXXW.js → 6TCEQRVX.js} +1 -1
  12. package/lib/chunks/{G2M6SQCS.js → 6ZNJ7RDX.js} +2 -2
  13. package/lib/chunks/{YLRH4RVF.js → 7HFLPQAB.js} +2 -2
  14. package/lib/chunks/{JCP37EY3.js → ACAPGKSR.js} +59 -25
  15. package/lib/chunks/ACECCMWJ.js +14 -0
  16. package/lib/chunks/{O37B7ABT.js → AH6ANNYP.js} +1 -1
  17. package/lib/chunks/{EHQY7ZOF.js → B5SUTVG4.js} +1 -1
  18. package/lib/chunks/{HAOBCQWB.js → BE4Z5FOC.js} +10 -8
  19. package/lib/chunks/{TXSBWL3Y.js → BOWZV5S6.js} +1 -1
  20. package/lib/chunks/{IULINGO6.js → BPSWCUZE.js} +1 -1
  21. package/lib/chunks/{V6VNRABV.js → BXXX3ZCV.js} +1 -1
  22. package/lib/chunks/{QMS4UKIK.js → CHX7O5AM.js} +5 -5
  23. package/lib/chunks/{2NVGTELR.js → CJWIDJTB.js} +1 -1
  24. package/lib/chunks/{L4F2ERUL.js → CX76LEFC.js} +1 -1
  25. package/lib/chunks/{WBWCX3LS.js → DORXGE7Z.js} +93 -93
  26. package/lib/chunks/{LD5MEXEL.js → DP3T6VZX.js} +1 -1
  27. package/lib/chunks/{FKKC7G6X.js → DURXFJ7H.js} +1 -1
  28. package/lib/chunks/DVLD4FET.js +20 -0
  29. package/lib/chunks/{MV3ZJ5HR.js → EAFZ6DNQ.js} +1 -1
  30. package/lib/chunks/{LS3G7CUH.js → EBHQXW6Z.js} +1 -1
  31. package/lib/chunks/{RIGQPR2I.js → EO65RJ4Z.js} +1 -1
  32. package/lib/chunks/{T55LQK2H.js → EQOFXQKD.js} +1 -1
  33. package/lib/chunks/FBEEMKTB.js +7 -0
  34. package/lib/chunks/{BU4AMVHN.js → FGJDZKD2.js} +1 -1
  35. package/lib/chunks/G6SB4ZP5.js +7 -0
  36. package/lib/chunks/{LRMOPAZ4.js → GAKWND4S.js} +1 -1
  37. package/lib/chunks/HAGYQ4BK.js +20 -0
  38. package/lib/chunks/{LNEXTJNF.js → HBWCMTP3.js} +1 -1
  39. package/lib/chunks/{2R2CXBRH.js → HWOL3HHR.js} +1 -1
  40. package/lib/chunks/{2UAA6O26.js → ILYXMZRT.js} +1 -1
  41. package/lib/chunks/{NBMSBQEL.js → INGAWMLB.js} +1 -1
  42. package/lib/chunks/{3DMXMP4K.js → IYV7EO2J.js} +1 -1
  43. package/lib/chunks/IZMDARCL.js +22 -0
  44. package/lib/chunks/JOWPA3MJ.js +7 -0
  45. package/lib/chunks/KFQC57GK.js +145 -0
  46. package/lib/chunks/{CZS2ZXJ7.js → KJIUDCYZ.js} +1 -1
  47. package/lib/chunks/{QB6CQ2CV.js → L2O63VRM.js} +1 -1
  48. package/lib/chunks/{MYSYBBIO.js → MH5X2EVH.js} +1 -1
  49. package/lib/chunks/{RLJVKAOL.js → NLAPR7D4.js} +1 -1
  50. package/lib/chunks/O53IFFP3.js +98 -0
  51. package/lib/chunks/{MQUZ5IJ2.js → PBQOGZ5C.js} +1 -1
  52. package/lib/chunks/{BCRM4BTA.js → Q3IJURM3.js} +1 -1
  53. package/lib/chunks/{HHCU6T2V.js → QXBSAWH3.js} +1 -1
  54. package/lib/chunks/QXHFS5G6.js +7 -0
  55. package/lib/chunks/{E3FBSKNS.js → QZJAXPYF.js} +1 -1
  56. package/lib/chunks/{QTGTCBFK.js → RBJCAITC.js} +1 -1
  57. package/lib/chunks/{CN2ZOHYL.js → RBNQC5ZB.js} +1 -1
  58. package/lib/chunks/{2CMKIFTE.js → RNA6JDRC.js} +1 -1
  59. package/lib/chunks/{DHP4BBTH.js → RNL7TC2W.js} +1 -1
  60. package/lib/chunks/{WKDC6LN3.js → RUPTJCF5.js} +1 -1
  61. package/lib/chunks/{YDQCJP4F.js → S6W63XAS.js} +1 -1
  62. package/lib/chunks/{B3GE7EIX.js → TN3JQHMS.js} +1 -1
  63. package/lib/chunks/TNRIBQHV.js +7 -0
  64. package/lib/chunks/TZROZMVE.js +20 -0
  65. package/lib/chunks/{TR67FYLT.js → U7KIB7CD.js} +1 -1
  66. package/lib/chunks/{EFB2YVY2.js → UMN7TKTH.js} +2 -2
  67. package/lib/chunks/{VXD5O25A.js → V34D5CUU.js} +1 -1
  68. package/lib/chunks/{SBHCUK5I.js → W2CABGMW.js} +1 -1
  69. package/lib/chunks/{MYOQDPQZ.js → WCJ2HAN3.js} +1 -1
  70. package/lib/chunks/{5ECOOGVW.js → WJ3YDHQA.js} +1 -1
  71. package/lib/chunks/{6TE6AFQ3.js → WLI2XLEP.js} +1 -1
  72. package/lib/chunks/{NCDX4IGX.js → X7C43UBI.js} +1 -1
  73. package/lib/chunks/{EH6VW7JO.js → XGPGFZMH.js} +1 -1
  74. package/lib/chunks/{YUEIHUPX.js → XZIK3H6V.js} +1 -1
  75. package/lib/chunks/{P7LM57HK.js → Y3LDWYZD.js} +1 -1
  76. package/lib/chunks/{VJHJJBVN.js → Y5DDX2MU.js} +1 -1
  77. package/lib/chunks/{MT4W54PL.js → YL3LVBZF.js} +1 -1
  78. package/lib/chunks/{O6NMXFEP.js → ZBB6PS6I.js} +1 -1
  79. package/lib/chunks/{NZE22F7Q.js → ZQTHHPK3.js} +2 -2
  80. package/lib/eject-assets/generators/cli/docs.ts +1 -1
  81. package/lib/eject-assets/generators/cli/engine-source.ts +1 -1
  82. package/lib/eject-assets/generators/cli/index.ts +2 -2
  83. package/lib/eject-assets/generators/cli/render.ts +1 -1
  84. package/lib/eject-assets/generators/go/client.ts +1 -1
  85. package/lib/eject-assets/generators/go/descriptor.ts +1 -1
  86. package/lib/eject-assets/generators/go/index.ts +2 -2
  87. package/lib/eject-assets/generators/go/models.ts +7 -2
  88. package/lib/eject-assets/generators/go/naming.ts +1 -1
  89. package/lib/eject-assets/generators/go/operations.ts +1 -1
  90. package/lib/eject-assets/generators/go/pagination.ts +1 -1
  91. package/lib/eject-assets/generators/go/types.ts +1 -1
  92. package/lib/eject-assets/generators/mock/faker.ts +17 -9
  93. package/lib/eject-assets/generators/mock/index.ts +4 -3
  94. package/lib/eject-assets/generators/mock/render.ts +128 -9
  95. package/lib/eject-assets/generators/mock/sample.ts +87 -4
  96. package/lib/eject-assets/generators/mock/values.ts +1 -1
  97. package/lib/eject-assets/generators/php/client.ts +1 -1
  98. package/lib/eject-assets/generators/php/descriptor.ts +10 -1
  99. package/lib/eject-assets/generators/php/index.ts +2 -2
  100. package/lib/eject-assets/generators/php/models.ts +8 -3
  101. package/lib/eject-assets/generators/php/naming.ts +1 -1
  102. package/lib/eject-assets/generators/php/operations.ts +11 -6
  103. package/lib/eject-assets/generators/php/pagination.ts +3 -2
  104. package/lib/eject-assets/generators/php/types.ts +12 -2
  105. package/lib/eject-assets/generators/python/client.ts +1 -1
  106. package/lib/eject-assets/generators/python/descriptor.ts +1 -1
  107. package/lib/eject-assets/generators/python/index.ts +3 -3
  108. package/lib/eject-assets/generators/python/models.ts +9 -3
  109. package/lib/eject-assets/generators/python/naming.ts +1 -1
  110. package/lib/eject-assets/generators/python/operations.ts +6 -5
  111. package/lib/eject-assets/generators/python/pagination.ts +1 -1
  112. package/lib/eject-assets/generators/python/types.ts +1 -1
  113. package/lib/eject-assets/generators/swr/index.ts +2 -2
  114. package/lib/eject-assets/generators/swr/render.ts +1 -1
  115. package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
  116. package/lib/eject-assets/generators/tanstack-query/render.ts +6 -5
  117. package/lib/eject-assets/generators/transformers/index.ts +2 -2
  118. package/lib/eject-assets/generators/transformers/render.ts +34 -7
  119. package/lib/eject-assets/generators/typescript/banner.ts +1 -1
  120. package/lib/eject-assets/generators/typescript/client.ts +1 -1
  121. package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
  122. package/lib/eject-assets/generators/typescript/index.ts +2 -2
  123. package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
  124. package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
  125. package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
  126. package/lib/eject-assets/generators/typescript/operations.ts +1 -1
  127. package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
  128. package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
  129. package/lib/eject-assets/generators/typescript/types.ts +1 -1
  130. package/lib/eject-assets/generators/zod/index.ts +2 -2
  131. package/lib/eject-assets/generators/zod/schemas.ts +1 -1
  132. package/lib/eject-assets/skills/go-generator/SKILL.md +3 -0
  133. package/lib/eject-assets/skills/mock-generator/SKILL.md +22 -0
  134. package/lib/eject-assets/skills/php-generator/SKILL.md +9 -2
  135. package/lib/eject-assets/skills/python-generator/SKILL.md +6 -0
  136. package/lib/eject-assets/skills/tanstack-query-generator/SKILL.md +2 -1
  137. package/lib/eject-assets/skills/transformers-generator/SKILL.md +4 -0
  138. package/lib/eject-assets/skills/typescript-generator/SKILL.md +5 -0
  139. package/lib/index.js +5 -5
  140. package/lib/skills/redocly-cli/SKILL.md +20 -1
  141. package/package.json +1 -1
  142. package/lib/chunks/2Y7MGFQS.js +0 -105
  143. package/lib/chunks/BPDHBW3N.js +0 -7
  144. package/lib/chunks/EWU57NBY.js +0 -20
  145. package/lib/chunks/GKXY6U4S.js +0 -145
  146. package/lib/chunks/GMGZQR6Q.js +0 -7
  147. package/lib/chunks/JM7BMZLD.js +0 -13
  148. package/lib/chunks/K6VR5YNF.js +0 -22
  149. package/lib/chunks/M6UVHV6D.js +0 -7
  150. package/lib/chunks/O72R3AD4.js +0 -20
  151. package/lib/chunks/RZ3FGCBT.js +0 -20
  152. package/lib/chunks/SBT63VHF.js +0 -7
  153. package/lib/chunks/UW4UC7ZI.js +0 -9
  154. package/lib/chunks/VQRJE4I2.js +0 -7
  155. package/lib/chunks/WACZWFKN.js +0 -19
  156. package/lib/chunks/WJXIZZA6.js +0 -7
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{c as f}from"./UW4UC7ZI.js";var u=/^[A-Za-z_$][A-Za-z0-9_$]*$/,o=f.typescript;function m(e){return u.test(e)}function E(e){return u.test(e)&&!o.has(e)}function p(e){let i=e.replace(/[^A-Za-z0-9_$]/g,"_");return(i===""||/^[0-9]/.test(i)||o.has(i))&&(i=`_${i}`),i}var l={"<":"\\u003C",">":"\\u003E","\u2028":"\\u2028","\u2029":"\\u2029"};function s(e){return JSON.stringify(e).replace(/[<>\u2028\u2029]/g,i=>l[i])}function L(e){return u.test(e)&&!o.has(e)?e:s(e)}function S(e,i){let n=p(e),r=n,t=2;for(;i.has(r);)r=`${n}_${t++}`;return i.add(r),r}var _=s;function c(e){if(typeof e=="string")return s(e);if(typeof e=="boolean"||e===null||typeof e=="number")return String(e);if(Array.isArray(e))return`[${e.map(c).join(", ")}]`;let i=Object.entries(e).map(([n,r])=>`${m(n)?n:s(n)}: ${c(r)}`);return i.length===0?"{}":`{ ${i.join(", ")} }`}function x(e){return e.replace(/\*\//g,"*\\/")}function y(e,i){let n=h(e,i);return n.length===0?void 0:n.join(`
7
+ import{c as f}from"./ACAPGKSR.js";var u=/^[A-Za-z_$][A-Za-z0-9_$]*$/,o=f.typescript;function m(e){return u.test(e)}function E(e){return u.test(e)&&!o.has(e)}function p(e){let i=e.replace(/[^A-Za-z0-9_$]/g,"_");return(i===""||/^[0-9]/.test(i)||o.has(i))&&(i=`_${i}`),i}var l={"<":"\\u003C",">":"\\u003E","\u2028":"\\u2028","\u2029":"\\u2029"};function s(e){return JSON.stringify(e).replace(/[<>\u2028\u2029]/g,i=>l[i])}function L(e){return u.test(e)&&!o.has(e)?e:s(e)}function S(e,i){let n=p(e),r=n,t=2;for(;i.has(r);)r=`${n}_${t++}`;return i.add(r),r}var _=s;function c(e){if(typeof e=="string")return s(e);if(typeof e=="boolean"||e===null||typeof e=="number")return String(e);if(Array.isArray(e))return`[${e.map(c).join(", ")}]`;let i=Object.entries(e).map(([n,r])=>`${m(n)?n:s(n)}: ${c(r)}`);return i.length===0?"{}":`{ ${i.join(", ")} }`}function x(e){return e.replace(/\*\//g,"*\\/")}function y(e,i){let n=h(e,i);return n.length===0?void 0:n.join(`
8
8
  `)}function h(e,i){let n=[];return e&&e.trim()&&n.push(...g($(e))),i&&n.push(...d(i)),n}function d(e){let i=[],n=(r,t)=>{t===void 0?i.push(`@${r}`):i.push(`@${r} ${t}`)};return e.minimum!==void 0&&n("minimum",e.minimum),e.maximum!==void 0&&n("maximum",e.maximum),e.exclusiveMinimum!==void 0&&n("exclusiveMinimum",e.exclusiveMinimum),e.exclusiveMaximum!==void 0&&n("exclusiveMaximum",e.exclusiveMaximum),e.minLength!==void 0&&n("minLength",e.minLength),e.maxLength!==void 0&&n("maxLength",e.maxLength),e.pattern!==void 0&&n("pattern",x(e.pattern)),e.minItems!==void 0&&n("minItems",e.minItems),e.maxItems!==void 0&&n("maxItems",e.maxItems),e.uniqueItems===!0&&n("uniqueItems"),e.format!==void 0&&n("format",e.format),e.deprecated===!0&&n("deprecated"),i}function g(e){let i=0,n=e.length;for(;i<n&&e[i]==="";)i++;for(;n>i&&e[n-1]==="";)n--;return e.slice(i,n)}function C(e){return e[0].toUpperCase()+e.slice(1)}function j(e){let i=e.split(/[-_]/).filter(n=>n.length>0).map((n,r)=>{let t=n.toLowerCase();return r===0?t:t.charAt(0).toUpperCase()+t.slice(1)}).join("");return p(i)}function $(e){return e.replace(/\r\n/g,`
9
9
  `).split(`
10
10
  `).map(i=>i.trimEnd())}export{m as a,E as b,p as c,s as d,L as e,S as f,_ as g,c as h,x as i,y as j,C as k,j as l,$ as m};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{$ as e,fa as t}from"./WBWCX3LS.js";function r({verificationUri:o,userCode:n}){t.output(`Attempting to automatically open the SSO authorization page in your default browser.
7
+ import{$ as e,fa as t}from"./DORXGE7Z.js";function r({verificationUri:o,userCode:n}){t.output(`Attempting to automatically open the SSO authorization page in your default browser.
8
8
  `),t.output(`If the browser does not open or you wish to use a different device to authorize this request, open the following URL:
9
9
 
10
10
  `),t.output(e(o)),t.output(`
@@ -0,0 +1,20 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ var __filename = __fileURLToPath(import.meta.url);
6
+ var __dirname = __pathDirname(__filename);
7
+ import{a as G}from"./BE4Z5FOC.js";import{b as j,c as N,d as Q,e as O,f as Z,g as Y,h as X,i as ee,j as ne}from"./UMN7TKTH.js";import{a as F,b as W,c as L,d as x,e as _,g as A,h as U,i as z,j as K,k as J,l as D,n as V}from"./ACAPGKSR.js";import{a as H}from"./WZXA5XPB.js";var B=L.go,P=class extends F{constructor(){super(" ")}typeName(t){return d(t)}memberName(t){return d(t)}identifier(t){return x(t,{style:"camel",reserved:B})}identifiers(t,n){let r=new Set(n??[]);return t.map(o=>{let a=d(o),s=a;for(let l=2;r.has(s);l++)s=`${a}${l}`;return r.add(s),s})}packageName(t){let n=t.toLowerCase().replace(/[^a-z0-9]/g,"");return n===""||/^[0-9]/.test(n)?"client":n}string(t){let n='"';for(let r of t){let o=r.codePointAt(0);r==="\\"?n+="\\\\":r==='"'?n+='\\"':r===`
8
+ `?n+="\\n":r==="\r"?n+="\\r":r===" "?n+="\\t":o<32||o===127?n+=`\\x${o.toString(16).padStart(2,"0")}`:o>=55296&&o<=57343?n+="\\uFFFD":n+=r}return n+'"'}literal(t){return t==null?"nil":typeof t=="boolean"||typeof t=="number"?String(t):typeof t=="string"?this.string(t):Array.isArray(t)?`[]any{${t.map(r=>this.literal(r)).join(", ")}}`:`map[string]any{${Object.entries(t).map(([r,o])=>`${this.string(r)}: ${this.literal(o)}`).join(", ")}}`}comment(t){for(let n of D(t))this.line(n===""?"//":`// ${n}`);return this}doc(t,n){let r=D(n);if(r.length===0)return this;this.line(`// ${t} \u2014 ${r[0]}`);let o=!1;for(let a of r.slice(1)){if(a===""){o||this.line("//"),o=!0;continue}this.line(`// ${a}`),o=!1}return this}layout(t){return ue(fe(t))}toString(){return this.layout(super.toString())}};function d(e){let t=x(e,{style:"pascal",reserved:B});return t.startsWith("_")?`N${t.slice(1)}`:t}function ue(e){return`${e.replace(/\n{3,}/g,`
9
+
10
+ `).trimEnd()}
11
+ `}function fe(e){let t=e.split(`
12
+ `),n=[...t],r=/^(\t+)([A-Za-z_]\w*) (\S+)( `[^`]*`)?$/,o=/^(\t+)([A-Za-z_]\w*) (\S+) = (.+)$/,a=/^(\t+)("(?:[^"\\]|\\.)*":) (.+)$/,s=i=>{if(i.length<2)return;let m=[];for(let{parts:f}of i)f.forEach(($,g)=>{g<f.length-1&&(m[g]=Math.max(m[g]??0,$.length))});for(let{index:f,parts:$,indent:g}of i){let h=$.map((y,b)=>b<$.length-1?y.padEnd(m[b]??0):y);n[f]=g+h.join(" ").trimEnd()}},l=[],c;return t.forEach((i,m)=>{let f=a.exec(i),$=f===null?o.exec(i):null,g=f===null&&$===null?r.exec(i):null,h=g!==null&&!B.has(g[2])?g:null,y=f!==null?"entry":$!==null?"const":h!==null?"field":void 0;if((y===void 0||y!==c)&&(s(l),l=[],c=y),f!==null){l.push({index:m,indent:f[1],parts:[f[2],f[3]]});return}if($!==null){l.push({index:m,indent:$[1],parts:[$[2],$[3],"=",$[4]]});return}if(h!==null){let b=[h[2],h[3]];h[4]!==void 0&&b.push(h[4].trimStart()),l.push({index:m,indent:h[1],parts:b})}}),s(l),n.join(`
13
+ `)}var u=new P,v=L.go;function te(e){if(e===void 0)return"client";if(!/^[a-z_][a-z0-9_]*$/.test(e)||v.has(e))throw new H(`goPackage "${e}" is not a valid Go package name: use lowercase letters, digits, and underscores, don't start with a digit, and avoid Go keywords.`);return e}function R(e){let t=new Set,n=[];for(let r of e.services)for(let o of r.operations){let a=d(o.name),s=2;for(;t.has(a);)a=`${d(o.name)}${s++}`;t.add(a),n.push({op:o,ident:a})}return n}function de(e){return Y(e).map(n=>n.kind==="literal"?u.string(n.value):x(n.name,{style:"camel",reserved:v})).join(" + ")}function re(e,t){let n=t.servers??[];if(n.length===0)return;let r=new Set;n.forEach((o,a)=>{let s=`${d(o.description??`server${a+1}`)}URL`;r.has(s)&&(s=`${s}${a+1}`),r.add(s);let l=o.variables.map(i=>`${x(i.name,{style:"camel",reserved:v})} string`),c=o.variables.map(i=>`${x(i.name,{style:"camel",reserved:v})} default: ${u.string(i.default)}`).join(", ");e.line(`// ${s} returns the ${u.string(o.description??o.url)} base URL${c===""?".":` (${c}).`}`),e.block(`func ${s}(${l.join(", ")}) string {`,()=>{e.line(`return ${de(o)}`)},"}"),e.blank()})}function oe(e,t){let n=X(e,t).map(r=>r.map(o=>o.kind==="apiKey"?`{Scheme: ${u.string(o.scheme)}, Kind: "apiKey", Name: ${u.string(o.name)}, In: ${u.string(o.in)}}`:`{Scheme: ${u.string(o.scheme)}, Kind: ${u.string(o.kind)}}`));if(n.length!==0)return`[][]SecuritySpec{${n.map(r=>`{${r.join(", ")}}`).join(", ")}}`}function se(e){return`&PaginationSpec{${[`Style: ${u.string(e.style)}`,...e.param!==void 0?[`Param: ${u.string(e.param)}`]:[],...e.nextCursor!==void 0?[`NextCursor: ${u.string(e.nextCursor)}`]:[],...e.hasMore!==void 0?[`HasMore: ${u.string(e.hasMore)}`]:[],...e.nextLink!==void 0?[`NextLink: ${u.string(e.nextLink)}`]:[],...e.limitParam!==void 0?[`LimitParam: ${u.string(e.limitParam)}`]:[],...e.items!==void 0?[`Items: ${u.string(e.items)}`]:[]].join(", ")}}`}function p(e,t="string"){if(z(e)){let n=p(K(e),t);return n.startsWith("*")||n==="any"?n:`*${n}`}switch(e.kind){case"scalar":if(t==="Date"&&e.scalar==="string"){if(e.metadata?.format==="date-time")return"time.Time";if(e.metadata?.format==="date")return"Date"}return{string:"string",integer:"int64",number:"float64",boolean:"bool"}[e.scalar];case"array":return`[]${p(e.items,t)}`;case"record":return`map[string]${p(e.value,t)}`;case"ref":return d(e.name);case"literal":return typeof e.value=="string"?"string":typeof e.value=="boolean"?"bool":"float64";case"enum":return{string:"string",integer:"int64",number:"float64",boolean:"bool"}[e.scalar];case"omit":return d(e.base);case"union":case"null":case"object":case"intersection":case"unknown":return"any"}}function me(e,t,n,r,o){let a=n.map(s=>s.writeOnly?{...s,required:!1}:s);e.doc(d(t),o),e.block(`type ${d(t)} struct {`,()=>{for(let s of a){let l=d(s.name),c=p(s.schema,r),i=`\`json:"${s.name}"\``;s.required||(!c.startsWith("*")&&!c.startsWith("[]")&&!c.startsWith("map[")&&c!=="any"&&(c=`*${c}`),i=`\`json:"${s.name},omitempty"\``),e.line(`${l} ${c} ${i}`)}},"}"),e.blank()}function I(e,t="string"){let n=new P;n.line("package client"),n.blank(),e.schemas.some(({schema:a})=>U(a,e)!==void 0)&&(n.line('import "encoding/json"'),n.blank());let o=ge(e,t);return t==="Date"&&o.includes("time.Time")&&(n.line('import "time"'),n.blank()),n.line(o),n.toString()}function ge(e,t){let n=new P;for(let{name:r,schema:o}of e.schemas){let a=J(o);if(a!==void 0){let l=a.scalar==="string"?"string":"int64";n.doc(d(r),o.description),n.line(`type ${d(r)} ${l}`),n.blank(),n.block("const (",()=>{let c=new Set;a.values.forEach(i=>{let m=W.pascal(String(i))||"Value",f="";for(let g=2;c.has(m+f);g++)f=String(g);c.add(m+f);let $=d(r)+m+f;n.line(`${$} ${d(r)} = ${u.literal(i)}`)})},")"),n.blank();continue}if(o.kind==="object"||o.kind==="intersection"){let l=A(o,e);if(l!==void 0){me(n,r,l.properties,t,l.description??o.description);continue}}let s=U(o,e);if(s!==void 0){let l=d(r),c=s.cases.map(i=>`${i.value} -> ${d(i.schemaName)}`).join(", ");n.line(`// ${l} is a discriminated union ("${s.property}"): ${c}.`),n.line(`type ${l} = any`),n.blank(),n.line(`// Unmarshal${l} decodes into the member selected by "${s.property}".`),n.block(`func Unmarshal${l}(data []byte) (${l}, error) {`,()=>{n.block("var probe struct {",()=>{n.line(`Discriminant string \`json:"${s.property}"\``)},"}"),n.block("if err := json.Unmarshal(data, &probe); err != nil {",()=>{n.line("return nil, err")},"}"),n.line("switch probe.Discriminant {");for(let i of s.cases)n.block(`case ${u.string(i.value)}:`,()=>{n.line(`var value ${d(i.schemaName)}`),n.line("err := json.Unmarshal(data, &value)"),n.line("return value, err")});n.line("}"),n.line("var fallback any"),n.line("err := json.Unmarshal(data, &fallback)"),n.line("return fallback, err")},"}"),n.blank();continue}n.doc(d(r),o.description),n.line(`type ${d(r)} = ${p(o,t)}`),n.blank()}return n.toString()}function q(e,t){if(t==="string")return e;let n=e.startsWith("*")?`(${e})`:e;return t==="time.Time"?`${n}.Format(time.RFC3339)`:t==="Date"?`${n}.Format("2006-01-02")`:t==="int64"?`strconv.FormatInt(${e}, 10)`:t==="float64"?`strconv.FormatFloat(${e}, 'f', -1, 64)`:t==="bool"?`strconv.FormatBool(${e})`:`fmt.Sprint(${e})`}var $e=["c","ctx","body","params","out","op"];function T(e,t){let n=_(e.pathParams.map(r=>r.name),{style:"camel",reserved:v,taken:$e});return e.pathParams.map((r,o)=>({param:r,go:n[o],type:p(r.schema,t)}))}function he(e,t){let n=new Set;return(e.successResponseHeaders??[]).map(r=>{let o=d(r.name),a=o,s=2;for(;n.has(a);)a=`${o}${s++}`;n.add(a);let l=V(r.schema,t),c={integer:{goType:"*int64",helper:"headerInt64"},number:{goType:"*float64",helper:"headerFloat64"},boolean:{goType:"*bool",helper:"headerBool"},string:{goType:"*string",helper:"headerString"}}[l];return{field:a,name:r.name,...c}})}function E(e,t,n,r,o,a=!1){let s=T(t,r),l=t.queryParams.length>0,c=j(t),i=c===void 0?void 0:p(c,r),m=a?he(t,o):[],f=O(t)||t.requestBody!==void 0&&Z(t.requestBody.contentType);a&&(e.line(`// ${n}Headers carries the declared response headers of ${n}WithHeaders (nil when absent or unparsable).`),e.block(`type ${n}Headers struct {`,()=>{for(let S of m)e.line(`${S.field} ${S.goType}`)},"}"),e.blank());let $=["ctx context.Context",...s.map(({go:S,type:w})=>`${S} ${w}`),...t.requestBody?[`body ${f?"any":p(t.requestBody.schema,r)}`]:[],...l?[`params *${n}Params`]:[]],g=N(t),h=a?i===void 0?`(${n}Headers, error)`:`(${i}, ${n}Headers, error)`:g!==void 0?"func(yield func(ServerSentEvent, error) bool)":i===void 0?"error":`(${i}, error)`,y=S=>a?i===void 0?`return headers, ${S}`:`return out, headers, ${S}`:i===void 0?`return ${S}`:`return out, ${S}`,b=a?`${n}WithHeaders`:n;e.doc(b,a?`Like ${n}, also returning the declared response headers.`:t.summary),e.block(`func (c *Client) ${b}(${$.join(", ")}) ${h} {`,()=>{g===void 0&&i!==void 0&&e.line(`var out ${i}`),a&&e.line(`var headers ${n}Headers`),e.line(`op := operations[${u.string(t.specName??t.name)}]`),e.line("authHeaders, query := resolveAuth(op.Security, c.config.Auth)"),l&&e.block("if params != nil {",()=>{for(let k of t.queryParams){let C=d(k.name);e.block(`if params.${C} != nil {`,()=>{if(k.schema.kind==="array"){let M=p(k.schema.items,r);e.block(`for _, item := range *params.${C} {`,()=>{e.line(`query.Add(${u.string(k.name)}, ${q("item",M)})`)},"}")}else e.line(`query.Set(${u.string(k.name)}, ${q(`*params.${C}`,p(k.schema,r))})`)},"}")}},"}");let S=s.map(({param:k,go:C,type:M})=>`${u.string(k.name)}: ${q(C,M)}`).join(", ");if(e.line(`requestURL := buildURL(c.config.ServerURL, op.Path, map[string]string{${S}})`),g!==void 0){e.block("open := func(extraHeaders map[string]string) (*http.Response, error) {",()=>{e.line("merged := map[string]string{}"),e.block("for key, value := range authHeaders {",()=>{e.line("merged[key] = value")},"}"),e.block("for key, value := range extraHeaders {",()=>{e.line("merged[key] = value")},"}"),e.line("return send(ctx, &c.config, requestSpec{OperationID: op.ID, Method: op.Method, URL: requestURL, Headers: merged, Query: query})")},"}"),e.line(`return iterSSE(open, ${g.schema!==void 0&&g.schema.kind!=="unknown"})`);return}let w=["OperationID: op.ID","Method: op.Method","URL: requestURL","Headers: authHeaders","Query: query"];if(O(t)?(e.line("contentType, reader, stream, err := multipartBody(body)"),e.block("if err != nil {",()=>{e.line(y("err"))},"}"),w.push("Body: reader","Stream: stream","ContentType: contentType")):t.requestBody&&f?(e.line("reader, stream, err := binaryBody(body)"),e.block("if err != nil {",()=>{e.line(y("err"))},"}"),w.push("Body: reader","Stream: stream",`ContentType: ${u.string(t.requestBody.contentType)}`)):t.requestBody&&Q(t)?(e.line("contentType, reader, err := toMultipart(body)"),e.block("if err != nil {",()=>{e.line(y("err"))},"}"),w.push("Body: reader"),w.push("ContentType: contentType")):t.requestBody&&(e.line("payload, err := json.Marshal(body)"),e.block("if err != nil {",()=>{e.line(y("err"))},"}"),w.push("Body: bytes.NewReader(payload)"),w.push(`ContentType: ${u.string(t.requestBody.contentType)}`)),e.line(`resp, err := send(ctx, &c.config, requestSpec{${w.join(", ")}})`),e.block("if err != nil {",()=>{e.line(y("err"))},"}"),e.block("if resp.StatusCode >= 400 {",()=>{e.line(y("apiErrorFrom(resp, requestURL)"))},"}"),a){e.block(`if err := decodeJSON(resp, ${i===void 0?"nil":"&out"}); err != nil {`,()=>{e.line(y("err"))},"}");for(let k of m)e.line(`headers.${k.field} = ${k.helper}(resp.Header, ${u.string(k.name)})`);e.line(i===void 0?"return headers, nil":"return out, headers, nil")}else i===void 0?e.line("return decodeJSON(resp, nil)"):(e.block("if err := decodeJSON(resp, &out); err != nil {",()=>{e.line("return out, err")},"}"),e.line("return out, nil"))},"}"),e.blank()}function ae(e,t,n,r,o,a){let s=T(t,r),l=t.queryParams.length>0,c=["ctx context.Context",...s.map(({go:m,type:f})=>`${m} ${f}`),...l?[`params *${n}Params`]:[]].join(", "),i=()=>{e.line(`op := operations[${u.string(t.specName??t.name)}]`),e.line("base := url.Values{}"),l&&e.block("if params != nil {",()=>{for(let m of t.queryParams){let f=d(m.name);e.block(`if params.${f} != nil {`,()=>{e.line(`base.Set(${u.string(m.name)}, ${q(`*params.${f}`,p(m.schema,r))})`)},"}")}},"}"),e.block("call := func(pageParams url.Values) (any, *http.Response, error) {",()=>{e.line("authHeaders, query := resolveAuth(op.Security, c.config.Auth)"),e.block("for key, values := range pageParams {",()=>{e.block("for _, value := range values {",()=>{e.line("query.Set(key, value)")},"}")},"}");let m=s.map(({param:f,go:$,type:g})=>`${u.string(f.name)}: ${q($,g)}`).join(", ");e.line(`requestURL := buildURL(c.config.ServerURL, op.Path, map[string]string{${m}})`),e.line("resp, err := send(ctx, &c.config, requestSpec{OperationID: op.ID, Method: op.Method, URL: requestURL, Headers: authHeaders, Query: query})"),e.block("if err != nil {",()=>{e.line("return nil, nil, err")},"}"),e.block("if resp.StatusCode >= 400 {",()=>{e.line("return nil, resp, apiErrorFrom(resp, requestURL)")},"}"),e.line("var raw any"),e.block("if err := decodeJSON(resp, &raw); err != nil {",()=>{e.line("return nil, resp, err")},"}"),e.line("return raw, resp, nil")},"}"),e.line("pages := iterPages(call, *op.Pagination, base)")};e.line(`// ${n}Pages iterates ${n} response pages; use with \`for page, err := range\`.`),e.block(`func (c *Client) ${n}Pages(${c}) func(yield func(${o}, error) bool) {`,()=>{i(),e.block(`return func(yield func(${o}, error) bool) {`,()=>{e.block("pages(func(raw any, err error) bool {",()=>{e.line(`var page ${o}`),e.block("if err == nil {",()=>{e.line("err = reencode(raw, &page)")},"}"),e.line("return yield(page, err)")},"})")},"}")},"}"),e.blank(),e.line(`// ${n}Items iterates the items of every ${n} page.`),e.block(`func (c *Client) ${n}Items(${c}) func(yield func(${a}, error) bool) {`,()=>{i(),e.block(`return func(yield func(${a}, error) bool) {`,()=>{e.block("pages(func(raw any, err error) bool {",()=>{e.block("if err != nil {",()=>{e.line(`var zero ${a}`),e.line("return yield(zero, err)")},"}"),e.line("pageItems, _ := resolvePointer(raw, op.Pagination.Items).([]any)"),e.block("for _, item := range pageItems {",()=>{e.line(`var typed ${a}`),e.block("if err := reencode(item, &typed); err != nil {",()=>{e.line("return yield(typed, err)")},"}"),e.block("if !yield(typed, nil) {",()=>{e.line("return false")},"}")},"}"),e.line("return true")},"})")},"}")},"}"),e.blank()}function ie(e){let t=e.split(`
14
+ `),n=[],r=!1;for(let o of t)if(!o.startsWith("package ")){if(o.startsWith("import (")){r=!0;continue}if(r){o.startsWith(")")&&(r=!1);continue}o.startsWith("import ")||n.push(o)}return n.join(`
15
+ `).trim()}var le=["bytes","context","encoding/base64","encoding/json","errors","fmt","io","math/rand","mime/multipart","net/http","net/url","strconv","strings","time"];function ce(e,t,n,r,o,a){e.line(ie(I(t,r))),e.blank(),re(e,t),a&&(e.line("// \u2500\u2500\u2500 Embedded runtime (@redocly/client-generator go runtime) \u2500\u2500\u2500"),e.line(ie(G)),e.blank()),e.block("type operationMeta struct {",()=>{e.line("ID string"),e.line("Method string"),e.line("Path string"),e.line("Security [][]SecuritySpec"),e.line("Pagination *PaginationSpec")},"}"),e.blank(),e.block("var operations = map[string]operationMeta{",()=>{for(let{op:s,ident:l}of R(t)){let c=s.specName??s.name,i=oe(s,t),m=o.get(l),f=[`ID: ${u.string(c)}`,`Method: ${u.string(s.method.toUpperCase())}`,`Path: ${u.string(s.path)}`,...i!==void 0?[`Security: ${i}`]:[],...m!==void 0?[`Pagination: ${se(m)}`]:[]];e.line(`${u.string(c)}: {${f.join(", ")}},`)}},"}"),e.blank();for(let{op:s,ident:l}of R(t))s.queryParams.length!==0&&(e.block(`type ${l}Params struct {`,()=>{for(let c of s.queryParams){let i=p(c.schema,r);e.line(`${d(c.name)} ${i.startsWith("*")?i:`*${i}`}`)}},"}"),e.blank());e.doc("Client",`Client for ${t.title} (${t.version}).`),e.block("type Client struct {",()=>{e.line("config Config")},"}"),e.blank(),e.block("func New(config Config) *Client {",()=>{e.block('if config.ServerURL == "" {',()=>{e.line(`config.ServerURL = ${u.string(n.serverUrl??t.serverUrl??"")}`)},"}"),e.line("return &Client{config: config}")},"}"),e.blank();for(let{op:s,ident:l}of R(t)){E(e,s,l,r),N(s)===void 0&&(s.successResponseHeaders?.length??0)>0&&E(e,s,l,r,t,!0);let c=o.get(l);if(c===void 0)continue;let i=j(s),m=i===void 0?"any":p(i,r),f=ee(i,c.items,t);ae(e,s,l,r,m,f===void 0?"any":p(f,r))}}var an=({model:e,output:t,banner:n,emit:r,pagination:o})=>{let a=new P,s=r.dateType??"string",l=te(r.goPackage),c=new Map;for(let{op:h,ident:y}of R(e)){let b=o?.get(h.name)?.spec;b!==void 0&&c.set(y,b)}a.line(`// Code generated by @redocly/client-generator (go) from "${e.title}" ${e.version}. DO NOT EDIT.`),a.line("// Regenerate with `redocly generate-client`. Standard library only \u2014 zero dependencies."),a.line(`package ${l}`),a.blank();let i=r.runtime!=="module",m=i?le:(()=>{let h=new P;ce(h,e,r,s,c,!1);let y=h.toString();return le.filter(b=>new RegExp(`\\b${b.split("/").pop()}\\.`).test(y))})();a.block("import (",()=>{for(let h of m)a.line(u.string(h))},")"),a.blank(),ce(a,e,r,s,c,i);let f={path:t.path.replace(/\.[^.\\/]+$/,".go"),content:a.toString()};if(i)return[f];let $=n.map(h=>`// ${h}`).join(`
16
+ `),g=G.replace(/^package .*$/m,`package ${l}`);return[f,{path:f.path.replace(/[^\\/]+$/,"runtime.go"),content:`${$}
17
+ ${g.trimEnd()}
18
+ `}]};function pe(e,t){let n=t.emit.dateType??"string",r=t.emit.goPackage??"client",o=R(t.model).find(c=>c.op.name===e.name)?.ident??d(e.name),a=["ctx",...e.pathParams.map(c=>`"<${x(c.name,{style:"camel",reserved:v})}>"`),...e.requestBody?[`${p(e.requestBody.schema,n)}{ /* \u2026 */ }`]:[],...e.queryParams.length>0?["nil"]:[]],s=`client.${o}(${a.join(", ")})`,l=N(e)!==void 0?`stream := ${s}`:j(e)===void 0?`err := ${s}`:`result, err := ${s}`;return{lang:"go",label:"Go SDK",source:`client := ${r}.New(${r}.Config{})
19
+ ${l}
20
+ `}}var ln=({model:e,output:t,emit:n,pagination:r})=>[{path:t.path.replace(/\.[^.\\/]+$/,".go.md"),content:ne(e,{title:`${e.title} Go SDK reference`,frontmatter:n.docsFrontmatter===!0,language:{name:"go",label:"Go",fence:"go",requires:"The SDK needs the standard library only."},sample:o=>pe(o,{model:e,emit:n,outputPath:t.path}),paginated:new Set(r?.keys()??[])})}];export{p as a,I as b,an as c,pe as d,ln as e};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as ae,b as W,c as ce,d as pe}from"./BU4AMVHN.js";import{a as V}from"./LS3G7CUH.js";import{c as I,d as N,e as fe,h as G,j as _,k as ue,v as B,w as H}from"./LRMOPAZ4.js";import{a as ie}from"./64G5RPLP.js";import"./RLJVKAOL.js";import{L as oe,M as v,c as y,fa as S,k as O,la as C,qa as se}from"./WBWCX3LS.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{mkdir as At,writeFile as jt}from"node:fs/promises";import kt from"node:path";var Ve=/^[a-zA-Z][a-zA-Z0-9]*(?:[_\-.][a-zA-Z0-9]+)*$/,Be=/^[0-9a-f-]{8,}$/i,He=[["uuid",/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i],["date-time",/^\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:[Zz]|[+-]\d{2}:\d{2})$/],["date",/^\d{4}-\d{2}-\d{2}$/],["email",/^[^\s@]+@[^\s@]+\.[^\s@]+$/],["uri",/^https?:\/\/\S+$/],["ipv4",/^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|1?\d?\d)$/]],M=new WeakMap;function z(e){return{formats:He.filter(([,t])=>t.test(e)).map(([t])=>t),values:[e],count:1,overflow:!1}}function x(e,t){if(!e)return t;if(!t)return e;let n={formats:e.formats.filter(r=>t.formats.includes(r)),values:[],count:e.count+t.count,overflow:e.overflow||t.overflow};if(!n.overflow){let r=[...e.values];for(let s of t.values)r.includes(s)||r.push(s);r.length>10?n.overflow=!0:n.values=r}return n}function D(e,t){M.set(e,t)}function U(e){return M.get(e)}function F(e,t){let n=M.get(e);n&&M.set(t,n)}function ze(e){return e.length<=30&&!Be.test(e)&&Ve.test(e)}function X(e,t){return e.formats.length>0?{format:e.formats[0]}:t&&!e.overflow&&e.count>=4&&e.values.length>0&&e.values.length<=5&&e.values.length*2<=e.count&&e.values.every(ze)?{enum:[...e.values].sort()}:{}}function $(e){let t=M.get(e);if(t){let n=typeof e.type=="string"?[e.type]:e.type??[];n.includes("string")&&Object.assign(e,X(t,n.length===1))}for(let n of Object.values(e.properties??{}))$(n);e.additionalProperties&&$(e.additionalProperties),e.items&&$(e.items);for(let n of e.oneOf??[])$(n)}function me(e){for(let t of Object.values(e.paths))for(let n of Object.values(t)){for(let r of Object.values(n.requestBody?.content??{}))$(r.schema);for(let r of Object.values(n.responses))for(let s of Object.values(r.content??{}))$(s.schema)}for(let t of Object.values(e.components?.schemas??{}))$(t);return e}var be=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Y=/^\d+$/,De=/^[0-9a-hjkmnp-tv-z]{26}$/i,Ue=/^[a-z][a-z0-9]*_(?=[0-9a-z]*\d)[0-9a-z]{10,}$/i,Fe=/^[a-z](?=[a-z0-9]*\d)[a-z0-9]{23,24}$/,Q=new Set(ie),Le=new Set(["get","head"]),de="application/x-www-form-urlencoded",le="multipart/form-data";function Ye(e){return e?Y.test(e)||be.test(e)||De.test(e)||Ue.test(e)||Fe.test(e)?!0:/^[0-9a-f]{16,}$/i.test(e):!1}function ee(e){let t=e.split("/"),n=[],r=new Set;return{template:t.map((o,a)=>{if(!Ye(o))return o;let i=t[a-1],c=i?`${O(i,1)}Id`:"id",p=1;for(;r.has(c);)p+=1,c=i?`${O(i,1)}Id${p}`:`id${p}`;return r.add(c),n.push({name:c,value:o}),`{${c}}`}).join("/")||"/",params:n}}function T(e){if(e===null)return{type:"null"};if(Array.isArray(e)){if(e.length===0)return{type:"array"};let t=e.slice(0,20).map(T);return{type:"array",items:E(t)}}switch(typeof e){case"string":{let t={type:"string"};return D(t,z(e)),t}case"boolean":return{type:"boolean"};case"number":return Number.isInteger(e)?{type:"integer"}:{type:"number"};case"object":{let t=Object.entries(e);if(t.length>0&&(t.every(([a])=>Y.test(a))||t.every(([a])=>be.test(a))))return{type:"object",additionalProperties:E(t.map(([,a])=>T(a)))};let n={},r=[];for(let[o,a]of t)n[o]=T(a),r.push(o);let s={type:"object",properties:n};return r.length>0&&(s.required=r),s}default:return{}}}function E(e){if(e.length===0)return{};let[t,...n]=e,r=t;for(let s of n)r=L(r,s);return r}function he(e){return Object.keys(e).length===0}function A(e){return e.additionalProperties?"map":e.type==="object"?"object":e.type==="array"?"array":"scalar"}function Z(e){return e.oneOf?e.oneOf.flatMap(Z):Array.isArray(e.type)?e.type.map(t=>{if(t==="object"){let r={type:"object"};return e.properties&&(r.properties=e.properties),e.required&&(r.required=e.required),e.additionalProperties&&(r.additionalProperties=e.additionalProperties),r}if(t==="array")return e.items?{type:"array",items:e.items}:{type:"array"};let n={type:t};return t==="string"&&F(e,n),n}):[e]}var Ke=.5,We=3;function Oe(e,t){let n=Object.keys(e.properties??{}),r=Object.keys(t.properties??{});if(n.length===0||r.length===0)return 1;let s=new Set(r),o=n.filter(a=>s.has(a)).length;return o/(n.length+r.length-o)}function Xe(e,t){let n=A(e);if(n!==A(t))return!1;switch(n){case"scalar":return e.type===t.type||e.type==="integer"&&t.type==="number"||e.type==="number"&&t.type==="integer";case"object":return Oe(e,t)>=Ke;default:return!0}}function ve(e,t){switch(A(e)){case"scalar":{if(e.type!==t.type)return{type:"number"};if(e.type==="string"){let n=x(U(e),U(t));if(n){let r={type:"string"};return D(r,n),r}}return e}case"map":return{type:"object",additionalProperties:L(e.additionalProperties??{},t.additionalProperties??{})};case"object":{let n={...e.properties??{}};for(let[a,i]of Object.entries(t.properties??{}))n[a]=n[a]?L(n[a],i):i;let r=new Set(t.required??[]),s=(e.required??[]).filter(a=>r.has(a)),o={type:"object",properties:n};return s.length>0&&(o.required=s),o}case"array":{if(!e.items||!t.items){let n=e.items??t.items;return n?{type:"array",items:n}:{type:"array"}}return{type:"array",items:L(e.items,t.items)}}}}function Ze(e){let t=[...e],n=()=>t.filter(r=>A(r)==="object").length;for(;n()>We;){let r=-1,s=-1,o=-1;for(let a=0;a<t.length;a++)if(A(t[a])==="object")for(let i=a+1;i<t.length;i++){if(A(t[i])!=="object")continue;let c=Oe(t[a],t[i]);c>o&&(o=c,r=a,s=i)}t[r]=ve(t[r],t[s]),t.splice(s,1)}return t}var Qe=["boolean","integer","number","string","null"];function et(e){if(e.length===1)return e[0];let t=[],n=new Set,r;for(let i of e)A(i)==="scalar"&&typeof i.type=="string"?(n.add(i.type),i.type==="string"&&(r=x(r,U(i)))):t.push(i);let s=Qe.filter(i=>n.has(i)),o=i=>{let c={type:i};return(typeof i=="string"?i==="string":i.includes("string"))&&r&&D(c,r),c};if(t.length===0)return s.length===1?o(s[0]):o(s);if(t.length===1&&s.length===1&&s[0]==="null"&&typeof t[0].type=="string")return{...t[0],type:[t[0].type,"null"]};let a=[...t];return s.length===1?a.push(o(s[0])):s.length>1&&a.push(o(s)),{oneOf:a}}function L(e,t){if(he(e)||he(t))return{};let n=Z(e);for(let r of Z(t)){let s=n.findIndex(o=>Xe(o,r));s===-1?n.push(r):n[s]=ve(n[s],r)}return et(Ze(n))}function tt(e){if(!e)return;let t=e.trim();if(!(!t.startsWith("{")&&!t.startsWith("[")))try{return JSON.parse(t)}catch{return}}function nt(e,t){let n=t?.match(/boundary="?([^";,]+)"?/i)?.[1];if(!n)return;let r={};for(let s of e.split(`--${n}`)){let o=s.match(/^\r?\n([\s\S]*?)\r?\n\r?\n([\s\S]*)\r?\n$/);if(!o)continue;let[,a,i]=o,c=a.match(/\bname="([^"]*)"/i)?.[1];c!==void 0&&(r[c]=/\bfilename="/i.test(a)?{type:"string",format:"binary"}:T(i))}if(Object.keys(r).length!==0)return{type:"object",properties:r,required:Object.keys(r)}}function ge(e){let t=_(e.contentType);if(e.bodyJson!==void 0)return{mime:ue(t)?t:"application/json",schema:T(e.bodyJson)};if(t===de&&e.bodyText){let r={};for(let[s,o]of new URLSearchParams(e.bodyText))r[s]=o;return Object.keys(r).length===0?void 0:{mime:de,schema:T(r)}}if(t===le&&e.bodyText){let r=nt(e.bodyText,e.contentType);return r?{mime:le,schema:r}:void 0}let n=tt(e.bodyText);if(n!==void 0)return{mime:"application/json",schema:T(n)}}function ye(e,t,n){let r=e.get(t);e.set(t,r?E([r,n]):n)}async function we(e){let t=await N(e.trafficPath);if(t.length===0)throw new Error("No traffic files found in the provided traffic path.");let n=B(e.server),r=new Map,s=new Set,o=0,a=0,i=p=>{let f=p.request.method.toLowerCase();if(!Q.has(f))return;let u=p.request.path||"/";if(n){let d=H(p.request,n);if(d===void 0)return;u=d}if(f==="query"&&e.openapiVersion==="3.1"){a+=1;return}!n&&p.request.host&&!fe(p.request.host)&&s.add(`${p.request.protocol}//${p.request.host}`);let{template:m,params:k}=ee(G(u)),P=`${f} ${m}`,l=r.get(P);l||(l={method:f,template:m,pathParams:new Map,queryParams:new Map,requestBodies:new Map,responses:new Map},r.set(P,l));for(let{name:d,value:g}of k){let h=l.pathParams.get(d);l.pathParams.set(d,{numeric:(h?.numeric??!0)&&Y.test(g),observations:x(h?.observations,z(g))})}for(let d of new Set(p.request.query.keys())){let g=p.request.query.getAll(d),h=l.queryParams.get(d),q=g.length>0&&g.every(R=>Y.test(R)),b=h?.observations;for(let R of g)b=x(b,z(R));l.queryParams.set(d,{numeric:(h?.numeric??!0)&&q,observations:b})}if(!Le.has(f)){let d=ge(p.request);d&&ye(l.requestBodies,d.mime,d.schema)}if(p.response&&p.response.status>=100){let d=String(p.response.status),g=l.responses.get(d);g||(g={bodies:new Map},l.responses.set(d,g)),g.statusText??=p.response.statusText||void 0;let h=ge(p.response);h&&ye(g.bodies,h.mime,h.schema)}};for(let p of t){let f=await V(p,e.format);if(!f){S.warn(`Skipping traffic file with unrecognized format: ${p}
7
+ import{a as ae,b as W,c as ce,d as pe}from"./FGJDZKD2.js";import{a as V}from"./EBHQXW6Z.js";import{c as I,d as N,e as fe,h as G,j as _,k as ue,v as B,w as H}from"./GAKWND4S.js";import{a as ie}from"./64G5RPLP.js";import"./NLAPR7D4.js";import{L as oe,M as v,c as y,fa as S,k as O,la as C,qa as se}from"./DORXGE7Z.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{mkdir as At,writeFile as jt}from"node:fs/promises";import kt from"node:path";var Ve=/^[a-zA-Z][a-zA-Z0-9]*(?:[_\-.][a-zA-Z0-9]+)*$/,Be=/^[0-9a-f-]{8,}$/i,He=[["uuid",/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i],["date-time",/^\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:[Zz]|[+-]\d{2}:\d{2})$/],["date",/^\d{4}-\d{2}-\d{2}$/],["email",/^[^\s@]+@[^\s@]+\.[^\s@]+$/],["uri",/^https?:\/\/\S+$/],["ipv4",/^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|1?\d?\d)$/]],M=new WeakMap;function z(e){return{formats:He.filter(([,t])=>t.test(e)).map(([t])=>t),values:[e],count:1,overflow:!1}}function x(e,t){if(!e)return t;if(!t)return e;let n={formats:e.formats.filter(r=>t.formats.includes(r)),values:[],count:e.count+t.count,overflow:e.overflow||t.overflow};if(!n.overflow){let r=[...e.values];for(let s of t.values)r.includes(s)||r.push(s);r.length>10?n.overflow=!0:n.values=r}return n}function D(e,t){M.set(e,t)}function U(e){return M.get(e)}function F(e,t){let n=M.get(e);n&&M.set(t,n)}function ze(e){return e.length<=30&&!Be.test(e)&&Ve.test(e)}function X(e,t){return e.formats.length>0?{format:e.formats[0]}:t&&!e.overflow&&e.count>=4&&e.values.length>0&&e.values.length<=5&&e.values.length*2<=e.count&&e.values.every(ze)?{enum:[...e.values].sort()}:{}}function $(e){let t=M.get(e);if(t){let n=typeof e.type=="string"?[e.type]:e.type??[];n.includes("string")&&Object.assign(e,X(t,n.length===1))}for(let n of Object.values(e.properties??{}))$(n);e.additionalProperties&&$(e.additionalProperties),e.items&&$(e.items);for(let n of e.oneOf??[])$(n)}function me(e){for(let t of Object.values(e.paths))for(let n of Object.values(t)){for(let r of Object.values(n.requestBody?.content??{}))$(r.schema);for(let r of Object.values(n.responses))for(let s of Object.values(r.content??{}))$(s.schema)}for(let t of Object.values(e.components?.schemas??{}))$(t);return e}var be=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Y=/^\d+$/,De=/^[0-9a-hjkmnp-tv-z]{26}$/i,Ue=/^[a-z][a-z0-9]*_(?=[0-9a-z]*\d)[0-9a-z]{10,}$/i,Fe=/^[a-z](?=[a-z0-9]*\d)[a-z0-9]{23,24}$/,Q=new Set(ie),Le=new Set(["get","head"]),de="application/x-www-form-urlencoded",le="multipart/form-data";function Ye(e){return e?Y.test(e)||be.test(e)||De.test(e)||Ue.test(e)||Fe.test(e)?!0:/^[0-9a-f]{16,}$/i.test(e):!1}function ee(e){let t=e.split("/"),n=[],r=new Set;return{template:t.map((o,a)=>{if(!Ye(o))return o;let i=t[a-1],c=i?`${O(i,1)}Id`:"id",p=1;for(;r.has(c);)p+=1,c=i?`${O(i,1)}Id${p}`:`id${p}`;return r.add(c),n.push({name:c,value:o}),`{${c}}`}).join("/")||"/",params:n}}function T(e){if(e===null)return{type:"null"};if(Array.isArray(e)){if(e.length===0)return{type:"array"};let t=e.slice(0,20).map(T);return{type:"array",items:E(t)}}switch(typeof e){case"string":{let t={type:"string"};return D(t,z(e)),t}case"boolean":return{type:"boolean"};case"number":return Number.isInteger(e)?{type:"integer"}:{type:"number"};case"object":{let t=Object.entries(e);if(t.length>0&&(t.every(([a])=>Y.test(a))||t.every(([a])=>be.test(a))))return{type:"object",additionalProperties:E(t.map(([,a])=>T(a)))};let n={},r=[];for(let[o,a]of t)n[o]=T(a),r.push(o);let s={type:"object",properties:n};return r.length>0&&(s.required=r),s}default:return{}}}function E(e){if(e.length===0)return{};let[t,...n]=e,r=t;for(let s of n)r=L(r,s);return r}function he(e){return Object.keys(e).length===0}function A(e){return e.additionalProperties?"map":e.type==="object"?"object":e.type==="array"?"array":"scalar"}function Z(e){return e.oneOf?e.oneOf.flatMap(Z):Array.isArray(e.type)?e.type.map(t=>{if(t==="object"){let r={type:"object"};return e.properties&&(r.properties=e.properties),e.required&&(r.required=e.required),e.additionalProperties&&(r.additionalProperties=e.additionalProperties),r}if(t==="array")return e.items?{type:"array",items:e.items}:{type:"array"};let n={type:t};return t==="string"&&F(e,n),n}):[e]}var Ke=.5,We=3;function Oe(e,t){let n=Object.keys(e.properties??{}),r=Object.keys(t.properties??{});if(n.length===0||r.length===0)return 1;let s=new Set(r),o=n.filter(a=>s.has(a)).length;return o/(n.length+r.length-o)}function Xe(e,t){let n=A(e);if(n!==A(t))return!1;switch(n){case"scalar":return e.type===t.type||e.type==="integer"&&t.type==="number"||e.type==="number"&&t.type==="integer";case"object":return Oe(e,t)>=Ke;default:return!0}}function ve(e,t){switch(A(e)){case"scalar":{if(e.type!==t.type)return{type:"number"};if(e.type==="string"){let n=x(U(e),U(t));if(n){let r={type:"string"};return D(r,n),r}}return e}case"map":return{type:"object",additionalProperties:L(e.additionalProperties??{},t.additionalProperties??{})};case"object":{let n={...e.properties??{}};for(let[a,i]of Object.entries(t.properties??{}))n[a]=n[a]?L(n[a],i):i;let r=new Set(t.required??[]),s=(e.required??[]).filter(a=>r.has(a)),o={type:"object",properties:n};return s.length>0&&(o.required=s),o}case"array":{if(!e.items||!t.items){let n=e.items??t.items;return n?{type:"array",items:n}:{type:"array"}}return{type:"array",items:L(e.items,t.items)}}}}function Ze(e){let t=[...e],n=()=>t.filter(r=>A(r)==="object").length;for(;n()>We;){let r=-1,s=-1,o=-1;for(let a=0;a<t.length;a++)if(A(t[a])==="object")for(let i=a+1;i<t.length;i++){if(A(t[i])!=="object")continue;let c=Oe(t[a],t[i]);c>o&&(o=c,r=a,s=i)}t[r]=ve(t[r],t[s]),t.splice(s,1)}return t}var Qe=["boolean","integer","number","string","null"];function et(e){if(e.length===1)return e[0];let t=[],n=new Set,r;for(let i of e)A(i)==="scalar"&&typeof i.type=="string"?(n.add(i.type),i.type==="string"&&(r=x(r,U(i)))):t.push(i);let s=Qe.filter(i=>n.has(i)),o=i=>{let c={type:i};return(typeof i=="string"?i==="string":i.includes("string"))&&r&&D(c,r),c};if(t.length===0)return s.length===1?o(s[0]):o(s);if(t.length===1&&s.length===1&&s[0]==="null"&&typeof t[0].type=="string")return{...t[0],type:[t[0].type,"null"]};let a=[...t];return s.length===1?a.push(o(s[0])):s.length>1&&a.push(o(s)),{oneOf:a}}function L(e,t){if(he(e)||he(t))return{};let n=Z(e);for(let r of Z(t)){let s=n.findIndex(o=>Xe(o,r));s===-1?n.push(r):n[s]=ve(n[s],r)}return et(Ze(n))}function tt(e){if(!e)return;let t=e.trim();if(!(!t.startsWith("{")&&!t.startsWith("[")))try{return JSON.parse(t)}catch{return}}function nt(e,t){let n=t?.match(/boundary="?([^";,]+)"?/i)?.[1];if(!n)return;let r={};for(let s of e.split(`--${n}`)){let o=s.match(/^\r?\n([\s\S]*?)\r?\n\r?\n([\s\S]*)\r?\n$/);if(!o)continue;let[,a,i]=o,c=a.match(/\bname="([^"]*)"/i)?.[1];c!==void 0&&(r[c]=/\bfilename="/i.test(a)?{type:"string",format:"binary"}:T(i))}if(Object.keys(r).length!==0)return{type:"object",properties:r,required:Object.keys(r)}}function ge(e){let t=_(e.contentType);if(e.bodyJson!==void 0)return{mime:ue(t)?t:"application/json",schema:T(e.bodyJson)};if(t===de&&e.bodyText){let r={};for(let[s,o]of new URLSearchParams(e.bodyText))r[s]=o;return Object.keys(r).length===0?void 0:{mime:de,schema:T(r)}}if(t===le&&e.bodyText){let r=nt(e.bodyText,e.contentType);return r?{mime:le,schema:r}:void 0}let n=tt(e.bodyText);if(n!==void 0)return{mime:"application/json",schema:T(n)}}function ye(e,t,n){let r=e.get(t);e.set(t,r?E([r,n]):n)}async function we(e){let t=await N(e.trafficPath);if(t.length===0)throw new Error("No traffic files found in the provided traffic path.");let n=B(e.server),r=new Map,s=new Set,o=0,a=0,i=p=>{let f=p.request.method.toLowerCase();if(!Q.has(f))return;let u=p.request.path||"/";if(n){let d=H(p.request,n);if(d===void 0)return;u=d}if(f==="query"&&e.openapiVersion==="3.1"){a+=1;return}!n&&p.request.host&&!fe(p.request.host)&&s.add(`${p.request.protocol}//${p.request.host}`);let{template:m,params:k}=ee(G(u)),P=`${f} ${m}`,l=r.get(P);l||(l={method:f,template:m,pathParams:new Map,queryParams:new Map,requestBodies:new Map,responses:new Map},r.set(P,l));for(let{name:d,value:g}of k){let h=l.pathParams.get(d);l.pathParams.set(d,{numeric:(h?.numeric??!0)&&Y.test(g),observations:x(h?.observations,z(g))})}for(let d of new Set(p.request.query.keys())){let g=p.request.query.getAll(d),h=l.queryParams.get(d),q=g.length>0&&g.every(R=>Y.test(R)),b=h?.observations;for(let R of g)b=x(b,z(R));l.queryParams.set(d,{numeric:(h?.numeric??!0)&&q,observations:b})}if(!Le.has(f)){let d=ge(p.request);d&&ye(l.requestBodies,d.mime,d.schema)}if(p.response&&p.response.status>=100){let d=String(p.response.status),g=l.responses.get(d);g||(g={bodies:new Map},l.responses.set(d,g)),g.statusText??=p.response.statusText||void 0;let h=ge(p.response);h&&ye(g.bodies,h.mime,h.schema)}};for(let p of t){let f=await V(p,e.format);if(!f){S.warn(`Skipping traffic file with unrecognized format: ${p}
8
8
  `);continue}o+=1;for await(let u of f.parse(p))i(u)}if(o===0)throw new Error("No supported traffic files found to generate an OpenAPI description from.");if(r.size===0&&a>0)throw new C("All observed HTTP exchanges use the QUERY method, which OpenAPI 3.1 does not support. Use --openapi-version 3.2 to include them.");if(r.size===0)throw new Error(n?`No HTTP exchanges in the traffic matched the server "${n}".`:"No HTTP exchanges were observed in the traffic. Cannot generate an OpenAPI description.");let c=n?[n]:Array.from(s).sort();return rt(r,e.openapiVersion,e.title??"Generated API",c)}function Pe(e){return Object.values(e.paths).reduce((t,n)=>t+Object.keys(n).length,0)}function Se(e,t){if(e.numeric)return{type:"integer"};let n={type:"string"};return e.observations&&Object.assign(n,X(e.observations,t)),n}function rt(e,t,n,r){let s={};for(let o of e.values()){let a=s[o.template]??={},i=[...Array.from(o.pathParams).map(([p,f])=>({name:p,in:"path",required:!0,schema:Se(f,!1)})),...Array.from(o.queryParams).map(([p,f])=>({name:p,in:"query",required:!1,schema:Se(f,!0)}))],c={operationId:ot(o.method,o.template),responses:{}};if(i.length>0&&(c.parameters=i),o.requestBodies.size>0){let p={};for(let[f,u]of o.requestBodies)p[f]={schema:u};c.requestBody={content:p}}if(o.responses.size===0)c.responses.default={description:"Observed response"};else for(let[p,f]of o.responses){let u={description:f.statusText||"Observed response"};if(f.bodies.size>0){let m={};for(let[k,P]of f.bodies)m[k]={schema:P};u.content=m}c.responses[p]=u}a[o.method]=c}return{openapi:`${t}.0`,info:{title:n,version:"1.0.0"},...r.length>0?{servers:r.map(o=>({url:o}))}:{},paths:s}}function ot(e,t){let n=t.split("/").filter(Boolean).map(r=>r.replace(/[{}]/g,"")).join("-");return`${e}-${n||"root"}`}function K(e,t){return`${e.toUpperCase()} ${t}`}function $e(e,t){let n;if(e.bodyJson!==void 0)try{n=JSON.stringify(e.bodyJson)}catch{n=void 0}if(n??=e.bodyText,!n)return;let r=n.trim();if(r)return r.length>t?`${r.slice(0,t)}\u2026[truncated]`:r}function Te(e){if(!e)return"";let t=e.bodyJson;return t===void 0?e.bodyText?_(e.contentType)||"text":"":t===null?"null":Array.isArray(t)?`array<${t.length>0?Ae(t[0]):""}>`:Ae(t)}function Ae(e){return y(e)?Object.keys(e).sort().join(","):e===null?"null":typeof e}async function je(e){let t=e.perGroup??2,n=e.perOperation??4,r=e.maxBodyChars??2e3,s=B(e.server),o=await N(e.trafficPath),a=new Map;for(let c of o){let p=await V(c,e.format);if(p)for await(let f of p.parse(c)){let u=f.request.method.toUpperCase();if(!Q.has(u.toLowerCase()))continue;let m=f.request.path||"/";if(s){let R=H(f.request,s);if(R===void 0)continue;m=R}let k=G(m),{template:P}=ee(k),l=f.response&&f.response.status>=100?f.response:void 0,d=l?.status,g=`${Te(f.request)}\u2192${Te(l)}`,h=a.get(K(u,P));h||(h=new Map,a.set(K(u,P),h));let q=`${d??""} ${g}`,b=h.get(q);b||(b=[],h.set(q,b)),!(b.length>=t)&&b.push({method:u,path:k,query:f.request.query.toString(),status:d,requestContentType:f.request.contentType,requestBody:$e(f.request,r),responseContentType:l?.contentType,responseBody:l?$e(l,r):void 0})}}let i=new Map;for(let[c,p]of a){let f=[];for(let u=0;u<t&&f.length<n;u++)for(let m of p.values()){if(f.length>=n)break;m[u]&&f.push(m[u])}i.set(c,f)}return i}var st=e=>`You are an expert API designer. You are given one operation from an OpenAPI ${e} description that was inferred mechanically from recorded HTTP traffic, the component schemas it references, and a sample of the real recorded HTTP exchanges for that operation. The inferred description is only a hypothesis: types are coarse, every observed property is marked required, and descriptions are missing. Alternative body shapes observed in the traffic appear as "oneOf" variants or type unions. Common string formats (uuid, date-time, date, email, uri, ipv4) and small closed enums are detected conservatively from the observed values.
9
9
 
10
10
  Refine the operation into the most accurate OpenAPI ${e} definition you can justify from the evidence, while staying conservative:
@@ -4,6 +4,6 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{b as m,j as C,o as a,p,q as T,r as l,s as h,t as f,u as d}from"./LRMOPAZ4.js";import{c as g}from"./WBWCX3LS.js";import A from"node:path";function L(e,n){if(C(e)!=="application/x-www-form-urlencoded"||!Array.isArray(n))return;let o=new URLSearchParams;for(let s of n){if(!g(s))continue;let t=a(s.name);t!==void 0&&o.append(t,a(s.value)??"")}return o.size>0?o.toString():void 0}function K(e,n,o){let s=e?.request,t=e?.response;if(!s)return null;let r=s?.postData,i=a(r?.mimeType),u=r?.text??L(i,r?.params),c=a(r?.encoding),y=t?.content?.text,S=a(t?.content?.encoding),q=p(t?.status);return l({method:a(s?.method),url:a(s?.url),requestHeaders:s?.headers,requestBody:T(u,c),requestContentType:i,responseStatus:q===0?void 0:q,responseStatusText:a(t?.statusText),responseHeaders:t?.headers,responseBody:T(y,S),responseContentType:a(t?.content?.mimeType),startedAt:a(e?.startedDateTime),raw:e},n,o)}var b=class{id="har";canParse(n,o){if(A.extname(n).toLowerCase()===".har")return!0;let t=o.toLowerCase();return t.includes('"log"')&&t.includes('"entries"')}async*parse(n){let o=0;for await(let s of f(n,"log.entries")){let t=K(s,o,n);t&&(yield t),o+=1}}};import $ from"node:path";function H(e){let n=a(e.url??e.uri);if(n)return{url:n};let o=a(e.host??e.headers?.host),s=a(e.path??e.request_uri),t=a(e.scheme??e.forwarded_proto);return o&&s?{url:`${t??"http"}://${o}${s}`,schemeKnown:!!t}:{url:s,schemeKnown:!!t}}function z(e,n,o){let s=e?.request??e?.req??e?.http?.request;if(!s)return null;let t=e?.response??e?.res??e?.http?.response,r=t?.body??t?.raw_body??t?.payload??t?.data,i=s?.body??s?.raw_body??s?.payload??s?.data,{url:u,schemeKnown:c}=H(s);return l({method:a(s?.method??s?.http_method),url:u,schemeKnown:c,requestHeaders:s?.headers,requestBody:i,requestContentType:d(s?.headers),responseStatus:p(t?.status??t?.statusCode),responseHeaders:t?.headers,responseBody:r,responseContentType:d(t?.headers),startedAt:a(e?.started_at??e?.startedAt??e?.timestamp),raw:e},n,o)}var x=class{id="kong";canParse(n,o){if($.extname(n).toLowerCase()===".kong")return!0;let t=o.toLowerCase();return t.includes('"latencies"')||t.includes('"request"')&&t.includes('"response"')&&t.includes('"route"')}async*parse(n){let o=(await m(n,16)).trim().slice(0,1),s=0;if(o==="["){for await(let t of f(n)){let r=z(t,s,n);r&&(yield r),s+=1}return}for await(let t of h(n)){let r=z(t,s,n);r&&(yield r),s+=1}}};import R from"node:path";function U(e){return e?.request??e?.req??e?.httpRequest??e?.http?.request??e}function I(e){return e?.response??e?.res??e?.httpResponse??e?.http?.response}function O(e,n){let o=a(n?.url??n?.uri??n?.requestUrl??e?.url);if(o)return{url:o};let s=a(n?.host??n?.headers?.host??e?.host),t=a(n?.path??e?.path??n?.pathname),r=a(n?.scheme??e?.scheme);return s&&t?{url:`${r??"http"}://${s}${t}`,schemeKnown:!!r}:{url:t,schemeKnown:!!r}}function k(e,n,o){let s=U(e),t=I(e),r=s?.body??s?.bodyText??s?.payload??s?.data??s?.rawBody,i=t?.body??t?.bodyText??t?.payload??t?.data??t?.rawBody,{url:u,schemeKnown:c}=O(e,s);return l({method:a(s?.method??s?.httpMethod??e?.method??e?.httpMethod),url:u,schemeKnown:c,requestHeaders:s?.headers,requestBody:r,requestContentType:d(s?.headers),responseStatus:p(t?.status??t?.statusCode??e?.status??e?.statusCode),responseHeaders:t?.headers,responseBody:i,responseContentType:d(t?.headers),startedAt:a(e?.startedAt??e?.timestamp??e?.time),raw:e},n,o)}var w=class{id="ndjson";canParse(n,o){let s=R.extname(n).toLowerCase();if(s===".ndjson"||s===".jsonl"||s===".jsonlines")return!0;let t=o.lastIndexOf(`
7
+ import{b as m,j as C,o as a,p,q as T,r as l,s as h,t as f,u as d}from"./GAKWND4S.js";import{c as g}from"./DORXGE7Z.js";import A from"node:path";function L(e,n){if(C(e)!=="application/x-www-form-urlencoded"||!Array.isArray(n))return;let o=new URLSearchParams;for(let s of n){if(!g(s))continue;let t=a(s.name);t!==void 0&&o.append(t,a(s.value)??"")}return o.size>0?o.toString():void 0}function K(e,n,o){let s=e?.request,t=e?.response;if(!s)return null;let r=s?.postData,i=a(r?.mimeType),u=r?.text??L(i,r?.params),c=a(r?.encoding),y=t?.content?.text,S=a(t?.content?.encoding),q=p(t?.status);return l({method:a(s?.method),url:a(s?.url),requestHeaders:s?.headers,requestBody:T(u,c),requestContentType:i,responseStatus:q===0?void 0:q,responseStatusText:a(t?.statusText),responseHeaders:t?.headers,responseBody:T(y,S),responseContentType:a(t?.content?.mimeType),startedAt:a(e?.startedDateTime),raw:e},n,o)}var b=class{id="har";canParse(n,o){if(A.extname(n).toLowerCase()===".har")return!0;let t=o.toLowerCase();return t.includes('"log"')&&t.includes('"entries"')}async*parse(n){let o=0;for await(let s of f(n,"log.entries")){let t=K(s,o,n);t&&(yield t),o+=1}}};import $ from"node:path";function H(e){let n=a(e.url??e.uri);if(n)return{url:n};let o=a(e.host??e.headers?.host),s=a(e.path??e.request_uri),t=a(e.scheme??e.forwarded_proto);return o&&s?{url:`${t??"http"}://${o}${s}`,schemeKnown:!!t}:{url:s,schemeKnown:!!t}}function z(e,n,o){let s=e?.request??e?.req??e?.http?.request;if(!s)return null;let t=e?.response??e?.res??e?.http?.response,r=t?.body??t?.raw_body??t?.payload??t?.data,i=s?.body??s?.raw_body??s?.payload??s?.data,{url:u,schemeKnown:c}=H(s);return l({method:a(s?.method??s?.http_method),url:u,schemeKnown:c,requestHeaders:s?.headers,requestBody:i,requestContentType:d(s?.headers),responseStatus:p(t?.status??t?.statusCode),responseHeaders:t?.headers,responseBody:r,responseContentType:d(t?.headers),startedAt:a(e?.started_at??e?.startedAt??e?.timestamp),raw:e},n,o)}var x=class{id="kong";canParse(n,o){if($.extname(n).toLowerCase()===".kong")return!0;let t=o.toLowerCase();return t.includes('"latencies"')||t.includes('"request"')&&t.includes('"response"')&&t.includes('"route"')}async*parse(n){let o=(await m(n,16)).trim().slice(0,1),s=0;if(o==="["){for await(let t of f(n)){let r=z(t,s,n);r&&(yield r),s+=1}return}for await(let t of h(n)){let r=z(t,s,n);r&&(yield r),s+=1}}};import R from"node:path";function U(e){return e?.request??e?.req??e?.httpRequest??e?.http?.request??e}function I(e){return e?.response??e?.res??e?.httpResponse??e?.http?.response}function O(e,n){let o=a(n?.url??n?.uri??n?.requestUrl??e?.url);if(o)return{url:o};let s=a(n?.host??n?.headers?.host??e?.host),t=a(n?.path??e?.path??n?.pathname),r=a(n?.scheme??e?.scheme);return s&&t?{url:`${r??"http"}://${s}${t}`,schemeKnown:!!r}:{url:t,schemeKnown:!!r}}function k(e,n,o){let s=U(e),t=I(e),r=s?.body??s?.bodyText??s?.payload??s?.data??s?.rawBody,i=t?.body??t?.bodyText??t?.payload??t?.data??t?.rawBody,{url:u,schemeKnown:c}=O(e,s);return l({method:a(s?.method??s?.httpMethod??e?.method??e?.httpMethod),url:u,schemeKnown:c,requestHeaders:s?.headers,requestBody:r,requestContentType:d(s?.headers),responseStatus:p(t?.status??t?.statusCode??e?.status??e?.statusCode),responseHeaders:t?.headers,responseBody:i,responseContentType:d(t?.headers),startedAt:a(e?.startedAt??e?.timestamp??e?.time),raw:e},n,o)}var w=class{id="ndjson";canParse(n,o){let s=R.extname(n).toLowerCase();if(s===".ndjson"||s===".jsonl"||s===".jsonlines")return!0;let t=o.lastIndexOf(`
8
8
  `),i=(t===-1?o:o.slice(0,t)).split(`
9
9
  `).map(u=>u.trim()).find(Boolean);if(!i?.startsWith("{")||!i.endsWith("}"))return!1;try{return JSON.parse(i),!0}catch{return!1}}async*parse(n){let o=0;for await(let s of h(n)){let t=k(s,o,n);t&&(yield t),o+=1}}};import J from"node:path";function P(e){if(!e)return{};let n=e.trim().split(/\s+/);return n.length<2?{}:{method:n[0],path:n[1],protocol:n[2]}}function W(e,n){let o=a(n?.url??n?.request_uri??n?.uri??e?.url??e?.request_url??e?.absolute_uri),s=P(a(e?.request??n?.request_line)),t=a(n?.request_uri??n?.uri??n?.path??e?.request_uri??e?.uri)??s.path;if(o?.startsWith("http://")||o?.startsWith("https://"))return{url:o};let r=a(n?.host??n?.headers?.host??e?.host??e?.http_host??e?.server_name??e?.vhost),i=a(e?.scheme??n?.scheme??e?.request_scheme),u=!!i;if(r&&(o||t)){let c=i??"http",y=o??t;return y?.startsWith("/")?{url:`${c}://${r}${y}`,schemeKnown:u}:{url:`${c}://${r}/${y}`,schemeKnown:u}}return{url:o??t,schemeKnown:u}}function E(e,n,o){let s=g(e?.request)?e.request:e,t=g(e?.response)?e.response:void 0,r=P(a(e?.request)),i=a(s?.method??s?.request_method??e?.request_method??e?.method)??r.method,{url:u,schemeKnown:c}=W(e,s);return l({method:i,url:u,schemeKnown:c,requestHeaders:s?.headers??s?.request_headers??e?.request_headers??e?.headers,requestBody:s?.body??s?.request_body??e?.request_body??e?.body,requestContentType:d(s?.headers??s?.request_headers??e?.request_headers),responseStatus:p(t?.status??t?.status_code??e?.status??e?.status_code??e?.response_status),responseHeaders:t?.headers??t?.response_headers??e?.response_headers??e?.headers_out,responseBody:t?.body??t?.response_body??e?.response_body,responseContentType:d(t?.headers??t?.response_headers??e?.response_headers),startedAt:a(e?.time_iso8601??e?.timestamp??e?.time??e?.time_local??e?.["@timestamp"]),raw:e},n,o)}async function*j(e){if((await m(e,16)).trim().slice(0,1)==="["){yield*f(e);return}for await(let o of h(e))yield o}var N=class{id="nginx-json";canParse(n,o){let s=J.extname(n).toLowerCase(),t=n.toLowerCase();if(s===".ndjson"&&t.includes("nginx"))return!0;let r=o.toLowerCase();return r.includes('"request_uri"')||r.includes('"time_iso8601"')||r.includes('"upstream_response_time"')||r.includes('"remote_addr"')}async*parse(n){let o=0;for await(let s of j(n)){let t=E(s,o,n);t&&(yield t),o+=1}}},_=class{id="apache-json";canParse(n,o){let s=J.extname(n).toLowerCase(),t=n.toLowerCase();if(s===".ndjson"&&t.includes("apache"))return!0;let r=o.toLowerCase();return r.includes('"request_method"')||r.includes('"request_uri"')||r.includes('"vhost"')||r.includes('"response_status"')}async*parse(n){let o=0;for await(let s of j(n)){let t=E(s,o,n);t&&(yield t),o+=1}}};var B=[new b,new x,new N,new _,new w];async function le(e,n){if(n!=="auto"){let s=B.find(t=>t.id===n);if(!s)throw new Error(`Unsupported parser format: ${n}`);return s}let o=await m(e);return B.find(s=>s.canParse(e,o))}export{le as a};
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a}from"./K6VR5YNF.js";import"./EFB2YVY2.js";import"./JCP37EY3.js";import"./WZXA5XPB.js";import"./WBWCX3LS.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as mockGenerator};
7
+ import{a}from"./ACECCMWJ.js";import"./DP3T6VZX.js";import"./UMN7TKTH.js";import"./ACAPGKSR.js";import"./WZXA5XPB.js";import"./DORXGE7Z.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{a as transformersGenerator};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{c as s}from"./HBUZKWXC.js";import{a as n,b as p}from"./LRRSU5UY.js";import{fa as e}from"./WBWCX3LS.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{spawn as g}from"node:child_process";import{existsSync as l,readFileSync as w}from"node:fs";import P from"node:path";var S=async({argv:r})=>{let{plan:o,port:i}=r,c=r["project-dir"];r.product&&e.warn(`The --product option is deprecated. It still picks the product package; without it, the preview uses the package listed in package.json, or ${n.framework} by default.
7
+ import{c as s}from"./HBUZKWXC.js";import{a as n,b as p}from"./LRRSU5UY.js";import{fa as e}from"./DORXGE7Z.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{spawn as g}from"node:child_process";import{existsSync as l,readFileSync as w}from"node:fs";import P from"node:path";var S=async({argv:r})=>{let{plan:o,port:i}=r,c=r["project-dir"];r.product&&e.warn(`The --product option is deprecated. It still picks the product package; without it, the preview uses the package listed in package.json, or ${n.framework} by default.
8
8
  `);let t=r.product||j(c);if(!h(t))throw e.info(`Invalid product ${t}.`),new Error("Project preview launch failed.");let a=p[t],d=n[t];e.info(`
9
9
  Launching preview of ${a} ${o} using NPX.
10
10
 
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ var __filename = __fileURLToPath(import.meta.url);
6
+ var __dirname = __pathDirname(__filename);
7
+ import{a as p,b as q,c as r,d as s,e as t,f as u,g as v,h as w,i as x,j as y,k as z,l as A,m as D,n as E,o as F,p as H,q as I}from"./UMN7TKTH.js";import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,n as o,o as B,s as C,u as G}from"./ACAPGKSR.js";import{a}from"./WZXA5XPB.js";import"./DORXGE7Z.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{z as AUTHORING_HELPER_NAMES,G as GENERATOR_VERSION,a as NotSupportedError,b as Printer,d as RESERVED_WORDS,C as WIRING_NAMES,B as allOperations,c as casing,E as constantCase,A as defineClientSetup,H as defineGenerator,g as deref,i as discriminatorCases,m as docText,l as enumValues,h as flattenAllOf,I as generateClient,D as groupSlug,o as headerCoerceType,e as identifierFor,u as isBinaryContentType,s as isMultipartBody,j as isNullable,t as isUntypedMultipartBody,q as jsonSuccessSchema,F as mergeConfig,x as paginationItemSchema,p as paginationRuleFor,y as renderReferencePage,n as resolveSchemaPointer,n as schemaAtPointer,w as securityRequirements,v as serverUrlParts,r as sseResponse,f as uniqueIdentifiers,k as unwrapNullable};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as P,b as y,c as $}from"./RLJVKAOL.js";import{fa as h,wa as x}from"./WBWCX3LS.js";function N(t){let e=t.trim(),n=e.match(/^```(?:ya?ml|json)?\s*\n([\s\S]*?)\n```$/);return n?n[1]:e}async function O(t,e){let r=(await x({source:t,config:e})).filter(o=>o.severity==="error");if(r.length>0){let o=r.slice(0,5).map(s=>`${s.ruleId}: ${s.message}`).join("; ");throw new Error(`the result has ${r.length} validation problem(s): ${o}`)}}import{spawn as T}from"node:child_process";import{mkdtemp as v}from"node:fs/promises";import{tmpdir as R}from"node:os";import S from"node:path";var I=3e5,a=class extends Error{},C;function L(){return C??=v(S.join(R(),"redocly-ai-")),C}async function w(t,e,n,r){let o=await L();return new Promise((s,u)=>{let i=T(t,e,{stdio:["pipe","pipe","pipe"],cwd:o,env:{...process.env,...r}}),l="",f="",g=!1,d=setTimeout(()=>{g=!0,i.kill("SIGKILL")},I);i.stdout.on("data",c=>{l+=c.toString()}),i.stderr.on("data",c=>{f+=c.toString()}),i.on("error",c=>{if(clearTimeout(d),c.code==="ENOENT"){u(new a(`Could not find the "${t}" CLI on PATH. Is it installed?`));return}u(c)}),i.on("close",c=>{if(clearTimeout(d),g){u(new Error(`The "${t}" CLI did not respond within ${I/1e3} seconds.`));return}s({stdout:l,stderr:f,code:c})}),i.stdin.on("error",()=>{}),i.stdin.end(n)})}async function A(t){let e=["-p","--output-format","text","--tools","","--strict-mcp-config","--setting-sources","","--no-session-persistence","--append-system-prompt",t.system];t.model&&e.push("--model",t.model);let{stdout:n,stderr:r,code:o}=await w("claude",e,t.user,{CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC:"1"});if(o!==0)throw new Error(`claude CLI exited with code ${o}: ${r.trim()||n.trim()}`);if(!n.trim())throw new Error("claude CLI returned no output.");return{text:n}}async function b(t){let e=["exec","--skip-git-repo-check","--sandbox","read-only","-c","mcp_servers={}","-c","project_doc_max_bytes=0"];t.model&&e.push("--model",t.model),e.push("-");let n=`${t.system}
7
+ import{a as P,b as y,c as $}from"./NLAPR7D4.js";import{fa as h,wa as x}from"./DORXGE7Z.js";function N(t){let e=t.trim(),n=e.match(/^```(?:ya?ml|json)?\s*\n([\s\S]*?)\n```$/);return n?n[1]:e}async function O(t,e){let r=(await x({source:t,config:e})).filter(o=>o.severity==="error");if(r.length>0){let o=r.slice(0,5).map(s=>`${s.ruleId}: ${s.message}`).join("; ");throw new Error(`the result has ${r.length} validation problem(s): ${o}`)}}import{spawn as T}from"node:child_process";import{mkdtemp as v}from"node:fs/promises";import{tmpdir as R}from"node:os";import S from"node:path";var I=3e5,a=class extends Error{},C;function L(){return C??=v(S.join(R(),"redocly-ai-")),C}async function w(t,e,n,r){let o=await L();return new Promise((s,u)=>{let i=T(t,e,{stdio:["pipe","pipe","pipe"],cwd:o,env:{...process.env,...r}}),l="",f="",g=!1,d=setTimeout(()=>{g=!0,i.kill("SIGKILL")},I);i.stdout.on("data",c=>{l+=c.toString()}),i.stderr.on("data",c=>{f+=c.toString()}),i.on("error",c=>{if(clearTimeout(d),c.code==="ENOENT"){u(new a(`Could not find the "${t}" CLI on PATH. Is it installed?`));return}u(c)}),i.on("close",c=>{if(clearTimeout(d),g){u(new Error(`The "${t}" CLI did not respond within ${I/1e3} seconds.`));return}s({stdout:l,stderr:f,code:c})}),i.stdin.on("error",()=>{}),i.stdin.end(n)})}async function A(t){let e=["-p","--output-format","text","--tools","","--strict-mcp-config","--setting-sources","","--no-session-persistence","--append-system-prompt",t.system];t.model&&e.push("--model",t.model);let{stdout:n,stderr:r,code:o}=await w("claude",e,t.user,{CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC:"1"});if(o!==0)throw new Error(`claude CLI exited with code ${o}: ${r.trim()||n.trim()}`);if(!n.trim())throw new Error("claude CLI returned no output.");return{text:n}}async function b(t){let e=["exec","--skip-git-repo-check","--sandbox","read-only","-c","mcp_servers={}","-c","project_doc_max_bytes=0"];t.model&&e.push("--model",t.model),e.push("-");let n=`${t.system}
8
8
 
9
9
  ${t.user}`,{stdout:r,stderr:o,code:s}=await w("codex",e,n);if(s!==0)throw new Error(`codex CLI exited with code ${s}: ${o.trim()||r.trim()}`);if(!r.trim())throw new Error("codex CLI returned no output.");return{text:r}}async function _(t){let e=["-p","--output-format","text","--trust"];t.model&&e.push("--model",t.model);let n=`${t.system}
10
10
 
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ var __filename = __fileURLToPath(import.meta.url);
6
+ var __dirname = __pathDirname(__filename);
7
+ import{a}from"./7HFLPQAB.js";import"./L2O63VRM.js";import"./IYV7EO2J.js";import"./DP3T6VZX.js";import"./UMN7TKTH.js";import"./ACAPGKSR.js";import"./WZXA5XPB.js";import"./DORXGE7Z.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{a as tanstackQueryGenerator};
@@ -4,5 +4,5 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{c}from"./WBWCX3LS.js";import{open as U,readdir as H,stat as J}from"node:fs/promises";import x from"node:path";var L=new Set([".yaml",".yml",".json"]);async function K(e){let n=[];async function t(r){let o=await H(r,{withFileTypes:!0});for(let s of o){if(s.name.startsWith("."))continue;let i=x.join(r,s.name);if(s.isDirectory()){await t(i);continue}s.isFile()&&L.has(x.extname(s.name).toLowerCase())&&n.push(i)}}return await t(e),n.sort(),n}async function G(e,n=4096){let t=await U(e,"r");try{let r=Buffer.allocUnsafe(n),{bytesRead:o}=await t.read(r,0,n,0);return r.toString("utf8",0,o)}finally{await t.close()}}function X(e){return x.resolve(process.cwd(),e)}async function Y(e){let n=await J(e);if(n.isFile())return[e];if(!n.isDirectory())return[];let t=[];async function r(o){let s=await H(o,{withFileTypes:!0});for(let i of s){if(i.name.startsWith("."))continue;let a=x.join(o,i.name);if(i.isDirectory()){await r(a);continue}i.isFile()&&t.push(a)}}return await r(e),t.sort(),t}var z="drift.local",B=`http://${z}`;function l(e){return e===z}var I=new Set(["accept","accept-charset","accept-encoding","accept-language","authorization","baggage","cache-control","cdn-loop","cookie","connection","content-length","content-type","dpr","dnt","downlink","ect","forwarded","host","if-match","if-modified-since","if-none-match","if-range","if-unmodified-since","origin","pragma","priority","range","referer","sec-fetch-dest","sec-fetch-mode","sec-fetch-site","sec-fetch-user","sec-gpc","sentry-trace","te","traceparent","tracestate","upgrade","upgrade-insecure-requests","user-agent","via","x-client-trace-id","x-cloud-trace-context","x-correlation-id","x-http-method-override","x-hub-signature","x-hub-signature-256","x-method-override","x-real-ip","x-request-id","x-forwarded-for","x-forwarded-host","x-forwarded-port","x-forwarded-proto"]),q=["cf-","sec-ch-","sec-fetch-","x-amz-","x-amzn-","x-b3-","x-envoy-","x-forwarded-","x-github-"],T=`
7
+ import{c}from"./DORXGE7Z.js";import{open as U,readdir as H,stat as J}from"node:fs/promises";import x from"node:path";var L=new Set([".yaml",".yml",".json"]);async function K(e){let n=[];async function t(r){let o=await H(r,{withFileTypes:!0});for(let s of o){if(s.name.startsWith("."))continue;let i=x.join(r,s.name);if(s.isDirectory()){await t(i);continue}s.isFile()&&L.has(x.extname(s.name).toLowerCase())&&n.push(i)}}return await t(e),n.sort(),n}async function G(e,n=4096){let t=await U(e,"r");try{let r=Buffer.allocUnsafe(n),{bytesRead:o}=await t.read(r,0,n,0);return r.toString("utf8",0,o)}finally{await t.close()}}function X(e){return x.resolve(process.cwd(),e)}async function Y(e){let n=await J(e);if(n.isFile())return[e];if(!n.isDirectory())return[];let t=[];async function r(o){let s=await H(o,{withFileTypes:!0});for(let i of s){if(i.name.startsWith("."))continue;let a=x.join(o,i.name);if(i.isDirectory()){await r(a);continue}i.isFile()&&t.push(a)}}return await r(e),t.sort(),t}var z="drift.local",B=`http://${z}`;function l(e){return e===z}var I=new Set(["accept","accept-charset","accept-encoding","accept-language","authorization","baggage","cache-control","cdn-loop","cookie","connection","content-length","content-type","dpr","dnt","downlink","ect","forwarded","host","if-match","if-modified-since","if-none-match","if-range","if-unmodified-since","origin","pragma","priority","range","referer","sec-fetch-dest","sec-fetch-mode","sec-fetch-site","sec-fetch-user","sec-gpc","sentry-trace","te","traceparent","tracestate","upgrade","upgrade-insecure-requests","user-agent","via","x-client-trace-id","x-cloud-trace-context","x-correlation-id","x-http-method-override","x-hub-signature","x-hub-signature-256","x-method-override","x-real-ip","x-request-id","x-forwarded-for","x-forwarded-host","x-forwarded-port","x-forwarded-proto"]),q=["cf-","sec-ch-","sec-fetch-","x-amz-","x-amzn-","x-b3-","x-envoy-","x-forwarded-","x-github-"],T=`
8
8
  `;function Z(e){return e.split(T)}function S(e,n,t){let r=n.toLowerCase(),o=e[r];if(o===void 0){e[r]=t;return}e[r]=r==="set-cookie"?`${o}${T}${t}`:`${o},${t}`}function w(e){if(!c(e)&&!Array.isArray(e))return{};let n={};if(Array.isArray(e)){for(let t of e){if(!c(t))continue;let{name:r,value:o}=t;typeof r=="string"&&o!==void 0&&S(n,r,String(o))}return n}for(let[t,r]of Object.entries(e))if(r!=null){if(Array.isArray(r)){for(let o of r)S(n,t,String(o));continue}S(n,t,String(r))}return n}function m(e){try{return new URL(e)}catch{return new URL(e,B)}}function N(e){return e.length>1&&e.endsWith("/")?e.slice(0,-1):e}function b(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function v(e){let n=[],t=0,r=e.startsWith("/")?e:`/${e}`,s=N(r).split("/").map(i=>{if(!i)return"";let a=[...i.matchAll(/\{([^}]+)\}/g)],h=n.length,u="",p=0,f=0;for(let[y,d]of a.entries()){let R=i.slice(f,d.index);u+=b(R),p+=R.length,n.push(d[1]),f=d.index+d[0].length;let E=a[y+1];if(!E){u+="([^/]+)";continue}let A=i.slice(f,E.index);u+=A?`((?:(?!${b(A)})[^/])+)`:"([^/])"}let g=i.slice(f);return u+=b(g),p+=g.length,n.length===h?t+=2:p>0&&(t+=1),u}).join("/");return{regex:new RegExp(`^${s||"/"}$`),params:n,score:t}}function k(e,n){if(n&&P(e))try{return JSON.parse(n)}catch{return}}function C(e){return e?e.split(";")[0]?.trim().toLowerCase()??"":""}function P(e){let n=C(e);return n==="application/json"||n.endsWith("+json")}function ee(e,n){let t=C(n);if(!t)return e["application/json"]??e["*/*"];if(e[t]!==void 0)return e[t];let[r,o]=t.split("/");if(r&&o){let s=`${r}/*`;if(e[s]!==void 0)return e[s]}return e["*/*"]}function ne(e){let n=new Set,t=[];for(let r of e){let o=r.trim().toLowerCase();o.length!==0&&(o.endsWith("*")?t.push(o.slice(0,-1)):n.add(o))}return{names:n,prefixes:t}}function te(e,n){let t=e.toLowerCase();return t.startsWith(":")||I.has(t)||q.some(r=>t.startsWith(r))?!0:n?n.names.has(t)||n.prefixes.some(r=>t.startsWith(r)):!1}import{createReadStream as F}from"node:fs";import{readFile as j}from"node:fs/promises";import{createInterface as W}from"node:readline";function D(e){if(e!=null){if(typeof e=="string")return e;if(Buffer.isBuffer(e))return e.toString("utf8");if(c(e)||Array.isArray(e))try{return JSON.stringify(e)}catch{return String(e)}return String(e)}}function ue(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()!==""){let n=Number(e);if(Number.isFinite(n))return n}}function $(e,n){if(e!=null){if(n==="base64"&&typeof e=="string")try{return Buffer.from(e,"base64").toString("utf8")}catch{return e}return D(e)}}function fe(e,n,t){let r=e.method?.toUpperCase(),o=e.url;if(!r||!o)return null;let s=w(e.requestHeaders),i=m(o);if(l(i.host)&&s.host)try{i=new URL(`${i.protocol}//${s.host}${i.pathname}${i.search}`)}catch{i=m(o)}let a=e.requestContentType??s["content-type"],h=$(e.requestBody),u={method:r,url:i.toString(),path:i.pathname,query:i.searchParams,protocol:i.protocol,protocolKnown:e.schemeKnown??/^https?:\/\//i.test(o),host:l(i.host)?void 0:i.host||void 0,headers:s,contentType:a,bodyText:h,bodyJson:k(a,h)},p,f=e.responseStatus;if(f!==void 0){let g=w(e.responseHeaders),y=e.responseContentType??g["content-type"],d=$(e.responseBody);p={status:f,statusText:e.responseStatusText,headers:g,contentType:y,bodyText:d,bodyJson:k(y,d)}}return{index:n,source:t,startedAt:e.startedAt,request:u,response:p,raw:e.raw}}async function*de(e){let n=F(e,{encoding:"utf8"}),t=W({input:n,crlfDelay:1/0});for await(let r of t){let o=r.trim();if(o)try{let s=JSON.parse(o);c(s)&&(yield s)}catch{}}}async function*pe(e,n){let t=await j(e,"utf8"),r=JSON.parse(t);if(n)for(let o of n.split("."))r=c(r)?r[o]:void 0;if(Array.isArray(r))for(let o of r)c(o)&&(yield o)}function ge(e){return w(e)["content-type"]}function he(e){return e?.replace(/\/+$/,"")||void 0}function O(e,n){if(!n||n==="/")return e||"/";if(e===n)return"/";if(e.startsWith(`${n}/`))return e.slice(n.length)||"/"}function ye(e,n){if(n.startsWith("/"))return O(e.path,n);let t=m(n.includes("://")?n:`http://${n}`);if(!(l(t.host)||e.host!==void 0&&e.host.toLowerCase()!==t.host))return O(e.path,N(t.pathname))}export{K as a,G as b,X as c,Y as d,l as e,Z as f,m as g,N as h,v as i,C as j,P as k,ee as l,ne as m,te as n,D as o,ue as p,$ as q,fe as r,de as s,pe as t,ge as u,he as v,ye as w};
@@ -0,0 +1,20 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ var __filename = __fileURLToPath(import.meta.url);
6
+ var __dirname = __pathDirname(__filename);
7
+ import{b as G}from"./BE4Z5FOC.js";import{b as A,c as U,d as L,e as F,f as re,g as ie,h as se,i as ae,j as oe}from"./UMN7TKTH.js";import{a as ee,c as T,d as h,e as v,f as N,g as D,h as _,i as ne,j,k as I,l as W,n as te}from"./ACAPGKSR.js";var M=T.php,x=class extends ee{constructor(){super(" ")}typeName(n){return h(n,{style:"pascal",reserved:M})}memberName(n){return h(n,{style:"camel",reserved:M})}identifier(n){return h(n,{style:"camel",reserved:M})}identifiers(n,s){return v(n,{style:"camel",reserved:M,taken:s})}string(n){return`'${n.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}literal(n){return n==null?"null":typeof n=="boolean"||typeof n=="number"?String(n):typeof n=="string"?this.string(n):Array.isArray(n)?`[${n.map(r=>this.literal(r)).join(", ")}]`:`[${Object.entries(n).map(([r,i])=>`${this.string(r)} => ${this.literal(i)}`).join(", ")}]`}comment(n){for(let s of W(n))this.line(s===""?"//":`// ${s}`);return this}doc(n,s,r=[]){let i=W(s);if(i.length===0&&r.length===0)return this;let t=i.length===0?n:`${n} \u2014 ${i.join(" ")}`;if(r.length===0)return this.line(`/** ${t} */`);this.line("/**"),this.line(` * ${t}`),this.line(" *");for(let o of r)this.line(` * ${o}`);return this.line(" */")}};var y=T.php,K=new x;function g(e){return K.typeName(e)}function k(e){return K.memberName(e)}function c(e){return K.string(e)}function ce(e){return h(e.name,{style:"camel",reserved:y})}function J(e){let n=e.services.flatMap(r=>r.operations),s=v(n.map(r=>r.name),{style:"camel",reserved:y});return new Map(n.map((r,i)=>[r.name,s[i]]))}function ye(e){return ie(e).map(s=>s.kind==="literal"?c(s.value):`$${k(s.name)}`).join(" . ")}function le(e,n){let s=n.servers??[];if(s.length===0)return;let r=new Set;e.line("/** The declared servers; variables default to the values from the description. */"),e.line("final class Servers"),e.block("{",()=>{s.forEach((i,t)=>{let o=h(i.description??`server${t+1}`,{style:"camel",reserved:y});r.has(o)&&(o=`${o}${t+1}`),r.add(o);let u=i.variables.map(a=>`string $${k(a.name)} = ${c(a.default)}`);t>0&&e.blank(),e.line(`public static function ${o}(${u.join(", ")}): string`),e.block("{",()=>{e.line(`return ${ye(i)};`)},"}")})},"}"),e.blank()}function V(e,n){let s=se(e,n).map(r=>`[${r.map(t=>t.kind==="apiKey"?`['kind' => 'apiKey', 'scheme' => ${c(t.scheme)}, 'name' => ${c(t.name)}, 'in' => ${c(t.in)}]`:`['kind' => ${c(t.kind)}, 'scheme' => ${c(t.scheme)}]`).join(", ")}]`);if(s.length!==0)return`[${s.join(", ")}]`}function O(e,n){return V(e,n)===void 0?"[]":"$op['security']"}function ue(e){return`[${[`'style' => ${c(e.style)}`,...e.param!==void 0?[`'param' => ${c(e.param)}`]:[],...e.nextCursor!==void 0?[`'nextCursor' => ${c(e.nextCursor)}`]:[],...e.hasMore!==void 0?[`'hasMore' => ${c(e.hasMore)}`]:[],...e.nextLink!==void 0?[`'nextLink' => ${c(e.nextLink)}`]:[],...e.limitParam!==void 0?[`'limitParam' => ${c(e.limitParam)}`]:[],...e.items!==void 0?[`'items' => ${c(e.items)}`]:[]].join(", ")}]`}function $e(e,n){let s=new Set;return`[${(e.successResponseHeaders??[]).map(i=>{let t=h(i.name,{style:"camel",reserved:y}),o=2;for(;s.has(t);)t=`${h(i.name,{style:"camel",reserved:y})}_${o++}`;s.add(t);let u=te(i.schema,n);return`[${c(i.name)}, ${c(t)}, ${c(u)}]`}).join(", ")}]`}function C(e,n){let s=n.schemas.find(t=>t.name===e);if(s===void 0)return"other";let r=s.schema,i=I(r);return i!==void 0&&(i.scalar==="string"||i.scalar==="integer")?"enum":(r.kind==="object"||r.kind==="intersection")&&D(r,n)!==void 0?"class":"other"}function p(e,n,s="string"){if(ne(e)){let r=p(j(e),n,s);return E(r)}switch(e.kind){case"scalar":return s==="Date"&&e.scalar==="string"&&z(e)?"\\DateTimeImmutable":{string:"string",integer:"int",number:"float",boolean:"bool"}[e.scalar];case"array":case"record":return"array";case"ref":{let r=C(e.name,n);if(r==="class"||r==="enum")return g(e.name);let i=N(e,n);if(i===void 0)return"mixed";let t=p(i,n,s);if(!(_(i,n)!==void 0)||t==="mixed"||t.split("|").includes("array"))return t;let u=t.startsWith("?")||t.endsWith("|null"),a=t.startsWith("?")?t.slice(1):t.replace(/\|null$/,"");return u?E(`${a}|array`):`${a}|array`}case"enum":return{string:"string",integer:"int",number:"float",boolean:"bool"}[e.scalar];case"literal":return typeof e.value=="string"?"string":typeof e.value=="boolean"?"bool":"float";case"omit":return g(e.base);case"union":return ge(e.members,n,s);case"null":case"object":case"intersection":case"unknown":return"mixed"}}function z(e){let n=e.metadata?.format;return n==="date"||n==="date-time"}function E(e){return e==="mixed"||e.startsWith("?")||e.endsWith("|null")?e:e.includes("|")?`${e}|null`:`?${e}`}function ge(e,n,s){let r=[];for(let i of e){if(i.kind==="null")continue;let t=p(i,n,s);if(t==="mixed")return"mixed";let o=t.startsWith("?")?t.slice(1):t;r.includes(o)||r.push(o),t.startsWith("?")&&!r.includes("null")&&r.push("null")}return r.length===0?"mixed":r.join("|")}function Q(e,n,s){if(e===void 0)return;let r=j(e);if(r.kind==="ref"){let t=N(r,n);return C(r.name,n)==="other"?Q(t,n,s):void 0}if(r.kind!=="array")return;let i=p(r.items,n,s);return i==="mixed"?void 0:i}function de(e,n){let s=n.schemas.find(r=>r.name===e);return s!==void 0&&_(s.schema,n)!==void 0}function P(e,n,s,r){let i=j(e);if(r==="Date"&&i.kind==="scalar"&&i.scalar==="string"&&z(i))return`new \\DateTimeImmutable(${n})`;if(i.kind==="omit")return P({kind:"ref",name:i.base},n,s,r);if(i.kind==="ref"){let t=C(i.name,s);if(t==="class")return`${g(i.name)}::fromArray(${n})`;if(t==="enum")return`${g(i.name)}::from(${n})`;if(de(i.name,s))return`unmarshal${g(i.name)}(${n})`;let o=N(i,s);return o===void 0?void 0:P(o,n,s,r)}if(i.kind==="array"){let t=P(i.items,"$item",s,r);return t===void 0?void 0:`array_map(static fn ($item) => ${t}, ${n})`}if(i.kind==="record"){let t=P(i.value,"$item",s,r);return t===void 0?void 0:`array_map(static fn ($item) => ${t}, ${n})`}}function H(e,n,s,r="string"){let i=j(e);if(r==="Date"&&i.kind==="scalar"&&i.scalar==="string"){if(i.metadata?.format==="date")return`${n}->format('Y-m-d')`;if(i.metadata?.format==="date-time")return`${n}->format(\\DateTimeInterface::ATOM)`}if(i.kind==="omit")return H({kind:"ref",name:i.base},n,s,r);if(i.kind==="ref"){let t=C(i.name,s);if(t==="class")return`${n}->toArray()`;if(t==="enum")return`${n}->value`;if(de(i.name,s))return`is_object(${n}) ? ${n}->toArray() : ${n}`;let o=N(i,s);return o===void 0?void 0:H(o,n,s,r)}if(i.kind==="array"||i.kind==="record"){let t=i.kind==="array"?i.items:i.value,o=H(t,"$item",s,r);return o===void 0?void 0:`array_map(static fn ($item) => ${o}, ${n})`}}function be(e,n,s,r,i,t){let o=s.map(a=>a.writeOnly?{...a,required:!1}:a),u=[...o.filter(a=>a.required),...o.filter(a=>!a.required)];e.doc(g(n),t),e.line(`final class ${g(n)}`),e.block("{",()=>{e.block("public function __construct(",()=>{for(let a of u){let l=p(a.schema,r,i);if(a.required)e.line(`public ${l} $${k(a.name)},`);else{let $=E(l);e.line(`public ${$} $${k(a.name)} = null,`)}}},") {"),e.line("}"),e.blank(),e.line("public static function fromArray(array $data): self"),e.block("{",()=>{e.block("return new self(",()=>{for(let a of u){let l=`$data[${c(a.name)}]`,$=P(a.schema,l,r,i),f=k(a.name);a.required?e.line(`${f}: ${$??l},`):$===void 0?e.line(`${f}: ${l} ?? null,`):e.line(`${f}: isset(${l}) ? ${$} : null,`)}},");")},"}"),e.blank(),e.line("public function toArray(): array"),e.block("{",()=>{e.line("$data = [];");for(let a of u){let l=`$this->${k(a.name)}`,$=H(a.schema,l,r,i)??l;a.required?e.line(`$data[${c(a.name)}] = ${$};`):e.block(`if (${l} !== null) {`,()=>{e.line(`$data[${c(a.name)}] = ${$};`)},"}")}e.line("return $data;")},"}")},"}"),e.blank()}function Y(e,n="string"){let s=new x;for(let{name:r,schema:i}of e.schemas){let t=I(i);if(t!==void 0&&(t.scalar==="string"||t.scalar==="integer")){let u=t.scalar==="string"?"string":"int";s.doc(g(r),i.description),s.line(`enum ${g(r)}: ${u}`),s.block("{",()=>{let a=v(t.values.map(l=>String(l)),{style:"pascal",reserved:y});t.values.forEach((l,$)=>{let f=typeof l=="string"?c(l):String(l);s.line(`case ${a[$]} = ${f};`)})},"}"),s.blank();continue}if(i.kind==="object"||i.kind==="intersection"){let u=D(i,e);if(u!==void 0){be(s,r,u.properties,e,n,u.description??i.description);continue}}let o=_(i,e);if(o!==void 0){let u=g(r),a=o.cases.map(l=>`${l.value} -> ${g(l.schemaName)}`).join(", ");s.line(`/** ${u} is a discriminated union (${c(o.property)}): ${a}. */`),s.line(`function unmarshal${u}(array $data): mixed`),s.block("{",()=>{s.block(`return match ($data[${c(o.property)}] ?? null) {`,()=>{for(let l of o.cases){let $={kind:"ref",name:l.schemaName},f=P($,"$data",e,n)??"$data";s.line(`${c(l.value)} => ${f},`)}s.line("default => $data,")},"};")},"}"),s.blank();continue}}return s.toString()}var fe=new Set(["post","put","patch"]),ke=["body","headers","idempotencyKey"];function me(e){return F(e)||e.requestBody!==void 0&&re(e.requestBody.contentType)}function X(e,n,s,r){let i=v([...e.pathParams,...e.queryParams].map(a=>a.name),{style:"camel",reserved:y,taken:ke}),t=e.pathParams.map((a,l)=>({php:i[l],wire:a.name,type:p(a.schema,n,r)})),o=e.queryParams.map((a,l)=>{let $=i[e.pathParams.length+l];return{php:$,wire:a.name,type:p(a.schema,n,r),value:H(a.schema,`$${$}`,n,r)??`$${$}`}}),u=[...t.map(({php:a,type:l})=>`${l} $${a}`),...s&&e.requestBody?[`${me(e)?"mixed":L(e)?"array":p(e.requestBody.schema,n,r)} $body`]:[],...o.map(({php:a,type:l})=>`${E(l)} $${a} = null`),"?array $headers = null",...s&&fe.has(e.method.toLowerCase())?["?string $idempotencyKey = null"]:[]];return{pathArgs:t,queryArgs:o,signature:u}}function Pe(e,n,s,r){e.line(`$op = self::OPERATIONS[${c(n.specName??n.name)}];`),e.line(`[$authHeaders, $query, $cookies] = resolveAuth(${O(n,s)}, $this->config->auth);`);for(let{php:t,wire:o,value:u}of r.queryArgs)e.block(`if ($${t} !== null) {`,()=>{e.line(`$query[${c(o)}] = ${u};`)},"}");let i=r.pathArgs.map(({php:t,wire:o})=>`${c(o)} => $${t}`).join(", ");e.line(`$url = buildUrl($this->config->serverUrl, $op['path'], [${i}]);`),e.line("$requestHeaders = array_merge($authHeaders, $headers ?? []);"),e.block("if ($cookies !== []) {",()=>{e.line("$requestHeaders['Cookie'] = implode('; ', $cookies);")},"}")}function Z(e,n,s,r,i,t=!1){let o=X(n,r,!0,i),u=U(n),a=A(n),l=u===void 0&&a===void 0&&n.successResponses.some(b=>b.contentType!==""),$=t?"Envelope":u!==void 0?"\\Generator":a!==void 0?p(a,r,i):l?"string":"void",f=t?`${s}WithHeaders`:s,q=t?void 0:Q(a,r,i);e.doc(f,t?`Like ${s}(), returning an Envelope with the declared response headers.`:n.summary??`${n.method.toUpperCase()} ${n.path}`,q===void 0?[]:[`@return ${q.includes("|")?`(${q})`:q}[]`]),e.line(`public function ${f}(${o.signature.join(", ")}): ${$}`),e.block("{",()=>{if(Pe(e,n,r,o),u!==void 0){let m=u.schema!==void 0&&u.schema.kind!=="unknown";e.line("$url = appendQuery($url, $query);"),e.block("$open = function (array $extraHeaders) use ($url, $requestHeaders): \\CurlHandle {",()=>{e.line("$handle = curl_init($url);"),e.line("$lines = [];"),e.block("foreach (array_merge($requestHeaders, $extraHeaders) as $name => $value) {",()=>{e.line("$lines[] = $name . ': ' . $value;")},"}"),e.line("curl_setopt($handle, CURLOPT_HTTPHEADER, $lines);"),e.line("return $handle;")},"};"),e.line(`yield from iterSse($open, ${m?"true":"false"});`);return}let b=["'operationId' => $op['id']","'method' => $op['method']","'url' => $url","'headers' => $requestHeaders","'query' => $query"];if(F(n))e.line("[$contentType, $encoded] = multipartBody($body);"),b.push("'body' => $encoded","'contentType' => $contentType");else if(n.requestBody&&me(n))b.push("'body' => binaryBody($body)",`'contentType' => ${c(n.requestBody.contentType)}`);else if(n.requestBody&&L(n))e.line("[$contentType, $encoded] = toMultipart($body);"),b.push("'body' => $encoded","'contentType' => $contentType");else if(n.requestBody){let m=H(n.requestBody.schema,"$body",r,i)??"$body";e.line(`$payload = json_encode(${m});`),b.push("'body' => $payload",`'contentType' => ${c(n.requestBody.contentType)}`)}fe.has(n.method.toLowerCase())&&n.requestBody&&b.push("'idempotencyKey' => $idempotencyKey"),e.line(`$response = send($this->config, [${b.join(", ")}]);`),e.block("if ($response['status'] >= 400) {",()=>{e.line("throw apiErrorFrom($response);")},"}");let d=l?"$response['body']":(a===void 0?void 0:P(a,"decodeJson($response)",r,i))??"decodeJson($response)";if(t){e.line(`$data = ${d};`),e.line(`return new Envelope(data: $data, headers: readEnvelopeHeaders($response, ${$e(n,r)}), status: $response['status']);`);return}if(l){e.line("return $response['body'];");return}if($==="void"){e.line("decodeJson($response);");return}e.line(`return ${d};`)},"}"),e.blank()}function pe(e,n,s,r,i,t,o,u,a){let l=X(n,r,!1,i),$=s,f=()=>{e.line(`$op = self::OPERATIONS[${c(n.specName??n.name)}];`),e.line("$base = [];");for(let{php:m,wire:S,value:w}of l.queryArgs)e.block(`if ($${m} !== null) {`,()=>{e.line(`$base[${c(S)}] = ${w};`)},"}");let d=l.pathArgs.map(({php:m,wire:S})=>`${c(S)} => $${m}`).join(", ");e.block("$call = function (array $params) use ($op, $headers): array {",()=>{e.line(`[$authHeaders, $authQuery, $cookies] = resolveAuth(${O(n,r)}, $this->config->auth);`),e.line(`$url = buildUrl($this->config->serverUrl, $op['path'], [${d}]);`),e.line("$requestHeaders = array_merge($authHeaders, $headers ?? []);"),e.block("if ($cookies !== []) {",()=>{e.line("$requestHeaders['Cookie'] = implode('; ', $cookies);")},"}"),e.line("$response = send($this->config, ['operationId' => $op['id'], 'method' => $op['method'], 'url' => $url, 'headers' => $requestHeaders, 'query' => array_merge($params, $authQuery)]);"),e.block("if ($response['status'] >= 400) {",()=>{e.line("throw apiErrorFrom($response);")},"}"),e.line("return [decodeJson($response), $response];")},"};")},q=p(A(n)??{kind:"unknown"},r,i),b=q==="mixed"?"mixed":q;e.line("/**"),e.line(` * ${$} response pages, following the pagination rule automatically.`),e.line(" *"),e.line(` * @return \\Generator<int, ${b}>`),e.line(" */"),e.line(`public function ${$}Pages(${l.signature.join(", ")}): \\Generator`),e.block("{",()=>{f(),e.block("foreach (iterPages($call, $op['pagination'], $base) as $page) {",()=>{e.line(`yield ${t??"$page"};`)},"}")},"}"),e.blank(),e.line("/**"),e.line(` * The items of every ${$} page.`),e.line(" *"),e.line(` * @return \\Generator<int, ${a}>`),e.line(" */"),e.line(`public function ${$}Items(${l.signature.join(", ")}): \\Generator`),e.block("{",()=>{f(),e.block("foreach (iterPages($call, $op['pagination'], $base) as $page) {",()=>{e.line(`$items = resolvePointer($page, ${c(u??"")});`),e.block("foreach (is_array($items) ? $items : [] as $item) {",()=>{e.line(`yield ${o??"$item"};`)},"}")},"}")},"}"),e.blank()}function Se(e){let n=e.split(`
8
+ `),s=0;for(let r=0;r<n.length;r++)if(n[r].trim().startsWith("namespace ")){s=r+1;break}return n.slice(s).join(`
9
+ `).trim()}var mn=({model:e,output:n,banner:s,emit:r,pagination:i})=>{let t=new x,o=r.dateType??"string",u=h(e.title,{style:"pascal",reserved:y});t.line("<?php"),t.blank(),t.line(`// Code generated by @redocly/client-generator (php) from ${c(e.title)} ${e.version}. DO NOT EDIT.`),t.line("// Regenerate with `redocly generate-client`. PHP >= 8.1, curl extension \u2014 zero Composer dependencies."),t.blank(),t.line("declare(strict_types=1);"),t.blank(),t.line(`namespace ${u};`),t.blank(),t.line(Y(e,o)),le(t,e),r.runtime==="module"?(t.line("// \u2500\u2500\u2500 Runtime (a real file beside this one, written by the same run) \u2500\u2500\u2500"),t.line("require_once __DIR__ . '/runtime.php';"),t.blank()):(t.line("// \u2500\u2500\u2500 Embedded runtime (@redocly/client-generator php runtime) \u2500\u2500\u2500"),t.line(Se(G)),t.blank());let a=e.services.flatMap(d=>d.operations),l=J(e),$=new Map;for(let d of a){let m=i?.get(d.name)?.spec;m!==void 0&&$.set(d.name,m)}t.doc("Client",`Client for ${e.title} (${e.version}).`),t.line("class Client"),t.block("{",()=>{t.block("public const OPERATIONS = [",()=>{for(let d of a){let m=d.specName??d.name,S=V(d,e),w=$.get(d.name),B=[`'id' => ${c(m)}`,`'method' => ${c(d.method.toUpperCase())}`,`'path' => ${c(d.path)}`,...S!==void 0?[`'security' => ${S}`]:[],...w!==void 0?[`'pagination' => ${ue(w)}`]:[]];t.line(`${c(m)} => [${B.join(", ")}],`)}},"];"),t.blank(),t.line("public function __construct(private Config $config)"),t.block("{",()=>{t.block("if ($this->config->serverUrl === '') {",()=>{t.line(`$this->config->serverUrl = ${c(r.serverUrl??e.serverUrl??"")};`)},"}")},"}"),t.blank();for(let d of a){let m=l.get(d.name);Z(t,d,m,e,o),U(d)===void 0&&(d.successResponseHeaders?.length??0)>0&&Z(t,d,m,e,o,!0);let S=$.get(d.name);if(S===void 0)continue;let w=A(d),B=w===void 0?void 0:P(w,"$page",e,o),R=ae(w,S.items,e),he=R===void 0?void 0:P(R,"$item",e,o);pe(t,d,m,e,o,B,he,S.items,R===void 0?"mixed":p(R,e,o))}},"}");let f={path:n.path.replace(/\.[^.\\/]+$/,".php"),content:t.toString()};if(r.runtime!=="module")return[f];let q=s.map(d=>`// ${d}`).join(`
10
+ `),b=G.replace(/^namespace .*$/m,`namespace ${u};`).replace(/^<\?php\n/,`<?php
11
+
12
+ ${q}
13
+ `).trimEnd();return[f,{path:f.path.replace(/[^\\/]+$/,"runtime.php"),content:`${b}
14
+ `}]};function qe(e,n){let s=[...e.pathParams.map(t=>`${c(`<${k(t.name)}>`)}`),...e.requestBody?["$body"]:[],...e.queryParams.length>0?[`${k(e.queryParams[0].name)}: ${c("<value>")}`]:[]],r=h(n.model.title,{style:"pascal",reserved:y});return{lang:"php",label:"PHP SDK",source:`require '${n.outputPath.replace(/^.*[\\/]/,"").replace(/\.[^.]+$/,".php")}';
15
+
16
+ use ${r}\\{Client, Config};
17
+
18
+ $client = new Client(new Config());
19
+ $result = $client->${J(n.model).get(e.name)??ce(e)}(${s.join(", ")});
20
+ `}}var pn=({model:e,output:n,emit:s,pagination:r})=>[{path:n.path.replace(/\.[^.\\/]+$/,".php.md"),content:oe(e,{title:`${e.title} PHP SDK reference`,frontmatter:s.docsFrontmatter===!0,language:{name:"php",label:"PHP",fence:"php",requires:"The SDK needs the curl extension."},sample:i=>qe(i,{model:e,emit:s,outputPath:n.path}),paginated:new Set(r?.keys()??[])})}];export{p as a,Y as b,mn as c,qe as d,pn as e};
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a,b,c,d,e}from"./YDQCJP4F.js";import"./RLJVKAOL.js";import"./O37B7ABT.js";import"./GKXY6U4S.js";import"./QMS4UKIK.js";import"./WBWCX3LS.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{a as DeploymentError,b as handlePushStatus,c as handleReuniteError,d as printSlugDeprecation,e as printSunsetWarning};
7
+ import{a,b,c,d,e}from"./S6W63XAS.js";import"./NLAPR7D4.js";import"./AH6ANNYP.js";import"./KFQC57GK.js";import"./CHX7O5AM.js";import"./DORXGE7Z.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{a as DeploymentError,b as handlePushStatus,c as handleReuniteError,d as printSlugDeprecation,e as printSunsetWarning};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as we,e as Re,f as be,g as k,h as A,i as Oe,j as Ie,k as S,l as x,m as Pe,n as ke,v as Ae,w as xe}from"./LRMOPAZ4.js";import{$ as T,H as lt,S as le,V as ft,W as fe,X as g,Y as E,Z as me,_ as q,ba as b,c as p,da as w,fa as R,ga as he,ha as ge,ia as ye,ja as Se,oa as ve,p as de,v as pe}from"./WBWCX3LS.js";import{e as ce}from"./RFWIIJFG.js";import Ce from"node:path";function O(t){return t?t.trim():""}function L(t){let e=O(t.operationId)||O(t.path);return[O(t.ruleId),O(t.severity),O(t.message),e,O(t.target),O(t.schemaPath)].join("")}var N=t=>fe(b(t));function mt(t){return t==="error"?"error":t==="warning"?"warning":"note"}function ht(t){if(t==null)return"";let e=String(t);return!e.includes(",")&&!e.includes('"')&&!e.includes(`
7
+ import{a as we,e as Re,f as be,g as k,h as A,i as Oe,j as Ie,k as S,l as x,m as Pe,n as ke,v as Ae,w as xe}from"./GAKWND4S.js";import{$ as T,H as lt,S as le,V as ft,W as fe,X as g,Y as E,Z as me,_ as q,ba as b,c as p,da as w,fa as R,ga as he,ha as ge,ia as ye,ja as Se,oa as ve,p as de,v as pe}from"./DORXGE7Z.js";import{e as ce}from"./RFWIIJFG.js";import Ce from"node:path";function O(t){return t?t.trim():""}function L(t){let e=O(t.operationId)||O(t.path);return[O(t.ruleId),O(t.severity),O(t.message),e,O(t.target),O(t.schemaPath)].join("")}var N=t=>fe(b(t));function mt(t){return t==="error"?"error":t==="warning"?"warning":"note"}function ht(t){if(t==null)return"";let e=String(t);return!e.includes(",")&&!e.includes('"')&&!e.includes(`
8
8
  `)?e:`"${e.replace(/"/g,'""')}"`}function gt(t){return Ce.isAbsolute(t)?Ce.relative(process.cwd(),t)||".":t}function yt(t){if(!t)return null;let e=t.operationPathTemplate;return typeof e=="string"&&e.length>0?e:null}function St(t){return Object.entries(t).sort((e,n)=>{let r=n[1]-e[1];return r!==0?r:e[0].localeCompare(n[0])})}function vt(t){let e=[],n=new Map;for(let r of t){let s=L({ruleId:r.ruleId,severity:r.severity,message:r.message,operationId:r.operationId,path:r.path,target:r.target,schemaPath:r.schemaPath}),i=n.get(s);if(i!==void 0){e[i].occurrences+=1;continue}n.set(s,e.length),e.push({finding:r,occurrences:1})}return e}function wt(t){let e=vt(t.findings).map(r=>({occurrences:r.occurrences,exchangeIndex:r.finding.exchangeIndex,ruleId:r.finding.ruleId,severity:r.finding.severity,category:r.finding.category,message:r.finding.message,operationId:r.finding.operationId,specSource:r.finding.specSource,target:r.finding.target,schemaPath:r.finding.schemaPath,dataPath:r.finding.dataPath,details:r.finding.details,method:r.finding.method,url:r.finding.url,path:r.finding.path,status:r.finding.status})),n={run:{id:t.runId,specSource:t.meta.specSource,trafficPath:t.meta.trafficPath,format:t.meta.format,matchMode:t.meta.matchMode,server:t.meta.server,totalExchanges:t.summary.totalExchanges,documentedExchanges:t.summary.documentedExchanges,undocumentedExchanges:t.summary.undocumentedExchanges,skippedExchanges:t.summary.skippedExchanges,findingsBySeverity:t.summary.findingsBySeverity,findingsByRule:t.summary.findingsByRule,totalProblems:t.summary.totalProblemGroups,durationMs:t.summary.durationMs},problems:e};return`${JSON.stringify(n,null,2)}
9
9
  `}function Rt(t){let e=["run_id","finding_id","exchange_index","severity","category","rule_id","message","method","path","url","status","operation_id","spec_source","target","schema_path","data_path"],n=t.findings.map(s=>[t.runId,s.id,s.exchangeIndex,s.severity,s.category,s.ruleId,s.message,s.method,s.path,s.url,s.status,s.operationId,s.specSource,s.target,s.schemaPath,s.dataPath]);return`${[e,...n].map(s=>s.map(ht).join(",")).join(`
10
10
  `)}
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as $,b as a,c,d as i,e as m,f}from"./QB6CQ2CV.js";import{k as l}from"./LD5MEXEL.js";import{join as p}from"node:path";function k(t,n){let e=$(t,"swr");if(e.length===0)return"";let s=e.some(a),o=e.some(r=>!a(r));return[...s?['import useSWR from "swr";']:[],...o?['import useSWRMutation from "swr/mutation";']:[],f(e,n.sdkModule,s),...e.flatMap(r=>a(r)?g(r):[S(r)])].join(`
7
+ import{a as $,b as a,c,d as i,e as m,f}from"./L2O63VRM.js";import{k as l}from"./DP3T6VZX.js";import{join as p}from"node:path";function k(t,n){let e=$(t,"swr");if(e.length===0)return"";let s=e.some(a),o=e.some(r=>!a(r));return[...s?['import useSWR from "swr";']:[],...o?['import useSWRMutation from "swr/mutation";']:[],f(e,n.sdkModule,s),...e.flatMap(r=>a(r)?g(r):[S(r)])].join(`
8
8
 
9
9
  `)}function y(t,n,e){return`export function use${l(t.name)}(${n}) {
10
10
  return ${e};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as Ate,b as Ote}from"./G2M6SQCS.js";import{d as Rte}from"./VXD5O25A.js";import{b as Ete,e as Tte}from"./QMS4UKIK.js";import{O as xte,S as wte,ba as wP,c as bte,fa as o1,ga as Cte,ha as kte,la as k2,oa as Ste,t as yte}from"./WBWCX3LS.js";import"./NEWT5A6S.js";import{a as ru,b as vte,c as ar,d as Mqe,e as yl,f as Dqe}from"./RFWIIJFG.js";var Ute=ar(tn=>{"use strict";var SP=Symbol.for("react.transitional.element"),Fqe=Symbol.for("react.portal"),zqe=Symbol.for("react.fragment"),Bqe=Symbol.for("react.strict_mode"),Uqe=Symbol.for("react.profiler"),Hqe=Symbol.for("react.consumer"),Vqe=Symbol.for("react.context"),Wqe=Symbol.for("react.forward_ref"),Gqe=Symbol.for("react.suspense"),jqe=Symbol.for("react.memo"),Lte=Symbol.for("react.lazy"),Yqe=Symbol.for("react.activity"),Ite=Symbol.iterator;function qqe(i){return i===null||typeof i!="object"?null:(i=Ite&&i[Ite]||i["@@iterator"],typeof i=="function"?i:null)}var Mte={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dte=Object.assign,Fte={};function E2(i,s,u){this.props=i,this.context=s,this.refs=Fte,this.updater=u||Mte}E2.prototype.isReactComponent={};E2.prototype.setState=function(i,s){if(typeof i!="object"&&typeof i!="function"&&i!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,i,s,"setState")};E2.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function zte(){}zte.prototype=E2.prototype;function EP(i,s,u){this.props=i,this.context=s,this.refs=Fte,this.updater=u||Mte}var TP=EP.prototype=new zte;TP.constructor=EP;Dte(TP,E2.prototype);TP.isPureReactComponent=!0;var _te=Array.isArray;function kP(){}var Yi={H:null,A:null,T:null,S:null},Bte=Object.prototype.hasOwnProperty;function AP(i,s,u){var h=u.ref;return{$$typeof:SP,type:i,key:s,ref:h!==void 0?h:null,props:u}}function Zqe(i,s){return AP(i.type,s,i.props)}function RP(i){return typeof i=="object"&&i!==null&&i.$$typeof===SP}function Kqe(i){var s={"=":"=0",":":"=2"};return"$"+i.replace(/[=:]/g,function(u){return s[u]})}var Pte=/\/+/g;function CP(i,s){return typeof i=="object"&&i!==null&&i.key!=null?Kqe(""+i.key):s.toString(36)}function Xqe(i){switch(i.status){case"fulfilled":return i.value;case"rejected":throw i.reason;default:switch(typeof i.status=="string"?i.then(kP,kP):(i.status="pending",i.then(function(s){i.status==="pending"&&(i.status="fulfilled",i.value=s)},function(s){i.status==="pending"&&(i.status="rejected",i.reason=s)})),i.status){case"fulfilled":return i.value;case"rejected":throw i.reason}}throw i}function S2(i,s,u,h,m){var S=typeof i;(S==="undefined"||S==="boolean")&&(i=null);var v=!1;if(i===null)v=!0;else switch(S){case"bigint":case"string":case"number":v=!0;break;case"object":switch(i.$$typeof){case SP:case Fqe:v=!0;break;case Lte:return v=i._init,S2(v(i._payload),s,u,h,m)}}if(v)return m=m(i),v=h===""?"."+CP(i,0):h,_te(m)?(u="",v!=null&&(u=v.replace(Pte,"$&/")+"/"),S2(m,s,u,"",function(I){return I})):m!=null&&(RP(m)&&(m=Zqe(m,u+(m.key==null||i&&i.key===m.key?"":(""+m.key).replace(Pte,"$&/")+"/")+v)),s.push(m)),1;v=0;var N=h===""?".":h+":";if(_te(i))for(var O=0;O<i.length;O++)h=i[O],S=N+CP(h,O),v+=S2(h,s,u,S,m);else if(O=qqe(i),typeof O=="function")for(i=O.call(i),O=0;!(h=i.next()).done;)h=h.value,S=N+CP(h,O++),v+=S2(h,s,u,S,m);else if(S==="object"){if(typeof i.then=="function")return S2(Xqe(i),s,u,h,m);throw s=String(i),Error("Objects are not valid as a React child (found: "+(s==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":s)+"). If you meant to render a collection of children, use an array instead.")}return v}function s6(i,s,u){if(i==null)return i;var h=[],m=0;return S2(i,h,"","",function(S){return s.call(u,S,m++)}),h}function Jqe(i){if(i._status===-1){var s=i._result;s=s(),s.then(function(u){(i._status===0||i._status===-1)&&(i._status=1,i._result=u)},function(u){(i._status===0||i._status===-1)&&(i._status=2,i._result=u)}),i._status===-1&&(i._status=0,i._result=s)}if(i._status===1)return i._result.default;throw i._result}var Nte=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Qqe={map:s6,forEach:function(i,s,u){s6(i,function(){s.apply(this,arguments)},u)},count:function(i){var s=0;return s6(i,function(){s++}),s},toArray:function(i){return s6(i,function(s){return s})||[]},only:function(i){if(!RP(i))throw Error("React.Children.only expected to receive a single React element child.");return i}};tn.Activity=Yqe;tn.Children=Qqe;tn.Component=E2;tn.Fragment=zqe;tn.Profiler=Uqe;tn.PureComponent=EP;tn.StrictMode=Bqe;tn.Suspense=Gqe;tn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Yi;tn.__COMPILER_RUNTIME={__proto__:null,c:function(i){return Yi.H.useMemoCache(i)}};tn.cache=function(i){return function(){return i.apply(null,arguments)}};tn.cacheSignal=function(){return null};tn.cloneElement=function(i,s,u){if(i==null)throw Error("The argument must be a React element, but you passed "+i+".");var h=Dte({},i.props),m=i.key;if(s!=null)for(S in s.key!==void 0&&(m=""+s.key),s)!Bte.call(s,S)||S==="key"||S==="__self"||S==="__source"||S==="ref"&&s.ref===void 0||(h[S]=s[S]);var S=arguments.length-2;if(S===1)h.children=u;else if(1<S){for(var v=Array(S),N=0;N<S;N++)v[N]=arguments[N+2];h.children=v}return AP(i.type,m,h)};tn.createContext=function(i){return i={$$typeof:Vqe,_currentValue:i,_currentValue2:i,_threadCount:0,Provider:null,Consumer:null},i.Provider=i,i.Consumer={$$typeof:Hqe,_context:i},i};tn.createElement=function(i,s,u){var h,m={},S=null;if(s!=null)for(h in s.key!==void 0&&(S=""+s.key),s)Bte.call(s,h)&&h!=="key"&&h!=="__self"&&h!=="__source"&&(m[h]=s[h]);var v=arguments.length-2;if(v===1)m.children=u;else if(1<v){for(var N=Array(v),O=0;O<v;O++)N[O]=arguments[O+2];m.children=N}if(i&&i.defaultProps)for(h in v=i.defaultProps,v)m[h]===void 0&&(m[h]=v[h]);return AP(i,S,m)};tn.createRef=function(){return{current:null}};tn.forwardRef=function(i){return{$$typeof:Wqe,render:i}};tn.isValidElement=RP;tn.lazy=function(i){return{$$typeof:Lte,_payload:{_status:-1,_result:i},_init:Jqe}};tn.memo=function(i,s){return{$$typeof:jqe,type:i,compare:s===void 0?null:s}};tn.startTransition=function(i){var s=Yi.T,u={};Yi.T=u;try{var h=i(),m=Yi.S;m!==null&&m(u,h),typeof h=="object"&&h!==null&&typeof h.then=="function"&&h.then(kP,Nte)}catch(S){Nte(S)}finally{s!==null&&u.types!==null&&(s.types=u.types),Yi.T=s}};tn.unstable_useCacheRefresh=function(){return Yi.H.useCacheRefresh()};tn.use=function(i){return Yi.H.use(i)};tn.useActionState=function(i,s,u){return Yi.H.useActionState(i,s,u)};tn.useCallback=function(i,s){return Yi.H.useCallback(i,s)};tn.useContext=function(i){return Yi.H.useContext(i)};tn.useDebugValue=function(){};tn.useDeferredValue=function(i,s){return Yi.H.useDeferredValue(i,s)};tn.useEffect=function(i,s){return Yi.H.useEffect(i,s)};tn.useEffectEvent=function(i){return Yi.H.useEffectEvent(i)};tn.useId=function(){return Yi.H.useId()};tn.useImperativeHandle=function(i,s,u){return Yi.H.useImperativeHandle(i,s,u)};tn.useInsertionEffect=function(i,s){return Yi.H.useInsertionEffect(i,s)};tn.useLayoutEffect=function(i,s){return Yi.H.useLayoutEffect(i,s)};tn.useMemo=function(i,s){return Yi.H.useMemo(i,s)};tn.useOptimistic=function(i,s){return Yi.H.useOptimistic(i,s)};tn.useReducer=function(i,s,u){return Yi.H.useReducer(i,s,u)};tn.useRef=function(i){return Yi.H.useRef(i)};tn.useState=function(i){return Yi.H.useState(i)};tn.useSyncExternalStore=function(i,s,u){return Yi.H.useSyncExternalStore(i,s,u)};tn.useTransition=function(){return Yi.H.useTransition()};tn.version="19.2.7"});var Hte=ar((Jr,l6)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function i(ee,Ee){Object.defineProperty(h.prototype,ee,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Ee[0],Ee[1])}})}function s(ee){return ee===null||typeof ee!="object"?null:(ee=Nr&&ee[Nr]||ee["@@iterator"],typeof ee=="function"?ee:null)}function u(ee,Ee){ee=(ee=ee.constructor)&&(ee.displayName||ee.name)||"ReactClass";var tt=ee+"."+Ee;yn[tt]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",Ee,ee),yn[tt]=!0)}function h(ee,Ee,tt){this.props=ee,this.context=Ee,this.refs=Pn,this.updater=tt||ur}function m(){}function S(ee,Ee,tt){this.props=ee,this.context=Ee,this.refs=Pn,this.updater=tt||ur}function v(){}function N(ee){return""+ee}function O(ee){try{N(ee);var Ee=!1}catch{Ee=!0}if(Ee){Ee=console;var tt=Ee.error,ht=typeof Symbol=="function"&&Symbol.toStringTag&&ee[Symbol.toStringTag]||ee.constructor.name||"Object";return tt.call(Ee,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ht),N(ee)}}function I(ee){if(ee==null)return null;if(typeof ee=="function")return ee.$$typeof===$n?null:ee.displayName||ee.name||null;if(typeof ee=="string")return ee;switch(ee){case _n:return"Fragment";case Me:return"Profiler";case cr:return"StrictMode";case Gt:return"Suspense";case Mt:return"SuspenseList";case hr:return"Activity"}if(typeof ee=="object")switch(typeof ee.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),ee.$$typeof){case kr:return"Portal";case wt:return ee.displayName||"Context";case nt:return(ee._context.displayName||"Context")+".Consumer";case or:var Ee=ee.render;return ee=ee.displayName,ee||(ee=Ee.displayName||Ee.name||"",ee=ee!==""?"ForwardRef("+ee+")":"ForwardRef"),ee;case yt:return Ee=ee.displayName||null,Ee!==null?Ee:I(ee.type)||"Memo";case er:Ee=ee._payload,ee=ee._init;try{return I(ee(Ee))}catch{}}return null}function H(ee){if(ee===_n)return"<>";if(typeof ee=="object"&&ee!==null&&ee.$$typeof===er)return"<...>";try{var Ee=I(ee);return Ee?"<"+Ee+">":"<...>"}catch{return"<...>"}}function M(){var ee=br.A;return ee===null?null:ee.getOwner()}function Y(){return Error("react-stack-top-frame")}function J(ee){if(lo.call(ee,"key")){var Ee=Object.getOwnPropertyDescriptor(ee,"key").get;if(Ee&&Ee.isReactWarning)return!1}return ee.key!==void 0}function we(ee,Ee){function tt(){Un||(Un=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Ee))}tt.isReactWarning=!0,Object.defineProperty(ee,"key",{get:tt,configurable:!0})}function ke(){var ee=I(this.type);return Eo[ee]||(Eo[ee]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),ee=this.props.ref,ee!==void 0?ee:null}function pe(ee,Ee,tt,ht,_t,qt){var Kt=tt.ref;return ee={$$typeof:lr,type:ee,key:Ee,props:tt,_owner:ht},(Kt!==void 0?Kt:null)!==null?Object.defineProperty(ee,"ref",{enumerable:!1,get:ke}):Object.defineProperty(ee,"ref",{enumerable:!1,value:null}),ee._store={},Object.defineProperty(ee._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(ee,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(ee,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:_t}),Object.defineProperty(ee,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:qt}),Object.freeze&&(Object.freeze(ee.props),Object.freeze(ee)),ee}function Fe(ee,Ee){return Ee=pe(ee.type,Ee,ee.props,ee._owner,ee._debugStack,ee._debugTask),ee._store&&(Ee._store.validated=ee._store.validated),Ee}function ze(ee){ft(ee)?ee._store&&(ee._store.validated=1):typeof ee=="object"&&ee!==null&&ee.$$typeof===er&&(ee._payload.status==="fulfilled"?ft(ee._payload.value)&&ee._payload.value._store&&(ee._payload.value._store.validated=1):ee._store&&(ee._store.validated=1))}function ft(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===lr}function St(ee){var Ee={"=":"=0",":":"=2"};return"$"+ee.replace(/[=:]/g,function(tt){return Ee[tt]})}function mt(ee,Ee){return typeof ee=="object"&&ee!==null&&ee.key!=null?(O(ee.key),St(""+ee.key)):Ee.toString(36)}function Ve(ee){switch(ee.status){case"fulfilled":return ee.value;case"rejected":throw ee.reason;default:switch(typeof ee.status=="string"?ee.then(v,v):(ee.status="pending",ee.then(function(Ee){ee.status==="pending"&&(ee.status="fulfilled",ee.value=Ee)},function(Ee){ee.status==="pending"&&(ee.status="rejected",ee.reason=Ee)})),ee.status){case"fulfilled":return ee.value;case"rejected":throw ee.reason}}throw ee}function Lt(ee,Ee,tt,ht,_t){var qt=typeof ee;(qt==="undefined"||qt==="boolean")&&(ee=null);var Kt=!1;if(ee===null)Kt=!0;else switch(qt){case"bigint":case"string":case"number":Kt=!0;break;case"object":switch(ee.$$typeof){case lr:case kr:Kt=!0;break;case er:return Kt=ee._init,Lt(Kt(ee._payload),Ee,tt,ht,_t)}}if(Kt){Kt=ee,_t=_t(Kt);var Pr=ht===""?"."+mt(Kt,0):ht;return xn(_t)?(tt="",Pr!=null&&(tt=Pr.replace(Bo,"$&/")+"/"),Lt(_t,Ee,tt,"",function(Dr){return Dr})):_t!=null&&(ft(_t)&&(_t.key!=null&&(Kt&&Kt.key===_t.key||O(_t.key)),tt=Fe(_t,tt+(_t.key==null||Kt&&Kt.key===_t.key?"":(""+_t.key).replace(Bo,"$&/")+"/")+Pr),ht!==""&&Kt!=null&&ft(Kt)&&Kt.key==null&&Kt._store&&!Kt._store.validated&&(tt._store.validated=2),_t=tt),Ee.push(_t)),1}if(Kt=0,Pr=ht===""?".":ht+":",xn(ee))for(var yr=0;yr<ee.length;yr++)ht=ee[yr],qt=Pr+mt(ht,yr),Kt+=Lt(ht,Ee,tt,qt,_t);else if(yr=s(ee),typeof yr=="function")for(yr===ee.entries&&(kn||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),kn=!0),ee=yr.call(ee),yr=0;!(ht=ee.next()).done;)ht=ht.value,qt=Pr+mt(ht,yr++),Kt+=Lt(ht,Ee,tt,qt,_t);else if(qt==="object"){if(typeof ee.then=="function")return Lt(Ve(ee),Ee,tt,ht,_t);throw Ee=String(ee),Error("Objects are not valid as a React child (found: "+(Ee==="[object Object]"?"object with keys {"+Object.keys(ee).join(", ")+"}":Ee)+"). If you meant to render a collection of children, use an array instead.")}return Kt}function It(ee,Ee,tt){if(ee==null)return ee;var ht=[],_t=0;return Lt(ee,ht,"","",function(qt){return Ee.call(tt,qt,_t++)}),ht}function Pt(ee){if(ee._status===-1){var Ee=ee._ioInfo;Ee!=null&&(Ee.start=Ee.end=performance.now()),Ee=ee._result;var tt=Ee();if(tt.then(function(_t){if(ee._status===0||ee._status===-1){ee._status=1,ee._result=_t;var qt=ee._ioInfo;qt!=null&&(qt.end=performance.now()),tt.status===void 0&&(tt.status="fulfilled",tt.value=_t)}},function(_t){if(ee._status===0||ee._status===-1){ee._status=2,ee._result=_t;var qt=ee._ioInfo;qt!=null&&(qt.end=performance.now()),tt.status===void 0&&(tt.status="rejected",tt.reason=_t)}}),Ee=ee._ioInfo,Ee!=null){Ee.value=tt;var ht=tt.displayName;typeof ht=="string"&&(Ee.name=ht)}ee._status===-1&&(ee._status=0,ee._result=tt)}if(ee._status===1)return Ee=ee._result,Ee===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
7
+ import{a as Ate,b as Ote}from"./6ZNJ7RDX.js";import{d as Rte}from"./V34D5CUU.js";import{b as Ete,e as Tte}from"./CHX7O5AM.js";import{O as xte,S as wte,ba as wP,c as bte,fa as o1,ga as Cte,ha as kte,la as k2,oa as Ste,t as yte}from"./DORXGE7Z.js";import"./NEWT5A6S.js";import{a as ru,b as vte,c as ar,d as Mqe,e as yl,f as Dqe}from"./RFWIIJFG.js";var Ute=ar(tn=>{"use strict";var SP=Symbol.for("react.transitional.element"),Fqe=Symbol.for("react.portal"),zqe=Symbol.for("react.fragment"),Bqe=Symbol.for("react.strict_mode"),Uqe=Symbol.for("react.profiler"),Hqe=Symbol.for("react.consumer"),Vqe=Symbol.for("react.context"),Wqe=Symbol.for("react.forward_ref"),Gqe=Symbol.for("react.suspense"),jqe=Symbol.for("react.memo"),Lte=Symbol.for("react.lazy"),Yqe=Symbol.for("react.activity"),Ite=Symbol.iterator;function qqe(i){return i===null||typeof i!="object"?null:(i=Ite&&i[Ite]||i["@@iterator"],typeof i=="function"?i:null)}var Mte={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dte=Object.assign,Fte={};function E2(i,s,u){this.props=i,this.context=s,this.refs=Fte,this.updater=u||Mte}E2.prototype.isReactComponent={};E2.prototype.setState=function(i,s){if(typeof i!="object"&&typeof i!="function"&&i!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,i,s,"setState")};E2.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function zte(){}zte.prototype=E2.prototype;function EP(i,s,u){this.props=i,this.context=s,this.refs=Fte,this.updater=u||Mte}var TP=EP.prototype=new zte;TP.constructor=EP;Dte(TP,E2.prototype);TP.isPureReactComponent=!0;var _te=Array.isArray;function kP(){}var Yi={H:null,A:null,T:null,S:null},Bte=Object.prototype.hasOwnProperty;function AP(i,s,u){var h=u.ref;return{$$typeof:SP,type:i,key:s,ref:h!==void 0?h:null,props:u}}function Zqe(i,s){return AP(i.type,s,i.props)}function RP(i){return typeof i=="object"&&i!==null&&i.$$typeof===SP}function Kqe(i){var s={"=":"=0",":":"=2"};return"$"+i.replace(/[=:]/g,function(u){return s[u]})}var Pte=/\/+/g;function CP(i,s){return typeof i=="object"&&i!==null&&i.key!=null?Kqe(""+i.key):s.toString(36)}function Xqe(i){switch(i.status){case"fulfilled":return i.value;case"rejected":throw i.reason;default:switch(typeof i.status=="string"?i.then(kP,kP):(i.status="pending",i.then(function(s){i.status==="pending"&&(i.status="fulfilled",i.value=s)},function(s){i.status==="pending"&&(i.status="rejected",i.reason=s)})),i.status){case"fulfilled":return i.value;case"rejected":throw i.reason}}throw i}function S2(i,s,u,h,m){var S=typeof i;(S==="undefined"||S==="boolean")&&(i=null);var v=!1;if(i===null)v=!0;else switch(S){case"bigint":case"string":case"number":v=!0;break;case"object":switch(i.$$typeof){case SP:case Fqe:v=!0;break;case Lte:return v=i._init,S2(v(i._payload),s,u,h,m)}}if(v)return m=m(i),v=h===""?"."+CP(i,0):h,_te(m)?(u="",v!=null&&(u=v.replace(Pte,"$&/")+"/"),S2(m,s,u,"",function(I){return I})):m!=null&&(RP(m)&&(m=Zqe(m,u+(m.key==null||i&&i.key===m.key?"":(""+m.key).replace(Pte,"$&/")+"/")+v)),s.push(m)),1;v=0;var N=h===""?".":h+":";if(_te(i))for(var O=0;O<i.length;O++)h=i[O],S=N+CP(h,O),v+=S2(h,s,u,S,m);else if(O=qqe(i),typeof O=="function")for(i=O.call(i),O=0;!(h=i.next()).done;)h=h.value,S=N+CP(h,O++),v+=S2(h,s,u,S,m);else if(S==="object"){if(typeof i.then=="function")return S2(Xqe(i),s,u,h,m);throw s=String(i),Error("Objects are not valid as a React child (found: "+(s==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":s)+"). If you meant to render a collection of children, use an array instead.")}return v}function s6(i,s,u){if(i==null)return i;var h=[],m=0;return S2(i,h,"","",function(S){return s.call(u,S,m++)}),h}function Jqe(i){if(i._status===-1){var s=i._result;s=s(),s.then(function(u){(i._status===0||i._status===-1)&&(i._status=1,i._result=u)},function(u){(i._status===0||i._status===-1)&&(i._status=2,i._result=u)}),i._status===-1&&(i._status=0,i._result=s)}if(i._status===1)return i._result.default;throw i._result}var Nte=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Qqe={map:s6,forEach:function(i,s,u){s6(i,function(){s.apply(this,arguments)},u)},count:function(i){var s=0;return s6(i,function(){s++}),s},toArray:function(i){return s6(i,function(s){return s})||[]},only:function(i){if(!RP(i))throw Error("React.Children.only expected to receive a single React element child.");return i}};tn.Activity=Yqe;tn.Children=Qqe;tn.Component=E2;tn.Fragment=zqe;tn.Profiler=Uqe;tn.PureComponent=EP;tn.StrictMode=Bqe;tn.Suspense=Gqe;tn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Yi;tn.__COMPILER_RUNTIME={__proto__:null,c:function(i){return Yi.H.useMemoCache(i)}};tn.cache=function(i){return function(){return i.apply(null,arguments)}};tn.cacheSignal=function(){return null};tn.cloneElement=function(i,s,u){if(i==null)throw Error("The argument must be a React element, but you passed "+i+".");var h=Dte({},i.props),m=i.key;if(s!=null)for(S in s.key!==void 0&&(m=""+s.key),s)!Bte.call(s,S)||S==="key"||S==="__self"||S==="__source"||S==="ref"&&s.ref===void 0||(h[S]=s[S]);var S=arguments.length-2;if(S===1)h.children=u;else if(1<S){for(var v=Array(S),N=0;N<S;N++)v[N]=arguments[N+2];h.children=v}return AP(i.type,m,h)};tn.createContext=function(i){return i={$$typeof:Vqe,_currentValue:i,_currentValue2:i,_threadCount:0,Provider:null,Consumer:null},i.Provider=i,i.Consumer={$$typeof:Hqe,_context:i},i};tn.createElement=function(i,s,u){var h,m={},S=null;if(s!=null)for(h in s.key!==void 0&&(S=""+s.key),s)Bte.call(s,h)&&h!=="key"&&h!=="__self"&&h!=="__source"&&(m[h]=s[h]);var v=arguments.length-2;if(v===1)m.children=u;else if(1<v){for(var N=Array(v),O=0;O<v;O++)N[O]=arguments[O+2];m.children=N}if(i&&i.defaultProps)for(h in v=i.defaultProps,v)m[h]===void 0&&(m[h]=v[h]);return AP(i,S,m)};tn.createRef=function(){return{current:null}};tn.forwardRef=function(i){return{$$typeof:Wqe,render:i}};tn.isValidElement=RP;tn.lazy=function(i){return{$$typeof:Lte,_payload:{_status:-1,_result:i},_init:Jqe}};tn.memo=function(i,s){return{$$typeof:jqe,type:i,compare:s===void 0?null:s}};tn.startTransition=function(i){var s=Yi.T,u={};Yi.T=u;try{var h=i(),m=Yi.S;m!==null&&m(u,h),typeof h=="object"&&h!==null&&typeof h.then=="function"&&h.then(kP,Nte)}catch(S){Nte(S)}finally{s!==null&&u.types!==null&&(s.types=u.types),Yi.T=s}};tn.unstable_useCacheRefresh=function(){return Yi.H.useCacheRefresh()};tn.use=function(i){return Yi.H.use(i)};tn.useActionState=function(i,s,u){return Yi.H.useActionState(i,s,u)};tn.useCallback=function(i,s){return Yi.H.useCallback(i,s)};tn.useContext=function(i){return Yi.H.useContext(i)};tn.useDebugValue=function(){};tn.useDeferredValue=function(i,s){return Yi.H.useDeferredValue(i,s)};tn.useEffect=function(i,s){return Yi.H.useEffect(i,s)};tn.useEffectEvent=function(i){return Yi.H.useEffectEvent(i)};tn.useId=function(){return Yi.H.useId()};tn.useImperativeHandle=function(i,s,u){return Yi.H.useImperativeHandle(i,s,u)};tn.useInsertionEffect=function(i,s){return Yi.H.useInsertionEffect(i,s)};tn.useLayoutEffect=function(i,s){return Yi.H.useLayoutEffect(i,s)};tn.useMemo=function(i,s){return Yi.H.useMemo(i,s)};tn.useOptimistic=function(i,s){return Yi.H.useOptimistic(i,s)};tn.useReducer=function(i,s,u){return Yi.H.useReducer(i,s,u)};tn.useRef=function(i){return Yi.H.useRef(i)};tn.useState=function(i){return Yi.H.useState(i)};tn.useSyncExternalStore=function(i,s,u){return Yi.H.useSyncExternalStore(i,s,u)};tn.useTransition=function(){return Yi.H.useTransition()};tn.version="19.2.7"});var Hte=ar((Jr,l6)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function i(ee,Ee){Object.defineProperty(h.prototype,ee,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Ee[0],Ee[1])}})}function s(ee){return ee===null||typeof ee!="object"?null:(ee=Nr&&ee[Nr]||ee["@@iterator"],typeof ee=="function"?ee:null)}function u(ee,Ee){ee=(ee=ee.constructor)&&(ee.displayName||ee.name)||"ReactClass";var tt=ee+"."+Ee;yn[tt]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",Ee,ee),yn[tt]=!0)}function h(ee,Ee,tt){this.props=ee,this.context=Ee,this.refs=Pn,this.updater=tt||ur}function m(){}function S(ee,Ee,tt){this.props=ee,this.context=Ee,this.refs=Pn,this.updater=tt||ur}function v(){}function N(ee){return""+ee}function O(ee){try{N(ee);var Ee=!1}catch{Ee=!0}if(Ee){Ee=console;var tt=Ee.error,ht=typeof Symbol=="function"&&Symbol.toStringTag&&ee[Symbol.toStringTag]||ee.constructor.name||"Object";return tt.call(Ee,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ht),N(ee)}}function I(ee){if(ee==null)return null;if(typeof ee=="function")return ee.$$typeof===$n?null:ee.displayName||ee.name||null;if(typeof ee=="string")return ee;switch(ee){case _n:return"Fragment";case Me:return"Profiler";case cr:return"StrictMode";case Gt:return"Suspense";case Mt:return"SuspenseList";case hr:return"Activity"}if(typeof ee=="object")switch(typeof ee.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),ee.$$typeof){case kr:return"Portal";case wt:return ee.displayName||"Context";case nt:return(ee._context.displayName||"Context")+".Consumer";case or:var Ee=ee.render;return ee=ee.displayName,ee||(ee=Ee.displayName||Ee.name||"",ee=ee!==""?"ForwardRef("+ee+")":"ForwardRef"),ee;case yt:return Ee=ee.displayName||null,Ee!==null?Ee:I(ee.type)||"Memo";case er:Ee=ee._payload,ee=ee._init;try{return I(ee(Ee))}catch{}}return null}function H(ee){if(ee===_n)return"<>";if(typeof ee=="object"&&ee!==null&&ee.$$typeof===er)return"<...>";try{var Ee=I(ee);return Ee?"<"+Ee+">":"<...>"}catch{return"<...>"}}function M(){var ee=br.A;return ee===null?null:ee.getOwner()}function Y(){return Error("react-stack-top-frame")}function J(ee){if(lo.call(ee,"key")){var Ee=Object.getOwnPropertyDescriptor(ee,"key").get;if(Ee&&Ee.isReactWarning)return!1}return ee.key!==void 0}function we(ee,Ee){function tt(){Un||(Un=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Ee))}tt.isReactWarning=!0,Object.defineProperty(ee,"key",{get:tt,configurable:!0})}function ke(){var ee=I(this.type);return Eo[ee]||(Eo[ee]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),ee=this.props.ref,ee!==void 0?ee:null}function pe(ee,Ee,tt,ht,_t,qt){var Kt=tt.ref;return ee={$$typeof:lr,type:ee,key:Ee,props:tt,_owner:ht},(Kt!==void 0?Kt:null)!==null?Object.defineProperty(ee,"ref",{enumerable:!1,get:ke}):Object.defineProperty(ee,"ref",{enumerable:!1,value:null}),ee._store={},Object.defineProperty(ee._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(ee,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(ee,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:_t}),Object.defineProperty(ee,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:qt}),Object.freeze&&(Object.freeze(ee.props),Object.freeze(ee)),ee}function Fe(ee,Ee){return Ee=pe(ee.type,Ee,ee.props,ee._owner,ee._debugStack,ee._debugTask),ee._store&&(Ee._store.validated=ee._store.validated),Ee}function ze(ee){ft(ee)?ee._store&&(ee._store.validated=1):typeof ee=="object"&&ee!==null&&ee.$$typeof===er&&(ee._payload.status==="fulfilled"?ft(ee._payload.value)&&ee._payload.value._store&&(ee._payload.value._store.validated=1):ee._store&&(ee._store.validated=1))}function ft(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===lr}function St(ee){var Ee={"=":"=0",":":"=2"};return"$"+ee.replace(/[=:]/g,function(tt){return Ee[tt]})}function mt(ee,Ee){return typeof ee=="object"&&ee!==null&&ee.key!=null?(O(ee.key),St(""+ee.key)):Ee.toString(36)}function Ve(ee){switch(ee.status){case"fulfilled":return ee.value;case"rejected":throw ee.reason;default:switch(typeof ee.status=="string"?ee.then(v,v):(ee.status="pending",ee.then(function(Ee){ee.status==="pending"&&(ee.status="fulfilled",ee.value=Ee)},function(Ee){ee.status==="pending"&&(ee.status="rejected",ee.reason=Ee)})),ee.status){case"fulfilled":return ee.value;case"rejected":throw ee.reason}}throw ee}function Lt(ee,Ee,tt,ht,_t){var qt=typeof ee;(qt==="undefined"||qt==="boolean")&&(ee=null);var Kt=!1;if(ee===null)Kt=!0;else switch(qt){case"bigint":case"string":case"number":Kt=!0;break;case"object":switch(ee.$$typeof){case lr:case kr:Kt=!0;break;case er:return Kt=ee._init,Lt(Kt(ee._payload),Ee,tt,ht,_t)}}if(Kt){Kt=ee,_t=_t(Kt);var Pr=ht===""?"."+mt(Kt,0):ht;return xn(_t)?(tt="",Pr!=null&&(tt=Pr.replace(Bo,"$&/")+"/"),Lt(_t,Ee,tt,"",function(Dr){return Dr})):_t!=null&&(ft(_t)&&(_t.key!=null&&(Kt&&Kt.key===_t.key||O(_t.key)),tt=Fe(_t,tt+(_t.key==null||Kt&&Kt.key===_t.key?"":(""+_t.key).replace(Bo,"$&/")+"/")+Pr),ht!==""&&Kt!=null&&ft(Kt)&&Kt.key==null&&Kt._store&&!Kt._store.validated&&(tt._store.validated=2),_t=tt),Ee.push(_t)),1}if(Kt=0,Pr=ht===""?".":ht+":",xn(ee))for(var yr=0;yr<ee.length;yr++)ht=ee[yr],qt=Pr+mt(ht,yr),Kt+=Lt(ht,Ee,tt,qt,_t);else if(yr=s(ee),typeof yr=="function")for(yr===ee.entries&&(kn||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),kn=!0),ee=yr.call(ee),yr=0;!(ht=ee.next()).done;)ht=ht.value,qt=Pr+mt(ht,yr++),Kt+=Lt(ht,Ee,tt,qt,_t);else if(qt==="object"){if(typeof ee.then=="function")return Lt(Ve(ee),Ee,tt,ht,_t);throw Ee=String(ee),Error("Objects are not valid as a React child (found: "+(Ee==="[object Object]"?"object with keys {"+Object.keys(ee).join(", ")+"}":Ee)+"). If you meant to render a collection of children, use an array instead.")}return Kt}function It(ee,Ee,tt){if(ee==null)return ee;var ht=[],_t=0;return Lt(ee,ht,"","",function(qt){return Ee.call(tt,qt,_t++)}),ht}function Pt(ee){if(ee._status===-1){var Ee=ee._ioInfo;Ee!=null&&(Ee.start=Ee.end=performance.now()),Ee=ee._result;var tt=Ee();if(tt.then(function(_t){if(ee._status===0||ee._status===-1){ee._status=1,ee._result=_t;var qt=ee._ioInfo;qt!=null&&(qt.end=performance.now()),tt.status===void 0&&(tt.status="fulfilled",tt.value=_t)}},function(_t){if(ee._status===0||ee._status===-1){ee._status=2,ee._result=_t;var qt=ee._ioInfo;qt!=null&&(qt.end=performance.now()),tt.status===void 0&&(tt.status="rejected",tt.reason=_t)}}),Ee=ee._ioInfo,Ee!=null){Ee.value=tt;var ht=tt.displayName;typeof ht=="string"&&(Ee.name=ht)}ee._status===-1&&(ee._status=0,ee._result=tt)}if(ee._status===1)return Ee=ee._result,Ee===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
8
8
 
9
9
  Your code should look like:
10
10
  const MyComponent = lazy(() => import('./MyComponent'))
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{f as k}from"./EFB2YVY2.js";import{a as B}from"./JCP37EY3.js";import{a as x,e as P,f as v,i as H,j as C,k as p,l as M}from"./LD5MEXEL.js";import{n as N}from"./UW4UC7ZI.js";function y(e){let t=new Map(e.pathParams.map(r=>[r.name,r])),n=[];for(let r of e.path.matchAll(/\{([^{}]+)\}/g)){let s=t.get(r[1]);s!==void 0&&n.push(s)}return n}function I(e){let t=y(e),n=e.queryParams.length>0,r=!!e.requestBody,s=e.headerParams.length>0,o=e.cookieParams.length>0;return{hasQuery:n,hasBody:r,hasHeaders:s,hasCookies:o,hasInputs:t.length>0||n||r||s||o,varsRequired:t.length>0||e.queryParams.some(a=>a.required)||(e.requestBody?.required??!1)||e.headerParams.some(a=>a.required)||e.cookieParams.some(a=>a.required),variablesTypeName:`${p(e.name)}Variables`}}var E=" ";function $(e,t,n){let r=C(e,t);return r===void 0?[]:[`${n}/**`,...H(r).split(`
7
+ import{a as x,e as P,f as v,i as H,j as C,k as p,l as M}from"./DP3T6VZX.js";import{f as k}from"./UMN7TKTH.js";import{n as N,o as B}from"./ACAPGKSR.js";function y(e){let t=new Map(e.pathParams.map(r=>[r.name,r])),n=[];for(let r of e.path.matchAll(/\{([^{}]+)\}/g)){let s=t.get(r[1]);s!==void 0&&n.push(s)}return n}function I(e){let t=y(e),n=e.queryParams.length>0,r=!!e.requestBody,s=e.headerParams.length>0,o=e.cookieParams.length>0;return{hasQuery:n,hasBody:r,hasHeaders:s,hasCookies:o,hasInputs:t.length>0||n||r||s||o,varsRequired:t.length>0||e.queryParams.some(a=>a.required)||(e.requestBody?.required??!1)||e.headerParams.some(a=>a.required)||e.cookieParams.some(a=>a.required),variablesTypeName:`${p(e.name)}Variables`}}var E=" ";function $(e,t,n){let r=C(e,t);return r===void 0?[]:[`${n}/**`,...H(r).split(`
8
8
  `).map(s=>`${n} * ${s}`.replace(/ +$/,"")),`${n} */`]}function O(e){return typeof e=="string"?JSON.stringify(e):String(e)}function F(e,t,n){switch(e){case"string":return t?.format==="binary"?"Blob":n==="Date"&&(t?.format==="date-time"||t?.format==="date")?"Date":"string";case"number":case"integer":return"number";case"boolean":return"boolean"}}function j(e){return e.kind==="union"||e.kind==="intersection"||e.kind==="enum"&&e.values.length>1}function c(e,t="string",n=""){switch(e.kind){case"scalar":return F(e.scalar,e.metadata,t);case"ref":return e.name;case"literal":return O(e.value);case"enum":return e.values.map(O).join(" | ");case"null":return"null";case"unknown":return"unknown";case"array":{let r=c(e.items,t,n);return j(e.items)?`(${r})[]`:`${r}[]`}case"record":return`Record<string, ${c(e.value,t,n)}>`;case"object":{if(e.properties.length===0)return"{}";let r=n+E;return`{
9
9
  ${e.properties.flatMap(o=>K(o,t,r)).join(`
10
10
  `)}
@@ -0,0 +1,22 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ var __filename = __fileURLToPath(import.meta.url);
6
+ var __dirname = __pathDirname(__filename);
7
+ import{a as B,e as U,g as K,h as O,k as V}from"./DP3T6VZX.js";import{g as F,i as L,m as q,o as J}from"./ACAPGKSR.js";import{c as g}from"./DORXGE7Z.js";import{join as he}from"node:path";var j=class{code;constructor(n){this.code=n}};function Y(e,n,r={}){let t=new Map(n.map(o=>[o.name,o.schema])),s=b(e,t,new Set,r.dateType??"string");return s===x?null:s}var x=Symbol("cycle");function Z(e,n){if(e.kind==="union"){for(let t of e.members){let s=Z(t,n);if(s)return s}return}if(e.kind!=="scalar")return;let r=e.metadata?.format;if(r==="binary")return new j("new Blob([])");if(n==="Date"){if(r==="date-time")return new j('new Date("2024-01-01T00:00:00Z")');if(r==="date")return new j('new Date("2024-01-01")')}}function C(e,n){let r=new Map,t=[],s=!1;for(let o of e){if(o.kind==="unknown")continue;let a=ne(o,n);if(a?.kind!=="object"){t.push(o);continue}s=!0;for(let i of a.properties){let u=H(i.schema,n,new Set),c=r.get(i.name);(c===void 0||u>=c.rank)&&r.set(i.name,{schema:i.schema,required:i.required||(c?.required??!1),writeOnly:i.writeOnly===!0||(c?.writeOnly??!1),rank:u})}}return s?{merged:{kind:"object",properties:[...r.entries()].map(([o,a])=>({name:o,schema:a.schema,required:a.required,...a.writeOnly?{writeOnly:!0}:{}}))},rest:t}:{merged:void 0,rest:t}}function ne(e,n){let r=new Set,t=e;for(;t?.kind==="ref";){if(r.has(t.name))return;r.add(t.name),t=n.get(t.name)}return t}function H(e,n,r){switch(e.kind){case"literal":return 40;case"enum":return e.values.length===1?40:30;case"union":return Math.max(0,...e.members.map(t=>H(t,n,r)))-1;case"ref":{if(r.has(e.name))return 20;let t=n.get(e.name);return t===void 0?20:H(t,n,new Set(r).add(e.name))}case"null":case"unknown":return 10;default:return 20}}function b(e,n,r,t){let s=Z(e,t);if(s)return s;let o=e.metadata,a=i=>{if(i===null)return e.kind==="null"||e.kind==="union"&&e.members.some(u=>u.kind==="null");if(e.kind==="enum")return e.values.includes(i);if(e.kind==="literal")return i===e.value;if(e.kind==="scalar"&&(e.scalar==="integer"||e.scalar==="number")&&typeof i=="number"){let{min:u,max:c,step:d}=E(e.scalar,o);return(d===void 0||Number.isInteger(Number((i/d).toPrecision(12))))&&(u===void 0||i>=u)&&(c===void 0||i<=c)}return!0};if(o?.example!==void 0&&a(o.example))return o.example;if(o?.default!==void 0&&a(o.default))return o.default;switch(e.kind){case"scalar":return te(e.scalar,o);case"array":{let i=b(e.items,n,r,t);return i===x?[]:[i]}case"object":return Object.fromEntries(e.properties.flatMap(i=>{if(A(i))return[];let u=b(i.schema,n,r,t);return u===x?i.required?[[i.name,null]]:[]:[[i.name,u]]}));case"record":{let i=b(e.value,n,r,t);return i===x?{}:{key:i}}case"enum":return e.values[0];case"literal":return e.value;case"union":{for(let i of e.members){let u=b(i,n,r,t);if(u!==x)return u}return e.members.length>0?x:null}case"intersection":{let{merged:i,rest:u}=C(e.members,n),c=u.map(m=>b(m,n,r,t)).filter(m=>m!==x);if(i){let m=b(i,n,r,t),y=g(m)?m:{};for(let k of c)g(k)&&Object.assign(y,k);return y}let d=c.filter(g);return d.length>0?d.reduce((m,y)=>Object.assign(m,y),{}):c.length>0?c[0]:{}}case"omit":{let i=n.get(e.base);if(!i)return null;let u=b(i,n,r,t);if(g(u)){let c={...u};for(let d of e.keys)delete c[d];return c}return u}case"ref":{if(r.has(e.name))return x;let i=n.get(e.name);if(!i)return null;r.add(e.name);let u=b(i,n,r,t);return r.delete(e.name),u}case"null":case"unknown":return null}}function A(e){return e.writeOnly===!0&&!e.required}function E(e,n){let r=n?.multipleOf??(e==="integer"?1:void 0),t=(u,c,d)=>Number((d(u/c)*c).toPrecision(15)),s=[],o=[];if(n?.minimum!==void 0){let u=n.minimum;s.push(r===void 0?u:t(u,r,Math.ceil))}if(n?.exclusiveMinimum!==void 0){let u=n.exclusiveMinimum;s.push(r===void 0?u+1:t(u,r,c=>Math.floor(c)+1))}if(n?.maximum!==void 0){let u=n.maximum;o.push(r===void 0?u:t(u,r,Math.floor))}if(n?.exclusiveMaximum!==void 0){let u=n.exclusiveMaximum;o.push(r===void 0?u-1:t(u,r,c=>Math.ceil(c)-1))}let a=s.length>0?Math.max(...s):void 0,i=o.length>0?Math.min(...o):void 0;if(r===void 0&&a!==void 0&&i!==void 0&&a>i){let u=Math.max(n?.minimum??-1/0,n?.exclusiveMinimum??-1/0),c=Math.min(n?.maximum??1/0,n?.exclusiveMaximum??1/0),d=(u+c)/2;return{min:d,max:d}}return{min:a,max:i,step:r}}function re(e,n){let{min:r,max:t}=E(e,n);return r!==void 0&&r>0?r:t!==void 0&&t<0?t:0}function te(e,n){if(e==="boolean")return!0;if(e==="integer"||e==="number")return re(e,n);switch(n?.format){case"email":return"user@example.com";case"uuid":return"00000000-0000-4000-8000-000000000000";case"date-time":return"2024-01-01T00:00:00Z";case"date":return"2024-01-01";case"uri":case"url":return"https://example.com";default:return"string"}}var f=e=>({kind:"expr",text:e}),p=e=>({kind:"object",entries:e});function l(e){return e.kind==="object"}function P(e,n){return l(e)?p([...e.entries,{spread:n}]):e}var G=" ";function w(e,n){switch(e.kind){case"expr":return e.text;case"wrap":return`${e.before}${w(e.value,n)}${e.after}`;case"array":{if(e.items.length===0)return"[]";let r=n+G;return`[
8
+ ${e.items.map((s,o)=>`${r}${w(s,r)}${o===e.items.length-1?"":","}`).join(`
9
+ `)}
10
+ ${n}]`}case"object":{if(e.entries.length===0)return"{}";let r=n+G;return`{
11
+ ${e.entries.map((s,o)=>{let a=o===e.entries.length-1?"":",";if("spread"in s)return`${r}...${s.spread}${a}`;let i=U(s.key)===s.key?s.key:K(s.key);return`${r}${i}: ${w(s.value,r)}${a}`}).join(`
12
+ `)}
13
+ ${n}}`}}}function W(e,n,r={}){let t=new Map(n.map(o=>[o.name,o.schema])),s=h(e,t,new Set,r.dateType??"string");return s===$?f("null"):s}var $=Symbol("cycle");function h(e,n,r,t){switch(e.kind){case"scalar":return f(se(e.scalar,e.metadata,t));case"array":{let s=h(e.items,n,r,t);return s===$?f("[]"):oe(s)}case"object":return p(e.properties.flatMap(s=>{if(A(s))return[];let o=h(s.schema,n,r,t);return o===$?s.required?[{key:s.name,value:f("null")}]:[]:[{key:s.name,value:o}]}));case"record":{let s=h(e.value,n,r,t);return s===$?f("{}"):p([{key:"key",value:s}])}case"enum":return f(`faker.helpers.arrayElement([${e.values.map(s=>O(s)).join(", ")}] as const)`);case"literal":return f(O(e.value));case"union":{for(let s of e.members){let o=h(s,n,r,t);if(o!==$)return o}return e.members.length>0?$:f("null")}case"intersection":{let{merged:s,rest:o}=C(e.members,n),a=o.map(u=>h(u,n,r,t)).filter(u=>u!==$);if(s){let u=h(s,n,r,t),c=u!==$&&l(u)?u.entries:[],d=a.filter(l).flatMap(m=>m.entries);return p([...c,...d])}let i=a.filter(l);return i.length>0?p(i.flatMap(u=>u.entries)):a[0]??p([])}case"omit":return ie(e.base,e.keys,n,r,t);case"ref":{if(r.has(e.name))return $;let s=n.get(e.name);if(!s)return f("null");r.add(e.name);let o=h(s,n,r,t);return r.delete(e.name),o}case"null":case"unknown":return f("null")}}function se(e,n,r){if(n?.format==="binary")return"new Blob([])";if(e==="boolean")return"faker.datatype.boolean()";if(e==="integer")return`faker.number.int(${Q(e,n)})`;if(e==="number")return`faker.number.float(${Q(e,n)})`;switch(n?.format){case"email":return"faker.internet.email()";case"uuid":return"faker.string.uuid()";case"uri":case"url":return"faker.internet.url()";case"hostname":return"faker.internet.domainName()";case"ipv4":return"faker.internet.ipv4()";case"date-time":return z(r,!1);case"date":return z(r,!0);default:return"faker.lorem.word()"}}function z(e,n){if(e==="Date")return"faker.date.recent()";let r="faker.date.recent().toISOString()";return n?`${r}.slice(0, 10)`:r}function Q(e,n){let{min:r,max:t,step:s=1}=E(e,n);return r===void 0&&t===void 0?"":`{ ${[`min: ${r??(t??0)-100*s}`,`max: ${t??(r??0)+100*s}`,...n?.multipleOf!==void 0?[`multipleOf: ${n.multipleOf}`]:[]].join(", ")} }`}function oe(e){let n=l(e);return{kind:"wrap",before:`faker.helpers.multiple(() => ${n?"(":""}`,value:e,after:`${n?")":""}, { count: 1 })`}}function ie(e,n,r,t,s){let o=r.get(e);if(!o)return f("null");let a=h(o,r,t,s);if(a===$||!l(a))return a;let i=new Set(n);return p(a.entries.filter(u=>"spread"in u||!i.has(u.key)))}var X=" ";function S(e,n,r){return r.mockData==="faker"?W(e,n.schemas,{dateType:r.dateType}):v(Y(e,n.schemas,{dateType:r.dateType}))}function _(e,n){let r=J(e.services);if(r.length===0)return"";let t=[...ue(e,n),...n.mockData==="faker"&&n.mockSeed!==void 0?[`faker.seed(${n.mockSeed});`]:[],...e.schemas.map(o=>ae(o,e,n)),...r.flatMap(o=>[ce(o,e,n),...o.errorResponses.length>0?[fe(o,e,n)]:[]]),be(r)];return`import { http, HttpResponse } from 'msw';
14
+ ${n.mockData==="faker"?`import { faker } from '@faker-js/faker';
15
+ `:""}
16
+ ${t.join(`
17
+
18
+ `)}`}function ue(e,n){return e.schemas.length===0?[]:[`import type { ${e.schemas.map(t=>t.name).sort().join(", ")} } from ${JSON.stringify(n.sdkModule)};`]}function ae(e,n,r){let t=V(e.name),s=S(e.schema,n,r),o=e.name,a=l(s),i=w(a?P(s,"overrides"):s,X),u=a?e.schema.kind==="union"?`${i} as ${o}`:i:`overrides ?? ${i}`,c=a?`Partial<${o}>`:o;return[`export function create${t}(overrides?: ${c}): ${o} {`,`${X}return ${u};`,"}"].join(`
19
+ `)}function R(e){if(!B(e))throw new Error(`Unsafe identifier in mock emission: ${JSON.stringify(e)}`);return e}function ce(e,n,r){let s=T(e,n,r)??"",o=`http.${R(e.method)}(${JSON.stringify(ee(e.path))}, ${me(e,n,r)})`;return`export const ${R(e.name)}Handler = (${s}) => ${o};`}function fe(e,n,r){let t=e.errorResponses[0],o=`() => HttpResponse.json(body ?? ${w(S(t.schema,n,r),"")}, { status })`,a=`http.${R(e.method)}(${JSON.stringify(ee(e.path))}, ${o})`;return`export const ${R(e.name)}ErrorHandler = (status: ${de(e)}, body?: ${le(e)}) => ${a};`}function de(e){let r=[...new Set(e.errorResponses.filter(t=>typeof t.status=="number").map(t=>t.status))].map(String);return e.errorResponses.some(t=>typeof t.status!="number")&&r.push("number"),r.join(" | ")}function le(e){let n=new Set,r=!1;for(let s of e.errorResponses)s.schema.kind==="ref"?n.add(s.schema.name):r=!0;let t=[...n];return(r||t.length===0)&&t.push("unknown"),t.join(" | ")}function T(e,n,r){let t=e.successResponses[0];if(!(!t||t.schema.kind==="unknown")){if(t.schema.kind==="ref"){let s=t.schema.name;return`override?: ${l(S(t.schema,n,r))?`Partial<${s}>`:s}`}if(l(S(t.schema,n,r))){if(t.schema.kind==="omit"){let s=t.schema.keys.map(o=>JSON.stringify(o)).join(" | ");return`override?: Partial<Omit<${t.schema.base}, ${s}>>`}return"override?: Record<string, unknown>"}}}function me(e,n,r){let t=r.pagination?.get(e.name)?.spec,s=e.successResponses[0];if(!t||t.style==="link"||!s)return`() => ${$e(e,n,r)}`;let o=S(s.schema,n,r),a=N(s.status),i=T(e,n,r)!==void 0,u=k=>l(k)?P(k,"override"):i?{kind:"wrap",before:"override ?? ",value:k,after:""}:k,c=k=>{let M=w(k,"");return a===200?`HttpResponse.json(${M})`:`HttpResponse.json(${M}, { status: ${a} })`};if(t.style==="cursor"||t.style==="body-link"){let k=t.style==="cursor"?t.nextCursor:t.nextLink,M=I(o,D(k),ke(s.schema,k,n));return t.style==="cursor"&&t.hasMore!==void 0&&(M=I(M,D(t.hasMore),f("false"))),`() => ${c(u(M))}`}let d=t.style==="page"?1:0,m=`Number(new URL(request.url).searchParams.get(${O(t.param)}) ?? ${d})`,y=pe(o,D(t.items));return`({ request }) => ${m} > ${d} ? ${c(y)} : ${c(u(o))}`}function pe(e,n){if(n.length===0||!l(e))return I(e,n,f("[]"));let[r,...t]=n,s=i=>!("spread"in i)&&i.key===r,o=e.entries.find(s),a=o&&!("spread"in o)?o.value:p([]);return p([...e.entries.filter(i=>!s(i)),{spread:"override"},{key:r,value:I(a,t,f("[]"))}])}function ke(e,n,r){let t=q(e,n,r);if(t?.kind==="null"||t&&L(t))return f("null");let s=D(n),o=q(e,n.slice(0,n.lastIndexOf("/")),r);return(o&&F(o,r)?.properties.find(i=>i.name===s.at(-1)))?.required===!1?void 0:f('""')}function D(e){return e===""?[]:e.slice(1).split("/").map(n=>n.replaceAll("~1","/").replaceAll("~0","~"))}function I(e,n,r){if(n.length===0)return r??e;if(!l(e))return e;let[t,...s]=n,o=e.entries.some(i=>!("spread"in i)&&i.key===t),a=e.entries.flatMap(i=>"spread"in i||i.key!==t?[i]:s.length>0?[{key:t,value:I(i.value,s,r)}]:r===void 0?[]:[{key:t,value:r}]);return!o&&s.length===0&&r!==void 0&&a.push({key:t,value:r}),p(a)}function $e(e,n,r){let t=e.successResponses[0],s=N(t?.status);if(!t||t.schema.kind==="unknown")return`new HttpResponse(null, { status: ${s} })`;let o=t.schema.kind==="ref"?`create${V(t.schema.name)}(override)`:w(P(S(t.schema,n,r),"override"),"");return`HttpResponse.json(${s===200?o:`${o}, { status: ${s} }`})`}function N(e){return typeof e=="number"?e:200}function be(e){return`export const handlers = [${e.map(r=>`${R(r.name)}Handler()`).join(", ")}];`}function ee(e){return`*${e.replace(/\{([^{}]+)\}/g,":$1")}`}function v(e){return e instanceof j?f(e.code):Array.isArray(e)?{kind:"array",items:e.map(v)}:g(e)?p(Object.entries(e).map(([n,r])=>({key:n,value:v(r)}))):f(O(e))}var Ae=({model:e,output:n,banner:r,emit:t,pagination:s})=>{let o=r.map(i=>`// ${i}`).join(`
20
+ `),a=_(e,{sdkModule:`./${n.stem}.${t.importExt??"js"}`,dateType:t.dateType,mockData:t.mockData,mockSeed:t.mockSeed,pagination:s});return a===""?[]:[{path:he(n.dir,`${n.stem}.mocks.ts`),content:`${o}
21
+
22
+ ${a}`}]};export{Ae as a};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ var __filename = __fileURLToPath(import.meta.url);
6
+ var __dirname = __pathDirname(__filename);
7
+ import{a as l}from"./IZMDARCL.js";import{a as R,b as u,c as f,d}from"./QZJAXPYF.js";import{d as y,e as G,f as x}from"./5BQNATJZ.js";import{c as g,d as S,e as h}from"./DVLD4FET.js";import{c as k,d as v,e as b}from"./HAGYQ4BK.js";import{a as D,b as E,c as q,d as z}from"./TZROZMVE.js";import{a as o}from"./7HFLPQAB.js";import{a,b as p,c as s}from"./XZIK3H6V.js";import"./BE4Z5FOC.js";import{a as m}from"./2NYYNBAC.js";import{a as i}from"./ACECCMWJ.js";import{a as c}from"./ILYXMZRT.js";import"./L2O63VRM.js";import{a as I,d as M,e as N}from"./IYV7EO2J.js";import{e as T,h as j,k as w}from"./DP3T6VZX.js";import{a as rr,b as er,c as tr,d as or,e as nr,f as ar,g as pr,h as sr,i as mr,j as ir,k as cr}from"./UMN7TKTH.js";import{a as _,b as B,c as F,d as J,e as Q,f as H,g as K,h as P,i as V,j as W,k as X,l as Y,m as Z,n as $}from"./ACAPGKSR.js";import{a as U}from"./WZXA5XPB.js";import"./DORXGE7Z.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";var A={typescript:{run:a,sample:s,docs:p},zod:{run:m},transformers:{run:i},"tanstack-query":{run:o("react")},"tanstack-query-vue":{run:o("vue")},"tanstack-query-svelte":{run:o("svelte")},"tanstack-query-solid":{run:o("solid")},swr:{run:c},mock:{run:l},cli:{run:u,sample:d,docs:f},python:{run:y,sample:G,docs:x},go:{run:g,sample:S,docs:h},php:{run:k,sample:v,docs:b}},L=Object.fromEntries(Object.entries(D).map(([e,{load:r,...t}])=>[e,{...t,...A[e]}]));function n(){return new Map(Object.entries(L))}function C(e,r,t=n(),O){E(e,r,t,O)}function Er(e,r){let t=r.registry??n();return C(r.generators,r.emit,t,r.outputMode),q(e,{...r,registry:t})}export{cr as AUTHORING_HELPER_NAMES,U as NotSupportedError,_ as Printer,F as RESERVED_WORDS,B as casing,j as codeLiteral,Er as collectGeneratedFiles,H as deref,P as discriminatorCases,Y as docText,X as enumValues,K as flattenAllOf,z as generateClient,$ as headerCoerceType,J as identifierFor,ar as isBinaryContentType,or as isMultipartBody,V as isNullable,nr as isUntypedMultipartBody,er as jsonSuccessSchema,I as operationSignature,mr as paginationItemSchema,rr as paginationRuleFor,w as pascalCase,R as renderComposedCliEntry,ir as renderReferencePage,T as safeIdent,Z as schemaAtPointer,sr as securityRequirements,pr as serverUrlParts,tr as sseResponse,M as tsJsdoc,N as tsType,Q as uniqueIdentifiers,W as unwrapNullable};