@ddict/popup 1.0.18 → 1.0.19

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.umd.js CHANGED
@@ -1,17 +1,17 @@
1
- (function(G,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(G=typeof globalThis<"u"?globalThis:G||self,n(G.Popup={},G.Vue))})(this,function(G,n){"use strict";const $t="data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%200%2096%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M40.151%208.94498H35.7256V23.055H40.151C44.7473%2023.055%2047.826%2020.0825%2047.826%2015.9795C47.8267%2011.8093%2044.7678%208.94498%2040.151%208.94498ZM40.1312%2021.025H37.993V10.9974H40.1312C43.4217%2010.9974%2045.4972%2012.9846%2045.4972%2015.9795C45.4965%2018.9296%2043.4012%2021.025%2040.1312%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M54.5158%208.94498H50.0903V23.055H54.5158C59.1121%2023.055%2062.1908%2020.0825%2062.1908%2015.9795C62.1914%2011.8093%2059.1351%208.94498%2054.5158%208.94498ZM54.496%2021.025H52.3578V10.9974H54.496C57.789%2010.9974%2059.8619%2012.9846%2059.8619%2015.9795C59.8613%2018.9296%2057.766%2021.025%2054.496%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M66.7237%208.94498H64.4575V23.055H66.7237V8.94498Z'%20fill='%233B5695'/%3e%3cpath%20d='M76.4301%2010.7837C78.29%2010.7837%2079.7436%2011.6603%2080.7487%2013.2207L82.4589%2011.9591C81.2401%209.97057%2078.9957%208.70953%2076.409%208.70953C72.3898%208.64555%2068.9048%2011.9591%2068.9906%2016C68.9048%2020.0403%2072.3898%2023.3544%2076.409%2023.2905C79.0385%2023.2905%2081.2618%2022.0294%2082.4589%2020.0409L80.7487%2018.7793C79.7436%2020.3397%2078.29%2021.2163%2076.4301%2021.2163C73.544%2021.2163%2071.3418%2018.993%2071.3418%2016C71.3418%2013.007%2073.5433%2010.7837%2076.4301%2010.7837Z'%20fill='%233B5695'/%3e%3cpath%20d='M83.3135%208.94498V10.9757H88.0595V23.055H90.3256V10.9757H95.0934V8.94498H83.3135Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.66351%204.7121H4.604V15.4427L6.87208%2013.3839V6.79143H8.64559C11.4639%206.79143%2013.2835%208.47857%2013.2835%2011.0877C13.2835%2013.6916%2011.421%2015.4427%208.64559%2015.4427H4.604V17.5016H8.66351C12.7531%2017.5016%2015.6098%2014.8644%2015.6098%2011.0877C15.6104%207.27575%2012.8196%204.7121%208.66351%204.7121Z'%20fill='%233B5695'/%3e%3cpath%20d='M26.2425%209.25528H21.5502L20.7537%2014.293L21.4523%2014.3308L21.4069%2014.7294C21.3916%2014.8656%2021.3289%2015.0448%2021.112%2015.1734C21.1017%2015.9399%2021.0845%2017.0493%2020.9706%2018.1766H26.5937V19.8586H21.4677C22.4133%2022.9424%2024.1254%2024.9648%2026.5611%2025.8669L27.1536%2026.0864L26.6795%2026.5048C26.4875%2026.6737%2026.2182%2027.0141%2026.0896%2027.2489L25.9258%2027.5438L25.6155%2027.4152C23.167%2026.4095%2021.4223%2024.4926%2020.2905%2021.563C19.3602%2024.3365%2017.5797%2026.2553%2014.8592%2027.428L14.5438%2027.5617L14.3775%2027.2642C14.2764%2027.08%2014.0294%2026.7876%2013.8151%2026.5989L13.3564%2026.1951L13.9239%2025.9655C16.4555%2024.9392%2018.064%2023.1414%2018.8228%2020.4837C19.6647%2019.8381%2020.2099%2018.8221%2020.2169%2017.6801V4.53231C20.2169%202.58349%2018.6334%201%2016.6846%201H3.53487C1.58349%201%200%202.58349%200%204.53231V17.6795C0%2019.6283%201.58349%2021.2143%203.53487%2021.2143H8.25528V27.2431C8.25528%2029.3135%209.93986%2031%2012.0096%2031H26.2431C28.3161%2031%2029.9974%2029.3129%2029.9974%2027.2431V13.0096C29.9974%2010.9392%2028.3154%209.25528%2026.2425%209.25528ZM3.53487%2019.4517C2.55662%2019.4517%201.762%2018.6603%201.762%2017.6788V4.53231C1.762%203.55662%202.55598%202.762%203.53487%202.762H16.6839C17.6571%202.762%2018.4517%203.55598%2018.4517%204.53231V17.6795C18.4517%2017.778%2018.444%2017.8733%2018.4267%2017.9667C18.3941%2018.1811%2018.3231%2018.38%2018.215%2018.5592C17.9149%2019.0934%2017.3372%2019.4517%2016.6846%2019.4517H3.53487Z'%20fill='%233B5695'/%3e%3c/svg%3e",Vt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.5%203.25C5.25736%203.25%204.25%204.25736%204.25%205.5H3.5H2.75C2.75%203.42893%204.42893%201.75%206.5%201.75H17.5C17.9142%201.75%2018.25%202.08579%2018.25%202.5V15.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25H6.5C5.26293%2016.25%204.25%2017.2576%204.25%2018.5C4.25%2018.9142%203.91421%2019.25%203.5%2019.25C3.08579%2019.25%202.75%2018.9142%202.75%2018.5V5.5C2.75%205.49993%202.75%205.5%203.5%205.5C4.25%205.5%204.25%205.49993%204.25%205.5V15.5017C4.87779%2015.0296%205.65755%2014.75%206.5%2014.75H16.75V3.25H6.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.5%202.75C20.9142%202.75%2021.25%203.08579%2021.25%203.5V21.5C21.25%2021.9142%2020.9142%2022.25%2020.5%2022.25H6.5C4.42893%2022.25%202.75%2020.5711%202.75%2018.5C2.75%2016.4289%204.42893%2014.75%206.5%2014.75H17.4995C17.4996%2014.75%2017.5%2014.75%2017.5%2015.5C17.5%2016.25%2017.5001%2016.25%2017.5%2016.25H6.5C5.25736%2016.25%204.25%2017.2574%204.25%2018.5C4.25%2019.7426%205.25736%2020.75%206.5%2020.75H19.75V3.5C19.75%203.08579%2020.0858%202.75%2020.5%202.75ZM18.25%2015.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25V15.5L17.4995%2014.75C17.9137%2014.75%2018.25%2015.0858%2018.25%2015.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.25%2018.5C6.25%2018.0858%206.58579%2017.75%207%2017.75H17C17.4142%2017.75%2017.75%2018.0858%2017.75%2018.5C17.75%2018.9142%2017.4142%2019.25%2017%2019.25H7C6.58579%2019.25%206.25%2018.9142%206.25%2018.5Z'%20fill='%233B5695'/%3e%3c/svg%3e",Tt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.467%202.47236C2.75841%202.17799%203.23328%202.17559%203.52764%202.467L8.52765%207.41675C8.82201%207.70816%208.82441%208.18303%208.533%208.4774C8.24159%208.77176%207.76672%208.77416%207.47235%208.48275L2.47236%203.533C2.17799%203.24159%202.17559%202.76672%202.467%202.47236Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.533%2015.4724C8.82441%2015.7667%208.82201%2016.2416%208.52765%2016.533L3.52765%2021.4828C3.23328%2021.7742%202.75841%2021.7718%202.467%2021.4774C2.17559%2021.183%202.17799%2020.7082%202.47236%2020.4167L7.47235%2015.467C7.76672%2015.1756%208.24159%2015.178%208.533%2015.4724Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.52%2015.4697C15.8129%2015.1768%2016.2877%2015.1768%2016.5806%2015.4697L21.5304%2020.4194C21.8233%2020.7123%2021.8233%2021.1872%2021.5304%2021.4801C21.2375%2021.773%2020.7626%2021.773%2020.4697%2021.4801L15.52%2016.5303C15.2271%2016.2374%2015.2271%2015.7626%2015.52%2015.4697Z'%20fill='%233B5695'/%3e%3cpath%20d='M21.4801%202.46967C21.773%202.76256%2021.773%203.23744%2021.4801%203.53033L16.5303%208.48008C16.2374%208.77297%2015.7626%208.77297%2015.4697%208.48008C15.1768%208.18719%2015.1768%207.71231%2015.4697%207.41942L20.4194%202.46967C20.7123%202.17678%2021.1872%202.17678%2021.4801%202.46967Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.75%203C15.75%202.58579%2016.0858%202.25%2016.5%202.25H21C21.4142%202.25%2021.75%202.58579%2021.75%203V7.5C21.75%207.91421%2021.4142%208.25%2021%208.25C20.5858%208.25%2020.25%207.91421%2020.25%207.5V3.75H16.5C16.0858%203.75%2015.75%203.41421%2015.75%203Z'%20fill='%233B5695'/%3e%3cpath%20d='M21%2015.75C21.4142%2015.75%2021.75%2016.0858%2021.75%2016.5V21C21.75%2021.4142%2021.4142%2021.75%2021%2021.75H16.5C16.0858%2021.75%2015.75%2021.4142%2015.75%2021C15.75%2020.5858%2016.0858%2020.25%2016.5%2020.25H20.25V16.5C20.25%2016.0858%2020.5858%2015.75%2021%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M3%2015.75C3.41421%2015.75%203.75%2016.0858%203.75%2016.5V20.25H7.5C7.91421%2020.25%208.25%2020.5858%208.25%2021C8.25%2021.4142%207.91421%2021.75%207.5%2021.75H3C2.58579%2021.75%202.25%2021.4142%202.25%2021V16.5C2.25%2016.0858%202.58579%2015.75%203%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M2.25%203C2.25%202.58579%202.58579%202.25%203%202.25H7.5C7.91421%202.25%208.25%202.58579%208.25%203C8.25%203.41421%207.91421%203.75%207.5%203.75H3.75V7.5C3.75%207.91421%203.41421%208.25%203%208.25C2.58579%208.25%202.25%207.91421%202.25%207.5V3Z'%20fill='%233B5695'/%3e%3c/svg%3e",Nt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.12596%201.63869C9.46935%201.54364%209.83221%201.70329%209.99413%202.02068C10.3672%202.75191%2011.1261%203.25%2012%203.25C12.8739%203.25%2013.6328%202.75191%2014.0059%202.02068C14.1678%201.70329%2014.5307%201.54364%2014.874%201.63869C16.5585%202.10497%2018.0759%202.9704%2019.3184%204.12574C19.5611%204.35137%2019.6269%204.70948%2019.4804%205.00666C19.3331%205.30535%2019.25%205.6419%2019.25%206C19.25%207.24263%2020.2574%208.25%2021.5%208.25L21.5314%208.24977C21.8629%208.24504%2022.1583%208.45859%2022.2576%208.77495C22.5777%209.79397%2022.75%2010.8776%2022.75%2012C22.75%2012.7408%2022.6749%2013.4649%2022.5318%2014.1648C22.4548%2014.5411%2022.1059%2014.7985%2021.7237%2014.7609C21.6504%2014.7537%2021.5758%2014.75%2021.5%2014.75C20.2574%2014.75%2019.25%2015.7574%2019.25%2017C19.25%2017.5531%2019.4486%2018.0579%2019.7793%2018.4498C20.027%2018.7434%2020.0128%2019.1767%2019.7465%2019.4535C18.4777%2020.7719%2016.8745%2021.7678%2015.0721%2022.3044C14.6807%2022.4209%2014.2681%2022.2029%2014.1437%2021.814C13.8535%2020.906%2013.0024%2020.25%2012%2020.25C10.9976%2020.25%2010.1465%2020.906%209.85629%2021.814C9.73195%2022.2029%209.31927%2022.4209%208.92789%2022.3044C7.12545%2021.7678%205.52229%2020.7719%204.25353%2019.4535C3.98716%2019.1767%203.97299%2018.7434%204.22072%2018.4498C4.55139%2018.0579%204.75%2017.5531%204.75%2017C4.75%2015.7574%203.74264%2014.75%202.5%2014.75C2.42423%2014.75%202.34963%2014.7537%202.27634%2014.7609C1.89406%2014.7985%201.54519%2014.5411%201.46821%2014.1648C1.32505%2013.4649%201.25%2012.7408%201.25%2012C1.25%2010.8776%201.42227%209.79398%201.74236%208.77494C1.84173%208.45859%202.13705%208.24504%202.4686%208.24977L2.5%208.25C3.74264%208.25%204.75%207.24263%204.75%206C4.75%205.6419%204.66689%205.30535%204.51962%205.00666C4.3731%204.70948%204.43894%204.35137%204.68159%204.12574C5.92411%202.9704%207.44153%202.10497%209.12596%201.63869ZM6.08277%204.88991C6.19152%205.24123%206.25%205.61424%206.25%206C6.25%207.88945%204.85261%209.45253%203.03493%209.71213C2.84898%2010.4432%202.75%2011.2096%202.75%2012C2.75%2012.4294%202.77921%2012.8516%202.83567%2013.2648C4.74948%2013.4346%206.25%2015.0421%206.25%2017C6.25%2017.6669%206.0754%2018.2941%205.76971%2018.8372C6.62645%2019.6184%207.63002%2020.2404%208.73362%2020.657C9.37706%2019.5189%2010.598%2018.75%2012%2018.75C13.402%2018.75%2014.6229%2019.5189%2015.2664%2020.657C16.37%2020.2404%2017.3735%2019.6184%2018.2303%2018.8372C17.9246%2018.2941%2017.75%2017.6669%2017.75%2017C17.75%2015.0421%2019.2505%2013.4346%2021.1643%2013.2648C21.2208%2012.8516%2021.25%2012.4294%2021.25%2012C21.25%2011.2096%2021.151%2010.4432%2020.9651%209.71213C19.1474%209.45252%2017.75%207.88945%2017.75%206C17.75%205.61424%2017.8085%205.24123%2017.9172%204.88991C17.0618%204.1771%2016.0762%203.61614%2015.0018%203.24775C14.3184%204.15897%2013.2287%204.75%2012%204.75C10.7713%204.75%209.68158%204.15897%208.99819%203.24775C7.92382%203.61614%206.93823%204.1771%206.08277%204.88991Z'%20fill='%233B5695'/%3e%3cpath%20d='M7.75%2012C7.75%209.65278%209.65279%207.75%2012%207.75C14.3472%207.75%2016.25%209.65278%2016.25%2012C16.25%2014.3472%2014.3472%2016.25%2012%2016.25C9.65279%2016.25%207.75%2014.3472%207.75%2012ZM12%209.25C10.4812%209.25%209.25%2010.4812%209.25%2012C9.25%2013.5188%2010.4812%2014.75%2012%2014.75C13.5188%2014.75%2014.75%2013.5188%2014.75%2012C14.75%2010.4812%2013.5188%209.25%2012%209.25Z'%20fill='%233B5695'/%3e%3c/svg%3e",It={class:"flex justify-between"},Lt=n.createElementVNode("div",{class:"flex flex-row"},[n.createElementVNode("img",{src:$t,alt:"Vue logo",class:"w-24"})],-1),Bt={class:"flex"},Rt={class:"tooltip tooltip-bottom tooltip-success before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%]","data-tip":"Reader"},Pt=[n.createElementVNode("img",{src:Vt,alt:"Reader",class:"w-7"},null,-1)],Mt={class:"tooltip tooltip-bottom tooltip-success before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%] md:hidden","data-tip":"Full screen"},Dt=[n.createElementVNode("img",{src:Tt,alt:"Full screen",class:"w-7"},null,-1)],At={class:"tooltip tooltip-bottom tooltip-success before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%]","data-tip":"Setting"},Ft=[n.createElementVNode("img",{src:Nt,alt:"Setting",class:"w-7"},null,-1)],jt={__name:"Header",emits:["settings","fullScreen","reader"],setup(e,{emit:l}){const t=l;return(o,s)=>(n.openBlock(),n.createElementBlock("div",It,[Lt,n.createElementVNode("div",Bt,[n.createElementVNode("div",Rt,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[0]||(s[0]=a=>t("reader"))},Pt)]),n.createElementVNode("div",Mt,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[1]||(s[1]=a=>t("fullScreen"))},Dt)]),n.createElementVNode("div",At,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[2]||(s[2]=a=>t("settings"))},Ft)])])]))}};function oe(e,l,t){let o=t.initialDeps??[],s;return()=>{var a,i,r,c;let u;t.key&&((a=t.debug)!=null&&a.call(t))&&(u=Date.now());const d=e();if(!(d.length!==o.length||d.some((x,g)=>o[g]!==x)))return s;o=d;let _;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(_=Date.now()),s=l(...d),t.key&&((r=t.debug)!=null&&r.call(t))){const x=Math.round((Date.now()-u)*100)/100,g=Math.round((Date.now()-_)*100)/100,h=g/16,E=(N,S)=>{for(N=String(N);N.length<S;)N=" "+N;return N};console.info(`%c⏱ ${E(g,5)} /${E(x,5)} ms`,`
1
+ (function(G,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(G=typeof globalThis<"u"?globalThis:G||self,n(G.Popup={},G.Vue))})(this,function(G,n){"use strict";const $t="data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%200%2096%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M40.151%208.94498H35.7256V23.055H40.151C44.7473%2023.055%2047.826%2020.0825%2047.826%2015.9795C47.8267%2011.8093%2044.7678%208.94498%2040.151%208.94498ZM40.1312%2021.025H37.993V10.9974H40.1312C43.4217%2010.9974%2045.4972%2012.9846%2045.4972%2015.9795C45.4965%2018.9296%2043.4012%2021.025%2040.1312%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M54.5158%208.94498H50.0903V23.055H54.5158C59.1121%2023.055%2062.1908%2020.0825%2062.1908%2015.9795C62.1914%2011.8093%2059.1351%208.94498%2054.5158%208.94498ZM54.496%2021.025H52.3578V10.9974H54.496C57.789%2010.9974%2059.8619%2012.9846%2059.8619%2015.9795C59.8613%2018.9296%2057.766%2021.025%2054.496%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M66.7237%208.94498H64.4575V23.055H66.7237V8.94498Z'%20fill='%233B5695'/%3e%3cpath%20d='M76.4301%2010.7837C78.29%2010.7837%2079.7436%2011.6603%2080.7487%2013.2207L82.4589%2011.9591C81.2401%209.97057%2078.9957%208.70953%2076.409%208.70953C72.3898%208.64555%2068.9048%2011.9591%2068.9906%2016C68.9048%2020.0403%2072.3898%2023.3544%2076.409%2023.2905C79.0385%2023.2905%2081.2618%2022.0294%2082.4589%2020.0409L80.7487%2018.7793C79.7436%2020.3397%2078.29%2021.2163%2076.4301%2021.2163C73.544%2021.2163%2071.3418%2018.993%2071.3418%2016C71.3418%2013.007%2073.5433%2010.7837%2076.4301%2010.7837Z'%20fill='%233B5695'/%3e%3cpath%20d='M83.3135%208.94498V10.9757H88.0595V23.055H90.3256V10.9757H95.0934V8.94498H83.3135Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.66351%204.7121H4.604V15.4427L6.87208%2013.3839V6.79143H8.64559C11.4639%206.79143%2013.2835%208.47857%2013.2835%2011.0877C13.2835%2013.6916%2011.421%2015.4427%208.64559%2015.4427H4.604V17.5016H8.66351C12.7531%2017.5016%2015.6098%2014.8644%2015.6098%2011.0877C15.6104%207.27575%2012.8196%204.7121%208.66351%204.7121Z'%20fill='%233B5695'/%3e%3cpath%20d='M26.2425%209.25528H21.5502L20.7537%2014.293L21.4523%2014.3308L21.4069%2014.7294C21.3916%2014.8656%2021.3289%2015.0448%2021.112%2015.1734C21.1017%2015.9399%2021.0845%2017.0493%2020.9706%2018.1766H26.5937V19.8586H21.4677C22.4133%2022.9424%2024.1254%2024.9648%2026.5611%2025.8669L27.1536%2026.0864L26.6795%2026.5048C26.4875%2026.6737%2026.2182%2027.0141%2026.0896%2027.2489L25.9258%2027.5438L25.6155%2027.4152C23.167%2026.4095%2021.4223%2024.4926%2020.2905%2021.563C19.3602%2024.3365%2017.5797%2026.2553%2014.8592%2027.428L14.5438%2027.5617L14.3775%2027.2642C14.2764%2027.08%2014.0294%2026.7876%2013.8151%2026.5989L13.3564%2026.1951L13.9239%2025.9655C16.4555%2024.9392%2018.064%2023.1414%2018.8228%2020.4837C19.6647%2019.8381%2020.2099%2018.8221%2020.2169%2017.6801V4.53231C20.2169%202.58349%2018.6334%201%2016.6846%201H3.53487C1.58349%201%200%202.58349%200%204.53231V17.6795C0%2019.6283%201.58349%2021.2143%203.53487%2021.2143H8.25528V27.2431C8.25528%2029.3135%209.93986%2031%2012.0096%2031H26.2431C28.3161%2031%2029.9974%2029.3129%2029.9974%2027.2431V13.0096C29.9974%2010.9392%2028.3154%209.25528%2026.2425%209.25528ZM3.53487%2019.4517C2.55662%2019.4517%201.762%2018.6603%201.762%2017.6788V4.53231C1.762%203.55662%202.55598%202.762%203.53487%202.762H16.6839C17.6571%202.762%2018.4517%203.55598%2018.4517%204.53231V17.6795C18.4517%2017.778%2018.444%2017.8733%2018.4267%2017.9667C18.3941%2018.1811%2018.3231%2018.38%2018.215%2018.5592C17.9149%2019.0934%2017.3372%2019.4517%2016.6846%2019.4517H3.53487Z'%20fill='%233B5695'/%3e%3c/svg%3e",Vt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.5%203.25C5.25736%203.25%204.25%204.25736%204.25%205.5H3.5H2.75C2.75%203.42893%204.42893%201.75%206.5%201.75H17.5C17.9142%201.75%2018.25%202.08579%2018.25%202.5V15.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25H6.5C5.26293%2016.25%204.25%2017.2576%204.25%2018.5C4.25%2018.9142%203.91421%2019.25%203.5%2019.25C3.08579%2019.25%202.75%2018.9142%202.75%2018.5V5.5C2.75%205.49993%202.75%205.5%203.5%205.5C4.25%205.5%204.25%205.49993%204.25%205.5V15.5017C4.87779%2015.0296%205.65755%2014.75%206.5%2014.75H16.75V3.25H6.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.5%202.75C20.9142%202.75%2021.25%203.08579%2021.25%203.5V21.5C21.25%2021.9142%2020.9142%2022.25%2020.5%2022.25H6.5C4.42893%2022.25%202.75%2020.5711%202.75%2018.5C2.75%2016.4289%204.42893%2014.75%206.5%2014.75H17.4995C17.4996%2014.75%2017.5%2014.75%2017.5%2015.5C17.5%2016.25%2017.5001%2016.25%2017.5%2016.25H6.5C5.25736%2016.25%204.25%2017.2574%204.25%2018.5C4.25%2019.7426%205.25736%2020.75%206.5%2020.75H19.75V3.5C19.75%203.08579%2020.0858%202.75%2020.5%202.75ZM18.25%2015.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25V15.5L17.4995%2014.75C17.9137%2014.75%2018.25%2015.0858%2018.25%2015.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.25%2018.5C6.25%2018.0858%206.58579%2017.75%207%2017.75H17C17.4142%2017.75%2017.75%2018.0858%2017.75%2018.5C17.75%2018.9142%2017.4142%2019.25%2017%2019.25H7C6.58579%2019.25%206.25%2018.9142%206.25%2018.5Z'%20fill='%233B5695'/%3e%3c/svg%3e",Tt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.467%202.47236C2.75841%202.17799%203.23328%202.17559%203.52764%202.467L8.52765%207.41675C8.82201%207.70816%208.82441%208.18303%208.533%208.4774C8.24159%208.77176%207.76672%208.77416%207.47235%208.48275L2.47236%203.533C2.17799%203.24159%202.17559%202.76672%202.467%202.47236Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.533%2015.4724C8.82441%2015.7667%208.82201%2016.2416%208.52765%2016.533L3.52765%2021.4828C3.23328%2021.7742%202.75841%2021.7718%202.467%2021.4774C2.17559%2021.183%202.17799%2020.7082%202.47236%2020.4167L7.47235%2015.467C7.76672%2015.1756%208.24159%2015.178%208.533%2015.4724Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.52%2015.4697C15.8129%2015.1768%2016.2877%2015.1768%2016.5806%2015.4697L21.5304%2020.4194C21.8233%2020.7123%2021.8233%2021.1872%2021.5304%2021.4801C21.2375%2021.773%2020.7626%2021.773%2020.4697%2021.4801L15.52%2016.5303C15.2271%2016.2374%2015.2271%2015.7626%2015.52%2015.4697Z'%20fill='%233B5695'/%3e%3cpath%20d='M21.4801%202.46967C21.773%202.76256%2021.773%203.23744%2021.4801%203.53033L16.5303%208.48008C16.2374%208.77297%2015.7626%208.77297%2015.4697%208.48008C15.1768%208.18719%2015.1768%207.71231%2015.4697%207.41942L20.4194%202.46967C20.7123%202.17678%2021.1872%202.17678%2021.4801%202.46967Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.75%203C15.75%202.58579%2016.0858%202.25%2016.5%202.25H21C21.4142%202.25%2021.75%202.58579%2021.75%203V7.5C21.75%207.91421%2021.4142%208.25%2021%208.25C20.5858%208.25%2020.25%207.91421%2020.25%207.5V3.75H16.5C16.0858%203.75%2015.75%203.41421%2015.75%203Z'%20fill='%233B5695'/%3e%3cpath%20d='M21%2015.75C21.4142%2015.75%2021.75%2016.0858%2021.75%2016.5V21C21.75%2021.4142%2021.4142%2021.75%2021%2021.75H16.5C16.0858%2021.75%2015.75%2021.4142%2015.75%2021C15.75%2020.5858%2016.0858%2020.25%2016.5%2020.25H20.25V16.5C20.25%2016.0858%2020.5858%2015.75%2021%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M3%2015.75C3.41421%2015.75%203.75%2016.0858%203.75%2016.5V20.25H7.5C7.91421%2020.25%208.25%2020.5858%208.25%2021C8.25%2021.4142%207.91421%2021.75%207.5%2021.75H3C2.58579%2021.75%202.25%2021.4142%202.25%2021V16.5C2.25%2016.0858%202.58579%2015.75%203%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M2.25%203C2.25%202.58579%202.58579%202.25%203%202.25H7.5C7.91421%202.25%208.25%202.58579%208.25%203C8.25%203.41421%207.91421%203.75%207.5%203.75H3.75V7.5C3.75%207.91421%203.41421%208.25%203%208.25C2.58579%208.25%202.25%207.91421%202.25%207.5V3Z'%20fill='%233B5695'/%3e%3c/svg%3e",Nt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.12596%201.63869C9.46935%201.54364%209.83221%201.70329%209.99413%202.02068C10.3672%202.75191%2011.1261%203.25%2012%203.25C12.8739%203.25%2013.6328%202.75191%2014.0059%202.02068C14.1678%201.70329%2014.5307%201.54364%2014.874%201.63869C16.5585%202.10497%2018.0759%202.9704%2019.3184%204.12574C19.5611%204.35137%2019.6269%204.70948%2019.4804%205.00666C19.3331%205.30535%2019.25%205.6419%2019.25%206C19.25%207.24263%2020.2574%208.25%2021.5%208.25L21.5314%208.24977C21.8629%208.24504%2022.1583%208.45859%2022.2576%208.77495C22.5777%209.79397%2022.75%2010.8776%2022.75%2012C22.75%2012.7408%2022.6749%2013.4649%2022.5318%2014.1648C22.4548%2014.5411%2022.1059%2014.7985%2021.7237%2014.7609C21.6504%2014.7537%2021.5758%2014.75%2021.5%2014.75C20.2574%2014.75%2019.25%2015.7574%2019.25%2017C19.25%2017.5531%2019.4486%2018.0579%2019.7793%2018.4498C20.027%2018.7434%2020.0128%2019.1767%2019.7465%2019.4535C18.4777%2020.7719%2016.8745%2021.7678%2015.0721%2022.3044C14.6807%2022.4209%2014.2681%2022.2029%2014.1437%2021.814C13.8535%2020.906%2013.0024%2020.25%2012%2020.25C10.9976%2020.25%2010.1465%2020.906%209.85629%2021.814C9.73195%2022.2029%209.31927%2022.4209%208.92789%2022.3044C7.12545%2021.7678%205.52229%2020.7719%204.25353%2019.4535C3.98716%2019.1767%203.97299%2018.7434%204.22072%2018.4498C4.55139%2018.0579%204.75%2017.5531%204.75%2017C4.75%2015.7574%203.74264%2014.75%202.5%2014.75C2.42423%2014.75%202.34963%2014.7537%202.27634%2014.7609C1.89406%2014.7985%201.54519%2014.5411%201.46821%2014.1648C1.32505%2013.4649%201.25%2012.7408%201.25%2012C1.25%2010.8776%201.42227%209.79398%201.74236%208.77494C1.84173%208.45859%202.13705%208.24504%202.4686%208.24977L2.5%208.25C3.74264%208.25%204.75%207.24263%204.75%206C4.75%205.6419%204.66689%205.30535%204.51962%205.00666C4.3731%204.70948%204.43894%204.35137%204.68159%204.12574C5.92411%202.9704%207.44153%202.10497%209.12596%201.63869ZM6.08277%204.88991C6.19152%205.24123%206.25%205.61424%206.25%206C6.25%207.88945%204.85261%209.45253%203.03493%209.71213C2.84898%2010.4432%202.75%2011.2096%202.75%2012C2.75%2012.4294%202.77921%2012.8516%202.83567%2013.2648C4.74948%2013.4346%206.25%2015.0421%206.25%2017C6.25%2017.6669%206.0754%2018.2941%205.76971%2018.8372C6.62645%2019.6184%207.63002%2020.2404%208.73362%2020.657C9.37706%2019.5189%2010.598%2018.75%2012%2018.75C13.402%2018.75%2014.6229%2019.5189%2015.2664%2020.657C16.37%2020.2404%2017.3735%2019.6184%2018.2303%2018.8372C17.9246%2018.2941%2017.75%2017.6669%2017.75%2017C17.75%2015.0421%2019.2505%2013.4346%2021.1643%2013.2648C21.2208%2012.8516%2021.25%2012.4294%2021.25%2012C21.25%2011.2096%2021.151%2010.4432%2020.9651%209.71213C19.1474%209.45252%2017.75%207.88945%2017.75%206C17.75%205.61424%2017.8085%205.24123%2017.9172%204.88991C17.0618%204.1771%2016.0762%203.61614%2015.0018%203.24775C14.3184%204.15897%2013.2287%204.75%2012%204.75C10.7713%204.75%209.68158%204.15897%208.99819%203.24775C7.92382%203.61614%206.93823%204.1771%206.08277%204.88991Z'%20fill='%233B5695'/%3e%3cpath%20d='M7.75%2012C7.75%209.65278%209.65279%207.75%2012%207.75C14.3472%207.75%2016.25%209.65278%2016.25%2012C16.25%2014.3472%2014.3472%2016.25%2012%2016.25C9.65279%2016.25%207.75%2014.3472%207.75%2012ZM12%209.25C10.4812%209.25%209.25%2010.4812%209.25%2012C9.25%2013.5188%2010.4812%2014.75%2012%2014.75C13.5188%2014.75%2014.75%2013.5188%2014.75%2012C14.75%2010.4812%2013.5188%209.25%2012%209.25Z'%20fill='%233B5695'/%3e%3c/svg%3e",It={class:"flex justify-between"},Lt=n.createElementVNode("div",{class:"flex flex-row"},[n.createElementVNode("img",{src:$t,alt:"Vue logo",class:"w-24"})],-1),Bt={class:"flex"},Rt={class:"tooltip tooltip-bottom tooltip-success before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%]","data-tip":"Reader"},Pt=[n.createElementVNode("img",{src:Vt,alt:"Reader",class:"w-7"},null,-1)],Mt={class:"tooltip tooltip-bottom tooltip-success before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%] md:hidden","data-tip":"Full screen"},Dt=[n.createElementVNode("img",{src:Tt,alt:"Full screen",class:"w-7"},null,-1)],Ft={class:"tooltip tooltip-bottom tooltip-success before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%]","data-tip":"Setting"},At=[n.createElementVNode("img",{src:Nt,alt:"Setting",class:"w-7"},null,-1)],jt={__name:"Header",emits:["settings","fullScreen","reader"],setup(e,{emit:l}){const t=l;return(o,s)=>(n.openBlock(),n.createElementBlock("div",It,[Lt,n.createElementVNode("div",Bt,[n.createElementVNode("div",Rt,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[0]||(s[0]=a=>t("reader"))},Pt)]),n.createElementVNode("div",Mt,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[1]||(s[1]=a=>t("fullScreen"))},Dt)]),n.createElementVNode("div",Ft,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[2]||(s[2]=a=>t("settings"))},At)])])]))}};function oe(e,l,t){let o=t.initialDeps??[],s;return()=>{var a,i,r,c;let u;t.key&&((a=t.debug)!=null&&a.call(t))&&(u=Date.now());const d=e();if(!(d.length!==o.length||d.some((C,_)=>o[_]!==C)))return s;o=d;let b;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(b=Date.now()),s=l(...d),t.key&&((r=t.debug)!=null&&r.call(t))){const C=Math.round((Date.now()-u)*100)/100,_=Math.round((Date.now()-b)*100)/100,h=_/16,E=(N,S)=>{for(N=String(N);N.length<S;)N=" "+N;return N};console.info(`%c⏱ ${E(_,5)} /${E(C,5)} ms`,`
2
2
  font-size: .6rem;
3
3
  font-weight: bold;
4
- color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(c=t==null?void 0:t.onChange)==null||c.call(t,s),s}}function Se(e,l){if(e===void 0)throw new Error("Unexpected undefined");return e}const Ht=(e,l)=>Math.abs(e-l)<1,zt=(e,l,t)=>{let o;return function(...s){e.clearTimeout(o),o=e.setTimeout(()=>l.apply(this,s),t)}},Ut=e=>e,Zt=e=>{const l=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let s=l;s<=t;s++)o.push(s);return o},Wt=(e,l)=>{const t=e.scrollElement;if(!t)return;const o=e.targetWindow;if(!o)return;const s=i=>{const{width:r,height:c}=i;l({width:Math.round(r),height:Math.round(c)})};if(s(t.getBoundingClientRect()),!o.ResizeObserver)return()=>{};const a=new o.ResizeObserver(i=>{const r=i[0];if(r!=null&&r.borderBoxSize){const c=r.borderBoxSize[0];if(c){s({width:c.inlineSize,height:c.blockSize});return}}s(t.getBoundingClientRect())});return a.observe(t,{box:"border-box"}),()=>{a.unobserve(t)}},Pe={passive:!0},Gt=typeof window>"u"?!0:"onscrollend"in window,qt=(e,l)=>{const t=e.scrollElement;if(!t)return;const o=e.targetWindow;if(!o)return;let s=0;const a=Gt?()=>{}:zt(o,()=>{l(s,!1)},e.options.isScrollingResetDelay),i=u=>()=>{s=t[e.options.horizontal?"scrollLeft":"scrollTop"],a(),l(s,u)},r=i(!0),c=i(!1);return c(),t.addEventListener("scroll",r,Pe),t.addEventListener("scrollend",c,Pe),()=>{t.removeEventListener("scroll",r),t.removeEventListener("scrollend",c)}},Jt=(e,l,t)=>{if(l!=null&&l.borderBoxSize){const o=l.borderBoxSize[0];if(o)return Math.round(o[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},Kt=(e,{adjustments:l=0,behavior:t},o)=>{var s,a;const i=e+l;(a=(s=o.scrollElement)==null?void 0:s.scrollTo)==null||a.call(s,{[o.options.horizontal?"left":"top"]:i,behavior:t})};class Yt{constructor(l){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 t=null;const o=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(a=>{this._measureElement(a.target,a)})}));return{disconnect:()=>{var s;return(s=o())==null?void 0:s.disconnect()},observe:s=>{var a;return(a=o())==null?void 0:a.observe(s,{box:"border-box"})},unobserve:s=>{var a;return(a=o())==null?void 0:a.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([o,s])=>{typeof s>"u"&&delete t[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Ut,rangeExtractor:Zt,onChange:()=>{},measureElement:Jt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,o)=>{var s,a;const{startIndex:i,endIndex:r}=this.range??{startIndex:void 0,endIndex:void 0},c=this.calculateRange();(t||i!==(c==null?void 0:c.startIndex)||r!==(c==null?void 0:c.endIndex))&&((a=(s=this.options).onChange)==null||a.call(s,this,o))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.notify(!1,!1);return}this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s;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=(t,o)=>{const s=new Map,a=new Map;for(let i=o-1;i>=0;i--){const r=t[i];if(s.has(r.lane))continue;const c=a.get(r.lane);if(c==null||r.end>c.end?a.set(r.lane,r):r.end<c.end&&s.set(r.lane,!0),s.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,r)=>i.end===r.end?i.index-r.index:i.end-r.end)[0]:void 0},this.getMeasurementOptions=oe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,o,s,a,i)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:o,scrollMargin:s,getItemKey:a,enabled:i}),{key:!1}),this.getMeasurements=oe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:o,scrollMargin:s,getItemKey:a,enabled:i},r)=>{var c;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(m=>{this.itemSizeCache.set(m.key,m.size)}));const u=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const d=this.measurementsCache.slice(0,u);for(let m=u;m<t;m++){let _=(c=this.measurementsCache[m])==null?void 0:c.measureElement;_||(_=I=>{const b=a(m),k=this.elementsCache.get(b);if(!I){k&&(this.observer.unobserve(k),this.elementsCache.delete(b));return}k!==I&&(k&&this.observer.unobserve(k),this.observer.observe(I),this.elementsCache.set(b,I)),I.isConnected&&this.resizeItem(m,this.options.measureElement(I,void 0,this))});const x=a(m),g=this.options.lanes===1?d[m-1]:this.getFurthestMeasurement(d,m),h=g?g.end+this.options.gap:o+s,E=r.get(x),N=typeof E=="number"?E:this.options.estimateSize(m),S=h+N,V=g?g.lane:m%this.options.lanes;d[m]={index:m,start:h,size:N,end:S,key:x,lane:V,measureElement:_}}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=oe(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,o,s)=>this.range=t.length>0&&o>0?Qt({measurements:t,outerSize:o,scrollOffset:s}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=oe(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,o,s,a)=>o===null?[]:t({startIndex:o.startIndex,endIndex:o.endIndex,overscan:s,count:a}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const o=this.options.indexAttribute,s=t.getAttribute(o);return s?parseInt(s,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(t,o)=>{const s=this.indexFromElement(t),a=this.getMeasurements()[s];if(!a||!t.isConnected){this.elementsCache.forEach((r,c)=>{r===t&&(this.observer.unobserve(t),this.elementsCache.delete(c))});return}const i=this.elementsCache.get(a.key);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(a.key,t)),this.resizeItem(s,this.options.measureElement(t,o,this))},this.resizeItem=(t,o)=>{const s=this.getMeasurements()[t];if(!s)return;const a=this.itemSizeCache.get(s.key)??s.size,i=o-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,i,this):s.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(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,o)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=oe(()=>[this.getIndexes(),this.getMeasurements()],(t,o)=>{const s=[];for(let a=0,i=t.length;a<i;a++){const r=t[a],c=o[r];s.push(c)}return s},{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const o=this.getMeasurements();if(o.length!==0)return Se(o[Me(0,o.length-1,s=>Se(o[s]).start,t)])},this.getOffsetForAlignment=(t,o)=>{const s=this.getSize(),a=this.getScrollOffset();o==="auto"&&(t<=a?o="start":t>=a+s?o="end":o="start"),o==="start"?t=t:o==="end"?t=t-s:o==="center"&&(t=t-s/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",c=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-s;return Math.max(Math.min(c,t),0)},this.getOffsetForIndex=(t,o="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getMeasurements()[t];if(!s)return;const a=this.getSize(),i=this.getScrollOffset();if(o==="auto")if(s.end>=i+a-this.options.scrollPaddingEnd)o="end";else if(s.start<=i+this.options.scrollPaddingStart)o="start";else return[i,o];const r=o==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,o),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:o="start",behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,o),{adjustments:void 0,behavior:s})},this.scrollToIndex=(t,{align:o="auto",behavior:s}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(t,o);if(!a)return;const[i,r]=a;this._scrollToOffset(i,{adjustments:void 0,behavior:s}),s!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[u]=Se(this.getOffsetForIndex(t,r));Ht(u,this.getScrollOffset())||this.scrollToIndex(t,{align:r,behavior:s})}else this.scrollToIndex(t,{align:r,behavior:s})}))},this.scrollBy=(t,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var t;const o=this.getMeasurements();let s;return o.length===0?s=this.options.paddingStart:s=this.options.lanes===1?((t=o[o.length-1])==null?void 0:t.end)??0:Math.max(...o.slice(-this.options.lanes).map(a=>a.end)),s-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:o,behavior:s})=>{this.options.scrollToFn(t,{behavior:s,adjustments:o},this)},this.measure=()=>{var t,o;this.itemSizeCache=new Map,(o=(t=this.options).onChange)==null||o.call(t,this,!1)},this.setOptions(l)}}const Me=(e,l,t,o)=>{for(;e<=l;){const s=(e+l)/2|0,a=t(s);if(a<o)e=s+1;else if(a>o)l=s-1;else return s}return e>0?e-1:0};function Qt({measurements:e,outerSize:l,scrollOffset:t}){const o=e.length-1,a=Me(0,o,r=>e[r].start,t);let i=a;for(;i<o&&e[i].end<t+l;)i++;return{startIndex:a,endIndex:i}}function Xt(e){const l=new Yt(n.unref(e)),t=n.shallowRef(l),o=l._didMount();return n.watch(()=>n.unref(e).getScrollElement(),s=>{s&&l._willUpdate()},{immediate:!0}),n.watch(()=>n.unref(e),s=>{l.setOptions({...s,onChange:(a,i)=>{var r;n.triggerRef(t),(r=s.onChange)==null||r.call(s,a,i)}}),l._willUpdate(),n.triggerRef(t)},{immediate:!0}),n.onScopeDispose(o),t}function en(e){return Xt(n.computed(()=>({observeElementRect:Wt,observeElementOffset:qt,scrollToFn:Kt,...n.unref(e)})))}function tn(e,l,t){let o=n.ref(t==null?void 0:t.value),s=n.computed(()=>e.value!==void 0);return[n.computed(()=>s.value?e.value:o.value),function(a){return s.value||(o.value=a),l==null?void 0:l(a)}]}function nn(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(l=>setTimeout(()=>{throw l}))}function ue(){let e=[],l={addEventListener(t,o,s,a){return t.addEventListener(o,s,a),l.add(()=>t.removeEventListener(o,s,a))},requestAnimationFrame(...t){let o=requestAnimationFrame(...t);l.add(()=>cancelAnimationFrame(o))},nextFrame(...t){l.requestAnimationFrame(()=>{l.requestAnimationFrame(...t)})},setTimeout(...t){let o=setTimeout(...t);l.add(()=>clearTimeout(o))},microTask(...t){let o={current:!0};return nn(()=>{o.current&&t[0]()}),l.add(()=>{o.current=!1})},style(t,o,s){let a=t.style.getPropertyValue(o);return Object.assign(t.style,{[o]:s}),this.add(()=>{Object.assign(t.style,{[o]:a})})},group(t){let o=ue();return t(o),this.add(()=>o.dispose())},add(t){return e.push(t),()=>{let o=e.indexOf(t);if(o>=0)for(let s of e.splice(o,1))s()}},dispose(){for(let t of e.splice(0))t()}};return l}function on(){let e=ue();return n.onUnmounted(()=>e.dispose()),e}function ln(){let e=on();return l=>{e.dispose(),e.nextFrame(l)}}let sn=Symbol("headlessui.useid"),rn=0;function le(){return n.inject(sn,()=>`${++rn}`)()}function $(e){var l;if(e==null||e.value==null)return null;let t=(l=e.value.$el)!=null?l:e.value;return t instanceof Node?t:null}function U(e,l,...t){if(e in l){let s=l[e];return typeof s=="function"?s(...t):s}let o=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(l).map(s=>`"${s}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,U),o}var an=Object.defineProperty,cn=(e,l,t)=>l in e?an(e,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[l]=t,De=(e,l,t)=>(cn(e,typeof l!="symbol"?l+"":l,t),t);let un=class{constructor(){De(this,"current",this.detect()),De(this,"currentId",0)}set(l){this.current!==l&&(this.currentId=0,this.current=l)}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"}},Oe=new un;function ke(e){if(Oe.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let l=$(e);if(l)return l.ownerDocument}return document}let Ae=["[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 dn=(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))(dn||{}),fn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(fn||{}),pn=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(pn||{}),Fe=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Fe||{});function mn(e,l=0){var t;return e===((t=ke(e))==null?void 0:t.body)?!1:U(l,{0(){return e.matches(Ae)},1(){let o=e;for(;o!==null;){if(o.matches(Ae))return!0;o=o.parentElement}return!1}})}var hn=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(hn||{});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 gn(e,l=t=>t){return e.slice().sort((t,o)=>{let s=l(t),a=l(o);if(s===null||a===null)return 0;let i=s.compareDocumentPosition(a);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function bn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function vn(){return/Android/gi.test(window.navigator.userAgent)}function je(){return bn()||vn()}function de(e,l,t){Oe.isServer||n.watchEffect(o=>{document.addEventListener(e,l,t),o(()=>document.removeEventListener(e,l,t))})}function _n(e,l,t){Oe.isServer||n.watchEffect(o=>{window.addEventListener(e,l,t),o(()=>window.removeEventListener(e,l,t))})}function Cn(e,l,t=n.computed(()=>!0)){function o(a,i){if(!t.value||a.defaultPrevented)return;let r=i(a);if(r===null||!r.getRootNode().contains(r))return;let c=function u(d){return typeof d=="function"?u(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let u of c){if(u===null)continue;let d=u instanceof HTMLElement?u:$(u);if(d!=null&&d.contains(r)||a.composed&&a.composedPath().includes(d))return}return!mn(r,Fe.Loose)&&r.tabIndex!==-1&&a.preventDefault(),l(a,r)}let s=n.ref(null);de("pointerdown",a=>{var i,r;t.value&&(s.value=((r=(i=a.composedPath)==null?void 0:i.call(a))==null?void 0:r[0])||a.target)},!0),de("mousedown",a=>{var i,r;t.value&&(s.value=((r=(i=a.composedPath)==null?void 0:i.call(a))==null?void 0:r[0])||a.target)},!0),de("click",a=>{je()||s.value&&(o(a,()=>s.value),s.value=null)},!0),de("touchend",a=>o(a,()=>a.target instanceof HTMLElement?a.target:null),!0),_n("blur",a=>o(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function He(e,l){if(e)return e;let t=l??"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function xn(e,l){let t=n.ref(He(e.value.type,e.value.as));return n.onMounted(()=>{t.value=He(e.value.type,e.value.as)}),n.watchEffect(()=>{var o;t.value||$(l)&&$(l)instanceof HTMLButtonElement&&!((o=$(l))!=null&&o.hasAttribute("type"))&&(t.value="button")}),t}function ze(e){return[e.screenX,e.screenY]}function yn(){let e=n.ref([-1,-1]);return{wasMoved(l){let t=ze(l);return e.value[0]===t[0]&&e.value[1]===t[1]?!1:(e.value=t,!0)},update(l){e.value=ze(l)}}}function wn({container:e,accept:l,walk:t,enabled:o}){n.watchEffect(()=>{let s=e.value;if(!s||o!==void 0&&!o.value)return;let a=ke(e);if(!a)return;let i=Object.assign(c=>l(c),{acceptNode:l}),r=a.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,i,!1);for(;r.nextNode();)t(r.currentNode)})}var se=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(se||{}),En=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(En||{});function q({visible:e=!0,features:l=0,ourProps:t,theirProps:o,...s}){var a;let i=Ze(o,t),r=Object.assign(s,{props:i});if(e||l&2&&i.static)return $e(r);if(l&1){let c=(a=i.unmount)==null||a?0:1;return U(c,{0(){return null},1(){return $e({...s,props:{...i,hidden:!0,style:{display:"none"}}})}})}return $e(r)}function $e({props:e,attrs:l,slots:t,slot:o,name:s}){var a,i;let{as:r,...c}=fe(e,["unmount","static"]),u=(a=t.default)==null?void 0:a.call(t,o),d={};if(o){let m=!1,_=[];for(let[x,g]of Object.entries(o))typeof g=="boolean"&&(m=!0),g===!0&&_.push(x);m&&(d["data-headlessui-state"]=_.join(" "))}if(r==="template"){if(u=Ue(u??[]),Object.keys(c).length>0||Object.keys(l).length>0){let[m,..._]=u??[];if(!On(m)||_.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${s} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(c).concat(Object.keys(l)).map(h=>h.trim()).filter((h,E,N)=>N.indexOf(h)===E).sort((h,E)=>h.localeCompare(E)).map(h=>` - ${h}`).join(`
4
+ color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(c=t==null?void 0:t.onChange)==null||c.call(t,s),s}}function Se(e,l){if(e===void 0)throw new Error("Unexpected undefined");return e}const Ht=(e,l)=>Math.abs(e-l)<1,zt=(e,l,t)=>{let o;return function(...s){e.clearTimeout(o),o=e.setTimeout(()=>l.apply(this,s),t)}},Ut=e=>e,Zt=e=>{const l=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let s=l;s<=t;s++)o.push(s);return o},Wt=(e,l)=>{const t=e.scrollElement;if(!t)return;const o=e.targetWindow;if(!o)return;const s=i=>{const{width:r,height:c}=i;l({width:Math.round(r),height:Math.round(c)})};if(s(t.getBoundingClientRect()),!o.ResizeObserver)return()=>{};const a=new o.ResizeObserver(i=>{const r=i[0];if(r!=null&&r.borderBoxSize){const c=r.borderBoxSize[0];if(c){s({width:c.inlineSize,height:c.blockSize});return}}s(t.getBoundingClientRect())});return a.observe(t,{box:"border-box"}),()=>{a.unobserve(t)}},Pe={passive:!0},Gt=typeof window>"u"?!0:"onscrollend"in window,qt=(e,l)=>{const t=e.scrollElement;if(!t)return;const o=e.targetWindow;if(!o)return;let s=0;const a=Gt?()=>{}:zt(o,()=>{l(s,!1)},e.options.isScrollingResetDelay),i=u=>()=>{s=t[e.options.horizontal?"scrollLeft":"scrollTop"],a(),l(s,u)},r=i(!0),c=i(!1);return c(),t.addEventListener("scroll",r,Pe),t.addEventListener("scrollend",c,Pe),()=>{t.removeEventListener("scroll",r),t.removeEventListener("scrollend",c)}},Jt=(e,l,t)=>{if(l!=null&&l.borderBoxSize){const o=l.borderBoxSize[0];if(o)return Math.round(o[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},Kt=(e,{adjustments:l=0,behavior:t},o)=>{var s,a;const i=e+l;(a=(s=o.scrollElement)==null?void 0:s.scrollTo)==null||a.call(s,{[o.options.horizontal?"left":"top"]:i,behavior:t})};class Yt{constructor(l){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 t=null;const o=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(a=>{this._measureElement(a.target,a)})}));return{disconnect:()=>{var s;return(s=o())==null?void 0:s.disconnect()},observe:s=>{var a;return(a=o())==null?void 0:a.observe(s,{box:"border-box"})},unobserve:s=>{var a;return(a=o())==null?void 0:a.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([o,s])=>{typeof s>"u"&&delete t[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Ut,rangeExtractor:Zt,onChange:()=>{},measureElement:Jt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,o)=>{var s,a;const{startIndex:i,endIndex:r}=this.range??{startIndex:void 0,endIndex:void 0},c=this.calculateRange();(t||i!==(c==null?void 0:c.startIndex)||r!==(c==null?void 0:c.endIndex))&&((a=(s=this.options).onChange)==null||a.call(s,this,o))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.notify(!1,!1);return}this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s;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=(t,o)=>{const s=new Map,a=new Map;for(let i=o-1;i>=0;i--){const r=t[i];if(s.has(r.lane))continue;const c=a.get(r.lane);if(c==null||r.end>c.end?a.set(r.lane,r):r.end<c.end&&s.set(r.lane,!0),s.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,r)=>i.end===r.end?i.index-r.index:i.end-r.end)[0]:void 0},this.getMeasurementOptions=oe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,o,s,a,i)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:o,scrollMargin:s,getItemKey:a,enabled:i}),{key:!1}),this.getMeasurements=oe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:o,scrollMargin:s,getItemKey:a,enabled:i},r)=>{var c;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(m=>{this.itemSizeCache.set(m.key,m.size)}));const u=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const d=this.measurementsCache.slice(0,u);for(let m=u;m<t;m++){let b=(c=this.measurementsCache[m])==null?void 0:c.measureElement;b||(b=I=>{const g=a(m),k=this.elementsCache.get(g);if(!I){k&&(this.observer.unobserve(k),this.elementsCache.delete(g));return}k!==I&&(k&&this.observer.unobserve(k),this.observer.observe(I),this.elementsCache.set(g,I)),I.isConnected&&this.resizeItem(m,this.options.measureElement(I,void 0,this))});const C=a(m),_=this.options.lanes===1?d[m-1]:this.getFurthestMeasurement(d,m),h=_?_.end+this.options.gap:o+s,E=r.get(C),N=typeof E=="number"?E:this.options.estimateSize(m),S=h+N,V=_?_.lane:m%this.options.lanes;d[m]={index:m,start:h,size:N,end:S,key:C,lane:V,measureElement:b}}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=oe(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,o,s)=>this.range=t.length>0&&o>0?Qt({measurements:t,outerSize:o,scrollOffset:s}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=oe(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,o,s,a)=>o===null?[]:t({startIndex:o.startIndex,endIndex:o.endIndex,overscan:s,count:a}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const o=this.options.indexAttribute,s=t.getAttribute(o);return s?parseInt(s,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(t,o)=>{const s=this.indexFromElement(t),a=this.getMeasurements()[s];if(!a||!t.isConnected){this.elementsCache.forEach((r,c)=>{r===t&&(this.observer.unobserve(t),this.elementsCache.delete(c))});return}const i=this.elementsCache.get(a.key);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(a.key,t)),this.resizeItem(s,this.options.measureElement(t,o,this))},this.resizeItem=(t,o)=>{const s=this.getMeasurements()[t];if(!s)return;const a=this.itemSizeCache.get(s.key)??s.size,i=o-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,i,this):s.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(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,o)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=oe(()=>[this.getIndexes(),this.getMeasurements()],(t,o)=>{const s=[];for(let a=0,i=t.length;a<i;a++){const r=t[a],c=o[r];s.push(c)}return s},{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const o=this.getMeasurements();if(o.length!==0)return Se(o[Me(0,o.length-1,s=>Se(o[s]).start,t)])},this.getOffsetForAlignment=(t,o)=>{const s=this.getSize(),a=this.getScrollOffset();o==="auto"&&(t<=a?o="start":t>=a+s?o="end":o="start"),o==="start"?t=t:o==="end"?t=t-s:o==="center"&&(t=t-s/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",c=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-s;return Math.max(Math.min(c,t),0)},this.getOffsetForIndex=(t,o="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getMeasurements()[t];if(!s)return;const a=this.getSize(),i=this.getScrollOffset();if(o==="auto")if(s.end>=i+a-this.options.scrollPaddingEnd)o="end";else if(s.start<=i+this.options.scrollPaddingStart)o="start";else return[i,o];const r=o==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,o),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:o="start",behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,o),{adjustments:void 0,behavior:s})},this.scrollToIndex=(t,{align:o="auto",behavior:s}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(t,o);if(!a)return;const[i,r]=a;this._scrollToOffset(i,{adjustments:void 0,behavior:s}),s!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[u]=Se(this.getOffsetForIndex(t,r));Ht(u,this.getScrollOffset())||this.scrollToIndex(t,{align:r,behavior:s})}else this.scrollToIndex(t,{align:r,behavior:s})}))},this.scrollBy=(t,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var t;const o=this.getMeasurements();let s;return o.length===0?s=this.options.paddingStart:s=this.options.lanes===1?((t=o[o.length-1])==null?void 0:t.end)??0:Math.max(...o.slice(-this.options.lanes).map(a=>a.end)),s-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:o,behavior:s})=>{this.options.scrollToFn(t,{behavior:s,adjustments:o},this)},this.measure=()=>{var t,o;this.itemSizeCache=new Map,(o=(t=this.options).onChange)==null||o.call(t,this,!1)},this.setOptions(l)}}const Me=(e,l,t,o)=>{for(;e<=l;){const s=(e+l)/2|0,a=t(s);if(a<o)e=s+1;else if(a>o)l=s-1;else return s}return e>0?e-1:0};function Qt({measurements:e,outerSize:l,scrollOffset:t}){const o=e.length-1,a=Me(0,o,r=>e[r].start,t);let i=a;for(;i<o&&e[i].end<t+l;)i++;return{startIndex:a,endIndex:i}}function Xt(e){const l=new Yt(n.unref(e)),t=n.shallowRef(l),o=l._didMount();return n.watch(()=>n.unref(e).getScrollElement(),s=>{s&&l._willUpdate()},{immediate:!0}),n.watch(()=>n.unref(e),s=>{l.setOptions({...s,onChange:(a,i)=>{var r;n.triggerRef(t),(r=s.onChange)==null||r.call(s,a,i)}}),l._willUpdate(),n.triggerRef(t)},{immediate:!0}),n.onScopeDispose(o),t}function en(e){return Xt(n.computed(()=>({observeElementRect:Wt,observeElementOffset:qt,scrollToFn:Kt,...n.unref(e)})))}function tn(e,l,t){let o=n.ref(t==null?void 0:t.value),s=n.computed(()=>e.value!==void 0);return[n.computed(()=>s.value?e.value:o.value),function(a){return s.value||(o.value=a),l==null?void 0:l(a)}]}function nn(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(l=>setTimeout(()=>{throw l}))}function ue(){let e=[],l={addEventListener(t,o,s,a){return t.addEventListener(o,s,a),l.add(()=>t.removeEventListener(o,s,a))},requestAnimationFrame(...t){let o=requestAnimationFrame(...t);l.add(()=>cancelAnimationFrame(o))},nextFrame(...t){l.requestAnimationFrame(()=>{l.requestAnimationFrame(...t)})},setTimeout(...t){let o=setTimeout(...t);l.add(()=>clearTimeout(o))},microTask(...t){let o={current:!0};return nn(()=>{o.current&&t[0]()}),l.add(()=>{o.current=!1})},style(t,o,s){let a=t.style.getPropertyValue(o);return Object.assign(t.style,{[o]:s}),this.add(()=>{Object.assign(t.style,{[o]:a})})},group(t){let o=ue();return t(o),this.add(()=>o.dispose())},add(t){return e.push(t),()=>{let o=e.indexOf(t);if(o>=0)for(let s of e.splice(o,1))s()}},dispose(){for(let t of e.splice(0))t()}};return l}function on(){let e=ue();return n.onUnmounted(()=>e.dispose()),e}function ln(){let e=on();return l=>{e.dispose(),e.nextFrame(l)}}let sn=Symbol("headlessui.useid"),rn=0;function le(){return n.inject(sn,()=>`${++rn}`)()}function $(e){var l;if(e==null||e.value==null)return null;let t=(l=e.value.$el)!=null?l:e.value;return t instanceof Node?t:null}function U(e,l,...t){if(e in l){let s=l[e];return typeof s=="function"?s(...t):s}let o=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(l).map(s=>`"${s}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,U),o}var an=Object.defineProperty,cn=(e,l,t)=>l in e?an(e,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[l]=t,De=(e,l,t)=>(cn(e,typeof l!="symbol"?l+"":l,t),t);let un=class{constructor(){De(this,"current",this.detect()),De(this,"currentId",0)}set(l){this.current!==l&&(this.currentId=0,this.current=l)}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"}},Oe=new un;function ke(e){if(Oe.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let l=$(e);if(l)return l.ownerDocument}return document}let Fe=["[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 dn=(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))(dn||{}),fn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(fn||{}),pn=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(pn||{}),Ae=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ae||{});function mn(e,l=0){var t;return e===((t=ke(e))==null?void 0:t.body)?!1:U(l,{0(){return e.matches(Fe)},1(){let o=e;for(;o!==null;){if(o.matches(Fe))return!0;o=o.parentElement}return!1}})}var hn=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(hn||{});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 gn(e,l=t=>t){return e.slice().sort((t,o)=>{let s=l(t),a=l(o);if(s===null||a===null)return 0;let i=s.compareDocumentPosition(a);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function bn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function vn(){return/Android/gi.test(window.navigator.userAgent)}function je(){return bn()||vn()}function de(e,l,t){Oe.isServer||n.watchEffect(o=>{document.addEventListener(e,l,t),o(()=>document.removeEventListener(e,l,t))})}function Cn(e,l,t){Oe.isServer||n.watchEffect(o=>{window.addEventListener(e,l,t),o(()=>window.removeEventListener(e,l,t))})}function _n(e,l,t=n.computed(()=>!0)){function o(a,i){if(!t.value||a.defaultPrevented)return;let r=i(a);if(r===null||!r.getRootNode().contains(r))return;let c=function u(d){return typeof d=="function"?u(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let u of c){if(u===null)continue;let d=u instanceof HTMLElement?u:$(u);if(d!=null&&d.contains(r)||a.composed&&a.composedPath().includes(d))return}return!mn(r,Ae.Loose)&&r.tabIndex!==-1&&a.preventDefault(),l(a,r)}let s=n.ref(null);de("pointerdown",a=>{var i,r;t.value&&(s.value=((r=(i=a.composedPath)==null?void 0:i.call(a))==null?void 0:r[0])||a.target)},!0),de("mousedown",a=>{var i,r;t.value&&(s.value=((r=(i=a.composedPath)==null?void 0:i.call(a))==null?void 0:r[0])||a.target)},!0),de("click",a=>{je()||s.value&&(o(a,()=>s.value),s.value=null)},!0),de("touchend",a=>o(a,()=>a.target instanceof HTMLElement?a.target:null),!0),Cn("blur",a=>o(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function He(e,l){if(e)return e;let t=l??"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function xn(e,l){let t=n.ref(He(e.value.type,e.value.as));return n.onMounted(()=>{t.value=He(e.value.type,e.value.as)}),n.watchEffect(()=>{var o;t.value||$(l)&&$(l)instanceof HTMLButtonElement&&!((o=$(l))!=null&&o.hasAttribute("type"))&&(t.value="button")}),t}function ze(e){return[e.screenX,e.screenY]}function yn(){let e=n.ref([-1,-1]);return{wasMoved(l){let t=ze(l);return e.value[0]===t[0]&&e.value[1]===t[1]?!1:(e.value=t,!0)},update(l){e.value=ze(l)}}}function wn({container:e,accept:l,walk:t,enabled:o}){n.watchEffect(()=>{let s=e.value;if(!s||o!==void 0&&!o.value)return;let a=ke(e);if(!a)return;let i=Object.assign(c=>l(c),{acceptNode:l}),r=a.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,i,!1);for(;r.nextNode();)t(r.currentNode)})}var se=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(se||{}),En=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(En||{});function q({visible:e=!0,features:l=0,ourProps:t,theirProps:o,...s}){var a;let i=Ze(o,t),r=Object.assign(s,{props:i});if(e||l&2&&i.static)return $e(r);if(l&1){let c=(a=i.unmount)==null||a?0:1;return U(c,{0(){return null},1(){return $e({...s,props:{...i,hidden:!0,style:{display:"none"}}})}})}return $e(r)}function $e({props:e,attrs:l,slots:t,slot:o,name:s}){var a,i;let{as:r,...c}=fe(e,["unmount","static"]),u=(a=t.default)==null?void 0:a.call(t,o),d={};if(o){let m=!1,b=[];for(let[C,_]of Object.entries(o))typeof _=="boolean"&&(m=!0),_===!0&&b.push(C);m&&(d["data-headlessui-state"]=b.join(" "))}if(r==="template"){if(u=Ue(u??[]),Object.keys(c).length>0||Object.keys(l).length>0){let[m,...b]=u??[];if(!On(m)||b.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${s} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(c).concat(Object.keys(l)).map(h=>h.trim()).filter((h,E,N)=>N.indexOf(h)===E).sort((h,E)=>h.localeCompare(E)).map(h=>` - ${h}`).join(`
5
5
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(h=>` - ${h}`).join(`
6
6
  `)].join(`
7
- `));let x=Ze((i=m.props)!=null?i:{},c,d),g=n.cloneVNode(m,x,!0);for(let h in x)h.startsWith("on")&&(g.props||(g.props={}),g.props[h]=x[h]);return g}return Array.isArray(u)&&u.length===1?u[0]:u}return n.h(r,Object.assign({},c,d),{default:()=>u})}function Ue(e){return e.flatMap(l=>l.type===n.Fragment?Ue(l.children):[l])}function Ze(...e){if(e.length===0)return{};if(e.length===1)return e[0];let l={},t={};for(let o of e)for(let s in o)s.startsWith("on")&&typeof o[s]=="function"?(t[s]!=null||(t[s]=[]),t[s].push(o[s])):l[s]=o[s];if(l.disabled||l["aria-disabled"])return Object.assign(l,Object.fromEntries(Object.keys(t).map(o=>[o,void 0])));for(let o in t)Object.assign(l,{[o](s,...a){let i=t[o];for(let r of i){if(s instanceof Event&&s.defaultPrevented)return;r(s,...a)}}});return l}function Sn(e){let l=Object.assign({},e);for(let t in l)l[t]===void 0&&delete l[t];return l}function fe(e,l=[]){let t=Object.assign({},e);for(let o of l)o in t&&delete t[o];return t}function On(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var We=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(We||{});let kn=n.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:l,attrs:t}){return()=>{var o;let{features:s,...a}=e,i={"aria-hidden":(s&2)===2?!0:(o=a["aria-hidden"])!=null?o:void 0,hidden:(s&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(s&4)===4&&(s&2)!==2&&{display:"none"}}};return q({ourProps:i,theirProps:a,slot:{},attrs:t,slots:l,name:"Hidden"})}}}),Ge=Symbol("Context");var re=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(re||{});function $n(){return n.inject(Ge,null)}function Vn(e){n.provide(Ge,e)}var D=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(D||{}),qe=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(qe||{});function Tn(e){function l(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",l))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",l),l())}let J=[];Tn(()=>{function e(l){l.target instanceof HTMLElement&&l.target!==document.body&&J[0]!==l.target&&(J.unshift(l.target),J=J.filter(t=>t!=null&&t.isConnected),J.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Nn(e){throw new Error("Unexpected object: "+e)}var P=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(P||{});function Je(e,l){let t=l.resolveItems();if(t.length<=0)return null;let o=l.resolveActiveIndex(),s=o??-1;switch(e.focus){case 0:{for(let a=0;a<t.length;++a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 1:{s===-1&&(s=t.length);for(let a=s-1;a>=0;--a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 2:{for(let a=s+1;a<t.length;++a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 3:{for(let a=t.length-1;a>=0;--a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 4:{for(let a=0;a<t.length;++a)if(l.resolveId(t[a],a,t)===e.id)return a;return o}case 5:return null;default:Nn(e)}}function Ke(e={},l=null,t=[]){for(let[o,s]of Object.entries(e))Qe(t,Ye(l,o),s);return t}function Ye(e,l){return e?e+"["+l+"]":l}function Qe(e,l,t){if(Array.isArray(t))for(let[o,s]of t.entries())Qe(e,Ye(l,o.toString()),s);else t instanceof Date?e.push([l,t.toISOString()]):typeof t=="boolean"?e.push([l,t?"1":"0"]):typeof t=="string"?e.push([l,t]):typeof t=="number"?e.push([l,`${t}`]):t==null?e.push([l,""]):Ke(t,l,e)}function In(e,l){return e===l}var Ln=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ln||{}),Bn=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Bn||{}),Rn=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Rn||{});let Xe=Symbol("ComboboxContext");function K(e){let l=n.inject(Xe,null);if(l===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,K),t}return l}let et=Symbol("VirtualContext"),Pn=n.defineComponent({name:"VirtualProvider",setup(e,{slots:l}){let t=K("VirtualProvider"),o=n.computed(()=>{let r=$(t.optionsRef);if(!r)return{start:0,end:0};let c=window.getComputedStyle(r);return{start:parseFloat(c.paddingBlockStart||c.paddingTop),end:parseFloat(c.paddingBlockEnd||c.paddingBottom)}}),s=en(n.computed(()=>({scrollPaddingStart:o.value.start,scrollPaddingEnd:o.value.end,count:t.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return $(t.optionsRef)},overscan:12}))),a=n.computed(()=>{var r;return(r=t.virtual.value)==null?void 0:r.options}),i=n.ref(0);return n.watch([a],()=>{i.value+=1}),n.provide(et,t.virtual.value?s:null),()=>[n.h("div",{style:{position:"relative",width:"100%",height:`${s.value.getTotalSize()}px`},ref:r=>{if(r){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||t.activationTrigger.value===0)return;t.activeOptionIndex.value!==null&&t.virtual.value.options.length>t.activeOptionIndex.value&&s.value.scrollToIndex(t.activeOptionIndex.value)}}},s.value.getVirtualItems().map(r=>n.cloneVNode(l.default({option:t.virtual.value.options[r.index],open:t.comboboxState.value===0})[0],{key:`${i.value}-${r.index}`,"data-index":r.index,"aria-setsize":t.virtual.value.options.length,"aria-posinset":r.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${r.start}px)`,overflowAnchor:"none"}})))]}}),Mn=n.defineComponent({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:l,attrs:t,emit:o}){let s=n.ref(1),a=n.ref(null),i=n.ref(null),r=n.ref(null),c=n.ref(null),u=n.ref({static:!1,hold:!1}),d=n.ref([]),m=n.ref(null),_=n.ref(2),x=n.ref(!1);function g(f=p=>p){let p=m.value!==null?d.value[m.value]:null,y=f(d.value.slice()),w=y.length>0&&y[0].dataRef.order.value!==null?y.sort((L,F)=>L.dataRef.order.value-F.dataRef.order.value):gn(y,L=>$(L.dataRef.domRef)),T=p?w.indexOf(p):null;return T===-1&&(T=null),{options:w,activeOptionIndex:T}}let h=n.computed(()=>e.multiple?1:0),E=n.computed(()=>e.nullable),[N,S]=tn(n.computed(()=>e.modelValue),f=>o("update:modelValue",f),n.computed(()=>e.defaultValue)),V=n.computed(()=>N.value===void 0?U(h.value,{1:[],0:void 0}):N.value),I=null,b=null;function k(f){return U(h.value,{0(){return S==null?void 0:S(f)},1:()=>{let p=n.toRaw(v.value.value).slice(),y=n.toRaw(f),w=p.findIndex(T=>v.compare(y,n.toRaw(T)));return w===-1?p.push(y):p.splice(w,1),S==null?void 0:S(p)}})}let C=n.computed(()=>{});n.watch([C],([f],[p])=>{if(v.virtual.value&&f&&p&&m.value!==null){let y=f.indexOf(p[m.value]);y!==-1?m.value=y:m.value=null}});let v={comboboxState:s,value:V,mode:h,compare(f,p){if(typeof e.by=="string"){let y=e.by;return(f==null?void 0:f[y])===(p==null?void 0:p[y])}return e.by===null?In(f,p):e.by(f,p)},calculateIndex(f){return v.virtual.value?e.by===null?v.virtual.value.options.indexOf(f):v.virtual.value.options.findIndex(p=>v.compare(p,f)):d.value.findIndex(p=>v.compare(p.dataRef.value,f))},defaultValue:n.computed(()=>e.defaultValue),nullable:E,immediate:n.computed(()=>!1),virtual:n.computed(()=>null),inputRef:i,labelRef:a,buttonRef:r,optionsRef:c,disabled:n.computed(()=>e.disabled),options:d,change(f){S(f)},activeOptionIndex:n.computed(()=>{if(x.value&&m.value===null&&(v.virtual.value?v.virtual.value.options.length>0:d.value.length>0)){if(v.virtual.value){let p=v.virtual.value.options.findIndex(y=>{var w;return!((w=v.virtual.value)!=null&&w.disabled(y))});if(p!==-1)return p}let f=d.value.findIndex(p=>!p.dataRef.disabled);if(f!==-1)return f}return m.value}),activationTrigger:_,optionsPropsRef:u,closeCombobox(){x.value=!1,!e.disabled&&s.value!==1&&(s.value=1,m.value=null)},openCombobox(){if(x.value=!0,!e.disabled&&s.value!==0){if(v.value.value){let f=v.calculateIndex(v.value.value);f!==-1&&(m.value=f)}s.value=0}},setActivationTrigger(f){_.value=f},goToOption(f,p,y){x.value=!1,I!==null&&cancelAnimationFrame(I),I=requestAnimationFrame(()=>{if(e.disabled||c.value&&!u.value.static&&s.value===1)return;if(v.virtual.value){m.value=f===P.Specific?p:Je({focus:f},{resolveItems:()=>v.virtual.value.options,resolveActiveIndex:()=>{var L,F;return(F=(L=v.activeOptionIndex.value)!=null?L:v.virtual.value.options.findIndex(j=>{var R;return!((R=v.virtual.value)!=null&&R.disabled(j))}))!=null?F:null},resolveDisabled:L=>v.virtual.value.disabled(L),resolveId(){throw new Error("Function not implemented.")}}),_.value=y??2;return}let w=g();if(w.activeOptionIndex===null){let L=w.options.findIndex(F=>!F.dataRef.disabled);L!==-1&&(w.activeOptionIndex=L)}let T=f===P.Specific?p:Je({focus:f},{resolveItems:()=>w.options,resolveActiveIndex:()=>w.activeOptionIndex,resolveId:L=>L.id,resolveDisabled:L=>L.dataRef.disabled});m.value=T,_.value=y??2,d.value=w.options})},selectOption(f){let p=d.value.find(w=>w.id===f);if(!p)return;let{dataRef:y}=p;k(y.value)},selectActiveOption(){if(v.activeOptionIndex.value!==null){if(v.virtual.value)k(v.virtual.value.options[v.activeOptionIndex.value]);else{let{dataRef:f}=d.value[v.activeOptionIndex.value];k(f.value)}v.goToOption(P.Specific,v.activeOptionIndex.value)}},registerOption(f,p){let y=n.reactive({id:f,dataRef:p});if(v.virtual.value){d.value.push(y);return}b&&cancelAnimationFrame(b);let w=g(T=>(T.push(y),T));m.value===null&&v.isSelected(p.value.value)&&(w.activeOptionIndex=w.options.indexOf(y)),d.value=w.options,m.value=w.activeOptionIndex,_.value=2,w.options.some(T=>!$(T.dataRef.domRef))&&(b=requestAnimationFrame(()=>{let T=g();d.value=T.options,m.value=T.activeOptionIndex}))},unregisterOption(f,p){if(I!==null&&cancelAnimationFrame(I),p&&(x.value=!0),v.virtual.value){d.value=d.value.filter(w=>w.id!==f);return}let y=g(w=>{let T=w.findIndex(L=>L.id===f);return T!==-1&&w.splice(T,1),w});d.value=y.options,m.value=y.activeOptionIndex,_.value=2},isSelected(f){return U(h.value,{0:()=>v.compare(n.toRaw(v.value.value),n.toRaw(f)),1:()=>n.toRaw(v.value.value).some(p=>v.compare(n.toRaw(p),n.toRaw(f)))})},isActive(f){return m.value===v.calculateIndex(f)}};Cn([i,r,c],()=>v.closeCombobox(),n.computed(()=>s.value===0)),n.provide(Xe,v),Vn(n.computed(()=>U(s.value,{0:re.Open,1:re.Closed})));let O=n.computed(()=>{var f;return(f=$(i))==null?void 0:f.closest("form")});return n.onMounted(()=>{n.watch([O],()=>{if(!O.value||e.defaultValue===void 0)return;function f(){v.change(e.defaultValue)}return O.value.addEventListener("reset",f),()=>{var p;(p=O.value)==null||p.removeEventListener("reset",f)}},{immediate:!0})}),()=>{var f,p,y;let{name:w,disabled:T,form:L,...F}=e,j={open:s.value===0,disabled:T,activeIndex:v.activeOptionIndex.value,activeOption:v.activeOptionIndex.value===null?null:v.virtual.value?v.virtual.value.options[(f=v.activeOptionIndex.value)!=null?f:0]:(y=(p=v.options.value[v.activeOptionIndex.value])==null?void 0:p.dataRef.value)!=null?y:null,value:V.value};return n.h(n.Fragment,[...w!=null&&V.value!=null?Ke({[w]:V.value}).map(([R,is])=>n.h(kn,Sn({features:We.Hidden,key:R,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:L,disabled:T,name:R,value:is}))):[],q({theirProps:{...t,...fe(F,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:j,slots:l,attrs:t,name:"Combobox"})])}}});n.defineComponent({name:"ComboboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(e,{attrs:l,slots:t}){var o;let s=(o=e.id)!=null?o:`headlessui-combobox-label-${le()}`,a=K("ComboboxLabel");function i(){var r;(r=$(a.inputRef))==null||r.focus({preventScroll:!0})}return()=>{let r={open:a.comboboxState.value===0,disabled:a.disabled.value},{...c}=e,u={id:s,ref:a.labelRef,onClick:i};return q({ourProps:u,theirProps:c,slot:r,attrs:l,slots:t,name:"ComboboxLabel"})}}});let Dn=n.defineComponent({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:l,slots:t,expose:o}){var s;let a=(s=e.id)!=null?s:`headlessui-combobox-button-${le()}`,i=K("ComboboxButton");o({el:i.buttonRef,$el:i.buttonRef});function r(d){i.disabled.value||(i.comboboxState.value===0?i.closeCombobox():(d.preventDefault(),i.openCombobox()),n.nextTick(()=>{var m;return(m=$(i.inputRef))==null?void 0:m.focus({preventScroll:!0})}))}function c(d){switch(d.key){case D.ArrowDown:d.preventDefault(),d.stopPropagation(),i.comboboxState.value===1&&i.openCombobox(),n.nextTick(()=>{var m;return(m=i.inputRef.value)==null?void 0:m.focus({preventScroll:!0})});return;case D.ArrowUp:d.preventDefault(),d.stopPropagation(),i.comboboxState.value===1&&(i.openCombobox(),n.nextTick(()=>{i.value.value||i.goToOption(P.Last)})),n.nextTick(()=>{var m;return(m=i.inputRef.value)==null?void 0:m.focus({preventScroll:!0})});return;case D.Escape:if(i.comboboxState.value!==0)return;d.preventDefault(),i.optionsRef.value&&!i.optionsPropsRef.value.static&&d.stopPropagation(),i.closeCombobox(),n.nextTick(()=>{var m;return(m=i.inputRef.value)==null?void 0:m.focus({preventScroll:!0})});return}}let u=xn(n.computed(()=>({as:e.as,type:l.type})),i.buttonRef);return()=>{var d,m;let _={open:i.comboboxState.value===0,disabled:i.disabled.value,value:i.value.value},{...x}=e,g={ref:i.buttonRef,id:a,type:u.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(d=$(i.optionsRef))==null?void 0:d.id,"aria-expanded":i.comboboxState.value===0,"aria-labelledby":i.labelRef.value?[(m=$(i.labelRef))==null?void 0:m.id,a].join(" "):void 0,disabled:i.disabled.value===!0?!0:void 0,onKeydown:c,onClick:r};return q({ourProps:g,theirProps:x,slot:_,attrs:l,slots:t,name:"ComboboxButton"})}}}),An=n.defineComponent({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:l,attrs:t,slots:o,expose:s}){var a;let i=(a=e.id)!=null?a:`headlessui-combobox-input-${le()}`,r=K("ComboboxInput"),c=n.computed(()=>ke($(r.inputRef))),u={value:!1};s({el:r.inputRef,$el:r.inputRef});function d(){r.change(null);let b=$(r.optionsRef);b&&(b.scrollTop=0),r.goToOption(P.Nothing)}let m=n.computed(()=>{var b;let k=r.value.value;return $(r.inputRef)?typeof e.displayValue<"u"&&k!==void 0?(b=e.displayValue(k))!=null?b:"":typeof k=="string"?k:"":""});n.onMounted(()=>{n.watch([m,r.comboboxState,c],([b,k],[C,v])=>{if(u.value)return;let O=$(r.inputRef);O&&((v===0&&k===1||b!==C)&&(O.value=b),requestAnimationFrame(()=>{var f;if(u.value||!O||((f=c.value)==null?void 0:f.activeElement)!==O)return;let{selectionStart:p,selectionEnd:y}=O;Math.abs((y??0)-(p??0))===0&&p===0&&O.setSelectionRange(O.value.length,O.value.length)}))},{immediate:!0}),n.watch([r.comboboxState],([b],[k])=>{if(b===0&&k===1){if(u.value)return;let C=$(r.inputRef);if(!C)return;let v=C.value,{selectionStart:O,selectionEnd:f,selectionDirection:p}=C;C.value="",C.value=v,p!==null?C.setSelectionRange(O,f,p):C.setSelectionRange(O,f)}})});let _=n.ref(!1);function x(){_.value=!0}function g(){ue().nextFrame(()=>{_.value=!1})}let h=ln();function E(b){switch(u.value=!0,h(()=>{u.value=!1}),b.key){case D.Enter:if(u.value=!1,r.comboboxState.value!==0||_.value)return;if(b.preventDefault(),b.stopPropagation(),r.activeOptionIndex.value===null){r.closeCombobox();return}r.selectActiveOption(),r.mode.value===0&&r.closeCombobox();break;case D.ArrowDown:return u.value=!1,b.preventDefault(),b.stopPropagation(),U(r.comboboxState.value,{0:()=>r.goToOption(P.Next),1:()=>r.openCombobox()});case D.ArrowUp:return u.value=!1,b.preventDefault(),b.stopPropagation(),U(r.comboboxState.value,{0:()=>r.goToOption(P.Previous),1:()=>{r.openCombobox(),n.nextTick(()=>{r.value.value||r.goToOption(P.Last)})}});case D.Home:if(b.shiftKey)break;return u.value=!1,b.preventDefault(),b.stopPropagation(),r.goToOption(P.First);case D.PageUp:return u.value=!1,b.preventDefault(),b.stopPropagation(),r.goToOption(P.First);case D.End:if(b.shiftKey)break;return u.value=!1,b.preventDefault(),b.stopPropagation(),r.goToOption(P.Last);case D.PageDown:return u.value=!1,b.preventDefault(),b.stopPropagation(),r.goToOption(P.Last);case D.Escape:if(u.value=!1,r.comboboxState.value!==0)return;b.preventDefault(),r.optionsRef.value&&!r.optionsPropsRef.value.static&&b.stopPropagation(),r.nullable.value&&r.mode.value===0&&r.value.value===null&&d(),r.closeCombobox();break;case D.Tab:if(u.value=!1,r.comboboxState.value!==0)return;r.mode.value===0&&r.activationTrigger.value!==1&&r.selectActiveOption(),r.closeCombobox();break}}function N(b){l("change",b),r.nullable.value&&r.mode.value===0&&b.target.value===""&&d(),r.openCombobox()}function S(b){var k,C,v;let O=(k=b.relatedTarget)!=null?k:J.find(f=>f!==b.currentTarget);if(u.value=!1,!((C=$(r.optionsRef))!=null&&C.contains(O))&&!((v=$(r.buttonRef))!=null&&v.contains(O))&&r.comboboxState.value===0)return b.preventDefault(),r.mode.value===0&&(r.nullable.value&&r.value.value===null?d():r.activationTrigger.value!==1&&r.selectActiveOption()),r.closeCombobox()}function V(b){var k,C,v;let O=(k=b.relatedTarget)!=null?k:J.find(f=>f!==b.currentTarget);(C=$(r.buttonRef))!=null&&C.contains(O)||(v=$(r.optionsRef))!=null&&v.contains(O)||r.disabled.value||r.immediate.value&&r.comboboxState.value!==0&&(r.openCombobox(),ue().nextFrame(()=>{r.setActivationTrigger(1)}))}let I=n.computed(()=>{var b,k,C,v;return(v=(C=(k=e.defaultValue)!=null?k:r.defaultValue.value!==void 0?(b=e.displayValue)==null?void 0:b.call(e,r.defaultValue.value):null)!=null?C:r.defaultValue.value)!=null?v:""});return()=>{var b,k,C,v,O,f,p;let y={open:r.comboboxState.value===0},{displayValue:w,onChange:T,...L}=e,F={"aria-controls":(b=r.optionsRef.value)==null?void 0:b.id,"aria-expanded":r.comboboxState.value===0,"aria-activedescendant":r.activeOptionIndex.value===null?void 0:r.virtual.value?(k=r.options.value.find(j=>!r.virtual.value.disabled(j.dataRef.value)&&r.compare(j.dataRef.value,r.virtual.value.options[r.activeOptionIndex.value])))==null?void 0:k.id:(C=r.options.value[r.activeOptionIndex.value])==null?void 0:C.id,"aria-labelledby":(f=(v=$(r.labelRef))==null?void 0:v.id)!=null?f:(O=$(r.buttonRef))==null?void 0:O.id,"aria-autocomplete":"list",id:i,onCompositionstart:x,onCompositionend:g,onKeydown:E,onInput:N,onFocus:V,onBlur:S,role:"combobox",type:(p=t.type)!=null?p:"text",tabIndex:0,ref:r.inputRef,defaultValue:I.value,disabled:r.disabled.value===!0?!0:void 0};return q({ourProps:F,theirProps:L,slot:y,attrs:t,slots:o,features:se.RenderStrategy|se.Static,name:"ComboboxInput"})}}}),Fn=n.defineComponent({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:l,slots:t,expose:o}){let s=K("ComboboxOptions"),a=`headlessui-combobox-options-${le()}`;o({el:s.optionsRef,$el:s.optionsRef}),n.watchEffect(()=>{s.optionsPropsRef.value.static=e.static}),n.watchEffect(()=>{s.optionsPropsRef.value.hold=e.hold});let i=$n(),r=n.computed(()=>i!==null?(i.value&re.Open)===re.Open:s.comboboxState.value===0);wn({container:n.computed(()=>$(s.optionsRef)),enabled:n.computed(()=>s.comboboxState.value===0),accept(u){return u.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:u.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(u){u.setAttribute("role","none")}});function c(u){u.preventDefault()}return()=>{var u,d,m;let _={open:s.comboboxState.value===0},x={"aria-labelledby":(m=(u=$(s.labelRef))==null?void 0:u.id)!=null?m:(d=$(s.buttonRef))==null?void 0:d.id,id:a,ref:s.optionsRef,role:"listbox","aria-multiselectable":s.mode.value===1?!0:void 0,onMousedown:c},g=fe(e,["hold"]);return q({ourProps:x,theirProps:g,slot:_,attrs:l,slots:s.virtual.value&&s.comboboxState.value===0?{...t,default:()=>[n.h(Pn,{},t.default)]}:t,features:se.RenderStrategy|se.Static,visible:r.value,name:"ComboboxOptions"})}}}),jn=n.defineComponent({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:l,attrs:t,expose:o}){let s=K("ComboboxOption"),a=`headlessui-combobox-option-${le()}`,i=n.ref(null),r=n.computed(()=>e.disabled);o({el:i,$el:i});let c=n.computed(()=>{var S;return s.virtual.value?s.activeOptionIndex.value===s.calculateIndex(e.value):s.activeOptionIndex.value===null?!1:((S=s.options.value[s.activeOptionIndex.value])==null?void 0:S.id)===a}),u=n.computed(()=>s.isSelected(e.value)),d=n.inject(et,null),m=n.computed(()=>({disabled:e.disabled,value:e.value,domRef:i,order:n.computed(()=>e.order)}));n.onMounted(()=>s.registerOption(a,m)),n.onUnmounted(()=>s.unregisterOption(a,c.value)),n.watchEffect(()=>{let S=$(i);S&&(d==null||d.value.measureElement(S))}),n.watchEffect(()=>{s.comboboxState.value===0&&c.value&&(s.virtual.value||s.activationTrigger.value!==0&&n.nextTick(()=>{var S,V;return(V=(S=$(i))==null?void 0:S.scrollIntoView)==null?void 0:V.call(S,{block:"nearest"})}))});function _(S){S.preventDefault(),S.button===qe.Left&&(r.value||(s.selectOption(a),je()||requestAnimationFrame(()=>{var V;return(V=$(s.inputRef))==null?void 0:V.focus({preventScroll:!0})}),s.mode.value===0&&s.closeCombobox()))}function x(){var S;if(e.disabled||(S=s.virtual.value)!=null&&S.disabled(e.value))return s.goToOption(P.Nothing);let V=s.calculateIndex(e.value);s.goToOption(P.Specific,V)}let g=yn();function h(S){g.update(S)}function E(S){var V;if(!g.wasMoved(S)||e.disabled||(V=s.virtual.value)!=null&&V.disabled(e.value)||c.value)return;let I=s.calculateIndex(e.value);s.goToOption(P.Specific,I,0)}function N(S){var V;g.wasMoved(S)&&(e.disabled||(V=s.virtual.value)!=null&&V.disabled(e.value)||c.value&&(s.optionsPropsRef.value.hold||s.goToOption(P.Nothing)))}return()=>{let{disabled:S}=e,V={active:c.value,selected:u.value,disabled:S},I={id:a,ref:i,role:"option",tabIndex:S===!0?void 0:-1,"aria-disabled":S===!0?!0:void 0,"aria-selected":u.value,disabled:void 0,onMousedown:_,onFocus:x,onPointerenter:h,onMouseenter:h,onPointermove:E,onMousemove:E,onPointerleave:N,onMouseleave:N},b=fe(e,["order","value"]);return q({ourProps:I,theirProps:b,slot:V,attrs:t,slots:l,name:"ComboboxOption"})}}});function Hn(e,l){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"})])}function zn(e,l){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z","clip-rule":"evenodd"})])}function Un(e,l){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z","clip-rule":"evenodd"})])}var tt=!1;function pe(e,l,t){return Array.isArray(e)?(e.length=Math.max(e.length,l),e.splice(l,1,t),t):(e[l]=t,t)}function Ve(e,l){if(Array.isArray(e)){e.splice(l,1);return}delete e[l]}function Zn(){return nt().__VUE_DEVTOOLS_GLOBAL_HOOK__}function nt(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Wn=typeof Proxy=="function",Gn="devtools-plugin:setup",qn="plugin:settings:set";let ee,Te;function Jn(){var e;return ee!==void 0||(typeof window<"u"&&window.performance?(ee=!0,Te=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(ee=!0,Te=globalThis.perf_hooks.performance):ee=!1),ee}function Kn(){return Jn()?Te.now():Date.now()}class Yn{constructor(l,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=l,this.hook=t;const o={};if(l.settings)for(const i in l.settings){const r=l.settings[i];o[i]=r.defaultValue}const s=`__vue-devtools-plugin-settings__${l.id}`;let a=Object.assign({},o);try{const i=localStorage.getItem(s),r=JSON.parse(i);Object.assign(a,r)}catch{}this.fallbacks={getSettings(){return a},setSettings(i){try{localStorage.setItem(s,JSON.stringify(i))}catch{}a=i},now(){return Kn()}},t&&t.on(qn,(i,r)=>{i===this.plugin.id&&this.fallbacks.setSettings(r)}),this.proxiedOn=new Proxy({},{get:(i,r)=>this.target?this.target.on[r]:(...c)=>{this.onQueue.push({method:r,args:c})}}),this.proxiedTarget=new Proxy({},{get:(i,r)=>this.target?this.target[r]:r==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(r)?(...c)=>(this.targetQueue.push({method:r,args:c,resolve:()=>{}}),this.fallbacks[r](...c)):(...c)=>new Promise(u=>{this.targetQueue.push({method:r,args:c,resolve:u})})})}async setRealTarget(l){this.target=l;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function ot(e,l){const t=e,o=nt(),s=Zn(),a=Wn&&t.enableEarlyProxy;if(s&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))s.emit(Gn,e,l);else{const i=a?new Yn(t,s):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:l,proxy:i}),i&&l(i.proxiedTarget)}}/*!
7
+ `));let C=Ze((i=m.props)!=null?i:{},c,d),_=n.cloneVNode(m,C,!0);for(let h in C)h.startsWith("on")&&(_.props||(_.props={}),_.props[h]=C[h]);return _}return Array.isArray(u)&&u.length===1?u[0]:u}return n.h(r,Object.assign({},c,d),{default:()=>u})}function Ue(e){return e.flatMap(l=>l.type===n.Fragment?Ue(l.children):[l])}function Ze(...e){if(e.length===0)return{};if(e.length===1)return e[0];let l={},t={};for(let o of e)for(let s in o)s.startsWith("on")&&typeof o[s]=="function"?(t[s]!=null||(t[s]=[]),t[s].push(o[s])):l[s]=o[s];if(l.disabled||l["aria-disabled"])return Object.assign(l,Object.fromEntries(Object.keys(t).map(o=>[o,void 0])));for(let o in t)Object.assign(l,{[o](s,...a){let i=t[o];for(let r of i){if(s instanceof Event&&s.defaultPrevented)return;r(s,...a)}}});return l}function Sn(e){let l=Object.assign({},e);for(let t in l)l[t]===void 0&&delete l[t];return l}function fe(e,l=[]){let t=Object.assign({},e);for(let o of l)o in t&&delete t[o];return t}function On(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var We=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(We||{});let kn=n.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:l,attrs:t}){return()=>{var o;let{features:s,...a}=e,i={"aria-hidden":(s&2)===2?!0:(o=a["aria-hidden"])!=null?o:void 0,hidden:(s&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(s&4)===4&&(s&2)!==2&&{display:"none"}}};return q({ourProps:i,theirProps:a,slot:{},attrs:t,slots:l,name:"Hidden"})}}}),Ge=Symbol("Context");var re=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(re||{});function $n(){return n.inject(Ge,null)}function Vn(e){n.provide(Ge,e)}var D=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(D||{}),qe=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(qe||{});function Tn(e){function l(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",l))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",l),l())}let J=[];Tn(()=>{function e(l){l.target instanceof HTMLElement&&l.target!==document.body&&J[0]!==l.target&&(J.unshift(l.target),J=J.filter(t=>t!=null&&t.isConnected),J.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Nn(e){throw new Error("Unexpected object: "+e)}var P=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(P||{});function Je(e,l){let t=l.resolveItems();if(t.length<=0)return null;let o=l.resolveActiveIndex(),s=o??-1;switch(e.focus){case 0:{for(let a=0;a<t.length;++a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 1:{s===-1&&(s=t.length);for(let a=s-1;a>=0;--a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 2:{for(let a=s+1;a<t.length;++a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 3:{for(let a=t.length-1;a>=0;--a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 4:{for(let a=0;a<t.length;++a)if(l.resolveId(t[a],a,t)===e.id)return a;return o}case 5:return null;default:Nn(e)}}function Ke(e={},l=null,t=[]){for(let[o,s]of Object.entries(e))Qe(t,Ye(l,o),s);return t}function Ye(e,l){return e?e+"["+l+"]":l}function Qe(e,l,t){if(Array.isArray(t))for(let[o,s]of t.entries())Qe(e,Ye(l,o.toString()),s);else t instanceof Date?e.push([l,t.toISOString()]):typeof t=="boolean"?e.push([l,t?"1":"0"]):typeof t=="string"?e.push([l,t]):typeof t=="number"?e.push([l,`${t}`]):t==null?e.push([l,""]):Ke(t,l,e)}function In(e,l){return e===l}var Ln=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ln||{}),Bn=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Bn||{}),Rn=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Rn||{});let Xe=Symbol("ComboboxContext");function K(e){let l=n.inject(Xe,null);if(l===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,K),t}return l}let et=Symbol("VirtualContext"),Pn=n.defineComponent({name:"VirtualProvider",setup(e,{slots:l}){let t=K("VirtualProvider"),o=n.computed(()=>{let r=$(t.optionsRef);if(!r)return{start:0,end:0};let c=window.getComputedStyle(r);return{start:parseFloat(c.paddingBlockStart||c.paddingTop),end:parseFloat(c.paddingBlockEnd||c.paddingBottom)}}),s=en(n.computed(()=>({scrollPaddingStart:o.value.start,scrollPaddingEnd:o.value.end,count:t.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return $(t.optionsRef)},overscan:12}))),a=n.computed(()=>{var r;return(r=t.virtual.value)==null?void 0:r.options}),i=n.ref(0);return n.watch([a],()=>{i.value+=1}),n.provide(et,t.virtual.value?s:null),()=>[n.h("div",{style:{position:"relative",width:"100%",height:`${s.value.getTotalSize()}px`},ref:r=>{if(r){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||t.activationTrigger.value===0)return;t.activeOptionIndex.value!==null&&t.virtual.value.options.length>t.activeOptionIndex.value&&s.value.scrollToIndex(t.activeOptionIndex.value)}}},s.value.getVirtualItems().map(r=>n.cloneVNode(l.default({option:t.virtual.value.options[r.index],open:t.comboboxState.value===0})[0],{key:`${i.value}-${r.index}`,"data-index":r.index,"aria-setsize":t.virtual.value.options.length,"aria-posinset":r.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${r.start}px)`,overflowAnchor:"none"}})))]}}),Mn=n.defineComponent({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:l,attrs:t,emit:o}){let s=n.ref(1),a=n.ref(null),i=n.ref(null),r=n.ref(null),c=n.ref(null),u=n.ref({static:!1,hold:!1}),d=n.ref([]),m=n.ref(null),b=n.ref(2),C=n.ref(!1);function _(f=p=>p){let p=m.value!==null?d.value[m.value]:null,y=f(d.value.slice()),w=y.length>0&&y[0].dataRef.order.value!==null?y.sort((L,A)=>L.dataRef.order.value-A.dataRef.order.value):gn(y,L=>$(L.dataRef.domRef)),T=p?w.indexOf(p):null;return T===-1&&(T=null),{options:w,activeOptionIndex:T}}let h=n.computed(()=>e.multiple?1:0),E=n.computed(()=>e.nullable),[N,S]=tn(n.computed(()=>e.modelValue),f=>o("update:modelValue",f),n.computed(()=>e.defaultValue)),V=n.computed(()=>N.value===void 0?U(h.value,{1:[],0:void 0}):N.value),I=null,g=null;function k(f){return U(h.value,{0(){return S==null?void 0:S(f)},1:()=>{let p=n.toRaw(v.value.value).slice(),y=n.toRaw(f),w=p.findIndex(T=>v.compare(y,n.toRaw(T)));return w===-1?p.push(y):p.splice(w,1),S==null?void 0:S(p)}})}let x=n.computed(()=>{});n.watch([x],([f],[p])=>{if(v.virtual.value&&f&&p&&m.value!==null){let y=f.indexOf(p[m.value]);y!==-1?m.value=y:m.value=null}});let v={comboboxState:s,value:V,mode:h,compare(f,p){if(typeof e.by=="string"){let y=e.by;return(f==null?void 0:f[y])===(p==null?void 0:p[y])}return e.by===null?In(f,p):e.by(f,p)},calculateIndex(f){return v.virtual.value?e.by===null?v.virtual.value.options.indexOf(f):v.virtual.value.options.findIndex(p=>v.compare(p,f)):d.value.findIndex(p=>v.compare(p.dataRef.value,f))},defaultValue:n.computed(()=>e.defaultValue),nullable:E,immediate:n.computed(()=>!1),virtual:n.computed(()=>null),inputRef:i,labelRef:a,buttonRef:r,optionsRef:c,disabled:n.computed(()=>e.disabled),options:d,change(f){S(f)},activeOptionIndex:n.computed(()=>{if(C.value&&m.value===null&&(v.virtual.value?v.virtual.value.options.length>0:d.value.length>0)){if(v.virtual.value){let p=v.virtual.value.options.findIndex(y=>{var w;return!((w=v.virtual.value)!=null&&w.disabled(y))});if(p!==-1)return p}let f=d.value.findIndex(p=>!p.dataRef.disabled);if(f!==-1)return f}return m.value}),activationTrigger:b,optionsPropsRef:u,closeCombobox(){C.value=!1,!e.disabled&&s.value!==1&&(s.value=1,m.value=null)},openCombobox(){if(C.value=!0,!e.disabled&&s.value!==0){if(v.value.value){let f=v.calculateIndex(v.value.value);f!==-1&&(m.value=f)}s.value=0}},setActivationTrigger(f){b.value=f},goToOption(f,p,y){C.value=!1,I!==null&&cancelAnimationFrame(I),I=requestAnimationFrame(()=>{if(e.disabled||c.value&&!u.value.static&&s.value===1)return;if(v.virtual.value){m.value=f===P.Specific?p:Je({focus:f},{resolveItems:()=>v.virtual.value.options,resolveActiveIndex:()=>{var L,A;return(A=(L=v.activeOptionIndex.value)!=null?L:v.virtual.value.options.findIndex(j=>{var R;return!((R=v.virtual.value)!=null&&R.disabled(j))}))!=null?A:null},resolveDisabled:L=>v.virtual.value.disabled(L),resolveId(){throw new Error("Function not implemented.")}}),b.value=y??2;return}let w=_();if(w.activeOptionIndex===null){let L=w.options.findIndex(A=>!A.dataRef.disabled);L!==-1&&(w.activeOptionIndex=L)}let T=f===P.Specific?p:Je({focus:f},{resolveItems:()=>w.options,resolveActiveIndex:()=>w.activeOptionIndex,resolveId:L=>L.id,resolveDisabled:L=>L.dataRef.disabled});m.value=T,b.value=y??2,d.value=w.options})},selectOption(f){let p=d.value.find(w=>w.id===f);if(!p)return;let{dataRef:y}=p;k(y.value)},selectActiveOption(){if(v.activeOptionIndex.value!==null){if(v.virtual.value)k(v.virtual.value.options[v.activeOptionIndex.value]);else{let{dataRef:f}=d.value[v.activeOptionIndex.value];k(f.value)}v.goToOption(P.Specific,v.activeOptionIndex.value)}},registerOption(f,p){let y=n.reactive({id:f,dataRef:p});if(v.virtual.value){d.value.push(y);return}g&&cancelAnimationFrame(g);let w=_(T=>(T.push(y),T));m.value===null&&v.isSelected(p.value.value)&&(w.activeOptionIndex=w.options.indexOf(y)),d.value=w.options,m.value=w.activeOptionIndex,b.value=2,w.options.some(T=>!$(T.dataRef.domRef))&&(g=requestAnimationFrame(()=>{let T=_();d.value=T.options,m.value=T.activeOptionIndex}))},unregisterOption(f,p){if(I!==null&&cancelAnimationFrame(I),p&&(C.value=!0),v.virtual.value){d.value=d.value.filter(w=>w.id!==f);return}let y=_(w=>{let T=w.findIndex(L=>L.id===f);return T!==-1&&w.splice(T,1),w});d.value=y.options,m.value=y.activeOptionIndex,b.value=2},isSelected(f){return U(h.value,{0:()=>v.compare(n.toRaw(v.value.value),n.toRaw(f)),1:()=>n.toRaw(v.value.value).some(p=>v.compare(n.toRaw(p),n.toRaw(f)))})},isActive(f){return m.value===v.calculateIndex(f)}};_n([i,r,c],()=>v.closeCombobox(),n.computed(()=>s.value===0)),n.provide(Xe,v),Vn(n.computed(()=>U(s.value,{0:re.Open,1:re.Closed})));let O=n.computed(()=>{var f;return(f=$(i))==null?void 0:f.closest("form")});return n.onMounted(()=>{n.watch([O],()=>{if(!O.value||e.defaultValue===void 0)return;function f(){v.change(e.defaultValue)}return O.value.addEventListener("reset",f),()=>{var p;(p=O.value)==null||p.removeEventListener("reset",f)}},{immediate:!0})}),()=>{var f,p,y;let{name:w,disabled:T,form:L,...A}=e,j={open:s.value===0,disabled:T,activeIndex:v.activeOptionIndex.value,activeOption:v.activeOptionIndex.value===null?null:v.virtual.value?v.virtual.value.options[(f=v.activeOptionIndex.value)!=null?f:0]:(y=(p=v.options.value[v.activeOptionIndex.value])==null?void 0:p.dataRef.value)!=null?y:null,value:V.value};return n.h(n.Fragment,[...w!=null&&V.value!=null?Ke({[w]:V.value}).map(([R,is])=>n.h(kn,Sn({features:We.Hidden,key:R,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:L,disabled:T,name:R,value:is}))):[],q({theirProps:{...t,...fe(A,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:j,slots:l,attrs:t,name:"Combobox"})])}}});n.defineComponent({name:"ComboboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(e,{attrs:l,slots:t}){var o;let s=(o=e.id)!=null?o:`headlessui-combobox-label-${le()}`,a=K("ComboboxLabel");function i(){var r;(r=$(a.inputRef))==null||r.focus({preventScroll:!0})}return()=>{let r={open:a.comboboxState.value===0,disabled:a.disabled.value},{...c}=e,u={id:s,ref:a.labelRef,onClick:i};return q({ourProps:u,theirProps:c,slot:r,attrs:l,slots:t,name:"ComboboxLabel"})}}});let Dn=n.defineComponent({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:l,slots:t,expose:o}){var s;let a=(s=e.id)!=null?s:`headlessui-combobox-button-${le()}`,i=K("ComboboxButton");o({el:i.buttonRef,$el:i.buttonRef});function r(d){i.disabled.value||(i.comboboxState.value===0?i.closeCombobox():(d.preventDefault(),i.openCombobox()),n.nextTick(()=>{var m;return(m=$(i.inputRef))==null?void 0:m.focus({preventScroll:!0})}))}function c(d){switch(d.key){case D.ArrowDown:d.preventDefault(),d.stopPropagation(),i.comboboxState.value===1&&i.openCombobox(),n.nextTick(()=>{var m;return(m=i.inputRef.value)==null?void 0:m.focus({preventScroll:!0})});return;case D.ArrowUp:d.preventDefault(),d.stopPropagation(),i.comboboxState.value===1&&(i.openCombobox(),n.nextTick(()=>{i.value.value||i.goToOption(P.Last)})),n.nextTick(()=>{var m;return(m=i.inputRef.value)==null?void 0:m.focus({preventScroll:!0})});return;case D.Escape:if(i.comboboxState.value!==0)return;d.preventDefault(),i.optionsRef.value&&!i.optionsPropsRef.value.static&&d.stopPropagation(),i.closeCombobox(),n.nextTick(()=>{var m;return(m=i.inputRef.value)==null?void 0:m.focus({preventScroll:!0})});return}}let u=xn(n.computed(()=>({as:e.as,type:l.type})),i.buttonRef);return()=>{var d,m;let b={open:i.comboboxState.value===0,disabled:i.disabled.value,value:i.value.value},{...C}=e,_={ref:i.buttonRef,id:a,type:u.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(d=$(i.optionsRef))==null?void 0:d.id,"aria-expanded":i.comboboxState.value===0,"aria-labelledby":i.labelRef.value?[(m=$(i.labelRef))==null?void 0:m.id,a].join(" "):void 0,disabled:i.disabled.value===!0?!0:void 0,onKeydown:c,onClick:r};return q({ourProps:_,theirProps:C,slot:b,attrs:l,slots:t,name:"ComboboxButton"})}}}),Fn=n.defineComponent({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:l,attrs:t,slots:o,expose:s}){var a;let i=(a=e.id)!=null?a:`headlessui-combobox-input-${le()}`,r=K("ComboboxInput"),c=n.computed(()=>ke($(r.inputRef))),u={value:!1};s({el:r.inputRef,$el:r.inputRef});function d(){r.change(null);let g=$(r.optionsRef);g&&(g.scrollTop=0),r.goToOption(P.Nothing)}let m=n.computed(()=>{var g;let k=r.value.value;return $(r.inputRef)?typeof e.displayValue<"u"&&k!==void 0?(g=e.displayValue(k))!=null?g:"":typeof k=="string"?k:"":""});n.onMounted(()=>{n.watch([m,r.comboboxState,c],([g,k],[x,v])=>{if(u.value)return;let O=$(r.inputRef);O&&((v===0&&k===1||g!==x)&&(O.value=g),requestAnimationFrame(()=>{var f;if(u.value||!O||((f=c.value)==null?void 0:f.activeElement)!==O)return;let{selectionStart:p,selectionEnd:y}=O;Math.abs((y??0)-(p??0))===0&&p===0&&O.setSelectionRange(O.value.length,O.value.length)}))},{immediate:!0}),n.watch([r.comboboxState],([g],[k])=>{if(g===0&&k===1){if(u.value)return;let x=$(r.inputRef);if(!x)return;let v=x.value,{selectionStart:O,selectionEnd:f,selectionDirection:p}=x;x.value="",x.value=v,p!==null?x.setSelectionRange(O,f,p):x.setSelectionRange(O,f)}})});let b=n.ref(!1);function C(){b.value=!0}function _(){ue().nextFrame(()=>{b.value=!1})}let h=ln();function E(g){switch(u.value=!0,h(()=>{u.value=!1}),g.key){case D.Enter:if(u.value=!1,r.comboboxState.value!==0||b.value)return;if(g.preventDefault(),g.stopPropagation(),r.activeOptionIndex.value===null){r.closeCombobox();return}r.selectActiveOption(),r.mode.value===0&&r.closeCombobox();break;case D.ArrowDown:return u.value=!1,g.preventDefault(),g.stopPropagation(),U(r.comboboxState.value,{0:()=>r.goToOption(P.Next),1:()=>r.openCombobox()});case D.ArrowUp:return u.value=!1,g.preventDefault(),g.stopPropagation(),U(r.comboboxState.value,{0:()=>r.goToOption(P.Previous),1:()=>{r.openCombobox(),n.nextTick(()=>{r.value.value||r.goToOption(P.Last)})}});case D.Home:if(g.shiftKey)break;return u.value=!1,g.preventDefault(),g.stopPropagation(),r.goToOption(P.First);case D.PageUp:return u.value=!1,g.preventDefault(),g.stopPropagation(),r.goToOption(P.First);case D.End:if(g.shiftKey)break;return u.value=!1,g.preventDefault(),g.stopPropagation(),r.goToOption(P.Last);case D.PageDown:return u.value=!1,g.preventDefault(),g.stopPropagation(),r.goToOption(P.Last);case D.Escape:if(u.value=!1,r.comboboxState.value!==0)return;g.preventDefault(),r.optionsRef.value&&!r.optionsPropsRef.value.static&&g.stopPropagation(),r.nullable.value&&r.mode.value===0&&r.value.value===null&&d(),r.closeCombobox();break;case D.Tab:if(u.value=!1,r.comboboxState.value!==0)return;r.mode.value===0&&r.activationTrigger.value!==1&&r.selectActiveOption(),r.closeCombobox();break}}function N(g){l("change",g),r.nullable.value&&r.mode.value===0&&g.target.value===""&&d(),r.openCombobox()}function S(g){var k,x,v;let O=(k=g.relatedTarget)!=null?k:J.find(f=>f!==g.currentTarget);if(u.value=!1,!((x=$(r.optionsRef))!=null&&x.contains(O))&&!((v=$(r.buttonRef))!=null&&v.contains(O))&&r.comboboxState.value===0)return g.preventDefault(),r.mode.value===0&&(r.nullable.value&&r.value.value===null?d():r.activationTrigger.value!==1&&r.selectActiveOption()),r.closeCombobox()}function V(g){var k,x,v;let O=(k=g.relatedTarget)!=null?k:J.find(f=>f!==g.currentTarget);(x=$(r.buttonRef))!=null&&x.contains(O)||(v=$(r.optionsRef))!=null&&v.contains(O)||r.disabled.value||r.immediate.value&&r.comboboxState.value!==0&&(r.openCombobox(),ue().nextFrame(()=>{r.setActivationTrigger(1)}))}let I=n.computed(()=>{var g,k,x,v;return(v=(x=(k=e.defaultValue)!=null?k:r.defaultValue.value!==void 0?(g=e.displayValue)==null?void 0:g.call(e,r.defaultValue.value):null)!=null?x:r.defaultValue.value)!=null?v:""});return()=>{var g,k,x,v,O,f,p;let y={open:r.comboboxState.value===0},{displayValue:w,onChange:T,...L}=e,A={"aria-controls":(g=r.optionsRef.value)==null?void 0:g.id,"aria-expanded":r.comboboxState.value===0,"aria-activedescendant":r.activeOptionIndex.value===null?void 0:r.virtual.value?(k=r.options.value.find(j=>!r.virtual.value.disabled(j.dataRef.value)&&r.compare(j.dataRef.value,r.virtual.value.options[r.activeOptionIndex.value])))==null?void 0:k.id:(x=r.options.value[r.activeOptionIndex.value])==null?void 0:x.id,"aria-labelledby":(f=(v=$(r.labelRef))==null?void 0:v.id)!=null?f:(O=$(r.buttonRef))==null?void 0:O.id,"aria-autocomplete":"list",id:i,onCompositionstart:C,onCompositionend:_,onKeydown:E,onInput:N,onFocus:V,onBlur:S,role:"combobox",type:(p=t.type)!=null?p:"text",tabIndex:0,ref:r.inputRef,defaultValue:I.value,disabled:r.disabled.value===!0?!0:void 0};return q({ourProps:A,theirProps:L,slot:y,attrs:t,slots:o,features:se.RenderStrategy|se.Static,name:"ComboboxInput"})}}}),An=n.defineComponent({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:l,slots:t,expose:o}){let s=K("ComboboxOptions"),a=`headlessui-combobox-options-${le()}`;o({el:s.optionsRef,$el:s.optionsRef}),n.watchEffect(()=>{s.optionsPropsRef.value.static=e.static}),n.watchEffect(()=>{s.optionsPropsRef.value.hold=e.hold});let i=$n(),r=n.computed(()=>i!==null?(i.value&re.Open)===re.Open:s.comboboxState.value===0);wn({container:n.computed(()=>$(s.optionsRef)),enabled:n.computed(()=>s.comboboxState.value===0),accept(u){return u.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:u.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(u){u.setAttribute("role","none")}});function c(u){u.preventDefault()}return()=>{var u,d,m;let b={open:s.comboboxState.value===0},C={"aria-labelledby":(m=(u=$(s.labelRef))==null?void 0:u.id)!=null?m:(d=$(s.buttonRef))==null?void 0:d.id,id:a,ref:s.optionsRef,role:"listbox","aria-multiselectable":s.mode.value===1?!0:void 0,onMousedown:c},_=fe(e,["hold"]);return q({ourProps:C,theirProps:_,slot:b,attrs:l,slots:s.virtual.value&&s.comboboxState.value===0?{...t,default:()=>[n.h(Pn,{},t.default)]}:t,features:se.RenderStrategy|se.Static,visible:r.value,name:"ComboboxOptions"})}}}),jn=n.defineComponent({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:l,attrs:t,expose:o}){let s=K("ComboboxOption"),a=`headlessui-combobox-option-${le()}`,i=n.ref(null),r=n.computed(()=>e.disabled);o({el:i,$el:i});let c=n.computed(()=>{var S;return s.virtual.value?s.activeOptionIndex.value===s.calculateIndex(e.value):s.activeOptionIndex.value===null?!1:((S=s.options.value[s.activeOptionIndex.value])==null?void 0:S.id)===a}),u=n.computed(()=>s.isSelected(e.value)),d=n.inject(et,null),m=n.computed(()=>({disabled:e.disabled,value:e.value,domRef:i,order:n.computed(()=>e.order)}));n.onMounted(()=>s.registerOption(a,m)),n.onUnmounted(()=>s.unregisterOption(a,c.value)),n.watchEffect(()=>{let S=$(i);S&&(d==null||d.value.measureElement(S))}),n.watchEffect(()=>{s.comboboxState.value===0&&c.value&&(s.virtual.value||s.activationTrigger.value!==0&&n.nextTick(()=>{var S,V;return(V=(S=$(i))==null?void 0:S.scrollIntoView)==null?void 0:V.call(S,{block:"nearest"})}))});function b(S){S.preventDefault(),S.button===qe.Left&&(r.value||(s.selectOption(a),je()||requestAnimationFrame(()=>{var V;return(V=$(s.inputRef))==null?void 0:V.focus({preventScroll:!0})}),s.mode.value===0&&s.closeCombobox()))}function C(){var S;if(e.disabled||(S=s.virtual.value)!=null&&S.disabled(e.value))return s.goToOption(P.Nothing);let V=s.calculateIndex(e.value);s.goToOption(P.Specific,V)}let _=yn();function h(S){_.update(S)}function E(S){var V;if(!_.wasMoved(S)||e.disabled||(V=s.virtual.value)!=null&&V.disabled(e.value)||c.value)return;let I=s.calculateIndex(e.value);s.goToOption(P.Specific,I,0)}function N(S){var V;_.wasMoved(S)&&(e.disabled||(V=s.virtual.value)!=null&&V.disabled(e.value)||c.value&&(s.optionsPropsRef.value.hold||s.goToOption(P.Nothing)))}return()=>{let{disabled:S}=e,V={active:c.value,selected:u.value,disabled:S},I={id:a,ref:i,role:"option",tabIndex:S===!0?void 0:-1,"aria-disabled":S===!0?!0:void 0,"aria-selected":u.value,disabled:void 0,onMousedown:b,onFocus:C,onPointerenter:h,onMouseenter:h,onPointermove:E,onMousemove:E,onPointerleave:N,onMouseleave:N},g=fe(e,["order","value"]);return q({ourProps:I,theirProps:g,slot:V,attrs:t,slots:l,name:"ComboboxOption"})}}});function Hn(e,l){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"})])}function zn(e,l){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z","clip-rule":"evenodd"})])}function Un(e,l){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z","clip-rule":"evenodd"})])}var tt=!1;function pe(e,l,t){return Array.isArray(e)?(e.length=Math.max(e.length,l),e.splice(l,1,t),t):(e[l]=t,t)}function Ve(e,l){if(Array.isArray(e)){e.splice(l,1);return}delete e[l]}function Zn(){return nt().__VUE_DEVTOOLS_GLOBAL_HOOK__}function nt(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Wn=typeof Proxy=="function",Gn="devtools-plugin:setup",qn="plugin:settings:set";let ee,Te;function Jn(){var e;return ee!==void 0||(typeof window<"u"&&window.performance?(ee=!0,Te=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(ee=!0,Te=globalThis.perf_hooks.performance):ee=!1),ee}function Kn(){return Jn()?Te.now():Date.now()}class Yn{constructor(l,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=l,this.hook=t;const o={};if(l.settings)for(const i in l.settings){const r=l.settings[i];o[i]=r.defaultValue}const s=`__vue-devtools-plugin-settings__${l.id}`;let a=Object.assign({},o);try{const i=localStorage.getItem(s),r=JSON.parse(i);Object.assign(a,r)}catch{}this.fallbacks={getSettings(){return a},setSettings(i){try{localStorage.setItem(s,JSON.stringify(i))}catch{}a=i},now(){return Kn()}},t&&t.on(qn,(i,r)=>{i===this.plugin.id&&this.fallbacks.setSettings(r)}),this.proxiedOn=new Proxy({},{get:(i,r)=>this.target?this.target.on[r]:(...c)=>{this.onQueue.push({method:r,args:c})}}),this.proxiedTarget=new Proxy({},{get:(i,r)=>this.target?this.target[r]:r==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(r)?(...c)=>(this.targetQueue.push({method:r,args:c,resolve:()=>{}}),this.fallbacks[r](...c)):(...c)=>new Promise(u=>{this.targetQueue.push({method:r,args:c,resolve:u})})})}async setRealTarget(l){this.target=l;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function ot(e,l){const t=e,o=nt(),s=Zn(),a=Wn&&t.enableEarlyProxy;if(s&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))s.emit(Gn,e,l);else{const i=a?new Yn(t,s):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:l,proxy:i}),i&&l(i.proxiedTarget)}}/*!
8
8
  * pinia v2.1.7
9
9
  * (c) 2023 Eduardo San Martin Morote
10
10
  * @license MIT
11
11
  */let ae;const ie=e=>ae=e,lt=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function Y(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var z;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(z||(z={}));const me=typeof window<"u",ce=(process.env.NODE_ENV!=="production"||!1)&&process.env.NODE_ENV!=="test"&&me,st=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};function Qn(e,{autoBom:l=!1}={}){return l&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function Ne(e,l,t){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){it(o.response,l,t)},o.onerror=function(){console.error("could not download file")},o.send()}function rt(e){const l=new XMLHttpRequest;l.open("HEAD",e,!1);try{l.send()}catch{}return l.status>=200&&l.status<=299}function he(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}const ge=typeof navigator=="object"?navigator:{userAgent:""},at=/Macintosh/.test(ge.userAgent)&&/AppleWebKit/.test(ge.userAgent)&&!/Safari/.test(ge.userAgent),it=me?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!at?Xn:"msSaveOrOpenBlob"in ge?eo:to:()=>{};function Xn(e,l="download",t){const o=document.createElement("a");o.download=l,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin!==location.origin?rt(o.href)?Ne(e,l,t):(o.target="_blank",he(o)):he(o)):(o.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){he(o)},0))}function eo(e,l="download",t){if(typeof e=="string")if(rt(e))Ne(e,l,t);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){he(o)})}else navigator.msSaveOrOpenBlob(Qn(e,t),l)}function to(e,l,t,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return Ne(e,l,t);const s=e.type==="application/octet-stream",a=/constructor/i.test(String(st.HTMLElement))||"safari"in st,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||s&&a||at)&&typeof FileReader<"u"){const r=new FileReader;r.onloadend=function(){let c=r.result;if(typeof c!="string")throw o=null,new Error("Wrong reader.result type");c=i?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=c:location.assign(c),o=null},r.readAsDataURL(e)}else{const r=URL.createObjectURL(e);o?o.location.assign(r):location.href=r,o=null,setTimeout(function(){URL.revokeObjectURL(r)},4e4)}}function B(e,l){const t="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(t,l):l==="error"?console.error(t):l==="warn"?console.warn(t):console.log(t)}function Ie(e){return"_a"in e&&"install"in e}function ct(){if(!("clipboard"in navigator))return B("Your browser doesn't support the Clipboard API","error"),!0}function ut(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(B('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function no(e){if(!ct())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),B("Global state copied to clipboard.")}catch(l){if(ut(l))return;B("Failed to serialize the state. Check the console for more details.","error"),console.error(l)}}async function oo(e){if(!ct())try{dt(e,JSON.parse(await navigator.clipboard.readText())),B("Global state pasted from clipboard.")}catch(l){if(ut(l))return;B("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(l)}}async function lo(e){try{it(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(l){B("Failed to export the state as JSON. Check the console for more details.","error"),console.error(l)}}let Z;function so(){Z||(Z=document.createElement("input"),Z.type="file",Z.accept=".json");function e(){return new Promise((l,t)=>{Z.onchange=async()=>{const o=Z.files;if(!o)return l(null);const s=o.item(0);return l(s?{text:await s.text(),file:s}:null)},Z.oncancel=()=>l(null),Z.onerror=t,Z.click()})}return e}async function ro(e){try{const t=await so()();if(!t)return;const{text:o,file:s}=t;dt(e,JSON.parse(o)),B(`Global state imported from "${s.name}".`)}catch(l){B("Failed to import the state from JSON. Check the console for more details.","error"),console.error(l)}}function dt(e,l){for(const t in l){const o=e.state.value[t];o?Object.assign(o,l[t]):e.state.value[t]=l[t]}}function H(e){return{_custom:{display:e}}}const ft="🍍 Pinia (root)",Le="_root";function ao(e){return Ie(e)?{id:Le,label:ft}:{id:e.$id,label:e.$id}}function io(e){if(Ie(e)){const t=Array.from(e._s.keys()),o=e._s;return{state:t.map(a=>({editable:!0,key:a,value:e.state.value[a]})),getters:t.filter(a=>o.get(a)._getters).map(a=>{const i=o.get(a);return{editable:!1,key:a,value:i._getters.reduce((r,c)=>(r[c]=i[c],r),{})}})}}const l={state:Object.keys(e.$state).map(t=>({editable:!0,key:t,value:e.$state[t]}))};return e._getters&&e._getters.length&&(l.getters=e._getters.map(t=>({editable:!1,key:t,value:e[t]}))),e._customProperties.size&&(l.customProperties=Array.from(e._customProperties).map(t=>({editable:!0,key:t,value:e[t]}))),l}function co(e){return e?Array.isArray(e)?e.reduce((l,t)=>(l.keys.push(t.key),l.operations.push(t.type),l.oldValue[t.key]=t.oldValue,l.newValue[t.key]=t.newValue,l),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:H(e.type),key:H(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function uo(e){switch(e){case z.direct:return"mutation";case z.patchFunction:return"$patch";case z.patchObject:return"$patch";default:return"unknown"}}let te=!0;const be=[],Q="pinia:mutations",M="pinia",{assign:fo}=Object,ve=e=>"🍍 "+e;function po(e,l){ot({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:be,app:e},t=>{typeof t.now!="function"&&B("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."),t.addTimelineLayer({id:Q,label:"Pinia 🍍",color:15064968}),t.addInspector({id:M,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{no(l)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await oo(l),t.sendInspectorTree(M),t.sendInspectorState(M)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{lo(l)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await ro(l),t.sendInspectorTree(M),t.sendInspectorState(M)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:o=>{const s=l._s.get(o);s?typeof s.$reset!="function"?B(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`,"warn"):(s.$reset(),B(`Store "${o}" reset.`)):B(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),t.on.inspectComponent((o,s)=>{const a=o.componentInstance&&o.componentInstance.proxy;if(a&&a._pStores){const i=o.componentInstance.proxy._pStores;Object.values(i).forEach(r=>{o.instanceData.state.push({type:ve(r.$id),key:"state",editable:!0,value:r._isOptionsAPI?{_custom:{value:n.toRaw(r.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>r.$reset()}]}}:Object.keys(r.$state).reduce((c,u)=>(c[u]=r.$state[u],c),{})}),r._getters&&r._getters.length&&o.instanceData.state.push({type:ve(r.$id),key:"getters",editable:!1,value:r._getters.reduce((c,u)=>{try{c[u]=r[u]}catch(d){c[u]=d}return c},{})})})}}),t.on.getInspectorTree(o=>{if(o.app===e&&o.inspectorId===M){let s=[l];s=s.concat(Array.from(l._s.values())),o.rootNodes=(o.filter?s.filter(a=>"$id"in a?a.$id.toLowerCase().includes(o.filter.toLowerCase()):ft.toLowerCase().includes(o.filter.toLowerCase())):s).map(ao)}}),t.on.getInspectorState(o=>{if(o.app===e&&o.inspectorId===M){const s=o.nodeId===Le?l:l._s.get(o.nodeId);if(!s)return;s&&(o.state=io(s))}}),t.on.editInspectorState((o,s)=>{if(o.app===e&&o.inspectorId===M){const a=o.nodeId===Le?l:l._s.get(o.nodeId);if(!a)return B(`store "${o.nodeId}" not found`,"error");const{path:i}=o;Ie(a)?i.unshift("state"):(i.length!==1||!a._customProperties.has(i[0])||i[0]in a.$state)&&i.unshift("$state"),te=!1,o.set(a,i,o.state.value),te=!0}}),t.on.editComponentState(o=>{if(o.type.startsWith("🍍")){const s=o.type.replace(/^🍍\s*/,""),a=l._s.get(s);if(!a)return B(`store "${s}" not found`,"error");const{path:i}=o;if(i[0]!=="state")return B(`Invalid path for store "${s}":
12
12
  ${i}
13
- Only state can be modified.`);i[0]="$state",te=!1,o.set(a,i,o.state.value),te=!0}})})}function mo(e,l){be.includes(ve(l.$id))||be.push(ve(l.$id)),ot({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:be,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},t=>{const o=typeof t.now=="function"?t.now.bind(t):Date.now;l.$onAction(({after:i,onError:r,name:c,args:u})=>{const d=pt++;t.addTimelineEvent({layerId:Q,event:{time:o(),title:"🛫 "+c,subtitle:"start",data:{store:H(l.$id),action:H(c),args:u},groupId:d}}),i(m=>{W=void 0,t.addTimelineEvent({layerId:Q,event:{time:o(),title:"🛬 "+c,subtitle:"end",data:{store:H(l.$id),action:H(c),args:u,result:m},groupId:d}})}),r(m=>{W=void 0,t.addTimelineEvent({layerId:Q,event:{time:o(),logType:"error",title:"💥 "+c,subtitle:"end",data:{store:H(l.$id),action:H(c),args:u,error:m},groupId:d}})})},!0),l._customProperties.forEach(i=>{n.watch(()=>n.unref(l[i]),(r,c)=>{t.notifyComponentUpdate(),t.sendInspectorState(M),te&&t.addTimelineEvent({layerId:Q,event:{time:o(),title:"Change",subtitle:i,data:{newValue:r,oldValue:c},groupId:W}})},{deep:!0})}),l.$subscribe(({events:i,type:r},c)=>{if(t.notifyComponentUpdate(),t.sendInspectorState(M),!te)return;const u={time:o(),title:uo(r),data:fo({store:H(l.$id)},co(i)),groupId:W};r===z.patchFunction?u.subtitle="⤵️":r===z.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),t.addTimelineEvent({layerId:Q,event:u})},{detached:!0,flush:"sync"});const s=l._hotUpdate;l._hotUpdate=n.markRaw(i=>{s(i),t.addTimelineEvent({layerId:Q,event:{time:o(),title:"🔥 "+l.$id,subtitle:"HMR update",data:{store:H(l.$id),info:H("HMR update")}}}),t.notifyComponentUpdate(),t.sendInspectorTree(M),t.sendInspectorState(M)});const{$dispose:a}=l;l.$dispose=()=>{a(),t.notifyComponentUpdate(),t.sendInspectorTree(M),t.sendInspectorState(M),t.getSettings().logStoreChanges&&B(`Disposed "${l.$id}" store 🗑`)},t.notifyComponentUpdate(),t.sendInspectorTree(M),t.sendInspectorState(M),t.getSettings().logStoreChanges&&B(`"${l.$id}" store installed 🆕`)})}let pt=0,W;function mt(e,l,t){const o=l.reduce((s,a)=>(s[a]=n.toRaw(e)[a],s),{});for(const s in o)e[s]=function(){const a=pt,i=t?new Proxy(e,{get(...c){return W=a,Reflect.get(...c)},set(...c){return W=a,Reflect.set(...c)}}):e;W=a;const r=o[s].apply(i,arguments);return W=void 0,r}}function ho({app:e,store:l,options:t}){if(l.$id.startsWith("__hot:"))return;l._isOptionsAPI=!!t.state,mt(l,Object.keys(t.actions),l._isOptionsAPI);const o=l._hotUpdate;n.toRaw(l)._hotUpdate=function(s){o.apply(this,arguments),mt(l,Object.keys(s._hmrPayload.actions),!!l._isOptionsAPI)},mo(e,l)}function go(){const e=n.effectScope(!0),l=e.run(()=>n.ref({}));let t=[],o=[];const s=n.markRaw({install(a){ie(s),s._a=a,a.provide(lt,s),a.config.globalProperties.$pinia=s,ce&&po(a,s),o.forEach(i=>t.push(i)),o=[]},use(a){return!this._a&&!tt?o.push(a):t.push(a),this},_p:t,_a:null,_e:e,_s:new Map,state:l});return ce&&typeof Proxy<"u"&&s.use(ho),s}function ht(e,l){for(const t in l){const o=l[t];if(!(t in e))continue;const s=e[t];Y(s)&&Y(o)&&!n.isRef(o)&&!n.isReactive(o)?e[t]=ht(s,o):e[t]=o}return e}const gt=()=>{};function bt(e,l,t,o=gt){e.push(l);const s=()=>{const a=e.indexOf(l);a>-1&&(e.splice(a,1),o())};return!t&&n.getCurrentScope()&&n.onScopeDispose(s),s}function ne(e,...l){e.slice().forEach(t=>{t(...l)})}const bo=e=>e();function Be(e,l){e instanceof Map&&l instanceof Map&&l.forEach((t,o)=>e.set(o,t)),e instanceof Set&&l instanceof Set&&l.forEach(e.add,e);for(const t in l){if(!l.hasOwnProperty(t))continue;const o=l[t],s=e[t];Y(s)&&Y(o)&&e.hasOwnProperty(t)&&!n.isRef(o)&&!n.isReactive(o)?e[t]=Be(s,o):e[t]=o}return e}const vo=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function _o(e){return!Y(e)||!e.hasOwnProperty(vo)}const{assign:A}=Object;function vt(e){return!!(n.isRef(e)&&e.effect)}function _t(e,l,t,o){const{state:s,actions:a,getters:i}=l,r=t.state.value[e];let c;function u(){!r&&(process.env.NODE_ENV==="production"||!o)&&(t.state.value[e]=s?s():{});const d=process.env.NODE_ENV!=="production"&&o?n.toRefs(n.ref(s?s():{}).value):n.toRefs(t.state.value[e]);return A(d,a,Object.keys(i||{}).reduce((m,_)=>(process.env.NODE_ENV!=="production"&&_ in d&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${_}" in store "${e}".`),m[_]=n.markRaw(n.computed(()=>{ie(t);const x=t._s.get(e);return i[_].call(x,x)})),m),{}))}return c=Re(e,u,l,t,o,!0),c}function Re(e,l,t={},o,s,a){let i;const r=A({actions:{}},t);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const c={deep:!0};process.env.NODE_ENV!=="production"&&!tt&&(c.onTrigger=f=>{u?x=f:u==!1&&!C._hotUpdating&&(Array.isArray(x)?x.push(f):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,d,m=[],_=[],x;const g=o.state.value[e];!a&&!g&&(process.env.NODE_ENV==="production"||!s)&&(o.state.value[e]={});const h=n.ref({});let E;function N(f){let p;u=d=!1,process.env.NODE_ENV!=="production"&&(x=[]),typeof f=="function"?(f(o.state.value[e]),p={type:z.patchFunction,storeId:e,events:x}):(Be(o.state.value[e],f),p={type:z.patchObject,payload:f,storeId:e,events:x});const y=E=Symbol();n.nextTick().then(()=>{E===y&&(u=!0)}),d=!0,ne(m,p,o.state.value[e])}const S=a?function(){const{state:p}=t,y=p?p():{};this.$patch(w=>{A(w,y)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:gt;function V(){i.stop(),m=[],_=[],o._s.delete(e)}function I(f,p){return function(){ie(o);const y=Array.from(arguments),w=[],T=[];function L(R){w.push(R)}function F(R){T.push(R)}ne(_,{args:y,name:f,store:C,after:L,onError:F});let j;try{j=p.apply(this&&this.$id===e?this:C,y)}catch(R){throw ne(T,R),R}return j instanceof Promise?j.then(R=>(ne(w,R),R)).catch(R=>(ne(T,R),Promise.reject(R))):(ne(w,j),j)}}const b=n.markRaw({actions:{},getters:{},state:[],hotState:h}),k={_p:o,$id:e,$onAction:bt.bind(null,_),$patch:N,$reset:S,$subscribe(f,p={}){const y=bt(m,f,p.detached,()=>w()),w=i.run(()=>n.watch(()=>o.state.value[e],T=>{(p.flush==="sync"?d:u)&&f({storeId:e,type:z.direct,events:x},T)},A({},c,p)));return y},$dispose:V},C=n.reactive(process.env.NODE_ENV!=="production"||ce?A({_hmrPayload:b,_customProperties:n.markRaw(new Set)},k):k);o._s.set(e,C);const O=(o._a&&o._a.runWithContext||bo)(()=>o._e.run(()=>(i=n.effectScope()).run(l)));for(const f in O){const p=O[f];if(n.isRef(p)&&!vt(p)||n.isReactive(p))process.env.NODE_ENV!=="production"&&s?pe(h.value,f,n.toRef(O,f)):a||(g&&_o(p)&&(n.isRef(p)?p.value=g[f]:Be(p,g[f])),o.state.value[e][f]=p),process.env.NODE_ENV!=="production"&&b.state.push(f);else if(typeof p=="function"){const y=process.env.NODE_ENV!=="production"&&s?p:I(f,p);O[f]=y,process.env.NODE_ENV!=="production"&&(b.actions[f]=p),r.actions[f]=p}else process.env.NODE_ENV!=="production"&&vt(p)&&(b.getters[f]=a?t.getters[f]:p,me&&(O._getters||(O._getters=n.markRaw([]))).push(f))}if(A(C,O),A(n.toRaw(C),O),Object.defineProperty(C,"$state",{get:()=>process.env.NODE_ENV!=="production"&&s?h.value:o.state.value[e],set:f=>{if(process.env.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");N(p=>{A(p,f)})}}),process.env.NODE_ENV!=="production"&&(C._hotUpdate=n.markRaw(f=>{C._hotUpdating=!0,f._hmrPayload.state.forEach(p=>{if(p in C.$state){const y=f.$state[p],w=C.$state[p];typeof y=="object"&&Y(y)&&Y(w)?ht(y,w):f.$state[p]=w}pe(C,p,n.toRef(f.$state,p))}),Object.keys(C.$state).forEach(p=>{p in f.$state||Ve(C,p)}),u=!1,d=!1,o.state.value[e]=n.toRef(f._hmrPayload,"hotState"),d=!0,n.nextTick().then(()=>{u=!0});for(const p in f._hmrPayload.actions){const y=f[p];pe(C,p,I(p,y))}for(const p in f._hmrPayload.getters){const y=f._hmrPayload.getters[p],w=a?n.computed(()=>(ie(o),y.call(C,C))):y;pe(C,p,w)}Object.keys(C._hmrPayload.getters).forEach(p=>{p in f._hmrPayload.getters||Ve(C,p)}),Object.keys(C._hmrPayload.actions).forEach(p=>{p in f._hmrPayload.actions||Ve(C,p)}),C._hmrPayload=f._hmrPayload,C._getters=f._getters,C._hotUpdating=!1})),ce){const f={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(p=>{Object.defineProperty(C,p,A({value:C[p]},f))})}return o._p.forEach(f=>{if(ce){const p=i.run(()=>f({store:C,app:o._a,pinia:o,options:r}));Object.keys(p||{}).forEach(y=>C._customProperties.add(y)),A(C,p)}else A(C,i.run(()=>f({store:C,app:o._a,pinia:o,options:r})))}),process.env.NODE_ENV!=="production"&&C.$state&&typeof C.$state=="object"&&typeof C.$state.constructor=="function"&&!C.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
13
+ Only state can be modified.`);i[0]="$state",te=!1,o.set(a,i,o.state.value),te=!0}})})}function mo(e,l){be.includes(ve(l.$id))||be.push(ve(l.$id)),ot({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:be,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},t=>{const o=typeof t.now=="function"?t.now.bind(t):Date.now;l.$onAction(({after:i,onError:r,name:c,args:u})=>{const d=pt++;t.addTimelineEvent({layerId:Q,event:{time:o(),title:"🛫 "+c,subtitle:"start",data:{store:H(l.$id),action:H(c),args:u},groupId:d}}),i(m=>{W=void 0,t.addTimelineEvent({layerId:Q,event:{time:o(),title:"🛬 "+c,subtitle:"end",data:{store:H(l.$id),action:H(c),args:u,result:m},groupId:d}})}),r(m=>{W=void 0,t.addTimelineEvent({layerId:Q,event:{time:o(),logType:"error",title:"💥 "+c,subtitle:"end",data:{store:H(l.$id),action:H(c),args:u,error:m},groupId:d}})})},!0),l._customProperties.forEach(i=>{n.watch(()=>n.unref(l[i]),(r,c)=>{t.notifyComponentUpdate(),t.sendInspectorState(M),te&&t.addTimelineEvent({layerId:Q,event:{time:o(),title:"Change",subtitle:i,data:{newValue:r,oldValue:c},groupId:W}})},{deep:!0})}),l.$subscribe(({events:i,type:r},c)=>{if(t.notifyComponentUpdate(),t.sendInspectorState(M),!te)return;const u={time:o(),title:uo(r),data:fo({store:H(l.$id)},co(i)),groupId:W};r===z.patchFunction?u.subtitle="⤵️":r===z.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),t.addTimelineEvent({layerId:Q,event:u})},{detached:!0,flush:"sync"});const s=l._hotUpdate;l._hotUpdate=n.markRaw(i=>{s(i),t.addTimelineEvent({layerId:Q,event:{time:o(),title:"🔥 "+l.$id,subtitle:"HMR update",data:{store:H(l.$id),info:H("HMR update")}}}),t.notifyComponentUpdate(),t.sendInspectorTree(M),t.sendInspectorState(M)});const{$dispose:a}=l;l.$dispose=()=>{a(),t.notifyComponentUpdate(),t.sendInspectorTree(M),t.sendInspectorState(M),t.getSettings().logStoreChanges&&B(`Disposed "${l.$id}" store 🗑`)},t.notifyComponentUpdate(),t.sendInspectorTree(M),t.sendInspectorState(M),t.getSettings().logStoreChanges&&B(`"${l.$id}" store installed 🆕`)})}let pt=0,W;function mt(e,l,t){const o=l.reduce((s,a)=>(s[a]=n.toRaw(e)[a],s),{});for(const s in o)e[s]=function(){const a=pt,i=t?new Proxy(e,{get(...c){return W=a,Reflect.get(...c)},set(...c){return W=a,Reflect.set(...c)}}):e;W=a;const r=o[s].apply(i,arguments);return W=void 0,r}}function ho({app:e,store:l,options:t}){if(l.$id.startsWith("__hot:"))return;l._isOptionsAPI=!!t.state,mt(l,Object.keys(t.actions),l._isOptionsAPI);const o=l._hotUpdate;n.toRaw(l)._hotUpdate=function(s){o.apply(this,arguments),mt(l,Object.keys(s._hmrPayload.actions),!!l._isOptionsAPI)},mo(e,l)}function go(){const e=n.effectScope(!0),l=e.run(()=>n.ref({}));let t=[],o=[];const s=n.markRaw({install(a){ie(s),s._a=a,a.provide(lt,s),a.config.globalProperties.$pinia=s,ce&&po(a,s),o.forEach(i=>t.push(i)),o=[]},use(a){return!this._a&&!tt?o.push(a):t.push(a),this},_p:t,_a:null,_e:e,_s:new Map,state:l});return ce&&typeof Proxy<"u"&&s.use(ho),s}function ht(e,l){for(const t in l){const o=l[t];if(!(t in e))continue;const s=e[t];Y(s)&&Y(o)&&!n.isRef(o)&&!n.isReactive(o)?e[t]=ht(s,o):e[t]=o}return e}const gt=()=>{};function bt(e,l,t,o=gt){e.push(l);const s=()=>{const a=e.indexOf(l);a>-1&&(e.splice(a,1),o())};return!t&&n.getCurrentScope()&&n.onScopeDispose(s),s}function ne(e,...l){e.slice().forEach(t=>{t(...l)})}const bo=e=>e();function Be(e,l){e instanceof Map&&l instanceof Map&&l.forEach((t,o)=>e.set(o,t)),e instanceof Set&&l instanceof Set&&l.forEach(e.add,e);for(const t in l){if(!l.hasOwnProperty(t))continue;const o=l[t],s=e[t];Y(s)&&Y(o)&&e.hasOwnProperty(t)&&!n.isRef(o)&&!n.isReactive(o)?e[t]=Be(s,o):e[t]=o}return e}const vo=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Co(e){return!Y(e)||!e.hasOwnProperty(vo)}const{assign:F}=Object;function vt(e){return!!(n.isRef(e)&&e.effect)}function Ct(e,l,t,o){const{state:s,actions:a,getters:i}=l,r=t.state.value[e];let c;function u(){!r&&(process.env.NODE_ENV==="production"||!o)&&(t.state.value[e]=s?s():{});const d=process.env.NODE_ENV!=="production"&&o?n.toRefs(n.ref(s?s():{}).value):n.toRefs(t.state.value[e]);return F(d,a,Object.keys(i||{}).reduce((m,b)=>(process.env.NODE_ENV!=="production"&&b in d&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${b}" in store "${e}".`),m[b]=n.markRaw(n.computed(()=>{ie(t);const C=t._s.get(e);return i[b].call(C,C)})),m),{}))}return c=Re(e,u,l,t,o,!0),c}function Re(e,l,t={},o,s,a){let i;const r=F({actions:{}},t);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const c={deep:!0};process.env.NODE_ENV!=="production"&&!tt&&(c.onTrigger=f=>{u?C=f:u==!1&&!x._hotUpdating&&(Array.isArray(C)?C.push(f):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,d,m=[],b=[],C;const _=o.state.value[e];!a&&!_&&(process.env.NODE_ENV==="production"||!s)&&(o.state.value[e]={});const h=n.ref({});let E;function N(f){let p;u=d=!1,process.env.NODE_ENV!=="production"&&(C=[]),typeof f=="function"?(f(o.state.value[e]),p={type:z.patchFunction,storeId:e,events:C}):(Be(o.state.value[e],f),p={type:z.patchObject,payload:f,storeId:e,events:C});const y=E=Symbol();n.nextTick().then(()=>{E===y&&(u=!0)}),d=!0,ne(m,p,o.state.value[e])}const S=a?function(){const{state:p}=t,y=p?p():{};this.$patch(w=>{F(w,y)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:gt;function V(){i.stop(),m=[],b=[],o._s.delete(e)}function I(f,p){return function(){ie(o);const y=Array.from(arguments),w=[],T=[];function L(R){w.push(R)}function A(R){T.push(R)}ne(b,{args:y,name:f,store:x,after:L,onError:A});let j;try{j=p.apply(this&&this.$id===e?this:x,y)}catch(R){throw ne(T,R),R}return j instanceof Promise?j.then(R=>(ne(w,R),R)).catch(R=>(ne(T,R),Promise.reject(R))):(ne(w,j),j)}}const g=n.markRaw({actions:{},getters:{},state:[],hotState:h}),k={_p:o,$id:e,$onAction:bt.bind(null,b),$patch:N,$reset:S,$subscribe(f,p={}){const y=bt(m,f,p.detached,()=>w()),w=i.run(()=>n.watch(()=>o.state.value[e],T=>{(p.flush==="sync"?d:u)&&f({storeId:e,type:z.direct,events:C},T)},F({},c,p)));return y},$dispose:V},x=n.reactive(process.env.NODE_ENV!=="production"||ce?F({_hmrPayload:g,_customProperties:n.markRaw(new Set)},k):k);o._s.set(e,x);const O=(o._a&&o._a.runWithContext||bo)(()=>o._e.run(()=>(i=n.effectScope()).run(l)));for(const f in O){const p=O[f];if(n.isRef(p)&&!vt(p)||n.isReactive(p))process.env.NODE_ENV!=="production"&&s?pe(h.value,f,n.toRef(O,f)):a||(_&&Co(p)&&(n.isRef(p)?p.value=_[f]:Be(p,_[f])),o.state.value[e][f]=p),process.env.NODE_ENV!=="production"&&g.state.push(f);else if(typeof p=="function"){const y=process.env.NODE_ENV!=="production"&&s?p:I(f,p);O[f]=y,process.env.NODE_ENV!=="production"&&(g.actions[f]=p),r.actions[f]=p}else process.env.NODE_ENV!=="production"&&vt(p)&&(g.getters[f]=a?t.getters[f]:p,me&&(O._getters||(O._getters=n.markRaw([]))).push(f))}if(F(x,O),F(n.toRaw(x),O),Object.defineProperty(x,"$state",{get:()=>process.env.NODE_ENV!=="production"&&s?h.value:o.state.value[e],set:f=>{if(process.env.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");N(p=>{F(p,f)})}}),process.env.NODE_ENV!=="production"&&(x._hotUpdate=n.markRaw(f=>{x._hotUpdating=!0,f._hmrPayload.state.forEach(p=>{if(p in x.$state){const y=f.$state[p],w=x.$state[p];typeof y=="object"&&Y(y)&&Y(w)?ht(y,w):f.$state[p]=w}pe(x,p,n.toRef(f.$state,p))}),Object.keys(x.$state).forEach(p=>{p in f.$state||Ve(x,p)}),u=!1,d=!1,o.state.value[e]=n.toRef(f._hmrPayload,"hotState"),d=!0,n.nextTick().then(()=>{u=!0});for(const p in f._hmrPayload.actions){const y=f[p];pe(x,p,I(p,y))}for(const p in f._hmrPayload.getters){const y=f._hmrPayload.getters[p],w=a?n.computed(()=>(ie(o),y.call(x,x))):y;pe(x,p,w)}Object.keys(x._hmrPayload.getters).forEach(p=>{p in f._hmrPayload.getters||Ve(x,p)}),Object.keys(x._hmrPayload.actions).forEach(p=>{p in f._hmrPayload.actions||Ve(x,p)}),x._hmrPayload=f._hmrPayload,x._getters=f._getters,x._hotUpdating=!1})),ce){const f={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(p=>{Object.defineProperty(x,p,F({value:x[p]},f))})}return o._p.forEach(f=>{if(ce){const p=i.run(()=>f({store:x,app:o._a,pinia:o,options:r}));Object.keys(p||{}).forEach(y=>x._customProperties.add(y)),F(x,p)}else F(x,i.run(()=>f({store:x,app:o._a,pinia:o,options:r})))}),process.env.NODE_ENV!=="production"&&x.$state&&typeof x.$state=="object"&&typeof x.$state.constructor=="function"&&!x.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
14
14
  state: () => new MyClass()
15
- Found in store "${C.$id}".`),g&&a&&t.hydrate&&t.hydrate(C.$state,g),u=!0,d=!0,C}function _e(e,l,t){let o,s;const a=typeof l=="function";if(typeof e=="string")o=e,s=a?t:l;else if(s=e,o=e.id,process.env.NODE_ENV!=="production"&&typeof o!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function i(r,c){const u=n.hasInjectionContext();if(r=(process.env.NODE_ENV==="test"&&ae&&ae._testing?null:r)||(u?n.inject(lt,null):null),r&&ie(r),process.env.NODE_ENV!=="production"&&!ae)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
15
+ Found in store "${x.$id}".`),_&&a&&t.hydrate&&t.hydrate(x.$state,_),u=!0,d=!0,x}function Ce(e,l,t){let o,s;const a=typeof l=="function";if(typeof e=="string")o=e,s=a?t:l;else if(s=e,o=e.id,process.env.NODE_ENV!=="production"&&typeof o!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function i(r,c){const u=n.hasInjectionContext();if(r=(process.env.NODE_ENV==="test"&&ae&&ae._testing?null:r)||(u?n.inject(lt,null):null),r&&ie(r),process.env.NODE_ENV!=="production"&&!ae)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
16
16
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
17
- This will fail in production.`);r=ae,r._s.has(o)||(a?Re(o,l,s,r):_t(o,s,r),process.env.NODE_ENV!=="production"&&(i._pinia=r));const d=r._s.get(o);if(process.env.NODE_ENV!=="production"&&c){const m="__hot:"+o,_=a?Re(m,l,s,r,!0):_t(m,A({},s),r,!0);c._hotUpdate(_),delete r.state.value[m],r._s.delete(m)}if(process.env.NODE_ENV!=="production"&&me){const m=n.getCurrentInstance();if(m&&m.proxy&&!c){const _=m.proxy,x="_pStores"in _?_._pStores:_._pStores={};x[o]=d}}return d}return i.$id=o,i}const Ce=_e("loader",()=>({loading:n.ref(!1)})),Ct={__name:"Select",props:n.mergeModels({languages:{type:Object,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=Ce(),t=e,o=n.useModel(e,"modelValue"),s=n.ref(""),a=n.ref(null),i=n.computed(()=>Object.entries(t.languages).filter(([,c])=>c.toLowerCase().includes(s.value.toLowerCase()))),r=c=>{c.target.value="",s.value="",a.value&&a.value.$el.click()};return(c,u)=>(n.openBlock(),n.createBlock(n.unref(Mn),{modelValue:o.value,"onUpdate:modelValue":u[3]||(u[3]=d=>o.value=d),disabled:n.unref(l).loading,as:"div",class:"relative mt-1"},{default:n.withCtx(()=>[n.createVNode(n.unref(An),{class:"w-full bg-white border border-gray-300 rounded py-2.5 pl-3 pr-10 text-sm text-gray-800 font-medium focus:outline-none focus:ring-0.5 focus:ring-gray-400 focus:border-gray-400",onChange:u[0]||(u[0]=d=>s.value=d.target.value),displayValue:d=>e.languages[d],onFocus:u[1]||(u[1]=d=>r(d))},null,8,["displayValue"]),n.createVNode(n.unref(Dn),{ref_key:"btnSelect",ref:a,class:"absolute inset-y-0 right-0 flex items-center pr-2"},{default:n.withCtx(()=>[n.createVNode(n.unref(zn),{class:"h-5 w-5 text-gray-400","aria-hidden":"true",onClick:u[2]||(u[2]=d=>r(d))})]),_:1},512),n.createVNode(n.unref(Fn),{class:"absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm z-50"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.value,([d,m])=>(n.openBlock(),n.createBlock(n.unref(jn),{key:d,value:d},{default:n.withCtx(({active:_,selected:x})=>[n.createElementVNode("li",{class:n.normalizeClass(["relative cursor-default select-none py-2 pl-3 pr-9",_?"bg-[#3B5695] text-white":"text-textCustom"])},[n.createElementVNode("span",{class:n.normalizeClass(["block truncate",x&&"font-semibold"])},n.toDisplayString(m),3)],2)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue","disabled"]))}},xt="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.68688%202.3131C3.88214%202.50837%203.88214%202.82495%203.68688%203.02021L2.04043%204.66666L3.68688%206.3131C3.88214%206.50837%203.88214%206.82495%203.68688%207.02021C3.49162%207.21547%203.17504%207.21547%202.97977%207.02021L0.979775%205.02021C0.784513%204.82495%200.784513%204.50837%200.979775%204.3131L2.97977%202.3131C3.17504%202.11784%203.49162%202.11784%203.68688%202.3131Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M12.3131%208.97977C12.5084%208.78451%2012.825%208.78451%2013.0202%208.97977L15.0202%2010.9798C15.2155%2011.175%2015.2155%2011.4916%2015.0202%2011.6869L13.0202%2013.6869C12.825%2013.8821%2012.5084%2013.8821%2012.3131%2013.6869C12.1178%2013.4916%2012.1178%2013.175%2012.3131%2012.9798L13.9596%2011.3333L12.3131%209.68688C12.1178%209.49161%2012.1178%209.17503%2012.3131%208.97977Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M0.833328%204.66666C0.833328%204.39051%201.05719%204.16666%201.33333%204.16666H14.6667C14.9428%204.16666%2015.1667%204.39051%2015.1667%204.66666C15.1667%204.9428%2014.9428%205.16666%2014.6667%205.16666H1.33333C1.05719%205.16666%200.833328%204.9428%200.833328%204.66666Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M0.833328%2011.3333C0.833328%2011.0572%201.05719%2010.8333%201.33333%2010.8333H14.6667C14.9428%2010.8333%2015.1667%2011.0572%2015.1667%2011.3333C15.1667%2011.6095%2014.9428%2011.8333%2014.6667%2011.8333H1.33333C1.05719%2011.8333%200.833328%2011.6095%200.833328%2011.3333Z'%20fill='%237E7E7E'/%3e%3c/svg%3e",Co=["disabled"],xo=[n.createElementVNode("img",{src:xt,alt:"swap",class:"w-4"},null,-1)],yo=["disabled"],wo=[n.createElementVNode("img",{src:xt,alt:"swap",class:"w-4"},null,-1)],Eo={__name:"SwapBtn",props:{isBidirect:{type:Boolean,default:!1}},emits:["swap"],setup(e,{emit:l}){const t=Ce(),o=l;return(s,a)=>e.isBidirect?(n.openBlock(),n.createElementBlock("button",{key:1,onClick:a[0]||(a[0]=i=>o("swap")),disabled:n.unref(t).loading},wo,8,yo)):(n.openBlock(),n.createElementBlock("button",{key:0,disabled:n.unref(t).loading},xo,8,Co))}},xe=_e("language",()=>{const e=n.ref("auto"),l=n.ref("en"),t=n.ref({src:[],target:[]}),o=n.computed(()=>t.value.src[e.value]),s=n.computed(()=>t.value.target[l.value]);function a(c,u){e.value=c==null?void 0:c.src,l.value=c==null?void 0:c.target,t.value=u}function i(){if(!t.value.src[l.value]||!t.value.target[e.value])return;const c=e.value;e.value=l.value,l.value=c}function r(c){return t.value.src[c]||t.value.target[c]}return{languages:t,src:e,target:l,srcLabel:o,targetLabel:s,init:a,swap:i,getLabel:r}}),So={key:0,class:"flex"},Oo={__name:"Selects",setup(e){const l=xe();function t(){l.swap()}return(o,s)=>n.unref(l).languages?(n.openBlock(),n.createElementBlock("div",So,[n.createVNode(Ct,{modelValue:n.unref(l).src,"onUpdate:modelValue":s[0]||(s[0]=a=>n.unref(l).src=a),languages:n.unref(l).languages.src,class:"grow"},null,8,["modelValue","languages"]),n.createVNode(Eo,{isBidirect:n.unref(l).src!=="auto",class:"grow-0 mx-3",onSwap:t},null,8,["isBidirect"]),n.createVNode(Ct,{modelValue:n.unref(l).target,"onUpdate:modelValue":s[1]||(s[1]=a=>n.unref(l).target=a),languages:n.unref(l).languages.target,class:"grow"},null,8,["modelValue","languages"])])):n.createCommentVNode("",!0)}},ko={INPUT_MAX_LENGTH:5e3,INPUT_DEBOUNCE:500},ye=(e,l)=>{const t=e.__vccOpts||e;for(const[o,s]of l)t[o]=s;return t},$o={},Vo={class:"mr-2 loading loading-dots loading-xs"};function To(e,l){return n.openBlock(),n.createElementBlock("span",Vo)}const No=ye($o,[["render",To]]),Io="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.33325%204.66667H3.51125C3.82693%204.6667%204.13239%204.55473%204.37325%204.35067L6.83392%202.26667C6.99592%202.12953%207.19374%202.04156%207.40407%202.01312C7.61441%201.98468%207.82849%202.01696%208.02109%202.10615C8.21369%202.19534%208.37678%202.33772%208.49114%202.51652C8.60551%202.69532%208.66638%202.90309%208.66659%203.11534V12.8847C8.66649%2013.097%208.60565%2013.305%208.49125%2013.4839C8.37685%2013.6628%208.21367%2013.8053%208.02094%2013.8945C7.82822%2013.9837%207.614%2014.0159%207.40356%2013.9874C7.19312%2013.9588%206.99523%2013.8707%206.83325%2013.7333L4.37325%2011.6487C4.13229%2011.4449%203.82685%2011.3331%203.51125%2011.3333H2.33325C2.06804%2011.3333%201.81368%2011.228%201.62615%2011.0404C1.43861%2010.8529%201.33325%2010.5986%201.33325%2010.3333V5.66667C1.33325%205.40145%201.43861%205.1471%201.62615%204.95956C1.81368%204.77203%202.06804%204.66667%202.33325%204.66667ZM11.1779%2011.18C11.5969%2010.763%2011.9294%2010.2674%2012.1562%209.72156C12.3831%209.17572%2012.4999%208.59044%2012.4999%207.99934C12.4999%207.40823%2012.3831%206.82295%2012.1562%206.27711C11.9294%205.73127%2011.5969%205.23564%2011.1779%204.81867C11.1317%204.77098%2011.0765%204.73297%2011.0155%204.70686C10.9544%204.68075%2010.8888%204.66705%2010.8224%204.66657C10.756%204.66609%2010.6902%204.67883%2010.6288%204.70406C10.5674%204.72929%2010.5116%204.76649%2010.4647%204.8135C10.4179%204.86051%2010.3808%204.91639%2010.3558%204.97787C10.3307%205.03935%2010.3181%205.10521%2010.3188%205.17159C10.3195%205.23798%2010.3334%205.30357%2010.3597%205.36453C10.3859%205.42549%2010.4241%205.48061%2010.4719%205.52667C10.7977%205.85079%2011.0562%206.23609%2011.2326%206.66043C11.409%207.08477%2011.4998%207.53979%2011.4998%207.99934C11.4998%208.45888%2011.409%208.9139%2011.2326%209.33824C11.0562%209.76258%2010.7977%2010.1479%2010.4719%2010.472C10.4241%2010.5181%2010.3859%2010.5732%2010.3597%2010.6341C10.3334%2010.6951%2010.3195%2010.7607%2010.3188%2010.8271C10.3181%2010.8935%2010.3307%2010.9593%2010.3558%2011.0208C10.3808%2011.0823%2010.4179%2011.1382%2010.4647%2011.1852C10.5116%2011.2322%2010.5674%2011.2694%2010.6288%2011.2946C10.6902%2011.3198%2010.756%2011.3326%2010.8224%2011.3321C10.8888%2011.3316%2010.9544%2011.3179%2011.0155%2011.2918C11.0765%2011.2657%2011.1317%2011.2277%2011.1779%2011.18ZM12.7113%2013.2127C12.6123%2013.2126%2012.5157%2013.1832%2012.4335%2013.1281C12.3513%2013.0731%2012.2873%2012.9949%2012.2495%2012.9035C12.2118%2012.8121%2012.202%2012.7115%2012.2214%2012.6146C12.2408%2012.5176%2012.2886%2012.4285%2012.3586%2012.3587C12.9317%2011.7866%2013.3865%2011.1071%2013.6967%2010.359C14.0069%209.61101%2014.1666%208.80915%2014.1666%207.99934C14.1666%207.18952%2014.0069%206.38766%2013.6967%205.63963C13.3865%204.8916%2012.9317%204.2121%2012.3586%203.64C12.3122%203.59351%2012.2754%203.53834%2012.2503%203.47764C12.2252%203.41693%2012.2124%203.35188%2012.2124%203.2862C12.2125%203.22052%2012.2255%203.15549%2012.2507%203.09483C12.2759%203.03417%2012.3128%202.97907%2012.3593%202.93267C12.4057%202.88627%2012.4609%202.84948%2012.5216%202.8244C12.5823%202.79932%2012.6474%202.78645%2012.7131%202.78651C12.7787%202.78657%2012.8438%202.79957%2012.9044%202.82476C12.9651%202.84995%2013.0202%202.88685%2013.0666%202.93334C13.7327%203.59825%2014.2612%204.38801%2014.6218%205.25741C14.9824%206.12681%2015.168%207.05879%2015.168%208C15.168%208.94122%2014.9824%209.87319%2014.6218%2010.7426C14.2612%2011.612%2013.7327%2012.4018%2013.0666%2013.0667C13.02%2013.1134%2012.9646%2013.1504%2012.9036%2013.1756C12.8426%2013.2007%2012.7772%2013.2129%2012.7113%2013.2127Z'%20fill='%233B5695'/%3e%3c/svg%3e",Lo="data:image/svg+xml,%3csvg%20class='swap-on%20fill-current%20h-4%20w-4'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill-rule='evenodd'%20d='M4.5%207.5a3%203%200%200%201%203-3h9a3%203%200%200%201%203%203v9a3%203%200%200%201-3%203h-9a3%203%200%200%201-3-3v-9Z'%20clip-rule='evenodd'%20fill='%238595BE'/%3e%3c/svg%3e",yt=_e("tts",()=>{const e=n.ref({src:null,target:null});function l(s){s.src&&(e.value.src=s.src),s.target&&(e.value.target=s.target)}function t(s){if(s==="src")return e.value.src;if(s==="target")return e.value.target}function o(){e.value={src:null,target:null}}return{tts:e,set:l,get:t,reset:o}}),Bo=[n.createElementVNode("img",{src:Io,alt:"Play"},null,-1)],Ro=[n.createElementVNode("img",{src:Lo,alt:"Stop"},null,-1)],Po={__name:"SpeakBtn",props:{type:{type:String,default:""}},emits:["loadTTS"],setup(e,{emit:l}){const t=yt(),o=e,s=l,a=n.computed(()=>t.tts[o.type]),i=n.ref(!1),r=new Audio;n.watch(a,()=>{if(!a.value){i.value=!1;return}u()},{immediate:!0}),n.onUnmounted(()=>{d(),r.src=""});function c(){if(a.value){u();return}i.value=!0,s("loadTTS")}function u(){a.value&&(r.src=a.value,i.value=!0,r.play().catch(()=>{i.value=!1}))}function d(){r.pause(),r.currentTime=0,i.value=!1}return r.onended=()=>{i.value=!1},(m,_)=>i.value?(n.openBlock(),n.createElementBlock("button",{key:1,class:"btn btn-xs btn-ghost btn-circle",onClick:n.withModifiers(d,["prevent"])},Ro)):(n.openBlock(),n.createElementBlock("button",{key:0,class:"btn btn-xs btn-ghost btn-circle",onClick:n.withModifiers(c,["prevent"])},Bo))}},Mo="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.19102%203.19102C3.44571%202.93633%203.85864%202.93633%204.11333%203.19102L12.809%2011.8867C13.0637%2012.1414%2013.0637%2012.5543%2012.809%2012.809C12.5543%2013.0637%2012.1414%2013.0637%2011.8867%2012.809L3.19102%204.11333C2.93633%203.85864%202.93633%203.44571%203.19102%203.19102Z'%20fill='%231A1F2A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.809%203.19102C13.0637%203.44571%2013.0637%203.85864%2012.809%204.11333L4.11333%2012.809C3.85864%2013.0637%203.44571%2013.0637%203.19102%2012.809C2.93633%2012.5543%202.93633%2012.1414%203.19102%2011.8867L11.8867%203.19102C12.1414%202.93633%2012.5543%202.93633%2012.809%203.19102Z'%20fill='%231A1F2A'/%3e%3c/svg%3e",Do={},Ao={class:"btn btn-xs btn-circle btn-ghost"},Fo=[n.createElementVNode("img",{src:Mo,alt:"Clear",class:"w-4"},null,-1)];function jo(e,l){return n.openBlock(),n.createElementBlock("button",Ao,Fo)}const Ho=ye(Do,[["render",jo]]),zo="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.47207%201.31905C7.57125%201.12371%207.77589%201%208.00001%201C8.22413%201%208.42877%201.12367%208.52795%201.31905L10.3721%204.95175L14.4959%205.53427C14.7177%205.5656%2014.9019%205.7166%2014.9712%205.9238C15.0404%206.13101%2014.9827%206.35843%2014.8222%206.51049L11.8382%209.33816L12.5427%2013.3309C12.5806%2013.5456%2012.4897%2013.7626%2012.3084%2013.8906C12.1272%2014.0187%2011.8868%2014.0356%2011.6884%2013.9342L8.00004%2012.0491L4.31158%2013.9343C4.11323%2014.0356%203.87286%2014.0187%203.69157%2013.8907C3.51028%2013.7627%203.4195%2013.5457%203.45736%2013.3309L4.1618%209.33819L1.17781%206.51052C1.01735%206.35846%200.959571%206.13101%201.02884%205.92383C1.09807%205.71663%201.28232%205.56563%201.50409%205.53431L5.62787%204.95178L7.47207%201.31905Z'%20fill='%23FFC857'/%3e%3c/svg%3e",Uo="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9491%205.89315C14.8278%205.53128%2014.5111%205.27252%2014.1226%205.21783L10.5264%204.7114L8.91813%201.55315C8.74435%201.21195%208.39257%201%207.99998%201C7.60739%201%207.25557%201.21195%207.08183%201.55315L5.47358%204.7114L1.8774%205.21783C1.48888%205.27252%201.17219%205.53128%201.05086%205.89315C0.929554%206.25501%201.02881%206.64477%201.30993%206.91038L3.91217%209.36871L3.29786%2012.8399C3.2315%2013.215%203.38755%2013.5868%203.7052%2013.8105C3.88128%2013.9344%204.08938%2014%204.30704%2014C4.47232%2014%204.63705%2013.9606%204.78341%2013.886L7.99995%2012.2471L11.2165%2013.886C11.3628%2013.9606%2011.5276%2014%2011.6929%2014C11.9106%2014%2012.1187%2013.9345%2012.2948%2013.8105C12.6124%2013.5868%2012.7685%2013.215%2012.7021%2012.84L12.0878%209.36871L14.6901%206.91035C14.9712%206.64477%2015.0704%206.25498%2014.9491%205.89315ZM14.0266%206.25082L11.2455%208.87813C11.1335%208.98392%2011.0824%209.13637%2011.1089%209.28575L11.7654%2012.9956C11.7701%2013.0226%2011.759%2013.0493%2011.7362%2013.0653C11.7202%2013.0766%2011.7038%2013.079%2011.6929%2013.079C11.6809%2013.079%2011.6694%2013.0762%2011.6587%2013.0708L8.22108%2011.3192C8.15189%2011.284%208.07593%2011.2663%207.99998%2011.2663C7.92402%2011.2663%207.84807%2011.284%207.77882%2011.3193L4.34118%2013.0708C4.33052%2013.0763%204.31904%2013.079%204.30701%2013.079C4.29611%2013.079%204.27969%2013.0767%204.26373%2013.0654C4.24092%2013.0494%204.22975%2013.0226%204.2345%2012.9957L4.89104%209.28584C4.91747%209.13646%204.86637%208.98401%204.75439%208.87822L1.97327%206.25091C1.95308%206.23184%201.94595%206.20383%201.95466%206.17786C1.9634%206.15185%201.98612%206.13326%202.01405%206.12933L5.85743%205.58807C6.0122%205.56626%206.14599%205.47208%206.21521%205.33616L7.93404%201.9608C7.94653%201.9363%207.97178%201.92107%207.99998%201.92107C8.02818%201.92107%208.05343%201.9363%208.06591%201.9608L9.78468%205.33607C9.85391%205.47199%209.9877%205.5662%2010.1425%205.58799L13.9859%206.12924C14.0138%206.1332%2014.0365%206.15176%2014.0452%206.17777C14.0539%206.20374%2014.0468%206.23175%2014.0266%206.25082Z'%20fill='%231A1F2A'/%3e%3c/svg%3e",Zo={class:"btn btn-xs btn-circle btn-ghost"},Wo={key:0,src:zo,alt:"Clear",class:"w-4"},Go={key:1,src:Uo,alt:"Clear",class:"w-4"},qo={__name:"FavoriteBtn",props:{isFilled:Boolean},setup(e){const l=e;return(t,o)=>(n.openBlock(),n.createElementBlock("button",Zo,[l.isFilled?(n.openBlock(),n.createElementBlock("img",Wo)):(n.openBlock(),n.createElementBlock("img",Go))]))}},Jo={class:"flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center"},Ko={class:"text-sm text-gray-600"},Yo={key:0,class:"italic"},Qo=n.createElementVNode("div",{class:"flex-grow"},null,-1),wt={__name:"TranslationBtnGroup",props:{loading:{type:Boolean,default:!1},src:{type:String,default:""},srcLabel:{type:String,default:""},type:{type:String,default:""},phonetic:{type:String,default:""},isClearBtn:{type:Boolean,default:!1},isFavoriteBtn:{type:Boolean,default:!1},isFavorite:{type:Boolean,default:!1},onFavorite:{type:Function,default:()=>{}}},emits:["clear","favorite","loadTTS"],setup(e,{emit:l}){const t=e,o=l;return(s,a)=>(n.openBlock(),n.createElementBlock("div",Jo,[t.src?(n.openBlock(),n.createBlock(Po,{key:0,type:t.type,onLoadTTS:a[0]||(a[0]=i=>o("loadTTS"))},null,8,["type"])):n.createCommentVNode("",!0),n.createElementVNode("div",Ko,[n.createTextVNode(n.toDisplayString(e.srcLabel)+" ",1),e.phonetic?(n.openBlock(),n.createElementBlock("span",Yo,"- ["+n.toDisplayString(t.phonetic)+"]",1)):n.createCommentVNode("",!0)]),Qo,t.loading?(n.openBlock(),n.createBlock(No,{key:1})):n.createCommentVNode("",!0),t.src&&t.isClearBtn?(n.openBlock(),n.createBlock(Ho,{key:2,onClick:a[1]||(a[1]=i=>o("clear"))})):n.createCommentVNode("",!0),t.src&&t.isFavoriteBtn?(n.openBlock(),n.createBlock(qo,{key:3,isFilled:t.isFavorite,onClick:a[2]||(a[2]=i=>o("favorite"))},null,8,["isFilled"])):n.createCommentVNode("",!0)]))}},X=_e("translation",()=>{const e=n.ref(null),l=n.ref(null),t=n.ref(null),o=n.ref({src:null,target:null}),s=n.ref(null),a=n.ref([]),i=n.ref([]),r=n.ref([]),c=n.ref([]),u=n.ref({src:null,target:null}),d=xe(),m=n.computed(()=>d.getLabel(e.value)),_=n.computed(()=>d.getLabel(l.value));function x(h){e.value=h.src,l.value=h.target,t.value=h.text,o.value=h.phonetic,s.value=h.result,a.value=h.dictionary,i.value=h.definitions,r.value=h.synonyms,c.value=h.examples,u.value=h.tts}function g(){e.value=null,l.value=null,t.value=null,o.value={src:null,target:null},s.value=null,a.value=[],i.value=[],r.value=[],c.value=[],u.value={src:null,target:null}}return{src:e,srcLabel:m,target:l,targetLabel:_,phonetic:o,text:t,result:s,dictionary:a,definitions:i,synonyms:r,examples:c,tts:u,init:x,reset:g}});function Xo(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function we(e){return typeof e=="function"?e():n.unref(e)}const el=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Et=()=>{};function tl(e,l){function t(...o){return new Promise((s,a)=>{Promise.resolve(e(()=>l.apply(this,o),{fn:l,thisArg:this,args:o})).then(s).catch(a)})}return t}function nl(e,l={}){let t,o,s=Et;const a=r=>{clearTimeout(r),s(),s=Et};return r=>{const c=we(e),u=we(l.maxWait);return t&&a(t),c<=0||u!==void 0&&u<=0?(o&&(a(o),o=null),Promise.resolve(r())):new Promise((d,m)=>{s=l.rejectOnCancel?m:d,u&&!o&&(o=setTimeout(()=>{t&&a(t),o=null,d(r())},u)),t=setTimeout(()=>{o&&a(o),o=null,d(r())},c)})}}function ol(e,l=200,t={}){return tl(nl(l,t),e)}function St(e){var l;const t=we(e);return(l=t==null?void 0:t.$el)!=null?l:t}const ll=el?window:void 0;function sl(){const e=n.ref(!1),l=n.getCurrentInstance();return l&&n.onMounted(()=>{e.value=!0},l),e}function rl(e){const l=sl();return n.computed(()=>(l.value,!!e()))}function al(e,l,t={}){const{window:o=ll,...s}=t;let a;const i=rl(()=>o&&"ResizeObserver"in o),r=()=>{a&&(a.disconnect(),a=void 0)},c=n.computed(()=>Array.isArray(e)?e.map(m=>St(m)):[St(e)]),u=n.watch(c,m=>{if(r(),i.value&&o){a=new ResizeObserver(l);for(const _ of m)_&&a.observe(_,s)}},{immediate:!0,flush:"post"}),d=()=>{r(),u()};return Xo(d),{isSupported:i,stop:d}}function Ot(e){var l;const t=n.ref(e==null?void 0:e.element),o=n.ref(e==null?void 0:e.input),s=(l=e==null?void 0:e.styleProp)!=null?l:"height",a=n.ref(1);function i(){var r;if(!t.value)return;let c="";t.value.style[s]="1px",a.value=(r=t.value)==null?void 0:r.scrollHeight,e!=null&&e.styleTarget?we(e.styleTarget).style[s]=`${a.value}px`:c=`${a.value}px`,t.value.style[s]=c}return n.watch([o,t],()=>n.nextTick(i),{immediate:!0}),n.watch(a,()=>{var r;return(r=e==null?void 0:e.onResize)==null?void 0:r.call(e)}),al(t,()=>i()),e!=null&&e.watch&&n.watch(e.watch,i,{immediate:!0,deep:!0}),{textarea:t,input:o,triggerResize:i}}const il=ye({__name:"TranslationInput",props:{text:{type:String,default:""}},emits:["change","clear","loadTTS"],setup(e,{emit:l}){const t=X(),o=e,s=n.ref(""),a=n.computed(()=>t.src),i=n.computed(()=>t.srcLabel),r=n.computed(()=>{var g;return(g=t.phonetic)==null?void 0:g.src}),{textarea:c}=Ot({input:s,styleProp:"minHeight"}),u=l,d=ol(()=>{u("change",s.value)},ko.INPUT_DEBOUNCE);function m(){if(!s.value){_();return}d()}function _(){u("clear"),s.value="",c.value.focus()}async function x(){await n.nextTick(),c.value.select()}return n.watch(()=>o.text,g=>{s.value!==g&&x(),s.value=g}),(g,h)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(wt,{src:a.value,srcLabel:i.value,type:"src",phonetic:r.value,isClearBtn:!0,onClear:_,onLoadTTS:h[0]||(h[0]=E=>u("loadTTS"))},null,8,["src","srcLabel","phonetic"]),n.withDirectives(n.createElementVNode("textarea",{ref_key:"textarea",ref:c,"onUpdate:modelValue":h[1]||(h[1]=E=>s.value=E),class:"w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3 overflow-x-hidden overflow-y-hidden",autofocus:"",rows:"2",onInput:m,onFocus:x},null,544),[[n.vModelText,s.value,void 0,{trim:!0}]])],64))}},[["__scopeId","data-v-90bf3e0d"]]),cl=e=>(n.pushScopeId("data-v-4b9f4a7b"),e=e(),n.popScopeId(),e),ul={class:"flex flex-col"},dl=cl(()=>n.createElementVNode("div",{class:"w-full flex align-item-center justify-end mt-2"},null,-1)),fl=ye({__name:"TranslationResult",props:{isFavoriteFeatureEnabled:Boolean},emits:["loadTTS"],setup(e,{emit:l}){const t=X(),o=n.ref(!1),s=n.computed(()=>t.result),a=n.computed(()=>t.target),i=n.computed(()=>t.targetLabel),r=n.computed(()=>{var x;return(x=t.phonetic)==null?void 0:x.target}),c=e,u=Ce(),{textarea:d,input:m}=Ot({input:s,styleProp:"minHeight"}),_=l;return(x,g)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(wt,{loading:n.unref(u).loading,src:a.value,srcLabel:i.value,type:"target",isFavoriteBtn:c.isFavoriteFeatureEnabled,isFavorite:o.value,phonetic:r.value,onFavorite:g[0]||(g[0]=h=>o.value=!o.value),onLoadTTS:g[1]||(g[1]=h=>_("loadTTS"))},null,8,["loading","src","srcLabel","isFavoriteBtn","isFavorite","phonetic"]),n.createElementVNode("div",ul,[n.withDirectives(n.createElementVNode("textarea",{ref_key:"textarea",ref:d,"onUpdate:modelValue":g[2]||(g[2]=h=>n.isRef(m)?m.value=h:null),class:"w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3 overflow-x-hidden overflow-y-hidden",readonly:"",rows:"2",spellcheck:"false"},null,512),[[n.vModelText,n.unref(m)]]),dl])],64))}},[["__scopeId","data-v-4b9f4a7b"]]),pl={class:"btn btn-sm btn-circle btn-ghost"},Ee={__name:"ToggleBtn",props:{isExpanded:Boolean},setup(e){const l=e;return(t,o)=>(n.openBlock(),n.createElementBlock("button",pl,[l.isExpanded?(n.openBlock(),n.createBlock(n.unref(Un),{key:0,class:"w-7 text-gray-400"})):(n.openBlock(),n.createBlock(n.unref(Hn),{key:1,class:"w-7 text-gray-400"}))]))}},ml={class:"card border bg-white rounded-lg"},hl={class:"card-body px-4 py-2 gap-0"},gl={class:"flex justify-between items-center"},bl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Translations",-1),vl={class:"capitalize text-base font-normal text-textSecondary mb-1"},_l={class:"list-none list-inside"},Cl=["onClick"],xl={class:"text-base font-normal text-gray-800 leading-4"},yl={__name:"Dictionary",emits:["translate"],setup(e,{emit:l}){const t=n.ref(!0),o=X(),s=xe(),a=n.computed(()=>o.dictionary),i=l,r=()=>{t.value=!t.value},c=u=>{i("translate",u,o.target,o.src),s.src=o.target,s.target=o.src,window.scrollTo(0,0)};return(u,d)=>(n.openBlock(),n.createElementBlock("div",ml,[n.createElementVNode("div",hl,[n.createElementVNode("div",gl,[bl,n.createVNode(Ee,{isExpanded:t.value,onClick:r},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",t.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,(m,_)=>(n.openBlock(),n.createElementBlock("li",{key:`${m.pos}-${_}`,class:"mb-2"},[n.createElementVNode("h5",vl,n.toDisplayString(m.pos),1),n.createElementVNode("ul",_l,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.items,(x,g)=>(n.openBlock(),n.createElementBlock("li",{key:`${x.word}-${g}`},[n.createElementVNode("span",{class:"p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",onClick:h=>c(x.word)},n.toDisplayString(x.word),9,Cl),n.createElementVNode("small",xl," - "+n.toDisplayString(x.reverse_translation.join(", ")),1)]))),128))])]))),128))])],2)])]))}},wl={class:"card border bg-white rounded-lg"},El={class:"card-body px-4 py-2 gap-0"},Sl={class:"flex justify-between items-center"},Ol=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Definitions",-1),kl={class:"capitalize text-base font-normal text-textSecondary mb-1"},$l={class:"text-base text-textCustom list-decimal list-outside ml-5"},Vl=n.createElementVNode("br",null,null,-1),Tl={key:0,class:"italic"},Nl={__name:"Definition",setup(e){const l=n.ref(!0),t=X(),o=n.computed(()=>t.definitions),s=()=>{l.value=!l.value};return(a,i)=>(n.openBlock(),n.createElementBlock("div",wl,[n.createElementVNode("div",El,[n.createElementVNode("div",Sl,[Ol,n.createVNode(Ee,{isExpanded:l.value,onClick:s},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",l.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,(r,c)=>(n.openBlock(),n.createElementBlock("li",{key:`${r.pos}-${c}`,class:"mb-2"},[n.createElementVNode("h5",kl,n.toDisplayString(r.pos),1),n.createElementVNode("ul",$l,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.items,(u,d)=>(n.openBlock(),n.createElementBlock("li",{key:`${u.gloss}-${d}`,class:"mb-1"},[n.createElementVNode("span",null,n.toDisplayString(u.gloss),1),Vl,u.example?(n.openBlock(),n.createElementBlock("small",Tl,'"'+n.toDisplayString(u.example)+'"',1)):n.createCommentVNode("",!0)]))),128))])]))),128))])],2)])]))}},Il={class:"card border bg-white rounded-lg"},Ll={class:"card-body px-4 py-2 gap-0"},Bl={class:"flex justify-between items-center"},Rl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Examples",-1),Pl={class:"text-textCustom list-decimal list-outside ml-7 mt-2"},Ml=["innerHTML"],Dl={__name:"Example",setup(e){const l=n.ref(!0),t=X(),o=n.computed(()=>t.examples),s=()=>{l.value=!l.value};return(a,i)=>(n.openBlock(),n.createElementBlock("div",Il,[n.createElementVNode("div",Ll,[n.createElementVNode("div",Bl,[Rl,n.createVNode(Ee,{isExpanded:l.value,onClick:s},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",l.value?"max-h-[1000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",Pl,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,(r,c)=>(n.openBlock(),n.createElementBlock("li",{key:`${r.definition_id}-${c}`,innerHTML:r},null,8,Ml))),128))])],2)])]))}},Al={class:"card border bg-white rounded-lg"},Fl={class:"card-body px-4 py-2 gap-0"},jl={class:"flex justify-between items-center"},Hl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Synonyms",-1),zl={class:"capitalize text-base font-normal text-textSecondary mb-1"},Ul={class:"list-none list-inside"},Zl={class:"flex flex-wrap"},Wl=["onClick"],Gl={__name:"Synonyms",emits:["translate"],setup(e,{emit:l}){const t=n.ref(!0),o=X(),s=n.computed(()=>o.synonyms),a=l,i=()=>{t.value=!t.value},r=c=>{a("translate",c),window.scrollTo(0,0)};return(c,u)=>(n.openBlock(),n.createElementBlock("div",Al,[n.createElementVNode("div",Fl,[n.createElementVNode("div",jl,[Hl,n.createVNode(Ee,{isExpanded:t.value,onClick:i},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",t.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,(d,m)=>(n.openBlock(),n.createElementBlock("li",{key:`${d.pos}-${m}`,class:"mb-2"},[n.createElementVNode("h5",zl,n.toDisplayString(d.pos),1),n.createElementVNode("ul",Ul,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.items,(_,x)=>(n.openBlock(),n.createElementBlock("li",{key:`${_.word}-${x}`,class:"mb-2"},[n.createElementVNode("div",Zl,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.synonym,(g,h)=>(n.openBlock(),n.createElementBlock("span",{key:`${g}-${h}`,class:"p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",onClick:E=>r(g)},n.toDisplayString(g),9,Wl))),128))])]))),128))])]))),128))])],2)])]))}};function ql(){document.documentElement.setAttribute("dir","rtl")}function Jl(){document.documentElement.removeAttribute("dir")}const kt={supportRTL:ql,removeRTL:Jl},Kl=["ar","fa","iw","yi","ur","pa"],Yl={class:"bg-white min-h-screen flex flex-col"},Ql={class:"py-2 px-5 shadow-lg"},Xl={class:"px-5 flex-grow"},es={class:"flex flex-col lg:flex-row lg:gap-2"},ts={class:"w-full lg:w-[calc(50%-1rem)] my-2"},ns=n.createElementVNode("div",{class:"w-6 h-4 mx-auto hidden lg:block"},null,-1),os={class:"w-full lg:w-[calc(50%-1rem)] my-2"},ls={class:"grid grid-cols-1 lg:grid-cols-3 gap-4"},ss={key:0,class:"w-full my-4"},rs={key:1,class:"text-textCustom italic font-medium"},as={__name:"Popup",props:{opt:{type:Object,default:null},languages:{type:Object,default:null},translation:{type:Object,default:null},tts:{type:Object,default:null},isFavoriteFeatureEnabled:{type:Boolean,default:!1}},emits:["opt","translate","reader","settings","fullscreen","loadTTS"],setup(e,{emit:l}){const t=go(),o=X(t),s=yt(t),a=xe(t),i=Ce(t),r=e,c=l,u=n.ref(""),d=()=>{const h=r.opt.target;Kl.includes(h)?kt.supportRTL():kt.removeRTL()};n.watch(()=>r.translation,h=>{h&&(i.loading=!1,u.value=h.text,o.init(h),s.reset())},{immediate:!0}),n.watch(()=>r.tts,h=>{if(!h){s.reset();return}s.set(h)},{immediate:!0}),n.watch([()=>r.opt,()=>r.languages],([h,E])=>{a.init(h,E),d()}),n.watch([()=>a.src,()=>a.target],([h,E])=>{c("opt",{src:h,target:E}),g(u.value)}),n.onMounted(()=>{a.init(r.opt,r.languages),d()});function m(){u.value="",o.reset()}function _(h){g(h)}function x(h){const E=h==="src"?o.text:o.result;c("loadTTS",{type:h,data:E})}function g(h,E=a.src,N=a.target){h&&(u.value=h,i.loading=!0,c("translate",{src:E,target:N,text:h}))}return(h,E)=>{var N,S,V,I;return n.openBlock(),n.createElementBlock("div",Yl,[n.createElementVNode("div",Ql,[n.createVNode(jt,{onReader:E[0]||(E[0]=b=>c("reader")),onSettings:E[1]||(E[1]=b=>c("settings")),onFullScreen:E[2]||(E[2]=b=>c("fullscreen"))})]),n.createElementVNode("div",Xl,[n.createVNode(Oo,{class:"my-4"}),n.createElementVNode("div",es,[n.createElementVNode("div",ts,[n.createVNode(il,{text:u.value,onChange:_,onClear:m,onLoadTTS:E[3]||(E[3]=b=>x("src"))},null,8,["text"])]),ns,n.createElementVNode("div",os,[n.createVNode(fl,{isFavoriteFeatureEnabled:e.isFavoriteFeatureEnabled,onLoadTTS:E[4]||(E[4]=b=>x("target"))},null,8,["isFavoriteFeatureEnabled"])])]),r.translation?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createElementVNode("div",ls,[(N=n.unref(o).dictionary)!=null&&N.length?(n.openBlock(),n.createBlock(yl,{key:0,onTranslate:g})):n.createCommentVNode("",!0),(S=n.unref(o).definitions)!=null&&S.length?(n.openBlock(),n.createBlock(Nl,{key:1})):n.createCommentVNode("",!0),(V=n.unref(o).synonyms)!=null&&V.length?(n.openBlock(),n.createBlock(Gl,{key:2,onTranslate:g})):n.createCommentVNode("",!0)]),(I=n.unref(o).examples)!=null&&I.length?(n.openBlock(),n.createElementBlock("div",ss,[n.createVNode(Dl)])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock("span",rs,"Service unavailable"))])])}}};G.default=as,Object.defineProperties(G,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
17
+ This will fail in production.`);r=ae,r._s.has(o)||(a?Re(o,l,s,r):Ct(o,s,r),process.env.NODE_ENV!=="production"&&(i._pinia=r));const d=r._s.get(o);if(process.env.NODE_ENV!=="production"&&c){const m="__hot:"+o,b=a?Re(m,l,s,r,!0):Ct(m,F({},s),r,!0);c._hotUpdate(b),delete r.state.value[m],r._s.delete(m)}if(process.env.NODE_ENV!=="production"&&me){const m=n.getCurrentInstance();if(m&&m.proxy&&!c){const b=m.proxy,C="_pStores"in b?b._pStores:b._pStores={};C[o]=d}}return d}return i.$id=o,i}const _e=Ce("loader",()=>({loading:n.ref(!1)})),_t={__name:"Select",props:n.mergeModels({languages:{type:Object,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=_e(),t=e,o=n.useModel(e,"modelValue"),s=n.ref(""),a=n.ref(null),i=n.computed(()=>Object.entries(t.languages).filter(([,c])=>c.toLowerCase().includes(s.value.toLowerCase()))),r=c=>{c.target.value="",s.value="",a.value&&a.value.$el.click()};return(c,u)=>(n.openBlock(),n.createBlock(n.unref(Mn),{modelValue:o.value,"onUpdate:modelValue":u[3]||(u[3]=d=>o.value=d),disabled:n.unref(l).loading,as:"div",class:"relative mt-1"},{default:n.withCtx(()=>[n.createVNode(n.unref(Fn),{class:"w-full bg-white border border-gray-300 rounded py-2.5 pl-3 pr-10 text-sm text-gray-800 font-medium focus:outline-none focus:ring-0.5 focus:ring-gray-400 focus:border-gray-400",onChange:u[0]||(u[0]=d=>s.value=d.target.value),displayValue:d=>e.languages[d],onFocus:u[1]||(u[1]=d=>r(d))},null,8,["displayValue"]),n.createVNode(n.unref(Dn),{ref_key:"btnSelect",ref:a,class:"absolute inset-y-0 right-0 flex items-center pr-2"},{default:n.withCtx(()=>[n.createVNode(n.unref(zn),{class:"h-5 w-5 text-gray-400","aria-hidden":"true",onClick:u[2]||(u[2]=d=>r(d))})]),_:1},512),n.createVNode(n.unref(An),{class:"absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm z-50"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.value,([d,m])=>(n.openBlock(),n.createBlock(n.unref(jn),{key:d,value:d},{default:n.withCtx(({active:b,selected:C})=>[n.createElementVNode("li",{class:n.normalizeClass(["relative cursor-default select-none py-2 pl-3 pr-9",b?"bg-[#3B5695] text-white":"text-textCustom"])},[n.createElementVNode("span",{class:n.normalizeClass(["block truncate",C&&"font-semibold"])},n.toDisplayString(m),3)],2)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue","disabled"]))}},xt="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.68688%202.3131C3.88214%202.50837%203.88214%202.82495%203.68688%203.02021L2.04043%204.66666L3.68688%206.3131C3.88214%206.50837%203.88214%206.82495%203.68688%207.02021C3.49162%207.21547%203.17504%207.21547%202.97977%207.02021L0.979775%205.02021C0.784513%204.82495%200.784513%204.50837%200.979775%204.3131L2.97977%202.3131C3.17504%202.11784%203.49162%202.11784%203.68688%202.3131Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M12.3131%208.97977C12.5084%208.78451%2012.825%208.78451%2013.0202%208.97977L15.0202%2010.9798C15.2155%2011.175%2015.2155%2011.4916%2015.0202%2011.6869L13.0202%2013.6869C12.825%2013.8821%2012.5084%2013.8821%2012.3131%2013.6869C12.1178%2013.4916%2012.1178%2013.175%2012.3131%2012.9798L13.9596%2011.3333L12.3131%209.68688C12.1178%209.49161%2012.1178%209.17503%2012.3131%208.97977Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M0.833328%204.66666C0.833328%204.39051%201.05719%204.16666%201.33333%204.16666H14.6667C14.9428%204.16666%2015.1667%204.39051%2015.1667%204.66666C15.1667%204.9428%2014.9428%205.16666%2014.6667%205.16666H1.33333C1.05719%205.16666%200.833328%204.9428%200.833328%204.66666Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M0.833328%2011.3333C0.833328%2011.0572%201.05719%2010.8333%201.33333%2010.8333H14.6667C14.9428%2010.8333%2015.1667%2011.0572%2015.1667%2011.3333C15.1667%2011.6095%2014.9428%2011.8333%2014.6667%2011.8333H1.33333C1.05719%2011.8333%200.833328%2011.6095%200.833328%2011.3333Z'%20fill='%237E7E7E'/%3e%3c/svg%3e",_o=["disabled"],xo=[n.createElementVNode("img",{src:xt,alt:"swap",class:"w-4"},null,-1)],yo=["disabled"],wo=[n.createElementVNode("img",{src:xt,alt:"swap",class:"w-4"},null,-1)],Eo={__name:"SwapBtn",props:{isBidirect:{type:Boolean,default:!1}},emits:["swap"],setup(e,{emit:l}){const t=_e(),o=l;return(s,a)=>e.isBidirect?(n.openBlock(),n.createElementBlock("button",{key:1,onClick:a[0]||(a[0]=i=>o("swap")),disabled:n.unref(t).loading},wo,8,yo)):(n.openBlock(),n.createElementBlock("button",{key:0,disabled:n.unref(t).loading},xo,8,_o))}},xe=Ce("language",()=>{const e=n.ref("auto"),l=n.ref("en"),t=n.ref({src:[],target:[]}),o=n.computed(()=>t.value.src[e.value]),s=n.computed(()=>t.value.target[l.value]);function a(c,u){e.value=c==null?void 0:c.src,l.value=c==null?void 0:c.target,t.value=u}function i(){if(!t.value.src[l.value]||!t.value.target[e.value])return;const c=e.value;e.value=l.value,l.value=c}function r(c){return t.value.src[c]||t.value.target[c]}return{languages:t,src:e,target:l,srcLabel:o,targetLabel:s,init:a,swap:i,getLabel:r}}),So={key:0,class:"flex"},Oo={__name:"Selects",setup(e){const l=xe();function t(){l.swap()}return(o,s)=>n.unref(l).languages?(n.openBlock(),n.createElementBlock("div",So,[n.createVNode(_t,{modelValue:n.unref(l).src,"onUpdate:modelValue":s[0]||(s[0]=a=>n.unref(l).src=a),languages:n.unref(l).languages.src,class:"grow"},null,8,["modelValue","languages"]),n.createVNode(Eo,{isBidirect:n.unref(l).src!=="auto",class:"grow-0 mx-3",onSwap:t},null,8,["isBidirect"]),n.createVNode(_t,{modelValue:n.unref(l).target,"onUpdate:modelValue":s[1]||(s[1]=a=>n.unref(l).target=a),languages:n.unref(l).languages.target,class:"grow"},null,8,["modelValue","languages"])])):n.createCommentVNode("",!0)}},ko={INPUT_MAX_LENGTH:5e3,INPUT_DEBOUNCE:500},ye=(e,l)=>{const t=e.__vccOpts||e;for(const[o,s]of l)t[o]=s;return t},$o={},Vo={class:"mr-2 loading loading-dots loading-xs"};function To(e,l){return n.openBlock(),n.createElementBlock("span",Vo)}const No=ye($o,[["render",To]]),Io="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.33325%204.66667H3.51125C3.82693%204.6667%204.13239%204.55473%204.37325%204.35067L6.83392%202.26667C6.99592%202.12953%207.19374%202.04156%207.40407%202.01312C7.61441%201.98468%207.82849%202.01696%208.02109%202.10615C8.21369%202.19534%208.37678%202.33772%208.49114%202.51652C8.60551%202.69532%208.66638%202.90309%208.66659%203.11534V12.8847C8.66649%2013.097%208.60565%2013.305%208.49125%2013.4839C8.37685%2013.6628%208.21367%2013.8053%208.02094%2013.8945C7.82822%2013.9837%207.614%2014.0159%207.40356%2013.9874C7.19312%2013.9588%206.99523%2013.8707%206.83325%2013.7333L4.37325%2011.6487C4.13229%2011.4449%203.82685%2011.3331%203.51125%2011.3333H2.33325C2.06804%2011.3333%201.81368%2011.228%201.62615%2011.0404C1.43861%2010.8529%201.33325%2010.5986%201.33325%2010.3333V5.66667C1.33325%205.40145%201.43861%205.1471%201.62615%204.95956C1.81368%204.77203%202.06804%204.66667%202.33325%204.66667ZM11.1779%2011.18C11.5969%2010.763%2011.9294%2010.2674%2012.1562%209.72156C12.3831%209.17572%2012.4999%208.59044%2012.4999%207.99934C12.4999%207.40823%2012.3831%206.82295%2012.1562%206.27711C11.9294%205.73127%2011.5969%205.23564%2011.1779%204.81867C11.1317%204.77098%2011.0765%204.73297%2011.0155%204.70686C10.9544%204.68075%2010.8888%204.66705%2010.8224%204.66657C10.756%204.66609%2010.6902%204.67883%2010.6288%204.70406C10.5674%204.72929%2010.5116%204.76649%2010.4647%204.8135C10.4179%204.86051%2010.3808%204.91639%2010.3558%204.97787C10.3307%205.03935%2010.3181%205.10521%2010.3188%205.17159C10.3195%205.23798%2010.3334%205.30357%2010.3597%205.36453C10.3859%205.42549%2010.4241%205.48061%2010.4719%205.52667C10.7977%205.85079%2011.0562%206.23609%2011.2326%206.66043C11.409%207.08477%2011.4998%207.53979%2011.4998%207.99934C11.4998%208.45888%2011.409%208.9139%2011.2326%209.33824C11.0562%209.76258%2010.7977%2010.1479%2010.4719%2010.472C10.4241%2010.5181%2010.3859%2010.5732%2010.3597%2010.6341C10.3334%2010.6951%2010.3195%2010.7607%2010.3188%2010.8271C10.3181%2010.8935%2010.3307%2010.9593%2010.3558%2011.0208C10.3808%2011.0823%2010.4179%2011.1382%2010.4647%2011.1852C10.5116%2011.2322%2010.5674%2011.2694%2010.6288%2011.2946C10.6902%2011.3198%2010.756%2011.3326%2010.8224%2011.3321C10.8888%2011.3316%2010.9544%2011.3179%2011.0155%2011.2918C11.0765%2011.2657%2011.1317%2011.2277%2011.1779%2011.18ZM12.7113%2013.2127C12.6123%2013.2126%2012.5157%2013.1832%2012.4335%2013.1281C12.3513%2013.0731%2012.2873%2012.9949%2012.2495%2012.9035C12.2118%2012.8121%2012.202%2012.7115%2012.2214%2012.6146C12.2408%2012.5176%2012.2886%2012.4285%2012.3586%2012.3587C12.9317%2011.7866%2013.3865%2011.1071%2013.6967%2010.359C14.0069%209.61101%2014.1666%208.80915%2014.1666%207.99934C14.1666%207.18952%2014.0069%206.38766%2013.6967%205.63963C13.3865%204.8916%2012.9317%204.2121%2012.3586%203.64C12.3122%203.59351%2012.2754%203.53834%2012.2503%203.47764C12.2252%203.41693%2012.2124%203.35188%2012.2124%203.2862C12.2125%203.22052%2012.2255%203.15549%2012.2507%203.09483C12.2759%203.03417%2012.3128%202.97907%2012.3593%202.93267C12.4057%202.88627%2012.4609%202.84948%2012.5216%202.8244C12.5823%202.79932%2012.6474%202.78645%2012.7131%202.78651C12.7787%202.78657%2012.8438%202.79957%2012.9044%202.82476C12.9651%202.84995%2013.0202%202.88685%2013.0666%202.93334C13.7327%203.59825%2014.2612%204.38801%2014.6218%205.25741C14.9824%206.12681%2015.168%207.05879%2015.168%208C15.168%208.94122%2014.9824%209.87319%2014.6218%2010.7426C14.2612%2011.612%2013.7327%2012.4018%2013.0666%2013.0667C13.02%2013.1134%2012.9646%2013.1504%2012.9036%2013.1756C12.8426%2013.2007%2012.7772%2013.2129%2012.7113%2013.2127Z'%20fill='%233B5695'/%3e%3c/svg%3e",Lo="data:image/svg+xml,%3csvg%20class='swap-on%20fill-current%20h-4%20w-4'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill-rule='evenodd'%20d='M4.5%207.5a3%203%200%200%201%203-3h9a3%203%200%200%201%203%203v9a3%203%200%200%201-3%203h-9a3%203%200%200%201-3-3v-9Z'%20clip-rule='evenodd'%20fill='%238595BE'/%3e%3c/svg%3e",yt=Ce("tts",()=>{const e=n.ref({src:null,target:null});function l(s){s.src&&(e.value.src=s.src),s.target&&(e.value.target=s.target)}function t(s){if(s==="src")return e.value.src;if(s==="target")return e.value.target}function o(){e.value={src:null,target:null}}return{tts:e,set:l,get:t,reset:o}}),Bo=[n.createElementVNode("img",{src:Io,alt:"Play"},null,-1)],Ro=[n.createElementVNode("img",{src:Lo,alt:"Stop"},null,-1)],Po={__name:"SpeakBtn",props:{type:{type:String,default:""}},emits:["loadTTS"],setup(e,{emit:l}){const t=yt(),o=e,s=l,a=n.computed(()=>t.tts[o.type]),i=n.ref(!1),r=new Audio;n.watch(a,()=>{if(!a.value){i.value=!1;return}u()},{immediate:!0}),n.onUnmounted(()=>{d(),r.src=""});function c(){if(a.value){u();return}i.value=!0,s("loadTTS")}function u(){a.value&&(r.src=a.value,i.value=!0,r.play().catch(()=>{i.value=!1}))}function d(){r.pause(),r.currentTime=0,i.value=!1}return r.onended=()=>{i.value=!1},(m,b)=>i.value?(n.openBlock(),n.createElementBlock("button",{key:1,class:"btn btn-xs btn-ghost btn-circle",onClick:n.withModifiers(d,["prevent"])},Ro)):(n.openBlock(),n.createElementBlock("button",{key:0,class:"btn btn-xs btn-ghost btn-circle",onClick:n.withModifiers(c,["prevent"])},Bo))}},Mo="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.19102%203.19102C3.44571%202.93633%203.85864%202.93633%204.11333%203.19102L12.809%2011.8867C13.0637%2012.1414%2013.0637%2012.5543%2012.809%2012.809C12.5543%2013.0637%2012.1414%2013.0637%2011.8867%2012.809L3.19102%204.11333C2.93633%203.85864%202.93633%203.44571%203.19102%203.19102Z'%20fill='%231A1F2A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.809%203.19102C13.0637%203.44571%2013.0637%203.85864%2012.809%204.11333L4.11333%2012.809C3.85864%2013.0637%203.44571%2013.0637%203.19102%2012.809C2.93633%2012.5543%202.93633%2012.1414%203.19102%2011.8867L11.8867%203.19102C12.1414%202.93633%2012.5543%202.93633%2012.809%203.19102Z'%20fill='%231A1F2A'/%3e%3c/svg%3e",Do={},Fo={class:"btn btn-xs btn-circle btn-ghost"},Ao=[n.createElementVNode("img",{src:Mo,alt:"Clear",class:"w-4"},null,-1)];function jo(e,l){return n.openBlock(),n.createElementBlock("button",Fo,Ao)}const Ho=ye(Do,[["render",jo]]),zo="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.47207%201.31905C7.57125%201.12371%207.77589%201%208.00001%201C8.22413%201%208.42877%201.12367%208.52795%201.31905L10.3721%204.95175L14.4959%205.53427C14.7177%205.5656%2014.9019%205.7166%2014.9712%205.9238C15.0404%206.13101%2014.9827%206.35843%2014.8222%206.51049L11.8382%209.33816L12.5427%2013.3309C12.5806%2013.5456%2012.4897%2013.7626%2012.3084%2013.8906C12.1272%2014.0187%2011.8868%2014.0356%2011.6884%2013.9342L8.00004%2012.0491L4.31158%2013.9343C4.11323%2014.0356%203.87286%2014.0187%203.69157%2013.8907C3.51028%2013.7627%203.4195%2013.5457%203.45736%2013.3309L4.1618%209.33819L1.17781%206.51052C1.01735%206.35846%200.959571%206.13101%201.02884%205.92383C1.09807%205.71663%201.28232%205.56563%201.50409%205.53431L5.62787%204.95178L7.47207%201.31905Z'%20fill='%23FFC857'/%3e%3c/svg%3e",Uo="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9491%205.89315C14.8278%205.53128%2014.5111%205.27252%2014.1226%205.21783L10.5264%204.7114L8.91813%201.55315C8.74435%201.21195%208.39257%201%207.99998%201C7.60739%201%207.25557%201.21195%207.08183%201.55315L5.47358%204.7114L1.8774%205.21783C1.48888%205.27252%201.17219%205.53128%201.05086%205.89315C0.929554%206.25501%201.02881%206.64477%201.30993%206.91038L3.91217%209.36871L3.29786%2012.8399C3.2315%2013.215%203.38755%2013.5868%203.7052%2013.8105C3.88128%2013.9344%204.08938%2014%204.30704%2014C4.47232%2014%204.63705%2013.9606%204.78341%2013.886L7.99995%2012.2471L11.2165%2013.886C11.3628%2013.9606%2011.5276%2014%2011.6929%2014C11.9106%2014%2012.1187%2013.9345%2012.2948%2013.8105C12.6124%2013.5868%2012.7685%2013.215%2012.7021%2012.84L12.0878%209.36871L14.6901%206.91035C14.9712%206.64477%2015.0704%206.25498%2014.9491%205.89315ZM14.0266%206.25082L11.2455%208.87813C11.1335%208.98392%2011.0824%209.13637%2011.1089%209.28575L11.7654%2012.9956C11.7701%2013.0226%2011.759%2013.0493%2011.7362%2013.0653C11.7202%2013.0766%2011.7038%2013.079%2011.6929%2013.079C11.6809%2013.079%2011.6694%2013.0762%2011.6587%2013.0708L8.22108%2011.3192C8.15189%2011.284%208.07593%2011.2663%207.99998%2011.2663C7.92402%2011.2663%207.84807%2011.284%207.77882%2011.3193L4.34118%2013.0708C4.33052%2013.0763%204.31904%2013.079%204.30701%2013.079C4.29611%2013.079%204.27969%2013.0767%204.26373%2013.0654C4.24092%2013.0494%204.22975%2013.0226%204.2345%2012.9957L4.89104%209.28584C4.91747%209.13646%204.86637%208.98401%204.75439%208.87822L1.97327%206.25091C1.95308%206.23184%201.94595%206.20383%201.95466%206.17786C1.9634%206.15185%201.98612%206.13326%202.01405%206.12933L5.85743%205.58807C6.0122%205.56626%206.14599%205.47208%206.21521%205.33616L7.93404%201.9608C7.94653%201.9363%207.97178%201.92107%207.99998%201.92107C8.02818%201.92107%208.05343%201.9363%208.06591%201.9608L9.78468%205.33607C9.85391%205.47199%209.9877%205.5662%2010.1425%205.58799L13.9859%206.12924C14.0138%206.1332%2014.0365%206.15176%2014.0452%206.17777C14.0539%206.20374%2014.0468%206.23175%2014.0266%206.25082Z'%20fill='%231A1F2A'/%3e%3c/svg%3e",Zo={class:"btn btn-xs btn-circle btn-ghost"},Wo={key:0,src:zo,alt:"Clear",class:"w-4"},Go={key:1,src:Uo,alt:"Clear",class:"w-4"},qo={__name:"FavoriteBtn",props:{isFilled:Boolean},setup(e){const l=e;return(t,o)=>(n.openBlock(),n.createElementBlock("button",Zo,[l.isFilled?(n.openBlock(),n.createElementBlock("img",Wo)):(n.openBlock(),n.createElementBlock("img",Go))]))}},Jo={class:"flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center"},Ko={class:"text-sm text-gray-600"},Yo={key:0,class:"italic"},Qo=n.createElementVNode("div",{class:"flex-grow"},null,-1),wt={__name:"TranslationBtnGroup",props:{loading:{type:Boolean,default:!1},src:{type:String,default:""},srcLabel:{type:String,default:""},type:{type:String,default:""},phonetic:{type:String,default:""},isClearBtn:{type:Boolean,default:!1},isFavoriteBtn:{type:Boolean,default:!1},isFavorite:{type:Boolean,default:!1},onFavorite:{type:Function,default:()=>{}}},emits:["clear","favorite","loadTTS"],setup(e,{emit:l}){const t=e,o=l;return(s,a)=>(n.openBlock(),n.createElementBlock("div",Jo,[t.src?(n.openBlock(),n.createBlock(Po,{key:0,type:t.type,onLoadTTS:a[0]||(a[0]=i=>o("loadTTS"))},null,8,["type"])):n.createCommentVNode("",!0),n.createElementVNode("div",Ko,[n.createTextVNode(n.toDisplayString(e.srcLabel)+" ",1),e.phonetic?(n.openBlock(),n.createElementBlock("span",Yo,"- ["+n.toDisplayString(t.phonetic)+"]",1)):n.createCommentVNode("",!0)]),Qo,t.loading?(n.openBlock(),n.createBlock(No,{key:1})):n.createCommentVNode("",!0),t.src&&t.isClearBtn?(n.openBlock(),n.createBlock(Ho,{key:2,onClick:a[1]||(a[1]=i=>o("clear"))})):n.createCommentVNode("",!0),t.src&&t.isFavoriteBtn?(n.openBlock(),n.createBlock(qo,{key:3,isFilled:t.isFavorite,onClick:a[2]||(a[2]=i=>o("favorite"))},null,8,["isFilled"])):n.createCommentVNode("",!0)]))}},X=Ce("translation",()=>{const e=n.ref(null),l=n.ref(null),t=n.ref(null),o=n.ref({src:null,target:null}),s=n.ref(null),a=n.ref([]),i=n.ref([]),r=n.ref([]),c=n.ref([]),u=n.ref({src:null,target:null}),d=xe(),m=n.computed(()=>d.getLabel(e.value)),b=n.computed(()=>d.getLabel(l.value));function C(h){e.value=h.src,l.value=h.target,t.value=h.text,o.value=h.phonetic,s.value=h.result,a.value=h.dictionary,i.value=h.definitions,r.value=h.synonyms,c.value=h.examples,u.value=h.tts}function _(){e.value=null,l.value=null,t.value=null,o.value={src:null,target:null},s.value=null,a.value=[],i.value=[],r.value=[],c.value=[],u.value={src:null,target:null}}return{src:e,srcLabel:m,target:l,targetLabel:b,phonetic:o,text:t,result:s,dictionary:a,definitions:i,synonyms:r,examples:c,tts:u,init:C,reset:_}});function Xo(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function we(e){return typeof e=="function"?e():n.unref(e)}const el=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Et=()=>{};function tl(e,l){function t(...o){return new Promise((s,a)=>{Promise.resolve(e(()=>l.apply(this,o),{fn:l,thisArg:this,args:o})).then(s).catch(a)})}return t}function nl(e,l={}){let t,o,s=Et;const a=r=>{clearTimeout(r),s(),s=Et};return r=>{const c=we(e),u=we(l.maxWait);return t&&a(t),c<=0||u!==void 0&&u<=0?(o&&(a(o),o=null),Promise.resolve(r())):new Promise((d,m)=>{s=l.rejectOnCancel?m:d,u&&!o&&(o=setTimeout(()=>{t&&a(t),o=null,d(r())},u)),t=setTimeout(()=>{o&&a(o),o=null,d(r())},c)})}}function ol(e,l=200,t={}){return tl(nl(l,t),e)}function St(e){var l;const t=we(e);return(l=t==null?void 0:t.$el)!=null?l:t}const ll=el?window:void 0;function sl(){const e=n.ref(!1),l=n.getCurrentInstance();return l&&n.onMounted(()=>{e.value=!0},l),e}function rl(e){const l=sl();return n.computed(()=>(l.value,!!e()))}function al(e,l,t={}){const{window:o=ll,...s}=t;let a;const i=rl(()=>o&&"ResizeObserver"in o),r=()=>{a&&(a.disconnect(),a=void 0)},c=n.computed(()=>Array.isArray(e)?e.map(m=>St(m)):[St(e)]),u=n.watch(c,m=>{if(r(),i.value&&o){a=new ResizeObserver(l);for(const b of m)b&&a.observe(b,s)}},{immediate:!0,flush:"post"}),d=()=>{r(),u()};return Xo(d),{isSupported:i,stop:d}}function Ot(e){var l;const t=n.ref(e==null?void 0:e.element),o=n.ref(e==null?void 0:e.input),s=(l=e==null?void 0:e.styleProp)!=null?l:"height",a=n.ref(1);function i(){var r;if(!t.value)return;let c="";t.value.style[s]="1px",a.value=(r=t.value)==null?void 0:r.scrollHeight,e!=null&&e.styleTarget?we(e.styleTarget).style[s]=`${a.value}px`:c=`${a.value}px`,t.value.style[s]=c}return n.watch([o,t],()=>n.nextTick(i),{immediate:!0}),n.watch(a,()=>{var r;return(r=e==null?void 0:e.onResize)==null?void 0:r.call(e)}),al(t,()=>i()),e!=null&&e.watch&&n.watch(e.watch,i,{immediate:!0,deep:!0}),{textarea:t,input:o,triggerResize:i}}const il=ye({__name:"TranslationInput",props:{text:{type:String,default:""}},emits:["change","clear","loadTTS"],setup(e,{emit:l}){const t=X(),o=e,s=n.ref(""),a=n.computed(()=>t.src),i=n.computed(()=>t.srcLabel),r=n.computed(()=>{var _;return(_=t.phonetic)==null?void 0:_.src}),{textarea:c}=Ot({input:s,styleProp:"minHeight"}),u=l,d=ol(()=>{u("change",s.value)},ko.INPUT_DEBOUNCE);function m(){if(!s.value){b();return}d()}function b(){u("clear"),s.value="",c.value.focus()}async function C(){await n.nextTick(),c.value.select()}return n.watch(()=>o.text,_=>{s.value!==_&&C(),s.value=_}),(_,h)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(wt,{src:a.value,srcLabel:i.value,type:"src",phonetic:r.value,isClearBtn:!0,onClear:b,onLoadTTS:h[0]||(h[0]=E=>u("loadTTS"))},null,8,["src","srcLabel","phonetic"]),n.withDirectives(n.createElementVNode("textarea",{ref_key:"textarea",ref:c,"onUpdate:modelValue":h[1]||(h[1]=E=>s.value=E),class:"w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3 overflow-x-hidden overflow-y-hidden",autofocus:"",rows:"2",onInput:m,onFocus:C},null,544),[[n.vModelText,s.value,void 0,{trim:!0}]])],64))}},[["__scopeId","data-v-90bf3e0d"]]),cl=e=>(n.pushScopeId("data-v-f47b8efe"),e=e(),n.popScopeId(),e),ul={class:"flex flex-col"},dl=cl(()=>n.createElementVNode("div",{class:"w-full flex align-item-center justify-end mt-2"},null,-1)),fl=ye({__name:"TranslationResult",props:{isFavoriteFeatureEnabled:Boolean,isFavorite:Boolean},emits:["loadTTS","favorite"],setup(e,{emit:l}){const t=X(),o=n.computed(()=>t.result),s=n.computed(()=>t.target),a=n.computed(()=>t.targetLabel),i=n.computed(()=>{var b;return(b=t.phonetic)==null?void 0:b.target}),r=e,c=_e(),{textarea:u,input:d}=Ot({input:o,styleProp:"minHeight"}),m=l;return(b,C)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(wt,{loading:n.unref(c).loading,src:s.value,srcLabel:a.value,type:"target",isFavoriteBtn:r.isFavoriteFeatureEnabled,isFavorite:e.isFavorite,phonetic:i.value,onFavorite:C[0]||(C[0]=_=>m("favorite")),onLoadTTS:C[1]||(C[1]=_=>m("loadTTS"))},null,8,["loading","src","srcLabel","isFavoriteBtn","isFavorite","phonetic"]),n.createElementVNode("div",ul,[n.withDirectives(n.createElementVNode("textarea",{ref_key:"textarea",ref:u,"onUpdate:modelValue":C[2]||(C[2]=_=>n.isRef(d)?d.value=_:null),class:"w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3 overflow-x-hidden overflow-y-hidden",readonly:"",rows:"2",spellcheck:"false"},null,512),[[n.vModelText,n.unref(d)]]),dl])],64))}},[["__scopeId","data-v-f47b8efe"]]),pl={class:"btn btn-sm btn-circle btn-ghost"},Ee={__name:"ToggleBtn",props:{isExpanded:Boolean},setup(e){const l=e;return(t,o)=>(n.openBlock(),n.createElementBlock("button",pl,[l.isExpanded?(n.openBlock(),n.createBlock(n.unref(Un),{key:0,class:"w-7 text-gray-400"})):(n.openBlock(),n.createBlock(n.unref(Hn),{key:1,class:"w-7 text-gray-400"}))]))}},ml={class:"card border bg-white rounded-lg"},hl={class:"card-body px-4 py-2 gap-0"},gl={class:"flex justify-between items-center"},bl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Translations",-1),vl={class:"capitalize text-base font-normal text-textSecondary mb-1"},Cl={class:"list-none list-inside"},_l=["onClick"],xl={class:"text-base font-normal text-gray-800 leading-4"},yl={__name:"Dictionary",emits:["translate"],setup(e,{emit:l}){const t=n.ref(!0),o=X(),s=xe(),a=n.computed(()=>o.dictionary),i=l,r=()=>{t.value=!t.value},c=u=>{i("translate",u,o.target,o.src),s.src=o.target,s.target=o.src,window.scrollTo(0,0)};return(u,d)=>(n.openBlock(),n.createElementBlock("div",ml,[n.createElementVNode("div",hl,[n.createElementVNode("div",gl,[bl,n.createVNode(Ee,{isExpanded:t.value,onClick:r},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",t.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,(m,b)=>(n.openBlock(),n.createElementBlock("li",{key:`${m.pos}-${b}`,class:"mb-2"},[n.createElementVNode("h5",vl,n.toDisplayString(m.pos),1),n.createElementVNode("ul",Cl,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.items,(C,_)=>(n.openBlock(),n.createElementBlock("li",{key:`${C.word}-${_}`},[n.createElementVNode("span",{class:"p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",onClick:h=>c(C.word)},n.toDisplayString(C.word),9,_l),n.createElementVNode("small",xl," - "+n.toDisplayString(C.reverse_translation.join(", ")),1)]))),128))])]))),128))])],2)])]))}},wl={class:"card border bg-white rounded-lg"},El={class:"card-body px-4 py-2 gap-0"},Sl={class:"flex justify-between items-center"},Ol=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Definitions",-1),kl={class:"capitalize text-base font-normal text-textSecondary mb-1"},$l={class:"text-base text-textCustom list-decimal list-outside ml-5"},Vl=n.createElementVNode("br",null,null,-1),Tl={key:0,class:"italic"},Nl={__name:"Definition",setup(e){const l=n.ref(!0),t=X(),o=n.computed(()=>t.definitions),s=()=>{l.value=!l.value};return(a,i)=>(n.openBlock(),n.createElementBlock("div",wl,[n.createElementVNode("div",El,[n.createElementVNode("div",Sl,[Ol,n.createVNode(Ee,{isExpanded:l.value,onClick:s},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",l.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,(r,c)=>(n.openBlock(),n.createElementBlock("li",{key:`${r.pos}-${c}`,class:"mb-2"},[n.createElementVNode("h5",kl,n.toDisplayString(r.pos),1),n.createElementVNode("ul",$l,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.items,(u,d)=>(n.openBlock(),n.createElementBlock("li",{key:`${u.gloss}-${d}`,class:"mb-1"},[n.createElementVNode("span",null,n.toDisplayString(u.gloss),1),Vl,u.example?(n.openBlock(),n.createElementBlock("small",Tl,'"'+n.toDisplayString(u.example)+'"',1)):n.createCommentVNode("",!0)]))),128))])]))),128))])],2)])]))}},Il={class:"card border bg-white rounded-lg"},Ll={class:"card-body px-4 py-2 gap-0"},Bl={class:"flex justify-between items-center"},Rl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Examples",-1),Pl={class:"text-textCustom list-decimal list-outside ml-7 mt-2"},Ml=["innerHTML"],Dl={__name:"Example",setup(e){const l=n.ref(!0),t=X(),o=n.computed(()=>t.examples),s=()=>{l.value=!l.value};return(a,i)=>(n.openBlock(),n.createElementBlock("div",Il,[n.createElementVNode("div",Ll,[n.createElementVNode("div",Bl,[Rl,n.createVNode(Ee,{isExpanded:l.value,onClick:s},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",l.value?"max-h-[1000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",Pl,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,(r,c)=>(n.openBlock(),n.createElementBlock("li",{key:`${r.definition_id}-${c}`,innerHTML:r},null,8,Ml))),128))])],2)])]))}},Fl={class:"card border bg-white rounded-lg"},Al={class:"card-body px-4 py-2 gap-0"},jl={class:"flex justify-between items-center"},Hl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Synonyms",-1),zl={class:"capitalize text-base font-normal text-textSecondary mb-1"},Ul={class:"list-none list-inside"},Zl={class:"flex flex-wrap"},Wl=["onClick"],Gl={__name:"Synonyms",emits:["translate"],setup(e,{emit:l}){const t=n.ref(!0),o=X(),s=n.computed(()=>o.synonyms),a=l,i=()=>{t.value=!t.value},r=c=>{a("translate",c),window.scrollTo(0,0)};return(c,u)=>(n.openBlock(),n.createElementBlock("div",Fl,[n.createElementVNode("div",Al,[n.createElementVNode("div",jl,[Hl,n.createVNode(Ee,{isExpanded:t.value,onClick:i},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",t.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,(d,m)=>(n.openBlock(),n.createElementBlock("li",{key:`${d.pos}-${m}`,class:"mb-2"},[n.createElementVNode("h5",zl,n.toDisplayString(d.pos),1),n.createElementVNode("ul",Ul,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.items,(b,C)=>(n.openBlock(),n.createElementBlock("li",{key:`${b.word}-${C}`,class:"mb-2"},[n.createElementVNode("div",Zl,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(b.synonym,(_,h)=>(n.openBlock(),n.createElementBlock("span",{key:`${_}-${h}`,class:"p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",onClick:E=>r(_)},n.toDisplayString(_),9,Wl))),128))])]))),128))])]))),128))])],2)])]))}};function ql(){document.documentElement.setAttribute("dir","rtl")}function Jl(){document.documentElement.removeAttribute("dir")}const kt={supportRTL:ql,removeRTL:Jl},Kl=["ar","fa","iw","yi","ur","pa"],Yl={class:"bg-white min-h-screen flex flex-col"},Ql={class:"py-2 px-5 shadow-lg"},Xl={class:"px-5 flex-grow"},es={class:"flex flex-col lg:flex-row lg:gap-2"},ts={class:"w-full lg:w-[calc(50%-1rem)] my-2"},ns=n.createElementVNode("div",{class:"w-6 h-4 mx-auto hidden lg:block"},null,-1),os={class:"w-full lg:w-[calc(50%-1rem)] my-2"},ls={class:"grid grid-cols-1 lg:grid-cols-3 gap-4"},ss={key:0,class:"w-full my-4"},rs={key:1,class:"text-textCustom italic font-medium"},as={__name:"Popup",props:{opt:{type:Object,default:null},languages:{type:Object,default:null},translation:{type:Object,default:null},tts:{type:Object,default:null},isFavoriteFeatureEnabled:{type:Boolean,default:!1},isFavorite:{type:Boolean,default:!1}},emits:["opt","translate","reader","settings","fullscreen","loadTTS","favorite"],setup(e,{emit:l}){const t=go(),o=X(t),s=yt(t),a=xe(t),i=_e(t),r=e,c=l,u=n.ref(""),d=()=>{const h=r.opt.target;Kl.includes(h)?kt.supportRTL():kt.removeRTL()};n.watch(()=>r.translation,h=>{h&&(i.loading=!1,u.value=h.text,o.init(h),s.reset())},{immediate:!0}),n.watch(()=>r.tts,h=>{if(!h){s.reset();return}s.set(h)},{immediate:!0}),n.watch([()=>r.opt,()=>r.languages],([h,E])=>{a.init(h,E),d()}),n.watch([()=>a.src,()=>a.target],([h,E])=>{c("opt",{src:h,target:E}),_(u.value)}),n.onMounted(()=>{a.init(r.opt,r.languages),d()});function m(){u.value="",o.reset()}function b(h){_(h)}function C(h){const E=h==="src"?o.text:o.result;c("loadTTS",{type:h,data:E})}function _(h,E=a.src,N=a.target){h&&(u.value=h,i.loading=!0,c("translate",{src:E,target:N,text:h}))}return(h,E)=>{var N,S,V,I;return n.openBlock(),n.createElementBlock("div",Yl,[n.createElementVNode("div",Ql,[n.createVNode(jt,{onReader:E[0]||(E[0]=g=>c("reader")),onSettings:E[1]||(E[1]=g=>c("settings")),onFullScreen:E[2]||(E[2]=g=>c("fullscreen"))})]),n.createElementVNode("div",Xl,[n.createVNode(Oo,{class:"my-4"}),n.createElementVNode("div",es,[n.createElementVNode("div",ts,[n.createVNode(il,{text:u.value,onChange:b,onClear:m,onLoadTTS:E[3]||(E[3]=g=>C("src"))},null,8,["text"])]),ns,n.createElementVNode("div",os,[n.createVNode(fl,{isFavoriteFeatureEnabled:e.isFavoriteFeatureEnabled,isFavorite:e.isFavorite,onFavorite:E[4]||(E[4]=g=>c("favorite")),onLoadTTS:E[5]||(E[5]=g=>C("target"))},null,8,["isFavoriteFeatureEnabled","isFavorite"])])]),r.translation?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createElementVNode("div",ls,[(N=n.unref(o).dictionary)!=null&&N.length?(n.openBlock(),n.createBlock(yl,{key:0,onTranslate:_})):n.createCommentVNode("",!0),(S=n.unref(o).definitions)!=null&&S.length?(n.openBlock(),n.createBlock(Nl,{key:1})):n.createCommentVNode("",!0),(V=n.unref(o).synonyms)!=null&&V.length?(n.openBlock(),n.createBlock(Gl,{key:2,onTranslate:_})):n.createCommentVNode("",!0)]),(I=n.unref(o).examples)!=null&&I.length?(n.openBlock(),n.createElementBlock("div",ss,[n.createVNode(Dl)])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock("span",rs,"Service unavailable"))])])}}};G.default=as,Object.defineProperties(G,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddict/popup",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"