@ddict/popup 1.0.20 → 1.0.21
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.css +1 -1
- package/dist/popup.es.js +922 -922
- package/dist/popup.umd.js +7 -7
- package/package.json +1 -1
package/dist/popup.es.js
CHANGED
|
@@ -1,94 +1,99 @@
|
|
|
1
|
-
import { openBlock as w, createElementBlock as T, createElementVNode as h, computed as S, unref as V, shallowRef as
|
|
2
|
-
const _n = "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", Cn = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%20fill='%233B5695'%20class='bi%20bi-list-stars%20fill-primaryColor'%3e%3cpath%20fill-rule='evenodd'%20d='M5%2011.5a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5zm0-4a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5zm0-4a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5z'/%3e%3cpath%20d='M2.242%202.194a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.256-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53zm0%204a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.255-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53zm0%204a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.255-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53z'/%3e%3c/svg%3e", yn = "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", wn = "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", Sn = "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", En = { class: "flex justify-between" }, On = /* @__PURE__ */ h("div", { class: "flex flex-row" }, [
|
|
1
|
+
import { openBlock as w, createElementBlock as T, createElementVNode as h, pushScopeId as Tt, popScopeId as It, computed as S, unref as V, shallowRef as mn, watch as F, triggerRef as ct, onScopeDispose as nt, ref as E, onUnmounted as ot, inject as Ie, watchEffect as ie, onMounted as Ce, cloneVNode as Lt, h as Ee, Fragment as Z, defineComponent as ae, provide as lt, reactive as Rt, nextTick as Q, toRaw as K, effectScope as Pt, markRaw as de, hasInjectionContext as gn, getCurrentInstance as Vt, isRef as xe, isReactive as st, toRef as qe, getCurrentScope as kt, toRefs as dt, mergeModels as bn, useModel as xn, createBlock as ee, withCtx as Ve, createVNode as H, renderList as se, normalizeClass as _e, toDisplayString as te, createCommentVNode as X, withModifiers as ft, createTextVNode as _n, withDirectives as Mt, vModelText as Nt } from "vue";
|
|
2
|
+
const Cn = "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", yn = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%20fill='%233B5695'%20class='bi%20bi-list-stars%20fill-primaryColor'%3e%3cpath%20fill-rule='evenodd'%20d='M5%2011.5a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5zm0-4a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5zm0-4a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5z'/%3e%3cpath%20d='M2.242%202.194a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.256-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53zm0%204a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.255-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53zm0%204a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.255-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53z'/%3e%3c/svg%3e", wn = "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", Sn = "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", En = "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", Le = (e, o) => {
|
|
3
|
+
const t = e.__vccOpts || e;
|
|
4
|
+
for (const [n, l] of o)
|
|
5
|
+
t[n] = l;
|
|
6
|
+
return t;
|
|
7
|
+
}, Re = (e) => (Tt("data-v-5c07032a"), e = e(), It(), e), On = { class: "flex justify-between" }, $n = /* @__PURE__ */ Re(() => /* @__PURE__ */ h("div", { class: "flex flex-row" }, [
|
|
3
8
|
/* @__PURE__ */ h("img", {
|
|
4
|
-
src:
|
|
9
|
+
src: Cn,
|
|
5
10
|
alt: "Vue logo",
|
|
6
11
|
class: "w-24"
|
|
7
12
|
})
|
|
8
|
-
], -1),
|
|
9
|
-
class: "tooltip tooltip-bottom tooltip-
|
|
13
|
+
], -1)), Tn = { class: "flex" }, In = {
|
|
14
|
+
class: "tooltip tooltip-bottom tooltip-custom 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%]",
|
|
10
15
|
"data-tip": "Saved Words"
|
|
11
|
-
},
|
|
12
|
-
src:
|
|
16
|
+
}, Ln = /* @__PURE__ */ Re(() => /* @__PURE__ */ h("img", {
|
|
17
|
+
src: yn,
|
|
13
18
|
alt: "Star list",
|
|
14
19
|
class: "w-7"
|
|
15
|
-
}, null, -1),
|
|
16
|
-
|
|
17
|
-
],
|
|
18
|
-
class: "tooltip tooltip-bottom tooltip-
|
|
20
|
+
}, null, -1)), Rn = [
|
|
21
|
+
Ln
|
|
22
|
+
], Pn = {
|
|
23
|
+
class: "tooltip tooltip-bottom tooltip-custom 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%]",
|
|
19
24
|
"data-tip": "Reader"
|
|
20
|
-
},
|
|
21
|
-
src:
|
|
25
|
+
}, Vn = /* @__PURE__ */ Re(() => /* @__PURE__ */ h("img", {
|
|
26
|
+
src: wn,
|
|
22
27
|
alt: "Reader",
|
|
23
28
|
class: "w-7"
|
|
24
|
-
}, null, -1),
|
|
25
|
-
|
|
26
|
-
],
|
|
27
|
-
class: "tooltip tooltip-bottom tooltip-
|
|
29
|
+
}, null, -1)), kn = [
|
|
30
|
+
Vn
|
|
31
|
+
], Mn = {
|
|
32
|
+
class: "tooltip tooltip-bottom tooltip-custom 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",
|
|
28
33
|
"data-tip": "Full screen"
|
|
29
|
-
},
|
|
30
|
-
src:
|
|
34
|
+
}, Nn = /* @__PURE__ */ Re(() => /* @__PURE__ */ h("img", {
|
|
35
|
+
src: Sn,
|
|
31
36
|
alt: "Full screen",
|
|
32
37
|
class: "w-7"
|
|
33
|
-
}, null, -1),
|
|
34
|
-
|
|
35
|
-
],
|
|
36
|
-
class: "tooltip tooltip-bottom tooltip-
|
|
38
|
+
}, null, -1)), Dn = [
|
|
39
|
+
Nn
|
|
40
|
+
], An = {
|
|
41
|
+
class: "tooltip tooltip-bottom tooltip-custom 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%]",
|
|
37
42
|
"data-tip": "Settings"
|
|
38
|
-
},
|
|
39
|
-
src:
|
|
43
|
+
}, Fn = /* @__PURE__ */ Re(() => /* @__PURE__ */ h("img", {
|
|
44
|
+
src: En,
|
|
40
45
|
alt: "Setting",
|
|
41
46
|
class: "w-7"
|
|
42
|
-
}, null, -1),
|
|
43
|
-
|
|
44
|
-
],
|
|
47
|
+
}, null, -1)), jn = [
|
|
48
|
+
Fn
|
|
49
|
+
], Bn = {
|
|
45
50
|
__name: "Header",
|
|
46
51
|
emits: ["settings", "fullScreen", "reader", "starList"],
|
|
47
52
|
setup(e, { emit: o }) {
|
|
48
53
|
const t = o;
|
|
49
|
-
return (n,
|
|
50
|
-
|
|
51
|
-
h("div",
|
|
52
|
-
h("div",
|
|
54
|
+
return (n, l) => (w(), T("div", On, [
|
|
55
|
+
$n,
|
|
56
|
+
h("div", Tn, [
|
|
57
|
+
h("div", In, [
|
|
53
58
|
h("button", {
|
|
54
59
|
class: "btn btn-ghost btn-circle",
|
|
55
|
-
onClick:
|
|
56
|
-
},
|
|
60
|
+
onClick: l[0] || (l[0] = (r) => t("starList"))
|
|
61
|
+
}, Rn)
|
|
57
62
|
]),
|
|
58
|
-
h("div",
|
|
63
|
+
h("div", Pn, [
|
|
59
64
|
h("button", {
|
|
60
65
|
class: "btn btn-ghost btn-circle",
|
|
61
|
-
onClick:
|
|
62
|
-
},
|
|
66
|
+
onClick: l[1] || (l[1] = (r) => t("reader"))
|
|
67
|
+
}, kn)
|
|
63
68
|
]),
|
|
64
|
-
h("div",
|
|
69
|
+
h("div", Mn, [
|
|
65
70
|
h("button", {
|
|
66
71
|
class: "btn btn-ghost btn-circle",
|
|
67
|
-
onClick:
|
|
68
|
-
},
|
|
72
|
+
onClick: l[2] || (l[2] = (r) => t("fullScreen"))
|
|
73
|
+
}, Dn)
|
|
69
74
|
]),
|
|
70
|
-
h("div",
|
|
75
|
+
h("div", An, [
|
|
71
76
|
h("button", {
|
|
72
77
|
class: "btn btn-ghost btn-circle",
|
|
73
|
-
onClick:
|
|
74
|
-
},
|
|
78
|
+
onClick: l[3] || (l[3] = (r) => t("settings"))
|
|
79
|
+
}, jn)
|
|
75
80
|
])
|
|
76
81
|
])
|
|
77
82
|
]));
|
|
78
83
|
}
|
|
79
|
-
};
|
|
84
|
+
}, Hn = /* @__PURE__ */ Le(Bn, [["__scopeId", "data-v-5c07032a"]]);
|
|
80
85
|
function ye(e, o, t) {
|
|
81
|
-
let n = t.initialDeps ?? [],
|
|
86
|
+
let n = t.initialDeps ?? [], l;
|
|
82
87
|
return () => {
|
|
83
|
-
var r, i,
|
|
88
|
+
var r, i, s, a;
|
|
84
89
|
let u;
|
|
85
90
|
t.key && ((r = t.debug) != null && r.call(t)) && (u = Date.now());
|
|
86
91
|
const c = e();
|
|
87
92
|
if (!(c.length !== n.length || c.some((x, _) => n[_] !== x)))
|
|
88
|
-
return
|
|
93
|
+
return l;
|
|
89
94
|
n = c;
|
|
90
95
|
let g;
|
|
91
|
-
if (t.key && ((i = t.debug) != null && i.call(t)) && (g = Date.now()),
|
|
96
|
+
if (t.key && ((i = t.debug) != null && i.call(t)) && (g = Date.now()), l = o(...c), t.key && ((s = t.debug) != null && s.call(t))) {
|
|
92
97
|
const x = Math.round((Date.now() - u) * 100) / 100, _ = Math.round((Date.now() - g) * 100) / 100, v = _ / 16, $ = (N, I) => {
|
|
93
98
|
for (N = String(N); N.length < I; )
|
|
94
99
|
N = " " + N;
|
|
@@ -106,76 +111,76 @@ function ye(e, o, t) {
|
|
|
106
111
|
t == null ? void 0 : t.key
|
|
107
112
|
);
|
|
108
113
|
}
|
|
109
|
-
return (a = t == null ? void 0 : t.onChange) == null || a.call(t,
|
|
114
|
+
return (a = t == null ? void 0 : t.onChange) == null || a.call(t, l), l;
|
|
110
115
|
};
|
|
111
116
|
}
|
|
112
|
-
function
|
|
117
|
+
function Je(e, o) {
|
|
113
118
|
if (e === void 0)
|
|
114
119
|
throw new Error("Unexpected undefined");
|
|
115
120
|
return e;
|
|
116
121
|
}
|
|
117
|
-
const
|
|
122
|
+
const zn = (e, o) => Math.abs(e - o) < 1, Un = (e, o, t) => {
|
|
118
123
|
let n;
|
|
119
|
-
return function(...
|
|
120
|
-
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this,
|
|
124
|
+
return function(...l) {
|
|
125
|
+
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, l), t);
|
|
121
126
|
};
|
|
122
|
-
},
|
|
127
|
+
}, Zn = (e) => e, Wn = (e) => {
|
|
123
128
|
const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
|
|
124
|
-
for (let
|
|
125
|
-
n.push(
|
|
129
|
+
for (let l = o; l <= t; l++)
|
|
130
|
+
n.push(l);
|
|
126
131
|
return n;
|
|
127
|
-
},
|
|
132
|
+
}, Gn = (e, o) => {
|
|
128
133
|
const t = e.scrollElement;
|
|
129
134
|
if (!t)
|
|
130
135
|
return;
|
|
131
136
|
const n = e.targetWindow;
|
|
132
137
|
if (!n)
|
|
133
138
|
return;
|
|
134
|
-
const
|
|
135
|
-
const { width:
|
|
136
|
-
o({ width: Math.round(
|
|
139
|
+
const l = (i) => {
|
|
140
|
+
const { width: s, height: a } = i;
|
|
141
|
+
o({ width: Math.round(s), height: Math.round(a) });
|
|
137
142
|
};
|
|
138
|
-
if (
|
|
143
|
+
if (l(t.getBoundingClientRect()), !n.ResizeObserver)
|
|
139
144
|
return () => {
|
|
140
145
|
};
|
|
141
146
|
const r = new n.ResizeObserver((i) => {
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
144
|
-
const a =
|
|
147
|
+
const s = i[0];
|
|
148
|
+
if (s != null && s.borderBoxSize) {
|
|
149
|
+
const a = s.borderBoxSize[0];
|
|
145
150
|
if (a) {
|
|
146
|
-
|
|
151
|
+
l({ width: a.inlineSize, height: a.blockSize });
|
|
147
152
|
return;
|
|
148
153
|
}
|
|
149
154
|
}
|
|
150
|
-
|
|
155
|
+
l(t.getBoundingClientRect());
|
|
151
156
|
});
|
|
152
157
|
return r.observe(t, { box: "border-box" }), () => {
|
|
153
158
|
r.unobserve(t);
|
|
154
159
|
};
|
|
155
|
-
},
|
|
160
|
+
}, pt = {
|
|
156
161
|
passive: !0
|
|
157
|
-
},
|
|
162
|
+
}, qn = typeof window > "u" ? !0 : "onscrollend" in window, Jn = (e, o) => {
|
|
158
163
|
const t = e.scrollElement;
|
|
159
164
|
if (!t)
|
|
160
165
|
return;
|
|
161
166
|
const n = e.targetWindow;
|
|
162
167
|
if (!n)
|
|
163
168
|
return;
|
|
164
|
-
let
|
|
165
|
-
const r =
|
|
166
|
-
} :
|
|
169
|
+
let l = 0;
|
|
170
|
+
const r = qn ? () => {
|
|
171
|
+
} : Un(
|
|
167
172
|
n,
|
|
168
173
|
() => {
|
|
169
|
-
o(
|
|
174
|
+
o(l, !1);
|
|
170
175
|
},
|
|
171
176
|
e.options.isScrollingResetDelay
|
|
172
177
|
), i = (u) => () => {
|
|
173
|
-
|
|
174
|
-
},
|
|
175
|
-
return a(), t.addEventListener("scroll",
|
|
176
|
-
t.removeEventListener("scroll",
|
|
178
|
+
l = t[e.options.horizontal ? "scrollLeft" : "scrollTop"], r(), o(l, u);
|
|
179
|
+
}, s = i(!0), a = i(!1);
|
|
180
|
+
return a(), t.addEventListener("scroll", s, pt), t.addEventListener("scrollend", a, pt), () => {
|
|
181
|
+
t.removeEventListener("scroll", s), t.removeEventListener("scrollend", a);
|
|
177
182
|
};
|
|
178
|
-
},
|
|
183
|
+
}, Kn = (e, o, t) => {
|
|
179
184
|
if (o != null && o.borderBoxSize) {
|
|
180
185
|
const n = o.borderBoxSize[0];
|
|
181
186
|
if (n)
|
|
@@ -186,43 +191,43 @@ const Bn = (e, o) => Math.abs(e - o) < 1, Hn = (e, o, t) => {
|
|
|
186
191
|
return Math.round(
|
|
187
192
|
e.getBoundingClientRect()[t.options.horizontal ? "width" : "height"]
|
|
188
193
|
);
|
|
189
|
-
},
|
|
194
|
+
}, Yn = (e, {
|
|
190
195
|
adjustments: o = 0,
|
|
191
196
|
behavior: t
|
|
192
197
|
}, n) => {
|
|
193
|
-
var
|
|
198
|
+
var l, r;
|
|
194
199
|
const i = e + o;
|
|
195
|
-
(r = (
|
|
200
|
+
(r = (l = n.scrollElement) == null ? void 0 : l.scrollTo) == null || r.call(l, {
|
|
196
201
|
[n.options.horizontal ? "left" : "top"]: i,
|
|
197
202
|
behavior: t
|
|
198
203
|
});
|
|
199
204
|
};
|
|
200
|
-
class
|
|
205
|
+
class Qn {
|
|
201
206
|
constructor(o) {
|
|
202
207
|
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
|
|
203
208
|
let t = null;
|
|
204
|
-
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((
|
|
205
|
-
|
|
209
|
+
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((l) => {
|
|
210
|
+
l.forEach((r) => {
|
|
206
211
|
this._measureElement(r.target, r);
|
|
207
212
|
});
|
|
208
213
|
}));
|
|
209
214
|
return {
|
|
210
215
|
disconnect: () => {
|
|
211
|
-
var
|
|
212
|
-
return (
|
|
216
|
+
var l;
|
|
217
|
+
return (l = n()) == null ? void 0 : l.disconnect();
|
|
213
218
|
},
|
|
214
|
-
observe: (
|
|
219
|
+
observe: (l) => {
|
|
215
220
|
var r;
|
|
216
|
-
return (r = n()) == null ? void 0 : r.observe(
|
|
221
|
+
return (r = n()) == null ? void 0 : r.observe(l, { box: "border-box" });
|
|
217
222
|
},
|
|
218
|
-
unobserve: (
|
|
223
|
+
unobserve: (l) => {
|
|
219
224
|
var r;
|
|
220
|
-
return (r = n()) == null ? void 0 : r.unobserve(
|
|
225
|
+
return (r = n()) == null ? void 0 : r.unobserve(l);
|
|
221
226
|
}
|
|
222
227
|
};
|
|
223
228
|
})(), this.range = null, this.setOptions = (t) => {
|
|
224
|
-
Object.entries(t).forEach(([n,
|
|
225
|
-
typeof
|
|
229
|
+
Object.entries(t).forEach(([n, l]) => {
|
|
230
|
+
typeof l > "u" && delete t[n];
|
|
226
231
|
}), this.options = {
|
|
227
232
|
debug: !1,
|
|
228
233
|
initialOffset: 0,
|
|
@@ -232,11 +237,11 @@ class Kn {
|
|
|
232
237
|
scrollPaddingStart: 0,
|
|
233
238
|
scrollPaddingEnd: 0,
|
|
234
239
|
horizontal: !1,
|
|
235
|
-
getItemKey:
|
|
236
|
-
rangeExtractor:
|
|
240
|
+
getItemKey: Zn,
|
|
241
|
+
rangeExtractor: Wn,
|
|
237
242
|
onChange: () => {
|
|
238
243
|
},
|
|
239
|
-
measureElement:
|
|
244
|
+
measureElement: Kn,
|
|
240
245
|
initialRect: { width: 0, height: 0 },
|
|
241
246
|
scrollMargin: 0,
|
|
242
247
|
gap: 0,
|
|
@@ -248,12 +253,12 @@ class Kn {
|
|
|
248
253
|
...t
|
|
249
254
|
};
|
|
250
255
|
}, this.notify = (t, n) => {
|
|
251
|
-
var
|
|
252
|
-
const { startIndex: i, endIndex:
|
|
256
|
+
var l, r;
|
|
257
|
+
const { startIndex: i, endIndex: s } = this.range ?? {
|
|
253
258
|
startIndex: void 0,
|
|
254
259
|
endIndex: void 0
|
|
255
260
|
}, a = this.calculateRange();
|
|
256
|
-
(t || i !== (a == null ? void 0 : a.startIndex) ||
|
|
261
|
+
(t || i !== (a == null ? void 0 : a.startIndex) || s !== (a == null ? void 0 : a.endIndex)) && ((r = (l = this.options).onChange) == null || r.call(l, this, n));
|
|
257
262
|
}, this.cleanup = () => {
|
|
258
263
|
this.unsubs.filter(Boolean).forEach((t) => t()), this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.observer.disconnect(), this.elementsCache.clear();
|
|
259
264
|
}, this._didMount = () => () => {
|
|
@@ -270,30 +275,30 @@ class Kn {
|
|
|
270
275
|
adjustments: void 0,
|
|
271
276
|
behavior: void 0
|
|
272
277
|
}), this.unsubs.push(
|
|
273
|
-
this.options.observeElementRect(this, (
|
|
274
|
-
this.scrollRect =
|
|
278
|
+
this.options.observeElementRect(this, (l) => {
|
|
279
|
+
this.scrollRect = l, this.notify(!1, !1);
|
|
275
280
|
})
|
|
276
281
|
), this.unsubs.push(
|
|
277
|
-
this.options.observeElementOffset(this, (
|
|
278
|
-
this.scrollAdjustments = 0, this.scrollDirection = r ? this.getScrollOffset() <
|
|
282
|
+
this.options.observeElementOffset(this, (l, r) => {
|
|
283
|
+
this.scrollAdjustments = 0, this.scrollDirection = r ? this.getScrollOffset() < l ? "forward" : "backward" : null, this.scrollOffset = l;
|
|
279
284
|
const i = this.isScrolling;
|
|
280
285
|
this.isScrolling = r, this.notify(i !== r, r);
|
|
281
286
|
})
|
|
282
287
|
);
|
|
283
288
|
}
|
|
284
289
|
}, 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, n) => {
|
|
285
|
-
const
|
|
290
|
+
const l = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
286
291
|
for (let i = n - 1; i >= 0; i--) {
|
|
287
|
-
const
|
|
288
|
-
if (
|
|
292
|
+
const s = t[i];
|
|
293
|
+
if (l.has(s.lane))
|
|
289
294
|
continue;
|
|
290
295
|
const a = r.get(
|
|
291
|
-
|
|
296
|
+
s.lane
|
|
292
297
|
);
|
|
293
|
-
if (a == null ||
|
|
298
|
+
if (a == null || s.end > a.end ? r.set(s.lane, s) : s.end < a.end && l.set(s.lane, !0), l.size === this.options.lanes)
|
|
294
299
|
break;
|
|
295
300
|
}
|
|
296
|
-
return r.size === this.options.lanes ? Array.from(r.values()).sort((i,
|
|
301
|
+
return r.size === this.options.lanes ? Array.from(r.values()).sort((i, s) => i.end === s.end ? i.index - s.index : i.end - s.end)[0] : void 0;
|
|
297
302
|
}, this.getMeasurementOptions = ye(
|
|
298
303
|
() => [
|
|
299
304
|
this.options.count,
|
|
@@ -302,10 +307,10 @@ class Kn {
|
|
|
302
307
|
this.options.getItemKey,
|
|
303
308
|
this.options.enabled
|
|
304
309
|
],
|
|
305
|
-
(t, n,
|
|
310
|
+
(t, n, l, r, i) => (this.pendingMeasuredCacheIndexes = [], {
|
|
306
311
|
count: t,
|
|
307
312
|
paddingStart: n,
|
|
308
|
-
scrollMargin:
|
|
313
|
+
scrollMargin: l,
|
|
309
314
|
getItemKey: r,
|
|
310
315
|
enabled: i
|
|
311
316
|
}),
|
|
@@ -314,7 +319,7 @@ class Kn {
|
|
|
314
319
|
}
|
|
315
320
|
), this.getMeasurements = ye(
|
|
316
321
|
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
317
|
-
({ count: t, paddingStart: n, scrollMargin:
|
|
322
|
+
({ count: t, paddingStart: n, scrollMargin: l, getItemKey: r, enabled: i }, s) => {
|
|
318
323
|
var a;
|
|
319
324
|
if (!i)
|
|
320
325
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
@@ -337,7 +342,7 @@ class Kn {
|
|
|
337
342
|
this.options.measureElement(D, void 0, this)
|
|
338
343
|
);
|
|
339
344
|
});
|
|
340
|
-
const x = r(p), _ = this.options.lanes === 1 ? c[p - 1] : this.getFurthestMeasurement(c, p), v = _ ? _.end + this.options.gap : n +
|
|
345
|
+
const x = r(p), _ = this.options.lanes === 1 ? c[p - 1] : this.getFurthestMeasurement(c, p), v = _ ? _.end + this.options.gap : n + l, $ = s.get(x), N = typeof $ == "number" ? $ : this.options.estimateSize(p), I = v + N, k = _ ? _.lane : p % this.options.lanes;
|
|
341
346
|
c[p] = {
|
|
342
347
|
index: p,
|
|
343
348
|
start: v,
|
|
@@ -356,10 +361,10 @@ class Kn {
|
|
|
356
361
|
}
|
|
357
362
|
), this.calculateRange = ye(
|
|
358
363
|
() => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
|
|
359
|
-
(t, n,
|
|
364
|
+
(t, n, l) => this.range = t.length > 0 && n > 0 ? Xn({
|
|
360
365
|
measurements: t,
|
|
361
366
|
outerSize: n,
|
|
362
|
-
scrollOffset:
|
|
367
|
+
scrollOffset: l
|
|
363
368
|
}) : null,
|
|
364
369
|
{
|
|
365
370
|
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
@@ -372,10 +377,10 @@ class Kn {
|
|
|
372
377
|
this.options.overscan,
|
|
373
378
|
this.options.count
|
|
374
379
|
],
|
|
375
|
-
(t, n,
|
|
380
|
+
(t, n, l, r) => n === null ? [] : t({
|
|
376
381
|
startIndex: n.startIndex,
|
|
377
382
|
endIndex: n.endIndex,
|
|
378
|
-
overscan:
|
|
383
|
+
overscan: l,
|
|
379
384
|
count: r
|
|
380
385
|
}),
|
|
381
386
|
{
|
|
@@ -383,40 +388,40 @@ class Kn {
|
|
|
383
388
|
debug: () => this.options.debug
|
|
384
389
|
}
|
|
385
390
|
), this.indexFromElement = (t) => {
|
|
386
|
-
const n = this.options.indexAttribute,
|
|
387
|
-
return
|
|
391
|
+
const n = this.options.indexAttribute, l = t.getAttribute(n);
|
|
392
|
+
return l ? parseInt(l, 10) : (console.warn(
|
|
388
393
|
`Missing attribute name '${n}={index}' on measured element.`
|
|
389
394
|
), -1);
|
|
390
395
|
}, this._measureElement = (t, n) => {
|
|
391
|
-
const
|
|
396
|
+
const l = this.indexFromElement(t), r = this.getMeasurements()[l];
|
|
392
397
|
if (!r || !t.isConnected) {
|
|
393
|
-
this.elementsCache.forEach((
|
|
394
|
-
|
|
398
|
+
this.elementsCache.forEach((s, a) => {
|
|
399
|
+
s === t && (this.observer.unobserve(t), this.elementsCache.delete(a));
|
|
395
400
|
});
|
|
396
401
|
return;
|
|
397
402
|
}
|
|
398
403
|
const i = this.elementsCache.get(r.key);
|
|
399
|
-
i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(r.key, t)), this.resizeItem(
|
|
404
|
+
i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(r.key, t)), this.resizeItem(l, this.options.measureElement(t, n, this));
|
|
400
405
|
}, this.resizeItem = (t, n) => {
|
|
401
|
-
const
|
|
402
|
-
if (!
|
|
406
|
+
const l = this.getMeasurements()[t];
|
|
407
|
+
if (!l)
|
|
403
408
|
return;
|
|
404
|
-
const r = this.itemSizeCache.get(
|
|
405
|
-
i !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(
|
|
409
|
+
const r = this.itemSizeCache.get(l.key) ?? l.size, i = n - r;
|
|
410
|
+
i !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(l, i, this) : l.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", i), this._scrollToOffset(this.getScrollOffset(), {
|
|
406
411
|
adjustments: this.scrollAdjustments += i,
|
|
407
412
|
behavior: void 0
|
|
408
|
-
})), this.pendingMeasuredCacheIndexes.push(
|
|
413
|
+
})), this.pendingMeasuredCacheIndexes.push(l.index), this.itemSizeCache = new Map(this.itemSizeCache.set(l.key, n)), this.notify(!0, !1));
|
|
409
414
|
}, this.measureElement = (t) => {
|
|
410
415
|
t && this._measureElement(t, void 0);
|
|
411
416
|
}, this.getVirtualItems = ye(
|
|
412
417
|
() => [this.getIndexes(), this.getMeasurements()],
|
|
413
418
|
(t, n) => {
|
|
414
|
-
const
|
|
419
|
+
const l = [];
|
|
415
420
|
for (let r = 0, i = t.length; r < i; r++) {
|
|
416
|
-
const
|
|
417
|
-
|
|
421
|
+
const s = t[r], a = n[s];
|
|
422
|
+
l.push(a);
|
|
418
423
|
}
|
|
419
|
-
return
|
|
424
|
+
return l;
|
|
420
425
|
},
|
|
421
426
|
{
|
|
422
427
|
key: process.env.NODE_ENV !== "production" && "getIndexes",
|
|
@@ -425,60 +430,60 @@ class Kn {
|
|
|
425
430
|
), this.getVirtualItemForOffset = (t) => {
|
|
426
431
|
const n = this.getMeasurements();
|
|
427
432
|
if (n.length !== 0)
|
|
428
|
-
return
|
|
429
|
-
n[
|
|
433
|
+
return Je(
|
|
434
|
+
n[Dt(
|
|
430
435
|
0,
|
|
431
436
|
n.length - 1,
|
|
432
|
-
(
|
|
437
|
+
(l) => Je(n[l]).start,
|
|
433
438
|
t
|
|
434
439
|
)]
|
|
435
440
|
);
|
|
436
441
|
}, this.getOffsetForAlignment = (t, n) => {
|
|
437
|
-
const
|
|
438
|
-
n === "auto" && (t <= r ? n = "start" : t >= r +
|
|
439
|
-
const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) -
|
|
442
|
+
const l = this.getSize(), r = this.getScrollOffset();
|
|
443
|
+
n === "auto" && (t <= r ? n = "start" : t >= r + l ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - l : n === "center" && (t = t - l / 2);
|
|
444
|
+
const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) - l;
|
|
440
445
|
return Math.max(Math.min(a, t), 0);
|
|
441
446
|
}, this.getOffsetForIndex = (t, n = "auto") => {
|
|
442
447
|
t = Math.max(0, Math.min(t, this.options.count - 1));
|
|
443
|
-
const
|
|
444
|
-
if (!
|
|
448
|
+
const l = this.getMeasurements()[t];
|
|
449
|
+
if (!l)
|
|
445
450
|
return;
|
|
446
451
|
const r = this.getSize(), i = this.getScrollOffset();
|
|
447
452
|
if (n === "auto")
|
|
448
|
-
if (
|
|
453
|
+
if (l.end >= i + r - this.options.scrollPaddingEnd)
|
|
449
454
|
n = "end";
|
|
450
|
-
else if (
|
|
455
|
+
else if (l.start <= i + this.options.scrollPaddingStart)
|
|
451
456
|
n = "start";
|
|
452
457
|
else
|
|
453
458
|
return [i, n];
|
|
454
|
-
const
|
|
455
|
-
return [this.getOffsetForAlignment(
|
|
459
|
+
const s = n === "end" ? l.end + this.options.scrollPaddingEnd : l.start - this.options.scrollPaddingStart;
|
|
460
|
+
return [this.getOffsetForAlignment(s, n), n];
|
|
456
461
|
}, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
|
|
457
462
|
this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
|
|
458
|
-
}, this.scrollToOffset = (t, { align: n = "start", behavior:
|
|
459
|
-
this.cancelScrollToIndex(),
|
|
463
|
+
}, this.scrollToOffset = (t, { align: n = "start", behavior: l } = {}) => {
|
|
464
|
+
this.cancelScrollToIndex(), l === "smooth" && this.isDynamicMode() && console.warn(
|
|
460
465
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
461
466
|
), this._scrollToOffset(this.getOffsetForAlignment(t, n), {
|
|
462
467
|
adjustments: void 0,
|
|
463
|
-
behavior:
|
|
468
|
+
behavior: l
|
|
464
469
|
});
|
|
465
|
-
}, this.scrollToIndex = (t, { align: n = "auto", behavior:
|
|
466
|
-
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(),
|
|
470
|
+
}, this.scrollToIndex = (t, { align: n = "auto", behavior: l } = {}) => {
|
|
471
|
+
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), l === "smooth" && this.isDynamicMode() && console.warn(
|
|
467
472
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
468
473
|
);
|
|
469
474
|
const r = this.getOffsetForIndex(t, n);
|
|
470
475
|
if (!r) return;
|
|
471
|
-
const [i,
|
|
472
|
-
this._scrollToOffset(i, { adjustments: void 0, behavior:
|
|
476
|
+
const [i, s] = r;
|
|
477
|
+
this._scrollToOffset(i, { adjustments: void 0, behavior: l }), l !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
|
|
473
478
|
if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
|
|
474
479
|
this.options.getItemKey(t)
|
|
475
480
|
)) {
|
|
476
|
-
const [u] =
|
|
477
|
-
this.getOffsetForIndex(t,
|
|
481
|
+
const [u] = Je(
|
|
482
|
+
this.getOffsetForIndex(t, s)
|
|
478
483
|
);
|
|
479
|
-
|
|
484
|
+
zn(u, this.getScrollOffset()) || this.scrollToIndex(t, { align: s, behavior: l });
|
|
480
485
|
} else
|
|
481
|
-
this.scrollToIndex(t, { align:
|
|
486
|
+
this.scrollToIndex(t, { align: s, behavior: l });
|
|
482
487
|
}));
|
|
483
488
|
}, this.scrollBy = (t, { behavior: n } = {}) => {
|
|
484
489
|
this.cancelScrollToIndex(), n === "smooth" && this.isDynamicMode() && console.warn(
|
|
@@ -490,94 +495,94 @@ class Kn {
|
|
|
490
495
|
}, this.getTotalSize = () => {
|
|
491
496
|
var t;
|
|
492
497
|
const n = this.getMeasurements();
|
|
493
|
-
let
|
|
494
|
-
return n.length === 0 ?
|
|
498
|
+
let l;
|
|
499
|
+
return n.length === 0 ? l = this.options.paddingStart : l = this.options.lanes === 1 ? ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0 : Math.max(
|
|
495
500
|
...n.slice(-this.options.lanes).map((r) => r.end)
|
|
496
|
-
),
|
|
501
|
+
), l - this.options.scrollMargin + this.options.paddingEnd;
|
|
497
502
|
}, this._scrollToOffset = (t, {
|
|
498
503
|
adjustments: n,
|
|
499
|
-
behavior:
|
|
504
|
+
behavior: l
|
|
500
505
|
}) => {
|
|
501
|
-
this.options.scrollToFn(t, { behavior:
|
|
506
|
+
this.options.scrollToFn(t, { behavior: l, adjustments: n }, this);
|
|
502
507
|
}, this.measure = () => {
|
|
503
508
|
var t, n;
|
|
504
509
|
this.itemSizeCache = /* @__PURE__ */ new Map(), (n = (t = this.options).onChange) == null || n.call(t, this, !1);
|
|
505
510
|
}, this.setOptions(o);
|
|
506
511
|
}
|
|
507
512
|
}
|
|
508
|
-
const
|
|
513
|
+
const Dt = (e, o, t, n) => {
|
|
509
514
|
for (; e <= o; ) {
|
|
510
|
-
const
|
|
515
|
+
const l = (e + o) / 2 | 0, r = t(l);
|
|
511
516
|
if (r < n)
|
|
512
|
-
e =
|
|
517
|
+
e = l + 1;
|
|
513
518
|
else if (r > n)
|
|
514
|
-
o =
|
|
519
|
+
o = l - 1;
|
|
515
520
|
else
|
|
516
|
-
return
|
|
521
|
+
return l;
|
|
517
522
|
}
|
|
518
523
|
return e > 0 ? e - 1 : 0;
|
|
519
524
|
};
|
|
520
|
-
function
|
|
525
|
+
function Xn({
|
|
521
526
|
measurements: e,
|
|
522
527
|
outerSize: o,
|
|
523
528
|
scrollOffset: t
|
|
524
529
|
}) {
|
|
525
|
-
const n = e.length - 1, r =
|
|
530
|
+
const n = e.length - 1, r = Dt(0, n, (s) => e[s].start, t);
|
|
526
531
|
let i = r;
|
|
527
532
|
for (; i < n && e[i].end < t + o; )
|
|
528
533
|
i++;
|
|
529
534
|
return { startIndex: r, endIndex: i };
|
|
530
535
|
}
|
|
531
|
-
function
|
|
532
|
-
const o = new
|
|
536
|
+
function eo(e) {
|
|
537
|
+
const o = new Qn(V(e)), t = mn(o), n = o._didMount();
|
|
533
538
|
return F(
|
|
534
539
|
() => V(e).getScrollElement(),
|
|
535
|
-
(
|
|
536
|
-
|
|
540
|
+
(l) => {
|
|
541
|
+
l && o._willUpdate();
|
|
537
542
|
},
|
|
538
543
|
{
|
|
539
544
|
immediate: !0
|
|
540
545
|
}
|
|
541
546
|
), F(
|
|
542
547
|
() => V(e),
|
|
543
|
-
(
|
|
548
|
+
(l) => {
|
|
544
549
|
o.setOptions({
|
|
545
|
-
...
|
|
550
|
+
...l,
|
|
546
551
|
onChange: (r, i) => {
|
|
547
|
-
var
|
|
548
|
-
|
|
552
|
+
var s;
|
|
553
|
+
ct(t), (s = l.onChange) == null || s.call(l, r, i);
|
|
549
554
|
}
|
|
550
|
-
}), o._willUpdate(),
|
|
555
|
+
}), o._willUpdate(), ct(t);
|
|
551
556
|
},
|
|
552
557
|
{
|
|
553
558
|
immediate: !0
|
|
554
559
|
}
|
|
555
|
-
),
|
|
560
|
+
), nt(n), t;
|
|
556
561
|
}
|
|
557
|
-
function
|
|
558
|
-
return
|
|
562
|
+
function to(e) {
|
|
563
|
+
return eo(
|
|
559
564
|
S(() => ({
|
|
560
|
-
observeElementRect:
|
|
561
|
-
observeElementOffset:
|
|
562
|
-
scrollToFn:
|
|
565
|
+
observeElementRect: Gn,
|
|
566
|
+
observeElementOffset: Jn,
|
|
567
|
+
scrollToFn: Yn,
|
|
563
568
|
...V(e)
|
|
564
569
|
}))
|
|
565
570
|
);
|
|
566
571
|
}
|
|
567
|
-
function
|
|
568
|
-
let n = E(t == null ? void 0 : t.value),
|
|
569
|
-
return [S(() =>
|
|
570
|
-
return
|
|
572
|
+
function no(e, o, t) {
|
|
573
|
+
let n = E(t == null ? void 0 : t.value), l = S(() => e.value !== void 0);
|
|
574
|
+
return [S(() => l.value ? e.value : n.value), function(r) {
|
|
575
|
+
return l.value || (n.value = r), o == null ? void 0 : o(r);
|
|
571
576
|
}];
|
|
572
577
|
}
|
|
573
|
-
function
|
|
578
|
+
function oo(e) {
|
|
574
579
|
typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((o) => setTimeout(() => {
|
|
575
580
|
throw o;
|
|
576
581
|
}));
|
|
577
582
|
}
|
|
578
|
-
function
|
|
579
|
-
let e = [], o = { addEventListener(t, n,
|
|
580
|
-
return t.addEventListener(n,
|
|
583
|
+
function Fe() {
|
|
584
|
+
let e = [], o = { addEventListener(t, n, l, r) {
|
|
585
|
+
return t.addEventListener(n, l, r), o.add(() => t.removeEventListener(n, l, r));
|
|
581
586
|
}, requestAnimationFrame(...t) {
|
|
582
587
|
let n = requestAnimationFrame(...t);
|
|
583
588
|
o.add(() => cancelAnimationFrame(n));
|
|
@@ -590,42 +595,42 @@ function De() {
|
|
|
590
595
|
o.add(() => clearTimeout(n));
|
|
591
596
|
}, microTask(...t) {
|
|
592
597
|
let n = { current: !0 };
|
|
593
|
-
return
|
|
598
|
+
return oo(() => {
|
|
594
599
|
n.current && t[0]();
|
|
595
600
|
}), o.add(() => {
|
|
596
601
|
n.current = !1;
|
|
597
602
|
});
|
|
598
|
-
}, style(t, n,
|
|
603
|
+
}, style(t, n, l) {
|
|
599
604
|
let r = t.style.getPropertyValue(n);
|
|
600
|
-
return Object.assign(t.style, { [n]:
|
|
605
|
+
return Object.assign(t.style, { [n]: l }), this.add(() => {
|
|
601
606
|
Object.assign(t.style, { [n]: r });
|
|
602
607
|
});
|
|
603
608
|
}, group(t) {
|
|
604
|
-
let n =
|
|
609
|
+
let n = Fe();
|
|
605
610
|
return t(n), this.add(() => n.dispose());
|
|
606
611
|
}, add(t) {
|
|
607
612
|
return e.push(t), () => {
|
|
608
613
|
let n = e.indexOf(t);
|
|
609
|
-
if (n >= 0) for (let
|
|
614
|
+
if (n >= 0) for (let l of e.splice(n, 1)) l();
|
|
610
615
|
};
|
|
611
616
|
}, dispose() {
|
|
612
617
|
for (let t of e.splice(0)) t();
|
|
613
618
|
} };
|
|
614
619
|
return o;
|
|
615
620
|
}
|
|
616
|
-
function
|
|
617
|
-
let e =
|
|
618
|
-
return
|
|
621
|
+
function lo() {
|
|
622
|
+
let e = Fe();
|
|
623
|
+
return ot(() => e.dispose()), e;
|
|
619
624
|
}
|
|
620
|
-
function
|
|
621
|
-
let e =
|
|
625
|
+
function so() {
|
|
626
|
+
let e = lo();
|
|
622
627
|
return (o) => {
|
|
623
628
|
e.dispose(), e.nextFrame(o);
|
|
624
629
|
};
|
|
625
630
|
}
|
|
626
|
-
let
|
|
627
|
-
function
|
|
628
|
-
return Ie(
|
|
631
|
+
let ro = Symbol("headlessui.useid"), io = 0;
|
|
632
|
+
function Pe() {
|
|
633
|
+
return Ie(ro, () => `${++io}`)();
|
|
629
634
|
}
|
|
630
635
|
function P(e) {
|
|
631
636
|
var o;
|
|
@@ -633,18 +638,18 @@ function P(e) {
|
|
|
633
638
|
let t = (o = e.value.$el) != null ? o : e.value;
|
|
634
639
|
return t instanceof Node ? t : null;
|
|
635
640
|
}
|
|
636
|
-
function
|
|
641
|
+
function le(e, o, ...t) {
|
|
637
642
|
if (e in o) {
|
|
638
|
-
let
|
|
639
|
-
return typeof
|
|
643
|
+
let l = o[e];
|
|
644
|
+
return typeof l == "function" ? l(...t) : l;
|
|
640
645
|
}
|
|
641
|
-
let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map((
|
|
642
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
|
646
|
+
let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map((l) => `"${l}"`).join(", ")}.`);
|
|
647
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, le), n;
|
|
643
648
|
}
|
|
644
|
-
var
|
|
645
|
-
let
|
|
649
|
+
var ao = Object.defineProperty, uo = (e, o, t) => o in e ? ao(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, vt = (e, o, t) => (uo(e, typeof o != "symbol" ? o + "" : o, t), t);
|
|
650
|
+
let co = class {
|
|
646
651
|
constructor() {
|
|
647
|
-
|
|
652
|
+
vt(this, "current", this.detect()), vt(this, "currentId", 0);
|
|
648
653
|
}
|
|
649
654
|
set(o) {
|
|
650
655
|
this.current !== o && (this.currentId = 0, this.current = o);
|
|
@@ -664,9 +669,9 @@ let ao = class {
|
|
|
664
669
|
detect() {
|
|
665
670
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
666
671
|
}
|
|
667
|
-
},
|
|
668
|
-
function
|
|
669
|
-
if (
|
|
672
|
+
}, rt = new co();
|
|
673
|
+
function it(e) {
|
|
674
|
+
if (rt.isServer) return null;
|
|
670
675
|
if (e instanceof Node) return e.ownerDocument;
|
|
671
676
|
if (e != null && e.hasOwnProperty("value")) {
|
|
672
677
|
let o = P(e);
|
|
@@ -674,234 +679,234 @@ function rt(e) {
|
|
|
674
679
|
}
|
|
675
680
|
return document;
|
|
676
681
|
}
|
|
677
|
-
let
|
|
678
|
-
var
|
|
679
|
-
function
|
|
682
|
+
let ht = ["[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(",");
|
|
683
|
+
var fo = ((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))(fo || {}), po = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(po || {}), vo = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(vo || {}), At = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(At || {});
|
|
684
|
+
function ho(e, o = 0) {
|
|
680
685
|
var t;
|
|
681
|
-
return e === ((t =
|
|
682
|
-
return e.matches(
|
|
686
|
+
return e === ((t = it(e)) == null ? void 0 : t.body) ? !1 : le(o, { 0() {
|
|
687
|
+
return e.matches(ht);
|
|
683
688
|
}, 1() {
|
|
684
689
|
let n = e;
|
|
685
690
|
for (; n !== null; ) {
|
|
686
|
-
if (n.matches(
|
|
691
|
+
if (n.matches(ht)) return !0;
|
|
687
692
|
n = n.parentElement;
|
|
688
693
|
}
|
|
689
694
|
return !1;
|
|
690
695
|
} });
|
|
691
696
|
}
|
|
692
|
-
var
|
|
697
|
+
var mo = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(mo || {});
|
|
693
698
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
694
699
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
695
700
|
}, !0), document.addEventListener("click", (e) => {
|
|
696
701
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
697
702
|
}, !0));
|
|
698
|
-
function
|
|
703
|
+
function go(e, o = (t) => t) {
|
|
699
704
|
return e.slice().sort((t, n) => {
|
|
700
|
-
let
|
|
701
|
-
if (
|
|
702
|
-
let i =
|
|
705
|
+
let l = o(t), r = o(n);
|
|
706
|
+
if (l === null || r === null) return 0;
|
|
707
|
+
let i = l.compareDocumentPosition(r);
|
|
703
708
|
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
704
709
|
});
|
|
705
710
|
}
|
|
706
|
-
function
|
|
711
|
+
function bo() {
|
|
707
712
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
708
713
|
}
|
|
709
|
-
function
|
|
714
|
+
function xo() {
|
|
710
715
|
return /Android/gi.test(window.navigator.userAgent);
|
|
711
716
|
}
|
|
712
|
-
function
|
|
713
|
-
return
|
|
717
|
+
function Ft() {
|
|
718
|
+
return bo() || xo();
|
|
714
719
|
}
|
|
715
|
-
function
|
|
716
|
-
|
|
720
|
+
function ke(e, o, t) {
|
|
721
|
+
rt.isServer || ie((n) => {
|
|
717
722
|
document.addEventListener(e, o, t), n(() => document.removeEventListener(e, o, t));
|
|
718
723
|
});
|
|
719
724
|
}
|
|
720
|
-
function
|
|
721
|
-
|
|
725
|
+
function _o(e, o, t) {
|
|
726
|
+
rt.isServer || ie((n) => {
|
|
722
727
|
window.addEventListener(e, o, t), n(() => window.removeEventListener(e, o, t));
|
|
723
728
|
});
|
|
724
729
|
}
|
|
725
|
-
function
|
|
730
|
+
function Co(e, o, t = S(() => !0)) {
|
|
726
731
|
function n(r, i) {
|
|
727
732
|
if (!t.value || r.defaultPrevented) return;
|
|
728
|
-
let
|
|
729
|
-
if (
|
|
733
|
+
let s = i(r);
|
|
734
|
+
if (s === null || !s.getRootNode().contains(s)) return;
|
|
730
735
|
let a = function u(c) {
|
|
731
736
|
return typeof c == "function" ? u(c()) : Array.isArray(c) || c instanceof Set ? c : [c];
|
|
732
737
|
}(e);
|
|
733
738
|
for (let u of a) {
|
|
734
739
|
if (u === null) continue;
|
|
735
740
|
let c = u instanceof HTMLElement ? u : P(u);
|
|
736
|
-
if (c != null && c.contains(
|
|
741
|
+
if (c != null && c.contains(s) || r.composed && r.composedPath().includes(c)) return;
|
|
737
742
|
}
|
|
738
|
-
return !
|
|
739
|
-
}
|
|
740
|
-
let
|
|
741
|
-
|
|
742
|
-
var i,
|
|
743
|
-
t.value && (
|
|
744
|
-
}, !0),
|
|
745
|
-
var i,
|
|
746
|
-
t.value && (
|
|
747
|
-
}, !0),
|
|
748
|
-
|
|
749
|
-
}, !0),
|
|
750
|
-
}
|
|
751
|
-
function
|
|
743
|
+
return !ho(s, At.Loose) && s.tabIndex !== -1 && r.preventDefault(), o(r, s);
|
|
744
|
+
}
|
|
745
|
+
let l = E(null);
|
|
746
|
+
ke("pointerdown", (r) => {
|
|
747
|
+
var i, s;
|
|
748
|
+
t.value && (l.value = ((s = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : s[0]) || r.target);
|
|
749
|
+
}, !0), ke("mousedown", (r) => {
|
|
750
|
+
var i, s;
|
|
751
|
+
t.value && (l.value = ((s = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : s[0]) || r.target);
|
|
752
|
+
}, !0), ke("click", (r) => {
|
|
753
|
+
Ft() || l.value && (n(r, () => l.value), l.value = null);
|
|
754
|
+
}, !0), ke("touchend", (r) => n(r, () => r.target instanceof HTMLElement ? r.target : null), !0), _o("blur", (r) => n(r, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
755
|
+
}
|
|
756
|
+
function mt(e, o) {
|
|
752
757
|
if (e) return e;
|
|
753
758
|
let t = o ?? "button";
|
|
754
759
|
if (typeof t == "string" && t.toLowerCase() === "button") return "button";
|
|
755
760
|
}
|
|
756
|
-
function
|
|
757
|
-
let t = E(
|
|
761
|
+
function yo(e, o) {
|
|
762
|
+
let t = E(mt(e.value.type, e.value.as));
|
|
758
763
|
return Ce(() => {
|
|
759
|
-
t.value =
|
|
764
|
+
t.value = mt(e.value.type, e.value.as);
|
|
760
765
|
}), ie(() => {
|
|
761
766
|
var n;
|
|
762
767
|
t.value || P(o) && P(o) instanceof HTMLButtonElement && !((n = P(o)) != null && n.hasAttribute("type")) && (t.value = "button");
|
|
763
768
|
}), t;
|
|
764
769
|
}
|
|
765
|
-
function
|
|
770
|
+
function gt(e) {
|
|
766
771
|
return [e.screenX, e.screenY];
|
|
767
772
|
}
|
|
768
|
-
function
|
|
773
|
+
function wo() {
|
|
769
774
|
let e = E([-1, -1]);
|
|
770
775
|
return { wasMoved(o) {
|
|
771
|
-
let t =
|
|
776
|
+
let t = gt(o);
|
|
772
777
|
return e.value[0] === t[0] && e.value[1] === t[1] ? !1 : (e.value = t, !0);
|
|
773
778
|
}, update(o) {
|
|
774
|
-
e.value =
|
|
779
|
+
e.value = gt(o);
|
|
775
780
|
} };
|
|
776
781
|
}
|
|
777
|
-
function
|
|
782
|
+
function So({ container: e, accept: o, walk: t, enabled: n }) {
|
|
778
783
|
ie(() => {
|
|
779
|
-
let
|
|
780
|
-
if (!
|
|
781
|
-
let r =
|
|
784
|
+
let l = e.value;
|
|
785
|
+
if (!l || n !== void 0 && !n.value) return;
|
|
786
|
+
let r = it(e);
|
|
782
787
|
if (!r) return;
|
|
783
|
-
let i = Object.assign((a) => o(a), { acceptNode: o }),
|
|
784
|
-
for (;
|
|
788
|
+
let i = Object.assign((a) => o(a), { acceptNode: o }), s = r.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, i, !1);
|
|
789
|
+
for (; s.nextNode(); ) t(s.currentNode);
|
|
785
790
|
});
|
|
786
791
|
}
|
|
787
|
-
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}),
|
|
788
|
-
function pe({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...
|
|
792
|
+
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}), Eo = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Eo || {});
|
|
793
|
+
function pe({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...l }) {
|
|
789
794
|
var r;
|
|
790
|
-
let i =
|
|
791
|
-
if (e || o & 2 && i.static) return
|
|
795
|
+
let i = Bt(n, t), s = Object.assign(l, { props: i });
|
|
796
|
+
if (e || o & 2 && i.static) return Ke(s);
|
|
792
797
|
if (o & 1) {
|
|
793
798
|
let a = (r = i.unmount) == null || r ? 0 : 1;
|
|
794
|
-
return
|
|
799
|
+
return le(a, { 0() {
|
|
795
800
|
return null;
|
|
796
801
|
}, 1() {
|
|
797
|
-
return
|
|
802
|
+
return Ke({ ...l, props: { ...i, hidden: !0, style: { display: "none" } } });
|
|
798
803
|
} });
|
|
799
804
|
}
|
|
800
|
-
return
|
|
805
|
+
return Ke(s);
|
|
801
806
|
}
|
|
802
|
-
function
|
|
807
|
+
function Ke({ props: e, attrs: o, slots: t, slot: n, name: l }) {
|
|
803
808
|
var r, i;
|
|
804
|
-
let { as:
|
|
809
|
+
let { as: s, ...a } = He(e, ["unmount", "static"]), u = (r = t.default) == null ? void 0 : r.call(t, n), c = {};
|
|
805
810
|
if (n) {
|
|
806
811
|
let p = !1, g = [];
|
|
807
812
|
for (let [x, _] of Object.entries(n)) typeof _ == "boolean" && (p = !0), _ === !0 && g.push(x);
|
|
808
813
|
p && (c["data-headlessui-state"] = g.join(" "));
|
|
809
814
|
}
|
|
810
|
-
if (
|
|
811
|
-
if (u =
|
|
815
|
+
if (s === "template") {
|
|
816
|
+
if (u = jt(u ?? []), Object.keys(a).length > 0 || Object.keys(o).length > 0) {
|
|
812
817
|
let [p, ...g] = u ?? [];
|
|
813
|
-
if (
|
|
818
|
+
if (!$o(p) || g.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${l} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(a).concat(Object.keys(o)).map((v) => v.trim()).filter((v, $, N) => N.indexOf(v) === $).sort((v, $) => v.localeCompare($)).map((v) => ` - ${v}`).join(`
|
|
814
819
|
`), "", "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((v) => ` - ${v}`).join(`
|
|
815
820
|
`)].join(`
|
|
816
821
|
`));
|
|
817
|
-
let x =
|
|
822
|
+
let x = Bt((i = p.props) != null ? i : {}, a, c), _ = Lt(p, x, !0);
|
|
818
823
|
for (let v in x) v.startsWith("on") && (_.props || (_.props = {}), _.props[v] = x[v]);
|
|
819
824
|
return _;
|
|
820
825
|
}
|
|
821
826
|
return Array.isArray(u) && u.length === 1 ? u[0] : u;
|
|
822
827
|
}
|
|
823
|
-
return Ee(
|
|
828
|
+
return Ee(s, Object.assign({}, a, c), { default: () => u });
|
|
824
829
|
}
|
|
825
|
-
function
|
|
826
|
-
return e.flatMap((o) => o.type === Z ?
|
|
830
|
+
function jt(e) {
|
|
831
|
+
return e.flatMap((o) => o.type === Z ? jt(o.children) : [o]);
|
|
827
832
|
}
|
|
828
|
-
function
|
|
833
|
+
function Bt(...e) {
|
|
829
834
|
if (e.length === 0) return {};
|
|
830
835
|
if (e.length === 1) return e[0];
|
|
831
836
|
let o = {}, t = {};
|
|
832
|
-
for (let n of e) for (let
|
|
837
|
+
for (let n of e) for (let l in n) l.startsWith("on") && typeof n[l] == "function" ? (t[l] != null || (t[l] = []), t[l].push(n[l])) : o[l] = n[l];
|
|
833
838
|
if (o.disabled || o["aria-disabled"]) return Object.assign(o, Object.fromEntries(Object.keys(t).map((n) => [n, void 0])));
|
|
834
|
-
for (let n in t) Object.assign(o, { [n](
|
|
839
|
+
for (let n in t) Object.assign(o, { [n](l, ...r) {
|
|
835
840
|
let i = t[n];
|
|
836
|
-
for (let
|
|
837
|
-
if (
|
|
838
|
-
l
|
|
841
|
+
for (let s of i) {
|
|
842
|
+
if (l instanceof Event && l.defaultPrevented) return;
|
|
843
|
+
s(l, ...r);
|
|
839
844
|
}
|
|
840
845
|
} });
|
|
841
846
|
return o;
|
|
842
847
|
}
|
|
843
|
-
function
|
|
848
|
+
function Oo(e) {
|
|
844
849
|
let o = Object.assign({}, e);
|
|
845
850
|
for (let t in o) o[t] === void 0 && delete o[t];
|
|
846
851
|
return o;
|
|
847
852
|
}
|
|
848
|
-
function
|
|
853
|
+
function He(e, o = []) {
|
|
849
854
|
let t = Object.assign({}, e);
|
|
850
855
|
for (let n of o) n in t && delete t[n];
|
|
851
856
|
return t;
|
|
852
857
|
}
|
|
853
|
-
function
|
|
858
|
+
function $o(e) {
|
|
854
859
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
855
860
|
}
|
|
856
|
-
var
|
|
857
|
-
let
|
|
861
|
+
var Ht = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Ht || {});
|
|
862
|
+
let To = ae({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: o, attrs: t }) {
|
|
858
863
|
return () => {
|
|
859
864
|
var n;
|
|
860
|
-
let { features:
|
|
865
|
+
let { features: l, ...r } = e, i = { "aria-hidden": (l & 2) === 2 ? !0 : (n = r["aria-hidden"]) != null ? n : void 0, hidden: (l & 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", ...(l & 4) === 4 && (l & 2) !== 2 && { display: "none" } } };
|
|
861
866
|
return pe({ ourProps: i, theirProps: r, slot: {}, attrs: t, slots: o, name: "Hidden" });
|
|
862
867
|
};
|
|
863
|
-
} }),
|
|
868
|
+
} }), zt = Symbol("Context");
|
|
864
869
|
var $e = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))($e || {});
|
|
865
|
-
function
|
|
866
|
-
return Ie(
|
|
870
|
+
function Io() {
|
|
871
|
+
return Ie(zt, null);
|
|
867
872
|
}
|
|
868
|
-
function
|
|
869
|
-
|
|
873
|
+
function Lo(e) {
|
|
874
|
+
lt(zt, e);
|
|
870
875
|
}
|
|
871
|
-
var W = ((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))(W || {}),
|
|
872
|
-
function
|
|
876
|
+
var W = ((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))(W || {}), Ut = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(Ut || {});
|
|
877
|
+
function Ro(e) {
|
|
873
878
|
function o() {
|
|
874
879
|
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", o));
|
|
875
880
|
}
|
|
876
881
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", o), o());
|
|
877
882
|
}
|
|
878
883
|
let ce = [];
|
|
879
|
-
|
|
884
|
+
Ro(() => {
|
|
880
885
|
function e(o) {
|
|
881
886
|
o.target instanceof HTMLElement && o.target !== document.body && ce[0] !== o.target && (ce.unshift(o.target), ce = ce.filter((t) => t != null && t.isConnected), ce.splice(10));
|
|
882
887
|
}
|
|
883
888
|
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 });
|
|
884
889
|
});
|
|
885
|
-
function
|
|
890
|
+
function Po(e) {
|
|
886
891
|
throw new Error("Unexpected object: " + e);
|
|
887
892
|
}
|
|
888
893
|
var z = ((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))(z || {});
|
|
889
|
-
function
|
|
894
|
+
function bt(e, o) {
|
|
890
895
|
let t = o.resolveItems();
|
|
891
896
|
if (t.length <= 0) return null;
|
|
892
|
-
let n = o.resolveActiveIndex(),
|
|
897
|
+
let n = o.resolveActiveIndex(), l = n ?? -1;
|
|
893
898
|
switch (e.focus) {
|
|
894
899
|
case 0: {
|
|
895
900
|
for (let r = 0; r < t.length; ++r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
896
901
|
return n;
|
|
897
902
|
}
|
|
898
903
|
case 1: {
|
|
899
|
-
|
|
900
|
-
for (let r =
|
|
904
|
+
l === -1 && (l = t.length);
|
|
905
|
+
for (let r = l - 1; r >= 0; --r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
901
906
|
return n;
|
|
902
907
|
}
|
|
903
908
|
case 2: {
|
|
904
|
-
for (let r =
|
|
909
|
+
for (let r = l + 1; r < t.length; ++r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
905
910
|
return n;
|
|
906
911
|
}
|
|
907
912
|
case 3: {
|
|
@@ -915,64 +920,64 @@ function gt(e, o) {
|
|
|
915
920
|
case 5:
|
|
916
921
|
return null;
|
|
917
922
|
default:
|
|
918
|
-
|
|
923
|
+
Po(e);
|
|
919
924
|
}
|
|
920
925
|
}
|
|
921
|
-
function
|
|
922
|
-
for (let [n,
|
|
926
|
+
function Zt(e = {}, o = null, t = []) {
|
|
927
|
+
for (let [n, l] of Object.entries(e)) Gt(t, Wt(o, n), l);
|
|
923
928
|
return t;
|
|
924
929
|
}
|
|
925
|
-
function
|
|
930
|
+
function Wt(e, o) {
|
|
926
931
|
return e ? e + "[" + o + "]" : o;
|
|
927
932
|
}
|
|
928
|
-
function
|
|
929
|
-
if (Array.isArray(t)) for (let [n,
|
|
930
|
-
else t instanceof Date ? e.push([o, t.toISOString()]) : typeof t == "boolean" ? e.push([o, t ? "1" : "0"]) : typeof t == "string" ? e.push([o, t]) : typeof t == "number" ? e.push([o, `${t}`]) : t == null ? e.push([o, ""]) :
|
|
933
|
+
function Gt(e, o, t) {
|
|
934
|
+
if (Array.isArray(t)) for (let [n, l] of t.entries()) Gt(e, Wt(o, n.toString()), l);
|
|
935
|
+
else t instanceof Date ? e.push([o, t.toISOString()]) : typeof t == "boolean" ? e.push([o, t ? "1" : "0"]) : typeof t == "string" ? e.push([o, t]) : typeof t == "number" ? e.push([o, `${t}`]) : t == null ? e.push([o, ""]) : Zt(t, o, e);
|
|
931
936
|
}
|
|
932
|
-
function
|
|
937
|
+
function Vo(e, o) {
|
|
933
938
|
return e === o;
|
|
934
939
|
}
|
|
935
|
-
var
|
|
936
|
-
let
|
|
940
|
+
var ko = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(ko || {}), Mo = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(Mo || {}), No = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(No || {});
|
|
941
|
+
let qt = Symbol("ComboboxContext");
|
|
937
942
|
function ve(e) {
|
|
938
|
-
let o = Ie(
|
|
943
|
+
let o = Ie(qt, null);
|
|
939
944
|
if (o === null) {
|
|
940
945
|
let t = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
|
|
941
946
|
throw Error.captureStackTrace && Error.captureStackTrace(t, ve), t;
|
|
942
947
|
}
|
|
943
948
|
return o;
|
|
944
949
|
}
|
|
945
|
-
let
|
|
950
|
+
let Jt = Symbol("VirtualContext"), Do = ae({ name: "VirtualProvider", setup(e, { slots: o }) {
|
|
946
951
|
let t = ve("VirtualProvider"), n = S(() => {
|
|
947
|
-
let
|
|
948
|
-
if (!
|
|
949
|
-
let a = window.getComputedStyle(
|
|
952
|
+
let s = P(t.optionsRef);
|
|
953
|
+
if (!s) return { start: 0, end: 0 };
|
|
954
|
+
let a = window.getComputedStyle(s);
|
|
950
955
|
return { start: parseFloat(a.paddingBlockStart || a.paddingTop), end: parseFloat(a.paddingBlockEnd || a.paddingBottom) };
|
|
951
|
-
}),
|
|
956
|
+
}), l = to(S(() => ({ scrollPaddingStart: n.value.start, scrollPaddingEnd: n.value.end, count: t.virtual.value.options.length, estimateSize() {
|
|
952
957
|
return 40;
|
|
953
958
|
}, getScrollElement() {
|
|
954
959
|
return P(t.optionsRef);
|
|
955
960
|
}, overscan: 12 }))), r = S(() => {
|
|
956
|
-
var
|
|
957
|
-
return (
|
|
961
|
+
var s;
|
|
962
|
+
return (s = t.virtual.value) == null ? void 0 : s.options;
|
|
958
963
|
}), i = E(0);
|
|
959
964
|
return F([r], () => {
|
|
960
965
|
i.value += 1;
|
|
961
|
-
}),
|
|
962
|
-
if (
|
|
966
|
+
}), lt(Jt, t.virtual.value ? l : null), () => [Ee("div", { style: { position: "relative", width: "100%", height: `${l.value.getTotalSize()}px` }, ref: (s) => {
|
|
967
|
+
if (s) {
|
|
963
968
|
if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || t.activationTrigger.value === 0) return;
|
|
964
|
-
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value &&
|
|
969
|
+
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value && l.value.scrollToIndex(t.activeOptionIndex.value);
|
|
965
970
|
}
|
|
966
|
-
} },
|
|
967
|
-
} }),
|
|
968
|
-
let
|
|
971
|
+
} }, l.value.getVirtualItems().map((s) => Lt(o.default({ option: t.virtual.value.options[s.index], open: t.comboboxState.value === 0 })[0], { key: `${i.value}-${s.index}`, "data-index": s.index, "aria-setsize": t.virtual.value.options.length, "aria-posinset": s.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${s.start}px)`, overflowAnchor: "none" } })))];
|
|
972
|
+
} }), Ao = ae({ 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: o, attrs: t, emit: n }) {
|
|
973
|
+
let l = E(1), r = E(null), i = E(null), s = E(null), a = E(null), u = E({ static: !1, hold: !1 }), c = E([]), p = E(null), g = E(2), x = E(!1);
|
|
969
974
|
function _(d = (f) => f) {
|
|
970
|
-
let f = p.value !== null ? c.value[p.value] : null, y = d(c.value.slice()), O = y.length > 0 && y[0].dataRef.order.value !== null ? y.sort((A, G) => A.dataRef.order.value - G.dataRef.order.value) :
|
|
975
|
+
let f = p.value !== null ? c.value[p.value] : null, y = d(c.value.slice()), O = y.length > 0 && y[0].dataRef.order.value !== null ? y.sort((A, G) => A.dataRef.order.value - G.dataRef.order.value) : go(y, (A) => P(A.dataRef.domRef)), M = f ? O.indexOf(f) : null;
|
|
971
976
|
return M === -1 && (M = null), { options: O, activeOptionIndex: M };
|
|
972
977
|
}
|
|
973
|
-
let v = S(() => e.multiple ? 1 : 0), $ = S(() => e.nullable), [N, I] =
|
|
978
|
+
let v = S(() => e.multiple ? 1 : 0), $ = S(() => e.nullable), [N, I] = no(S(() => e.modelValue), (d) => n("update:modelValue", d), S(() => e.defaultValue)), k = S(() => N.value === void 0 ? le(v.value, { 1: [], 0: void 0 }) : N.value), D = null, m = null;
|
|
974
979
|
function R(d) {
|
|
975
|
-
return
|
|
980
|
+
return le(v.value, { 0() {
|
|
976
981
|
return I == null ? void 0 : I(d);
|
|
977
982
|
}, 1: () => {
|
|
978
983
|
let f = K(b.value.value).slice(), y = K(d), O = f.findIndex((M) => b.compare(y, K(M)));
|
|
@@ -987,15 +992,15 @@ let Wt = Symbol("VirtualContext"), Mo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
987
992
|
y !== -1 ? p.value = y : p.value = null;
|
|
988
993
|
}
|
|
989
994
|
});
|
|
990
|
-
let b = { comboboxState:
|
|
995
|
+
let b = { comboboxState: l, value: k, mode: v, compare(d, f) {
|
|
991
996
|
if (typeof e.by == "string") {
|
|
992
997
|
let y = e.by;
|
|
993
998
|
return (d == null ? void 0 : d[y]) === (f == null ? void 0 : f[y]);
|
|
994
999
|
}
|
|
995
|
-
return e.by === null ?
|
|
1000
|
+
return e.by === null ? Vo(d, f) : e.by(d, f);
|
|
996
1001
|
}, calculateIndex(d) {
|
|
997
1002
|
return b.virtual.value ? e.by === null ? b.virtual.value.options.indexOf(d) : b.virtual.value.options.findIndex((f) => b.compare(f, d)) : c.value.findIndex((f) => b.compare(f.dataRef.value, d));
|
|
998
|
-
}, defaultValue: S(() => e.defaultValue), nullable: $, immediate: S(() => !1), virtual: S(() => null), inputRef: i, labelRef: r, buttonRef:
|
|
1003
|
+
}, defaultValue: S(() => e.defaultValue), nullable: $, immediate: S(() => !1), virtual: S(() => null), inputRef: i, labelRef: r, buttonRef: s, optionsRef: a, disabled: S(() => e.disabled), options: c, change(d) {
|
|
999
1004
|
I(d);
|
|
1000
1005
|
}, activeOptionIndex: S(() => {
|
|
1001
1006
|
if (x.value && p.value === null && (b.virtual.value ? b.virtual.value.options.length > 0 : c.value.length > 0)) {
|
|
@@ -1011,22 +1016,22 @@ let Wt = Symbol("VirtualContext"), Mo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1011
1016
|
}
|
|
1012
1017
|
return p.value;
|
|
1013
1018
|
}), activationTrigger: g, optionsPropsRef: u, closeCombobox() {
|
|
1014
|
-
x.value = !1, !e.disabled &&
|
|
1019
|
+
x.value = !1, !e.disabled && l.value !== 1 && (l.value = 1, p.value = null);
|
|
1015
1020
|
}, openCombobox() {
|
|
1016
|
-
if (x.value = !0, !e.disabled &&
|
|
1021
|
+
if (x.value = !0, !e.disabled && l.value !== 0) {
|
|
1017
1022
|
if (b.value.value) {
|
|
1018
1023
|
let d = b.calculateIndex(b.value.value);
|
|
1019
1024
|
d !== -1 && (p.value = d);
|
|
1020
1025
|
}
|
|
1021
|
-
|
|
1026
|
+
l.value = 0;
|
|
1022
1027
|
}
|
|
1023
1028
|
}, setActivationTrigger(d) {
|
|
1024
1029
|
g.value = d;
|
|
1025
1030
|
}, goToOption(d, f, y) {
|
|
1026
1031
|
x.value = !1, D !== null && cancelAnimationFrame(D), D = requestAnimationFrame(() => {
|
|
1027
|
-
if (e.disabled || a.value && !u.value.static &&
|
|
1032
|
+
if (e.disabled || a.value && !u.value.static && l.value === 1) return;
|
|
1028
1033
|
if (b.virtual.value) {
|
|
1029
|
-
p.value = d === z.Specific ? f :
|
|
1034
|
+
p.value = d === z.Specific ? f : bt({ focus: d }, { resolveItems: () => b.virtual.value.options, resolveActiveIndex: () => {
|
|
1030
1035
|
var A, G;
|
|
1031
1036
|
return (G = (A = b.activeOptionIndex.value) != null ? A : b.virtual.value.options.findIndex((q) => {
|
|
1032
1037
|
var j;
|
|
@@ -1042,7 +1047,7 @@ let Wt = Symbol("VirtualContext"), Mo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1042
1047
|
let A = O.options.findIndex((G) => !G.dataRef.disabled);
|
|
1043
1048
|
A !== -1 && (O.activeOptionIndex = A);
|
|
1044
1049
|
}
|
|
1045
|
-
let M = d === z.Specific ? f :
|
|
1050
|
+
let M = d === z.Specific ? f : bt({ focus: d }, { resolveItems: () => O.options, resolveActiveIndex: () => O.activeOptionIndex, resolveId: (A) => A.id, resolveDisabled: (A) => A.dataRef.disabled });
|
|
1046
1051
|
p.value = M, g.value = y ?? 2, c.value = O.options;
|
|
1047
1052
|
});
|
|
1048
1053
|
}, selectOption(d) {
|
|
@@ -1060,7 +1065,7 @@ let Wt = Symbol("VirtualContext"), Mo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1060
1065
|
b.goToOption(z.Specific, b.activeOptionIndex.value);
|
|
1061
1066
|
}
|
|
1062
1067
|
}, registerOption(d, f) {
|
|
1063
|
-
let y =
|
|
1068
|
+
let y = Rt({ id: d, dataRef: f });
|
|
1064
1069
|
if (b.virtual.value) {
|
|
1065
1070
|
c.value.push(y);
|
|
1066
1071
|
return;
|
|
@@ -1082,11 +1087,11 @@ let Wt = Symbol("VirtualContext"), Mo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1082
1087
|
});
|
|
1083
1088
|
c.value = y.options, p.value = y.activeOptionIndex, g.value = 2;
|
|
1084
1089
|
}, isSelected(d) {
|
|
1085
|
-
return
|
|
1090
|
+
return le(v.value, { 0: () => b.compare(K(b.value.value), K(d)), 1: () => K(b.value.value).some((f) => b.compare(K(f), K(d))) });
|
|
1086
1091
|
}, isActive(d) {
|
|
1087
1092
|
return p.value === b.calculateIndex(d);
|
|
1088
1093
|
} };
|
|
1089
|
-
|
|
1094
|
+
Co([i, s, a], () => b.closeCombobox(), S(() => l.value === 0)), lt(qt, b), Lo(S(() => le(l.value, { 0: $e.Open, 1: $e.Closed })));
|
|
1090
1095
|
let L = S(() => {
|
|
1091
1096
|
var d;
|
|
1092
1097
|
return (d = P(i)) == null ? void 0 : d.closest("form");
|
|
@@ -1104,27 +1109,27 @@ let Wt = Symbol("VirtualContext"), Mo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1104
1109
|
}, { immediate: !0 });
|
|
1105
1110
|
}), () => {
|
|
1106
1111
|
var d, f, y;
|
|
1107
|
-
let { name: O, disabled: M, form: A, ...G } = e, q = { open:
|
|
1108
|
-
return Ee(Z, [...O != null && k.value != null ?
|
|
1112
|
+
let { name: O, disabled: M, form: A, ...G } = e, q = { open: l.value === 0, disabled: M, activeIndex: b.activeOptionIndex.value, activeOption: b.activeOptionIndex.value === null ? null : b.virtual.value ? b.virtual.value.options[(d = b.activeOptionIndex.value) != null ? d : 0] : (y = (f = b.options.value[b.activeOptionIndex.value]) == null ? void 0 : f.dataRef.value) != null ? y : null, value: k.value };
|
|
1113
|
+
return Ee(Z, [...O != null && k.value != null ? Zt({ [O]: k.value }).map(([j, hn]) => Ee(To, Oo({ features: Ht.Hidden, key: j, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: A, disabled: M, name: j, value: hn }))) : [], pe({ theirProps: { ...t, ...He(G, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: q, slots: o, attrs: t, name: "Combobox" })]);
|
|
1109
1114
|
};
|
|
1110
1115
|
} });
|
|
1111
1116
|
ae({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t }) {
|
|
1112
1117
|
var n;
|
|
1113
|
-
let
|
|
1118
|
+
let l = (n = e.id) != null ? n : `headlessui-combobox-label-${Pe()}`, r = ve("ComboboxLabel");
|
|
1114
1119
|
function i() {
|
|
1115
|
-
var
|
|
1116
|
-
(
|
|
1120
|
+
var s;
|
|
1121
|
+
(s = P(r.inputRef)) == null || s.focus({ preventScroll: !0 });
|
|
1117
1122
|
}
|
|
1118
1123
|
return () => {
|
|
1119
|
-
let
|
|
1120
|
-
return pe({ ourProps: u, theirProps: a, slot:
|
|
1124
|
+
let s = { open: r.comboboxState.value === 0, disabled: r.disabled.value }, { ...a } = e, u = { id: l, ref: r.labelRef, onClick: i };
|
|
1125
|
+
return pe({ ourProps: u, theirProps: a, slot: s, attrs: o, slots: t, name: "ComboboxLabel" });
|
|
1121
1126
|
};
|
|
1122
1127
|
} });
|
|
1123
|
-
let
|
|
1124
|
-
var
|
|
1125
|
-
let r = (
|
|
1128
|
+
let Fo = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
1129
|
+
var l;
|
|
1130
|
+
let r = (l = e.id) != null ? l : `headlessui-combobox-button-${Pe()}`, i = ve("ComboboxButton");
|
|
1126
1131
|
n({ el: i.buttonRef, $el: i.buttonRef });
|
|
1127
|
-
function
|
|
1132
|
+
function s(c) {
|
|
1128
1133
|
i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (c.preventDefault(), i.openCombobox()), Q(() => {
|
|
1129
1134
|
var p;
|
|
1130
1135
|
return (p = P(i.inputRef)) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
@@ -1155,40 +1160,40 @@ let Do = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1155
1160
|
return;
|
|
1156
1161
|
}
|
|
1157
1162
|
}
|
|
1158
|
-
let u =
|
|
1163
|
+
let u = yo(S(() => ({ as: e.as, type: o.type })), i.buttonRef);
|
|
1159
1164
|
return () => {
|
|
1160
1165
|
var c, p;
|
|
1161
|
-
let g = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...x } = e, _ = { ref: i.buttonRef, id: r, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c = P(i.optionsRef)) == null ? void 0 : c.id, "aria-expanded": i.comboboxState.value === 0, "aria-labelledby": i.labelRef.value ? [(p = P(i.labelRef)) == null ? void 0 : p.id, r].join(" ") : void 0, disabled: i.disabled.value === !0 ? !0 : void 0, onKeydown: a, onClick:
|
|
1166
|
+
let g = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...x } = e, _ = { ref: i.buttonRef, id: r, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c = P(i.optionsRef)) == null ? void 0 : c.id, "aria-expanded": i.comboboxState.value === 0, "aria-labelledby": i.labelRef.value ? [(p = P(i.labelRef)) == null ? void 0 : p.id, r].join(" ") : void 0, disabled: i.disabled.value === !0 ? !0 : void 0, onKeydown: a, onClick: s };
|
|
1162
1167
|
return pe({ ourProps: _, theirProps: x, slot: g, attrs: o, slots: t, name: "ComboboxButton" });
|
|
1163
1168
|
};
|
|
1164
|
-
} }),
|
|
1169
|
+
} }), jo = ae({ 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: o, attrs: t, slots: n, expose: l }) {
|
|
1165
1170
|
var r;
|
|
1166
|
-
let i = (r = e.id) != null ? r : `headlessui-combobox-input-${
|
|
1167
|
-
|
|
1171
|
+
let i = (r = e.id) != null ? r : `headlessui-combobox-input-${Pe()}`, s = ve("ComboboxInput"), a = S(() => it(P(s.inputRef))), u = { value: !1 };
|
|
1172
|
+
l({ el: s.inputRef, $el: s.inputRef });
|
|
1168
1173
|
function c() {
|
|
1169
|
-
|
|
1170
|
-
let m = P(
|
|
1171
|
-
m && (m.scrollTop = 0),
|
|
1174
|
+
s.change(null);
|
|
1175
|
+
let m = P(s.optionsRef);
|
|
1176
|
+
m && (m.scrollTop = 0), s.goToOption(z.Nothing);
|
|
1172
1177
|
}
|
|
1173
1178
|
let p = S(() => {
|
|
1174
1179
|
var m;
|
|
1175
|
-
let R =
|
|
1176
|
-
return P(
|
|
1180
|
+
let R = s.value.value;
|
|
1181
|
+
return P(s.inputRef) ? typeof e.displayValue < "u" && R !== void 0 ? (m = e.displayValue(R)) != null ? m : "" : typeof R == "string" ? R : "" : "";
|
|
1177
1182
|
});
|
|
1178
1183
|
Ce(() => {
|
|
1179
|
-
F([p,
|
|
1184
|
+
F([p, s.comboboxState, a], ([m, R], [C, b]) => {
|
|
1180
1185
|
if (u.value) return;
|
|
1181
|
-
let L = P(
|
|
1186
|
+
let L = P(s.inputRef);
|
|
1182
1187
|
L && ((b === 0 && R === 1 || m !== C) && (L.value = m), requestAnimationFrame(() => {
|
|
1183
1188
|
var d;
|
|
1184
1189
|
if (u.value || !L || ((d = a.value) == null ? void 0 : d.activeElement) !== L) return;
|
|
1185
1190
|
let { selectionStart: f, selectionEnd: y } = L;
|
|
1186
1191
|
Math.abs((y ?? 0) - (f ?? 0)) === 0 && f === 0 && L.setSelectionRange(L.value.length, L.value.length);
|
|
1187
1192
|
}));
|
|
1188
|
-
}, { immediate: !0 }), F([
|
|
1193
|
+
}, { immediate: !0 }), F([s.comboboxState], ([m], [R]) => {
|
|
1189
1194
|
if (m === 0 && R === 1) {
|
|
1190
1195
|
if (u.value) return;
|
|
1191
|
-
let C = P(
|
|
1196
|
+
let C = P(s.inputRef);
|
|
1192
1197
|
if (!C) return;
|
|
1193
1198
|
let b = C.value, { selectionStart: L, selectionEnd: d, selectionDirection: f } = C;
|
|
1194
1199
|
C.value = "", C.value = b, f !== null ? C.setSelectionRange(L, d, f) : C.setSelectionRange(L, d);
|
|
@@ -1200,84 +1205,84 @@ let Do = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1200
1205
|
g.value = !0;
|
|
1201
1206
|
}
|
|
1202
1207
|
function _() {
|
|
1203
|
-
|
|
1208
|
+
Fe().nextFrame(() => {
|
|
1204
1209
|
g.value = !1;
|
|
1205
1210
|
});
|
|
1206
1211
|
}
|
|
1207
|
-
let v =
|
|
1212
|
+
let v = so();
|
|
1208
1213
|
function $(m) {
|
|
1209
1214
|
switch (u.value = !0, v(() => {
|
|
1210
1215
|
u.value = !1;
|
|
1211
1216
|
}), m.key) {
|
|
1212
1217
|
case W.Enter:
|
|
1213
|
-
if (u.value = !1,
|
|
1214
|
-
if (m.preventDefault(), m.stopPropagation(),
|
|
1215
|
-
|
|
1218
|
+
if (u.value = !1, s.comboboxState.value !== 0 || g.value) return;
|
|
1219
|
+
if (m.preventDefault(), m.stopPropagation(), s.activeOptionIndex.value === null) {
|
|
1220
|
+
s.closeCombobox();
|
|
1216
1221
|
return;
|
|
1217
1222
|
}
|
|
1218
|
-
|
|
1223
|
+
s.selectActiveOption(), s.mode.value === 0 && s.closeCombobox();
|
|
1219
1224
|
break;
|
|
1220
1225
|
case W.ArrowDown:
|
|
1221
|
-
return u.value = !1, m.preventDefault(), m.stopPropagation(),
|
|
1226
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), le(s.comboboxState.value, { 0: () => s.goToOption(z.Next), 1: () => s.openCombobox() });
|
|
1222
1227
|
case W.ArrowUp:
|
|
1223
|
-
return u.value = !1, m.preventDefault(), m.stopPropagation(),
|
|
1224
|
-
|
|
1225
|
-
|
|
1228
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), le(s.comboboxState.value, { 0: () => s.goToOption(z.Previous), 1: () => {
|
|
1229
|
+
s.openCombobox(), Q(() => {
|
|
1230
|
+
s.value.value || s.goToOption(z.Last);
|
|
1226
1231
|
});
|
|
1227
1232
|
} });
|
|
1228
1233
|
case W.Home:
|
|
1229
1234
|
if (m.shiftKey) break;
|
|
1230
|
-
return u.value = !1, m.preventDefault(), m.stopPropagation(),
|
|
1235
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), s.goToOption(z.First);
|
|
1231
1236
|
case W.PageUp:
|
|
1232
|
-
return u.value = !1, m.preventDefault(), m.stopPropagation(),
|
|
1237
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), s.goToOption(z.First);
|
|
1233
1238
|
case W.End:
|
|
1234
1239
|
if (m.shiftKey) break;
|
|
1235
|
-
return u.value = !1, m.preventDefault(), m.stopPropagation(),
|
|
1240
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), s.goToOption(z.Last);
|
|
1236
1241
|
case W.PageDown:
|
|
1237
|
-
return u.value = !1, m.preventDefault(), m.stopPropagation(),
|
|
1242
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), s.goToOption(z.Last);
|
|
1238
1243
|
case W.Escape:
|
|
1239
|
-
if (u.value = !1,
|
|
1240
|
-
m.preventDefault(),
|
|
1244
|
+
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1245
|
+
m.preventDefault(), s.optionsRef.value && !s.optionsPropsRef.value.static && m.stopPropagation(), s.nullable.value && s.mode.value === 0 && s.value.value === null && c(), s.closeCombobox();
|
|
1241
1246
|
break;
|
|
1242
1247
|
case W.Tab:
|
|
1243
|
-
if (u.value = !1,
|
|
1244
|
-
|
|
1248
|
+
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1249
|
+
s.mode.value === 0 && s.activationTrigger.value !== 1 && s.selectActiveOption(), s.closeCombobox();
|
|
1245
1250
|
break;
|
|
1246
1251
|
}
|
|
1247
1252
|
}
|
|
1248
1253
|
function N(m) {
|
|
1249
|
-
o("change", m),
|
|
1254
|
+
o("change", m), s.nullable.value && s.mode.value === 0 && m.target.value === "" && c(), s.openCombobox();
|
|
1250
1255
|
}
|
|
1251
1256
|
function I(m) {
|
|
1252
1257
|
var R, C, b;
|
|
1253
1258
|
let L = (R = m.relatedTarget) != null ? R : ce.find((d) => d !== m.currentTarget);
|
|
1254
|
-
if (u.value = !1, !((C = P(
|
|
1259
|
+
if (u.value = !1, !((C = P(s.optionsRef)) != null && C.contains(L)) && !((b = P(s.buttonRef)) != null && b.contains(L)) && s.comboboxState.value === 0) return m.preventDefault(), s.mode.value === 0 && (s.nullable.value && s.value.value === null ? c() : s.activationTrigger.value !== 1 && s.selectActiveOption()), s.closeCombobox();
|
|
1255
1260
|
}
|
|
1256
1261
|
function k(m) {
|
|
1257
1262
|
var R, C, b;
|
|
1258
1263
|
let L = (R = m.relatedTarget) != null ? R : ce.find((d) => d !== m.currentTarget);
|
|
1259
|
-
(C = P(
|
|
1260
|
-
|
|
1264
|
+
(C = P(s.buttonRef)) != null && C.contains(L) || (b = P(s.optionsRef)) != null && b.contains(L) || s.disabled.value || s.immediate.value && s.comboboxState.value !== 0 && (s.openCombobox(), Fe().nextFrame(() => {
|
|
1265
|
+
s.setActivationTrigger(1);
|
|
1261
1266
|
}));
|
|
1262
1267
|
}
|
|
1263
1268
|
let D = S(() => {
|
|
1264
1269
|
var m, R, C, b;
|
|
1265
|
-
return (b = (C = (R = e.defaultValue) != null ? R :
|
|
1270
|
+
return (b = (C = (R = e.defaultValue) != null ? R : s.defaultValue.value !== void 0 ? (m = e.displayValue) == null ? void 0 : m.call(e, s.defaultValue.value) : null) != null ? C : s.defaultValue.value) != null ? b : "";
|
|
1266
1271
|
});
|
|
1267
1272
|
return () => {
|
|
1268
1273
|
var m, R, C, b, L, d, f;
|
|
1269
|
-
let y = { open:
|
|
1274
|
+
let y = { open: s.comboboxState.value === 0 }, { displayValue: O, onChange: M, ...A } = e, G = { "aria-controls": (m = s.optionsRef.value) == null ? void 0 : m.id, "aria-expanded": s.comboboxState.value === 0, "aria-activedescendant": s.activeOptionIndex.value === null ? void 0 : s.virtual.value ? (R = s.options.value.find((q) => !s.virtual.value.disabled(q.dataRef.value) && s.compare(q.dataRef.value, s.virtual.value.options[s.activeOptionIndex.value]))) == null ? void 0 : R.id : (C = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : C.id, "aria-labelledby": (d = (b = P(s.labelRef)) == null ? void 0 : b.id) != null ? d : (L = P(s.buttonRef)) == null ? void 0 : L.id, "aria-autocomplete": "list", id: i, onCompositionstart: x, onCompositionend: _, onKeydown: $, onInput: N, onFocus: k, onBlur: I, role: "combobox", type: (f = t.type) != null ? f : "text", tabIndex: 0, ref: s.inputRef, defaultValue: D.value, disabled: s.disabled.value === !0 ? !0 : void 0 };
|
|
1270
1275
|
return pe({ ourProps: G, theirProps: A, slot: y, attrs: t, slots: n, features: Oe.RenderStrategy | Oe.Static, name: "ComboboxInput" });
|
|
1271
1276
|
};
|
|
1272
|
-
} }),
|
|
1273
|
-
let
|
|
1274
|
-
n({ el:
|
|
1275
|
-
|
|
1277
|
+
} }), Bo = ae({ 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: o, slots: t, expose: n }) {
|
|
1278
|
+
let l = ve("ComboboxOptions"), r = `headlessui-combobox-options-${Pe()}`;
|
|
1279
|
+
n({ el: l.optionsRef, $el: l.optionsRef }), ie(() => {
|
|
1280
|
+
l.optionsPropsRef.value.static = e.static;
|
|
1276
1281
|
}), ie(() => {
|
|
1277
|
-
|
|
1282
|
+
l.optionsPropsRef.value.hold = e.hold;
|
|
1278
1283
|
});
|
|
1279
|
-
let i =
|
|
1280
|
-
|
|
1284
|
+
let i = Io(), s = S(() => i !== null ? (i.value & $e.Open) === $e.Open : l.comboboxState.value === 0);
|
|
1285
|
+
So({ container: S(() => P(l.optionsRef)), enabled: S(() => l.comboboxState.value === 0), accept(u) {
|
|
1281
1286
|
return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1282
1287
|
}, walk(u) {
|
|
1283
1288
|
u.setAttribute("role", "none");
|
|
@@ -1287,57 +1292,57 @@ let Do = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1287
1292
|
}
|
|
1288
1293
|
return () => {
|
|
1289
1294
|
var u, c, p;
|
|
1290
|
-
let g = { open:
|
|
1291
|
-
return pe({ ourProps: x, theirProps: _, slot: g, attrs: o, slots:
|
|
1295
|
+
let g = { open: l.comboboxState.value === 0 }, x = { "aria-labelledby": (p = (u = P(l.labelRef)) == null ? void 0 : u.id) != null ? p : (c = P(l.buttonRef)) == null ? void 0 : c.id, id: r, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: a }, _ = He(e, ["hold"]);
|
|
1296
|
+
return pe({ ourProps: x, theirProps: _, slot: g, attrs: o, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ee(Do, {}, t.default)] } : t, features: Oe.RenderStrategy | Oe.Static, visible: s.value, name: "ComboboxOptions" });
|
|
1292
1297
|
};
|
|
1293
|
-
} }),
|
|
1294
|
-
let
|
|
1298
|
+
} }), Ho = ae({ 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: o, attrs: t, expose: n }) {
|
|
1299
|
+
let l = ve("ComboboxOption"), r = `headlessui-combobox-option-${Pe()}`, i = E(null), s = S(() => e.disabled);
|
|
1295
1300
|
n({ el: i, $el: i });
|
|
1296
1301
|
let a = S(() => {
|
|
1297
1302
|
var I;
|
|
1298
|
-
return
|
|
1299
|
-
}), u = S(() =>
|
|
1300
|
-
Ce(() =>
|
|
1303
|
+
return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((I = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : I.id) === r;
|
|
1304
|
+
}), u = S(() => l.isSelected(e.value)), c = Ie(Jt, null), p = S(() => ({ disabled: e.disabled, value: e.value, domRef: i, order: S(() => e.order) }));
|
|
1305
|
+
Ce(() => l.registerOption(r, p)), ot(() => l.unregisterOption(r, a.value)), ie(() => {
|
|
1301
1306
|
let I = P(i);
|
|
1302
1307
|
I && (c == null || c.value.measureElement(I));
|
|
1303
1308
|
}), ie(() => {
|
|
1304
|
-
|
|
1309
|
+
l.comboboxState.value === 0 && a.value && (l.virtual.value || l.activationTrigger.value !== 0 && Q(() => {
|
|
1305
1310
|
var I, k;
|
|
1306
1311
|
return (k = (I = P(i)) == null ? void 0 : I.scrollIntoView) == null ? void 0 : k.call(I, { block: "nearest" });
|
|
1307
1312
|
}));
|
|
1308
1313
|
});
|
|
1309
1314
|
function g(I) {
|
|
1310
|
-
I.preventDefault(), I.button ===
|
|
1315
|
+
I.preventDefault(), I.button === Ut.Left && (s.value || (l.selectOption(r), Ft() || requestAnimationFrame(() => {
|
|
1311
1316
|
var k;
|
|
1312
|
-
return (k = P(
|
|
1313
|
-
}),
|
|
1317
|
+
return (k = P(l.inputRef)) == null ? void 0 : k.focus({ preventScroll: !0 });
|
|
1318
|
+
}), l.mode.value === 0 && l.closeCombobox()));
|
|
1314
1319
|
}
|
|
1315
1320
|
function x() {
|
|
1316
1321
|
var I;
|
|
1317
|
-
if (e.disabled || (I =
|
|
1318
|
-
let k =
|
|
1319
|
-
|
|
1322
|
+
if (e.disabled || (I = l.virtual.value) != null && I.disabled(e.value)) return l.goToOption(z.Nothing);
|
|
1323
|
+
let k = l.calculateIndex(e.value);
|
|
1324
|
+
l.goToOption(z.Specific, k);
|
|
1320
1325
|
}
|
|
1321
|
-
let _ =
|
|
1326
|
+
let _ = wo();
|
|
1322
1327
|
function v(I) {
|
|
1323
1328
|
_.update(I);
|
|
1324
1329
|
}
|
|
1325
1330
|
function $(I) {
|
|
1326
1331
|
var k;
|
|
1327
|
-
if (!_.wasMoved(I) || e.disabled || (k =
|
|
1328
|
-
let D =
|
|
1329
|
-
|
|
1332
|
+
if (!_.wasMoved(I) || e.disabled || (k = l.virtual.value) != null && k.disabled(e.value) || a.value) return;
|
|
1333
|
+
let D = l.calculateIndex(e.value);
|
|
1334
|
+
l.goToOption(z.Specific, D, 0);
|
|
1330
1335
|
}
|
|
1331
1336
|
function N(I) {
|
|
1332
1337
|
var k;
|
|
1333
|
-
_.wasMoved(I) && (e.disabled || (k =
|
|
1338
|
+
_.wasMoved(I) && (e.disabled || (k = l.virtual.value) != null && k.disabled(e.value) || a.value && (l.optionsPropsRef.value.hold || l.goToOption(z.Nothing)));
|
|
1334
1339
|
}
|
|
1335
1340
|
return () => {
|
|
1336
|
-
let { disabled: I } = e, k = { active: a.value, selected: u.value, disabled: I }, D = { id: r, ref: i, role: "option", tabIndex: I === !0 ? void 0 : -1, "aria-disabled": I === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: g, onFocus: x, onPointerenter: v, onMouseenter: v, onPointermove: $, onMousemove: $, onPointerleave: N, onMouseleave: N }, m =
|
|
1341
|
+
let { disabled: I } = e, k = { active: a.value, selected: u.value, disabled: I }, D = { id: r, ref: i, role: "option", tabIndex: I === !0 ? void 0 : -1, "aria-disabled": I === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: g, onFocus: x, onPointerenter: v, onMouseenter: v, onPointermove: $, onMousemove: $, onPointerleave: N, onMouseleave: N }, m = He(e, ["order", "value"]);
|
|
1337
1342
|
return pe({ ourProps: D, theirProps: m, slot: k, attrs: t, slots: o, name: "ComboboxOption" });
|
|
1338
1343
|
};
|
|
1339
1344
|
} });
|
|
1340
|
-
function
|
|
1345
|
+
function zo(e, o) {
|
|
1341
1346
|
return w(), T("svg", {
|
|
1342
1347
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1343
1348
|
viewBox: "0 0 20 20",
|
|
@@ -1352,7 +1357,7 @@ function Bo(e, o) {
|
|
|
1352
1357
|
})
|
|
1353
1358
|
]);
|
|
1354
1359
|
}
|
|
1355
|
-
function
|
|
1360
|
+
function Uo(e, o) {
|
|
1356
1361
|
return w(), T("svg", {
|
|
1357
1362
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1358
1363
|
viewBox: "0 0 20 20",
|
|
@@ -1367,7 +1372,7 @@ function Ho(e, o) {
|
|
|
1367
1372
|
})
|
|
1368
1373
|
]);
|
|
1369
1374
|
}
|
|
1370
|
-
function
|
|
1375
|
+
function Zo(e, o) {
|
|
1371
1376
|
return w(), T("svg", {
|
|
1372
1377
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1373
1378
|
viewBox: "0 0 20 20",
|
|
@@ -1382,46 +1387,46 @@ function zo(e, o) {
|
|
|
1382
1387
|
})
|
|
1383
1388
|
]);
|
|
1384
1389
|
}
|
|
1385
|
-
var
|
|
1386
|
-
function
|
|
1390
|
+
var Kt = !1;
|
|
1391
|
+
function Me(e, o, t) {
|
|
1387
1392
|
return Array.isArray(e) ? (e.length = Math.max(e.length, o), e.splice(o, 1, t), t) : (e[o] = t, t);
|
|
1388
1393
|
}
|
|
1389
|
-
function
|
|
1394
|
+
function Ye(e, o) {
|
|
1390
1395
|
if (Array.isArray(e)) {
|
|
1391
1396
|
e.splice(o, 1);
|
|
1392
1397
|
return;
|
|
1393
1398
|
}
|
|
1394
1399
|
delete e[o];
|
|
1395
1400
|
}
|
|
1396
|
-
function
|
|
1397
|
-
return
|
|
1401
|
+
function Wo() {
|
|
1402
|
+
return Yt().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
1398
1403
|
}
|
|
1399
|
-
function
|
|
1404
|
+
function Yt() {
|
|
1400
1405
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
1401
1406
|
}
|
|
1402
|
-
const
|
|
1403
|
-
let me,
|
|
1404
|
-
function
|
|
1407
|
+
const Go = typeof Proxy == "function", qo = "devtools-plugin:setup", Jo = "plugin:settings:set";
|
|
1408
|
+
let me, Qe;
|
|
1409
|
+
function Ko() {
|
|
1405
1410
|
var e;
|
|
1406
|
-
return me !== void 0 || (typeof window < "u" && window.performance ? (me = !0,
|
|
1411
|
+
return me !== void 0 || (typeof window < "u" && window.performance ? (me = !0, Qe = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (me = !0, Qe = globalThis.perf_hooks.performance) : me = !1), me;
|
|
1407
1412
|
}
|
|
1408
|
-
function
|
|
1409
|
-
return
|
|
1413
|
+
function Yo() {
|
|
1414
|
+
return Ko() ? Qe.now() : Date.now();
|
|
1410
1415
|
}
|
|
1411
|
-
class
|
|
1416
|
+
class Qo {
|
|
1412
1417
|
constructor(o, t) {
|
|
1413
1418
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = o, this.hook = t;
|
|
1414
1419
|
const n = {};
|
|
1415
1420
|
if (o.settings)
|
|
1416
1421
|
for (const i in o.settings) {
|
|
1417
|
-
const
|
|
1418
|
-
n[i] =
|
|
1422
|
+
const s = o.settings[i];
|
|
1423
|
+
n[i] = s.defaultValue;
|
|
1419
1424
|
}
|
|
1420
|
-
const
|
|
1425
|
+
const l = `__vue-devtools-plugin-settings__${o.id}`;
|
|
1421
1426
|
let r = Object.assign({}, n);
|
|
1422
1427
|
try {
|
|
1423
|
-
const i = localStorage.getItem(
|
|
1424
|
-
Object.assign(r,
|
|
1428
|
+
const i = localStorage.getItem(l), s = JSON.parse(i);
|
|
1429
|
+
Object.assign(r, s);
|
|
1425
1430
|
} catch {
|
|
1426
1431
|
}
|
|
1427
1432
|
this.fallbacks = {
|
|
@@ -1430,32 +1435,32 @@ class Ko {
|
|
|
1430
1435
|
},
|
|
1431
1436
|
setSettings(i) {
|
|
1432
1437
|
try {
|
|
1433
|
-
localStorage.setItem(
|
|
1438
|
+
localStorage.setItem(l, JSON.stringify(i));
|
|
1434
1439
|
} catch {
|
|
1435
1440
|
}
|
|
1436
1441
|
r = i;
|
|
1437
1442
|
},
|
|
1438
1443
|
now() {
|
|
1439
|
-
return
|
|
1444
|
+
return Yo();
|
|
1440
1445
|
}
|
|
1441
|
-
}, t && t.on(
|
|
1442
|
-
i === this.plugin.id && this.fallbacks.setSettings(
|
|
1446
|
+
}, t && t.on(Jo, (i, s) => {
|
|
1447
|
+
i === this.plugin.id && this.fallbacks.setSettings(s);
|
|
1443
1448
|
}), this.proxiedOn = new Proxy({}, {
|
|
1444
|
-
get: (i,
|
|
1449
|
+
get: (i, s) => this.target ? this.target.on[s] : (...a) => {
|
|
1445
1450
|
this.onQueue.push({
|
|
1446
|
-
method:
|
|
1451
|
+
method: s,
|
|
1447
1452
|
args: a
|
|
1448
1453
|
});
|
|
1449
1454
|
}
|
|
1450
1455
|
}), this.proxiedTarget = new Proxy({}, {
|
|
1451
|
-
get: (i,
|
|
1452
|
-
method:
|
|
1456
|
+
get: (i, s) => this.target ? this.target[s] : s === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(s) ? (...a) => (this.targetQueue.push({
|
|
1457
|
+
method: s,
|
|
1453
1458
|
args: a,
|
|
1454
1459
|
resolve: () => {
|
|
1455
1460
|
}
|
|
1456
|
-
}), this.fallbacks[
|
|
1461
|
+
}), this.fallbacks[s](...a)) : (...a) => new Promise((u) => {
|
|
1457
1462
|
this.targetQueue.push({
|
|
1458
|
-
method:
|
|
1463
|
+
method: s,
|
|
1459
1464
|
args: a,
|
|
1460
1465
|
resolve: u
|
|
1461
1466
|
});
|
|
@@ -1470,12 +1475,12 @@ class Ko {
|
|
|
1470
1475
|
t.resolve(await this.target[t.method](...t.args));
|
|
1471
1476
|
}
|
|
1472
1477
|
}
|
|
1473
|
-
function
|
|
1474
|
-
const t = e, n =
|
|
1475
|
-
if (
|
|
1476
|
-
|
|
1478
|
+
function Qt(e, o) {
|
|
1479
|
+
const t = e, n = Yt(), l = Wo(), r = Go && t.enableEarlyProxy;
|
|
1480
|
+
if (l && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !r))
|
|
1481
|
+
l.emit(qo, e, o);
|
|
1477
1482
|
else {
|
|
1478
|
-
const i = r ? new
|
|
1483
|
+
const i = r ? new Qo(t, l) : null;
|
|
1479
1484
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
1480
1485
|
pluginDescriptor: t,
|
|
1481
1486
|
setupFn: o,
|
|
@@ -1489,7 +1494,7 @@ function Jt(e, o) {
|
|
|
1489
1494
|
* @license MIT
|
|
1490
1495
|
*/
|
|
1491
1496
|
let we;
|
|
1492
|
-
const Te = (e) => we = e,
|
|
1497
|
+
const Te = (e) => we = e, Xt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
1493
1498
|
/* istanbul ignore next */
|
|
1494
1499
|
Symbol()
|
|
1495
1500
|
);
|
|
@@ -1500,19 +1505,19 @@ var ne;
|
|
|
1500
1505
|
(function(e) {
|
|
1501
1506
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
1502
1507
|
})(ne || (ne = {}));
|
|
1503
|
-
const
|
|
1504
|
-
function
|
|
1508
|
+
const ze = typeof window < "u", Se = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && ze, xt = 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 };
|
|
1509
|
+
function Xo(e, { autoBom: o = !1 } = {}) {
|
|
1505
1510
|
return o && /^\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;
|
|
1506
1511
|
}
|
|
1507
|
-
function
|
|
1512
|
+
function at(e, o, t) {
|
|
1508
1513
|
const n = new XMLHttpRequest();
|
|
1509
1514
|
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
1510
|
-
|
|
1515
|
+
nn(n.response, o, t);
|
|
1511
1516
|
}, n.onerror = function() {
|
|
1512
1517
|
console.error("could not download file");
|
|
1513
1518
|
}, n.send();
|
|
1514
1519
|
}
|
|
1515
|
-
function
|
|
1520
|
+
function en(e) {
|
|
1516
1521
|
const o = new XMLHttpRequest();
|
|
1517
1522
|
o.open("HEAD", e, !1);
|
|
1518
1523
|
try {
|
|
@@ -1521,7 +1526,7 @@ function Yt(e) {
|
|
|
1521
1526
|
}
|
|
1522
1527
|
return o.status >= 200 && o.status <= 299;
|
|
1523
1528
|
}
|
|
1524
|
-
function
|
|
1529
|
+
function Ne(e) {
|
|
1525
1530
|
try {
|
|
1526
1531
|
e.dispatchEvent(new MouseEvent("click"));
|
|
1527
1532
|
} catch {
|
|
@@ -1529,54 +1534,54 @@ function ke(e) {
|
|
|
1529
1534
|
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
|
|
1530
1535
|
}
|
|
1531
1536
|
}
|
|
1532
|
-
const
|
|
1537
|
+
const De = typeof navigator == "object" ? navigator : { userAgent: "" }, tn = /Macintosh/.test(De.userAgent) && /AppleWebKit/.test(De.userAgent) && !/Safari/.test(De.userAgent), nn = ze ? (
|
|
1533
1538
|
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
1534
|
-
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !
|
|
1539
|
+
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !tn ? e2 : (
|
|
1535
1540
|
// Use msSaveOrOpenBlob as a second approach
|
|
1536
|
-
"msSaveOrOpenBlob" in
|
|
1541
|
+
"msSaveOrOpenBlob" in De ? t2 : (
|
|
1537
1542
|
// Fallback to using FileReader and a popup
|
|
1538
|
-
|
|
1543
|
+
n2
|
|
1539
1544
|
)
|
|
1540
1545
|
)
|
|
1541
1546
|
) : () => {
|
|
1542
1547
|
};
|
|
1543
|
-
function
|
|
1548
|
+
function e2(e, o = "download", t) {
|
|
1544
1549
|
const n = document.createElement("a");
|
|
1545
|
-
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ?
|
|
1550
|
+
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? en(n.href) ? at(e, o, t) : (n.target = "_blank", Ne(n)) : Ne(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
|
|
1546
1551
|
URL.revokeObjectURL(n.href);
|
|
1547
1552
|
}, 4e4), setTimeout(function() {
|
|
1548
|
-
|
|
1553
|
+
Ne(n);
|
|
1549
1554
|
}, 0));
|
|
1550
1555
|
}
|
|
1551
|
-
function
|
|
1556
|
+
function t2(e, o = "download", t) {
|
|
1552
1557
|
if (typeof e == "string")
|
|
1553
|
-
if (
|
|
1554
|
-
|
|
1558
|
+
if (en(e))
|
|
1559
|
+
at(e, o, t);
|
|
1555
1560
|
else {
|
|
1556
1561
|
const n = document.createElement("a");
|
|
1557
1562
|
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
1558
|
-
|
|
1563
|
+
Ne(n);
|
|
1559
1564
|
});
|
|
1560
1565
|
}
|
|
1561
1566
|
else
|
|
1562
|
-
navigator.msSaveOrOpenBlob(
|
|
1567
|
+
navigator.msSaveOrOpenBlob(Xo(e, t), o);
|
|
1563
1568
|
}
|
|
1564
|
-
function
|
|
1569
|
+
function n2(e, o, t, n) {
|
|
1565
1570
|
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
1566
|
-
return
|
|
1567
|
-
const
|
|
1568
|
-
if ((i ||
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1571
|
-
let a =
|
|
1571
|
+
return at(e, o, t);
|
|
1572
|
+
const l = e.type === "application/octet-stream", r = /constructor/i.test(String(xt.HTMLElement)) || "safari" in xt, i = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
1573
|
+
if ((i || l && r || tn) && typeof FileReader < "u") {
|
|
1574
|
+
const s = new FileReader();
|
|
1575
|
+
s.onloadend = function() {
|
|
1576
|
+
let a = s.result;
|
|
1572
1577
|
if (typeof a != "string")
|
|
1573
1578
|
throw n = null, new Error("Wrong reader.result type");
|
|
1574
1579
|
a = i ? a : a.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = a : location.assign(a), n = null;
|
|
1575
|
-
},
|
|
1580
|
+
}, s.readAsDataURL(e);
|
|
1576
1581
|
} else {
|
|
1577
|
-
const
|
|
1578
|
-
n ? n.location.assign(
|
|
1579
|
-
URL.revokeObjectURL(
|
|
1582
|
+
const s = URL.createObjectURL(e);
|
|
1583
|
+
n ? n.location.assign(s) : location.href = s, n = null, setTimeout(function() {
|
|
1584
|
+
URL.revokeObjectURL(s);
|
|
1580
1585
|
}, 4e4);
|
|
1581
1586
|
}
|
|
1582
1587
|
}
|
|
@@ -1584,39 +1589,39 @@ function B(e, o) {
|
|
|
1584
1589
|
const t = "🍍 " + e;
|
|
1585
1590
|
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(t, o) : o === "error" ? console.error(t) : o === "warn" ? console.warn(t) : console.log(t);
|
|
1586
1591
|
}
|
|
1587
|
-
function
|
|
1592
|
+
function ut(e) {
|
|
1588
1593
|
return "_a" in e && "install" in e;
|
|
1589
1594
|
}
|
|
1590
|
-
function
|
|
1595
|
+
function on() {
|
|
1591
1596
|
if (!("clipboard" in navigator))
|
|
1592
1597
|
return B("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
1593
1598
|
}
|
|
1594
|
-
function
|
|
1599
|
+
function ln(e) {
|
|
1595
1600
|
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;
|
|
1596
1601
|
}
|
|
1597
|
-
async function
|
|
1598
|
-
if (!
|
|
1602
|
+
async function o2(e) {
|
|
1603
|
+
if (!on())
|
|
1599
1604
|
try {
|
|
1600
1605
|
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), B("Global state copied to clipboard.");
|
|
1601
1606
|
} catch (o) {
|
|
1602
|
-
if (
|
|
1607
|
+
if (ln(o))
|
|
1603
1608
|
return;
|
|
1604
1609
|
B("Failed to serialize the state. Check the console for more details.", "error"), console.error(o);
|
|
1605
1610
|
}
|
|
1606
1611
|
}
|
|
1607
|
-
async function
|
|
1608
|
-
if (!
|
|
1612
|
+
async function l2(e) {
|
|
1613
|
+
if (!on())
|
|
1609
1614
|
try {
|
|
1610
|
-
|
|
1615
|
+
sn(e, JSON.parse(await navigator.clipboard.readText())), B("Global state pasted from clipboard.");
|
|
1611
1616
|
} catch (o) {
|
|
1612
|
-
if (
|
|
1617
|
+
if (ln(o))
|
|
1613
1618
|
return;
|
|
1614
1619
|
B("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(o);
|
|
1615
1620
|
}
|
|
1616
1621
|
}
|
|
1617
|
-
async function
|
|
1622
|
+
async function s2(e) {
|
|
1618
1623
|
try {
|
|
1619
|
-
|
|
1624
|
+
nn(new Blob([JSON.stringify(e.state.value)], {
|
|
1620
1625
|
type: "text/plain;charset=utf-8"
|
|
1621
1626
|
}), "pinia-state.json");
|
|
1622
1627
|
} catch (o) {
|
|
@@ -1624,7 +1629,7 @@ async function o2(e) {
|
|
|
1624
1629
|
}
|
|
1625
1630
|
}
|
|
1626
1631
|
let oe;
|
|
1627
|
-
function
|
|
1632
|
+
function r2() {
|
|
1628
1633
|
oe || (oe = document.createElement("input"), oe.type = "file", oe.accept = ".json");
|
|
1629
1634
|
function e() {
|
|
1630
1635
|
return new Promise((o, t) => {
|
|
@@ -1632,25 +1637,25 @@ function s2() {
|
|
|
1632
1637
|
const n = oe.files;
|
|
1633
1638
|
if (!n)
|
|
1634
1639
|
return o(null);
|
|
1635
|
-
const
|
|
1636
|
-
return o(
|
|
1640
|
+
const l = n.item(0);
|
|
1641
|
+
return o(l ? { text: await l.text(), file: l } : null);
|
|
1637
1642
|
}, oe.oncancel = () => o(null), oe.onerror = t, oe.click();
|
|
1638
1643
|
});
|
|
1639
1644
|
}
|
|
1640
1645
|
return e;
|
|
1641
1646
|
}
|
|
1642
|
-
async function
|
|
1647
|
+
async function i2(e) {
|
|
1643
1648
|
try {
|
|
1644
|
-
const t = await
|
|
1649
|
+
const t = await r2()();
|
|
1645
1650
|
if (!t)
|
|
1646
1651
|
return;
|
|
1647
|
-
const { text: n, file:
|
|
1648
|
-
|
|
1652
|
+
const { text: n, file: l } = t;
|
|
1653
|
+
sn(e, JSON.parse(n)), B(`Global state imported from "${l.name}".`);
|
|
1649
1654
|
} catch (o) {
|
|
1650
1655
|
B("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
|
|
1651
1656
|
}
|
|
1652
1657
|
}
|
|
1653
|
-
function
|
|
1658
|
+
function sn(e, o) {
|
|
1654
1659
|
for (const t in o) {
|
|
1655
1660
|
const n = e.state.value[t];
|
|
1656
1661
|
n ? Object.assign(n, o[t]) : e.state.value[t] = o[t];
|
|
@@ -1663,18 +1668,18 @@ function Y(e) {
|
|
|
1663
1668
|
}
|
|
1664
1669
|
};
|
|
1665
1670
|
}
|
|
1666
|
-
const
|
|
1667
|
-
function
|
|
1668
|
-
return
|
|
1669
|
-
id:
|
|
1670
|
-
label:
|
|
1671
|
+
const rn = "🍍 Pinia (root)", Xe = "_root";
|
|
1672
|
+
function a2(e) {
|
|
1673
|
+
return ut(e) ? {
|
|
1674
|
+
id: Xe,
|
|
1675
|
+
label: rn
|
|
1671
1676
|
} : {
|
|
1672
1677
|
id: e.$id,
|
|
1673
1678
|
label: e.$id
|
|
1674
1679
|
};
|
|
1675
1680
|
}
|
|
1676
|
-
function
|
|
1677
|
-
if (
|
|
1681
|
+
function u2(e) {
|
|
1682
|
+
if (ut(e)) {
|
|
1678
1683
|
const t = Array.from(e._s.keys()), n = e._s;
|
|
1679
1684
|
return {
|
|
1680
1685
|
state: t.map((r) => ({
|
|
@@ -1687,7 +1692,7 @@ function i2(e) {
|
|
|
1687
1692
|
return {
|
|
1688
1693
|
editable: !1,
|
|
1689
1694
|
key: r,
|
|
1690
|
-
value: i._getters.reduce((
|
|
1695
|
+
value: i._getters.reduce((s, a) => (s[a] = i[a], s), {})
|
|
1691
1696
|
};
|
|
1692
1697
|
})
|
|
1693
1698
|
};
|
|
@@ -1709,7 +1714,7 @@ function i2(e) {
|
|
|
1709
1714
|
value: e[t]
|
|
1710
1715
|
}))), o;
|
|
1711
1716
|
}
|
|
1712
|
-
function
|
|
1717
|
+
function c2(e) {
|
|
1713
1718
|
return e ? Array.isArray(e) ? e.reduce((o, t) => (o.keys.push(t.key), o.operations.push(t.type), o.oldValue[t.key] = t.oldValue, o.newValue[t.key] = t.newValue, o), {
|
|
1714
1719
|
oldValue: {},
|
|
1715
1720
|
keys: [],
|
|
@@ -1722,7 +1727,7 @@ function a2(e) {
|
|
|
1722
1727
|
newValue: e.newValue
|
|
1723
1728
|
} : {};
|
|
1724
1729
|
}
|
|
1725
|
-
function
|
|
1730
|
+
function d2(e) {
|
|
1726
1731
|
switch (e) {
|
|
1727
1732
|
case ne.direct:
|
|
1728
1733
|
return "mutation";
|
|
@@ -1735,15 +1740,15 @@ function u2(e) {
|
|
|
1735
1740
|
}
|
|
1736
1741
|
}
|
|
1737
1742
|
let be = !0;
|
|
1738
|
-
const
|
|
1739
|
-
function
|
|
1740
|
-
|
|
1743
|
+
const Ae = [], ue = "pinia:mutations", U = "pinia", { assign: f2 } = Object, je = (e) => "🍍 " + e;
|
|
1744
|
+
function p2(e, o) {
|
|
1745
|
+
Qt({
|
|
1741
1746
|
id: "dev.esm.pinia",
|
|
1742
1747
|
label: "Pinia 🍍",
|
|
1743
1748
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
1744
1749
|
packageName: "pinia",
|
|
1745
1750
|
homepage: "https://pinia.vuejs.org",
|
|
1746
|
-
componentStateTypes:
|
|
1751
|
+
componentStateTypes: Ae,
|
|
1747
1752
|
app: e
|
|
1748
1753
|
}, (t) => {
|
|
1749
1754
|
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({
|
|
@@ -1759,28 +1764,28 @@ function d2(e, o) {
|
|
|
1759
1764
|
{
|
|
1760
1765
|
icon: "content_copy",
|
|
1761
1766
|
action: () => {
|
|
1762
|
-
|
|
1767
|
+
o2(o);
|
|
1763
1768
|
},
|
|
1764
1769
|
tooltip: "Serialize and copy the state"
|
|
1765
1770
|
},
|
|
1766
1771
|
{
|
|
1767
1772
|
icon: "content_paste",
|
|
1768
1773
|
action: async () => {
|
|
1769
|
-
await
|
|
1774
|
+
await l2(o), t.sendInspectorTree(U), t.sendInspectorState(U);
|
|
1770
1775
|
},
|
|
1771
1776
|
tooltip: "Replace the state with the content of your clipboard"
|
|
1772
1777
|
},
|
|
1773
1778
|
{
|
|
1774
1779
|
icon: "save",
|
|
1775
1780
|
action: () => {
|
|
1776
|
-
|
|
1781
|
+
s2(o);
|
|
1777
1782
|
},
|
|
1778
1783
|
tooltip: "Save the state as a JSON file"
|
|
1779
1784
|
},
|
|
1780
1785
|
{
|
|
1781
1786
|
icon: "folder_open",
|
|
1782
1787
|
action: async () => {
|
|
1783
|
-
await
|
|
1788
|
+
await i2(o), t.sendInspectorTree(U), t.sendInspectorState(U);
|
|
1784
1789
|
},
|
|
1785
1790
|
tooltip: "Import the state from a JSON file"
|
|
1786
1791
|
}
|
|
@@ -1790,42 +1795,42 @@ function d2(e, o) {
|
|
|
1790
1795
|
icon: "restore",
|
|
1791
1796
|
tooltip: 'Reset the state (with "$reset")',
|
|
1792
1797
|
action: (n) => {
|
|
1793
|
-
const
|
|
1794
|
-
|
|
1798
|
+
const l = o._s.get(n);
|
|
1799
|
+
l ? typeof l.$reset != "function" ? B(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (l.$reset(), B(`Store "${n}" reset.`)) : B(`Cannot reset "${n}" store because it wasn't found.`, "warn");
|
|
1795
1800
|
}
|
|
1796
1801
|
}
|
|
1797
1802
|
]
|
|
1798
|
-
}), t.on.inspectComponent((n,
|
|
1803
|
+
}), t.on.inspectComponent((n, l) => {
|
|
1799
1804
|
const r = n.componentInstance && n.componentInstance.proxy;
|
|
1800
1805
|
if (r && r._pStores) {
|
|
1801
1806
|
const i = n.componentInstance.proxy._pStores;
|
|
1802
|
-
Object.values(i).forEach((
|
|
1807
|
+
Object.values(i).forEach((s) => {
|
|
1803
1808
|
n.instanceData.state.push({
|
|
1804
|
-
type:
|
|
1809
|
+
type: je(s.$id),
|
|
1805
1810
|
key: "state",
|
|
1806
1811
|
editable: !0,
|
|
1807
|
-
value:
|
|
1812
|
+
value: s._isOptionsAPI ? {
|
|
1808
1813
|
_custom: {
|
|
1809
|
-
value: K(
|
|
1814
|
+
value: K(s.$state),
|
|
1810
1815
|
actions: [
|
|
1811
1816
|
{
|
|
1812
1817
|
icon: "restore",
|
|
1813
1818
|
tooltip: "Reset the state of this store",
|
|
1814
|
-
action: () =>
|
|
1819
|
+
action: () => s.$reset()
|
|
1815
1820
|
}
|
|
1816
1821
|
]
|
|
1817
1822
|
}
|
|
1818
1823
|
} : (
|
|
1819
1824
|
// NOTE: workaround to unwrap transferred refs
|
|
1820
|
-
Object.keys(
|
|
1825
|
+
Object.keys(s.$state).reduce((a, u) => (a[u] = s.$state[u], a), {})
|
|
1821
1826
|
)
|
|
1822
|
-
}),
|
|
1823
|
-
type:
|
|
1827
|
+
}), s._getters && s._getters.length && n.instanceData.state.push({
|
|
1828
|
+
type: je(s.$id),
|
|
1824
1829
|
key: "getters",
|
|
1825
1830
|
editable: !1,
|
|
1826
|
-
value:
|
|
1831
|
+
value: s._getters.reduce((a, u) => {
|
|
1827
1832
|
try {
|
|
1828
|
-
a[u] =
|
|
1833
|
+
a[u] = s[u];
|
|
1829
1834
|
} catch (c) {
|
|
1830
1835
|
a[u] = c;
|
|
1831
1836
|
}
|
|
@@ -1836,32 +1841,32 @@ function d2(e, o) {
|
|
|
1836
1841
|
}
|
|
1837
1842
|
}), t.on.getInspectorTree((n) => {
|
|
1838
1843
|
if (n.app === e && n.inspectorId === U) {
|
|
1839
|
-
let
|
|
1840
|
-
|
|
1844
|
+
let l = [o];
|
|
1845
|
+
l = l.concat(Array.from(o._s.values())), n.rootNodes = (n.filter ? l.filter((r) => "$id" in r ? r.$id.toLowerCase().includes(n.filter.toLowerCase()) : rn.toLowerCase().includes(n.filter.toLowerCase())) : l).map(a2);
|
|
1841
1846
|
}
|
|
1842
1847
|
}), t.on.getInspectorState((n) => {
|
|
1843
1848
|
if (n.app === e && n.inspectorId === U) {
|
|
1844
|
-
const
|
|
1845
|
-
if (!
|
|
1849
|
+
const l = n.nodeId === Xe ? o : o._s.get(n.nodeId);
|
|
1850
|
+
if (!l)
|
|
1846
1851
|
return;
|
|
1847
|
-
|
|
1852
|
+
l && (n.state = u2(l));
|
|
1848
1853
|
}
|
|
1849
|
-
}), t.on.editInspectorState((n,
|
|
1854
|
+
}), t.on.editInspectorState((n, l) => {
|
|
1850
1855
|
if (n.app === e && n.inspectorId === U) {
|
|
1851
|
-
const r = n.nodeId ===
|
|
1856
|
+
const r = n.nodeId === Xe ? o : o._s.get(n.nodeId);
|
|
1852
1857
|
if (!r)
|
|
1853
1858
|
return B(`store "${n.nodeId}" not found`, "error");
|
|
1854
1859
|
const { path: i } = n;
|
|
1855
|
-
|
|
1860
|
+
ut(r) ? i.unshift("state") : (i.length !== 1 || !r._customProperties.has(i[0]) || i[0] in r.$state) && i.unshift("$state"), be = !1, n.set(r, i, n.state.value), be = !0;
|
|
1856
1861
|
}
|
|
1857
1862
|
}), t.on.editComponentState((n) => {
|
|
1858
1863
|
if (n.type.startsWith("🍍")) {
|
|
1859
|
-
const
|
|
1864
|
+
const l = n.type.replace(/^🍍\s*/, ""), r = o._s.get(l);
|
|
1860
1865
|
if (!r)
|
|
1861
|
-
return B(`store "${
|
|
1866
|
+
return B(`store "${l}" not found`, "error");
|
|
1862
1867
|
const { path: i } = n;
|
|
1863
1868
|
if (i[0] !== "state")
|
|
1864
|
-
return B(`Invalid path for store "${
|
|
1869
|
+
return B(`Invalid path for store "${l}":
|
|
1865
1870
|
${i}
|
|
1866
1871
|
Only state can be modified.`);
|
|
1867
1872
|
i[0] = "$state", be = !1, n.set(r, i, n.state.value), be = !0;
|
|
@@ -1869,14 +1874,14 @@ Only state can be modified.`);
|
|
|
1869
1874
|
});
|
|
1870
1875
|
});
|
|
1871
1876
|
}
|
|
1872
|
-
function
|
|
1873
|
-
|
|
1877
|
+
function v2(e, o) {
|
|
1878
|
+
Ae.includes(je(o.$id)) || Ae.push(je(o.$id)), Qt({
|
|
1874
1879
|
id: "dev.esm.pinia",
|
|
1875
1880
|
label: "Pinia 🍍",
|
|
1876
1881
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
1877
1882
|
packageName: "pinia",
|
|
1878
1883
|
homepage: "https://pinia.vuejs.org",
|
|
1879
|
-
componentStateTypes:
|
|
1884
|
+
componentStateTypes: Ae,
|
|
1880
1885
|
app: e,
|
|
1881
1886
|
settings: {
|
|
1882
1887
|
logStoreChanges: {
|
|
@@ -1892,8 +1897,8 @@ function f2(e, o) {
|
|
|
1892
1897
|
}
|
|
1893
1898
|
}, (t) => {
|
|
1894
1899
|
const n = typeof t.now == "function" ? t.now.bind(t) : Date.now;
|
|
1895
|
-
o.$onAction(({ after: i, onError:
|
|
1896
|
-
const c =
|
|
1900
|
+
o.$onAction(({ after: i, onError: s, name: a, args: u }) => {
|
|
1901
|
+
const c = an++;
|
|
1897
1902
|
t.addTimelineEvent({
|
|
1898
1903
|
layerId: ue,
|
|
1899
1904
|
event: {
|
|
@@ -1923,7 +1928,7 @@ function f2(e, o) {
|
|
|
1923
1928
|
groupId: c
|
|
1924
1929
|
}
|
|
1925
1930
|
});
|
|
1926
|
-
}),
|
|
1931
|
+
}), s((p) => {
|
|
1927
1932
|
re = void 0, t.addTimelineEvent({
|
|
1928
1933
|
layerId: ue,
|
|
1929
1934
|
event: {
|
|
@@ -1942,7 +1947,7 @@ function f2(e, o) {
|
|
|
1942
1947
|
});
|
|
1943
1948
|
});
|
|
1944
1949
|
}, !0), o._customProperties.forEach((i) => {
|
|
1945
|
-
F(() => V(o[i]), (
|
|
1950
|
+
F(() => V(o[i]), (s, a) => {
|
|
1946
1951
|
t.notifyComponentUpdate(), t.sendInspectorState(U), be && t.addTimelineEvent({
|
|
1947
1952
|
layerId: ue,
|
|
1948
1953
|
event: {
|
|
@@ -1950,23 +1955,23 @@ function f2(e, o) {
|
|
|
1950
1955
|
title: "Change",
|
|
1951
1956
|
subtitle: i,
|
|
1952
1957
|
data: {
|
|
1953
|
-
newValue:
|
|
1958
|
+
newValue: s,
|
|
1954
1959
|
oldValue: a
|
|
1955
1960
|
},
|
|
1956
1961
|
groupId: re
|
|
1957
1962
|
}
|
|
1958
1963
|
});
|
|
1959
1964
|
}, { deep: !0 });
|
|
1960
|
-
}), o.$subscribe(({ events: i, type:
|
|
1965
|
+
}), o.$subscribe(({ events: i, type: s }, a) => {
|
|
1961
1966
|
if (t.notifyComponentUpdate(), t.sendInspectorState(U), !be)
|
|
1962
1967
|
return;
|
|
1963
1968
|
const u = {
|
|
1964
1969
|
time: n(),
|
|
1965
|
-
title:
|
|
1966
|
-
data:
|
|
1970
|
+
title: d2(s),
|
|
1971
|
+
data: f2({ store: Y(o.$id) }, c2(i)),
|
|
1967
1972
|
groupId: re
|
|
1968
1973
|
};
|
|
1969
|
-
|
|
1974
|
+
s === ne.patchFunction ? u.subtitle = "⤵️" : s === ne.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
|
|
1970
1975
|
_custom: {
|
|
1971
1976
|
display: "DebuggerEvent",
|
|
1972
1977
|
type: "object",
|
|
@@ -1978,9 +1983,9 @@ function f2(e, o) {
|
|
|
1978
1983
|
event: u
|
|
1979
1984
|
});
|
|
1980
1985
|
}, { detached: !0, flush: "sync" });
|
|
1981
|
-
const
|
|
1986
|
+
const l = o._hotUpdate;
|
|
1982
1987
|
o._hotUpdate = de((i) => {
|
|
1983
|
-
|
|
1988
|
+
l(i), t.addTimelineEvent({
|
|
1984
1989
|
layerId: ue,
|
|
1985
1990
|
event: {
|
|
1986
1991
|
time: n(),
|
|
@@ -1999,12 +2004,12 @@ function f2(e, o) {
|
|
|
1999
2004
|
}, t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges && B(`"${o.$id}" store installed 🆕`);
|
|
2000
2005
|
});
|
|
2001
2006
|
}
|
|
2002
|
-
let
|
|
2003
|
-
function
|
|
2004
|
-
const n = o.reduce((
|
|
2005
|
-
for (const
|
|
2006
|
-
e[
|
|
2007
|
-
const r =
|
|
2007
|
+
let an = 0, re;
|
|
2008
|
+
function _t(e, o, t) {
|
|
2009
|
+
const n = o.reduce((l, r) => (l[r] = K(e)[r], l), {});
|
|
2010
|
+
for (const l in n)
|
|
2011
|
+
e[l] = function() {
|
|
2012
|
+
const r = an, i = t ? new Proxy(e, {
|
|
2008
2013
|
get(...a) {
|
|
2009
2014
|
return re = r, Reflect.get(...a);
|
|
2010
2015
|
},
|
|
@@ -2013,32 +2018,32 @@ function xt(e, o, t) {
|
|
|
2013
2018
|
}
|
|
2014
2019
|
}) : e;
|
|
2015
2020
|
re = r;
|
|
2016
|
-
const
|
|
2017
|
-
return re = void 0,
|
|
2021
|
+
const s = n[l].apply(i, arguments);
|
|
2022
|
+
return re = void 0, s;
|
|
2018
2023
|
};
|
|
2019
2024
|
}
|
|
2020
|
-
function
|
|
2025
|
+
function h2({ app: e, store: o, options: t }) {
|
|
2021
2026
|
if (o.$id.startsWith("__hot:"))
|
|
2022
2027
|
return;
|
|
2023
|
-
o._isOptionsAPI = !!t.state,
|
|
2028
|
+
o._isOptionsAPI = !!t.state, _t(o, Object.keys(t.actions), o._isOptionsAPI);
|
|
2024
2029
|
const n = o._hotUpdate;
|
|
2025
|
-
K(o)._hotUpdate = function(
|
|
2026
|
-
n.apply(this, arguments),
|
|
2027
|
-
},
|
|
2030
|
+
K(o)._hotUpdate = function(l) {
|
|
2031
|
+
n.apply(this, arguments), _t(o, Object.keys(l._hmrPayload.actions), !!o._isOptionsAPI);
|
|
2032
|
+
}, v2(
|
|
2028
2033
|
e,
|
|
2029
2034
|
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
2030
2035
|
o
|
|
2031
2036
|
);
|
|
2032
2037
|
}
|
|
2033
|
-
function
|
|
2034
|
-
const e =
|
|
2038
|
+
function m2() {
|
|
2039
|
+
const e = Pt(!0), o = e.run(() => E({}));
|
|
2035
2040
|
let t = [], n = [];
|
|
2036
|
-
const
|
|
2041
|
+
const l = de({
|
|
2037
2042
|
install(r) {
|
|
2038
|
-
Te(
|
|
2043
|
+
Te(l), l._a = r, r.provide(Xt, l), r.config.globalProperties.$pinia = l, Se && p2(r, l), n.forEach((i) => t.push(i)), n = [];
|
|
2039
2044
|
},
|
|
2040
2045
|
use(r) {
|
|
2041
|
-
return !this._a && !
|
|
2046
|
+
return !this._a && !Kt ? n.push(r) : t.push(r), this;
|
|
2042
2047
|
},
|
|
2043
2048
|
_p: t,
|
|
2044
2049
|
// it's actually undefined here
|
|
@@ -2048,87 +2053,87 @@ function v2() {
|
|
|
2048
2053
|
_s: /* @__PURE__ */ new Map(),
|
|
2049
2054
|
state: o
|
|
2050
2055
|
});
|
|
2051
|
-
return Se && typeof Proxy < "u" &&
|
|
2056
|
+
return Se && typeof Proxy < "u" && l.use(h2), l;
|
|
2052
2057
|
}
|
|
2053
|
-
function
|
|
2058
|
+
function un(e, o) {
|
|
2054
2059
|
for (const t in o) {
|
|
2055
2060
|
const n = o[t];
|
|
2056
2061
|
if (!(t in e))
|
|
2057
2062
|
continue;
|
|
2058
|
-
const
|
|
2059
|
-
fe(
|
|
2063
|
+
const l = e[t];
|
|
2064
|
+
fe(l) && fe(n) && !xe(n) && !st(n) ? e[t] = un(l, n) : e[t] = n;
|
|
2060
2065
|
}
|
|
2061
2066
|
return e;
|
|
2062
2067
|
}
|
|
2063
|
-
const
|
|
2068
|
+
const cn = () => {
|
|
2064
2069
|
};
|
|
2065
|
-
function
|
|
2070
|
+
function Ct(e, o, t, n = cn) {
|
|
2066
2071
|
e.push(o);
|
|
2067
|
-
const
|
|
2072
|
+
const l = () => {
|
|
2068
2073
|
const r = e.indexOf(o);
|
|
2069
2074
|
r > -1 && (e.splice(r, 1), n());
|
|
2070
2075
|
};
|
|
2071
|
-
return !t &&
|
|
2076
|
+
return !t && kt() && nt(l), l;
|
|
2072
2077
|
}
|
|
2073
2078
|
function ge(e, ...o) {
|
|
2074
2079
|
e.slice().forEach((t) => {
|
|
2075
2080
|
t(...o);
|
|
2076
2081
|
});
|
|
2077
2082
|
}
|
|
2078
|
-
const
|
|
2079
|
-
function
|
|
2083
|
+
const g2 = (e) => e();
|
|
2084
|
+
function et(e, o) {
|
|
2080
2085
|
e instanceof Map && o instanceof Map && o.forEach((t, n) => e.set(n, t)), e instanceof Set && o instanceof Set && o.forEach(e.add, e);
|
|
2081
2086
|
for (const t in o) {
|
|
2082
2087
|
if (!o.hasOwnProperty(t))
|
|
2083
2088
|
continue;
|
|
2084
|
-
const n = o[t],
|
|
2085
|
-
fe(
|
|
2089
|
+
const n = o[t], l = e[t];
|
|
2090
|
+
fe(l) && fe(n) && e.hasOwnProperty(t) && !xe(n) && !st(n) ? e[t] = et(l, n) : e[t] = n;
|
|
2086
2091
|
}
|
|
2087
2092
|
return e;
|
|
2088
2093
|
}
|
|
2089
|
-
const
|
|
2094
|
+
const b2 = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
2090
2095
|
/* istanbul ignore next */
|
|
2091
2096
|
Symbol()
|
|
2092
2097
|
);
|
|
2093
|
-
function
|
|
2094
|
-
return !fe(e) || !e.hasOwnProperty(
|
|
2098
|
+
function x2(e) {
|
|
2099
|
+
return !fe(e) || !e.hasOwnProperty(b2);
|
|
2095
2100
|
}
|
|
2096
2101
|
const { assign: J } = Object;
|
|
2097
|
-
function
|
|
2102
|
+
function yt(e) {
|
|
2098
2103
|
return !!(xe(e) && e.effect);
|
|
2099
2104
|
}
|
|
2100
|
-
function
|
|
2101
|
-
const { state:
|
|
2105
|
+
function wt(e, o, t, n) {
|
|
2106
|
+
const { state: l, actions: r, getters: i } = o, s = t.state.value[e];
|
|
2102
2107
|
let a;
|
|
2103
2108
|
function u() {
|
|
2104
|
-
!
|
|
2109
|
+
!s && (process.env.NODE_ENV === "production" || !n) && (t.state.value[e] = l ? l() : {});
|
|
2105
2110
|
const c = process.env.NODE_ENV !== "production" && n ? (
|
|
2106
2111
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
2107
|
-
|
|
2108
|
-
) :
|
|
2112
|
+
dt(E(l ? l() : {}).value)
|
|
2113
|
+
) : dt(t.state.value[e]);
|
|
2109
2114
|
return J(c, r, Object.keys(i || {}).reduce((p, g) => (process.env.NODE_ENV !== "production" && g in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${g}" in store "${e}".`), p[g] = de(S(() => {
|
|
2110
2115
|
Te(t);
|
|
2111
2116
|
const x = t._s.get(e);
|
|
2112
2117
|
return i[g].call(x, x);
|
|
2113
2118
|
})), p), {}));
|
|
2114
2119
|
}
|
|
2115
|
-
return a =
|
|
2120
|
+
return a = tt(e, u, o, t, n, !0), a;
|
|
2116
2121
|
}
|
|
2117
|
-
function
|
|
2122
|
+
function tt(e, o, t = {}, n, l, r) {
|
|
2118
2123
|
let i;
|
|
2119
|
-
const
|
|
2124
|
+
const s = J({ actions: {} }, t);
|
|
2120
2125
|
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
2121
2126
|
throw new Error("Pinia destroyed");
|
|
2122
2127
|
const a = {
|
|
2123
2128
|
deep: !0
|
|
2124
2129
|
// flush: 'post',
|
|
2125
2130
|
};
|
|
2126
|
-
process.env.NODE_ENV !== "production" && !
|
|
2131
|
+
process.env.NODE_ENV !== "production" && !Kt && (a.onTrigger = (d) => {
|
|
2127
2132
|
u ? x = d : u == !1 && !C._hotUpdating && (Array.isArray(x) ? x.push(d) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
2128
2133
|
});
|
|
2129
2134
|
let u, c, p = [], g = [], x;
|
|
2130
2135
|
const _ = n.state.value[e];
|
|
2131
|
-
!r && !_ && (process.env.NODE_ENV === "production" || !
|
|
2136
|
+
!r && !_ && (process.env.NODE_ENV === "production" || !l) && (n.state.value[e] = {});
|
|
2132
2137
|
const v = E({});
|
|
2133
2138
|
let $;
|
|
2134
2139
|
function N(d) {
|
|
@@ -2137,7 +2142,7 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2137
2142
|
type: ne.patchFunction,
|
|
2138
2143
|
storeId: e,
|
|
2139
2144
|
events: x
|
|
2140
|
-
}) : (
|
|
2145
|
+
}) : (et(n.state.value[e], d), f = {
|
|
2141
2146
|
type: ne.patchObject,
|
|
2142
2147
|
payload: d,
|
|
2143
2148
|
storeId: e,
|
|
@@ -2157,7 +2162,7 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2157
2162
|
/* istanbul ignore next */
|
|
2158
2163
|
process.env.NODE_ENV !== "production" ? () => {
|
|
2159
2164
|
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
2160
|
-
} :
|
|
2165
|
+
} : cn
|
|
2161
2166
|
);
|
|
2162
2167
|
function k() {
|
|
2163
2168
|
i.stop(), p = [], g = [], n._s.delete(e);
|
|
@@ -2197,11 +2202,11 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2197
2202
|
_p: n,
|
|
2198
2203
|
// _s: scope,
|
|
2199
2204
|
$id: e,
|
|
2200
|
-
$onAction:
|
|
2205
|
+
$onAction: Ct.bind(null, g),
|
|
2201
2206
|
$patch: N,
|
|
2202
2207
|
$reset: I,
|
|
2203
2208
|
$subscribe(d, f = {}) {
|
|
2204
|
-
const y =
|
|
2209
|
+
const y = Ct(p, d, f.detached, () => O()), O = i.run(() => F(() => n.state.value[e], (M) => {
|
|
2205
2210
|
(f.flush === "sync" ? c : u) && d({
|
|
2206
2211
|
storeId: e,
|
|
2207
2212
|
type: ne.direct,
|
|
@@ -2211,7 +2216,7 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2211
2216
|
return y;
|
|
2212
2217
|
},
|
|
2213
2218
|
$dispose: k
|
|
2214
|
-
}, C =
|
|
2219
|
+
}, C = Rt(process.env.NODE_ENV !== "production" || Se ? J(
|
|
2215
2220
|
{
|
|
2216
2221
|
_hmrPayload: m,
|
|
2217
2222
|
_customProperties: de(/* @__PURE__ */ new Set())
|
|
@@ -2222,24 +2227,24 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2222
2227
|
// setupStore
|
|
2223
2228
|
) : R);
|
|
2224
2229
|
n._s.set(e, C);
|
|
2225
|
-
const L = (n._a && n._a.runWithContext ||
|
|
2230
|
+
const L = (n._a && n._a.runWithContext || g2)(() => n._e.run(() => (i = Pt()).run(o)));
|
|
2226
2231
|
for (const d in L) {
|
|
2227
2232
|
const f = L[d];
|
|
2228
|
-
if (xe(f) && !
|
|
2229
|
-
process.env.NODE_ENV !== "production" &&
|
|
2233
|
+
if (xe(f) && !yt(f) || st(f))
|
|
2234
|
+
process.env.NODE_ENV !== "production" && l ? Me(v.value, d, qe(L, d)) : r || (_ && x2(f) && (xe(f) ? f.value = _[d] : et(f, _[d])), n.state.value[e][d] = f), process.env.NODE_ENV !== "production" && m.state.push(d);
|
|
2230
2235
|
else if (typeof f == "function") {
|
|
2231
|
-
const y = process.env.NODE_ENV !== "production" &&
|
|
2232
|
-
L[d] = y, process.env.NODE_ENV !== "production" && (m.actions[d] = f),
|
|
2233
|
-
} else process.env.NODE_ENV !== "production" &&
|
|
2236
|
+
const y = process.env.NODE_ENV !== "production" && l ? f : D(d, f);
|
|
2237
|
+
L[d] = y, process.env.NODE_ENV !== "production" && (m.actions[d] = f), s.actions[d] = f;
|
|
2238
|
+
} else process.env.NODE_ENV !== "production" && yt(f) && (m.getters[d] = r ? (
|
|
2234
2239
|
// @ts-expect-error
|
|
2235
2240
|
t.getters[d]
|
|
2236
|
-
) : f,
|
|
2241
|
+
) : f, ze && (L._getters || // @ts-expect-error: same
|
|
2237
2242
|
(L._getters = de([]))).push(d));
|
|
2238
2243
|
}
|
|
2239
2244
|
if (J(C, L), J(K(C), L), Object.defineProperty(C, "$state", {
|
|
2240
|
-
get: () => process.env.NODE_ENV !== "production" &&
|
|
2245
|
+
get: () => process.env.NODE_ENV !== "production" && l ? v.value : n.state.value[e],
|
|
2241
2246
|
set: (d) => {
|
|
2242
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2247
|
+
if (process.env.NODE_ENV !== "production" && l)
|
|
2243
2248
|
throw new Error("cannot set hotState");
|
|
2244
2249
|
N((f) => {
|
|
2245
2250
|
J(f, d);
|
|
@@ -2249,29 +2254,29 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2249
2254
|
C._hotUpdating = !0, d._hmrPayload.state.forEach((f) => {
|
|
2250
2255
|
if (f in C.$state) {
|
|
2251
2256
|
const y = d.$state[f], O = C.$state[f];
|
|
2252
|
-
typeof y == "object" && fe(y) && fe(O) ?
|
|
2257
|
+
typeof y == "object" && fe(y) && fe(O) ? un(y, O) : d.$state[f] = O;
|
|
2253
2258
|
}
|
|
2254
|
-
|
|
2259
|
+
Me(C, f, qe(d.$state, f));
|
|
2255
2260
|
}), Object.keys(C.$state).forEach((f) => {
|
|
2256
|
-
f in d.$state ||
|
|
2257
|
-
}), u = !1, c = !1, n.state.value[e] =
|
|
2261
|
+
f in d.$state || Ye(C, f);
|
|
2262
|
+
}), u = !1, c = !1, n.state.value[e] = qe(d._hmrPayload, "hotState"), c = !0, Q().then(() => {
|
|
2258
2263
|
u = !0;
|
|
2259
2264
|
});
|
|
2260
2265
|
for (const f in d._hmrPayload.actions) {
|
|
2261
2266
|
const y = d[f];
|
|
2262
|
-
|
|
2267
|
+
Me(C, f, D(f, y));
|
|
2263
2268
|
}
|
|
2264
2269
|
for (const f in d._hmrPayload.getters) {
|
|
2265
2270
|
const y = d._hmrPayload.getters[f], O = r ? (
|
|
2266
2271
|
// special handling of options api
|
|
2267
2272
|
S(() => (Te(n), y.call(C, C)))
|
|
2268
2273
|
) : y;
|
|
2269
|
-
|
|
2274
|
+
Me(C, f, O);
|
|
2270
2275
|
}
|
|
2271
2276
|
Object.keys(C._hmrPayload.getters).forEach((f) => {
|
|
2272
|
-
f in d._hmrPayload.getters ||
|
|
2277
|
+
f in d._hmrPayload.getters || Ye(C, f);
|
|
2273
2278
|
}), Object.keys(C._hmrPayload.actions).forEach((f) => {
|
|
2274
|
-
f in d._hmrPayload.actions ||
|
|
2279
|
+
f in d._hmrPayload.actions || Ye(C, f);
|
|
2275
2280
|
}), C._hmrPayload = d._hmrPayload, C._getters = d._getters, C._hotUpdating = !1;
|
|
2276
2281
|
})), Se) {
|
|
2277
2282
|
const d = {
|
|
@@ -2290,7 +2295,7 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2290
2295
|
store: C,
|
|
2291
2296
|
app: n._a,
|
|
2292
2297
|
pinia: n,
|
|
2293
|
-
options:
|
|
2298
|
+
options: s
|
|
2294
2299
|
}));
|
|
2295
2300
|
Object.keys(f || {}).forEach((y) => C._customProperties.add(y)), J(C, f);
|
|
2296
2301
|
} else
|
|
@@ -2298,35 +2303,35 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2298
2303
|
store: C,
|
|
2299
2304
|
app: n._a,
|
|
2300
2305
|
pinia: n,
|
|
2301
|
-
options:
|
|
2306
|
+
options: s
|
|
2302
2307
|
})));
|
|
2303
2308
|
}), 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
|
|
2304
2309
|
state: () => new MyClass()
|
|
2305
2310
|
Found in store "${C.$id}".`), _ && r && t.hydrate && t.hydrate(C.$state, _), u = !0, c = !0, C;
|
|
2306
2311
|
}
|
|
2307
|
-
function
|
|
2308
|
-
let n,
|
|
2312
|
+
function Ue(e, o, t) {
|
|
2313
|
+
let n, l;
|
|
2309
2314
|
const r = typeof o == "function";
|
|
2310
2315
|
if (typeof e == "string")
|
|
2311
|
-
n = e,
|
|
2312
|
-
else if (
|
|
2316
|
+
n = e, l = r ? t : o;
|
|
2317
|
+
else if (l = e, n = e.id, process.env.NODE_ENV !== "production" && typeof n != "string")
|
|
2313
2318
|
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
2314
|
-
function i(
|
|
2315
|
-
const u =
|
|
2316
|
-
if (
|
|
2319
|
+
function i(s, a) {
|
|
2320
|
+
const u = gn();
|
|
2321
|
+
if (s = // in test mode, ignore the argument provided as we can always retrieve a
|
|
2317
2322
|
// pinia instance with getActivePinia()
|
|
2318
|
-
(process.env.NODE_ENV === "test" && we && we._testing ? null :
|
|
2323
|
+
(process.env.NODE_ENV === "test" && we && we._testing ? null : s) || (u ? Ie(Xt, null) : null), s && Te(s), process.env.NODE_ENV !== "production" && !we)
|
|
2319
2324
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
2320
2325
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
2321
2326
|
This will fail in production.`);
|
|
2322
|
-
|
|
2323
|
-
const c =
|
|
2327
|
+
s = we, s._s.has(n) || (r ? tt(n, o, l, s) : wt(n, l, s), process.env.NODE_ENV !== "production" && (i._pinia = s));
|
|
2328
|
+
const c = s._s.get(n);
|
|
2324
2329
|
if (process.env.NODE_ENV !== "production" && a) {
|
|
2325
|
-
const p = "__hot:" + n, g = r ?
|
|
2326
|
-
a._hotUpdate(g), delete
|
|
2330
|
+
const p = "__hot:" + n, g = r ? tt(p, o, l, s, !0) : wt(p, J({}, l), s, !0);
|
|
2331
|
+
a._hotUpdate(g), delete s.state.value[p], s._s.delete(p);
|
|
2327
2332
|
}
|
|
2328
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2329
|
-
const p =
|
|
2333
|
+
if (process.env.NODE_ENV !== "production" && ze) {
|
|
2334
|
+
const p = Vt();
|
|
2330
2335
|
if (p && p.proxy && // avoid adding stores that are just built for hot module replacement
|
|
2331
2336
|
!a) {
|
|
2332
2337
|
const g = p.proxy, x = "_pStores" in g ? g._pStores : g._pStores = {};
|
|
@@ -2337,9 +2342,9 @@ This will fail in production.`);
|
|
|
2337
2342
|
}
|
|
2338
2343
|
return i.$id = n, i;
|
|
2339
2344
|
}
|
|
2340
|
-
const
|
|
2345
|
+
const Ze = Ue("loader", () => ({ loading: E(!1) })), St = {
|
|
2341
2346
|
__name: "Select",
|
|
2342
|
-
props: /* @__PURE__ */
|
|
2347
|
+
props: /* @__PURE__ */ bn({
|
|
2343
2348
|
languages: {
|
|
2344
2349
|
type: Object,
|
|
2345
2350
|
required: !0
|
|
@@ -2350,46 +2355,46 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2350
2355
|
}),
|
|
2351
2356
|
emits: ["update:modelValue"],
|
|
2352
2357
|
setup(e) {
|
|
2353
|
-
const o =
|
|
2354
|
-
([, a]) => a.toLowerCase().includes(
|
|
2355
|
-
)),
|
|
2356
|
-
a.target.value = "",
|
|
2358
|
+
const o = Ze(), t = e, n = xn(e, "modelValue"), l = E(""), r = E(null), i = S(() => Object.entries(t.languages).filter(
|
|
2359
|
+
([, a]) => a.toLowerCase().includes(l.value.toLowerCase())
|
|
2360
|
+
)), s = (a) => {
|
|
2361
|
+
a.target.value = "", l.value = "", r.value && r.value.$el.click();
|
|
2357
2362
|
};
|
|
2358
|
-
return (a, u) => (w(), ee(V(
|
|
2363
|
+
return (a, u) => (w(), ee(V(Ao), {
|
|
2359
2364
|
modelValue: n.value,
|
|
2360
2365
|
"onUpdate:modelValue": u[3] || (u[3] = (c) => n.value = c),
|
|
2361
2366
|
disabled: V(o).loading,
|
|
2362
2367
|
as: "div",
|
|
2363
2368
|
class: "relative mt-1"
|
|
2364
2369
|
}, {
|
|
2365
|
-
default:
|
|
2366
|
-
H(V(
|
|
2370
|
+
default: Ve(() => [
|
|
2371
|
+
H(V(jo), {
|
|
2367
2372
|
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",
|
|
2368
|
-
onChange: u[0] || (u[0] = (c) =>
|
|
2373
|
+
onChange: u[0] || (u[0] = (c) => l.value = c.target.value),
|
|
2369
2374
|
displayValue: (c) => e.languages[c],
|
|
2370
|
-
onFocus: u[1] || (u[1] = (c) =>
|
|
2375
|
+
onFocus: u[1] || (u[1] = (c) => s(c))
|
|
2371
2376
|
}, null, 8, ["displayValue"]),
|
|
2372
|
-
H(V(
|
|
2377
|
+
H(V(Fo), {
|
|
2373
2378
|
ref_key: "btnSelect",
|
|
2374
2379
|
ref: r,
|
|
2375
2380
|
class: "absolute inset-y-0 right-0 flex items-center pr-2"
|
|
2376
2381
|
}, {
|
|
2377
|
-
default:
|
|
2378
|
-
H(V(
|
|
2382
|
+
default: Ve(() => [
|
|
2383
|
+
H(V(Uo), {
|
|
2379
2384
|
class: "h-5 w-5 text-gray-400",
|
|
2380
2385
|
"aria-hidden": "true",
|
|
2381
|
-
onClick: u[2] || (u[2] = (c) =>
|
|
2386
|
+
onClick: u[2] || (u[2] = (c) => s(c))
|
|
2382
2387
|
})
|
|
2383
2388
|
]),
|
|
2384
2389
|
_: 1
|
|
2385
2390
|
}, 512),
|
|
2386
|
-
H(V(
|
|
2387
|
-
default:
|
|
2388
|
-
(w(!0), T(Z, null,
|
|
2391
|
+
H(V(Bo), { 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" }, {
|
|
2392
|
+
default: Ve(() => [
|
|
2393
|
+
(w(!0), T(Z, null, se(i.value, ([c, p]) => (w(), ee(V(Ho), {
|
|
2389
2394
|
key: c,
|
|
2390
2395
|
value: c
|
|
2391
2396
|
}, {
|
|
2392
|
-
default:
|
|
2397
|
+
default: Ve(({ active: g, selected: x }) => [
|
|
2393
2398
|
h("li", {
|
|
2394
2399
|
class: _e([
|
|
2395
2400
|
"relative cursor-default select-none py-2 pl-3 pr-9",
|
|
@@ -2410,19 +2415,19 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2410
2415
|
_: 1
|
|
2411
2416
|
}, 8, ["modelValue", "disabled"]));
|
|
2412
2417
|
}
|
|
2413
|
-
},
|
|
2414
|
-
src:
|
|
2418
|
+
}, dn = "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", _2 = ["disabled"], C2 = /* @__PURE__ */ h("img", {
|
|
2419
|
+
src: dn,
|
|
2415
2420
|
alt: "swap",
|
|
2416
2421
|
class: "w-4"
|
|
2417
|
-
}, null, -1),
|
|
2418
|
-
|
|
2419
|
-
],
|
|
2420
|
-
src:
|
|
2422
|
+
}, null, -1), y2 = [
|
|
2423
|
+
C2
|
|
2424
|
+
], w2 = ["disabled"], S2 = /* @__PURE__ */ h("img", {
|
|
2425
|
+
src: dn,
|
|
2421
2426
|
alt: "swap",
|
|
2422
2427
|
class: "w-4"
|
|
2423
|
-
}, null, -1),
|
|
2424
|
-
|
|
2425
|
-
],
|
|
2428
|
+
}, null, -1), E2 = [
|
|
2429
|
+
S2
|
|
2430
|
+
], O2 = {
|
|
2426
2431
|
__name: "SwapBtn",
|
|
2427
2432
|
props: {
|
|
2428
2433
|
isBidirect: {
|
|
@@ -2432,21 +2437,21 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2432
2437
|
},
|
|
2433
2438
|
emits: ["swap"],
|
|
2434
2439
|
setup(e, { emit: o }) {
|
|
2435
|
-
const t =
|
|
2436
|
-
return (
|
|
2440
|
+
const t = Ze(), n = o;
|
|
2441
|
+
return (l, r) => e.isBidirect ? (w(), T("button", {
|
|
2437
2442
|
key: 1,
|
|
2438
2443
|
onClick: r[0] || (r[0] = (i) => n("swap")),
|
|
2439
2444
|
disabled: V(t).loading
|
|
2440
|
-
},
|
|
2445
|
+
}, E2, 8, w2)) : (w(), T("button", {
|
|
2441
2446
|
key: 0,
|
|
2442
2447
|
disabled: V(t).loading
|
|
2443
|
-
},
|
|
2448
|
+
}, y2, 8, _2));
|
|
2444
2449
|
}
|
|
2445
|
-
},
|
|
2450
|
+
}, We = Ue("language", () => {
|
|
2446
2451
|
const e = E("auto"), o = E("en"), t = E({
|
|
2447
2452
|
src: [],
|
|
2448
2453
|
target: []
|
|
2449
|
-
}), n = S(() => t.value.src[e.value]),
|
|
2454
|
+
}), n = S(() => t.value.src[e.value]), l = S(() => t.value.target[o.value]);
|
|
2450
2455
|
function r(a, u) {
|
|
2451
2456
|
e.value = a == null ? void 0 : a.src, o.value = a == null ? void 0 : a.target, t.value = u;
|
|
2452
2457
|
}
|
|
@@ -2455,63 +2460,58 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2455
2460
|
const a = e.value;
|
|
2456
2461
|
e.value = o.value, o.value = a;
|
|
2457
2462
|
}
|
|
2458
|
-
function
|
|
2463
|
+
function s(a) {
|
|
2459
2464
|
return t.value.src[a] || t.value.target[a];
|
|
2460
2465
|
}
|
|
2461
|
-
return { languages: t, src: e, target: o, srcLabel: n, targetLabel:
|
|
2462
|
-
}),
|
|
2466
|
+
return { languages: t, src: e, target: o, srcLabel: n, targetLabel: l, init: r, swap: i, getLabel: s };
|
|
2467
|
+
}), $2 = {
|
|
2463
2468
|
key: 0,
|
|
2464
2469
|
class: "flex"
|
|
2465
|
-
},
|
|
2470
|
+
}, T2 = {
|
|
2466
2471
|
__name: "Selects",
|
|
2467
2472
|
setup(e) {
|
|
2468
|
-
const o =
|
|
2473
|
+
const o = We();
|
|
2469
2474
|
function t() {
|
|
2470
2475
|
o.swap();
|
|
2471
2476
|
}
|
|
2472
|
-
return (n,
|
|
2473
|
-
H(
|
|
2477
|
+
return (n, l) => V(o).languages ? (w(), T("div", $2, [
|
|
2478
|
+
H(St, {
|
|
2474
2479
|
modelValue: V(o).src,
|
|
2475
|
-
"onUpdate:modelValue":
|
|
2480
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => V(o).src = r),
|
|
2476
2481
|
languages: V(o).languages.src,
|
|
2477
2482
|
class: "grow"
|
|
2478
2483
|
}, null, 8, ["modelValue", "languages"]),
|
|
2479
|
-
H(
|
|
2484
|
+
H(O2, {
|
|
2480
2485
|
isBidirect: V(o).src !== "auto",
|
|
2481
2486
|
class: "grow-0 mx-3",
|
|
2482
2487
|
onSwap: t
|
|
2483
2488
|
}, null, 8, ["isBidirect"]),
|
|
2484
|
-
H(
|
|
2489
|
+
H(St, {
|
|
2485
2490
|
modelValue: V(o).target,
|
|
2486
|
-
"onUpdate:modelValue":
|
|
2491
|
+
"onUpdate:modelValue": l[1] || (l[1] = (r) => V(o).target = r),
|
|
2487
2492
|
languages: V(o).languages.target,
|
|
2488
2493
|
class: "grow"
|
|
2489
2494
|
}, null, 8, ["modelValue", "languages"])
|
|
2490
2495
|
])) : X("", !0);
|
|
2491
2496
|
}
|
|
2492
|
-
},
|
|
2497
|
+
}, I2 = {
|
|
2493
2498
|
INPUT_MAX_LENGTH: 5e3,
|
|
2494
2499
|
INPUT_DEBOUNCE: 500
|
|
2495
|
-
},
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
t[n] = s;
|
|
2499
|
-
return t;
|
|
2500
|
-
}, T2 = {}, I2 = { class: "mr-2 loading loading-dots loading-xs" };
|
|
2501
|
-
function L2(e, o) {
|
|
2502
|
-
return w(), T("span", I2);
|
|
2500
|
+
}, L2 = {}, R2 = { class: "mr-2 loading loading-dots loading-xs" };
|
|
2501
|
+
function P2(e, o) {
|
|
2502
|
+
return w(), T("span", R2);
|
|
2503
2503
|
}
|
|
2504
|
-
const
|
|
2504
|
+
const V2 = /* @__PURE__ */ Le(L2, [["render", P2]]), k2 = "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", M2 = "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", fn = Ue("tts", () => {
|
|
2505
2505
|
const e = E({
|
|
2506
2506
|
src: null,
|
|
2507
2507
|
target: null
|
|
2508
2508
|
});
|
|
2509
|
-
function o(
|
|
2510
|
-
|
|
2509
|
+
function o(l) {
|
|
2510
|
+
l.src && (e.value.src = l.src), l.target && (e.value.target = l.target);
|
|
2511
2511
|
}
|
|
2512
|
-
function t(
|
|
2513
|
-
if (
|
|
2514
|
-
if (
|
|
2512
|
+
function t(l) {
|
|
2513
|
+
if (l === "src") return e.value.src;
|
|
2514
|
+
if (l === "target") return e.value.target;
|
|
2515
2515
|
}
|
|
2516
2516
|
function n() {
|
|
2517
2517
|
e.value = {
|
|
@@ -2525,17 +2525,17 @@ const R2 = /* @__PURE__ */ Ze(T2, [["render", L2]]), P2 = "data:image/svg+xml,%3
|
|
|
2525
2525
|
get: t,
|
|
2526
2526
|
reset: n
|
|
2527
2527
|
};
|
|
2528
|
-
}),
|
|
2529
|
-
src:
|
|
2528
|
+
}), N2 = /* @__PURE__ */ h("img", {
|
|
2529
|
+
src: k2,
|
|
2530
2530
|
alt: "Play"
|
|
2531
|
-
}, null, -1), M2 = [
|
|
2532
|
-
k2
|
|
2533
|
-
], N2 = /* @__PURE__ */ h("img", {
|
|
2534
|
-
src: V2,
|
|
2535
|
-
alt: "Stop"
|
|
2536
2531
|
}, null, -1), D2 = [
|
|
2537
2532
|
N2
|
|
2538
|
-
], A2 = {
|
|
2533
|
+
], A2 = /* @__PURE__ */ h("img", {
|
|
2534
|
+
src: M2,
|
|
2535
|
+
alt: "Stop"
|
|
2536
|
+
}, null, -1), F2 = [
|
|
2537
|
+
A2
|
|
2538
|
+
], j2 = {
|
|
2539
2539
|
__name: "SpeakBtn",
|
|
2540
2540
|
props: {
|
|
2541
2541
|
type: {
|
|
@@ -2545,7 +2545,7 @@ const R2 = /* @__PURE__ */ Ze(T2, [["render", L2]]), P2 = "data:image/svg+xml,%3
|
|
|
2545
2545
|
},
|
|
2546
2546
|
emits: ["loadTTS"],
|
|
2547
2547
|
setup(e, { emit: o }) {
|
|
2548
|
-
const t =
|
|
2548
|
+
const t = fn(), n = e, l = o, r = S(() => t.tts[n.type]), i = E(!1), s = new Audio();
|
|
2549
2549
|
F(
|
|
2550
2550
|
r,
|
|
2551
2551
|
() => {
|
|
@@ -2556,71 +2556,71 @@ const R2 = /* @__PURE__ */ Ze(T2, [["render", L2]]), P2 = "data:image/svg+xml,%3
|
|
|
2556
2556
|
u();
|
|
2557
2557
|
},
|
|
2558
2558
|
{ immediate: !0 }
|
|
2559
|
-
),
|
|
2560
|
-
c(),
|
|
2559
|
+
), ot(() => {
|
|
2560
|
+
c(), s.src = "";
|
|
2561
2561
|
});
|
|
2562
2562
|
function a() {
|
|
2563
2563
|
if (r.value) {
|
|
2564
2564
|
u();
|
|
2565
2565
|
return;
|
|
2566
2566
|
}
|
|
2567
|
-
i.value = !0,
|
|
2567
|
+
i.value = !0, l("loadTTS");
|
|
2568
2568
|
}
|
|
2569
2569
|
function u() {
|
|
2570
|
-
r.value && (
|
|
2570
|
+
r.value && (s.src = r.value, i.value = !0, s.play().catch(() => {
|
|
2571
2571
|
i.value = !1;
|
|
2572
2572
|
}));
|
|
2573
2573
|
}
|
|
2574
2574
|
function c() {
|
|
2575
|
-
|
|
2575
|
+
s.pause(), s.currentTime = 0, i.value = !1;
|
|
2576
2576
|
}
|
|
2577
|
-
return
|
|
2577
|
+
return s.onended = () => {
|
|
2578
2578
|
i.value = !1;
|
|
2579
2579
|
}, (p, g) => i.value ? (w(), T("button", {
|
|
2580
2580
|
key: 1,
|
|
2581
2581
|
class: "btn btn-xs btn-ghost btn-circle",
|
|
2582
|
-
onClick:
|
|
2583
|
-
},
|
|
2582
|
+
onClick: ft(c, ["prevent"])
|
|
2583
|
+
}, F2)) : (w(), T("button", {
|
|
2584
2584
|
key: 0,
|
|
2585
2585
|
class: "btn btn-xs btn-ghost btn-circle",
|
|
2586
|
-
onClick:
|
|
2587
|
-
},
|
|
2586
|
+
onClick: ft(a, ["prevent"])
|
|
2587
|
+
}, D2));
|
|
2588
2588
|
}
|
|
2589
|
-
},
|
|
2590
|
-
src:
|
|
2589
|
+
}, B2 = "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", H2 = {}, z2 = { class: "btn btn-xs btn-circle btn-ghost" }, U2 = /* @__PURE__ */ h("img", {
|
|
2590
|
+
src: B2,
|
|
2591
2591
|
alt: "Clear",
|
|
2592
2592
|
class: "w-4"
|
|
2593
|
-
}, null, -1),
|
|
2594
|
-
|
|
2593
|
+
}, null, -1), Z2 = [
|
|
2594
|
+
U2
|
|
2595
2595
|
];
|
|
2596
|
-
function
|
|
2597
|
-
return w(), T("button",
|
|
2596
|
+
function W2(e, o) {
|
|
2597
|
+
return w(), T("button", z2, Z2);
|
|
2598
2598
|
}
|
|
2599
|
-
const
|
|
2599
|
+
const G2 = /* @__PURE__ */ Le(H2, [["render", W2]]), q2 = "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", J2 = "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='%23FFC857'/%3e%3c/svg%3e", K2 = { class: "btn btn-xs btn-circle btn-ghost" }, Y2 = {
|
|
2600
2600
|
key: 0,
|
|
2601
|
-
src:
|
|
2601
|
+
src: q2,
|
|
2602
2602
|
alt: "Clear",
|
|
2603
2603
|
class: "w-4"
|
|
2604
|
-
},
|
|
2604
|
+
}, Q2 = {
|
|
2605
2605
|
key: 1,
|
|
2606
|
-
src:
|
|
2606
|
+
src: J2,
|
|
2607
2607
|
alt: "Clear",
|
|
2608
2608
|
class: "w-4"
|
|
2609
|
-
},
|
|
2609
|
+
}, X2 = {
|
|
2610
2610
|
__name: "FavoriteBtn",
|
|
2611
2611
|
props: {
|
|
2612
2612
|
isFilled: Boolean
|
|
2613
2613
|
},
|
|
2614
2614
|
setup(e) {
|
|
2615
2615
|
const o = e;
|
|
2616
|
-
return (t, n) => (w(), T("button",
|
|
2617
|
-
o.isFilled ? (w(), T("img",
|
|
2616
|
+
return (t, n) => (w(), T("button", K2, [
|
|
2617
|
+
o.isFilled ? (w(), T("img", Y2)) : (w(), T("img", Q2))
|
|
2618
2618
|
]));
|
|
2619
2619
|
}
|
|
2620
|
-
},
|
|
2620
|
+
}, el = { class: "flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center" }, tl = { class: "text-sm text-gray-600" }, nl = {
|
|
2621
2621
|
key: 0,
|
|
2622
2622
|
class: "italic"
|
|
2623
|
-
},
|
|
2623
|
+
}, ol = /* @__PURE__ */ h("div", { class: "flex-grow" }, null, -1), pn = {
|
|
2624
2624
|
__name: "TranslationBtnGroup",
|
|
2625
2625
|
props: {
|
|
2626
2626
|
loading: {
|
|
@@ -2664,45 +2664,45 @@ const Z2 = /* @__PURE__ */ Ze(j2, [["render", U2]]), W2 = "data:image/svg+xml,%3
|
|
|
2664
2664
|
emits: ["clear", "favorite", "loadTTS"],
|
|
2665
2665
|
setup(e, { emit: o }) {
|
|
2666
2666
|
const t = e, n = o;
|
|
2667
|
-
return (
|
|
2668
|
-
t.src ? (w(), ee(
|
|
2667
|
+
return (l, r) => (w(), T("div", el, [
|
|
2668
|
+
t.src ? (w(), ee(j2, {
|
|
2669
2669
|
key: 0,
|
|
2670
2670
|
type: t.type,
|
|
2671
2671
|
onLoadTTS: r[0] || (r[0] = (i) => n("loadTTS"))
|
|
2672
2672
|
}, null, 8, ["type"])) : X("", !0),
|
|
2673
|
-
h("div",
|
|
2674
|
-
|
|
2675
|
-
e.phonetic ? (w(), T("span",
|
|
2673
|
+
h("div", tl, [
|
|
2674
|
+
_n(te(e.srcLabel) + " ", 1),
|
|
2675
|
+
e.phonetic ? (w(), T("span", nl, "- [" + te(t.phonetic) + "]", 1)) : X("", !0)
|
|
2676
2676
|
]),
|
|
2677
|
-
|
|
2678
|
-
t.loading ? (w(), ee(
|
|
2679
|
-
t.src && t.isClearBtn ? (w(), ee(
|
|
2677
|
+
ol,
|
|
2678
|
+
t.loading ? (w(), ee(V2, { key: 1 })) : X("", !0),
|
|
2679
|
+
t.src && t.isClearBtn ? (w(), ee(G2, {
|
|
2680
2680
|
key: 2,
|
|
2681
2681
|
onClick: r[1] || (r[1] = (i) => n("clear"))
|
|
2682
2682
|
})) : X("", !0),
|
|
2683
|
-
t.src && t.isFavoriteBtn ? (w(), ee(
|
|
2683
|
+
t.src && t.isFavoriteBtn ? (w(), ee(X2, {
|
|
2684
2684
|
key: 3,
|
|
2685
2685
|
isFilled: t.isFavorite,
|
|
2686
2686
|
onClick: r[2] || (r[2] = (i) => n("favorite"))
|
|
2687
2687
|
}, null, 8, ["isFilled"])) : X("", !0)
|
|
2688
2688
|
]));
|
|
2689
2689
|
}
|
|
2690
|
-
}, he =
|
|
2690
|
+
}, he = Ue("translation", () => {
|
|
2691
2691
|
const e = E(null), o = E(null), t = E(null), n = E({
|
|
2692
2692
|
src: null,
|
|
2693
2693
|
target: null
|
|
2694
|
-
}),
|
|
2694
|
+
}), l = E(null), r = E([]), i = E([]), s = E([]), a = E([]), u = E({
|
|
2695
2695
|
src: null,
|
|
2696
2696
|
target: null
|
|
2697
|
-
}), c =
|
|
2697
|
+
}), c = We(), p = S(() => c.getLabel(e.value)), g = S(() => c.getLabel(o.value));
|
|
2698
2698
|
function x(v) {
|
|
2699
|
-
e.value = v.src, o.value = v.target, t.value = v.text, n.value = v.phonetic,
|
|
2699
|
+
e.value = v.src, o.value = v.target, t.value = v.text, n.value = v.phonetic, l.value = v.result, r.value = v.dictionary, i.value = v.definitions, s.value = v.synonyms, a.value = v.examples, u.value = v.tts;
|
|
2700
2700
|
}
|
|
2701
2701
|
function _() {
|
|
2702
2702
|
e.value = null, o.value = null, t.value = null, n.value = {
|
|
2703
2703
|
src: null,
|
|
2704
2704
|
target: null
|
|
2705
|
-
},
|
|
2705
|
+
}, l.value = null, r.value = [], i.value = [], s.value = [], a.value = [], u.value = {
|
|
2706
2706
|
src: null,
|
|
2707
2707
|
target: null
|
|
2708
2708
|
};
|
|
@@ -2714,115 +2714,115 @@ const Z2 = /* @__PURE__ */ Ze(j2, [["render", U2]]), W2 = "data:image/svg+xml,%3
|
|
|
2714
2714
|
targetLabel: g,
|
|
2715
2715
|
phonetic: n,
|
|
2716
2716
|
text: t,
|
|
2717
|
-
result:
|
|
2717
|
+
result: l,
|
|
2718
2718
|
dictionary: r,
|
|
2719
2719
|
definitions: i,
|
|
2720
|
-
synonyms:
|
|
2720
|
+
synonyms: s,
|
|
2721
2721
|
examples: a,
|
|
2722
2722
|
tts: u,
|
|
2723
2723
|
init: x,
|
|
2724
2724
|
reset: _
|
|
2725
2725
|
};
|
|
2726
2726
|
});
|
|
2727
|
-
function
|
|
2728
|
-
return
|
|
2727
|
+
function ll(e) {
|
|
2728
|
+
return kt() ? (nt(e), !0) : !1;
|
|
2729
2729
|
}
|
|
2730
|
-
function
|
|
2730
|
+
function Be(e) {
|
|
2731
2731
|
return typeof e == "function" ? e() : V(e);
|
|
2732
2732
|
}
|
|
2733
|
-
const
|
|
2733
|
+
const sl = typeof window < "u" && typeof document < "u";
|
|
2734
2734
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2735
|
-
const
|
|
2735
|
+
const Et = () => {
|
|
2736
2736
|
};
|
|
2737
|
-
function
|
|
2737
|
+
function rl(e, o) {
|
|
2738
2738
|
function t(...n) {
|
|
2739
|
-
return new Promise((
|
|
2740
|
-
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(
|
|
2739
|
+
return new Promise((l, r) => {
|
|
2740
|
+
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(l).catch(r);
|
|
2741
2741
|
});
|
|
2742
2742
|
}
|
|
2743
2743
|
return t;
|
|
2744
2744
|
}
|
|
2745
|
-
function
|
|
2746
|
-
let t, n,
|
|
2747
|
-
const r = (
|
|
2748
|
-
clearTimeout(
|
|
2745
|
+
function il(e, o = {}) {
|
|
2746
|
+
let t, n, l = Et;
|
|
2747
|
+
const r = (s) => {
|
|
2748
|
+
clearTimeout(s), l(), l = Et;
|
|
2749
2749
|
};
|
|
2750
|
-
return (
|
|
2751
|
-
const a =
|
|
2752
|
-
return t && r(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (r(n), n = null), Promise.resolve(
|
|
2753
|
-
|
|
2754
|
-
t && r(t), n = null, c(
|
|
2750
|
+
return (s) => {
|
|
2751
|
+
const a = Be(e), u = Be(o.maxWait);
|
|
2752
|
+
return t && r(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (r(n), n = null), Promise.resolve(s())) : new Promise((c, p) => {
|
|
2753
|
+
l = o.rejectOnCancel ? p : c, u && !n && (n = setTimeout(() => {
|
|
2754
|
+
t && r(t), n = null, c(s());
|
|
2755
2755
|
}, u)), t = setTimeout(() => {
|
|
2756
|
-
n && r(n), n = null, c(
|
|
2756
|
+
n && r(n), n = null, c(s());
|
|
2757
2757
|
}, a);
|
|
2758
2758
|
});
|
|
2759
2759
|
};
|
|
2760
2760
|
}
|
|
2761
|
-
function
|
|
2762
|
-
return
|
|
2763
|
-
|
|
2761
|
+
function al(e, o = 200, t = {}) {
|
|
2762
|
+
return rl(
|
|
2763
|
+
il(o, t),
|
|
2764
2764
|
e
|
|
2765
2765
|
);
|
|
2766
2766
|
}
|
|
2767
|
-
function
|
|
2767
|
+
function Ot(e) {
|
|
2768
2768
|
var o;
|
|
2769
|
-
const t =
|
|
2769
|
+
const t = Be(e);
|
|
2770
2770
|
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
2771
2771
|
}
|
|
2772
|
-
const
|
|
2773
|
-
function
|
|
2774
|
-
const e = E(!1), o =
|
|
2772
|
+
const ul = sl ? window : void 0;
|
|
2773
|
+
function cl() {
|
|
2774
|
+
const e = E(!1), o = Vt();
|
|
2775
2775
|
return o && Ce(() => {
|
|
2776
2776
|
e.value = !0;
|
|
2777
2777
|
}, o), e;
|
|
2778
2778
|
}
|
|
2779
|
-
function
|
|
2780
|
-
const o =
|
|
2779
|
+
function dl(e) {
|
|
2780
|
+
const o = cl();
|
|
2781
2781
|
return S(() => (o.value, !!e()));
|
|
2782
2782
|
}
|
|
2783
|
-
function
|
|
2784
|
-
const { window: n =
|
|
2783
|
+
function fl(e, o, t = {}) {
|
|
2784
|
+
const { window: n = ul, ...l } = t;
|
|
2785
2785
|
let r;
|
|
2786
|
-
const i =
|
|
2786
|
+
const i = dl(() => n && "ResizeObserver" in n), s = () => {
|
|
2787
2787
|
r && (r.disconnect(), r = void 0);
|
|
2788
|
-
}, a = S(() => Array.isArray(e) ? e.map((p) =>
|
|
2788
|
+
}, a = S(() => Array.isArray(e) ? e.map((p) => Ot(p)) : [Ot(e)]), u = F(
|
|
2789
2789
|
a,
|
|
2790
2790
|
(p) => {
|
|
2791
|
-
if (
|
|
2791
|
+
if (s(), i.value && n) {
|
|
2792
2792
|
r = new ResizeObserver(o);
|
|
2793
2793
|
for (const g of p)
|
|
2794
|
-
g && r.observe(g,
|
|
2794
|
+
g && r.observe(g, l);
|
|
2795
2795
|
}
|
|
2796
2796
|
},
|
|
2797
2797
|
{ immediate: !0, flush: "post" }
|
|
2798
2798
|
), c = () => {
|
|
2799
|
-
|
|
2799
|
+
s(), u();
|
|
2800
2800
|
};
|
|
2801
|
-
return
|
|
2801
|
+
return ll(c), {
|
|
2802
2802
|
isSupported: i,
|
|
2803
2803
|
stop: c
|
|
2804
2804
|
};
|
|
2805
2805
|
}
|
|
2806
|
-
function
|
|
2806
|
+
function vn(e) {
|
|
2807
2807
|
var o;
|
|
2808
|
-
const t = E(e == null ? void 0 : e.element), n = E(e == null ? void 0 : e.input),
|
|
2808
|
+
const t = E(e == null ? void 0 : e.element), n = E(e == null ? void 0 : e.input), l = (o = e == null ? void 0 : e.styleProp) != null ? o : "height", r = E(1);
|
|
2809
2809
|
function i() {
|
|
2810
|
-
var
|
|
2810
|
+
var s;
|
|
2811
2811
|
if (!t.value)
|
|
2812
2812
|
return;
|
|
2813
2813
|
let a = "";
|
|
2814
|
-
t.value.style[
|
|
2814
|
+
t.value.style[l] = "1px", r.value = (s = t.value) == null ? void 0 : s.scrollHeight, e != null && e.styleTarget ? Be(e.styleTarget).style[l] = `${r.value}px` : a = `${r.value}px`, t.value.style[l] = a;
|
|
2815
2815
|
}
|
|
2816
2816
|
return F([n, t], () => Q(i), { immediate: !0 }), F(r, () => {
|
|
2817
|
-
var
|
|
2818
|
-
return (
|
|
2819
|
-
}),
|
|
2817
|
+
var s;
|
|
2818
|
+
return (s = e == null ? void 0 : e.onResize) == null ? void 0 : s.call(e);
|
|
2819
|
+
}), fl(t, () => i()), e != null && e.watch && F(e.watch, i, { immediate: !0, deep: !0 }), {
|
|
2820
2820
|
textarea: t,
|
|
2821
2821
|
input: n,
|
|
2822
2822
|
triggerResize: i
|
|
2823
2823
|
};
|
|
2824
2824
|
}
|
|
2825
|
-
const
|
|
2825
|
+
const pl = {
|
|
2826
2826
|
__name: "TranslationInput",
|
|
2827
2827
|
props: {
|
|
2828
2828
|
text: {
|
|
@@ -2832,21 +2832,21 @@ const ds = {
|
|
|
2832
2832
|
},
|
|
2833
2833
|
emits: ["change", "clear", "loadTTS"],
|
|
2834
2834
|
setup(e, { emit: o }) {
|
|
2835
|
-
const t = he(), n = e,
|
|
2835
|
+
const t = he(), n = e, l = E(""), r = S(() => t.src), i = S(() => t.srcLabel), s = S(() => {
|
|
2836
2836
|
var _;
|
|
2837
2837
|
return (_ = t.phonetic) == null ? void 0 : _.src;
|
|
2838
|
-
}), { textarea: a } =
|
|
2839
|
-
u("change",
|
|
2840
|
-
},
|
|
2838
|
+
}), { textarea: a } = vn({ input: l, styleProp: "minHeight" }), u = o, c = al(() => {
|
|
2839
|
+
u("change", l.value);
|
|
2840
|
+
}, I2.INPUT_DEBOUNCE);
|
|
2841
2841
|
function p() {
|
|
2842
|
-
if (!
|
|
2842
|
+
if (!l.value) {
|
|
2843
2843
|
g();
|
|
2844
2844
|
return;
|
|
2845
2845
|
}
|
|
2846
2846
|
c();
|
|
2847
2847
|
}
|
|
2848
2848
|
function g() {
|
|
2849
|
-
u("clear"),
|
|
2849
|
+
u("clear"), l.value = "", a.value.focus();
|
|
2850
2850
|
}
|
|
2851
2851
|
async function x() {
|
|
2852
2852
|
await Q(), a.value.select();
|
|
@@ -2854,22 +2854,22 @@ const ds = {
|
|
|
2854
2854
|
return F(
|
|
2855
2855
|
() => n.text,
|
|
2856
2856
|
(_) => {
|
|
2857
|
-
|
|
2857
|
+
l.value !== _ && x(), l.value = _;
|
|
2858
2858
|
}
|
|
2859
2859
|
), (_, v) => (w(), T(Z, null, [
|
|
2860
|
-
H(
|
|
2860
|
+
H(pn, {
|
|
2861
2861
|
src: r.value,
|
|
2862
2862
|
srcLabel: i.value,
|
|
2863
2863
|
type: "src",
|
|
2864
|
-
phonetic:
|
|
2864
|
+
phonetic: s.value,
|
|
2865
2865
|
isClearBtn: !0,
|
|
2866
2866
|
onClear: g,
|
|
2867
2867
|
onLoadTTS: v[0] || (v[0] = ($) => u("loadTTS"))
|
|
2868
2868
|
}, null, 8, ["src", "srcLabel", "phonetic"]),
|
|
2869
|
-
|
|
2869
|
+
Mt(h("textarea", {
|
|
2870
2870
|
ref_key: "textarea",
|
|
2871
2871
|
ref: a,
|
|
2872
|
-
"onUpdate:modelValue": v[1] || (v[1] = ($) =>
|
|
2872
|
+
"onUpdate:modelValue": v[1] || (v[1] = ($) => l.value = $),
|
|
2873
2873
|
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",
|
|
2874
2874
|
autofocus: "",
|
|
2875
2875
|
rows: "2",
|
|
@@ -2877,15 +2877,15 @@ const ds = {
|
|
|
2877
2877
|
onFocus: x
|
|
2878
2878
|
}, null, 544), [
|
|
2879
2879
|
[
|
|
2880
|
-
|
|
2881
|
-
|
|
2880
|
+
Nt,
|
|
2881
|
+
l.value,
|
|
2882
2882
|
void 0,
|
|
2883
2883
|
{ trim: !0 }
|
|
2884
2884
|
]
|
|
2885
2885
|
])
|
|
2886
2886
|
], 64));
|
|
2887
2887
|
}
|
|
2888
|
-
},
|
|
2888
|
+
}, vl = /* @__PURE__ */ Le(pl, [["__scopeId", "data-v-90bf3e0d"]]), hl = (e) => (Tt("data-v-f47b8efe"), e = e(), It(), e), ml = { class: "flex flex-col" }, gl = /* @__PURE__ */ hl(() => /* @__PURE__ */ h("div", { class: "w-full flex align-item-center justify-end mt-2" }, null, -1)), bl = {
|
|
2889
2889
|
__name: "TranslationResult",
|
|
2890
2890
|
props: {
|
|
2891
2891
|
isFavoriteFeatureEnabled: Boolean,
|
|
@@ -2893,24 +2893,24 @@ const ds = {
|
|
|
2893
2893
|
},
|
|
2894
2894
|
emits: ["loadTTS", "favorite"],
|
|
2895
2895
|
setup(e, { emit: o }) {
|
|
2896
|
-
const t = he(), n = S(() => t.result),
|
|
2896
|
+
const t = he(), n = S(() => t.result), l = S(() => t.target), r = S(() => t.targetLabel), i = S(() => {
|
|
2897
2897
|
var g;
|
|
2898
2898
|
return (g = t.phonetic) == null ? void 0 : g.target;
|
|
2899
|
-
}),
|
|
2899
|
+
}), s = e, a = Ze(), { textarea: u, input: c } = vn({ input: n, styleProp: "minHeight" }), p = o;
|
|
2900
2900
|
return (g, x) => (w(), T(Z, null, [
|
|
2901
|
-
H(
|
|
2901
|
+
H(pn, {
|
|
2902
2902
|
loading: V(a).loading,
|
|
2903
|
-
src:
|
|
2903
|
+
src: l.value,
|
|
2904
2904
|
srcLabel: r.value,
|
|
2905
2905
|
type: "target",
|
|
2906
|
-
isFavoriteBtn:
|
|
2906
|
+
isFavoriteBtn: s.isFavoriteFeatureEnabled,
|
|
2907
2907
|
isFavorite: e.isFavorite,
|
|
2908
2908
|
phonetic: i.value,
|
|
2909
2909
|
onFavorite: x[0] || (x[0] = (_) => p("favorite")),
|
|
2910
2910
|
onLoadTTS: x[1] || (x[1] = (_) => p("loadTTS"))
|
|
2911
2911
|
}, null, 8, ["loading", "src", "srcLabel", "isFavoriteBtn", "isFavorite", "phonetic"]),
|
|
2912
|
-
h("div",
|
|
2913
|
-
|
|
2912
|
+
h("div", ml, [
|
|
2913
|
+
Mt(h("textarea", {
|
|
2914
2914
|
ref_key: "textarea",
|
|
2915
2915
|
ref: u,
|
|
2916
2916
|
"onUpdate:modelValue": x[2] || (x[2] = (_) => xe(c) ? c.value = _ : null),
|
|
@@ -2919,65 +2919,65 @@ const ds = {
|
|
|
2919
2919
|
rows: "2",
|
|
2920
2920
|
spellcheck: "false"
|
|
2921
2921
|
}, null, 512), [
|
|
2922
|
-
[
|
|
2922
|
+
[Nt, V(c)]
|
|
2923
2923
|
]),
|
|
2924
|
-
|
|
2924
|
+
gl
|
|
2925
2925
|
])
|
|
2926
2926
|
], 64));
|
|
2927
2927
|
}
|
|
2928
|
-
},
|
|
2928
|
+
}, xl = /* @__PURE__ */ Le(bl, [["__scopeId", "data-v-f47b8efe"]]), _l = { class: "btn btn-sm btn-circle btn-ghost" }, Ge = {
|
|
2929
2929
|
__name: "ToggleBtn",
|
|
2930
2930
|
props: {
|
|
2931
2931
|
isExpanded: Boolean
|
|
2932
2932
|
},
|
|
2933
2933
|
setup(e) {
|
|
2934
2934
|
const o = e;
|
|
2935
|
-
return (t, n) => (w(), T("button",
|
|
2936
|
-
o.isExpanded ? (w(), ee(V(
|
|
2935
|
+
return (t, n) => (w(), T("button", _l, [
|
|
2936
|
+
o.isExpanded ? (w(), ee(V(Zo), {
|
|
2937
2937
|
key: 0,
|
|
2938
2938
|
class: "w-7 text-gray-400"
|
|
2939
|
-
})) : (w(), ee(V(
|
|
2939
|
+
})) : (w(), ee(V(zo), {
|
|
2940
2940
|
key: 1,
|
|
2941
2941
|
class: "w-7 text-gray-400"
|
|
2942
2942
|
}))
|
|
2943
2943
|
]));
|
|
2944
2944
|
}
|
|
2945
|
-
},
|
|
2945
|
+
}, Cl = { class: "card border bg-white rounded-lg" }, yl = { class: "card-body px-4 py-2 gap-0" }, wl = { class: "flex justify-between items-center" }, Sl = /* @__PURE__ */ h("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Translations", -1), El = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Ol = { class: "list-none list-inside" }, $l = ["onClick"], Tl = { class: "text-base font-normal text-gray-800 leading-4" }, Il = {
|
|
2946
2946
|
__name: "Dictionary",
|
|
2947
2947
|
emits: ["translate"],
|
|
2948
2948
|
setup(e, { emit: o }) {
|
|
2949
|
-
const t = E(!0), n = he(),
|
|
2949
|
+
const t = E(!0), n = he(), l = We(), r = S(() => n.dictionary), i = o, s = () => {
|
|
2950
2950
|
t.value = !t.value;
|
|
2951
2951
|
}, a = (u) => {
|
|
2952
|
-
i("translate", u, n.target, n.src),
|
|
2952
|
+
i("translate", u, n.target, n.src), l.src = n.target, l.target = n.src, window.scrollTo(0, 0);
|
|
2953
2953
|
};
|
|
2954
|
-
return (u, c) => (w(), T("div",
|
|
2955
|
-
h("div",
|
|
2956
|
-
h("div",
|
|
2957
|
-
|
|
2958
|
-
H(
|
|
2954
|
+
return (u, c) => (w(), T("div", Cl, [
|
|
2955
|
+
h("div", yl, [
|
|
2956
|
+
h("div", wl, [
|
|
2957
|
+
Sl,
|
|
2958
|
+
H(Ge, {
|
|
2959
2959
|
isExpanded: t.value,
|
|
2960
|
-
onClick:
|
|
2960
|
+
onClick: s
|
|
2961
2961
|
}, null, 8, ["isExpanded"])
|
|
2962
2962
|
]),
|
|
2963
2963
|
h("div", {
|
|
2964
2964
|
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2965
2965
|
}, [
|
|
2966
2966
|
h("ul", null, [
|
|
2967
|
-
(w(!0), T(Z, null,
|
|
2967
|
+
(w(!0), T(Z, null, se(r.value, (p, g) => (w(), T("li", {
|
|
2968
2968
|
key: `${p.pos}-${g}`,
|
|
2969
2969
|
class: "mb-2"
|
|
2970
2970
|
}, [
|
|
2971
|
-
h("h5",
|
|
2972
|
-
h("ul",
|
|
2973
|
-
(w(!0), T(Z, null,
|
|
2971
|
+
h("h5", El, te(p.pos), 1),
|
|
2972
|
+
h("ul", Ol, [
|
|
2973
|
+
(w(!0), T(Z, null, se(p.items, (x, _) => (w(), T("li", {
|
|
2974
2974
|
key: `${x.word}-${_}`
|
|
2975
2975
|
}, [
|
|
2976
2976
|
h("span", {
|
|
2977
2977
|
class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
2978
2978
|
onClick: (v) => a(x.word)
|
|
2979
|
-
}, te(x.word), 9,
|
|
2980
|
-
h("small",
|
|
2979
|
+
}, te(x.word), 9, $l),
|
|
2980
|
+
h("small", Tl, " - " + te(x.reverse_translation.join(", ")), 1)
|
|
2981
2981
|
]))), 128))
|
|
2982
2982
|
])
|
|
2983
2983
|
]))), 128))
|
|
@@ -2986,41 +2986,41 @@ const ds = {
|
|
|
2986
2986
|
])
|
|
2987
2987
|
]));
|
|
2988
2988
|
}
|
|
2989
|
-
},
|
|
2989
|
+
}, Ll = { class: "card border bg-white rounded-lg" }, Rl = { class: "card-body px-4 py-2 gap-0" }, Pl = { class: "flex justify-between items-center" }, Vl = /* @__PURE__ */ h("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" }, Ml = { class: "text-base text-textCustom list-decimal list-outside ml-5" }, Nl = /* @__PURE__ */ h("br", null, null, -1), Dl = {
|
|
2990
2990
|
key: 0,
|
|
2991
2991
|
class: "italic"
|
|
2992
|
-
},
|
|
2992
|
+
}, Al = {
|
|
2993
2993
|
__name: "Definition",
|
|
2994
2994
|
setup(e) {
|
|
2995
|
-
const o = E(!0), t = he(), n = S(() => t.definitions),
|
|
2995
|
+
const o = E(!0), t = he(), n = S(() => t.definitions), l = () => {
|
|
2996
2996
|
o.value = !o.value;
|
|
2997
2997
|
};
|
|
2998
|
-
return (r, i) => (w(), T("div",
|
|
2999
|
-
h("div",
|
|
3000
|
-
h("div",
|
|
3001
|
-
|
|
3002
|
-
H(
|
|
2998
|
+
return (r, i) => (w(), T("div", Ll, [
|
|
2999
|
+
h("div", Rl, [
|
|
3000
|
+
h("div", Pl, [
|
|
3001
|
+
Vl,
|
|
3002
|
+
H(Ge, {
|
|
3003
3003
|
isExpanded: o.value,
|
|
3004
|
-
onClick:
|
|
3004
|
+
onClick: l
|
|
3005
3005
|
}, null, 8, ["isExpanded"])
|
|
3006
3006
|
]),
|
|
3007
3007
|
h("div", {
|
|
3008
3008
|
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3009
3009
|
}, [
|
|
3010
3010
|
h("ul", null, [
|
|
3011
|
-
(w(!0), T(Z, null,
|
|
3012
|
-
key: `${
|
|
3011
|
+
(w(!0), T(Z, null, se(n.value, (s, a) => (w(), T("li", {
|
|
3012
|
+
key: `${s.pos}-${a}`,
|
|
3013
3013
|
class: "mb-2"
|
|
3014
3014
|
}, [
|
|
3015
|
-
h("h5",
|
|
3016
|
-
h("ul",
|
|
3017
|
-
(w(!0), T(Z, null,
|
|
3015
|
+
h("h5", kl, te(s.pos), 1),
|
|
3016
|
+
h("ul", Ml, [
|
|
3017
|
+
(w(!0), T(Z, null, se(s.items, (u, c) => (w(), T("li", {
|
|
3018
3018
|
key: `${u.gloss}-${c}`,
|
|
3019
3019
|
class: "mb-1"
|
|
3020
3020
|
}, [
|
|
3021
3021
|
h("span", null, te(u.gloss), 1),
|
|
3022
|
-
|
|
3023
|
-
u.example ? (w(), T("small",
|
|
3022
|
+
Nl,
|
|
3023
|
+
u.example ? (w(), T("small", Dl, '"' + te(u.example) + '"', 1)) : X("", !0)
|
|
3024
3024
|
]))), 128))
|
|
3025
3025
|
])
|
|
3026
3026
|
]))), 128))
|
|
@@ -3029,48 +3029,48 @@ const ds = {
|
|
|
3029
3029
|
])
|
|
3030
3030
|
]));
|
|
3031
3031
|
}
|
|
3032
|
-
},
|
|
3032
|
+
}, Fl = { class: "card border bg-white rounded-lg" }, jl = { class: "card-body px-4 py-2 gap-0" }, Bl = { class: "flex justify-between items-center" }, Hl = /* @__PURE__ */ h("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Examples", -1), zl = { class: "text-textCustom list-decimal list-outside ml-7 mt-2" }, Ul = ["innerHTML"], Zl = {
|
|
3033
3033
|
__name: "Example",
|
|
3034
3034
|
setup(e) {
|
|
3035
|
-
const o = E(!0), t = he(), n = S(() => t.examples),
|
|
3035
|
+
const o = E(!0), t = he(), n = S(() => t.examples), l = () => {
|
|
3036
3036
|
o.value = !o.value;
|
|
3037
3037
|
};
|
|
3038
|
-
return (r, i) => (w(), T("div",
|
|
3039
|
-
h("div",
|
|
3040
|
-
h("div",
|
|
3041
|
-
|
|
3042
|
-
H(
|
|
3038
|
+
return (r, i) => (w(), T("div", Fl, [
|
|
3039
|
+
h("div", jl, [
|
|
3040
|
+
h("div", Bl, [
|
|
3041
|
+
Hl,
|
|
3042
|
+
H(Ge, {
|
|
3043
3043
|
isExpanded: o.value,
|
|
3044
|
-
onClick:
|
|
3044
|
+
onClick: l
|
|
3045
3045
|
}, null, 8, ["isExpanded"])
|
|
3046
3046
|
]),
|
|
3047
3047
|
h("div", {
|
|
3048
3048
|
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3049
3049
|
}, [
|
|
3050
|
-
h("ul",
|
|
3051
|
-
(w(!0), T(Z, null,
|
|
3052
|
-
key: `${
|
|
3053
|
-
innerHTML:
|
|
3054
|
-
}, null, 8,
|
|
3050
|
+
h("ul", zl, [
|
|
3051
|
+
(w(!0), T(Z, null, se(n.value, (s, a) => (w(), T("li", {
|
|
3052
|
+
key: `${s.definition_id}-${a}`,
|
|
3053
|
+
innerHTML: s
|
|
3054
|
+
}, null, 8, Ul))), 128))
|
|
3055
3055
|
])
|
|
3056
3056
|
], 2)
|
|
3057
3057
|
])
|
|
3058
3058
|
]));
|
|
3059
3059
|
}
|
|
3060
|
-
},
|
|
3060
|
+
}, Wl = { class: "card border bg-white rounded-lg" }, Gl = { class: "card-body px-4 py-2 gap-0" }, ql = { class: "flex justify-between items-center" }, Jl = /* @__PURE__ */ h("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Synonyms", -1), Kl = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Yl = { class: "list-none list-inside" }, Ql = { class: "flex flex-wrap" }, Xl = ["onClick"], es = {
|
|
3061
3061
|
__name: "Synonyms",
|
|
3062
3062
|
emits: ["translate"],
|
|
3063
3063
|
setup(e, { emit: o }) {
|
|
3064
|
-
const t = E(!0), n = he(),
|
|
3064
|
+
const t = E(!0), n = he(), l = S(() => n.synonyms), r = o, i = () => {
|
|
3065
3065
|
t.value = !t.value;
|
|
3066
|
-
},
|
|
3066
|
+
}, s = (a) => {
|
|
3067
3067
|
r("translate", a), window.scrollTo(0, 0);
|
|
3068
3068
|
};
|
|
3069
|
-
return (a, u) => (w(), T("div",
|
|
3070
|
-
h("div",
|
|
3071
|
-
h("div",
|
|
3072
|
-
|
|
3073
|
-
H(
|
|
3069
|
+
return (a, u) => (w(), T("div", Wl, [
|
|
3070
|
+
h("div", Gl, [
|
|
3071
|
+
h("div", ql, [
|
|
3072
|
+
Jl,
|
|
3073
|
+
H(Ge, {
|
|
3074
3074
|
isExpanded: t.value,
|
|
3075
3075
|
onClick: i
|
|
3076
3076
|
}, null, 8, ["isExpanded"])
|
|
@@ -3079,22 +3079,22 @@ const ds = {
|
|
|
3079
3079
|
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3080
3080
|
}, [
|
|
3081
3081
|
h("ul", null, [
|
|
3082
|
-
(w(!0), T(Z, null,
|
|
3082
|
+
(w(!0), T(Z, null, se(l.value, (c, p) => (w(), T("li", {
|
|
3083
3083
|
key: `${c.pos}-${p}`,
|
|
3084
3084
|
class: "mb-2"
|
|
3085
3085
|
}, [
|
|
3086
|
-
h("h5",
|
|
3087
|
-
h("ul",
|
|
3088
|
-
(w(!0), T(Z, null,
|
|
3086
|
+
h("h5", Kl, te(c.pos), 1),
|
|
3087
|
+
h("ul", Yl, [
|
|
3088
|
+
(w(!0), T(Z, null, se(c.items, (g, x) => (w(), T("li", {
|
|
3089
3089
|
key: `${g.word}-${x}`,
|
|
3090
3090
|
class: "mb-2"
|
|
3091
3091
|
}, [
|
|
3092
|
-
h("div",
|
|
3093
|
-
(w(!0), T(Z, null,
|
|
3092
|
+
h("div", Ql, [
|
|
3093
|
+
(w(!0), T(Z, null, se(g.synonym, (_, v) => (w(), T("span", {
|
|
3094
3094
|
key: `${_}-${v}`,
|
|
3095
3095
|
class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3096
|
-
onClick: ($) =>
|
|
3097
|
-
}, te(_), 9,
|
|
3096
|
+
onClick: ($) => s(_)
|
|
3097
|
+
}, te(_), 9, Xl))), 128))
|
|
3098
3098
|
])
|
|
3099
3099
|
]))), 128))
|
|
3100
3100
|
])
|
|
@@ -3105,22 +3105,22 @@ const ds = {
|
|
|
3105
3105
|
]));
|
|
3106
3106
|
}
|
|
3107
3107
|
};
|
|
3108
|
-
function
|
|
3108
|
+
function ts() {
|
|
3109
3109
|
document.documentElement.setAttribute("dir", "rtl");
|
|
3110
3110
|
}
|
|
3111
|
-
function
|
|
3111
|
+
function ns() {
|
|
3112
3112
|
document.documentElement.removeAttribute("dir");
|
|
3113
3113
|
}
|
|
3114
|
-
const
|
|
3115
|
-
supportRTL:
|
|
3116
|
-
removeRTL:
|
|
3117
|
-
},
|
|
3114
|
+
const $t = {
|
|
3115
|
+
supportRTL: ts,
|
|
3116
|
+
removeRTL: ns
|
|
3117
|
+
}, os = ["ar", "fa", "iw", "yi", "ur", "pa"], ls = { class: "bg-white min-h-screen flex flex-col" }, ss = { class: "py-2 px-5 shadow-lg" }, rs = { class: "px-5 flex-grow" }, is = { class: "flex flex-col lg:flex-row lg:gap-2" }, as = { class: "w-full lg:w-[calc(50%-1rem)] my-2" }, us = /* @__PURE__ */ h("div", { class: "w-6 h-4 mx-auto hidden lg:block" }, null, -1), cs = { class: "w-full lg:w-[calc(50%-1rem)] my-2" }, ds = { class: "grid grid-cols-1 lg:grid-cols-3 gap-4" }, fs = {
|
|
3118
3118
|
key: 0,
|
|
3119
3119
|
class: "w-full my-4"
|
|
3120
|
-
},
|
|
3120
|
+
}, ps = {
|
|
3121
3121
|
key: 1,
|
|
3122
3122
|
class: "text-textCustom italic font-medium"
|
|
3123
|
-
},
|
|
3123
|
+
}, ms = {
|
|
3124
3124
|
__name: "Popup",
|
|
3125
3125
|
props: {
|
|
3126
3126
|
opt: {
|
|
@@ -3159,32 +3159,32 @@ const Ot = {
|
|
|
3159
3159
|
"favorite"
|
|
3160
3160
|
],
|
|
3161
3161
|
setup(e, { emit: o }) {
|
|
3162
|
-
const t =
|
|
3163
|
-
const v =
|
|
3164
|
-
|
|
3162
|
+
const t = m2(), n = he(t), l = fn(t), r = We(t), i = Ze(t), s = e, a = o, u = E(""), c = () => {
|
|
3163
|
+
const v = s.opt.target;
|
|
3164
|
+
os.includes(v) ? $t.supportRTL() : $t.removeRTL();
|
|
3165
3165
|
};
|
|
3166
3166
|
F(
|
|
3167
|
-
() =>
|
|
3167
|
+
() => s.translation,
|
|
3168
3168
|
(v) => {
|
|
3169
|
-
v && (i.loading = !1, u.value = v.text, n.init(v),
|
|
3169
|
+
v && (i.loading = !1, u.value = v.text, n.init(v), l.reset());
|
|
3170
3170
|
},
|
|
3171
3171
|
{ immediate: !0 }
|
|
3172
3172
|
), F(
|
|
3173
|
-
() =>
|
|
3173
|
+
() => s.tts,
|
|
3174
3174
|
(v) => {
|
|
3175
3175
|
if (!v) {
|
|
3176
|
-
|
|
3176
|
+
l.reset();
|
|
3177
3177
|
return;
|
|
3178
3178
|
}
|
|
3179
|
-
|
|
3179
|
+
l.set(v);
|
|
3180
3180
|
},
|
|
3181
3181
|
{ immediate: !0 }
|
|
3182
|
-
), F([() =>
|
|
3182
|
+
), F([() => s.opt, () => s.languages], ([v, $]) => {
|
|
3183
3183
|
r.init(v, $), c();
|
|
3184
3184
|
}), F([() => r.src, () => r.target], ([v, $]) => {
|
|
3185
3185
|
a("opt", { src: v, target: $ }), _(u.value);
|
|
3186
3186
|
}), Ce(() => {
|
|
3187
|
-
r.init(
|
|
3187
|
+
r.init(s.opt, s.languages), c();
|
|
3188
3188
|
});
|
|
3189
3189
|
function p() {
|
|
3190
3190
|
u.value = "", n.reset();
|
|
@@ -3205,29 +3205,29 @@ const Ot = {
|
|
|
3205
3205
|
}
|
|
3206
3206
|
return (v, $) => {
|
|
3207
3207
|
var N, I, k, D;
|
|
3208
|
-
return w(), T("div",
|
|
3209
|
-
h("div",
|
|
3210
|
-
H(
|
|
3208
|
+
return w(), T("div", ls, [
|
|
3209
|
+
h("div", ss, [
|
|
3210
|
+
H(Hn, {
|
|
3211
3211
|
onReader: $[0] || ($[0] = (m) => a("reader")),
|
|
3212
3212
|
onSettings: $[1] || ($[1] = (m) => a("settings")),
|
|
3213
3213
|
onFullScreen: $[2] || ($[2] = (m) => a("fullscreen")),
|
|
3214
3214
|
onStarList: $[3] || ($[3] = (m) => a("starList"))
|
|
3215
3215
|
})
|
|
3216
3216
|
]),
|
|
3217
|
-
h("div",
|
|
3218
|
-
H(
|
|
3219
|
-
h("div",
|
|
3220
|
-
h("div",
|
|
3221
|
-
H(
|
|
3217
|
+
h("div", rs, [
|
|
3218
|
+
H(T2, { class: "my-4" }),
|
|
3219
|
+
h("div", is, [
|
|
3220
|
+
h("div", as, [
|
|
3221
|
+
H(vl, {
|
|
3222
3222
|
text: u.value,
|
|
3223
3223
|
onChange: g,
|
|
3224
3224
|
onClear: p,
|
|
3225
3225
|
onLoadTTS: $[4] || ($[4] = (m) => x("src"))
|
|
3226
3226
|
}, null, 8, ["text"])
|
|
3227
3227
|
]),
|
|
3228
|
-
|
|
3229
|
-
h("div",
|
|
3230
|
-
H(
|
|
3228
|
+
us,
|
|
3229
|
+
h("div", cs, [
|
|
3230
|
+
H(xl, {
|
|
3231
3231
|
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
3232
3232
|
isFavorite: e.isFavorite,
|
|
3233
3233
|
onFavorite: $[5] || ($[5] = (m) => a("favorite")),
|
|
@@ -3235,27 +3235,27 @@ const Ot = {
|
|
|
3235
3235
|
}, null, 8, ["isFavoriteFeatureEnabled", "isFavorite"])
|
|
3236
3236
|
])
|
|
3237
3237
|
]),
|
|
3238
|
-
|
|
3239
|
-
h("div",
|
|
3240
|
-
(N = V(n).dictionary) != null && N.length ? (w(), ee(
|
|
3238
|
+
s.translation ? (w(), T(Z, { key: 0 }, [
|
|
3239
|
+
h("div", ds, [
|
|
3240
|
+
(N = V(n).dictionary) != null && N.length ? (w(), ee(Il, {
|
|
3241
3241
|
key: 0,
|
|
3242
3242
|
onTranslate: _
|
|
3243
3243
|
})) : X("", !0),
|
|
3244
|
-
(I = V(n).definitions) != null && I.length ? (w(), ee(
|
|
3245
|
-
(k = V(n).synonyms) != null && k.length ? (w(), ee(
|
|
3244
|
+
(I = V(n).definitions) != null && I.length ? (w(), ee(Al, { key: 1 })) : X("", !0),
|
|
3245
|
+
(k = V(n).synonyms) != null && k.length ? (w(), ee(es, {
|
|
3246
3246
|
key: 2,
|
|
3247
3247
|
onTranslate: _
|
|
3248
3248
|
})) : X("", !0)
|
|
3249
3249
|
]),
|
|
3250
|
-
(D = V(n).examples) != null && D.length ? (w(), T("div",
|
|
3251
|
-
H(
|
|
3250
|
+
(D = V(n).examples) != null && D.length ? (w(), T("div", fs, [
|
|
3251
|
+
H(Zl)
|
|
3252
3252
|
])) : X("", !0)
|
|
3253
|
-
], 64)) : (w(), T("span",
|
|
3253
|
+
], 64)) : (w(), T("span", ps, "Service unavailable"))
|
|
3254
3254
|
])
|
|
3255
3255
|
]);
|
|
3256
3256
|
};
|
|
3257
3257
|
}
|
|
3258
3258
|
};
|
|
3259
3259
|
export {
|
|
3260
|
-
|
|
3260
|
+
ms as default
|
|
3261
3261
|
};
|