@ddict/popup 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/popup.es.js +1359 -1324
- package/dist/popup.umd.js +8 -8
- package/package.json +1 -1
package/dist/popup.es.js
CHANGED
|
@@ -1,151 +1,166 @@
|
|
|
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 g, 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 _e, 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 xe, toDisplayString as te, createCommentVNode as X, withModifiers as dt, createTextVNode as gn, withDirectives as Rt, vModelText as Vt, pushScopeId as bn, popScopeId as _n } from "vue";
|
|
2
|
+
const xn = "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__ */ g("div", { class: "flex flex-row" }, [
|
|
3
|
+
/* @__PURE__ */ g("img", {
|
|
4
|
+
src: xn,
|
|
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__ */ g("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__ */ g("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__ */ g("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
|
+
g("div", On, [
|
|
43
|
+
g("div", $n, [
|
|
44
|
+
g("button", {
|
|
45
|
+
class: "btn btn-ghost btn-circle",
|
|
46
|
+
onClick: s[0] || (s[0] = (r) => t("reader"))
|
|
47
|
+
}, In)
|
|
48
|
+
]),
|
|
49
|
+
g("div", Ln, [
|
|
50
|
+
g("button", {
|
|
51
|
+
class: "btn btn-ghost btn-circle",
|
|
52
|
+
onClick: s[1] || (s[1] = (r) => t("fullScreen"))
|
|
53
|
+
}, Rn)
|
|
54
|
+
]),
|
|
55
|
+
g("div", Vn, [
|
|
56
|
+
g("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 r, i,
|
|
68
|
+
var r, i, l, a;
|
|
54
69
|
let u;
|
|
55
70
|
t.key && ((r = t.debug) != null && r.call(t)) && (u = Date.now());
|
|
56
|
-
const
|
|
57
|
-
if (!(
|
|
58
|
-
return
|
|
59
|
-
n =
|
|
60
|
-
let
|
|
61
|
-
if (t.key && ((i = t.debug) != null && i.call(t)) && (
|
|
62
|
-
const
|
|
63
|
-
for (
|
|
64
|
-
|
|
65
|
-
return
|
|
71
|
+
const c = e();
|
|
72
|
+
if (!(c.length !== n.length || c.some((C, h) => n[h] !== C)))
|
|
73
|
+
return s;
|
|
74
|
+
n = c;
|
|
75
|
+
let _;
|
|
76
|
+
if (t.key && ((i = t.debug) != null && i.call(t)) && (_ = Date.now()), s = o(...c), t.key && ((l = t.debug) != null && l.call(t))) {
|
|
77
|
+
const C = Math.round((Date.now() - u) * 100) / 100, h = Math.round((Date.now() - _) * 100) / 100, v = h / 16, T = (N, I) => {
|
|
78
|
+
for (N = String(N); N.length < I; )
|
|
79
|
+
N = " " + N;
|
|
80
|
+
return N;
|
|
66
81
|
};
|
|
67
82
|
console.info(
|
|
68
|
-
`%c⏱ ${
|
|
83
|
+
`%c⏱ ${T(h, 5)} /${T(C, 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
|
-
function
|
|
97
|
+
function qe(e, o) {
|
|
83
98
|
if (e === void 0)
|
|
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
126
|
const r = new n.ResizeObserver((i) => {
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
114
|
-
const a =
|
|
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
137
|
return r.observe(t, { box: "border-box" }), () => {
|
|
123
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 r =
|
|
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
157
|
), i = (u) => () => {
|
|
143
|
-
|
|
144
|
-
},
|
|
145
|
-
return a(), t.addEventListener("scroll",
|
|
146
|
-
t.removeEventListener("scroll",
|
|
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
|
|
178
|
+
var s, r;
|
|
164
179
|
const i = e + o;
|
|
165
|
-
(r = (
|
|
180
|
+
(r = (s = n.scrollElement) == null ? void 0 : s.scrollTo) == null || r.call(s, {
|
|
166
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
|
-
|
|
189
|
+
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((s) => {
|
|
190
|
+
s.forEach((r) => {
|
|
176
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: (
|
|
199
|
+
observe: (s) => {
|
|
185
200
|
var r;
|
|
186
|
-
return (r = n()) == null ? void 0 : r.observe(
|
|
201
|
+
return (r = n()) == null ? void 0 : r.observe(s, { box: "border-box" });
|
|
187
202
|
},
|
|
188
|
-
unobserve: (
|
|
203
|
+
unobserve: (s) => {
|
|
189
204
|
var r;
|
|
190
|
-
return (r = n()) == null ? void 0 : r.unobserve(
|
|
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: i, endIndex:
|
|
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 || i !== (a == null ? void 0 : a.startIndex) ||
|
|
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 = r ? this.getScrollOffset() <
|
|
262
|
+
this.options.observeElementOffset(this, (s, r) => {
|
|
263
|
+
this.scrollAdjustments = 0, this.scrollDirection = r ? this.getScrollOffset() < s ? "forward" : "backward" : null, this.scrollOffset = s;
|
|
249
264
|
const i = this.isScrolling;
|
|
250
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
|
|
270
|
+
const s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
256
271
|
for (let i = n - 1; i >= 0; i--) {
|
|
257
|
-
const
|
|
258
|
-
if (
|
|
272
|
+
const l = t[i];
|
|
273
|
+
if (s.has(l.lane))
|
|
259
274
|
continue;
|
|
260
275
|
const a = r.get(
|
|
261
|
-
|
|
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 r.size === this.options.lanes ? Array.from(r.values()).sort((i,
|
|
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,10 +287,10 @@ 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:
|
|
293
|
+
scrollMargin: s,
|
|
279
294
|
getItemKey: r,
|
|
280
295
|
enabled: i
|
|
281
296
|
}),
|
|
@@ -284,7 +299,7 @@ class Hn {
|
|
|
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
304
|
if (!i)
|
|
290
305
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
@@ -293,32 +308,32 @@ class Hn {
|
|
|
293
308
|
}));
|
|
294
309
|
const u = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
295
310
|
this.pendingMeasuredCacheIndexes = [];
|
|
296
|
-
const
|
|
311
|
+
const c = this.measurementsCache.slice(0, u);
|
|
297
312
|
for (let p = u; p < t; p++) {
|
|
298
|
-
let
|
|
299
|
-
|
|
300
|
-
const
|
|
313
|
+
let _ = (a = this.measurementsCache[p]) == null ? void 0 : a.measureElement;
|
|
314
|
+
_ || (_ = (D) => {
|
|
315
|
+
const m = r(p), P = this.elementsCache.get(m);
|
|
301
316
|
if (!D) {
|
|
302
|
-
|
|
317
|
+
P && (this.observer.unobserve(P), this.elementsCache.delete(m));
|
|
303
318
|
return;
|
|
304
319
|
}
|
|
305
|
-
|
|
320
|
+
P !== D && (P && this.observer.unobserve(P), this.observer.observe(D), this.elementsCache.set(m, D)), D.isConnected && this.resizeItem(
|
|
306
321
|
p,
|
|
307
322
|
this.options.measureElement(D, void 0, this)
|
|
308
323
|
);
|
|
309
324
|
});
|
|
310
|
-
const
|
|
311
|
-
|
|
325
|
+
const C = r(p), h = this.options.lanes === 1 ? c[p - 1] : this.getFurthestMeasurement(c, p), v = h ? h.end + this.options.gap : n + s, T = l.get(C), N = typeof T == "number" ? T : this.options.estimateSize(p), I = v + N, k = h ? h.lane : p % this.options.lanes;
|
|
326
|
+
c[p] = {
|
|
312
327
|
index: p,
|
|
313
|
-
start:
|
|
314
|
-
size:
|
|
315
|
-
end:
|
|
316
|
-
key:
|
|
317
|
-
lane:
|
|
318
|
-
measureElement:
|
|
328
|
+
start: v,
|
|
329
|
+
size: N,
|
|
330
|
+
end: I,
|
|
331
|
+
key: C,
|
|
332
|
+
lane: k,
|
|
333
|
+
measureElement: _
|
|
319
334
|
};
|
|
320
335
|
}
|
|
321
|
-
return this.measurementsCache =
|
|
336
|
+
return this.measurementsCache = c, c;
|
|
322
337
|
},
|
|
323
338
|
{
|
|
324
339
|
key: process.env.NODE_ENV !== "production" && "getMeasurements",
|
|
@@ -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,10 +357,10 @@ 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:
|
|
363
|
+
overscan: s,
|
|
349
364
|
count: r
|
|
350
365
|
}),
|
|
351
366
|
{
|
|
@@ -353,40 +368,40 @@ class Hn {
|
|
|
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
|
|
376
|
+
const s = this.indexFromElement(t), r = this.getMeasurements()[s];
|
|
362
377
|
if (!r || !t.isConnected) {
|
|
363
|
-
this.elementsCache.forEach((
|
|
364
|
-
|
|
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
383
|
const i = this.elementsCache.get(r.key);
|
|
369
|
-
i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(r.key, t)), this.resizeItem(
|
|
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 r = this.itemSizeCache.get(
|
|
375
|
-
i !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(
|
|
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(), {
|
|
376
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
|
|
399
|
+
const s = [];
|
|
385
400
|
for (let r = 0, i = t.length; r < i; r++) {
|
|
386
|
-
const
|
|
387
|
-
|
|
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",
|
|
@@ -395,60 +410,60 @@ class Hn {
|
|
|
395
410
|
), this.getVirtualItemForOffset = (t) => {
|
|
396
411
|
const n = this.getMeasurements();
|
|
397
412
|
if (n.length !== 0)
|
|
398
|
-
return
|
|
399
|
-
n[
|
|
413
|
+
return qe(
|
|
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 <= r ? n = "start" : t >= r +
|
|
409
|
-
const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) -
|
|
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
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
438
|
return [i, n];
|
|
424
|
-
const
|
|
425
|
-
return [this.getOffsetForAlignment(
|
|
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
454
|
const r = this.getOffsetForIndex(t, n);
|
|
440
455
|
if (!r) return;
|
|
441
|
-
const [i,
|
|
442
|
-
this._scrollToOffset(i, { adjustments: void 0, behavior:
|
|
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
|
-
const [u] =
|
|
447
|
-
this.getOffsetForIndex(t,
|
|
461
|
+
const [u] = qe(
|
|
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,94 +475,94 @@ class Hn {
|
|
|
460
475
|
}, this.getTotalSize = () => {
|
|
461
476
|
var t;
|
|
462
477
|
const n = this.getMeasurements();
|
|
463
|
-
let
|
|
464
|
-
return n.length === 0 ?
|
|
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(
|
|
465
480
|
...n.slice(-this.options.lanes).map((r) => r.end)
|
|
466
|
-
),
|
|
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);
|
|
475
490
|
}, this.setOptions(o);
|
|
476
491
|
}
|
|
477
492
|
}
|
|
478
|
-
const
|
|
493
|
+
const kt = (e, o, t, n) => {
|
|
479
494
|
for (; e <= o; ) {
|
|
480
|
-
const
|
|
495
|
+
const s = (e + o) / 2 | 0, r = t(s);
|
|
481
496
|
if (r < n)
|
|
482
|
-
e =
|
|
497
|
+
e = s + 1;
|
|
483
498
|
else if (r > n)
|
|
484
|
-
o =
|
|
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, r =
|
|
510
|
+
const n = e.length - 1, r = kt(0, n, (l) => e[l].start, t);
|
|
496
511
|
let i = r;
|
|
497
512
|
for (; i < n && e[i].end < t + o; )
|
|
498
513
|
i++;
|
|
499
514
|
return { startIndex: r, endIndex: i };
|
|
500
515
|
}
|
|
501
|
-
function
|
|
502
|
-
const o = new
|
|
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
|
-
...
|
|
530
|
+
...s,
|
|
516
531
|
onChange: (r, i) => {
|
|
517
|
-
var
|
|
518
|
-
|
|
532
|
+
var l;
|
|
533
|
+
ut(t), (l = s.onChange) == null || l.call(s, r, i);
|
|
519
534
|
}
|
|
520
|
-
}), o._willUpdate(),
|
|
535
|
+
}), o._willUpdate(), ut(t);
|
|
521
536
|
},
|
|
522
537
|
{
|
|
523
538
|
immediate: !0
|
|
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,61 +575,61 @@ 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,
|
|
583
|
+
}, style(t, n, s) {
|
|
569
584
|
let r = t.style.getPropertyValue(n);
|
|
570
|
-
return Object.assign(t.style, { [n]:
|
|
585
|
+
return Object.assign(t.style, { [n]: s }), this.add(() => {
|
|
571
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 =
|
|
588
|
-
return
|
|
601
|
+
function Qn() {
|
|
602
|
+
let e = De();
|
|
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
|
}
|
|
619
634
|
set(o) {
|
|
620
635
|
this.current !== o && (this.currentId = 0, this.current = o);
|
|
@@ -634,183 +649,183 @@ let eo = class {
|
|
|
634
649
|
detect() {
|
|
635
650
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
636
651
|
}
|
|
637
|
-
}, lt = new
|
|
638
|
-
function
|
|
652
|
+
}, lt = new so();
|
|
653
|
+
function rt(e) {
|
|
639
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
|
-
let
|
|
648
|
-
var
|
|
649
|
-
function
|
|
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(",");
|
|
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 =
|
|
652
|
-
return e.matches(
|
|
666
|
+
return e === ((t = rt(e)) == null ? void 0 : t.body) ? !1 : se(o, { 0() {
|
|
667
|
+
return e.matches(vt);
|
|
653
668
|
}, 1() {
|
|
654
669
|
let n = e;
|
|
655
670
|
for (; n !== null; ) {
|
|
656
|
-
if (n.matches(
|
|
671
|
+
if (n.matches(vt)) return !0;
|
|
657
672
|
n = n.parentElement;
|
|
658
673
|
}
|
|
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 i =
|
|
685
|
+
let s = o(t), r = o(n);
|
|
686
|
+
if (s === null || r === null) return 0;
|
|
687
|
+
let i = s.compareDocumentPosition(r);
|
|
673
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
|
|
700
|
+
function Re(e, o, t) {
|
|
686
701
|
lt.isServer || ie((n) => {
|
|
687
702
|
document.addEventListener(e, o, t), n(() => document.removeEventListener(e, o, t));
|
|
688
703
|
});
|
|
689
704
|
}
|
|
690
|
-
function
|
|
705
|
+
function vo(e, o, t) {
|
|
691
706
|
lt.isServer || ie((n) => {
|
|
692
707
|
window.addEventListener(e, o, t), n(() => window.removeEventListener(e, o, t));
|
|
693
708
|
});
|
|
694
709
|
}
|
|
695
|
-
function
|
|
710
|
+
function ho(e, o, t = S(() => !0)) {
|
|
696
711
|
function n(r, i) {
|
|
697
712
|
if (!t.value || r.defaultPrevented) return;
|
|
698
|
-
let
|
|
699
|
-
if (
|
|
700
|
-
let a = function u(
|
|
701
|
-
return typeof
|
|
713
|
+
let l = i(r);
|
|
714
|
+
if (l === null || !l.getRootNode().contains(l)) return;
|
|
715
|
+
let a = function u(c) {
|
|
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
|
|
706
|
-
if (
|
|
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 i,
|
|
713
|
-
t.value && (
|
|
714
|
-
}, !0),
|
|
715
|
-
var i,
|
|
716
|
-
t.value && (
|
|
717
|
-
}, !0),
|
|
718
|
-
|
|
719
|
-
}, !0),
|
|
720
|
-
}
|
|
721
|
-
function
|
|
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);
|
|
735
|
+
}
|
|
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
|
|
727
|
-
let t = E(
|
|
728
|
-
return
|
|
729
|
-
t.value =
|
|
741
|
+
function mo(e, o) {
|
|
742
|
+
let t = E(ht(e.value.type, e.value.as));
|
|
743
|
+
return Ce(() => {
|
|
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
|
-
function
|
|
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
|
-
let t =
|
|
756
|
+
let t = mt(o);
|
|
742
757
|
return e.value[0] === t[0] && e.value[1] === t[1] ? !1 : (e.value = t, !0);
|
|
743
758
|
}, update(o) {
|
|
744
|
-
e.value =
|
|
759
|
+
e.value = mt(o);
|
|
745
760
|
} };
|
|
746
761
|
}
|
|
747
|
-
function
|
|
762
|
+
function bo({ container: e, accept: o, walk: t, enabled: n }) {
|
|
748
763
|
ie(() => {
|
|
749
|
-
let
|
|
750
|
-
if (!
|
|
751
|
-
let r =
|
|
764
|
+
let s = e.value;
|
|
765
|
+
if (!s || n !== void 0 && !n.value) return;
|
|
766
|
+
let r = rt(e);
|
|
752
767
|
if (!r) return;
|
|
753
|
-
let i = Object.assign((a) => o(a), { acceptNode: o }),
|
|
754
|
-
for (;
|
|
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, ...
|
|
772
|
+
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}), _o = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(_o || {});
|
|
773
|
+
function pe({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...s }) {
|
|
759
774
|
var r;
|
|
760
|
-
let i =
|
|
761
|
-
if (e || o & 2 && i.static) return
|
|
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
778
|
let a = (r = i.unmount) == null || r ? 0 : 1;
|
|
764
|
-
return
|
|
779
|
+
return se(a, { 0() {
|
|
765
780
|
return null;
|
|
766
781
|
}, 1() {
|
|
767
|
-
return
|
|
782
|
+
return Je({ ...s, props: { ...i, hidden: !0, style: { display: "none" } } });
|
|
768
783
|
} });
|
|
769
784
|
}
|
|
770
|
-
return
|
|
785
|
+
return Je(l);
|
|
771
786
|
}
|
|
772
|
-
function
|
|
787
|
+
function Je({ props: e, attrs: o, slots: t, slot: n, name: s }) {
|
|
773
788
|
var r, i;
|
|
774
|
-
let { as:
|
|
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 && (
|
|
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, _ = [];
|
|
792
|
+
for (let [C, h] of Object.entries(n)) typeof h == "boolean" && (p = !0), h === !0 && _.push(C);
|
|
793
|
+
p && (c["data-headlessui-state"] = _.join(" "));
|
|
794
|
+
}
|
|
795
|
+
if (l === "template") {
|
|
796
|
+
if (u = Dt(u ?? []), Object.keys(a).length > 0 || Object.keys(o).length > 0) {
|
|
797
|
+
let [p, ..._] = u ?? [];
|
|
798
|
+
if (!Co(p) || _.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 C = At((i = p.props) != null ? i : {}, a, c), h = $t(p, C, !0);
|
|
803
|
+
for (let v in C) v.startsWith("on") && (h.props || (h.props = {}), h.props[v] = C[v]);
|
|
804
|
+
return h;
|
|
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
|
-
function
|
|
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](
|
|
819
|
+
for (let n in t) Object.assign(o, { [n](s, ...r) {
|
|
805
820
|
let i = t[n];
|
|
806
|
-
for (let
|
|
807
|
-
if (
|
|
808
|
-
s
|
|
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 xo(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,58 +835,58 @@ 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:
|
|
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" } } };
|
|
831
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
|
-
|
|
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
|
-
function
|
|
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
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 r =
|
|
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 r =
|
|
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: {
|
|
@@ -885,231 +900,231 @@ function mt(e, o) {
|
|
|
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
|
|
939
|
+
return R(t.optionsRef);
|
|
925
940
|
}, overscan: 12 }))), r = S(() => {
|
|
926
|
-
var
|
|
927
|
-
return (
|
|
941
|
+
var l;
|
|
942
|
+
return (l = t.virtual.value) == null ? void 0 : l.options;
|
|
928
943
|
}), i = E(0);
|
|
929
944
|
return F([r], () => {
|
|
930
945
|
i.value += 1;
|
|
931
|
-
}),
|
|
932
|
-
if (
|
|
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
|
|
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), _ = E(2), C = E(!1);
|
|
954
|
+
function h(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, m = null;
|
|
959
|
+
function P(d) {
|
|
960
|
+
return se(v.value, { 0() {
|
|
961
|
+
return I == null ? void 0 : I(d);
|
|
947
962
|
}, 1: () => {
|
|
948
|
-
let
|
|
949
|
-
return 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 x = S(() => {
|
|
953
968
|
});
|
|
954
|
-
F([
|
|
955
|
-
if (
|
|
956
|
-
let y =
|
|
969
|
+
F([x], ([d], [f]) => {
|
|
970
|
+
if (b.virtual.value && d && f && p.value !== null) {
|
|
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
|
-
return (
|
|
978
|
+
return (d == null ? void 0 : d[y]) === (f == null ? void 0 : f[y]);
|
|
964
979
|
}
|
|
965
|
-
return e.by === null ?
|
|
966
|
-
}, calculateIndex(
|
|
967
|
-
return
|
|
968
|
-
}, defaultValue: S(() => e.defaultValue), nullable:
|
|
969
|
-
|
|
980
|
+
return e.by === null ? $o(d, f) : e.by(d, f);
|
|
981
|
+
}, calculateIndex(d) {
|
|
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
|
|
986
|
+
if (C.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
|
-
if (
|
|
992
|
+
if (f !== -1) return f;
|
|
978
993
|
}
|
|
979
|
-
let
|
|
980
|
-
if (
|
|
994
|
+
let d = c.value.findIndex((f) => !f.dataRef.disabled);
|
|
995
|
+
if (d !== -1) return d;
|
|
981
996
|
}
|
|
982
997
|
return p.value;
|
|
983
|
-
}), activationTrigger:
|
|
984
|
-
|
|
998
|
+
}), activationTrigger: _, optionsPropsRef: u, closeCombobox() {
|
|
999
|
+
C.value = !1, !e.disabled && s.value !== 1 && (s.value = 1, p.value = null);
|
|
985
1000
|
}, openCombobox() {
|
|
986
|
-
if (
|
|
987
|
-
if (
|
|
988
|
-
let
|
|
989
|
-
|
|
1001
|
+
if (C.value = !0, !e.disabled && s.value !== 0) {
|
|
1002
|
+
if (b.value.value) {
|
|
1003
|
+
let d = b.calculateIndex(b.value.value);
|
|
1004
|
+
d !== -1 && (p.value = d);
|
|
990
1005
|
}
|
|
991
|
-
|
|
1006
|
+
s.value = 0;
|
|
992
1007
|
}
|
|
993
|
-
}, setActivationTrigger(
|
|
994
|
-
|
|
995
|
-
}, goToOption(
|
|
996
|
-
|
|
997
|
-
if (e.disabled || a.value && !u.value.static &&
|
|
998
|
-
if (
|
|
999
|
-
p.value =
|
|
1000
|
-
var
|
|
1001
|
-
return (G = (
|
|
1008
|
+
}, setActivationTrigger(d) {
|
|
1009
|
+
_.value = d;
|
|
1010
|
+
}, goToOption(d, f, y) {
|
|
1011
|
+
C.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: () => {
|
|
1015
|
+
var A, G;
|
|
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: (
|
|
1020
|
+
}, resolveDisabled: (A) => b.virtual.value.disabled(A), resolveId() {
|
|
1006
1021
|
throw new Error("Function not implemented.");
|
|
1007
|
-
} }),
|
|
1022
|
+
} }), _.value = y ?? 2;
|
|
1008
1023
|
return;
|
|
1009
1024
|
}
|
|
1010
|
-
let O =
|
|
1025
|
+
let O = h();
|
|
1011
1026
|
if (O.activeOptionIndex === null) {
|
|
1012
|
-
let
|
|
1013
|
-
|
|
1027
|
+
let A = O.options.findIndex((G) => !G.dataRef.disabled);
|
|
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, _.value = y ?? 2, c.value = O.options;
|
|
1017
1032
|
});
|
|
1018
|
-
}, selectOption(
|
|
1019
|
-
let
|
|
1020
|
-
if (!
|
|
1021
|
-
let { dataRef: y } =
|
|
1022
|
-
|
|
1033
|
+
}, selectOption(d) {
|
|
1034
|
+
let f = c.value.find((O) => O.id === d);
|
|
1035
|
+
if (!f) return;
|
|
1036
|
+
let { dataRef: y } = f;
|
|
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:
|
|
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
|
-
}, registerOption(
|
|
1033
|
-
let y =
|
|
1034
|
-
if (
|
|
1035
|
-
|
|
1047
|
+
}, registerOption(d, f) {
|
|
1048
|
+
let y = Tt({ id: d, dataRef: f });
|
|
1049
|
+
if (b.virtual.value) {
|
|
1050
|
+
c.value.push(y);
|
|
1036
1051
|
return;
|
|
1037
1052
|
}
|
|
1038
|
-
|
|
1039
|
-
let O =
|
|
1040
|
-
p.value === null &&
|
|
1041
|
-
let
|
|
1042
|
-
|
|
1053
|
+
m && cancelAnimationFrame(m);
|
|
1054
|
+
let O = h((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, _.value = 2, O.options.some((M) => !R(M.dataRef.domRef)) && (m = requestAnimationFrame(() => {
|
|
1056
|
+
let M = h();
|
|
1057
|
+
c.value = M.options, p.value = M.activeOptionIndex;
|
|
1043
1058
|
}));
|
|
1044
|
-
}, unregisterOption(
|
|
1045
|
-
if (D !== null && cancelAnimationFrame(D),
|
|
1046
|
-
|
|
1059
|
+
}, unregisterOption(d, f) {
|
|
1060
|
+
if (D !== null && cancelAnimationFrame(D), f && (C.value = !0), b.virtual.value) {
|
|
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 = h((O) => {
|
|
1065
|
+
let M = O.findIndex((A) => A.id === d);
|
|
1066
|
+
return M !== -1 && O.splice(M, 1), O;
|
|
1052
1067
|
});
|
|
1053
|
-
|
|
1054
|
-
}, isSelected(
|
|
1055
|
-
return
|
|
1056
|
-
}, isActive(
|
|
1057
|
-
return p.value ===
|
|
1068
|
+
c.value = y.options, p.value = y.activeOptionIndex, _.value = 2;
|
|
1069
|
+
}, isSelected(d) {
|
|
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))) });
|
|
1071
|
+
}, isActive(d) {
|
|
1072
|
+
return p.value === b.calculateIndex(d);
|
|
1058
1073
|
} };
|
|
1059
|
-
|
|
1060
|
-
let
|
|
1061
|
-
var
|
|
1062
|
-
return (
|
|
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(() => {
|
|
1076
|
+
var d;
|
|
1077
|
+
return (d = R(i)) == null ? void 0 : d.closest("form");
|
|
1063
1078
|
});
|
|
1064
|
-
return
|
|
1065
|
-
F([
|
|
1066
|
-
if (!
|
|
1067
|
-
function
|
|
1068
|
-
|
|
1079
|
+
return Ce(() => {
|
|
1080
|
+
F([L], () => {
|
|
1081
|
+
if (!L.value || e.defaultValue === void 0) return;
|
|
1082
|
+
function d() {
|
|
1083
|
+
b.change(e.defaultValue);
|
|
1069
1084
|
}
|
|
1070
|
-
return
|
|
1071
|
-
var
|
|
1072
|
-
(
|
|
1085
|
+
return L.value.addEventListener("reset", d), () => {
|
|
1086
|
+
var f;
|
|
1087
|
+
(f = L.value) == null || f.removeEventListener("reset", d);
|
|
1073
1088
|
};
|
|
1074
1089
|
}, { immediate: !0 });
|
|
1075
1090
|
}), () => {
|
|
1076
|
-
var
|
|
1077
|
-
let { name: O, disabled:
|
|
1078
|
-
return Ee(Z, [...O != null &&
|
|
1091
|
+
var d, f, y;
|
|
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, xo({ 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
|
|
1098
|
+
let s = (n = e.id) != null ? n : `headlessui-combobox-label-${Le()}`, r = ve("ComboboxLabel");
|
|
1084
1099
|
function i() {
|
|
1085
|
-
var
|
|
1086
|
-
(
|
|
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 r = (
|
|
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");
|
|
1096
1111
|
n({ el: i.buttonRef, $el: i.buttonRef });
|
|
1097
|
-
function
|
|
1098
|
-
i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (
|
|
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
|
-
function a(
|
|
1104
|
-
switch (
|
|
1118
|
+
function a(c) {
|
|
1119
|
+
switch (c.key) {
|
|
1105
1120
|
case W.ArrowDown:
|
|
1106
|
-
|
|
1121
|
+
c.preventDefault(), c.stopPropagation(), i.comboboxState.value === 1 && i.openCombobox(), Q(() => {
|
|
1107
1122
|
var p;
|
|
1108
1123
|
return (p = i.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1109
1124
|
});
|
|
1110
1125
|
return;
|
|
1111
1126
|
case W.ArrowUp:
|
|
1112
|
-
|
|
1127
|
+
c.preventDefault(), c.stopPropagation(), i.comboboxState.value === 1 && (i.openCombobox(), Q(() => {
|
|
1113
1128
|
i.value.value || i.goToOption(z.Last);
|
|
1114
1129
|
})), Q(() => {
|
|
1115
1130
|
var p;
|
|
@@ -1118,136 +1133,136 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1118
1133
|
return;
|
|
1119
1134
|
case W.Escape:
|
|
1120
1135
|
if (i.comboboxState.value !== 0) return;
|
|
1121
|
-
|
|
1136
|
+
c.preventDefault(), i.optionsRef.value && !i.optionsPropsRef.value.static && c.stopPropagation(), i.closeCombobox(), Q(() => {
|
|
1122
1137
|
var p;
|
|
1123
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
|
-
var
|
|
1131
|
-
let
|
|
1132
|
-
return pe({ ourProps:
|
|
1145
|
+
var c, p;
|
|
1146
|
+
let _ = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...C } = e, h = { 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: h, theirProps: C, slot: _, attrs: o, slots: t, name: "ComboboxButton" });
|
|
1133
1148
|
};
|
|
1134
|
-
} }),
|
|
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 }) {
|
|
1135
1150
|
var r;
|
|
1136
|
-
let i = (r = e.id) != null ? r : `headlessui-combobox-input-${Le()}`,
|
|
1137
|
-
|
|
1138
|
-
function
|
|
1139
|
-
|
|
1140
|
-
let
|
|
1141
|
-
|
|
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 });
|
|
1153
|
+
function c() {
|
|
1154
|
+
l.change(null);
|
|
1155
|
+
let m = R(l.optionsRef);
|
|
1156
|
+
m && (m.scrollTop = 0), l.goToOption(z.Nothing);
|
|
1142
1157
|
}
|
|
1143
1158
|
let p = S(() => {
|
|
1144
|
-
var
|
|
1145
|
-
let
|
|
1146
|
-
return
|
|
1159
|
+
var m;
|
|
1160
|
+
let P = l.value.value;
|
|
1161
|
+
return R(l.inputRef) ? typeof e.displayValue < "u" && P !== void 0 ? (m = e.displayValue(P)) != null ? m : "" : typeof P == "string" ? P : "" : "";
|
|
1147
1162
|
});
|
|
1148
|
-
|
|
1149
|
-
F([p,
|
|
1163
|
+
Ce(() => {
|
|
1164
|
+
F([p, l.comboboxState, a], ([m, P], [x, b]) => {
|
|
1150
1165
|
if (u.value) return;
|
|
1151
|
-
let
|
|
1152
|
-
|
|
1153
|
-
var
|
|
1154
|
-
if (u.value || !
|
|
1155
|
-
let { selectionStart:
|
|
1156
|
-
Math.abs((y ?? 0) - (
|
|
1166
|
+
let L = R(l.inputRef);
|
|
1167
|
+
L && ((b === 0 && P === 1 || m !== x) && (L.value = m), requestAnimationFrame(() => {
|
|
1168
|
+
var d;
|
|
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], ([m], [P]) => {
|
|
1174
|
+
if (m === 0 && P === 1) {
|
|
1160
1175
|
if (u.value) return;
|
|
1161
|
-
let
|
|
1162
|
-
if (!
|
|
1163
|
-
let
|
|
1164
|
-
|
|
1176
|
+
let x = R(l.inputRef);
|
|
1177
|
+
if (!x) return;
|
|
1178
|
+
let b = x.value, { selectionStart: L, selectionEnd: d, selectionDirection: f } = x;
|
|
1179
|
+
x.value = "", x.value = b, f !== null ? x.setSelectionRange(L, d, f) : x.setSelectionRange(L, d);
|
|
1165
1180
|
}
|
|
1166
1181
|
});
|
|
1167
1182
|
});
|
|
1168
|
-
let
|
|
1169
|
-
function
|
|
1170
|
-
|
|
1183
|
+
let _ = E(!1);
|
|
1184
|
+
function C() {
|
|
1185
|
+
_.value = !0;
|
|
1171
1186
|
}
|
|
1172
|
-
function
|
|
1173
|
-
|
|
1174
|
-
|
|
1187
|
+
function h() {
|
|
1188
|
+
De().nextFrame(() => {
|
|
1189
|
+
_.value = !1;
|
|
1175
1190
|
});
|
|
1176
1191
|
}
|
|
1177
|
-
let
|
|
1178
|
-
function
|
|
1179
|
-
switch (u.value = !0,
|
|
1192
|
+
let v = Xn();
|
|
1193
|
+
function T(m) {
|
|
1194
|
+
switch (u.value = !0, v(() => {
|
|
1180
1195
|
u.value = !1;
|
|
1181
|
-
}),
|
|
1196
|
+
}), m.key) {
|
|
1182
1197
|
case W.Enter:
|
|
1183
|
-
if (u.value = !1,
|
|
1184
|
-
if (
|
|
1185
|
-
|
|
1198
|
+
if (u.value = !1, l.comboboxState.value !== 0 || _.value) return;
|
|
1199
|
+
if (m.preventDefault(), m.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, m.preventDefault(), m.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, m.preventDefault(), m.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 (m.shiftKey) break;
|
|
1215
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), l.goToOption(z.First);
|
|
1201
1216
|
case W.PageUp:
|
|
1202
|
-
return u.value = !1,
|
|
1217
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), l.goToOption(z.First);
|
|
1203
1218
|
case W.End:
|
|
1204
|
-
if (
|
|
1205
|
-
return u.value = !1,
|
|
1219
|
+
if (m.shiftKey) break;
|
|
1220
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), l.goToOption(z.Last);
|
|
1206
1221
|
case W.PageDown:
|
|
1207
|
-
return u.value = !1,
|
|
1222
|
+
return u.value = !1, m.preventDefault(), m.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
|
+
m.preventDefault(), l.optionsRef.value && !l.optionsPropsRef.value.static && m.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
|
|
1219
|
-
o("change",
|
|
1233
|
+
function N(m) {
|
|
1234
|
+
o("change", m), l.nullable.value && l.mode.value === 0 && m.target.value === "" && c(), l.openCombobox();
|
|
1220
1235
|
}
|
|
1221
|
-
function
|
|
1222
|
-
var
|
|
1223
|
-
let
|
|
1224
|
-
if (u.value = !1, !((
|
|
1236
|
+
function I(m) {
|
|
1237
|
+
var P, x, b;
|
|
1238
|
+
let L = (P = m.relatedTarget) != null ? P : ce.find((d) => d !== m.currentTarget);
|
|
1239
|
+
if (u.value = !1, !((x = R(l.optionsRef)) != null && x.contains(L)) && !((b = R(l.buttonRef)) != null && b.contains(L)) && l.comboboxState.value === 0) return m.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(m) {
|
|
1242
|
+
var P, x, b;
|
|
1243
|
+
let L = (P = m.relatedTarget) != null ? P : ce.find((d) => d !== m.currentTarget);
|
|
1244
|
+
(x = R(l.buttonRef)) != null && x.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 m, P, x, b;
|
|
1250
|
+
return (b = (x = (P = e.defaultValue) != null ? P : l.defaultValue.value !== void 0 ? (m = e.displayValue) == null ? void 0 : m.call(e, l.defaultValue.value) : null) != null ? x : l.defaultValue.value) != null ? b : "";
|
|
1236
1251
|
});
|
|
1237
1252
|
return () => {
|
|
1238
|
-
var
|
|
1239
|
-
let y = { open:
|
|
1240
|
-
return pe({ ourProps: G, theirProps:
|
|
1253
|
+
var m, P, x, b, L, d, f;
|
|
1254
|
+
let y = { open: l.comboboxState.value === 0 }, { displayValue: O, onChange: M, ...A } = e, G = { "aria-controls": (m = l.optionsRef.value) == null ? void 0 : m.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 : (x = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : x.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: C, onCompositionend: h, 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 };
|
|
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
|
-
|
|
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;
|
|
1246
1261
|
}), ie(() => {
|
|
1247
|
-
|
|
1262
|
+
s.optionsPropsRef.value.hold = e.hold;
|
|
1248
1263
|
});
|
|
1249
|
-
let i =
|
|
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");
|
|
@@ -1256,58 +1271,58 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1256
1271
|
u.preventDefault();
|
|
1257
1272
|
}
|
|
1258
1273
|
return () => {
|
|
1259
|
-
var u,
|
|
1260
|
-
let
|
|
1261
|
-
return pe({ ourProps:
|
|
1274
|
+
var u, c, p;
|
|
1275
|
+
let _ = { open: s.comboboxState.value === 0 }, C = { "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 }, h = je(e, ["hold"]);
|
|
1276
|
+
return pe({ ourProps: C, theirProps: h, slot: _, 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
|
|
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);
|
|
1265
1280
|
n({ el: i, $el: i });
|
|
1266
1281
|
let a = S(() => {
|
|
1267
|
-
var
|
|
1268
|
-
return
|
|
1269
|
-
}), u = S(() =>
|
|
1270
|
-
|
|
1271
|
-
let
|
|
1272
|
-
|
|
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));
|
|
1273
1288
|
}), ie(() => {
|
|
1274
|
-
|
|
1275
|
-
var
|
|
1276
|
-
return (
|
|
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
|
|
1302
|
-
var
|
|
1303
|
-
|
|
1294
|
+
function _(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 C() {
|
|
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 h = go();
|
|
1307
|
+
function v(I) {
|
|
1308
|
+
h.update(I);
|
|
1309
|
+
}
|
|
1310
|
+
function T(I) {
|
|
1311
|
+
var k;
|
|
1312
|
+
if (!h.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
|
+
h.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: _, onFocus: C, onPointerenter: v, onMouseenter: v, onPointermove: T, onMousemove: T, onPointerleave: N, onMouseleave: N }, m = je(e, ["order", "value"]);
|
|
1322
|
+
return pe({ ourProps: D, theirProps: m, 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
|
+
g("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
|
+
g("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,154 +1360,53 @@ function Ro(e, o) {
|
|
|
1345
1360
|
"aria-hidden": "true",
|
|
1346
1361
|
"data-slot": "icon"
|
|
1347
1362
|
}, [
|
|
1348
|
-
|
|
1363
|
+
g("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
|
-
|
|
1356
|
-
|
|
1357
|
-
props: /* @__PURE__ */ pn({
|
|
1358
|
-
languages: {
|
|
1359
|
-
type: Object,
|
|
1360
|
-
required: !0
|
|
1361
|
-
}
|
|
1362
|
-
}, {
|
|
1363
|
-
modelValue: {},
|
|
1364
|
-
modelModifiers: {}
|
|
1365
|
-
}),
|
|
1366
|
-
emits: ["update:modelValue"],
|
|
1367
|
-
setup(e) {
|
|
1368
|
-
const o = e, t = vn(e, "modelValue"), n = E(""), l = E(null), r = S(() => Object.entries(o.languages).filter(
|
|
1369
|
-
([, s]) => s.toLowerCase().includes(n.value.toLowerCase())
|
|
1370
|
-
)), i = (s) => {
|
|
1371
|
-
s.target.value = "", n.value = "", l.value && l.value.$el.click();
|
|
1372
|
-
};
|
|
1373
|
-
return (s, a) => (w(), ee(M(To), {
|
|
1374
|
-
modelValue: t.value,
|
|
1375
|
-
"onUpdate:modelValue": a[3] || (a[3] = (u) => t.value = u),
|
|
1376
|
-
as: "div",
|
|
1377
|
-
class: "relative mt-1"
|
|
1378
|
-
}, {
|
|
1379
|
-
default: Pe(() => [
|
|
1380
|
-
H(M(Lo), {
|
|
1381
|
-
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",
|
|
1382
|
-
onChange: a[0] || (a[0] = (u) => n.value = u.target.value),
|
|
1383
|
-
displayValue: (u) => e.languages[u],
|
|
1384
|
-
onFocus: a[1] || (a[1] = (u) => i(u))
|
|
1385
|
-
}, null, 8, ["displayValue"]),
|
|
1386
|
-
H(M(Io), {
|
|
1387
|
-
ref_key: "btnSelect",
|
|
1388
|
-
ref: l,
|
|
1389
|
-
class: "absolute inset-y-0 right-0 flex items-center pr-2"
|
|
1390
|
-
}, {
|
|
1391
|
-
default: Pe(() => [
|
|
1392
|
-
H(M(Mo), {
|
|
1393
|
-
class: "h-5 w-5 text-gray-400",
|
|
1394
|
-
"aria-hidden": "true",
|
|
1395
|
-
onClick: a[2] || (a[2] = (u) => i(u))
|
|
1396
|
-
})
|
|
1397
|
-
]),
|
|
1398
|
-
_: 1
|
|
1399
|
-
}, 512),
|
|
1400
|
-
H(M(Po), { 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" }, {
|
|
1401
|
-
default: Pe(() => [
|
|
1402
|
-
(w(!0), $(Z, null, se(r.value, ([u, f]) => (w(), ee(M(Vo), {
|
|
1403
|
-
key: u,
|
|
1404
|
-
value: u
|
|
1405
|
-
}, {
|
|
1406
|
-
default: Pe(({ active: p, selected: m }) => [
|
|
1407
|
-
C("li", {
|
|
1408
|
-
class: Ce([
|
|
1409
|
-
"relative cursor-default select-none py-2 pl-3 pr-9",
|
|
1410
|
-
p ? "bg-[#3B5695] text-white" : "text-textCustom"
|
|
1411
|
-
])
|
|
1412
|
-
}, [
|
|
1413
|
-
C("span", {
|
|
1414
|
-
class: Ce(["block truncate", m && "font-semibold"])
|
|
1415
|
-
}, te(f), 3)
|
|
1416
|
-
], 2)
|
|
1417
|
-
]),
|
|
1418
|
-
_: 2
|
|
1419
|
-
}, 1032, ["value"]))), 128))
|
|
1420
|
-
]),
|
|
1421
|
-
_: 1
|
|
1422
|
-
})
|
|
1423
|
-
]),
|
|
1424
|
-
_: 1
|
|
1425
|
-
}, 8, ["modelValue"]));
|
|
1426
|
-
}
|
|
1427
|
-
}, Zt = "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", No = { key: 0 }, Ao = /* @__PURE__ */ C("img", {
|
|
1428
|
-
src: Zt,
|
|
1429
|
-
alt: "swap",
|
|
1430
|
-
class: "w-4"
|
|
1431
|
-
}, null, -1), Do = [
|
|
1432
|
-
Ao
|
|
1433
|
-
], Fo = /* @__PURE__ */ C("img", {
|
|
1434
|
-
src: Zt,
|
|
1435
|
-
alt: "swap",
|
|
1436
|
-
class: "w-4"
|
|
1437
|
-
}, null, -1), jo = [
|
|
1438
|
-
Fo
|
|
1439
|
-
], Bo = {
|
|
1440
|
-
__name: "SwapBtn",
|
|
1441
|
-
props: {
|
|
1442
|
-
isBidirect: {
|
|
1443
|
-
type: Boolean,
|
|
1444
|
-
default: !1
|
|
1445
|
-
}
|
|
1446
|
-
},
|
|
1447
|
-
emits: ["swap"],
|
|
1448
|
-
setup(e, { emit: o }) {
|
|
1449
|
-
const t = o;
|
|
1450
|
-
return (n, l) => e.isBidirect ? (w(), $("button", {
|
|
1451
|
-
key: 1,
|
|
1452
|
-
onClick: l[0] || (l[0] = (r) => t("swap"))
|
|
1453
|
-
}, jo)) : (w(), $("button", No, Do));
|
|
1454
|
-
}
|
|
1455
|
-
};
|
|
1456
|
-
var Wt = !1;
|
|
1457
|
-
function ke(e, o, t) {
|
|
1370
|
+
var Gt = !1;
|
|
1371
|
+
function Ve(e, o, t) {
|
|
1458
1372
|
return Array.isArray(e) ? (e.length = Math.max(e.length, o), e.splice(o, 1, t), t) : (e[o] = t, t);
|
|
1459
1373
|
}
|
|
1460
|
-
function
|
|
1374
|
+
function Ke(e, o) {
|
|
1461
1375
|
if (Array.isArray(e)) {
|
|
1462
1376
|
e.splice(o, 1);
|
|
1463
1377
|
return;
|
|
1464
1378
|
}
|
|
1465
1379
|
delete e[o];
|
|
1466
1380
|
}
|
|
1467
|
-
function
|
|
1468
|
-
return
|
|
1381
|
+
function jo() {
|
|
1382
|
+
return qt().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
1469
1383
|
}
|
|
1470
|
-
function
|
|
1384
|
+
function qt() {
|
|
1471
1385
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
1472
1386
|
}
|
|
1473
|
-
const
|
|
1474
|
-
let me,
|
|
1475
|
-
function
|
|
1387
|
+
const Bo = typeof Proxy == "function", Ho = "devtools-plugin:setup", zo = "plugin:settings:set";
|
|
1388
|
+
let me, Ye;
|
|
1389
|
+
function Uo() {
|
|
1476
1390
|
var e;
|
|
1477
|
-
return me !== void 0 || (typeof window < "u" && window.performance ? (me = !0,
|
|
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;
|
|
1478
1392
|
}
|
|
1479
|
-
function
|
|
1480
|
-
return
|
|
1393
|
+
function Zo() {
|
|
1394
|
+
return Uo() ? Ye.now() : Date.now();
|
|
1481
1395
|
}
|
|
1482
|
-
class
|
|
1396
|
+
class Wo {
|
|
1483
1397
|
constructor(o, t) {
|
|
1484
1398
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = o, this.hook = t;
|
|
1485
1399
|
const n = {};
|
|
1486
1400
|
if (o.settings)
|
|
1487
1401
|
for (const i in o.settings) {
|
|
1488
|
-
const
|
|
1489
|
-
n[i] =
|
|
1402
|
+
const l = o.settings[i];
|
|
1403
|
+
n[i] = l.defaultValue;
|
|
1490
1404
|
}
|
|
1491
|
-
const
|
|
1405
|
+
const s = `__vue-devtools-plugin-settings__${o.id}`;
|
|
1492
1406
|
let r = Object.assign({}, n);
|
|
1493
1407
|
try {
|
|
1494
|
-
const i = localStorage.getItem(
|
|
1495
|
-
Object.assign(r,
|
|
1408
|
+
const i = localStorage.getItem(s), l = JSON.parse(i);
|
|
1409
|
+
Object.assign(r, l);
|
|
1496
1410
|
} catch {
|
|
1497
1411
|
}
|
|
1498
1412
|
this.fallbacks = {
|
|
@@ -1501,32 +1415,32 @@ class qo {
|
|
|
1501
1415
|
},
|
|
1502
1416
|
setSettings(i) {
|
|
1503
1417
|
try {
|
|
1504
|
-
localStorage.setItem(
|
|
1418
|
+
localStorage.setItem(s, JSON.stringify(i));
|
|
1505
1419
|
} catch {
|
|
1506
1420
|
}
|
|
1507
1421
|
r = i;
|
|
1508
1422
|
},
|
|
1509
1423
|
now() {
|
|
1510
|
-
return
|
|
1424
|
+
return Zo();
|
|
1511
1425
|
}
|
|
1512
|
-
}, t && t.on(
|
|
1513
|
-
i === this.plugin.id && this.fallbacks.setSettings(
|
|
1426
|
+
}, t && t.on(zo, (i, l) => {
|
|
1427
|
+
i === this.plugin.id && this.fallbacks.setSettings(l);
|
|
1514
1428
|
}), this.proxiedOn = new Proxy({}, {
|
|
1515
|
-
get: (i,
|
|
1429
|
+
get: (i, l) => this.target ? this.target.on[l] : (...a) => {
|
|
1516
1430
|
this.onQueue.push({
|
|
1517
|
-
method:
|
|
1431
|
+
method: l,
|
|
1518
1432
|
args: a
|
|
1519
1433
|
});
|
|
1520
1434
|
}
|
|
1521
1435
|
}), this.proxiedTarget = new Proxy({}, {
|
|
1522
|
-
get: (i,
|
|
1523
|
-
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,
|
|
1524
1438
|
args: a,
|
|
1525
1439
|
resolve: () => {
|
|
1526
1440
|
}
|
|
1527
|
-
}), this.fallbacks[
|
|
1441
|
+
}), this.fallbacks[l](...a)) : (...a) => new Promise((u) => {
|
|
1528
1442
|
this.targetQueue.push({
|
|
1529
|
-
method:
|
|
1443
|
+
method: l,
|
|
1530
1444
|
args: a,
|
|
1531
1445
|
resolve: u
|
|
1532
1446
|
});
|
|
@@ -1541,12 +1455,12 @@ class qo {
|
|
|
1541
1455
|
t.resolve(await this.target[t.method](...t.args));
|
|
1542
1456
|
}
|
|
1543
1457
|
}
|
|
1544
|
-
function
|
|
1545
|
-
const t = e, n =
|
|
1546
|
-
if (
|
|
1547
|
-
|
|
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);
|
|
1548
1462
|
else {
|
|
1549
|
-
const i = r ? new
|
|
1463
|
+
const i = r ? new Wo(t, s) : null;
|
|
1550
1464
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
1551
1465
|
pluginDescriptor: t,
|
|
1552
1466
|
setupFn: o,
|
|
@@ -1560,7 +1474,7 @@ function qt(e, o) {
|
|
|
1560
1474
|
* @license MIT
|
|
1561
1475
|
*/
|
|
1562
1476
|
let we;
|
|
1563
|
-
const Te = (e) => we = e,
|
|
1477
|
+
const Te = (e) => we = e, Kt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
1564
1478
|
/* istanbul ignore next */
|
|
1565
1479
|
Symbol()
|
|
1566
1480
|
);
|
|
@@ -1572,18 +1486,18 @@ var ne;
|
|
|
1572
1486
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
1573
1487
|
})(ne || (ne = {}));
|
|
1574
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 };
|
|
1575
|
-
function
|
|
1489
|
+
function Go(e, { autoBom: o = !1 } = {}) {
|
|
1576
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;
|
|
1577
1491
|
}
|
|
1578
|
-
function
|
|
1492
|
+
function it(e, o, t) {
|
|
1579
1493
|
const n = new XMLHttpRequest();
|
|
1580
1494
|
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
1581
|
-
|
|
1495
|
+
Xt(n.response, o, t);
|
|
1582
1496
|
}, n.onerror = function() {
|
|
1583
1497
|
console.error("could not download file");
|
|
1584
1498
|
}, n.send();
|
|
1585
1499
|
}
|
|
1586
|
-
function
|
|
1500
|
+
function Yt(e) {
|
|
1587
1501
|
const o = new XMLHttpRequest();
|
|
1588
1502
|
o.open("HEAD", e, !1);
|
|
1589
1503
|
try {
|
|
@@ -1592,7 +1506,7 @@ function Kt(e) {
|
|
|
1592
1506
|
}
|
|
1593
1507
|
return o.status >= 200 && o.status <= 299;
|
|
1594
1508
|
}
|
|
1595
|
-
function
|
|
1509
|
+
function ke(e) {
|
|
1596
1510
|
try {
|
|
1597
1511
|
e.dispatchEvent(new MouseEvent("click"));
|
|
1598
1512
|
} catch {
|
|
@@ -1600,54 +1514,54 @@ function Me(e) {
|
|
|
1600
1514
|
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
|
|
1601
1515
|
}
|
|
1602
1516
|
}
|
|
1603
|
-
const
|
|
1517
|
+
const Me = typeof navigator == "object" ? navigator : { userAgent: "" }, Qt = /Macintosh/.test(Me.userAgent) && /AppleWebKit/.test(Me.userAgent) && !/Safari/.test(Me.userAgent), Xt = Be ? (
|
|
1604
1518
|
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
1605
|
-
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !
|
|
1519
|
+
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Qt ? qo : (
|
|
1606
1520
|
// Use msSaveOrOpenBlob as a second approach
|
|
1607
|
-
"msSaveOrOpenBlob" in
|
|
1521
|
+
"msSaveOrOpenBlob" in Me ? Jo : (
|
|
1608
1522
|
// Fallback to using FileReader and a popup
|
|
1609
|
-
|
|
1523
|
+
Ko
|
|
1610
1524
|
)
|
|
1611
1525
|
)
|
|
1612
1526
|
) : () => {
|
|
1613
1527
|
};
|
|
1614
|
-
function
|
|
1528
|
+
function qo(e, o = "download", t) {
|
|
1615
1529
|
const n = document.createElement("a");
|
|
1616
|
-
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() {
|
|
1617
1531
|
URL.revokeObjectURL(n.href);
|
|
1618
1532
|
}, 4e4), setTimeout(function() {
|
|
1619
|
-
|
|
1533
|
+
ke(n);
|
|
1620
1534
|
}, 0));
|
|
1621
1535
|
}
|
|
1622
|
-
function
|
|
1536
|
+
function Jo(e, o = "download", t) {
|
|
1623
1537
|
if (typeof e == "string")
|
|
1624
|
-
if (
|
|
1625
|
-
|
|
1538
|
+
if (Yt(e))
|
|
1539
|
+
it(e, o, t);
|
|
1626
1540
|
else {
|
|
1627
1541
|
const n = document.createElement("a");
|
|
1628
1542
|
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
1629
|
-
|
|
1543
|
+
ke(n);
|
|
1630
1544
|
});
|
|
1631
1545
|
}
|
|
1632
1546
|
else
|
|
1633
|
-
navigator.msSaveOrOpenBlob(
|
|
1547
|
+
navigator.msSaveOrOpenBlob(Go(e, t), o);
|
|
1634
1548
|
}
|
|
1635
|
-
function
|
|
1549
|
+
function Ko(e, o, t, n) {
|
|
1636
1550
|
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
1637
|
-
return
|
|
1638
|
-
const
|
|
1639
|
-
if ((i ||
|
|
1640
|
-
const
|
|
1641
|
-
|
|
1642
|
-
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;
|
|
1643
1557
|
if (typeof a != "string")
|
|
1644
1558
|
throw n = null, new Error("Wrong reader.result type");
|
|
1645
1559
|
a = i ? a : a.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = a : location.assign(a), n = null;
|
|
1646
|
-
},
|
|
1560
|
+
}, l.readAsDataURL(e);
|
|
1647
1561
|
} else {
|
|
1648
|
-
const
|
|
1649
|
-
n ? n.location.assign(
|
|
1650
|
-
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);
|
|
1651
1565
|
}, 4e4);
|
|
1652
1566
|
}
|
|
1653
1567
|
}
|
|
@@ -1655,39 +1569,39 @@ function B(e, o) {
|
|
|
1655
1569
|
const t = "🍍 " + e;
|
|
1656
1570
|
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(t, o) : o === "error" ? console.error(t) : o === "warn" ? console.warn(t) : console.log(t);
|
|
1657
1571
|
}
|
|
1658
|
-
function
|
|
1572
|
+
function at(e) {
|
|
1659
1573
|
return "_a" in e && "install" in e;
|
|
1660
1574
|
}
|
|
1661
|
-
function
|
|
1575
|
+
function en() {
|
|
1662
1576
|
if (!("clipboard" in navigator))
|
|
1663
1577
|
return B("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
1664
1578
|
}
|
|
1665
|
-
function
|
|
1579
|
+
function tn(e) {
|
|
1666
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;
|
|
1667
1581
|
}
|
|
1668
|
-
async function
|
|
1669
|
-
if (!
|
|
1582
|
+
async function Yo(e) {
|
|
1583
|
+
if (!en())
|
|
1670
1584
|
try {
|
|
1671
1585
|
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), B("Global state copied to clipboard.");
|
|
1672
1586
|
} catch (o) {
|
|
1673
|
-
if (
|
|
1587
|
+
if (tn(o))
|
|
1674
1588
|
return;
|
|
1675
1589
|
B("Failed to serialize the state. Check the console for more details.", "error"), console.error(o);
|
|
1676
1590
|
}
|
|
1677
1591
|
}
|
|
1678
|
-
async function
|
|
1679
|
-
if (!
|
|
1592
|
+
async function Qo(e) {
|
|
1593
|
+
if (!en())
|
|
1680
1594
|
try {
|
|
1681
|
-
|
|
1595
|
+
nn(e, JSON.parse(await navigator.clipboard.readText())), B("Global state pasted from clipboard.");
|
|
1682
1596
|
} catch (o) {
|
|
1683
|
-
if (
|
|
1597
|
+
if (tn(o))
|
|
1684
1598
|
return;
|
|
1685
1599
|
B("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(o);
|
|
1686
1600
|
}
|
|
1687
1601
|
}
|
|
1688
|
-
async function
|
|
1602
|
+
async function Xo(e) {
|
|
1689
1603
|
try {
|
|
1690
|
-
|
|
1604
|
+
Xt(new Blob([JSON.stringify(e.state.value)], {
|
|
1691
1605
|
type: "text/plain;charset=utf-8"
|
|
1692
1606
|
}), "pinia-state.json");
|
|
1693
1607
|
} catch (o) {
|
|
@@ -1695,7 +1609,7 @@ async function tl(e) {
|
|
|
1695
1609
|
}
|
|
1696
1610
|
}
|
|
1697
1611
|
let oe;
|
|
1698
|
-
function
|
|
1612
|
+
function es() {
|
|
1699
1613
|
oe || (oe = document.createElement("input"), oe.type = "file", oe.accept = ".json");
|
|
1700
1614
|
function e() {
|
|
1701
1615
|
return new Promise((o, t) => {
|
|
@@ -1703,25 +1617,25 @@ function nl() {
|
|
|
1703
1617
|
const n = oe.files;
|
|
1704
1618
|
if (!n)
|
|
1705
1619
|
return o(null);
|
|
1706
|
-
const
|
|
1707
|
-
return o(
|
|
1620
|
+
const s = n.item(0);
|
|
1621
|
+
return o(s ? { text: await s.text(), file: s } : null);
|
|
1708
1622
|
}, oe.oncancel = () => o(null), oe.onerror = t, oe.click();
|
|
1709
1623
|
});
|
|
1710
1624
|
}
|
|
1711
1625
|
return e;
|
|
1712
1626
|
}
|
|
1713
|
-
async function
|
|
1627
|
+
async function ts(e) {
|
|
1714
1628
|
try {
|
|
1715
|
-
const t = await
|
|
1629
|
+
const t = await es()();
|
|
1716
1630
|
if (!t)
|
|
1717
1631
|
return;
|
|
1718
|
-
const { text: n, file:
|
|
1719
|
-
|
|
1632
|
+
const { text: n, file: s } = t;
|
|
1633
|
+
nn(e, JSON.parse(n)), B(`Global state imported from "${s.name}".`);
|
|
1720
1634
|
} catch (o) {
|
|
1721
1635
|
B("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
|
|
1722
1636
|
}
|
|
1723
1637
|
}
|
|
1724
|
-
function
|
|
1638
|
+
function nn(e, o) {
|
|
1725
1639
|
for (const t in o) {
|
|
1726
1640
|
const n = e.state.value[t];
|
|
1727
1641
|
n ? Object.assign(n, o[t]) : e.state.value[t] = o[t];
|
|
@@ -1734,18 +1648,18 @@ function Y(e) {
|
|
|
1734
1648
|
}
|
|
1735
1649
|
};
|
|
1736
1650
|
}
|
|
1737
|
-
const
|
|
1738
|
-
function
|
|
1739
|
-
return
|
|
1740
|
-
id:
|
|
1741
|
-
label:
|
|
1651
|
+
const on = "🍍 Pinia (root)", Qe = "_root";
|
|
1652
|
+
function ns(e) {
|
|
1653
|
+
return at(e) ? {
|
|
1654
|
+
id: Qe,
|
|
1655
|
+
label: on
|
|
1742
1656
|
} : {
|
|
1743
1657
|
id: e.$id,
|
|
1744
1658
|
label: e.$id
|
|
1745
1659
|
};
|
|
1746
1660
|
}
|
|
1747
|
-
function
|
|
1748
|
-
if (
|
|
1661
|
+
function os(e) {
|
|
1662
|
+
if (at(e)) {
|
|
1749
1663
|
const t = Array.from(e._s.keys()), n = e._s;
|
|
1750
1664
|
return {
|
|
1751
1665
|
state: t.map((r) => ({
|
|
@@ -1758,7 +1672,7 @@ function sl(e) {
|
|
|
1758
1672
|
return {
|
|
1759
1673
|
editable: !1,
|
|
1760
1674
|
key: r,
|
|
1761
|
-
value: i._getters.reduce((
|
|
1675
|
+
value: i._getters.reduce((l, a) => (l[a] = i[a], l), {})
|
|
1762
1676
|
};
|
|
1763
1677
|
})
|
|
1764
1678
|
};
|
|
@@ -1780,7 +1694,7 @@ function sl(e) {
|
|
|
1780
1694
|
value: e[t]
|
|
1781
1695
|
}))), o;
|
|
1782
1696
|
}
|
|
1783
|
-
function
|
|
1697
|
+
function ss(e) {
|
|
1784
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), {
|
|
1785
1699
|
oldValue: {},
|
|
1786
1700
|
keys: [],
|
|
@@ -1793,7 +1707,7 @@ function rl(e) {
|
|
|
1793
1707
|
newValue: e.newValue
|
|
1794
1708
|
} : {};
|
|
1795
1709
|
}
|
|
1796
|
-
function
|
|
1710
|
+
function ls(e) {
|
|
1797
1711
|
switch (e) {
|
|
1798
1712
|
case ne.direct:
|
|
1799
1713
|
return "mutation";
|
|
@@ -1806,9 +1720,9 @@ function il(e) {
|
|
|
1806
1720
|
}
|
|
1807
1721
|
}
|
|
1808
1722
|
let be = !0;
|
|
1809
|
-
const Ne = [], ue = "pinia:mutations", U = "pinia", { assign:
|
|
1810
|
-
function
|
|
1811
|
-
|
|
1723
|
+
const Ne = [], ue = "pinia:mutations", U = "pinia", { assign: rs } = Object, Ae = (e) => "🍍 " + e;
|
|
1724
|
+
function is(e, o) {
|
|
1725
|
+
Jt({
|
|
1812
1726
|
id: "dev.esm.pinia",
|
|
1813
1727
|
label: "Pinia 🍍",
|
|
1814
1728
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
@@ -1830,28 +1744,28 @@ function ul(e, o) {
|
|
|
1830
1744
|
{
|
|
1831
1745
|
icon: "content_copy",
|
|
1832
1746
|
action: () => {
|
|
1833
|
-
|
|
1747
|
+
Yo(o);
|
|
1834
1748
|
},
|
|
1835
1749
|
tooltip: "Serialize and copy the state"
|
|
1836
1750
|
},
|
|
1837
1751
|
{
|
|
1838
1752
|
icon: "content_paste",
|
|
1839
1753
|
action: async () => {
|
|
1840
|
-
await
|
|
1754
|
+
await Qo(o), t.sendInspectorTree(U), t.sendInspectorState(U);
|
|
1841
1755
|
},
|
|
1842
1756
|
tooltip: "Replace the state with the content of your clipboard"
|
|
1843
1757
|
},
|
|
1844
1758
|
{
|
|
1845
1759
|
icon: "save",
|
|
1846
1760
|
action: () => {
|
|
1847
|
-
|
|
1761
|
+
Xo(o);
|
|
1848
1762
|
},
|
|
1849
1763
|
tooltip: "Save the state as a JSON file"
|
|
1850
1764
|
},
|
|
1851
1765
|
{
|
|
1852
1766
|
icon: "folder_open",
|
|
1853
1767
|
action: async () => {
|
|
1854
|
-
await
|
|
1768
|
+
await ts(o), t.sendInspectorTree(U), t.sendInspectorState(U);
|
|
1855
1769
|
},
|
|
1856
1770
|
tooltip: "Import the state from a JSON file"
|
|
1857
1771
|
}
|
|
@@ -1861,44 +1775,44 @@ function ul(e, o) {
|
|
|
1861
1775
|
icon: "restore",
|
|
1862
1776
|
tooltip: 'Reset the state (with "$reset")',
|
|
1863
1777
|
action: (n) => {
|
|
1864
|
-
const
|
|
1865
|
-
|
|
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");
|
|
1866
1780
|
}
|
|
1867
1781
|
}
|
|
1868
1782
|
]
|
|
1869
|
-
}), t.on.inspectComponent((n,
|
|
1783
|
+
}), t.on.inspectComponent((n, s) => {
|
|
1870
1784
|
const r = n.componentInstance && n.componentInstance.proxy;
|
|
1871
1785
|
if (r && r._pStores) {
|
|
1872
1786
|
const i = n.componentInstance.proxy._pStores;
|
|
1873
|
-
Object.values(i).forEach((
|
|
1787
|
+
Object.values(i).forEach((l) => {
|
|
1874
1788
|
n.instanceData.state.push({
|
|
1875
|
-
type:
|
|
1789
|
+
type: Ae(l.$id),
|
|
1876
1790
|
key: "state",
|
|
1877
1791
|
editable: !0,
|
|
1878
|
-
value:
|
|
1792
|
+
value: l._isOptionsAPI ? {
|
|
1879
1793
|
_custom: {
|
|
1880
|
-
value: K(
|
|
1794
|
+
value: K(l.$state),
|
|
1881
1795
|
actions: [
|
|
1882
1796
|
{
|
|
1883
1797
|
icon: "restore",
|
|
1884
1798
|
tooltip: "Reset the state of this store",
|
|
1885
|
-
action: () =>
|
|
1799
|
+
action: () => l.$reset()
|
|
1886
1800
|
}
|
|
1887
1801
|
]
|
|
1888
1802
|
}
|
|
1889
1803
|
} : (
|
|
1890
1804
|
// NOTE: workaround to unwrap transferred refs
|
|
1891
|
-
Object.keys(
|
|
1805
|
+
Object.keys(l.$state).reduce((a, u) => (a[u] = l.$state[u], a), {})
|
|
1892
1806
|
)
|
|
1893
|
-
}),
|
|
1894
|
-
type:
|
|
1807
|
+
}), l._getters && l._getters.length && n.instanceData.state.push({
|
|
1808
|
+
type: Ae(l.$id),
|
|
1895
1809
|
key: "getters",
|
|
1896
1810
|
editable: !1,
|
|
1897
|
-
value:
|
|
1811
|
+
value: l._getters.reduce((a, u) => {
|
|
1898
1812
|
try {
|
|
1899
|
-
a[u] =
|
|
1900
|
-
} catch (
|
|
1901
|
-
a[u] =
|
|
1813
|
+
a[u] = l[u];
|
|
1814
|
+
} catch (c) {
|
|
1815
|
+
a[u] = c;
|
|
1902
1816
|
}
|
|
1903
1817
|
return a;
|
|
1904
1818
|
}, {})
|
|
@@ -1907,32 +1821,32 @@ function ul(e, o) {
|
|
|
1907
1821
|
}
|
|
1908
1822
|
}), t.on.getInspectorTree((n) => {
|
|
1909
1823
|
if (n.app === e && n.inspectorId === U) {
|
|
1910
|
-
let
|
|
1911
|
-
|
|
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);
|
|
1912
1826
|
}
|
|
1913
1827
|
}), t.on.getInspectorState((n) => {
|
|
1914
1828
|
if (n.app === e && n.inspectorId === U) {
|
|
1915
|
-
const
|
|
1916
|
-
if (!
|
|
1829
|
+
const s = n.nodeId === Qe ? o : o._s.get(n.nodeId);
|
|
1830
|
+
if (!s)
|
|
1917
1831
|
return;
|
|
1918
|
-
|
|
1832
|
+
s && (n.state = os(s));
|
|
1919
1833
|
}
|
|
1920
|
-
}), t.on.editInspectorState((n,
|
|
1834
|
+
}), t.on.editInspectorState((n, s) => {
|
|
1921
1835
|
if (n.app === e && n.inspectorId === U) {
|
|
1922
|
-
const r = n.nodeId ===
|
|
1836
|
+
const r = n.nodeId === Qe ? o : o._s.get(n.nodeId);
|
|
1923
1837
|
if (!r)
|
|
1924
1838
|
return B(`store "${n.nodeId}" not found`, "error");
|
|
1925
1839
|
const { path: i } = n;
|
|
1926
|
-
|
|
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;
|
|
1927
1841
|
}
|
|
1928
1842
|
}), t.on.editComponentState((n) => {
|
|
1929
1843
|
if (n.type.startsWith("🍍")) {
|
|
1930
|
-
const
|
|
1844
|
+
const s = n.type.replace(/^🍍\s*/, ""), r = o._s.get(s);
|
|
1931
1845
|
if (!r)
|
|
1932
|
-
return B(`store "${
|
|
1846
|
+
return B(`store "${s}" not found`, "error");
|
|
1933
1847
|
const { path: i } = n;
|
|
1934
1848
|
if (i[0] !== "state")
|
|
1935
|
-
return B(`Invalid path for store "${
|
|
1849
|
+
return B(`Invalid path for store "${s}":
|
|
1936
1850
|
${i}
|
|
1937
1851
|
Only state can be modified.`);
|
|
1938
1852
|
i[0] = "$state", be = !1, n.set(r, i, n.state.value), be = !0;
|
|
@@ -1940,8 +1854,8 @@ Only state can be modified.`);
|
|
|
1940
1854
|
});
|
|
1941
1855
|
});
|
|
1942
1856
|
}
|
|
1943
|
-
function
|
|
1944
|
-
Ne.includes(
|
|
1857
|
+
function as(e, o) {
|
|
1858
|
+
Ne.includes(Ae(o.$id)) || Ne.push(Ae(o.$id)), Jt({
|
|
1945
1859
|
id: "dev.esm.pinia",
|
|
1946
1860
|
label: "Pinia 🍍",
|
|
1947
1861
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
@@ -1963,8 +1877,8 @@ function cl(e, o) {
|
|
|
1963
1877
|
}
|
|
1964
1878
|
}, (t) => {
|
|
1965
1879
|
const n = typeof t.now == "function" ? t.now.bind(t) : Date.now;
|
|
1966
|
-
o.$onAction(({ after: i, onError:
|
|
1967
|
-
const
|
|
1880
|
+
o.$onAction(({ after: i, onError: l, name: a, args: u }) => {
|
|
1881
|
+
const c = sn++;
|
|
1968
1882
|
t.addTimelineEvent({
|
|
1969
1883
|
layerId: ue,
|
|
1970
1884
|
event: {
|
|
@@ -1976,7 +1890,7 @@ function cl(e, o) {
|
|
|
1976
1890
|
action: Y(a),
|
|
1977
1891
|
args: u
|
|
1978
1892
|
},
|
|
1979
|
-
groupId:
|
|
1893
|
+
groupId: c
|
|
1980
1894
|
}
|
|
1981
1895
|
}), i((p) => {
|
|
1982
1896
|
re = void 0, t.addTimelineEvent({
|
|
@@ -1991,10 +1905,10 @@ function cl(e, o) {
|
|
|
1991
1905
|
args: u,
|
|
1992
1906
|
result: p
|
|
1993
1907
|
},
|
|
1994
|
-
groupId:
|
|
1908
|
+
groupId: c
|
|
1995
1909
|
}
|
|
1996
1910
|
});
|
|
1997
|
-
}),
|
|
1911
|
+
}), l((p) => {
|
|
1998
1912
|
re = void 0, t.addTimelineEvent({
|
|
1999
1913
|
layerId: ue,
|
|
2000
1914
|
event: {
|
|
@@ -2008,12 +1922,12 @@ function cl(e, o) {
|
|
|
2008
1922
|
args: u,
|
|
2009
1923
|
error: p
|
|
2010
1924
|
},
|
|
2011
|
-
groupId:
|
|
1925
|
+
groupId: c
|
|
2012
1926
|
}
|
|
2013
1927
|
});
|
|
2014
1928
|
});
|
|
2015
1929
|
}, !0), o._customProperties.forEach((i) => {
|
|
2016
|
-
F(() =>
|
|
1930
|
+
F(() => V(o[i]), (l, a) => {
|
|
2017
1931
|
t.notifyComponentUpdate(), t.sendInspectorState(U), be && t.addTimelineEvent({
|
|
2018
1932
|
layerId: ue,
|
|
2019
1933
|
event: {
|
|
@@ -2021,23 +1935,23 @@ function cl(e, o) {
|
|
|
2021
1935
|
title: "Change",
|
|
2022
1936
|
subtitle: i,
|
|
2023
1937
|
data: {
|
|
2024
|
-
newValue:
|
|
1938
|
+
newValue: l,
|
|
2025
1939
|
oldValue: a
|
|
2026
1940
|
},
|
|
2027
1941
|
groupId: re
|
|
2028
1942
|
}
|
|
2029
1943
|
});
|
|
2030
1944
|
}, { deep: !0 });
|
|
2031
|
-
}), o.$subscribe(({ events: i, type:
|
|
1945
|
+
}), o.$subscribe(({ events: i, type: l }, a) => {
|
|
2032
1946
|
if (t.notifyComponentUpdate(), t.sendInspectorState(U), !be)
|
|
2033
1947
|
return;
|
|
2034
1948
|
const u = {
|
|
2035
1949
|
time: n(),
|
|
2036
|
-
title:
|
|
2037
|
-
data:
|
|
1950
|
+
title: ls(l),
|
|
1951
|
+
data: rs({ store: Y(o.$id) }, ss(i)),
|
|
2038
1952
|
groupId: re
|
|
2039
1953
|
};
|
|
2040
|
-
|
|
1954
|
+
l === ne.patchFunction ? u.subtitle = "⤵️" : l === ne.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
|
|
2041
1955
|
_custom: {
|
|
2042
1956
|
display: "DebuggerEvent",
|
|
2043
1957
|
type: "object",
|
|
@@ -2049,9 +1963,9 @@ function cl(e, o) {
|
|
|
2049
1963
|
event: u
|
|
2050
1964
|
});
|
|
2051
1965
|
}, { detached: !0, flush: "sync" });
|
|
2052
|
-
const
|
|
1966
|
+
const s = o._hotUpdate;
|
|
2053
1967
|
o._hotUpdate = de((i) => {
|
|
2054
|
-
|
|
1968
|
+
s(i), t.addTimelineEvent({
|
|
2055
1969
|
layerId: ue,
|
|
2056
1970
|
event: {
|
|
2057
1971
|
time: n(),
|
|
@@ -2070,12 +1984,12 @@ function cl(e, o) {
|
|
|
2070
1984
|
}, t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges && B(`"${o.$id}" store installed 🆕`);
|
|
2071
1985
|
});
|
|
2072
1986
|
}
|
|
2073
|
-
let
|
|
2074
|
-
function
|
|
2075
|
-
const n = o.reduce((
|
|
2076
|
-
for (const
|
|
2077
|
-
e[
|
|
2078
|
-
const r =
|
|
1987
|
+
let sn = 0, re;
|
|
1988
|
+
function _t(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, {
|
|
2079
1993
|
get(...a) {
|
|
2080
1994
|
return re = r, Reflect.get(...a);
|
|
2081
1995
|
},
|
|
@@ -2084,32 +1998,32 @@ function Ct(e, o, t) {
|
|
|
2084
1998
|
}
|
|
2085
1999
|
}) : e;
|
|
2086
2000
|
re = r;
|
|
2087
|
-
const
|
|
2088
|
-
return re = void 0,
|
|
2001
|
+
const l = n[s].apply(i, arguments);
|
|
2002
|
+
return re = void 0, l;
|
|
2089
2003
|
};
|
|
2090
2004
|
}
|
|
2091
|
-
function
|
|
2005
|
+
function us({ app: e, store: o, options: t }) {
|
|
2092
2006
|
if (o.$id.startsWith("__hot:"))
|
|
2093
2007
|
return;
|
|
2094
|
-
o._isOptionsAPI = !!t.state,
|
|
2008
|
+
o._isOptionsAPI = !!t.state, _t(o, Object.keys(t.actions), o._isOptionsAPI);
|
|
2095
2009
|
const n = o._hotUpdate;
|
|
2096
|
-
K(o)._hotUpdate = function(
|
|
2097
|
-
n.apply(this, arguments),
|
|
2098
|
-
},
|
|
2010
|
+
K(o)._hotUpdate = function(s) {
|
|
2011
|
+
n.apply(this, arguments), _t(o, Object.keys(s._hmrPayload.actions), !!o._isOptionsAPI);
|
|
2012
|
+
}, as(
|
|
2099
2013
|
e,
|
|
2100
2014
|
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
2101
2015
|
o
|
|
2102
2016
|
);
|
|
2103
2017
|
}
|
|
2104
|
-
function
|
|
2105
|
-
const e =
|
|
2018
|
+
function cs() {
|
|
2019
|
+
const e = It(!0), o = e.run(() => E({}));
|
|
2106
2020
|
let t = [], n = [];
|
|
2107
|
-
const
|
|
2021
|
+
const s = de({
|
|
2108
2022
|
install(r) {
|
|
2109
|
-
Te(
|
|
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 = [];
|
|
2110
2024
|
},
|
|
2111
2025
|
use(r) {
|
|
2112
|
-
return !this._a && !
|
|
2026
|
+
return !this._a && !Gt ? n.push(r) : t.push(r), this;
|
|
2113
2027
|
},
|
|
2114
2028
|
_p: t,
|
|
2115
2029
|
// it's actually undefined here
|
|
@@ -2119,108 +2033,108 @@ function fl() {
|
|
|
2119
2033
|
_s: /* @__PURE__ */ new Map(),
|
|
2120
2034
|
state: o
|
|
2121
2035
|
});
|
|
2122
|
-
return Se && typeof Proxy < "u" &&
|
|
2036
|
+
return Se && typeof Proxy < "u" && s.use(us), s;
|
|
2123
2037
|
}
|
|
2124
2038
|
function ln(e, o) {
|
|
2125
2039
|
for (const t in o) {
|
|
2126
2040
|
const n = o[t];
|
|
2127
2041
|
if (!(t in e))
|
|
2128
2042
|
continue;
|
|
2129
|
-
const
|
|
2130
|
-
fe(
|
|
2043
|
+
const s = e[t];
|
|
2044
|
+
fe(s) && fe(n) && !_e(n) && !st(n) ? e[t] = ln(s, n) : e[t] = n;
|
|
2131
2045
|
}
|
|
2132
2046
|
return e;
|
|
2133
2047
|
}
|
|
2134
|
-
const
|
|
2048
|
+
const rn = () => {
|
|
2135
2049
|
};
|
|
2136
|
-
function
|
|
2050
|
+
function xt(e, o, t, n = rn) {
|
|
2137
2051
|
e.push(o);
|
|
2138
|
-
const
|
|
2052
|
+
const s = () => {
|
|
2139
2053
|
const r = e.indexOf(o);
|
|
2140
2054
|
r > -1 && (e.splice(r, 1), n());
|
|
2141
2055
|
};
|
|
2142
|
-
return !t &&
|
|
2056
|
+
return !t && Pt() && tt(s), s;
|
|
2143
2057
|
}
|
|
2144
2058
|
function ge(e, ...o) {
|
|
2145
2059
|
e.slice().forEach((t) => {
|
|
2146
2060
|
t(...o);
|
|
2147
2061
|
});
|
|
2148
2062
|
}
|
|
2149
|
-
const
|
|
2150
|
-
function
|
|
2063
|
+
const ds = (e) => e();
|
|
2064
|
+
function Xe(e, o) {
|
|
2151
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);
|
|
2152
2066
|
for (const t in o) {
|
|
2153
2067
|
if (!o.hasOwnProperty(t))
|
|
2154
2068
|
continue;
|
|
2155
|
-
const n = o[t],
|
|
2156
|
-
fe(
|
|
2069
|
+
const n = o[t], s = e[t];
|
|
2070
|
+
fe(s) && fe(n) && e.hasOwnProperty(t) && !_e(n) && !st(n) ? e[t] = Xe(s, n) : e[t] = n;
|
|
2157
2071
|
}
|
|
2158
2072
|
return e;
|
|
2159
2073
|
}
|
|
2160
|
-
const
|
|
2074
|
+
const fs = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
2161
2075
|
/* istanbul ignore next */
|
|
2162
2076
|
Symbol()
|
|
2163
2077
|
);
|
|
2164
|
-
function
|
|
2165
|
-
return !fe(e) || !e.hasOwnProperty(
|
|
2078
|
+
function ps(e) {
|
|
2079
|
+
return !fe(e) || !e.hasOwnProperty(fs);
|
|
2166
2080
|
}
|
|
2167
2081
|
const { assign: J } = Object;
|
|
2168
|
-
function
|
|
2082
|
+
function Ct(e) {
|
|
2169
2083
|
return !!(_e(e) && e.effect);
|
|
2170
2084
|
}
|
|
2171
2085
|
function yt(e, o, t, n) {
|
|
2172
|
-
const { state:
|
|
2086
|
+
const { state: s, actions: r, getters: i } = o, l = t.state.value[e];
|
|
2173
2087
|
let a;
|
|
2174
2088
|
function u() {
|
|
2175
|
-
!
|
|
2176
|
-
const
|
|
2089
|
+
!l && (process.env.NODE_ENV === "production" || !n) && (t.state.value[e] = s ? s() : {});
|
|
2090
|
+
const c = process.env.NODE_ENV !== "production" && n ? (
|
|
2177
2091
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
2178
|
-
|
|
2179
|
-
) :
|
|
2180
|
-
return J(
|
|
2092
|
+
ct(E(s ? s() : {}).value)
|
|
2093
|
+
) : ct(t.state.value[e]);
|
|
2094
|
+
return J(c, r, Object.keys(i || {}).reduce((p, _) => (process.env.NODE_ENV !== "production" && _ in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${_}" in store "${e}".`), p[_] = de(S(() => {
|
|
2181
2095
|
Te(t);
|
|
2182
|
-
const
|
|
2183
|
-
return i[
|
|
2096
|
+
const C = t._s.get(e);
|
|
2097
|
+
return i[_].call(C, C);
|
|
2184
2098
|
})), p), {}));
|
|
2185
2099
|
}
|
|
2186
|
-
return a =
|
|
2100
|
+
return a = et(e, u, o, t, n, !0), a;
|
|
2187
2101
|
}
|
|
2188
|
-
function
|
|
2102
|
+
function et(e, o, t = {}, n, s, r) {
|
|
2189
2103
|
let i;
|
|
2190
|
-
const
|
|
2104
|
+
const l = J({ actions: {} }, t);
|
|
2191
2105
|
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
2192
2106
|
throw new Error("Pinia destroyed");
|
|
2193
2107
|
const a = {
|
|
2194
2108
|
deep: !0
|
|
2195
2109
|
// flush: 'post',
|
|
2196
2110
|
};
|
|
2197
|
-
process.env.NODE_ENV !== "production" && !
|
|
2198
|
-
u ?
|
|
2111
|
+
process.env.NODE_ENV !== "production" && !Gt && (a.onTrigger = (d) => {
|
|
2112
|
+
u ? C = d : u == !1 && !x._hotUpdating && (Array.isArray(C) ? C.push(d) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
2199
2113
|
});
|
|
2200
|
-
let u,
|
|
2201
|
-
const
|
|
2202
|
-
!r && !
|
|
2203
|
-
const
|
|
2204
|
-
let
|
|
2205
|
-
function
|
|
2206
|
-
let
|
|
2207
|
-
u =
|
|
2114
|
+
let u, c, p = [], _ = [], C;
|
|
2115
|
+
const h = n.state.value[e];
|
|
2116
|
+
!r && !h && (process.env.NODE_ENV === "production" || !s) && (n.state.value[e] = {});
|
|
2117
|
+
const v = E({});
|
|
2118
|
+
let T;
|
|
2119
|
+
function N(d) {
|
|
2120
|
+
let f;
|
|
2121
|
+
u = c = !1, process.env.NODE_ENV !== "production" && (C = []), typeof d == "function" ? (d(n.state.value[e]), f = {
|
|
2208
2122
|
type: ne.patchFunction,
|
|
2209
2123
|
storeId: e,
|
|
2210
|
-
events:
|
|
2211
|
-
}) : (
|
|
2124
|
+
events: C
|
|
2125
|
+
}) : (Xe(n.state.value[e], d), f = {
|
|
2212
2126
|
type: ne.patchObject,
|
|
2213
|
-
payload:
|
|
2127
|
+
payload: d,
|
|
2214
2128
|
storeId: e,
|
|
2215
|
-
events:
|
|
2129
|
+
events: C
|
|
2216
2130
|
});
|
|
2217
|
-
const y =
|
|
2131
|
+
const y = T = Symbol();
|
|
2218
2132
|
Q().then(() => {
|
|
2219
|
-
|
|
2220
|
-
}),
|
|
2133
|
+
T === y && (u = !0);
|
|
2134
|
+
}), c = !0, ge(p, f, n.state.value[e]);
|
|
2221
2135
|
}
|
|
2222
|
-
const
|
|
2223
|
-
const { state:
|
|
2136
|
+
const I = r ? function() {
|
|
2137
|
+
const { state: f } = t, y = f ? f() : {};
|
|
2224
2138
|
this.$patch((O) => {
|
|
2225
2139
|
J(O, y);
|
|
2226
2140
|
});
|
|
@@ -2228,191 +2142,296 @@ function Xe(e, o, t = {}, n, l, r) {
|
|
|
2228
2142
|
/* istanbul ignore next */
|
|
2229
2143
|
process.env.NODE_ENV !== "production" ? () => {
|
|
2230
2144
|
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
2231
|
-
} :
|
|
2145
|
+
} : rn
|
|
2232
2146
|
);
|
|
2233
|
-
function
|
|
2234
|
-
i.stop(), p = [],
|
|
2147
|
+
function k() {
|
|
2148
|
+
i.stop(), p = [], _ = [], n._s.delete(e);
|
|
2235
2149
|
}
|
|
2236
|
-
function D(
|
|
2150
|
+
function D(d, f) {
|
|
2237
2151
|
return function() {
|
|
2238
2152
|
Te(n);
|
|
2239
|
-
const y = Array.from(arguments), O = [],
|
|
2240
|
-
function
|
|
2153
|
+
const y = Array.from(arguments), O = [], M = [];
|
|
2154
|
+
function A(j) {
|
|
2241
2155
|
O.push(j);
|
|
2242
2156
|
}
|
|
2243
2157
|
function G(j) {
|
|
2244
|
-
|
|
2158
|
+
M.push(j);
|
|
2245
2159
|
}
|
|
2246
|
-
ge(
|
|
2160
|
+
ge(_, {
|
|
2247
2161
|
args: y,
|
|
2248
|
-
name:
|
|
2249
|
-
store:
|
|
2250
|
-
after:
|
|
2162
|
+
name: d,
|
|
2163
|
+
store: x,
|
|
2164
|
+
after: A,
|
|
2251
2165
|
onError: G
|
|
2252
2166
|
});
|
|
2253
2167
|
let q;
|
|
2254
2168
|
try {
|
|
2255
|
-
q =
|
|
2169
|
+
q = f.apply(this && this.$id === e ? this : x, y);
|
|
2256
2170
|
} catch (j) {
|
|
2257
|
-
throw ge(
|
|
2171
|
+
throw ge(M, j), j;
|
|
2258
2172
|
}
|
|
2259
|
-
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);
|
|
2260
2174
|
};
|
|
2261
2175
|
}
|
|
2262
|
-
const
|
|
2176
|
+
const m = /* @__PURE__ */ de({
|
|
2263
2177
|
actions: {},
|
|
2264
2178
|
getters: {},
|
|
2265
2179
|
state: [],
|
|
2266
|
-
hotState:
|
|
2267
|
-
}),
|
|
2180
|
+
hotState: v
|
|
2181
|
+
}), P = {
|
|
2268
2182
|
_p: n,
|
|
2269
2183
|
// _s: scope,
|
|
2270
2184
|
$id: e,
|
|
2271
|
-
$onAction:
|
|
2272
|
-
$patch:
|
|
2273
|
-
$reset:
|
|
2274
|
-
$subscribe(
|
|
2275
|
-
const y =
|
|
2276
|
-
(
|
|
2185
|
+
$onAction: xt.bind(null, _),
|
|
2186
|
+
$patch: N,
|
|
2187
|
+
$reset: I,
|
|
2188
|
+
$subscribe(d, f = {}) {
|
|
2189
|
+
const y = xt(p, d, f.detached, () => O()), O = i.run(() => F(() => n.state.value[e], (M) => {
|
|
2190
|
+
(f.flush === "sync" ? c : u) && d({
|
|
2277
2191
|
storeId: e,
|
|
2278
2192
|
type: ne.direct,
|
|
2279
|
-
events:
|
|
2280
|
-
},
|
|
2281
|
-
}, J({}, a,
|
|
2193
|
+
events: C
|
|
2194
|
+
}, M);
|
|
2195
|
+
}, J({}, a, f)));
|
|
2282
2196
|
return y;
|
|
2283
2197
|
},
|
|
2284
|
-
$dispose:
|
|
2285
|
-
},
|
|
2198
|
+
$dispose: k
|
|
2199
|
+
}, x = Tt(process.env.NODE_ENV !== "production" || Se ? J(
|
|
2286
2200
|
{
|
|
2287
|
-
_hmrPayload:
|
|
2201
|
+
_hmrPayload: m,
|
|
2288
2202
|
_customProperties: de(/* @__PURE__ */ new Set())
|
|
2289
2203
|
// devtools custom properties
|
|
2290
2204
|
},
|
|
2291
|
-
|
|
2205
|
+
P
|
|
2292
2206
|
// must be added later
|
|
2293
2207
|
// setupStore
|
|
2294
|
-
) :
|
|
2295
|
-
n._s.set(e,
|
|
2296
|
-
const
|
|
2297
|
-
for (const
|
|
2298
|
-
const
|
|
2299
|
-
if (_e(
|
|
2300
|
-
process.env.NODE_ENV !== "production" &&
|
|
2301
|
-
else if (typeof
|
|
2302
|
-
const y = process.env.NODE_ENV !== "production" &&
|
|
2303
|
-
|
|
2304
|
-
} else process.env.NODE_ENV !== "production" &&
|
|
2208
|
+
) : P);
|
|
2209
|
+
n._s.set(e, x);
|
|
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 (_e(f) && !Ct(f) || st(f))
|
|
2214
|
+
process.env.NODE_ENV !== "production" && s ? Ve(v.value, d, Ge(L, d)) : r || (h && ps(f) && (_e(f) ? f.value = h[d] : Xe(f, h[d])), n.state.value[e][d] = f), process.env.NODE_ENV !== "production" && m.state.push(d);
|
|
2215
|
+
else if (typeof f == "function") {
|
|
2216
|
+
const y = process.env.NODE_ENV !== "production" && s ? f : D(d, f);
|
|
2217
|
+
L[d] = y, process.env.NODE_ENV !== "production" && (m.actions[d] = f), l.actions[d] = f;
|
|
2218
|
+
} else process.env.NODE_ENV !== "production" && Ct(f) && (m.getters[d] = r ? (
|
|
2305
2219
|
// @ts-expect-error
|
|
2306
|
-
t.getters[
|
|
2307
|
-
) :
|
|
2308
|
-
(
|
|
2309
|
-
}
|
|
2310
|
-
if (J(
|
|
2311
|
-
get: () => process.env.NODE_ENV !== "production" &&
|
|
2312
|
-
set: (
|
|
2313
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2220
|
+
t.getters[d]
|
|
2221
|
+
) : f, Be && (L._getters || // @ts-expect-error: same
|
|
2222
|
+
(L._getters = de([]))).push(d));
|
|
2223
|
+
}
|
|
2224
|
+
if (J(x, L), J(K(x), L), Object.defineProperty(x, "$state", {
|
|
2225
|
+
get: () => process.env.NODE_ENV !== "production" && s ? v.value : n.state.value[e],
|
|
2226
|
+
set: (d) => {
|
|
2227
|
+
if (process.env.NODE_ENV !== "production" && s)
|
|
2314
2228
|
throw new Error("cannot set hotState");
|
|
2315
|
-
|
|
2316
|
-
J(
|
|
2229
|
+
N((f) => {
|
|
2230
|
+
J(f, d);
|
|
2317
2231
|
});
|
|
2318
2232
|
}
|
|
2319
|
-
}), process.env.NODE_ENV !== "production" && (
|
|
2320
|
-
|
|
2321
|
-
if (
|
|
2322
|
-
const y =
|
|
2323
|
-
typeof y == "object" && fe(y) && fe(O) ? ln(y, O) :
|
|
2233
|
+
}), process.env.NODE_ENV !== "production" && (x._hotUpdate = de((d) => {
|
|
2234
|
+
x._hotUpdating = !0, d._hmrPayload.state.forEach((f) => {
|
|
2235
|
+
if (f in x.$state) {
|
|
2236
|
+
const y = d.$state[f], O = x.$state[f];
|
|
2237
|
+
typeof y == "object" && fe(y) && fe(O) ? ln(y, O) : d.$state[f] = O;
|
|
2324
2238
|
}
|
|
2325
|
-
|
|
2326
|
-
}), Object.keys(
|
|
2327
|
-
|
|
2328
|
-
}), u = !1,
|
|
2239
|
+
Ve(x, f, Ge(d.$state, f));
|
|
2240
|
+
}), Object.keys(x.$state).forEach((f) => {
|
|
2241
|
+
f in d.$state || Ke(x, f);
|
|
2242
|
+
}), u = !1, c = !1, n.state.value[e] = Ge(d._hmrPayload, "hotState"), c = !0, Q().then(() => {
|
|
2329
2243
|
u = !0;
|
|
2330
2244
|
});
|
|
2331
|
-
for (const
|
|
2332
|
-
const y =
|
|
2333
|
-
|
|
2245
|
+
for (const f in d._hmrPayload.actions) {
|
|
2246
|
+
const y = d[f];
|
|
2247
|
+
Ve(x, f, D(f, y));
|
|
2334
2248
|
}
|
|
2335
|
-
for (const
|
|
2336
|
-
const y =
|
|
2249
|
+
for (const f in d._hmrPayload.getters) {
|
|
2250
|
+
const y = d._hmrPayload.getters[f], O = r ? (
|
|
2337
2251
|
// special handling of options api
|
|
2338
|
-
S(() => (Te(n), y.call(
|
|
2252
|
+
S(() => (Te(n), y.call(x, x)))
|
|
2339
2253
|
) : y;
|
|
2340
|
-
|
|
2254
|
+
Ve(x, f, O);
|
|
2341
2255
|
}
|
|
2342
|
-
Object.keys(
|
|
2343
|
-
|
|
2344
|
-
}), Object.keys(
|
|
2345
|
-
|
|
2346
|
-
}),
|
|
2256
|
+
Object.keys(x._hmrPayload.getters).forEach((f) => {
|
|
2257
|
+
f in d._hmrPayload.getters || Ke(x, f);
|
|
2258
|
+
}), Object.keys(x._hmrPayload.actions).forEach((f) => {
|
|
2259
|
+
f in d._hmrPayload.actions || Ke(x, f);
|
|
2260
|
+
}), x._hmrPayload = d._hmrPayload, x._getters = d._getters, x._hotUpdating = !1;
|
|
2347
2261
|
})), Se) {
|
|
2348
|
-
const
|
|
2262
|
+
const d = {
|
|
2349
2263
|
writable: !0,
|
|
2350
2264
|
configurable: !0,
|
|
2351
2265
|
// avoid warning on devtools trying to display this property
|
|
2352
2266
|
enumerable: !1
|
|
2353
2267
|
};
|
|
2354
|
-
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((
|
|
2355
|
-
Object.defineProperty(
|
|
2268
|
+
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((f) => {
|
|
2269
|
+
Object.defineProperty(x, f, J({ value: x[f] }, d));
|
|
2356
2270
|
});
|
|
2357
2271
|
}
|
|
2358
|
-
return n._p.forEach((
|
|
2272
|
+
return n._p.forEach((d) => {
|
|
2359
2273
|
if (Se) {
|
|
2360
|
-
const
|
|
2361
|
-
store:
|
|
2274
|
+
const f = i.run(() => d({
|
|
2275
|
+
store: x,
|
|
2362
2276
|
app: n._a,
|
|
2363
2277
|
pinia: n,
|
|
2364
|
-
options:
|
|
2278
|
+
options: l
|
|
2365
2279
|
}));
|
|
2366
|
-
Object.keys(
|
|
2280
|
+
Object.keys(f || {}).forEach((y) => x._customProperties.add(y)), J(x, f);
|
|
2367
2281
|
} else
|
|
2368
|
-
J(
|
|
2369
|
-
store:
|
|
2282
|
+
J(x, i.run(() => d({
|
|
2283
|
+
store: x,
|
|
2370
2284
|
app: n._a,
|
|
2371
2285
|
pinia: n,
|
|
2372
|
-
options:
|
|
2286
|
+
options: l
|
|
2373
2287
|
})));
|
|
2374
|
-
}), process.env.NODE_ENV !== "production" &&
|
|
2288
|
+
}), process.env.NODE_ENV !== "production" && x.$state && typeof x.$state == "object" && typeof x.$state.constructor == "function" && !x.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
2375
2289
|
state: () => new MyClass()
|
|
2376
|
-
Found in store "${
|
|
2290
|
+
Found in store "${x.$id}".`), h && r && t.hydrate && t.hydrate(x.$state, h), u = !0, c = !0, x;
|
|
2377
2291
|
}
|
|
2378
2292
|
function He(e, o, t) {
|
|
2379
|
-
let n,
|
|
2293
|
+
let n, s;
|
|
2380
2294
|
const r = typeof o == "function";
|
|
2381
2295
|
if (typeof e == "string")
|
|
2382
|
-
n = e,
|
|
2383
|
-
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")
|
|
2384
2298
|
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
2385
|
-
function i(
|
|
2386
|
-
const u =
|
|
2387
|
-
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
|
|
2388
2302
|
// pinia instance with getActivePinia()
|
|
2389
|
-
(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)
|
|
2390
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)"?
|
|
2391
2305
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
2392
2306
|
This will fail in production.`);
|
|
2393
|
-
|
|
2394
|
-
const
|
|
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);
|
|
2395
2309
|
if (process.env.NODE_ENV !== "production" && a) {
|
|
2396
|
-
const p = "__hot:" + n,
|
|
2397
|
-
a._hotUpdate(
|
|
2310
|
+
const p = "__hot:" + n, _ = r ? et(p, o, s, l, !0) : yt(p, J({}, s), l, !0);
|
|
2311
|
+
a._hotUpdate(_), delete l.state.value[p], l._s.delete(p);
|
|
2398
2312
|
}
|
|
2399
2313
|
if (process.env.NODE_ENV !== "production" && Be) {
|
|
2400
|
-
const p =
|
|
2314
|
+
const p = Lt();
|
|
2401
2315
|
if (p && p.proxy && // avoid adding stores that are just built for hot module replacement
|
|
2402
2316
|
!a) {
|
|
2403
|
-
const
|
|
2404
|
-
|
|
2317
|
+
const _ = p.proxy, C = "_pStores" in _ ? _._pStores : _._pStores = {};
|
|
2318
|
+
C[n] = c;
|
|
2405
2319
|
}
|
|
2406
2320
|
}
|
|
2407
|
-
return
|
|
2321
|
+
return c;
|
|
2408
2322
|
}
|
|
2409
2323
|
return i.$id = n, i;
|
|
2410
2324
|
}
|
|
2411
|
-
const ze = He("
|
|
2325
|
+
const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
2326
|
+
__name: "Select",
|
|
2327
|
+
props: /* @__PURE__ */ hn({
|
|
2328
|
+
languages: {
|
|
2329
|
+
type: Object,
|
|
2330
|
+
required: !0
|
|
2331
|
+
}
|
|
2332
|
+
}, {
|
|
2333
|
+
modelValue: {},
|
|
2334
|
+
modelModifiers: {}
|
|
2335
|
+
}),
|
|
2336
|
+
emits: ["update:modelValue"],
|
|
2337
|
+
setup(e) {
|
|
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();
|
|
2342
|
+
};
|
|
2343
|
+
return (a, u) => (w(), ee(V(Ro), {
|
|
2344
|
+
modelValue: n.value,
|
|
2345
|
+
"onUpdate:modelValue": u[3] || (u[3] = (c) => n.value = c),
|
|
2346
|
+
disabled: V(o).loading,
|
|
2347
|
+
as: "div",
|
|
2348
|
+
class: "relative mt-1"
|
|
2349
|
+
}, {
|
|
2350
|
+
default: Pe(() => [
|
|
2351
|
+
H(V(ko), {
|
|
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",
|
|
2353
|
+
onChange: u[0] || (u[0] = (c) => s.value = c.target.value),
|
|
2354
|
+
displayValue: (c) => e.languages[c],
|
|
2355
|
+
onFocus: u[1] || (u[1] = (c) => l(c))
|
|
2356
|
+
}, null, 8, ["displayValue"]),
|
|
2357
|
+
H(V(Vo), {
|
|
2358
|
+
ref_key: "btnSelect",
|
|
2359
|
+
ref: r,
|
|
2360
|
+
class: "absolute inset-y-0 right-0 flex items-center pr-2"
|
|
2361
|
+
}, {
|
|
2362
|
+
default: Pe(() => [
|
|
2363
|
+
H(V(Ao), {
|
|
2364
|
+
class: "h-5 w-5 text-gray-400",
|
|
2365
|
+
"aria-hidden": "true",
|
|
2366
|
+
onClick: u[2] || (u[2] = (c) => l(c))
|
|
2367
|
+
})
|
|
2368
|
+
]),
|
|
2369
|
+
_: 1
|
|
2370
|
+
}, 512),
|
|
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" }, {
|
|
2372
|
+
default: Pe(() => [
|
|
2373
|
+
(w(!0), $(Z, null, le(i.value, ([c, p]) => (w(), ee(V(No), {
|
|
2374
|
+
key: c,
|
|
2375
|
+
value: c
|
|
2376
|
+
}, {
|
|
2377
|
+
default: Pe(({ active: _, selected: C }) => [
|
|
2378
|
+
g("li", {
|
|
2379
|
+
class: xe([
|
|
2380
|
+
"relative cursor-default select-none py-2 pl-3 pr-9",
|
|
2381
|
+
_ ? "bg-[#3B5695] text-white" : "text-textCustom"
|
|
2382
|
+
])
|
|
2383
|
+
}, [
|
|
2384
|
+
g("span", {
|
|
2385
|
+
class: xe(["block truncate", C && "font-semibold"])
|
|
2386
|
+
}, te(p), 3)
|
|
2387
|
+
], 2)
|
|
2388
|
+
]),
|
|
2389
|
+
_: 2
|
|
2390
|
+
}, 1032, ["value"]))), 128))
|
|
2391
|
+
]),
|
|
2392
|
+
_: 1
|
|
2393
|
+
})
|
|
2394
|
+
]),
|
|
2395
|
+
_: 1
|
|
2396
|
+
}, 8, ["modelValue", "disabled"]));
|
|
2397
|
+
}
|
|
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__ */ g("img", {
|
|
2399
|
+
src: an,
|
|
2400
|
+
alt: "swap",
|
|
2401
|
+
class: "w-4"
|
|
2402
|
+
}, null, -1), ms = [
|
|
2403
|
+
hs
|
|
2404
|
+
], gs = ["disabled"], bs = /* @__PURE__ */ g("img", {
|
|
2405
|
+
src: an,
|
|
2406
|
+
alt: "swap",
|
|
2407
|
+
class: "w-4"
|
|
2408
|
+
}, null, -1), _s = [
|
|
2409
|
+
bs
|
|
2410
|
+
], xs = {
|
|
2411
|
+
__name: "SwapBtn",
|
|
2412
|
+
props: {
|
|
2413
|
+
isBidirect: {
|
|
2414
|
+
type: Boolean,
|
|
2415
|
+
default: !1
|
|
2416
|
+
}
|
|
2417
|
+
},
|
|
2418
|
+
emits: ["swap"],
|
|
2419
|
+
setup(e, { emit: o }) {
|
|
2420
|
+
const t = ze(), n = o;
|
|
2421
|
+
return (s, r) => e.isBidirect ? (w(), $("button", {
|
|
2422
|
+
key: 1,
|
|
2423
|
+
onClick: r[0] || (r[0] = (i) => n("swap")),
|
|
2424
|
+
disabled: V(t).loading
|
|
2425
|
+
}, _s, 8, gs)) : (w(), $("button", {
|
|
2426
|
+
key: 0,
|
|
2427
|
+
disabled: V(t).loading
|
|
2428
|
+
}, ms, 8, vs));
|
|
2429
|
+
}
|
|
2430
|
+
}, Ue = He("language", () => {
|
|
2412
2431
|
const e = E("auto"), o = E("en"), t = E({
|
|
2413
2432
|
src: [],
|
|
2414
2433
|
target: []
|
|
2415
|
-
}), n = S(() => t.value.src[e.value]),
|
|
2434
|
+
}), n = S(() => t.value.src[e.value]), s = S(() => t.value.target[o.value]);
|
|
2416
2435
|
function r(a, u) {
|
|
2417
2436
|
e.value = a == null ? void 0 : a.src, o.value = a == null ? void 0 : a.target, t.value = u;
|
|
2418
2437
|
}
|
|
@@ -2421,63 +2440,63 @@ const ze = He("language", () => {
|
|
|
2421
2440
|
const a = e.value;
|
|
2422
2441
|
e.value = o.value, o.value = a;
|
|
2423
2442
|
}
|
|
2424
|
-
function
|
|
2443
|
+
function l(a) {
|
|
2425
2444
|
return t.value.src[a] || t.value.target[a];
|
|
2426
2445
|
}
|
|
2427
|
-
return { languages: t, src: e, target: o, srcLabel: n, targetLabel:
|
|
2428
|
-
}),
|
|
2446
|
+
return { languages: t, src: e, target: o, srcLabel: n, targetLabel: s, init: r, swap: i, getLabel: l };
|
|
2447
|
+
}), Cs = {
|
|
2429
2448
|
key: 0,
|
|
2430
2449
|
class: "flex"
|
|
2431
|
-
},
|
|
2450
|
+
}, ys = {
|
|
2432
2451
|
__name: "Selects",
|
|
2433
2452
|
setup(e) {
|
|
2434
|
-
const o =
|
|
2453
|
+
const o = Ue();
|
|
2435
2454
|
function t() {
|
|
2436
2455
|
o.swap();
|
|
2437
2456
|
}
|
|
2438
|
-
return (n,
|
|
2439
|
-
H(
|
|
2440
|
-
modelValue:
|
|
2441
|
-
"onUpdate:modelValue":
|
|
2442
|
-
languages:
|
|
2457
|
+
return (n, s) => V(o).languages ? (w(), $("div", Cs, [
|
|
2458
|
+
H(wt, {
|
|
2459
|
+
modelValue: V(o).src,
|
|
2460
|
+
"onUpdate:modelValue": s[0] || (s[0] = (r) => V(o).src = r),
|
|
2461
|
+
languages: V(o).languages.src,
|
|
2443
2462
|
class: "grow"
|
|
2444
2463
|
}, null, 8, ["modelValue", "languages"]),
|
|
2445
|
-
H(
|
|
2446
|
-
isBidirect:
|
|
2464
|
+
H(xs, {
|
|
2465
|
+
isBidirect: V(o).src !== "auto",
|
|
2447
2466
|
class: "grow-0 mx-3",
|
|
2448
2467
|
onSwap: t
|
|
2449
2468
|
}, null, 8, ["isBidirect"]),
|
|
2450
|
-
H(
|
|
2451
|
-
modelValue:
|
|
2452
|
-
"onUpdate:modelValue":
|
|
2453
|
-
languages:
|
|
2469
|
+
H(wt, {
|
|
2470
|
+
modelValue: V(o).target,
|
|
2471
|
+
"onUpdate:modelValue": s[1] || (s[1] = (r) => V(o).target = r),
|
|
2472
|
+
languages: V(o).languages.target,
|
|
2454
2473
|
class: "grow"
|
|
2455
2474
|
}, null, 8, ["modelValue", "languages"])
|
|
2456
2475
|
])) : X("", !0);
|
|
2457
2476
|
}
|
|
2458
|
-
},
|
|
2477
|
+
}, ws = {
|
|
2459
2478
|
INPUT_MAX_LENGTH: 5e3,
|
|
2460
2479
|
INPUT_DEBOUNCE: 500
|
|
2461
|
-
},
|
|
2480
|
+
}, Ze = (e, o) => {
|
|
2462
2481
|
const t = e.__vccOpts || e;
|
|
2463
|
-
for (const [n,
|
|
2464
|
-
t[n] =
|
|
2482
|
+
for (const [n, s] of o)
|
|
2483
|
+
t[n] = s;
|
|
2465
2484
|
return t;
|
|
2466
|
-
},
|
|
2467
|
-
function
|
|
2468
|
-
return w(), $("span",
|
|
2485
|
+
}, Ss = {}, Es = { class: "mr-2 loading loading-dots loading-xs" };
|
|
2486
|
+
function Os(e, o) {
|
|
2487
|
+
return w(), $("span", Es);
|
|
2469
2488
|
}
|
|
2470
|
-
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", () => {
|
|
2471
2490
|
const e = E({
|
|
2472
2491
|
src: null,
|
|
2473
2492
|
target: null
|
|
2474
2493
|
});
|
|
2475
|
-
function o(
|
|
2476
|
-
|
|
2494
|
+
function o(s) {
|
|
2495
|
+
s.src && (e.value.src = s.src), s.target && (e.value.target = s.target);
|
|
2477
2496
|
}
|
|
2478
|
-
function t(
|
|
2479
|
-
if (
|
|
2480
|
-
if (
|
|
2497
|
+
function t(s) {
|
|
2498
|
+
if (s === "src") return e.value.src;
|
|
2499
|
+
if (s === "target") return e.value.target;
|
|
2481
2500
|
}
|
|
2482
2501
|
function n() {
|
|
2483
2502
|
e.value = {
|
|
@@ -2491,17 +2510,17 @@ const yl = /* @__PURE__ */ Ue(Cl, [["render", xl]]), wl = "data:image/svg+xml,%3
|
|
|
2491
2510
|
get: t,
|
|
2492
2511
|
reset: n
|
|
2493
2512
|
};
|
|
2494
|
-
}),
|
|
2495
|
-
src:
|
|
2513
|
+
}), Ls = /* @__PURE__ */ g("img", {
|
|
2514
|
+
src: Ts,
|
|
2496
2515
|
alt: "Play"
|
|
2497
|
-
}, null, -1),
|
|
2498
|
-
|
|
2499
|
-
],
|
|
2500
|
-
src:
|
|
2516
|
+
}, null, -1), Ps = [
|
|
2517
|
+
Ls
|
|
2518
|
+
], Rs = /* @__PURE__ */ g("img", {
|
|
2519
|
+
src: Is,
|
|
2501
2520
|
alt: "Stop"
|
|
2502
|
-
}, null, -1),
|
|
2503
|
-
|
|
2504
|
-
],
|
|
2521
|
+
}, null, -1), Vs = [
|
|
2522
|
+
Rs
|
|
2523
|
+
], ks = {
|
|
2505
2524
|
__name: "SpeakBtn",
|
|
2506
2525
|
props: {
|
|
2507
2526
|
type: {
|
|
@@ -2511,7 +2530,7 @@ const yl = /* @__PURE__ */ Ue(Cl, [["render", xl]]), wl = "data:image/svg+xml,%3
|
|
|
2511
2530
|
},
|
|
2512
2531
|
emits: ["loadTTS"],
|
|
2513
2532
|
setup(e, { emit: o }) {
|
|
2514
|
-
const t =
|
|
2533
|
+
const t = un(), n = e, s = o, r = S(() => t.tts[n.type]), i = E(!1), l = new Audio();
|
|
2515
2534
|
F(
|
|
2516
2535
|
r,
|
|
2517
2536
|
() => {
|
|
@@ -2522,71 +2541,71 @@ const yl = /* @__PURE__ */ Ue(Cl, [["render", xl]]), wl = "data:image/svg+xml,%3
|
|
|
2522
2541
|
u();
|
|
2523
2542
|
},
|
|
2524
2543
|
{ immediate: !0 }
|
|
2525
|
-
),
|
|
2526
|
-
|
|
2544
|
+
), nt(() => {
|
|
2545
|
+
c(), l.src = "";
|
|
2527
2546
|
});
|
|
2528
2547
|
function a() {
|
|
2529
2548
|
if (r.value) {
|
|
2530
2549
|
u();
|
|
2531
2550
|
return;
|
|
2532
2551
|
}
|
|
2533
|
-
i.value = !0,
|
|
2552
|
+
i.value = !0, s("loadTTS");
|
|
2534
2553
|
}
|
|
2535
2554
|
function u() {
|
|
2536
|
-
r.value && (
|
|
2555
|
+
r.value && (l.src = r.value, i.value = !0, l.play().catch(() => {
|
|
2537
2556
|
i.value = !1;
|
|
2538
2557
|
}));
|
|
2539
2558
|
}
|
|
2540
|
-
function
|
|
2541
|
-
|
|
2559
|
+
function c() {
|
|
2560
|
+
l.pause(), l.currentTime = 0, i.value = !1;
|
|
2542
2561
|
}
|
|
2543
|
-
return
|
|
2562
|
+
return l.onended = () => {
|
|
2544
2563
|
i.value = !1;
|
|
2545
|
-
}, (p,
|
|
2564
|
+
}, (p, _) => i.value ? (w(), $("button", {
|
|
2546
2565
|
key: 1,
|
|
2547
2566
|
class: "btn btn-xs btn-ghost btn-circle",
|
|
2548
|
-
onClick:
|
|
2549
|
-
},
|
|
2567
|
+
onClick: dt(c, ["prevent"])
|
|
2568
|
+
}, Vs)) : (w(), $("button", {
|
|
2550
2569
|
key: 0,
|
|
2551
2570
|
class: "btn btn-xs btn-ghost btn-circle",
|
|
2552
|
-
onClick:
|
|
2553
|
-
},
|
|
2571
|
+
onClick: dt(a, ["prevent"])
|
|
2572
|
+
}, Ps));
|
|
2554
2573
|
}
|
|
2555
|
-
},
|
|
2556
|
-
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__ */ g("img", {
|
|
2575
|
+
src: Ms,
|
|
2557
2576
|
alt: "Clear",
|
|
2558
2577
|
class: "w-4"
|
|
2559
|
-
}, null, -1),
|
|
2560
|
-
|
|
2578
|
+
}, null, -1), Fs = [
|
|
2579
|
+
As
|
|
2561
2580
|
];
|
|
2562
|
-
function
|
|
2563
|
-
return w(), $("button",
|
|
2581
|
+
function js(e, o) {
|
|
2582
|
+
return w(), $("button", Ds, Fs);
|
|
2564
2583
|
}
|
|
2565
|
-
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 = {
|
|
2566
2585
|
key: 0,
|
|
2567
|
-
src:
|
|
2586
|
+
src: Hs,
|
|
2568
2587
|
alt: "Clear",
|
|
2569
2588
|
class: "w-4"
|
|
2570
|
-
},
|
|
2589
|
+
}, Ws = {
|
|
2571
2590
|
key: 1,
|
|
2572
|
-
src:
|
|
2591
|
+
src: zs,
|
|
2573
2592
|
alt: "Clear",
|
|
2574
2593
|
class: "w-4"
|
|
2575
|
-
},
|
|
2594
|
+
}, Gs = {
|
|
2576
2595
|
__name: "FavoriteBtn",
|
|
2577
2596
|
props: {
|
|
2578
2597
|
isFilled: Boolean
|
|
2579
2598
|
},
|
|
2580
2599
|
setup(e) {
|
|
2581
2600
|
const o = e;
|
|
2582
|
-
return (t, n) => (w(), $("button",
|
|
2583
|
-
o.isFilled ? (w(), $("img",
|
|
2601
|
+
return (t, n) => (w(), $("button", Us, [
|
|
2602
|
+
o.isFilled ? (w(), $("img", Zs)) : (w(), $("img", Ws))
|
|
2584
2603
|
]));
|
|
2585
2604
|
}
|
|
2586
|
-
},
|
|
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 = {
|
|
2587
2606
|
key: 0,
|
|
2588
2607
|
class: "italic"
|
|
2589
|
-
},
|
|
2608
|
+
}, Ys = /* @__PURE__ */ g("div", { class: "flex-grow" }, null, -1), cn = {
|
|
2590
2609
|
__name: "TranslationBtnGroup",
|
|
2591
2610
|
props: {
|
|
2592
2611
|
loading: {
|
|
@@ -2630,23 +2649,23 @@ const Nl = /* @__PURE__ */ Ue(Pl, [["render", Rl]]), Al = "data:image/svg+xml,%3
|
|
|
2630
2649
|
emits: ["clear", "favorite", "loadTTS"],
|
|
2631
2650
|
setup(e, { emit: o }) {
|
|
2632
2651
|
const t = e, n = o;
|
|
2633
|
-
return (
|
|
2634
|
-
t.src ? (w(), ee(
|
|
2652
|
+
return (s, r) => (w(), $("div", qs, [
|
|
2653
|
+
t.src ? (w(), ee(ks, {
|
|
2635
2654
|
key: 0,
|
|
2636
2655
|
type: t.type,
|
|
2637
2656
|
onLoadTTS: r[0] || (r[0] = (i) => n("loadTTS"))
|
|
2638
2657
|
}, null, 8, ["type"])) : X("", !0),
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
e.phonetic ? (w(), $("span",
|
|
2658
|
+
g("div", Js, [
|
|
2659
|
+
gn(te(e.srcLabel) + " ", 1),
|
|
2660
|
+
e.phonetic ? (w(), $("span", Ks, "- [" + te(t.phonetic) + "]", 1)) : X("", !0)
|
|
2642
2661
|
]),
|
|
2643
|
-
|
|
2644
|
-
t.loading ? (w(), ee(
|
|
2645
|
-
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, {
|
|
2646
2665
|
key: 2,
|
|
2647
2666
|
onClick: r[1] || (r[1] = (i) => n("clear"))
|
|
2648
2667
|
})) : X("", !0),
|
|
2649
|
-
t.src && t.isFavoriteBtn ? (w(), ee(
|
|
2668
|
+
t.src && t.isFavoriteBtn ? (w(), ee(Gs, {
|
|
2650
2669
|
key: 3,
|
|
2651
2670
|
isFilled: t.isFavorite,
|
|
2652
2671
|
onClick: r[2] || (r[2] = (i) => n("favorite"))
|
|
@@ -2657,18 +2676,18 @@ const Nl = /* @__PURE__ */ Ue(Pl, [["render", Rl]]), Al = "data:image/svg+xml,%3
|
|
|
2657
2676
|
const e = E(null), o = E(null), t = E(null), n = E({
|
|
2658
2677
|
src: null,
|
|
2659
2678
|
target: null
|
|
2660
|
-
}),
|
|
2679
|
+
}), s = E(null), r = E([]), i = E([]), l = E([]), a = E([]), u = E({
|
|
2661
2680
|
src: null,
|
|
2662
2681
|
target: null
|
|
2663
|
-
}),
|
|
2664
|
-
function
|
|
2665
|
-
e.value =
|
|
2682
|
+
}), c = Ue(), p = S(() => c.getLabel(e.value)), _ = S(() => c.getLabel(o.value));
|
|
2683
|
+
function C(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;
|
|
2666
2685
|
}
|
|
2667
|
-
function
|
|
2686
|
+
function h() {
|
|
2668
2687
|
e.value = null, o.value = null, t.value = null, n.value = {
|
|
2669
2688
|
src: null,
|
|
2670
2689
|
target: null
|
|
2671
|
-
},
|
|
2690
|
+
}, s.value = null, r.value = [], i.value = [], l.value = [], a.value = [], u.value = {
|
|
2672
2691
|
src: null,
|
|
2673
2692
|
target: null
|
|
2674
2693
|
};
|
|
@@ -2677,118 +2696,118 @@ const Nl = /* @__PURE__ */ Ue(Pl, [["render", Rl]]), Al = "data:image/svg+xml,%3
|
|
|
2677
2696
|
src: e,
|
|
2678
2697
|
srcLabel: p,
|
|
2679
2698
|
target: o,
|
|
2680
|
-
targetLabel:
|
|
2699
|
+
targetLabel: _,
|
|
2681
2700
|
phonetic: n,
|
|
2682
2701
|
text: t,
|
|
2683
|
-
result:
|
|
2702
|
+
result: s,
|
|
2684
2703
|
dictionary: r,
|
|
2685
2704
|
definitions: i,
|
|
2686
|
-
synonyms:
|
|
2705
|
+
synonyms: l,
|
|
2687
2706
|
examples: a,
|
|
2688
2707
|
tts: u,
|
|
2689
|
-
init:
|
|
2690
|
-
reset:
|
|
2708
|
+
init: C,
|
|
2709
|
+
reset: h
|
|
2691
2710
|
};
|
|
2692
2711
|
});
|
|
2693
|
-
function
|
|
2694
|
-
return
|
|
2712
|
+
function Qs(e) {
|
|
2713
|
+
return Pt() ? (tt(e), !0) : !1;
|
|
2695
2714
|
}
|
|
2696
2715
|
function Fe(e) {
|
|
2697
|
-
return typeof e == "function" ? e() :
|
|
2716
|
+
return typeof e == "function" ? e() : V(e);
|
|
2698
2717
|
}
|
|
2699
|
-
const
|
|
2718
|
+
const Xs = typeof window < "u" && typeof document < "u";
|
|
2700
2719
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2701
|
-
const
|
|
2720
|
+
const St = () => {
|
|
2702
2721
|
};
|
|
2703
|
-
function
|
|
2722
|
+
function el(e, o) {
|
|
2704
2723
|
function t(...n) {
|
|
2705
|
-
return new Promise((
|
|
2706
|
-
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);
|
|
2707
2726
|
});
|
|
2708
2727
|
}
|
|
2709
2728
|
return t;
|
|
2710
2729
|
}
|
|
2711
|
-
function
|
|
2712
|
-
let t, n,
|
|
2713
|
-
const r = (
|
|
2714
|
-
clearTimeout(
|
|
2730
|
+
function tl(e, o = {}) {
|
|
2731
|
+
let t, n, s = St;
|
|
2732
|
+
const r = (l) => {
|
|
2733
|
+
clearTimeout(l), s(), s = St;
|
|
2715
2734
|
};
|
|
2716
|
-
return (
|
|
2735
|
+
return (l) => {
|
|
2717
2736
|
const a = Fe(e), u = Fe(o.maxWait);
|
|
2718
|
-
return t && r(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (r(n), n = null), Promise.resolve(
|
|
2719
|
-
|
|
2720
|
-
t && r(t), n = null,
|
|
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());
|
|
2721
2740
|
}, u)), t = setTimeout(() => {
|
|
2722
|
-
n && r(n), n = null,
|
|
2741
|
+
n && r(n), n = null, c(l());
|
|
2723
2742
|
}, a);
|
|
2724
2743
|
});
|
|
2725
2744
|
};
|
|
2726
2745
|
}
|
|
2727
|
-
function
|
|
2728
|
-
return
|
|
2729
|
-
|
|
2746
|
+
function nl(e, o = 200, t = {}) {
|
|
2747
|
+
return el(
|
|
2748
|
+
tl(o, t),
|
|
2730
2749
|
e
|
|
2731
2750
|
);
|
|
2732
2751
|
}
|
|
2733
|
-
function
|
|
2752
|
+
function Et(e) {
|
|
2734
2753
|
var o;
|
|
2735
2754
|
const t = Fe(e);
|
|
2736
2755
|
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
2737
2756
|
}
|
|
2738
|
-
const
|
|
2739
|
-
function
|
|
2740
|
-
const e = E(!1), o =
|
|
2741
|
-
return o &&
|
|
2757
|
+
const ol = Xs ? window : void 0;
|
|
2758
|
+
function sl() {
|
|
2759
|
+
const e = E(!1), o = Lt();
|
|
2760
|
+
return o && Ce(() => {
|
|
2742
2761
|
e.value = !0;
|
|
2743
2762
|
}, o), e;
|
|
2744
2763
|
}
|
|
2745
|
-
function
|
|
2746
|
-
const o =
|
|
2764
|
+
function ll(e) {
|
|
2765
|
+
const o = sl();
|
|
2747
2766
|
return S(() => (o.value, !!e()));
|
|
2748
2767
|
}
|
|
2749
|
-
function
|
|
2750
|
-
const { window: n =
|
|
2768
|
+
function rl(e, o, t = {}) {
|
|
2769
|
+
const { window: n = ol, ...s } = t;
|
|
2751
2770
|
let r;
|
|
2752
|
-
const i =
|
|
2771
|
+
const i = ll(() => n && "ResizeObserver" in n), l = () => {
|
|
2753
2772
|
r && (r.disconnect(), r = void 0);
|
|
2754
|
-
}, a = S(() => Array.isArray(e) ? e.map((p) =>
|
|
2773
|
+
}, a = S(() => Array.isArray(e) ? e.map((p) => Et(p)) : [Et(e)]), u = F(
|
|
2755
2774
|
a,
|
|
2756
2775
|
(p) => {
|
|
2757
|
-
if (
|
|
2776
|
+
if (l(), i.value && n) {
|
|
2758
2777
|
r = new ResizeObserver(o);
|
|
2759
|
-
for (const
|
|
2760
|
-
|
|
2778
|
+
for (const _ of p)
|
|
2779
|
+
_ && r.observe(_, s);
|
|
2761
2780
|
}
|
|
2762
2781
|
},
|
|
2763
2782
|
{ immediate: !0, flush: "post" }
|
|
2764
|
-
),
|
|
2765
|
-
|
|
2783
|
+
), c = () => {
|
|
2784
|
+
l(), u();
|
|
2766
2785
|
};
|
|
2767
|
-
return
|
|
2786
|
+
return Qs(c), {
|
|
2768
2787
|
isSupported: i,
|
|
2769
|
-
stop:
|
|
2788
|
+
stop: c
|
|
2770
2789
|
};
|
|
2771
2790
|
}
|
|
2772
|
-
function
|
|
2791
|
+
function dn(e) {
|
|
2773
2792
|
var o;
|
|
2774
|
-
const t = E(e == null ? void 0 : e.element), n = E(e == null ? void 0 : e.input),
|
|
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);
|
|
2775
2794
|
function i() {
|
|
2776
|
-
var
|
|
2795
|
+
var l;
|
|
2777
2796
|
if (!t.value)
|
|
2778
2797
|
return;
|
|
2779
2798
|
let a = "";
|
|
2780
|
-
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;
|
|
2781
2800
|
}
|
|
2782
2801
|
return F([n, t], () => Q(i), { immediate: !0 }), F(r, () => {
|
|
2783
|
-
var
|
|
2784
|
-
return (
|
|
2785
|
-
}),
|
|
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 }), {
|
|
2786
2805
|
textarea: t,
|
|
2787
2806
|
input: n,
|
|
2788
2807
|
triggerResize: i
|
|
2789
2808
|
};
|
|
2790
2809
|
}
|
|
2791
|
-
const
|
|
2810
|
+
const il = {
|
|
2792
2811
|
__name: "TranslationInput",
|
|
2793
2812
|
props: {
|
|
2794
2813
|
text: {
|
|
@@ -2798,151 +2817,151 @@ const ns = {
|
|
|
2798
2817
|
},
|
|
2799
2818
|
emits: ["change", "clear", "loadTTS"],
|
|
2800
2819
|
setup(e, { emit: o }) {
|
|
2801
|
-
const t = he(), n = e,
|
|
2802
|
-
var
|
|
2803
|
-
return (
|
|
2804
|
-
}), { textarea: a } =
|
|
2805
|
-
u("change",
|
|
2806
|
-
},
|
|
2820
|
+
const t = he(), n = e, s = E(""), r = S(() => t.src), i = S(() => t.srcLabel), l = S(() => {
|
|
2821
|
+
var h;
|
|
2822
|
+
return (h = t.phonetic) == null ? void 0 : h.src;
|
|
2823
|
+
}), { textarea: a } = dn({ input: s, styleProp: "minHeight" }), u = o, c = nl(() => {
|
|
2824
|
+
u("change", s.value);
|
|
2825
|
+
}, ws.INPUT_DEBOUNCE);
|
|
2807
2826
|
function p() {
|
|
2808
|
-
if (!
|
|
2809
|
-
|
|
2827
|
+
if (!s.value) {
|
|
2828
|
+
_();
|
|
2810
2829
|
return;
|
|
2811
2830
|
}
|
|
2812
|
-
|
|
2831
|
+
c();
|
|
2813
2832
|
}
|
|
2814
|
-
function
|
|
2815
|
-
u("clear"),
|
|
2833
|
+
function _() {
|
|
2834
|
+
u("clear"), s.value = "", a.value.focus();
|
|
2816
2835
|
}
|
|
2817
|
-
async function
|
|
2836
|
+
async function C() {
|
|
2818
2837
|
await Q(), a.value.select();
|
|
2819
2838
|
}
|
|
2820
2839
|
return F(
|
|
2821
2840
|
() => n.text,
|
|
2822
|
-
(
|
|
2823
|
-
|
|
2841
|
+
(h) => {
|
|
2842
|
+
s.value !== h && C(), s.value = h;
|
|
2824
2843
|
}
|
|
2825
|
-
), (
|
|
2826
|
-
H(
|
|
2844
|
+
), (h, v) => (w(), $(Z, null, [
|
|
2845
|
+
H(cn, {
|
|
2827
2846
|
src: r.value,
|
|
2828
2847
|
srcLabel: i.value,
|
|
2829
2848
|
type: "src",
|
|
2830
|
-
phonetic:
|
|
2849
|
+
phonetic: l.value,
|
|
2831
2850
|
isClearBtn: !0,
|
|
2832
|
-
onClear:
|
|
2833
|
-
onLoadTTS:
|
|
2851
|
+
onClear: _,
|
|
2852
|
+
onLoadTTS: v[0] || (v[0] = (T) => u("loadTTS"))
|
|
2834
2853
|
}, null, 8, ["src", "srcLabel", "phonetic"]),
|
|
2835
|
-
|
|
2854
|
+
Rt(g("textarea", {
|
|
2836
2855
|
ref_key: "textarea",
|
|
2837
2856
|
ref: a,
|
|
2838
|
-
"onUpdate:modelValue":
|
|
2857
|
+
"onUpdate:modelValue": v[1] || (v[1] = (T) => s.value = T),
|
|
2839
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",
|
|
2840
2859
|
autofocus: "",
|
|
2841
2860
|
rows: "2",
|
|
2842
2861
|
onInput: p,
|
|
2843
|
-
onFocus:
|
|
2862
|
+
onFocus: C
|
|
2844
2863
|
}, null, 544), [
|
|
2845
2864
|
[
|
|
2846
|
-
|
|
2847
|
-
|
|
2865
|
+
Vt,
|
|
2866
|
+
s.value,
|
|
2848
2867
|
void 0,
|
|
2849
2868
|
{ trim: !0 }
|
|
2850
2869
|
]
|
|
2851
2870
|
])
|
|
2852
2871
|
], 64));
|
|
2853
2872
|
}
|
|
2854
|
-
},
|
|
2873
|
+
}, al = /* @__PURE__ */ Ze(il, [["__scopeId", "data-v-90bf3e0d"]]), ul = (e) => (bn("data-v-4b9f4a7b"), e = e(), _n(), e), cl = { class: "flex flex-col" }, dl = /* @__PURE__ */ ul(() => /* @__PURE__ */ g("div", { class: "w-full flex align-item-center justify-end mt-2" }, null, -1)), fl = {
|
|
2855
2874
|
__name: "TranslationResult",
|
|
2856
2875
|
props: {
|
|
2857
2876
|
isFavoriteFeatureEnabled: Boolean
|
|
2858
2877
|
},
|
|
2859
2878
|
emits: ["loadTTS"],
|
|
2860
2879
|
setup(e, { emit: o }) {
|
|
2861
|
-
const t = he(), n = E(!1),
|
|
2862
|
-
var
|
|
2863
|
-
return (
|
|
2864
|
-
}), a = e, u =
|
|
2865
|
-
return (
|
|
2866
|
-
H(
|
|
2867
|
-
loading:
|
|
2880
|
+
const t = he(), n = E(!1), s = S(() => t.result), r = S(() => t.target), i = S(() => t.targetLabel), l = S(() => {
|
|
2881
|
+
var C;
|
|
2882
|
+
return (C = t.phonetic) == null ? void 0 : C.target;
|
|
2883
|
+
}), a = e, u = ze(), { textarea: c, input: p } = dn({ input: s, styleProp: "minHeight" }), _ = o;
|
|
2884
|
+
return (C, h) => (w(), $(Z, null, [
|
|
2885
|
+
H(cn, {
|
|
2886
|
+
loading: V(u).loading,
|
|
2868
2887
|
src: r.value,
|
|
2869
2888
|
srcLabel: i.value,
|
|
2870
2889
|
type: "target",
|
|
2871
2890
|
isFavoriteBtn: a.isFavoriteFeatureEnabled,
|
|
2872
2891
|
isFavorite: n.value,
|
|
2873
|
-
phonetic:
|
|
2874
|
-
onFavorite:
|
|
2875
|
-
onLoadTTS:
|
|
2892
|
+
phonetic: l.value,
|
|
2893
|
+
onFavorite: h[0] || (h[0] = (v) => n.value = !n.value),
|
|
2894
|
+
onLoadTTS: h[1] || (h[1] = (v) => _("loadTTS"))
|
|
2876
2895
|
}, null, 8, ["loading", "src", "srcLabel", "isFavoriteBtn", "isFavorite", "phonetic"]),
|
|
2877
|
-
|
|
2878
|
-
|
|
2896
|
+
g("div", cl, [
|
|
2897
|
+
Rt(g("textarea", {
|
|
2879
2898
|
ref_key: "textarea",
|
|
2880
|
-
ref:
|
|
2881
|
-
"onUpdate:modelValue":
|
|
2899
|
+
ref: c,
|
|
2900
|
+
"onUpdate:modelValue": h[2] || (h[2] = (v) => _e(p) ? p.value = v : null),
|
|
2882
2901
|
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",
|
|
2883
2902
|
readonly: "",
|
|
2884
2903
|
rows: "2",
|
|
2885
2904
|
spellcheck: "false"
|
|
2886
2905
|
}, null, 512), [
|
|
2887
|
-
[
|
|
2906
|
+
[Vt, V(p)]
|
|
2888
2907
|
]),
|
|
2889
|
-
|
|
2908
|
+
dl
|
|
2890
2909
|
])
|
|
2891
2910
|
], 64));
|
|
2892
2911
|
}
|
|
2893
|
-
},
|
|
2912
|
+
}, pl = /* @__PURE__ */ Ze(fl, [["__scopeId", "data-v-4b9f4a7b"]]), vl = { class: "btn btn-sm btn-circle btn-ghost" }, We = {
|
|
2894
2913
|
__name: "ToggleBtn",
|
|
2895
2914
|
props: {
|
|
2896
2915
|
isExpanded: Boolean
|
|
2897
2916
|
},
|
|
2898
2917
|
setup(e) {
|
|
2899
2918
|
const o = e;
|
|
2900
|
-
return (t, n) => (w(), $("button",
|
|
2901
|
-
o.isExpanded ? (w(), ee(
|
|
2919
|
+
return (t, n) => (w(), $("button", vl, [
|
|
2920
|
+
o.isExpanded ? (w(), ee(V(Fo), {
|
|
2902
2921
|
key: 0,
|
|
2903
2922
|
class: "w-7 text-gray-400"
|
|
2904
|
-
})) : (w(), ee(
|
|
2923
|
+
})) : (w(), ee(V(Do), {
|
|
2905
2924
|
key: 1,
|
|
2906
2925
|
class: "w-7 text-gray-400"
|
|
2907
2926
|
}))
|
|
2908
2927
|
]));
|
|
2909
2928
|
}
|
|
2910
|
-
},
|
|
2929
|
+
}, 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__ */ g("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Translations", -1), _l = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, xl = { class: "list-none list-inside" }, Cl = ["onClick"], yl = { class: "text-base font-normal text-gray-800 leading-4" }, wl = {
|
|
2911
2930
|
__name: "Dictionary",
|
|
2912
2931
|
emits: ["translate"],
|
|
2913
2932
|
setup(e, { emit: o }) {
|
|
2914
|
-
const t = E(!0), n = he(),
|
|
2933
|
+
const t = E(!0), n = he(), s = Ue(), r = S(() => n.dictionary), i = o, l = () => {
|
|
2915
2934
|
t.value = !t.value;
|
|
2916
2935
|
}, a = (u) => {
|
|
2917
|
-
i("translate", u, n.target, n.src),
|
|
2936
|
+
i("translate", u, n.target, n.src), s.src = n.target, s.target = n.src, window.scrollTo(0, 0);
|
|
2918
2937
|
};
|
|
2919
|
-
return (u,
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
H(
|
|
2938
|
+
return (u, c) => (w(), $("div", hl, [
|
|
2939
|
+
g("div", ml, [
|
|
2940
|
+
g("div", gl, [
|
|
2941
|
+
bl,
|
|
2942
|
+
H(We, {
|
|
2924
2943
|
isExpanded: t.value,
|
|
2925
|
-
onClick:
|
|
2944
|
+
onClick: l
|
|
2926
2945
|
}, null, 8, ["isExpanded"])
|
|
2927
2946
|
]),
|
|
2928
|
-
|
|
2929
|
-
class:
|
|
2947
|
+
g("div", {
|
|
2948
|
+
class: xe(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2930
2949
|
}, [
|
|
2931
|
-
|
|
2932
|
-
(w(!0), $(Z, null,
|
|
2933
|
-
key: `${p.pos}-${
|
|
2950
|
+
g("ul", null, [
|
|
2951
|
+
(w(!0), $(Z, null, le(r.value, (p, _) => (w(), $("li", {
|
|
2952
|
+
key: `${p.pos}-${_}`,
|
|
2934
2953
|
class: "mb-2"
|
|
2935
2954
|
}, [
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
(w(!0), $(Z, null,
|
|
2939
|
-
key: `${
|
|
2955
|
+
g("h5", _l, te(p.pos), 1),
|
|
2956
|
+
g("ul", xl, [
|
|
2957
|
+
(w(!0), $(Z, null, le(p.items, (C, h) => (w(), $("li", {
|
|
2958
|
+
key: `${C.word}-${h}`
|
|
2940
2959
|
}, [
|
|
2941
|
-
|
|
2960
|
+
g("span", {
|
|
2942
2961
|
class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
2943
|
-
onClick: (
|
|
2944
|
-
}, te(
|
|
2945
|
-
|
|
2962
|
+
onClick: (v) => a(C.word)
|
|
2963
|
+
}, te(C.word), 9, Cl),
|
|
2964
|
+
g("small", yl, " - " + te(C.reverse_translation.join(", ")), 1)
|
|
2946
2965
|
]))), 128))
|
|
2947
2966
|
])
|
|
2948
2967
|
]))), 128))
|
|
@@ -2951,41 +2970,41 @@ const ns = {
|
|
|
2951
2970
|
])
|
|
2952
2971
|
]));
|
|
2953
2972
|
}
|
|
2954
|
-
},
|
|
2973
|
+
}, 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__ */ g("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__ */ g("br", null, null, -1), Pl = {
|
|
2955
2974
|
key: 0,
|
|
2956
2975
|
class: "italic"
|
|
2957
|
-
},
|
|
2976
|
+
}, Rl = {
|
|
2958
2977
|
__name: "Definition",
|
|
2959
2978
|
setup(e) {
|
|
2960
|
-
const o = E(!0), t = he(), n = S(() => t.definitions),
|
|
2979
|
+
const o = E(!0), t = he(), n = S(() => t.definitions), s = () => {
|
|
2961
2980
|
o.value = !o.value;
|
|
2962
2981
|
};
|
|
2963
|
-
return (r, i) => (w(), $("div",
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
H(
|
|
2982
|
+
return (r, i) => (w(), $("div", Sl, [
|
|
2983
|
+
g("div", El, [
|
|
2984
|
+
g("div", Ol, [
|
|
2985
|
+
$l,
|
|
2986
|
+
H(We, {
|
|
2968
2987
|
isExpanded: o.value,
|
|
2969
|
-
onClick:
|
|
2988
|
+
onClick: s
|
|
2970
2989
|
}, null, 8, ["isExpanded"])
|
|
2971
2990
|
]),
|
|
2972
|
-
|
|
2973
|
-
class:
|
|
2991
|
+
g("div", {
|
|
2992
|
+
class: xe(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2974
2993
|
}, [
|
|
2975
|
-
|
|
2976
|
-
(w(!0), $(Z, null,
|
|
2977
|
-
key: `${
|
|
2994
|
+
g("ul", null, [
|
|
2995
|
+
(w(!0), $(Z, null, le(n.value, (l, a) => (w(), $("li", {
|
|
2996
|
+
key: `${l.pos}-${a}`,
|
|
2978
2997
|
class: "mb-2"
|
|
2979
2998
|
}, [
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
(w(!0), $(Z, null,
|
|
2983
|
-
key: `${u.gloss}-${
|
|
2999
|
+
g("h5", Tl, te(l.pos), 1),
|
|
3000
|
+
g("ul", Il, [
|
|
3001
|
+
(w(!0), $(Z, null, le(l.items, (u, c) => (w(), $("li", {
|
|
3002
|
+
key: `${u.gloss}-${c}`,
|
|
2984
3003
|
class: "mb-1"
|
|
2985
3004
|
}, [
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
u.example ? (w(), $("small",
|
|
3005
|
+
g("span", null, te(u.gloss), 1),
|
|
3006
|
+
Ll,
|
|
3007
|
+
u.example ? (w(), $("small", Pl, '"' + te(u.example) + '"', 1)) : X("", !0)
|
|
2989
3008
|
]))), 128))
|
|
2990
3009
|
])
|
|
2991
3010
|
]))), 128))
|
|
@@ -2994,72 +3013,72 @@ const ns = {
|
|
|
2994
3013
|
])
|
|
2995
3014
|
]));
|
|
2996
3015
|
}
|
|
2997
|
-
},
|
|
3016
|
+
}, 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__ */ g("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 = {
|
|
2998
3017
|
__name: "Example",
|
|
2999
3018
|
setup(e) {
|
|
3000
|
-
const o = E(!0), t = he(), n = S(() => t.examples),
|
|
3019
|
+
const o = E(!0), t = he(), n = S(() => t.examples), s = () => {
|
|
3001
3020
|
o.value = !o.value;
|
|
3002
3021
|
};
|
|
3003
|
-
return (r, i) => (w(), $("div",
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
H(
|
|
3022
|
+
return (r, i) => (w(), $("div", Vl, [
|
|
3023
|
+
g("div", kl, [
|
|
3024
|
+
g("div", Ml, [
|
|
3025
|
+
Nl,
|
|
3026
|
+
H(We, {
|
|
3008
3027
|
isExpanded: o.value,
|
|
3009
|
-
onClick:
|
|
3028
|
+
onClick: s
|
|
3010
3029
|
}, null, 8, ["isExpanded"])
|
|
3011
3030
|
]),
|
|
3012
|
-
|
|
3013
|
-
class:
|
|
3031
|
+
g("div", {
|
|
3032
|
+
class: xe(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3014
3033
|
}, [
|
|
3015
|
-
|
|
3016
|
-
(w(!0), $(Z, null,
|
|
3017
|
-
key: `${
|
|
3018
|
-
innerHTML:
|
|
3019
|
-
}, null, 8,
|
|
3034
|
+
g("ul", Dl, [
|
|
3035
|
+
(w(!0), $(Z, null, le(n.value, (l, a) => (w(), $("li", {
|
|
3036
|
+
key: `${l.definition_id}-${a}`,
|
|
3037
|
+
innerHTML: l
|
|
3038
|
+
}, null, 8, Al))), 128))
|
|
3020
3039
|
])
|
|
3021
3040
|
], 2)
|
|
3022
3041
|
])
|
|
3023
3042
|
]));
|
|
3024
3043
|
}
|
|
3025
|
-
},
|
|
3044
|
+
}, 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__ */ g("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 = {
|
|
3026
3045
|
__name: "Synonyms",
|
|
3027
3046
|
emits: ["translate"],
|
|
3028
3047
|
setup(e, { emit: o }) {
|
|
3029
|
-
const t = E(!0), n = he(),
|
|
3048
|
+
const t = E(!0), n = he(), s = S(() => n.synonyms), r = o, i = () => {
|
|
3030
3049
|
t.value = !t.value;
|
|
3031
|
-
},
|
|
3050
|
+
}, l = (a) => {
|
|
3032
3051
|
r("translate", a), window.scrollTo(0, 0);
|
|
3033
3052
|
};
|
|
3034
|
-
return (a, u) => (w(), $("div",
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
H(
|
|
3053
|
+
return (a, u) => (w(), $("div", jl, [
|
|
3054
|
+
g("div", Bl, [
|
|
3055
|
+
g("div", Hl, [
|
|
3056
|
+
zl,
|
|
3057
|
+
H(We, {
|
|
3039
3058
|
isExpanded: t.value,
|
|
3040
3059
|
onClick: i
|
|
3041
3060
|
}, null, 8, ["isExpanded"])
|
|
3042
3061
|
]),
|
|
3043
|
-
|
|
3044
|
-
class:
|
|
3062
|
+
g("div", {
|
|
3063
|
+
class: xe(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3045
3064
|
}, [
|
|
3046
|
-
|
|
3047
|
-
(w(!0), $(Z, null,
|
|
3048
|
-
key: `${
|
|
3065
|
+
g("ul", null, [
|
|
3066
|
+
(w(!0), $(Z, null, le(s.value, (c, p) => (w(), $("li", {
|
|
3067
|
+
key: `${c.pos}-${p}`,
|
|
3049
3068
|
class: "mb-2"
|
|
3050
3069
|
}, [
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
(w(!0), $(Z, null,
|
|
3054
|
-
key: `${
|
|
3070
|
+
g("h5", Ul, te(c.pos), 1),
|
|
3071
|
+
g("ul", Zl, [
|
|
3072
|
+
(w(!0), $(Z, null, le(c.items, (_, C) => (w(), $("li", {
|
|
3073
|
+
key: `${_.word}-${C}`,
|
|
3055
3074
|
class: "mb-2"
|
|
3056
3075
|
}, [
|
|
3057
|
-
|
|
3058
|
-
(w(!0), $(Z, null,
|
|
3059
|
-
key: `${
|
|
3076
|
+
g("div", Wl, [
|
|
3077
|
+
(w(!0), $(Z, null, le(_.synonym, (h, v) => (w(), $("span", {
|
|
3078
|
+
key: `${h}-${v}`,
|
|
3060
3079
|
class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3061
|
-
onClick: (
|
|
3062
|
-
}, te(
|
|
3080
|
+
onClick: (T) => l(h)
|
|
3081
|
+
}, te(h), 9, Gl))), 128))
|
|
3063
3082
|
])
|
|
3064
3083
|
]))), 128))
|
|
3065
3084
|
])
|
|
@@ -3069,13 +3088,23 @@ const ns = {
|
|
|
3069
3088
|
])
|
|
3070
3089
|
]));
|
|
3071
3090
|
}
|
|
3072
|
-
}
|
|
3091
|
+
};
|
|
3092
|
+
function Jl() {
|
|
3093
|
+
document.documentElement.setAttribute("dir", "rtl");
|
|
3094
|
+
}
|
|
3095
|
+
function Kl() {
|
|
3096
|
+
document.documentElement.removeAttribute("dir");
|
|
3097
|
+
}
|
|
3098
|
+
const Ot = {
|
|
3099
|
+
supportRTL: Jl,
|
|
3100
|
+
removeRTL: Kl
|
|
3101
|
+
}, 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__ */ g("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 = {
|
|
3073
3102
|
key: 0,
|
|
3074
3103
|
class: "w-full my-4"
|
|
3075
|
-
},
|
|
3104
|
+
}, i2 = {
|
|
3076
3105
|
key: 1,
|
|
3077
3106
|
class: "text-textCustom italic font-medium"
|
|
3078
|
-
},
|
|
3107
|
+
}, c2 = {
|
|
3079
3108
|
__name: "Popup",
|
|
3080
3109
|
props: {
|
|
3081
3110
|
opt: {
|
|
@@ -3101,94 +3130,100 @@ const ns = {
|
|
|
3101
3130
|
},
|
|
3102
3131
|
emits: ["opt", "translate", "reader", "settings", "fullscreen", "loadTTS"],
|
|
3103
3132
|
setup(e, { emit: o }) {
|
|
3104
|
-
const t =
|
|
3133
|
+
const t = cs(), n = he(t), s = un(t), r = Ue(t), i = ze(t), l = e, a = o, u = E(""), c = () => {
|
|
3134
|
+
const v = l.opt.target;
|
|
3135
|
+
Yl.includes(v) ? Ot.supportRTL() : Ot.removeRTL();
|
|
3136
|
+
};
|
|
3105
3137
|
F(
|
|
3106
|
-
() =>
|
|
3138
|
+
() => l.translation,
|
|
3107
3139
|
(v) => {
|
|
3108
|
-
i.loading = !1, u.value = v.text, n.init(v),
|
|
3140
|
+
v && (i.loading = !1, u.value = v.text, n.init(v), s.reset());
|
|
3109
3141
|
},
|
|
3110
3142
|
{ immediate: !0 }
|
|
3111
3143
|
), F(
|
|
3112
|
-
() =>
|
|
3144
|
+
() => l.tts,
|
|
3113
3145
|
(v) => {
|
|
3114
3146
|
if (!v) {
|
|
3115
|
-
|
|
3147
|
+
s.reset();
|
|
3116
3148
|
return;
|
|
3117
3149
|
}
|
|
3118
|
-
|
|
3150
|
+
s.set(v);
|
|
3119
3151
|
},
|
|
3120
3152
|
{ immediate: !0 }
|
|
3121
|
-
), F([() =>
|
|
3122
|
-
r.init(v,
|
|
3123
|
-
}), F([() => r.src, () => r.target], ([v,
|
|
3124
|
-
a("opt", { src: v, target:
|
|
3125
|
-
}),
|
|
3126
|
-
r.init(
|
|
3153
|
+
), F([() => l.opt, () => l.languages], ([v, T]) => {
|
|
3154
|
+
r.init(v, T), c();
|
|
3155
|
+
}), F([() => r.src, () => r.target], ([v, T]) => {
|
|
3156
|
+
a("opt", { src: v, target: T }), h(u.value);
|
|
3157
|
+
}), Ce(() => {
|
|
3158
|
+
r.init(l.opt, l.languages), c();
|
|
3127
3159
|
});
|
|
3128
|
-
function
|
|
3160
|
+
function p() {
|
|
3129
3161
|
u.value = "", n.reset();
|
|
3130
3162
|
}
|
|
3131
|
-
function
|
|
3132
|
-
|
|
3163
|
+
function _(v) {
|
|
3164
|
+
h(v);
|
|
3133
3165
|
}
|
|
3134
|
-
function
|
|
3135
|
-
const
|
|
3136
|
-
a("loadTTS", { type: v, data:
|
|
3166
|
+
function C(v) {
|
|
3167
|
+
const T = v === "src" ? n.text : n.result;
|
|
3168
|
+
a("loadTTS", { type: v, data: T });
|
|
3137
3169
|
}
|
|
3138
|
-
function
|
|
3170
|
+
function h(v, T = r.src, N = r.target) {
|
|
3139
3171
|
v && (u.value = v, i.loading = !0, a("translate", {
|
|
3140
|
-
src:
|
|
3141
|
-
target:
|
|
3172
|
+
src: T,
|
|
3173
|
+
target: N,
|
|
3142
3174
|
text: v
|
|
3143
3175
|
}));
|
|
3144
3176
|
}
|
|
3145
|
-
return (v,
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
H(gl, { class: "my-4" }),
|
|
3155
|
-
C("div", Gs, [
|
|
3156
|
-
C("div", qs, [
|
|
3157
|
-
H(os, {
|
|
3158
|
-
text: u.value,
|
|
3159
|
-
onChange: p,
|
|
3160
|
-
onClear: f,
|
|
3161
|
-
onLoadTTS: h[3] || (h[3] = (V) => m("src"))
|
|
3162
|
-
}, null, 8, ["text"])
|
|
3163
|
-
]),
|
|
3164
|
-
Js,
|
|
3165
|
-
C("div", Ks, [
|
|
3166
|
-
H(as, {
|
|
3167
|
-
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
3168
|
-
onLoadTTS: h[4] || (h[4] = (V) => m("target"))
|
|
3169
|
-
}, null, 8, ["isFavoriteFeatureEnabled"])
|
|
3170
|
-
])
|
|
3177
|
+
return (v, T) => {
|
|
3178
|
+
var N, I, k, D;
|
|
3179
|
+
return w(), $("div", Ql, [
|
|
3180
|
+
g("div", Xl, [
|
|
3181
|
+
H(Nn, {
|
|
3182
|
+
onReader: T[0] || (T[0] = (m) => a("reader")),
|
|
3183
|
+
onSettings: T[1] || (T[1] = (m) => a("settings")),
|
|
3184
|
+
onFullScreen: T[2] || (T[2] = (m) => a("fullscreen"))
|
|
3185
|
+
})
|
|
3171
3186
|
]),
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3187
|
+
g("div", e2, [
|
|
3188
|
+
H(ys, { class: "my-4" }),
|
|
3189
|
+
g("div", t2, [
|
|
3190
|
+
g("div", n2, [
|
|
3191
|
+
H(al, {
|
|
3192
|
+
text: u.value,
|
|
3193
|
+
onChange: _,
|
|
3194
|
+
onClear: p,
|
|
3195
|
+
onLoadTTS: T[3] || (T[3] = (m) => C("src"))
|
|
3196
|
+
}, null, 8, ["text"])
|
|
3197
|
+
]),
|
|
3198
|
+
o2,
|
|
3199
|
+
g("div", s2, [
|
|
3200
|
+
H(pl, {
|
|
3201
|
+
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
3202
|
+
onLoadTTS: T[4] || (T[4] = (m) => C("target"))
|
|
3203
|
+
}, null, 8, ["isFavoriteFeatureEnabled"])
|
|
3204
|
+
])
|
|
3183
3205
|
]),
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3206
|
+
l.translation ? (w(), $(Z, { key: 0 }, [
|
|
3207
|
+
g("div", l2, [
|
|
3208
|
+
(N = V(n).dictionary) != null && N.length ? (w(), ee(wl, {
|
|
3209
|
+
key: 0,
|
|
3210
|
+
onTranslate: h
|
|
3211
|
+
})) : X("", !0),
|
|
3212
|
+
(I = V(n).definitions) != null && I.length ? (w(), ee(Rl, { key: 1 })) : X("", !0),
|
|
3213
|
+
(k = V(n).synonyms) != null && k.length ? (w(), ee(ql, {
|
|
3214
|
+
key: 2,
|
|
3215
|
+
onTranslate: h
|
|
3216
|
+
})) : X("", !0)
|
|
3217
|
+
]),
|
|
3218
|
+
(D = V(n).examples) != null && D.length ? (w(), $("div", r2, [
|
|
3219
|
+
H(Fl)
|
|
3220
|
+
])) : X("", !0)
|
|
3221
|
+
], 64)) : (w(), $("span", i2, "Service unavailable"))
|
|
3222
|
+
])
|
|
3223
|
+
]);
|
|
3224
|
+
};
|
|
3190
3225
|
}
|
|
3191
3226
|
};
|
|
3192
3227
|
export {
|
|
3193
|
-
|
|
3228
|
+
c2 as default
|
|
3194
3229
|
};
|