@ddict/popup 1.6.1 → 1.6.3
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.
- package/dist/popup.es.js +7 -8
- package/dist/popup.umd.js +1 -1
- package/package.json +1 -1
package/dist/popup.es.js
CHANGED
|
@@ -141,7 +141,7 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
|
|
|
141
141
|
})
|
|
142
142
|
], -1), vo = {
|
|
143
143
|
key: 0,
|
|
144
|
-
class: "absolute -top-0.5 -right-0.5 bg-red-500 text-white text-xs rounded-full h-4 w-
|
|
144
|
+
class: "absolute -top-0.5 -right-0.5 bg-red-500 text-white text-xs rounded-full h-4 min-w-[16px] flex items-center justify-center px-1 text-[8px]"
|
|
145
145
|
}, po = /* @__PURE__ */ f("svg", {
|
|
146
146
|
class: "w-6 h-6 text-primary",
|
|
147
147
|
viewBox: "0 0 24 24",
|
|
@@ -213,26 +213,25 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
|
|
|
213
213
|
class: "btn btn-ghost btn-circle btn-sm",
|
|
214
214
|
onClick: s[0] || (s[0] = (r) => t("reader"))
|
|
215
215
|
}, co)) : R("", !0),
|
|
216
|
-
|
|
217
|
-
key: 2,
|
|
216
|
+
f("button", {
|
|
218
217
|
class: "btn btn-ghost btn-circle btn-sm relative",
|
|
219
218
|
onClick: s[1] || (s[1] = (r) => t("learn"))
|
|
220
219
|
}, [
|
|
221
220
|
fo,
|
|
222
|
-
e.headerSettings.showLearn > 0 ? (h(), g("span", vo, G(e.headerSettings.showLearn >
|
|
223
|
-
])
|
|
221
|
+
e.headerSettings.showLearn > 0 ? (h(), g("span", vo, G(e.headerSettings.showLearn > 999 ? "999+" : e.headerSettings.showLearn), 1)) : R("", !0)
|
|
222
|
+
]),
|
|
224
223
|
e.headerSettings.showAccount ? (h(), g("button", {
|
|
225
|
-
key:
|
|
224
|
+
key: 2,
|
|
226
225
|
class: "btn btn-ghost btn-circle btn-sm",
|
|
227
226
|
onClick: s[2] || (s[2] = (r) => t("account"))
|
|
228
227
|
}, ho)) : R("", !0),
|
|
229
228
|
e.headerSettings.showSettings ? (h(), g("button", {
|
|
230
|
-
key:
|
|
229
|
+
key: 3,
|
|
231
230
|
class: "btn btn-ghost btn-circle btn-sm",
|
|
232
231
|
onClick: s[3] || (s[3] = (r) => t("settings"))
|
|
233
232
|
}, go)) : R("", !0),
|
|
234
233
|
e.headerSettings.showFullscreen ? (h(), g("button", {
|
|
235
|
-
key:
|
|
234
|
+
key: 4,
|
|
236
235
|
class: "btn btn-ghost btn-circle btn-sm",
|
|
237
236
|
onClick: s[4] || (s[4] = (r) => t("fullScreen"))
|
|
238
237
|
}, Co)) : R("", !0)
|
package/dist/popup.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Y,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(Y=typeof globalThis<"u"?globalThis:Y||self,t(Y.Popup={},Y.Vue))})(this,function(Y,t){"use strict";var Ie=typeof document<"u"?document.currentScript:null;const Me=navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i),Ce={isRTL:nn,setLocalStorage:on,getLocalStorage:ln};function nn(e){return["ar","fa","iw","yi","ur","pa"].indexOf(e)>-1}function on(e,o){localStorage.setItem(e,JSON.stringify(o))}function ln(e){return JSON.parse(localStorage.getItem(e))}const rn={class:"dropdown dropdown-end z-50"},an=t.createElementVNode("div",{tabindex:"0",role:"button",class:"btn btn-ghost btn-circle btn-sm"},[t.createElementVNode("svg",{class:"w-5 h-5 text-primary",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{d:"M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"})])],-1),sn={tabindex:"0",class:"dropdown-content menu p-2 shadow bg-base-100 rounded-box w-52 max-h-96 overflow-y-auto z-50"},cn=["id","value","checked","onChange"],dn=["for"],un={class:"flex items-center gap-2"},fn={__name:"ThemeSelector",props:{currentTheme:{type:String,default:"lofi"}},emits:["themeChange"],setup(e,{emit:o}){const n=o,l=[{value:"lofi",name:"Lo-Fi",color:"#0f0f23"},{value:"pastel",name:"Pastel",color:"#d1c1d7"},{value:"fantasy",name:"Fantasy",color:"#6e0b75"},{value:"autumn",name:"Autumn",color:"#8c0327"},{value:"retro",name:"Retro",color:"#ef9995"},{value:"synthwave",name:"Synthwave",color:"#e779c1"},{value:"halloween",name:"Halloween",color:"#f28c18"},{value:"dracula",name:"Dracula",color:"#ff79c6"},{value:"coffee",name:"Coffee",color:"#db924b"},{value:"dim",name:"Dim",color:"#9fe88d"},{value:"sunset",name:"Sunset",color:"#ff865b"},{value:"cyberpunk",name:"Cyberpunk",color:"#ff7598"}],r=a=>{n("themeChange",a)};return(a,i)=>(t.openBlock(),t.createElementBlock("div",rn,[an,t.createElementVNode("ul",sn,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(l,s=>t.createElementVNode("li",{key:s.value},[t.createElementVNode("input",{type:"radio",id:`theme-${s.value}`,value:s.value,checked:e.currentTheme===s.value,onChange:c=>r(s.value),class:"theme-controller sr-only"},null,40,cn),t.createElementVNode("label",{for:`theme-${s.value}`,class:t.normalizeClass(["cursor-pointer rounded-lg px-2 py-1 hover:bg-base-200",{"bg-primary text-primary-content":e.currentTheme===s.value}])},[t.createElementVNode("span",un,[t.createElementVNode("span",{class:"w-3 h-3 rounded-full",style:t.normalizeStyle({backgroundColor:s.color})},null,4),t.createTextVNode(" "+t.toDisplayString(s.name),1)])],10,dn)])),64))])]))}},pn={class:"flex justify-between"},mn=t.createStaticVNode('<div class="flex flex-row"><svg class="w-24 text-primary" viewBox="0 0 96 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M40.151 8.94498H35.7256V23.055H40.151C44.7473 23.055 47.826 20.0825 47.826 15.9795C47.8267 11.8093 44.7678 8.94498 40.151 8.94498ZM40.1312 21.025H37.993V10.9974H40.1312C43.4217 10.9974 45.4972 12.9846 45.4972 15.9795C45.4965 18.9296 43.4012 21.025 40.1312 21.025Z" fill="currentColor"></path><path d="M54.5158 8.94498H50.0903V23.055H54.5158C59.1121 23.055 62.1908 20.0825 62.1908 15.9795C62.1914 11.8093 59.1351 8.94498 54.5158 8.94498ZM54.496 21.025H52.3578V10.9974H54.496C57.789 10.9974 59.8619 12.9846 59.8619 15.9795C59.8613 18.9296 57.766 21.025 54.496 21.025Z" fill="currentColor"></path><path d="M66.7237 8.94498H64.4575V23.055H66.7237V8.94498Z" fill="currentColor"></path><path d="M76.4301 10.7837C78.29 10.7837 79.7436 11.6603 80.7487 13.2207L82.4589 11.9591C81.2401 9.97057 78.9957 8.70953 76.409 8.70953C72.3898 8.64555 68.9048 11.9591 68.9906 16C68.9048 20.0403 72.3898 23.3544 76.409 23.2905C79.0385 23.2905 81.2618 22.0294 82.4589 20.0409L80.7487 18.7793C79.7436 20.3397 78.29 21.2163 76.4301 21.2163C73.544 21.2163 71.3418 18.993 71.3418 16C71.3418 13.007 73.5433 10.7837 76.4301 10.7837Z" fill="currentColor"></path><path d="M83.3135 8.94498V10.9757H88.0595V23.055H90.3256V10.9757H95.0934V8.94498H83.3135Z" fill="currentColor"></path><path d="M8.66351 4.7121H4.604V15.4427L6.87208 13.3839V6.79143H8.64559C11.4639 6.79143 13.2835 8.47857 13.2835 11.0877C13.2835 13.6916 11.421 15.4427 8.64559 15.4427H4.604V17.5016H8.66351C12.7531 17.5016 15.6098 14.8644 15.6098 11.0877C15.6104 7.27575 12.8196 4.7121 8.66351 4.7121Z" fill="currentColor"></path><path d="M26.2425 9.25528H21.5502L20.7537 14.293L21.4523 14.3308L21.4069 14.7294C21.3916 14.8656 21.3289 15.0448 21.112 15.1734C21.1017 15.9399 21.0845 17.0493 20.9706 18.1766H26.5937V19.8586H21.4677C22.4133 22.9424 24.1254 24.9648 26.5611 25.8669L27.1536 26.0864L26.6795 26.5048C26.4875 26.6737 26.2182 27.0141 26.0896 27.2489L25.9258 27.5438L25.6155 27.4152C23.167 26.4095 21.4223 24.4926 20.2905 21.563C19.3602 24.3365 17.5797 26.2553 14.8592 27.428L14.5438 27.5617L14.3775 27.2642C14.2764 27.08 14.0294 26.7876 13.8151 26.5989L13.3564 26.1951L13.9239 25.9655C16.4555 24.9392 18.064 23.1414 18.8228 20.4837C19.6647 19.8381 20.2099 18.8221 20.2169 17.6801V4.53231C20.2169 2.58349 18.6334 1 16.6846 1H3.53487C1.58349 1 0 2.58349 0 4.53231V17.6795C0 19.6283 1.58349 21.2143 3.53487 21.2143H8.25528V27.2431C8.25528 29.3135 9.93986 31 12.0096 31H26.2431C28.3161 31 29.9974 29.3129 29.9974 27.2431V13.0096C29.9974 10.9392 28.3154 9.25528 26.2425 9.25528ZM3.53487 19.4517C2.55662 19.4517 1.762 18.6603 1.762 17.6788V4.53231C1.762 3.55662 2.55598 2.762 3.53487 2.762H16.6839C17.6571 2.762 18.4517 3.55598 18.4517 4.53231V17.6795C18.4517 17.778 18.444 17.8733 18.4267 17.9667C18.3941 18.1811 18.3231 18.38 18.215 18.5592C17.9149 19.0934 17.3372 19.4517 16.6846 19.4517H3.53487Z" fill="currentColor"></path></svg></div>',1),hn={class:"flex"},gn=[t.createElementVNode("svg",{class:"w-6 h-6 text-primary",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.5 3.25C5.25736 3.25 4.25 4.25736 4.25 5.5H3.5H2.75C2.75 3.42893 4.42893 1.75 6.5 1.75H17.5C17.9142 1.75 18.25 2.08579 18.25 2.5V15.5C18.25 15.9142 17.9142 16.25 17.5 16.25H6.5C5.26293 16.25 4.25 17.2576 4.25 18.5C4.25 18.9142 3.91421 19.25 3.5 19.25C3.08579 19.25 2.75 18.9142 2.75 18.5V5.5C2.75 5.49993 2.75 5.5 3.5 5.5C4.25 5.5 4.25 5.49993 4.25 5.5V15.5017C4.87779 15.0296 5.65755 14.75 6.5 14.75H16.75V3.25H6.5Z",fill:"currentColor"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.5 2.75C20.9142 2.75 21.25 3.08579 21.25 3.5V21.5C21.25 21.9142 20.9142 22.25 20.5 22.25H6.5C4.42893 22.25 2.75 20.5711 2.75 18.5C2.75 16.4289 4.42893 14.75 6.5 14.75H17.4995C17.4996 14.75 17.5 14.75 17.5 15.5C17.5 16.25 17.5001 16.25 17.5 16.25H6.5C5.25736 16.25 4.25 17.2574 4.25 18.5C4.25 19.7426 5.25736 20.75 6.5 20.75H19.75V3.5C19.75 3.08579 20.0858 2.75 20.5 2.75ZM18.25 15.5C18.25 15.9142 17.9142 16.25 17.5 16.25V15.5L17.4995 14.75C17.9137 14.75 18.25 15.0858 18.25 15.5Z",fill:"currentColor"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.25 18.5C6.25 18.0858 6.58579 17.75 7 17.75H17C17.4142 17.75 17.75 18.0858 17.75 18.5C17.75 18.9142 17.4142 19.25 17 19.25H7C6.58579 19.25 6.25 18.9142 6.25 18.5Z",fill:"currentColor"})],-1)],bn=t.createElementVNode("svg",{class:"w-6 h-6 text-primary",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M12 3L1 9L12 15L23 9L12 3Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M5 13L12 17L19 13",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M5 17L12 21L19 17",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),Cn={key:0,class:"absolute -top-0.5 -right-0.5 bg-red-500 text-white text-xs rounded-full h-4 w-4 flex items-center justify-center min-w-[16px] text-[10px]"},xn=[t.createElementVNode("svg",{class:"w-6 h-6 text-primary",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M5.3163 19.4384C5.92462 18.0052 7.34492 17 9 17H15C16.6551 17 18.0754 18.0052 18.6837 19.4384M16 9.5C16 11.7091 14.2091 13.5 12 13.5C9.79086 13.5 8 11.7091 8 9.5C8 7.29086 9.79086 5.5 12 5.5C14.2091 5.5 16 7.29086 16 9.5ZM22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)],vn=[t.createElementVNode("svg",{class:"w-6 h-6 text-primary",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M9.12596 1.63869C9.46935 1.54364 9.83221 1.70329 9.99413 2.02068C10.3672 2.75191 11.1261 3.25 12 3.25C12.8739 3.25 13.6328 2.75191 14.0059 2.02068C14.1678 1.70329 14.5307 1.54364 14.874 1.63869C16.5585 2.10497 18.0759 2.9704 19.3184 4.12574C19.5611 4.35137 19.6269 4.70948 19.4804 5.00666C19.3331 5.30535 19.25 5.6419 19.25 6C19.25 7.24263 20.2574 8.25 21.5 8.25L21.5314 8.24977C21.8629 8.24504 22.1583 8.45859 22.2576 8.77495C22.5777 9.79397 22.75 10.8776 22.75 12C22.75 12.7408 22.6749 13.4649 22.5318 14.1648C22.4548 14.5411 22.1059 14.7985 21.7237 14.7609C21.6504 14.7537 21.5758 14.75 21.5 14.75C20.2574 14.75 19.25 15.7574 19.25 17C19.25 17.5531 19.4486 18.0579 19.7793 18.4498C20.027 18.7434 20.0128 19.1767 19.7465 19.4535C18.4777 20.7719 16.8745 21.7678 15.0721 22.3044C14.6807 22.4209 14.2681 22.2029 14.1437 21.814C13.8535 20.906 13.0024 20.25 12 20.25C10.9976 20.25 10.1465 20.906 9.85629 21.814C9.73195 22.2029 9.31927 22.4209 8.92789 22.3044C7.12545 21.7678 5.52229 20.7719 4.25353 19.4535C3.98716 19.1767 3.97299 18.7434 4.22072 18.4498C4.55139 18.0579 4.75 17.5531 4.75 17C4.75 15.7574 3.74264 14.75 2.5 14.75C2.42423 14.75 2.34963 14.7537 2.27634 14.7609C1.89406 14.7985 1.54519 14.5411 1.46821 14.1648C1.32505 13.4649 1.25 12.7408 1.25 12C1.25 10.8776 1.42227 9.79398 1.74236 8.77494C1.84173 8.45859 2.13705 8.24504 2.4686 8.24977L2.5 8.25C3.74264 8.25 4.75 7.24263 4.75 6C4.75 5.6419 4.66689 5.30535 4.51962 5.00666C4.3731 4.70948 4.43894 4.35137 4.68159 4.12574C5.92411 2.9704 7.44153 2.10497 9.12596 1.63869ZM6.08277 4.88991C6.19152 5.24123 6.25 5.61424 6.25 6C6.25 7.88945 4.85261 9.45253 3.03493 9.71213C2.84898 10.4432 2.75 11.2096 2.75 12C2.75 12.4294 2.77921 12.8516 2.83567 13.2648C4.74948 13.4346 6.25 15.0421 6.25 17C6.25 17.6669 6.0754 18.2941 5.76971 18.8372C6.62645 19.6184 7.63002 20.2404 8.73362 20.657C9.37706 19.5189 10.598 18.75 12 18.75C13.402 18.75 14.6229 19.5189 15.2664 20.657C16.37 20.2404 17.3735 19.6184 18.2303 18.8372C17.9246 18.2941 17.75 17.6669 17.75 17C17.75 15.0421 19.2505 13.4346 21.1643 13.2648C21.2208 12.8516 21.25 12.4294 21.25 12C21.25 11.2096 21.151 10.4432 20.9651 9.71213C19.1474 9.45252 17.75 7.88945 17.75 6C17.75 5.61424 17.8085 5.24123 17.9172 4.88991C17.0618 4.1771 16.0762 3.61614 15.0018 3.24775C14.3184 4.15897 13.2287 4.75 12 4.75C10.7713 4.75 9.68158 4.15897 8.99819 3.24775C7.92382 3.61614 6.93823 4.1771 6.08277 4.88991Z",fill:"currentColor"}),t.createElementVNode("path",{d:"M7.75 12C7.75 9.65278 9.65279 7.75 12 7.75C14.3472 7.75 16.25 9.65278 16.25 12C16.25 14.3472 14.3472 16.25 12 16.25C9.65279 16.25 7.75 14.3472 7.75 12ZM12 9.25C10.4812 9.25 9.25 10.4812 9.25 12C9.25 13.5188 10.4812 14.75 12 14.75C13.5188 14.75 14.75 13.5188 14.75 12C14.75 10.4812 13.5188 9.25 12 9.25Z",fill:"currentColor"})],-1)],yn=[t.createStaticVNode('<svg class="w-6 h-6 text-primary" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.467 2.47236C2.75841 2.17799 3.23328 2.17559 3.52764 2.467L8.52765 7.41675C8.82201 7.70816 8.82441 8.18303 8.533 8.4774C8.24159 8.77176 7.76672 8.77416 7.47235 8.48275L2.47236 3.533C2.17799 3.24159 2.17559 2.76672 2.467 2.47236Z" fill="currentColor"></path><path d="M8.533 15.4724C8.82441 15.7667 8.82201 16.2416 8.52765 16.533L3.52765 21.4828C3.23328 21.7742 2.75841 21.7718 2.467 21.4774C2.17559 21.183 2.17799 20.7082 2.47236 20.4167L7.47235 15.467C7.76672 15.1756 8.24159 15.178 8.533 15.4724Z" fill="currentColor"></path><path d="M15.52 15.4697C15.8129 15.1768 16.2877 15.1768 16.5806 15.4697L21.5304 20.4194C21.8233 20.7123 21.8233 21.1872 21.5304 21.4801C21.2375 21.773 20.7626 21.773 20.4697 21.4801L15.52 16.5303C15.2271 16.2374 15.2271 15.7626 15.52 15.4697Z" fill="currentColor"></path><path d="M21.4801 2.46967C21.773 2.76256 21.773 3.23744 21.4801 3.53033L16.5303 8.48008C16.2374 8.77297 15.7626 8.77297 15.4697 8.48008C15.1768 8.18719 15.1768 7.71231 15.4697 7.41942L20.4194 2.46967C20.7123 2.17678 21.1872 2.17678 21.4801 2.46967Z" fill="currentColor"></path><path d="M15.75 3C15.75 2.58579 16.0858 2.25 16.5 2.25H21C21.4142 2.25 21.75 2.58579 21.75 3V7.5C21.75 7.91421 21.4142 8.25 21 8.25C20.5858 8.25 20.25 7.91421 20.25 7.5V3.75H16.5C16.0858 3.75 15.75 3.41421 15.75 3Z" fill="currentColor"></path><path d="M21 15.75C21.4142 15.75 21.75 16.0858 21.75 16.5V21C21.75 21.4142 21.4142 21.75 21 21.75H16.5C16.0858 21.75 15.75 21.4142 15.75 21C15.75 20.5858 16.0858 20.25 16.5 20.25H20.25V16.5C20.25 16.0858 20.5858 15.75 21 15.75Z" fill="currentColor"></path><path d="M3 15.75C3.41421 15.75 3.75 16.0858 3.75 16.5V20.25H7.5C7.91421 20.25 8.25 20.5858 8.25 21C8.25 21.4142 7.91421 21.75 7.5 21.75H3C2.58579 21.75 2.25 21.4142 2.25 21V16.5C2.25 16.0858 2.58579 15.75 3 15.75Z" fill="currentColor"></path><path d="M2.25 3C2.25 2.58579 2.58579 2.25 3 2.25H7.5C7.91421 2.25 8.25 2.58579 8.25 3C8.25 3.41421 7.91421 3.75 7.5 3.75H3.75V7.5C3.75 7.91421 3.41421 8.25 3 8.25C2.58579 8.25 2.25 7.91421 2.25 7.5V3Z" fill="currentColor"></path></svg>',1)],wn={__name:"Header",props:{headerSettings:{type:Object,required:!0,default:()=>({showAccount:!0,showReader:!0,showLearn:0,showFullscreen:!0,showSettings:!0,showThemeSelector:!0})},currentTheme:{type:String,default:"lofi"}},emits:["settings","fullScreen","reader","learn","account","themeChange"],setup(e,{emit:o}){const n=o,l=r=>{n("themeChange",r)};return(r,a)=>(t.openBlock(),t.createElementBlock("div",pn,[mn,t.createElementVNode("div",hn,[e.headerSettings.showThemeSelector?(t.openBlock(),t.createBlock(fn,{key:0,"current-theme":e.currentTheme,onThemeChange:l},null,8,["current-theme"])):t.createCommentVNode("",!0),e.headerSettings.showReader?(t.openBlock(),t.createElementBlock("button",{key:1,class:"btn btn-ghost btn-circle btn-sm",onClick:a[0]||(a[0]=i=>n("reader"))},gn)):t.createCommentVNode("",!0),e.headerSettings.showLearn>0?(t.openBlock(),t.createElementBlock("button",{key:2,class:"btn btn-ghost btn-circle btn-sm relative",onClick:a[1]||(a[1]=i=>n("learn"))},[bn,e.headerSettings.showLearn>0?(t.openBlock(),t.createElementBlock("span",Cn,t.toDisplayString(e.headerSettings.showLearn>99?"99+":e.headerSettings.showLearn),1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.headerSettings.showAccount?(t.openBlock(),t.createElementBlock("button",{key:3,class:"btn btn-ghost btn-circle btn-sm",onClick:a[2]||(a[2]=i=>n("account"))},xn)):t.createCommentVNode("",!0),e.headerSettings.showSettings?(t.openBlock(),t.createElementBlock("button",{key:4,class:"btn btn-ghost btn-circle btn-sm",onClick:a[3]||(a[3]=i=>n("settings"))},vn)):t.createCommentVNode("",!0),e.headerSettings.showFullscreen?(t.openBlock(),t.createElementBlock("button",{key:5,class:"btn btn-ghost btn-circle btn-sm",onClick:a[4]||(a[4]=i=>n("fullScreen"))},yn)):t.createCommentVNode("",!0)])]))}};function ie(e,o,n){let l=n.initialDeps??[],r;return()=>{var a,i,s,c;let d;n.key&&((a=n.debug)!=null&&a.call(n))&&(d=Date.now());const u=e();if(!(u.length!==l.length||u.some((h,b)=>l[b]!==h)))return r;l=u;let C;if(n.key&&((i=n.debug)!=null&&i.call(n))&&(C=Date.now()),r=o(...u),n.key&&((s=n.debug)!=null&&s.call(n))){const h=Math.round((Date.now()-d)*100)/100,b=Math.round((Date.now()-C)*100)/100,g=b/16,S=(k,v)=>{for(k=String(k);k.length<v;)k=" "+k;return k};console.info(`%c⏱ ${S(b,5)} /${S(h,5)} ms`,`
|
|
1
|
+
(function(Y,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(Y=typeof globalThis<"u"?globalThis:Y||self,t(Y.Popup={},Y.Vue))})(this,function(Y,t){"use strict";var Ie=typeof document<"u"?document.currentScript:null;const Me=navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i),Ce={isRTL:nn,setLocalStorage:on,getLocalStorage:ln};function nn(e){return["ar","fa","iw","yi","ur","pa"].indexOf(e)>-1}function on(e,o){localStorage.setItem(e,JSON.stringify(o))}function ln(e){return JSON.parse(localStorage.getItem(e))}const rn={class:"dropdown dropdown-end z-50"},an=t.createElementVNode("div",{tabindex:"0",role:"button",class:"btn btn-ghost btn-circle btn-sm"},[t.createElementVNode("svg",{class:"w-5 h-5 text-primary",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{d:"M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"})])],-1),sn={tabindex:"0",class:"dropdown-content menu p-2 shadow bg-base-100 rounded-box w-52 max-h-96 overflow-y-auto z-50"},cn=["id","value","checked","onChange"],dn=["for"],un={class:"flex items-center gap-2"},fn={__name:"ThemeSelector",props:{currentTheme:{type:String,default:"lofi"}},emits:["themeChange"],setup(e,{emit:o}){const n=o,l=[{value:"lofi",name:"Lo-Fi",color:"#0f0f23"},{value:"pastel",name:"Pastel",color:"#d1c1d7"},{value:"fantasy",name:"Fantasy",color:"#6e0b75"},{value:"autumn",name:"Autumn",color:"#8c0327"},{value:"retro",name:"Retro",color:"#ef9995"},{value:"synthwave",name:"Synthwave",color:"#e779c1"},{value:"halloween",name:"Halloween",color:"#f28c18"},{value:"dracula",name:"Dracula",color:"#ff79c6"},{value:"coffee",name:"Coffee",color:"#db924b"},{value:"dim",name:"Dim",color:"#9fe88d"},{value:"sunset",name:"Sunset",color:"#ff865b"},{value:"cyberpunk",name:"Cyberpunk",color:"#ff7598"}],r=a=>{n("themeChange",a)};return(a,i)=>(t.openBlock(),t.createElementBlock("div",rn,[an,t.createElementVNode("ul",sn,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(l,s=>t.createElementVNode("li",{key:s.value},[t.createElementVNode("input",{type:"radio",id:`theme-${s.value}`,value:s.value,checked:e.currentTheme===s.value,onChange:c=>r(s.value),class:"theme-controller sr-only"},null,40,cn),t.createElementVNode("label",{for:`theme-${s.value}`,class:t.normalizeClass(["cursor-pointer rounded-lg px-2 py-1 hover:bg-base-200",{"bg-primary text-primary-content":e.currentTheme===s.value}])},[t.createElementVNode("span",un,[t.createElementVNode("span",{class:"w-3 h-3 rounded-full",style:t.normalizeStyle({backgroundColor:s.color})},null,4),t.createTextVNode(" "+t.toDisplayString(s.name),1)])],10,dn)])),64))])]))}},pn={class:"flex justify-between"},mn=t.createStaticVNode('<div class="flex flex-row"><svg class="w-24 text-primary" viewBox="0 0 96 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M40.151 8.94498H35.7256V23.055H40.151C44.7473 23.055 47.826 20.0825 47.826 15.9795C47.8267 11.8093 44.7678 8.94498 40.151 8.94498ZM40.1312 21.025H37.993V10.9974H40.1312C43.4217 10.9974 45.4972 12.9846 45.4972 15.9795C45.4965 18.9296 43.4012 21.025 40.1312 21.025Z" fill="currentColor"></path><path d="M54.5158 8.94498H50.0903V23.055H54.5158C59.1121 23.055 62.1908 20.0825 62.1908 15.9795C62.1914 11.8093 59.1351 8.94498 54.5158 8.94498ZM54.496 21.025H52.3578V10.9974H54.496C57.789 10.9974 59.8619 12.9846 59.8619 15.9795C59.8613 18.9296 57.766 21.025 54.496 21.025Z" fill="currentColor"></path><path d="M66.7237 8.94498H64.4575V23.055H66.7237V8.94498Z" fill="currentColor"></path><path d="M76.4301 10.7837C78.29 10.7837 79.7436 11.6603 80.7487 13.2207L82.4589 11.9591C81.2401 9.97057 78.9957 8.70953 76.409 8.70953C72.3898 8.64555 68.9048 11.9591 68.9906 16C68.9048 20.0403 72.3898 23.3544 76.409 23.2905C79.0385 23.2905 81.2618 22.0294 82.4589 20.0409L80.7487 18.7793C79.7436 20.3397 78.29 21.2163 76.4301 21.2163C73.544 21.2163 71.3418 18.993 71.3418 16C71.3418 13.007 73.5433 10.7837 76.4301 10.7837Z" fill="currentColor"></path><path d="M83.3135 8.94498V10.9757H88.0595V23.055H90.3256V10.9757H95.0934V8.94498H83.3135Z" fill="currentColor"></path><path d="M8.66351 4.7121H4.604V15.4427L6.87208 13.3839V6.79143H8.64559C11.4639 6.79143 13.2835 8.47857 13.2835 11.0877C13.2835 13.6916 11.421 15.4427 8.64559 15.4427H4.604V17.5016H8.66351C12.7531 17.5016 15.6098 14.8644 15.6098 11.0877C15.6104 7.27575 12.8196 4.7121 8.66351 4.7121Z" fill="currentColor"></path><path d="M26.2425 9.25528H21.5502L20.7537 14.293L21.4523 14.3308L21.4069 14.7294C21.3916 14.8656 21.3289 15.0448 21.112 15.1734C21.1017 15.9399 21.0845 17.0493 20.9706 18.1766H26.5937V19.8586H21.4677C22.4133 22.9424 24.1254 24.9648 26.5611 25.8669L27.1536 26.0864L26.6795 26.5048C26.4875 26.6737 26.2182 27.0141 26.0896 27.2489L25.9258 27.5438L25.6155 27.4152C23.167 26.4095 21.4223 24.4926 20.2905 21.563C19.3602 24.3365 17.5797 26.2553 14.8592 27.428L14.5438 27.5617L14.3775 27.2642C14.2764 27.08 14.0294 26.7876 13.8151 26.5989L13.3564 26.1951L13.9239 25.9655C16.4555 24.9392 18.064 23.1414 18.8228 20.4837C19.6647 19.8381 20.2099 18.8221 20.2169 17.6801V4.53231C20.2169 2.58349 18.6334 1 16.6846 1H3.53487C1.58349 1 0 2.58349 0 4.53231V17.6795C0 19.6283 1.58349 21.2143 3.53487 21.2143H8.25528V27.2431C8.25528 29.3135 9.93986 31 12.0096 31H26.2431C28.3161 31 29.9974 29.3129 29.9974 27.2431V13.0096C29.9974 10.9392 28.3154 9.25528 26.2425 9.25528ZM3.53487 19.4517C2.55662 19.4517 1.762 18.6603 1.762 17.6788V4.53231C1.762 3.55662 2.55598 2.762 3.53487 2.762H16.6839C17.6571 2.762 18.4517 3.55598 18.4517 4.53231V17.6795C18.4517 17.778 18.444 17.8733 18.4267 17.9667C18.3941 18.1811 18.3231 18.38 18.215 18.5592C17.9149 19.0934 17.3372 19.4517 16.6846 19.4517H3.53487Z" fill="currentColor"></path></svg></div>',1),hn={class:"flex"},gn=[t.createElementVNode("svg",{class:"w-6 h-6 text-primary",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.5 3.25C5.25736 3.25 4.25 4.25736 4.25 5.5H3.5H2.75C2.75 3.42893 4.42893 1.75 6.5 1.75H17.5C17.9142 1.75 18.25 2.08579 18.25 2.5V15.5C18.25 15.9142 17.9142 16.25 17.5 16.25H6.5C5.26293 16.25 4.25 17.2576 4.25 18.5C4.25 18.9142 3.91421 19.25 3.5 19.25C3.08579 19.25 2.75 18.9142 2.75 18.5V5.5C2.75 5.49993 2.75 5.5 3.5 5.5C4.25 5.5 4.25 5.49993 4.25 5.5V15.5017C4.87779 15.0296 5.65755 14.75 6.5 14.75H16.75V3.25H6.5Z",fill:"currentColor"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.5 2.75C20.9142 2.75 21.25 3.08579 21.25 3.5V21.5C21.25 21.9142 20.9142 22.25 20.5 22.25H6.5C4.42893 22.25 2.75 20.5711 2.75 18.5C2.75 16.4289 4.42893 14.75 6.5 14.75H17.4995C17.4996 14.75 17.5 14.75 17.5 15.5C17.5 16.25 17.5001 16.25 17.5 16.25H6.5C5.25736 16.25 4.25 17.2574 4.25 18.5C4.25 19.7426 5.25736 20.75 6.5 20.75H19.75V3.5C19.75 3.08579 20.0858 2.75 20.5 2.75ZM18.25 15.5C18.25 15.9142 17.9142 16.25 17.5 16.25V15.5L17.4995 14.75C17.9137 14.75 18.25 15.0858 18.25 15.5Z",fill:"currentColor"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.25 18.5C6.25 18.0858 6.58579 17.75 7 17.75H17C17.4142 17.75 17.75 18.0858 17.75 18.5C17.75 18.9142 17.4142 19.25 17 19.25H7C6.58579 19.25 6.25 18.9142 6.25 18.5Z",fill:"currentColor"})],-1)],bn=t.createElementVNode("svg",{class:"w-6 h-6 text-primary",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M12 3L1 9L12 15L23 9L12 3Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M5 13L12 17L19 13",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M5 17L12 21L19 17",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),Cn={key:0,class:"absolute -top-0.5 -right-0.5 bg-red-500 text-white text-xs rounded-full h-4 min-w-[16px] flex items-center justify-center px-1 text-[8px]"},xn=[t.createElementVNode("svg",{class:"w-6 h-6 text-primary",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M5.3163 19.4384C5.92462 18.0052 7.34492 17 9 17H15C16.6551 17 18.0754 18.0052 18.6837 19.4384M16 9.5C16 11.7091 14.2091 13.5 12 13.5C9.79086 13.5 8 11.7091 8 9.5C8 7.29086 9.79086 5.5 12 5.5C14.2091 5.5 16 7.29086 16 9.5ZM22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)],vn=[t.createElementVNode("svg",{class:"w-6 h-6 text-primary",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M9.12596 1.63869C9.46935 1.54364 9.83221 1.70329 9.99413 2.02068C10.3672 2.75191 11.1261 3.25 12 3.25C12.8739 3.25 13.6328 2.75191 14.0059 2.02068C14.1678 1.70329 14.5307 1.54364 14.874 1.63869C16.5585 2.10497 18.0759 2.9704 19.3184 4.12574C19.5611 4.35137 19.6269 4.70948 19.4804 5.00666C19.3331 5.30535 19.25 5.6419 19.25 6C19.25 7.24263 20.2574 8.25 21.5 8.25L21.5314 8.24977C21.8629 8.24504 22.1583 8.45859 22.2576 8.77495C22.5777 9.79397 22.75 10.8776 22.75 12C22.75 12.7408 22.6749 13.4649 22.5318 14.1648C22.4548 14.5411 22.1059 14.7985 21.7237 14.7609C21.6504 14.7537 21.5758 14.75 21.5 14.75C20.2574 14.75 19.25 15.7574 19.25 17C19.25 17.5531 19.4486 18.0579 19.7793 18.4498C20.027 18.7434 20.0128 19.1767 19.7465 19.4535C18.4777 20.7719 16.8745 21.7678 15.0721 22.3044C14.6807 22.4209 14.2681 22.2029 14.1437 21.814C13.8535 20.906 13.0024 20.25 12 20.25C10.9976 20.25 10.1465 20.906 9.85629 21.814C9.73195 22.2029 9.31927 22.4209 8.92789 22.3044C7.12545 21.7678 5.52229 20.7719 4.25353 19.4535C3.98716 19.1767 3.97299 18.7434 4.22072 18.4498C4.55139 18.0579 4.75 17.5531 4.75 17C4.75 15.7574 3.74264 14.75 2.5 14.75C2.42423 14.75 2.34963 14.7537 2.27634 14.7609C1.89406 14.7985 1.54519 14.5411 1.46821 14.1648C1.32505 13.4649 1.25 12.7408 1.25 12C1.25 10.8776 1.42227 9.79398 1.74236 8.77494C1.84173 8.45859 2.13705 8.24504 2.4686 8.24977L2.5 8.25C3.74264 8.25 4.75 7.24263 4.75 6C4.75 5.6419 4.66689 5.30535 4.51962 5.00666C4.3731 4.70948 4.43894 4.35137 4.68159 4.12574C5.92411 2.9704 7.44153 2.10497 9.12596 1.63869ZM6.08277 4.88991C6.19152 5.24123 6.25 5.61424 6.25 6C6.25 7.88945 4.85261 9.45253 3.03493 9.71213C2.84898 10.4432 2.75 11.2096 2.75 12C2.75 12.4294 2.77921 12.8516 2.83567 13.2648C4.74948 13.4346 6.25 15.0421 6.25 17C6.25 17.6669 6.0754 18.2941 5.76971 18.8372C6.62645 19.6184 7.63002 20.2404 8.73362 20.657C9.37706 19.5189 10.598 18.75 12 18.75C13.402 18.75 14.6229 19.5189 15.2664 20.657C16.37 20.2404 17.3735 19.6184 18.2303 18.8372C17.9246 18.2941 17.75 17.6669 17.75 17C17.75 15.0421 19.2505 13.4346 21.1643 13.2648C21.2208 12.8516 21.25 12.4294 21.25 12C21.25 11.2096 21.151 10.4432 20.9651 9.71213C19.1474 9.45252 17.75 7.88945 17.75 6C17.75 5.61424 17.8085 5.24123 17.9172 4.88991C17.0618 4.1771 16.0762 3.61614 15.0018 3.24775C14.3184 4.15897 13.2287 4.75 12 4.75C10.7713 4.75 9.68158 4.15897 8.99819 3.24775C7.92382 3.61614 6.93823 4.1771 6.08277 4.88991Z",fill:"currentColor"}),t.createElementVNode("path",{d:"M7.75 12C7.75 9.65278 9.65279 7.75 12 7.75C14.3472 7.75 16.25 9.65278 16.25 12C16.25 14.3472 14.3472 16.25 12 16.25C9.65279 16.25 7.75 14.3472 7.75 12ZM12 9.25C10.4812 9.25 9.25 10.4812 9.25 12C9.25 13.5188 10.4812 14.75 12 14.75C13.5188 14.75 14.75 13.5188 14.75 12C14.75 10.4812 13.5188 9.25 12 9.25Z",fill:"currentColor"})],-1)],yn=[t.createStaticVNode('<svg class="w-6 h-6 text-primary" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.467 2.47236C2.75841 2.17799 3.23328 2.17559 3.52764 2.467L8.52765 7.41675C8.82201 7.70816 8.82441 8.18303 8.533 8.4774C8.24159 8.77176 7.76672 8.77416 7.47235 8.48275L2.47236 3.533C2.17799 3.24159 2.17559 2.76672 2.467 2.47236Z" fill="currentColor"></path><path d="M8.533 15.4724C8.82441 15.7667 8.82201 16.2416 8.52765 16.533L3.52765 21.4828C3.23328 21.7742 2.75841 21.7718 2.467 21.4774C2.17559 21.183 2.17799 20.7082 2.47236 20.4167L7.47235 15.467C7.76672 15.1756 8.24159 15.178 8.533 15.4724Z" fill="currentColor"></path><path d="M15.52 15.4697C15.8129 15.1768 16.2877 15.1768 16.5806 15.4697L21.5304 20.4194C21.8233 20.7123 21.8233 21.1872 21.5304 21.4801C21.2375 21.773 20.7626 21.773 20.4697 21.4801L15.52 16.5303C15.2271 16.2374 15.2271 15.7626 15.52 15.4697Z" fill="currentColor"></path><path d="M21.4801 2.46967C21.773 2.76256 21.773 3.23744 21.4801 3.53033L16.5303 8.48008C16.2374 8.77297 15.7626 8.77297 15.4697 8.48008C15.1768 8.18719 15.1768 7.71231 15.4697 7.41942L20.4194 2.46967C20.7123 2.17678 21.1872 2.17678 21.4801 2.46967Z" fill="currentColor"></path><path d="M15.75 3C15.75 2.58579 16.0858 2.25 16.5 2.25H21C21.4142 2.25 21.75 2.58579 21.75 3V7.5C21.75 7.91421 21.4142 8.25 21 8.25C20.5858 8.25 20.25 7.91421 20.25 7.5V3.75H16.5C16.0858 3.75 15.75 3.41421 15.75 3Z" fill="currentColor"></path><path d="M21 15.75C21.4142 15.75 21.75 16.0858 21.75 16.5V21C21.75 21.4142 21.4142 21.75 21 21.75H16.5C16.0858 21.75 15.75 21.4142 15.75 21C15.75 20.5858 16.0858 20.25 16.5 20.25H20.25V16.5C20.25 16.0858 20.5858 15.75 21 15.75Z" fill="currentColor"></path><path d="M3 15.75C3.41421 15.75 3.75 16.0858 3.75 16.5V20.25H7.5C7.91421 20.25 8.25 20.5858 8.25 21C8.25 21.4142 7.91421 21.75 7.5 21.75H3C2.58579 21.75 2.25 21.4142 2.25 21V16.5C2.25 16.0858 2.58579 15.75 3 15.75Z" fill="currentColor"></path><path d="M2.25 3C2.25 2.58579 2.58579 2.25 3 2.25H7.5C7.91421 2.25 8.25 2.58579 8.25 3C8.25 3.41421 7.91421 3.75 7.5 3.75H3.75V7.5C3.75 7.91421 3.41421 8.25 3 8.25C2.58579 8.25 2.25 7.91421 2.25 7.5V3Z" fill="currentColor"></path></svg>',1)],wn={__name:"Header",props:{headerSettings:{type:Object,required:!0,default:()=>({showAccount:!0,showReader:!0,showLearn:0,showFullscreen:!0,showSettings:!0,showThemeSelector:!0})},currentTheme:{type:String,default:"lofi"}},emits:["settings","fullScreen","reader","learn","account","themeChange"],setup(e,{emit:o}){const n=o,l=r=>{n("themeChange",r)};return(r,a)=>(t.openBlock(),t.createElementBlock("div",pn,[mn,t.createElementVNode("div",hn,[e.headerSettings.showThemeSelector?(t.openBlock(),t.createBlock(fn,{key:0,"current-theme":e.currentTheme,onThemeChange:l},null,8,["current-theme"])):t.createCommentVNode("",!0),e.headerSettings.showReader?(t.openBlock(),t.createElementBlock("button",{key:1,class:"btn btn-ghost btn-circle btn-sm",onClick:a[0]||(a[0]=i=>n("reader"))},gn)):t.createCommentVNode("",!0),t.createElementVNode("button",{class:"btn btn-ghost btn-circle btn-sm relative",onClick:a[1]||(a[1]=i=>n("learn"))},[bn,e.headerSettings.showLearn>0?(t.openBlock(),t.createElementBlock("span",Cn,t.toDisplayString(e.headerSettings.showLearn>999?"999+":e.headerSettings.showLearn),1)):t.createCommentVNode("",!0)]),e.headerSettings.showAccount?(t.openBlock(),t.createElementBlock("button",{key:2,class:"btn btn-ghost btn-circle btn-sm",onClick:a[2]||(a[2]=i=>n("account"))},xn)):t.createCommentVNode("",!0),e.headerSettings.showSettings?(t.openBlock(),t.createElementBlock("button",{key:3,class:"btn btn-ghost btn-circle btn-sm",onClick:a[3]||(a[3]=i=>n("settings"))},vn)):t.createCommentVNode("",!0),e.headerSettings.showFullscreen?(t.openBlock(),t.createElementBlock("button",{key:4,class:"btn btn-ghost btn-circle btn-sm",onClick:a[4]||(a[4]=i=>n("fullScreen"))},yn)):t.createCommentVNode("",!0)])]))}};function ie(e,o,n){let l=n.initialDeps??[],r;return()=>{var a,i,s,c;let d;n.key&&((a=n.debug)!=null&&a.call(n))&&(d=Date.now());const u=e();if(!(u.length!==l.length||u.some((h,b)=>l[b]!==h)))return r;l=u;let C;if(n.key&&((i=n.debug)!=null&&i.call(n))&&(C=Date.now()),r=o(...u),n.key&&((s=n.debug)!=null&&s.call(n))){const h=Math.round((Date.now()-d)*100)/100,b=Math.round((Date.now()-C)*100)/100,g=b/16,S=(k,v)=>{for(k=String(k);k.length<v;)k=" "+k;return k};console.info(`%c⏱ ${S(b,5)} /${S(h,5)} ms`,`
|
|
2
2
|
font-size: .6rem;
|
|
3
3
|
font-weight: bold;
|
|
4
4
|
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(c=n==null?void 0:n.onChange)==null||c.call(n,r),r}}function Ae(e,o){if(e===void 0)throw new Error("Unexpected undefined");return e}const En=(e,o)=>Math.abs(e-o)<1,_n=(e,o,n)=>{let l;return function(...r){e.clearTimeout(l),l=e.setTimeout(()=>o.apply(this,r),n)}},kn=e=>e,Sn=e=>{const o=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),l=[];for(let r=o;r<=n;r++)l.push(r);return l},Tn=(e,o)=>{const n=e.scrollElement;if(!n)return;const l=e.targetWindow;if(!l)return;const r=i=>{const{width:s,height:c}=i;o({width:Math.round(s),height:Math.round(c)})};if(r(n.getBoundingClientRect()),!l.ResizeObserver)return()=>{};const a=new l.ResizeObserver(i=>{const s=i[0];if(s!=null&&s.borderBoxSize){const c=s.borderBoxSize[0];if(c){r({width:c.inlineSize,height:c.blockSize});return}}r(n.getBoundingClientRect())});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},nt={passive:!0},$n=typeof window>"u"?!0:"onscrollend"in window,Vn=(e,o)=>{const n=e.scrollElement;if(!n)return;const l=e.targetWindow;if(!l)return;let r=0;const a=$n?()=>{}:_n(l,()=>{o(r,!1)},e.options.isScrollingResetDelay),i=d=>()=>{r=n[e.options.horizontal?"scrollLeft":"scrollTop"],a(),o(r,d)},s=i(!0),c=i(!1);return c(),n.addEventListener("scroll",s,nt),n.addEventListener("scrollend",c,nt),()=>{n.removeEventListener("scroll",s),n.removeEventListener("scrollend",c)}},Bn=(e,o,n)=>{if(o!=null&&o.borderBoxSize){const l=o.borderBoxSize[0];if(l)return Math.round(l[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Nn=(e,{adjustments:o=0,behavior:n},l)=>{var r,a;const i=e+o;(a=(r=l.scrollElement)==null?void 0:r.scrollTo)==null||a.call(r,{[l.options.horizontal?"left":"top"]:i,behavior:n})};class Ln{constructor(o){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const l=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(r=>{r.forEach(a=>{this._measureElement(a.target,a)})}));return{disconnect:()=>{var r;return(r=l())==null?void 0:r.disconnect()},observe:r=>{var a;return(a=l())==null?void 0:a.observe(r,{box:"border-box"})},unobserve:r=>{var a;return(a=l())==null?void 0:a.unobserve(r)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([l,r])=>{typeof r>"u"&&delete n[l]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:kn,rangeExtractor:Sn,onChange:()=>{},measureElement:Bn,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...n}},this.notify=(n,l)=>{var r,a;const{startIndex:i,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},c=this.calculateRange();(n||i!==(c==null?void 0:c.startIndex)||s!==(c==null?void 0:c.endIndex))&&((a=(r=this.options).onChange)==null||a.call(r,this,l))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const l=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==l){if(this.cleanup(),!l){this.notify(!1,!1);return}this.scrollElement=l,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(r,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r;const i=this.isScrolling;this.isScrolling=a,this.notify(i!==a,a)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,l)=>{const r=new Map,a=new Map;for(let i=l-1;i>=0;i--){const s=n[i];if(r.has(s.lane))continue;const c=a.get(s.lane);if(c==null||s.end>c.end?a.set(s.lane,s):s.end<c.end&&r.set(s.lane,!0),r.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,s)=>i.end===s.end?i.index-s.index:i.end-s.end)[0]:void 0},this.getMeasurementOptions=ie(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,l,r,a,i)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:l,scrollMargin:r,getItemKey:a,enabled:i}),{key:!1}),this.getMeasurements=ie(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:l,scrollMargin:r,getItemKey:a,enabled:i},s)=>{var c;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const d=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,d);for(let f=d;f<n;f++){let C=(c=this.measurementsCache[f])==null?void 0:c.measureElement;C||(C=y=>{const w=a(f),V=this.elementsCache.get(w);if(!y){V&&(this.observer.unobserve(V),this.elementsCache.delete(w));return}V!==y&&(V&&this.observer.unobserve(V),this.observer.observe(y),this.elementsCache.set(w,y)),y.isConnected&&this.resizeItem(f,this.options.measureElement(y,void 0,this))});const h=a(f),b=this.options.lanes===1?u[f-1]:this.getFurthestMeasurement(u,f),g=b?b.end+this.options.gap:l+r,S=s.get(h),k=typeof S=="number"?S:this.options.estimateSize(f),v=g+k,x=b?b.lane:f%this.options.lanes;u[f]={index:f,start:g,size:k,end:v,key:h,lane:x,measureElement:C}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=ie(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,l,r)=>this.range=n.length>0&&l>0?On({measurements:n,outerSize:l,scrollOffset:r}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=ie(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,l,r,a)=>l===null?[]:n({startIndex:l.startIndex,endIndex:l.endIndex,overscan:r,count:a}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const l=this.options.indexAttribute,r=n.getAttribute(l);return r?parseInt(r,10):(console.warn(`Missing attribute name '${l}={index}' on measured element.`),-1)},this._measureElement=(n,l)=>{const r=this.indexFromElement(n),a=this.getMeasurements()[r];if(!a||!n.isConnected){this.elementsCache.forEach((s,c)=>{s===n&&(this.observer.unobserve(n),this.elementsCache.delete(c))});return}const i=this.elementsCache.get(a.key);i!==n&&(i&&this.observer.unobserve(i),this.observer.observe(n),this.elementsCache.set(a.key,n)),this.resizeItem(r,this.options.measureElement(n,l,this))},this.resizeItem=(n,l)=>{const r=this.getMeasurements()[n];if(!r)return;const a=this.itemSizeCache.get(r.key)??r.size,i=l-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,i,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,l)),this.notify(!0,!1))},this.measureElement=n=>{n&&this._measureElement(n,void 0)},this.getVirtualItems=ie(()=>[this.getIndexes(),this.getMeasurements()],(n,l)=>{const r=[];for(let a=0,i=n.length;a<i;a++){const s=n[a],c=l[s];r.push(c)}return r},{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const l=this.getMeasurements();if(l.length!==0)return Ae(l[ot(0,l.length-1,r=>Ae(l[r]).start,n)])},this.getOffsetForAlignment=(n,l)=>{const r=this.getSize(),a=this.getScrollOffset();l==="auto"&&(n<=a?l="start":n>=a+r?l="end":l="start"),l==="start"?n=n:l==="end"?n=n-r:l==="center"&&(n=n-r/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",c=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-r;return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,l="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const r=this.getMeasurements()[n];if(!r)return;const a=this.getSize(),i=this.getScrollOffset();if(l==="auto")if(r.end>=i+a-this.options.scrollPaddingEnd)l="end";else if(r.start<=i+this.options.scrollPaddingStart)l="start";else return[i,l];const s=l==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,l),l]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:l="start",behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,l),{adjustments:void 0,behavior:r})},this.scrollToIndex=(n,{align:l="auto",behavior:r}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(n,l);if(!a)return;const[i,s]=a;this._scrollToOffset(i,{adjustments:void 0,behavior:r}),r!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[d]=Ae(this.getOffsetForIndex(n,s));En(d,this.getScrollOffset())||this.scrollToIndex(n,{align:s,behavior:r})}else this.scrollToIndex(n,{align:s,behavior:r})}))},this.scrollBy=(n,{behavior:l}={})=>{this.cancelScrollToIndex(),l==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:l})},this.getTotalSize=()=>{var n;const l=this.getMeasurements();let r;return l.length===0?r=this.options.paddingStart:r=this.options.lanes===1?((n=l[l.length-1])==null?void 0:n.end)??0:Math.max(...l.slice(-this.options.lanes).map(a=>a.end)),r-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:l,behavior:r})=>{this.options.scrollToFn(n,{behavior:r,adjustments:l},this)},this.measure=()=>{var n,l;this.itemSizeCache=new Map,(l=(n=this.options).onChange)==null||l.call(n,this,!1)},this.setOptions(o)}}const ot=(e,o,n,l)=>{for(;e<=o;){const r=(e+o)/2|0,a=n(r);if(a<l)e=r+1;else if(a>l)o=r-1;else return r}return e>0?e-1:0};function On({measurements:e,outerSize:o,scrollOffset:n}){const l=e.length-1,a=ot(0,l,s=>e[s].start,n);let i=a;for(;i<l&&e[i].end<n+o;)i++;return{startIndex:a,endIndex:i}}function In(e){const o=new Ln(t.unref(e)),n=t.shallowRef(o),l=o._didMount();return t.watch(()=>t.unref(e).getScrollElement(),r=>{r&&o._willUpdate()},{immediate:!0}),t.watch(()=>t.unref(e),r=>{o.setOptions({...r,onChange:(a,i)=>{var s;t.triggerRef(n),(s=r.onChange)==null||s.call(r,a,i)}}),o._willUpdate(),t.triggerRef(n)},{immediate:!0}),t.onScopeDispose(l),n}function Mn(e){return In(t.computed(()=>({observeElementRect:Tn,observeElementOffset:Vn,scrollToFn:Nn,...t.unref(e)})))}function An(e,o,n){let l=t.ref(n==null?void 0:n.value),r=t.computed(()=>e.value!==void 0);return[t.computed(()=>r.value?e.value:l.value),function(a){return r.value||(l.value=a),o==null?void 0:o(a)}]}function Rn(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(o=>setTimeout(()=>{throw o}))}function xe(){let e=[],o={addEventListener(n,l,r,a){return n.addEventListener(l,r,a),o.add(()=>n.removeEventListener(l,r,a))},requestAnimationFrame(...n){let l=requestAnimationFrame(...n);o.add(()=>cancelAnimationFrame(l))},nextFrame(...n){o.requestAnimationFrame(()=>{o.requestAnimationFrame(...n)})},setTimeout(...n){let l=setTimeout(...n);o.add(()=>clearTimeout(l))},microTask(...n){let l={current:!0};return Rn(()=>{l.current&&n[0]()}),o.add(()=>{l.current=!1})},style(n,l,r){let a=n.style.getPropertyValue(l);return Object.assign(n.style,{[l]:r}),this.add(()=>{Object.assign(n.style,{[l]:a})})},group(n){let l=xe();return n(l),this.add(()=>l.dispose())},add(n){return e.push(n),()=>{let l=e.indexOf(n);if(l>=0)for(let r of e.splice(l,1))r()}},dispose(){for(let n of e.splice(0))n()}};return o}function Dn(){let e=xe();return t.onUnmounted(()=>e.dispose()),e}function Pn(){let e=Dn();return o=>{e.dispose(),e.nextFrame(o)}}let Fn=Symbol("headlessui.useid"),jn=0;function ce(){return t.inject(Fn,()=>`${++jn}`)()}function N(e){var o;if(e==null||e.value==null)return null;let n=(o=e.value.$el)!=null?o:e.value;return n instanceof Node?n:null}function U(e,o,...n){if(e in o){let r=o[e];return typeof r=="function"?r(...n):r}let l=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map(r=>`"${r}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,U),l}var zn=Object.defineProperty,Hn=(e,o,n)=>o in e?zn(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,lt=(e,o,n)=>(Hn(e,typeof o!="symbol"?o+"":o,n),n);let Zn=class{constructor(){lt(this,"current",this.detect()),lt(this,"currentId",0)}set(o){this.current!==o&&(this.currentId=0,this.current=o)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},Re=new Zn;function De(e){if(Re.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let o=N(e);if(o)return o.ownerDocument}return document}let rt=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Un=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Un||{}),Wn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Wn||{}),qn=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(qn||{}),at=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(at||{});function Gn(e,o=0){var n;return e===((n=De(e))==null?void 0:n.body)?!1:U(o,{0(){return e.matches(rt)},1(){let l=e;for(;l!==null;){if(l.matches(rt))return!0;l=l.parentElement}return!1}})}var Jn=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Jn||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Yn(e,o=n=>n){return e.slice().sort((n,l)=>{let r=o(n),a=o(l);if(r===null||a===null)return 0;let i=r.compareDocumentPosition(a);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Qn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Xn(){return/Android/gi.test(window.navigator.userAgent)}function st(){return Qn()||Xn()}function ve(e,o,n){Re.isServer||t.watchEffect(l=>{document.addEventListener(e,o,n),l(()=>document.removeEventListener(e,o,n))})}function Kn(e,o,n){Re.isServer||t.watchEffect(l=>{window.addEventListener(e,o,n),l(()=>window.removeEventListener(e,o,n))})}function eo(e,o,n=t.computed(()=>!0)){function l(a,i){if(!n.value||a.defaultPrevented)return;let s=i(a);if(s===null||!s.getRootNode().contains(s))return;let c=function d(u){return typeof u=="function"?d(u()):Array.isArray(u)||u instanceof Set?u:[u]}(e);for(let d of c){if(d===null)continue;let u=d instanceof HTMLElement?d:N(d);if(u!=null&&u.contains(s)||a.composed&&a.composedPath().includes(u))return}return!Gn(s,at.Loose)&&s.tabIndex!==-1&&a.preventDefault(),o(a,s)}let r=t.ref(null);ve("pointerdown",a=>{var i,s;n.value&&(r.value=((s=(i=a.composedPath)==null?void 0:i.call(a))==null?void 0:s[0])||a.target)},!0),ve("mousedown",a=>{var i,s;n.value&&(r.value=((s=(i=a.composedPath)==null?void 0:i.call(a))==null?void 0:s[0])||a.target)},!0),ve("click",a=>{st()||r.value&&(l(a,()=>r.value),r.value=null)},!0),ve("touchend",a=>l(a,()=>a.target instanceof HTMLElement?a.target:null),!0),Kn("blur",a=>l(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function it(e,o){if(e)return e;let n=o??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function to(e,o){let n=t.ref(it(e.value.type,e.value.as));return t.onMounted(()=>{n.value=it(e.value.type,e.value.as)}),t.watchEffect(()=>{var l;n.value||N(o)&&N(o)instanceof HTMLButtonElement&&!((l=N(o))!=null&&l.hasAttribute("type"))&&(n.value="button")}),n}function ct(e){return[e.screenX,e.screenY]}function no(){let e=t.ref([-1,-1]);return{wasMoved(o){let n=ct(o);return e.value[0]===n[0]&&e.value[1]===n[1]?!1:(e.value=n,!0)},update(o){e.value=ct(o)}}}function oo({container:e,accept:o,walk:n,enabled:l}){t.watchEffect(()=>{let r=e.value;if(!r||l!==void 0&&!l.value)return;let a=De(e);if(!a)return;let i=Object.assign(c=>o(c),{acceptNode:o}),s=a.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,i,!1);for(;s.nextNode();)n(s.currentNode)})}var de=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(de||{}),lo=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(lo||{});function Q({visible:e=!0,features:o=0,ourProps:n,theirProps:l,...r}){var a;let i=ut(l,n),s=Object.assign(r,{props:i});if(e||o&2&&i.static)return Pe(s);if(o&1){let c=(a=i.unmount)==null||a?0:1;return U(c,{0(){return null},1(){return Pe({...r,props:{...i,hidden:!0,style:{display:"none"}}})}})}return Pe(s)}function Pe({props:e,attrs:o,slots:n,slot:l,name:r}){var a,i;let{as:s,...c}=ye(e,["unmount","static"]),d=(a=n.default)==null?void 0:a.call(n,l),u={};if(l){let f=!1,C=[];for(let[h,b]of Object.entries(l))typeof b=="boolean"&&(f=!0),b===!0&&C.push(h);f&&(u["data-headlessui-state"]=C.join(" "))}if(s==="template"){if(d=dt(d??[]),Object.keys(c).length>0||Object.keys(o).length>0){let[f,...C]=d??[];if(!ao(f)||C.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${r} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(c).concat(Object.keys(o)).map(g=>g.trim()).filter((g,S,k)=>k.indexOf(g)===S).sort((g,S)=>g.localeCompare(S)).map(g=>` - ${g}`).join(`
|