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