qs.js 84 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328
  1. import {
  2. __commonJS
  3. } from "./chunk-2LSFTFF7.js";
  4. // node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js
  5. var require_type = __commonJS({
  6. "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports, module) {
  7. "use strict";
  8. module.exports = TypeError;
  9. }
  10. });
  11. // (disabled):node_modules/.pnpm/object-inspect@1.13.4/node_modules/object-inspect/util.inspect
  12. var require_util = __commonJS({
  13. "(disabled):node_modules/.pnpm/object-inspect@1.13.4/node_modules/object-inspect/util.inspect"() {
  14. }
  15. });
  16. // node_modules/.pnpm/object-inspect@1.13.4/node_modules/object-inspect/index.js
  17. var require_object_inspect = __commonJS({
  18. "node_modules/.pnpm/object-inspect@1.13.4/node_modules/object-inspect/index.js"(exports, module) {
  19. var hasMap = typeof Map === "function" && Map.prototype;
  20. var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
  21. var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
  22. var mapForEach = hasMap && Map.prototype.forEach;
  23. var hasSet = typeof Set === "function" && Set.prototype;
  24. var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
  25. var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
  26. var setForEach = hasSet && Set.prototype.forEach;
  27. var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
  28. var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
  29. var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
  30. var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
  31. var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
  32. var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
  33. var booleanValueOf = Boolean.prototype.valueOf;
  34. var objectToString = Object.prototype.toString;
  35. var functionToString = Function.prototype.toString;
  36. var $match = String.prototype.match;
  37. var $slice = String.prototype.slice;
  38. var $replace = String.prototype.replace;
  39. var $toUpperCase = String.prototype.toUpperCase;
  40. var $toLowerCase = String.prototype.toLowerCase;
  41. var $test = RegExp.prototype.test;
  42. var $concat = Array.prototype.concat;
  43. var $join = Array.prototype.join;
  44. var $arrSlice = Array.prototype.slice;
  45. var $floor = Math.floor;
  46. var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
  47. var gOPS = Object.getOwnPropertySymbols;
  48. var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
  49. var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
  50. var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
  51. var isEnumerable = Object.prototype.propertyIsEnumerable;
  52. var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
  53. return O.__proto__;
  54. } : null);
  55. function addNumericSeparator(num, str) {
  56. if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
  57. return str;
  58. }
  59. var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
  60. if (typeof num === "number") {
  61. var int = num < 0 ? -$floor(-num) : $floor(num);
  62. if (int !== num) {
  63. var intStr = String(int);
  64. var dec = $slice.call(str, intStr.length + 1);
  65. return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
  66. }
  67. }
  68. return $replace.call(str, sepRegex, "$&_");
  69. }
  70. var utilInspect = require_util();
  71. var inspectCustom = utilInspect.custom;
  72. var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
  73. var quotes = {
  74. __proto__: null,
  75. "double": '"',
  76. single: "'"
  77. };
  78. var quoteREs = {
  79. __proto__: null,
  80. "double": /(["\\])/g,
  81. single: /(['\\])/g
  82. };
  83. module.exports = function inspect_(obj, options, depth, seen) {
  84. var opts = options || {};
  85. if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) {
  86. throw new TypeError('option "quoteStyle" must be "single" or "double"');
  87. }
  88. if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
  89. throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
  90. }
  91. var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
  92. if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
  93. throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
  94. }
  95. if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
  96. throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
  97. }
  98. if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
  99. throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
  100. }
  101. var numericSeparator = opts.numericSeparator;
  102. if (typeof obj === "undefined") {
  103. return "undefined";
  104. }
  105. if (obj === null) {
  106. return "null";
  107. }
  108. if (typeof obj === "boolean") {
  109. return obj ? "true" : "false";
  110. }
  111. if (typeof obj === "string") {
  112. return inspectString(obj, opts);
  113. }
  114. if (typeof obj === "number") {
  115. if (obj === 0) {
  116. return Infinity / obj > 0 ? "0" : "-0";
  117. }
  118. var str = String(obj);
  119. return numericSeparator ? addNumericSeparator(obj, str) : str;
  120. }
  121. if (typeof obj === "bigint") {
  122. var bigIntStr = String(obj) + "n";
  123. return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
  124. }
  125. var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
  126. if (typeof depth === "undefined") {
  127. depth = 0;
  128. }
  129. if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
  130. return isArray(obj) ? "[Array]" : "[Object]";
  131. }
  132. var indent = getIndent(opts, depth);
  133. if (typeof seen === "undefined") {
  134. seen = [];
  135. } else if (indexOf(seen, obj) >= 0) {
  136. return "[Circular]";
  137. }
  138. function inspect(value, from, noIndent) {
  139. if (from) {
  140. seen = $arrSlice.call(seen);
  141. seen.push(from);
  142. }
  143. if (noIndent) {
  144. var newOpts = {
  145. depth: opts.depth
  146. };
  147. if (has(opts, "quoteStyle")) {
  148. newOpts.quoteStyle = opts.quoteStyle;
  149. }
  150. return inspect_(value, newOpts, depth + 1, seen);
  151. }
  152. return inspect_(value, opts, depth + 1, seen);
  153. }
  154. if (typeof obj === "function" && !isRegExp(obj)) {
  155. var name = nameOf(obj);
  156. var keys = arrObjKeys(obj, inspect);
  157. return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
  158. }
  159. if (isSymbol(obj)) {
  160. var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
  161. return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
  162. }
  163. if (isElement(obj)) {
  164. var s = "<" + $toLowerCase.call(String(obj.nodeName));
  165. var attrs = obj.attributes || [];
  166. for (var i = 0; i < attrs.length; i++) {
  167. s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
  168. }
  169. s += ">";
  170. if (obj.childNodes && obj.childNodes.length) {
  171. s += "...";
  172. }
  173. s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
  174. return s;
  175. }
  176. if (isArray(obj)) {
  177. if (obj.length === 0) {
  178. return "[]";
  179. }
  180. var xs = arrObjKeys(obj, inspect);
  181. if (indent && !singleLineValues(xs)) {
  182. return "[" + indentedJoin(xs, indent) + "]";
  183. }
  184. return "[ " + $join.call(xs, ", ") + " ]";
  185. }
  186. if (isError(obj)) {
  187. var parts = arrObjKeys(obj, inspect);
  188. if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
  189. return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
  190. }
  191. if (parts.length === 0) {
  192. return "[" + String(obj) + "]";
  193. }
  194. return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
  195. }
  196. if (typeof obj === "object" && customInspect) {
  197. if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
  198. return utilInspect(obj, { depth: maxDepth - depth });
  199. } else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
  200. return obj.inspect();
  201. }
  202. }
  203. if (isMap(obj)) {
  204. var mapParts = [];
  205. if (mapForEach) {
  206. mapForEach.call(obj, function(value, key) {
  207. mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
  208. });
  209. }
  210. return collectionOf("Map", mapSize.call(obj), mapParts, indent);
  211. }
  212. if (isSet(obj)) {
  213. var setParts = [];
  214. if (setForEach) {
  215. setForEach.call(obj, function(value) {
  216. setParts.push(inspect(value, obj));
  217. });
  218. }
  219. return collectionOf("Set", setSize.call(obj), setParts, indent);
  220. }
  221. if (isWeakMap(obj)) {
  222. return weakCollectionOf("WeakMap");
  223. }
  224. if (isWeakSet(obj)) {
  225. return weakCollectionOf("WeakSet");
  226. }
  227. if (isWeakRef(obj)) {
  228. return weakCollectionOf("WeakRef");
  229. }
  230. if (isNumber(obj)) {
  231. return markBoxed(inspect(Number(obj)));
  232. }
  233. if (isBigInt(obj)) {
  234. return markBoxed(inspect(bigIntValueOf.call(obj)));
  235. }
  236. if (isBoolean(obj)) {
  237. return markBoxed(booleanValueOf.call(obj));
  238. }
  239. if (isString(obj)) {
  240. return markBoxed(inspect(String(obj)));
  241. }
  242. if (typeof window !== "undefined" && obj === window) {
  243. return "{ [object Window] }";
  244. }
  245. if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) {
  246. return "{ [object globalThis] }";
  247. }
  248. if (!isDate(obj) && !isRegExp(obj)) {
  249. var ys = arrObjKeys(obj, inspect);
  250. var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
  251. var protoTag = obj instanceof Object ? "" : "null prototype";
  252. var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
  253. var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
  254. var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
  255. if (ys.length === 0) {
  256. return tag + "{}";
  257. }
  258. if (indent) {
  259. return tag + "{" + indentedJoin(ys, indent) + "}";
  260. }
  261. return tag + "{ " + $join.call(ys, ", ") + " }";
  262. }
  263. return String(obj);
  264. };
  265. function wrapQuotes(s, defaultStyle, opts) {
  266. var style = opts.quoteStyle || defaultStyle;
  267. var quoteChar = quotes[style];
  268. return quoteChar + s + quoteChar;
  269. }
  270. function quote(s) {
  271. return $replace.call(String(s), /"/g, "&quot;");
  272. }
  273. function canTrustToString(obj) {
  274. return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
  275. }
  276. function isArray(obj) {
  277. return toStr(obj) === "[object Array]" && canTrustToString(obj);
  278. }
  279. function isDate(obj) {
  280. return toStr(obj) === "[object Date]" && canTrustToString(obj);
  281. }
  282. function isRegExp(obj) {
  283. return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
  284. }
  285. function isError(obj) {
  286. return toStr(obj) === "[object Error]" && canTrustToString(obj);
  287. }
  288. function isString(obj) {
  289. return toStr(obj) === "[object String]" && canTrustToString(obj);
  290. }
  291. function isNumber(obj) {
  292. return toStr(obj) === "[object Number]" && canTrustToString(obj);
  293. }
  294. function isBoolean(obj) {
  295. return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
  296. }
  297. function isSymbol(obj) {
  298. if (hasShammedSymbols) {
  299. return obj && typeof obj === "object" && obj instanceof Symbol;
  300. }
  301. if (typeof obj === "symbol") {
  302. return true;
  303. }
  304. if (!obj || typeof obj !== "object" || !symToString) {
  305. return false;
  306. }
  307. try {
  308. symToString.call(obj);
  309. return true;
  310. } catch (e) {
  311. }
  312. return false;
  313. }
  314. function isBigInt(obj) {
  315. if (!obj || typeof obj !== "object" || !bigIntValueOf) {
  316. return false;
  317. }
  318. try {
  319. bigIntValueOf.call(obj);
  320. return true;
  321. } catch (e) {
  322. }
  323. return false;
  324. }
  325. var hasOwn = Object.prototype.hasOwnProperty || function(key) {
  326. return key in this;
  327. };
  328. function has(obj, key) {
  329. return hasOwn.call(obj, key);
  330. }
  331. function toStr(obj) {
  332. return objectToString.call(obj);
  333. }
  334. function nameOf(f) {
  335. if (f.name) {
  336. return f.name;
  337. }
  338. var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
  339. if (m) {
  340. return m[1];
  341. }
  342. return null;
  343. }
  344. function indexOf(xs, x) {
  345. if (xs.indexOf) {
  346. return xs.indexOf(x);
  347. }
  348. for (var i = 0, l = xs.length; i < l; i++) {
  349. if (xs[i] === x) {
  350. return i;
  351. }
  352. }
  353. return -1;
  354. }
  355. function isMap(x) {
  356. if (!mapSize || !x || typeof x !== "object") {
  357. return false;
  358. }
  359. try {
  360. mapSize.call(x);
  361. try {
  362. setSize.call(x);
  363. } catch (s) {
  364. return true;
  365. }
  366. return x instanceof Map;
  367. } catch (e) {
  368. }
  369. return false;
  370. }
  371. function isWeakMap(x) {
  372. if (!weakMapHas || !x || typeof x !== "object") {
  373. return false;
  374. }
  375. try {
  376. weakMapHas.call(x, weakMapHas);
  377. try {
  378. weakSetHas.call(x, weakSetHas);
  379. } catch (s) {
  380. return true;
  381. }
  382. return x instanceof WeakMap;
  383. } catch (e) {
  384. }
  385. return false;
  386. }
  387. function isWeakRef(x) {
  388. if (!weakRefDeref || !x || typeof x !== "object") {
  389. return false;
  390. }
  391. try {
  392. weakRefDeref.call(x);
  393. return true;
  394. } catch (e) {
  395. }
  396. return false;
  397. }
  398. function isSet(x) {
  399. if (!setSize || !x || typeof x !== "object") {
  400. return false;
  401. }
  402. try {
  403. setSize.call(x);
  404. try {
  405. mapSize.call(x);
  406. } catch (m) {
  407. return true;
  408. }
  409. return x instanceof Set;
  410. } catch (e) {
  411. }
  412. return false;
  413. }
  414. function isWeakSet(x) {
  415. if (!weakSetHas || !x || typeof x !== "object") {
  416. return false;
  417. }
  418. try {
  419. weakSetHas.call(x, weakSetHas);
  420. try {
  421. weakMapHas.call(x, weakMapHas);
  422. } catch (s) {
  423. return true;
  424. }
  425. return x instanceof WeakSet;
  426. } catch (e) {
  427. }
  428. return false;
  429. }
  430. function isElement(x) {
  431. if (!x || typeof x !== "object") {
  432. return false;
  433. }
  434. if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
  435. return true;
  436. }
  437. return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
  438. }
  439. function inspectString(str, opts) {
  440. if (str.length > opts.maxStringLength) {
  441. var remaining = str.length - opts.maxStringLength;
  442. var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
  443. return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
  444. }
  445. var quoteRE = quoteREs[opts.quoteStyle || "single"];
  446. quoteRE.lastIndex = 0;
  447. var s = $replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte);
  448. return wrapQuotes(s, "single", opts);
  449. }
  450. function lowbyte(c) {
  451. var n = c.charCodeAt(0);
  452. var x = {
  453. 8: "b",
  454. 9: "t",
  455. 10: "n",
  456. 12: "f",
  457. 13: "r"
  458. }[n];
  459. if (x) {
  460. return "\\" + x;
  461. }
  462. return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
  463. }
  464. function markBoxed(str) {
  465. return "Object(" + str + ")";
  466. }
  467. function weakCollectionOf(type) {
  468. return type + " { ? }";
  469. }
  470. function collectionOf(type, size, entries, indent) {
  471. var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
  472. return type + " (" + size + ") {" + joinedEntries + "}";
  473. }
  474. function singleLineValues(xs) {
  475. for (var i = 0; i < xs.length; i++) {
  476. if (indexOf(xs[i], "\n") >= 0) {
  477. return false;
  478. }
  479. }
  480. return true;
  481. }
  482. function getIndent(opts, depth) {
  483. var baseIndent;
  484. if (opts.indent === " ") {
  485. baseIndent = " ";
  486. } else if (typeof opts.indent === "number" && opts.indent > 0) {
  487. baseIndent = $join.call(Array(opts.indent + 1), " ");
  488. } else {
  489. return null;
  490. }
  491. return {
  492. base: baseIndent,
  493. prev: $join.call(Array(depth + 1), baseIndent)
  494. };
  495. }
  496. function indentedJoin(xs, indent) {
  497. if (xs.length === 0) {
  498. return "";
  499. }
  500. var lineJoiner = "\n" + indent.prev + indent.base;
  501. return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
  502. }
  503. function arrObjKeys(obj, inspect) {
  504. var isArr = isArray(obj);
  505. var xs = [];
  506. if (isArr) {
  507. xs.length = obj.length;
  508. for (var i = 0; i < obj.length; i++) {
  509. xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
  510. }
  511. }
  512. var syms = typeof gOPS === "function" ? gOPS(obj) : [];
  513. var symMap;
  514. if (hasShammedSymbols) {
  515. symMap = {};
  516. for (var k = 0; k < syms.length; k++) {
  517. symMap["$" + syms[k]] = syms[k];
  518. }
  519. }
  520. for (var key in obj) {
  521. if (!has(obj, key)) {
  522. continue;
  523. }
  524. if (isArr && String(Number(key)) === key && key < obj.length) {
  525. continue;
  526. }
  527. if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
  528. continue;
  529. } else if ($test.call(/[^\w$]/, key)) {
  530. xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
  531. } else {
  532. xs.push(key + ": " + inspect(obj[key], obj));
  533. }
  534. }
  535. if (typeof gOPS === "function") {
  536. for (var j = 0; j < syms.length; j++) {
  537. if (isEnumerable.call(obj, syms[j])) {
  538. xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
  539. }
  540. }
  541. }
  542. return xs;
  543. }
  544. }
  545. });
  546. // node_modules/.pnpm/side-channel-list@1.0.0/node_modules/side-channel-list/index.js
  547. var require_side_channel_list = __commonJS({
  548. "node_modules/.pnpm/side-channel-list@1.0.0/node_modules/side-channel-list/index.js"(exports, module) {
  549. "use strict";
  550. var inspect = require_object_inspect();
  551. var $TypeError = require_type();
  552. var listGetNode = function(list, key, isDelete) {
  553. var prev = list;
  554. var curr;
  555. for (; (curr = prev.next) != null; prev = curr) {
  556. if (curr.key === key) {
  557. prev.next = curr.next;
  558. if (!isDelete) {
  559. curr.next = /** @type {NonNullable<typeof list.next>} */
  560. list.next;
  561. list.next = curr;
  562. }
  563. return curr;
  564. }
  565. }
  566. };
  567. var listGet = function(objects, key) {
  568. if (!objects) {
  569. return void 0;
  570. }
  571. var node = listGetNode(objects, key);
  572. return node && node.value;
  573. };
  574. var listSet = function(objects, key, value) {
  575. var node = listGetNode(objects, key);
  576. if (node) {
  577. node.value = value;
  578. } else {
  579. objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
  580. {
  581. // eslint-disable-line no-param-reassign, no-extra-parens
  582. key,
  583. next: objects.next,
  584. value
  585. };
  586. }
  587. };
  588. var listHas = function(objects, key) {
  589. if (!objects) {
  590. return false;
  591. }
  592. return !!listGetNode(objects, key);
  593. };
  594. var listDelete = function(objects, key) {
  595. if (objects) {
  596. return listGetNode(objects, key, true);
  597. }
  598. };
  599. module.exports = function getSideChannelList() {
  600. var $o;
  601. var channel = {
  602. assert: function(key) {
  603. if (!channel.has(key)) {
  604. throw new $TypeError("Side channel does not contain " + inspect(key));
  605. }
  606. },
  607. "delete": function(key) {
  608. var root = $o && $o.next;
  609. var deletedNode = listDelete($o, key);
  610. if (deletedNode && root && root === deletedNode) {
  611. $o = void 0;
  612. }
  613. return !!deletedNode;
  614. },
  615. get: function(key) {
  616. return listGet($o, key);
  617. },
  618. has: function(key) {
  619. return listHas($o, key);
  620. },
  621. set: function(key, value) {
  622. if (!$o) {
  623. $o = {
  624. next: void 0
  625. };
  626. }
  627. listSet(
  628. /** @type {NonNullable<typeof $o>} */
  629. $o,
  630. key,
  631. value
  632. );
  633. }
  634. };
  635. return channel;
  636. };
  637. }
  638. });
  639. // node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js
  640. var require_es_object_atoms = __commonJS({
  641. "node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js"(exports, module) {
  642. "use strict";
  643. module.exports = Object;
  644. }
  645. });
  646. // node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js
  647. var require_es_errors = __commonJS({
  648. "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports, module) {
  649. "use strict";
  650. module.exports = Error;
  651. }
  652. });
  653. // node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js
  654. var require_eval = __commonJS({
  655. "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports, module) {
  656. "use strict";
  657. module.exports = EvalError;
  658. }
  659. });
  660. // node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js
  661. var require_range = __commonJS({
  662. "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports, module) {
  663. "use strict";
  664. module.exports = RangeError;
  665. }
  666. });
  667. // node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js
  668. var require_ref = __commonJS({
  669. "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports, module) {
  670. "use strict";
  671. module.exports = ReferenceError;
  672. }
  673. });
  674. // node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js
  675. var require_syntax = __commonJS({
  676. "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports, module) {
  677. "use strict";
  678. module.exports = SyntaxError;
  679. }
  680. });
  681. // node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js
  682. var require_uri = __commonJS({
  683. "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports, module) {
  684. "use strict";
  685. module.exports = URIError;
  686. }
  687. });
  688. // node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js
  689. var require_abs = __commonJS({
  690. "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js"(exports, module) {
  691. "use strict";
  692. module.exports = Math.abs;
  693. }
  694. });
  695. // node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js
  696. var require_floor = __commonJS({
  697. "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js"(exports, module) {
  698. "use strict";
  699. module.exports = Math.floor;
  700. }
  701. });
  702. // node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js
  703. var require_max = __commonJS({
  704. "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js"(exports, module) {
  705. "use strict";
  706. module.exports = Math.max;
  707. }
  708. });
  709. // node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js
  710. var require_min = __commonJS({
  711. "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js"(exports, module) {
  712. "use strict";
  713. module.exports = Math.min;
  714. }
  715. });
  716. // node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js
  717. var require_pow = __commonJS({
  718. "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js"(exports, module) {
  719. "use strict";
  720. module.exports = Math.pow;
  721. }
  722. });
  723. // node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js
  724. var require_round = __commonJS({
  725. "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js"(exports, module) {
  726. "use strict";
  727. module.exports = Math.round;
  728. }
  729. });
  730. // node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js
  731. var require_isNaN = __commonJS({
  732. "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js"(exports, module) {
  733. "use strict";
  734. module.exports = Number.isNaN || function isNaN2(a) {
  735. return a !== a;
  736. };
  737. }
  738. });
  739. // node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js
  740. var require_sign = __commonJS({
  741. "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js"(exports, module) {
  742. "use strict";
  743. var $isNaN = require_isNaN();
  744. module.exports = function sign(number) {
  745. if ($isNaN(number) || number === 0) {
  746. return number;
  747. }
  748. return number < 0 ? -1 : 1;
  749. };
  750. }
  751. });
  752. // node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js
  753. var require_gOPD = __commonJS({
  754. "node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js"(exports, module) {
  755. "use strict";
  756. module.exports = Object.getOwnPropertyDescriptor;
  757. }
  758. });
  759. // node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js
  760. var require_gopd = __commonJS({
  761. "node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js"(exports, module) {
  762. "use strict";
  763. var $gOPD = require_gOPD();
  764. if ($gOPD) {
  765. try {
  766. $gOPD([], "length");
  767. } catch (e) {
  768. $gOPD = null;
  769. }
  770. }
  771. module.exports = $gOPD;
  772. }
  773. });
  774. // node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js
  775. var require_es_define_property = __commonJS({
  776. "node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js"(exports, module) {
  777. "use strict";
  778. var $defineProperty = Object.defineProperty || false;
  779. if ($defineProperty) {
  780. try {
  781. $defineProperty({}, "a", { value: 1 });
  782. } catch (e) {
  783. $defineProperty = false;
  784. }
  785. }
  786. module.exports = $defineProperty;
  787. }
  788. });
  789. // node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js
  790. var require_shams = __commonJS({
  791. "node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js"(exports, module) {
  792. "use strict";
  793. module.exports = function hasSymbols() {
  794. if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
  795. return false;
  796. }
  797. if (typeof Symbol.iterator === "symbol") {
  798. return true;
  799. }
  800. var obj = {};
  801. var sym = Symbol("test");
  802. var symObj = Object(sym);
  803. if (typeof sym === "string") {
  804. return false;
  805. }
  806. if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
  807. return false;
  808. }
  809. if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
  810. return false;
  811. }
  812. var symVal = 42;
  813. obj[sym] = symVal;
  814. for (var _ in obj) {
  815. return false;
  816. }
  817. if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
  818. return false;
  819. }
  820. if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
  821. return false;
  822. }
  823. var syms = Object.getOwnPropertySymbols(obj);
  824. if (syms.length !== 1 || syms[0] !== sym) {
  825. return false;
  826. }
  827. if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
  828. return false;
  829. }
  830. if (typeof Object.getOwnPropertyDescriptor === "function") {
  831. var descriptor = (
  832. /** @type {PropertyDescriptor} */
  833. Object.getOwnPropertyDescriptor(obj, sym)
  834. );
  835. if (descriptor.value !== symVal || descriptor.enumerable !== true) {
  836. return false;
  837. }
  838. }
  839. return true;
  840. };
  841. }
  842. });
  843. // node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js
  844. var require_has_symbols = __commonJS({
  845. "node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js"(exports, module) {
  846. "use strict";
  847. var origSymbol = typeof Symbol !== "undefined" && Symbol;
  848. var hasSymbolSham = require_shams();
  849. module.exports = function hasNativeSymbols() {
  850. if (typeof origSymbol !== "function") {
  851. return false;
  852. }
  853. if (typeof Symbol !== "function") {
  854. return false;
  855. }
  856. if (typeof origSymbol("foo") !== "symbol") {
  857. return false;
  858. }
  859. if (typeof Symbol("bar") !== "symbol") {
  860. return false;
  861. }
  862. return hasSymbolSham();
  863. };
  864. }
  865. });
  866. // node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js
  867. var require_Reflect_getPrototypeOf = __commonJS({
  868. "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js"(exports, module) {
  869. "use strict";
  870. module.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
  871. }
  872. });
  873. // node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js
  874. var require_Object_getPrototypeOf = __commonJS({
  875. "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js"(exports, module) {
  876. "use strict";
  877. var $Object = require_es_object_atoms();
  878. module.exports = $Object.getPrototypeOf || null;
  879. }
  880. });
  881. // node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js
  882. var require_implementation = __commonJS({
  883. "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports, module) {
  884. "use strict";
  885. var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
  886. var toStr = Object.prototype.toString;
  887. var max = Math.max;
  888. var funcType = "[object Function]";
  889. var concatty = function concatty2(a, b) {
  890. var arr = [];
  891. for (var i = 0; i < a.length; i += 1) {
  892. arr[i] = a[i];
  893. }
  894. for (var j = 0; j < b.length; j += 1) {
  895. arr[j + a.length] = b[j];
  896. }
  897. return arr;
  898. };
  899. var slicy = function slicy2(arrLike, offset) {
  900. var arr = [];
  901. for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
  902. arr[j] = arrLike[i];
  903. }
  904. return arr;
  905. };
  906. var joiny = function(arr, joiner) {
  907. var str = "";
  908. for (var i = 0; i < arr.length; i += 1) {
  909. str += arr[i];
  910. if (i + 1 < arr.length) {
  911. str += joiner;
  912. }
  913. }
  914. return str;
  915. };
  916. module.exports = function bind(that) {
  917. var target = this;
  918. if (typeof target !== "function" || toStr.apply(target) !== funcType) {
  919. throw new TypeError(ERROR_MESSAGE + target);
  920. }
  921. var args = slicy(arguments, 1);
  922. var bound;
  923. var binder = function() {
  924. if (this instanceof bound) {
  925. var result = target.apply(
  926. this,
  927. concatty(args, arguments)
  928. );
  929. if (Object(result) === result) {
  930. return result;
  931. }
  932. return this;
  933. }
  934. return target.apply(
  935. that,
  936. concatty(args, arguments)
  937. );
  938. };
  939. var boundLength = max(0, target.length - args.length);
  940. var boundArgs = [];
  941. for (var i = 0; i < boundLength; i++) {
  942. boundArgs[i] = "$" + i;
  943. }
  944. bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
  945. if (target.prototype) {
  946. var Empty = function Empty2() {
  947. };
  948. Empty.prototype = target.prototype;
  949. bound.prototype = new Empty();
  950. Empty.prototype = null;
  951. }
  952. return bound;
  953. };
  954. }
  955. });
  956. // node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js
  957. var require_function_bind = __commonJS({
  958. "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports, module) {
  959. "use strict";
  960. var implementation = require_implementation();
  961. module.exports = Function.prototype.bind || implementation;
  962. }
  963. });
  964. // node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js
  965. var require_functionCall = __commonJS({
  966. "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js"(exports, module) {
  967. "use strict";
  968. module.exports = Function.prototype.call;
  969. }
  970. });
  971. // node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js
  972. var require_functionApply = __commonJS({
  973. "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js"(exports, module) {
  974. "use strict";
  975. module.exports = Function.prototype.apply;
  976. }
  977. });
  978. // node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js
  979. var require_reflectApply = __commonJS({
  980. "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js"(exports, module) {
  981. "use strict";
  982. module.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
  983. }
  984. });
  985. // node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js
  986. var require_actualApply = __commonJS({
  987. "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js"(exports, module) {
  988. "use strict";
  989. var bind = require_function_bind();
  990. var $apply = require_functionApply();
  991. var $call = require_functionCall();
  992. var $reflectApply = require_reflectApply();
  993. module.exports = $reflectApply || bind.call($call, $apply);
  994. }
  995. });
  996. // node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js
  997. var require_call_bind_apply_helpers = __commonJS({
  998. "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js"(exports, module) {
  999. "use strict";
  1000. var bind = require_function_bind();
  1001. var $TypeError = require_type();
  1002. var $call = require_functionCall();
  1003. var $actualApply = require_actualApply();
  1004. module.exports = function callBindBasic(args) {
  1005. if (args.length < 1 || typeof args[0] !== "function") {
  1006. throw new $TypeError("a function is required");
  1007. }
  1008. return $actualApply(bind, $call, args);
  1009. };
  1010. }
  1011. });
  1012. // node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js
  1013. var require_get = __commonJS({
  1014. "node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js"(exports, module) {
  1015. "use strict";
  1016. var callBind = require_call_bind_apply_helpers();
  1017. var gOPD = require_gopd();
  1018. var hasProtoAccessor;
  1019. try {
  1020. hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
  1021. [].__proto__ === Array.prototype;
  1022. } catch (e) {
  1023. if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
  1024. throw e;
  1025. }
  1026. }
  1027. var desc = !!hasProtoAccessor && gOPD && gOPD(
  1028. Object.prototype,
  1029. /** @type {keyof typeof Object.prototype} */
  1030. "__proto__"
  1031. );
  1032. var $Object = Object;
  1033. var $getPrototypeOf = $Object.getPrototypeOf;
  1034. module.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
  1035. /** @type {import('./get')} */
  1036. function getDunder(value) {
  1037. return $getPrototypeOf(value == null ? value : $Object(value));
  1038. }
  1039. ) : false;
  1040. }
  1041. });
  1042. // node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js
  1043. var require_get_proto = __commonJS({
  1044. "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js"(exports, module) {
  1045. "use strict";
  1046. var reflectGetProto = require_Reflect_getPrototypeOf();
  1047. var originalGetProto = require_Object_getPrototypeOf();
  1048. var getDunderProto = require_get();
  1049. module.exports = reflectGetProto ? function getProto(O) {
  1050. return reflectGetProto(O);
  1051. } : originalGetProto ? function getProto(O) {
  1052. if (!O || typeof O !== "object" && typeof O !== "function") {
  1053. throw new TypeError("getProto: not an object");
  1054. }
  1055. return originalGetProto(O);
  1056. } : getDunderProto ? function getProto(O) {
  1057. return getDunderProto(O);
  1058. } : null;
  1059. }
  1060. });
  1061. // node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js
  1062. var require_hasown = __commonJS({
  1063. "node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports, module) {
  1064. "use strict";
  1065. var call = Function.prototype.call;
  1066. var $hasOwn = Object.prototype.hasOwnProperty;
  1067. var bind = require_function_bind();
  1068. module.exports = bind.call(call, $hasOwn);
  1069. }
  1070. });
  1071. // node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js
  1072. var require_get_intrinsic = __commonJS({
  1073. "node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js"(exports, module) {
  1074. "use strict";
  1075. var undefined2;
  1076. var $Object = require_es_object_atoms();
  1077. var $Error = require_es_errors();
  1078. var $EvalError = require_eval();
  1079. var $RangeError = require_range();
  1080. var $ReferenceError = require_ref();
  1081. var $SyntaxError = require_syntax();
  1082. var $TypeError = require_type();
  1083. var $URIError = require_uri();
  1084. var abs = require_abs();
  1085. var floor = require_floor();
  1086. var max = require_max();
  1087. var min = require_min();
  1088. var pow = require_pow();
  1089. var round = require_round();
  1090. var sign = require_sign();
  1091. var $Function = Function;
  1092. var getEvalledConstructor = function(expressionSyntax) {
  1093. try {
  1094. return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
  1095. } catch (e) {
  1096. }
  1097. };
  1098. var $gOPD = require_gopd();
  1099. var $defineProperty = require_es_define_property();
  1100. var throwTypeError = function() {
  1101. throw new $TypeError();
  1102. };
  1103. var ThrowTypeError = $gOPD ? function() {
  1104. try {
  1105. arguments.callee;
  1106. return throwTypeError;
  1107. } catch (calleeThrows) {
  1108. try {
  1109. return $gOPD(arguments, "callee").get;
  1110. } catch (gOPDthrows) {
  1111. return throwTypeError;
  1112. }
  1113. }
  1114. }() : throwTypeError;
  1115. var hasSymbols = require_has_symbols()();
  1116. var getProto = require_get_proto();
  1117. var $ObjectGPO = require_Object_getPrototypeOf();
  1118. var $ReflectGPO = require_Reflect_getPrototypeOf();
  1119. var $apply = require_functionApply();
  1120. var $call = require_functionCall();
  1121. var needsEval = {};
  1122. var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
  1123. var INTRINSICS = {
  1124. __proto__: null,
  1125. "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
  1126. "%Array%": Array,
  1127. "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
  1128. "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
  1129. "%AsyncFromSyncIteratorPrototype%": undefined2,
  1130. "%AsyncFunction%": needsEval,
  1131. "%AsyncGenerator%": needsEval,
  1132. "%AsyncGeneratorFunction%": needsEval,
  1133. "%AsyncIteratorPrototype%": needsEval,
  1134. "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
  1135. "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
  1136. "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
  1137. "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
  1138. "%Boolean%": Boolean,
  1139. "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
  1140. "%Date%": Date,
  1141. "%decodeURI%": decodeURI,
  1142. "%decodeURIComponent%": decodeURIComponent,
  1143. "%encodeURI%": encodeURI,
  1144. "%encodeURIComponent%": encodeURIComponent,
  1145. "%Error%": $Error,
  1146. "%eval%": eval,
  1147. // eslint-disable-line no-eval
  1148. "%EvalError%": $EvalError,
  1149. "%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array,
  1150. "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
  1151. "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
  1152. "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
  1153. "%Function%": $Function,
  1154. "%GeneratorFunction%": needsEval,
  1155. "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
  1156. "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
  1157. "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
  1158. "%isFinite%": isFinite,
  1159. "%isNaN%": isNaN,
  1160. "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
  1161. "%JSON%": typeof JSON === "object" ? JSON : undefined2,
  1162. "%Map%": typeof Map === "undefined" ? undefined2 : Map,
  1163. "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
  1164. "%Math%": Math,
  1165. "%Number%": Number,
  1166. "%Object%": $Object,
  1167. "%Object.getOwnPropertyDescriptor%": $gOPD,
  1168. "%parseFloat%": parseFloat,
  1169. "%parseInt%": parseInt,
  1170. "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
  1171. "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
  1172. "%RangeError%": $RangeError,
  1173. "%ReferenceError%": $ReferenceError,
  1174. "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
  1175. "%RegExp%": RegExp,
  1176. "%Set%": typeof Set === "undefined" ? undefined2 : Set,
  1177. "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
  1178. "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
  1179. "%String%": String,
  1180. "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
  1181. "%Symbol%": hasSymbols ? Symbol : undefined2,
  1182. "%SyntaxError%": $SyntaxError,
  1183. "%ThrowTypeError%": ThrowTypeError,
  1184. "%TypedArray%": TypedArray,
  1185. "%TypeError%": $TypeError,
  1186. "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
  1187. "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
  1188. "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
  1189. "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
  1190. "%URIError%": $URIError,
  1191. "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
  1192. "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
  1193. "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet,
  1194. "%Function.prototype.call%": $call,
  1195. "%Function.prototype.apply%": $apply,
  1196. "%Object.defineProperty%": $defineProperty,
  1197. "%Object.getPrototypeOf%": $ObjectGPO,
  1198. "%Math.abs%": abs,
  1199. "%Math.floor%": floor,
  1200. "%Math.max%": max,
  1201. "%Math.min%": min,
  1202. "%Math.pow%": pow,
  1203. "%Math.round%": round,
  1204. "%Math.sign%": sign,
  1205. "%Reflect.getPrototypeOf%": $ReflectGPO
  1206. };
  1207. if (getProto) {
  1208. try {
  1209. null.error;
  1210. } catch (e) {
  1211. errorProto = getProto(getProto(e));
  1212. INTRINSICS["%Error.prototype%"] = errorProto;
  1213. }
  1214. }
  1215. var errorProto;
  1216. var doEval = function doEval2(name) {
  1217. var value;
  1218. if (name === "%AsyncFunction%") {
  1219. value = getEvalledConstructor("async function () {}");
  1220. } else if (name === "%GeneratorFunction%") {
  1221. value = getEvalledConstructor("function* () {}");
  1222. } else if (name === "%AsyncGeneratorFunction%") {
  1223. value = getEvalledConstructor("async function* () {}");
  1224. } else if (name === "%AsyncGenerator%") {
  1225. var fn = doEval2("%AsyncGeneratorFunction%");
  1226. if (fn) {
  1227. value = fn.prototype;
  1228. }
  1229. } else if (name === "%AsyncIteratorPrototype%") {
  1230. var gen = doEval2("%AsyncGenerator%");
  1231. if (gen && getProto) {
  1232. value = getProto(gen.prototype);
  1233. }
  1234. }
  1235. INTRINSICS[name] = value;
  1236. return value;
  1237. };
  1238. var LEGACY_ALIASES = {
  1239. __proto__: null,
  1240. "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
  1241. "%ArrayPrototype%": ["Array", "prototype"],
  1242. "%ArrayProto_entries%": ["Array", "prototype", "entries"],
  1243. "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
  1244. "%ArrayProto_keys%": ["Array", "prototype", "keys"],
  1245. "%ArrayProto_values%": ["Array", "prototype", "values"],
  1246. "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
  1247. "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
  1248. "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
  1249. "%BooleanPrototype%": ["Boolean", "prototype"],
  1250. "%DataViewPrototype%": ["DataView", "prototype"],
  1251. "%DatePrototype%": ["Date", "prototype"],
  1252. "%ErrorPrototype%": ["Error", "prototype"],
  1253. "%EvalErrorPrototype%": ["EvalError", "prototype"],
  1254. "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
  1255. "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
  1256. "%FunctionPrototype%": ["Function", "prototype"],
  1257. "%Generator%": ["GeneratorFunction", "prototype"],
  1258. "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
  1259. "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
  1260. "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
  1261. "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
  1262. "%JSONParse%": ["JSON", "parse"],
  1263. "%JSONStringify%": ["JSON", "stringify"],
  1264. "%MapPrototype%": ["Map", "prototype"],
  1265. "%NumberPrototype%": ["Number", "prototype"],
  1266. "%ObjectPrototype%": ["Object", "prototype"],
  1267. "%ObjProto_toString%": ["Object", "prototype", "toString"],
  1268. "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
  1269. "%PromisePrototype%": ["Promise", "prototype"],
  1270. "%PromiseProto_then%": ["Promise", "prototype", "then"],
  1271. "%Promise_all%": ["Promise", "all"],
  1272. "%Promise_reject%": ["Promise", "reject"],
  1273. "%Promise_resolve%": ["Promise", "resolve"],
  1274. "%RangeErrorPrototype%": ["RangeError", "prototype"],
  1275. "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
  1276. "%RegExpPrototype%": ["RegExp", "prototype"],
  1277. "%SetPrototype%": ["Set", "prototype"],
  1278. "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
  1279. "%StringPrototype%": ["String", "prototype"],
  1280. "%SymbolPrototype%": ["Symbol", "prototype"],
  1281. "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
  1282. "%TypedArrayPrototype%": ["TypedArray", "prototype"],
  1283. "%TypeErrorPrototype%": ["TypeError", "prototype"],
  1284. "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
  1285. "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
  1286. "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
  1287. "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
  1288. "%URIErrorPrototype%": ["URIError", "prototype"],
  1289. "%WeakMapPrototype%": ["WeakMap", "prototype"],
  1290. "%WeakSetPrototype%": ["WeakSet", "prototype"]
  1291. };
  1292. var bind = require_function_bind();
  1293. var hasOwn = require_hasown();
  1294. var $concat = bind.call($call, Array.prototype.concat);
  1295. var $spliceApply = bind.call($apply, Array.prototype.splice);
  1296. var $replace = bind.call($call, String.prototype.replace);
  1297. var $strSlice = bind.call($call, String.prototype.slice);
  1298. var $exec = bind.call($call, RegExp.prototype.exec);
  1299. var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
  1300. var reEscapeChar = /\\(\\)?/g;
  1301. var stringToPath = function stringToPath2(string) {
  1302. var first = $strSlice(string, 0, 1);
  1303. var last = $strSlice(string, -1);
  1304. if (first === "%" && last !== "%") {
  1305. throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
  1306. } else if (last === "%" && first !== "%") {
  1307. throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
  1308. }
  1309. var result = [];
  1310. $replace(string, rePropName, function(match, number, quote, subString) {
  1311. result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
  1312. });
  1313. return result;
  1314. };
  1315. var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
  1316. var intrinsicName = name;
  1317. var alias;
  1318. if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
  1319. alias = LEGACY_ALIASES[intrinsicName];
  1320. intrinsicName = "%" + alias[0] + "%";
  1321. }
  1322. if (hasOwn(INTRINSICS, intrinsicName)) {
  1323. var value = INTRINSICS[intrinsicName];
  1324. if (value === needsEval) {
  1325. value = doEval(intrinsicName);
  1326. }
  1327. if (typeof value === "undefined" && !allowMissing) {
  1328. throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
  1329. }
  1330. return {
  1331. alias,
  1332. name: intrinsicName,
  1333. value
  1334. };
  1335. }
  1336. throw new $SyntaxError("intrinsic " + name + " does not exist!");
  1337. };
  1338. module.exports = function GetIntrinsic(name, allowMissing) {
  1339. if (typeof name !== "string" || name.length === 0) {
  1340. throw new $TypeError("intrinsic name must be a non-empty string");
  1341. }
  1342. if (arguments.length > 1 && typeof allowMissing !== "boolean") {
  1343. throw new $TypeError('"allowMissing" argument must be a boolean');
  1344. }
  1345. if ($exec(/^%?[^%]*%?$/, name) === null) {
  1346. throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
  1347. }
  1348. var parts = stringToPath(name);
  1349. var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
  1350. var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
  1351. var intrinsicRealName = intrinsic.name;
  1352. var value = intrinsic.value;
  1353. var skipFurtherCaching = false;
  1354. var alias = intrinsic.alias;
  1355. if (alias) {
  1356. intrinsicBaseName = alias[0];
  1357. $spliceApply(parts, $concat([0, 1], alias));
  1358. }
  1359. for (var i = 1, isOwn = true; i < parts.length; i += 1) {
  1360. var part = parts[i];
  1361. var first = $strSlice(part, 0, 1);
  1362. var last = $strSlice(part, -1);
  1363. if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
  1364. throw new $SyntaxError("property names with quotes must have matching quotes");
  1365. }
  1366. if (part === "constructor" || !isOwn) {
  1367. skipFurtherCaching = true;
  1368. }
  1369. intrinsicBaseName += "." + part;
  1370. intrinsicRealName = "%" + intrinsicBaseName + "%";
  1371. if (hasOwn(INTRINSICS, intrinsicRealName)) {
  1372. value = INTRINSICS[intrinsicRealName];
  1373. } else if (value != null) {
  1374. if (!(part in value)) {
  1375. if (!allowMissing) {
  1376. throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
  1377. }
  1378. return void 0;
  1379. }
  1380. if ($gOPD && i + 1 >= parts.length) {
  1381. var desc = $gOPD(value, part);
  1382. isOwn = !!desc;
  1383. if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
  1384. value = desc.get;
  1385. } else {
  1386. value = value[part];
  1387. }
  1388. } else {
  1389. isOwn = hasOwn(value, part);
  1390. value = value[part];
  1391. }
  1392. if (isOwn && !skipFurtherCaching) {
  1393. INTRINSICS[intrinsicRealName] = value;
  1394. }
  1395. }
  1396. }
  1397. return value;
  1398. };
  1399. }
  1400. });
  1401. // node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js
  1402. var require_call_bound = __commonJS({
  1403. "node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js"(exports, module) {
  1404. "use strict";
  1405. var GetIntrinsic = require_get_intrinsic();
  1406. var callBindBasic = require_call_bind_apply_helpers();
  1407. var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);
  1408. module.exports = function callBoundIntrinsic(name, allowMissing) {
  1409. var intrinsic = (
  1410. /** @type {(this: unknown, ...args: unknown[]) => unknown} */
  1411. GetIntrinsic(name, !!allowMissing)
  1412. );
  1413. if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
  1414. return callBindBasic(
  1415. /** @type {const} */
  1416. [intrinsic]
  1417. );
  1418. }
  1419. return intrinsic;
  1420. };
  1421. }
  1422. });
  1423. // node_modules/.pnpm/side-channel-map@1.0.1/node_modules/side-channel-map/index.js
  1424. var require_side_channel_map = __commonJS({
  1425. "node_modules/.pnpm/side-channel-map@1.0.1/node_modules/side-channel-map/index.js"(exports, module) {
  1426. "use strict";
  1427. var GetIntrinsic = require_get_intrinsic();
  1428. var callBound = require_call_bound();
  1429. var inspect = require_object_inspect();
  1430. var $TypeError = require_type();
  1431. var $Map = GetIntrinsic("%Map%", true);
  1432. var $mapGet = callBound("Map.prototype.get", true);
  1433. var $mapSet = callBound("Map.prototype.set", true);
  1434. var $mapHas = callBound("Map.prototype.has", true);
  1435. var $mapDelete = callBound("Map.prototype.delete", true);
  1436. var $mapSize = callBound("Map.prototype.size", true);
  1437. module.exports = !!$Map && /** @type {Exclude<import('.'), false>} */
  1438. function getSideChannelMap() {
  1439. var $m;
  1440. var channel = {
  1441. assert: function(key) {
  1442. if (!channel.has(key)) {
  1443. throw new $TypeError("Side channel does not contain " + inspect(key));
  1444. }
  1445. },
  1446. "delete": function(key) {
  1447. if ($m) {
  1448. var result = $mapDelete($m, key);
  1449. if ($mapSize($m) === 0) {
  1450. $m = void 0;
  1451. }
  1452. return result;
  1453. }
  1454. return false;
  1455. },
  1456. get: function(key) {
  1457. if ($m) {
  1458. return $mapGet($m, key);
  1459. }
  1460. },
  1461. has: function(key) {
  1462. if ($m) {
  1463. return $mapHas($m, key);
  1464. }
  1465. return false;
  1466. },
  1467. set: function(key, value) {
  1468. if (!$m) {
  1469. $m = new $Map();
  1470. }
  1471. $mapSet($m, key, value);
  1472. }
  1473. };
  1474. return channel;
  1475. };
  1476. }
  1477. });
  1478. // node_modules/.pnpm/side-channel-weakmap@1.0.2/node_modules/side-channel-weakmap/index.js
  1479. var require_side_channel_weakmap = __commonJS({
  1480. "node_modules/.pnpm/side-channel-weakmap@1.0.2/node_modules/side-channel-weakmap/index.js"(exports, module) {
  1481. "use strict";
  1482. var GetIntrinsic = require_get_intrinsic();
  1483. var callBound = require_call_bound();
  1484. var inspect = require_object_inspect();
  1485. var getSideChannelMap = require_side_channel_map();
  1486. var $TypeError = require_type();
  1487. var $WeakMap = GetIntrinsic("%WeakMap%", true);
  1488. var $weakMapGet = callBound("WeakMap.prototype.get", true);
  1489. var $weakMapSet = callBound("WeakMap.prototype.set", true);
  1490. var $weakMapHas = callBound("WeakMap.prototype.has", true);
  1491. var $weakMapDelete = callBound("WeakMap.prototype.delete", true);
  1492. module.exports = $WeakMap ? (
  1493. /** @type {Exclude<import('.'), false>} */
  1494. function getSideChannelWeakMap() {
  1495. var $wm;
  1496. var $m;
  1497. var channel = {
  1498. assert: function(key) {
  1499. if (!channel.has(key)) {
  1500. throw new $TypeError("Side channel does not contain " + inspect(key));
  1501. }
  1502. },
  1503. "delete": function(key) {
  1504. if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
  1505. if ($wm) {
  1506. return $weakMapDelete($wm, key);
  1507. }
  1508. } else if (getSideChannelMap) {
  1509. if ($m) {
  1510. return $m["delete"](key);
  1511. }
  1512. }
  1513. return false;
  1514. },
  1515. get: function(key) {
  1516. if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
  1517. if ($wm) {
  1518. return $weakMapGet($wm, key);
  1519. }
  1520. }
  1521. return $m && $m.get(key);
  1522. },
  1523. has: function(key) {
  1524. if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
  1525. if ($wm) {
  1526. return $weakMapHas($wm, key);
  1527. }
  1528. }
  1529. return !!$m && $m.has(key);
  1530. },
  1531. set: function(key, value) {
  1532. if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
  1533. if (!$wm) {
  1534. $wm = new $WeakMap();
  1535. }
  1536. $weakMapSet($wm, key, value);
  1537. } else if (getSideChannelMap) {
  1538. if (!$m) {
  1539. $m = getSideChannelMap();
  1540. }
  1541. $m.set(key, value);
  1542. }
  1543. }
  1544. };
  1545. return channel;
  1546. }
  1547. ) : getSideChannelMap;
  1548. }
  1549. });
  1550. // node_modules/.pnpm/side-channel@1.1.0/node_modules/side-channel/index.js
  1551. var require_side_channel = __commonJS({
  1552. "node_modules/.pnpm/side-channel@1.1.0/node_modules/side-channel/index.js"(exports, module) {
  1553. "use strict";
  1554. var $TypeError = require_type();
  1555. var inspect = require_object_inspect();
  1556. var getSideChannelList = require_side_channel_list();
  1557. var getSideChannelMap = require_side_channel_map();
  1558. var getSideChannelWeakMap = require_side_channel_weakmap();
  1559. var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
  1560. module.exports = function getSideChannel() {
  1561. var $channelData;
  1562. var channel = {
  1563. assert: function(key) {
  1564. if (!channel.has(key)) {
  1565. throw new $TypeError("Side channel does not contain " + inspect(key));
  1566. }
  1567. },
  1568. "delete": function(key) {
  1569. return !!$channelData && $channelData["delete"](key);
  1570. },
  1571. get: function(key) {
  1572. return $channelData && $channelData.get(key);
  1573. },
  1574. has: function(key) {
  1575. return !!$channelData && $channelData.has(key);
  1576. },
  1577. set: function(key, value) {
  1578. if (!$channelData) {
  1579. $channelData = makeChannel();
  1580. }
  1581. $channelData.set(key, value);
  1582. }
  1583. };
  1584. return channel;
  1585. };
  1586. }
  1587. });
  1588. // node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/formats.js
  1589. var require_formats = __commonJS({
  1590. "node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/formats.js"(exports, module) {
  1591. "use strict";
  1592. var replace = String.prototype.replace;
  1593. var percentTwenties = /%20/g;
  1594. var Format = {
  1595. RFC1738: "RFC1738",
  1596. RFC3986: "RFC3986"
  1597. };
  1598. module.exports = {
  1599. "default": Format.RFC3986,
  1600. formatters: {
  1601. RFC1738: function(value) {
  1602. return replace.call(value, percentTwenties, "+");
  1603. },
  1604. RFC3986: function(value) {
  1605. return String(value);
  1606. }
  1607. },
  1608. RFC1738: Format.RFC1738,
  1609. RFC3986: Format.RFC3986
  1610. };
  1611. }
  1612. });
  1613. // node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/utils.js
  1614. var require_utils = __commonJS({
  1615. "node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/utils.js"(exports, module) {
  1616. "use strict";
  1617. var formats = require_formats();
  1618. var has = Object.prototype.hasOwnProperty;
  1619. var isArray = Array.isArray;
  1620. var hexTable = function() {
  1621. var array = [];
  1622. for (var i = 0; i < 256; ++i) {
  1623. array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase());
  1624. }
  1625. return array;
  1626. }();
  1627. var compactQueue = function compactQueue2(queue) {
  1628. while (queue.length > 1) {
  1629. var item = queue.pop();
  1630. var obj = item.obj[item.prop];
  1631. if (isArray(obj)) {
  1632. var compacted = [];
  1633. for (var j = 0; j < obj.length; ++j) {
  1634. if (typeof obj[j] !== "undefined") {
  1635. compacted.push(obj[j]);
  1636. }
  1637. }
  1638. item.obj[item.prop] = compacted;
  1639. }
  1640. }
  1641. };
  1642. var arrayToObject = function arrayToObject2(source, options) {
  1643. var obj = options && options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
  1644. for (var i = 0; i < source.length; ++i) {
  1645. if (typeof source[i] !== "undefined") {
  1646. obj[i] = source[i];
  1647. }
  1648. }
  1649. return obj;
  1650. };
  1651. var merge = function merge2(target, source, options) {
  1652. if (!source) {
  1653. return target;
  1654. }
  1655. if (typeof source !== "object") {
  1656. if (isArray(target)) {
  1657. target.push(source);
  1658. } else if (target && typeof target === "object") {
  1659. if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {
  1660. target[source] = true;
  1661. }
  1662. } else {
  1663. return [target, source];
  1664. }
  1665. return target;
  1666. }
  1667. if (!target || typeof target !== "object") {
  1668. return [target].concat(source);
  1669. }
  1670. var mergeTarget = target;
  1671. if (isArray(target) && !isArray(source)) {
  1672. mergeTarget = arrayToObject(target, options);
  1673. }
  1674. if (isArray(target) && isArray(source)) {
  1675. source.forEach(function(item, i) {
  1676. if (has.call(target, i)) {
  1677. var targetItem = target[i];
  1678. if (targetItem && typeof targetItem === "object" && item && typeof item === "object") {
  1679. target[i] = merge2(targetItem, item, options);
  1680. } else {
  1681. target.push(item);
  1682. }
  1683. } else {
  1684. target[i] = item;
  1685. }
  1686. });
  1687. return target;
  1688. }
  1689. return Object.keys(source).reduce(function(acc, key) {
  1690. var value = source[key];
  1691. if (has.call(acc, key)) {
  1692. acc[key] = merge2(acc[key], value, options);
  1693. } else {
  1694. acc[key] = value;
  1695. }
  1696. return acc;
  1697. }, mergeTarget);
  1698. };
  1699. var assign = function assignSingleSource(target, source) {
  1700. return Object.keys(source).reduce(function(acc, key) {
  1701. acc[key] = source[key];
  1702. return acc;
  1703. }, target);
  1704. };
  1705. var decode = function(str, decoder, charset) {
  1706. var strWithoutPlus = str.replace(/\+/g, " ");
  1707. if (charset === "iso-8859-1") {
  1708. return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
  1709. }
  1710. try {
  1711. return decodeURIComponent(strWithoutPlus);
  1712. } catch (e) {
  1713. return strWithoutPlus;
  1714. }
  1715. };
  1716. var encode = function encode2(str, defaultEncoder, charset, kind, format) {
  1717. if (str.length === 0) {
  1718. return str;
  1719. }
  1720. var string = str;
  1721. if (typeof str === "symbol") {
  1722. string = Symbol.prototype.toString.call(str);
  1723. } else if (typeof str !== "string") {
  1724. string = String(str);
  1725. }
  1726. if (charset === "iso-8859-1") {
  1727. return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) {
  1728. return "%26%23" + parseInt($0.slice(2), 16) + "%3B";
  1729. });
  1730. }
  1731. var out = "";
  1732. for (var i = 0; i < string.length; ++i) {
  1733. var c = string.charCodeAt(i);
  1734. if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats.RFC1738 && (c === 40 || c === 41)) {
  1735. out += string.charAt(i);
  1736. continue;
  1737. }
  1738. if (c < 128) {
  1739. out = out + hexTable[c];
  1740. continue;
  1741. }
  1742. if (c < 2048) {
  1743. out = out + (hexTable[192 | c >> 6] + hexTable[128 | c & 63]);
  1744. continue;
  1745. }
  1746. if (c < 55296 || c >= 57344) {
  1747. out = out + (hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]);
  1748. continue;
  1749. }
  1750. i += 1;
  1751. c = 65536 + ((c & 1023) << 10 | string.charCodeAt(i) & 1023);
  1752. out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
  1753. }
  1754. return out;
  1755. };
  1756. var compact = function compact2(value) {
  1757. var queue = [{ obj: { o: value }, prop: "o" }];
  1758. var refs = [];
  1759. for (var i = 0; i < queue.length; ++i) {
  1760. var item = queue[i];
  1761. var obj = item.obj[item.prop];
  1762. var keys = Object.keys(obj);
  1763. for (var j = 0; j < keys.length; ++j) {
  1764. var key = keys[j];
  1765. var val = obj[key];
  1766. if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) {
  1767. queue.push({ obj, prop: key });
  1768. refs.push(val);
  1769. }
  1770. }
  1771. }
  1772. compactQueue(queue);
  1773. return value;
  1774. };
  1775. var isRegExp = function isRegExp2(obj) {
  1776. return Object.prototype.toString.call(obj) === "[object RegExp]";
  1777. };
  1778. var isBuffer = function isBuffer2(obj) {
  1779. if (!obj || typeof obj !== "object") {
  1780. return false;
  1781. }
  1782. return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
  1783. };
  1784. var combine = function combine2(a, b) {
  1785. return [].concat(a, b);
  1786. };
  1787. var maybeMap = function maybeMap2(val, fn) {
  1788. if (isArray(val)) {
  1789. var mapped = [];
  1790. for (var i = 0; i < val.length; i += 1) {
  1791. mapped.push(fn(val[i]));
  1792. }
  1793. return mapped;
  1794. }
  1795. return fn(val);
  1796. };
  1797. module.exports = {
  1798. arrayToObject,
  1799. assign,
  1800. combine,
  1801. compact,
  1802. decode,
  1803. encode,
  1804. isBuffer,
  1805. isRegExp,
  1806. maybeMap,
  1807. merge
  1808. };
  1809. }
  1810. });
  1811. // node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/stringify.js
  1812. var require_stringify = __commonJS({
  1813. "node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/stringify.js"(exports, module) {
  1814. "use strict";
  1815. var getSideChannel = require_side_channel();
  1816. var utils = require_utils();
  1817. var formats = require_formats();
  1818. var has = Object.prototype.hasOwnProperty;
  1819. var arrayPrefixGenerators = {
  1820. brackets: function brackets(prefix) {
  1821. return prefix + "[]";
  1822. },
  1823. comma: "comma",
  1824. indices: function indices(prefix, key) {
  1825. return prefix + "[" + key + "]";
  1826. },
  1827. repeat: function repeat(prefix) {
  1828. return prefix;
  1829. }
  1830. };
  1831. var isArray = Array.isArray;
  1832. var push = Array.prototype.push;
  1833. var pushToArray = function(arr, valueOrArray) {
  1834. push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
  1835. };
  1836. var toISO = Date.prototype.toISOString;
  1837. var defaultFormat = formats["default"];
  1838. var defaults = {
  1839. addQueryPrefix: false,
  1840. allowDots: false,
  1841. charset: "utf-8",
  1842. charsetSentinel: false,
  1843. delimiter: "&",
  1844. encode: true,
  1845. encoder: utils.encode,
  1846. encodeValuesOnly: false,
  1847. format: defaultFormat,
  1848. formatter: formats.formatters[defaultFormat],
  1849. // deprecated
  1850. indices: false,
  1851. serializeDate: function serializeDate(date) {
  1852. return toISO.call(date);
  1853. },
  1854. skipNulls: false,
  1855. strictNullHandling: false
  1856. };
  1857. var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
  1858. return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
  1859. };
  1860. var sentinel = {};
  1861. var stringify = function stringify2(object, prefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
  1862. var obj = object;
  1863. var tmpSc = sideChannel;
  1864. var step = 0;
  1865. var findFlag = false;
  1866. while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
  1867. var pos = tmpSc.get(object);
  1868. step += 1;
  1869. if (typeof pos !== "undefined") {
  1870. if (pos === step) {
  1871. throw new RangeError("Cyclic object value");
  1872. } else {
  1873. findFlag = true;
  1874. }
  1875. }
  1876. if (typeof tmpSc.get(sentinel) === "undefined") {
  1877. step = 0;
  1878. }
  1879. }
  1880. if (typeof filter === "function") {
  1881. obj = filter(prefix, obj);
  1882. } else if (obj instanceof Date) {
  1883. obj = serializeDate(obj);
  1884. } else if (generateArrayPrefix === "comma" && isArray(obj)) {
  1885. obj = utils.maybeMap(obj, function(value2) {
  1886. if (value2 instanceof Date) {
  1887. return serializeDate(value2);
  1888. }
  1889. return value2;
  1890. });
  1891. }
  1892. if (obj === null) {
  1893. if (strictNullHandling) {
  1894. return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix;
  1895. }
  1896. obj = "";
  1897. }
  1898. if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
  1899. if (encoder) {
  1900. var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format);
  1901. return [formatter(keyValue) + "=" + formatter(encoder(obj, defaults.encoder, charset, "value", format))];
  1902. }
  1903. return [formatter(prefix) + "=" + formatter(String(obj))];
  1904. }
  1905. var values = [];
  1906. if (typeof obj === "undefined") {
  1907. return values;
  1908. }
  1909. var objKeys;
  1910. if (generateArrayPrefix === "comma" && isArray(obj)) {
  1911. if (encodeValuesOnly && encoder) {
  1912. obj = utils.maybeMap(obj, encoder);
  1913. }
  1914. objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
  1915. } else if (isArray(filter)) {
  1916. objKeys = filter;
  1917. } else {
  1918. var keys = Object.keys(obj);
  1919. objKeys = sort ? keys.sort(sort) : keys;
  1920. }
  1921. var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + "[]" : prefix;
  1922. for (var j = 0; j < objKeys.length; ++j) {
  1923. var key = objKeys[j];
  1924. var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key];
  1925. if (skipNulls && value === null) {
  1926. continue;
  1927. }
  1928. var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + key : "[" + key + "]");
  1929. sideChannel.set(object, step);
  1930. var valueSideChannel = getSideChannel();
  1931. valueSideChannel.set(sentinel, sideChannel);
  1932. pushToArray(values, stringify2(
  1933. value,
  1934. keyPrefix,
  1935. generateArrayPrefix,
  1936. commaRoundTrip,
  1937. strictNullHandling,
  1938. skipNulls,
  1939. generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder,
  1940. filter,
  1941. sort,
  1942. allowDots,
  1943. serializeDate,
  1944. format,
  1945. formatter,
  1946. encodeValuesOnly,
  1947. charset,
  1948. valueSideChannel
  1949. ));
  1950. }
  1951. return values;
  1952. };
  1953. var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
  1954. if (!opts) {
  1955. return defaults;
  1956. }
  1957. if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") {
  1958. throw new TypeError("Encoder has to be a function.");
  1959. }
  1960. var charset = opts.charset || defaults.charset;
  1961. if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
  1962. throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
  1963. }
  1964. var format = formats["default"];
  1965. if (typeof opts.format !== "undefined") {
  1966. if (!has.call(formats.formatters, opts.format)) {
  1967. throw new TypeError("Unknown format option provided.");
  1968. }
  1969. format = opts.format;
  1970. }
  1971. var formatter = formats.formatters[format];
  1972. var filter = defaults.filter;
  1973. if (typeof opts.filter === "function" || isArray(opts.filter)) {
  1974. filter = opts.filter;
  1975. }
  1976. return {
  1977. addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults.addQueryPrefix,
  1978. allowDots: typeof opts.allowDots === "undefined" ? defaults.allowDots : !!opts.allowDots,
  1979. charset,
  1980. charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
  1981. delimiter: typeof opts.delimiter === "undefined" ? defaults.delimiter : opts.delimiter,
  1982. encode: typeof opts.encode === "boolean" ? opts.encode : defaults.encode,
  1983. encoder: typeof opts.encoder === "function" ? opts.encoder : defaults.encoder,
  1984. encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
  1985. filter,
  1986. format,
  1987. formatter,
  1988. serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults.serializeDate,
  1989. skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults.skipNulls,
  1990. sort: typeof opts.sort === "function" ? opts.sort : null,
  1991. strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
  1992. };
  1993. };
  1994. module.exports = function(object, opts) {
  1995. var obj = object;
  1996. var options = normalizeStringifyOptions(opts);
  1997. var objKeys;
  1998. var filter;
  1999. if (typeof options.filter === "function") {
  2000. filter = options.filter;
  2001. obj = filter("", obj);
  2002. } else if (isArray(options.filter)) {
  2003. filter = options.filter;
  2004. objKeys = filter;
  2005. }
  2006. var keys = [];
  2007. if (typeof obj !== "object" || obj === null) {
  2008. return "";
  2009. }
  2010. var arrayFormat;
  2011. if (opts && opts.arrayFormat in arrayPrefixGenerators) {
  2012. arrayFormat = opts.arrayFormat;
  2013. } else if (opts && "indices" in opts) {
  2014. arrayFormat = opts.indices ? "indices" : "repeat";
  2015. } else {
  2016. arrayFormat = "indices";
  2017. }
  2018. var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
  2019. if (opts && "commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
  2020. throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
  2021. }
  2022. var commaRoundTrip = generateArrayPrefix === "comma" && opts && opts.commaRoundTrip;
  2023. if (!objKeys) {
  2024. objKeys = Object.keys(obj);
  2025. }
  2026. if (options.sort) {
  2027. objKeys.sort(options.sort);
  2028. }
  2029. var sideChannel = getSideChannel();
  2030. for (var i = 0; i < objKeys.length; ++i) {
  2031. var key = objKeys[i];
  2032. if (options.skipNulls && obj[key] === null) {
  2033. continue;
  2034. }
  2035. pushToArray(keys, stringify(
  2036. obj[key],
  2037. key,
  2038. generateArrayPrefix,
  2039. commaRoundTrip,
  2040. options.strictNullHandling,
  2041. options.skipNulls,
  2042. options.encode ? options.encoder : null,
  2043. options.filter,
  2044. options.sort,
  2045. options.allowDots,
  2046. options.serializeDate,
  2047. options.format,
  2048. options.formatter,
  2049. options.encodeValuesOnly,
  2050. options.charset,
  2051. sideChannel
  2052. ));
  2053. }
  2054. var joined = keys.join(options.delimiter);
  2055. var prefix = options.addQueryPrefix === true ? "?" : "";
  2056. if (options.charsetSentinel) {
  2057. if (options.charset === "iso-8859-1") {
  2058. prefix += "utf8=%26%2310003%3B&";
  2059. } else {
  2060. prefix += "utf8=%E2%9C%93&";
  2061. }
  2062. }
  2063. return joined.length > 0 ? prefix + joined : "";
  2064. };
  2065. }
  2066. });
  2067. // node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/parse.js
  2068. var require_parse = __commonJS({
  2069. "node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/parse.js"(exports, module) {
  2070. "use strict";
  2071. var utils = require_utils();
  2072. var has = Object.prototype.hasOwnProperty;
  2073. var isArray = Array.isArray;
  2074. var defaults = {
  2075. allowDots: false,
  2076. allowPrototypes: false,
  2077. allowSparse: false,
  2078. arrayLimit: 20,
  2079. charset: "utf-8",
  2080. charsetSentinel: false,
  2081. comma: false,
  2082. decoder: utils.decode,
  2083. delimiter: "&",
  2084. depth: 5,
  2085. ignoreQueryPrefix: false,
  2086. interpretNumericEntities: false,
  2087. parameterLimit: 1e3,
  2088. parseArrays: true,
  2089. plainObjects: false,
  2090. strictNullHandling: false
  2091. };
  2092. var interpretNumericEntities = function(str) {
  2093. return str.replace(/&#(\d+);/g, function($0, numberStr) {
  2094. return String.fromCharCode(parseInt(numberStr, 10));
  2095. });
  2096. };
  2097. var parseArrayValue = function(val, options) {
  2098. if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
  2099. return val.split(",");
  2100. }
  2101. return val;
  2102. };
  2103. var isoSentinel = "utf8=%26%2310003%3B";
  2104. var charsetSentinel = "utf8=%E2%9C%93";
  2105. var parseValues = function parseQueryStringValues(str, options) {
  2106. var obj = {};
  2107. var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
  2108. var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
  2109. var parts = cleanStr.split(options.delimiter, limit);
  2110. var skipIndex = -1;
  2111. var i;
  2112. var charset = options.charset;
  2113. if (options.charsetSentinel) {
  2114. for (i = 0; i < parts.length; ++i) {
  2115. if (parts[i].indexOf("utf8=") === 0) {
  2116. if (parts[i] === charsetSentinel) {
  2117. charset = "utf-8";
  2118. } else if (parts[i] === isoSentinel) {
  2119. charset = "iso-8859-1";
  2120. }
  2121. skipIndex = i;
  2122. i = parts.length;
  2123. }
  2124. }
  2125. }
  2126. for (i = 0; i < parts.length; ++i) {
  2127. if (i === skipIndex) {
  2128. continue;
  2129. }
  2130. var part = parts[i];
  2131. var bracketEqualsPos = part.indexOf("]=");
  2132. var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
  2133. var key, val;
  2134. if (pos === -1) {
  2135. key = options.decoder(part, defaults.decoder, charset, "key");
  2136. val = options.strictNullHandling ? null : "";
  2137. } else {
  2138. key = options.decoder(part.slice(0, pos), defaults.decoder, charset, "key");
  2139. val = utils.maybeMap(
  2140. parseArrayValue(part.slice(pos + 1), options),
  2141. function(encodedVal) {
  2142. return options.decoder(encodedVal, defaults.decoder, charset, "value");
  2143. }
  2144. );
  2145. }
  2146. if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
  2147. val = interpretNumericEntities(val);
  2148. }
  2149. if (part.indexOf("[]=") > -1) {
  2150. val = isArray(val) ? [val] : val;
  2151. }
  2152. if (has.call(obj, key)) {
  2153. obj[key] = utils.combine(obj[key], val);
  2154. } else {
  2155. obj[key] = val;
  2156. }
  2157. }
  2158. return obj;
  2159. };
  2160. var parseObject = function(chain, val, options, valuesParsed) {
  2161. var leaf = valuesParsed ? val : parseArrayValue(val, options);
  2162. for (var i = chain.length - 1; i >= 0; --i) {
  2163. var obj;
  2164. var root = chain[i];
  2165. if (root === "[]" && options.parseArrays) {
  2166. obj = [].concat(leaf);
  2167. } else {
  2168. obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
  2169. var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root;
  2170. var index = parseInt(cleanRoot, 10);
  2171. if (!options.parseArrays && cleanRoot === "") {
  2172. obj = { 0: leaf };
  2173. } else if (!isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) {
  2174. obj = [];
  2175. obj[index] = leaf;
  2176. } else if (cleanRoot !== "__proto__") {
  2177. obj[cleanRoot] = leaf;
  2178. }
  2179. }
  2180. leaf = obj;
  2181. }
  2182. return leaf;
  2183. };
  2184. var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
  2185. if (!givenKey) {
  2186. return;
  2187. }
  2188. var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
  2189. var brackets = /(\[[^[\]]*])/;
  2190. var child = /(\[[^[\]]*])/g;
  2191. var segment = options.depth > 0 && brackets.exec(key);
  2192. var parent = segment ? key.slice(0, segment.index) : key;
  2193. var keys = [];
  2194. if (parent) {
  2195. if (!options.plainObjects && has.call(Object.prototype, parent)) {
  2196. if (!options.allowPrototypes) {
  2197. return;
  2198. }
  2199. }
  2200. keys.push(parent);
  2201. }
  2202. var i = 0;
  2203. while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
  2204. i += 1;
  2205. if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
  2206. if (!options.allowPrototypes) {
  2207. return;
  2208. }
  2209. }
  2210. keys.push(segment[1]);
  2211. }
  2212. if (segment) {
  2213. keys.push("[" + key.slice(segment.index) + "]");
  2214. }
  2215. return parseObject(keys, val, options, valuesParsed);
  2216. };
  2217. var normalizeParseOptions = function normalizeParseOptions2(opts) {
  2218. if (!opts) {
  2219. return defaults;
  2220. }
  2221. if (opts.decoder !== null && opts.decoder !== void 0 && typeof opts.decoder !== "function") {
  2222. throw new TypeError("Decoder has to be a function.");
  2223. }
  2224. if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
  2225. throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
  2226. }
  2227. var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset;
  2228. return {
  2229. allowDots: typeof opts.allowDots === "undefined" ? defaults.allowDots : !!opts.allowDots,
  2230. allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes,
  2231. allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse,
  2232. arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults.arrayLimit,
  2233. charset,
  2234. charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
  2235. comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma,
  2236. decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder,
  2237. delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
  2238. // eslint-disable-next-line no-implicit-coercion, no-extra-parens
  2239. depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth,
  2240. ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
  2241. interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
  2242. parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults.parameterLimit,
  2243. parseArrays: opts.parseArrays !== false,
  2244. plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults.plainObjects,
  2245. strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
  2246. };
  2247. };
  2248. module.exports = function(str, opts) {
  2249. var options = normalizeParseOptions(opts);
  2250. if (str === "" || str === null || typeof str === "undefined") {
  2251. return options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
  2252. }
  2253. var tempObj = typeof str === "string" ? parseValues(str, options) : str;
  2254. var obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
  2255. var keys = Object.keys(tempObj);
  2256. for (var i = 0; i < keys.length; ++i) {
  2257. var key = keys[i];
  2258. var newObj = parseKeys(key, tempObj[key], options, typeof str === "string");
  2259. obj = utils.merge(obj, newObj, options);
  2260. }
  2261. if (options.allowSparse === true) {
  2262. return obj;
  2263. }
  2264. return utils.compact(obj);
  2265. };
  2266. }
  2267. });
  2268. // node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/index.js
  2269. var require_lib = __commonJS({
  2270. "node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/index.js"(exports, module) {
  2271. var stringify = require_stringify();
  2272. var parse = require_parse();
  2273. var formats = require_formats();
  2274. module.exports = {
  2275. formats,
  2276. parse,
  2277. stringify
  2278. };
  2279. }
  2280. });
  2281. export default require_lib();
  2282. //# sourceMappingURL=qs.js.map