@nuxt/devtools 4.0.0-alpha.7 → 4.0.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/dist/chunks/analyze-build.mjs +32 -0
  2. package/dist/chunks/module-main.mjs +610 -302
  3. package/dist/chunks/timeline.mjs +2 -2
  4. package/dist/chunks/vite-inspect.mjs +75 -39
  5. package/dist/chunks/vscode.mjs +6 -7
  6. package/dist/client/200.html +1 -1
  7. package/dist/client/404.html +1 -1
  8. package/dist/client/_nuxt/__blank-mr7fdmv7.js +1 -0
  9. package/dist/client/_nuxt/analyze-build-nemej5kd.js +1 -0
  10. package/dist/client/_nuxt/assets-cl372mus.js +6 -0
  11. package/dist/client/_nuxt/{auth-required-panel-gwrodxrm.js → auth-required-panel-gdnspumn.js} +1 -1
  12. package/dist/client/_nuxt/builds/latest.json +1 -1
  13. package/dist/client/_nuxt/builds/meta/9ec1ff21-8126-4e86-bc50-039a1d3867c9.json +1 -0
  14. package/dist/client/_nuxt/{client-jwk7bkap.js → client-ngo84kjy.js} +1 -1
  15. package/dist/client/_nuxt/{code-diff-d1bf4mlz.js → code-diff-lkyoam09.js} +3 -3
  16. package/dist/client/_nuxt/code-snippets-hxwvpad4.js +1 -0
  17. package/dist/client/_nuxt/components-f9ckplr6.js +1 -0
  18. package/dist/client/_nuxt/composable-item-kchrxdzu.js +1 -0
  19. package/dist/client/_nuxt/composables-in7qtp0e.js +1 -0
  20. package/dist/client/_nuxt/custom-_name_-i8pdh231.js +1 -0
  21. package/dist/client/_nuxt/data-schema-button-jy2w2afg.js +1 -0
  22. package/dist/client/_nuxt/{data-schema-drawer-5ccj6aug.js → data-schema-drawer-liuhj385.js} +2 -2
  23. package/dist/client/_nuxt/debug-inf9k7rz.js +1 -0
  24. package/dist/client/_nuxt/{default-ibmlv6hu.js → default-dgqm22gk.js} +1 -1
  25. package/dist/client/_nuxt/dist-cwkxp5t4.js +1 -0
  26. package/dist/client/_nuxt/dist-das2ggjj.js +1 -0
  27. package/dist/client/_nuxt/dist-hhnji3pn.js +1 -0
  28. package/dist/client/_nuxt/{duration-display-cfe3xsok.js → duration-display-m84jv0cg.js} +1 -1
  29. package/dist/client/_nuxt/entry.css-ivisc4pv.css +1 -0
  30. package/dist/client/_nuxt/error-404-eoz73pl9.js +1 -0
  31. package/dist/client/_nuxt/error-404.css-i7pin5fo.css +1 -0
  32. package/dist/client/_nuxt/error-500-h0agvsjp.js +1 -0
  33. package/dist/client/_nuxt/error-500.css-4ikva5xr.css +1 -0
  34. package/dist/client/_nuxt/error-h5jfp4d9.js +9 -0
  35. package/dist/client/_nuxt/{filepath-item-calgslzq.js → filepath-item-b7ye3und.js} +1 -1
  36. package/dist/client/_nuxt/full-bc145h1r.js +1 -0
  37. package/dist/client/_nuxt/{help-fab-ietvwhig.js → help-fab-l6k9jkcj.js} +1 -1
  38. package/dist/client/_nuxt/hooks-ce5n3mpx.js +1 -0
  39. package/dist/client/_nuxt/iefeupks.js +4 -0
  40. package/dist/client/_nuxt/imports-ib3kw7ns.js +1 -0
  41. package/dist/client/_nuxt/launch-page-f3nbtoc4.js +1 -0
  42. package/dist/client/_nuxt/modules-gf4tkhai.js +1 -0
  43. package/dist/client/_nuxt/nbadge-254fd0s4.js +1 -0
  44. package/dist/client/_nuxt/{ncheckbox-gl62y715.js → ncheckbox-jr3c6e4e.js} +1 -1
  45. package/dist/client/_nuxt/ncode-block-jv3jk7c5.js +2 -0
  46. package/dist/client/_nuxt/{ndrawer-evv584t1.js → ndrawer-myfvks89.js} +1 -1
  47. package/dist/client/_nuxt/{ndropdown-dqqc8bnq.js → ndropdown-jnrvla1s.js} +1 -1
  48. package/dist/client/_nuxt/{nicon-title-f3ho3hah.js → nicon-title-66kg2f9l.js} +1 -1
  49. package/dist/client/_nuxt/{nlink-endeyoly.js → nlink-gej31v24.js} +1 -1
  50. package/dist/client/_nuxt/{nmarkdown-iw4stzqp.js → nmarkdown-nskcr8pg.js} +1 -1
  51. package/dist/client/_nuxt/{nnavbar-n8fcnalx.js → nnavbar-bvq6rk5u.js} +1 -1
  52. package/dist/client/_nuxt/none-fcxnfo1z.js +1 -0
  53. package/dist/client/_nuxt/{nsection-block-n5u7wj9x.js → nsection-block-illvvuef.js} +1 -1
  54. package/dist/client/_nuxt/{nselect-kdzalcm2.js → nselect-hlo7a40m.js} +1 -1
  55. package/dist/client/_nuxt/nselect-tabs-f47fcdsg.js +1 -0
  56. package/dist/client/_nuxt/nswitch-iey7gi9t.js +1 -0
  57. package/dist/client/_nuxt/{ntip-m8x8y44j.js → ntip-kpuxzuo5.js} +1 -1
  58. package/dist/client/_nuxt/nuxt-hqfu72u1.js +2 -0
  59. package/dist/client/_nuxt/open-graph-m35euip2.js +3 -0
  60. package/dist/client/_nuxt/overview-egkv3tit.js +1 -0
  61. package/dist/client/_nuxt/pages-ddqyzugj.js +1 -0
  62. package/dist/client/_nuxt/pages-n0i7aw4m.js +1 -0
  63. package/dist/client/_nuxt/payload-d6h8l8l2.js +1 -0
  64. package/dist/client/_nuxt/pinia-dl2li4zl.js +1 -0
  65. package/dist/client/_nuxt/plugins-nhvbpqrg.js +1 -0
  66. package/dist/client/_nuxt/ready-if1s6ugr.js +1 -0
  67. package/dist/client/_nuxt/render-tree-h0xpx3p4.js +1 -0
  68. package/dist/client/_nuxt/rpc-jaaujnev.js +1 -0
  69. package/dist/client/_nuxt/runtime-configs-o91gwu2q.js +1 -0
  70. package/dist/client/_nuxt/server-route-inputs-ej6h9rh8.js +1 -0
  71. package/dist/client/_nuxt/server-routes-ocltmxje.js +7 -0
  72. package/dist/client/_nuxt/server-tasks-hhkstkby.js +1 -0
  73. package/dist/client/_nuxt/settings-i2ld0c8q.js +1 -0
  74. package/dist/client/_nuxt/stacktrace-list-epxhdumx.js +1 -0
  75. package/dist/client/_nuxt/{state-components-eaw2evd3.js → state-components-eipbhsbn.js} +1 -1
  76. package/dist/client/_nuxt/{state-editor-jm35t8p1.js → state-editor-ogobz58w.js} +1 -1
  77. package/dist/client/_nuxt/state-modules-egymhwqw.js +1 -0
  78. package/dist/client/_nuxt/storage-cciny388.js +1 -0
  79. package/dist/client/_nuxt/storage-options-g42elkwy.js +1 -0
  80. package/dist/client/_nuxt/timeline-oese6i7t.js +31 -0
  81. package/dist/client/_nuxt/{unocss-runtime-kfral2d7.js → unocss-runtime-dh4insrr.js} +1 -1
  82. package/dist/client/_nuxt/utils-h3uzf8s7.js +2 -0
  83. package/dist/client/_nuxt/vendor/json-editor-vue-c7zwcfg4.js +3861 -0
  84. package/dist/client/_nuxt/vendor/{markdown-it-gg8o3tmh.js → markdown-it-cx0uvu2o.js} +1 -1
  85. package/dist/client/_nuxt/vendor/{quicktype-core-ozubcbyl.js → quicktype-core-otmjigaj.js} +65 -65
  86. package/dist/client/_nuxt/vendor/shiki-mgsi4s2l.js +153 -0
  87. package/dist/client/_nuxt/vendor/unocss-maavuy8p.js +3 -0
  88. package/dist/client/_nuxt/virtual-files-pd2s0ff2.js +1 -0
  89. package/dist/client/_nuxt/vue-devtools-bxffe3ae.js +4 -0
  90. package/dist/client/_nuxt/vue-router-mro49nyg.js +1 -0
  91. package/dist/client/index.html +1 -1
  92. package/dist/module.json +1 -1
  93. package/dist/module.mjs +1 -1
  94. package/dist/runtime/plugins/view/client.js +15 -0
  95. package/dist/shared/devtools.B9TxdMuu.mjs +119 -0
  96. package/dist/types.d.mts +1 -5
  97. package/dist/webcomponents/index.mjs +1 -1
  98. package/package.json +45 -49
  99. package/.discoveryrc.cjs +0 -13
  100. package/dist/client/_nuxt/__blank-ekrx7eve.js +0 -1
  101. package/dist/client/_nuxt/analyze-build-gtjxxh9s.js +0 -1
  102. package/dist/client/_nuxt/assets-fxuoynew.js +0 -6
  103. package/dist/client/_nuxt/builds/meta/23fee0aa-9df9-4da8-b519-ce0799e7da4e.json +0 -1
  104. package/dist/client/_nuxt/code-snippets-nodldh90.js +0 -1
  105. package/dist/client/_nuxt/components-ibu6c1zd.js +0 -1
  106. package/dist/client/_nuxt/composable-item-lb3qexrh.js +0 -1
  107. package/dist/client/_nuxt/custom-_name_-dt22ybu3.js +0 -1
  108. package/dist/client/_nuxt/data-schema-button-m4wb470q.js +0 -1
  109. package/dist/client/_nuxt/debug-nxl66qh3.js +0 -1
  110. package/dist/client/_nuxt/dist-nsuzcp77.js +0 -1
  111. package/dist/client/_nuxt/entry.css-m21ytcnz.css +0 -1
  112. package/dist/client/_nuxt/error-404-izmgsqlm.js +0 -1
  113. package/dist/client/_nuxt/error-404.css-l9jcssuy.css +0 -1
  114. package/dist/client/_nuxt/error-500-fejd4grh.js +0 -1
  115. package/dist/client/_nuxt/error-500.css-he4ew8b1.css +0 -1
  116. package/dist/client/_nuxt/error-mm873c55.js +0 -9
  117. package/dist/client/_nuxt/full-pesi6bu3.js +0 -1
  118. package/dist/client/_nuxt/hooks-mqgelnks.js +0 -1
  119. package/dist/client/_nuxt/imports-bofdhcsr.js +0 -1
  120. package/dist/client/_nuxt/launch-page-i8mgxym7.js +0 -1
  121. package/dist/client/_nuxt/modules-b6uha2ss.js +0 -1
  122. package/dist/client/_nuxt/nbadge-ft1i3ddy.js +0 -1
  123. package/dist/client/_nuxt/ncode-block-ksrq5ppu.js +0 -2
  124. package/dist/client/_nuxt/none-gr24yqiq.js +0 -1
  125. package/dist/client/_nuxt/nselect-tabs-e440xayq.js +0 -1
  126. package/dist/client/_nuxt/nswitch-pdw73751.js +0 -1
  127. package/dist/client/_nuxt/nuxt-kphganvs.js +0 -1
  128. package/dist/client/_nuxt/o7y7c26x.js +0 -4
  129. package/dist/client/_nuxt/open-graph-mtq8qyx5.js +0 -3
  130. package/dist/client/_nuxt/overview-idjgy9u4.js +0 -1
  131. package/dist/client/_nuxt/pages-g3tcvbsn.js +0 -1
  132. package/dist/client/_nuxt/pages-lk0hxlsc.js +0 -1
  133. package/dist/client/_nuxt/payload-ovd8emqe.js +0 -1
  134. package/dist/client/_nuxt/pinia-e6em75yg.js +0 -1
  135. package/dist/client/_nuxt/plugins-ojph2z4c.js +0 -1
  136. package/dist/client/_nuxt/ready-b5u27bv4.js +0 -1
  137. package/dist/client/_nuxt/render-tree-iwtso0n9.js +0 -1
  138. package/dist/client/_nuxt/rpc-ewzip6fb.js +0 -4
  139. package/dist/client/_nuxt/runtime-configs-gyhmrfcz.js +0 -1
  140. package/dist/client/_nuxt/server-discovery-cfu428ir.js +0 -1
  141. package/dist/client/_nuxt/server-route-inputs-hhxdu10p.js +0 -1
  142. package/dist/client/_nuxt/server-routes-efc7olve.js +0 -7
  143. package/dist/client/_nuxt/server-tasks-o59rfww6.js +0 -1
  144. package/dist/client/_nuxt/settings-c6tbo50r.js +0 -1
  145. package/dist/client/_nuxt/stacktrace-list-c5b46nul.js +0 -1
  146. package/dist/client/_nuxt/state-modules-oox7nhib.js +0 -1
  147. package/dist/client/_nuxt/storage-fdd2zc94.js +0 -1
  148. package/dist/client/_nuxt/storage-options-ho965h55.js +0 -1
  149. package/dist/client/_nuxt/terminals-b8awmi75.js +0 -1
  150. package/dist/client/_nuxt/terminals.css-mejv43xm.css +0 -1
  151. package/dist/client/_nuxt/timeline-nsh72kov.js +0 -31
  152. package/dist/client/_nuxt/utils-hgmynvjd.js +0 -2
  153. package/dist/client/_nuxt/vendor/json-editor-vue-mkw4apmc.js +0 -3869
  154. package/dist/client/_nuxt/vendor/shiki-c7z35hpo.js +0 -293
  155. package/dist/client/_nuxt/vendor/unocss-lkro8gbr.js +0 -3
  156. package/dist/client/_nuxt/vendor/xterm-eb5atty5.js +0 -36
  157. package/dist/client/_nuxt/vendor/xterm.css-j9zpjwmg.css +0 -1
  158. package/dist/client/_nuxt/virtual-files-met9zkti.js +0 -1
  159. package/dist/client/_nuxt/vue-devtools-bl144b70.js +0 -4
  160. package/dist/client/_nuxt/vue-router-cnnrtyb0.js +0 -1
  161. package/dist/client/discovery/index.html +0 -611
  162. package/dist/shared/devtools.nEotcg1R.mjs +0 -113
@@ -1 +0,0 @@
1
- import{$t as e,C as t,J as n,S as r,St as i,T as a,U as o,Y as s,Zt as c,_ as l,en as u,g as d,h as f,jt as p,m,p as h,s as g,ut as _}from"./vendor/json-editor-vue-mkw4apmc.js";import{T as v}from"./utils-hgmynvjd.js";import{k as y}from"#entry";import{t as b}from"./ncode-block-ksrq5ppu.js";import"./composables-ioamscf4.js";import{t as x}from"./ncheckbox-gl62y715.js";import{t as S}from"./filepath-item-calgslzq.js";import{t as C}from"./nsection-block-n5u7wj9x.js";import{t as w}from"./nbadge-ft1i3ddy.js";import{t as T}from"./color-abaog8vc.js";var E=Object.assign(a({__name:`NBadgeHashed`,props:{text:{}},setup(t){let n=t,i=h(()=>({color:T(n.text,50,60),background:T(n.text,50,60,.05)}));return(n,a)=>(o(),f(w,{style:e(i.value)},{default:_(()=>[r(u(t.text),1),s(n.$slots,`default`)]),_:3},8,[`style`]))}}),{__name:`NBadgeHashed`}),D={flex:`~ gap-2 col`,mb4:``},O={flex:`~ gap-3 items-center`},k={key:0,flex:`~ gap-1`,"items-center":``,p1:``,border:`~ base rounded`},A={"max-w-full":``,"of-auto":``},j={"text-center":``,op50:``},M={flex:`~`,px4:``},N={key:0,op50:``},P={px2:``,"text-center":``},F={"of-auto":``},I=Object.assign(a({__name:`DebugModuleMutationRecords`,props:{moduleMutationRecords:{}},setup(e){let r=e,a=/^[a-z]:[\\/]/i;function s(e){return e.startsWith(`/`)||e.match(a)}let p=i(!1),v=i(!1),C=i(!1),w=i(!1),T=i(!1),I=i(``),L=h(()=>{let e=r.moduleMutationRecords;return p.value||(e=e.filter(e=>!e.name.startsWith(`nuxt:`)&&e.name!==`@nuxt/devtools`)),v.value||(e=e.filter(e=>e.keys.join(`.`)!==`build.templates`)),C.value||(e=e.filter(e=>e.keys.join(`.`)!==`build.transpile`)),w.value||(e=e.filter(e=>e.keys.join(`.`)!==`plugins`)),T.value||(e=e.filter(e=>e.method||e.value!==`[]`&&e.value!==`{}`)),I.value&&(e=e.filter(e=>e.name===I.value)),e});return(r,i)=>{let a=x,h=E,R=y,z=S,B=b;return o(),l(g,null,[m(`div`,D,[m(`div`,O,[t(a,{modelValue:p.value,"onUpdate:modelValue":i[0]||=e=>p.value=e,n:`primary`},{default:_(()=>[...i[6]||=[m(`span`,{"ws-nowrap":``,op75:``},`Builtin Modules`,-1)]]),_:1},8,[`modelValue`]),t(a,{modelValue:v.value,"onUpdate:modelValue":i[1]||=e=>v.value=e,n:`primary`},{default:_(()=>[...i[7]||=[m(`span`,{"ws-nowrap":``,op75:``},`Templates`,-1)]]),_:1},8,[`modelValue`]),t(a,{modelValue:C.value,"onUpdate:modelValue":i[2]||=e=>C.value=e,n:`primary`},{default:_(()=>[...i[8]||=[m(`span`,{"ws-nowrap":``,op75:``},`Transpile`,-1)]]),_:1},8,[`modelValue`]),t(a,{modelValue:w.value,"onUpdate:modelValue":i[3]||=e=>w.value=e,n:`primary`},{default:_(()=>[...i[9]||=[m(`span`,{"ws-nowrap":``,op75:``},`Plugins`,-1)]]),_:1},8,[`modelValue`]),t(a,{modelValue:T.value,"onUpdate:modelValue":i[4]||=e=>T.value=e,n:`primary`},{default:_(()=>[...i[10]||=[m(`span`,{"ws-nowrap":``,op75:``},`Empty Initial`,-1)]]),_:1},8,[`modelValue`]),I.value?(o(),l(`div`,k,[t(h,{"font-mono":``,text:I.value},null,8,[`text`]),t(R,{icon:`carbon-close`,border:!1,onClick:i[5]||=e=>I.value=``})])):d(``,!0)])]),m(`table`,A,[i[11]||=m(`thead`,{border:`b base`},[m(`tr`,null,[m(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Index `),m(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Module `),m(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Key Path `),m(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Method `),m(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Value `)])],-1),m(`tbody`,null,[(o(!0),l(g,null,n(L.value,r=>(o(),l(`tr`,{key:e.moduleMutationRecords.indexOf(r),border:`b dashed transparent hover:base`},[m(`td`,j,[m(`div`,null,u(e.moduleMutationRecords.indexOf(r)+1),1)]),m(`td`,null,[r.name&&s(r.name)?(o(),f(z,{key:0,filepath:r.name},null,8,[`filepath`])):(o(),f(h,{key:1,role:`button`,"font-mono":``,text:r.name,onClick:e=>I.value=r.name},null,8,[`text`,`onClick`]))]),m(`td`,null,[m(`code`,M,[(o(!0),l(g,null,n(r.keys,(e,t)=>(o(),l(g,{key:t},[m(`span`,null,u(e),1),t<r.keys.length-1?(o(),l(`span`,N,` . `)):d(``,!0)],64))),128))])]),m(`td`,P,[t(h,{"font-mono":``,text:r.method||`=`,class:c(r.method?``:`saturate-0`)},null,8,[`text`,`class`])]),m(`td`,F,[t(B,{code:String(r.value),lang:`ts`,"grammar-context-code":`let a = `,"ws-normal":``,"break-all":``,py1:``,lines:!1,inline:!0},null,8,[`code`])])]))),128))])])],64)}}}),{__name:`DebugModuleMutationRecords`}),L={key:0,p6:``},R={key:1},z=a({__name:`debug`,setup(e){let n=v();return(e,r)=>{let i=C;return p(n)?(o(),l(`div`,R,[t(i,{icon:`carbon-container-image-push-pull`,text:`Module Mutation Records`,description:`Records of module mutations to nuxt options`},{default:_(()=>[t(I,{"module-mutation-records":p(n).moduleMutationRecords||[]},null,8,[`module-mutation-records`])]),_:1})])):(o(),l(`div`,L,[...r[0]||=[m(`div`,null,`No Debug Context Found`,-1),m(`div`,null,"Set `debug: true` in your nuxt.config.ts to enable this panel",-1)]]))}}});export{z as default};
@@ -1 +0,0 @@
1
- var e=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,t=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,n=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function r(e,t){if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){i(e);return}return t}function i(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function a(i,a={}){if(typeof i!=`string`)return i;if(i[0]===`"`&&i[i.length-1]===`"`&&i.indexOf(`\\`)===-1)return i.slice(1,-1);let o=i.trim();if(o.length<=9)switch(o.toLowerCase()){case`true`:return!0;case`false`:return!1;case`undefined`:return;case`null`:return null;case`nan`:return NaN;case`infinity`:return 1/0;case`-infinity`:return-1/0}if(!n.test(i)){if(a.strict)throw SyntaxError(`[destr] Invalid JSON`);return i}try{if(e.test(i)||t.test(i)){if(a.strict)throw Error(`[destr] Possible prototype pollution`);return JSON.parse(i,r)}return JSON.parse(i)}catch(e){if(a.strict)throw e;return i}}String.fromCharCode;var o=/#/g,s=/&/g,c=/\//g,l=/=/g,u=/\+/g,d=/%5e/gi,f=/%60/gi,p=/%7c/gi,m=/%20/gi;function h(e){return encodeURI(``+e).replace(p,`|`)}function g(e){return h(typeof e==`string`?e:JSON.stringify(e)).replace(u,`%2B`).replace(m,`+`).replace(o,`%23`).replace(s,`%26`).replace(f,"`").replace(d,`^`).replace(c,`%2F`)}function _(e){return g(e).replace(l,`%3D`)}function v(e=``){try{return decodeURIComponent(``+e)}catch{return``+e}}function y(e){return v(e.replace(u,` `))}function b(e){return v(e.replace(u,` `))}function x(e=``){let t=Object.create(null);e[0]===`?`&&(e=e.slice(1));for(let n of e.split(`&`)){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let r=y(e[1]);if(r===`__proto__`||r===`constructor`)continue;let i=b(e[2]||``);t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t}function S(e,t){return(typeof t==`number`||typeof t==`boolean`)&&(t=String(t)),t?Array.isArray(t)?t.map(t=>`${_(e)}=${g(t)}`).join(`&`):`${_(e)}=${g(t)}`:_(e)}function C(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>S(t,e[t])).filter(Boolean).join(`&`)}var w=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,T=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,E=/^([/\\]\s*){2,}[^/\\]/,D=/\/$|\/\?|\/#/,O=/^\.?\//;function k(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?w.test(e):T.test(e)||(t.acceptRelative?E.test(e):!1)}function A(e=``,t){return t?D.test(e):e.endsWith(`/`)}function j(e=``,t){if(!t)return(A(e)?e.slice(0,-1):e)||`/`;if(!A(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function M(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(A(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function N(e,t){if(F(t)||k(e))return e;let n=j(t);if(e.startsWith(n)){let t=e[n.length];if(!t||t===`/`||t===`?`)return e}return L(n,e)}function P(e,t){let n=z(e);return n.search=C({...x(n.search),...t}),V(n)}function F(e){return!e||e===`/`}function I(e){return e&&e!==`/`}function L(e,...t){let n=e||``;for(let e of t.filter(e=>I(e)))if(n){let t=e.replace(O,``);n=M(n)+t}else n=e;return n}var R=Symbol.for(`ufo:protocolRelative`);function z(e=``,t){let n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,e,t=``]=n;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:``,host:``,search:``,hash:``}}if(!k(e,{acceptRelative:!0}))return t?z(t+e):B(e);let[,r=``,i,a=``]=e.replace(/\\/g,`/`).match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o=``,s=``]=a.match(/([^#/?]*)(.*)?/)||[];r===`file:`&&(s=s.replace(/\/(?=[A-Za-z]:)/,``));let{pathname:c,search:l,hash:u}=B(s);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):``,host:o,pathname:c,search:l,hash:u,[R]:!r}}function B(e=``){let[t=``,n=``,r=``]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function V(e){let t=e.pathname||``,n=e.search?(e.search.startsWith(`?`)?``:`?`)+e.search:``,r=e.hash||``,i=e.auth?e.auth+`@`:``,a=e.host||``;return(e.protocol||e[R]?(e.protocol||``)+`//`:``)+i+a+t+n+r}export{P as n,a as r,N as t};