vitepress___@vue_devtools-api.js 130 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512
  1. // node_modules/@vue/devtools-shared/dist/index.js
  2. var __create = Object.create;
  3. var __defProp = Object.defineProperty;
  4. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  5. var __getOwnPropNames = Object.getOwnPropertyNames;
  6. var __getProtoOf = Object.getPrototypeOf;
  7. var __hasOwnProp = Object.prototype.hasOwnProperty;
  8. var __esm = (fn, res) => function __init() {
  9. return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
  10. };
  11. var __commonJS = (cb, mod) => function __require() {
  12. return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  13. };
  14. var __copyProps = (to, from, except, desc) => {
  15. if (from && typeof from === "object" || typeof from === "function") {
  16. for (let key of __getOwnPropNames(from))
  17. if (!__hasOwnProp.call(to, key) && key !== except)
  18. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  19. }
  20. return to;
  21. };
  22. var __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  23. // If the importer is in node compatibility mode or this is not an ESM
  24. // file that has been converted to a CommonJS file using a Babel-
  25. // compatible transform (i.e. "__esModule" has not been set), then set
  26. // "default" to the CommonJS "module.exports" for node compatibility.
  27. isNodeMode || !mod || !mod.__esModule ? __defProp(target2, "default", { value: mod, enumerable: true }) : target2,
  28. mod
  29. ));
  30. var init_esm_shims = __esm({
  31. "../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.0_@types+node@22.10.1__@swc+core@1.5.29_jiti@2.0.0_p_swvvp2d4pgn6xuiiec4l4x2i7a/node_modules/tsup/assets/esm_shims.js"() {
  32. "use strict";
  33. }
  34. });
  35. var require_rfdc = __commonJS({
  36. "../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(exports, module) {
  37. "use strict";
  38. init_esm_shims();
  39. module.exports = rfdc2;
  40. function copyBuffer(cur) {
  41. if (cur instanceof Buffer) {
  42. return Buffer.from(cur);
  43. }
  44. return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length);
  45. }
  46. function rfdc2(opts) {
  47. opts = opts || {};
  48. if (opts.circles) return rfdcCircles(opts);
  49. const constructorHandlers = /* @__PURE__ */ new Map();
  50. constructorHandlers.set(Date, (o) => new Date(o));
  51. constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
  52. constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
  53. if (opts.constructorHandlers) {
  54. for (const handler2 of opts.constructorHandlers) {
  55. constructorHandlers.set(handler2[0], handler2[1]);
  56. }
  57. }
  58. let handler = null;
  59. return opts.proto ? cloneProto : clone;
  60. function cloneArray(a, fn) {
  61. const keys = Object.keys(a);
  62. const a2 = new Array(keys.length);
  63. for (let i = 0; i < keys.length; i++) {
  64. const k = keys[i];
  65. const cur = a[k];
  66. if (typeof cur !== "object" || cur === null) {
  67. a2[k] = cur;
  68. } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
  69. a2[k] = handler(cur, fn);
  70. } else if (ArrayBuffer.isView(cur)) {
  71. a2[k] = copyBuffer(cur);
  72. } else {
  73. a2[k] = fn(cur);
  74. }
  75. }
  76. return a2;
  77. }
  78. function clone(o) {
  79. if (typeof o !== "object" || o === null) return o;
  80. if (Array.isArray(o)) return cloneArray(o, clone);
  81. if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
  82. return handler(o, clone);
  83. }
  84. const o2 = {};
  85. for (const k in o) {
  86. if (Object.hasOwnProperty.call(o, k) === false) continue;
  87. const cur = o[k];
  88. if (typeof cur !== "object" || cur === null) {
  89. o2[k] = cur;
  90. } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
  91. o2[k] = handler(cur, clone);
  92. } else if (ArrayBuffer.isView(cur)) {
  93. o2[k] = copyBuffer(cur);
  94. } else {
  95. o2[k] = clone(cur);
  96. }
  97. }
  98. return o2;
  99. }
  100. function cloneProto(o) {
  101. if (typeof o !== "object" || o === null) return o;
  102. if (Array.isArray(o)) return cloneArray(o, cloneProto);
  103. if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
  104. return handler(o, cloneProto);
  105. }
  106. const o2 = {};
  107. for (const k in o) {
  108. const cur = o[k];
  109. if (typeof cur !== "object" || cur === null) {
  110. o2[k] = cur;
  111. } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
  112. o2[k] = handler(cur, cloneProto);
  113. } else if (ArrayBuffer.isView(cur)) {
  114. o2[k] = copyBuffer(cur);
  115. } else {
  116. o2[k] = cloneProto(cur);
  117. }
  118. }
  119. return o2;
  120. }
  121. }
  122. function rfdcCircles(opts) {
  123. const refs = [];
  124. const refsNew = [];
  125. const constructorHandlers = /* @__PURE__ */ new Map();
  126. constructorHandlers.set(Date, (o) => new Date(o));
  127. constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
  128. constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
  129. if (opts.constructorHandlers) {
  130. for (const handler2 of opts.constructorHandlers) {
  131. constructorHandlers.set(handler2[0], handler2[1]);
  132. }
  133. }
  134. let handler = null;
  135. return opts.proto ? cloneProto : clone;
  136. function cloneArray(a, fn) {
  137. const keys = Object.keys(a);
  138. const a2 = new Array(keys.length);
  139. for (let i = 0; i < keys.length; i++) {
  140. const k = keys[i];
  141. const cur = a[k];
  142. if (typeof cur !== "object" || cur === null) {
  143. a2[k] = cur;
  144. } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
  145. a2[k] = handler(cur, fn);
  146. } else if (ArrayBuffer.isView(cur)) {
  147. a2[k] = copyBuffer(cur);
  148. } else {
  149. const index = refs.indexOf(cur);
  150. if (index !== -1) {
  151. a2[k] = refsNew[index];
  152. } else {
  153. a2[k] = fn(cur);
  154. }
  155. }
  156. }
  157. return a2;
  158. }
  159. function clone(o) {
  160. if (typeof o !== "object" || o === null) return o;
  161. if (Array.isArray(o)) return cloneArray(o, clone);
  162. if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
  163. return handler(o, clone);
  164. }
  165. const o2 = {};
  166. refs.push(o);
  167. refsNew.push(o2);
  168. for (const k in o) {
  169. if (Object.hasOwnProperty.call(o, k) === false) continue;
  170. const cur = o[k];
  171. if (typeof cur !== "object" || cur === null) {
  172. o2[k] = cur;
  173. } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
  174. o2[k] = handler(cur, clone);
  175. } else if (ArrayBuffer.isView(cur)) {
  176. o2[k] = copyBuffer(cur);
  177. } else {
  178. const i = refs.indexOf(cur);
  179. if (i !== -1) {
  180. o2[k] = refsNew[i];
  181. } else {
  182. o2[k] = clone(cur);
  183. }
  184. }
  185. }
  186. refs.pop();
  187. refsNew.pop();
  188. return o2;
  189. }
  190. function cloneProto(o) {
  191. if (typeof o !== "object" || o === null) return o;
  192. if (Array.isArray(o)) return cloneArray(o, cloneProto);
  193. if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
  194. return handler(o, cloneProto);
  195. }
  196. const o2 = {};
  197. refs.push(o);
  198. refsNew.push(o2);
  199. for (const k in o) {
  200. const cur = o[k];
  201. if (typeof cur !== "object" || cur === null) {
  202. o2[k] = cur;
  203. } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
  204. o2[k] = handler(cur, cloneProto);
  205. } else if (ArrayBuffer.isView(cur)) {
  206. o2[k] = copyBuffer(cur);
  207. } else {
  208. const i = refs.indexOf(cur);
  209. if (i !== -1) {
  210. o2[k] = refsNew[i];
  211. } else {
  212. o2[k] = cloneProto(cur);
  213. }
  214. }
  215. }
  216. refs.pop();
  217. refsNew.pop();
  218. return o2;
  219. }
  220. }
  221. }
  222. });
  223. init_esm_shims();
  224. init_esm_shims();
  225. init_esm_shims();
  226. var isBrowser = typeof navigator !== "undefined";
  227. var target = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : {};
  228. var isInChromePanel = typeof target.chrome !== "undefined" && !!target.chrome.devtools;
  229. var isInIframe = isBrowser && target.self !== target.top;
  230. var _a;
  231. var isInElectron = typeof navigator !== "undefined" && ((_a = navigator.userAgent) == null ? void 0 : _a.toLowerCase().includes("electron"));
  232. var isNuxtApp = typeof window !== "undefined" && !!window.__NUXT__;
  233. init_esm_shims();
  234. var import_rfdc = __toESM(require_rfdc(), 1);
  235. var classifyRE = /(?:^|[-_/])(\w)/g;
  236. function toUpper(_, c) {
  237. return c ? c.toUpperCase() : "";
  238. }
  239. function classify(str) {
  240. return str && `${str}`.replace(classifyRE, toUpper);
  241. }
  242. function basename(filename, ext) {
  243. let normalizedFilename = filename.replace(/^[a-z]:/i, "").replace(/\\/g, "/");
  244. if (normalizedFilename.endsWith(`index${ext}`)) {
  245. normalizedFilename = normalizedFilename.replace(`/index${ext}`, ext);
  246. }
  247. const lastSlashIndex = normalizedFilename.lastIndexOf("/");
  248. const baseNameWithExt = normalizedFilename.substring(lastSlashIndex + 1);
  249. if (ext) {
  250. const extIndex = baseNameWithExt.lastIndexOf(ext);
  251. return baseNameWithExt.substring(0, extIndex);
  252. }
  253. return "";
  254. }
  255. var HTTP_URL_RE = /^https?:\/\//;
  256. function isUrlString(str) {
  257. return str.startsWith("/") || HTTP_URL_RE.test(str);
  258. }
  259. var deepClone = (0, import_rfdc.default)({ circles: true });
  260. // node_modules/perfect-debounce/dist/index.mjs
  261. var DEBOUNCE_DEFAULTS = {
  262. trailing: true
  263. };
  264. function debounce(fn, wait = 25, options = {}) {
  265. options = { ...DEBOUNCE_DEFAULTS, ...options };
  266. if (!Number.isFinite(wait)) {
  267. throw new TypeError("Expected `wait` to be a finite number");
  268. }
  269. let leadingValue;
  270. let timeout;
  271. let resolveList = [];
  272. let currentPromise;
  273. let trailingArgs;
  274. const applyFn = (_this, args) => {
  275. currentPromise = _applyPromised(fn, _this, args);
  276. currentPromise.finally(() => {
  277. currentPromise = null;
  278. if (options.trailing && trailingArgs && !timeout) {
  279. const promise = applyFn(_this, trailingArgs);
  280. trailingArgs = null;
  281. return promise;
  282. }
  283. });
  284. return currentPromise;
  285. };
  286. return function(...args) {
  287. if (currentPromise) {
  288. if (options.trailing) {
  289. trailingArgs = args;
  290. }
  291. return currentPromise;
  292. }
  293. return new Promise((resolve) => {
  294. const shouldCallNow = !timeout && options.leading;
  295. clearTimeout(timeout);
  296. timeout = setTimeout(() => {
  297. timeout = null;
  298. const promise = options.leading ? leadingValue : applyFn(this, args);
  299. for (const _resolve of resolveList) {
  300. _resolve(promise);
  301. }
  302. resolveList = [];
  303. }, wait);
  304. if (shouldCallNow) {
  305. leadingValue = applyFn(this, args);
  306. resolve(leadingValue);
  307. } else {
  308. resolveList.push(resolve);
  309. }
  310. });
  311. };
  312. }
  313. async function _applyPromised(fn, _this, args) {
  314. return await fn.apply(_this, args);
  315. }
  316. // node_modules/hookable/dist/index.mjs
  317. function flatHooks(configHooks, hooks2 = {}, parentName) {
  318. for (const key in configHooks) {
  319. const subHook = configHooks[key];
  320. const name = parentName ? `${parentName}:${key}` : key;
  321. if (typeof subHook === "object" && subHook !== null) {
  322. flatHooks(subHook, hooks2, name);
  323. } else if (typeof subHook === "function") {
  324. hooks2[name] = subHook;
  325. }
  326. }
  327. return hooks2;
  328. }
  329. var defaultTask = { run: (function_) => function_() };
  330. var _createTask = () => defaultTask;
  331. var createTask = typeof console.createTask !== "undefined" ? console.createTask : _createTask;
  332. function serialTaskCaller(hooks2, args) {
  333. const name = args.shift();
  334. const task = createTask(name);
  335. return hooks2.reduce(
  336. (promise, hookFunction) => promise.then(() => task.run(() => hookFunction(...args))),
  337. Promise.resolve()
  338. );
  339. }
  340. function parallelTaskCaller(hooks2, args) {
  341. const name = args.shift();
  342. const task = createTask(name);
  343. return Promise.all(hooks2.map((hook2) => task.run(() => hook2(...args))));
  344. }
  345. function callEachWith(callbacks, arg0) {
  346. for (const callback of [...callbacks]) {
  347. callback(arg0);
  348. }
  349. }
  350. var Hookable = class {
  351. constructor() {
  352. this._hooks = {};
  353. this._before = void 0;
  354. this._after = void 0;
  355. this._deprecatedMessages = void 0;
  356. this._deprecatedHooks = {};
  357. this.hook = this.hook.bind(this);
  358. this.callHook = this.callHook.bind(this);
  359. this.callHookWith = this.callHookWith.bind(this);
  360. }
  361. hook(name, function_, options = {}) {
  362. if (!name || typeof function_ !== "function") {
  363. return () => {
  364. };
  365. }
  366. const originalName = name;
  367. let dep;
  368. while (this._deprecatedHooks[name]) {
  369. dep = this._deprecatedHooks[name];
  370. name = dep.to;
  371. }
  372. if (dep && !options.allowDeprecated) {
  373. let message = dep.message;
  374. if (!message) {
  375. message = `${originalName} hook has been deprecated` + (dep.to ? `, please use ${dep.to}` : "");
  376. }
  377. if (!this._deprecatedMessages) {
  378. this._deprecatedMessages = /* @__PURE__ */ new Set();
  379. }
  380. if (!this._deprecatedMessages.has(message)) {
  381. console.warn(message);
  382. this._deprecatedMessages.add(message);
  383. }
  384. }
  385. if (!function_.name) {
  386. try {
  387. Object.defineProperty(function_, "name", {
  388. get: () => "_" + name.replace(/\W+/g, "_") + "_hook_cb",
  389. configurable: true
  390. });
  391. } catch {
  392. }
  393. }
  394. this._hooks[name] = this._hooks[name] || [];
  395. this._hooks[name].push(function_);
  396. return () => {
  397. if (function_) {
  398. this.removeHook(name, function_);
  399. function_ = void 0;
  400. }
  401. };
  402. }
  403. hookOnce(name, function_) {
  404. let _unreg;
  405. let _function = (...arguments_) => {
  406. if (typeof _unreg === "function") {
  407. _unreg();
  408. }
  409. _unreg = void 0;
  410. _function = void 0;
  411. return function_(...arguments_);
  412. };
  413. _unreg = this.hook(name, _function);
  414. return _unreg;
  415. }
  416. removeHook(name, function_) {
  417. if (this._hooks[name]) {
  418. const index = this._hooks[name].indexOf(function_);
  419. if (index !== -1) {
  420. this._hooks[name].splice(index, 1);
  421. }
  422. if (this._hooks[name].length === 0) {
  423. delete this._hooks[name];
  424. }
  425. }
  426. }
  427. deprecateHook(name, deprecated) {
  428. this._deprecatedHooks[name] = typeof deprecated === "string" ? { to: deprecated } : deprecated;
  429. const _hooks = this._hooks[name] || [];
  430. delete this._hooks[name];
  431. for (const hook2 of _hooks) {
  432. this.hook(name, hook2);
  433. }
  434. }
  435. deprecateHooks(deprecatedHooks) {
  436. Object.assign(this._deprecatedHooks, deprecatedHooks);
  437. for (const name in deprecatedHooks) {
  438. this.deprecateHook(name, deprecatedHooks[name]);
  439. }
  440. }
  441. addHooks(configHooks) {
  442. const hooks2 = flatHooks(configHooks);
  443. const removeFns = Object.keys(hooks2).map(
  444. (key) => this.hook(key, hooks2[key])
  445. );
  446. return () => {
  447. for (const unreg of removeFns.splice(0, removeFns.length)) {
  448. unreg();
  449. }
  450. };
  451. }
  452. removeHooks(configHooks) {
  453. const hooks2 = flatHooks(configHooks);
  454. for (const key in hooks2) {
  455. this.removeHook(key, hooks2[key]);
  456. }
  457. }
  458. removeAllHooks() {
  459. for (const key in this._hooks) {
  460. delete this._hooks[key];
  461. }
  462. }
  463. callHook(name, ...arguments_) {
  464. arguments_.unshift(name);
  465. return this.callHookWith(serialTaskCaller, name, ...arguments_);
  466. }
  467. callHookParallel(name, ...arguments_) {
  468. arguments_.unshift(name);
  469. return this.callHookWith(parallelTaskCaller, name, ...arguments_);
  470. }
  471. callHookWith(caller, name, ...arguments_) {
  472. const event = this._before || this._after ? { name, args: arguments_, context: {} } : void 0;
  473. if (this._before) {
  474. callEachWith(this._before, event);
  475. }
  476. const result = caller(
  477. name in this._hooks ? [...this._hooks[name]] : [],
  478. arguments_
  479. );
  480. if (result instanceof Promise) {
  481. return result.finally(() => {
  482. if (this._after && event) {
  483. callEachWith(this._after, event);
  484. }
  485. });
  486. }
  487. if (this._after && event) {
  488. callEachWith(this._after, event);
  489. }
  490. return result;
  491. }
  492. beforeEach(function_) {
  493. this._before = this._before || [];
  494. this._before.push(function_);
  495. return () => {
  496. if (this._before !== void 0) {
  497. const index = this._before.indexOf(function_);
  498. if (index !== -1) {
  499. this._before.splice(index, 1);
  500. }
  501. }
  502. };
  503. }
  504. afterEach(function_) {
  505. this._after = this._after || [];
  506. this._after.push(function_);
  507. return () => {
  508. if (this._after !== void 0) {
  509. const index = this._after.indexOf(function_);
  510. if (index !== -1) {
  511. this._after.splice(index, 1);
  512. }
  513. }
  514. };
  515. }
  516. };
  517. function createHooks() {
  518. return new Hookable();
  519. }
  520. // node_modules/birpc/dist/index.mjs
  521. var { clearTimeout: clearTimeout2, setTimeout: setTimeout2 } = globalThis;
  522. var random = Math.random.bind(Math);
  523. // node_modules/@vue/devtools-kit/dist/index.js
  524. var __create2 = Object.create;
  525. var __defProp2 = Object.defineProperty;
  526. var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
  527. var __getOwnPropNames2 = Object.getOwnPropertyNames;
  528. var __getProtoOf2 = Object.getPrototypeOf;
  529. var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  530. var __esm2 = (fn, res) => function __init() {
  531. return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res;
  532. };
  533. var __commonJS2 = (cb, mod) => function __require() {
  534. return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  535. };
  536. var __copyProps2 = (to, from, except, desc) => {
  537. if (from && typeof from === "object" || typeof from === "function") {
  538. for (let key of __getOwnPropNames2(from))
  539. if (!__hasOwnProp2.call(to, key) && key !== except)
  540. __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
  541. }
  542. return to;
  543. };
  544. var __toESM2 = (mod, isNodeMode, target22) => (target22 = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
  545. // If the importer is in node compatibility mode or this is not an ESM
  546. // file that has been converted to a CommonJS file using a Babel-
  547. // compatible transform (i.e. "__esModule" has not been set), then set
  548. // "default" to the CommonJS "module.exports" for node compatibility.
  549. isNodeMode || !mod || !mod.__esModule ? __defProp2(target22, "default", { value: mod, enumerable: true }) : target22,
  550. mod
  551. ));
  552. var init_esm_shims2 = __esm2({
  553. "../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.0_@types+node@22.10.1__@swc+core@1.5.29_jiti@2.0.0_p_swvvp2d4pgn6xuiiec4l4x2i7a/node_modules/tsup/assets/esm_shims.js"() {
  554. "use strict";
  555. }
  556. });
  557. var require_speakingurl = __commonJS2({
  558. "../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(exports, module) {
  559. "use strict";
  560. init_esm_shims2();
  561. (function(root) {
  562. "use strict";
  563. var charMap = {
  564. // latin
  565. "À": "A",
  566. "Á": "A",
  567. "Â": "A",
  568. "Ã": "A",
  569. "Ä": "Ae",
  570. "Å": "A",
  571. "Æ": "AE",
  572. "Ç": "C",
  573. "È": "E",
  574. "É": "E",
  575. "Ê": "E",
  576. "Ë": "E",
  577. "Ì": "I",
  578. "Í": "I",
  579. "Î": "I",
  580. "Ï": "I",
  581. "Ð": "D",
  582. "Ñ": "N",
  583. "Ò": "O",
  584. "Ó": "O",
  585. "Ô": "O",
  586. "Õ": "O",
  587. "Ö": "Oe",
  588. "Ő": "O",
  589. "Ø": "O",
  590. "Ù": "U",
  591. "Ú": "U",
  592. "Û": "U",
  593. "Ü": "Ue",
  594. "Ű": "U",
  595. "Ý": "Y",
  596. "Þ": "TH",
  597. "ß": "ss",
  598. "à": "a",
  599. "á": "a",
  600. "â": "a",
  601. "ã": "a",
  602. "ä": "ae",
  603. "å": "a",
  604. "æ": "ae",
  605. "ç": "c",
  606. "è": "e",
  607. "é": "e",
  608. "ê": "e",
  609. "ë": "e",
  610. "ì": "i",
  611. "í": "i",
  612. "î": "i",
  613. "ï": "i",
  614. "ð": "d",
  615. "ñ": "n",
  616. "ò": "o",
  617. "ó": "o",
  618. "ô": "o",
  619. "õ": "o",
  620. "ö": "oe",
  621. "ő": "o",
  622. "ø": "o",
  623. "ù": "u",
  624. "ú": "u",
  625. "û": "u",
  626. "ü": "ue",
  627. "ű": "u",
  628. "ý": "y",
  629. "þ": "th",
  630. "ÿ": "y",
  631. "ẞ": "SS",
  632. // language specific
  633. // Arabic
  634. "ا": "a",
  635. "أ": "a",
  636. "إ": "i",
  637. "آ": "aa",
  638. "ؤ": "u",
  639. "ئ": "e",
  640. "ء": "a",
  641. "ب": "b",
  642. "ت": "t",
  643. "ث": "th",
  644. "ج": "j",
  645. "ح": "h",
  646. "خ": "kh",
  647. "د": "d",
  648. "ذ": "th",
  649. "ر": "r",
  650. "ز": "z",
  651. "س": "s",
  652. "ش": "sh",
  653. "ص": "s",
  654. "ض": "dh",
  655. "ط": "t",
  656. "ظ": "z",
  657. "ع": "a",
  658. "غ": "gh",
  659. "ف": "f",
  660. "ق": "q",
  661. "ك": "k",
  662. "ل": "l",
  663. "م": "m",
  664. "ن": "n",
  665. "ه": "h",
  666. "و": "w",
  667. "ي": "y",
  668. "ى": "a",
  669. "ة": "h",
  670. "ﻻ": "la",
  671. "ﻷ": "laa",
  672. "ﻹ": "lai",
  673. "ﻵ": "laa",
  674. // Persian additional characters than Arabic
  675. "گ": "g",
  676. "چ": "ch",
  677. "پ": "p",
  678. "ژ": "zh",
  679. "ک": "k",
  680. "ی": "y",
  681. // Arabic diactrics
  682. "َ": "a",
  683. "ً": "an",
  684. "ِ": "e",
  685. "ٍ": "en",
  686. "ُ": "u",
  687. "ٌ": "on",
  688. "ْ": "",
  689. // Arabic numbers
  690. "٠": "0",
  691. "١": "1",
  692. "٢": "2",
  693. "٣": "3",
  694. "٤": "4",
  695. "٥": "5",
  696. "٦": "6",
  697. "٧": "7",
  698. "٨": "8",
  699. "٩": "9",
  700. // Persian numbers
  701. "۰": "0",
  702. "۱": "1",
  703. "۲": "2",
  704. "۳": "3",
  705. "۴": "4",
  706. "۵": "5",
  707. "۶": "6",
  708. "۷": "7",
  709. "۸": "8",
  710. "۹": "9",
  711. // Burmese consonants
  712. "က": "k",
  713. "ခ": "kh",
  714. "ဂ": "g",
  715. "ဃ": "ga",
  716. "င": "ng",
  717. "စ": "s",
  718. "ဆ": "sa",
  719. "ဇ": "z",
  720. "စျ": "za",
  721. "ည": "ny",
  722. "ဋ": "t",
  723. "ဌ": "ta",
  724. "ဍ": "d",
  725. "ဎ": "da",
  726. "ဏ": "na",
  727. "တ": "t",
  728. "ထ": "ta",
  729. "ဒ": "d",
  730. "ဓ": "da",
  731. "န": "n",
  732. "ပ": "p",
  733. "ဖ": "pa",
  734. "ဗ": "b",
  735. "ဘ": "ba",
  736. "မ": "m",
  737. "ယ": "y",
  738. "ရ": "ya",
  739. "လ": "l",
  740. "ဝ": "w",
  741. "သ": "th",
  742. "ဟ": "h",
  743. "ဠ": "la",
  744. "အ": "a",
  745. // consonant character combos
  746. "ြ": "y",
  747. "ျ": "ya",
  748. "ွ": "w",
  749. "ြွ": "yw",
  750. "ျွ": "ywa",
  751. "ှ": "h",
  752. // independent vowels
  753. "ဧ": "e",
  754. "၏": "-e",
  755. "ဣ": "i",
  756. "ဤ": "-i",
  757. "ဉ": "u",
  758. "ဦ": "-u",
  759. "ဩ": "aw",
  760. "သြော": "aw",
  761. "ဪ": "aw",
  762. // numbers
  763. "၀": "0",
  764. "၁": "1",
  765. "၂": "2",
  766. "၃": "3",
  767. "၄": "4",
  768. "၅": "5",
  769. "၆": "6",
  770. "၇": "7",
  771. "၈": "8",
  772. "၉": "9",
  773. // virama and tone marks which are silent in transliteration
  774. "္": "",
  775. "့": "",
  776. "း": "",
  777. // Czech
  778. "č": "c",
  779. "ď": "d",
  780. "ě": "e",
  781. "ň": "n",
  782. "ř": "r",
  783. "š": "s",
  784. "ť": "t",
  785. "ů": "u",
  786. "ž": "z",
  787. "Č": "C",
  788. "Ď": "D",
  789. "Ě": "E",
  790. "Ň": "N",
  791. "Ř": "R",
  792. "Š": "S",
  793. "Ť": "T",
  794. "Ů": "U",
  795. "Ž": "Z",
  796. // Dhivehi
  797. "ހ": "h",
  798. "ށ": "sh",
  799. "ނ": "n",
  800. "ރ": "r",
  801. "ބ": "b",
  802. "ޅ": "lh",
  803. "ކ": "k",
  804. "އ": "a",
  805. "ވ": "v",
  806. "މ": "m",
  807. "ފ": "f",
  808. "ދ": "dh",
  809. "ތ": "th",
  810. "ލ": "l",
  811. "ގ": "g",
  812. "ޏ": "gn",
  813. "ސ": "s",
  814. "ޑ": "d",
  815. "ޒ": "z",
  816. "ޓ": "t",
  817. "ޔ": "y",
  818. "ޕ": "p",
  819. "ޖ": "j",
  820. "ޗ": "ch",
  821. "ޘ": "tt",
  822. "ޙ": "hh",
  823. "ޚ": "kh",
  824. "ޛ": "th",
  825. "ޜ": "z",
  826. "ޝ": "sh",
  827. "ޞ": "s",
  828. "ޟ": "d",
  829. "ޠ": "t",
  830. "ޡ": "z",
  831. "ޢ": "a",
  832. "ޣ": "gh",
  833. "ޤ": "q",
  834. "ޥ": "w",
  835. "ަ": "a",
  836. "ާ": "aa",
  837. "ި": "i",
  838. "ީ": "ee",
  839. "ު": "u",
  840. "ޫ": "oo",
  841. "ެ": "e",
  842. "ޭ": "ey",
  843. "ޮ": "o",
  844. "ޯ": "oa",
  845. "ް": "",
  846. // Georgian https://en.wikipedia.org/wiki/Romanization_of_Georgian
  847. // National system (2002)
  848. "ა": "a",
  849. "ბ": "b",
  850. "გ": "g",
  851. "დ": "d",
  852. "ე": "e",
  853. "ვ": "v",
  854. "ზ": "z",
  855. "თ": "t",
  856. "ი": "i",
  857. "კ": "k",
  858. "ლ": "l",
  859. "მ": "m",
  860. "ნ": "n",
  861. "ო": "o",
  862. "პ": "p",
  863. "ჟ": "zh",
  864. "რ": "r",
  865. "ს": "s",
  866. "ტ": "t",
  867. "უ": "u",
  868. "ფ": "p",
  869. "ქ": "k",
  870. "ღ": "gh",
  871. "ყ": "q",
  872. "შ": "sh",
  873. "ჩ": "ch",
  874. "ც": "ts",
  875. "ძ": "dz",
  876. "წ": "ts",
  877. "ჭ": "ch",
  878. "ხ": "kh",
  879. "ჯ": "j",
  880. "ჰ": "h",
  881. // Greek
  882. "α": "a",
  883. "β": "v",
  884. "γ": "g",
  885. "δ": "d",
  886. "ε": "e",
  887. "ζ": "z",
  888. "η": "i",
  889. "θ": "th",
  890. "ι": "i",
  891. "κ": "k",
  892. "λ": "l",
  893. "μ": "m",
  894. "ν": "n",
  895. "ξ": "ks",
  896. "ο": "o",
  897. "π": "p",
  898. "ρ": "r",
  899. "σ": "s",
  900. "τ": "t",
  901. "υ": "y",
  902. "φ": "f",
  903. "χ": "x",
  904. "ψ": "ps",
  905. "ω": "o",
  906. "ά": "a",
  907. "έ": "e",
  908. "ί": "i",
  909. "ό": "o",
  910. "ύ": "y",
  911. "ή": "i",
  912. "ώ": "o",
  913. "ς": "s",
  914. "ϊ": "i",
  915. "ΰ": "y",
  916. "ϋ": "y",
  917. "ΐ": "i",
  918. "Α": "A",
  919. "Β": "B",
  920. "Γ": "G",
  921. "Δ": "D",
  922. "Ε": "E",
  923. "Ζ": "Z",
  924. "Η": "I",
  925. "Θ": "TH",
  926. "Ι": "I",
  927. "Κ": "K",
  928. "Λ": "L",
  929. "Μ": "M",
  930. "Ν": "N",
  931. "Ξ": "KS",
  932. "Ο": "O",
  933. "Π": "P",
  934. "Ρ": "R",
  935. "Σ": "S",
  936. "Τ": "T",
  937. "Υ": "Y",
  938. "Φ": "F",
  939. "Χ": "X",
  940. "Ψ": "PS",
  941. "Ω": "O",
  942. "Ά": "A",
  943. "Έ": "E",
  944. "Ί": "I",
  945. "Ό": "O",
  946. "Ύ": "Y",
  947. "Ή": "I",
  948. "Ώ": "O",
  949. "Ϊ": "I",
  950. "Ϋ": "Y",
  951. // Latvian
  952. "ā": "a",
  953. // 'č': 'c', // duplicate
  954. "ē": "e",
  955. "ģ": "g",
  956. "ī": "i",
  957. "ķ": "k",
  958. "ļ": "l",
  959. "ņ": "n",
  960. // 'š': 's', // duplicate
  961. "ū": "u",
  962. // 'ž': 'z', // duplicate
  963. "Ā": "A",
  964. // 'Č': 'C', // duplicate
  965. "Ē": "E",
  966. "Ģ": "G",
  967. "Ī": "I",
  968. "Ķ": "k",
  969. "Ļ": "L",
  970. "Ņ": "N",
  971. // 'Š': 'S', // duplicate
  972. "Ū": "U",
  973. // 'Ž': 'Z', // duplicate
  974. // Macedonian
  975. "Ќ": "Kj",
  976. "ќ": "kj",
  977. "Љ": "Lj",
  978. "љ": "lj",
  979. "Њ": "Nj",
  980. "њ": "nj",
  981. "Тс": "Ts",
  982. "тс": "ts",
  983. // Polish
  984. "ą": "a",
  985. "ć": "c",
  986. "ę": "e",
  987. "ł": "l",
  988. "ń": "n",
  989. // 'ó': 'o', // duplicate
  990. "ś": "s",
  991. "ź": "z",
  992. "ż": "z",
  993. "Ą": "A",
  994. "Ć": "C",
  995. "Ę": "E",
  996. "Ł": "L",
  997. "Ń": "N",
  998. "Ś": "S",
  999. "Ź": "Z",
  1000. "Ż": "Z",
  1001. // Ukranian
  1002. "Є": "Ye",
  1003. "І": "I",
  1004. "Ї": "Yi",
  1005. "Ґ": "G",
  1006. "є": "ye",
  1007. "і": "i",
  1008. "ї": "yi",
  1009. "ґ": "g",
  1010. // Romanian
  1011. "ă": "a",
  1012. "Ă": "A",
  1013. "ș": "s",
  1014. "Ș": "S",
  1015. // 'ş': 's', // duplicate
  1016. // 'Ş': 'S', // duplicate
  1017. "ț": "t",
  1018. "Ț": "T",
  1019. "ţ": "t",
  1020. "Ţ": "T",
  1021. // Russian https://en.wikipedia.org/wiki/Romanization_of_Russian
  1022. // ICAO
  1023. "а": "a",
  1024. "б": "b",
  1025. "в": "v",
  1026. "г": "g",
  1027. "д": "d",
  1028. "е": "e",
  1029. "ё": "yo",
  1030. "ж": "zh",
  1031. "з": "z",
  1032. "и": "i",
  1033. "й": "i",
  1034. "к": "k",
  1035. "л": "l",
  1036. "м": "m",
  1037. "н": "n",
  1038. "о": "o",
  1039. "п": "p",
  1040. "р": "r",
  1041. "с": "s",
  1042. "т": "t",
  1043. "у": "u",
  1044. "ф": "f",
  1045. "х": "kh",
  1046. "ц": "c",
  1047. "ч": "ch",
  1048. "ш": "sh",
  1049. "щ": "sh",
  1050. "ъ": "",
  1051. "ы": "y",
  1052. "ь": "",
  1053. "э": "e",
  1054. "ю": "yu",
  1055. "я": "ya",
  1056. "А": "A",
  1057. "Б": "B",
  1058. "В": "V",
  1059. "Г": "G",
  1060. "Д": "D",
  1061. "Е": "E",
  1062. "Ё": "Yo",
  1063. "Ж": "Zh",
  1064. "З": "Z",
  1065. "И": "I",
  1066. "Й": "I",
  1067. "К": "K",
  1068. "Л": "L",
  1069. "М": "M",
  1070. "Н": "N",
  1071. "О": "O",
  1072. "П": "P",
  1073. "Р": "R",
  1074. "С": "S",
  1075. "Т": "T",
  1076. "У": "U",
  1077. "Ф": "F",
  1078. "Х": "Kh",
  1079. "Ц": "C",
  1080. "Ч": "Ch",
  1081. "Ш": "Sh",
  1082. "Щ": "Sh",
  1083. "Ъ": "",
  1084. "Ы": "Y",
  1085. "Ь": "",
  1086. "Э": "E",
  1087. "Ю": "Yu",
  1088. "Я": "Ya",
  1089. // Serbian
  1090. "ђ": "dj",
  1091. "ј": "j",
  1092. // 'љ': 'lj', // duplicate
  1093. // 'њ': 'nj', // duplicate
  1094. "ћ": "c",
  1095. "џ": "dz",
  1096. "Ђ": "Dj",
  1097. "Ј": "j",
  1098. // 'Љ': 'Lj', // duplicate
  1099. // 'Њ': 'Nj', // duplicate
  1100. "Ћ": "C",
  1101. "Џ": "Dz",
  1102. // Slovak
  1103. "ľ": "l",
  1104. "ĺ": "l",
  1105. "ŕ": "r",
  1106. "Ľ": "L",
  1107. "Ĺ": "L",
  1108. "Ŕ": "R",
  1109. // Turkish
  1110. "ş": "s",
  1111. "Ş": "S",
  1112. "ı": "i",
  1113. "İ": "I",
  1114. // 'ç': 'c', // duplicate
  1115. // 'Ç': 'C', // duplicate
  1116. // 'ü': 'u', // duplicate, see langCharMap
  1117. // 'Ü': 'U', // duplicate, see langCharMap
  1118. // 'ö': 'o', // duplicate, see langCharMap
  1119. // 'Ö': 'O', // duplicate, see langCharMap
  1120. "ğ": "g",
  1121. "Ğ": "G",
  1122. // Vietnamese
  1123. "ả": "a",
  1124. "Ả": "A",
  1125. "ẳ": "a",
  1126. "Ẳ": "A",
  1127. "ẩ": "a",
  1128. "Ẩ": "A",
  1129. "đ": "d",
  1130. "Đ": "D",
  1131. "ẹ": "e",
  1132. "Ẹ": "E",
  1133. "ẽ": "e",
  1134. "Ẽ": "E",
  1135. "ẻ": "e",
  1136. "Ẻ": "E",
  1137. "ế": "e",
  1138. "Ế": "E",
  1139. "ề": "e",
  1140. "Ề": "E",
  1141. "ệ": "e",
  1142. "Ệ": "E",
  1143. "ễ": "e",
  1144. "Ễ": "E",
  1145. "ể": "e",
  1146. "Ể": "E",
  1147. "ỏ": "o",
  1148. "ọ": "o",
  1149. "Ọ": "o",
  1150. "ố": "o",
  1151. "Ố": "O",
  1152. "ồ": "o",
  1153. "Ồ": "O",
  1154. "ổ": "o",
  1155. "Ổ": "O",
  1156. "ộ": "o",
  1157. "Ộ": "O",
  1158. "ỗ": "o",
  1159. "Ỗ": "O",
  1160. "ơ": "o",
  1161. "Ơ": "O",
  1162. "ớ": "o",
  1163. "Ớ": "O",
  1164. "ờ": "o",
  1165. "Ờ": "O",
  1166. "ợ": "o",
  1167. "Ợ": "O",
  1168. "ỡ": "o",
  1169. "Ỡ": "O",
  1170. "Ở": "o",
  1171. "ở": "o",
  1172. "ị": "i",
  1173. "Ị": "I",
  1174. "ĩ": "i",
  1175. "Ĩ": "I",
  1176. "ỉ": "i",
  1177. "Ỉ": "i",
  1178. "ủ": "u",
  1179. "Ủ": "U",
  1180. "ụ": "u",
  1181. "Ụ": "U",
  1182. "ũ": "u",
  1183. "Ũ": "U",
  1184. "ư": "u",
  1185. "Ư": "U",
  1186. "ứ": "u",
  1187. "Ứ": "U",
  1188. "ừ": "u",
  1189. "Ừ": "U",
  1190. "ự": "u",
  1191. "Ự": "U",
  1192. "ữ": "u",
  1193. "Ữ": "U",
  1194. "ử": "u",
  1195. "Ử": "ư",
  1196. "ỷ": "y",
  1197. "Ỷ": "y",
  1198. "ỳ": "y",
  1199. "Ỳ": "Y",
  1200. "ỵ": "y",
  1201. "Ỵ": "Y",
  1202. "ỹ": "y",
  1203. "Ỹ": "Y",
  1204. "ạ": "a",
  1205. "Ạ": "A",
  1206. "ấ": "a",
  1207. "Ấ": "A",
  1208. "ầ": "a",
  1209. "Ầ": "A",
  1210. "ậ": "a",
  1211. "Ậ": "A",
  1212. "ẫ": "a",
  1213. "Ẫ": "A",
  1214. // 'ă': 'a', // duplicate
  1215. // 'Ă': 'A', // duplicate
  1216. "ắ": "a",
  1217. "Ắ": "A",
  1218. "ằ": "a",
  1219. "Ằ": "A",
  1220. "ặ": "a",
  1221. "Ặ": "A",
  1222. "ẵ": "a",
  1223. "Ẵ": "A",
  1224. "⓪": "0",
  1225. "①": "1",
  1226. "②": "2",
  1227. "③": "3",
  1228. "④": "4",
  1229. "⑤": "5",
  1230. "⑥": "6",
  1231. "⑦": "7",
  1232. "⑧": "8",
  1233. "⑨": "9",
  1234. "⑩": "10",
  1235. "⑪": "11",
  1236. "⑫": "12",
  1237. "⑬": "13",
  1238. "⑭": "14",
  1239. "⑮": "15",
  1240. "⑯": "16",
  1241. "⑰": "17",
  1242. "⑱": "18",
  1243. "⑲": "18",
  1244. "⑳": "18",
  1245. "⓵": "1",
  1246. "⓶": "2",
  1247. "⓷": "3",
  1248. "⓸": "4",
  1249. "⓹": "5",
  1250. "⓺": "6",
  1251. "⓻": "7",
  1252. "⓼": "8",
  1253. "⓽": "9",
  1254. "⓾": "10",
  1255. "⓿": "0",
  1256. "⓫": "11",
  1257. "⓬": "12",
  1258. "⓭": "13",
  1259. "⓮": "14",
  1260. "⓯": "15",
  1261. "⓰": "16",
  1262. "⓱": "17",
  1263. "⓲": "18",
  1264. "⓳": "19",
  1265. "⓴": "20",
  1266. "Ⓐ": "A",
  1267. "Ⓑ": "B",
  1268. "Ⓒ": "C",
  1269. "Ⓓ": "D",
  1270. "Ⓔ": "E",
  1271. "Ⓕ": "F",
  1272. "Ⓖ": "G",
  1273. "Ⓗ": "H",
  1274. "Ⓘ": "I",
  1275. "Ⓙ": "J",
  1276. "Ⓚ": "K",
  1277. "Ⓛ": "L",
  1278. "Ⓜ": "M",
  1279. "Ⓝ": "N",
  1280. "Ⓞ": "O",
  1281. "Ⓟ": "P",
  1282. "Ⓠ": "Q",
  1283. "Ⓡ": "R",
  1284. "Ⓢ": "S",
  1285. "Ⓣ": "T",
  1286. "Ⓤ": "U",
  1287. "Ⓥ": "V",
  1288. "Ⓦ": "W",
  1289. "Ⓧ": "X",
  1290. "Ⓨ": "Y",
  1291. "Ⓩ": "Z",
  1292. "ⓐ": "a",
  1293. "ⓑ": "b",
  1294. "ⓒ": "c",
  1295. "ⓓ": "d",
  1296. "ⓔ": "e",
  1297. "ⓕ": "f",
  1298. "ⓖ": "g",
  1299. "ⓗ": "h",
  1300. "ⓘ": "i",
  1301. "ⓙ": "j",
  1302. "ⓚ": "k",
  1303. "ⓛ": "l",
  1304. "ⓜ": "m",
  1305. "ⓝ": "n",
  1306. "ⓞ": "o",
  1307. "ⓟ": "p",
  1308. "ⓠ": "q",
  1309. "ⓡ": "r",
  1310. "ⓢ": "s",
  1311. "ⓣ": "t",
  1312. "ⓤ": "u",
  1313. "ⓦ": "v",
  1314. "ⓥ": "w",
  1315. "ⓧ": "x",
  1316. "ⓨ": "y",
  1317. "ⓩ": "z",
  1318. // symbols
  1319. "“": '"',
  1320. "”": '"',
  1321. "‘": "'",
  1322. "’": "'",
  1323. "∂": "d",
  1324. "ƒ": "f",
  1325. "™": "(TM)",
  1326. "©": "(C)",
  1327. "œ": "oe",
  1328. "Œ": "OE",
  1329. "®": "(R)",
  1330. "†": "+",
  1331. "℠": "(SM)",
  1332. "…": "...",
  1333. "˚": "o",
  1334. "º": "o",
  1335. "ª": "a",
  1336. "•": "*",
  1337. "၊": ",",
  1338. "။": ".",
  1339. // currency
  1340. "$": "USD",
  1341. "€": "EUR",
  1342. "₢": "BRN",
  1343. "₣": "FRF",
  1344. "£": "GBP",
  1345. "₤": "ITL",
  1346. "₦": "NGN",
  1347. "₧": "ESP",
  1348. "₩": "KRW",
  1349. "₪": "ILS",
  1350. "₫": "VND",
  1351. "₭": "LAK",
  1352. "₮": "MNT",
  1353. "₯": "GRD",
  1354. "₱": "ARS",
  1355. "₲": "PYG",
  1356. "₳": "ARA",
  1357. "₴": "UAH",
  1358. "₵": "GHS",
  1359. "¢": "cent",
  1360. "¥": "CNY",
  1361. "元": "CNY",
  1362. "円": "YEN",
  1363. "﷼": "IRR",
  1364. "₠": "EWE",
  1365. "฿": "THB",
  1366. "₨": "INR",
  1367. "₹": "INR",
  1368. "₰": "PF",
  1369. "₺": "TRY",
  1370. "؋": "AFN",
  1371. "₼": "AZN",
  1372. "лв": "BGN",
  1373. "៛": "KHR",
  1374. "₡": "CRC",
  1375. "₸": "KZT",
  1376. "ден": "MKD",
  1377. "zł": "PLN",
  1378. "₽": "RUB",
  1379. "₾": "GEL"
  1380. };
  1381. var lookAheadCharArray = [
  1382. // burmese
  1383. "်",
  1384. // Dhivehi
  1385. "ް"
  1386. ];
  1387. var diatricMap = {
  1388. // Burmese
  1389. // dependent vowels
  1390. "ာ": "a",
  1391. "ါ": "a",
  1392. "ေ": "e",
  1393. "ဲ": "e",
  1394. "ိ": "i",
  1395. "ီ": "i",
  1396. "ို": "o",
  1397. "ု": "u",
  1398. "ူ": "u",
  1399. "ေါင်": "aung",
  1400. "ော": "aw",
  1401. "ော်": "aw",
  1402. "ေါ": "aw",
  1403. "ေါ်": "aw",
  1404. "်": "်",
  1405. // this is special case but the character will be converted to latin in the code
  1406. "က်": "et",
  1407. "ိုက်": "aik",
  1408. "ောက်": "auk",
  1409. "င်": "in",
  1410. "ိုင်": "aing",
  1411. "ောင်": "aung",
  1412. "စ်": "it",
  1413. "ည်": "i",
  1414. "တ်": "at",
  1415. "ိတ်": "eik",
  1416. "ုတ်": "ok",
  1417. "ွတ်": "ut",
  1418. "ေတ်": "it",
  1419. "ဒ်": "d",
  1420. "ိုဒ်": "ok",
  1421. "ုဒ်": "ait",
  1422. "န်": "an",
  1423. "ာန်": "an",
  1424. "ိန်": "ein",
  1425. "ုန်": "on",
  1426. "ွန်": "un",
  1427. "ပ်": "at",
  1428. "ိပ်": "eik",
  1429. "ုပ်": "ok",
  1430. "ွပ်": "ut",
  1431. "န်ုပ်": "nub",
  1432. "မ်": "an",
  1433. "ိမ်": "ein",
  1434. "ုမ်": "on",
  1435. "ွမ်": "un",
  1436. "ယ်": "e",
  1437. "ိုလ်": "ol",
  1438. "ဉ်": "in",
  1439. "ံ": "an",
  1440. "ိံ": "ein",
  1441. "ုံ": "on",
  1442. // Dhivehi
  1443. "ައް": "ah",
  1444. "ަށް": "ah"
  1445. };
  1446. var langCharMap = {
  1447. "en": {},
  1448. // default language
  1449. "az": {
  1450. // Azerbaijani
  1451. "ç": "c",
  1452. "ə": "e",
  1453. "ğ": "g",
  1454. "ı": "i",
  1455. "ö": "o",
  1456. "ş": "s",
  1457. "ü": "u",
  1458. "Ç": "C",
  1459. "Ə": "E",
  1460. "Ğ": "G",
  1461. "İ": "I",
  1462. "Ö": "O",
  1463. "Ş": "S",
  1464. "Ü": "U"
  1465. },
  1466. "cs": {
  1467. // Czech
  1468. "č": "c",
  1469. "ď": "d",
  1470. "ě": "e",
  1471. "ň": "n",
  1472. "ř": "r",
  1473. "š": "s",
  1474. "ť": "t",
  1475. "ů": "u",
  1476. "ž": "z",
  1477. "Č": "C",
  1478. "Ď": "D",
  1479. "Ě": "E",
  1480. "Ň": "N",
  1481. "Ř": "R",
  1482. "Š": "S",
  1483. "Ť": "T",
  1484. "Ů": "U",
  1485. "Ž": "Z"
  1486. },
  1487. "fi": {
  1488. // Finnish
  1489. // 'å': 'a', duplicate see charMap/latin
  1490. // 'Å': 'A', duplicate see charMap/latin
  1491. "ä": "a",
  1492. // ok
  1493. "Ä": "A",
  1494. // ok
  1495. "ö": "o",
  1496. // ok
  1497. "Ö": "O"
  1498. // ok
  1499. },
  1500. "hu": {
  1501. // Hungarian
  1502. "ä": "a",
  1503. // ok
  1504. "Ä": "A",
  1505. // ok
  1506. // 'á': 'a', duplicate see charMap/latin
  1507. // 'Á': 'A', duplicate see charMap/latin
  1508. "ö": "o",
  1509. // ok
  1510. "Ö": "O",
  1511. // ok
  1512. // 'ő': 'o', duplicate see charMap/latin
  1513. // 'Ő': 'O', duplicate see charMap/latin
  1514. "ü": "u",
  1515. "Ü": "U",
  1516. "ű": "u",
  1517. "Ű": "U"
  1518. },
  1519. "lt": {
  1520. // Lithuanian
  1521. "ą": "a",
  1522. "č": "c",
  1523. "ę": "e",
  1524. "ė": "e",
  1525. "į": "i",
  1526. "š": "s",
  1527. "ų": "u",
  1528. "ū": "u",
  1529. "ž": "z",
  1530. "Ą": "A",
  1531. "Č": "C",
  1532. "Ę": "E",
  1533. "Ė": "E",
  1534. "Į": "I",
  1535. "Š": "S",
  1536. "Ų": "U",
  1537. "Ū": "U"
  1538. },
  1539. "lv": {
  1540. // Latvian
  1541. "ā": "a",
  1542. "č": "c",
  1543. "ē": "e",
  1544. "ģ": "g",
  1545. "ī": "i",
  1546. "ķ": "k",
  1547. "ļ": "l",
  1548. "ņ": "n",
  1549. "š": "s",
  1550. "ū": "u",
  1551. "ž": "z",
  1552. "Ā": "A",
  1553. "Č": "C",
  1554. "Ē": "E",
  1555. "Ģ": "G",
  1556. "Ī": "i",
  1557. "Ķ": "k",
  1558. "Ļ": "L",
  1559. "Ņ": "N",
  1560. "Š": "S",
  1561. "Ū": "u",
  1562. "Ž": "Z"
  1563. },
  1564. "pl": {
  1565. // Polish
  1566. "ą": "a",
  1567. "ć": "c",
  1568. "ę": "e",
  1569. "ł": "l",
  1570. "ń": "n",
  1571. "ó": "o",
  1572. "ś": "s",
  1573. "ź": "z",
  1574. "ż": "z",
  1575. "Ą": "A",
  1576. "Ć": "C",
  1577. "Ę": "e",
  1578. "Ł": "L",
  1579. "Ń": "N",
  1580. "Ó": "O",
  1581. "Ś": "S",
  1582. "Ź": "Z",
  1583. "Ż": "Z"
  1584. },
  1585. "sv": {
  1586. // Swedish
  1587. // 'å': 'a', duplicate see charMap/latin
  1588. // 'Å': 'A', duplicate see charMap/latin
  1589. "ä": "a",
  1590. // ok
  1591. "Ä": "A",
  1592. // ok
  1593. "ö": "o",
  1594. // ok
  1595. "Ö": "O"
  1596. // ok
  1597. },
  1598. "sk": {
  1599. // Slovak
  1600. "ä": "a",
  1601. "Ä": "A"
  1602. },
  1603. "sr": {
  1604. // Serbian
  1605. "љ": "lj",
  1606. "њ": "nj",
  1607. "Љ": "Lj",
  1608. "Њ": "Nj",
  1609. "đ": "dj",
  1610. "Đ": "Dj"
  1611. },
  1612. "tr": {
  1613. // Turkish
  1614. "Ü": "U",
  1615. "Ö": "O",
  1616. "ü": "u",
  1617. "ö": "o"
  1618. }
  1619. };
  1620. var symbolMap = {
  1621. "ar": {
  1622. "∆": "delta",
  1623. "∞": "la-nihaya",
  1624. "♥": "hob",
  1625. "&": "wa",
  1626. "|": "aw",
  1627. "<": "aqal-men",
  1628. ">": "akbar-men",
  1629. "∑": "majmou",
  1630. "¤": "omla"
  1631. },
  1632. "az": {},
  1633. "ca": {
  1634. "∆": "delta",
  1635. "∞": "infinit",
  1636. "♥": "amor",
  1637. "&": "i",
  1638. "|": "o",
  1639. "<": "menys que",
  1640. ">": "mes que",
  1641. "∑": "suma dels",
  1642. "¤": "moneda"
  1643. },
  1644. "cs": {
  1645. "∆": "delta",
  1646. "∞": "nekonecno",
  1647. "♥": "laska",
  1648. "&": "a",
  1649. "|": "nebo",
  1650. "<": "mensi nez",
  1651. ">": "vetsi nez",
  1652. "∑": "soucet",
  1653. "¤": "mena"
  1654. },
  1655. "de": {
  1656. "∆": "delta",
  1657. "∞": "unendlich",
  1658. "♥": "Liebe",
  1659. "&": "und",
  1660. "|": "oder",
  1661. "<": "kleiner als",
  1662. ">": "groesser als",
  1663. "∑": "Summe von",
  1664. "¤": "Waehrung"
  1665. },
  1666. "dv": {
  1667. "∆": "delta",
  1668. "∞": "kolunulaa",
  1669. "♥": "loabi",
  1670. "&": "aai",
  1671. "|": "noonee",
  1672. "<": "ah vure kuda",
  1673. ">": "ah vure bodu",
  1674. "∑": "jumula",
  1675. "¤": "faisaa"
  1676. },
  1677. "en": {
  1678. "∆": "delta",
  1679. "∞": "infinity",
  1680. "♥": "love",
  1681. "&": "and",
  1682. "|": "or",
  1683. "<": "less than",
  1684. ">": "greater than",
  1685. "∑": "sum",
  1686. "¤": "currency"
  1687. },
  1688. "es": {
  1689. "∆": "delta",
  1690. "∞": "infinito",
  1691. "♥": "amor",
  1692. "&": "y",
  1693. "|": "u",
  1694. "<": "menos que",
  1695. ">": "mas que",
  1696. "∑": "suma de los",
  1697. "¤": "moneda"
  1698. },
  1699. "fa": {
  1700. "∆": "delta",
  1701. "∞": "bi-nahayat",
  1702. "♥": "eshgh",
  1703. "&": "va",
  1704. "|": "ya",
  1705. "<": "kamtar-az",
  1706. ">": "bishtar-az",
  1707. "∑": "majmooe",
  1708. "¤": "vahed"
  1709. },
  1710. "fi": {
  1711. "∆": "delta",
  1712. "∞": "aarettomyys",
  1713. "♥": "rakkaus",
  1714. "&": "ja",
  1715. "|": "tai",
  1716. "<": "pienempi kuin",
  1717. ">": "suurempi kuin",
  1718. "∑": "summa",
  1719. "¤": "valuutta"
  1720. },
  1721. "fr": {
  1722. "∆": "delta",
  1723. "∞": "infiniment",
  1724. "♥": "Amour",
  1725. "&": "et",
  1726. "|": "ou",
  1727. "<": "moins que",
  1728. ">": "superieure a",
  1729. "∑": "somme des",
  1730. "¤": "monnaie"
  1731. },
  1732. "ge": {
  1733. "∆": "delta",
  1734. "∞": "usasruloba",
  1735. "♥": "siqvaruli",
  1736. "&": "da",
  1737. "|": "an",
  1738. "<": "naklebi",
  1739. ">": "meti",
  1740. "∑": "jami",
  1741. "¤": "valuta"
  1742. },
  1743. "gr": {},
  1744. "hu": {
  1745. "∆": "delta",
  1746. "∞": "vegtelen",
  1747. "♥": "szerelem",
  1748. "&": "es",
  1749. "|": "vagy",
  1750. "<": "kisebb mint",
  1751. ">": "nagyobb mint",
  1752. "∑": "szumma",
  1753. "¤": "penznem"
  1754. },
  1755. "it": {
  1756. "∆": "delta",
  1757. "∞": "infinito",
  1758. "♥": "amore",
  1759. "&": "e",
  1760. "|": "o",
  1761. "<": "minore di",
  1762. ">": "maggiore di",
  1763. "∑": "somma",
  1764. "¤": "moneta"
  1765. },
  1766. "lt": {
  1767. "∆": "delta",
  1768. "∞": "begalybe",
  1769. "♥": "meile",
  1770. "&": "ir",
  1771. "|": "ar",
  1772. "<": "maziau nei",
  1773. ">": "daugiau nei",
  1774. "∑": "suma",
  1775. "¤": "valiuta"
  1776. },
  1777. "lv": {
  1778. "∆": "delta",
  1779. "∞": "bezgaliba",
  1780. "♥": "milestiba",
  1781. "&": "un",
  1782. "|": "vai",
  1783. "<": "mazak neka",
  1784. ">": "lielaks neka",
  1785. "∑": "summa",
  1786. "¤": "valuta"
  1787. },
  1788. "my": {
  1789. "∆": "kwahkhyaet",
  1790. "∞": "asaonasme",
  1791. "♥": "akhyait",
  1792. "&": "nhin",
  1793. "|": "tho",
  1794. "<": "ngethaw",
  1795. ">": "kyithaw",
  1796. "∑": "paungld",
  1797. "¤": "ngwekye"
  1798. },
  1799. "mk": {},
  1800. "nl": {
  1801. "∆": "delta",
  1802. "∞": "oneindig",
  1803. "♥": "liefde",
  1804. "&": "en",
  1805. "|": "of",
  1806. "<": "kleiner dan",
  1807. ">": "groter dan",
  1808. "∑": "som",
  1809. "¤": "valuta"
  1810. },
  1811. "pl": {
  1812. "∆": "delta",
  1813. "∞": "nieskonczonosc",
  1814. "♥": "milosc",
  1815. "&": "i",
  1816. "|": "lub",
  1817. "<": "mniejsze niz",
  1818. ">": "wieksze niz",
  1819. "∑": "suma",
  1820. "¤": "waluta"
  1821. },
  1822. "pt": {
  1823. "∆": "delta",
  1824. "∞": "infinito",
  1825. "♥": "amor",
  1826. "&": "e",
  1827. "|": "ou",
  1828. "<": "menor que",
  1829. ">": "maior que",
  1830. "∑": "soma",
  1831. "¤": "moeda"
  1832. },
  1833. "ro": {
  1834. "∆": "delta",
  1835. "∞": "infinit",
  1836. "♥": "dragoste",
  1837. "&": "si",
  1838. "|": "sau",
  1839. "<": "mai mic ca",
  1840. ">": "mai mare ca",
  1841. "∑": "suma",
  1842. "¤": "valuta"
  1843. },
  1844. "ru": {
  1845. "∆": "delta",
  1846. "∞": "beskonechno",
  1847. "♥": "lubov",
  1848. "&": "i",
  1849. "|": "ili",
  1850. "<": "menshe",
  1851. ">": "bolshe",
  1852. "∑": "summa",
  1853. "¤": "valjuta"
  1854. },
  1855. "sk": {
  1856. "∆": "delta",
  1857. "∞": "nekonecno",
  1858. "♥": "laska",
  1859. "&": "a",
  1860. "|": "alebo",
  1861. "<": "menej ako",
  1862. ">": "viac ako",
  1863. "∑": "sucet",
  1864. "¤": "mena"
  1865. },
  1866. "sr": {},
  1867. "tr": {
  1868. "∆": "delta",
  1869. "∞": "sonsuzluk",
  1870. "♥": "ask",
  1871. "&": "ve",
  1872. "|": "veya",
  1873. "<": "kucuktur",
  1874. ">": "buyuktur",
  1875. "∑": "toplam",
  1876. "¤": "para birimi"
  1877. },
  1878. "uk": {
  1879. "∆": "delta",
  1880. "∞": "bezkinechnist",
  1881. "♥": "lubov",
  1882. "&": "i",
  1883. "|": "abo",
  1884. "<": "menshe",
  1885. ">": "bilshe",
  1886. "∑": "suma",
  1887. "¤": "valjuta"
  1888. },
  1889. "vn": {
  1890. "∆": "delta",
  1891. "∞": "vo cuc",
  1892. "♥": "yeu",
  1893. "&": "va",
  1894. "|": "hoac",
  1895. "<": "nho hon",
  1896. ">": "lon hon",
  1897. "∑": "tong",
  1898. "¤": "tien te"
  1899. }
  1900. };
  1901. var uricChars = [";", "?", ":", "@", "&", "=", "+", "$", ",", "/"].join("");
  1902. var uricNoSlashChars = [";", "?", ":", "@", "&", "=", "+", "$", ","].join("");
  1903. var markChars = [".", "!", "~", "*", "'", "(", ")"].join("");
  1904. var getSlug = function getSlug2(input, opts) {
  1905. var separator = "-";
  1906. var result = "";
  1907. var diatricString = "";
  1908. var convertSymbols = true;
  1909. var customReplacements = {};
  1910. var maintainCase;
  1911. var titleCase;
  1912. var truncate;
  1913. var uricFlag;
  1914. var uricNoSlashFlag;
  1915. var markFlag;
  1916. var symbol;
  1917. var langChar;
  1918. var lucky;
  1919. var i;
  1920. var ch;
  1921. var l;
  1922. var lastCharWasSymbol;
  1923. var lastCharWasDiatric;
  1924. var allowedChars = "";
  1925. if (typeof input !== "string") {
  1926. return "";
  1927. }
  1928. if (typeof opts === "string") {
  1929. separator = opts;
  1930. }
  1931. symbol = symbolMap.en;
  1932. langChar = langCharMap.en;
  1933. if (typeof opts === "object") {
  1934. maintainCase = opts.maintainCase || false;
  1935. customReplacements = opts.custom && typeof opts.custom === "object" ? opts.custom : customReplacements;
  1936. truncate = +opts.truncate > 1 && opts.truncate || false;
  1937. uricFlag = opts.uric || false;
  1938. uricNoSlashFlag = opts.uricNoSlash || false;
  1939. markFlag = opts.mark || false;
  1940. convertSymbols = opts.symbols === false || opts.lang === false ? false : true;
  1941. separator = opts.separator || separator;
  1942. if (uricFlag) {
  1943. allowedChars += uricChars;
  1944. }
  1945. if (uricNoSlashFlag) {
  1946. allowedChars += uricNoSlashChars;
  1947. }
  1948. if (markFlag) {
  1949. allowedChars += markChars;
  1950. }
  1951. symbol = opts.lang && symbolMap[opts.lang] && convertSymbols ? symbolMap[opts.lang] : convertSymbols ? symbolMap.en : {};
  1952. langChar = opts.lang && langCharMap[opts.lang] ? langCharMap[opts.lang] : opts.lang === false || opts.lang === true ? {} : langCharMap.en;
  1953. if (opts.titleCase && typeof opts.titleCase.length === "number" && Array.prototype.toString.call(opts.titleCase)) {
  1954. opts.titleCase.forEach(function(v) {
  1955. customReplacements[v + ""] = v + "";
  1956. });
  1957. titleCase = true;
  1958. } else {
  1959. titleCase = !!opts.titleCase;
  1960. }
  1961. if (opts.custom && typeof opts.custom.length === "number" && Array.prototype.toString.call(opts.custom)) {
  1962. opts.custom.forEach(function(v) {
  1963. customReplacements[v + ""] = v + "";
  1964. });
  1965. }
  1966. Object.keys(customReplacements).forEach(function(v) {
  1967. var r;
  1968. if (v.length > 1) {
  1969. r = new RegExp("\\b" + escapeChars(v) + "\\b", "gi");
  1970. } else {
  1971. r = new RegExp(escapeChars(v), "gi");
  1972. }
  1973. input = input.replace(r, customReplacements[v]);
  1974. });
  1975. for (ch in customReplacements) {
  1976. allowedChars += ch;
  1977. }
  1978. }
  1979. allowedChars += separator;
  1980. allowedChars = escapeChars(allowedChars);
  1981. input = input.replace(/(^\s+|\s+$)/g, "");
  1982. lastCharWasSymbol = false;
  1983. lastCharWasDiatric = false;
  1984. for (i = 0, l = input.length; i < l; i++) {
  1985. ch = input[i];
  1986. if (isReplacedCustomChar(ch, customReplacements)) {
  1987. lastCharWasSymbol = false;
  1988. } else if (langChar[ch]) {
  1989. ch = lastCharWasSymbol && langChar[ch].match(/[A-Za-z0-9]/) ? " " + langChar[ch] : langChar[ch];
  1990. lastCharWasSymbol = false;
  1991. } else if (ch in charMap) {
  1992. if (i + 1 < l && lookAheadCharArray.indexOf(input[i + 1]) >= 0) {
  1993. diatricString += ch;
  1994. ch = "";
  1995. } else if (lastCharWasDiatric === true) {
  1996. ch = diatricMap[diatricString] + charMap[ch];
  1997. diatricString = "";
  1998. } else {
  1999. ch = lastCharWasSymbol && charMap[ch].match(/[A-Za-z0-9]/) ? " " + charMap[ch] : charMap[ch];
  2000. }
  2001. lastCharWasSymbol = false;
  2002. lastCharWasDiatric = false;
  2003. } else if (ch in diatricMap) {
  2004. diatricString += ch;
  2005. ch = "";
  2006. if (i === l - 1) {
  2007. ch = diatricMap[diatricString];
  2008. }
  2009. lastCharWasDiatric = true;
  2010. } else if (
  2011. // process symbol chars
  2012. symbol[ch] && !(uricFlag && uricChars.indexOf(ch) !== -1) && !(uricNoSlashFlag && uricNoSlashChars.indexOf(ch) !== -1)
  2013. ) {
  2014. ch = lastCharWasSymbol || result.substr(-1).match(/[A-Za-z0-9]/) ? separator + symbol[ch] : symbol[ch];
  2015. ch += input[i + 1] !== void 0 && input[i + 1].match(/[A-Za-z0-9]/) ? separator : "";
  2016. lastCharWasSymbol = true;
  2017. } else {
  2018. if (lastCharWasDiatric === true) {
  2019. ch = diatricMap[diatricString] + ch;
  2020. diatricString = "";
  2021. lastCharWasDiatric = false;
  2022. } else if (lastCharWasSymbol && (/[A-Za-z0-9]/.test(ch) || result.substr(-1).match(/A-Za-z0-9]/))) {
  2023. ch = " " + ch;
  2024. }
  2025. lastCharWasSymbol = false;
  2026. }
  2027. result += ch.replace(new RegExp("[^\\w\\s" + allowedChars + "_-]", "g"), separator);
  2028. }
  2029. if (titleCase) {
  2030. result = result.replace(/(\w)(\S*)/g, function(_, i2, r) {
  2031. var j = i2.toUpperCase() + (r !== null ? r : "");
  2032. return Object.keys(customReplacements).indexOf(j.toLowerCase()) < 0 ? j : j.toLowerCase();
  2033. });
  2034. }
  2035. result = result.replace(/\s+/g, separator).replace(new RegExp("\\" + separator + "+", "g"), separator).replace(new RegExp("(^\\" + separator + "+|\\" + separator + "+$)", "g"), "");
  2036. if (truncate && result.length > truncate) {
  2037. lucky = result.charAt(truncate) === separator;
  2038. result = result.slice(0, truncate);
  2039. if (!lucky) {
  2040. result = result.slice(0, result.lastIndexOf(separator));
  2041. }
  2042. }
  2043. if (!maintainCase && !titleCase) {
  2044. result = result.toLowerCase();
  2045. }
  2046. return result;
  2047. };
  2048. var createSlug = function createSlug2(opts) {
  2049. return function getSlugWithConfig(input) {
  2050. return getSlug(input, opts);
  2051. };
  2052. };
  2053. var escapeChars = function escapeChars2(input) {
  2054. return input.replace(/[-\\^$*+?.()|[\]{}\/]/g, "\\$&");
  2055. };
  2056. var isReplacedCustomChar = function(ch, customReplacements) {
  2057. for (var c in customReplacements) {
  2058. if (customReplacements[c] === ch) {
  2059. return true;
  2060. }
  2061. }
  2062. };
  2063. if (typeof module !== "undefined" && module.exports) {
  2064. module.exports = getSlug;
  2065. module.exports.createSlug = createSlug;
  2066. } else if (typeof define !== "undefined" && define.amd) {
  2067. define([], function() {
  2068. return getSlug;
  2069. });
  2070. } else {
  2071. try {
  2072. if (root.getSlug || root.createSlug) {
  2073. throw "speakingurl: globals exists /(getSlug|createSlug)/";
  2074. } else {
  2075. root.getSlug = getSlug;
  2076. root.createSlug = createSlug;
  2077. }
  2078. } catch (e) {
  2079. }
  2080. }
  2081. })(exports);
  2082. }
  2083. });
  2084. var require_speakingurl2 = __commonJS2({
  2085. "../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(exports, module) {
  2086. "use strict";
  2087. init_esm_shims2();
  2088. module.exports = require_speakingurl();
  2089. }
  2090. });
  2091. init_esm_shims2();
  2092. init_esm_shims2();
  2093. init_esm_shims2();
  2094. init_esm_shims2();
  2095. init_esm_shims2();
  2096. init_esm_shims2();
  2097. init_esm_shims2();
  2098. init_esm_shims2();
  2099. function getComponentTypeName(options) {
  2100. var _a25;
  2101. const name = options.name || options._componentTag || options.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ || options.__name;
  2102. if (name === "index" && ((_a25 = options.__file) == null ? void 0 : _a25.endsWith("index.vue"))) {
  2103. return "";
  2104. }
  2105. return name;
  2106. }
  2107. function getComponentFileName(options) {
  2108. const file = options.__file;
  2109. if (file)
  2110. return classify(basename(file, ".vue"));
  2111. }
  2112. function saveComponentGussedName(instance, name) {
  2113. instance.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ = name;
  2114. return name;
  2115. }
  2116. function getAppRecord(instance) {
  2117. if (instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__)
  2118. return instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
  2119. else if (instance.root)
  2120. return instance.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
  2121. }
  2122. async function getComponentId(options) {
  2123. const { app, uid, instance } = options;
  2124. try {
  2125. if (instance.__VUE_DEVTOOLS_NEXT_UID__)
  2126. return instance.__VUE_DEVTOOLS_NEXT_UID__;
  2127. const appRecord = await getAppRecord(app);
  2128. if (!appRecord)
  2129. return null;
  2130. const isRoot = appRecord.rootInstance === instance;
  2131. return `${appRecord.id}:${isRoot ? "root" : uid}`;
  2132. } catch (e) {
  2133. }
  2134. }
  2135. function isFragment(instance) {
  2136. var _a25, _b25;
  2137. const subTreeType = (_a25 = instance.subTree) == null ? void 0 : _a25.type;
  2138. const appRecord = getAppRecord(instance);
  2139. if (appRecord) {
  2140. return ((_b25 = appRecord == null ? void 0 : appRecord.types) == null ? void 0 : _b25.Fragment) === subTreeType;
  2141. }
  2142. return false;
  2143. }
  2144. function getInstanceName(instance) {
  2145. var _a25, _b25, _c;
  2146. const name = getComponentTypeName((instance == null ? void 0 : instance.type) || {});
  2147. if (name)
  2148. return name;
  2149. if ((instance == null ? void 0 : instance.root) === instance)
  2150. return "Root";
  2151. for (const key in (_b25 = (_a25 = instance.parent) == null ? void 0 : _a25.type) == null ? void 0 : _b25.components) {
  2152. if (instance.parent.type.components[key] === (instance == null ? void 0 : instance.type))
  2153. return saveComponentGussedName(instance, key);
  2154. }
  2155. for (const key in (_c = instance.appContext) == null ? void 0 : _c.components) {
  2156. if (instance.appContext.components[key] === (instance == null ? void 0 : instance.type))
  2157. return saveComponentGussedName(instance, key);
  2158. }
  2159. const fileName = getComponentFileName((instance == null ? void 0 : instance.type) || {});
  2160. if (fileName)
  2161. return fileName;
  2162. return "Anonymous Component";
  2163. }
  2164. function getComponentInstance(appRecord, instanceId) {
  2165. instanceId = instanceId || `${appRecord.id}:root`;
  2166. const instance = appRecord.instanceMap.get(instanceId);
  2167. return instance || appRecord.instanceMap.get(":root");
  2168. }
  2169. function createRect() {
  2170. const rect = {
  2171. top: 0,
  2172. bottom: 0,
  2173. left: 0,
  2174. right: 0,
  2175. get width() {
  2176. return rect.right - rect.left;
  2177. },
  2178. get height() {
  2179. return rect.bottom - rect.top;
  2180. }
  2181. };
  2182. return rect;
  2183. }
  2184. var range;
  2185. function getTextRect(node) {
  2186. if (!range)
  2187. range = document.createRange();
  2188. range.selectNode(node);
  2189. return range.getBoundingClientRect();
  2190. }
  2191. function getFragmentRect(vnode) {
  2192. const rect = createRect();
  2193. if (!vnode.children)
  2194. return rect;
  2195. for (let i = 0, l = vnode.children.length; i < l; i++) {
  2196. const childVnode = vnode.children[i];
  2197. let childRect;
  2198. if (childVnode.component) {
  2199. childRect = getComponentBoundingRect(childVnode.component);
  2200. } else if (childVnode.el) {
  2201. const el = childVnode.el;
  2202. if (el.nodeType === 1 || el.getBoundingClientRect)
  2203. childRect = el.getBoundingClientRect();
  2204. else if (el.nodeType === 3 && el.data.trim())
  2205. childRect = getTextRect(el);
  2206. }
  2207. if (childRect)
  2208. mergeRects(rect, childRect);
  2209. }
  2210. return rect;
  2211. }
  2212. function mergeRects(a, b) {
  2213. if (!a.top || b.top < a.top)
  2214. a.top = b.top;
  2215. if (!a.bottom || b.bottom > a.bottom)
  2216. a.bottom = b.bottom;
  2217. if (!a.left || b.left < a.left)
  2218. a.left = b.left;
  2219. if (!a.right || b.right > a.right)
  2220. a.right = b.right;
  2221. return a;
  2222. }
  2223. var DEFAULT_RECT = {
  2224. top: 0,
  2225. left: 0,
  2226. right: 0,
  2227. bottom: 0,
  2228. width: 0,
  2229. height: 0
  2230. };
  2231. function getComponentBoundingRect(instance) {
  2232. const el = instance.subTree.el;
  2233. if (typeof window === "undefined") {
  2234. return DEFAULT_RECT;
  2235. }
  2236. if (isFragment(instance))
  2237. return getFragmentRect(instance.subTree);
  2238. else if ((el == null ? void 0 : el.nodeType) === 1)
  2239. return el == null ? void 0 : el.getBoundingClientRect();
  2240. else if (instance.subTree.component)
  2241. return getComponentBoundingRect(instance.subTree.component);
  2242. else
  2243. return DEFAULT_RECT;
  2244. }
  2245. init_esm_shims2();
  2246. function getRootElementsFromComponentInstance(instance) {
  2247. if (isFragment(instance))
  2248. return getFragmentRootElements(instance.subTree);
  2249. if (!instance.subTree)
  2250. return [];
  2251. return [instance.subTree.el];
  2252. }
  2253. function getFragmentRootElements(vnode) {
  2254. if (!vnode.children)
  2255. return [];
  2256. const list = [];
  2257. vnode.children.forEach((childVnode) => {
  2258. if (childVnode.component)
  2259. list.push(...getRootElementsFromComponentInstance(childVnode.component));
  2260. else if (childVnode == null ? void 0 : childVnode.el)
  2261. list.push(childVnode.el);
  2262. });
  2263. return list;
  2264. }
  2265. var CONTAINER_ELEMENT_ID = "__vue-devtools-component-inspector__";
  2266. var CARD_ELEMENT_ID = "__vue-devtools-component-inspector__card__";
  2267. var COMPONENT_NAME_ELEMENT_ID = "__vue-devtools-component-inspector__name__";
  2268. var INDICATOR_ELEMENT_ID = "__vue-devtools-component-inspector__indicator__";
  2269. var containerStyles = {
  2270. display: "block",
  2271. zIndex: 2147483640,
  2272. position: "fixed",
  2273. backgroundColor: "#42b88325",
  2274. border: "1px solid #42b88350",
  2275. borderRadius: "5px",
  2276. transition: "all 0.1s ease-in",
  2277. pointerEvents: "none"
  2278. };
  2279. var cardStyles = {
  2280. fontFamily: "Arial, Helvetica, sans-serif",
  2281. padding: "5px 8px",
  2282. borderRadius: "4px",
  2283. textAlign: "left",
  2284. position: "absolute",
  2285. left: 0,
  2286. color: "#e9e9e9",
  2287. fontSize: "14px",
  2288. fontWeight: 600,
  2289. lineHeight: "24px",
  2290. backgroundColor: "#42b883",
  2291. boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"
  2292. };
  2293. var indicatorStyles = {
  2294. display: "inline-block",
  2295. fontWeight: 400,
  2296. fontStyle: "normal",
  2297. fontSize: "12px",
  2298. opacity: 0.7
  2299. };
  2300. function getContainerElement() {
  2301. return document.getElementById(CONTAINER_ELEMENT_ID);
  2302. }
  2303. function getCardElement() {
  2304. return document.getElementById(CARD_ELEMENT_ID);
  2305. }
  2306. function getIndicatorElement() {
  2307. return document.getElementById(INDICATOR_ELEMENT_ID);
  2308. }
  2309. function getNameElement() {
  2310. return document.getElementById(COMPONENT_NAME_ELEMENT_ID);
  2311. }
  2312. function getStyles(bounds) {
  2313. return {
  2314. left: `${Math.round(bounds.left * 100) / 100}px`,
  2315. top: `${Math.round(bounds.top * 100) / 100}px`,
  2316. width: `${Math.round(bounds.width * 100) / 100}px`,
  2317. height: `${Math.round(bounds.height * 100) / 100}px`
  2318. };
  2319. }
  2320. function create(options) {
  2321. var _a25;
  2322. const containerEl = document.createElement("div");
  2323. containerEl.id = (_a25 = options.elementId) != null ? _a25 : CONTAINER_ELEMENT_ID;
  2324. Object.assign(containerEl.style, {
  2325. ...containerStyles,
  2326. ...getStyles(options.bounds),
  2327. ...options.style
  2328. });
  2329. const cardEl = document.createElement("span");
  2330. cardEl.id = CARD_ELEMENT_ID;
  2331. Object.assign(cardEl.style, {
  2332. ...cardStyles,
  2333. top: options.bounds.top < 35 ? 0 : "-35px"
  2334. });
  2335. const nameEl = document.createElement("span");
  2336. nameEl.id = COMPONENT_NAME_ELEMENT_ID;
  2337. nameEl.innerHTML = `&lt;${options.name}&gt;&nbsp;&nbsp;`;
  2338. const indicatorEl = document.createElement("i");
  2339. indicatorEl.id = INDICATOR_ELEMENT_ID;
  2340. indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
  2341. Object.assign(indicatorEl.style, indicatorStyles);
  2342. cardEl.appendChild(nameEl);
  2343. cardEl.appendChild(indicatorEl);
  2344. containerEl.appendChild(cardEl);
  2345. document.body.appendChild(containerEl);
  2346. return containerEl;
  2347. }
  2348. function update(options) {
  2349. const containerEl = getContainerElement();
  2350. const cardEl = getCardElement();
  2351. const nameEl = getNameElement();
  2352. const indicatorEl = getIndicatorElement();
  2353. if (containerEl) {
  2354. Object.assign(containerEl.style, {
  2355. ...containerStyles,
  2356. ...getStyles(options.bounds)
  2357. });
  2358. Object.assign(cardEl.style, {
  2359. top: options.bounds.top < 35 ? 0 : "-35px"
  2360. });
  2361. nameEl.innerHTML = `&lt;${options.name}&gt;&nbsp;&nbsp;`;
  2362. indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
  2363. }
  2364. }
  2365. function highlight(instance) {
  2366. const bounds = getComponentBoundingRect(instance);
  2367. if (!bounds.width && !bounds.height)
  2368. return;
  2369. const name = getInstanceName(instance);
  2370. const container = getContainerElement();
  2371. container ? update({ bounds, name }) : create({ bounds, name });
  2372. }
  2373. function unhighlight() {
  2374. const el = getContainerElement();
  2375. if (el)
  2376. el.style.display = "none";
  2377. }
  2378. var inspectInstance = null;
  2379. function inspectFn(e) {
  2380. const target22 = e.target;
  2381. if (target22) {
  2382. const instance = target22.__vueParentComponent;
  2383. if (instance) {
  2384. inspectInstance = instance;
  2385. const el = instance.vnode.el;
  2386. if (el) {
  2387. const bounds = getComponentBoundingRect(instance);
  2388. const name = getInstanceName(instance);
  2389. const container = getContainerElement();
  2390. container ? update({ bounds, name }) : create({ bounds, name });
  2391. }
  2392. }
  2393. }
  2394. }
  2395. function selectComponentFn(e, cb) {
  2396. var _a25;
  2397. e.preventDefault();
  2398. e.stopPropagation();
  2399. if (inspectInstance) {
  2400. const app = (_a25 = activeAppRecord.value) == null ? void 0 : _a25.app;
  2401. getComponentId({
  2402. app,
  2403. uid: app.uid,
  2404. instance: inspectInstance
  2405. }).then((id) => {
  2406. cb(id);
  2407. });
  2408. }
  2409. }
  2410. var inspectComponentHighLighterSelectFn = null;
  2411. function cancelInspectComponentHighLighter() {
  2412. unhighlight();
  2413. window.removeEventListener("mouseover", inspectFn);
  2414. window.removeEventListener("click", inspectComponentHighLighterSelectFn, true);
  2415. inspectComponentHighLighterSelectFn = null;
  2416. }
  2417. function inspectComponentHighLighter() {
  2418. window.addEventListener("mouseover", inspectFn);
  2419. return new Promise((resolve) => {
  2420. function onSelect(e) {
  2421. e.preventDefault();
  2422. e.stopPropagation();
  2423. selectComponentFn(e, (id) => {
  2424. window.removeEventListener("click", onSelect, true);
  2425. inspectComponentHighLighterSelectFn = null;
  2426. window.removeEventListener("mouseover", inspectFn);
  2427. const el = getContainerElement();
  2428. if (el)
  2429. el.style.display = "none";
  2430. resolve(JSON.stringify({ id }));
  2431. });
  2432. }
  2433. inspectComponentHighLighterSelectFn = onSelect;
  2434. window.addEventListener("click", onSelect, true);
  2435. });
  2436. }
  2437. function scrollToComponent(options) {
  2438. const instance = getComponentInstance(activeAppRecord.value, options.id);
  2439. if (instance) {
  2440. const [el] = getRootElementsFromComponentInstance(instance);
  2441. if (typeof el.scrollIntoView === "function") {
  2442. el.scrollIntoView({
  2443. behavior: "smooth"
  2444. });
  2445. } else {
  2446. const bounds = getComponentBoundingRect(instance);
  2447. const scrollTarget = document.createElement("div");
  2448. const styles = {
  2449. ...getStyles(bounds),
  2450. position: "absolute"
  2451. };
  2452. Object.assign(scrollTarget.style, styles);
  2453. document.body.appendChild(scrollTarget);
  2454. scrollTarget.scrollIntoView({
  2455. behavior: "smooth"
  2456. });
  2457. setTimeout(() => {
  2458. document.body.removeChild(scrollTarget);
  2459. }, 2e3);
  2460. }
  2461. setTimeout(() => {
  2462. const bounds = getComponentBoundingRect(instance);
  2463. if (bounds.width || bounds.height) {
  2464. const name = getInstanceName(instance);
  2465. const el2 = getContainerElement();
  2466. el2 ? update({ ...options, name, bounds }) : create({ ...options, name, bounds });
  2467. setTimeout(() => {
  2468. if (el2)
  2469. el2.style.display = "none";
  2470. }, 1500);
  2471. }
  2472. }, 1200);
  2473. }
  2474. }
  2475. init_esm_shims2();
  2476. var _a2;
  2477. var _b;
  2478. (_b = (_a2 = target).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__) != null ? _b : _a2.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = true;
  2479. function waitForInspectorInit(cb) {
  2480. let total = 0;
  2481. const timer = setInterval(() => {
  2482. if (target.__VUE_INSPECTOR__) {
  2483. clearInterval(timer);
  2484. total += 30;
  2485. cb();
  2486. }
  2487. if (total >= /* 5s */
  2488. 5e3)
  2489. clearInterval(timer);
  2490. }, 30);
  2491. }
  2492. function setupInspector() {
  2493. const inspector = target.__VUE_INSPECTOR__;
  2494. const _openInEditor = inspector.openInEditor;
  2495. inspector.openInEditor = async (...params) => {
  2496. inspector.disable();
  2497. _openInEditor(...params);
  2498. };
  2499. }
  2500. function getComponentInspector() {
  2501. return new Promise((resolve) => {
  2502. function setup() {
  2503. setupInspector();
  2504. resolve(target.__VUE_INSPECTOR__);
  2505. }
  2506. if (!target.__VUE_INSPECTOR__) {
  2507. waitForInspectorInit(() => {
  2508. setup();
  2509. });
  2510. } else {
  2511. setup();
  2512. }
  2513. });
  2514. }
  2515. init_esm_shims2();
  2516. init_esm_shims2();
  2517. function isReadonly(value) {
  2518. return !!(value && value[
  2519. "__v_isReadonly"
  2520. /* IS_READONLY */
  2521. ]);
  2522. }
  2523. function isReactive(value) {
  2524. if (isReadonly(value)) {
  2525. return isReactive(value[
  2526. "__v_raw"
  2527. /* RAW */
  2528. ]);
  2529. }
  2530. return !!(value && value[
  2531. "__v_isReactive"
  2532. /* IS_REACTIVE */
  2533. ]);
  2534. }
  2535. function isRef(r) {
  2536. return !!(r && r.__v_isRef === true);
  2537. }
  2538. function toRaw(observed) {
  2539. const raw = observed && observed[
  2540. "__v_raw"
  2541. /* RAW */
  2542. ];
  2543. return raw ? toRaw(raw) : observed;
  2544. }
  2545. var Fragment = Symbol.for("v-fgt");
  2546. var StateEditor = class {
  2547. constructor() {
  2548. this.refEditor = new RefStateEditor();
  2549. }
  2550. set(object, path, value, cb) {
  2551. const sections = Array.isArray(path) ? path : path.split(".");
  2552. const markRef = false;
  2553. while (sections.length > 1) {
  2554. const section = sections.shift();
  2555. if (object instanceof Map)
  2556. object = object.get(section);
  2557. if (object instanceof Set)
  2558. object = Array.from(object.values())[section];
  2559. else object = object[section];
  2560. if (this.refEditor.isRef(object))
  2561. object = this.refEditor.get(object);
  2562. }
  2563. const field = sections[0];
  2564. const item = this.refEditor.get(object)[field];
  2565. if (cb) {
  2566. cb(object, field, value);
  2567. } else {
  2568. if (this.refEditor.isRef(item))
  2569. this.refEditor.set(item, value);
  2570. else if (markRef)
  2571. object[field] = value;
  2572. else
  2573. object[field] = value;
  2574. }
  2575. }
  2576. get(object, path) {
  2577. const sections = Array.isArray(path) ? path : path.split(".");
  2578. for (let i = 0; i < sections.length; i++) {
  2579. if (object instanceof Map)
  2580. object = object.get(sections[i]);
  2581. else
  2582. object = object[sections[i]];
  2583. if (this.refEditor.isRef(object))
  2584. object = this.refEditor.get(object);
  2585. if (!object)
  2586. return void 0;
  2587. }
  2588. return object;
  2589. }
  2590. has(object, path, parent = false) {
  2591. if (typeof object === "undefined")
  2592. return false;
  2593. const sections = Array.isArray(path) ? path.slice() : path.split(".");
  2594. const size = !parent ? 1 : 2;
  2595. while (object && sections.length > size) {
  2596. const section = sections.shift();
  2597. object = object[section];
  2598. if (this.refEditor.isRef(object))
  2599. object = this.refEditor.get(object);
  2600. }
  2601. return object != null && Object.prototype.hasOwnProperty.call(object, sections[0]);
  2602. }
  2603. createDefaultSetCallback(state) {
  2604. return (object, field, value) => {
  2605. if (state.remove || state.newKey) {
  2606. if (Array.isArray(object))
  2607. object.splice(field, 1);
  2608. else if (toRaw(object) instanceof Map)
  2609. object.delete(field);
  2610. else if (toRaw(object) instanceof Set)
  2611. object.delete(Array.from(object.values())[field]);
  2612. else Reflect.deleteProperty(object, field);
  2613. }
  2614. if (!state.remove) {
  2615. const target22 = object[state.newKey || field];
  2616. if (this.refEditor.isRef(target22))
  2617. this.refEditor.set(target22, value);
  2618. else if (toRaw(object) instanceof Map)
  2619. object.set(state.newKey || field, value);
  2620. else if (toRaw(object) instanceof Set)
  2621. object.add(value);
  2622. else
  2623. object[state.newKey || field] = value;
  2624. }
  2625. };
  2626. }
  2627. };
  2628. var RefStateEditor = class {
  2629. set(ref, value) {
  2630. if (isRef(ref)) {
  2631. ref.value = value;
  2632. } else {
  2633. if (ref instanceof Set && Array.isArray(value)) {
  2634. ref.clear();
  2635. value.forEach((v) => ref.add(v));
  2636. return;
  2637. }
  2638. const currentKeys = Object.keys(value);
  2639. if (ref instanceof Map) {
  2640. const previousKeysSet2 = new Set(ref.keys());
  2641. currentKeys.forEach((key) => {
  2642. ref.set(key, Reflect.get(value, key));
  2643. previousKeysSet2.delete(key);
  2644. });
  2645. previousKeysSet2.forEach((key) => ref.delete(key));
  2646. return;
  2647. }
  2648. const previousKeysSet = new Set(Object.keys(ref));
  2649. currentKeys.forEach((key) => {
  2650. Reflect.set(ref, key, Reflect.get(value, key));
  2651. previousKeysSet.delete(key);
  2652. });
  2653. previousKeysSet.forEach((key) => Reflect.deleteProperty(ref, key));
  2654. }
  2655. }
  2656. get(ref) {
  2657. return isRef(ref) ? ref.value : ref;
  2658. }
  2659. isRef(ref) {
  2660. return isRef(ref) || isReactive(ref);
  2661. }
  2662. };
  2663. var stateEditor = new StateEditor();
  2664. init_esm_shims2();
  2665. init_esm_shims2();
  2666. init_esm_shims2();
  2667. var TIMELINE_LAYERS_STATE_STORAGE_ID = "__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";
  2668. function getTimelineLayersStateFromStorage() {
  2669. if (!isBrowser || typeof localStorage === "undefined" || localStorage === null) {
  2670. return {
  2671. recordingState: false,
  2672. mouseEventEnabled: false,
  2673. keyboardEventEnabled: false,
  2674. componentEventEnabled: false,
  2675. performanceEventEnabled: false,
  2676. selected: ""
  2677. };
  2678. }
  2679. const state = localStorage.getItem(TIMELINE_LAYERS_STATE_STORAGE_ID);
  2680. return state ? JSON.parse(state) : {
  2681. recordingState: false,
  2682. mouseEventEnabled: false,
  2683. keyboardEventEnabled: false,
  2684. componentEventEnabled: false,
  2685. performanceEventEnabled: false,
  2686. selected: ""
  2687. };
  2688. }
  2689. init_esm_shims2();
  2690. init_esm_shims2();
  2691. init_esm_shims2();
  2692. var _a22;
  2693. var _b2;
  2694. (_b2 = (_a22 = target).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS) != null ? _b2 : _a22.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS = [];
  2695. var devtoolsTimelineLayers = new Proxy(target.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS, {
  2696. get(target22, prop, receiver) {
  2697. return Reflect.get(target22, prop, receiver);
  2698. }
  2699. });
  2700. function addTimelineLayer(options, descriptor) {
  2701. devtoolsState.timelineLayersState[descriptor.id] = false;
  2702. devtoolsTimelineLayers.push({
  2703. ...options,
  2704. descriptorId: descriptor.id,
  2705. appRecord: getAppRecord(descriptor.app)
  2706. });
  2707. }
  2708. var _a3;
  2709. var _b3;
  2710. (_b3 = (_a3 = target).__VUE_DEVTOOLS_KIT_INSPECTOR__) != null ? _b3 : _a3.__VUE_DEVTOOLS_KIT_INSPECTOR__ = [];
  2711. var devtoolsInspector = new Proxy(target.__VUE_DEVTOOLS_KIT_INSPECTOR__, {
  2712. get(target22, prop, receiver) {
  2713. return Reflect.get(target22, prop, receiver);
  2714. }
  2715. });
  2716. var callInspectorUpdatedHook = debounce(() => {
  2717. devtoolsContext.hooks.callHook("sendInspectorToClient", getActiveInspectors());
  2718. });
  2719. function addInspector(inspector, descriptor) {
  2720. var _a25, _b25;
  2721. devtoolsInspector.push({
  2722. options: inspector,
  2723. descriptor,
  2724. treeFilterPlaceholder: (_a25 = inspector.treeFilterPlaceholder) != null ? _a25 : "Search tree...",
  2725. stateFilterPlaceholder: (_b25 = inspector.stateFilterPlaceholder) != null ? _b25 : "Search state...",
  2726. treeFilter: "",
  2727. selectedNodeId: "",
  2728. appRecord: getAppRecord(descriptor.app)
  2729. });
  2730. callInspectorUpdatedHook();
  2731. }
  2732. function getActiveInspectors() {
  2733. return devtoolsInspector.filter((inspector) => inspector.descriptor.app === activeAppRecord.value.app).filter((inspector) => inspector.descriptor.id !== "components").map((inspector) => {
  2734. var _a25;
  2735. const descriptor = inspector.descriptor;
  2736. const options = inspector.options;
  2737. return {
  2738. id: options.id,
  2739. label: options.label,
  2740. logo: descriptor.logo,
  2741. icon: `custom-ic-baseline-${(_a25 = options == null ? void 0 : options.icon) == null ? void 0 : _a25.replace(/_/g, "-")}`,
  2742. packageName: descriptor.packageName,
  2743. homepage: descriptor.homepage,
  2744. pluginId: descriptor.id
  2745. };
  2746. });
  2747. }
  2748. function getInspector(id, app) {
  2749. return devtoolsInspector.find((inspector) => inspector.options.id === id && (app ? inspector.descriptor.app === app : true));
  2750. }
  2751. var DevToolsV6PluginAPIHookKeys = ((DevToolsV6PluginAPIHookKeys2) => {
  2752. DevToolsV6PluginAPIHookKeys2["VISIT_COMPONENT_TREE"] = "visitComponentTree";
  2753. DevToolsV6PluginAPIHookKeys2["INSPECT_COMPONENT"] = "inspectComponent";
  2754. DevToolsV6PluginAPIHookKeys2["EDIT_COMPONENT_STATE"] = "editComponentState";
  2755. DevToolsV6PluginAPIHookKeys2["GET_INSPECTOR_TREE"] = "getInspectorTree";
  2756. DevToolsV6PluginAPIHookKeys2["GET_INSPECTOR_STATE"] = "getInspectorState";
  2757. DevToolsV6PluginAPIHookKeys2["EDIT_INSPECTOR_STATE"] = "editInspectorState";
  2758. DevToolsV6PluginAPIHookKeys2["INSPECT_TIMELINE_EVENT"] = "inspectTimelineEvent";
  2759. DevToolsV6PluginAPIHookKeys2["TIMELINE_CLEARED"] = "timelineCleared";
  2760. DevToolsV6PluginAPIHookKeys2["SET_PLUGIN_SETTINGS"] = "setPluginSettings";
  2761. return DevToolsV6PluginAPIHookKeys2;
  2762. })(DevToolsV6PluginAPIHookKeys || {});
  2763. var DevToolsContextHookKeys = ((DevToolsContextHookKeys2) => {
  2764. DevToolsContextHookKeys2["ADD_INSPECTOR"] = "addInspector";
  2765. DevToolsContextHookKeys2["SEND_INSPECTOR_TREE"] = "sendInspectorTree";
  2766. DevToolsContextHookKeys2["SEND_INSPECTOR_STATE"] = "sendInspectorState";
  2767. DevToolsContextHookKeys2["CUSTOM_INSPECTOR_SELECT_NODE"] = "customInspectorSelectNode";
  2768. DevToolsContextHookKeys2["TIMELINE_LAYER_ADDED"] = "timelineLayerAdded";
  2769. DevToolsContextHookKeys2["TIMELINE_EVENT_ADDED"] = "timelineEventAdded";
  2770. DevToolsContextHookKeys2["GET_COMPONENT_INSTANCES"] = "getComponentInstances";
  2771. DevToolsContextHookKeys2["GET_COMPONENT_BOUNDS"] = "getComponentBounds";
  2772. DevToolsContextHookKeys2["GET_COMPONENT_NAME"] = "getComponentName";
  2773. DevToolsContextHookKeys2["COMPONENT_HIGHLIGHT"] = "componentHighlight";
  2774. DevToolsContextHookKeys2["COMPONENT_UNHIGHLIGHT"] = "componentUnhighlight";
  2775. return DevToolsContextHookKeys2;
  2776. })(DevToolsContextHookKeys || {});
  2777. var DevToolsMessagingHookKeys = ((DevToolsMessagingHookKeys2) => {
  2778. DevToolsMessagingHookKeys2["SEND_INSPECTOR_TREE_TO_CLIENT"] = "sendInspectorTreeToClient";
  2779. DevToolsMessagingHookKeys2["SEND_INSPECTOR_STATE_TO_CLIENT"] = "sendInspectorStateToClient";
  2780. DevToolsMessagingHookKeys2["SEND_TIMELINE_EVENT_TO_CLIENT"] = "sendTimelineEventToClient";
  2781. DevToolsMessagingHookKeys2["SEND_INSPECTOR_TO_CLIENT"] = "sendInspectorToClient";
  2782. DevToolsMessagingHookKeys2["SEND_ACTIVE_APP_UNMOUNTED_TO_CLIENT"] = "sendActiveAppUpdatedToClient";
  2783. DevToolsMessagingHookKeys2["DEVTOOLS_STATE_UPDATED"] = "devtoolsStateUpdated";
  2784. DevToolsMessagingHookKeys2["DEVTOOLS_CONNECTED_UPDATED"] = "devtoolsConnectedUpdated";
  2785. DevToolsMessagingHookKeys2["ROUTER_INFO_UPDATED"] = "routerInfoUpdated";
  2786. return DevToolsMessagingHookKeys2;
  2787. })(DevToolsMessagingHookKeys || {});
  2788. function createDevToolsCtxHooks() {
  2789. const hooks2 = createHooks();
  2790. hooks2.hook("addInspector", ({ inspector, plugin }) => {
  2791. addInspector(inspector, plugin.descriptor);
  2792. });
  2793. const debounceSendInspectorTree = debounce(async ({ inspectorId, plugin }) => {
  2794. var _a25;
  2795. if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app) || devtoolsState.highPerfModeEnabled)
  2796. return;
  2797. const inspector = getInspector(inspectorId, plugin.descriptor.app);
  2798. const _payload = {
  2799. app: plugin.descriptor.app,
  2800. inspectorId,
  2801. filter: (inspector == null ? void 0 : inspector.treeFilter) || "",
  2802. rootNodes: []
  2803. };
  2804. await new Promise((resolve) => {
  2805. hooks2.callHookWith(
  2806. async (callbacks) => {
  2807. await Promise.all(callbacks.map((cb) => cb(_payload)));
  2808. resolve();
  2809. },
  2810. "getInspectorTree"
  2811. /* GET_INSPECTOR_TREE */
  2812. );
  2813. });
  2814. hooks2.callHookWith(
  2815. async (callbacks) => {
  2816. await Promise.all(callbacks.map((cb) => cb({
  2817. inspectorId,
  2818. rootNodes: _payload.rootNodes
  2819. })));
  2820. },
  2821. "sendInspectorTreeToClient"
  2822. /* SEND_INSPECTOR_TREE_TO_CLIENT */
  2823. );
  2824. }, 120);
  2825. hooks2.hook("sendInspectorTree", debounceSendInspectorTree);
  2826. const debounceSendInspectorState = debounce(async ({ inspectorId, plugin }) => {
  2827. var _a25;
  2828. if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app) || devtoolsState.highPerfModeEnabled)
  2829. return;
  2830. const inspector = getInspector(inspectorId, plugin.descriptor.app);
  2831. const _payload = {
  2832. app: plugin.descriptor.app,
  2833. inspectorId,
  2834. nodeId: (inspector == null ? void 0 : inspector.selectedNodeId) || "",
  2835. state: null
  2836. };
  2837. const ctx = {
  2838. currentTab: `custom-inspector:${inspectorId}`
  2839. };
  2840. if (_payload.nodeId) {
  2841. await new Promise((resolve) => {
  2842. hooks2.callHookWith(
  2843. async (callbacks) => {
  2844. await Promise.all(callbacks.map((cb) => cb(_payload, ctx)));
  2845. resolve();
  2846. },
  2847. "getInspectorState"
  2848. /* GET_INSPECTOR_STATE */
  2849. );
  2850. });
  2851. }
  2852. hooks2.callHookWith(
  2853. async (callbacks) => {
  2854. await Promise.all(callbacks.map((cb) => cb({
  2855. inspectorId,
  2856. nodeId: _payload.nodeId,
  2857. state: _payload.state
  2858. })));
  2859. },
  2860. "sendInspectorStateToClient"
  2861. /* SEND_INSPECTOR_STATE_TO_CLIENT */
  2862. );
  2863. }, 120);
  2864. hooks2.hook("sendInspectorState", debounceSendInspectorState);
  2865. hooks2.hook("customInspectorSelectNode", ({ inspectorId, nodeId, plugin }) => {
  2866. const inspector = getInspector(inspectorId, plugin.descriptor.app);
  2867. if (!inspector)
  2868. return;
  2869. inspector.selectedNodeId = nodeId;
  2870. });
  2871. hooks2.hook("timelineLayerAdded", ({ options, plugin }) => {
  2872. addTimelineLayer(options, plugin.descriptor);
  2873. });
  2874. hooks2.hook("timelineEventAdded", ({ options, plugin }) => {
  2875. var _a25;
  2876. const internalLayerIds = ["performance", "component-event", "keyboard", "mouse"];
  2877. if (devtoolsState.highPerfModeEnabled || !((_a25 = devtoolsState.timelineLayersState) == null ? void 0 : _a25[plugin.descriptor.id]) && !internalLayerIds.includes(options.layerId))
  2878. return;
  2879. hooks2.callHookWith(
  2880. async (callbacks) => {
  2881. await Promise.all(callbacks.map((cb) => cb(options)));
  2882. },
  2883. "sendTimelineEventToClient"
  2884. /* SEND_TIMELINE_EVENT_TO_CLIENT */
  2885. );
  2886. });
  2887. hooks2.hook("getComponentInstances", async ({ app }) => {
  2888. const appRecord = app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
  2889. if (!appRecord)
  2890. return null;
  2891. const appId = appRecord.id.toString();
  2892. const instances = [...appRecord.instanceMap].filter(([key]) => key.split(":")[0] === appId).map(([, instance]) => instance);
  2893. return instances;
  2894. });
  2895. hooks2.hook("getComponentBounds", async ({ instance }) => {
  2896. const bounds = getComponentBoundingRect(instance);
  2897. return bounds;
  2898. });
  2899. hooks2.hook("getComponentName", ({ instance }) => {
  2900. const name = getInstanceName(instance);
  2901. return name;
  2902. });
  2903. hooks2.hook("componentHighlight", ({ uid }) => {
  2904. const instance = activeAppRecord.value.instanceMap.get(uid);
  2905. if (instance) {
  2906. highlight(instance);
  2907. }
  2908. });
  2909. hooks2.hook("componentUnhighlight", () => {
  2910. unhighlight();
  2911. });
  2912. return hooks2;
  2913. }
  2914. var _a4;
  2915. var _b4;
  2916. (_b4 = (_a4 = target).__VUE_DEVTOOLS_KIT_APP_RECORDS__) != null ? _b4 : _a4.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = [];
  2917. var _a5;
  2918. var _b5;
  2919. (_b5 = (_a5 = target).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__) != null ? _b5 : _a5.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = {};
  2920. var _a6;
  2921. var _b6;
  2922. (_b6 = (_a6 = target).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__) != null ? _b6 : _a6.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = "";
  2923. var _a7;
  2924. var _b7;
  2925. (_b7 = (_a7 = target).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__) != null ? _b7 : _a7.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ = [];
  2926. var _a8;
  2927. var _b8;
  2928. (_b8 = (_a8 = target).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__) != null ? _b8 : _a8.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ = [];
  2929. var STATE_KEY = "__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";
  2930. function initStateFactory() {
  2931. return {
  2932. connected: false,
  2933. clientConnected: false,
  2934. vitePluginDetected: true,
  2935. appRecords: [],
  2936. activeAppRecordId: "",
  2937. tabs: [],
  2938. commands: [],
  2939. highPerfModeEnabled: true,
  2940. devtoolsClientDetected: {},
  2941. perfUniqueGroupId: 0,
  2942. timelineLayersState: getTimelineLayersStateFromStorage()
  2943. };
  2944. }
  2945. var _a9;
  2946. var _b9;
  2947. (_b9 = (_a9 = target)[STATE_KEY]) != null ? _b9 : _a9[STATE_KEY] = initStateFactory();
  2948. var callStateUpdatedHook = debounce((state) => {
  2949. devtoolsContext.hooks.callHook("devtoolsStateUpdated", { state });
  2950. });
  2951. var callConnectedUpdatedHook = debounce((state, oldState) => {
  2952. devtoolsContext.hooks.callHook("devtoolsConnectedUpdated", { state, oldState });
  2953. });
  2954. var devtoolsAppRecords = new Proxy(target.__VUE_DEVTOOLS_KIT_APP_RECORDS__, {
  2955. get(_target, prop, receiver) {
  2956. if (prop === "value")
  2957. return target.__VUE_DEVTOOLS_KIT_APP_RECORDS__;
  2958. return target.__VUE_DEVTOOLS_KIT_APP_RECORDS__[prop];
  2959. }
  2960. });
  2961. var activeAppRecord = new Proxy(target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__, {
  2962. get(_target, prop, receiver) {
  2963. if (prop === "value")
  2964. return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__;
  2965. else if (prop === "id")
  2966. return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__;
  2967. return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[prop];
  2968. }
  2969. });
  2970. function updateAllStates() {
  2971. callStateUpdatedHook({
  2972. ...target[STATE_KEY],
  2973. appRecords: devtoolsAppRecords.value,
  2974. activeAppRecordId: activeAppRecord.id,
  2975. tabs: target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,
  2976. commands: target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__
  2977. });
  2978. }
  2979. function setActiveAppRecord(app) {
  2980. target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = app;
  2981. updateAllStates();
  2982. }
  2983. function setActiveAppRecordId(id) {
  2984. target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = id;
  2985. updateAllStates();
  2986. }
  2987. var devtoolsState = new Proxy(target[STATE_KEY], {
  2988. get(target22, property) {
  2989. if (property === "appRecords") {
  2990. return devtoolsAppRecords;
  2991. } else if (property === "activeAppRecordId") {
  2992. return activeAppRecord.id;
  2993. } else if (property === "tabs") {
  2994. return target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;
  2995. } else if (property === "commands") {
  2996. return target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
  2997. }
  2998. return target[STATE_KEY][property];
  2999. },
  3000. deleteProperty(target22, property) {
  3001. delete target22[property];
  3002. return true;
  3003. },
  3004. set(target22, property, value) {
  3005. const oldState = { ...target[STATE_KEY] };
  3006. target22[property] = value;
  3007. target[STATE_KEY][property] = value;
  3008. return true;
  3009. }
  3010. });
  3011. function onDevToolsConnected(fn) {
  3012. return new Promise((resolve) => {
  3013. if (devtoolsState.connected) {
  3014. fn();
  3015. resolve();
  3016. }
  3017. devtoolsContext.hooks.hook("devtoolsConnectedUpdated", ({ state }) => {
  3018. if (state.connected) {
  3019. fn();
  3020. resolve();
  3021. }
  3022. });
  3023. });
  3024. }
  3025. var resolveIcon = (icon) => {
  3026. if (!icon)
  3027. return;
  3028. if (icon.startsWith("baseline-")) {
  3029. return `custom-ic-${icon}`;
  3030. }
  3031. if (icon.startsWith("i-") || isUrlString(icon))
  3032. return icon;
  3033. return `custom-ic-baseline-${icon}`;
  3034. };
  3035. function addCustomTab(tab) {
  3036. const tabs = target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;
  3037. if (tabs.some((t) => t.name === tab.name))
  3038. return;
  3039. tabs.push({
  3040. ...tab,
  3041. icon: resolveIcon(tab.icon)
  3042. });
  3043. updateAllStates();
  3044. }
  3045. function addCustomCommand(action) {
  3046. const commands = target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
  3047. if (commands.some((t) => t.id === action.id))
  3048. return;
  3049. commands.push({
  3050. ...action,
  3051. icon: resolveIcon(action.icon),
  3052. children: action.children ? action.children.map((child) => ({
  3053. ...child,
  3054. icon: resolveIcon(child.icon)
  3055. })) : void 0
  3056. });
  3057. updateAllStates();
  3058. }
  3059. function removeCustomCommand(actionId) {
  3060. const commands = target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
  3061. const index = commands.findIndex((t) => t.id === actionId);
  3062. if (index === -1)
  3063. return;
  3064. commands.splice(index, 1);
  3065. updateAllStates();
  3066. }
  3067. function openInEditor(options = {}) {
  3068. var _a25, _b25, _c;
  3069. const { file, host, baseUrl = window.location.origin, line = 0, column = 0 } = options;
  3070. if (file) {
  3071. if (host === "chrome-extension") {
  3072. const fileName = file.replace(/\\/g, "\\\\");
  3073. const _baseUrl = (_b25 = (_a25 = window.VUE_DEVTOOLS_CONFIG) == null ? void 0 : _a25.openInEditorHost) != null ? _b25 : "/";
  3074. fetch(`${_baseUrl}__open-in-editor?file=${encodeURI(file)}`).then((response) => {
  3075. if (!response.ok) {
  3076. const msg = `Opening component ${fileName} failed`;
  3077. console.log(`%c${msg}`, "color:red");
  3078. }
  3079. });
  3080. } else if (devtoolsState.vitePluginDetected) {
  3081. const _baseUrl = (_c = target.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__) != null ? _c : baseUrl;
  3082. target.__VUE_INSPECTOR__.openInEditor(_baseUrl, file, line, column);
  3083. }
  3084. }
  3085. }
  3086. init_esm_shims2();
  3087. init_esm_shims2();
  3088. init_esm_shims2();
  3089. init_esm_shims2();
  3090. init_esm_shims2();
  3091. var _a10;
  3092. var _b10;
  3093. (_b10 = (_a10 = target).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__) != null ? _b10 : _a10.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__ = [];
  3094. var devtoolsPluginBuffer = new Proxy(target.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__, {
  3095. get(target22, prop, receiver) {
  3096. return Reflect.get(target22, prop, receiver);
  3097. }
  3098. });
  3099. function _getSettings(settings) {
  3100. const _settings = {};
  3101. Object.keys(settings).forEach((key) => {
  3102. _settings[key] = settings[key].defaultValue;
  3103. });
  3104. return _settings;
  3105. }
  3106. function getPluginLocalKey(pluginId) {
  3107. return `__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${pluginId}__`;
  3108. }
  3109. function getPluginSettingsOptions(pluginId) {
  3110. var _a25, _b25, _c;
  3111. const item = (_b25 = (_a25 = devtoolsPluginBuffer.find((item2) => {
  3112. var _a26;
  3113. return item2[0].id === pluginId && !!((_a26 = item2[0]) == null ? void 0 : _a26.settings);
  3114. })) == null ? void 0 : _a25[0]) != null ? _b25 : null;
  3115. return (_c = item == null ? void 0 : item.settings) != null ? _c : null;
  3116. }
  3117. function getPluginSettings(pluginId, fallbackValue) {
  3118. var _a25, _b25, _c;
  3119. const localKey = getPluginLocalKey(pluginId);
  3120. if (localKey) {
  3121. const localSettings = localStorage.getItem(localKey);
  3122. if (localSettings) {
  3123. return JSON.parse(localSettings);
  3124. }
  3125. }
  3126. if (pluginId) {
  3127. const item = (_b25 = (_a25 = devtoolsPluginBuffer.find((item2) => item2[0].id === pluginId)) == null ? void 0 : _a25[0]) != null ? _b25 : null;
  3128. return _getSettings((_c = item == null ? void 0 : item.settings) != null ? _c : {});
  3129. }
  3130. return _getSettings(fallbackValue);
  3131. }
  3132. function initPluginSettings(pluginId, settings) {
  3133. const localKey = getPluginLocalKey(pluginId);
  3134. const localSettings = localStorage.getItem(localKey);
  3135. if (!localSettings) {
  3136. localStorage.setItem(localKey, JSON.stringify(_getSettings(settings)));
  3137. }
  3138. }
  3139. function setPluginSettings(pluginId, key, value) {
  3140. const localKey = getPluginLocalKey(pluginId);
  3141. const localSettings = localStorage.getItem(localKey);
  3142. const parsedLocalSettings = JSON.parse(localSettings || "{}");
  3143. const updated = {
  3144. ...parsedLocalSettings,
  3145. [key]: value
  3146. };
  3147. localStorage.setItem(localKey, JSON.stringify(updated));
  3148. devtoolsContext.hooks.callHookWith(
  3149. (callbacks) => {
  3150. callbacks.forEach((cb) => cb({
  3151. pluginId,
  3152. key,
  3153. oldValue: parsedLocalSettings[key],
  3154. newValue: value,
  3155. settings: updated
  3156. }));
  3157. },
  3158. "setPluginSettings"
  3159. /* SET_PLUGIN_SETTINGS */
  3160. );
  3161. }
  3162. init_esm_shims2();
  3163. init_esm_shims2();
  3164. init_esm_shims2();
  3165. init_esm_shims2();
  3166. init_esm_shims2();
  3167. init_esm_shims2();
  3168. init_esm_shims2();
  3169. init_esm_shims2();
  3170. init_esm_shims2();
  3171. init_esm_shims2();
  3172. init_esm_shims2();
  3173. var _a11;
  3174. var _b11;
  3175. var devtoolsHooks = (_b11 = (_a11 = target).__VUE_DEVTOOLS_HOOK) != null ? _b11 : _a11.__VUE_DEVTOOLS_HOOK = createHooks();
  3176. var on = {
  3177. vueAppInit(fn) {
  3178. devtoolsHooks.hook("app:init", fn);
  3179. },
  3180. vueAppUnmount(fn) {
  3181. devtoolsHooks.hook("app:unmount", fn);
  3182. },
  3183. vueAppConnected(fn) {
  3184. devtoolsHooks.hook("app:connected", fn);
  3185. },
  3186. componentAdded(fn) {
  3187. return devtoolsHooks.hook("component:added", fn);
  3188. },
  3189. componentEmit(fn) {
  3190. return devtoolsHooks.hook("component:emit", fn);
  3191. },
  3192. componentUpdated(fn) {
  3193. return devtoolsHooks.hook("component:updated", fn);
  3194. },
  3195. componentRemoved(fn) {
  3196. return devtoolsHooks.hook("component:removed", fn);
  3197. },
  3198. setupDevtoolsPlugin(fn) {
  3199. devtoolsHooks.hook("devtools-plugin:setup", fn);
  3200. },
  3201. perfStart(fn) {
  3202. return devtoolsHooks.hook("perf:start", fn);
  3203. },
  3204. perfEnd(fn) {
  3205. return devtoolsHooks.hook("perf:end", fn);
  3206. }
  3207. };
  3208. var hook = {
  3209. on,
  3210. setupDevToolsPlugin(pluginDescriptor, setupFn) {
  3211. return devtoolsHooks.callHook("devtools-plugin:setup", pluginDescriptor, setupFn);
  3212. }
  3213. };
  3214. var DevToolsV6PluginAPI = class {
  3215. constructor({ plugin, ctx }) {
  3216. this.hooks = ctx.hooks;
  3217. this.plugin = plugin;
  3218. }
  3219. get on() {
  3220. return {
  3221. // component inspector
  3222. visitComponentTree: (handler) => {
  3223. this.hooks.hook("visitComponentTree", handler);
  3224. },
  3225. inspectComponent: (handler) => {
  3226. this.hooks.hook("inspectComponent", handler);
  3227. },
  3228. editComponentState: (handler) => {
  3229. this.hooks.hook("editComponentState", handler);
  3230. },
  3231. // custom inspector
  3232. getInspectorTree: (handler) => {
  3233. this.hooks.hook("getInspectorTree", handler);
  3234. },
  3235. getInspectorState: (handler) => {
  3236. this.hooks.hook("getInspectorState", handler);
  3237. },
  3238. editInspectorState: (handler) => {
  3239. this.hooks.hook("editInspectorState", handler);
  3240. },
  3241. // timeline
  3242. inspectTimelineEvent: (handler) => {
  3243. this.hooks.hook("inspectTimelineEvent", handler);
  3244. },
  3245. timelineCleared: (handler) => {
  3246. this.hooks.hook("timelineCleared", handler);
  3247. },
  3248. // settings
  3249. setPluginSettings: (handler) => {
  3250. this.hooks.hook("setPluginSettings", handler);
  3251. }
  3252. };
  3253. }
  3254. // component inspector
  3255. notifyComponentUpdate(instance) {
  3256. var _a25;
  3257. if (devtoolsState.highPerfModeEnabled) {
  3258. return;
  3259. }
  3260. const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);
  3261. if (inspector == null ? void 0 : inspector.id) {
  3262. if (instance) {
  3263. const args = [
  3264. instance.appContext.app,
  3265. instance.uid,
  3266. (_a25 = instance.parent) == null ? void 0 : _a25.uid,
  3267. instance
  3268. ];
  3269. devtoolsHooks.callHook("component:updated", ...args);
  3270. } else {
  3271. devtoolsHooks.callHook(
  3272. "component:updated"
  3273. /* COMPONENT_UPDATED */
  3274. );
  3275. }
  3276. this.hooks.callHook("sendInspectorState", { inspectorId: inspector.id, plugin: this.plugin });
  3277. }
  3278. }
  3279. // custom inspector
  3280. addInspector(options) {
  3281. this.hooks.callHook("addInspector", { inspector: options, plugin: this.plugin });
  3282. if (this.plugin.descriptor.settings) {
  3283. initPluginSettings(options.id, this.plugin.descriptor.settings);
  3284. }
  3285. }
  3286. sendInspectorTree(inspectorId) {
  3287. if (devtoolsState.highPerfModeEnabled) {
  3288. return;
  3289. }
  3290. this.hooks.callHook("sendInspectorTree", { inspectorId, plugin: this.plugin });
  3291. }
  3292. sendInspectorState(inspectorId) {
  3293. if (devtoolsState.highPerfModeEnabled) {
  3294. return;
  3295. }
  3296. this.hooks.callHook("sendInspectorState", { inspectorId, plugin: this.plugin });
  3297. }
  3298. selectInspectorNode(inspectorId, nodeId) {
  3299. this.hooks.callHook("customInspectorSelectNode", { inspectorId, nodeId, plugin: this.plugin });
  3300. }
  3301. visitComponentTree(payload) {
  3302. return this.hooks.callHook("visitComponentTree", payload);
  3303. }
  3304. // timeline
  3305. now() {
  3306. if (devtoolsState.highPerfModeEnabled) {
  3307. return 0;
  3308. }
  3309. return Date.now();
  3310. }
  3311. addTimelineLayer(options) {
  3312. this.hooks.callHook("timelineLayerAdded", { options, plugin: this.plugin });
  3313. }
  3314. addTimelineEvent(options) {
  3315. if (devtoolsState.highPerfModeEnabled) {
  3316. return;
  3317. }
  3318. this.hooks.callHook("timelineEventAdded", { options, plugin: this.plugin });
  3319. }
  3320. // settings
  3321. getSettings(pluginId) {
  3322. return getPluginSettings(pluginId != null ? pluginId : this.plugin.descriptor.id, this.plugin.descriptor.settings);
  3323. }
  3324. // utilities
  3325. getComponentInstances(app) {
  3326. return this.hooks.callHook("getComponentInstances", { app });
  3327. }
  3328. getComponentBounds(instance) {
  3329. return this.hooks.callHook("getComponentBounds", { instance });
  3330. }
  3331. getComponentName(instance) {
  3332. return this.hooks.callHook("getComponentName", { instance });
  3333. }
  3334. highlightElement(instance) {
  3335. const uid = instance.__VUE_DEVTOOLS_NEXT_UID__;
  3336. return this.hooks.callHook("componentHighlight", { uid });
  3337. }
  3338. unhighlightElement() {
  3339. return this.hooks.callHook(
  3340. "componentUnhighlight"
  3341. /* COMPONENT_UNHIGHLIGHT */
  3342. );
  3343. }
  3344. };
  3345. var DevToolsPluginAPI = DevToolsV6PluginAPI;
  3346. init_esm_shims2();
  3347. init_esm_shims2();
  3348. init_esm_shims2();
  3349. init_esm_shims2();
  3350. var UNDEFINED = "__vue_devtool_undefined__";
  3351. var INFINITY = "__vue_devtool_infinity__";
  3352. var NEGATIVE_INFINITY = "__vue_devtool_negative_infinity__";
  3353. var NAN = "__vue_devtool_nan__";
  3354. init_esm_shims2();
  3355. init_esm_shims2();
  3356. var tokenMap = {
  3357. [UNDEFINED]: "undefined",
  3358. [NAN]: "NaN",
  3359. [INFINITY]: "Infinity",
  3360. [NEGATIVE_INFINITY]: "-Infinity"
  3361. };
  3362. var reversedTokenMap = Object.entries(tokenMap).reduce((acc, [key, value]) => {
  3363. acc[value] = key;
  3364. return acc;
  3365. }, {});
  3366. init_esm_shims2();
  3367. init_esm_shims2();
  3368. init_esm_shims2();
  3369. init_esm_shims2();
  3370. init_esm_shims2();
  3371. var _a12;
  3372. var _b12;
  3373. (_b12 = (_a12 = target).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__) != null ? _b12 : _a12.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__ = /* @__PURE__ */ new Set();
  3374. function setupDevToolsPlugin(pluginDescriptor, setupFn) {
  3375. return hook.setupDevToolsPlugin(pluginDescriptor, setupFn);
  3376. }
  3377. function callDevToolsPluginSetupFn(plugin, app) {
  3378. const [pluginDescriptor, setupFn] = plugin;
  3379. if (pluginDescriptor.app !== app)
  3380. return;
  3381. const api = new DevToolsPluginAPI({
  3382. plugin: {
  3383. setupFn,
  3384. descriptor: pluginDescriptor
  3385. },
  3386. ctx: devtoolsContext
  3387. });
  3388. if (pluginDescriptor.packageName === "vuex") {
  3389. api.on.editInspectorState((payload) => {
  3390. api.sendInspectorState(payload.inspectorId);
  3391. });
  3392. }
  3393. setupFn(api);
  3394. }
  3395. function registerDevToolsPlugin(app) {
  3396. if (target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(app) || devtoolsState.highPerfModeEnabled)
  3397. return;
  3398. target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(app);
  3399. devtoolsPluginBuffer.forEach((plugin) => {
  3400. callDevToolsPluginSetupFn(plugin, app);
  3401. });
  3402. }
  3403. init_esm_shims2();
  3404. init_esm_shims2();
  3405. var ROUTER_KEY = "__VUE_DEVTOOLS_ROUTER__";
  3406. var ROUTER_INFO_KEY = "__VUE_DEVTOOLS_ROUTER_INFO__";
  3407. var _a13;
  3408. var _b13;
  3409. (_b13 = (_a13 = target)[ROUTER_INFO_KEY]) != null ? _b13 : _a13[ROUTER_INFO_KEY] = {
  3410. currentRoute: null,
  3411. routes: []
  3412. };
  3413. var _a14;
  3414. var _b14;
  3415. (_b14 = (_a14 = target)[ROUTER_KEY]) != null ? _b14 : _a14[ROUTER_KEY] = {};
  3416. var devtoolsRouterInfo = new Proxy(target[ROUTER_INFO_KEY], {
  3417. get(target22, property) {
  3418. return target[ROUTER_INFO_KEY][property];
  3419. }
  3420. });
  3421. var devtoolsRouter = new Proxy(target[ROUTER_KEY], {
  3422. get(target22, property) {
  3423. if (property === "value") {
  3424. return target[ROUTER_KEY];
  3425. }
  3426. }
  3427. });
  3428. function getRoutes(router) {
  3429. const routesMap = /* @__PURE__ */ new Map();
  3430. return ((router == null ? void 0 : router.getRoutes()) || []).filter((i) => !routesMap.has(i.path) && routesMap.set(i.path, 1));
  3431. }
  3432. function filterRoutes(routes) {
  3433. return routes.map((item) => {
  3434. let { path, name, children, meta } = item;
  3435. if (children == null ? void 0 : children.length)
  3436. children = filterRoutes(children);
  3437. return {
  3438. path,
  3439. name,
  3440. children,
  3441. meta
  3442. };
  3443. });
  3444. }
  3445. function filterCurrentRoute(route) {
  3446. if (route) {
  3447. const { fullPath, hash, href, path, name, matched, params, query } = route;
  3448. return {
  3449. fullPath,
  3450. hash,
  3451. href,
  3452. path,
  3453. name,
  3454. params,
  3455. query,
  3456. matched: filterRoutes(matched)
  3457. };
  3458. }
  3459. return route;
  3460. }
  3461. function normalizeRouterInfo(appRecord, activeAppRecord2) {
  3462. function init() {
  3463. var _a25;
  3464. const router = (_a25 = appRecord.app) == null ? void 0 : _a25.config.globalProperties.$router;
  3465. const currentRoute = filterCurrentRoute(router == null ? void 0 : router.currentRoute.value);
  3466. const routes = filterRoutes(getRoutes(router));
  3467. const c = console.warn;
  3468. console.warn = () => {
  3469. };
  3470. target[ROUTER_INFO_KEY] = {
  3471. currentRoute: currentRoute ? deepClone(currentRoute) : {},
  3472. routes: deepClone(routes)
  3473. };
  3474. target[ROUTER_KEY] = router;
  3475. console.warn = c;
  3476. }
  3477. init();
  3478. hook.on.componentUpdated(debounce(() => {
  3479. var _a25;
  3480. if (((_a25 = activeAppRecord2.value) == null ? void 0 : _a25.app) !== appRecord.app)
  3481. return;
  3482. init();
  3483. if (devtoolsState.highPerfModeEnabled)
  3484. return;
  3485. devtoolsContext.hooks.callHook("routerInfoUpdated", { state: target[ROUTER_INFO_KEY] });
  3486. }, 200));
  3487. }
  3488. function createDevToolsApi(hooks2) {
  3489. return {
  3490. // get inspector tree
  3491. async getInspectorTree(payload) {
  3492. const _payload = {
  3493. ...payload,
  3494. app: activeAppRecord.value.app,
  3495. rootNodes: []
  3496. };
  3497. await new Promise((resolve) => {
  3498. hooks2.callHookWith(
  3499. async (callbacks) => {
  3500. await Promise.all(callbacks.map((cb) => cb(_payload)));
  3501. resolve();
  3502. },
  3503. "getInspectorTree"
  3504. /* GET_INSPECTOR_TREE */
  3505. );
  3506. });
  3507. return _payload.rootNodes;
  3508. },
  3509. // get inspector state
  3510. async getInspectorState(payload) {
  3511. const _payload = {
  3512. ...payload,
  3513. app: activeAppRecord.value.app,
  3514. state: null
  3515. };
  3516. const ctx = {
  3517. currentTab: `custom-inspector:${payload.inspectorId}`
  3518. };
  3519. await new Promise((resolve) => {
  3520. hooks2.callHookWith(
  3521. async (callbacks) => {
  3522. await Promise.all(callbacks.map((cb) => cb(_payload, ctx)));
  3523. resolve();
  3524. },
  3525. "getInspectorState"
  3526. /* GET_INSPECTOR_STATE */
  3527. );
  3528. });
  3529. return _payload.state;
  3530. },
  3531. // edit inspector state
  3532. editInspectorState(payload) {
  3533. const stateEditor2 = new StateEditor();
  3534. const _payload = {
  3535. ...payload,
  3536. app: activeAppRecord.value.app,
  3537. set: (obj, path = payload.path, value = payload.state.value, cb) => {
  3538. stateEditor2.set(obj, path, value, cb || stateEditor2.createDefaultSetCallback(payload.state));
  3539. }
  3540. };
  3541. hooks2.callHookWith(
  3542. (callbacks) => {
  3543. callbacks.forEach((cb) => cb(_payload));
  3544. },
  3545. "editInspectorState"
  3546. /* EDIT_INSPECTOR_STATE */
  3547. );
  3548. },
  3549. // send inspector state
  3550. sendInspectorState(inspectorId) {
  3551. const inspector = getInspector(inspectorId);
  3552. hooks2.callHook("sendInspectorState", { inspectorId, plugin: {
  3553. descriptor: inspector.descriptor,
  3554. setupFn: () => ({})
  3555. } });
  3556. },
  3557. // inspect component inspector
  3558. inspectComponentInspector() {
  3559. return inspectComponentHighLighter();
  3560. },
  3561. // cancel inspect component inspector
  3562. cancelInspectComponentInspector() {
  3563. return cancelInspectComponentHighLighter();
  3564. },
  3565. // get component render code
  3566. getComponentRenderCode(id) {
  3567. const instance = getComponentInstance(activeAppRecord.value, id);
  3568. if (instance)
  3569. return !((instance == null ? void 0 : instance.type) instanceof Function) ? instance.render.toString() : instance.type.toString();
  3570. },
  3571. // scroll to component
  3572. scrollToComponent(id) {
  3573. return scrollToComponent({ id });
  3574. },
  3575. // open in editor
  3576. openInEditor,
  3577. // get vue inspector
  3578. getVueInspector: getComponentInspector,
  3579. // toggle app
  3580. toggleApp(id) {
  3581. const appRecord = devtoolsAppRecords.value.find((record) => record.id === id);
  3582. if (appRecord) {
  3583. setActiveAppRecordId(id);
  3584. setActiveAppRecord(appRecord);
  3585. normalizeRouterInfo(appRecord, activeAppRecord);
  3586. callInspectorUpdatedHook();
  3587. registerDevToolsPlugin(appRecord.app);
  3588. }
  3589. },
  3590. // inspect dom
  3591. inspectDOM(instanceId) {
  3592. const instance = getComponentInstance(activeAppRecord.value, instanceId);
  3593. if (instance) {
  3594. const [el] = getRootElementsFromComponentInstance(instance);
  3595. if (el) {
  3596. target.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__ = el;
  3597. }
  3598. }
  3599. },
  3600. updatePluginSettings(pluginId, key, value) {
  3601. setPluginSettings(pluginId, key, value);
  3602. },
  3603. getPluginSettings(pluginId) {
  3604. return {
  3605. options: getPluginSettingsOptions(pluginId),
  3606. values: getPluginSettings(pluginId)
  3607. };
  3608. }
  3609. };
  3610. }
  3611. init_esm_shims2();
  3612. var _a15;
  3613. var _b15;
  3614. (_b15 = (_a15 = target).__VUE_DEVTOOLS_ENV__) != null ? _b15 : _a15.__VUE_DEVTOOLS_ENV__ = {
  3615. vitePluginDetected: false
  3616. };
  3617. var hooks = createDevToolsCtxHooks();
  3618. var _a16;
  3619. var _b16;
  3620. (_b16 = (_a16 = target).__VUE_DEVTOOLS_KIT_CONTEXT__) != null ? _b16 : _a16.__VUE_DEVTOOLS_KIT_CONTEXT__ = {
  3621. hooks,
  3622. get state() {
  3623. return {
  3624. ...devtoolsState,
  3625. activeAppRecordId: activeAppRecord.id,
  3626. activeAppRecord: activeAppRecord.value,
  3627. appRecords: devtoolsAppRecords.value
  3628. };
  3629. },
  3630. api: createDevToolsApi(hooks)
  3631. };
  3632. var devtoolsContext = target.__VUE_DEVTOOLS_KIT_CONTEXT__;
  3633. init_esm_shims2();
  3634. var import_speakingurl = __toESM2(require_speakingurl2(), 1);
  3635. var _a17;
  3636. var _b17;
  3637. var appRecordInfo = (_b17 = (_a17 = target).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__) != null ? _b17 : _a17.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__ = {
  3638. id: 0,
  3639. appIds: /* @__PURE__ */ new Set()
  3640. };
  3641. function onDevToolsClientConnected(fn) {
  3642. return new Promise((resolve) => {
  3643. if (devtoolsState.connected && devtoolsState.clientConnected) {
  3644. fn();
  3645. resolve();
  3646. return;
  3647. }
  3648. devtoolsContext.hooks.hook("devtoolsConnectedUpdated", ({ state }) => {
  3649. if (state.connected && state.clientConnected) {
  3650. fn();
  3651. resolve();
  3652. }
  3653. });
  3654. });
  3655. }
  3656. init_esm_shims2();
  3657. function toggleHighPerfMode(state) {
  3658. devtoolsState.highPerfModeEnabled = state != null ? state : !devtoolsState.highPerfModeEnabled;
  3659. if (!state && activeAppRecord.value) {
  3660. registerDevToolsPlugin(activeAppRecord.value.app);
  3661. }
  3662. }
  3663. init_esm_shims2();
  3664. init_esm_shims2();
  3665. init_esm_shims2();
  3666. function updateDevToolsClientDetected(params) {
  3667. devtoolsState.devtoolsClientDetected = {
  3668. ...devtoolsState.devtoolsClientDetected,
  3669. ...params
  3670. };
  3671. const devtoolsClientVisible = Object.values(devtoolsState.devtoolsClientDetected).some(Boolean);
  3672. toggleHighPerfMode(!devtoolsClientVisible);
  3673. }
  3674. var _a18;
  3675. var _b18;
  3676. (_b18 = (_a18 = target).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__) != null ? _b18 : _a18.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__ = updateDevToolsClientDetected;
  3677. init_esm_shims2();
  3678. init_esm_shims2();
  3679. init_esm_shims2();
  3680. init_esm_shims2();
  3681. init_esm_shims2();
  3682. init_esm_shims2();
  3683. init_esm_shims2();
  3684. var DoubleIndexedKV = class {
  3685. constructor() {
  3686. this.keyToValue = /* @__PURE__ */ new Map();
  3687. this.valueToKey = /* @__PURE__ */ new Map();
  3688. }
  3689. set(key, value) {
  3690. this.keyToValue.set(key, value);
  3691. this.valueToKey.set(value, key);
  3692. }
  3693. getByKey(key) {
  3694. return this.keyToValue.get(key);
  3695. }
  3696. getByValue(value) {
  3697. return this.valueToKey.get(value);
  3698. }
  3699. clear() {
  3700. this.keyToValue.clear();
  3701. this.valueToKey.clear();
  3702. }
  3703. };
  3704. var Registry = class {
  3705. constructor(generateIdentifier) {
  3706. this.generateIdentifier = generateIdentifier;
  3707. this.kv = new DoubleIndexedKV();
  3708. }
  3709. register(value, identifier) {
  3710. if (this.kv.getByValue(value)) {
  3711. return;
  3712. }
  3713. if (!identifier) {
  3714. identifier = this.generateIdentifier(value);
  3715. }
  3716. this.kv.set(identifier, value);
  3717. }
  3718. clear() {
  3719. this.kv.clear();
  3720. }
  3721. getIdentifier(value) {
  3722. return this.kv.getByValue(value);
  3723. }
  3724. getValue(identifier) {
  3725. return this.kv.getByKey(identifier);
  3726. }
  3727. };
  3728. var ClassRegistry = class extends Registry {
  3729. constructor() {
  3730. super((c) => c.name);
  3731. this.classToAllowedProps = /* @__PURE__ */ new Map();
  3732. }
  3733. register(value, options) {
  3734. if (typeof options === "object") {
  3735. if (options.allowProps) {
  3736. this.classToAllowedProps.set(value, options.allowProps);
  3737. }
  3738. super.register(value, options.identifier);
  3739. } else {
  3740. super.register(value, options);
  3741. }
  3742. }
  3743. getAllowedProps(value) {
  3744. return this.classToAllowedProps.get(value);
  3745. }
  3746. };
  3747. init_esm_shims2();
  3748. init_esm_shims2();
  3749. function valuesOfObj(record) {
  3750. if ("values" in Object) {
  3751. return Object.values(record);
  3752. }
  3753. const values = [];
  3754. for (const key in record) {
  3755. if (record.hasOwnProperty(key)) {
  3756. values.push(record[key]);
  3757. }
  3758. }
  3759. return values;
  3760. }
  3761. function find(record, predicate) {
  3762. const values = valuesOfObj(record);
  3763. if ("find" in values) {
  3764. return values.find(predicate);
  3765. }
  3766. const valuesNotNever = values;
  3767. for (let i = 0; i < valuesNotNever.length; i++) {
  3768. const value = valuesNotNever[i];
  3769. if (predicate(value)) {
  3770. return value;
  3771. }
  3772. }
  3773. return void 0;
  3774. }
  3775. function forEach(record, run) {
  3776. Object.entries(record).forEach(([key, value]) => run(value, key));
  3777. }
  3778. function includes(arr, value) {
  3779. return arr.indexOf(value) !== -1;
  3780. }
  3781. function findArr(record, predicate) {
  3782. for (let i = 0; i < record.length; i++) {
  3783. const value = record[i];
  3784. if (predicate(value)) {
  3785. return value;
  3786. }
  3787. }
  3788. return void 0;
  3789. }
  3790. var CustomTransformerRegistry = class {
  3791. constructor() {
  3792. this.transfomers = {};
  3793. }
  3794. register(transformer) {
  3795. this.transfomers[transformer.name] = transformer;
  3796. }
  3797. findApplicable(v) {
  3798. return find(this.transfomers, (transformer) => transformer.isApplicable(v));
  3799. }
  3800. findByName(name) {
  3801. return this.transfomers[name];
  3802. }
  3803. };
  3804. init_esm_shims2();
  3805. init_esm_shims2();
  3806. var getType = (payload) => Object.prototype.toString.call(payload).slice(8, -1);
  3807. var isUndefined = (payload) => typeof payload === "undefined";
  3808. var isNull = (payload) => payload === null;
  3809. var isPlainObject2 = (payload) => {
  3810. if (typeof payload !== "object" || payload === null)
  3811. return false;
  3812. if (payload === Object.prototype)
  3813. return false;
  3814. if (Object.getPrototypeOf(payload) === null)
  3815. return true;
  3816. return Object.getPrototypeOf(payload) === Object.prototype;
  3817. };
  3818. var isEmptyObject = (payload) => isPlainObject2(payload) && Object.keys(payload).length === 0;
  3819. var isArray = (payload) => Array.isArray(payload);
  3820. var isString = (payload) => typeof payload === "string";
  3821. var isNumber = (payload) => typeof payload === "number" && !isNaN(payload);
  3822. var isBoolean = (payload) => typeof payload === "boolean";
  3823. var isRegExp = (payload) => payload instanceof RegExp;
  3824. var isMap = (payload) => payload instanceof Map;
  3825. var isSet = (payload) => payload instanceof Set;
  3826. var isSymbol = (payload) => getType(payload) === "Symbol";
  3827. var isDate = (payload) => payload instanceof Date && !isNaN(payload.valueOf());
  3828. var isError = (payload) => payload instanceof Error;
  3829. var isNaNValue = (payload) => typeof payload === "number" && isNaN(payload);
  3830. var isPrimitive2 = (payload) => isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);
  3831. var isBigint = (payload) => typeof payload === "bigint";
  3832. var isInfinite = (payload) => payload === Infinity || payload === -Infinity;
  3833. var isTypedArray = (payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView);
  3834. var isURL = (payload) => payload instanceof URL;
  3835. init_esm_shims2();
  3836. var escapeKey = (key) => key.replace(/\./g, "\\.");
  3837. var stringifyPath = (path) => path.map(String).map(escapeKey).join(".");
  3838. var parsePath = (string) => {
  3839. const result = [];
  3840. let segment = "";
  3841. for (let i = 0; i < string.length; i++) {
  3842. let char = string.charAt(i);
  3843. const isEscapedDot = char === "\\" && string.charAt(i + 1) === ".";
  3844. if (isEscapedDot) {
  3845. segment += ".";
  3846. i++;
  3847. continue;
  3848. }
  3849. const isEndOfSegment = char === ".";
  3850. if (isEndOfSegment) {
  3851. result.push(segment);
  3852. segment = "";
  3853. continue;
  3854. }
  3855. segment += char;
  3856. }
  3857. const lastSegment = segment;
  3858. result.push(lastSegment);
  3859. return result;
  3860. };
  3861. init_esm_shims2();
  3862. function simpleTransformation(isApplicable, annotation, transform, untransform) {
  3863. return {
  3864. isApplicable,
  3865. annotation,
  3866. transform,
  3867. untransform
  3868. };
  3869. }
  3870. var simpleRules = [
  3871. simpleTransformation(isUndefined, "undefined", () => null, () => void 0),
  3872. simpleTransformation(isBigint, "bigint", (v) => v.toString(), (v) => {
  3873. if (typeof BigInt !== "undefined") {
  3874. return BigInt(v);
  3875. }
  3876. console.error("Please add a BigInt polyfill.");
  3877. return v;
  3878. }),
  3879. simpleTransformation(isDate, "Date", (v) => v.toISOString(), (v) => new Date(v)),
  3880. simpleTransformation(isError, "Error", (v, superJson) => {
  3881. const baseError = {
  3882. name: v.name,
  3883. message: v.message
  3884. };
  3885. superJson.allowedErrorProps.forEach((prop) => {
  3886. baseError[prop] = v[prop];
  3887. });
  3888. return baseError;
  3889. }, (v, superJson) => {
  3890. const e = new Error(v.message);
  3891. e.name = v.name;
  3892. e.stack = v.stack;
  3893. superJson.allowedErrorProps.forEach((prop) => {
  3894. e[prop] = v[prop];
  3895. });
  3896. return e;
  3897. }),
  3898. simpleTransformation(isRegExp, "regexp", (v) => "" + v, (regex) => {
  3899. const body = regex.slice(1, regex.lastIndexOf("/"));
  3900. const flags = regex.slice(regex.lastIndexOf("/") + 1);
  3901. return new RegExp(body, flags);
  3902. }),
  3903. simpleTransformation(
  3904. isSet,
  3905. "set",
  3906. // (sets only exist in es6+)
  3907. // eslint-disable-next-line es5/no-es6-methods
  3908. (v) => [...v.values()],
  3909. (v) => new Set(v)
  3910. ),
  3911. simpleTransformation(isMap, "map", (v) => [...v.entries()], (v) => new Map(v)),
  3912. simpleTransformation((v) => isNaNValue(v) || isInfinite(v), "number", (v) => {
  3913. if (isNaNValue(v)) {
  3914. return "NaN";
  3915. }
  3916. if (v > 0) {
  3917. return "Infinity";
  3918. } else {
  3919. return "-Infinity";
  3920. }
  3921. }, Number),
  3922. simpleTransformation((v) => v === 0 && 1 / v === -Infinity, "number", () => {
  3923. return "-0";
  3924. }, Number),
  3925. simpleTransformation(isURL, "URL", (v) => v.toString(), (v) => new URL(v))
  3926. ];
  3927. function compositeTransformation(isApplicable, annotation, transform, untransform) {
  3928. return {
  3929. isApplicable,
  3930. annotation,
  3931. transform,
  3932. untransform
  3933. };
  3934. }
  3935. var symbolRule = compositeTransformation((s, superJson) => {
  3936. if (isSymbol(s)) {
  3937. const isRegistered = !!superJson.symbolRegistry.getIdentifier(s);
  3938. return isRegistered;
  3939. }
  3940. return false;
  3941. }, (s, superJson) => {
  3942. const identifier = superJson.symbolRegistry.getIdentifier(s);
  3943. return ["symbol", identifier];
  3944. }, (v) => v.description, (_, a, superJson) => {
  3945. const value = superJson.symbolRegistry.getValue(a[1]);
  3946. if (!value) {
  3947. throw new Error("Trying to deserialize unknown symbol");
  3948. }
  3949. return value;
  3950. });
  3951. var constructorToName = [
  3952. Int8Array,
  3953. Uint8Array,
  3954. Int16Array,
  3955. Uint16Array,
  3956. Int32Array,
  3957. Uint32Array,
  3958. Float32Array,
  3959. Float64Array,
  3960. Uint8ClampedArray
  3961. ].reduce((obj, ctor) => {
  3962. obj[ctor.name] = ctor;
  3963. return obj;
  3964. }, {});
  3965. var typedArrayRule = compositeTransformation(isTypedArray, (v) => ["typed-array", v.constructor.name], (v) => [...v], (v, a) => {
  3966. const ctor = constructorToName[a[1]];
  3967. if (!ctor) {
  3968. throw new Error("Trying to deserialize unknown typed array");
  3969. }
  3970. return new ctor(v);
  3971. });
  3972. function isInstanceOfRegisteredClass(potentialClass, superJson) {
  3973. if (potentialClass == null ? void 0 : potentialClass.constructor) {
  3974. const isRegistered = !!superJson.classRegistry.getIdentifier(potentialClass.constructor);
  3975. return isRegistered;
  3976. }
  3977. return false;
  3978. }
  3979. var classRule = compositeTransformation(isInstanceOfRegisteredClass, (clazz, superJson) => {
  3980. const identifier = superJson.classRegistry.getIdentifier(clazz.constructor);
  3981. return ["class", identifier];
  3982. }, (clazz, superJson) => {
  3983. const allowedProps = superJson.classRegistry.getAllowedProps(clazz.constructor);
  3984. if (!allowedProps) {
  3985. return { ...clazz };
  3986. }
  3987. const result = {};
  3988. allowedProps.forEach((prop) => {
  3989. result[prop] = clazz[prop];
  3990. });
  3991. return result;
  3992. }, (v, a, superJson) => {
  3993. const clazz = superJson.classRegistry.getValue(a[1]);
  3994. if (!clazz) {
  3995. throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");
  3996. }
  3997. return Object.assign(Object.create(clazz.prototype), v);
  3998. });
  3999. var customRule = compositeTransformation((value, superJson) => {
  4000. return !!superJson.customTransformerRegistry.findApplicable(value);
  4001. }, (value, superJson) => {
  4002. const transformer = superJson.customTransformerRegistry.findApplicable(value);
  4003. return ["custom", transformer.name];
  4004. }, (value, superJson) => {
  4005. const transformer = superJson.customTransformerRegistry.findApplicable(value);
  4006. return transformer.serialize(value);
  4007. }, (v, a, superJson) => {
  4008. const transformer = superJson.customTransformerRegistry.findByName(a[1]);
  4009. if (!transformer) {
  4010. throw new Error("Trying to deserialize unknown custom value");
  4011. }
  4012. return transformer.deserialize(v);
  4013. });
  4014. var compositeRules = [classRule, symbolRule, customRule, typedArrayRule];
  4015. var transformValue = (value, superJson) => {
  4016. const applicableCompositeRule = findArr(compositeRules, (rule) => rule.isApplicable(value, superJson));
  4017. if (applicableCompositeRule) {
  4018. return {
  4019. value: applicableCompositeRule.transform(value, superJson),
  4020. type: applicableCompositeRule.annotation(value, superJson)
  4021. };
  4022. }
  4023. const applicableSimpleRule = findArr(simpleRules, (rule) => rule.isApplicable(value, superJson));
  4024. if (applicableSimpleRule) {
  4025. return {
  4026. value: applicableSimpleRule.transform(value, superJson),
  4027. type: applicableSimpleRule.annotation
  4028. };
  4029. }
  4030. return void 0;
  4031. };
  4032. var simpleRulesByAnnotation = {};
  4033. simpleRules.forEach((rule) => {
  4034. simpleRulesByAnnotation[rule.annotation] = rule;
  4035. });
  4036. var untransformValue = (json, type, superJson) => {
  4037. if (isArray(type)) {
  4038. switch (type[0]) {
  4039. case "symbol":
  4040. return symbolRule.untransform(json, type, superJson);
  4041. case "class":
  4042. return classRule.untransform(json, type, superJson);
  4043. case "custom":
  4044. return customRule.untransform(json, type, superJson);
  4045. case "typed-array":
  4046. return typedArrayRule.untransform(json, type, superJson);
  4047. default:
  4048. throw new Error("Unknown transformation: " + type);
  4049. }
  4050. } else {
  4051. const transformation = simpleRulesByAnnotation[type];
  4052. if (!transformation) {
  4053. throw new Error("Unknown transformation: " + type);
  4054. }
  4055. return transformation.untransform(json, superJson);
  4056. }
  4057. };
  4058. init_esm_shims2();
  4059. var getNthKey = (value, n) => {
  4060. const keys = value.keys();
  4061. while (n > 0) {
  4062. keys.next();
  4063. n--;
  4064. }
  4065. return keys.next().value;
  4066. };
  4067. function validatePath(path) {
  4068. if (includes(path, "__proto__")) {
  4069. throw new Error("__proto__ is not allowed as a property");
  4070. }
  4071. if (includes(path, "prototype")) {
  4072. throw new Error("prototype is not allowed as a property");
  4073. }
  4074. if (includes(path, "constructor")) {
  4075. throw new Error("constructor is not allowed as a property");
  4076. }
  4077. }
  4078. var getDeep = (object, path) => {
  4079. validatePath(path);
  4080. for (let i = 0; i < path.length; i++) {
  4081. const key = path[i];
  4082. if (isSet(object)) {
  4083. object = getNthKey(object, +key);
  4084. } else if (isMap(object)) {
  4085. const row = +key;
  4086. const type = +path[++i] === 0 ? "key" : "value";
  4087. const keyOfRow = getNthKey(object, row);
  4088. switch (type) {
  4089. case "key":
  4090. object = keyOfRow;
  4091. break;
  4092. case "value":
  4093. object = object.get(keyOfRow);
  4094. break;
  4095. }
  4096. } else {
  4097. object = object[key];
  4098. }
  4099. }
  4100. return object;
  4101. };
  4102. var setDeep = (object, path, mapper) => {
  4103. validatePath(path);
  4104. if (path.length === 0) {
  4105. return mapper(object);
  4106. }
  4107. let parent = object;
  4108. for (let i = 0; i < path.length - 1; i++) {
  4109. const key = path[i];
  4110. if (isArray(parent)) {
  4111. const index = +key;
  4112. parent = parent[index];
  4113. } else if (isPlainObject2(parent)) {
  4114. parent = parent[key];
  4115. } else if (isSet(parent)) {
  4116. const row = +key;
  4117. parent = getNthKey(parent, row);
  4118. } else if (isMap(parent)) {
  4119. const isEnd = i === path.length - 2;
  4120. if (isEnd) {
  4121. break;
  4122. }
  4123. const row = +key;
  4124. const type = +path[++i] === 0 ? "key" : "value";
  4125. const keyOfRow = getNthKey(parent, row);
  4126. switch (type) {
  4127. case "key":
  4128. parent = keyOfRow;
  4129. break;
  4130. case "value":
  4131. parent = parent.get(keyOfRow);
  4132. break;
  4133. }
  4134. }
  4135. }
  4136. const lastKey = path[path.length - 1];
  4137. if (isArray(parent)) {
  4138. parent[+lastKey] = mapper(parent[+lastKey]);
  4139. } else if (isPlainObject2(parent)) {
  4140. parent[lastKey] = mapper(parent[lastKey]);
  4141. }
  4142. if (isSet(parent)) {
  4143. const oldValue = getNthKey(parent, +lastKey);
  4144. const newValue = mapper(oldValue);
  4145. if (oldValue !== newValue) {
  4146. parent.delete(oldValue);
  4147. parent.add(newValue);
  4148. }
  4149. }
  4150. if (isMap(parent)) {
  4151. const row = +path[path.length - 2];
  4152. const keyToRow = getNthKey(parent, row);
  4153. const type = +lastKey === 0 ? "key" : "value";
  4154. switch (type) {
  4155. case "key": {
  4156. const newKey = mapper(keyToRow);
  4157. parent.set(newKey, parent.get(keyToRow));
  4158. if (newKey !== keyToRow) {
  4159. parent.delete(keyToRow);
  4160. }
  4161. break;
  4162. }
  4163. case "value": {
  4164. parent.set(keyToRow, mapper(parent.get(keyToRow)));
  4165. break;
  4166. }
  4167. }
  4168. }
  4169. return object;
  4170. };
  4171. function traverse(tree, walker2, origin = []) {
  4172. if (!tree) {
  4173. return;
  4174. }
  4175. if (!isArray(tree)) {
  4176. forEach(tree, (subtree, key) => traverse(subtree, walker2, [...origin, ...parsePath(key)]));
  4177. return;
  4178. }
  4179. const [nodeValue, children] = tree;
  4180. if (children) {
  4181. forEach(children, (child, key) => {
  4182. traverse(child, walker2, [...origin, ...parsePath(key)]);
  4183. });
  4184. }
  4185. walker2(nodeValue, origin);
  4186. }
  4187. function applyValueAnnotations(plain, annotations, superJson) {
  4188. traverse(annotations, (type, path) => {
  4189. plain = setDeep(plain, path, (v) => untransformValue(v, type, superJson));
  4190. });
  4191. return plain;
  4192. }
  4193. function applyReferentialEqualityAnnotations(plain, annotations) {
  4194. function apply(identicalPaths, path) {
  4195. const object = getDeep(plain, parsePath(path));
  4196. identicalPaths.map(parsePath).forEach((identicalObjectPath) => {
  4197. plain = setDeep(plain, identicalObjectPath, () => object);
  4198. });
  4199. }
  4200. if (isArray(annotations)) {
  4201. const [root, other] = annotations;
  4202. root.forEach((identicalPath) => {
  4203. plain = setDeep(plain, parsePath(identicalPath), () => plain);
  4204. });
  4205. if (other) {
  4206. forEach(other, apply);
  4207. }
  4208. } else {
  4209. forEach(annotations, apply);
  4210. }
  4211. return plain;
  4212. }
  4213. var isDeep = (object, superJson) => isPlainObject2(object) || isArray(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson);
  4214. function addIdentity(object, path, identities) {
  4215. const existingSet = identities.get(object);
  4216. if (existingSet) {
  4217. existingSet.push(path);
  4218. } else {
  4219. identities.set(object, [path]);
  4220. }
  4221. }
  4222. function generateReferentialEqualityAnnotations(identitites, dedupe) {
  4223. const result = {};
  4224. let rootEqualityPaths = void 0;
  4225. identitites.forEach((paths) => {
  4226. if (paths.length <= 1) {
  4227. return;
  4228. }
  4229. if (!dedupe) {
  4230. paths = paths.map((path) => path.map(String)).sort((a, b) => a.length - b.length);
  4231. }
  4232. const [representativePath, ...identicalPaths] = paths;
  4233. if (representativePath.length === 0) {
  4234. rootEqualityPaths = identicalPaths.map(stringifyPath);
  4235. } else {
  4236. result[stringifyPath(representativePath)] = identicalPaths.map(stringifyPath);
  4237. }
  4238. });
  4239. if (rootEqualityPaths) {
  4240. if (isEmptyObject(result)) {
  4241. return [rootEqualityPaths];
  4242. } else {
  4243. return [rootEqualityPaths, result];
  4244. }
  4245. } else {
  4246. return isEmptyObject(result) ? void 0 : result;
  4247. }
  4248. }
  4249. var walker = (object, identities, superJson, dedupe, path = [], objectsInThisPath = [], seenObjects = /* @__PURE__ */ new Map()) => {
  4250. var _a25;
  4251. const primitive = isPrimitive2(object);
  4252. if (!primitive) {
  4253. addIdentity(object, path, identities);
  4254. const seen = seenObjects.get(object);
  4255. if (seen) {
  4256. return dedupe ? {
  4257. transformedValue: null
  4258. } : seen;
  4259. }
  4260. }
  4261. if (!isDeep(object, superJson)) {
  4262. const transformed2 = transformValue(object, superJson);
  4263. const result2 = transformed2 ? {
  4264. transformedValue: transformed2.value,
  4265. annotations: [transformed2.type]
  4266. } : {
  4267. transformedValue: object
  4268. };
  4269. if (!primitive) {
  4270. seenObjects.set(object, result2);
  4271. }
  4272. return result2;
  4273. }
  4274. if (includes(objectsInThisPath, object)) {
  4275. return {
  4276. transformedValue: null
  4277. };
  4278. }
  4279. const transformationResult = transformValue(object, superJson);
  4280. const transformed = (_a25 = transformationResult == null ? void 0 : transformationResult.value) != null ? _a25 : object;
  4281. const transformedValue = isArray(transformed) ? [] : {};
  4282. const innerAnnotations = {};
  4283. forEach(transformed, (value, index) => {
  4284. if (index === "__proto__" || index === "constructor" || index === "prototype") {
  4285. throw new Error(`Detected property ${index}. This is a prototype pollution risk, please remove it from your object.`);
  4286. }
  4287. const recursiveResult = walker(value, identities, superJson, dedupe, [...path, index], [...objectsInThisPath, object], seenObjects);
  4288. transformedValue[index] = recursiveResult.transformedValue;
  4289. if (isArray(recursiveResult.annotations)) {
  4290. innerAnnotations[index] = recursiveResult.annotations;
  4291. } else if (isPlainObject2(recursiveResult.annotations)) {
  4292. forEach(recursiveResult.annotations, (tree, key) => {
  4293. innerAnnotations[escapeKey(index) + "." + key] = tree;
  4294. });
  4295. }
  4296. });
  4297. const result = isEmptyObject(innerAnnotations) ? {
  4298. transformedValue,
  4299. annotations: !!transformationResult ? [transformationResult.type] : void 0
  4300. } : {
  4301. transformedValue,
  4302. annotations: !!transformationResult ? [transformationResult.type, innerAnnotations] : innerAnnotations
  4303. };
  4304. if (!primitive) {
  4305. seenObjects.set(object, result);
  4306. }
  4307. return result;
  4308. };
  4309. init_esm_shims2();
  4310. init_esm_shims2();
  4311. function getType2(payload) {
  4312. return Object.prototype.toString.call(payload).slice(8, -1);
  4313. }
  4314. function isArray2(payload) {
  4315. return getType2(payload) === "Array";
  4316. }
  4317. function isPlainObject3(payload) {
  4318. if (getType2(payload) !== "Object")
  4319. return false;
  4320. const prototype = Object.getPrototypeOf(payload);
  4321. return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
  4322. }
  4323. function isNull2(payload) {
  4324. return getType2(payload) === "Null";
  4325. }
  4326. function isOneOf(a, b, c, d, e) {
  4327. return (value) => a(value) || b(value) || !!c && c(value) || !!d && d(value) || !!e && e(value);
  4328. }
  4329. function isUndefined2(payload) {
  4330. return getType2(payload) === "Undefined";
  4331. }
  4332. var isNullOrUndefined = isOneOf(isNull2, isUndefined2);
  4333. function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
  4334. const propType = {}.propertyIsEnumerable.call(originalObject, key) ? "enumerable" : "nonenumerable";
  4335. if (propType === "enumerable")
  4336. carry[key] = newVal;
  4337. if (includeNonenumerable && propType === "nonenumerable") {
  4338. Object.defineProperty(carry, key, {
  4339. value: newVal,
  4340. enumerable: false,
  4341. writable: true,
  4342. configurable: true
  4343. });
  4344. }
  4345. }
  4346. function copy(target22, options = {}) {
  4347. if (isArray2(target22)) {
  4348. return target22.map((item) => copy(item, options));
  4349. }
  4350. if (!isPlainObject3(target22)) {
  4351. return target22;
  4352. }
  4353. const props = Object.getOwnPropertyNames(target22);
  4354. const symbols = Object.getOwnPropertySymbols(target22);
  4355. return [...props, ...symbols].reduce((carry, key) => {
  4356. if (isArray2(options.props) && !options.props.includes(key)) {
  4357. return carry;
  4358. }
  4359. const val = target22[key];
  4360. const newVal = copy(val, options);
  4361. assignProp(carry, key, newVal, target22, options.nonenumerable);
  4362. return carry;
  4363. }, {});
  4364. }
  4365. var SuperJSON = class {
  4366. /**
  4367. * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
  4368. */
  4369. constructor({ dedupe = false } = {}) {
  4370. this.classRegistry = new ClassRegistry();
  4371. this.symbolRegistry = new Registry((s) => {
  4372. var _a25;
  4373. return (_a25 = s.description) != null ? _a25 : "";
  4374. });
  4375. this.customTransformerRegistry = new CustomTransformerRegistry();
  4376. this.allowedErrorProps = [];
  4377. this.dedupe = dedupe;
  4378. }
  4379. serialize(object) {
  4380. const identities = /* @__PURE__ */ new Map();
  4381. const output = walker(object, identities, this, this.dedupe);
  4382. const res = {
  4383. json: output.transformedValue
  4384. };
  4385. if (output.annotations) {
  4386. res.meta = {
  4387. ...res.meta,
  4388. values: output.annotations
  4389. };
  4390. }
  4391. const equalityAnnotations = generateReferentialEqualityAnnotations(identities, this.dedupe);
  4392. if (equalityAnnotations) {
  4393. res.meta = {
  4394. ...res.meta,
  4395. referentialEqualities: equalityAnnotations
  4396. };
  4397. }
  4398. return res;
  4399. }
  4400. deserialize(payload) {
  4401. const { json, meta } = payload;
  4402. let result = copy(json);
  4403. if (meta == null ? void 0 : meta.values) {
  4404. result = applyValueAnnotations(result, meta.values, this);
  4405. }
  4406. if (meta == null ? void 0 : meta.referentialEqualities) {
  4407. result = applyReferentialEqualityAnnotations(result, meta.referentialEqualities);
  4408. }
  4409. return result;
  4410. }
  4411. stringify(object) {
  4412. return JSON.stringify(this.serialize(object));
  4413. }
  4414. parse(string) {
  4415. return this.deserialize(JSON.parse(string));
  4416. }
  4417. registerClass(v, options) {
  4418. this.classRegistry.register(v, options);
  4419. }
  4420. registerSymbol(v, identifier) {
  4421. this.symbolRegistry.register(v, identifier);
  4422. }
  4423. registerCustom(transformer, name) {
  4424. this.customTransformerRegistry.register({
  4425. name,
  4426. ...transformer
  4427. });
  4428. }
  4429. allowErrorProps(...props) {
  4430. this.allowedErrorProps.push(...props);
  4431. }
  4432. };
  4433. SuperJSON.defaultInstance = new SuperJSON();
  4434. SuperJSON.serialize = SuperJSON.defaultInstance.serialize.bind(SuperJSON.defaultInstance);
  4435. SuperJSON.deserialize = SuperJSON.defaultInstance.deserialize.bind(SuperJSON.defaultInstance);
  4436. SuperJSON.stringify = SuperJSON.defaultInstance.stringify.bind(SuperJSON.defaultInstance);
  4437. SuperJSON.parse = SuperJSON.defaultInstance.parse.bind(SuperJSON.defaultInstance);
  4438. SuperJSON.registerClass = SuperJSON.defaultInstance.registerClass.bind(SuperJSON.defaultInstance);
  4439. SuperJSON.registerSymbol = SuperJSON.defaultInstance.registerSymbol.bind(SuperJSON.defaultInstance);
  4440. SuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJSON.defaultInstance);
  4441. SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);
  4442. var serialize = SuperJSON.serialize;
  4443. var deserialize = SuperJSON.deserialize;
  4444. var stringify = SuperJSON.stringify;
  4445. var parse = SuperJSON.parse;
  4446. var registerClass = SuperJSON.registerClass;
  4447. var registerCustom = SuperJSON.registerCustom;
  4448. var registerSymbol = SuperJSON.registerSymbol;
  4449. var allowErrorProps = SuperJSON.allowErrorProps;
  4450. init_esm_shims2();
  4451. init_esm_shims2();
  4452. init_esm_shims2();
  4453. init_esm_shims2();
  4454. init_esm_shims2();
  4455. init_esm_shims2();
  4456. init_esm_shims2();
  4457. init_esm_shims2();
  4458. init_esm_shims2();
  4459. init_esm_shims2();
  4460. init_esm_shims2();
  4461. init_esm_shims2();
  4462. init_esm_shims2();
  4463. init_esm_shims2();
  4464. init_esm_shims2();
  4465. init_esm_shims2();
  4466. init_esm_shims2();
  4467. init_esm_shims2();
  4468. init_esm_shims2();
  4469. init_esm_shims2();
  4470. init_esm_shims2();
  4471. init_esm_shims2();
  4472. init_esm_shims2();
  4473. var _a19;
  4474. var _b19;
  4475. (_b19 = (_a19 = target).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__) != null ? _b19 : _a19.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__ = [];
  4476. var _a20;
  4477. var _b20;
  4478. (_b20 = (_a20 = target).__VUE_DEVTOOLS_KIT_RPC_CLIENT__) != null ? _b20 : _a20.__VUE_DEVTOOLS_KIT_RPC_CLIENT__ = null;
  4479. var _a21;
  4480. var _b21;
  4481. (_b21 = (_a21 = target).__VUE_DEVTOOLS_KIT_RPC_SERVER__) != null ? _b21 : _a21.__VUE_DEVTOOLS_KIT_RPC_SERVER__ = null;
  4482. var _a222;
  4483. var _b22;
  4484. (_b22 = (_a222 = target).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__) != null ? _b22 : _a222.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__ = null;
  4485. var _a23;
  4486. var _b23;
  4487. (_b23 = (_a23 = target).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__) != null ? _b23 : _a23.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__ = null;
  4488. var _a24;
  4489. var _b24;
  4490. (_b24 = (_a24 = target).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__) != null ? _b24 : _a24.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__ = null;
  4491. init_esm_shims2();
  4492. init_esm_shims2();
  4493. init_esm_shims2();
  4494. init_esm_shims2();
  4495. init_esm_shims2();
  4496. init_esm_shims2();
  4497. init_esm_shims2();
  4498. var MAX_SERIALIZED_SIZE = 2 * 1024 * 1024;
  4499. export {
  4500. addCustomCommand,
  4501. addCustomTab,
  4502. onDevToolsClientConnected,
  4503. onDevToolsConnected,
  4504. removeCustomCommand,
  4505. setupDevToolsPlugin,
  4506. setupDevToolsPlugin as setupDevtoolsPlugin
  4507. };
  4508. //# sourceMappingURL=vitepress___@vue_devtools-api.js.map