pinia.js 173 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908
  1. import {
  2. computed,
  3. effectScope,
  4. getCurrentInstance,
  5. getCurrentScope,
  6. hasInjectionContext,
  7. inject,
  8. isReactive,
  9. isRef,
  10. markRaw,
  11. nextTick,
  12. onScopeDispose,
  13. reactive,
  14. ref,
  15. toRaw,
  16. toRef,
  17. toRefs,
  18. unref,
  19. watch
  20. } from "./chunk-ZIOJWR6J.js";
  21. // node_modules/@vue/devtools-shared/dist/index.js
  22. var __create = Object.create;
  23. var __defProp = Object.defineProperty;
  24. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  25. var __getOwnPropNames = Object.getOwnPropertyNames;
  26. var __getProtoOf = Object.getPrototypeOf;
  27. var __hasOwnProp = Object.prototype.hasOwnProperty;
  28. var __esm = (fn, res) => function __init() {
  29. return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
  30. };
  31. var __commonJS = (cb, mod) => function __require() {
  32. return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  33. };
  34. var __copyProps = (to, from, except, desc) => {
  35. if (from && typeof from === "object" || typeof from === "function") {
  36. for (let key of __getOwnPropNames(from))
  37. if (!__hasOwnProp.call(to, key) && key !== except)
  38. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  39. }
  40. return to;
  41. };
  42. var __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  43. // If the importer is in node compatibility mode or this is not an ESM
  44. // file that has been converted to a CommonJS file using a Babel-
  45. // compatible transform (i.e. "__esModule" has not been set), then set
  46. // "default" to the CommonJS "module.exports" for node compatibility.
  47. isNodeMode || !mod || !mod.__esModule ? __defProp(target2, "default", { value: mod, enumerable: true }) : target2,
  48. mod
  49. ));
  50. var init_esm_shims = __esm({
  51. "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"() {
  52. "use strict";
  53. }
  54. });
  55. var require_rfdc = __commonJS({
  56. "../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(exports, module) {
  57. "use strict";
  58. init_esm_shims();
  59. module.exports = rfdc2;
  60. function copyBuffer(cur) {
  61. if (cur instanceof Buffer) {
  62. return Buffer.from(cur);
  63. }
  64. return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length);
  65. }
  66. function rfdc2(opts) {
  67. opts = opts || {};
  68. if (opts.circles)
  69. return rfdcCircles(opts);
  70. const constructorHandlers = /* @__PURE__ */ new Map();
  71. constructorHandlers.set(Date, (o) => new Date(o));
  72. constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
  73. constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
  74. if (opts.constructorHandlers) {
  75. for (const handler2 of opts.constructorHandlers) {
  76. constructorHandlers.set(handler2[0], handler2[1]);
  77. }
  78. }
  79. let handler = null;
  80. return opts.proto ? cloneProto : clone;
  81. function cloneArray(a, fn) {
  82. const keys = Object.keys(a);
  83. const a2 = new Array(keys.length);
  84. for (let i = 0; i < keys.length; i++) {
  85. const k = keys[i];
  86. const cur = a[k];
  87. if (typeof cur !== "object" || cur === null) {
  88. a2[k] = cur;
  89. } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
  90. a2[k] = handler(cur, fn);
  91. } else if (ArrayBuffer.isView(cur)) {
  92. a2[k] = copyBuffer(cur);
  93. } else {
  94. a2[k] = fn(cur);
  95. }
  96. }
  97. return a2;
  98. }
  99. function clone(o) {
  100. if (typeof o !== "object" || o === null)
  101. return o;
  102. if (Array.isArray(o))
  103. return cloneArray(o, clone);
  104. if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
  105. return handler(o, clone);
  106. }
  107. const o2 = {};
  108. for (const k in o) {
  109. if (Object.hasOwnProperty.call(o, k) === false)
  110. continue;
  111. const cur = o[k];
  112. if (typeof cur !== "object" || cur === null) {
  113. o2[k] = cur;
  114. } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
  115. o2[k] = handler(cur, clone);
  116. } else if (ArrayBuffer.isView(cur)) {
  117. o2[k] = copyBuffer(cur);
  118. } else {
  119. o2[k] = clone(cur);
  120. }
  121. }
  122. return o2;
  123. }
  124. function cloneProto(o) {
  125. if (typeof o !== "object" || o === null)
  126. return o;
  127. if (Array.isArray(o))
  128. return cloneArray(o, cloneProto);
  129. if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
  130. return handler(o, cloneProto);
  131. }
  132. const o2 = {};
  133. for (const k in o) {
  134. const cur = o[k];
  135. if (typeof cur !== "object" || cur === null) {
  136. o2[k] = cur;
  137. } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
  138. o2[k] = handler(cur, cloneProto);
  139. } else if (ArrayBuffer.isView(cur)) {
  140. o2[k] = copyBuffer(cur);
  141. } else {
  142. o2[k] = cloneProto(cur);
  143. }
  144. }
  145. return o2;
  146. }
  147. }
  148. function rfdcCircles(opts) {
  149. const refs = [];
  150. const refsNew = [];
  151. const constructorHandlers = /* @__PURE__ */ new Map();
  152. constructorHandlers.set(Date, (o) => new Date(o));
  153. constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
  154. constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
  155. if (opts.constructorHandlers) {
  156. for (const handler2 of opts.constructorHandlers) {
  157. constructorHandlers.set(handler2[0], handler2[1]);
  158. }
  159. }
  160. let handler = null;
  161. return opts.proto ? cloneProto : clone;
  162. function cloneArray(a, fn) {
  163. const keys = Object.keys(a);
  164. const a2 = new Array(keys.length);
  165. for (let i = 0; i < keys.length; i++) {
  166. const k = keys[i];
  167. const cur = a[k];
  168. if (typeof cur !== "object" || cur === null) {
  169. a2[k] = cur;
  170. } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
  171. a2[k] = handler(cur, fn);
  172. } else if (ArrayBuffer.isView(cur)) {
  173. a2[k] = copyBuffer(cur);
  174. } else {
  175. const index = refs.indexOf(cur);
  176. if (index !== -1) {
  177. a2[k] = refsNew[index];
  178. } else {
  179. a2[k] = fn(cur);
  180. }
  181. }
  182. }
  183. return a2;
  184. }
  185. function clone(o) {
  186. if (typeof o !== "object" || o === null)
  187. return o;
  188. if (Array.isArray(o))
  189. return cloneArray(o, clone);
  190. if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
  191. return handler(o, clone);
  192. }
  193. const o2 = {};
  194. refs.push(o);
  195. refsNew.push(o2);
  196. for (const k in o) {
  197. if (Object.hasOwnProperty.call(o, k) === false)
  198. continue;
  199. const cur = o[k];
  200. if (typeof cur !== "object" || cur === null) {
  201. o2[k] = cur;
  202. } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
  203. o2[k] = handler(cur, clone);
  204. } else if (ArrayBuffer.isView(cur)) {
  205. o2[k] = copyBuffer(cur);
  206. } else {
  207. const i = refs.indexOf(cur);
  208. if (i !== -1) {
  209. o2[k] = refsNew[i];
  210. } else {
  211. o2[k] = clone(cur);
  212. }
  213. }
  214. }
  215. refs.pop();
  216. refsNew.pop();
  217. return o2;
  218. }
  219. function cloneProto(o) {
  220. if (typeof o !== "object" || o === null)
  221. return o;
  222. if (Array.isArray(o))
  223. return cloneArray(o, cloneProto);
  224. if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
  225. return handler(o, cloneProto);
  226. }
  227. const o2 = {};
  228. refs.push(o);
  229. refsNew.push(o2);
  230. for (const k in o) {
  231. const cur = o[k];
  232. if (typeof cur !== "object" || cur === null) {
  233. o2[k] = cur;
  234. } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
  235. o2[k] = handler(cur, cloneProto);
  236. } else if (ArrayBuffer.isView(cur)) {
  237. o2[k] = copyBuffer(cur);
  238. } else {
  239. const i = refs.indexOf(cur);
  240. if (i !== -1) {
  241. o2[k] = refsNew[i];
  242. } else {
  243. o2[k] = cloneProto(cur);
  244. }
  245. }
  246. }
  247. refs.pop();
  248. refsNew.pop();
  249. return o2;
  250. }
  251. }
  252. }
  253. });
  254. init_esm_shims();
  255. init_esm_shims();
  256. init_esm_shims();
  257. var isBrowser = typeof navigator !== "undefined";
  258. var target = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : {};
  259. var isInChromePanel = typeof target.chrome !== "undefined" && !!target.chrome.devtools;
  260. var isInIframe = isBrowser && target.self !== target.top;
  261. var _a;
  262. var isInElectron = typeof navigator !== "undefined" && ((_a = navigator.userAgent) == null ? void 0 : _a.toLowerCase().includes("electron"));
  263. var isNuxtApp = typeof window !== "undefined" && !!window.__NUXT__;
  264. init_esm_shims();
  265. var import_rfdc = __toESM(require_rfdc(), 1);
  266. var classifyRE = /(?:^|[-_/])(\w)/g;
  267. function toUpper(_, c) {
  268. return c ? c.toUpperCase() : "";
  269. }
  270. function classify(str) {
  271. return str && `${str}`.replace(classifyRE, toUpper);
  272. }
  273. function basename(filename, ext) {
  274. let normalizedFilename = filename.replace(/^[a-z]:/i, "").replace(/\\/g, "/");
  275. if (normalizedFilename.endsWith(`index${ext}`)) {
  276. normalizedFilename = normalizedFilename.replace(`/index${ext}`, ext);
  277. }
  278. const lastSlashIndex = normalizedFilename.lastIndexOf("/");
  279. const baseNameWithExt = normalizedFilename.substring(lastSlashIndex + 1);
  280. if (ext) {
  281. const extIndex = baseNameWithExt.lastIndexOf(ext);
  282. return baseNameWithExt.substring(0, extIndex);
  283. }
  284. return "";
  285. }
  286. var deepClone = (0, import_rfdc.default)({ circles: true });
  287. // node_modules/perfect-debounce/dist/index.mjs
  288. var DEBOUNCE_DEFAULTS = {
  289. trailing: true
  290. };
  291. function debounce(fn, wait = 25, options = {}) {
  292. options = { ...DEBOUNCE_DEFAULTS, ...options };
  293. if (!Number.isFinite(wait)) {
  294. throw new TypeError("Expected `wait` to be a finite number");
  295. }
  296. let leadingValue;
  297. let timeout;
  298. let resolveList = [];
  299. let currentPromise;
  300. let trailingArgs;
  301. const applyFn = (_this, args) => {
  302. currentPromise = _applyPromised(fn, _this, args);
  303. currentPromise.finally(() => {
  304. currentPromise = null;
  305. if (options.trailing && trailingArgs && !timeout) {
  306. const promise = applyFn(_this, trailingArgs);
  307. trailingArgs = null;
  308. return promise;
  309. }
  310. });
  311. return currentPromise;
  312. };
  313. return function(...args) {
  314. if (currentPromise) {
  315. if (options.trailing) {
  316. trailingArgs = args;
  317. }
  318. return currentPromise;
  319. }
  320. return new Promise((resolve) => {
  321. const shouldCallNow = !timeout && options.leading;
  322. clearTimeout(timeout);
  323. timeout = setTimeout(() => {
  324. timeout = null;
  325. const promise = options.leading ? leadingValue : applyFn(this, args);
  326. for (const _resolve of resolveList) {
  327. _resolve(promise);
  328. }
  329. resolveList = [];
  330. }, wait);
  331. if (shouldCallNow) {
  332. leadingValue = applyFn(this, args);
  333. resolve(leadingValue);
  334. } else {
  335. resolveList.push(resolve);
  336. }
  337. });
  338. };
  339. }
  340. async function _applyPromised(fn, _this, args) {
  341. return await fn.apply(_this, args);
  342. }
  343. // node_modules/hookable/dist/index.mjs
  344. function flatHooks(configHooks, hooks2 = {}, parentName) {
  345. for (const key in configHooks) {
  346. const subHook = configHooks[key];
  347. const name = parentName ? `${parentName}:${key}` : key;
  348. if (typeof subHook === "object" && subHook !== null) {
  349. flatHooks(subHook, hooks2, name);
  350. } else if (typeof subHook === "function") {
  351. hooks2[name] = subHook;
  352. }
  353. }
  354. return hooks2;
  355. }
  356. var defaultTask = { run: (function_) => function_() };
  357. var _createTask = () => defaultTask;
  358. var createTask = typeof console.createTask !== "undefined" ? console.createTask : _createTask;
  359. function serialTaskCaller(hooks2, args) {
  360. const name = args.shift();
  361. const task = createTask(name);
  362. return hooks2.reduce(
  363. (promise, hookFunction) => promise.then(() => task.run(() => hookFunction(...args))),
  364. Promise.resolve()
  365. );
  366. }
  367. function parallelTaskCaller(hooks2, args) {
  368. const name = args.shift();
  369. const task = createTask(name);
  370. return Promise.all(hooks2.map((hook2) => task.run(() => hook2(...args))));
  371. }
  372. function callEachWith(callbacks, arg0) {
  373. for (const callback of [...callbacks]) {
  374. callback(arg0);
  375. }
  376. }
  377. var Hookable = class {
  378. constructor() {
  379. this._hooks = {};
  380. this._before = void 0;
  381. this._after = void 0;
  382. this._deprecatedMessages = void 0;
  383. this._deprecatedHooks = {};
  384. this.hook = this.hook.bind(this);
  385. this.callHook = this.callHook.bind(this);
  386. this.callHookWith = this.callHookWith.bind(this);
  387. }
  388. hook(name, function_, options = {}) {
  389. if (!name || typeof function_ !== "function") {
  390. return () => {
  391. };
  392. }
  393. const originalName = name;
  394. let dep;
  395. while (this._deprecatedHooks[name]) {
  396. dep = this._deprecatedHooks[name];
  397. name = dep.to;
  398. }
  399. if (dep && !options.allowDeprecated) {
  400. let message = dep.message;
  401. if (!message) {
  402. message = `${originalName} hook has been deprecated` + (dep.to ? `, please use ${dep.to}` : "");
  403. }
  404. if (!this._deprecatedMessages) {
  405. this._deprecatedMessages = /* @__PURE__ */ new Set();
  406. }
  407. if (!this._deprecatedMessages.has(message)) {
  408. console.warn(message);
  409. this._deprecatedMessages.add(message);
  410. }
  411. }
  412. if (!function_.name) {
  413. try {
  414. Object.defineProperty(function_, "name", {
  415. get: () => "_" + name.replace(/\W+/g, "_") + "_hook_cb",
  416. configurable: true
  417. });
  418. } catch {
  419. }
  420. }
  421. this._hooks[name] = this._hooks[name] || [];
  422. this._hooks[name].push(function_);
  423. return () => {
  424. if (function_) {
  425. this.removeHook(name, function_);
  426. function_ = void 0;
  427. }
  428. };
  429. }
  430. hookOnce(name, function_) {
  431. let _unreg;
  432. let _function = (...arguments_) => {
  433. if (typeof _unreg === "function") {
  434. _unreg();
  435. }
  436. _unreg = void 0;
  437. _function = void 0;
  438. return function_(...arguments_);
  439. };
  440. _unreg = this.hook(name, _function);
  441. return _unreg;
  442. }
  443. removeHook(name, function_) {
  444. if (this._hooks[name]) {
  445. const index = this._hooks[name].indexOf(function_);
  446. if (index !== -1) {
  447. this._hooks[name].splice(index, 1);
  448. }
  449. if (this._hooks[name].length === 0) {
  450. delete this._hooks[name];
  451. }
  452. }
  453. }
  454. deprecateHook(name, deprecated) {
  455. this._deprecatedHooks[name] = typeof deprecated === "string" ? { to: deprecated } : deprecated;
  456. const _hooks = this._hooks[name] || [];
  457. delete this._hooks[name];
  458. for (const hook2 of _hooks) {
  459. this.hook(name, hook2);
  460. }
  461. }
  462. deprecateHooks(deprecatedHooks) {
  463. Object.assign(this._deprecatedHooks, deprecatedHooks);
  464. for (const name in deprecatedHooks) {
  465. this.deprecateHook(name, deprecatedHooks[name]);
  466. }
  467. }
  468. addHooks(configHooks) {
  469. const hooks2 = flatHooks(configHooks);
  470. const removeFns = Object.keys(hooks2).map(
  471. (key) => this.hook(key, hooks2[key])
  472. );
  473. return () => {
  474. for (const unreg of removeFns.splice(0, removeFns.length)) {
  475. unreg();
  476. }
  477. };
  478. }
  479. removeHooks(configHooks) {
  480. const hooks2 = flatHooks(configHooks);
  481. for (const key in hooks2) {
  482. this.removeHook(key, hooks2[key]);
  483. }
  484. }
  485. removeAllHooks() {
  486. for (const key in this._hooks) {
  487. delete this._hooks[key];
  488. }
  489. }
  490. callHook(name, ...arguments_) {
  491. arguments_.unshift(name);
  492. return this.callHookWith(serialTaskCaller, name, ...arguments_);
  493. }
  494. callHookParallel(name, ...arguments_) {
  495. arguments_.unshift(name);
  496. return this.callHookWith(parallelTaskCaller, name, ...arguments_);
  497. }
  498. callHookWith(caller, name, ...arguments_) {
  499. const event = this._before || this._after ? { name, args: arguments_, context: {} } : void 0;
  500. if (this._before) {
  501. callEachWith(this._before, event);
  502. }
  503. const result = caller(
  504. name in this._hooks ? [...this._hooks[name]] : [],
  505. arguments_
  506. );
  507. if (result instanceof Promise) {
  508. return result.finally(() => {
  509. if (this._after && event) {
  510. callEachWith(this._after, event);
  511. }
  512. });
  513. }
  514. if (this._after && event) {
  515. callEachWith(this._after, event);
  516. }
  517. return result;
  518. }
  519. beforeEach(function_) {
  520. this._before = this._before || [];
  521. this._before.push(function_);
  522. return () => {
  523. if (this._before !== void 0) {
  524. const index = this._before.indexOf(function_);
  525. if (index !== -1) {
  526. this._before.splice(index, 1);
  527. }
  528. }
  529. };
  530. }
  531. afterEach(function_) {
  532. this._after = this._after || [];
  533. this._after.push(function_);
  534. return () => {
  535. if (this._after !== void 0) {
  536. const index = this._after.indexOf(function_);
  537. if (index !== -1) {
  538. this._after.splice(index, 1);
  539. }
  540. }
  541. };
  542. }
  543. };
  544. function createHooks() {
  545. return new Hookable();
  546. }
  547. // node_modules/birpc/dist/index.mjs
  548. var { clearTimeout: clearTimeout2, setTimeout: setTimeout2 } = globalThis;
  549. var random = Math.random.bind(Math);
  550. // node_modules/@vue/devtools-kit/dist/index.js
  551. var __create2 = Object.create;
  552. var __defProp2 = Object.defineProperty;
  553. var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
  554. var __getOwnPropNames2 = Object.getOwnPropertyNames;
  555. var __getProtoOf2 = Object.getPrototypeOf;
  556. var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  557. var __esm2 = (fn, res) => function __init() {
  558. return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res;
  559. };
  560. var __commonJS2 = (cb, mod) => function __require() {
  561. return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  562. };
  563. var __copyProps2 = (to, from, except, desc) => {
  564. if (from && typeof from === "object" || typeof from === "function") {
  565. for (let key of __getOwnPropNames2(from))
  566. if (!__hasOwnProp2.call(to, key) && key !== except)
  567. __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
  568. }
  569. return to;
  570. };
  571. var __toESM2 = (mod, isNodeMode, target22) => (target22 = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
  572. // If the importer is in node compatibility mode or this is not an ESM
  573. // file that has been converted to a CommonJS file using a Babel-
  574. // compatible transform (i.e. "__esModule" has not been set), then set
  575. // "default" to the CommonJS "module.exports" for node compatibility.
  576. isNodeMode || !mod || !mod.__esModule ? __defProp2(target22, "default", { value: mod, enumerable: true }) : target22,
  577. mod
  578. ));
  579. var init_esm_shims2 = __esm2({
  580. "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"() {
  581. "use strict";
  582. }
  583. });
  584. var require_speakingurl = __commonJS2({
  585. "../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(exports, module) {
  586. "use strict";
  587. init_esm_shims2();
  588. (function(root) {
  589. "use strict";
  590. var charMap = {
  591. // latin
  592. "À": "A",
  593. "Á": "A",
  594. "Â": "A",
  595. "Ã": "A",
  596. "Ä": "Ae",
  597. "Å": "A",
  598. "Æ": "AE",
  599. "Ç": "C",
  600. "È": "E",
  601. "É": "E",
  602. "Ê": "E",
  603. "Ë": "E",
  604. "Ì": "I",
  605. "Í": "I",
  606. "Î": "I",
  607. "Ï": "I",
  608. "Ð": "D",
  609. "Ñ": "N",
  610. "Ò": "O",
  611. "Ó": "O",
  612. "Ô": "O",
  613. "Õ": "O",
  614. "Ö": "Oe",
  615. "Ő": "O",
  616. "Ø": "O",
  617. "Ù": "U",
  618. "Ú": "U",
  619. "Û": "U",
  620. "Ü": "Ue",
  621. "Ű": "U",
  622. "Ý": "Y",
  623. "Þ": "TH",
  624. "ß": "ss",
  625. "à": "a",
  626. "á": "a",
  627. "â": "a",
  628. "ã": "a",
  629. "ä": "ae",
  630. "å": "a",
  631. "æ": "ae",
  632. "ç": "c",
  633. "è": "e",
  634. "é": "e",
  635. "ê": "e",
  636. "ë": "e",
  637. "ì": "i",
  638. "í": "i",
  639. "î": "i",
  640. "ï": "i",
  641. "ð": "d",
  642. "ñ": "n",
  643. "ò": "o",
  644. "ó": "o",
  645. "ô": "o",
  646. "õ": "o",
  647. "ö": "oe",
  648. "ő": "o",
  649. "ø": "o",
  650. "ù": "u",
  651. "ú": "u",
  652. "û": "u",
  653. "ü": "ue",
  654. "ű": "u",
  655. "ý": "y",
  656. "þ": "th",
  657. "ÿ": "y",
  658. "ẞ": "SS",
  659. // language specific
  660. // Arabic
  661. "ا": "a",
  662. "أ": "a",
  663. "إ": "i",
  664. "آ": "aa",
  665. "ؤ": "u",
  666. "ئ": "e",
  667. "ء": "a",
  668. "ب": "b",
  669. "ت": "t",
  670. "ث": "th",
  671. "ج": "j",
  672. "ح": "h",
  673. "خ": "kh",
  674. "د": "d",
  675. "ذ": "th",
  676. "ر": "r",
  677. "ز": "z",
  678. "س": "s",
  679. "ش": "sh",
  680. "ص": "s",
  681. "ض": "dh",
  682. "ط": "t",
  683. "ظ": "z",
  684. "ع": "a",
  685. "غ": "gh",
  686. "ف": "f",
  687. "ق": "q",
  688. "ك": "k",
  689. "ل": "l",
  690. "م": "m",
  691. "ن": "n",
  692. "ه": "h",
  693. "و": "w",
  694. "ي": "y",
  695. "ى": "a",
  696. "ة": "h",
  697. "ﻻ": "la",
  698. "ﻷ": "laa",
  699. "ﻹ": "lai",
  700. "ﻵ": "laa",
  701. // Persian additional characters than Arabic
  702. "گ": "g",
  703. "چ": "ch",
  704. "پ": "p",
  705. "ژ": "zh",
  706. "ک": "k",
  707. "ی": "y",
  708. // Arabic diactrics
  709. "َ": "a",
  710. "ً": "an",
  711. "ِ": "e",
  712. "ٍ": "en",
  713. "ُ": "u",
  714. "ٌ": "on",
  715. "ْ": "",
  716. // Arabic numbers
  717. "٠": "0",
  718. "١": "1",
  719. "٢": "2",
  720. "٣": "3",
  721. "٤": "4",
  722. "٥": "5",
  723. "٦": "6",
  724. "٧": "7",
  725. "٨": "8",
  726. "٩": "9",
  727. // Persian numbers
  728. "۰": "0",
  729. "۱": "1",
  730. "۲": "2",
  731. "۳": "3",
  732. "۴": "4",
  733. "۵": "5",
  734. "۶": "6",
  735. "۷": "7",
  736. "۸": "8",
  737. "۹": "9",
  738. // Burmese consonants
  739. "က": "k",
  740. "ခ": "kh",
  741. "ဂ": "g",
  742. "ဃ": "ga",
  743. "င": "ng",
  744. "စ": "s",
  745. "ဆ": "sa",
  746. "ဇ": "z",
  747. "စျ": "za",
  748. "ည": "ny",
  749. "ဋ": "t",
  750. "ဌ": "ta",
  751. "ဍ": "d",
  752. "ဎ": "da",
  753. "ဏ": "na",
  754. "တ": "t",
  755. "ထ": "ta",
  756. "ဒ": "d",
  757. "ဓ": "da",
  758. "န": "n",
  759. "ပ": "p",
  760. "ဖ": "pa",
  761. "ဗ": "b",
  762. "ဘ": "ba",
  763. "မ": "m",
  764. "ယ": "y",
  765. "ရ": "ya",
  766. "လ": "l",
  767. "ဝ": "w",
  768. "သ": "th",
  769. "ဟ": "h",
  770. "ဠ": "la",
  771. "အ": "a",
  772. // consonant character combos
  773. "ြ": "y",
  774. "ျ": "ya",
  775. "ွ": "w",
  776. "ြွ": "yw",
  777. "ျွ": "ywa",
  778. "ှ": "h",
  779. // independent vowels
  780. "ဧ": "e",
  781. "၏": "-e",
  782. "ဣ": "i",
  783. "ဤ": "-i",
  784. "ဉ": "u",
  785. "ဦ": "-u",
  786. "ဩ": "aw",
  787. "သြော": "aw",
  788. "ဪ": "aw",
  789. // numbers
  790. "၀": "0",
  791. "၁": "1",
  792. "၂": "2",
  793. "၃": "3",
  794. "၄": "4",
  795. "၅": "5",
  796. "၆": "6",
  797. "၇": "7",
  798. "၈": "8",
  799. "၉": "9",
  800. // virama and tone marks which are silent in transliteration
  801. "္": "",
  802. "့": "",
  803. "း": "",
  804. // Czech
  805. "č": "c",
  806. "ď": "d",
  807. "ě": "e",
  808. "ň": "n",
  809. "ř": "r",
  810. "š": "s",
  811. "ť": "t",
  812. "ů": "u",
  813. "ž": "z",
  814. "Č": "C",
  815. "Ď": "D",
  816. "Ě": "E",
  817. "Ň": "N",
  818. "Ř": "R",
  819. "Š": "S",
  820. "Ť": "T",
  821. "Ů": "U",
  822. "Ž": "Z",
  823. // Dhivehi
  824. "ހ": "h",
  825. "ށ": "sh",
  826. "ނ": "n",
  827. "ރ": "r",
  828. "ބ": "b",
  829. "ޅ": "lh",
  830. "ކ": "k",
  831. "އ": "a",
  832. "ވ": "v",
  833. "މ": "m",
  834. "ފ": "f",
  835. "ދ": "dh",
  836. "ތ": "th",
  837. "ލ": "l",
  838. "ގ": "g",
  839. "ޏ": "gn",
  840. "ސ": "s",
  841. "ޑ": "d",
  842. "ޒ": "z",
  843. "ޓ": "t",
  844. "ޔ": "y",
  845. "ޕ": "p",
  846. "ޖ": "j",
  847. "ޗ": "ch",
  848. "ޘ": "tt",
  849. "ޙ": "hh",
  850. "ޚ": "kh",
  851. "ޛ": "th",
  852. "ޜ": "z",
  853. "ޝ": "sh",
  854. "ޞ": "s",
  855. "ޟ": "d",
  856. "ޠ": "t",
  857. "ޡ": "z",
  858. "ޢ": "a",
  859. "ޣ": "gh",
  860. "ޤ": "q",
  861. "ޥ": "w",
  862. "ަ": "a",
  863. "ާ": "aa",
  864. "ި": "i",
  865. "ީ": "ee",
  866. "ު": "u",
  867. "ޫ": "oo",
  868. "ެ": "e",
  869. "ޭ": "ey",
  870. "ޮ": "o",
  871. "ޯ": "oa",
  872. "ް": "",
  873. // Georgian https://en.wikipedia.org/wiki/Romanization_of_Georgian
  874. // National system (2002)
  875. "ა": "a",
  876. "ბ": "b",
  877. "გ": "g",
  878. "დ": "d",
  879. "ე": "e",
  880. "ვ": "v",
  881. "ზ": "z",
  882. "თ": "t",
  883. "ი": "i",
  884. "კ": "k",
  885. "ლ": "l",
  886. "მ": "m",
  887. "ნ": "n",
  888. "ო": "o",
  889. "პ": "p",
  890. "ჟ": "zh",
  891. "რ": "r",
  892. "ს": "s",
  893. "ტ": "t",
  894. "უ": "u",
  895. "ფ": "p",
  896. "ქ": "k",
  897. "ღ": "gh",
  898. "ყ": "q",
  899. "შ": "sh",
  900. "ჩ": "ch",
  901. "ც": "ts",
  902. "ძ": "dz",
  903. "წ": "ts",
  904. "ჭ": "ch",
  905. "ხ": "kh",
  906. "ჯ": "j",
  907. "ჰ": "h",
  908. // Greek
  909. "α": "a",
  910. "β": "v",
  911. "γ": "g",
  912. "δ": "d",
  913. "ε": "e",
  914. "ζ": "z",
  915. "η": "i",
  916. "θ": "th",
  917. "ι": "i",
  918. "κ": "k",
  919. "λ": "l",
  920. "μ": "m",
  921. "ν": "n",
  922. "ξ": "ks",
  923. "ο": "o",
  924. "π": "p",
  925. "ρ": "r",
  926. "σ": "s",
  927. "τ": "t",
  928. "υ": "y",
  929. "φ": "f",
  930. "χ": "x",
  931. "ψ": "ps",
  932. "ω": "o",
  933. "ά": "a",
  934. "έ": "e",
  935. "ί": "i",
  936. "ό": "o",
  937. "ύ": "y",
  938. "ή": "i",
  939. "ώ": "o",
  940. "ς": "s",
  941. "ϊ": "i",
  942. "ΰ": "y",
  943. "ϋ": "y",
  944. "ΐ": "i",
  945. "Α": "A",
  946. "Β": "B",
  947. "Γ": "G",
  948. "Δ": "D",
  949. "Ε": "E",
  950. "Ζ": "Z",
  951. "Η": "I",
  952. "Θ": "TH",
  953. "Ι": "I",
  954. "Κ": "K",
  955. "Λ": "L",
  956. "Μ": "M",
  957. "Ν": "N",
  958. "Ξ": "KS",
  959. "Ο": "O",
  960. "Π": "P",
  961. "Ρ": "R",
  962. "Σ": "S",
  963. "Τ": "T",
  964. "Υ": "Y",
  965. "Φ": "F",
  966. "Χ": "X",
  967. "Ψ": "PS",
  968. "Ω": "O",
  969. "Ά": "A",
  970. "Έ": "E",
  971. "Ί": "I",
  972. "Ό": "O",
  973. "Ύ": "Y",
  974. "Ή": "I",
  975. "Ώ": "O",
  976. "Ϊ": "I",
  977. "Ϋ": "Y",
  978. // Latvian
  979. "ā": "a",
  980. // 'č': 'c', // duplicate
  981. "ē": "e",
  982. "ģ": "g",
  983. "ī": "i",
  984. "ķ": "k",
  985. "ļ": "l",
  986. "ņ": "n",
  987. // 'š': 's', // duplicate
  988. "ū": "u",
  989. // 'ž': 'z', // duplicate
  990. "Ā": "A",
  991. // 'Č': 'C', // duplicate
  992. "Ē": "E",
  993. "Ģ": "G",
  994. "Ī": "I",
  995. "Ķ": "k",
  996. "Ļ": "L",
  997. "Ņ": "N",
  998. // 'Š': 'S', // duplicate
  999. "Ū": "U",
  1000. // 'Ž': 'Z', // duplicate
  1001. // Macedonian
  1002. "Ќ": "Kj",
  1003. "ќ": "kj",
  1004. "Љ": "Lj",
  1005. "љ": "lj",
  1006. "Њ": "Nj",
  1007. "њ": "nj",
  1008. "Тс": "Ts",
  1009. "тс": "ts",
  1010. // Polish
  1011. "ą": "a",
  1012. "ć": "c",
  1013. "ę": "e",
  1014. "ł": "l",
  1015. "ń": "n",
  1016. // 'ó': 'o', // duplicate
  1017. "ś": "s",
  1018. "ź": "z",
  1019. "ż": "z",
  1020. "Ą": "A",
  1021. "Ć": "C",
  1022. "Ę": "E",
  1023. "Ł": "L",
  1024. "Ń": "N",
  1025. "Ś": "S",
  1026. "Ź": "Z",
  1027. "Ż": "Z",
  1028. // Ukranian
  1029. "Є": "Ye",
  1030. "І": "I",
  1031. "Ї": "Yi",
  1032. "Ґ": "G",
  1033. "є": "ye",
  1034. "і": "i",
  1035. "ї": "yi",
  1036. "ґ": "g",
  1037. // Romanian
  1038. "ă": "a",
  1039. "Ă": "A",
  1040. "ș": "s",
  1041. "Ș": "S",
  1042. // 'ş': 's', // duplicate
  1043. // 'Ş': 'S', // duplicate
  1044. "ț": "t",
  1045. "Ț": "T",
  1046. "ţ": "t",
  1047. "Ţ": "T",
  1048. // Russian https://en.wikipedia.org/wiki/Romanization_of_Russian
  1049. // ICAO
  1050. "а": "a",
  1051. "б": "b",
  1052. "в": "v",
  1053. "г": "g",
  1054. "д": "d",
  1055. "е": "e",
  1056. "ё": "yo",
  1057. "ж": "zh",
  1058. "з": "z",
  1059. "и": "i",
  1060. "й": "i",
  1061. "к": "k",
  1062. "л": "l",
  1063. "м": "m",
  1064. "н": "n",
  1065. "о": "o",
  1066. "п": "p",
  1067. "р": "r",
  1068. "с": "s",
  1069. "т": "t",
  1070. "у": "u",
  1071. "ф": "f",
  1072. "х": "kh",
  1073. "ц": "c",
  1074. "ч": "ch",
  1075. "ш": "sh",
  1076. "щ": "sh",
  1077. "ъ": "",
  1078. "ы": "y",
  1079. "ь": "",
  1080. "э": "e",
  1081. "ю": "yu",
  1082. "я": "ya",
  1083. "А": "A",
  1084. "Б": "B",
  1085. "В": "V",
  1086. "Г": "G",
  1087. "Д": "D",
  1088. "Е": "E",
  1089. "Ё": "Yo",
  1090. "Ж": "Zh",
  1091. "З": "Z",
  1092. "И": "I",
  1093. "Й": "I",
  1094. "К": "K",
  1095. "Л": "L",
  1096. "М": "M",
  1097. "Н": "N",
  1098. "О": "O",
  1099. "П": "P",
  1100. "Р": "R",
  1101. "С": "S",
  1102. "Т": "T",
  1103. "У": "U",
  1104. "Ф": "F",
  1105. "Х": "Kh",
  1106. "Ц": "C",
  1107. "Ч": "Ch",
  1108. "Ш": "Sh",
  1109. "Щ": "Sh",
  1110. "Ъ": "",
  1111. "Ы": "Y",
  1112. "Ь": "",
  1113. "Э": "E",
  1114. "Ю": "Yu",
  1115. "Я": "Ya",
  1116. // Serbian
  1117. "ђ": "dj",
  1118. "ј": "j",
  1119. // 'љ': 'lj', // duplicate
  1120. // 'њ': 'nj', // duplicate
  1121. "ћ": "c",
  1122. "џ": "dz",
  1123. "Ђ": "Dj",
  1124. "Ј": "j",
  1125. // 'Љ': 'Lj', // duplicate
  1126. // 'Њ': 'Nj', // duplicate
  1127. "Ћ": "C",
  1128. "Џ": "Dz",
  1129. // Slovak
  1130. "ľ": "l",
  1131. "ĺ": "l",
  1132. "ŕ": "r",
  1133. "Ľ": "L",
  1134. "Ĺ": "L",
  1135. "Ŕ": "R",
  1136. // Turkish
  1137. "ş": "s",
  1138. "Ş": "S",
  1139. "ı": "i",
  1140. "İ": "I",
  1141. // 'ç': 'c', // duplicate
  1142. // 'Ç': 'C', // duplicate
  1143. // 'ü': 'u', // duplicate, see langCharMap
  1144. // 'Ü': 'U', // duplicate, see langCharMap
  1145. // 'ö': 'o', // duplicate, see langCharMap
  1146. // 'Ö': 'O', // duplicate, see langCharMap
  1147. "ğ": "g",
  1148. "Ğ": "G",
  1149. // Vietnamese
  1150. "ả": "a",
  1151. "Ả": "A",
  1152. "ẳ": "a",
  1153. "Ẳ": "A",
  1154. "ẩ": "a",
  1155. "Ẩ": "A",
  1156. "đ": "d",
  1157. "Đ": "D",
  1158. "ẹ": "e",
  1159. "Ẹ": "E",
  1160. "ẽ": "e",
  1161. "Ẽ": "E",
  1162. "ẻ": "e",
  1163. "Ẻ": "E",
  1164. "ế": "e",
  1165. "Ế": "E",
  1166. "ề": "e",
  1167. "Ề": "E",
  1168. "ệ": "e",
  1169. "Ệ": "E",
  1170. "ễ": "e",
  1171. "Ễ": "E",
  1172. "ể": "e",
  1173. "Ể": "E",
  1174. "ỏ": "o",
  1175. "ọ": "o",
  1176. "Ọ": "o",
  1177. "ố": "o",
  1178. "Ố": "O",
  1179. "ồ": "o",
  1180. "Ồ": "O",
  1181. "ổ": "o",
  1182. "Ổ": "O",
  1183. "ộ": "o",
  1184. "Ộ": "O",
  1185. "ỗ": "o",
  1186. "Ỗ": "O",
  1187. "ơ": "o",
  1188. "Ơ": "O",
  1189. "ớ": "o",
  1190. "Ớ": "O",
  1191. "ờ": "o",
  1192. "Ờ": "O",
  1193. "ợ": "o",
  1194. "Ợ": "O",
  1195. "ỡ": "o",
  1196. "Ỡ": "O",
  1197. "Ở": "o",
  1198. "ở": "o",
  1199. "ị": "i",
  1200. "Ị": "I",
  1201. "ĩ": "i",
  1202. "Ĩ": "I",
  1203. "ỉ": "i",
  1204. "Ỉ": "i",
  1205. "ủ": "u",
  1206. "Ủ": "U",
  1207. "ụ": "u",
  1208. "Ụ": "U",
  1209. "ũ": "u",
  1210. "Ũ": "U",
  1211. "ư": "u",
  1212. "Ư": "U",
  1213. "ứ": "u",
  1214. "Ứ": "U",
  1215. "ừ": "u",
  1216. "Ừ": "U",
  1217. "ự": "u",
  1218. "Ự": "U",
  1219. "ữ": "u",
  1220. "Ữ": "U",
  1221. "ử": "u",
  1222. "Ử": "ư",
  1223. "ỷ": "y",
  1224. "Ỷ": "y",
  1225. "ỳ": "y",
  1226. "Ỳ": "Y",
  1227. "ỵ": "y",
  1228. "Ỵ": "Y",
  1229. "ỹ": "y",
  1230. "Ỹ": "Y",
  1231. "ạ": "a",
  1232. "Ạ": "A",
  1233. "ấ": "a",
  1234. "Ấ": "A",
  1235. "ầ": "a",
  1236. "Ầ": "A",
  1237. "ậ": "a",
  1238. "Ậ": "A",
  1239. "ẫ": "a",
  1240. "Ẫ": "A",
  1241. // 'ă': 'a', // duplicate
  1242. // 'Ă': 'A', // duplicate
  1243. "ắ": "a",
  1244. "Ắ": "A",
  1245. "ằ": "a",
  1246. "Ằ": "A",
  1247. "ặ": "a",
  1248. "Ặ": "A",
  1249. "ẵ": "a",
  1250. "Ẵ": "A",
  1251. "⓪": "0",
  1252. "①": "1",
  1253. "②": "2",
  1254. "③": "3",
  1255. "④": "4",
  1256. "⑤": "5",
  1257. "⑥": "6",
  1258. "⑦": "7",
  1259. "⑧": "8",
  1260. "⑨": "9",
  1261. "⑩": "10",
  1262. "⑪": "11",
  1263. "⑫": "12",
  1264. "⑬": "13",
  1265. "⑭": "14",
  1266. "⑮": "15",
  1267. "⑯": "16",
  1268. "⑰": "17",
  1269. "⑱": "18",
  1270. "⑲": "18",
  1271. "⑳": "18",
  1272. "⓵": "1",
  1273. "⓶": "2",
  1274. "⓷": "3",
  1275. "⓸": "4",
  1276. "⓹": "5",
  1277. "⓺": "6",
  1278. "⓻": "7",
  1279. "⓼": "8",
  1280. "⓽": "9",
  1281. "⓾": "10",
  1282. "⓿": "0",
  1283. "⓫": "11",
  1284. "⓬": "12",
  1285. "⓭": "13",
  1286. "⓮": "14",
  1287. "⓯": "15",
  1288. "⓰": "16",
  1289. "⓱": "17",
  1290. "⓲": "18",
  1291. "⓳": "19",
  1292. "⓴": "20",
  1293. "Ⓐ": "A",
  1294. "Ⓑ": "B",
  1295. "Ⓒ": "C",
  1296. "Ⓓ": "D",
  1297. "Ⓔ": "E",
  1298. "Ⓕ": "F",
  1299. "Ⓖ": "G",
  1300. "Ⓗ": "H",
  1301. "Ⓘ": "I",
  1302. "Ⓙ": "J",
  1303. "Ⓚ": "K",
  1304. "Ⓛ": "L",
  1305. "Ⓜ": "M",
  1306. "Ⓝ": "N",
  1307. "Ⓞ": "O",
  1308. "Ⓟ": "P",
  1309. "Ⓠ": "Q",
  1310. "Ⓡ": "R",
  1311. "Ⓢ": "S",
  1312. "Ⓣ": "T",
  1313. "Ⓤ": "U",
  1314. "Ⓥ": "V",
  1315. "Ⓦ": "W",
  1316. "Ⓧ": "X",
  1317. "Ⓨ": "Y",
  1318. "Ⓩ": "Z",
  1319. "ⓐ": "a",
  1320. "ⓑ": "b",
  1321. "ⓒ": "c",
  1322. "ⓓ": "d",
  1323. "ⓔ": "e",
  1324. "ⓕ": "f",
  1325. "ⓖ": "g",
  1326. "ⓗ": "h",
  1327. "ⓘ": "i",
  1328. "ⓙ": "j",
  1329. "ⓚ": "k",
  1330. "ⓛ": "l",
  1331. "ⓜ": "m",
  1332. "ⓝ": "n",
  1333. "ⓞ": "o",
  1334. "ⓟ": "p",
  1335. "ⓠ": "q",
  1336. "ⓡ": "r",
  1337. "ⓢ": "s",
  1338. "ⓣ": "t",
  1339. "ⓤ": "u",
  1340. "ⓦ": "v",
  1341. "ⓥ": "w",
  1342. "ⓧ": "x",
  1343. "ⓨ": "y",
  1344. "ⓩ": "z",
  1345. // symbols
  1346. "“": '"',
  1347. "”": '"',
  1348. "‘": "'",
  1349. "’": "'",
  1350. "∂": "d",
  1351. "ƒ": "f",
  1352. "™": "(TM)",
  1353. "©": "(C)",
  1354. "œ": "oe",
  1355. "Œ": "OE",
  1356. "®": "(R)",
  1357. "†": "+",
  1358. "℠": "(SM)",
  1359. "…": "...",
  1360. "˚": "o",
  1361. "º": "o",
  1362. "ª": "a",
  1363. "•": "*",
  1364. "၊": ",",
  1365. "။": ".",
  1366. // currency
  1367. "$": "USD",
  1368. "€": "EUR",
  1369. "₢": "BRN",
  1370. "₣": "FRF",
  1371. "£": "GBP",
  1372. "₤": "ITL",
  1373. "₦": "NGN",
  1374. "₧": "ESP",
  1375. "₩": "KRW",
  1376. "₪": "ILS",
  1377. "₫": "VND",
  1378. "₭": "LAK",
  1379. "₮": "MNT",
  1380. "₯": "GRD",
  1381. "₱": "ARS",
  1382. "₲": "PYG",
  1383. "₳": "ARA",
  1384. "₴": "UAH",
  1385. "₵": "GHS",
  1386. "¢": "cent",
  1387. "¥": "CNY",
  1388. "元": "CNY",
  1389. "円": "YEN",
  1390. "﷼": "IRR",
  1391. "₠": "EWE",
  1392. "฿": "THB",
  1393. "₨": "INR",
  1394. "₹": "INR",
  1395. "₰": "PF",
  1396. "₺": "TRY",
  1397. "؋": "AFN",
  1398. "₼": "AZN",
  1399. "лв": "BGN",
  1400. "៛": "KHR",
  1401. "₡": "CRC",
  1402. "₸": "KZT",
  1403. "ден": "MKD",
  1404. "zł": "PLN",
  1405. "₽": "RUB",
  1406. "₾": "GEL"
  1407. };
  1408. var lookAheadCharArray = [
  1409. // burmese
  1410. "်",
  1411. // Dhivehi
  1412. "ް"
  1413. ];
  1414. var diatricMap = {
  1415. // Burmese
  1416. // dependent vowels
  1417. "ာ": "a",
  1418. "ါ": "a",
  1419. "ေ": "e",
  1420. "ဲ": "e",
  1421. "ိ": "i",
  1422. "ီ": "i",
  1423. "ို": "o",
  1424. "ု": "u",
  1425. "ူ": "u",
  1426. "ေါင်": "aung",
  1427. "ော": "aw",
  1428. "ော်": "aw",
  1429. "ေါ": "aw",
  1430. "ေါ်": "aw",
  1431. "်": "်",
  1432. // this is special case but the character will be converted to latin in the code
  1433. "က်": "et",
  1434. "ိုက်": "aik",
  1435. "ောက်": "auk",
  1436. "င်": "in",
  1437. "ိုင်": "aing",
  1438. "ောင်": "aung",
  1439. "စ်": "it",
  1440. "ည်": "i",
  1441. "တ်": "at",
  1442. "ိတ်": "eik",
  1443. "ုတ်": "ok",
  1444. "ွတ်": "ut",
  1445. "ေတ်": "it",
  1446. "ဒ်": "d",
  1447. "ိုဒ်": "ok",
  1448. "ုဒ်": "ait",
  1449. "န်": "an",
  1450. "ာန်": "an",
  1451. "ိန်": "ein",
  1452. "ုန်": "on",
  1453. "ွန်": "un",
  1454. "ပ်": "at",
  1455. "ိပ်": "eik",
  1456. "ုပ်": "ok",
  1457. "ွပ်": "ut",
  1458. "န်ုပ်": "nub",
  1459. "မ်": "an",
  1460. "ိမ်": "ein",
  1461. "ုမ်": "on",
  1462. "ွမ်": "un",
  1463. "ယ်": "e",
  1464. "ိုလ်": "ol",
  1465. "ဉ်": "in",
  1466. "ံ": "an",
  1467. "ိံ": "ein",
  1468. "ုံ": "on",
  1469. // Dhivehi
  1470. "ައް": "ah",
  1471. "ަށް": "ah"
  1472. };
  1473. var langCharMap = {
  1474. "en": {},
  1475. // default language
  1476. "az": {
  1477. // Azerbaijani
  1478. "ç": "c",
  1479. "ə": "e",
  1480. "ğ": "g",
  1481. "ı": "i",
  1482. "ö": "o",
  1483. "ş": "s",
  1484. "ü": "u",
  1485. "Ç": "C",
  1486. "Ə": "E",
  1487. "Ğ": "G",
  1488. "İ": "I",
  1489. "Ö": "O",
  1490. "Ş": "S",
  1491. "Ü": "U"
  1492. },
  1493. "cs": {
  1494. // Czech
  1495. "č": "c",
  1496. "ď": "d",
  1497. "ě": "e",
  1498. "ň": "n",
  1499. "ř": "r",
  1500. "š": "s",
  1501. "ť": "t",
  1502. "ů": "u",
  1503. "ž": "z",
  1504. "Č": "C",
  1505. "Ď": "D",
  1506. "Ě": "E",
  1507. "Ň": "N",
  1508. "Ř": "R",
  1509. "Š": "S",
  1510. "Ť": "T",
  1511. "Ů": "U",
  1512. "Ž": "Z"
  1513. },
  1514. "fi": {
  1515. // Finnish
  1516. // 'å': 'a', duplicate see charMap/latin
  1517. // 'Å': 'A', duplicate see charMap/latin
  1518. "ä": "a",
  1519. // ok
  1520. "Ä": "A",
  1521. // ok
  1522. "ö": "o",
  1523. // ok
  1524. "Ö": "O"
  1525. // ok
  1526. },
  1527. "hu": {
  1528. // Hungarian
  1529. "ä": "a",
  1530. // ok
  1531. "Ä": "A",
  1532. // ok
  1533. // 'á': 'a', duplicate see charMap/latin
  1534. // 'Á': 'A', duplicate see charMap/latin
  1535. "ö": "o",
  1536. // ok
  1537. "Ö": "O",
  1538. // ok
  1539. // 'ő': 'o', duplicate see charMap/latin
  1540. // 'Ő': 'O', duplicate see charMap/latin
  1541. "ü": "u",
  1542. "Ü": "U",
  1543. "ű": "u",
  1544. "Ű": "U"
  1545. },
  1546. "lt": {
  1547. // Lithuanian
  1548. "ą": "a",
  1549. "č": "c",
  1550. "ę": "e",
  1551. "ė": "e",
  1552. "į": "i",
  1553. "š": "s",
  1554. "ų": "u",
  1555. "ū": "u",
  1556. "ž": "z",
  1557. "Ą": "A",
  1558. "Č": "C",
  1559. "Ę": "E",
  1560. "Ė": "E",
  1561. "Į": "I",
  1562. "Š": "S",
  1563. "Ų": "U",
  1564. "Ū": "U"
  1565. },
  1566. "lv": {
  1567. // Latvian
  1568. "ā": "a",
  1569. "č": "c",
  1570. "ē": "e",
  1571. "ģ": "g",
  1572. "ī": "i",
  1573. "ķ": "k",
  1574. "ļ": "l",
  1575. "ņ": "n",
  1576. "š": "s",
  1577. "ū": "u",
  1578. "ž": "z",
  1579. "Ā": "A",
  1580. "Č": "C",
  1581. "Ē": "E",
  1582. "Ģ": "G",
  1583. "Ī": "i",
  1584. "Ķ": "k",
  1585. "Ļ": "L",
  1586. "Ņ": "N",
  1587. "Š": "S",
  1588. "Ū": "u",
  1589. "Ž": "Z"
  1590. },
  1591. "pl": {
  1592. // Polish
  1593. "ą": "a",
  1594. "ć": "c",
  1595. "ę": "e",
  1596. "ł": "l",
  1597. "ń": "n",
  1598. "ó": "o",
  1599. "ś": "s",
  1600. "ź": "z",
  1601. "ż": "z",
  1602. "Ą": "A",
  1603. "Ć": "C",
  1604. "Ę": "e",
  1605. "Ł": "L",
  1606. "Ń": "N",
  1607. "Ó": "O",
  1608. "Ś": "S",
  1609. "Ź": "Z",
  1610. "Ż": "Z"
  1611. },
  1612. "sv": {
  1613. // Swedish
  1614. // 'å': 'a', duplicate see charMap/latin
  1615. // 'Å': 'A', duplicate see charMap/latin
  1616. "ä": "a",
  1617. // ok
  1618. "Ä": "A",
  1619. // ok
  1620. "ö": "o",
  1621. // ok
  1622. "Ö": "O"
  1623. // ok
  1624. },
  1625. "sk": {
  1626. // Slovak
  1627. "ä": "a",
  1628. "Ä": "A"
  1629. },
  1630. "sr": {
  1631. // Serbian
  1632. "љ": "lj",
  1633. "њ": "nj",
  1634. "Љ": "Lj",
  1635. "Њ": "Nj",
  1636. "đ": "dj",
  1637. "Đ": "Dj"
  1638. },
  1639. "tr": {
  1640. // Turkish
  1641. "Ü": "U",
  1642. "Ö": "O",
  1643. "ü": "u",
  1644. "ö": "o"
  1645. }
  1646. };
  1647. var symbolMap = {
  1648. "ar": {
  1649. "∆": "delta",
  1650. "∞": "la-nihaya",
  1651. "♥": "hob",
  1652. "&": "wa",
  1653. "|": "aw",
  1654. "<": "aqal-men",
  1655. ">": "akbar-men",
  1656. "∑": "majmou",
  1657. "¤": "omla"
  1658. },
  1659. "az": {},
  1660. "ca": {
  1661. "∆": "delta",
  1662. "∞": "infinit",
  1663. "♥": "amor",
  1664. "&": "i",
  1665. "|": "o",
  1666. "<": "menys que",
  1667. ">": "mes que",
  1668. "∑": "suma dels",
  1669. "¤": "moneda"
  1670. },
  1671. "cs": {
  1672. "∆": "delta",
  1673. "∞": "nekonecno",
  1674. "♥": "laska",
  1675. "&": "a",
  1676. "|": "nebo",
  1677. "<": "mensi nez",
  1678. ">": "vetsi nez",
  1679. "∑": "soucet",
  1680. "¤": "mena"
  1681. },
  1682. "de": {
  1683. "∆": "delta",
  1684. "∞": "unendlich",
  1685. "♥": "Liebe",
  1686. "&": "und",
  1687. "|": "oder",
  1688. "<": "kleiner als",
  1689. ">": "groesser als",
  1690. "∑": "Summe von",
  1691. "¤": "Waehrung"
  1692. },
  1693. "dv": {
  1694. "∆": "delta",
  1695. "∞": "kolunulaa",
  1696. "♥": "loabi",
  1697. "&": "aai",
  1698. "|": "noonee",
  1699. "<": "ah vure kuda",
  1700. ">": "ah vure bodu",
  1701. "∑": "jumula",
  1702. "¤": "faisaa"
  1703. },
  1704. "en": {
  1705. "∆": "delta",
  1706. "∞": "infinity",
  1707. "♥": "love",
  1708. "&": "and",
  1709. "|": "or",
  1710. "<": "less than",
  1711. ">": "greater than",
  1712. "∑": "sum",
  1713. "¤": "currency"
  1714. },
  1715. "es": {
  1716. "∆": "delta",
  1717. "∞": "infinito",
  1718. "♥": "amor",
  1719. "&": "y",
  1720. "|": "u",
  1721. "<": "menos que",
  1722. ">": "mas que",
  1723. "∑": "suma de los",
  1724. "¤": "moneda"
  1725. },
  1726. "fa": {
  1727. "∆": "delta",
  1728. "∞": "bi-nahayat",
  1729. "♥": "eshgh",
  1730. "&": "va",
  1731. "|": "ya",
  1732. "<": "kamtar-az",
  1733. ">": "bishtar-az",
  1734. "∑": "majmooe",
  1735. "¤": "vahed"
  1736. },
  1737. "fi": {
  1738. "∆": "delta",
  1739. "∞": "aarettomyys",
  1740. "♥": "rakkaus",
  1741. "&": "ja",
  1742. "|": "tai",
  1743. "<": "pienempi kuin",
  1744. ">": "suurempi kuin",
  1745. "∑": "summa",
  1746. "¤": "valuutta"
  1747. },
  1748. "fr": {
  1749. "∆": "delta",
  1750. "∞": "infiniment",
  1751. "♥": "Amour",
  1752. "&": "et",
  1753. "|": "ou",
  1754. "<": "moins que",
  1755. ">": "superieure a",
  1756. "∑": "somme des",
  1757. "¤": "monnaie"
  1758. },
  1759. "ge": {
  1760. "∆": "delta",
  1761. "∞": "usasruloba",
  1762. "♥": "siqvaruli",
  1763. "&": "da",
  1764. "|": "an",
  1765. "<": "naklebi",
  1766. ">": "meti",
  1767. "∑": "jami",
  1768. "¤": "valuta"
  1769. },
  1770. "gr": {},
  1771. "hu": {
  1772. "∆": "delta",
  1773. "∞": "vegtelen",
  1774. "♥": "szerelem",
  1775. "&": "es",
  1776. "|": "vagy",
  1777. "<": "kisebb mint",
  1778. ">": "nagyobb mint",
  1779. "∑": "szumma",
  1780. "¤": "penznem"
  1781. },
  1782. "it": {
  1783. "∆": "delta",
  1784. "∞": "infinito",
  1785. "♥": "amore",
  1786. "&": "e",
  1787. "|": "o",
  1788. "<": "minore di",
  1789. ">": "maggiore di",
  1790. "∑": "somma",
  1791. "¤": "moneta"
  1792. },
  1793. "lt": {
  1794. "∆": "delta",
  1795. "∞": "begalybe",
  1796. "♥": "meile",
  1797. "&": "ir",
  1798. "|": "ar",
  1799. "<": "maziau nei",
  1800. ">": "daugiau nei",
  1801. "∑": "suma",
  1802. "¤": "valiuta"
  1803. },
  1804. "lv": {
  1805. "∆": "delta",
  1806. "∞": "bezgaliba",
  1807. "♥": "milestiba",
  1808. "&": "un",
  1809. "|": "vai",
  1810. "<": "mazak neka",
  1811. ">": "lielaks neka",
  1812. "∑": "summa",
  1813. "¤": "valuta"
  1814. },
  1815. "my": {
  1816. "∆": "kwahkhyaet",
  1817. "∞": "asaonasme",
  1818. "♥": "akhyait",
  1819. "&": "nhin",
  1820. "|": "tho",
  1821. "<": "ngethaw",
  1822. ">": "kyithaw",
  1823. "∑": "paungld",
  1824. "¤": "ngwekye"
  1825. },
  1826. "mk": {},
  1827. "nl": {
  1828. "∆": "delta",
  1829. "∞": "oneindig",
  1830. "♥": "liefde",
  1831. "&": "en",
  1832. "|": "of",
  1833. "<": "kleiner dan",
  1834. ">": "groter dan",
  1835. "∑": "som",
  1836. "¤": "valuta"
  1837. },
  1838. "pl": {
  1839. "∆": "delta",
  1840. "∞": "nieskonczonosc",
  1841. "♥": "milosc",
  1842. "&": "i",
  1843. "|": "lub",
  1844. "<": "mniejsze niz",
  1845. ">": "wieksze niz",
  1846. "∑": "suma",
  1847. "¤": "waluta"
  1848. },
  1849. "pt": {
  1850. "∆": "delta",
  1851. "∞": "infinito",
  1852. "♥": "amor",
  1853. "&": "e",
  1854. "|": "ou",
  1855. "<": "menor que",
  1856. ">": "maior que",
  1857. "∑": "soma",
  1858. "¤": "moeda"
  1859. },
  1860. "ro": {
  1861. "∆": "delta",
  1862. "∞": "infinit",
  1863. "♥": "dragoste",
  1864. "&": "si",
  1865. "|": "sau",
  1866. "<": "mai mic ca",
  1867. ">": "mai mare ca",
  1868. "∑": "suma",
  1869. "¤": "valuta"
  1870. },
  1871. "ru": {
  1872. "∆": "delta",
  1873. "∞": "beskonechno",
  1874. "♥": "lubov",
  1875. "&": "i",
  1876. "|": "ili",
  1877. "<": "menshe",
  1878. ">": "bolshe",
  1879. "∑": "summa",
  1880. "¤": "valjuta"
  1881. },
  1882. "sk": {
  1883. "∆": "delta",
  1884. "∞": "nekonecno",
  1885. "♥": "laska",
  1886. "&": "a",
  1887. "|": "alebo",
  1888. "<": "menej ako",
  1889. ">": "viac ako",
  1890. "∑": "sucet",
  1891. "¤": "mena"
  1892. },
  1893. "sr": {},
  1894. "tr": {
  1895. "∆": "delta",
  1896. "∞": "sonsuzluk",
  1897. "♥": "ask",
  1898. "&": "ve",
  1899. "|": "veya",
  1900. "<": "kucuktur",
  1901. ">": "buyuktur",
  1902. "∑": "toplam",
  1903. "¤": "para birimi"
  1904. },
  1905. "uk": {
  1906. "∆": "delta",
  1907. "∞": "bezkinechnist",
  1908. "♥": "lubov",
  1909. "&": "i",
  1910. "|": "abo",
  1911. "<": "menshe",
  1912. ">": "bilshe",
  1913. "∑": "suma",
  1914. "¤": "valjuta"
  1915. },
  1916. "vn": {
  1917. "∆": "delta",
  1918. "∞": "vo cuc",
  1919. "♥": "yeu",
  1920. "&": "va",
  1921. "|": "hoac",
  1922. "<": "nho hon",
  1923. ">": "lon hon",
  1924. "∑": "tong",
  1925. "¤": "tien te"
  1926. }
  1927. };
  1928. var uricChars = [";", "?", ":", "@", "&", "=", "+", "$", ",", "/"].join("");
  1929. var uricNoSlashChars = [";", "?", ":", "@", "&", "=", "+", "$", ","].join("");
  1930. var markChars = [".", "!", "~", "*", "'", "(", ")"].join("");
  1931. var getSlug = function getSlug2(input, opts) {
  1932. var separator = "-";
  1933. var result = "";
  1934. var diatricString = "";
  1935. var convertSymbols = true;
  1936. var customReplacements = {};
  1937. var maintainCase;
  1938. var titleCase;
  1939. var truncate;
  1940. var uricFlag;
  1941. var uricNoSlashFlag;
  1942. var markFlag;
  1943. var symbol;
  1944. var langChar;
  1945. var lucky;
  1946. var i;
  1947. var ch;
  1948. var l;
  1949. var lastCharWasSymbol;
  1950. var lastCharWasDiatric;
  1951. var allowedChars = "";
  1952. if (typeof input !== "string") {
  1953. return "";
  1954. }
  1955. if (typeof opts === "string") {
  1956. separator = opts;
  1957. }
  1958. symbol = symbolMap.en;
  1959. langChar = langCharMap.en;
  1960. if (typeof opts === "object") {
  1961. maintainCase = opts.maintainCase || false;
  1962. customReplacements = opts.custom && typeof opts.custom === "object" ? opts.custom : customReplacements;
  1963. truncate = +opts.truncate > 1 && opts.truncate || false;
  1964. uricFlag = opts.uric || false;
  1965. uricNoSlashFlag = opts.uricNoSlash || false;
  1966. markFlag = opts.mark || false;
  1967. convertSymbols = opts.symbols === false || opts.lang === false ? false : true;
  1968. separator = opts.separator || separator;
  1969. if (uricFlag) {
  1970. allowedChars += uricChars;
  1971. }
  1972. if (uricNoSlashFlag) {
  1973. allowedChars += uricNoSlashChars;
  1974. }
  1975. if (markFlag) {
  1976. allowedChars += markChars;
  1977. }
  1978. symbol = opts.lang && symbolMap[opts.lang] && convertSymbols ? symbolMap[opts.lang] : convertSymbols ? symbolMap.en : {};
  1979. langChar = opts.lang && langCharMap[opts.lang] ? langCharMap[opts.lang] : opts.lang === false || opts.lang === true ? {} : langCharMap.en;
  1980. if (opts.titleCase && typeof opts.titleCase.length === "number" && Array.prototype.toString.call(opts.titleCase)) {
  1981. opts.titleCase.forEach(function(v) {
  1982. customReplacements[v + ""] = v + "";
  1983. });
  1984. titleCase = true;
  1985. } else {
  1986. titleCase = !!opts.titleCase;
  1987. }
  1988. if (opts.custom && typeof opts.custom.length === "number" && Array.prototype.toString.call(opts.custom)) {
  1989. opts.custom.forEach(function(v) {
  1990. customReplacements[v + ""] = v + "";
  1991. });
  1992. }
  1993. Object.keys(customReplacements).forEach(function(v) {
  1994. var r;
  1995. if (v.length > 1) {
  1996. r = new RegExp("\\b" + escapeChars(v) + "\\b", "gi");
  1997. } else {
  1998. r = new RegExp(escapeChars(v), "gi");
  1999. }
  2000. input = input.replace(r, customReplacements[v]);
  2001. });
  2002. for (ch in customReplacements) {
  2003. allowedChars += ch;
  2004. }
  2005. }
  2006. allowedChars += separator;
  2007. allowedChars = escapeChars(allowedChars);
  2008. input = input.replace(/(^\s+|\s+$)/g, "");
  2009. lastCharWasSymbol = false;
  2010. lastCharWasDiatric = false;
  2011. for (i = 0, l = input.length; i < l; i++) {
  2012. ch = input[i];
  2013. if (isReplacedCustomChar(ch, customReplacements)) {
  2014. lastCharWasSymbol = false;
  2015. } else if (langChar[ch]) {
  2016. ch = lastCharWasSymbol && langChar[ch].match(/[A-Za-z0-9]/) ? " " + langChar[ch] : langChar[ch];
  2017. lastCharWasSymbol = false;
  2018. } else if (ch in charMap) {
  2019. if (i + 1 < l && lookAheadCharArray.indexOf(input[i + 1]) >= 0) {
  2020. diatricString += ch;
  2021. ch = "";
  2022. } else if (lastCharWasDiatric === true) {
  2023. ch = diatricMap[diatricString] + charMap[ch];
  2024. diatricString = "";
  2025. } else {
  2026. ch = lastCharWasSymbol && charMap[ch].match(/[A-Za-z0-9]/) ? " " + charMap[ch] : charMap[ch];
  2027. }
  2028. lastCharWasSymbol = false;
  2029. lastCharWasDiatric = false;
  2030. } else if (ch in diatricMap) {
  2031. diatricString += ch;
  2032. ch = "";
  2033. if (i === l - 1) {
  2034. ch = diatricMap[diatricString];
  2035. }
  2036. lastCharWasDiatric = true;
  2037. } else if (
  2038. // process symbol chars
  2039. symbol[ch] && !(uricFlag && uricChars.indexOf(ch) !== -1) && !(uricNoSlashFlag && uricNoSlashChars.indexOf(ch) !== -1)
  2040. ) {
  2041. ch = lastCharWasSymbol || result.substr(-1).match(/[A-Za-z0-9]/) ? separator + symbol[ch] : symbol[ch];
  2042. ch += input[i + 1] !== void 0 && input[i + 1].match(/[A-Za-z0-9]/) ? separator : "";
  2043. lastCharWasSymbol = true;
  2044. } else {
  2045. if (lastCharWasDiatric === true) {
  2046. ch = diatricMap[diatricString] + ch;
  2047. diatricString = "";
  2048. lastCharWasDiatric = false;
  2049. } else if (lastCharWasSymbol && (/[A-Za-z0-9]/.test(ch) || result.substr(-1).match(/A-Za-z0-9]/))) {
  2050. ch = " " + ch;
  2051. }
  2052. lastCharWasSymbol = false;
  2053. }
  2054. result += ch.replace(new RegExp("[^\\w\\s" + allowedChars + "_-]", "g"), separator);
  2055. }
  2056. if (titleCase) {
  2057. result = result.replace(/(\w)(\S*)/g, function(_, i2, r) {
  2058. var j = i2.toUpperCase() + (r !== null ? r : "");
  2059. return Object.keys(customReplacements).indexOf(j.toLowerCase()) < 0 ? j : j.toLowerCase();
  2060. });
  2061. }
  2062. result = result.replace(/\s+/g, separator).replace(new RegExp("\\" + separator + "+", "g"), separator).replace(new RegExp("(^\\" + separator + "+|\\" + separator + "+$)", "g"), "");
  2063. if (truncate && result.length > truncate) {
  2064. lucky = result.charAt(truncate) === separator;
  2065. result = result.slice(0, truncate);
  2066. if (!lucky) {
  2067. result = result.slice(0, result.lastIndexOf(separator));
  2068. }
  2069. }
  2070. if (!maintainCase && !titleCase) {
  2071. result = result.toLowerCase();
  2072. }
  2073. return result;
  2074. };
  2075. var createSlug = function createSlug2(opts) {
  2076. return function getSlugWithConfig(input) {
  2077. return getSlug(input, opts);
  2078. };
  2079. };
  2080. var escapeChars = function escapeChars2(input) {
  2081. return input.replace(/[-\\^$*+?.()|[\]{}\/]/g, "\\$&");
  2082. };
  2083. var isReplacedCustomChar = function(ch, customReplacements) {
  2084. for (var c in customReplacements) {
  2085. if (customReplacements[c] === ch) {
  2086. return true;
  2087. }
  2088. }
  2089. };
  2090. if (typeof module !== "undefined" && module.exports) {
  2091. module.exports = getSlug;
  2092. module.exports.createSlug = createSlug;
  2093. } else if (typeof define !== "undefined" && define.amd) {
  2094. define([], function() {
  2095. return getSlug;
  2096. });
  2097. } else {
  2098. try {
  2099. if (root.getSlug || root.createSlug) {
  2100. throw "speakingurl: globals exists /(getSlug|createSlug)/";
  2101. } else {
  2102. root.getSlug = getSlug;
  2103. root.createSlug = createSlug;
  2104. }
  2105. } catch (e) {
  2106. }
  2107. }
  2108. })(exports);
  2109. }
  2110. });
  2111. var require_speakingurl2 = __commonJS2({
  2112. "../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(exports, module) {
  2113. "use strict";
  2114. init_esm_shims2();
  2115. module.exports = require_speakingurl();
  2116. }
  2117. });
  2118. init_esm_shims2();
  2119. init_esm_shims2();
  2120. init_esm_shims2();
  2121. init_esm_shims2();
  2122. init_esm_shims2();
  2123. init_esm_shims2();
  2124. init_esm_shims2();
  2125. init_esm_shims2();
  2126. function getComponentTypeName(options) {
  2127. var _a25;
  2128. const name = options.name || options._componentTag || options.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ || options.__name;
  2129. if (name === "index" && ((_a25 = options.__file) == null ? void 0 : _a25.endsWith("index.vue"))) {
  2130. return "";
  2131. }
  2132. return name;
  2133. }
  2134. function getComponentFileName(options) {
  2135. const file = options.__file;
  2136. if (file)
  2137. return classify(basename(file, ".vue"));
  2138. }
  2139. function saveComponentGussedName(instance, name) {
  2140. instance.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ = name;
  2141. return name;
  2142. }
  2143. function getAppRecord(instance) {
  2144. if (instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__)
  2145. return instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
  2146. else if (instance.root)
  2147. return instance.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
  2148. }
  2149. function isFragment(instance) {
  2150. var _a25, _b25;
  2151. const subTreeType = (_a25 = instance.subTree) == null ? void 0 : _a25.type;
  2152. const appRecord = getAppRecord(instance);
  2153. if (appRecord) {
  2154. return ((_b25 = appRecord == null ? void 0 : appRecord.types) == null ? void 0 : _b25.Fragment) === subTreeType;
  2155. }
  2156. return false;
  2157. }
  2158. function getInstanceName(instance) {
  2159. var _a25, _b25, _c;
  2160. const name = getComponentTypeName((instance == null ? void 0 : instance.type) || {});
  2161. if (name)
  2162. return name;
  2163. if ((instance == null ? void 0 : instance.root) === instance)
  2164. return "Root";
  2165. for (const key in (_b25 = (_a25 = instance.parent) == null ? void 0 : _a25.type) == null ? void 0 : _b25.components) {
  2166. if (instance.parent.type.components[key] === (instance == null ? void 0 : instance.type))
  2167. return saveComponentGussedName(instance, key);
  2168. }
  2169. for (const key in (_c = instance.appContext) == null ? void 0 : _c.components) {
  2170. if (instance.appContext.components[key] === (instance == null ? void 0 : instance.type))
  2171. return saveComponentGussedName(instance, key);
  2172. }
  2173. const fileName = getComponentFileName((instance == null ? void 0 : instance.type) || {});
  2174. if (fileName)
  2175. return fileName;
  2176. return "Anonymous Component";
  2177. }
  2178. function getUniqueComponentId(instance) {
  2179. var _a25, _b25, _c;
  2180. const appId = (_c = (_b25 = (_a25 = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a25.app) == null ? void 0 : _b25.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__) != null ? _c : 0;
  2181. const instanceId = instance === (instance == null ? void 0 : instance.root) ? "root" : instance.uid;
  2182. return `${appId}:${instanceId}`;
  2183. }
  2184. function getComponentInstance(appRecord, instanceId) {
  2185. instanceId = instanceId || `${appRecord.id}:root`;
  2186. const instance = appRecord.instanceMap.get(instanceId);
  2187. return instance || appRecord.instanceMap.get(":root");
  2188. }
  2189. function createRect() {
  2190. const rect = {
  2191. top: 0,
  2192. bottom: 0,
  2193. left: 0,
  2194. right: 0,
  2195. get width() {
  2196. return rect.right - rect.left;
  2197. },
  2198. get height() {
  2199. return rect.bottom - rect.top;
  2200. }
  2201. };
  2202. return rect;
  2203. }
  2204. var range;
  2205. function getTextRect(node) {
  2206. if (!range)
  2207. range = document.createRange();
  2208. range.selectNode(node);
  2209. return range.getBoundingClientRect();
  2210. }
  2211. function getFragmentRect(vnode) {
  2212. const rect = createRect();
  2213. if (!vnode.children)
  2214. return rect;
  2215. for (let i = 0, l = vnode.children.length; i < l; i++) {
  2216. const childVnode = vnode.children[i];
  2217. let childRect;
  2218. if (childVnode.component) {
  2219. childRect = getComponentBoundingRect(childVnode.component);
  2220. } else if (childVnode.el) {
  2221. const el = childVnode.el;
  2222. if (el.nodeType === 1 || el.getBoundingClientRect)
  2223. childRect = el.getBoundingClientRect();
  2224. else if (el.nodeType === 3 && el.data.trim())
  2225. childRect = getTextRect(el);
  2226. }
  2227. if (childRect)
  2228. mergeRects(rect, childRect);
  2229. }
  2230. return rect;
  2231. }
  2232. function mergeRects(a, b) {
  2233. if (!a.top || b.top < a.top)
  2234. a.top = b.top;
  2235. if (!a.bottom || b.bottom > a.bottom)
  2236. a.bottom = b.bottom;
  2237. if (!a.left || b.left < a.left)
  2238. a.left = b.left;
  2239. if (!a.right || b.right > a.right)
  2240. a.right = b.right;
  2241. return a;
  2242. }
  2243. var DEFAULT_RECT = {
  2244. top: 0,
  2245. left: 0,
  2246. right: 0,
  2247. bottom: 0,
  2248. width: 0,
  2249. height: 0
  2250. };
  2251. function getComponentBoundingRect(instance) {
  2252. const el = instance.subTree.el;
  2253. if (typeof window === "undefined") {
  2254. return DEFAULT_RECT;
  2255. }
  2256. if (isFragment(instance))
  2257. return getFragmentRect(instance.subTree);
  2258. else if ((el == null ? void 0 : el.nodeType) === 1)
  2259. return el == null ? void 0 : el.getBoundingClientRect();
  2260. else if (instance.subTree.component)
  2261. return getComponentBoundingRect(instance.subTree.component);
  2262. else
  2263. return DEFAULT_RECT;
  2264. }
  2265. init_esm_shims2();
  2266. function getRootElementsFromComponentInstance(instance) {
  2267. if (isFragment(instance))
  2268. return getFragmentRootElements(instance.subTree);
  2269. if (!instance.subTree)
  2270. return [];
  2271. return [instance.subTree.el];
  2272. }
  2273. function getFragmentRootElements(vnode) {
  2274. if (!vnode.children)
  2275. return [];
  2276. const list = [];
  2277. vnode.children.forEach((childVnode) => {
  2278. if (childVnode.component)
  2279. list.push(...getRootElementsFromComponentInstance(childVnode.component));
  2280. else if (childVnode == null ? void 0 : childVnode.el)
  2281. list.push(childVnode.el);
  2282. });
  2283. return list;
  2284. }
  2285. var CONTAINER_ELEMENT_ID = "__vue-devtools-component-inspector__";
  2286. var CARD_ELEMENT_ID = "__vue-devtools-component-inspector__card__";
  2287. var COMPONENT_NAME_ELEMENT_ID = "__vue-devtools-component-inspector__name__";
  2288. var INDICATOR_ELEMENT_ID = "__vue-devtools-component-inspector__indicator__";
  2289. var containerStyles = {
  2290. display: "block",
  2291. zIndex: 2147483640,
  2292. position: "fixed",
  2293. backgroundColor: "#42b88325",
  2294. border: "1px solid #42b88350",
  2295. borderRadius: "5px",
  2296. transition: "all 0.1s ease-in",
  2297. pointerEvents: "none"
  2298. };
  2299. var cardStyles = {
  2300. fontFamily: "Arial, Helvetica, sans-serif",
  2301. padding: "5px 8px",
  2302. borderRadius: "4px",
  2303. textAlign: "left",
  2304. position: "absolute",
  2305. left: 0,
  2306. color: "#e9e9e9",
  2307. fontSize: "14px",
  2308. fontWeight: 600,
  2309. lineHeight: "24px",
  2310. backgroundColor: "#42b883",
  2311. boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"
  2312. };
  2313. var indicatorStyles = {
  2314. display: "inline-block",
  2315. fontWeight: 400,
  2316. fontStyle: "normal",
  2317. fontSize: "12px",
  2318. opacity: 0.7
  2319. };
  2320. function getContainerElement() {
  2321. return document.getElementById(CONTAINER_ELEMENT_ID);
  2322. }
  2323. function getCardElement() {
  2324. return document.getElementById(CARD_ELEMENT_ID);
  2325. }
  2326. function getIndicatorElement() {
  2327. return document.getElementById(INDICATOR_ELEMENT_ID);
  2328. }
  2329. function getNameElement() {
  2330. return document.getElementById(COMPONENT_NAME_ELEMENT_ID);
  2331. }
  2332. function getStyles(bounds) {
  2333. return {
  2334. left: `${Math.round(bounds.left * 100) / 100}px`,
  2335. top: `${Math.round(bounds.top * 100) / 100}px`,
  2336. width: `${Math.round(bounds.width * 100) / 100}px`,
  2337. height: `${Math.round(bounds.height * 100) / 100}px`
  2338. };
  2339. }
  2340. function create(options) {
  2341. var _a25;
  2342. const containerEl = document.createElement("div");
  2343. containerEl.id = (_a25 = options.elementId) != null ? _a25 : CONTAINER_ELEMENT_ID;
  2344. Object.assign(containerEl.style, {
  2345. ...containerStyles,
  2346. ...getStyles(options.bounds),
  2347. ...options.style
  2348. });
  2349. const cardEl = document.createElement("span");
  2350. cardEl.id = CARD_ELEMENT_ID;
  2351. Object.assign(cardEl.style, {
  2352. ...cardStyles,
  2353. top: options.bounds.top < 35 ? 0 : "-35px"
  2354. });
  2355. const nameEl = document.createElement("span");
  2356. nameEl.id = COMPONENT_NAME_ELEMENT_ID;
  2357. nameEl.innerHTML = `&lt;${options.name}&gt;&nbsp;&nbsp;`;
  2358. const indicatorEl = document.createElement("i");
  2359. indicatorEl.id = INDICATOR_ELEMENT_ID;
  2360. indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
  2361. Object.assign(indicatorEl.style, indicatorStyles);
  2362. cardEl.appendChild(nameEl);
  2363. cardEl.appendChild(indicatorEl);
  2364. containerEl.appendChild(cardEl);
  2365. document.body.appendChild(containerEl);
  2366. return containerEl;
  2367. }
  2368. function update(options) {
  2369. const containerEl = getContainerElement();
  2370. const cardEl = getCardElement();
  2371. const nameEl = getNameElement();
  2372. const indicatorEl = getIndicatorElement();
  2373. if (containerEl) {
  2374. Object.assign(containerEl.style, {
  2375. ...containerStyles,
  2376. ...getStyles(options.bounds)
  2377. });
  2378. Object.assign(cardEl.style, {
  2379. top: options.bounds.top < 35 ? 0 : "-35px"
  2380. });
  2381. nameEl.innerHTML = `&lt;${options.name}&gt;&nbsp;&nbsp;`;
  2382. indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
  2383. }
  2384. }
  2385. function highlight(instance) {
  2386. const bounds = getComponentBoundingRect(instance);
  2387. if (!bounds.width && !bounds.height)
  2388. return;
  2389. const name = getInstanceName(instance);
  2390. const container = getContainerElement();
  2391. container ? update({ bounds, name }) : create({ bounds, name });
  2392. }
  2393. function unhighlight() {
  2394. const el = getContainerElement();
  2395. if (el)
  2396. el.style.display = "none";
  2397. }
  2398. var inspectInstance = null;
  2399. function inspectFn(e) {
  2400. const target22 = e.target;
  2401. if (target22) {
  2402. const instance = target22.__vueParentComponent;
  2403. if (instance) {
  2404. inspectInstance = instance;
  2405. const el = instance.vnode.el;
  2406. if (el) {
  2407. const bounds = getComponentBoundingRect(instance);
  2408. const name = getInstanceName(instance);
  2409. const container = getContainerElement();
  2410. container ? update({ bounds, name }) : create({ bounds, name });
  2411. }
  2412. }
  2413. }
  2414. }
  2415. function selectComponentFn(e, cb) {
  2416. e.preventDefault();
  2417. e.stopPropagation();
  2418. if (inspectInstance) {
  2419. const uniqueComponentId = getUniqueComponentId(inspectInstance);
  2420. cb(uniqueComponentId);
  2421. }
  2422. }
  2423. var inspectComponentHighLighterSelectFn = null;
  2424. function cancelInspectComponentHighLighter() {
  2425. unhighlight();
  2426. window.removeEventListener("mouseover", inspectFn);
  2427. window.removeEventListener("click", inspectComponentHighLighterSelectFn, true);
  2428. inspectComponentHighLighterSelectFn = null;
  2429. }
  2430. function inspectComponentHighLighter() {
  2431. window.addEventListener("mouseover", inspectFn);
  2432. return new Promise((resolve) => {
  2433. function onSelect(e) {
  2434. e.preventDefault();
  2435. e.stopPropagation();
  2436. selectComponentFn(e, (id) => {
  2437. window.removeEventListener("click", onSelect, true);
  2438. inspectComponentHighLighterSelectFn = null;
  2439. window.removeEventListener("mouseover", inspectFn);
  2440. const el = getContainerElement();
  2441. if (el)
  2442. el.style.display = "none";
  2443. resolve(JSON.stringify({ id }));
  2444. });
  2445. }
  2446. inspectComponentHighLighterSelectFn = onSelect;
  2447. window.addEventListener("click", onSelect, true);
  2448. });
  2449. }
  2450. function scrollToComponent(options) {
  2451. const instance = getComponentInstance(activeAppRecord.value, options.id);
  2452. if (instance) {
  2453. const [el] = getRootElementsFromComponentInstance(instance);
  2454. if (typeof el.scrollIntoView === "function") {
  2455. el.scrollIntoView({
  2456. behavior: "smooth"
  2457. });
  2458. } else {
  2459. const bounds = getComponentBoundingRect(instance);
  2460. const scrollTarget = document.createElement("div");
  2461. const styles = {
  2462. ...getStyles(bounds),
  2463. position: "absolute"
  2464. };
  2465. Object.assign(scrollTarget.style, styles);
  2466. document.body.appendChild(scrollTarget);
  2467. scrollTarget.scrollIntoView({
  2468. behavior: "smooth"
  2469. });
  2470. setTimeout(() => {
  2471. document.body.removeChild(scrollTarget);
  2472. }, 2e3);
  2473. }
  2474. setTimeout(() => {
  2475. const bounds = getComponentBoundingRect(instance);
  2476. if (bounds.width || bounds.height) {
  2477. const name = getInstanceName(instance);
  2478. const el2 = getContainerElement();
  2479. el2 ? update({ ...options, name, bounds }) : create({ ...options, name, bounds });
  2480. setTimeout(() => {
  2481. if (el2)
  2482. el2.style.display = "none";
  2483. }, 1500);
  2484. }
  2485. }, 1200);
  2486. }
  2487. }
  2488. init_esm_shims2();
  2489. var _a2;
  2490. var _b;
  2491. (_b = (_a2 = target).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__) != null ? _b : _a2.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = true;
  2492. function waitForInspectorInit(cb) {
  2493. let total = 0;
  2494. const timer = setInterval(() => {
  2495. if (target.__VUE_INSPECTOR__) {
  2496. clearInterval(timer);
  2497. total += 30;
  2498. cb();
  2499. }
  2500. if (total >= /* 5s */
  2501. 5e3)
  2502. clearInterval(timer);
  2503. }, 30);
  2504. }
  2505. function setupInspector() {
  2506. const inspector = target.__VUE_INSPECTOR__;
  2507. const _openInEditor = inspector.openInEditor;
  2508. inspector.openInEditor = async (...params) => {
  2509. inspector.disable();
  2510. _openInEditor(...params);
  2511. };
  2512. }
  2513. function getComponentInspector() {
  2514. return new Promise((resolve) => {
  2515. function setup() {
  2516. setupInspector();
  2517. resolve(target.__VUE_INSPECTOR__);
  2518. }
  2519. if (!target.__VUE_INSPECTOR__) {
  2520. waitForInspectorInit(() => {
  2521. setup();
  2522. });
  2523. } else {
  2524. setup();
  2525. }
  2526. });
  2527. }
  2528. init_esm_shims2();
  2529. init_esm_shims2();
  2530. function isReadonly(value) {
  2531. return !!(value && value[
  2532. "__v_isReadonly"
  2533. /* IS_READONLY */
  2534. ]);
  2535. }
  2536. function isReactive2(value) {
  2537. if (isReadonly(value)) {
  2538. return isReactive2(value[
  2539. "__v_raw"
  2540. /* RAW */
  2541. ]);
  2542. }
  2543. return !!(value && value[
  2544. "__v_isReactive"
  2545. /* IS_REACTIVE */
  2546. ]);
  2547. }
  2548. function isRef2(r) {
  2549. return !!(r && r.__v_isRef === true);
  2550. }
  2551. function toRaw2(observed) {
  2552. const raw = observed && observed[
  2553. "__v_raw"
  2554. /* RAW */
  2555. ];
  2556. return raw ? toRaw2(raw) : observed;
  2557. }
  2558. var Fragment = Symbol.for("v-fgt");
  2559. var StateEditor = class {
  2560. constructor() {
  2561. this.refEditor = new RefStateEditor();
  2562. }
  2563. set(object, path, value, cb) {
  2564. const sections = Array.isArray(path) ? path : path.split(".");
  2565. const markRef = false;
  2566. while (sections.length > 1) {
  2567. const section = sections.shift();
  2568. if (object instanceof Map)
  2569. object = object.get(section);
  2570. else if (object instanceof Set)
  2571. object = Array.from(object.values())[section];
  2572. else
  2573. object = object[section];
  2574. if (this.refEditor.isRef(object))
  2575. object = this.refEditor.get(object);
  2576. }
  2577. const field = sections[0];
  2578. const item = this.refEditor.get(object)[field];
  2579. if (cb) {
  2580. cb(object, field, value);
  2581. } else {
  2582. if (this.refEditor.isRef(item))
  2583. this.refEditor.set(item, value);
  2584. else if (markRef)
  2585. object[field] = value;
  2586. else
  2587. object[field] = value;
  2588. }
  2589. }
  2590. get(object, path) {
  2591. const sections = Array.isArray(path) ? path : path.split(".");
  2592. for (let i = 0; i < sections.length; i++) {
  2593. if (object instanceof Map)
  2594. object = object.get(sections[i]);
  2595. else
  2596. object = object[sections[i]];
  2597. if (this.refEditor.isRef(object))
  2598. object = this.refEditor.get(object);
  2599. if (!object)
  2600. return void 0;
  2601. }
  2602. return object;
  2603. }
  2604. has(object, path, parent = false) {
  2605. if (typeof object === "undefined")
  2606. return false;
  2607. const sections = Array.isArray(path) ? path.slice() : path.split(".");
  2608. const size = !parent ? 1 : 2;
  2609. while (object && sections.length > size) {
  2610. const section = sections.shift();
  2611. object = object[section];
  2612. if (this.refEditor.isRef(object))
  2613. object = this.refEditor.get(object);
  2614. }
  2615. return object != null && Object.prototype.hasOwnProperty.call(object, sections[0]);
  2616. }
  2617. createDefaultSetCallback(state) {
  2618. return (object, field, value) => {
  2619. if (state.remove || state.newKey) {
  2620. if (Array.isArray(object))
  2621. object.splice(field, 1);
  2622. else if (toRaw2(object) instanceof Map)
  2623. object.delete(field);
  2624. else if (toRaw2(object) instanceof Set)
  2625. object.delete(Array.from(object.values())[field]);
  2626. else
  2627. Reflect.deleteProperty(object, field);
  2628. }
  2629. if (!state.remove) {
  2630. const target22 = object[state.newKey || field];
  2631. if (this.refEditor.isRef(target22))
  2632. this.refEditor.set(target22, value);
  2633. else if (toRaw2(object) instanceof Map)
  2634. object.set(state.newKey || field, value);
  2635. else if (toRaw2(object) instanceof Set)
  2636. object.add(value);
  2637. else
  2638. object[state.newKey || field] = value;
  2639. }
  2640. };
  2641. }
  2642. };
  2643. var RefStateEditor = class {
  2644. set(ref2, value) {
  2645. if (isRef2(ref2)) {
  2646. ref2.value = value;
  2647. } else {
  2648. if (ref2 instanceof Set && Array.isArray(value)) {
  2649. ref2.clear();
  2650. value.forEach((v) => ref2.add(v));
  2651. return;
  2652. }
  2653. const currentKeys = Object.keys(value);
  2654. if (ref2 instanceof Map) {
  2655. const previousKeysSet2 = new Set(ref2.keys());
  2656. currentKeys.forEach((key) => {
  2657. ref2.set(key, Reflect.get(value, key));
  2658. previousKeysSet2.delete(key);
  2659. });
  2660. previousKeysSet2.forEach((key) => ref2.delete(key));
  2661. return;
  2662. }
  2663. const previousKeysSet = new Set(Object.keys(ref2));
  2664. currentKeys.forEach((key) => {
  2665. Reflect.set(ref2, key, Reflect.get(value, key));
  2666. previousKeysSet.delete(key);
  2667. });
  2668. previousKeysSet.forEach((key) => Reflect.deleteProperty(ref2, key));
  2669. }
  2670. }
  2671. get(ref2) {
  2672. return isRef2(ref2) ? ref2.value : ref2;
  2673. }
  2674. isRef(ref2) {
  2675. return isRef2(ref2) || isReactive2(ref2);
  2676. }
  2677. };
  2678. var stateEditor = new StateEditor();
  2679. init_esm_shims2();
  2680. init_esm_shims2();
  2681. init_esm_shims2();
  2682. var TIMELINE_LAYERS_STATE_STORAGE_ID = "__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";
  2683. function getTimelineLayersStateFromStorage() {
  2684. if (typeof window === "undefined" || !isBrowser || typeof localStorage === "undefined" || localStorage === null) {
  2685. return {
  2686. recordingState: false,
  2687. mouseEventEnabled: false,
  2688. keyboardEventEnabled: false,
  2689. componentEventEnabled: false,
  2690. performanceEventEnabled: false,
  2691. selected: ""
  2692. };
  2693. }
  2694. const state = typeof localStorage.getItem !== "undefined" ? localStorage.getItem(TIMELINE_LAYERS_STATE_STORAGE_ID) : null;
  2695. return state ? JSON.parse(state) : {
  2696. recordingState: false,
  2697. mouseEventEnabled: false,
  2698. keyboardEventEnabled: false,
  2699. componentEventEnabled: false,
  2700. performanceEventEnabled: false,
  2701. selected: ""
  2702. };
  2703. }
  2704. init_esm_shims2();
  2705. init_esm_shims2();
  2706. init_esm_shims2();
  2707. var _a22;
  2708. var _b2;
  2709. (_b2 = (_a22 = target).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS) != null ? _b2 : _a22.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS = [];
  2710. var devtoolsTimelineLayers = new Proxy(target.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS, {
  2711. get(target22, prop, receiver) {
  2712. return Reflect.get(target22, prop, receiver);
  2713. }
  2714. });
  2715. function addTimelineLayer(options, descriptor) {
  2716. devtoolsState.timelineLayersState[descriptor.id] = false;
  2717. devtoolsTimelineLayers.push({
  2718. ...options,
  2719. descriptorId: descriptor.id,
  2720. appRecord: getAppRecord(descriptor.app)
  2721. });
  2722. }
  2723. var _a3;
  2724. var _b3;
  2725. (_b3 = (_a3 = target).__VUE_DEVTOOLS_KIT_INSPECTOR__) != null ? _b3 : _a3.__VUE_DEVTOOLS_KIT_INSPECTOR__ = [];
  2726. var devtoolsInspector = new Proxy(target.__VUE_DEVTOOLS_KIT_INSPECTOR__, {
  2727. get(target22, prop, receiver) {
  2728. return Reflect.get(target22, prop, receiver);
  2729. }
  2730. });
  2731. var callInspectorUpdatedHook = debounce(() => {
  2732. devtoolsContext.hooks.callHook("sendInspectorToClient", getActiveInspectors());
  2733. });
  2734. function addInspector(inspector, descriptor) {
  2735. var _a25, _b25;
  2736. devtoolsInspector.push({
  2737. options: inspector,
  2738. descriptor,
  2739. treeFilterPlaceholder: (_a25 = inspector.treeFilterPlaceholder) != null ? _a25 : "Search tree...",
  2740. stateFilterPlaceholder: (_b25 = inspector.stateFilterPlaceholder) != null ? _b25 : "Search state...",
  2741. treeFilter: "",
  2742. selectedNodeId: "",
  2743. appRecord: getAppRecord(descriptor.app)
  2744. });
  2745. callInspectorUpdatedHook();
  2746. }
  2747. function getActiveInspectors() {
  2748. return devtoolsInspector.filter((inspector) => inspector.descriptor.app === activeAppRecord.value.app).filter((inspector) => inspector.descriptor.id !== "components").map((inspector) => {
  2749. var _a25;
  2750. const descriptor = inspector.descriptor;
  2751. const options = inspector.options;
  2752. return {
  2753. id: options.id,
  2754. label: options.label,
  2755. logo: descriptor.logo,
  2756. icon: `custom-ic-baseline-${(_a25 = options == null ? void 0 : options.icon) == null ? void 0 : _a25.replace(/_/g, "-")}`,
  2757. packageName: descriptor.packageName,
  2758. homepage: descriptor.homepage,
  2759. pluginId: descriptor.id
  2760. };
  2761. });
  2762. }
  2763. function getInspector(id, app) {
  2764. return devtoolsInspector.find((inspector) => inspector.options.id === id && (app ? inspector.descriptor.app === app : true));
  2765. }
  2766. var DevToolsV6PluginAPIHookKeys = ((DevToolsV6PluginAPIHookKeys2) => {
  2767. DevToolsV6PluginAPIHookKeys2["VISIT_COMPONENT_TREE"] = "visitComponentTree";
  2768. DevToolsV6PluginAPIHookKeys2["INSPECT_COMPONENT"] = "inspectComponent";
  2769. DevToolsV6PluginAPIHookKeys2["EDIT_COMPONENT_STATE"] = "editComponentState";
  2770. DevToolsV6PluginAPIHookKeys2["GET_INSPECTOR_TREE"] = "getInspectorTree";
  2771. DevToolsV6PluginAPIHookKeys2["GET_INSPECTOR_STATE"] = "getInspectorState";
  2772. DevToolsV6PluginAPIHookKeys2["EDIT_INSPECTOR_STATE"] = "editInspectorState";
  2773. DevToolsV6PluginAPIHookKeys2["INSPECT_TIMELINE_EVENT"] = "inspectTimelineEvent";
  2774. DevToolsV6PluginAPIHookKeys2["TIMELINE_CLEARED"] = "timelineCleared";
  2775. DevToolsV6PluginAPIHookKeys2["SET_PLUGIN_SETTINGS"] = "setPluginSettings";
  2776. return DevToolsV6PluginAPIHookKeys2;
  2777. })(DevToolsV6PluginAPIHookKeys || {});
  2778. var DevToolsContextHookKeys = ((DevToolsContextHookKeys2) => {
  2779. DevToolsContextHookKeys2["ADD_INSPECTOR"] = "addInspector";
  2780. DevToolsContextHookKeys2["SEND_INSPECTOR_TREE"] = "sendInspectorTree";
  2781. DevToolsContextHookKeys2["SEND_INSPECTOR_STATE"] = "sendInspectorState";
  2782. DevToolsContextHookKeys2["CUSTOM_INSPECTOR_SELECT_NODE"] = "customInspectorSelectNode";
  2783. DevToolsContextHookKeys2["TIMELINE_LAYER_ADDED"] = "timelineLayerAdded";
  2784. DevToolsContextHookKeys2["TIMELINE_EVENT_ADDED"] = "timelineEventAdded";
  2785. DevToolsContextHookKeys2["GET_COMPONENT_INSTANCES"] = "getComponentInstances";
  2786. DevToolsContextHookKeys2["GET_COMPONENT_BOUNDS"] = "getComponentBounds";
  2787. DevToolsContextHookKeys2["GET_COMPONENT_NAME"] = "getComponentName";
  2788. DevToolsContextHookKeys2["COMPONENT_HIGHLIGHT"] = "componentHighlight";
  2789. DevToolsContextHookKeys2["COMPONENT_UNHIGHLIGHT"] = "componentUnhighlight";
  2790. return DevToolsContextHookKeys2;
  2791. })(DevToolsContextHookKeys || {});
  2792. var DevToolsMessagingHookKeys = ((DevToolsMessagingHookKeys2) => {
  2793. DevToolsMessagingHookKeys2["SEND_INSPECTOR_TREE_TO_CLIENT"] = "sendInspectorTreeToClient";
  2794. DevToolsMessagingHookKeys2["SEND_INSPECTOR_STATE_TO_CLIENT"] = "sendInspectorStateToClient";
  2795. DevToolsMessagingHookKeys2["SEND_TIMELINE_EVENT_TO_CLIENT"] = "sendTimelineEventToClient";
  2796. DevToolsMessagingHookKeys2["SEND_INSPECTOR_TO_CLIENT"] = "sendInspectorToClient";
  2797. DevToolsMessagingHookKeys2["SEND_ACTIVE_APP_UNMOUNTED_TO_CLIENT"] = "sendActiveAppUpdatedToClient";
  2798. DevToolsMessagingHookKeys2["DEVTOOLS_STATE_UPDATED"] = "devtoolsStateUpdated";
  2799. DevToolsMessagingHookKeys2["DEVTOOLS_CONNECTED_UPDATED"] = "devtoolsConnectedUpdated";
  2800. DevToolsMessagingHookKeys2["ROUTER_INFO_UPDATED"] = "routerInfoUpdated";
  2801. return DevToolsMessagingHookKeys2;
  2802. })(DevToolsMessagingHookKeys || {});
  2803. function createDevToolsCtxHooks() {
  2804. const hooks2 = createHooks();
  2805. hooks2.hook("addInspector", ({ inspector, plugin }) => {
  2806. addInspector(inspector, plugin.descriptor);
  2807. });
  2808. const debounceSendInspectorTree = debounce(async ({ inspectorId, plugin }) => {
  2809. var _a25;
  2810. if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app) || devtoolsState.highPerfModeEnabled)
  2811. return;
  2812. const inspector = getInspector(inspectorId, plugin.descriptor.app);
  2813. const _payload = {
  2814. app: plugin.descriptor.app,
  2815. inspectorId,
  2816. filter: (inspector == null ? void 0 : inspector.treeFilter) || "",
  2817. rootNodes: []
  2818. };
  2819. await new Promise((resolve) => {
  2820. hooks2.callHookWith(
  2821. async (callbacks) => {
  2822. await Promise.all(callbacks.map((cb) => cb(_payload)));
  2823. resolve();
  2824. },
  2825. "getInspectorTree"
  2826. /* GET_INSPECTOR_TREE */
  2827. );
  2828. });
  2829. hooks2.callHookWith(
  2830. async (callbacks) => {
  2831. await Promise.all(callbacks.map((cb) => cb({
  2832. inspectorId,
  2833. rootNodes: _payload.rootNodes
  2834. })));
  2835. },
  2836. "sendInspectorTreeToClient"
  2837. /* SEND_INSPECTOR_TREE_TO_CLIENT */
  2838. );
  2839. }, 120);
  2840. hooks2.hook("sendInspectorTree", debounceSendInspectorTree);
  2841. const debounceSendInspectorState = debounce(async ({ inspectorId, plugin }) => {
  2842. var _a25;
  2843. if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app) || devtoolsState.highPerfModeEnabled)
  2844. return;
  2845. const inspector = getInspector(inspectorId, plugin.descriptor.app);
  2846. const _payload = {
  2847. app: plugin.descriptor.app,
  2848. inspectorId,
  2849. nodeId: (inspector == null ? void 0 : inspector.selectedNodeId) || "",
  2850. state: null
  2851. };
  2852. const ctx = {
  2853. currentTab: `custom-inspector:${inspectorId}`
  2854. };
  2855. if (_payload.nodeId) {
  2856. await new Promise((resolve) => {
  2857. hooks2.callHookWith(
  2858. async (callbacks) => {
  2859. await Promise.all(callbacks.map((cb) => cb(_payload, ctx)));
  2860. resolve();
  2861. },
  2862. "getInspectorState"
  2863. /* GET_INSPECTOR_STATE */
  2864. );
  2865. });
  2866. }
  2867. hooks2.callHookWith(
  2868. async (callbacks) => {
  2869. await Promise.all(callbacks.map((cb) => cb({
  2870. inspectorId,
  2871. nodeId: _payload.nodeId,
  2872. state: _payload.state
  2873. })));
  2874. },
  2875. "sendInspectorStateToClient"
  2876. /* SEND_INSPECTOR_STATE_TO_CLIENT */
  2877. );
  2878. }, 120);
  2879. hooks2.hook("sendInspectorState", debounceSendInspectorState);
  2880. hooks2.hook("customInspectorSelectNode", ({ inspectorId, nodeId, plugin }) => {
  2881. const inspector = getInspector(inspectorId, plugin.descriptor.app);
  2882. if (!inspector)
  2883. return;
  2884. inspector.selectedNodeId = nodeId;
  2885. });
  2886. hooks2.hook("timelineLayerAdded", ({ options, plugin }) => {
  2887. addTimelineLayer(options, plugin.descriptor);
  2888. });
  2889. hooks2.hook("timelineEventAdded", ({ options, plugin }) => {
  2890. var _a25;
  2891. const internalLayerIds = ["performance", "component-event", "keyboard", "mouse"];
  2892. if (devtoolsState.highPerfModeEnabled || !((_a25 = devtoolsState.timelineLayersState) == null ? void 0 : _a25[plugin.descriptor.id]) && !internalLayerIds.includes(options.layerId))
  2893. return;
  2894. hooks2.callHookWith(
  2895. async (callbacks) => {
  2896. await Promise.all(callbacks.map((cb) => cb(options)));
  2897. },
  2898. "sendTimelineEventToClient"
  2899. /* SEND_TIMELINE_EVENT_TO_CLIENT */
  2900. );
  2901. });
  2902. hooks2.hook("getComponentInstances", async ({ app }) => {
  2903. const appRecord = app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
  2904. if (!appRecord)
  2905. return null;
  2906. const appId = appRecord.id.toString();
  2907. const instances = [...appRecord.instanceMap].filter(([key]) => key.split(":")[0] === appId).map(([, instance]) => instance);
  2908. return instances;
  2909. });
  2910. hooks2.hook("getComponentBounds", async ({ instance }) => {
  2911. const bounds = getComponentBoundingRect(instance);
  2912. return bounds;
  2913. });
  2914. hooks2.hook("getComponentName", ({ instance }) => {
  2915. const name = getInstanceName(instance);
  2916. return name;
  2917. });
  2918. hooks2.hook("componentHighlight", ({ uid }) => {
  2919. const instance = activeAppRecord.value.instanceMap.get(uid);
  2920. if (instance) {
  2921. highlight(instance);
  2922. }
  2923. });
  2924. hooks2.hook("componentUnhighlight", () => {
  2925. unhighlight();
  2926. });
  2927. return hooks2;
  2928. }
  2929. var _a4;
  2930. var _b4;
  2931. (_b4 = (_a4 = target).__VUE_DEVTOOLS_KIT_APP_RECORDS__) != null ? _b4 : _a4.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = [];
  2932. var _a5;
  2933. var _b5;
  2934. (_b5 = (_a5 = target).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__) != null ? _b5 : _a5.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = {};
  2935. var _a6;
  2936. var _b6;
  2937. (_b6 = (_a6 = target).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__) != null ? _b6 : _a6.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = "";
  2938. var _a7;
  2939. var _b7;
  2940. (_b7 = (_a7 = target).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__) != null ? _b7 : _a7.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ = [];
  2941. var _a8;
  2942. var _b8;
  2943. (_b8 = (_a8 = target).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__) != null ? _b8 : _a8.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ = [];
  2944. var STATE_KEY = "__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";
  2945. function initStateFactory() {
  2946. return {
  2947. connected: false,
  2948. clientConnected: false,
  2949. vitePluginDetected: true,
  2950. appRecords: [],
  2951. activeAppRecordId: "",
  2952. tabs: [],
  2953. commands: [],
  2954. highPerfModeEnabled: true,
  2955. devtoolsClientDetected: {},
  2956. perfUniqueGroupId: 0,
  2957. timelineLayersState: getTimelineLayersStateFromStorage()
  2958. };
  2959. }
  2960. var _a9;
  2961. var _b9;
  2962. (_b9 = (_a9 = target)[STATE_KEY]) != null ? _b9 : _a9[STATE_KEY] = initStateFactory();
  2963. var callStateUpdatedHook = debounce((state) => {
  2964. devtoolsContext.hooks.callHook("devtoolsStateUpdated", { state });
  2965. });
  2966. var callConnectedUpdatedHook = debounce((state, oldState) => {
  2967. devtoolsContext.hooks.callHook("devtoolsConnectedUpdated", { state, oldState });
  2968. });
  2969. var devtoolsAppRecords = new Proxy(target.__VUE_DEVTOOLS_KIT_APP_RECORDS__, {
  2970. get(_target, prop, receiver) {
  2971. if (prop === "value")
  2972. return target.__VUE_DEVTOOLS_KIT_APP_RECORDS__;
  2973. return target.__VUE_DEVTOOLS_KIT_APP_RECORDS__[prop];
  2974. }
  2975. });
  2976. var activeAppRecord = new Proxy(target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__, {
  2977. get(_target, prop, receiver) {
  2978. if (prop === "value")
  2979. return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__;
  2980. else if (prop === "id")
  2981. return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__;
  2982. return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[prop];
  2983. }
  2984. });
  2985. function updateAllStates() {
  2986. callStateUpdatedHook({
  2987. ...target[STATE_KEY],
  2988. appRecords: devtoolsAppRecords.value,
  2989. activeAppRecordId: activeAppRecord.id,
  2990. tabs: target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,
  2991. commands: target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__
  2992. });
  2993. }
  2994. function setActiveAppRecord(app) {
  2995. target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = app;
  2996. updateAllStates();
  2997. }
  2998. function setActiveAppRecordId(id) {
  2999. target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = id;
  3000. updateAllStates();
  3001. }
  3002. var devtoolsState = new Proxy(target[STATE_KEY], {
  3003. get(target22, property) {
  3004. if (property === "appRecords") {
  3005. return devtoolsAppRecords;
  3006. } else if (property === "activeAppRecordId") {
  3007. return activeAppRecord.id;
  3008. } else if (property === "tabs") {
  3009. return target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;
  3010. } else if (property === "commands") {
  3011. return target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
  3012. }
  3013. return target[STATE_KEY][property];
  3014. },
  3015. deleteProperty(target22, property) {
  3016. delete target22[property];
  3017. return true;
  3018. },
  3019. set(target22, property, value) {
  3020. const oldState = { ...target[STATE_KEY] };
  3021. target22[property] = value;
  3022. target[STATE_KEY][property] = value;
  3023. return true;
  3024. }
  3025. });
  3026. function openInEditor(options = {}) {
  3027. var _a25, _b25, _c;
  3028. const { file, host, baseUrl = window.location.origin, line = 0, column = 0 } = options;
  3029. if (file) {
  3030. if (host === "chrome-extension") {
  3031. const fileName = file.replace(/\\/g, "\\\\");
  3032. const _baseUrl = (_b25 = (_a25 = window.VUE_DEVTOOLS_CONFIG) == null ? void 0 : _a25.openInEditorHost) != null ? _b25 : "/";
  3033. fetch(`${_baseUrl}__open-in-editor?file=${encodeURI(file)}`).then((response) => {
  3034. if (!response.ok) {
  3035. const msg = `Opening component ${fileName} failed`;
  3036. console.log(`%c${msg}`, "color:red");
  3037. }
  3038. });
  3039. } else if (devtoolsState.vitePluginDetected) {
  3040. const _baseUrl = (_c = target.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__) != null ? _c : baseUrl;
  3041. target.__VUE_INSPECTOR__.openInEditor(_baseUrl, file, line, column);
  3042. }
  3043. }
  3044. }
  3045. init_esm_shims2();
  3046. init_esm_shims2();
  3047. init_esm_shims2();
  3048. init_esm_shims2();
  3049. init_esm_shims2();
  3050. var _a10;
  3051. var _b10;
  3052. (_b10 = (_a10 = target).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__) != null ? _b10 : _a10.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__ = [];
  3053. var devtoolsPluginBuffer = new Proxy(target.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__, {
  3054. get(target22, prop, receiver) {
  3055. return Reflect.get(target22, prop, receiver);
  3056. }
  3057. });
  3058. function _getSettings(settings) {
  3059. const _settings = {};
  3060. Object.keys(settings).forEach((key) => {
  3061. _settings[key] = settings[key].defaultValue;
  3062. });
  3063. return _settings;
  3064. }
  3065. function getPluginLocalKey(pluginId) {
  3066. return `__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${pluginId}__`;
  3067. }
  3068. function getPluginSettingsOptions(pluginId) {
  3069. var _a25, _b25, _c;
  3070. const item = (_b25 = (_a25 = devtoolsPluginBuffer.find((item2) => {
  3071. var _a26;
  3072. return item2[0].id === pluginId && !!((_a26 = item2[0]) == null ? void 0 : _a26.settings);
  3073. })) == null ? void 0 : _a25[0]) != null ? _b25 : null;
  3074. return (_c = item == null ? void 0 : item.settings) != null ? _c : null;
  3075. }
  3076. function getPluginSettings(pluginId, fallbackValue) {
  3077. var _a25, _b25, _c;
  3078. const localKey = getPluginLocalKey(pluginId);
  3079. if (localKey) {
  3080. const localSettings = localStorage.getItem(localKey);
  3081. if (localSettings) {
  3082. return JSON.parse(localSettings);
  3083. }
  3084. }
  3085. if (pluginId) {
  3086. const item = (_b25 = (_a25 = devtoolsPluginBuffer.find((item2) => item2[0].id === pluginId)) == null ? void 0 : _a25[0]) != null ? _b25 : null;
  3087. return _getSettings((_c = item == null ? void 0 : item.settings) != null ? _c : {});
  3088. }
  3089. return _getSettings(fallbackValue);
  3090. }
  3091. function initPluginSettings(pluginId, settings) {
  3092. const localKey = getPluginLocalKey(pluginId);
  3093. const localSettings = localStorage.getItem(localKey);
  3094. if (!localSettings) {
  3095. localStorage.setItem(localKey, JSON.stringify(_getSettings(settings)));
  3096. }
  3097. }
  3098. function setPluginSettings(pluginId, key, value) {
  3099. const localKey = getPluginLocalKey(pluginId);
  3100. const localSettings = localStorage.getItem(localKey);
  3101. const parsedLocalSettings = JSON.parse(localSettings || "{}");
  3102. const updated = {
  3103. ...parsedLocalSettings,
  3104. [key]: value
  3105. };
  3106. localStorage.setItem(localKey, JSON.stringify(updated));
  3107. devtoolsContext.hooks.callHookWith(
  3108. (callbacks) => {
  3109. callbacks.forEach((cb) => cb({
  3110. pluginId,
  3111. key,
  3112. oldValue: parsedLocalSettings[key],
  3113. newValue: value,
  3114. settings: updated
  3115. }));
  3116. },
  3117. "setPluginSettings"
  3118. /* SET_PLUGIN_SETTINGS */
  3119. );
  3120. }
  3121. init_esm_shims2();
  3122. init_esm_shims2();
  3123. init_esm_shims2();
  3124. init_esm_shims2();
  3125. init_esm_shims2();
  3126. init_esm_shims2();
  3127. init_esm_shims2();
  3128. init_esm_shims2();
  3129. init_esm_shims2();
  3130. init_esm_shims2();
  3131. init_esm_shims2();
  3132. var _a11;
  3133. var _b11;
  3134. var devtoolsHooks = (_b11 = (_a11 = target).__VUE_DEVTOOLS_HOOK) != null ? _b11 : _a11.__VUE_DEVTOOLS_HOOK = createHooks();
  3135. var on = {
  3136. vueAppInit(fn) {
  3137. devtoolsHooks.hook("app:init", fn);
  3138. },
  3139. vueAppUnmount(fn) {
  3140. devtoolsHooks.hook("app:unmount", fn);
  3141. },
  3142. vueAppConnected(fn) {
  3143. devtoolsHooks.hook("app:connected", fn);
  3144. },
  3145. componentAdded(fn) {
  3146. return devtoolsHooks.hook("component:added", fn);
  3147. },
  3148. componentEmit(fn) {
  3149. return devtoolsHooks.hook("component:emit", fn);
  3150. },
  3151. componentUpdated(fn) {
  3152. return devtoolsHooks.hook("component:updated", fn);
  3153. },
  3154. componentRemoved(fn) {
  3155. return devtoolsHooks.hook("component:removed", fn);
  3156. },
  3157. setupDevtoolsPlugin(fn) {
  3158. devtoolsHooks.hook("devtools-plugin:setup", fn);
  3159. },
  3160. perfStart(fn) {
  3161. return devtoolsHooks.hook("perf:start", fn);
  3162. },
  3163. perfEnd(fn) {
  3164. return devtoolsHooks.hook("perf:end", fn);
  3165. }
  3166. };
  3167. var hook = {
  3168. on,
  3169. setupDevToolsPlugin(pluginDescriptor, setupFn) {
  3170. return devtoolsHooks.callHook("devtools-plugin:setup", pluginDescriptor, setupFn);
  3171. }
  3172. };
  3173. var DevToolsV6PluginAPI = class {
  3174. constructor({ plugin, ctx }) {
  3175. this.hooks = ctx.hooks;
  3176. this.plugin = plugin;
  3177. }
  3178. get on() {
  3179. return {
  3180. // component inspector
  3181. visitComponentTree: (handler) => {
  3182. this.hooks.hook("visitComponentTree", handler);
  3183. },
  3184. inspectComponent: (handler) => {
  3185. this.hooks.hook("inspectComponent", handler);
  3186. },
  3187. editComponentState: (handler) => {
  3188. this.hooks.hook("editComponentState", handler);
  3189. },
  3190. // custom inspector
  3191. getInspectorTree: (handler) => {
  3192. this.hooks.hook("getInspectorTree", handler);
  3193. },
  3194. getInspectorState: (handler) => {
  3195. this.hooks.hook("getInspectorState", handler);
  3196. },
  3197. editInspectorState: (handler) => {
  3198. this.hooks.hook("editInspectorState", handler);
  3199. },
  3200. // timeline
  3201. inspectTimelineEvent: (handler) => {
  3202. this.hooks.hook("inspectTimelineEvent", handler);
  3203. },
  3204. timelineCleared: (handler) => {
  3205. this.hooks.hook("timelineCleared", handler);
  3206. },
  3207. // settings
  3208. setPluginSettings: (handler) => {
  3209. this.hooks.hook("setPluginSettings", handler);
  3210. }
  3211. };
  3212. }
  3213. // component inspector
  3214. notifyComponentUpdate(instance) {
  3215. var _a25;
  3216. if (devtoolsState.highPerfModeEnabled) {
  3217. return;
  3218. }
  3219. const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);
  3220. if (inspector == null ? void 0 : inspector.id) {
  3221. if (instance) {
  3222. const args = [
  3223. instance.appContext.app,
  3224. instance.uid,
  3225. (_a25 = instance.parent) == null ? void 0 : _a25.uid,
  3226. instance
  3227. ];
  3228. devtoolsHooks.callHook("component:updated", ...args);
  3229. } else {
  3230. devtoolsHooks.callHook(
  3231. "component:updated"
  3232. /* COMPONENT_UPDATED */
  3233. );
  3234. }
  3235. this.hooks.callHook("sendInspectorState", { inspectorId: inspector.id, plugin: this.plugin });
  3236. }
  3237. }
  3238. // custom inspector
  3239. addInspector(options) {
  3240. this.hooks.callHook("addInspector", { inspector: options, plugin: this.plugin });
  3241. if (this.plugin.descriptor.settings) {
  3242. initPluginSettings(options.id, this.plugin.descriptor.settings);
  3243. }
  3244. }
  3245. sendInspectorTree(inspectorId) {
  3246. if (devtoolsState.highPerfModeEnabled) {
  3247. return;
  3248. }
  3249. this.hooks.callHook("sendInspectorTree", { inspectorId, plugin: this.plugin });
  3250. }
  3251. sendInspectorState(inspectorId) {
  3252. if (devtoolsState.highPerfModeEnabled) {
  3253. return;
  3254. }
  3255. this.hooks.callHook("sendInspectorState", { inspectorId, plugin: this.plugin });
  3256. }
  3257. selectInspectorNode(inspectorId, nodeId) {
  3258. this.hooks.callHook("customInspectorSelectNode", { inspectorId, nodeId, plugin: this.plugin });
  3259. }
  3260. visitComponentTree(payload) {
  3261. return this.hooks.callHook("visitComponentTree", payload);
  3262. }
  3263. // timeline
  3264. now() {
  3265. if (devtoolsState.highPerfModeEnabled) {
  3266. return 0;
  3267. }
  3268. return Date.now();
  3269. }
  3270. addTimelineLayer(options) {
  3271. this.hooks.callHook("timelineLayerAdded", { options, plugin: this.plugin });
  3272. }
  3273. addTimelineEvent(options) {
  3274. if (devtoolsState.highPerfModeEnabled) {
  3275. return;
  3276. }
  3277. this.hooks.callHook("timelineEventAdded", { options, plugin: this.plugin });
  3278. }
  3279. // settings
  3280. getSettings(pluginId) {
  3281. return getPluginSettings(pluginId != null ? pluginId : this.plugin.descriptor.id, this.plugin.descriptor.settings);
  3282. }
  3283. // utilities
  3284. getComponentInstances(app) {
  3285. return this.hooks.callHook("getComponentInstances", { app });
  3286. }
  3287. getComponentBounds(instance) {
  3288. return this.hooks.callHook("getComponentBounds", { instance });
  3289. }
  3290. getComponentName(instance) {
  3291. return this.hooks.callHook("getComponentName", { instance });
  3292. }
  3293. highlightElement(instance) {
  3294. const uid = instance.__VUE_DEVTOOLS_NEXT_UID__;
  3295. return this.hooks.callHook("componentHighlight", { uid });
  3296. }
  3297. unhighlightElement() {
  3298. return this.hooks.callHook(
  3299. "componentUnhighlight"
  3300. /* COMPONENT_UNHIGHLIGHT */
  3301. );
  3302. }
  3303. };
  3304. var DevToolsPluginAPI = DevToolsV6PluginAPI;
  3305. init_esm_shims2();
  3306. init_esm_shims2();
  3307. init_esm_shims2();
  3308. init_esm_shims2();
  3309. var UNDEFINED = "__vue_devtool_undefined__";
  3310. var INFINITY = "__vue_devtool_infinity__";
  3311. var NEGATIVE_INFINITY = "__vue_devtool_negative_infinity__";
  3312. var NAN = "__vue_devtool_nan__";
  3313. init_esm_shims2();
  3314. init_esm_shims2();
  3315. var tokenMap = {
  3316. [UNDEFINED]: "undefined",
  3317. [NAN]: "NaN",
  3318. [INFINITY]: "Infinity",
  3319. [NEGATIVE_INFINITY]: "-Infinity"
  3320. };
  3321. var reversedTokenMap = Object.entries(tokenMap).reduce((acc, [key, value]) => {
  3322. acc[value] = key;
  3323. return acc;
  3324. }, {});
  3325. init_esm_shims2();
  3326. init_esm_shims2();
  3327. init_esm_shims2();
  3328. init_esm_shims2();
  3329. init_esm_shims2();
  3330. var _a12;
  3331. var _b12;
  3332. (_b12 = (_a12 = target).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__) != null ? _b12 : _a12.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__ = /* @__PURE__ */ new Set();
  3333. function setupDevToolsPlugin(pluginDescriptor, setupFn) {
  3334. return hook.setupDevToolsPlugin(pluginDescriptor, setupFn);
  3335. }
  3336. function callDevToolsPluginSetupFn(plugin, app) {
  3337. const [pluginDescriptor, setupFn] = plugin;
  3338. if (pluginDescriptor.app !== app)
  3339. return;
  3340. const api = new DevToolsPluginAPI({
  3341. plugin: {
  3342. setupFn,
  3343. descriptor: pluginDescriptor
  3344. },
  3345. ctx: devtoolsContext
  3346. });
  3347. if (pluginDescriptor.packageName === "vuex") {
  3348. api.on.editInspectorState((payload) => {
  3349. api.sendInspectorState(payload.inspectorId);
  3350. });
  3351. }
  3352. setupFn(api);
  3353. }
  3354. function registerDevToolsPlugin(app, options) {
  3355. if (target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(app)) {
  3356. return;
  3357. }
  3358. if (devtoolsState.highPerfModeEnabled && !(options == null ? void 0 : options.inspectingComponent)) {
  3359. return;
  3360. }
  3361. target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(app);
  3362. devtoolsPluginBuffer.forEach((plugin) => {
  3363. callDevToolsPluginSetupFn(plugin, app);
  3364. });
  3365. }
  3366. init_esm_shims2();
  3367. init_esm_shims2();
  3368. var ROUTER_KEY = "__VUE_DEVTOOLS_ROUTER__";
  3369. var ROUTER_INFO_KEY = "__VUE_DEVTOOLS_ROUTER_INFO__";
  3370. var _a13;
  3371. var _b13;
  3372. (_b13 = (_a13 = target)[ROUTER_INFO_KEY]) != null ? _b13 : _a13[ROUTER_INFO_KEY] = {
  3373. currentRoute: null,
  3374. routes: []
  3375. };
  3376. var _a14;
  3377. var _b14;
  3378. (_b14 = (_a14 = target)[ROUTER_KEY]) != null ? _b14 : _a14[ROUTER_KEY] = {};
  3379. var devtoolsRouterInfo = new Proxy(target[ROUTER_INFO_KEY], {
  3380. get(target22, property) {
  3381. return target[ROUTER_INFO_KEY][property];
  3382. }
  3383. });
  3384. var devtoolsRouter = new Proxy(target[ROUTER_KEY], {
  3385. get(target22, property) {
  3386. if (property === "value") {
  3387. return target[ROUTER_KEY];
  3388. }
  3389. }
  3390. });
  3391. function getRoutes(router) {
  3392. const routesMap = /* @__PURE__ */ new Map();
  3393. return ((router == null ? void 0 : router.getRoutes()) || []).filter((i) => !routesMap.has(i.path) && routesMap.set(i.path, 1));
  3394. }
  3395. function filterRoutes(routes) {
  3396. return routes.map((item) => {
  3397. let { path, name, children, meta } = item;
  3398. if (children == null ? void 0 : children.length)
  3399. children = filterRoutes(children);
  3400. return {
  3401. path,
  3402. name,
  3403. children,
  3404. meta
  3405. };
  3406. });
  3407. }
  3408. function filterCurrentRoute(route) {
  3409. if (route) {
  3410. const { fullPath, hash, href, path, name, matched, params, query } = route;
  3411. return {
  3412. fullPath,
  3413. hash,
  3414. href,
  3415. path,
  3416. name,
  3417. params,
  3418. query,
  3419. matched: filterRoutes(matched)
  3420. };
  3421. }
  3422. return route;
  3423. }
  3424. function normalizeRouterInfo(appRecord, activeAppRecord2) {
  3425. function init() {
  3426. var _a25;
  3427. const router = (_a25 = appRecord.app) == null ? void 0 : _a25.config.globalProperties.$router;
  3428. const currentRoute = filterCurrentRoute(router == null ? void 0 : router.currentRoute.value);
  3429. const routes = filterRoutes(getRoutes(router));
  3430. const c = console.warn;
  3431. console.warn = () => {
  3432. };
  3433. target[ROUTER_INFO_KEY] = {
  3434. currentRoute: currentRoute ? deepClone(currentRoute) : {},
  3435. routes: deepClone(routes)
  3436. };
  3437. target[ROUTER_KEY] = router;
  3438. console.warn = c;
  3439. }
  3440. init();
  3441. hook.on.componentUpdated(debounce(() => {
  3442. var _a25;
  3443. if (((_a25 = activeAppRecord2.value) == null ? void 0 : _a25.app) !== appRecord.app)
  3444. return;
  3445. init();
  3446. if (devtoolsState.highPerfModeEnabled)
  3447. return;
  3448. devtoolsContext.hooks.callHook("routerInfoUpdated", { state: target[ROUTER_INFO_KEY] });
  3449. }, 200));
  3450. }
  3451. function createDevToolsApi(hooks2) {
  3452. return {
  3453. // get inspector tree
  3454. async getInspectorTree(payload) {
  3455. const _payload = {
  3456. ...payload,
  3457. app: activeAppRecord.value.app,
  3458. rootNodes: []
  3459. };
  3460. await new Promise((resolve) => {
  3461. hooks2.callHookWith(
  3462. async (callbacks) => {
  3463. await Promise.all(callbacks.map((cb) => cb(_payload)));
  3464. resolve();
  3465. },
  3466. "getInspectorTree"
  3467. /* GET_INSPECTOR_TREE */
  3468. );
  3469. });
  3470. return _payload.rootNodes;
  3471. },
  3472. // get inspector state
  3473. async getInspectorState(payload) {
  3474. const _payload = {
  3475. ...payload,
  3476. app: activeAppRecord.value.app,
  3477. state: null
  3478. };
  3479. const ctx = {
  3480. currentTab: `custom-inspector:${payload.inspectorId}`
  3481. };
  3482. await new Promise((resolve) => {
  3483. hooks2.callHookWith(
  3484. async (callbacks) => {
  3485. await Promise.all(callbacks.map((cb) => cb(_payload, ctx)));
  3486. resolve();
  3487. },
  3488. "getInspectorState"
  3489. /* GET_INSPECTOR_STATE */
  3490. );
  3491. });
  3492. return _payload.state;
  3493. },
  3494. // edit inspector state
  3495. editInspectorState(payload) {
  3496. const stateEditor2 = new StateEditor();
  3497. const _payload = {
  3498. ...payload,
  3499. app: activeAppRecord.value.app,
  3500. set: (obj, path = payload.path, value = payload.state.value, cb) => {
  3501. stateEditor2.set(obj, path, value, cb || stateEditor2.createDefaultSetCallback(payload.state));
  3502. }
  3503. };
  3504. hooks2.callHookWith(
  3505. (callbacks) => {
  3506. callbacks.forEach((cb) => cb(_payload));
  3507. },
  3508. "editInspectorState"
  3509. /* EDIT_INSPECTOR_STATE */
  3510. );
  3511. },
  3512. // send inspector state
  3513. sendInspectorState(inspectorId) {
  3514. const inspector = getInspector(inspectorId);
  3515. hooks2.callHook("sendInspectorState", { inspectorId, plugin: {
  3516. descriptor: inspector.descriptor,
  3517. setupFn: () => ({})
  3518. } });
  3519. },
  3520. // inspect component inspector
  3521. inspectComponentInspector() {
  3522. return inspectComponentHighLighter();
  3523. },
  3524. // cancel inspect component inspector
  3525. cancelInspectComponentInspector() {
  3526. return cancelInspectComponentHighLighter();
  3527. },
  3528. // get component render code
  3529. getComponentRenderCode(id) {
  3530. const instance = getComponentInstance(activeAppRecord.value, id);
  3531. if (instance)
  3532. return !(typeof (instance == null ? void 0 : instance.type) === "function") ? instance.render.toString() : instance.type.toString();
  3533. },
  3534. // scroll to component
  3535. scrollToComponent(id) {
  3536. return scrollToComponent({ id });
  3537. },
  3538. // open in editor
  3539. openInEditor,
  3540. // get vue inspector
  3541. getVueInspector: getComponentInspector,
  3542. // toggle app
  3543. toggleApp(id, options) {
  3544. const appRecord = devtoolsAppRecords.value.find((record) => record.id === id);
  3545. if (appRecord) {
  3546. setActiveAppRecordId(id);
  3547. setActiveAppRecord(appRecord);
  3548. normalizeRouterInfo(appRecord, activeAppRecord);
  3549. callInspectorUpdatedHook();
  3550. registerDevToolsPlugin(appRecord.app, options);
  3551. }
  3552. },
  3553. // inspect dom
  3554. inspectDOM(instanceId) {
  3555. const instance = getComponentInstance(activeAppRecord.value, instanceId);
  3556. if (instance) {
  3557. const [el] = getRootElementsFromComponentInstance(instance);
  3558. if (el) {
  3559. target.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__ = el;
  3560. }
  3561. }
  3562. },
  3563. updatePluginSettings(pluginId, key, value) {
  3564. setPluginSettings(pluginId, key, value);
  3565. },
  3566. getPluginSettings(pluginId) {
  3567. return {
  3568. options: getPluginSettingsOptions(pluginId),
  3569. values: getPluginSettings(pluginId)
  3570. };
  3571. }
  3572. };
  3573. }
  3574. init_esm_shims2();
  3575. var _a15;
  3576. var _b15;
  3577. (_b15 = (_a15 = target).__VUE_DEVTOOLS_ENV__) != null ? _b15 : _a15.__VUE_DEVTOOLS_ENV__ = {
  3578. vitePluginDetected: false
  3579. };
  3580. var hooks = createDevToolsCtxHooks();
  3581. var _a16;
  3582. var _b16;
  3583. (_b16 = (_a16 = target).__VUE_DEVTOOLS_KIT_CONTEXT__) != null ? _b16 : _a16.__VUE_DEVTOOLS_KIT_CONTEXT__ = {
  3584. hooks,
  3585. get state() {
  3586. return {
  3587. ...devtoolsState,
  3588. activeAppRecordId: activeAppRecord.id,
  3589. activeAppRecord: activeAppRecord.value,
  3590. appRecords: devtoolsAppRecords.value
  3591. };
  3592. },
  3593. api: createDevToolsApi(hooks)
  3594. };
  3595. var devtoolsContext = target.__VUE_DEVTOOLS_KIT_CONTEXT__;
  3596. init_esm_shims2();
  3597. var import_speakingurl = __toESM2(require_speakingurl2(), 1);
  3598. var _a17;
  3599. var _b17;
  3600. var appRecordInfo = (_b17 = (_a17 = target).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__) != null ? _b17 : _a17.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__ = {
  3601. id: 0,
  3602. appIds: /* @__PURE__ */ new Set()
  3603. };
  3604. init_esm_shims2();
  3605. init_esm_shims2();
  3606. function toggleHighPerfMode(state) {
  3607. devtoolsState.highPerfModeEnabled = state != null ? state : !devtoolsState.highPerfModeEnabled;
  3608. if (!state && activeAppRecord.value) {
  3609. registerDevToolsPlugin(activeAppRecord.value.app);
  3610. }
  3611. }
  3612. init_esm_shims2();
  3613. init_esm_shims2();
  3614. init_esm_shims2();
  3615. function updateDevToolsClientDetected(params) {
  3616. devtoolsState.devtoolsClientDetected = {
  3617. ...devtoolsState.devtoolsClientDetected,
  3618. ...params
  3619. };
  3620. const devtoolsClientVisible = Object.values(devtoolsState.devtoolsClientDetected).some(Boolean);
  3621. toggleHighPerfMode(!devtoolsClientVisible);
  3622. }
  3623. var _a18;
  3624. var _b18;
  3625. (_b18 = (_a18 = target).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__) != null ? _b18 : _a18.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__ = updateDevToolsClientDetected;
  3626. init_esm_shims2();
  3627. init_esm_shims2();
  3628. init_esm_shims2();
  3629. init_esm_shims2();
  3630. init_esm_shims2();
  3631. init_esm_shims2();
  3632. init_esm_shims2();
  3633. var DoubleIndexedKV = class {
  3634. constructor() {
  3635. this.keyToValue = /* @__PURE__ */ new Map();
  3636. this.valueToKey = /* @__PURE__ */ new Map();
  3637. }
  3638. set(key, value) {
  3639. this.keyToValue.set(key, value);
  3640. this.valueToKey.set(value, key);
  3641. }
  3642. getByKey(key) {
  3643. return this.keyToValue.get(key);
  3644. }
  3645. getByValue(value) {
  3646. return this.valueToKey.get(value);
  3647. }
  3648. clear() {
  3649. this.keyToValue.clear();
  3650. this.valueToKey.clear();
  3651. }
  3652. };
  3653. var Registry = class {
  3654. constructor(generateIdentifier) {
  3655. this.generateIdentifier = generateIdentifier;
  3656. this.kv = new DoubleIndexedKV();
  3657. }
  3658. register(value, identifier) {
  3659. if (this.kv.getByValue(value)) {
  3660. return;
  3661. }
  3662. if (!identifier) {
  3663. identifier = this.generateIdentifier(value);
  3664. }
  3665. this.kv.set(identifier, value);
  3666. }
  3667. clear() {
  3668. this.kv.clear();
  3669. }
  3670. getIdentifier(value) {
  3671. return this.kv.getByValue(value);
  3672. }
  3673. getValue(identifier) {
  3674. return this.kv.getByKey(identifier);
  3675. }
  3676. };
  3677. var ClassRegistry = class extends Registry {
  3678. constructor() {
  3679. super((c) => c.name);
  3680. this.classToAllowedProps = /* @__PURE__ */ new Map();
  3681. }
  3682. register(value, options) {
  3683. if (typeof options === "object") {
  3684. if (options.allowProps) {
  3685. this.classToAllowedProps.set(value, options.allowProps);
  3686. }
  3687. super.register(value, options.identifier);
  3688. } else {
  3689. super.register(value, options);
  3690. }
  3691. }
  3692. getAllowedProps(value) {
  3693. return this.classToAllowedProps.get(value);
  3694. }
  3695. };
  3696. init_esm_shims2();
  3697. init_esm_shims2();
  3698. function valuesOfObj(record) {
  3699. if ("values" in Object) {
  3700. return Object.values(record);
  3701. }
  3702. const values = [];
  3703. for (const key in record) {
  3704. if (record.hasOwnProperty(key)) {
  3705. values.push(record[key]);
  3706. }
  3707. }
  3708. return values;
  3709. }
  3710. function find(record, predicate) {
  3711. const values = valuesOfObj(record);
  3712. if ("find" in values) {
  3713. return values.find(predicate);
  3714. }
  3715. const valuesNotNever = values;
  3716. for (let i = 0; i < valuesNotNever.length; i++) {
  3717. const value = valuesNotNever[i];
  3718. if (predicate(value)) {
  3719. return value;
  3720. }
  3721. }
  3722. return void 0;
  3723. }
  3724. function forEach(record, run) {
  3725. Object.entries(record).forEach(([key, value]) => run(value, key));
  3726. }
  3727. function includes(arr, value) {
  3728. return arr.indexOf(value) !== -1;
  3729. }
  3730. function findArr(record, predicate) {
  3731. for (let i = 0; i < record.length; i++) {
  3732. const value = record[i];
  3733. if (predicate(value)) {
  3734. return value;
  3735. }
  3736. }
  3737. return void 0;
  3738. }
  3739. var CustomTransformerRegistry = class {
  3740. constructor() {
  3741. this.transfomers = {};
  3742. }
  3743. register(transformer) {
  3744. this.transfomers[transformer.name] = transformer;
  3745. }
  3746. findApplicable(v) {
  3747. return find(this.transfomers, (transformer) => transformer.isApplicable(v));
  3748. }
  3749. findByName(name) {
  3750. return this.transfomers[name];
  3751. }
  3752. };
  3753. init_esm_shims2();
  3754. init_esm_shims2();
  3755. var getType = (payload) => Object.prototype.toString.call(payload).slice(8, -1);
  3756. var isUndefined = (payload) => typeof payload === "undefined";
  3757. var isNull = (payload) => payload === null;
  3758. var isPlainObject2 = (payload) => {
  3759. if (typeof payload !== "object" || payload === null)
  3760. return false;
  3761. if (payload === Object.prototype)
  3762. return false;
  3763. if (Object.getPrototypeOf(payload) === null)
  3764. return true;
  3765. return Object.getPrototypeOf(payload) === Object.prototype;
  3766. };
  3767. var isEmptyObject = (payload) => isPlainObject2(payload) && Object.keys(payload).length === 0;
  3768. var isArray = (payload) => Array.isArray(payload);
  3769. var isString = (payload) => typeof payload === "string";
  3770. var isNumber = (payload) => typeof payload === "number" && !isNaN(payload);
  3771. var isBoolean = (payload) => typeof payload === "boolean";
  3772. var isRegExp = (payload) => payload instanceof RegExp;
  3773. var isMap = (payload) => payload instanceof Map;
  3774. var isSet = (payload) => payload instanceof Set;
  3775. var isSymbol = (payload) => getType(payload) === "Symbol";
  3776. var isDate = (payload) => payload instanceof Date && !isNaN(payload.valueOf());
  3777. var isError = (payload) => payload instanceof Error;
  3778. var isNaNValue = (payload) => typeof payload === "number" && isNaN(payload);
  3779. var isPrimitive2 = (payload) => isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);
  3780. var isBigint = (payload) => typeof payload === "bigint";
  3781. var isInfinite = (payload) => payload === Infinity || payload === -Infinity;
  3782. var isTypedArray = (payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView);
  3783. var isURL = (payload) => payload instanceof URL;
  3784. init_esm_shims2();
  3785. var escapeKey = (key) => key.replace(/\./g, "\\.");
  3786. var stringifyPath = (path) => path.map(String).map(escapeKey).join(".");
  3787. var parsePath = (string) => {
  3788. const result = [];
  3789. let segment = "";
  3790. for (let i = 0; i < string.length; i++) {
  3791. let char = string.charAt(i);
  3792. const isEscapedDot = char === "\\" && string.charAt(i + 1) === ".";
  3793. if (isEscapedDot) {
  3794. segment += ".";
  3795. i++;
  3796. continue;
  3797. }
  3798. const isEndOfSegment = char === ".";
  3799. if (isEndOfSegment) {
  3800. result.push(segment);
  3801. segment = "";
  3802. continue;
  3803. }
  3804. segment += char;
  3805. }
  3806. const lastSegment = segment;
  3807. result.push(lastSegment);
  3808. return result;
  3809. };
  3810. init_esm_shims2();
  3811. function simpleTransformation(isApplicable, annotation, transform, untransform) {
  3812. return {
  3813. isApplicable,
  3814. annotation,
  3815. transform,
  3816. untransform
  3817. };
  3818. }
  3819. var simpleRules = [
  3820. simpleTransformation(isUndefined, "undefined", () => null, () => void 0),
  3821. simpleTransformation(isBigint, "bigint", (v) => v.toString(), (v) => {
  3822. if (typeof BigInt !== "undefined") {
  3823. return BigInt(v);
  3824. }
  3825. console.error("Please add a BigInt polyfill.");
  3826. return v;
  3827. }),
  3828. simpleTransformation(isDate, "Date", (v) => v.toISOString(), (v) => new Date(v)),
  3829. simpleTransformation(isError, "Error", (v, superJson) => {
  3830. const baseError = {
  3831. name: v.name,
  3832. message: v.message
  3833. };
  3834. superJson.allowedErrorProps.forEach((prop) => {
  3835. baseError[prop] = v[prop];
  3836. });
  3837. return baseError;
  3838. }, (v, superJson) => {
  3839. const e = new Error(v.message);
  3840. e.name = v.name;
  3841. e.stack = v.stack;
  3842. superJson.allowedErrorProps.forEach((prop) => {
  3843. e[prop] = v[prop];
  3844. });
  3845. return e;
  3846. }),
  3847. simpleTransformation(isRegExp, "regexp", (v) => "" + v, (regex) => {
  3848. const body = regex.slice(1, regex.lastIndexOf("/"));
  3849. const flags = regex.slice(regex.lastIndexOf("/") + 1);
  3850. return new RegExp(body, flags);
  3851. }),
  3852. simpleTransformation(
  3853. isSet,
  3854. "set",
  3855. // (sets only exist in es6+)
  3856. // eslint-disable-next-line es5/no-es6-methods
  3857. (v) => [...v.values()],
  3858. (v) => new Set(v)
  3859. ),
  3860. simpleTransformation(isMap, "map", (v) => [...v.entries()], (v) => new Map(v)),
  3861. simpleTransformation((v) => isNaNValue(v) || isInfinite(v), "number", (v) => {
  3862. if (isNaNValue(v)) {
  3863. return "NaN";
  3864. }
  3865. if (v > 0) {
  3866. return "Infinity";
  3867. } else {
  3868. return "-Infinity";
  3869. }
  3870. }, Number),
  3871. simpleTransformation((v) => v === 0 && 1 / v === -Infinity, "number", () => {
  3872. return "-0";
  3873. }, Number),
  3874. simpleTransformation(isURL, "URL", (v) => v.toString(), (v) => new URL(v))
  3875. ];
  3876. function compositeTransformation(isApplicable, annotation, transform, untransform) {
  3877. return {
  3878. isApplicable,
  3879. annotation,
  3880. transform,
  3881. untransform
  3882. };
  3883. }
  3884. var symbolRule = compositeTransformation((s, superJson) => {
  3885. if (isSymbol(s)) {
  3886. const isRegistered = !!superJson.symbolRegistry.getIdentifier(s);
  3887. return isRegistered;
  3888. }
  3889. return false;
  3890. }, (s, superJson) => {
  3891. const identifier = superJson.symbolRegistry.getIdentifier(s);
  3892. return ["symbol", identifier];
  3893. }, (v) => v.description, (_, a, superJson) => {
  3894. const value = superJson.symbolRegistry.getValue(a[1]);
  3895. if (!value) {
  3896. throw new Error("Trying to deserialize unknown symbol");
  3897. }
  3898. return value;
  3899. });
  3900. var constructorToName = [
  3901. Int8Array,
  3902. Uint8Array,
  3903. Int16Array,
  3904. Uint16Array,
  3905. Int32Array,
  3906. Uint32Array,
  3907. Float32Array,
  3908. Float64Array,
  3909. Uint8ClampedArray
  3910. ].reduce((obj, ctor) => {
  3911. obj[ctor.name] = ctor;
  3912. return obj;
  3913. }, {});
  3914. var typedArrayRule = compositeTransformation(isTypedArray, (v) => ["typed-array", v.constructor.name], (v) => [...v], (v, a) => {
  3915. const ctor = constructorToName[a[1]];
  3916. if (!ctor) {
  3917. throw new Error("Trying to deserialize unknown typed array");
  3918. }
  3919. return new ctor(v);
  3920. });
  3921. function isInstanceOfRegisteredClass(potentialClass, superJson) {
  3922. if (potentialClass == null ? void 0 : potentialClass.constructor) {
  3923. const isRegistered = !!superJson.classRegistry.getIdentifier(potentialClass.constructor);
  3924. return isRegistered;
  3925. }
  3926. return false;
  3927. }
  3928. var classRule = compositeTransformation(isInstanceOfRegisteredClass, (clazz, superJson) => {
  3929. const identifier = superJson.classRegistry.getIdentifier(clazz.constructor);
  3930. return ["class", identifier];
  3931. }, (clazz, superJson) => {
  3932. const allowedProps = superJson.classRegistry.getAllowedProps(clazz.constructor);
  3933. if (!allowedProps) {
  3934. return { ...clazz };
  3935. }
  3936. const result = {};
  3937. allowedProps.forEach((prop) => {
  3938. result[prop] = clazz[prop];
  3939. });
  3940. return result;
  3941. }, (v, a, superJson) => {
  3942. const clazz = superJson.classRegistry.getValue(a[1]);
  3943. if (!clazz) {
  3944. throw new Error(`Trying to deserialize unknown class '${a[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
  3945. }
  3946. return Object.assign(Object.create(clazz.prototype), v);
  3947. });
  3948. var customRule = compositeTransformation((value, superJson) => {
  3949. return !!superJson.customTransformerRegistry.findApplicable(value);
  3950. }, (value, superJson) => {
  3951. const transformer = superJson.customTransformerRegistry.findApplicable(value);
  3952. return ["custom", transformer.name];
  3953. }, (value, superJson) => {
  3954. const transformer = superJson.customTransformerRegistry.findApplicable(value);
  3955. return transformer.serialize(value);
  3956. }, (v, a, superJson) => {
  3957. const transformer = superJson.customTransformerRegistry.findByName(a[1]);
  3958. if (!transformer) {
  3959. throw new Error("Trying to deserialize unknown custom value");
  3960. }
  3961. return transformer.deserialize(v);
  3962. });
  3963. var compositeRules = [classRule, symbolRule, customRule, typedArrayRule];
  3964. var transformValue = (value, superJson) => {
  3965. const applicableCompositeRule = findArr(compositeRules, (rule) => rule.isApplicable(value, superJson));
  3966. if (applicableCompositeRule) {
  3967. return {
  3968. value: applicableCompositeRule.transform(value, superJson),
  3969. type: applicableCompositeRule.annotation(value, superJson)
  3970. };
  3971. }
  3972. const applicableSimpleRule = findArr(simpleRules, (rule) => rule.isApplicable(value, superJson));
  3973. if (applicableSimpleRule) {
  3974. return {
  3975. value: applicableSimpleRule.transform(value, superJson),
  3976. type: applicableSimpleRule.annotation
  3977. };
  3978. }
  3979. return void 0;
  3980. };
  3981. var simpleRulesByAnnotation = {};
  3982. simpleRules.forEach((rule) => {
  3983. simpleRulesByAnnotation[rule.annotation] = rule;
  3984. });
  3985. var untransformValue = (json, type, superJson) => {
  3986. if (isArray(type)) {
  3987. switch (type[0]) {
  3988. case "symbol":
  3989. return symbolRule.untransform(json, type, superJson);
  3990. case "class":
  3991. return classRule.untransform(json, type, superJson);
  3992. case "custom":
  3993. return customRule.untransform(json, type, superJson);
  3994. case "typed-array":
  3995. return typedArrayRule.untransform(json, type, superJson);
  3996. default:
  3997. throw new Error("Unknown transformation: " + type);
  3998. }
  3999. } else {
  4000. const transformation = simpleRulesByAnnotation[type];
  4001. if (!transformation) {
  4002. throw new Error("Unknown transformation: " + type);
  4003. }
  4004. return transformation.untransform(json, superJson);
  4005. }
  4006. };
  4007. init_esm_shims2();
  4008. var getNthKey = (value, n) => {
  4009. if (n > value.size)
  4010. throw new Error("index out of bounds");
  4011. const keys = value.keys();
  4012. while (n > 0) {
  4013. keys.next();
  4014. n--;
  4015. }
  4016. return keys.next().value;
  4017. };
  4018. function validatePath(path) {
  4019. if (includes(path, "__proto__")) {
  4020. throw new Error("__proto__ is not allowed as a property");
  4021. }
  4022. if (includes(path, "prototype")) {
  4023. throw new Error("prototype is not allowed as a property");
  4024. }
  4025. if (includes(path, "constructor")) {
  4026. throw new Error("constructor is not allowed as a property");
  4027. }
  4028. }
  4029. var getDeep = (object, path) => {
  4030. validatePath(path);
  4031. for (let i = 0; i < path.length; i++) {
  4032. const key = path[i];
  4033. if (isSet(object)) {
  4034. object = getNthKey(object, +key);
  4035. } else if (isMap(object)) {
  4036. const row = +key;
  4037. const type = +path[++i] === 0 ? "key" : "value";
  4038. const keyOfRow = getNthKey(object, row);
  4039. switch (type) {
  4040. case "key":
  4041. object = keyOfRow;
  4042. break;
  4043. case "value":
  4044. object = object.get(keyOfRow);
  4045. break;
  4046. }
  4047. } else {
  4048. object = object[key];
  4049. }
  4050. }
  4051. return object;
  4052. };
  4053. var setDeep = (object, path, mapper) => {
  4054. validatePath(path);
  4055. if (path.length === 0) {
  4056. return mapper(object);
  4057. }
  4058. let parent = object;
  4059. for (let i = 0; i < path.length - 1; i++) {
  4060. const key = path[i];
  4061. if (isArray(parent)) {
  4062. const index = +key;
  4063. parent = parent[index];
  4064. } else if (isPlainObject2(parent)) {
  4065. parent = parent[key];
  4066. } else if (isSet(parent)) {
  4067. const row = +key;
  4068. parent = getNthKey(parent, row);
  4069. } else if (isMap(parent)) {
  4070. const isEnd = i === path.length - 2;
  4071. if (isEnd) {
  4072. break;
  4073. }
  4074. const row = +key;
  4075. const type = +path[++i] === 0 ? "key" : "value";
  4076. const keyOfRow = getNthKey(parent, row);
  4077. switch (type) {
  4078. case "key":
  4079. parent = keyOfRow;
  4080. break;
  4081. case "value":
  4082. parent = parent.get(keyOfRow);
  4083. break;
  4084. }
  4085. }
  4086. }
  4087. const lastKey = path[path.length - 1];
  4088. if (isArray(parent)) {
  4089. parent[+lastKey] = mapper(parent[+lastKey]);
  4090. } else if (isPlainObject2(parent)) {
  4091. parent[lastKey] = mapper(parent[lastKey]);
  4092. }
  4093. if (isSet(parent)) {
  4094. const oldValue = getNthKey(parent, +lastKey);
  4095. const newValue = mapper(oldValue);
  4096. if (oldValue !== newValue) {
  4097. parent.delete(oldValue);
  4098. parent.add(newValue);
  4099. }
  4100. }
  4101. if (isMap(parent)) {
  4102. const row = +path[path.length - 2];
  4103. const keyToRow = getNthKey(parent, row);
  4104. const type = +lastKey === 0 ? "key" : "value";
  4105. switch (type) {
  4106. case "key": {
  4107. const newKey = mapper(keyToRow);
  4108. parent.set(newKey, parent.get(keyToRow));
  4109. if (newKey !== keyToRow) {
  4110. parent.delete(keyToRow);
  4111. }
  4112. break;
  4113. }
  4114. case "value": {
  4115. parent.set(keyToRow, mapper(parent.get(keyToRow)));
  4116. break;
  4117. }
  4118. }
  4119. }
  4120. return object;
  4121. };
  4122. function traverse(tree, walker2, origin = []) {
  4123. if (!tree) {
  4124. return;
  4125. }
  4126. if (!isArray(tree)) {
  4127. forEach(tree, (subtree, key) => traverse(subtree, walker2, [...origin, ...parsePath(key)]));
  4128. return;
  4129. }
  4130. const [nodeValue, children] = tree;
  4131. if (children) {
  4132. forEach(children, (child, key) => {
  4133. traverse(child, walker2, [...origin, ...parsePath(key)]);
  4134. });
  4135. }
  4136. walker2(nodeValue, origin);
  4137. }
  4138. function applyValueAnnotations(plain, annotations, superJson) {
  4139. traverse(annotations, (type, path) => {
  4140. plain = setDeep(plain, path, (v) => untransformValue(v, type, superJson));
  4141. });
  4142. return plain;
  4143. }
  4144. function applyReferentialEqualityAnnotations(plain, annotations) {
  4145. function apply(identicalPaths, path) {
  4146. const object = getDeep(plain, parsePath(path));
  4147. identicalPaths.map(parsePath).forEach((identicalObjectPath) => {
  4148. plain = setDeep(plain, identicalObjectPath, () => object);
  4149. });
  4150. }
  4151. if (isArray(annotations)) {
  4152. const [root, other] = annotations;
  4153. root.forEach((identicalPath) => {
  4154. plain = setDeep(plain, parsePath(identicalPath), () => plain);
  4155. });
  4156. if (other) {
  4157. forEach(other, apply);
  4158. }
  4159. } else {
  4160. forEach(annotations, apply);
  4161. }
  4162. return plain;
  4163. }
  4164. var isDeep = (object, superJson) => isPlainObject2(object) || isArray(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson);
  4165. function addIdentity(object, path, identities) {
  4166. const existingSet = identities.get(object);
  4167. if (existingSet) {
  4168. existingSet.push(path);
  4169. } else {
  4170. identities.set(object, [path]);
  4171. }
  4172. }
  4173. function generateReferentialEqualityAnnotations(identitites, dedupe) {
  4174. const result = {};
  4175. let rootEqualityPaths = void 0;
  4176. identitites.forEach((paths) => {
  4177. if (paths.length <= 1) {
  4178. return;
  4179. }
  4180. if (!dedupe) {
  4181. paths = paths.map((path) => path.map(String)).sort((a, b) => a.length - b.length);
  4182. }
  4183. const [representativePath, ...identicalPaths] = paths;
  4184. if (representativePath.length === 0) {
  4185. rootEqualityPaths = identicalPaths.map(stringifyPath);
  4186. } else {
  4187. result[stringifyPath(representativePath)] = identicalPaths.map(stringifyPath);
  4188. }
  4189. });
  4190. if (rootEqualityPaths) {
  4191. if (isEmptyObject(result)) {
  4192. return [rootEqualityPaths];
  4193. } else {
  4194. return [rootEqualityPaths, result];
  4195. }
  4196. } else {
  4197. return isEmptyObject(result) ? void 0 : result;
  4198. }
  4199. }
  4200. var walker = (object, identities, superJson, dedupe, path = [], objectsInThisPath = [], seenObjects = /* @__PURE__ */ new Map()) => {
  4201. var _a25;
  4202. const primitive = isPrimitive2(object);
  4203. if (!primitive) {
  4204. addIdentity(object, path, identities);
  4205. const seen = seenObjects.get(object);
  4206. if (seen) {
  4207. return dedupe ? {
  4208. transformedValue: null
  4209. } : seen;
  4210. }
  4211. }
  4212. if (!isDeep(object, superJson)) {
  4213. const transformed2 = transformValue(object, superJson);
  4214. const result2 = transformed2 ? {
  4215. transformedValue: transformed2.value,
  4216. annotations: [transformed2.type]
  4217. } : {
  4218. transformedValue: object
  4219. };
  4220. if (!primitive) {
  4221. seenObjects.set(object, result2);
  4222. }
  4223. return result2;
  4224. }
  4225. if (includes(objectsInThisPath, object)) {
  4226. return {
  4227. transformedValue: null
  4228. };
  4229. }
  4230. const transformationResult = transformValue(object, superJson);
  4231. const transformed = (_a25 = transformationResult == null ? void 0 : transformationResult.value) != null ? _a25 : object;
  4232. const transformedValue = isArray(transformed) ? [] : {};
  4233. const innerAnnotations = {};
  4234. forEach(transformed, (value, index) => {
  4235. if (index === "__proto__" || index === "constructor" || index === "prototype") {
  4236. throw new Error(`Detected property ${index}. This is a prototype pollution risk, please remove it from your object.`);
  4237. }
  4238. const recursiveResult = walker(value, identities, superJson, dedupe, [...path, index], [...objectsInThisPath, object], seenObjects);
  4239. transformedValue[index] = recursiveResult.transformedValue;
  4240. if (isArray(recursiveResult.annotations)) {
  4241. innerAnnotations[index] = recursiveResult.annotations;
  4242. } else if (isPlainObject2(recursiveResult.annotations)) {
  4243. forEach(recursiveResult.annotations, (tree, key) => {
  4244. innerAnnotations[escapeKey(index) + "." + key] = tree;
  4245. });
  4246. }
  4247. });
  4248. const result = isEmptyObject(innerAnnotations) ? {
  4249. transformedValue,
  4250. annotations: !!transformationResult ? [transformationResult.type] : void 0
  4251. } : {
  4252. transformedValue,
  4253. annotations: !!transformationResult ? [transformationResult.type, innerAnnotations] : innerAnnotations
  4254. };
  4255. if (!primitive) {
  4256. seenObjects.set(object, result);
  4257. }
  4258. return result;
  4259. };
  4260. init_esm_shims2();
  4261. init_esm_shims2();
  4262. function getType2(payload) {
  4263. return Object.prototype.toString.call(payload).slice(8, -1);
  4264. }
  4265. function isArray2(payload) {
  4266. return getType2(payload) === "Array";
  4267. }
  4268. function isPlainObject3(payload) {
  4269. if (getType2(payload) !== "Object")
  4270. return false;
  4271. const prototype = Object.getPrototypeOf(payload);
  4272. return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
  4273. }
  4274. function isNull2(payload) {
  4275. return getType2(payload) === "Null";
  4276. }
  4277. function isOneOf(a, b, c, d, e) {
  4278. return (value) => a(value) || b(value) || !!c && c(value) || !!d && d(value) || !!e && e(value);
  4279. }
  4280. function isUndefined2(payload) {
  4281. return getType2(payload) === "Undefined";
  4282. }
  4283. var isNullOrUndefined = isOneOf(isNull2, isUndefined2);
  4284. function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
  4285. const propType = {}.propertyIsEnumerable.call(originalObject, key) ? "enumerable" : "nonenumerable";
  4286. if (propType === "enumerable")
  4287. carry[key] = newVal;
  4288. if (includeNonenumerable && propType === "nonenumerable") {
  4289. Object.defineProperty(carry, key, {
  4290. value: newVal,
  4291. enumerable: false,
  4292. writable: true,
  4293. configurable: true
  4294. });
  4295. }
  4296. }
  4297. function copy(target22, options = {}) {
  4298. if (isArray2(target22)) {
  4299. return target22.map((item) => copy(item, options));
  4300. }
  4301. if (!isPlainObject3(target22)) {
  4302. return target22;
  4303. }
  4304. const props = Object.getOwnPropertyNames(target22);
  4305. const symbols = Object.getOwnPropertySymbols(target22);
  4306. return [...props, ...symbols].reduce((carry, key) => {
  4307. if (isArray2(options.props) && !options.props.includes(key)) {
  4308. return carry;
  4309. }
  4310. const val = target22[key];
  4311. const newVal = copy(val, options);
  4312. assignProp(carry, key, newVal, target22, options.nonenumerable);
  4313. return carry;
  4314. }, {});
  4315. }
  4316. var SuperJSON = class {
  4317. /**
  4318. * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
  4319. */
  4320. constructor({ dedupe = false } = {}) {
  4321. this.classRegistry = new ClassRegistry();
  4322. this.symbolRegistry = new Registry((s) => {
  4323. var _a25;
  4324. return (_a25 = s.description) != null ? _a25 : "";
  4325. });
  4326. this.customTransformerRegistry = new CustomTransformerRegistry();
  4327. this.allowedErrorProps = [];
  4328. this.dedupe = dedupe;
  4329. }
  4330. serialize(object) {
  4331. const identities = /* @__PURE__ */ new Map();
  4332. const output = walker(object, identities, this, this.dedupe);
  4333. const res = {
  4334. json: output.transformedValue
  4335. };
  4336. if (output.annotations) {
  4337. res.meta = {
  4338. ...res.meta,
  4339. values: output.annotations
  4340. };
  4341. }
  4342. const equalityAnnotations = generateReferentialEqualityAnnotations(identities, this.dedupe);
  4343. if (equalityAnnotations) {
  4344. res.meta = {
  4345. ...res.meta,
  4346. referentialEqualities: equalityAnnotations
  4347. };
  4348. }
  4349. return res;
  4350. }
  4351. deserialize(payload) {
  4352. const { json, meta } = payload;
  4353. let result = copy(json);
  4354. if (meta == null ? void 0 : meta.values) {
  4355. result = applyValueAnnotations(result, meta.values, this);
  4356. }
  4357. if (meta == null ? void 0 : meta.referentialEqualities) {
  4358. result = applyReferentialEqualityAnnotations(result, meta.referentialEqualities);
  4359. }
  4360. return result;
  4361. }
  4362. stringify(object) {
  4363. return JSON.stringify(this.serialize(object));
  4364. }
  4365. parse(string) {
  4366. return this.deserialize(JSON.parse(string));
  4367. }
  4368. registerClass(v, options) {
  4369. this.classRegistry.register(v, options);
  4370. }
  4371. registerSymbol(v, identifier) {
  4372. this.symbolRegistry.register(v, identifier);
  4373. }
  4374. registerCustom(transformer, name) {
  4375. this.customTransformerRegistry.register({
  4376. name,
  4377. ...transformer
  4378. });
  4379. }
  4380. allowErrorProps(...props) {
  4381. this.allowedErrorProps.push(...props);
  4382. }
  4383. };
  4384. SuperJSON.defaultInstance = new SuperJSON();
  4385. SuperJSON.serialize = SuperJSON.defaultInstance.serialize.bind(SuperJSON.defaultInstance);
  4386. SuperJSON.deserialize = SuperJSON.defaultInstance.deserialize.bind(SuperJSON.defaultInstance);
  4387. SuperJSON.stringify = SuperJSON.defaultInstance.stringify.bind(SuperJSON.defaultInstance);
  4388. SuperJSON.parse = SuperJSON.defaultInstance.parse.bind(SuperJSON.defaultInstance);
  4389. SuperJSON.registerClass = SuperJSON.defaultInstance.registerClass.bind(SuperJSON.defaultInstance);
  4390. SuperJSON.registerSymbol = SuperJSON.defaultInstance.registerSymbol.bind(SuperJSON.defaultInstance);
  4391. SuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJSON.defaultInstance);
  4392. SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);
  4393. var serialize = SuperJSON.serialize;
  4394. var deserialize = SuperJSON.deserialize;
  4395. var stringify = SuperJSON.stringify;
  4396. var parse = SuperJSON.parse;
  4397. var registerClass = SuperJSON.registerClass;
  4398. var registerCustom = SuperJSON.registerCustom;
  4399. var registerSymbol = SuperJSON.registerSymbol;
  4400. var allowErrorProps = SuperJSON.allowErrorProps;
  4401. init_esm_shims2();
  4402. init_esm_shims2();
  4403. init_esm_shims2();
  4404. init_esm_shims2();
  4405. init_esm_shims2();
  4406. init_esm_shims2();
  4407. init_esm_shims2();
  4408. init_esm_shims2();
  4409. init_esm_shims2();
  4410. init_esm_shims2();
  4411. init_esm_shims2();
  4412. init_esm_shims2();
  4413. init_esm_shims2();
  4414. init_esm_shims2();
  4415. init_esm_shims2();
  4416. init_esm_shims2();
  4417. init_esm_shims2();
  4418. init_esm_shims2();
  4419. init_esm_shims2();
  4420. init_esm_shims2();
  4421. init_esm_shims2();
  4422. init_esm_shims2();
  4423. init_esm_shims2();
  4424. var _a19;
  4425. var _b19;
  4426. (_b19 = (_a19 = target).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__) != null ? _b19 : _a19.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__ = [];
  4427. var _a20;
  4428. var _b20;
  4429. (_b20 = (_a20 = target).__VUE_DEVTOOLS_KIT_RPC_CLIENT__) != null ? _b20 : _a20.__VUE_DEVTOOLS_KIT_RPC_CLIENT__ = null;
  4430. var _a21;
  4431. var _b21;
  4432. (_b21 = (_a21 = target).__VUE_DEVTOOLS_KIT_RPC_SERVER__) != null ? _b21 : _a21.__VUE_DEVTOOLS_KIT_RPC_SERVER__ = null;
  4433. var _a222;
  4434. var _b22;
  4435. (_b22 = (_a222 = target).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__) != null ? _b22 : _a222.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__ = null;
  4436. var _a23;
  4437. var _b23;
  4438. (_b23 = (_a23 = target).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__) != null ? _b23 : _a23.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__ = null;
  4439. var _a24;
  4440. var _b24;
  4441. (_b24 = (_a24 = target).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__) != null ? _b24 : _a24.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__ = null;
  4442. init_esm_shims2();
  4443. init_esm_shims2();
  4444. init_esm_shims2();
  4445. init_esm_shims2();
  4446. init_esm_shims2();
  4447. init_esm_shims2();
  4448. init_esm_shims2();
  4449. var MAX_SERIALIZED_SIZE = 2 * 1024 * 1024;
  4450. // node_modules/pinia/dist/pinia.mjs
  4451. var IS_CLIENT = typeof window !== "undefined";
  4452. var activePinia;
  4453. var setActivePinia = (pinia) => activePinia = pinia;
  4454. var getActivePinia = true ? () => {
  4455. const pinia = hasInjectionContext() && inject(piniaSymbol);
  4456. if (!pinia && !IS_CLIENT) {
  4457. console.error(`[🍍]: Pinia instance not found in context. This falls back to the global activePinia which exposes you to cross-request pollution on the server. Most of the time, it means you are calling "useStore()" in the wrong place.
  4458. Read https://vuejs.org/guide/reusability/composables.html to learn more`);
  4459. }
  4460. return pinia || activePinia;
  4461. } : () => hasInjectionContext() && inject(piniaSymbol) || activePinia;
  4462. var piniaSymbol = true ? Symbol("pinia") : (
  4463. /* istanbul ignore next */
  4464. Symbol()
  4465. );
  4466. function isPlainObject(o) {
  4467. return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function";
  4468. }
  4469. var MutationType;
  4470. (function(MutationType2) {
  4471. MutationType2["direct"] = "direct";
  4472. MutationType2["patchObject"] = "patch object";
  4473. MutationType2["patchFunction"] = "patch function";
  4474. })(MutationType || (MutationType = {}));
  4475. var _global = (() => typeof window === "object" && window.window === window ? window : typeof self === "object" && self.self === self ? self : typeof global === "object" && global.global === global ? global : typeof globalThis === "object" ? globalThis : { HTMLElement: null })();
  4476. function bom(blob, { autoBom = false } = {}) {
  4477. if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
  4478. return new Blob([String.fromCharCode(65279), blob], { type: blob.type });
  4479. }
  4480. return blob;
  4481. }
  4482. function download(url, name, opts) {
  4483. const xhr = new XMLHttpRequest();
  4484. xhr.open("GET", url);
  4485. xhr.responseType = "blob";
  4486. xhr.onload = function() {
  4487. saveAs(xhr.response, name, opts);
  4488. };
  4489. xhr.onerror = function() {
  4490. console.error("could not download file");
  4491. };
  4492. xhr.send();
  4493. }
  4494. function corsEnabled(url) {
  4495. const xhr = new XMLHttpRequest();
  4496. xhr.open("HEAD", url, false);
  4497. try {
  4498. xhr.send();
  4499. } catch (e) {
  4500. }
  4501. return xhr.status >= 200 && xhr.status <= 299;
  4502. }
  4503. function click(node) {
  4504. try {
  4505. node.dispatchEvent(new MouseEvent("click"));
  4506. } catch (e) {
  4507. const evt = new MouseEvent("click", {
  4508. bubbles: true,
  4509. cancelable: true,
  4510. view: window,
  4511. detail: 0,
  4512. screenX: 80,
  4513. screenY: 20,
  4514. clientX: 80,
  4515. clientY: 20,
  4516. ctrlKey: false,
  4517. altKey: false,
  4518. shiftKey: false,
  4519. metaKey: false,
  4520. button: 0,
  4521. relatedTarget: null
  4522. });
  4523. node.dispatchEvent(evt);
  4524. }
  4525. }
  4526. var _navigator = typeof navigator === "object" ? navigator : { userAgent: "" };
  4527. var isMacOSWebView = (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();
  4528. var saveAs = !IS_CLIENT ? () => {
  4529. } : (
  4530. // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
  4531. typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (
  4532. // Use msSaveOrOpenBlob as a second approach
  4533. "msSaveOrOpenBlob" in _navigator ? msSaveAs : (
  4534. // Fallback to using FileReader and a popup
  4535. fileSaverSaveAs
  4536. )
  4537. )
  4538. );
  4539. function downloadSaveAs(blob, name = "download", opts) {
  4540. const a = document.createElement("a");
  4541. a.download = name;
  4542. a.rel = "noopener";
  4543. if (typeof blob === "string") {
  4544. a.href = blob;
  4545. if (a.origin !== location.origin) {
  4546. if (corsEnabled(a.href)) {
  4547. download(blob, name, opts);
  4548. } else {
  4549. a.target = "_blank";
  4550. click(a);
  4551. }
  4552. } else {
  4553. click(a);
  4554. }
  4555. } else {
  4556. a.href = URL.createObjectURL(blob);
  4557. setTimeout(function() {
  4558. URL.revokeObjectURL(a.href);
  4559. }, 4e4);
  4560. setTimeout(function() {
  4561. click(a);
  4562. }, 0);
  4563. }
  4564. }
  4565. function msSaveAs(blob, name = "download", opts) {
  4566. if (typeof blob === "string") {
  4567. if (corsEnabled(blob)) {
  4568. download(blob, name, opts);
  4569. } else {
  4570. const a = document.createElement("a");
  4571. a.href = blob;
  4572. a.target = "_blank";
  4573. setTimeout(function() {
  4574. click(a);
  4575. });
  4576. }
  4577. } else {
  4578. navigator.msSaveOrOpenBlob(bom(blob, opts), name);
  4579. }
  4580. }
  4581. function fileSaverSaveAs(blob, name, opts, popup) {
  4582. popup = popup || open("", "_blank");
  4583. if (popup) {
  4584. popup.document.title = popup.document.body.innerText = "downloading...";
  4585. }
  4586. if (typeof blob === "string")
  4587. return download(blob, name, opts);
  4588. const force = blob.type === "application/octet-stream";
  4589. const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global;
  4590. const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
  4591. if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") {
  4592. const reader = new FileReader();
  4593. reader.onloadend = function() {
  4594. let url = reader.result;
  4595. if (typeof url !== "string") {
  4596. popup = null;
  4597. throw new Error("Wrong reader.result type");
  4598. }
  4599. url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, "data:attachment/file;");
  4600. if (popup) {
  4601. popup.location.href = url;
  4602. } else {
  4603. location.assign(url);
  4604. }
  4605. popup = null;
  4606. };
  4607. reader.readAsDataURL(blob);
  4608. } else {
  4609. const url = URL.createObjectURL(blob);
  4610. if (popup)
  4611. popup.location.assign(url);
  4612. else
  4613. location.href = url;
  4614. popup = null;
  4615. setTimeout(function() {
  4616. URL.revokeObjectURL(url);
  4617. }, 4e4);
  4618. }
  4619. }
  4620. function toastMessage(message, type) {
  4621. const piniaMessage = "🍍 " + message;
  4622. if (typeof __VUE_DEVTOOLS_TOAST__ === "function") {
  4623. __VUE_DEVTOOLS_TOAST__(piniaMessage, type);
  4624. } else if (type === "error") {
  4625. console.error(piniaMessage);
  4626. } else if (type === "warn") {
  4627. console.warn(piniaMessage);
  4628. } else {
  4629. console.log(piniaMessage);
  4630. }
  4631. }
  4632. function isPinia(o) {
  4633. return "_a" in o && "install" in o;
  4634. }
  4635. function checkClipboardAccess() {
  4636. if (!("clipboard" in navigator)) {
  4637. toastMessage(`Your browser doesn't support the Clipboard API`, "error");
  4638. return true;
  4639. }
  4640. }
  4641. function checkNotFocusedError(error) {
  4642. if (error instanceof Error && error.message.toLowerCase().includes("document is not focused")) {
  4643. toastMessage('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn");
  4644. return true;
  4645. }
  4646. return false;
  4647. }
  4648. async function actionGlobalCopyState(pinia) {
  4649. if (checkClipboardAccess())
  4650. return;
  4651. try {
  4652. await navigator.clipboard.writeText(JSON.stringify(pinia.state.value));
  4653. toastMessage("Global state copied to clipboard.");
  4654. } catch (error) {
  4655. if (checkNotFocusedError(error))
  4656. return;
  4657. toastMessage(`Failed to serialize the state. Check the console for more details.`, "error");
  4658. console.error(error);
  4659. }
  4660. }
  4661. async function actionGlobalPasteState(pinia) {
  4662. if (checkClipboardAccess())
  4663. return;
  4664. try {
  4665. loadStoresState(pinia, JSON.parse(await navigator.clipboard.readText()));
  4666. toastMessage("Global state pasted from clipboard.");
  4667. } catch (error) {
  4668. if (checkNotFocusedError(error))
  4669. return;
  4670. toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error");
  4671. console.error(error);
  4672. }
  4673. }
  4674. async function actionGlobalSaveState(pinia) {
  4675. try {
  4676. saveAs(new Blob([JSON.stringify(pinia.state.value)], {
  4677. type: "text/plain;charset=utf-8"
  4678. }), "pinia-state.json");
  4679. } catch (error) {
  4680. toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error");
  4681. console.error(error);
  4682. }
  4683. }
  4684. var fileInput;
  4685. function getFileOpener() {
  4686. if (!fileInput) {
  4687. fileInput = document.createElement("input");
  4688. fileInput.type = "file";
  4689. fileInput.accept = ".json";
  4690. }
  4691. function openFile() {
  4692. return new Promise((resolve, reject) => {
  4693. fileInput.onchange = async () => {
  4694. const files = fileInput.files;
  4695. if (!files)
  4696. return resolve(null);
  4697. const file = files.item(0);
  4698. if (!file)
  4699. return resolve(null);
  4700. return resolve({ text: await file.text(), file });
  4701. };
  4702. fileInput.oncancel = () => resolve(null);
  4703. fileInput.onerror = reject;
  4704. fileInput.click();
  4705. });
  4706. }
  4707. return openFile;
  4708. }
  4709. async function actionGlobalOpenStateFile(pinia) {
  4710. try {
  4711. const open2 = getFileOpener();
  4712. const result = await open2();
  4713. if (!result)
  4714. return;
  4715. const { text, file } = result;
  4716. loadStoresState(pinia, JSON.parse(text));
  4717. toastMessage(`Global state imported from "${file.name}".`);
  4718. } catch (error) {
  4719. toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error");
  4720. console.error(error);
  4721. }
  4722. }
  4723. function loadStoresState(pinia, state) {
  4724. for (const key in state) {
  4725. const storeState = pinia.state.value[key];
  4726. if (storeState) {
  4727. Object.assign(storeState, state[key]);
  4728. } else {
  4729. pinia.state.value[key] = state[key];
  4730. }
  4731. }
  4732. }
  4733. function formatDisplay(display) {
  4734. return {
  4735. _custom: {
  4736. display
  4737. }
  4738. };
  4739. }
  4740. var PINIA_ROOT_LABEL = "🍍 Pinia (root)";
  4741. var PINIA_ROOT_ID = "_root";
  4742. function formatStoreForInspectorTree(store) {
  4743. return isPinia(store) ? {
  4744. id: PINIA_ROOT_ID,
  4745. label: PINIA_ROOT_LABEL
  4746. } : {
  4747. id: store.$id,
  4748. label: store.$id
  4749. };
  4750. }
  4751. function formatStoreForInspectorState(store) {
  4752. if (isPinia(store)) {
  4753. const storeNames = Array.from(store._s.keys());
  4754. const storeMap = store._s;
  4755. const state2 = {
  4756. state: storeNames.map((storeId) => ({
  4757. editable: true,
  4758. key: storeId,
  4759. value: store.state.value[storeId]
  4760. })),
  4761. getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {
  4762. const store2 = storeMap.get(id);
  4763. return {
  4764. editable: false,
  4765. key: id,
  4766. value: store2._getters.reduce((getters, key) => {
  4767. getters[key] = store2[key];
  4768. return getters;
  4769. }, {})
  4770. };
  4771. })
  4772. };
  4773. return state2;
  4774. }
  4775. const state = {
  4776. state: Object.keys(store.$state).map((key) => ({
  4777. editable: true,
  4778. key,
  4779. value: store.$state[key]
  4780. }))
  4781. };
  4782. if (store._getters && store._getters.length) {
  4783. state.getters = store._getters.map((getterName) => ({
  4784. editable: false,
  4785. key: getterName,
  4786. value: store[getterName]
  4787. }));
  4788. }
  4789. if (store._customProperties.size) {
  4790. state.customProperties = Array.from(store._customProperties).map((key) => ({
  4791. editable: true,
  4792. key,
  4793. value: store[key]
  4794. }));
  4795. }
  4796. return state;
  4797. }
  4798. function formatEventData(events) {
  4799. if (!events)
  4800. return {};
  4801. if (Array.isArray(events)) {
  4802. return events.reduce((data, event) => {
  4803. data.keys.push(event.key);
  4804. data.operations.push(event.type);
  4805. data.oldValue[event.key] = event.oldValue;
  4806. data.newValue[event.key] = event.newValue;
  4807. return data;
  4808. }, {
  4809. oldValue: {},
  4810. keys: [],
  4811. operations: [],
  4812. newValue: {}
  4813. });
  4814. } else {
  4815. return {
  4816. operation: formatDisplay(events.type),
  4817. key: formatDisplay(events.key),
  4818. oldValue: events.oldValue,
  4819. newValue: events.newValue
  4820. };
  4821. }
  4822. }
  4823. function formatMutationType(type) {
  4824. switch (type) {
  4825. case MutationType.direct:
  4826. return "mutation";
  4827. case MutationType.patchFunction:
  4828. return "$patch";
  4829. case MutationType.patchObject:
  4830. return "$patch";
  4831. default:
  4832. return "unknown";
  4833. }
  4834. }
  4835. var isTimelineActive = true;
  4836. var componentStateTypes = [];
  4837. var MUTATIONS_LAYER_ID = "pinia:mutations";
  4838. var INSPECTOR_ID = "pinia";
  4839. var { assign: assign$1 } = Object;
  4840. var getStoreType = (id) => "🍍 " + id;
  4841. function registerPiniaDevtools(app, pinia) {
  4842. setupDevToolsPlugin({
  4843. id: "dev.esm.pinia",
  4844. label: "Pinia 🍍",
  4845. logo: "https://pinia.vuejs.org/logo.svg",
  4846. packageName: "pinia",
  4847. homepage: "https://pinia.vuejs.org",
  4848. componentStateTypes,
  4849. app
  4850. }, (api) => {
  4851. if (typeof api.now !== "function") {
  4852. toastMessage("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.");
  4853. }
  4854. api.addTimelineLayer({
  4855. id: MUTATIONS_LAYER_ID,
  4856. label: `Pinia 🍍`,
  4857. color: 15064968
  4858. });
  4859. api.addInspector({
  4860. id: INSPECTOR_ID,
  4861. label: "Pinia 🍍",
  4862. icon: "storage",
  4863. treeFilterPlaceholder: "Search stores",
  4864. actions: [
  4865. {
  4866. icon: "content_copy",
  4867. action: () => {
  4868. actionGlobalCopyState(pinia);
  4869. },
  4870. tooltip: "Serialize and copy the state"
  4871. },
  4872. {
  4873. icon: "content_paste",
  4874. action: async () => {
  4875. await actionGlobalPasteState(pinia);
  4876. api.sendInspectorTree(INSPECTOR_ID);
  4877. api.sendInspectorState(INSPECTOR_ID);
  4878. },
  4879. tooltip: "Replace the state with the content of your clipboard"
  4880. },
  4881. {
  4882. icon: "save",
  4883. action: () => {
  4884. actionGlobalSaveState(pinia);
  4885. },
  4886. tooltip: "Save the state as a JSON file"
  4887. },
  4888. {
  4889. icon: "folder_open",
  4890. action: async () => {
  4891. await actionGlobalOpenStateFile(pinia);
  4892. api.sendInspectorTree(INSPECTOR_ID);
  4893. api.sendInspectorState(INSPECTOR_ID);
  4894. },
  4895. tooltip: "Import the state from a JSON file"
  4896. }
  4897. ],
  4898. nodeActions: [
  4899. {
  4900. icon: "restore",
  4901. tooltip: 'Reset the state (with "$reset")',
  4902. action: (nodeId) => {
  4903. const store = pinia._s.get(nodeId);
  4904. if (!store) {
  4905. toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn");
  4906. } else if (typeof store.$reset !== "function") {
  4907. toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn");
  4908. } else {
  4909. store.$reset();
  4910. toastMessage(`Store "${nodeId}" reset.`);
  4911. }
  4912. }
  4913. }
  4914. ]
  4915. });
  4916. api.on.inspectComponent((payload) => {
  4917. const proxy = payload.componentInstance && payload.componentInstance.proxy;
  4918. if (proxy && proxy._pStores) {
  4919. const piniaStores = payload.componentInstance.proxy._pStores;
  4920. Object.values(piniaStores).forEach((store) => {
  4921. payload.instanceData.state.push({
  4922. type: getStoreType(store.$id),
  4923. key: "state",
  4924. editable: true,
  4925. value: store._isOptionsAPI ? {
  4926. _custom: {
  4927. value: toRaw(store.$state),
  4928. actions: [
  4929. {
  4930. icon: "restore",
  4931. tooltip: "Reset the state of this store",
  4932. action: () => store.$reset()
  4933. }
  4934. ]
  4935. }
  4936. } : (
  4937. // NOTE: workaround to unwrap transferred refs
  4938. Object.keys(store.$state).reduce((state, key) => {
  4939. state[key] = store.$state[key];
  4940. return state;
  4941. }, {})
  4942. )
  4943. });
  4944. if (store._getters && store._getters.length) {
  4945. payload.instanceData.state.push({
  4946. type: getStoreType(store.$id),
  4947. key: "getters",
  4948. editable: false,
  4949. value: store._getters.reduce((getters, key) => {
  4950. try {
  4951. getters[key] = store[key];
  4952. } catch (error) {
  4953. getters[key] = error;
  4954. }
  4955. return getters;
  4956. }, {})
  4957. });
  4958. }
  4959. });
  4960. }
  4961. });
  4962. api.on.getInspectorTree((payload) => {
  4963. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  4964. let stores = [pinia];
  4965. stores = stores.concat(Array.from(pinia._s.values()));
  4966. payload.rootNodes = (payload.filter ? stores.filter((store) => "$id" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);
  4967. }
  4968. });
  4969. globalThis.$pinia = pinia;
  4970. api.on.getInspectorState((payload) => {
  4971. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  4972. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId);
  4973. if (!inspectedStore) {
  4974. return;
  4975. }
  4976. if (inspectedStore) {
  4977. if (payload.nodeId !== PINIA_ROOT_ID)
  4978. globalThis.$store = toRaw(inspectedStore);
  4979. payload.state = formatStoreForInspectorState(inspectedStore);
  4980. }
  4981. }
  4982. });
  4983. api.on.editInspectorState((payload) => {
  4984. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  4985. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId);
  4986. if (!inspectedStore) {
  4987. return toastMessage(`store "${payload.nodeId}" not found`, "error");
  4988. }
  4989. const { path } = payload;
  4990. if (!isPinia(inspectedStore)) {
  4991. if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {
  4992. path.unshift("$state");
  4993. }
  4994. } else {
  4995. path.unshift("state");
  4996. }
  4997. isTimelineActive = false;
  4998. payload.set(inspectedStore, path, payload.state.value);
  4999. isTimelineActive = true;
  5000. }
  5001. });
  5002. api.on.editComponentState((payload) => {
  5003. if (payload.type.startsWith("🍍")) {
  5004. const storeId = payload.type.replace(/^🍍\s*/, "");
  5005. const store = pinia._s.get(storeId);
  5006. if (!store) {
  5007. return toastMessage(`store "${storeId}" not found`, "error");
  5008. }
  5009. const { path } = payload;
  5010. if (path[0] !== "state") {
  5011. return toastMessage(`Invalid path for store "${storeId}":
  5012. ${path}
  5013. Only state can be modified.`);
  5014. }
  5015. path[0] = "$state";
  5016. isTimelineActive = false;
  5017. payload.set(store, path, payload.state.value);
  5018. isTimelineActive = true;
  5019. }
  5020. });
  5021. });
  5022. }
  5023. function addStoreToDevtools(app, store) {
  5024. if (!componentStateTypes.includes(getStoreType(store.$id))) {
  5025. componentStateTypes.push(getStoreType(store.$id));
  5026. }
  5027. setupDevToolsPlugin({
  5028. id: "dev.esm.pinia",
  5029. label: "Pinia 🍍",
  5030. logo: "https://pinia.vuejs.org/logo.svg",
  5031. packageName: "pinia",
  5032. homepage: "https://pinia.vuejs.org",
  5033. componentStateTypes,
  5034. app,
  5035. settings: {
  5036. logStoreChanges: {
  5037. label: "Notify about new/deleted stores",
  5038. type: "boolean",
  5039. defaultValue: true
  5040. }
  5041. // useEmojis: {
  5042. // label: 'Use emojis in messages ⚡️',
  5043. // type: 'boolean',
  5044. // defaultValue: true,
  5045. // },
  5046. }
  5047. }, (api) => {
  5048. const now = typeof api.now === "function" ? api.now.bind(api) : Date.now;
  5049. store.$onAction(({ after, onError, name, args }) => {
  5050. const groupId = runningActionId++;
  5051. api.addTimelineEvent({
  5052. layerId: MUTATIONS_LAYER_ID,
  5053. event: {
  5054. time: now(),
  5055. title: "🛫 " + name,
  5056. subtitle: "start",
  5057. data: {
  5058. store: formatDisplay(store.$id),
  5059. action: formatDisplay(name),
  5060. args
  5061. },
  5062. groupId
  5063. }
  5064. });
  5065. after((result) => {
  5066. activeAction = void 0;
  5067. api.addTimelineEvent({
  5068. layerId: MUTATIONS_LAYER_ID,
  5069. event: {
  5070. time: now(),
  5071. title: "🛬 " + name,
  5072. subtitle: "end",
  5073. data: {
  5074. store: formatDisplay(store.$id),
  5075. action: formatDisplay(name),
  5076. args,
  5077. result
  5078. },
  5079. groupId
  5080. }
  5081. });
  5082. });
  5083. onError((error) => {
  5084. activeAction = void 0;
  5085. api.addTimelineEvent({
  5086. layerId: MUTATIONS_LAYER_ID,
  5087. event: {
  5088. time: now(),
  5089. logType: "error",
  5090. title: "💥 " + name,
  5091. subtitle: "end",
  5092. data: {
  5093. store: formatDisplay(store.$id),
  5094. action: formatDisplay(name),
  5095. args,
  5096. error
  5097. },
  5098. groupId
  5099. }
  5100. });
  5101. });
  5102. }, true);
  5103. store._customProperties.forEach((name) => {
  5104. watch(() => unref(store[name]), (newValue, oldValue) => {
  5105. api.notifyComponentUpdate();
  5106. api.sendInspectorState(INSPECTOR_ID);
  5107. if (isTimelineActive) {
  5108. api.addTimelineEvent({
  5109. layerId: MUTATIONS_LAYER_ID,
  5110. event: {
  5111. time: now(),
  5112. title: "Change",
  5113. subtitle: name,
  5114. data: {
  5115. newValue,
  5116. oldValue
  5117. },
  5118. groupId: activeAction
  5119. }
  5120. });
  5121. }
  5122. }, { deep: true });
  5123. });
  5124. store.$subscribe(({ events, type }, state) => {
  5125. api.notifyComponentUpdate();
  5126. api.sendInspectorState(INSPECTOR_ID);
  5127. if (!isTimelineActive)
  5128. return;
  5129. const eventData = {
  5130. time: now(),
  5131. title: formatMutationType(type),
  5132. data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)),
  5133. groupId: activeAction
  5134. };
  5135. if (type === MutationType.patchFunction) {
  5136. eventData.subtitle = "⤵️";
  5137. } else if (type === MutationType.patchObject) {
  5138. eventData.subtitle = "🧩";
  5139. } else if (events && !Array.isArray(events)) {
  5140. eventData.subtitle = events.type;
  5141. }
  5142. if (events) {
  5143. eventData.data["rawEvent(s)"] = {
  5144. _custom: {
  5145. display: "DebuggerEvent",
  5146. type: "object",
  5147. tooltip: "raw DebuggerEvent[]",
  5148. value: events
  5149. }
  5150. };
  5151. }
  5152. api.addTimelineEvent({
  5153. layerId: MUTATIONS_LAYER_ID,
  5154. event: eventData
  5155. });
  5156. }, { detached: true, flush: "sync" });
  5157. const hotUpdate = store._hotUpdate;
  5158. store._hotUpdate = markRaw((newStore) => {
  5159. hotUpdate(newStore);
  5160. api.addTimelineEvent({
  5161. layerId: MUTATIONS_LAYER_ID,
  5162. event: {
  5163. time: now(),
  5164. title: "🔥 " + store.$id,
  5165. subtitle: "HMR update",
  5166. data: {
  5167. store: formatDisplay(store.$id),
  5168. info: formatDisplay(`HMR update`)
  5169. }
  5170. }
  5171. });
  5172. api.notifyComponentUpdate();
  5173. api.sendInspectorTree(INSPECTOR_ID);
  5174. api.sendInspectorState(INSPECTOR_ID);
  5175. });
  5176. const { $dispose } = store;
  5177. store.$dispose = () => {
  5178. $dispose();
  5179. api.notifyComponentUpdate();
  5180. api.sendInspectorTree(INSPECTOR_ID);
  5181. api.sendInspectorState(INSPECTOR_ID);
  5182. api.getSettings().logStoreChanges && toastMessage(`Disposed "${store.$id}" store 🗑`);
  5183. };
  5184. api.notifyComponentUpdate();
  5185. api.sendInspectorTree(INSPECTOR_ID);
  5186. api.sendInspectorState(INSPECTOR_ID);
  5187. api.getSettings().logStoreChanges && toastMessage(`"${store.$id}" store installed 🆕`);
  5188. });
  5189. }
  5190. var runningActionId = 0;
  5191. var activeAction;
  5192. function patchActionForGrouping(store, actionNames, wrapWithProxy) {
  5193. const actions = actionNames.reduce((storeActions, actionName) => {
  5194. storeActions[actionName] = toRaw(store)[actionName];
  5195. return storeActions;
  5196. }, {});
  5197. for (const actionName in actions) {
  5198. store[actionName] = function() {
  5199. const _actionId = runningActionId;
  5200. const trackedStore = wrapWithProxy ? new Proxy(store, {
  5201. get(...args) {
  5202. activeAction = _actionId;
  5203. return Reflect.get(...args);
  5204. },
  5205. set(...args) {
  5206. activeAction = _actionId;
  5207. return Reflect.set(...args);
  5208. }
  5209. }) : store;
  5210. activeAction = _actionId;
  5211. const retValue = actions[actionName].apply(trackedStore, arguments);
  5212. activeAction = void 0;
  5213. return retValue;
  5214. };
  5215. }
  5216. }
  5217. function devtoolsPlugin({ app, store, options }) {
  5218. if (store.$id.startsWith("__hot:")) {
  5219. return;
  5220. }
  5221. store._isOptionsAPI = !!options.state;
  5222. if (!store._p._testing) {
  5223. patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);
  5224. const originalHotUpdate = store._hotUpdate;
  5225. toRaw(store)._hotUpdate = function(newStore) {
  5226. originalHotUpdate.apply(this, arguments);
  5227. patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);
  5228. };
  5229. }
  5230. addStoreToDevtools(
  5231. app,
  5232. // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
  5233. store
  5234. );
  5235. }
  5236. function createPinia() {
  5237. const scope = effectScope(true);
  5238. const state = scope.run(() => ref({}));
  5239. let _p = [];
  5240. let toBeInstalled = [];
  5241. const pinia = markRaw({
  5242. install(app) {
  5243. setActivePinia(pinia);
  5244. pinia._a = app;
  5245. app.provide(piniaSymbol, pinia);
  5246. app.config.globalProperties.$pinia = pinia;
  5247. if (IS_CLIENT) {
  5248. registerPiniaDevtools(app, pinia);
  5249. }
  5250. toBeInstalled.forEach((plugin) => _p.push(plugin));
  5251. toBeInstalled = [];
  5252. },
  5253. use(plugin) {
  5254. if (!this._a) {
  5255. toBeInstalled.push(plugin);
  5256. } else {
  5257. _p.push(plugin);
  5258. }
  5259. return this;
  5260. },
  5261. _p,
  5262. // it's actually undefined here
  5263. // @ts-expect-error
  5264. _a: null,
  5265. _e: scope,
  5266. _s: /* @__PURE__ */ new Map(),
  5267. state
  5268. });
  5269. if (IS_CLIENT && typeof Proxy !== "undefined") {
  5270. pinia.use(devtoolsPlugin);
  5271. }
  5272. return pinia;
  5273. }
  5274. function disposePinia(pinia) {
  5275. pinia._e.stop();
  5276. pinia._s.clear();
  5277. pinia._p.splice(0);
  5278. pinia.state.value = {};
  5279. pinia._a = null;
  5280. }
  5281. var isUseStore = (fn) => {
  5282. return typeof fn === "function" && typeof fn.$id === "string";
  5283. };
  5284. function patchObject(newState, oldState) {
  5285. for (const key in oldState) {
  5286. const subPatch = oldState[key];
  5287. if (!(key in newState)) {
  5288. continue;
  5289. }
  5290. const targetValue = newState[key];
  5291. if (isPlainObject(targetValue) && isPlainObject(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) {
  5292. newState[key] = patchObject(targetValue, subPatch);
  5293. } else {
  5294. newState[key] = subPatch;
  5295. }
  5296. }
  5297. return newState;
  5298. }
  5299. function acceptHMRUpdate(initialUseStore, hot) {
  5300. if (false) {
  5301. return () => {
  5302. };
  5303. }
  5304. return (newModule) => {
  5305. const pinia = hot.data.pinia || initialUseStore._pinia;
  5306. if (!pinia) {
  5307. return;
  5308. }
  5309. hot.data.pinia = pinia;
  5310. for (const exportName in newModule) {
  5311. const useStore = newModule[exportName];
  5312. if (isUseStore(useStore) && pinia._s.has(useStore.$id)) {
  5313. const id = useStore.$id;
  5314. if (id !== initialUseStore.$id) {
  5315. console.warn(`The id of the store changed from "${initialUseStore.$id}" to "${id}". Reloading.`);
  5316. return hot.invalidate();
  5317. }
  5318. const existingStore = pinia._s.get(id);
  5319. if (!existingStore) {
  5320. console.log(`[Pinia]: skipping hmr because store doesn't exist yet`);
  5321. return;
  5322. }
  5323. useStore(pinia, existingStore);
  5324. }
  5325. }
  5326. };
  5327. }
  5328. var noop = () => {
  5329. };
  5330. function addSubscription(subscriptions, callback, detached, onCleanup = noop) {
  5331. subscriptions.add(callback);
  5332. const removeSubscription = () => {
  5333. const isDel = subscriptions.delete(callback);
  5334. isDel && onCleanup();
  5335. };
  5336. if (!detached && getCurrentScope()) {
  5337. onScopeDispose(removeSubscription);
  5338. }
  5339. return removeSubscription;
  5340. }
  5341. function triggerSubscriptions(subscriptions, ...args) {
  5342. subscriptions.forEach((callback) => {
  5343. callback(...args);
  5344. });
  5345. }
  5346. var fallbackRunWithContext = (fn) => fn();
  5347. var ACTION_MARKER = Symbol();
  5348. var ACTION_NAME = Symbol();
  5349. function mergeReactiveObjects(target2, patchToApply) {
  5350. if (target2 instanceof Map && patchToApply instanceof Map) {
  5351. patchToApply.forEach((value, key) => target2.set(key, value));
  5352. } else if (target2 instanceof Set && patchToApply instanceof Set) {
  5353. patchToApply.forEach(target2.add, target2);
  5354. }
  5355. for (const key in patchToApply) {
  5356. if (!patchToApply.hasOwnProperty(key))
  5357. continue;
  5358. const subPatch = patchToApply[key];
  5359. const targetValue = target2[key];
  5360. if (isPlainObject(targetValue) && isPlainObject(subPatch) && target2.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {
  5361. target2[key] = mergeReactiveObjects(targetValue, subPatch);
  5362. } else {
  5363. target2[key] = subPatch;
  5364. }
  5365. }
  5366. return target2;
  5367. }
  5368. var skipHydrateSymbol = true ? Symbol("pinia:skipHydration") : (
  5369. /* istanbul ignore next */
  5370. Symbol()
  5371. );
  5372. function skipHydrate(obj) {
  5373. return Object.defineProperty(obj, skipHydrateSymbol, {});
  5374. }
  5375. function shouldHydrate(obj) {
  5376. return !isPlainObject(obj) || !Object.prototype.hasOwnProperty.call(obj, skipHydrateSymbol);
  5377. }
  5378. var { assign } = Object;
  5379. function isComputed(o) {
  5380. return !!(isRef(o) && o.effect);
  5381. }
  5382. function createOptionsStore(id, options, pinia, hot) {
  5383. const { state, actions, getters } = options;
  5384. const initialState = pinia.state.value[id];
  5385. let store;
  5386. function setup() {
  5387. if (!initialState && !hot) {
  5388. pinia.state.value[id] = state ? state() : {};
  5389. }
  5390. const localState = hot ? (
  5391. // use ref() to unwrap refs inside state TODO: check if this is still necessary
  5392. toRefs(ref(state ? state() : {}).value)
  5393. ) : toRefs(pinia.state.value[id]);
  5394. return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
  5395. if (name in localState) {
  5396. console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`);
  5397. }
  5398. computedGetters[name] = markRaw(computed(() => {
  5399. setActivePinia(pinia);
  5400. const store2 = pinia._s.get(id);
  5401. return getters[name].call(store2, store2);
  5402. }));
  5403. return computedGetters;
  5404. }, {}));
  5405. }
  5406. store = createSetupStore(id, setup, options, pinia, hot, true);
  5407. return store;
  5408. }
  5409. function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {
  5410. let scope;
  5411. const optionsForPlugin = assign({ actions: {} }, options);
  5412. if (!pinia._e.active) {
  5413. throw new Error("Pinia destroyed");
  5414. }
  5415. const $subscribeOptions = { deep: true };
  5416. if (true) {
  5417. $subscribeOptions.onTrigger = (event) => {
  5418. if (isListening) {
  5419. debuggerEvents = event;
  5420. } else if (isListening == false && !store._hotUpdating) {
  5421. if (Array.isArray(debuggerEvents)) {
  5422. debuggerEvents.push(event);
  5423. } else {
  5424. console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.");
  5425. }
  5426. }
  5427. };
  5428. }
  5429. let isListening;
  5430. let isSyncListening;
  5431. let subscriptions = /* @__PURE__ */ new Set();
  5432. let actionSubscriptions = /* @__PURE__ */ new Set();
  5433. let debuggerEvents;
  5434. const initialState = pinia.state.value[$id];
  5435. if (!isOptionsStore && !initialState && !hot) {
  5436. pinia.state.value[$id] = {};
  5437. }
  5438. const hotState = ref({});
  5439. let activeListener;
  5440. function $patch(partialStateOrMutator) {
  5441. let subscriptionMutation;
  5442. isListening = isSyncListening = false;
  5443. if (true) {
  5444. debuggerEvents = [];
  5445. }
  5446. if (typeof partialStateOrMutator === "function") {
  5447. partialStateOrMutator(pinia.state.value[$id]);
  5448. subscriptionMutation = {
  5449. type: MutationType.patchFunction,
  5450. storeId: $id,
  5451. events: debuggerEvents
  5452. };
  5453. } else {
  5454. mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);
  5455. subscriptionMutation = {
  5456. type: MutationType.patchObject,
  5457. payload: partialStateOrMutator,
  5458. storeId: $id,
  5459. events: debuggerEvents
  5460. };
  5461. }
  5462. const myListenerId = activeListener = Symbol();
  5463. nextTick().then(() => {
  5464. if (activeListener === myListenerId) {
  5465. isListening = true;
  5466. }
  5467. });
  5468. isSyncListening = true;
  5469. triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);
  5470. }
  5471. const $reset = isOptionsStore ? function $reset2() {
  5472. const { state } = options;
  5473. const newState = state ? state() : {};
  5474. this.$patch(($state) => {
  5475. assign($state, newState);
  5476. });
  5477. } : (
  5478. /* istanbul ignore next */
  5479. true ? () => {
  5480. throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`);
  5481. } : noop
  5482. );
  5483. function $dispose() {
  5484. scope.stop();
  5485. subscriptions.clear();
  5486. actionSubscriptions.clear();
  5487. pinia._s.delete($id);
  5488. }
  5489. const action = (fn, name = "") => {
  5490. if (ACTION_MARKER in fn) {
  5491. fn[ACTION_NAME] = name;
  5492. return fn;
  5493. }
  5494. const wrappedAction = function() {
  5495. setActivePinia(pinia);
  5496. const args = Array.from(arguments);
  5497. const afterCallbackSet = /* @__PURE__ */ new Set();
  5498. const onErrorCallbackSet = /* @__PURE__ */ new Set();
  5499. function after(callback) {
  5500. afterCallbackSet.add(callback);
  5501. }
  5502. function onError(callback) {
  5503. onErrorCallbackSet.add(callback);
  5504. }
  5505. triggerSubscriptions(actionSubscriptions, {
  5506. args,
  5507. name: wrappedAction[ACTION_NAME],
  5508. store,
  5509. after,
  5510. onError
  5511. });
  5512. let ret;
  5513. try {
  5514. ret = fn.apply(this && this.$id === $id ? this : store, args);
  5515. } catch (error) {
  5516. triggerSubscriptions(onErrorCallbackSet, error);
  5517. throw error;
  5518. }
  5519. if (ret instanceof Promise) {
  5520. return ret.then((value) => {
  5521. triggerSubscriptions(afterCallbackSet, value);
  5522. return value;
  5523. }).catch((error) => {
  5524. triggerSubscriptions(onErrorCallbackSet, error);
  5525. return Promise.reject(error);
  5526. });
  5527. }
  5528. triggerSubscriptions(afterCallbackSet, ret);
  5529. return ret;
  5530. };
  5531. wrappedAction[ACTION_MARKER] = true;
  5532. wrappedAction[ACTION_NAME] = name;
  5533. return wrappedAction;
  5534. };
  5535. const _hmrPayload = markRaw({
  5536. actions: {},
  5537. getters: {},
  5538. state: [],
  5539. hotState
  5540. });
  5541. const partialStore = {
  5542. _p: pinia,
  5543. // _s: scope,
  5544. $id,
  5545. $onAction: addSubscription.bind(null, actionSubscriptions),
  5546. $patch,
  5547. $reset,
  5548. $subscribe(callback, options2 = {}) {
  5549. const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());
  5550. const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {
  5551. if (options2.flush === "sync" ? isSyncListening : isListening) {
  5552. callback({
  5553. storeId: $id,
  5554. type: MutationType.direct,
  5555. events: debuggerEvents
  5556. }, state);
  5557. }
  5558. }, assign({}, $subscribeOptions, options2)));
  5559. return removeSubscription;
  5560. },
  5561. $dispose
  5562. };
  5563. const store = reactive(true ? assign(
  5564. {
  5565. _hmrPayload,
  5566. _customProperties: markRaw(/* @__PURE__ */ new Set())
  5567. // devtools custom properties
  5568. },
  5569. partialStore
  5570. // must be added later
  5571. // setupStore
  5572. ) : partialStore);
  5573. pinia._s.set($id, store);
  5574. const runWithContext = pinia._a && pinia._a.runWithContext || fallbackRunWithContext;
  5575. const setupStore = runWithContext(() => pinia._e.run(() => (scope = effectScope()).run(() => setup({ action }))));
  5576. for (const key in setupStore) {
  5577. const prop = setupStore[key];
  5578. if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {
  5579. if (hot) {
  5580. hotState.value[key] = toRef(setupStore, key);
  5581. } else if (!isOptionsStore) {
  5582. if (initialState && shouldHydrate(prop)) {
  5583. if (isRef(prop)) {
  5584. prop.value = initialState[key];
  5585. } else {
  5586. mergeReactiveObjects(prop, initialState[key]);
  5587. }
  5588. }
  5589. pinia.state.value[$id][key] = prop;
  5590. }
  5591. if (true) {
  5592. _hmrPayload.state.push(key);
  5593. }
  5594. } else if (typeof prop === "function") {
  5595. const actionValue = hot ? prop : action(prop, key);
  5596. setupStore[key] = actionValue;
  5597. if (true) {
  5598. _hmrPayload.actions[key] = prop;
  5599. }
  5600. optionsForPlugin.actions[key] = prop;
  5601. } else if (true) {
  5602. if (isComputed(prop)) {
  5603. _hmrPayload.getters[key] = isOptionsStore ? (
  5604. // @ts-expect-error
  5605. options.getters[key]
  5606. ) : prop;
  5607. if (IS_CLIENT) {
  5608. const getters = setupStore._getters || // @ts-expect-error: same
  5609. (setupStore._getters = markRaw([]));
  5610. getters.push(key);
  5611. }
  5612. }
  5613. }
  5614. }
  5615. assign(store, setupStore);
  5616. assign(toRaw(store), setupStore);
  5617. Object.defineProperty(store, "$state", {
  5618. get: () => hot ? hotState.value : pinia.state.value[$id],
  5619. set: (state) => {
  5620. if (hot) {
  5621. throw new Error("cannot set hotState");
  5622. }
  5623. $patch(($state) => {
  5624. assign($state, state);
  5625. });
  5626. }
  5627. });
  5628. if (true) {
  5629. store._hotUpdate = markRaw((newStore) => {
  5630. store._hotUpdating = true;
  5631. newStore._hmrPayload.state.forEach((stateKey) => {
  5632. if (stateKey in store.$state) {
  5633. const newStateTarget = newStore.$state[stateKey];
  5634. const oldStateSource = store.$state[stateKey];
  5635. if (typeof newStateTarget === "object" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) {
  5636. patchObject(newStateTarget, oldStateSource);
  5637. } else {
  5638. newStore.$state[stateKey] = oldStateSource;
  5639. }
  5640. }
  5641. store[stateKey] = toRef(newStore.$state, stateKey);
  5642. });
  5643. Object.keys(store.$state).forEach((stateKey) => {
  5644. if (!(stateKey in newStore.$state)) {
  5645. delete store[stateKey];
  5646. }
  5647. });
  5648. isListening = false;
  5649. isSyncListening = false;
  5650. pinia.state.value[$id] = toRef(newStore._hmrPayload, "hotState");
  5651. isSyncListening = true;
  5652. nextTick().then(() => {
  5653. isListening = true;
  5654. });
  5655. for (const actionName in newStore._hmrPayload.actions) {
  5656. const actionFn = newStore[actionName];
  5657. store[actionName] = //
  5658. action(actionFn, actionName);
  5659. }
  5660. for (const getterName in newStore._hmrPayload.getters) {
  5661. const getter = newStore._hmrPayload.getters[getterName];
  5662. const getterValue = isOptionsStore ? (
  5663. // special handling of options api
  5664. computed(() => {
  5665. setActivePinia(pinia);
  5666. return getter.call(store, store);
  5667. })
  5668. ) : getter;
  5669. store[getterName] = //
  5670. getterValue;
  5671. }
  5672. Object.keys(store._hmrPayload.getters).forEach((key) => {
  5673. if (!(key in newStore._hmrPayload.getters)) {
  5674. delete store[key];
  5675. }
  5676. });
  5677. Object.keys(store._hmrPayload.actions).forEach((key) => {
  5678. if (!(key in newStore._hmrPayload.actions)) {
  5679. delete store[key];
  5680. }
  5681. });
  5682. store._hmrPayload = newStore._hmrPayload;
  5683. store._getters = newStore._getters;
  5684. store._hotUpdating = false;
  5685. });
  5686. }
  5687. if (IS_CLIENT) {
  5688. const nonEnumerable = {
  5689. writable: true,
  5690. configurable: true,
  5691. // avoid warning on devtools trying to display this property
  5692. enumerable: false
  5693. };
  5694. ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => {
  5695. Object.defineProperty(store, p, assign({ value: store[p] }, nonEnumerable));
  5696. });
  5697. }
  5698. pinia._p.forEach((extender) => {
  5699. if (IS_CLIENT) {
  5700. const extensions = scope.run(() => extender({
  5701. store,
  5702. app: pinia._a,
  5703. pinia,
  5704. options: optionsForPlugin
  5705. }));
  5706. Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));
  5707. assign(store, extensions);
  5708. } else {
  5709. assign(store, scope.run(() => extender({
  5710. store,
  5711. app: pinia._a,
  5712. pinia,
  5713. options: optionsForPlugin
  5714. })));
  5715. }
  5716. });
  5717. if (store.$state && typeof store.$state === "object" && typeof store.$state.constructor === "function" && !store.$state.constructor.toString().includes("[native code]")) {
  5718. console.warn(`[🍍]: The "state" must be a plain object. It cannot be
  5719. state: () => new MyClass()
  5720. Found in store "${store.$id}".`);
  5721. }
  5722. if (initialState && isOptionsStore && options.hydrate) {
  5723. options.hydrate(store.$state, initialState);
  5724. }
  5725. isListening = true;
  5726. isSyncListening = true;
  5727. return store;
  5728. }
  5729. function defineStore(id, setup, setupOptions) {
  5730. let options;
  5731. const isSetupStore = typeof setup === "function";
  5732. options = isSetupStore ? setupOptions : setup;
  5733. function useStore(pinia, hot) {
  5734. const hasContext = hasInjectionContext();
  5735. pinia = // in test mode, ignore the argument provided as we can always retrieve a
  5736. // pinia instance with getActivePinia()
  5737. (false ? null : pinia) || (hasContext ? inject(piniaSymbol, null) : null);
  5738. if (pinia)
  5739. setActivePinia(pinia);
  5740. if (!activePinia) {
  5741. throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
  5742. See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
  5743. This will fail in production.`);
  5744. }
  5745. pinia = activePinia;
  5746. if (!pinia._s.has(id)) {
  5747. if (isSetupStore) {
  5748. createSetupStore(id, setup, options, pinia);
  5749. } else {
  5750. createOptionsStore(id, options, pinia);
  5751. }
  5752. if (true) {
  5753. useStore._pinia = pinia;
  5754. }
  5755. }
  5756. const store = pinia._s.get(id);
  5757. if (hot) {
  5758. const hotId = "__hot:" + id;
  5759. const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia, true) : createOptionsStore(hotId, assign({}, options), pinia, true);
  5760. hot._hotUpdate(newStore);
  5761. delete pinia.state.value[hotId];
  5762. pinia._s.delete(hotId);
  5763. }
  5764. if (IS_CLIENT) {
  5765. const currentInstance = getCurrentInstance();
  5766. if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement
  5767. !hot) {
  5768. const vm = currentInstance.proxy;
  5769. const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {};
  5770. cache[id] = store;
  5771. }
  5772. }
  5773. return store;
  5774. }
  5775. useStore.$id = id;
  5776. return useStore;
  5777. }
  5778. var mapStoreSuffix = "Store";
  5779. function setMapStoreSuffix(suffix) {
  5780. mapStoreSuffix = suffix;
  5781. }
  5782. function mapStores(...stores) {
  5783. if (Array.isArray(stores[0])) {
  5784. console.warn(`[🍍]: Directly pass all stores to "mapStores()" without putting them in an array:
  5785. Replace
  5786. mapStores([useAuthStore, useCartStore])
  5787. with
  5788. mapStores(useAuthStore, useCartStore)
  5789. This will fail in production if not fixed.`);
  5790. stores = stores[0];
  5791. }
  5792. return stores.reduce((reduced, useStore) => {
  5793. reduced[useStore.$id + mapStoreSuffix] = function() {
  5794. return useStore(this.$pinia);
  5795. };
  5796. return reduced;
  5797. }, {});
  5798. }
  5799. function mapState(useStore, keysOrMapper) {
  5800. return Array.isArray(keysOrMapper) ? keysOrMapper.reduce((reduced, key) => {
  5801. reduced[key] = function() {
  5802. return useStore(this.$pinia)[key];
  5803. };
  5804. return reduced;
  5805. }, {}) : Object.keys(keysOrMapper).reduce((reduced, key) => {
  5806. reduced[key] = function() {
  5807. const store = useStore(this.$pinia);
  5808. const storeKey = keysOrMapper[key];
  5809. return typeof storeKey === "function" ? storeKey.call(this, store) : (
  5810. // @ts-expect-error: FIXME: should work?
  5811. store[storeKey]
  5812. );
  5813. };
  5814. return reduced;
  5815. }, {});
  5816. }
  5817. var mapGetters = mapState;
  5818. function mapActions(useStore, keysOrMapper) {
  5819. return Array.isArray(keysOrMapper) ? keysOrMapper.reduce((reduced, key) => {
  5820. reduced[key] = function(...args) {
  5821. return useStore(this.$pinia)[key](...args);
  5822. };
  5823. return reduced;
  5824. }, {}) : Object.keys(keysOrMapper).reduce((reduced, key) => {
  5825. reduced[key] = function(...args) {
  5826. return useStore(this.$pinia)[keysOrMapper[key]](...args);
  5827. };
  5828. return reduced;
  5829. }, {});
  5830. }
  5831. function mapWritableState(useStore, keysOrMapper) {
  5832. return Array.isArray(keysOrMapper) ? keysOrMapper.reduce((reduced, key) => {
  5833. reduced[key] = {
  5834. get() {
  5835. return useStore(this.$pinia)[key];
  5836. },
  5837. set(value) {
  5838. return useStore(this.$pinia)[key] = value;
  5839. }
  5840. };
  5841. return reduced;
  5842. }, {}) : Object.keys(keysOrMapper).reduce((reduced, key) => {
  5843. reduced[key] = {
  5844. get() {
  5845. return useStore(this.$pinia)[keysOrMapper[key]];
  5846. },
  5847. set(value) {
  5848. return useStore(this.$pinia)[keysOrMapper[key]] = value;
  5849. }
  5850. };
  5851. return reduced;
  5852. }, {});
  5853. }
  5854. function storeToRefs(store) {
  5855. const rawStore = toRaw(store);
  5856. const refs = {};
  5857. for (const key in rawStore) {
  5858. const value = rawStore[key];
  5859. if (value.effect) {
  5860. refs[key] = // ...
  5861. computed({
  5862. get: () => store[key],
  5863. set(value2) {
  5864. store[key] = value2;
  5865. }
  5866. });
  5867. } else if (isRef(value) || isReactive(value)) {
  5868. refs[key] = // ---
  5869. toRef(store, key);
  5870. }
  5871. }
  5872. return refs;
  5873. }
  5874. export {
  5875. MutationType,
  5876. acceptHMRUpdate,
  5877. createPinia,
  5878. defineStore,
  5879. disposePinia,
  5880. getActivePinia,
  5881. mapActions,
  5882. mapGetters,
  5883. mapState,
  5884. mapStores,
  5885. mapWritableState,
  5886. setActivePinia,
  5887. setMapStoreSuffix,
  5888. shouldHydrate,
  5889. skipHydrate,
  5890. storeToRefs
  5891. };
  5892. /*! Bundled license information:
  5893. pinia/dist/pinia.mjs:
  5894. (*!
  5895. * pinia v3.0.4
  5896. * (c) 2025 Eduardo San Martin Morote
  5897. * @license MIT
  5898. *)
  5899. (*! #__NO_SIDE_EFFECTS__ *)
  5900. */
  5901. //# sourceMappingURL=pinia.js.map