@flux-ui/application 3.0.0-next.52 → 3.0.0-next.54
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/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["x","G","K","num","hue","c","num","c","definition","linearize","gamma","fn","fn","definition","rgb","definition","k","e","k","e","fn","e","k","f","e","k","definition","definition","definition","hue","c","definition","definition","definition","parseHwb","definition","p","d0","n","p","n","definition","definition","k","k","f","k","definition","definition","lab","definition","definition","lch","u_fn","v_fn","un","vn","k","k","definition","definition","rgb","definition","modeHsl","modeHsv","definition","lab","definition","lch","definition","rgb","gamma","linearize","definition","rgb","α","β","definition","rgb","transfer","definition","definition","definition","modeA98","modeCubehelix","modeDlab","modeDlch","modeHsi","modeHsl","modeHsv","modeHwb","modeItp","modeJab","modeJch","modeLab","modeLab65","modeLch","modeLch65","modeLchuv","modeLrgb","modeLuv","modeOklab","modeOklch","modeP3","modeProphoto","modeRec2020","modeRgb","modeXyb","modeXyz50","modeXyz65","modeYiq","h","y","x","C","O","k","A","fe","pe","a","o","n","i","r","#e","#t","#n","#r","#i","e","f","u","p","f","d"],"sources":["../../../node_modules/.bun/@basmilius+utils@3.19.0/node_modules/@basmilius/utils/dist/index.mjs","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseNumber.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/colors/named.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseNamed.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseHex.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/util/regex.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseRgbLegacy.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/_prepare.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/converter.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/modes.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/parse.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseTransparent.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/interpolate/lerp.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/interpolate/piecewise.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/interpolate/linear.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/fixup/alpha.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/a98/convertA98ToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/a98/convertXyz65ToA98.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lrgb/convertRgbToLrgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/convertRgbToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lrgb/convertLrgbToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/convertXyz65ToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/a98/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/util/normalizeHue.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/fixup/hue.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/cubehelix/constants.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/cubehelix/convertRgbToCubehelix.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/cubehelix/convertCubehelixToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/difference.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/average.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/cubehelix/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch/convertLabToLch.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch/convertLchToLab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/constants.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/constants.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertLab65ToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertLab65ToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertXyz65ToLab65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertRgbToLab65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlch/constants.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlch/convertDlchToLab65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlch/convertLab65ToDlch.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlab/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlch/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsi/convertHsiToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsi/convertRgbToHsi.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsi/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/convertHslToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/convertRgbToHsl.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/util/hue.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/parseHslLegacy.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/parseHsl.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsv/convertHsvToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsv/convertRgbToHsv.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsv/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hwb/convertHwbToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hwb/convertRgbToHwb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hwb/parseHwb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hwb/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hdr/transfer.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/itp/convertItpToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/itp/convertXyz65ToItp.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/itp/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/convertXyz65ToJab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/convertJabToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/convertRgbToJab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/convertJabToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jch/convertJabToJch.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jch/convertJchToJab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jch/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz50/constants.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertLabToXyz50.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz50/convertXyz50ToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertLabToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz50/convertRgbToXyz50.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertXyz50ToLab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertRgbToLab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/parseLab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch/parseLch.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch65/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lchuv/convertLuvToLchuv.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lchuv/convertLchuvToLuv.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/luv/convertXyz50ToLuv.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/luv/convertLuvToXyz50.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lchuv/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lrgb/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/luv/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/convertLrgbToOklab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/convertRgbToOklab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/convertOklabToLrgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/convertOklabToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsl/helpers.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsl/convertOklabToOkhsl.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsl/convertOkhslToOklab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsl/modeOkhsl.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsv/convertOklabToOkhsv.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsv/convertOkhsvToOklab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsv/modeOkhsv.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/parseOklab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklch/parseOklch.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklch/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/p3/convertP3ToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/p3/convertXyz65ToP3.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/p3/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/prophoto/convertXyz50ToProphoto.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/prophoto/convertProphotoToXyz50.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/prophoto/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rec2020/convertXyz65ToRec2020.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rec2020/convertRec2020ToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rec2020/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyb/constants.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyb/convertRgbToXyb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyb/convertXybToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyb/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz50/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/convertXyz65ToXyz50.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/convertXyz50ToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/yiq/convertRgbToYiq.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/yiq/convertYiqToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/yiq/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/index.js","../../../node_modules/.bun/@basmilius+http-client@3.19.0+7524df1edfed9f02/node_modules/@basmilius/http-client/dist/index.mjs","../../../node_modules/.bun/vue-router@5.0.6+b33d84df931f4fef/node_modules/vue-router/dist/useApi-DtucMc-S.js","../../../node_modules/.bun/vue-router@5.0.6+b33d84df931f4fef/node_modules/vue-router/dist/devtools-BPov6AZY.js","../../../node_modules/.bun/vue-router@5.0.6+b33d84df931f4fef/node_modules/vue-router/dist/vue-router.js","../../../node_modules/.bun/@basmilius+common@3.19.0+594c8e13831cfe0c/node_modules/@basmilius/common/dist/index.mjs","../../internals/dist/composable-CJXC7sly.js","../src/data/index.ts","../src/routing/useRoute.ts","../src/routing/useNamedRoutes.ts","../src/css/component/Application.module.scss","../src/component/FluxApplication.vue","../src/component/FluxApplication.vue","../../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../src/composable/useApplicationContextMenu.ts","../src/composable/useApplicationInjection.ts","../src/composable/useApplicationMenu.ts","../src/css/component/ApplicationContent.module.scss","../src/component/FluxApplicationContent.vue","../src/component/FluxApplicationContent.vue","../src/css/component/ApplicationHero.module.scss","../src/component/FluxApplicationHero.vue","../src/component/FluxApplicationHero.vue","../src/css/component/ApplicationMenu.module.scss","../src/component/FluxApplicationMenu.vue","../src/component/FluxApplicationMenu.vue","../src/component/FluxApplicationMenuAccount.vue","../src/component/FluxApplicationMenuAccount.vue","../src/composable/useApplicationContextRegistration.ts","../src/component/FluxApplicationMenuContext.vue","../src/component/FluxApplicationMenuContext.vue","../src/component/FluxApplicationMenuContextStack.vue","../src/component/FluxApplicationMenuContextStack.vue","../src/component/FluxApplicationMenuPromo.vue","../src/component/FluxApplicationMenuPromo.vue","../src/component/FluxApplicationMenuToggle.vue","../src/component/FluxApplicationMenuToggle.vue","../src/css/component/ApplicationSection.module.scss","../src/component/FluxApplicationSection.vue","../src/component/FluxApplicationSection.vue","../src/css/component/ApplicationSide.module.scss","../src/component/FluxApplicationSide.vue","../src/component/FluxApplicationSide.vue","../src/css/component/ApplicationTop.module.scss","../src/component/FluxApplicationTop.vue","../src/component/FluxApplicationTop.vue"],"sourcesContent":["import{DateTime as e}from\"luxon\";function t(e,t){return Math.round(e/t)*t}function n(e,n,r,i){return Math.max(n,Math.min(r,+t(e*(r-n)+n,i).toPrecision(4)))}function r(e){return e.toString().split(`.`)[1]?.length??0}function i(e,t,n){let r=[],i=[],a;return(...o)=>(clearTimeout(a),a=setTimeout(async()=>{try{let t=await e.apply(n,o);r.forEach(e=>e(t))}catch(e){i.forEach(t=>t(e))}r=[],i=[]},t),new Promise((e,t)=>{r.push(e),i.push(t)}))}function a(e,t){if(!e.startsWith(`https://`)&&!e.startsWith(`http://`)&&!e.startsWith(`blob:`))throw Error(`Unsupported URL scheme for download: ${e}`);let n=document.createElement(`a`);n.download=t,n.href=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function o(e,t){let n=URL.createObjectURL(e);a(n,t),URL.revokeObjectURL(n)}function s(e,t,n){o(new Blob([e],{type:n}),t)}function c(e){return e.toLocaleString({year:`numeric`,month:`long`,day:`numeric`})}function l(e){return e.toLocaleString({weekday:`long`,day:`numeric`,month:`long`})}function u(e){return e.toLocaleString({year:`numeric`,month:`long`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function d(e){return e.toLocaleString({month:`long`})}function f(e){return e.toLocaleString({month:`long`,year:`numeric`})}function p(e,t=0){let n=typeof navigator<`u`?navigator.language:`nl-NL`;return new Intl.NumberFormat(n,{maximumFractionDigits:t,minimumFractionDigits:t}).format(e)}function m(e){return new Intl.NumberFormat(navigator.language,{maximumFractionDigits:1,minimumFractionDigits:0,style:`percent`}).format(e)}function h(e){return e.toLocaleString({hour:`2-digit`,minute:`2-digit`})}function g(e,t,n=5,r){let i=[1,5,10,25,50,100,250,500,1e3,2500,5e3,1e4],a=[.1,.5,...i],o=t-e,s=r?a:i;for(let r of s){let i=Math.floor(o/r),a=[];if(!(i>n+1)){a.push(e);for(let t=1;t<i;++t)a.push(t*r+e);return a.push(t),a}}let c=10**(o.toString().length-1),l=[];for(let t=0;t<o;t+=c)l.push(t+e);return l}function _(e){return e.hour>=6&&e.hour<10?`alert`:e.hour>=10&&e.hour<18?`focused`:e.hour>=18&&e.hour<22?`wind_down`:`sleep`}function v(e){return e.hour>=5&&e.hour<12?`morning`:e.hour>=12&&e.hour<17?`afternoon`:e.hour>=17&&e.hour<22?`evening`:`night`}function y(t){let n=e.now();switch(t){case`afternoon`:return[n.set({hour:12,minute:0,second:0,millisecond:0}),n.set({hour:17,minute:0,second:0,millisecond:0})];case`evening`:return[n.set({hour:17,minute:0,second:0,millisecond:0}),n.set({hour:22,minute:0,second:0,millisecond:0})];case`morning`:return[n.set({hour:5,minute:0,second:0,millisecond:0}),n.set({hour:12,minute:0,second:0,millisecond:0})];case`night`:return[n.set({hour:22,minute:0,second:0,millisecond:0}),n.set({hour:22,minute:0,second:0,millisecond:0}).plus({hours:7})]}}function b(e){let t=e.year%100;t%=19,t>9&&(t-=19),t=t*11%30+e.month+e.day,e.month<3&&(t+=2),e.year<2e3?t-=4:t-=8.3,t=Math.floor(t+.5)%30;let n=(t<0?t+30:t)/29.530588853;return n<.03||n>.97?`new_moon`:n<.22?`waxing_crescent`:n<.28?`first_quarter`:n<.47?`waxing_gibbous`:n<.53?`full_moon`:n<.72?`waning_gibbous`:n<.78?`last_quarter`:`waning_crescent`}function x(e){let t={};do{if(e.name===``)break;for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(e.prototype)))[`constructor`,`clone`,`toJSON`].includes(n)||!r.get&&!r.set||(t[n]=r)}while(e=Object.getPrototypeOf(e));return t}const S={af:[`Afghanistan`,33,65],ax:[`Åland Islands`,60.116667,19.9],al:[`Albania`,41,20],dz:[`Algeria`,28,3],as:[`American Samoa`,-14.3333,-170],ad:[`Andorra`,42.5,1.6],ao:[`Angola`,-12.5,18.5],ai:[`Anguilla`,18.25,-63.1667],aq:[`Antarctica`,-90,0],ag:[`Antigua and Barbuda`,17.05,-61.8],ar:[`Argentina`,-34,-64],am:[`Armenia`,40,45],aw:[`Aruba`,12.5,-69.9667],au:[`Australia`,-27,133],at:[`Austria`,47.3333,13.3333],az:[`Azerbaijan`,40.5,47.5],bs:[`Bahamas`,24.25,-76],bh:[`Bahrain`,26,50.55],bd:[`Bangladesh`,24,90],bb:[`Barbados`,13.1667,-59.5333],by:[`Belarus`,53,28],be:[`Belgium`,50.8333,4],bz:[`Belize`,17.25,-88.75],bj:[`Benin`,9.5,2.25],bm:[`Bermuda`,32.3333,-64.75],bt:[`Bhutan`,27.5,90.5],bo:[`Bolivia`,-17,-65],bq:[`Bonaire, Sint Eustatius and Saba`,12.183333,-68.233333],ba:[`Bosnia and Herzegovina`,44,18],bw:[`Botswana`,-22,24],bv:[`Bouvet Island`,-54.4333,3.4],br:[`Brazil`,-10,-55],io:[`British Indian Ocean Territory`,-6,71.5],bn:[`Brunei`,4.5,114.6667],bg:[`Bulgaria`,43,25],bf:[`Burkina Faso`,13,-2],bi:[`Burundi`,-3.5,30],kh:[`Cambodia`,13,105],cm:[`Cameroon`,6,12],ca:[`Canada`,60,-95],cv:[`Cape Verde`,16,-24],ky:[`Cayman Islands`,19.5,-80.5],cf:[`Central African Republic`,7,21],td:[`Chad`,15,19],cl:[`Chile`,-30,-71],cn:[`China`,35,105],cx:[`Christmas Island`,-10.5,105.6667],cc:[`Cocos (Keeling) Islands`,-12.5,96.8333],co:[`Colombia`,4,-72],km:[`Comoros`,-12.1667,44.25],cd:[`Congo, Democratic Republic of the`,0,25],cg:[`Congo`,-1,15],ck:[`Cook Islands`,-21.2333,-159.7667],cr:[`Costa Rica`,10,-84],ci:[`Côte d'Ivoire`,8,-5],hr:[`Croatia`,45.1667,15.5],cu:[`Cuba`,21.5,-80],cw:[`Curaçao`,12.166667,-68.966667],cy:[`Cyprus`,35,33],cz:[`Czech Republic`,49.75,15.5],dk:[`Denmark`,56,10],dj:[`Djibouti`,11.5,43],dm:[`Dominica`,15.4167,-61.3333],do:[`Dominican Republic`,19,-70.6667],ec:[`Ecuador`,-2,-77.5],eg:[`Egypt`,27,30],sv:[`El Salvador`,13.8333,-88.9167],gq:[`Equatorial Guinea`,2,10],er:[`Eritrea`,15,39],ee:[`Estonia`,59,26],et:[`Ethiopia`,8,38],fk:[`Falkland Islands (Malvinas)`,-51.75,-59],fo:[`Faroe Islands`,62,-7],fj:[`Fiji`,-18,175],fi:[`Finland`,64,26],fr:[`France`,46,2],gf:[`French Guiana`,4,-53],pf:[`French Polynesia`,-15,-140],tf:[`French Southern Territories`,-43,67],ga:[`Gabon`,-1,11.75],gm:[`Gambia`,13.4667,-16.5667],ge:[`Georgia`,42,43.5],de:[`Germany`,51,9],gh:[`Ghana`,8,-2],gi:[`Gibraltar`,36.1833,-5.3667],gr:[`Greece`,39,22],gl:[`Greenland`,72,-40],gd:[`Grenada`,12.1167,-61.6667],gp:[`Guadeloupe`,16.25,-61.5833],gu:[`Guam`,13.4667,144.7833],gt:[`Guatemala`,15.5,-90.25],gg:[`Guernsey`,49.5,-2.56],gw:[`Guinea-Bissau`,12,-15],gn:[`Guinea`,11,-10],gy:[`Guyana`,5,-59],ht:[`Haiti`,19,-72.4167],hm:[`Heard Island and McDonald Islands`,-53.1,72.5167],va:[`Holy See`,41.9,12.45],hn:[`Honduras`,15,-86.5],hk:[`Hong Kong`,22.25,114.1667],hu:[`Hungary`,47,20],is:[`Iceland`,65,-18],in:[`India`,20,77],id:[`Indonesia`,-5,120],ir:[`Iran`,32,53],iq:[`Iraq`,33,44],ie:[`Ireland`,53,-8],im:[`Isle of Man`,54.23,-4.55],il:[`Israel`,31.5,34.75],it:[`Italy`,42.8333,12.8333],jm:[`Jamaica`,18.25,-77.5],jp:[`Japan`,36,138],je:[`Jersey`,49.21,-2.13],jo:[`Jordan`,31,36],kz:[`Kazakhstan`,48,68],ke:[`Kenya`,1,38],ki:[`Kiribati`,1.4167,173],kp:[`Korea, North`,40,127],kr:[`Korea, South`,37,127.5],xk:[`Kosovo`,42.583333,21],kw:[`Kuwait`,29.3375,47.6581],kg:[`Kyrgyzstan`,41,75],la:[`Laos`,18,105],lv:[`Latvia`,57,25],lb:[`Lebanon`,33.8333,35.8333],ls:[`Lesotho`,-29.5,28.5],lr:[`Liberia`,6.5,-9.5],ly:[`Libya`,25,17],li:[`Liechtenstein`,47.1667,9.5333],lt:[`Lithuania`,56,24],lu:[`Luxembourg`,49.75,6.1667],mo:[`Macao`,22.1667,113.55],mk:[`North Macedonia`,41.8333,22],mg:[`Madagascar`,-20,47],mw:[`Malawi`,-13.5,34],my:[`Malaysia`,2.5,112.5],mv:[`Maldives`,3.25,73],ml:[`Mali`,17,-4],mt:[`Malta`,35.8333,14.5833],mh:[`Marshall Islands`,9,168],mq:[`Martinique`,14.6667,-61],mr:[`Mauritania`,20,-12],mu:[`Mauritius`,-20.2833,57.55],yt:[`Mayotte`,-12.8333,45.1667],mx:[`Mexico`,23,-102],fm:[`Micronesia`,6.9167,158.25],md:[`Moldova`,47,29],mc:[`Monaco`,43.7333,7.4],mn:[`Mongolia`,46,105],me:[`Montenegro`,42,19],ms:[`Montserrat`,16.75,-62.2],ma:[`Morocco`,32,-5],mz:[`Mozambique`,-18.25,35],mm:[`Myanmar`,22,98],na:[`Namibia`,-22,17],nr:[`Nauru`,-.5333,166.9167],np:[`Nepal`,28,84],nl:[`Netherlands`,52.5,5.75],nc:[`New Caledonia`,-21.5,165.5],nz:[`New Zealand`,-41,174],ni:[`Nicaragua`,13,-85],ne:[`Niger`,16,8],ng:[`Nigeria`,10,8],nu:[`Niue`,-19.0333,-169.8667],nf:[`Norfolk Island`,-29.0333,167.95],mp:[`Northern Mariana Islands`,15.2,145.75],no:[`Norway`,62,10],om:[`Oman`,21,57],pk:[`Pakistan`,30,70],pw:[`Palau`,7.5,134.5],ps:[`Palestine`,32,35.25],pa:[`Panama`,9,-80],pg:[`Papua New Guinea`,-6,147],py:[`Paraguay`,-23,-58],pe:[`Peru`,-10,-76],ph:[`Philippines`,13,122],pn:[`Pitcairn`,-24.7,-127.4],pl:[`Poland`,52,20],pt:[`Portugal`,39.5,-8],pr:[`Puerto Rico`,18.25,-66.5],qa:[`Qatar`,25.5,51.25],re:[`Réunion`,-21.1,55.6],ro:[`Romania`,46,25],ru:[`Russia`,60,100],rw:[`Rwanda`,-2,30],bl:[`Saint Barthélemy`,17.897728,-62.834244],sh:[`Saint Helena`,-15.9333,-5.7],kn:[`Saint Kitts and Nevis`,17.3333,-62.75],lc:[`Saint Lucia`,13.8833,-61.1333],mf:[`Saint Martin`,18.075278,-63.06],pm:[`Saint Pierre and Miquelon`,46.8333,-56.3333],vc:[`Saint Vincent and the Grenadines`,13.25,-61.2],ws:[`Samoa`,-13.5833,-172.3333],sm:[`San Marino`,43.7667,12.4167],st:[`Sao Tome and Principe`,1,7],sa:[`Saudi Arabia`,25,45],sn:[`Senegal`,14,-14],rs:[`Serbia`,44,21],sc:[`Seychelles`,-4.5833,55.6667],sl:[`Sierra Leone`,8.5,-11.5],sg:[`Singapore`,1.3667,103.8],sx:[`Sint Maarten`,18.033333,-63.05],sk:[`Slovakia`,48.6667,19.5],si:[`Slovenia`,46,15],sb:[`Solomon Islands`,-8,159],so:[`Somalia`,10,49],za:[`South Africa`,-29,24],gs:[`South Georgia and the South Sandwich Islands`,-54.5,-37],ss:[`South Sudan`,8,30],es:[`Spain`,40,-4],lk:[`Sri Lanka`,7,81],sd:[`Sudan`,15,30],sr:[`Suriname`,4,-56],sj:[`Svalbard and Jan Mayen`,78,20],sz:[`Swaziland`,-26.5,31.5],se:[`Sweden`,62,15],ch:[`Switzerland`,47,8],sy:[`Syria`,35,38],tw:[`Taiwan`,23.5,121],tj:[`Tajikistan`,39,71],tz:[`Tanzania`,-6,35],th:[`Thailand`,15,100],tl:[`Timor-Leste`,-8.55,125.5167],tg:[`Togo`,8,1.1667],tk:[`Tokelau`,-9,-172],to:[`Tonga`,-20,-175],tt:[`Trinidad and Tobago`,11,-61],tn:[`Tunisia`,34,9],tr:[`Turkey`,39,35],tm:[`Turkmenistan`,40,60],tc:[`Turks and Caicos Islands`,21.75,-71.5833],tv:[`Tuvalu`,-8,178],ug:[`Uganda`,1,32],ua:[`Ukraine`,49,32],ae:[`United Arab Emirates`,24,54],gb:[`United Kingdom`,54,-2],um:[`United States Minor Outlying Islands`,19.2833,166.6],us:[`United States`,38,-97],uy:[`Uruguay`,-33,-56],uz:[`Uzbekistan`,41,64],vu:[`Vanuatu`,-16,167],ve:[`Venezuela`,8,-66],vn:[`Vietnam`,16,106],vg:[`Virgin Islands, British`,18.5,-64.5],vi:[`Virgin Islands, U.S.`,18.3333,-64.8333],wf:[`Wallis and Futuna`,-13.3,-176.2],eh:[`Western Sahara`,24.5,-13],ye:[`Yemen`,15,48],zm:[`Zambia`,-15,30],zw:[`Zimbabwe`,-20,30]};function C(e){return S[e]??null}function w(e){let t=C(e);if(!t)return null;let[,n]=t;return n>=0}const T={autumn:[9,10,11],spring:[3,4,5],summer:[6,7,8],winter:[12,1,2]},E={autumn:[3,4,5],spring:[9,10,11],summer:[12,1,2],winter:[6,7,8]};function D(e,t){let n=w(e),r=t.month,i=n?T:E;for(let e of[`autumn`,`spring`,`summer`,`winter`])if(i[e].includes(r))return e;return null}function O(e){switch(e){case`spring`:return`fresh`;case`summer`:return`energetic`;case`autumn`:return`cozy`;case`winter`:return`warm`}}function k(e){return e.weekday===6||e.weekday===7?`off`:e.hour>=9&&e.hour<12?`work`:e.hour>=12&&e.hour<13?`break`:e.hour>=13&&e.hour<17?`work`:`off`}function A(e){return e.month===3&&e.day>=21||e.month===4&&e.day<=19?`aries`:e.month===4&&e.day>=20||e.month===5&&e.day<=20?`taurus`:e.month===5&&e.day>=21||e.month===6&&e.day<=20?`gemini`:e.month===6&&e.day>=21||e.month===7&&e.day<=22?`cancer`:e.month===7&&e.day>=23||e.month===8&&e.day<=22?`leo`:e.month===8&&e.day>=23||e.month===9&&e.day<=22?`virgo`:e.month===9&&e.day>=23||e.month===10&&e.day<=22?`libra`:e.month===10&&e.day>=23||e.month===11&&e.day<=21?`scorpio`:e.month===11&&e.day>=22||e.month===12&&e.day<=21?`sagittarius`:e.month===12&&e.day>=22||e.month===1&&e.day<=19?`capricorn`:e.month===1&&e.day>=20||e.month===2&&e.day<=18?`aquarius`:`pisces`}function j(e){let t=parseInt(e.startsWith(`#`)?e.substring(1):e,16);return[t>>16&255,t>>8&255,t&255]}function M(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function N(e,t,n){let r,i,a;if(e/=360,t/=100,n/=100,t===0)r=i=a=n;else{let o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;r=M(s,o,e+1/3),i=M(s,o,e),a=M(s,o,e-1/3)}return r=Math.round(r*255),i=Math.round(i*255),a=Math.round(a*255),[r,i,a]}function P(e,t,n){e/=255,t/=255,n/=255;let r=Math.min(e,t,n),i=Math.max(e,t,n),a=i-r,o,s=i===0?0:a/i,c=i;return i===r?o=0:(o=i===e?(t-n)/a+(t<n?6:0):i===t?(n-e)/a+2:(e-t)/a+4,o/=6),[o,s,c]}function ee(e,t,n){return P(...N(e,t,n))}function F(e,t,n){let r=0,i=0,a=0,o=Math.floor(e*6),s=e*6-o,c=n*(1-t),l=n*(1-s*t),u=n*(1-(1-s)*t);switch(o%6){case 0:r=n,i=u,a=c;break;case 1:r=l,i=n,a=c;break;case 2:r=c,i=n,a=u;break;case 3:r=c,i=l,a=n;break;case 4:r=u,i=c,a=n;break;case 5:r=n,i=c,a=l;break}return r=Math.round(r*255),i=Math.round(i*255),a=Math.round(a*255),[r,i,a]}function I(e,t,n){e/=255,t/=255,n/=255;let r=Math.min(e,t,n),i=Math.max(e,t,n),a=i-r,o,s,c;return o=a===0?0:i===e?(t-n)/a%6:i===t?(n-e)/a+2:(e-t)/a+4,o=Math.round(o*60),o<0&&(o+=360),c=(i+r)/2,s=a===0?0:a/(1-Math.abs(2*c-1)),s=+(s*100).toFixed(1),c=+(c*100).toFixed(1),[o,s,c]}function L(e,t,n){return I(...F(e,t,n))}function R(e){return globalThis.document?e instanceof HTMLElement:!1}function z(e,t){let n=!1;for(let r=0,i=t.length-1;r<t.length;i=r++){let a=t[r][0],o=t[r][1],s=t[i][0],c=t[i][1];o>e[1]!=c>e[1]&&e[0]<(s-a)*(e[1]-o)/(c-o)+a&&(n=!n)}return n}function B(e,t){return t.hasSame(e,`day`)}function V(e){let t=new Uint32Array(1);t[0]=e;function n(){let e=t[0]=t[0]+1831565813|0,n=Math.imul(e^e>>>15,1|e);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}function r(e,t){return n()*(t-e)+e}function i(){return V(n()*2**32)}return{fork:i,next:n,nextBetween:r}}function H(e){window.location===window.parent.location?window.location.href=e:window.open(e,`_top`)}async function U(e){let t=document.createElement(`iframe`);t.style.position=`fixed`,t.style.top=`-100dvh`,t.style.left=`-100dvw`,t.style.width=`1px`,t.style.height=`1px`,document.body.appendChild(t);let n=t.contentDocument??t.contentWindow?.document;if(!n)throw document.body.removeChild(t),Error(`Cannot print, no access to the framed document.`);n.documentElement.innerHTML=e;let r=Array.from(n.getElementsByTagName(`img`));await Promise.all(r.map(e=>new Promise(t=>{e.complete?t(void 0):(e.addEventListener(`load`,t,{passive:!0}),e.addEventListener(`error`,t,{passive:!0}))}))),t.contentWindow?.print(),setTimeout(()=>{document.body.removeChild(t)},1e3)}function W(e,t,n){return`#${e.toString(16).padStart(2,`0`)}${t.toString(16).padStart(2,`0`)}${n.toString(16).padStart(2,`0`)}`}function G(e,t,n){e.prototype[t]=n}function K(e,t,n){Object.defineProperty(e,t,{value:n})}function q(e){`startViewTransition`in document?document.startViewTransition(e):e()}async function J(e){return new Promise(t=>setTimeout(t,e))}const Y=`✔`,X=`✘`,Z=`—`,Q=`–`,$=()=>void 0;export{Y as CHECK,X as CROSS,Z as MDASH,Q as NDASH,$ as NOOP,n as clampWithStepPrecision,r as countDecimals,i as debounce,o as downloadBlob,s as downloadString,a as downloadUrl,c as formatDate,l as formatDateFull,u as formatDateTime,d as formatMonth,f as formatMonthYear,p as formatNumber,m as formatPercentage,h as formatTime,g as generateStepTicks,_ as getCircadianPhase,v as getDayPeriod,y as getDayPeriodRange,b as getMoonPhase,x as getPrototypeChain,D as getSeason,O as getSeasonalMood,k as getWorkdayPeriod,A as getZodiacSign,j as hexToRGB,ee as hslToHSV,N as hslToRGB,L as hsvToHSL,F as hsvToRGB,M as hueToRGB,R as isHtmlElement,w as isNorthernHemisphere,z as isPointInPolygon,B as isToday,V as mulberry32,H as openUrl,U as printHtml,W as rgbToHEX,I as rgbToHSL,P as rgbToHSV,t as roundStep,G as setObjectMethod,K as setObjectValue,q as viewTransition,J as waitFor};\n//# sourceMappingURL=index.mjs.map","const parseNumber = (color, len) => {\n\tif (typeof color !== 'number') return;\n\n\t// hex3: #c93 -> #cc9933\n\tif (len === 3) {\n\t\treturn {\n\t\t\tmode: 'rgb',\n\t\t\tr: (((color >> 8) & 0xf) | ((color >> 4) & 0xf0)) / 255,\n\t\t\tg: (((color >> 4) & 0xf) | (color & 0xf0)) / 255,\n\t\t\tb: ((color & 0xf) | ((color << 4) & 0xf0)) / 255\n\t\t};\n\t}\n\n\t// hex4: #c931 -> #cc993311\n\tif (len === 4) {\n\t\treturn {\n\t\t\tmode: 'rgb',\n\t\t\tr: (((color >> 12) & 0xf) | ((color >> 8) & 0xf0)) / 255,\n\t\t\tg: (((color >> 8) & 0xf) | ((color >> 4) & 0xf0)) / 255,\n\t\t\tb: (((color >> 4) & 0xf) | (color & 0xf0)) / 255,\n\t\t\talpha: ((color & 0xf) | ((color << 4) & 0xf0)) / 255\n\t\t};\n\t}\n\n\t// hex6: #f0f1f2\n\tif (len === 6) {\n\t\treturn {\n\t\t\tmode: 'rgb',\n\t\t\tr: ((color >> 16) & 0xff) / 255,\n\t\t\tg: ((color >> 8) & 0xff) / 255,\n\t\t\tb: (color & 0xff) / 255\n\t\t};\n\t}\n\n\t// hex8: #f0f1f2ff\n\tif (len === 8) {\n\t\treturn {\n\t\t\tmode: 'rgb',\n\t\t\tr: ((color >> 24) & 0xff) / 255,\n\t\t\tg: ((color >> 16) & 0xff) / 255,\n\t\t\tb: ((color >> 8) & 0xff) / 255,\n\t\t\talpha: (color & 0xff) / 255\n\t\t};\n\t}\n};\n\nexport default parseNumber;\n","const named = {\n\taliceblue: 0xf0f8ff,\n\tantiquewhite: 0xfaebd7,\n\taqua: 0x00ffff,\n\taquamarine: 0x7fffd4,\n\tazure: 0xf0ffff,\n\tbeige: 0xf5f5dc,\n\tbisque: 0xffe4c4,\n\tblack: 0x000000,\n\tblanchedalmond: 0xffebcd,\n\tblue: 0x0000ff,\n\tblueviolet: 0x8a2be2,\n\tbrown: 0xa52a2a,\n\tburlywood: 0xdeb887,\n\tcadetblue: 0x5f9ea0,\n\tchartreuse: 0x7fff00,\n\tchocolate: 0xd2691e,\n\tcoral: 0xff7f50,\n\tcornflowerblue: 0x6495ed,\n\tcornsilk: 0xfff8dc,\n\tcrimson: 0xdc143c,\n\tcyan: 0x00ffff,\n\tdarkblue: 0x00008b,\n\tdarkcyan: 0x008b8b,\n\tdarkgoldenrod: 0xb8860b,\n\tdarkgray: 0xa9a9a9,\n\tdarkgreen: 0x006400,\n\tdarkgrey: 0xa9a9a9,\n\tdarkkhaki: 0xbdb76b,\n\tdarkmagenta: 0x8b008b,\n\tdarkolivegreen: 0x556b2f,\n\tdarkorange: 0xff8c00,\n\tdarkorchid: 0x9932cc,\n\tdarkred: 0x8b0000,\n\tdarksalmon: 0xe9967a,\n\tdarkseagreen: 0x8fbc8f,\n\tdarkslateblue: 0x483d8b,\n\tdarkslategray: 0x2f4f4f,\n\tdarkslategrey: 0x2f4f4f,\n\tdarkturquoise: 0x00ced1,\n\tdarkviolet: 0x9400d3,\n\tdeeppink: 0xff1493,\n\tdeepskyblue: 0x00bfff,\n\tdimgray: 0x696969,\n\tdimgrey: 0x696969,\n\tdodgerblue: 0x1e90ff,\n\tfirebrick: 0xb22222,\n\tfloralwhite: 0xfffaf0,\n\tforestgreen: 0x228b22,\n\tfuchsia: 0xff00ff,\n\tgainsboro: 0xdcdcdc,\n\tghostwhite: 0xf8f8ff,\n\tgold: 0xffd700,\n\tgoldenrod: 0xdaa520,\n\tgray: 0x808080,\n\tgreen: 0x008000,\n\tgreenyellow: 0xadff2f,\n\tgrey: 0x808080,\n\thoneydew: 0xf0fff0,\n\thotpink: 0xff69b4,\n\tindianred: 0xcd5c5c,\n\tindigo: 0x4b0082,\n\tivory: 0xfffff0,\n\tkhaki: 0xf0e68c,\n\tlavender: 0xe6e6fa,\n\tlavenderblush: 0xfff0f5,\n\tlawngreen: 0x7cfc00,\n\tlemonchiffon: 0xfffacd,\n\tlightblue: 0xadd8e6,\n\tlightcoral: 0xf08080,\n\tlightcyan: 0xe0ffff,\n\tlightgoldenrodyellow: 0xfafad2,\n\tlightgray: 0xd3d3d3,\n\tlightgreen: 0x90ee90,\n\tlightgrey: 0xd3d3d3,\n\tlightpink: 0xffb6c1,\n\tlightsalmon: 0xffa07a,\n\tlightseagreen: 0x20b2aa,\n\tlightskyblue: 0x87cefa,\n\tlightslategray: 0x778899,\n\tlightslategrey: 0x778899,\n\tlightsteelblue: 0xb0c4de,\n\tlightyellow: 0xffffe0,\n\tlime: 0x00ff00,\n\tlimegreen: 0x32cd32,\n\tlinen: 0xfaf0e6,\n\tmagenta: 0xff00ff,\n\tmaroon: 0x800000,\n\tmediumaquamarine: 0x66cdaa,\n\tmediumblue: 0x0000cd,\n\tmediumorchid: 0xba55d3,\n\tmediumpurple: 0x9370db,\n\tmediumseagreen: 0x3cb371,\n\tmediumslateblue: 0x7b68ee,\n\tmediumspringgreen: 0x00fa9a,\n\tmediumturquoise: 0x48d1cc,\n\tmediumvioletred: 0xc71585,\n\tmidnightblue: 0x191970,\n\tmintcream: 0xf5fffa,\n\tmistyrose: 0xffe4e1,\n\tmoccasin: 0xffe4b5,\n\tnavajowhite: 0xffdead,\n\tnavy: 0x000080,\n\toldlace: 0xfdf5e6,\n\tolive: 0x808000,\n\tolivedrab: 0x6b8e23,\n\torange: 0xffa500,\n\torangered: 0xff4500,\n\torchid: 0xda70d6,\n\tpalegoldenrod: 0xeee8aa,\n\tpalegreen: 0x98fb98,\n\tpaleturquoise: 0xafeeee,\n\tpalevioletred: 0xdb7093,\n\tpapayawhip: 0xffefd5,\n\tpeachpuff: 0xffdab9,\n\tperu: 0xcd853f,\n\tpink: 0xffc0cb,\n\tplum: 0xdda0dd,\n\tpowderblue: 0xb0e0e6,\n\tpurple: 0x800080,\n\n\t// Added in CSS Colors Level 4:\n\t// https://drafts.csswg.org/css-color/#changes-from-3\n\trebeccapurple: 0x663399,\n\n\tred: 0xff0000,\n\trosybrown: 0xbc8f8f,\n\troyalblue: 0x4169e1,\n\tsaddlebrown: 0x8b4513,\n\tsalmon: 0xfa8072,\n\tsandybrown: 0xf4a460,\n\tseagreen: 0x2e8b57,\n\tseashell: 0xfff5ee,\n\tsienna: 0xa0522d,\n\tsilver: 0xc0c0c0,\n\tskyblue: 0x87ceeb,\n\tslateblue: 0x6a5acd,\n\tslategray: 0x708090,\n\tslategrey: 0x708090,\n\tsnow: 0xfffafa,\n\tspringgreen: 0x00ff7f,\n\tsteelblue: 0x4682b4,\n\ttan: 0xd2b48c,\n\tteal: 0x008080,\n\tthistle: 0xd8bfd8,\n\ttomato: 0xff6347,\n\tturquoise: 0x40e0d0,\n\tviolet: 0xee82ee,\n\twheat: 0xf5deb3,\n\twhite: 0xffffff,\n\twhitesmoke: 0xf5f5f5,\n\tyellow: 0xffff00,\n\tyellowgreen: 0x9acd32\n};\n\nexport default named;\n","import parseNumber from './parseNumber.js';\nimport named from '../colors/named.js';\n\n// Also supports the `transparent` color as defined in:\n// https://drafts.csswg.org/css-color/#transparent-black\nconst parseNamed = color => {\n\treturn parseNumber(named[color.toLowerCase()], 6);\n};\n\nexport default parseNamed;\n","import parseNumber from './parseNumber.js';\n\nconst hex = /^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i;\n\nconst parseHex = color => {\n\tlet match;\n\t// eslint-disable-next-line no-cond-assign\n\treturn (match = color.match(hex))\n\t\t? parseNumber(parseInt(match[1], 16), match[1].length)\n\t\t: undefined;\n};\n\nexport default parseHex;\n","/*\n\tBasic building blocks for color regexes\n\t---------------------------------------\n\n\tThese regexes are expressed as strings\n\tto be interpolated in the color regexes.\n */\n\n// <number>\nexport const num = '([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)';\n\n// <number> or 'none'\nexport const num_none = `(?:${num}|none)`;\n\n// <percentage>\nexport const per = `${num}%`;\n\n// <percent> or 'none'\nexport const per_none = `(?:${num}%|none)`;\n\n// <number-percentage> (<alpha-value>)\nexport const num_per = `(?:${num}%|${num})`;\n\n// <number-percentage> (<alpha-value>) or 'none'\nexport const num_per_none = `(?:${num}%|${num}|none)`;\n\n// <hue>\nexport const hue = `(?:${num}(deg|grad|rad|turn)|${num})`;\n\n// <hue> or 'none'\nexport const hue_none = `(?:${num}(deg|grad|rad|turn)|${num}|none)`;\n\nexport const c = `\\\\s*,\\\\s*`; // comma\nexport const so = '\\\\s*'; // space, optional\nexport const s = `\\\\s+`; // space\n\nexport const rx_num_per_none = new RegExp('^' + num_per_none + '$');\n","import { num, per, num_per, c } from '../util/regex.js';\n\n/*\n\trgb() regular expressions for legacy format\n\tReference: https://drafts.csswg.org/css-color/#rgb-functions\n */\nconst rgb_num_old = new RegExp(\n\t`^rgba?\\\\(\\\\s*${num}${c}${num}${c}${num}\\\\s*(?:,\\\\s*${num_per}\\\\s*)?\\\\)$`\n);\n\nconst rgb_per_old = new RegExp(\n\t`^rgba?\\\\(\\\\s*${per}${c}${per}${c}${per}\\\\s*(?:,\\\\s*${num_per}\\\\s*)?\\\\)$`\n);\n\nconst parseRgbLegacy = color => {\n\tlet res = { mode: 'rgb' };\n\tlet match;\n\tif ((match = color.match(rgb_num_old))) {\n\t\tif (match[1] !== undefined) {\n\t\t\tres.r = match[1] / 255;\n\t\t}\n\t\tif (match[2] !== undefined) {\n\t\t\tres.g = match[2] / 255;\n\t\t}\n\t\tif (match[3] !== undefined) {\n\t\t\tres.b = match[3] / 255;\n\t\t}\n\t} else if ((match = color.match(rgb_per_old))) {\n\t\tif (match[1] !== undefined) {\n\t\t\tres.r = match[1] / 100;\n\t\t}\n\t\tif (match[2] !== undefined) {\n\t\t\tres.g = match[2] / 100;\n\t\t}\n\t\tif (match[3] !== undefined) {\n\t\t\tres.b = match[3] / 100;\n\t\t}\n\t} else {\n\t\treturn undefined;\n\t}\n\n\tif (match[4] !== undefined) {\n\t\tres.alpha = Math.max(0, Math.min(1, match[4] / 100));\n\t} else if (match[5] !== undefined) {\n\t\tres.alpha = Math.max(0, Math.min(1, +match[5]));\n\t}\n\n\treturn res;\n};\n\nexport default parseRgbLegacy;\n","import parse from './parse.js';\n\nconst prepare = (color, mode) =>\n\tcolor === undefined\n\t\t? undefined\n\t\t: typeof color !== 'object'\n\t\t? parse(color)\n\t\t: color.mode !== undefined\n\t\t? color\n\t\t: mode\n\t\t? { ...color, mode }\n\t\t: undefined;\n\nexport default prepare;\n","import { converters } from './modes.js';\nimport prepare from './_prepare.js';\n\nconst converter =\n\t(target_mode = 'rgb') =>\n\tcolor =>\n\t\t(color = prepare(color, target_mode)) !== undefined\n\t\t\t? // if the color's mode corresponds to our target mode\n\t\t\t color.mode === target_mode\n\t\t\t\t? // then just return the color\n\t\t\t\t color\n\t\t\t\t: // otherwise check to see if we have a dedicated\n\t\t\t\t// converter for the target mode\n\t\t\t\tconverters[color.mode][target_mode]\n\t\t\t\t? // and return its result...\n\t\t\t\t converters[color.mode][target_mode](color)\n\t\t\t\t: // ...otherwise pass through RGB as an intermediary step.\n\t\t\t\t// if the target mode is RGB...\n\t\t\t\ttarget_mode === 'rgb'\n\t\t\t\t? // just return the RGB\n\t\t\t\t converters[color.mode].rgb(color)\n\t\t\t\t: // otherwise convert color.mode -> RGB -> target_mode\n\t\t\t\t converters.rgb[target_mode](converters[color.mode].rgb(color))\n\t\t\t: undefined;\n\nexport default converter;\n","import converter from './converter.js';\n\nconst converters = {};\nconst modes = {};\n\nconst parsers = [];\nconst colorProfiles = {};\n\nconst identity = v => v;\n\nconst useMode = definition => {\n\tconverters[definition.mode] = {\n\t\t...converters[definition.mode],\n\t\t...definition.toMode\n\t};\n\n\tObject.keys(definition.fromMode || {}).forEach(k => {\n\t\tif (!converters[k]) {\n\t\t\tconverters[k] = {};\n\t\t}\n\t\tconverters[k][definition.mode] = definition.fromMode[k];\n\t});\n\n\t// Color space channel ranges\n\tif (!definition.ranges) {\n\t\tdefinition.ranges = {};\n\t}\n\n\tif (!definition.difference) {\n\t\tdefinition.difference = {};\n\t}\n\n\tdefinition.channels.forEach(channel => {\n\t\t// undefined channel ranges default to the [0, 1] interval\n\t\tif (definition.ranges[channel] === undefined) {\n\t\t\tdefinition.ranges[channel] = [0, 1];\n\t\t}\n\n\t\tif (!definition.interpolate[channel]) {\n\t\t\tthrow new Error(`Missing interpolator for: ${channel}`);\n\t\t}\n\n\t\tif (typeof definition.interpolate[channel] === 'function') {\n\t\t\tdefinition.interpolate[channel] = {\n\t\t\t\tuse: definition.interpolate[channel]\n\t\t\t};\n\t\t}\n\n\t\tif (!definition.interpolate[channel].fixup) {\n\t\t\tdefinition.interpolate[channel].fixup = identity;\n\t\t}\n\t});\n\n\tmodes[definition.mode] = definition;\n\t(definition.parse || []).forEach(parser => {\n\t\tuseParser(parser, definition.mode);\n\t});\n\n\treturn converter(definition.mode);\n};\n\nconst getMode = mode => modes[mode];\n\nconst useParser = (parser, mode) => {\n\tif (typeof parser === 'string') {\n\t\tif (!mode) {\n\t\t\tthrow new Error(`'mode' required when 'parser' is a string`);\n\t\t}\n\t\tcolorProfiles[parser] = mode;\n\t} else if (typeof parser === 'function') {\n\t\tif (parsers.indexOf(parser) < 0) {\n\t\t\tparsers.push(parser);\n\t\t}\n\t}\n};\n\nconst removeParser = parser => {\n\tif (typeof parser === 'string') {\n\t\tdelete colorProfiles[parser];\n\t} else if (typeof parser === 'function') {\n\t\tconst idx = parsers.indexOf(parser);\n\t\tif (idx > 0) {\n\t\t\tparsers.splice(idx, 1);\n\t\t}\n\t}\n};\n\nexport {\n\tuseMode,\n\tgetMode,\n\tuseParser,\n\tremoveParser,\n\tconverters,\n\tparsers,\n\tcolorProfiles\n};\n","import { parsers, colorProfiles, getMode } from './modes.js';\n\n/* eslint-disable-next-line no-control-regex */\nconst IdentStartCodePoint = /[^\\x00-\\x7F]|[a-zA-Z_]/;\n\n/* eslint-disable-next-line no-control-regex */\nconst IdentCodePoint = /[^\\x00-\\x7F]|[-\\w]/;\n\nexport const Tok = {\n\tFunction: 'function',\n\tIdent: 'ident',\n\tNumber: 'number',\n\tPercentage: 'percentage',\n\tParenClose: ')',\n\tNone: 'none',\n\tHue: 'hue',\n\tAlpha: 'alpha'\n};\n\nlet _i = 0;\n\n/*\n\t4.3.10. Check if three code points would start a number\n\thttps://drafts.csswg.org/css-syntax/#starts-with-a-number\n */\nfunction is_num(chars) {\n\tlet ch = chars[_i];\n\tlet ch1 = chars[_i + 1];\n\tif (ch === '-' || ch === '+') {\n\t\treturn /\\d/.test(ch1) || (ch1 === '.' && /\\d/.test(chars[_i + 2]));\n\t}\n\tif (ch === '.') {\n\t\treturn /\\d/.test(ch1);\n\t}\n\treturn /\\d/.test(ch);\n}\n\n/*\n\tCheck if the stream starts with an identifier.\n */\n\nfunction is_ident(chars) {\n\tif (_i >= chars.length) {\n\t\treturn false;\n\t}\n\tlet ch = chars[_i];\n\tif (IdentStartCodePoint.test(ch)) {\n\t\treturn true;\n\t}\n\tif (ch === '-') {\n\t\tif (chars.length - _i < 2) {\n\t\t\treturn false;\n\t\t}\n\t\tlet ch1 = chars[_i + 1];\n\t\tif (ch1 === '-' || IdentStartCodePoint.test(ch1)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\treturn false;\n}\n\n/*\n\t4.3.3. Consume a numeric token\n\thttps://drafts.csswg.org/css-syntax/#consume-numeric-token\n */\n\nconst huenits = {\n\tdeg: 1,\n\trad: 180 / Math.PI,\n\tgrad: 9 / 10,\n\tturn: 360\n};\n\nfunction num(chars) {\n\tlet value = '';\n\tif (chars[_i] === '-' || chars[_i] === '+') {\n\t\tvalue += chars[_i++];\n\t}\n\tvalue += digits(chars);\n\tif (chars[_i] === '.' && /\\d/.test(chars[_i + 1])) {\n\t\tvalue += chars[_i++] + digits(chars);\n\t}\n\tif (chars[_i] === 'e' || chars[_i] === 'E') {\n\t\tif (\n\t\t\t(chars[_i + 1] === '-' || chars[_i + 1] === '+') &&\n\t\t\t/\\d/.test(chars[_i + 2])\n\t\t) {\n\t\t\tvalue += chars[_i++] + chars[_i++] + digits(chars);\n\t\t} else if (/\\d/.test(chars[_i + 1])) {\n\t\t\tvalue += chars[_i++] + digits(chars);\n\t\t}\n\t}\n\tif (is_ident(chars)) {\n\t\tlet id = ident(chars);\n\t\tif (id === 'deg' || id === 'rad' || id === 'turn' || id === 'grad') {\n\t\t\treturn { type: Tok.Hue, value: value * huenits[id] };\n\t\t}\n\t\treturn undefined;\n\t}\n\tif (chars[_i] === '%') {\n\t\t_i++;\n\t\treturn { type: Tok.Percentage, value: +value };\n\t}\n\treturn { type: Tok.Number, value: +value };\n}\n\n/*\n\tConsume digits.\n */\nfunction digits(chars) {\n\tlet v = '';\n\twhile (/\\d/.test(chars[_i])) {\n\t\tv += chars[_i++];\n\t}\n\treturn v;\n}\n\n/*\n\tConsume an identifier.\n */\nfunction ident(chars) {\n\tlet v = '';\n\twhile (_i < chars.length && IdentCodePoint.test(chars[_i])) {\n\t\tv += chars[_i++];\n\t}\n\treturn v;\n}\n\n/*\n\tConsume an ident-like token.\n */\nfunction identlike(chars) {\n\tlet v = ident(chars);\n\tif (chars[_i] === '(') {\n\t\t_i++;\n\t\treturn { type: Tok.Function, value: v };\n\t}\n\tif (v === 'none') {\n\t\treturn { type: Tok.None, value: undefined };\n\t}\n\treturn { type: Tok.Ident, value: v };\n}\n\nexport function tokenize(str = '') {\n\tlet chars = str.trim();\n\tlet tokens = [];\n\tlet ch;\n\n\t/* reset counter */\n\t_i = 0;\n\n\twhile (_i < chars.length) {\n\t\tch = chars[_i++];\n\n\t\t/*\n\t\t\tConsume whitespace without emitting it\n\t\t */\n\t\tif (ch === '\\n' || ch === '\\t' || ch === ' ') {\n\t\t\twhile (\n\t\t\t\t_i < chars.length &&\n\t\t\t\t(chars[_i] === '\\n' || chars[_i] === '\\t' || chars[_i] === ' ')\n\t\t\t) {\n\t\t\t\t_i++;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (ch === ',') {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (ch === ')') {\n\t\t\ttokens.push({ type: Tok.ParenClose });\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (ch === '+') {\n\t\t\t_i--;\n\t\t\tif (is_num(chars)) {\n\t\t\t\ttokens.push(num(chars));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (ch === '-') {\n\t\t\t_i--;\n\t\t\tif (is_num(chars)) {\n\t\t\t\ttokens.push(num(chars));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (is_ident(chars)) {\n\t\t\t\ttokens.push({ type: Tok.Ident, value: ident(chars) });\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (ch === '.') {\n\t\t\t_i--;\n\t\t\tif (is_num(chars)) {\n\t\t\t\ttokens.push(num(chars));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (ch === '/') {\n\t\t\twhile (\n\t\t\t\t_i < chars.length &&\n\t\t\t\t(chars[_i] === '\\n' || chars[_i] === '\\t' || chars[_i] === ' ')\n\t\t\t) {\n\t\t\t\t_i++;\n\t\t\t}\n\t\t\tlet alpha;\n\t\t\tif (is_num(chars)) {\n\t\t\t\talpha = num(chars);\n\t\t\t\tif (alpha.type !== Tok.Hue) {\n\t\t\t\t\ttokens.push({ type: Tok.Alpha, value: alpha });\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (is_ident(chars)) {\n\t\t\t\tif (ident(chars) === 'none') {\n\t\t\t\t\ttokens.push({\n\t\t\t\t\t\ttype: Tok.Alpha,\n\t\t\t\t\t\tvalue: { type: Tok.None, value: undefined }\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (/\\d/.test(ch)) {\n\t\t\t_i--;\n\t\t\ttokens.push(num(chars));\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (IdentStartCodePoint.test(ch)) {\n\t\t\t_i--;\n\t\t\ttokens.push(identlike(chars));\n\t\t\tcontinue;\n\t\t}\n\n\t\t/*\n\t\t\tTreat everything not already handled as an error.\n\t\t */\n\t\treturn undefined;\n\t}\n\n\treturn tokens;\n}\n\nexport function parseColorSyntax(tokens) {\n\ttokens._i = 0;\n\tlet token = tokens[tokens._i++];\n\tif (!token || token.type !== Tok.Function || token.value !== 'color') {\n\t\treturn undefined;\n\t}\n\ttoken = tokens[tokens._i++];\n\tif (token.type !== Tok.Ident) {\n\t\treturn undefined;\n\t}\n\tconst mode = colorProfiles[token.value];\n\tif (!mode) {\n\t\treturn undefined;\n\t}\n\tconst res = { mode };\n\tconst coords = consumeCoords(tokens, false);\n\tif (!coords) {\n\t\treturn undefined;\n\t}\n\tconst channels = getMode(mode).channels;\n\tfor (let ii = 0, c, ch; ii < channels.length; ii++) {\n\t\tc = coords[ii];\n\t\tch = channels[ii];\n\t\tif (c.type !== Tok.None) {\n\t\t\tres[ch] = c.type === Tok.Number ? c.value : c.value / 100;\n\t\t\tif (ch === 'alpha') {\n\t\t\t\tres[ch] = Math.max(0, Math.min(1, res[ch]));\n\t\t\t}\n\t\t}\n\t}\n\treturn res;\n}\n\nfunction consumeCoords(tokens, includeHue) {\n\tconst coords = [];\n\tlet token;\n\twhile (tokens._i < tokens.length) {\n\t\ttoken = tokens[tokens._i++];\n\t\tif (\n\t\t\ttoken.type === Tok.None ||\n\t\t\ttoken.type === Tok.Number ||\n\t\t\ttoken.type === Tok.Alpha ||\n\t\t\ttoken.type === Tok.Percentage ||\n\t\t\t(includeHue && token.type === Tok.Hue)\n\t\t) {\n\t\t\tcoords.push(token);\n\t\t\tcontinue;\n\t\t}\n\t\tif (token.type === Tok.ParenClose) {\n\t\t\tif (tokens._i < tokens.length) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tif (coords.length < 3 || coords.length > 4) {\n\t\treturn undefined;\n\t}\n\n\tif (coords.length === 4) {\n\t\tif (coords[3].type !== Tok.Alpha) {\n\t\t\treturn undefined;\n\t\t}\n\t\tcoords[3] = coords[3].value;\n\t}\n\tif (coords.length === 3) {\n\t\tcoords.push({ type: Tok.None, value: undefined });\n\t}\n\n\treturn coords.every(c => c.type !== Tok.Alpha) ? coords : undefined;\n}\n\nexport function parseModernSyntax(tokens, includeHue) {\n\ttokens._i = 0;\n\tlet token = tokens[tokens._i++];\n\tif (!token || token.type !== Tok.Function) {\n\t\treturn undefined;\n\t}\n\tlet coords = consumeCoords(tokens, includeHue);\n\tif (!coords) {\n\t\treturn undefined;\n\t}\n\tcoords.unshift(token.value);\n\treturn coords;\n}\n\nconst parse = color => {\n\tif (typeof color !== 'string') {\n\t\treturn undefined;\n\t}\n\tconst tokens = tokenize(color);\n\tconst parsed = tokens ? parseModernSyntax(tokens, true) : undefined;\n\tlet result = undefined;\n\tlet i = 0;\n\tlet len = parsers.length;\n\twhile (i < len) {\n\t\tif ((result = parsers[i++](color, parsed)) !== undefined) {\n\t\t\treturn result;\n\t\t}\n\t}\n\treturn tokens ? parseColorSyntax(tokens) : undefined;\n};\n\nexport default parse;\n","import { Tok } from '../parse.js';\n\nfunction parseRgb(color, parsed) {\n\tif (!parsed || (parsed[0] !== 'rgb' && parsed[0] !== 'rgba')) {\n\t\treturn undefined;\n\t}\n\tconst res = { mode: 'rgb' };\n\tconst [, r, g, b, alpha] = parsed;\n\tif (r.type === Tok.Hue || g.type === Tok.Hue || b.type === Tok.Hue) {\n\t\treturn undefined;\n\t}\n\tif (r.type !== Tok.None) {\n\t\tres.r = r.type === Tok.Number ? r.value / 255 : r.value / 100;\n\t}\n\tif (g.type !== Tok.None) {\n\t\tres.g = g.type === Tok.Number ? g.value / 255 : g.value / 100;\n\t}\n\tif (b.type !== Tok.None) {\n\t\tres.b = b.type === Tok.Number ? b.value / 255 : b.value / 100;\n\t}\n\tif (alpha.type !== Tok.None) {\n\t\tres.alpha = Math.min(\n\t\t\t1,\n\t\t\tMath.max(\n\t\t\t\t0,\n\t\t\t\talpha.type === Tok.Number ? alpha.value : alpha.value / 100\n\t\t\t)\n\t\t);\n\t}\n\n\treturn res;\n}\n\nexport default parseRgb;\n","const parseTransparent = c =>\n\tc === 'transparent'\n\t\t? { mode: 'rgb', r: 0, g: 0, b: 0, alpha: 0 }\n\t\t: undefined;\n\nexport default parseTransparent;\n","const lerp = (a, b, t) => a + t * (b - a);\nconst unlerp = (a, b, v) => (v - a) / (b - a);\n\nconst blerp = (a00, a01, a10, a11, tx, ty) => {\n\treturn lerp(lerp(a00, a01, tx), lerp(a10, a11, tx), ty);\n};\n\nconst trilerp = (\n\ta000,\n\ta010,\n\ta100,\n\ta110,\n\ta001,\n\ta011,\n\ta101,\n\ta111,\n\ttx,\n\tty,\n\ttz\n) => {\n\treturn lerp(\n\t\tblerp(a000, a010, a100, a110, tx, ty),\n\t\tblerp(a001, a011, a101, a111, tx, ty),\n\t\ttz\n\t);\n};\n\nexport { lerp, blerp, trilerp, unlerp };\n","const get_classes = arr => {\n\tlet classes = [];\n\tfor (let i = 0; i < arr.length - 1; i++) {\n\t\tlet a = arr[i];\n\t\tlet b = arr[i + 1];\n\t\tif (a === undefined && b === undefined) {\n\t\t\tclasses.push(undefined);\n\t\t} else if (a !== undefined && b !== undefined) {\n\t\t\tclasses.push([a, b]);\n\t\t} else {\n\t\t\tclasses.push(a !== undefined ? [a, a] : [b, b]);\n\t\t}\n\t}\n\treturn classes;\n};\n\nconst interpolatorPiecewise = interpolator => arr => {\n\tlet classes = get_classes(arr);\n\treturn t => {\n\t\tlet cls = t * classes.length;\n\t\tlet idx = t >= 1 ? classes.length - 1 : Math.max(Math.floor(cls), 0);\n\t\tlet pair = classes[idx];\n\t\treturn pair === undefined\n\t\t\t? undefined\n\t\t\t: interpolator(pair[0], pair[1], cls - idx);\n\t};\n};\n\nexport { interpolatorPiecewise };\n","import { lerp } from './lerp.js';\nimport { interpolatorPiecewise } from './piecewise.js';\n\nexport const interpolatorLinear = interpolatorPiecewise(lerp);\n","const fixupAlpha = arr => {\n\tlet some_defined = false;\n\tlet res = arr.map(v => {\n\t\tif (v !== undefined) {\n\t\t\tsome_defined = true;\n\t\t\treturn v;\n\t\t}\n\t\treturn 1;\n\t});\n\treturn some_defined ? res : arr;\n};\n\nexport { fixupAlpha };\n","import parseNamed from './parseNamed.js';\nimport parseHex from './parseHex.js';\nimport parseRgbLegacy from './parseRgbLegacy.js';\nimport parseRgb from './parseRgb.js';\nimport parseTransparent from './parseTransparent.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\n/*\n\tsRGB color space\n */\n\nconst definition = {\n\tmode: 'rgb',\n\tchannels: ['r', 'g', 'b', 'alpha'],\n\tparse: [\n\t\tparseRgb,\n\t\tparseHex,\n\t\tparseRgbLegacy,\n\t\tparseNamed,\n\t\tparseTransparent,\n\t\t'srgb'\n\t],\n\tserialize: 'srgb',\n\tinterpolate: {\n\t\tr: interpolatorLinear,\n\t\tg: interpolatorLinear,\n\t\tb: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\tgamut: true,\n\twhite: { r: 1, g: 1, b: 1 },\n\tblack: { r: 0, g: 0, b: 0 }\n};\n\nexport default definition;\n","/*\n\tConvert A98 RGB values to CIE XYZ D65\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n\t\t* https://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf\n*/\n\nconst linearize = (v = 0) => Math.pow(Math.abs(v), 563 / 256) * Math.sign(v);\n\nconst convertA98ToXyz65 = a98 => {\n\tlet r = linearize(a98.r);\n\tlet g = linearize(a98.g);\n\tlet b = linearize(a98.b);\n\tlet res = {\n\t\tmode: 'xyz65',\n\t\tx:\n\t\t\t0.5766690429101305 * r +\n\t\t\t0.1855582379065463 * g +\n\t\t\t0.1882286462349947 * b,\n\t\ty:\n\t\t\t0.297344975250536 * r +\n\t\t\t0.6273635662554661 * g +\n\t\t\t0.0752914584939979 * b,\n\t\tz:\n\t\t\t0.0270313613864123 * r +\n\t\t\t0.0706888525358272 * g +\n\t\t\t0.9913375368376386 * b\n\t};\n\tif (a98.alpha !== undefined) {\n\t\tres.alpha = a98.alpha;\n\t}\n\treturn res;\n};\n\nexport default convertA98ToXyz65;\n","/*\n\tConvert CIE XYZ D65 values to A98 RGB\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n*/\n\nconst gamma = v => Math.pow(Math.abs(v), 256 / 563) * Math.sign(v);\n\nconst convertXyz65ToA98 = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = {\n\t\tmode: 'a98',\n\t\tr: gamma(\n\t\t\tx * 2.0415879038107465 -\n\t\t\t\ty * 0.5650069742788597 -\n\t\t\t\t0.3447313507783297 * z\n\t\t),\n\t\tg: gamma(\n\t\t\tx * -0.9692436362808798 +\n\t\t\t\ty * 1.8759675015077206 +\n\t\t\t\t0.0415550574071756 * z\n\t\t),\n\t\tb: gamma(\n\t\t\tx * 0.0134442806320312 -\n\t\t\t\ty * 0.1183623922310184 +\n\t\t\t\t1.0151749943912058 * z\n\t\t)\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz65ToA98;\n","const fn = (c = 0) => {\n\tconst abs = Math.abs(c);\n\tif (abs <= 0.04045) {\n\t\treturn c / 12.92;\n\t}\n\treturn (Math.sign(c) || 1) * Math.pow((abs + 0.055) / 1.055, 2.4);\n};\n\nconst convertRgbToLrgb = ({ r, g, b, alpha }) => {\n\tlet res = {\n\t\tmode: 'lrgb',\n\t\tr: fn(r),\n\t\tg: fn(g),\n\t\tb: fn(b)\n\t};\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertRgbToLrgb;\n","/*\n\tConvert sRGB values to CIE XYZ D65\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n\t\t* https://observablehq.com/@danburzo/color-matrix-calculator\n*/\n\nimport convertRgbToLrgb from '../lrgb/convertRgbToLrgb.js';\n\nconst convertRgbToXyz65 = rgb => {\n\tlet { r, g, b, alpha } = convertRgbToLrgb(rgb);\n\tlet res = {\n\t\tmode: 'xyz65',\n\t\tx:\n\t\t\t0.4123907992659593 * r +\n\t\t\t0.357584339383878 * g +\n\t\t\t0.1804807884018343 * b,\n\t\ty:\n\t\t\t0.2126390058715102 * r +\n\t\t\t0.715168678767756 * g +\n\t\t\t0.0721923153607337 * b,\n\t\tz:\n\t\t\t0.0193308187155918 * r +\n\t\t\t0.119194779794626 * g +\n\t\t\t0.9505321522496607 * b\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertRgbToXyz65;\n","const fn = (c = 0) => {\n\tconst abs = Math.abs(c);\n\tif (abs > 0.0031308) {\n\t\treturn (Math.sign(c) || 1) * (1.055 * Math.pow(abs, 1 / 2.4) - 0.055);\n\t}\n\treturn c * 12.92;\n};\n\nconst convertLrgbToRgb = ({ r, g, b, alpha }, mode = 'rgb') => {\n\tlet res = {\n\t\tmode,\n\t\tr: fn(r),\n\t\tg: fn(g),\n\t\tb: fn(b)\n\t};\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertLrgbToRgb;\n","/*\n\tCIE XYZ D65 values to sRGB.\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n\t\t* https://observablehq.com/@danburzo/color-matrix-calculator\n*/\n\nimport convertLrgbToRgb from '../lrgb/convertLrgbToRgb.js';\n\nconst convertXyz65ToRgb = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = convertLrgbToRgb({\n\t\tr:\n\t\t\tx * 3.2409699419045226 -\n\t\t\ty * 1.5373831775700939 -\n\t\t\t0.4986107602930034 * z,\n\t\tg:\n\t\t\tx * -0.9692436362808796 +\n\t\t\ty * 1.8759675015077204 +\n\t\t\t0.0415550574071756 * z,\n\t\tb:\n\t\t\tx * 0.0556300796969936 -\n\t\t\ty * 0.2039769588889765 +\n\t\t\t1.0569715142428784 * z\n\t});\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz65ToRgb;\n","import rgb from '../rgb/definition.js';\n\nimport convertA98ToXyz65 from './convertA98ToXyz65.js';\nimport convertXyz65ToA98 from './convertXyz65ToA98.js';\nimport convertRgbToXyz65 from '../xyz65/convertRgbToXyz65.js';\nimport convertXyz65ToRgb from '../xyz65/convertXyz65ToRgb.js';\n\nconst definition = {\n\t...rgb,\n\tmode: 'a98',\n\tparse: ['a98-rgb'],\n\tserialize: 'a98-rgb',\n\n\tfromMode: {\n\t\trgb: color => convertXyz65ToA98(convertRgbToXyz65(color)),\n\t\txyz65: convertXyz65ToA98\n\t},\n\n\ttoMode: {\n\t\trgb: color => convertXyz65ToRgb(convertA98ToXyz65(color)),\n\t\txyz65: convertA98ToXyz65\n\t}\n};\n\nexport default definition;\n","const normalizeHue = hue => ((hue = hue % 360) < 0 ? hue + 360 : hue);\n\nexport default normalizeHue;\n","import normalizeHue from '../util/normalizeHue.js';\n\nconst hue = (hues, fn) => {\n\treturn hues\n\t\t.map((hue, idx, arr) => {\n\t\t\tif (hue === undefined) {\n\t\t\t\treturn hue;\n\t\t\t}\n\t\t\tlet normalized = normalizeHue(hue);\n\t\t\tif (idx === 0 || hues[idx - 1] === undefined) {\n\t\t\t\treturn normalized;\n\t\t\t}\n\t\t\treturn fn(normalized - normalizeHue(arr[idx - 1]));\n\t\t})\n\t\t.reduce((acc, curr) => {\n\t\t\tif (\n\t\t\t\t!acc.length ||\n\t\t\t\tcurr === undefined ||\n\t\t\t\tacc[acc.length - 1] === undefined\n\t\t\t) {\n\t\t\t\tacc.push(curr);\n\t\t\t\treturn acc;\n\t\t\t}\n\t\t\tacc.push(curr + acc[acc.length - 1]);\n\t\t\treturn acc;\n\t\t}, []);\n};\n\nconst fixupHueShorter = arr =>\n\thue(arr, d => (Math.abs(d) <= 180 ? d : d - 360 * Math.sign(d)));\nconst fixupHueLonger = arr =>\n\thue(arr, d => (Math.abs(d) >= 180 || d === 0 ? d : d - 360 * Math.sign(d)));\nconst fixupHueIncreasing = arr => hue(arr, d => (d >= 0 ? d : d + 360));\nconst fixupHueDecreasing = arr => hue(arr, d => (d <= 0 ? d : d - 360));\n\nexport {\n\tfixupHueShorter,\n\tfixupHueLonger,\n\tfixupHueIncreasing,\n\tfixupHueDecreasing\n};\n","export const M = [-0.14861, 1.78277, -0.29227, -0.90649, 1.97294, 0];\n\nexport const degToRad = Math.PI / 180;\nexport const radToDeg = 180 / Math.PI;\n","/*\n\tConvert a RGB color to the Cubehelix HSL color space.\n\n\tThis computation is not present in Green's paper:\n\thttps://arxiv.org/pdf/1108.5083.pdf\n\n\t...but can be derived from the inverse, HSL to RGB conversion.\n\n\tIt matches the math in Mike Bostock's D3 implementation:\n\n\thttps://github.com/d3/d3-color/blob/master/src/cubehelix.js\n */\n\nimport { radToDeg, M } from './constants.js';\n\nlet DE = M[3] * M[4];\nlet BE = M[1] * M[4];\nlet BCAD = M[1] * M[2] - M[0] * M[3];\n\nconst convertRgbToCubehelix = ({ r, g, b, alpha }) => {\n\tif (r === undefined) r = 0;\n\tif (g === undefined) g = 0;\n\tif (b === undefined) b = 0;\n\tlet l = (BCAD * b + r * DE - g * BE) / (BCAD + DE - BE);\n\tlet x = b - l;\n\tlet y = (M[4] * (g - l) - M[2] * x) / M[3];\n\n\tlet res = {\n\t\tmode: 'cubehelix',\n\t\tl: l,\n\t\ts:\n\t\t\tl === 0 || l === 1\n\t\t\t\t? undefined\n\t\t\t\t: Math.sqrt(x * x + y * y) / (M[4] * l * (1 - l))\n\t};\n\n\tif (res.s) res.h = Math.atan2(y, x) * radToDeg - 120;\n\tif (alpha !== undefined) res.alpha = alpha;\n\n\treturn res;\n};\n\nexport default convertRgbToCubehelix;\n","import { degToRad, M } from './constants.js';\n\nconst convertCubehelixToRgb = ({ h, s, l, alpha }) => {\n\tlet res = { mode: 'rgb' };\n\n\th = (h === undefined ? 0 : h + 120) * degToRad;\n\tif (l === undefined) l = 0;\n\n\tlet amp = s === undefined ? 0 : s * l * (1 - l);\n\n\tlet cosh = Math.cos(h);\n\tlet sinh = Math.sin(h);\n\n\tres.r = l + amp * (M[0] * cosh + M[1] * sinh);\n\tres.g = l + amp * (M[2] * cosh + M[3] * sinh);\n\tres.b = l + amp * (M[4] * cosh + M[5] * sinh);\n\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertCubehelixToRgb;\n","import { getMode } from './modes.js';\nimport converter from './converter.js';\nimport normalizeHue from './util/normalizeHue.js';\n\nconst differenceHueSaturation = (std, smp) => {\n\tif (std.h === undefined || smp.h === undefined || !std.s || !smp.s) {\n\t\treturn 0;\n\t}\n\tlet std_h = normalizeHue(std.h);\n\tlet smp_h = normalizeHue(smp.h);\n\tlet dH = Math.sin((((smp_h - std_h + 360) / 2) * Math.PI) / 180);\n\treturn 2 * Math.sqrt(std.s * smp.s) * dH;\n};\n\nconst differenceHueNaive = (std, smp) => {\n\tif (std.h === undefined || smp.h === undefined) {\n\t\treturn 0;\n\t}\n\tlet std_h = normalizeHue(std.h);\n\tlet smp_h = normalizeHue(smp.h);\n\tif (Math.abs(smp_h - std_h) > 180) {\n\t\t// todo should this be normalized once again?\n\t\treturn std_h - (smp_h - 360 * Math.sign(smp_h - std_h));\n\t}\n\treturn smp_h - std_h;\n};\n\nconst differenceHueChroma = (std, smp) => {\n\tif (std.h === undefined || smp.h === undefined || !std.c || !smp.c) {\n\t\treturn 0;\n\t}\n\tlet std_h = normalizeHue(std.h);\n\tlet smp_h = normalizeHue(smp.h);\n\tlet dH = Math.sin((((smp_h - std_h + 360) / 2) * Math.PI) / 180);\n\treturn 2 * Math.sqrt(std.c * smp.c) * dH;\n};\n\nconst differenceEuclidean = (mode = 'rgb', weights = [1, 1, 1, 0]) => {\n\tlet def = getMode(mode);\n\tlet channels = def.channels;\n\tlet diffs = def.difference;\n\tlet conv = converter(mode);\n\treturn (std, smp) => {\n\t\tlet ConvStd = conv(std);\n\t\tlet ConvSmp = conv(smp);\n\t\treturn Math.sqrt(\n\t\t\tchannels.reduce((sum, k, idx) => {\n\t\t\t\tlet delta = diffs[k]\n\t\t\t\t\t? diffs[k](ConvStd, ConvSmp)\n\t\t\t\t\t: ConvStd[k] - ConvSmp[k];\n\t\t\t\treturn (\n\t\t\t\t\tsum +\n\t\t\t\t\t(weights[idx] || 0) * Math.pow(isNaN(delta) ? 0 : delta, 2)\n\t\t\t\t);\n\t\t\t}, 0)\n\t\t);\n\t};\n};\n\nconst differenceCie76 = () => differenceEuclidean('lab65');\n\nconst differenceCie94 = (kL = 1, K1 = 0.045, K2 = 0.015) => {\n\tlet lab = converter('lab65');\n\n\treturn (std, smp) => {\n\t\tlet LabStd = lab(std);\n\t\tlet LabSmp = lab(smp);\n\n\t\t// Extract Lab values, and compute Chroma\n\t\tlet lStd = LabStd.l;\n\t\tlet aStd = LabStd.a;\n\t\tlet bStd = LabStd.b;\n\t\tlet cStd = Math.sqrt(aStd * aStd + bStd * bStd);\n\n\t\tlet lSmp = LabSmp.l;\n\t\tlet aSmp = LabSmp.a;\n\t\tlet bSmp = LabSmp.b;\n\t\tlet cSmp = Math.sqrt(aSmp * aSmp + bSmp * bSmp);\n\n\t\tlet dL2 = Math.pow(lStd - lSmp, 2);\n\t\tlet dC2 = Math.pow(cStd - cSmp, 2);\n\t\tlet dH2 = Math.pow(aStd - aSmp, 2) + Math.pow(bStd - bSmp, 2) - dC2;\n\n\t\treturn Math.sqrt(\n\t\t\tdL2 / Math.pow(kL, 2) +\n\t\t\t\tdC2 / Math.pow(1 + K1 * cStd, 2) +\n\t\t\t\tdH2 / Math.pow(1 + K2 * cStd, 2)\n\t\t);\n\t};\n};\n\n/*\n\tCIEDE2000 color difference, original Matlab implementation by Gaurav Sharma\n\tBased on \"The CIEDE2000 Color-Difference Formula: Implementation Notes, Supplementary Test Data, and Mathematical Observations\" \n\tby Gaurav Sharma, Wencheng Wu, Edul N. Dalal in Color Research and Application, vol. 30. No. 1, pp. 21-30, February 2005.\n\thttp://www2.ece.rochester.edu/~gsharma/ciede2000/\n */\n\nconst differenceCiede2000 = (Kl = 1, Kc = 1, Kh = 1) => {\n\tlet lab = converter('lab65');\n\treturn (std, smp) => {\n\t\tlet LabStd = lab(std);\n\t\tlet LabSmp = lab(smp);\n\n\t\tlet lStd = LabStd.l;\n\t\tlet aStd = LabStd.a;\n\t\tlet bStd = LabStd.b;\n\t\tlet cStd = Math.sqrt(aStd * aStd + bStd * bStd);\n\n\t\tlet lSmp = LabSmp.l;\n\t\tlet aSmp = LabSmp.a;\n\t\tlet bSmp = LabSmp.b;\n\t\tlet cSmp = Math.sqrt(aSmp * aSmp + bSmp * bSmp);\n\n\t\tlet cAvg = (cStd + cSmp) / 2;\n\n\t\tlet G =\n\t\t\t0.5 *\n\t\t\t(1 -\n\t\t\t\tMath.sqrt(\n\t\t\t\t\tMath.pow(cAvg, 7) / (Math.pow(cAvg, 7) + Math.pow(25, 7))\n\t\t\t\t));\n\n\t\tlet apStd = aStd * (1 + G);\n\t\tlet apSmp = aSmp * (1 + G);\n\n\t\tlet cpStd = Math.sqrt(apStd * apStd + bStd * bStd);\n\t\tlet cpSmp = Math.sqrt(apSmp * apSmp + bSmp * bSmp);\n\n\t\tlet hpStd =\n\t\t\tMath.abs(apStd) + Math.abs(bStd) === 0\n\t\t\t\t? 0\n\t\t\t\t: Math.atan2(bStd, apStd);\n\t\thpStd += (hpStd < 0) * 2 * Math.PI;\n\n\t\tlet hpSmp =\n\t\t\tMath.abs(apSmp) + Math.abs(bSmp) === 0\n\t\t\t\t? 0\n\t\t\t\t: Math.atan2(bSmp, apSmp);\n\t\thpSmp += (hpSmp < 0) * 2 * Math.PI;\n\n\t\tlet dL = lSmp - lStd;\n\t\tlet dC = cpSmp - cpStd;\n\n\t\tlet dhp = cpStd * cpSmp === 0 ? 0 : hpSmp - hpStd;\n\t\tdhp -= (dhp > Math.PI) * 2 * Math.PI;\n\t\tdhp += (dhp < -Math.PI) * 2 * Math.PI;\n\n\t\tlet dH = 2 * Math.sqrt(cpStd * cpSmp) * Math.sin(dhp / 2);\n\n\t\tlet Lp = (lStd + lSmp) / 2;\n\t\tlet Cp = (cpStd + cpSmp) / 2;\n\n\t\tlet hp;\n\t\tif (cpStd * cpSmp === 0) {\n\t\t\thp = hpStd + hpSmp;\n\t\t} else {\n\t\t\thp = (hpStd + hpSmp) / 2;\n\t\t\thp -= (Math.abs(hpStd - hpSmp) > Math.PI) * Math.PI;\n\t\t\thp += (hp < 0) * 2 * Math.PI;\n\t\t}\n\n\t\tlet Lpm50 = Math.pow(Lp - 50, 2);\n\t\tlet T =\n\t\t\t1 -\n\t\t\t0.17 * Math.cos(hp - Math.PI / 6) +\n\t\t\t0.24 * Math.cos(2 * hp) +\n\t\t\t0.32 * Math.cos(3 * hp + Math.PI / 30) -\n\t\t\t0.2 * Math.cos(4 * hp - (63 * Math.PI) / 180);\n\n\t\tlet Sl = 1 + (0.015 * Lpm50) / Math.sqrt(20 + Lpm50);\n\t\tlet Sc = 1 + 0.045 * Cp;\n\t\tlet Sh = 1 + 0.015 * Cp * T;\n\n\t\tlet deltaTheta =\n\t\t\t((30 * Math.PI) / 180) *\n\t\t\tMath.exp(-1 * Math.pow(((180 / Math.PI) * hp - 275) / 25, 2));\n\t\tlet Rc =\n\t\t\t2 *\n\t\t\tMath.sqrt(Math.pow(Cp, 7) / (Math.pow(Cp, 7) + Math.pow(25, 7)));\n\n\t\tlet Rt = -1 * Math.sin(2 * deltaTheta) * Rc;\n\n\t\treturn Math.sqrt(\n\t\t\tMath.pow(dL / (Kl * Sl), 2) +\n\t\t\t\tMath.pow(dC / (Kc * Sc), 2) +\n\t\t\t\tMath.pow(dH / (Kh * Sh), 2) +\n\t\t\t\t(((Rt * dC) / (Kc * Sc)) * dH) / (Kh * Sh)\n\t\t);\n\t};\n};\n\n/*\n\tCMC (l:c) difference formula\n\n\tReferences:\n\t\thttps://en.wikipedia.org/wiki/Color_difference#CMC_l:c_(1984)\n\t\thttp://www.brucelindbloom.com/index.html?Eqn_DeltaE_CMC.html\n */\nconst differenceCmc = (l = 1, c = 1) => {\n\tlet lab = converter('lab65');\n\n\t/*\n\t\tComparte two colors:\n\t\tstd - standard (first) color\n\t\tsmp - sample (second) color\n\t */\n\treturn (std, smp) => {\n\t\t// convert standard color to Lab\n\t\tlet LabStd = lab(std);\n\t\tlet lStd = LabStd.l;\n\t\tlet aStd = LabStd.a;\n\t\tlet bStd = LabStd.b;\n\n\t\t// Obtain hue/chroma\n\t\tlet cStd = Math.sqrt(aStd * aStd + bStd * bStd);\n\t\tlet hStd = Math.atan2(bStd, aStd);\n\t\thStd = hStd + 2 * Math.PI * (hStd < 0);\n\n\t\t// convert sample color to Lab, obtain LCh\n\t\tlet LabSmp = lab(smp);\n\t\tlet lSmp = LabSmp.l;\n\t\tlet aSmp = LabSmp.a;\n\t\tlet bSmp = LabSmp.b;\n\n\t\t// Obtain chroma\n\t\tlet cSmp = Math.sqrt(aSmp * aSmp + bSmp * bSmp);\n\n\t\t// lightness delta squared\n\t\tlet dL2 = Math.pow(lStd - lSmp, 2);\n\n\t\t// chroma delta squared\n\t\tlet dC2 = Math.pow(cStd - cSmp, 2);\n\n\t\t// hue delta squared\n\t\tlet dH2 = Math.pow(aStd - aSmp, 2) + Math.pow(bStd - bSmp, 2) - dC2;\n\n\t\tlet F = Math.sqrt(Math.pow(cStd, 4) / (Math.pow(cStd, 4) + 1900));\n\t\tlet T =\n\t\t\thStd >= (164 / 180) * Math.PI && hStd <= (345 / 180) * Math.PI\n\t\t\t\t? 0.56 + Math.abs(0.2 * Math.cos(hStd + (168 / 180) * Math.PI))\n\t\t\t\t: 0.36 + Math.abs(0.4 * Math.cos(hStd + (35 / 180) * Math.PI));\n\n\t\tlet Sl = lStd < 16 ? 0.511 : (0.040975 * lStd) / (1 + 0.01765 * lStd);\n\t\tlet Sc = (0.0638 * cStd) / (1 + 0.0131 * cStd) + 0.638;\n\t\tlet Sh = Sc * (F * T + 1 - F);\n\n\t\treturn Math.sqrt(\n\t\t\tdL2 / Math.pow(l * Sl, 2) +\n\t\t\t\tdC2 / Math.pow(c * Sc, 2) +\n\t\t\t\tdH2 / Math.pow(Sh, 2)\n\t\t);\n\t};\n};\n\n/*\n\n\tHyAB color difference formula, introduced in:\n\n\t\tAbasi S, Amani Tehran M, Fairchild MD. \n\t\t\"Distance metrics for very large color differences.\"\n\t\tColor Res Appl. 2019; 1–16. \n\t\thttps://doi.org/10.1002/col.22451\n\n\tPDF available at:\n\t\n\t\thttp://markfairchild.org/PDFs/PAP40.pdf\n */\nconst differenceHyab = () => {\n\tlet lab = converter('lab65');\n\treturn (std, smp) => {\n\t\tlet LabStd = lab(std);\n\t\tlet LabSmp = lab(smp);\n\t\tlet dL = LabStd.l - LabSmp.l;\n\t\tlet dA = LabStd.a - LabSmp.a;\n\t\tlet dB = LabStd.b - LabSmp.b;\n\t\treturn Math.abs(dL) + Math.sqrt(dA * dA + dB * dB);\n\t};\n};\n\n/*\n\t\"Measuring perceived color difference using YIQ NTSC\n\ttransmission color space in mobile applications\"\n\t\t\n\t\tby Yuriy Kotsarenko, Fernando Ramos in:\n\t\tProgramación Matemática y Software (2010) \n\n\tAvailable at:\n\t\t\n\t\thttp://www.progmat.uaem.mx:8080/artVol2Num2/Articulo3Vol2Num2.pdf\n */\nconst differenceKotsarenkoRamos = () =>\n\tdifferenceEuclidean('yiq', [0.5053, 0.299, 0.1957]);\n\n/*\n\tΔE_ITP, as defined in Rec. ITU-R BT.2124:\n\n\thttps://www.itu.int/rec/R-REC-BT.2124/en\n*/\nconst differenceItp = () =>\n\tdifferenceEuclidean('itp', [518400, 129600, 518400]);\n\nexport {\n\tdifferenceHueChroma,\n\tdifferenceHueSaturation,\n\tdifferenceHueNaive,\n\tdifferenceEuclidean,\n\tdifferenceCie76,\n\tdifferenceCie94,\n\tdifferenceCiede2000,\n\tdifferenceCmc,\n\tdifferenceHyab,\n\tdifferenceKotsarenkoRamos,\n\tdifferenceItp\n};\n","import converter from './converter.js';\nimport { getMode } from './modes.js';\n\nconst averageAngle = val => {\n\t// See: https://en.wikipedia.org/wiki/Mean_of_circular_quantities\n\tlet sum = val.reduce(\n\t\t(sum, val) => {\n\t\t\tif (val !== undefined) {\n\t\t\t\tlet rad = (val * Math.PI) / 180;\n\t\t\t\tsum.sin += Math.sin(rad);\n\t\t\t\tsum.cos += Math.cos(rad);\n\t\t\t}\n\t\t\treturn sum;\n\t\t},\n\t\t{ sin: 0, cos: 0 }\n\t);\n\tlet angle = (Math.atan2(sum.sin, sum.cos) * 180) / Math.PI;\n\treturn angle < 0 ? 360 + angle : angle;\n};\n\nconst averageNumber = val => {\n\tlet a = val.filter(v => v !== undefined);\n\treturn a.length ? a.reduce((sum, v) => sum + v, 0) / a.length : undefined;\n};\n\nconst isfn = o => typeof o === 'function';\n\nfunction average(colors, mode = 'rgb', overrides) {\n\tlet def = getMode(mode);\n\tlet cc = colors.map(converter(mode));\n\treturn def.channels.reduce(\n\t\t(res, ch) => {\n\t\t\tlet arr = cc.map(c => c[ch]).filter(val => val !== undefined);\n\t\t\tif (arr.length) {\n\t\t\t\tlet fn;\n\t\t\t\tif (isfn(overrides)) {\n\t\t\t\t\tfn = overrides;\n\t\t\t\t} else if (overrides && isfn(overrides[ch])) {\n\t\t\t\t\tfn = overrides[ch];\n\t\t\t\t} else if (def.average && isfn(def.average[ch])) {\n\t\t\t\t\tfn = def.average[ch];\n\t\t\t\t} else {\n\t\t\t\t\tfn = averageNumber;\n\t\t\t\t}\n\t\t\t\tres[ch] = fn(arr, ch);\n\t\t\t}\n\t\t\treturn res;\n\t\t},\n\t\t{ mode }\n\t);\n}\n\nexport { average, averageAngle, averageNumber };\n","/* \n\tDave Green's Cubehelix\n\t----------------------\n\n\tGreen, D. A., 2011, \"A colour scheme for the display of astronomical intensity images\", \n\tBulletin of the Astronomical Society of India, 39, 289. (2011BASI...39..289G at ADS.) \n\n\thttps://www.mrao.cam.ac.uk/%7Edag/CUBEHELIX/\n\thttps://arxiv.org/pdf/1108.5083.pdf\n\n\tAlthough Cubehelix was defined to be a method to obtain a colour scheme,\n\tit actually contains a definition of a colour space, as identified by \n\tMike Bostock and implemented in D3.js.\n\n\tGreen's paper introduces the following terminology:\n\n\t* \ta `lightness` dimension in the interval [0, 1] \n\t\ton which we interpolate to obtain the colour scheme\n\t*\ta `start` colour that is analogous to a Hue in HSL space\n\t*\ta number of `rotations` around the Hue cylinder.\n\t*\ta `hue` parameter which should more appropriately be called `saturation`\n\t\n\tAs such, the original definition of the Cubehelix scheme is actually an\n\tinterpolation between two colors in the Cubehelix space:\n\n\tH: start \t\t\t\tH: start + 360 * rotations\n\tS: hue \t\t\t->\t\tS: hue\n\tL: 0\t\t\t\t\tL: 1\n\n\tWe can therefore extend the interpolation to any two colors in this space,\n\twith a variable Saturation and a Lightness interval other than the fixed 0 -> 1.\n*/\n\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport convertRgbToCubehelix from './convertRgbToCubehelix.js';\nimport convertCubehelixToRgb from './convertCubehelixToRgb.js';\nimport { differenceHueSaturation } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'cubehelix',\n\tchannels: ['h', 's', 'l', 'alpha'],\n\tparse: ['--cubehelix'],\n\tserialize: '--cubehelix',\n\n\tranges: {\n\t\th: [0, 360],\n\t\ts: [0, 4.614],\n\t\tl: [0, 1]\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToCubehelix\n\t},\n\n\ttoMode: {\n\t\trgb: convertCubehelixToRgb\n\t},\n\n\tinterpolate: {\n\t\th: {\n\t\t\tuse: interpolatorLinear,\n\t\t\tfixup: fixupHueShorter\n\t\t},\n\t\ts: interpolatorLinear,\n\t\tl: interpolatorLinear,\n\t\talpha: {\n\t\t\tuse: interpolatorLinear,\n\t\t\tfixup: fixupAlpha\n\t\t}\n\t},\n\n\tdifference: {\n\t\th: differenceHueSaturation\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","import normalizeHue from '../util/normalizeHue.js';\n\n/* \n\tReferences: \n\t\t* https://drafts.csswg.org/css-color/#lab-to-lch\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n*/\nconst convertLabToLch = ({ l, a, b, alpha }, mode = 'lch') => {\n\tif (a === undefined) a = 0;\n\tif (b === undefined) b = 0;\n\tlet c = Math.sqrt(a * a + b * b);\n\tlet res = { mode, l, c };\n\tif (c) res.h = normalizeHue((Math.atan2(b, a) * 180) / Math.PI);\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertLabToLch;\n","/* \n\tReferences: \n\t\t* https://drafts.csswg.org/css-color/#lch-to-lab\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n*/\nconst convertLchToLab = ({ l, c, h, alpha }, mode = 'lab') => {\n\tif (h === undefined) h = 0;\n\tlet res = {\n\t\tmode,\n\t\tl,\n\t\ta: c ? c * Math.cos((h / 180) * Math.PI) : 0,\n\t\tb: c ? c * Math.sin((h / 180) * Math.PI) : 0\n\t};\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertLchToLab;\n","export const k = Math.pow(29, 3) / Math.pow(3, 3);\nexport const e = Math.pow(6, 3) / Math.pow(29, 3);\n","/*\n\tThe XYZ tristimulus values (white point)\n\tof standard illuminants for the CIE 1931 2° \n\tstandard observer.\n\n\tSee: https://en.wikipedia.org/wiki/Standard_illuminant\n */\n\nexport const D50 = {\n\tX: 0.3457 / 0.3585,\n\tY: 1,\n\tZ: (1 - 0.3457 - 0.3585) / 0.3585\n};\n\nexport const D65 = {\n\tX: 0.3127 / 0.329,\n\tY: 1,\n\tZ: (1 - 0.3127 - 0.329) / 0.329\n};\n\nexport const k = Math.pow(29, 3) / Math.pow(3, 3);\nexport const e = Math.pow(6, 3) / Math.pow(29, 3);\n","import { k, e } from '../xyz65/constants.js';\nimport { D65 } from '../constants.js';\n\nlet fn = v => (Math.pow(v, 3) > e ? Math.pow(v, 3) : (116 * v - 16) / k);\n\nconst convertLab65ToXyz65 = ({ l, a, b, alpha }) => {\n\tif (l === undefined) l = 0;\n\tif (a === undefined) a = 0;\n\tif (b === undefined) b = 0;\n\n\tlet fy = (l + 16) / 116;\n\tlet fx = a / 500 + fy;\n\tlet fz = fy - b / 200;\n\n\tlet res = {\n\t\tmode: 'xyz65',\n\t\tx: fn(fx) * D65.X,\n\t\ty: fn(fy) * D65.Y,\n\t\tz: fn(fz) * D65.Z\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertLab65ToXyz65;\n","import convertLab65ToXyz65 from './convertLab65ToXyz65.js';\nimport convertXyz65ToRgb from '../xyz65/convertXyz65ToRgb.js';\n\nconst convertLab65ToRgb = lab => convertXyz65ToRgb(convertLab65ToXyz65(lab));\n\nexport default convertLab65ToRgb;\n","import { k, e } from '../xyz65/constants.js';\nimport { D65 } from '../constants.js';\n\nconst f = value => (value > e ? Math.cbrt(value) : (k * value + 16) / 116);\n\nconst convertXyz65ToLab65 = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet f0 = f(x / D65.X);\n\tlet f1 = f(y / D65.Y);\n\tlet f2 = f(z / D65.Z);\n\n\tlet res = {\n\t\tmode: 'lab65',\n\t\tl: 116 * f1 - 16,\n\t\ta: 500 * (f0 - f1),\n\t\tb: 200 * (f1 - f2)\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertXyz65ToLab65;\n","import convertRgbToXyz65 from '../xyz65/convertRgbToXyz65.js';\nimport convertXyz65ToLab65 from './convertXyz65ToLab65.js';\n\nconst convertRgbToLab65 = rgb => {\n\tlet res = convertXyz65ToLab65(convertRgbToXyz65(rgb));\n\n\t// Fixes achromatic RGB colors having a _slight_ chroma due to floating-point errors\n\t// and approximated computations in sRGB <-> CIELab.\n\t// See: https://github.com/d3/d3-color/pull/46\n\tif (rgb.r === rgb.b && rgb.b === rgb.g) {\n\t\tres.a = res.b = 0;\n\t}\n\treturn res;\n};\n\nexport default convertRgbToLab65;\n","export const kE = 1;\nexport const kCH = 1;\nexport const θ = (26 / 180) * Math.PI;\nexport const cosθ = Math.cos(θ);\nexport const sinθ = Math.sin(θ);\nexport const factor = 100 / Math.log(139 / 100); // ~ 303.67\n","import { kCH, kE, sinθ, cosθ, θ, factor } from './constants.js';\n\n/*\n\tConvert DIN99o LCh to CIELab D65\n\t--------------------------------\n */\n\nconst convertDlchToLab65 = ({ l, c, h, alpha }) => {\n\tif (l === undefined) l = 0;\n\tif (c === undefined) c = 0;\n\tif (h === undefined) h = 0;\n\tlet res = {\n\t\tmode: 'lab65',\n\t\tl: (Math.exp((l * kE) / factor) - 1) / 0.0039\n\t};\n\n\tlet G = (Math.exp(0.0435 * c * kCH * kE) - 1) / 0.075;\n\tlet e = G * Math.cos((h / 180) * Math.PI - θ);\n\tlet f = G * Math.sin((h / 180) * Math.PI - θ);\n\tres.a = e * cosθ - (f / 0.83) * sinθ;\n\tres.b = e * sinθ + (f / 0.83) * cosθ;\n\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertDlchToLab65;\n","import { kCH, kE, sinθ, cosθ, θ, factor } from './constants.js';\nimport normalizeHue from '../util/normalizeHue.js';\n\n/*\n\tConvert CIELab D65 to DIN99o LCh\n\t================================\n */\n\nconst convertLab65ToDlch = ({ l, a, b, alpha }) => {\n\tif (l === undefined) l = 0;\n\tif (a === undefined) a = 0;\n\tif (b === undefined) b = 0;\n\tlet e = a * cosθ + b * sinθ;\n\tlet f = 0.83 * (b * cosθ - a * sinθ);\n\tlet G = Math.sqrt(e * e + f * f);\n\tlet res = {\n\t\tmode: 'dlch',\n\t\tl: (factor / kE) * Math.log(1 + 0.0039 * l),\n\t\tc: Math.log(1 + 0.075 * G) / (0.0435 * kCH * kE)\n\t};\n\n\tif (res.c) {\n\t\tres.h = normalizeHue(((Math.atan2(f, e) + θ) / Math.PI) * 180);\n\t}\n\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertLab65ToDlch;\n","import convertLabToLch from '../lch/convertLabToLch.js';\nimport convertLchToLab from '../lch/convertLchToLab.js';\nimport convertLab65ToRgb from '../lab65/convertLab65ToRgb.js';\nimport convertRgbToLab65 from '../lab65/convertRgbToLab65.js';\nimport convertDlchToLab65 from '../dlch/convertDlchToLab65.js';\nimport convertLab65ToDlch from '../dlch/convertLab65ToDlch.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\nconst convertDlabToLab65 = c => convertDlchToLab65(convertLabToLch(c, 'dlch'));\nconst convertLab65ToDlab = c => convertLchToLab(convertLab65ToDlch(c), 'dlab');\n\nconst definition = {\n\tmode: 'dlab',\n\n\tparse: ['--din99o-lab'],\n\tserialize: '--din99o-lab',\n\n\ttoMode: {\n\t\tlab65: convertDlabToLab65,\n\t\trgb: c => convertLab65ToRgb(convertDlabToLab65(c))\n\t},\n\n\tfromMode: {\n\t\tlab65: convertLab65ToDlab,\n\t\trgb: c => convertLab65ToDlab(convertRgbToLab65(c))\n\t},\n\n\tchannels: ['l', 'a', 'b', 'alpha'],\n\n\tranges: {\n\t\tl: [0, 100],\n\t\ta: [-40.09, 45.501],\n\t\tb: [-40.469, 44.344]\n\t},\n\n\tinterpolate: {\n\t\tl: interpolatorLinear,\n\t\ta: interpolatorLinear,\n\t\tb: interpolatorLinear,\n\t\talpha: {\n\t\t\tuse: interpolatorLinear,\n\t\t\tfixup: fixupAlpha\n\t\t}\n\t}\n};\n\nexport default definition;\n","import convertLabToLch from '../lch/convertLabToLch.js';\nimport convertLchToLab from '../lch/convertLchToLab.js';\nimport convertDlchToLab65 from './convertDlchToLab65.js';\nimport convertLab65ToDlch from './convertLab65ToDlch.js';\nimport convertLab65ToRgb from '../lab65/convertLab65ToRgb.js';\nimport convertRgbToLab65 from '../lab65/convertRgbToLab65.js';\n\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueChroma } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'dlch',\n\n\tparse: ['--din99o-lch'],\n\tserialize: '--din99o-lch',\n\n\ttoMode: {\n\t\tlab65: convertDlchToLab65,\n\t\tdlab: c => convertLchToLab(c, 'dlab'),\n\t\trgb: c => convertLab65ToRgb(convertDlchToLab65(c))\n\t},\n\n\tfromMode: {\n\t\tlab65: convertLab65ToDlch,\n\t\tdlab: c => convertLabToLch(c, 'dlch'),\n\t\trgb: c => convertLab65ToDlch(convertRgbToLab65(c))\n\t},\n\n\tchannels: ['l', 'c', 'h', 'alpha'],\n\n\tranges: {\n\t\tl: [0, 100],\n\t\tc: [0, 51.484],\n\t\th: [0, 360]\n\t},\n\n\tinterpolate: {\n\t\tl: interpolatorLinear,\n\t\tc: interpolatorLinear,\n\t\th: {\n\t\t\tuse: interpolatorLinear,\n\t\t\tfixup: fixupHueShorter\n\t\t},\n\t\talpha: {\n\t\t\tuse: interpolatorLinear,\n\t\t\tfixup: fixupAlpha\n\t\t}\n\t},\n\n\tdifference: {\n\t\th: differenceHueChroma\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","import normalizeHue from '../util/normalizeHue.js';\n\n// Based on: https://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB\n\nexport default function convertHsiToRgb({ h, s, i, alpha }) {\n\th = normalizeHue(h !== undefined ? h : 0);\n\tif (s === undefined) s = 0;\n\tif (i === undefined) i = 0;\n\tlet f = Math.abs(((h / 60) % 2) - 1);\n\tlet res;\n\tswitch (Math.floor(h / 60)) {\n\t\tcase 0:\n\t\t\tres = {\n\t\t\t\tr: i * (1 + s * (3 / (2 - f) - 1)),\n\t\t\t\tg: i * (1 + s * ((3 * (1 - f)) / (2 - f) - 1)),\n\t\t\t\tb: i * (1 - s)\n\t\t\t};\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tres = {\n\t\t\t\tr: i * (1 + s * ((3 * (1 - f)) / (2 - f) - 1)),\n\t\t\t\tg: i * (1 + s * (3 / (2 - f) - 1)),\n\t\t\t\tb: i * (1 - s)\n\t\t\t};\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tres = {\n\t\t\t\tr: i * (1 - s),\n\t\t\t\tg: i * (1 + s * (3 / (2 - f) - 1)),\n\t\t\t\tb: i * (1 + s * ((3 * (1 - f)) / (2 - f) - 1))\n\t\t\t};\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tres = {\n\t\t\t\tr: i * (1 - s),\n\t\t\t\tg: i * (1 + s * ((3 * (1 - f)) / (2 - f) - 1)),\n\t\t\t\tb: i * (1 + s * (3 / (2 - f) - 1))\n\t\t\t};\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tres = {\n\t\t\t\tr: i * (1 + s * ((3 * (1 - f)) / (2 - f) - 1)),\n\t\t\t\tg: i * (1 - s),\n\t\t\t\tb: i * (1 + s * (3 / (2 - f) - 1))\n\t\t\t};\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tres = {\n\t\t\t\tr: i * (1 + s * (3 / (2 - f) - 1)),\n\t\t\t\tg: i * (1 - s),\n\t\t\t\tb: i * (1 + s * ((3 * (1 - f)) / (2 - f) - 1))\n\t\t\t};\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tres = { r: i * (1 - s), g: i * (1 - s), b: i * (1 - s) };\n\t}\n\n\tres.mode = 'rgb';\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n}\n","// Based on: https://en.wikipedia.org/wiki/HSL_and_HSV#Formal_derivation\n\nexport default function convertRgbToHsi({ r, g, b, alpha }) {\n\tif (r === undefined) r = 0;\n\tif (g === undefined) g = 0;\n\tif (b === undefined) b = 0;\n\tlet M = Math.max(r, g, b),\n\t\tm = Math.min(r, g, b);\n\tlet res = {\n\t\tmode: 'hsi',\n\t\ts: r + g + b === 0 ? 0 : 1 - (3 * m) / (r + g + b),\n\t\ti: (r + g + b) / 3\n\t};\n\tif (M - m !== 0)\n\t\tres.h =\n\t\t\t(M === r\n\t\t\t\t? (g - b) / (M - m) + (g < b) * 6\n\t\t\t\t: M === g\n\t\t\t\t? (b - r) / (M - m) + 2\n\t\t\t\t: (r - g) / (M - m) + 4) * 60;\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n}\n","import convertHsiToRgb from './convertHsiToRgb.js';\nimport convertRgbToHsi from './convertRgbToHsi.js';\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueSaturation } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'hsi',\n\n\ttoMode: {\n\t\trgb: convertHsiToRgb\n\t},\n\n\tparse: ['--hsi'],\n\tserialize: '--hsi',\n\n\tfromMode: {\n\t\trgb: convertRgbToHsi\n\t},\n\n\tchannels: ['h', 's', 'i', 'alpha'],\n\n\tranges: {\n\t\th: [0, 360]\n\t},\n\n\tgamut: 'rgb',\n\n\tinterpolate: {\n\t\th: { use: interpolatorLinear, fixup: fixupHueShorter },\n\t\ts: interpolatorLinear,\n\t\ti: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\n\tdifference: {\n\t\th: differenceHueSaturation\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","import normalizeHue from '../util/normalizeHue.js';\n// Based on: https://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB\n\nexport default function convertHslToRgb({ h, s, l, alpha }) {\n\th = normalizeHue(h !== undefined ? h : 0);\n\tif (s === undefined) s = 0;\n\tif (l === undefined) l = 0;\n\tlet m1 = l + s * (l < 0.5 ? l : 1 - l);\n\tlet m2 = m1 - (m1 - l) * 2 * Math.abs(((h / 60) % 2) - 1);\n\tlet res;\n\tswitch (Math.floor(h / 60)) {\n\t\tcase 0:\n\t\t\tres = { r: m1, g: m2, b: 2 * l - m1 };\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tres = { r: m2, g: m1, b: 2 * l - m1 };\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tres = { r: 2 * l - m1, g: m1, b: m2 };\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tres = { r: 2 * l - m1, g: m2, b: m1 };\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tres = { r: m2, g: 2 * l - m1, b: m1 };\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tres = { r: m1, g: 2 * l - m1, b: m2 };\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tres = { r: 2 * l - m1, g: 2 * l - m1, b: 2 * l - m1 };\n\t}\n\tres.mode = 'rgb';\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n}\n","// Based on: https://en.wikipedia.org/wiki/HSL_and_HSV#Formal_derivation\n\nexport default function convertRgbToHsl({ r, g, b, alpha }) {\n\tif (r === undefined) r = 0;\n\tif (g === undefined) g = 0;\n\tif (b === undefined) b = 0;\n\tlet M = Math.max(r, g, b),\n\t\tm = Math.min(r, g, b);\n\tlet res = {\n\t\tmode: 'hsl',\n\t\ts: M === m ? 0 : (M - m) / (1 - Math.abs(M + m - 1)),\n\t\tl: 0.5 * (M + m)\n\t};\n\tif (M - m !== 0)\n\t\tres.h =\n\t\t\t(M === r\n\t\t\t\t? (g - b) / (M - m) + (g < b) * 6\n\t\t\t\t: M === g\n\t\t\t\t? (b - r) / (M - m) + 2\n\t\t\t\t: (r - g) / (M - m) + 4) * 60;\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n}\n","const hueToDeg = (val, unit) => {\n\tswitch (unit) {\n\t\tcase 'deg':\n\t\t\treturn +val;\n\t\tcase 'rad':\n\t\t\treturn (val / Math.PI) * 180;\n\t\tcase 'grad':\n\t\t\treturn (val / 10) * 9;\n\t\tcase 'turn':\n\t\t\treturn val * 360;\n\t}\n};\n\nexport default hueToDeg;\n","import hueToDeg from '../util/hue.js';\nimport { hue, per, num_per, c } from '../util/regex.js';\n\n/*\n\thsl() regular expressions for legacy format\n\tReference: https://drafts.csswg.org/css-color/#the-hsl-notation\n */\nconst hsl_old = new RegExp(\n\t`^hsla?\\\\(\\\\s*${hue}${c}${per}${c}${per}\\\\s*(?:,\\\\s*${num_per}\\\\s*)?\\\\)$`\n);\n\nconst parseHslLegacy = color => {\n\tlet match = color.match(hsl_old);\n\tif (!match) return;\n\tlet res = { mode: 'hsl' };\n\n\tif (match[3] !== undefined) {\n\t\tres.h = +match[3];\n\t} else if (match[1] !== undefined && match[2] !== undefined) {\n\t\tres.h = hueToDeg(match[1], match[2]);\n\t}\n\n\tif (match[4] !== undefined) {\n\t\tres.s = Math.min(Math.max(0, match[4] / 100), 1);\n\t}\n\n\tif (match[5] !== undefined) {\n\t\tres.l = Math.min(Math.max(0, match[5] / 100), 1);\n\t}\n\n\tif (match[6] !== undefined) {\n\t\tres.alpha = Math.max(0, Math.min(1, match[6] / 100));\n\t} else if (match[7] !== undefined) {\n\t\tres.alpha = Math.max(0, Math.min(1, +match[7]));\n\t}\n\treturn res;\n};\n\nexport default parseHslLegacy;\n","import { Tok } from '../parse.js';\n\nfunction parseHsl(color, parsed) {\n\tif (!parsed || (parsed[0] !== 'hsl' && parsed[0] !== 'hsla')) {\n\t\treturn undefined;\n\t}\n\tconst res = { mode: 'hsl' };\n\tconst [, h, s, l, alpha] = parsed;\n\n\tif (h.type !== Tok.None) {\n\t\tif (h.type === Tok.Percentage) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.h = h.value;\n\t}\n\n\tif (s.type !== Tok.None) {\n\t\tif (s.type === Tok.Hue) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.s = s.value / 100;\n\t}\n\n\tif (l.type !== Tok.None) {\n\t\tif (l.type === Tok.Hue) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.l = l.value / 100;\n\t}\n\n\tif (alpha.type !== Tok.None) {\n\t\tres.alpha = Math.min(\n\t\t\t1,\n\t\t\tMath.max(\n\t\t\t\t0,\n\t\t\t\talpha.type === Tok.Number ? alpha.value : alpha.value / 100\n\t\t\t)\n\t\t);\n\t}\n\n\treturn res;\n}\n\nexport default parseHsl;\n","import convertHslToRgb from './convertHslToRgb.js';\nimport convertRgbToHsl from './convertRgbToHsl.js';\nimport parseHslLegacy from './parseHslLegacy.js';\nimport parseHsl from './parseHsl.js';\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueSaturation } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'hsl',\n\n\ttoMode: {\n\t\trgb: convertHslToRgb\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToHsl\n\t},\n\n\tchannels: ['h', 's', 'l', 'alpha'],\n\n\tranges: {\n\t\th: [0, 360]\n\t},\n\n\tgamut: 'rgb',\n\n\tparse: [parseHsl, parseHslLegacy],\n\tserialize: c =>\n\t\t`hsl(${c.h !== undefined ? c.h : 'none'} ${\n\t\t\tc.s !== undefined ? c.s * 100 + '%' : 'none'\n\t\t} ${c.l !== undefined ? c.l * 100 + '%' : 'none'}${\n\t\t\tc.alpha < 1 ? ` / ${c.alpha}` : ''\n\t\t})`,\n\n\tinterpolate: {\n\t\th: { use: interpolatorLinear, fixup: fixupHueShorter },\n\t\ts: interpolatorLinear,\n\t\tl: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\n\tdifference: {\n\t\th: differenceHueSaturation\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","import normalizeHue from '../util/normalizeHue.js';\n\n// Based on: https://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB\n\nexport default function convertHsvToRgb({ h, s, v, alpha }) {\n\th = normalizeHue(h !== undefined ? h : 0);\n\tif (s === undefined) s = 0;\n\tif (v === undefined) v = 0;\n\tlet f = Math.abs(((h / 60) % 2) - 1);\n\tlet res;\n\tswitch (Math.floor(h / 60)) {\n\t\tcase 0:\n\t\t\tres = { r: v, g: v * (1 - s * f), b: v * (1 - s) };\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tres = { r: v * (1 - s * f), g: v, b: v * (1 - s) };\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tres = { r: v * (1 - s), g: v, b: v * (1 - s * f) };\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tres = { r: v * (1 - s), g: v * (1 - s * f), b: v };\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tres = { r: v * (1 - s * f), g: v * (1 - s), b: v };\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tres = { r: v, g: v * (1 - s), b: v * (1 - s * f) };\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tres = { r: v * (1 - s), g: v * (1 - s), b: v * (1 - s) };\n\t}\n\tres.mode = 'rgb';\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n}\n","// Based on: https://en.wikipedia.org/wiki/HSL_and_HSV#Formal_derivation\n\nexport default function convertRgbToHsv({ r, g, b, alpha }) {\n\tif (r === undefined) r = 0;\n\tif (g === undefined) g = 0;\n\tif (b === undefined) b = 0;\n\tlet M = Math.max(r, g, b),\n\t\tm = Math.min(r, g, b);\n\tlet res = {\n\t\tmode: 'hsv',\n\t\ts: M === 0 ? 0 : 1 - m / M,\n\t\tv: M\n\t};\n\tif (M - m !== 0)\n\t\tres.h =\n\t\t\t(M === r\n\t\t\t\t? (g - b) / (M - m) + (g < b) * 6\n\t\t\t\t: M === g\n\t\t\t\t? (b - r) / (M - m) + 2\n\t\t\t\t: (r - g) / (M - m) + 4) * 60;\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n}\n","import convertHsvToRgb from './convertHsvToRgb.js';\nimport convertRgbToHsv from './convertRgbToHsv.js';\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueSaturation } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'hsv',\n\n\ttoMode: {\n\t\trgb: convertHsvToRgb\n\t},\n\n\tparse: ['--hsv'],\n\tserialize: '--hsv',\n\n\tfromMode: {\n\t\trgb: convertRgbToHsv\n\t},\n\n\tchannels: ['h', 's', 'v', 'alpha'],\n\n\tranges: {\n\t\th: [0, 360]\n\t},\n\n\tgamut: 'rgb',\n\n\tinterpolate: {\n\t\th: { use: interpolatorLinear, fixup: fixupHueShorter },\n\t\ts: interpolatorLinear,\n\t\tv: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\n\tdifference: {\n\t\th: differenceHueSaturation\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","/*\n\tHWB to RGB converter\n\t--------------------\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#hwb-to-rgb\n\t\t* https://en.wikipedia.org/wiki/HWB_color_model\n\t\t* http://alvyray.com/Papers/CG/HWB_JGTv208.pdf\n */\n\nimport convertHsvToRgb from '../hsv/convertHsvToRgb.js';\n\nexport default function convertHwbToRgb({ h, w, b, alpha }) {\n\tif (w === undefined) w = 0;\n\tif (b === undefined) b = 0;\n\t// normalize w + b to 1\n\tif (w + b > 1) {\n\t\tlet s = w + b;\n\t\tw /= s;\n\t\tb /= s;\n\t}\n\treturn convertHsvToRgb({\n\t\th: h,\n\t\ts: b === 1 ? 1 : 1 - w / (1 - b),\n\t\tv: 1 - b,\n\t\talpha: alpha\n\t});\n}\n","/*\n\tRGB to HWB converter\n\t--------------------\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#hwb-to-rgb\n\t\t* https://en.wikipedia.org/wiki/HWB_color_model\n\t\t* http://alvyray.com/Papers/CG/HWB_JGTv208.pdf\n */\n\nimport convertRgbToHsv from '../hsv/convertRgbToHsv.js';\n\nexport default function convertRgbToHwb(rgba) {\n\tlet hsv = convertRgbToHsv(rgba);\n\tif (hsv === undefined) return undefined;\n\tlet s = hsv.s !== undefined ? hsv.s : 0;\n\tlet v = hsv.v !== undefined ? hsv.v : 0;\n\tlet res = {\n\t\tmode: 'hwb',\n\t\tw: (1 - s) * v,\n\t\tb: 1 - v\n\t};\n\tif (hsv.h !== undefined) res.h = hsv.h;\n\tif (hsv.alpha !== undefined) res.alpha = hsv.alpha;\n\treturn res;\n}\n","import { Tok } from '../parse.js';\n\nfunction ParseHwb(color, parsed) {\n\tif (!parsed || parsed[0] !== 'hwb') {\n\t\treturn undefined;\n\t}\n\tconst res = { mode: 'hwb' };\n\tconst [, h, w, b, alpha] = parsed;\n\n\tif (h.type !== Tok.None) {\n\t\tif (h.type === Tok.Percentage) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.h = h.value;\n\t}\n\n\tif (w.type !== Tok.None) {\n\t\tif (w.type === Tok.Hue) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.w = w.value / 100;\n\t}\n\n\tif (b.type !== Tok.None) {\n\t\tif (b.type === Tok.Hue) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.b = b.value / 100;\n\t}\n\n\tif (alpha.type !== Tok.None) {\n\t\tres.alpha = Math.min(\n\t\t\t1,\n\t\t\tMath.max(\n\t\t\t\t0,\n\t\t\t\talpha.type === Tok.Number ? alpha.value : alpha.value / 100\n\t\t\t)\n\t\t);\n\t}\n\n\treturn res;\n}\n\nexport default ParseHwb;\n","import convertHwbToRgb from './convertHwbToRgb.js';\nimport convertRgbToHwb from './convertRgbToHwb.js';\nimport parseHwb from './parseHwb.js';\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueNaive } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'hwb',\n\n\ttoMode: {\n\t\trgb: convertHwbToRgb\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToHwb\n\t},\n\n\tchannels: ['h', 'w', 'b', 'alpha'],\n\n\tranges: {\n\t\th: [0, 360]\n\t},\n\n\tgamut: 'rgb',\n\n\tparse: [parseHwb],\n\tserialize: c =>\n\t\t`hwb(${c.h !== undefined ? c.h : 'none'} ${\n\t\t\tc.w !== undefined ? c.w * 100 + '%' : 'none'\n\t\t} ${c.b !== undefined ? c.b * 100 + '%' : 'none'}${\n\t\t\tc.alpha < 1 ? ` / ${c.alpha}` : ''\n\t\t})`,\n\n\tinterpolate: {\n\t\th: { use: interpolatorLinear, fixup: fixupHueShorter },\n\t\tw: interpolatorLinear,\n\t\tb: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\n\tdifference: {\n\t\th: differenceHueNaive\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","/*\n\thttps://en.wikipedia.org/wiki/Transfer_functions_in_imaging\n*/\n\nexport const M1 = 0.1593017578125;\nexport const M2 = 78.84375;\nexport const C1 = 0.8359375;\nexport const C2 = 18.8515625;\nexport const C3 = 18.6875;\n\n/*\n\tPerceptual Quantizer, as defined in Rec. BT 2100-2 (2018)\n\n\t* https://www.itu.int/rec/R-REC-BT.2100-2-201807-I/en\n\t* https://en.wikipedia.org/wiki/Perceptual_quantizer\n*/\n\n/* PQ EOTF, defined for `v` in [0,1]. */\nexport function transferPqDecode(v) {\n\tif (v < 0) return 0;\n\tconst c = Math.pow(v, 1 / M2);\n\treturn 1e4 * Math.pow(Math.max(0, c - C1) / (C2 - C3 * c), 1 / M1);\n}\n\n/* PQ EOTF^-1, defined for `v` in [0, 1e4]. */\nexport function transferPqEncode(v) {\n\tif (v < 0) return 0;\n\tconst c = Math.pow(v / 1e4, M1);\n\treturn Math.pow((C1 + C2 * c) / (1 + C3 * c), M2);\n}\n","import { YW } from '../hdr/constants.js';\nimport { transferPqDecode } from '../hdr/transfer.js';\n\nconst toRel = c => Math.max(c / YW, 0);\n\nconst convertItpToXyz65 = ({ i, t, p, alpha }) => {\n\tif (i === undefined) i = 0;\n\tif (t === undefined) t = 0;\n\tif (p === undefined) p = 0;\n\n\tconst l = transferPqDecode(\n\t\ti + 0.008609037037932761 * t + 0.11102962500302593 * p\n\t);\n\tconst m = transferPqDecode(\n\t\ti - 0.00860903703793275 * t - 0.11102962500302599 * p\n\t);\n\tconst s = transferPqDecode(\n\t\ti + 0.5600313357106791 * t - 0.32062717498731885 * p\n\t);\n\n\tconst res = {\n\t\tmode: 'xyz65',\n\t\tx: toRel(\n\t\t\t2.0701522183894219 * l -\n\t\t\t\t1.3263473389671556 * m +\n\t\t\t\t0.2066510476294051 * s\n\t\t),\n\t\ty: toRel(\n\t\t\t0.3647385209748074 * l +\n\t\t\t\t0.680566024947227 * m -\n\t\t\t\t0.0453045459220346 * s\n\t\t),\n\t\tz: toRel(\n\t\t\t-0.049747207535812 * l -\n\t\t\t\t0.0492609666966138 * m +\n\t\t\t\t1.1880659249923042 * s\n\t\t)\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertItpToXyz65;\n","import { YW } from '../hdr/constants.js';\nimport { transferPqEncode } from '../hdr/transfer.js';\n\nconst toAbs = (c = 0) => Math.max(c * YW, 0);\n\nconst convertXyz65ToItp = ({ x, y, z, alpha }) => {\n\tconst absX = toAbs(x);\n\tconst absY = toAbs(y);\n\tconst absZ = toAbs(z);\n\tconst l = transferPqEncode(\n\t\t0.3592832590121217 * absX +\n\t\t\t0.6976051147779502 * absY -\n\t\t\t0.0358915932320289 * absZ\n\t);\n\tconst m = transferPqEncode(\n\t\t-0.1920808463704995 * absX +\n\t\t\t1.1004767970374323 * absY +\n\t\t\t0.0753748658519118 * absZ\n\t);\n\tconst s = transferPqEncode(\n\t\t0.0070797844607477 * absX +\n\t\t\t0.0748396662186366 * absY +\n\t\t\t0.8433265453898765 * absZ\n\t);\n\n\tconst i = 0.5 * l + 0.5 * m;\n\tconst t = 1.61376953125 * l - 3.323486328125 * m + 1.709716796875 * s;\n\tconst p = 4.378173828125 * l - 4.24560546875 * m - 0.132568359375 * s;\n\n\tconst res = { mode: 'itp', i, t, p };\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertXyz65ToItp;\n","import { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport convertItpToXyz65 from './convertItpToXyz65.js';\nimport convertXyz65ToItp from './convertXyz65ToItp.js';\nimport convertRgbToXyz65 from '../xyz65/convertRgbToXyz65.js';\nimport convertXyz65ToRgb from '../xyz65/convertXyz65ToRgb.js';\n\n/*\n ICtCp (or ITP) color space, as defined in ITU-R Recommendation BT.2100.\n\n ICtCp is drafted to be supported in CSS within\n [CSS Color HDR Module Level 1](https://drafts.csswg.org/css-color-hdr/#ICtCp) spec.\n*/\n\nconst definition = {\n\tmode: 'itp',\n\tchannels: ['i', 't', 'p', 'alpha'],\n\tparse: ['--ictcp'],\n\tserialize: '--ictcp',\n\n\ttoMode: {\n\t\txyz65: convertItpToXyz65,\n\t\trgb: color => convertXyz65ToRgb(convertItpToXyz65(color))\n\t},\n\n\tfromMode: {\n\t\txyz65: convertXyz65ToItp,\n\t\trgb: color => convertXyz65ToItp(convertRgbToXyz65(color))\n\t},\n\n\tranges: {\n\t\ti: [0, 0.581],\n\t\tt: [-0.369, 0.272],\n\t\tp: [-0.164, 0.331]\n\t},\n\n\tinterpolate: {\n\t\ti: interpolatorLinear,\n\t\tt: interpolatorLinear,\n\t\tp: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","import { M1 as n, C1, C2, C3 } from '../hdr/transfer.js';\nconst p = 134.03437499999998; // = 1.7 * 2523 / Math.pow(2, 5);\nconst d0 = 1.6295499532821566e-11;\n\n/* \n\tThe encoding function is derived from Perceptual Quantizer.\n*/\nconst jabPqEncode = v => {\n\tif (v < 0) return 0;\n\tlet vn = Math.pow(v / 10000, n);\n\treturn Math.pow((C1 + C2 * vn) / (1 + C3 * vn), p);\n};\n\n// Convert to Absolute XYZ\nconst abs = (v = 0) => Math.max(v * 203, 0);\n\nconst convertXyz65ToJab = ({ x, y, z, alpha }) => {\n\tx = abs(x);\n\ty = abs(y);\n\tz = abs(z);\n\n\tlet xp = 1.15 * x - 0.15 * z;\n\tlet yp = 0.66 * y + 0.34 * x;\n\n\tlet l = jabPqEncode(0.41478972 * xp + 0.579999 * yp + 0.014648 * z);\n\tlet m = jabPqEncode(-0.20151 * xp + 1.120649 * yp + 0.0531008 * z);\n\tlet s = jabPqEncode(-0.0166008 * xp + 0.2648 * yp + 0.6684799 * z);\n\n\tlet i = (l + m) / 2;\n\n\tlet res = {\n\t\tmode: 'jab',\n\t\tj: (0.44 * i) / (1 - 0.56 * i) - d0,\n\t\ta: 3.524 * l - 4.066708 * m + 0.542708 * s,\n\t\tb: 0.199076 * l + 1.096799 * m - 1.295875 * s\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertXyz65ToJab;\n","import { M1 as n, C1, C2, C3 } from '../hdr/transfer.js';\nconst p = 134.03437499999998; // = 1.7 * 2523 / Math.pow(2, 5);\nconst d0 = 1.6295499532821566e-11;\n\n/* \n\tThe encoding function is derived from Perceptual Quantizer.\n*/\nconst jabPqDecode = v => {\n\tif (v < 0) return 0;\n\tlet vp = Math.pow(v, 1 / p);\n\treturn 10000 * Math.pow((C1 - vp) / (C3 * vp - C2), 1 / n);\n};\n\nconst rel = v => v / 203;\n\nconst convertJabToXyz65 = ({ j, a, b, alpha }) => {\n\tif (j === undefined) j = 0;\n\tif (a === undefined) a = 0;\n\tif (b === undefined) b = 0;\n\tlet i = (j + d0) / (0.44 + 0.56 * (j + d0));\n\n\tlet l = jabPqDecode(i + 0.13860504 * a + 0.058047316 * b);\n\tlet m = jabPqDecode(i - 0.13860504 * a - 0.058047316 * b);\n\tlet s = jabPqDecode(i - 0.096019242 * a - 0.8118919 * b);\n\n\tlet res = {\n\t\tmode: 'xyz65',\n\t\tx: rel(\n\t\t\t1.661373024652174 * l -\n\t\t\t\t0.914523081304348 * m +\n\t\t\t\t0.23136208173913045 * s\n\t\t),\n\t\ty: rel(\n\t\t\t-0.3250758611844533 * l +\n\t\t\t\t1.571847026732543 * m -\n\t\t\t\t0.21825383453227928 * s\n\t\t),\n\t\tz: rel(-0.090982811 * l - 0.31272829 * m + 1.5227666 * s)\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertJabToXyz65;\n","/*\n\tConvert sRGB to JzAzBz.\n\n\tFor achromatic sRGB colors, adjust the equivalent JzAzBz color\n\tto be achromatic as well, insteading of having a very slight chroma.\n */\n\nimport convertXyz65ToJab from './convertXyz65ToJab.js';\nimport convertRgbToXyz65 from '../xyz65/convertRgbToXyz65.js';\n\nconst convertRgbToJab = rgb => {\n\tlet res = convertXyz65ToJab(convertRgbToXyz65(rgb));\n\tif (rgb.r === rgb.b && rgb.b === rgb.g) {\n\t\tres.a = res.b = 0;\n\t}\n\treturn res;\n};\n\nexport default convertRgbToJab;\n","import convertXyz65ToRgb from '../xyz65/convertXyz65ToRgb.js';\nimport convertJabToXyz65 from './convertJabToXyz65.js';\n\nconst convertJabToRgb = color => convertXyz65ToRgb(convertJabToXyz65(color));\n\nexport default convertJabToRgb;\n","/*\n\tThe JzAzBz color space.\n\n\tBased on:\n\n\tMuhammad Safdar, Guihua Cui, Youn Jin Kim, and Ming Ronnier Luo, \n\t\"Perceptually uniform color space for image signals \n\tincluding high dynamic range and wide gamut,\" \n\tOpt. Express 25, 15131-15151 (2017) \n\n\thttps://doi.org/10.1364/OE.25.015131\n */\n\nimport convertXyz65ToJab from './convertXyz65ToJab.js';\nimport convertJabToXyz65 from './convertJabToXyz65.js';\nimport convertRgbToJab from './convertRgbToJab.js';\nimport convertJabToRgb from './convertJabToRgb.js';\n\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\nconst definition = {\n\tmode: 'jab',\n\tchannels: ['j', 'a', 'b', 'alpha'],\n\n\tparse: ['--jzazbz'],\n\tserialize: '--jzazbz',\n\n\tfromMode: {\n\t\trgb: convertRgbToJab,\n\t\txyz65: convertXyz65ToJab\n\t},\n\n\ttoMode: {\n\t\trgb: convertJabToRgb,\n\t\txyz65: convertJabToXyz65\n\t},\n\n\tranges: {\n\t\tj: [0, 0.222],\n\t\ta: [-0.109, 0.129],\n\t\tb: [-0.185, 0.134]\n\t},\n\n\tinterpolate: {\n\t\tj: interpolatorLinear,\n\t\ta: interpolatorLinear,\n\t\tb: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","import normalizeHue from '../util/normalizeHue.js';\n\nconst convertJabToJch = ({ j, a, b, alpha }) => {\n\tif (a === undefined) a = 0;\n\tif (b === undefined) b = 0;\n\tlet c = Math.sqrt(a * a + b * b);\n\tlet res = {\n\t\tmode: 'jch',\n\t\tj,\n\t\tc\n\t};\n\tif (c) {\n\t\tres.h = normalizeHue((Math.atan2(b, a) * 180) / Math.PI);\n\t}\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertJabToJch;\n","const convertJchToJab = ({ j, c, h, alpha }) => {\n\tif (h === undefined) h = 0;\n\tlet res = {\n\t\tmode: 'jab',\n\t\tj,\n\t\ta: c ? c * Math.cos((h / 180) * Math.PI) : 0,\n\t\tb: c ? c * Math.sin((h / 180) * Math.PI) : 0\n\t};\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertJchToJab;\n","import convertJabToJch from './convertJabToJch.js';\nimport convertJchToJab from './convertJchToJab.js';\nimport convertJabToRgb from '../jab/convertJabToRgb.js';\nimport convertRgbToJab from '../jab/convertRgbToJab.js';\n\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueChroma } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'jch',\n\n\tparse: ['--jzczhz'],\n\tserialize: '--jzczhz',\n\n\ttoMode: {\n\t\tjab: convertJchToJab,\n\t\trgb: c => convertJabToRgb(convertJchToJab(c))\n\t},\n\n\tfromMode: {\n\t\trgb: c => convertJabToJch(convertRgbToJab(c)),\n\t\tjab: convertJabToJch\n\t},\n\n\tchannels: ['j', 'c', 'h', 'alpha'],\n\n\tranges: {\n\t\tj: [0, 0.221],\n\t\tc: [0, 0.19],\n\t\th: [0, 360]\n\t},\n\n\tinterpolate: {\n\t\th: { use: interpolatorLinear, fixup: fixupHueShorter },\n\t\tc: interpolatorLinear,\n\t\tj: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\n\tdifference: {\n\t\th: differenceHueChroma\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","export const k = Math.pow(29, 3) / Math.pow(3, 3);\nexport const e = Math.pow(6, 3) / Math.pow(29, 3);\n","import { k, e } from '../xyz50/constants.js';\nimport { D50 } from '../constants.js';\n\nlet fn = v => (Math.pow(v, 3) > e ? Math.pow(v, 3) : (116 * v - 16) / k);\n\nconst convertLabToXyz50 = ({ l, a, b, alpha }) => {\n\tif (l === undefined) l = 0;\n\tif (a === undefined) a = 0;\n\tif (b === undefined) b = 0;\n\tlet fy = (l + 16) / 116;\n\tlet fx = a / 500 + fy;\n\tlet fz = fy - b / 200;\n\n\tlet res = {\n\t\tmode: 'xyz50',\n\t\tx: fn(fx) * D50.X,\n\t\ty: fn(fy) * D50.Y,\n\t\tz: fn(fz) * D50.Z\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertLabToXyz50;\n","/*\n\tCIE XYZ D50 values to sRGB.\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n*/\n\nimport convertLrgbToRgb from '../lrgb/convertLrgbToRgb.js';\n\nconst convertXyz50ToRgb = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = convertLrgbToRgb({\n\t\tr:\n\t\t\tx * 3.1341359569958707 -\n\t\t\ty * 1.6173863321612538 -\n\t\t\t0.4906619460083532 * z,\n\t\tg:\n\t\t\tx * -0.978795502912089 +\n\t\t\ty * 1.916254567259524 +\n\t\t\t0.03344273116131949 * z,\n\t\tb:\n\t\t\tx * 0.07195537988411677 -\n\t\t\ty * 0.2289768264158322 +\n\t\t\t1.405386058324125 * z\n\t});\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz50ToRgb;\n","import convertLabToXyz50 from './convertLabToXyz50.js';\nimport convertXyz50ToRgb from '../xyz50/convertXyz50ToRgb.js';\n\nconst convertLabToRgb = lab => convertXyz50ToRgb(convertLabToXyz50(lab));\n\nexport default convertLabToRgb;\n","/*\n\tConvert sRGB values to CIE XYZ D50\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n\t\n*/\n\nimport convertRgbToLrgb from '../lrgb/convertRgbToLrgb.js';\n\nconst convertRgbToXyz50 = rgb => {\n\tlet { r, g, b, alpha } = convertRgbToLrgb(rgb);\n\tlet res = {\n\t\tmode: 'xyz50',\n\t\tx:\n\t\t\t0.436065742824811 * r +\n\t\t\t0.3851514688337912 * g +\n\t\t\t0.14307845442264197 * b,\n\t\ty:\n\t\t\t0.22249319175623702 * r +\n\t\t\t0.7168870538238823 * g +\n\t\t\t0.06061979053616537 * b,\n\t\tz:\n\t\t\t0.013923904500943465 * r +\n\t\t\t0.09708128566574634 * g +\n\t\t\t0.7140993584005155 * b\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertRgbToXyz50;\n","import { k, e } from '../xyz50/constants.js';\nimport { D50 } from '../constants.js';\n\nconst f = value => (value > e ? Math.cbrt(value) : (k * value + 16) / 116);\n\nconst convertXyz50ToLab = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet f0 = f(x / D50.X);\n\tlet f1 = f(y / D50.Y);\n\tlet f2 = f(z / D50.Z);\n\n\tlet res = {\n\t\tmode: 'lab',\n\t\tl: 116 * f1 - 16,\n\t\ta: 500 * (f0 - f1),\n\t\tb: 200 * (f1 - f2)\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertXyz50ToLab;\n","import convertRgbToXyz50 from '../xyz50/convertRgbToXyz50.js';\nimport convertXyz50ToLab from './convertXyz50ToLab.js';\n\nconst convertRgbToLab = rgb => {\n\tlet res = convertXyz50ToLab(convertRgbToXyz50(rgb));\n\n\t// Fixes achromatic RGB colors having a _slight_ chroma due to floating-point errors\n\t// and approximated computations in sRGB <-> CIELab.\n\t// See: https://github.com/d3/d3-color/pull/46\n\tif (rgb.r === rgb.b && rgb.b === rgb.g) {\n\t\tres.a = res.b = 0;\n\t}\n\treturn res;\n};\n\nexport default convertRgbToLab;\n","import { Tok } from '../parse.js';\n\nfunction parseLab(color, parsed) {\n\tif (!parsed || parsed[0] !== 'lab') {\n\t\treturn undefined;\n\t}\n\tconst res = { mode: 'lab' };\n\tconst [, l, a, b, alpha] = parsed;\n\tif (l.type === Tok.Hue || a.type === Tok.Hue || b.type === Tok.Hue) {\n\t\treturn undefined;\n\t}\n\tif (l.type !== Tok.None) {\n\t\tres.l = Math.min(Math.max(0, l.value), 100);\n\t}\n\tif (a.type !== Tok.None) {\n\t\tres.a = a.type === Tok.Number ? a.value : (a.value * 125) / 100;\n\t}\n\tif (b.type !== Tok.None) {\n\t\tres.b = b.type === Tok.Number ? b.value : (b.value * 125) / 100;\n\t}\n\tif (alpha.type !== Tok.None) {\n\t\tres.alpha = Math.min(\n\t\t\t1,\n\t\t\tMath.max(\n\t\t\t\t0,\n\t\t\t\talpha.type === Tok.Number ? alpha.value : alpha.value / 100\n\t\t\t)\n\t\t);\n\t}\n\n\treturn res;\n}\n\nexport default parseLab;\n","import convertLabToRgb from './convertLabToRgb.js';\nimport convertLabToXyz50 from './convertLabToXyz50.js';\nimport convertRgbToLab from './convertRgbToLab.js';\nimport convertXyz50ToLab from './convertXyz50ToLab.js';\nimport parseLab from './parseLab.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\nconst definition = {\n\tmode: 'lab',\n\n\ttoMode: {\n\t\txyz50: convertLabToXyz50,\n\t\trgb: convertLabToRgb\n\t},\n\n\tfromMode: {\n\t\txyz50: convertXyz50ToLab,\n\t\trgb: convertRgbToLab\n\t},\n\n\tchannels: ['l', 'a', 'b', 'alpha'],\n\n\tranges: {\n\t\tl: [0, 100],\n\t\ta: [-125, 125],\n\t\tb: [-125, 125]\n\t},\n\n\tparse: [parseLab],\n\tserialize: c =>\n\t\t`lab(${c.l !== undefined ? c.l : 'none'} ${\n\t\t\tc.a !== undefined ? c.a : 'none'\n\t\t} ${c.b !== undefined ? c.b : 'none'}${\n\t\t\tc.alpha < 1 ? ` / ${c.alpha}` : ''\n\t\t})`,\n\n\tinterpolate: {\n\t\tl: interpolatorLinear,\n\t\ta: interpolatorLinear,\n\t\tb: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","import convertLab65ToRgb from './convertLab65ToRgb.js';\nimport convertLab65ToXyz65 from './convertLab65ToXyz65.js';\nimport convertRgbToLab65 from './convertRgbToLab65.js';\nimport convertXyz65ToLab65 from './convertXyz65ToLab65.js';\nimport lab from '../lab/definition.js';\n\nconst definition = {\n\t...lab,\n\tmode: 'lab65',\n\n\tparse: ['--lab-d65'],\n\tserialize: '--lab-d65',\n\n\ttoMode: {\n\t\txyz65: convertLab65ToXyz65,\n\t\trgb: convertLab65ToRgb\n\t},\n\n\tfromMode: {\n\t\txyz65: convertXyz65ToLab65,\n\t\trgb: convertRgbToLab65\n\t},\n\n\tranges: {\n\t\tl: [0, 100],\n\t\ta: [-125, 125],\n\t\tb: [-125, 125]\n\t}\n};\n\nexport default definition;\n","import { Tok } from '../parse.js';\n\nfunction parseLch(color, parsed) {\n\tif (!parsed || parsed[0] !== 'lch') {\n\t\treturn undefined;\n\t}\n\tconst res = { mode: 'lch' };\n\tconst [, l, c, h, alpha] = parsed;\n\tif (l.type !== Tok.None) {\n\t\tif (l.type === Tok.Hue) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.l = Math.min(Math.max(0, l.value), 100);\n\t}\n\tif (c.type !== Tok.None) {\n\t\tres.c = Math.max(\n\t\t\t0,\n\t\t\tc.type === Tok.Number ? c.value : (c.value * 150) / 100\n\t\t);\n\t}\n\tif (h.type !== Tok.None) {\n\t\tif (h.type === Tok.Percentage) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.h = h.value;\n\t}\n\tif (alpha.type !== Tok.None) {\n\t\tres.alpha = Math.min(\n\t\t\t1,\n\t\t\tMath.max(\n\t\t\t\t0,\n\t\t\t\talpha.type === Tok.Number ? alpha.value : alpha.value / 100\n\t\t\t)\n\t\t);\n\t}\n\n\treturn res;\n}\n\nexport default parseLch;\n","import convertLabToLch from './convertLabToLch.js';\nimport convertLchToLab from './convertLchToLab.js';\nimport convertLabToRgb from '../lab/convertLabToRgb.js';\nimport convertRgbToLab from '../lab/convertRgbToLab.js';\nimport parseLch from './parseLch.js';\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueChroma } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'lch',\n\n\ttoMode: {\n\t\tlab: convertLchToLab,\n\t\trgb: c => convertLabToRgb(convertLchToLab(c))\n\t},\n\n\tfromMode: {\n\t\trgb: c => convertLabToLch(convertRgbToLab(c)),\n\t\tlab: convertLabToLch\n\t},\n\n\tchannels: ['l', 'c', 'h', 'alpha'],\n\n\tranges: {\n\t\tl: [0, 100],\n\t\tc: [0, 150],\n\t\th: [0, 360]\n\t},\n\n\tparse: [parseLch],\n\tserialize: c =>\n\t\t`lch(${c.l !== undefined ? c.l : 'none'} ${\n\t\t\tc.c !== undefined ? c.c : 'none'\n\t\t} ${c.h !== undefined ? c.h : 'none'}${\n\t\t\tc.alpha < 1 ? ` / ${c.alpha}` : ''\n\t\t})`,\n\n\tinterpolate: {\n\t\th: { use: interpolatorLinear, fixup: fixupHueShorter },\n\t\tc: interpolatorLinear,\n\t\tl: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\n\tdifference: {\n\t\th: differenceHueChroma\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","import convertLabToLch from '../lch/convertLabToLch.js';\nimport convertLchToLab from '../lch/convertLchToLab.js';\nimport convertLab65ToRgb from '../lab65/convertLab65ToRgb.js';\nimport convertRgbToLab65 from '../lab65/convertRgbToLab65.js';\nimport lch from '../lch/definition.js';\n\nconst definition = {\n\t...lch,\n\tmode: 'lch65',\n\n\tparse: ['--lch-d65'],\n\tserialize: '--lch-d65',\n\n\ttoMode: {\n\t\tlab65: c => convertLchToLab(c, 'lab65'),\n\t\trgb: c => convertLab65ToRgb(convertLchToLab(c, 'lab65'))\n\t},\n\n\tfromMode: {\n\t\trgb: c => convertLabToLch(convertRgbToLab65(c), 'lch65'),\n\t\tlab65: c => convertLabToLch(c, 'lch65')\n\t},\n\n\tranges: {\n\t\tl: [0, 100],\n\t\tc: [0, 150],\n\t\th: [0, 360]\n\t}\n};\n\nexport default definition;\n","import normalizeHue from '../util/normalizeHue.js';\n\nconst convertLuvToLchuv = ({ l, u, v, alpha }) => {\n\tif (u === undefined) u = 0;\n\tif (v === undefined) v = 0;\n\tlet c = Math.sqrt(u * u + v * v);\n\tlet res = {\n\t\tmode: 'lchuv',\n\t\tl: l,\n\t\tc: c\n\t};\n\tif (c) {\n\t\tres.h = normalizeHue((Math.atan2(v, u) * 180) / Math.PI);\n\t}\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertLuvToLchuv;\n","const convertLchuvToLuv = ({ l, c, h, alpha }) => {\n\tif (h === undefined) h = 0;\n\tlet res = {\n\t\tmode: 'luv',\n\t\tl: l,\n\t\tu: c ? c * Math.cos((h / 180) * Math.PI) : 0,\n\t\tv: c ? c * Math.sin((h / 180) * Math.PI) : 0\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertLchuvToLuv;\n","import { k, e } from '../xyz50/constants.js';\nimport { D50 } from '../constants.js';\n\nexport const u_fn = (x, y, z) => (4 * x) / (x + 15 * y + 3 * z);\nexport const v_fn = (x, y, z) => (9 * y) / (x + 15 * y + 3 * z);\n\nexport const un = u_fn(D50.X, D50.Y, D50.Z);\nexport const vn = v_fn(D50.X, D50.Y, D50.Z);\n\nconst l_fn = value => (value <= e ? k * value : 116 * Math.cbrt(value) - 16);\n\nconst convertXyz50ToLuv = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet l = l_fn(y / D50.Y);\n\tlet u = u_fn(x, y, z);\n\tlet v = v_fn(x, y, z);\n\n\t// guard against NaNs produced by `xyz(0 0 0)` black\n\tif (!isFinite(u) || !isFinite(v)) {\n\t\tl = u = v = 0;\n\t} else {\n\t\tu = 13 * l * (u - un);\n\t\tv = 13 * l * (v - vn);\n\t}\n\n\tlet res = {\n\t\tmode: 'luv',\n\t\tl,\n\t\tu,\n\t\tv\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertXyz50ToLuv;\n","import { k } from '../xyz50/constants.js';\nimport { D50 } from '../constants.js';\n\nexport const u_fn = (x, y, z) => (4 * x) / (x + 15 * y + 3 * z);\nexport const v_fn = (x, y, z) => (9 * y) / (x + 15 * y + 3 * z);\n\nexport const un = u_fn(D50.X, D50.Y, D50.Z);\nexport const vn = v_fn(D50.X, D50.Y, D50.Z);\n\nconst convertLuvToXyz50 = ({ l, u, v, alpha }) => {\n\tif (l === undefined) l = 0;\n\tif (l === 0) {\n\t\treturn { mode: 'xyz50', x: 0, y: 0, z: 0 };\n\t}\n\n\tif (u === undefined) u = 0;\n\tif (v === undefined) v = 0;\n\n\tlet up = u / (13 * l) + un;\n\tlet vp = v / (13 * l) + vn;\n\tlet y = D50.Y * (l <= 8 ? l / k : Math.pow((l + 16) / 116, 3));\n\tlet x = (y * (9 * up)) / (4 * vp);\n\tlet z = (y * (12 - 3 * up - 20 * vp)) / (4 * vp);\n\n\tlet res = { mode: 'xyz50', x, y, z };\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertLuvToXyz50;\n","/*\n\tCIELChuv color space\n\t--------------------\n\n\tReference: \n\n\t\thttps://en.wikipedia.org/wiki/CIELUV\n */\n\nimport convertLuvToLchuv from './convertLuvToLchuv.js';\nimport convertLchuvToLuv from './convertLchuvToLuv.js';\nimport convertXyz50ToLuv from '../luv/convertXyz50ToLuv.js';\nimport convertLuvToXyz50 from '../luv/convertLuvToXyz50.js';\nimport convertXyz50ToRgb from '../xyz50/convertXyz50ToRgb.js';\nimport convertRgbToXyz50 from '../xyz50/convertRgbToXyz50.js';\n\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueChroma } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst convertRgbToLchuv = rgb =>\n\tconvertLuvToLchuv(convertXyz50ToLuv(convertRgbToXyz50(rgb)));\nconst convertLchuvToRgb = lchuv =>\n\tconvertXyz50ToRgb(convertLuvToXyz50(convertLchuvToLuv(lchuv)));\n\nconst definition = {\n\tmode: 'lchuv',\n\n\ttoMode: {\n\t\tluv: convertLchuvToLuv,\n\t\trgb: convertLchuvToRgb\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToLchuv,\n\t\tluv: convertLuvToLchuv\n\t},\n\n\tchannels: ['l', 'c', 'h', 'alpha'],\n\n\tparse: ['--lchuv'],\n\tserialize: '--lchuv',\n\n\tranges: {\n\t\tl: [0, 100],\n\t\tc: [0, 176.956],\n\t\th: [0, 360]\n\t},\n\n\tinterpolate: {\n\t\th: { use: interpolatorLinear, fixup: fixupHueShorter },\n\t\tc: interpolatorLinear,\n\t\tl: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\n\tdifference: {\n\t\th: differenceHueChroma\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","import rgb from '../rgb/definition.js';\nimport convertRgbToLrgb from './convertRgbToLrgb.js';\nimport convertLrgbToRgb from './convertLrgbToRgb.js';\n\nconst definition = {\n\t...rgb,\n\tmode: 'lrgb',\n\n\ttoMode: {\n\t\trgb: convertLrgbToRgb\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToLrgb\n\t},\n\n\tparse: ['srgb-linear'],\n\tserialize: 'srgb-linear'\n};\n\nexport default definition;\n","/*\n\tCIELUV color space\n\t------------------\n\n\tReference: \n\n\t\thttps://en.wikipedia.org/wiki/CIELUV\n */\n\nimport convertXyz50ToLuv from './convertXyz50ToLuv.js';\nimport convertLuvToXyz50 from './convertLuvToXyz50.js';\nimport convertXyz50ToRgb from '../xyz50/convertXyz50ToRgb.js';\nimport convertRgbToXyz50 from '../xyz50/convertRgbToXyz50.js';\n\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\nconst definition = {\n\tmode: 'luv',\n\n\ttoMode: {\n\t\txyz50: convertLuvToXyz50,\n\t\trgb: luv => convertXyz50ToRgb(convertLuvToXyz50(luv))\n\t},\n\n\tfromMode: {\n\t\txyz50: convertXyz50ToLuv,\n\t\trgb: rgb => convertXyz50ToLuv(convertRgbToXyz50(rgb))\n\t},\n\n\tchannels: ['l', 'u', 'v', 'alpha'],\n\n\tparse: ['--luv'],\n\tserialize: '--luv',\n\n\tranges: {\n\t\tl: [0, 100],\n\t\tu: [-84.936, 175.042],\n\t\tv: [-125.882, 87.243]\n\t},\n\n\tinterpolate: {\n\t\tl: interpolatorLinear,\n\t\tu: interpolatorLinear,\n\t\tv: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","const convertLrgbToOklab = ({ r, g, b, alpha }) => {\n\tif (r === undefined) r = 0;\n\tif (g === undefined) g = 0;\n\tif (b === undefined) b = 0;\n\n\tlet L = Math.cbrt(\n\t\t0.412221469470763 * r + 0.5363325372617348 * g + 0.0514459932675022 * b\n\t);\n\tlet M = Math.cbrt(\n\t\t0.2119034958178252 * r + 0.6806995506452344 * g + 0.1073969535369406 * b\n\t);\n\tlet S = Math.cbrt(\n\t\t0.0883024591900564 * r + 0.2817188391361215 * g + 0.6299787016738222 * b\n\t);\n\n\tlet res = {\n\t\tmode: 'oklab',\n\t\tl:\n\t\t\t0.210454268309314 * L +\n\t\t\t0.7936177747023054 * M -\n\t\t\t0.0040720430116193 * S,\n\t\ta:\n\t\t\t1.9779985324311684 * L -\n\t\t\t2.4285922420485799 * M +\n\t\t\t0.450593709617411 * S,\n\t\tb:\n\t\t\t0.0259040424655478 * L +\n\t\t\t0.7827717124575296 * M -\n\t\t\t0.8086757549230774 * S\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertLrgbToOklab;\n","import convertRgbToLrgb from '../lrgb/convertRgbToLrgb.js';\nimport convertLrgbToOklab from './convertLrgbToOklab.js';\n\nconst convertRgbToOklab = rgb => {\n\tlet res = convertLrgbToOklab(convertRgbToLrgb(rgb));\n\tif (rgb.r === rgb.b && rgb.b === rgb.g) {\n\t\tres.a = res.b = 0;\n\t}\n\treturn res;\n};\n\nexport default convertRgbToOklab;\n","const convertOklabToLrgb = ({ l, a, b, alpha }) => {\n\tif (l === undefined) l = 0;\n\tif (a === undefined) a = 0;\n\tif (b === undefined) b = 0;\n\n\tlet L = Math.pow(l + 0.3963377773761749 * a + 0.2158037573099136 * b, 3);\n\tlet M = Math.pow(l - 0.1055613458156586 * a - 0.0638541728258133 * b, 3);\n\tlet S = Math.pow(l - 0.0894841775298119 * a - 1.2914855480194092 * b, 3);\n\n\tlet res = {\n\t\tmode: 'lrgb',\n\t\tr:\n\t\t\t4.0767416360759574 * L -\n\t\t\t3.3077115392580616 * M +\n\t\t\t0.2309699031821044 * S,\n\t\tg:\n\t\t\t-1.2684379732850317 * L +\n\t\t\t2.6097573492876887 * M -\n\t\t\t0.3413193760026573 * S,\n\t\tb:\n\t\t\t-0.0041960761386756 * L -\n\t\t\t0.7034186179359362 * M +\n\t\t\t1.7076146940746117 * S\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertOklabToLrgb;\n","import convertLrgbToRgb from '../lrgb/convertLrgbToRgb.js';\nimport convertOklabToLrgb from './convertOklabToLrgb.js';\n\nconst convertOklabToRgb = c => convertLrgbToRgb(convertOklabToLrgb(c));\n\nexport default convertOklabToRgb;\n","/*\n\tAdapted from code by Björn Ottosson,\n\treleased under the MIT license:\n\n\tCopyright (c) 2021 Björn Ottosson\n\n\tPermission is hereby granted, free of charge, to any person obtaining a copy of\n\tthis software and associated documentation files (the \"Software\"), to deal in\n\tthe Software without restriction, including without limitation the rights to\n\tuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n\tof the Software, and to permit persons to whom the Software is furnished to do\n\tso, subject to the following conditions:\n\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n */\n\nimport convertOklabToLrgb from '../oklab/convertOklabToLrgb.js';\n\nexport function toe(x) {\n\tconst k_1 = 0.206;\n\tconst k_2 = 0.03;\n\tconst k_3 = (1 + k_1) / (1 + k_2);\n\treturn (\n\t\t0.5 *\n\t\t(k_3 * x -\n\t\t\tk_1 +\n\t\t\tMath.sqrt((k_3 * x - k_1) * (k_3 * x - k_1) + 4 * k_2 * k_3 * x))\n\t);\n}\n\nexport function toe_inv(x) {\n\tconst k_1 = 0.206;\n\tconst k_2 = 0.03;\n\tconst k_3 = (1 + k_1) / (1 + k_2);\n\treturn (x * x + k_1 * x) / (k_3 * (x + k_2));\n}\n\n// Finds the maximum saturation possible for a given hue that fits in sRGB\n// Saturation here is defined as S = C/L\n// a and b must be normalized so a^2 + b^2 == 1\nfunction compute_max_saturation(a, b) {\n\t// Max saturation will be when one of r, g or b goes below zero.\n\n\t// Select different coefficients depending on which component goes below zero first\n\tlet k0, k1, k2, k3, k4, wl, wm, ws;\n\n\tif (-1.88170328 * a - 0.80936493 * b > 1) {\n\t\t// Red component\n\t\tk0 = +1.19086277;\n\t\tk1 = +1.76576728;\n\t\tk2 = +0.59662641;\n\t\tk3 = +0.75515197;\n\t\tk4 = +0.56771245;\n\t\twl = +4.0767416621;\n\t\twm = -3.3077115913;\n\t\tws = +0.2309699292;\n\t} else if (1.81444104 * a - 1.19445276 * b > 1) {\n\t\t// Green component\n\t\tk0 = +0.73956515;\n\t\tk1 = -0.45954404;\n\t\tk2 = +0.08285427;\n\t\tk3 = +0.1254107;\n\t\tk4 = +0.14503204;\n\t\twl = -1.2684380046;\n\t\twm = +2.6097574011;\n\t\tws = -0.3413193965;\n\t} else {\n\t\t// Blue component\n\t\tk0 = +1.35733652;\n\t\tk1 = -0.00915799;\n\t\tk2 = -1.1513021;\n\t\tk3 = -0.50559606;\n\t\tk4 = +0.00692167;\n\t\twl = -0.0041960863;\n\t\twm = -0.7034186147;\n\t\tws = +1.707614701;\n\t}\n\n\t// Approximate max saturation using a polynomial:\n\tlet S = k0 + k1 * a + k2 * b + k3 * a * a + k4 * a * b;\n\n\t// Do one step Halley's method to get closer\n\t// this gives an error less than 10e6, except for some blue hues where the dS/dh is close to infinite\n\t// this should be sufficient for most applications, otherwise do two/three steps\n\n\tlet k_l = +0.3963377774 * a + 0.2158037573 * b;\n\tlet k_m = -0.1055613458 * a - 0.0638541728 * b;\n\tlet k_s = -0.0894841775 * a - 1.291485548 * b;\n\n\t{\n\t\tlet l_ = 1 + S * k_l;\n\t\tlet m_ = 1 + S * k_m;\n\t\tlet s_ = 1 + S * k_s;\n\n\t\tlet l = l_ * l_ * l_;\n\t\tlet m = m_ * m_ * m_;\n\t\tlet s = s_ * s_ * s_;\n\n\t\tlet l_dS = 3 * k_l * l_ * l_;\n\t\tlet m_dS = 3 * k_m * m_ * m_;\n\t\tlet s_dS = 3 * k_s * s_ * s_;\n\n\t\tlet l_dS2 = 6 * k_l * k_l * l_;\n\t\tlet m_dS2 = 6 * k_m * k_m * m_;\n\t\tlet s_dS2 = 6 * k_s * k_s * s_;\n\n\t\tlet f = wl * l + wm * m + ws * s;\n\t\tlet f1 = wl * l_dS + wm * m_dS + ws * s_dS;\n\t\tlet f2 = wl * l_dS2 + wm * m_dS2 + ws * s_dS2;\n\n\t\tS = S - (f * f1) / (f1 * f1 - 0.5 * f * f2);\n\t}\n\n\treturn S;\n}\n\nexport function find_cusp(a, b) {\n\t// First, find the maximum saturation (saturation S = C/L)\n\tlet S_cusp = compute_max_saturation(a, b);\n\n\t// Convert to linear sRGB to find the first point where at least one of r,g or b >= 1:\n\tlet rgb = convertOklabToLrgb({ l: 1, a: S_cusp * a, b: S_cusp * b });\n\tlet L_cusp = Math.cbrt(1 / Math.max(rgb.r, rgb.g, rgb.b));\n\tlet C_cusp = L_cusp * S_cusp;\n\n\treturn [L_cusp, C_cusp];\n}\n\n// Finds intersection of the line defined by\n// L = L0 * (1 - t) + t * L1;\n// C = t * C1;\n// a and b must be normalized so a^2 + b^2 == 1\nfunction find_gamut_intersection(a, b, L1, C1, L0, cusp = null) {\n\tif (!cusp) {\n\t\t// Find the cusp of the gamut triangle\n\t\tcusp = find_cusp(a, b);\n\t}\n\n\t// Find the intersection for upper and lower half seprately\n\tlet t;\n\tif ((L1 - L0) * cusp[1] - (cusp[0] - L0) * C1 <= 0) {\n\t\t// Lower half\n\n\t\tt = (cusp[1] * L0) / (C1 * cusp[0] + cusp[1] * (L0 - L1));\n\t} else {\n\t\t// Upper half\n\n\t\t// First intersect with triangle\n\t\tt = (cusp[1] * (L0 - 1)) / (C1 * (cusp[0] - 1) + cusp[1] * (L0 - L1));\n\n\t\t// Then one step Halley's method\n\t\t{\n\t\t\tlet dL = L1 - L0;\n\t\t\tlet dC = C1;\n\n\t\t\tlet k_l = +0.3963377774 * a + 0.2158037573 * b;\n\t\t\tlet k_m = -0.1055613458 * a - 0.0638541728 * b;\n\t\t\tlet k_s = -0.0894841775 * a - 1.291485548 * b;\n\n\t\t\tlet l_dt = dL + dC * k_l;\n\t\t\tlet m_dt = dL + dC * k_m;\n\t\t\tlet s_dt = dL + dC * k_s;\n\n\t\t\t// If higher accuracy is required, 2 or 3 iterations of the following block can be used:\n\t\t\t{\n\t\t\t\tlet L = L0 * (1 - t) + t * L1;\n\t\t\t\tlet C = t * C1;\n\n\t\t\t\tlet l_ = L + C * k_l;\n\t\t\t\tlet m_ = L + C * k_m;\n\t\t\t\tlet s_ = L + C * k_s;\n\n\t\t\t\tlet l = l_ * l_ * l_;\n\t\t\t\tlet m = m_ * m_ * m_;\n\t\t\t\tlet s = s_ * s_ * s_;\n\n\t\t\t\tlet ldt = 3 * l_dt * l_ * l_;\n\t\t\t\tlet mdt = 3 * m_dt * m_ * m_;\n\t\t\t\tlet sdt = 3 * s_dt * s_ * s_;\n\n\t\t\t\tlet ldt2 = 6 * l_dt * l_dt * l_;\n\t\t\t\tlet mdt2 = 6 * m_dt * m_dt * m_;\n\t\t\t\tlet sdt2 = 6 * s_dt * s_dt * s_;\n\n\t\t\t\tlet r =\n\t\t\t\t\t4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s - 1;\n\t\t\t\tlet r1 =\n\t\t\t\t\t4.0767416621 * ldt -\n\t\t\t\t\t3.3077115913 * mdt +\n\t\t\t\t\t0.2309699292 * sdt;\n\t\t\t\tlet r2 =\n\t\t\t\t\t4.0767416621 * ldt2 -\n\t\t\t\t\t3.3077115913 * mdt2 +\n\t\t\t\t\t0.2309699292 * sdt2;\n\n\t\t\t\tlet u_r = r1 / (r1 * r1 - 0.5 * r * r2);\n\t\t\t\tlet t_r = -r * u_r;\n\n\t\t\t\tlet g =\n\t\t\t\t\t-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s - 1;\n\t\t\t\tlet g1 =\n\t\t\t\t\t-1.2684380046 * ldt +\n\t\t\t\t\t2.6097574011 * mdt -\n\t\t\t\t\t0.3413193965 * sdt;\n\t\t\t\tlet g2 =\n\t\t\t\t\t-1.2684380046 * ldt2 +\n\t\t\t\t\t2.6097574011 * mdt2 -\n\t\t\t\t\t0.3413193965 * sdt2;\n\n\t\t\t\tlet u_g = g1 / (g1 * g1 - 0.5 * g * g2);\n\t\t\t\tlet t_g = -g * u_g;\n\n\t\t\t\tlet b =\n\t\t\t\t\t-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s - 1;\n\t\t\t\tlet b1 =\n\t\t\t\t\t-0.0041960863 * ldt -\n\t\t\t\t\t0.7034186147 * mdt +\n\t\t\t\t\t1.707614701 * sdt;\n\t\t\t\tlet b2 =\n\t\t\t\t\t-0.0041960863 * ldt2 -\n\t\t\t\t\t0.7034186147 * mdt2 +\n\t\t\t\t\t1.707614701 * sdt2;\n\n\t\t\t\tlet u_b = b1 / (b1 * b1 - 0.5 * b * b2);\n\t\t\t\tlet t_b = -b * u_b;\n\n\t\t\t\tt_r = u_r >= 0 ? t_r : 10e5;\n\t\t\t\tt_g = u_g >= 0 ? t_g : 10e5;\n\t\t\t\tt_b = u_b >= 0 ? t_b : 10e5;\n\n\t\t\t\tt += Math.min(t_r, Math.min(t_g, t_b));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn t;\n}\n\nexport function get_ST_max(a_, b_, cusp = null) {\n\tif (!cusp) {\n\t\tcusp = find_cusp(a_, b_);\n\t}\n\tlet L = cusp[0];\n\tlet C = cusp[1];\n\treturn [C / L, C / (1 - L)];\n}\n\nexport function get_ST_mid(a_, b_) {\n\tlet S =\n\t\t0.11516993 +\n\t\t1 /\n\t\t\t(+7.4477897 +\n\t\t\t\t4.1590124 * b_ +\n\t\t\t\ta_ *\n\t\t\t\t\t(-2.19557347 +\n\t\t\t\t\t\t1.75198401 * b_ +\n\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t(-2.13704948 -\n\t\t\t\t\t\t\t\t10.02301043 * b_ +\n\t\t\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t\t\t(-4.24894561 +\n\t\t\t\t\t\t\t\t\t\t5.38770819 * b_ +\n\t\t\t\t\t\t\t\t\t\t4.69891013 * a_))));\n\n\tlet T =\n\t\t0.11239642 +\n\t\t1 /\n\t\t\t(+1.6132032 -\n\t\t\t\t0.68124379 * b_ +\n\t\t\t\ta_ *\n\t\t\t\t\t(+0.40370612 +\n\t\t\t\t\t\t0.90148123 * b_ +\n\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t(-0.27087943 +\n\t\t\t\t\t\t\t\t0.6122399 * b_ +\n\t\t\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t\t\t(+0.00299215 -\n\t\t\t\t\t\t\t\t\t\t0.45399568 * b_ -\n\t\t\t\t\t\t\t\t\t\t0.14661872 * a_))));\n\n\treturn [S, T];\n}\n\nexport function get_Cs(L, a_, b_) {\n\tlet cusp = find_cusp(a_, b_);\n\n\tlet C_max = find_gamut_intersection(a_, b_, L, 1, L, cusp);\n\tlet ST_max = get_ST_max(a_, b_, cusp);\n\n\tlet S_mid =\n\t\t0.11516993 +\n\t\t1 /\n\t\t\t(+7.4477897 +\n\t\t\t\t4.1590124 * b_ +\n\t\t\t\ta_ *\n\t\t\t\t\t(-2.19557347 +\n\t\t\t\t\t\t1.75198401 * b_ +\n\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t(-2.13704948 -\n\t\t\t\t\t\t\t\t10.02301043 * b_ +\n\t\t\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t\t\t(-4.24894561 +\n\t\t\t\t\t\t\t\t\t\t5.38770819 * b_ +\n\t\t\t\t\t\t\t\t\t\t4.69891013 * a_))));\n\n\tlet T_mid =\n\t\t0.11239642 +\n\t\t1 /\n\t\t\t(+1.6132032 -\n\t\t\t\t0.68124379 * b_ +\n\t\t\t\ta_ *\n\t\t\t\t\t(+0.40370612 +\n\t\t\t\t\t\t0.90148123 * b_ +\n\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t(-0.27087943 +\n\t\t\t\t\t\t\t\t0.6122399 * b_ +\n\t\t\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t\t\t(+0.00299215 -\n\t\t\t\t\t\t\t\t\t\t0.45399568 * b_ -\n\t\t\t\t\t\t\t\t\t\t0.14661872 * a_))));\n\n\tlet k = C_max / Math.min(L * ST_max[0], (1 - L) * ST_max[1]);\n\n\tlet C_a = L * S_mid;\n\tlet C_b = (1 - L) * T_mid;\n\tlet C_mid =\n\t\t0.9 *\n\t\tk *\n\t\tMath.sqrt(\n\t\t\tMath.sqrt(\n\t\t\t\t1 / (1 / (C_a * C_a * C_a * C_a) + 1 / (C_b * C_b * C_b * C_b))\n\t\t\t)\n\t\t);\n\n\tC_a = L * 0.4;\n\tC_b = (1 - L) * 0.8;\n\tlet C_0 = Math.sqrt(1 / (1 / (C_a * C_a) + 1 / (C_b * C_b)));\n\treturn [C_0, C_mid, C_max];\n}\n","/*\n\tAdapted from code by Björn Ottosson,\n\treleased under the MIT license:\n\n\tCopyright (c) 2021 Björn Ottosson\n\n\tPermission is hereby granted, free of charge, to any person obtaining a copy of\n\tthis software and associated documentation files (the \"Software\"), to deal in\n\tthe Software without restriction, including without limitation the rights to\n\tuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n\tof the Software, and to permit persons to whom the Software is furnished to do\n\tso, subject to the following conditions:\n\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n */\n\nimport normalizeHue from '../util/normalizeHue.js';\nimport { get_Cs, toe } from './helpers.js';\n\nexport default function convertOklabToOkhsl(lab) {\n\tconst l = lab.l !== undefined ? lab.l : 0;\n\tconst a = lab.a !== undefined ? lab.a : 0;\n\tconst b = lab.b !== undefined ? lab.b : 0;\n\n\tconst ret = { mode: 'okhsl', l: toe(l) };\n\n\tif (lab.alpha !== undefined) {\n\t\tret.alpha = lab.alpha;\n\t}\n\tlet c = Math.sqrt(a * a + b * b);\n\tif (!c) {\n\t\tret.s = 0;\n\t\treturn ret;\n\t}\n\tlet [C_0, C_mid, C_max] = get_Cs(l, a / c, b / c);\n\tlet s;\n\tif (c < C_mid) {\n\t\tlet k_0 = 0;\n\t\tlet k_1 = 0.8 * C_0;\n\t\tlet k_2 = 1 - k_1 / C_mid;\n\t\tlet t = (c - k_0) / (k_1 + k_2 * (c - k_0));\n\t\ts = t * 0.8;\n\t} else {\n\t\tlet k_0 = C_mid;\n\t\tlet k_1 = (0.2 * C_mid * C_mid * 1.25 * 1.25) / C_0;\n\t\tlet k_2 = 1 - k_1 / (C_max - C_mid);\n\t\tlet t = (c - k_0) / (k_1 + k_2 * (c - k_0));\n\t\ts = 0.8 + 0.2 * t;\n\t}\n\tif (s) {\n\t\tret.s = s;\n\t\tret.h = normalizeHue((Math.atan2(b, a) * 180) / Math.PI);\n\t}\n\treturn ret;\n}\n","/*\n\tAdapted from code by Björn Ottosson,\n\treleased under the MIT license:\n\n\tCopyright (c) 2021 Björn Ottosson\n\n\tPermission is hereby granted, free of charge, to any person obtaining a copy of\n\tthis software and associated documentation files (the \"Software\"), to deal in\n\tthe Software without restriction, including without limitation the rights to\n\tuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n\tof the Software, and to permit persons to whom the Software is furnished to do\n\tso, subject to the following conditions:\n\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n */\n\nimport { toe_inv, get_Cs } from './helpers.js';\n\nexport default function convertOkhslToOklab(hsl) {\n\tlet h = hsl.h !== undefined ? hsl.h : 0;\n\tlet s = hsl.s !== undefined ? hsl.s : 0;\n\tlet l = hsl.l !== undefined ? hsl.l : 0;\n\n\tconst ret = { mode: 'oklab', l: toe_inv(l) };\n\n\tif (hsl.alpha !== undefined) {\n\t\tret.alpha = hsl.alpha;\n\t}\n\n\tif (!s || l === 1) {\n\t\tret.a = ret.b = 0;\n\t\treturn ret;\n\t}\n\n\tlet a_ = Math.cos((h / 180) * Math.PI);\n\tlet b_ = Math.sin((h / 180) * Math.PI);\n\tlet [C_0, C_mid, C_max] = get_Cs(ret.l, a_, b_);\n\tlet t, k_0, k_1, k_2;\n\tif (s < 0.8) {\n\t\tt = 1.25 * s;\n\t\tk_0 = 0;\n\t\tk_1 = 0.8 * C_0;\n\t\tk_2 = 1 - k_1 / C_mid;\n\t} else {\n\t\tt = 5 * (s - 0.8);\n\t\tk_0 = C_mid;\n\t\tk_1 = (0.2 * C_mid * C_mid * 1.25 * 1.25) / C_0;\n\t\tk_2 = 1 - k_1 / (C_max - C_mid);\n\t}\n\tlet C = k_0 + (t * k_1) / (1 - k_2 * t);\n\tret.a = C * a_;\n\tret.b = C * b_;\n\n\treturn ret;\n}\n","import convertRgbToOklab from '../oklab/convertRgbToOklab.js';\nimport convertOklabToRgb from '../oklab/convertOklabToRgb.js';\nimport convertOklabToOkhsl from './convertOklabToOkhsl.js';\nimport convertOkhslToOklab from './convertOkhslToOklab.js';\n\nimport modeHsl from '../hsl/definition.js';\n\nconst modeOkhsl = {\n\t...modeHsl,\n\tmode: 'okhsl',\n\tchannels: ['h', 's', 'l', 'alpha'],\n\tparse: ['--okhsl'],\n\tserialize: '--okhsl',\n\tfromMode: {\n\t\toklab: convertOklabToOkhsl,\n\t\trgb: c => convertOklabToOkhsl(convertRgbToOklab(c))\n\t},\n\ttoMode: {\n\t\toklab: convertOkhslToOklab,\n\t\trgb: c => convertOklabToRgb(convertOkhslToOklab(c))\n\t}\n};\n\nexport default modeOkhsl;\n","/*\n\tAdapted from code by Björn Ottosson,\n\treleased under the MIT license:\n\n\tCopyright (c) 2021 Björn Ottosson\n\n\tPermission is hereby granted, free of charge, to any person obtaining a copy of\n\tthis software and associated documentation files (the \"Software\"), to deal in\n\tthe Software without restriction, including without limitation the rights to\n\tuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n\tof the Software, and to permit persons to whom the Software is furnished to do\n\tso, subject to the following conditions:\n\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n */\n\nimport normalizeHue from '../util/normalizeHue.js';\nimport convertOklabToLrgb from '../oklab/convertOklabToLrgb.js';\nimport { get_ST_max, toe_inv, toe } from '../okhsl/helpers.js';\n\nexport default function convertOklabToOkhsv(lab) {\n\tlet l = lab.l !== undefined ? lab.l : 0;\n\tlet a = lab.a !== undefined ? lab.a : 0;\n\tlet b = lab.b !== undefined ? lab.b : 0;\n\n\tlet c = Math.sqrt(a * a + b * b);\n\n\t// TODO: c = 0\n\tlet a_ = c ? a / c : 1;\n\tlet b_ = c ? b / c : 1;\n\n\tlet [S_max, T] = get_ST_max(a_, b_);\n\tlet S_0 = 0.5;\n\tlet k = 1 - S_0 / S_max;\n\n\tlet t = T / (c + l * T);\n\tlet L_v = t * l;\n\tlet C_v = t * c;\n\n\tlet L_vt = toe_inv(L_v);\n\tlet C_vt = (C_v * L_vt) / L_v;\n\n\tlet rgb_scale = convertOklabToLrgb({ l: L_vt, a: a_ * C_vt, b: b_ * C_vt });\n\tlet scale_L = Math.cbrt(\n\t\t1 / Math.max(rgb_scale.r, rgb_scale.g, rgb_scale.b, 0)\n\t);\n\n\tl = l / scale_L;\n\tc = ((c / scale_L) * toe(l)) / l;\n\tl = toe(l);\n\n\tconst ret = {\n\t\tmode: 'okhsv',\n\t\ts: c ? ((S_0 + T) * C_v) / (T * S_0 + T * k * C_v) : 0,\n\t\tv: l ? l / L_v : 0\n\t};\n\tif (ret.s) {\n\t\tret.h = normalizeHue((Math.atan2(b, a) * 180) / Math.PI);\n\t}\n\tif (lab.alpha !== undefined) {\n\t\tret.alpha = lab.alpha;\n\t}\n\treturn ret;\n}\n","/*\n\tCopyright (c) 2021 Björn Ottosson\n\n\tPermission is hereby granted, free of charge, to any person obtaining a copy of\n\tthis software and associated documentation files (the \"Software\"), to deal in\n\tthe Software without restriction, including without limitation the rights to\n\tuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n\tof the Software, and to permit persons to whom the Software is furnished to do\n\tso, subject to the following conditions:\n\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n */\n\nimport convertOklabToLrgb from '../oklab/convertOklabToLrgb.js';\nimport { get_ST_max, toe_inv } from '../okhsl/helpers.js';\n\nexport default function convertOkhsvToOklab(hsv) {\n\tconst ret = { mode: 'oklab' };\n\tif (hsv.alpha !== undefined) {\n\t\tret.alpha = hsv.alpha;\n\t}\n\n\tconst h = hsv.h !== undefined ? hsv.h : 0;\n\tconst s = hsv.s !== undefined ? hsv.s : 0;\n\tconst v = hsv.v !== undefined ? hsv.v : 0;\n\n\tconst a_ = Math.cos((h / 180) * Math.PI);\n\tconst b_ = Math.sin((h / 180) * Math.PI);\n\n\tconst [S_max, T] = get_ST_max(a_, b_);\n\tconst S_0 = 0.5;\n\tconst k = 1 - S_0 / S_max;\n\tconst L_v = 1 - (s * S_0) / (S_0 + T - T * k * s);\n\tconst C_v = (s * T * S_0) / (S_0 + T - T * k * s);\n\n\tconst L_vt = toe_inv(L_v);\n\tconst C_vt = (C_v * L_vt) / L_v;\n\tconst rgb_scale = convertOklabToLrgb({\n\t\tl: L_vt,\n\t\ta: a_ * C_vt,\n\t\tb: b_ * C_vt\n\t});\n\tconst scale_L = Math.cbrt(\n\t\t1 / Math.max(rgb_scale.r, rgb_scale.g, rgb_scale.b, 0)\n\t);\n\n\tconst L_new = toe_inv(v * L_v);\n\tconst C = (C_v * L_new) / L_v;\n\n\tret.l = L_new * scale_L;\n\tret.a = C * a_ * scale_L;\n\tret.b = C * b_ * scale_L;\n\n\treturn ret;\n}\n","import convertRgbToOklab from '../oklab/convertRgbToOklab.js';\nimport convertOklabToRgb from '../oklab/convertOklabToRgb.js';\nimport convertOklabToOkhsv from './convertOklabToOkhsv.js';\nimport convertOkhsvToOklab from './convertOkhsvToOklab.js';\n\nimport modeHsv from '../hsv/definition.js';\n\nconst modeOkhsv = {\n\t...modeHsv,\n\tmode: 'okhsv',\n\tchannels: ['h', 's', 'v', 'alpha'],\n\tparse: ['--okhsv'],\n\tserialize: '--okhsv',\n\tfromMode: {\n\t\toklab: convertOklabToOkhsv,\n\t\trgb: c => convertOklabToOkhsv(convertRgbToOklab(c))\n\t},\n\ttoMode: {\n\t\toklab: convertOkhsvToOklab,\n\t\trgb: c => convertOklabToRgb(convertOkhsvToOklab(c))\n\t}\n};\n\nexport default modeOkhsv;\n","import { Tok } from '../parse.js';\n\nfunction parseOklab(color, parsed) {\n\tif (!parsed || parsed[0] !== 'oklab') {\n\t\treturn undefined;\n\t}\n\tconst res = { mode: 'oklab' };\n\tconst [, l, a, b, alpha] = parsed;\n\tif (l.type === Tok.Hue || a.type === Tok.Hue || b.type === Tok.Hue) {\n\t\treturn undefined;\n\t}\n\tif (l.type !== Tok.None) {\n\t\tres.l = Math.min(\n\t\t\tMath.max(0, l.type === Tok.Number ? l.value : l.value / 100),\n\t\t\t1\n\t\t);\n\t}\n\tif (a.type !== Tok.None) {\n\t\tres.a = a.type === Tok.Number ? a.value : (a.value * 0.4) / 100;\n\t}\n\tif (b.type !== Tok.None) {\n\t\tres.b = b.type === Tok.Number ? b.value : (b.value * 0.4) / 100;\n\t}\n\tif (alpha.type !== Tok.None) {\n\t\tres.alpha = Math.min(\n\t\t\t1,\n\t\t\tMath.max(\n\t\t\t\t0,\n\t\t\t\talpha.type === Tok.Number ? alpha.value : alpha.value / 100\n\t\t\t)\n\t\t);\n\t}\n\n\treturn res;\n}\n\nexport default parseOklab;\n","import convertOklabToLrgb from './convertOklabToLrgb.js';\nimport convertLrgbToOklab from './convertLrgbToOklab.js';\nimport convertRgbToOklab from './convertRgbToOklab.js';\nimport convertOklabToRgb from './convertOklabToRgb.js';\nimport parseOklab from './parseOklab.js';\n\nimport lab from '../lab/definition.js';\n\n/*\n\tOklab, a perceptual color space for image processing by Björn Ottosson\n\tReference: https://bottosson.github.io/posts/oklab/\n */\n\nconst definition = {\n\t...lab,\n\tmode: 'oklab',\n\n\ttoMode: {\n\t\tlrgb: convertOklabToLrgb,\n\t\trgb: convertOklabToRgb\n\t},\n\n\tfromMode: {\n\t\tlrgb: convertLrgbToOklab,\n\t\trgb: convertRgbToOklab\n\t},\n\n\tranges: {\n\t\tl: [0, 1],\n\t\ta: [-0.4, 0.4],\n\t\tb: [-0.4, 0.4]\n\t},\n\n\tparse: [parseOklab],\n\tserialize: c =>\n\t\t`oklab(${c.l !== undefined ? c.l : 'none'} ${\n\t\t\tc.a !== undefined ? c.a : 'none'\n\t\t} ${c.b !== undefined ? c.b : 'none'}${\n\t\t\tc.alpha < 1 ? ` / ${c.alpha}` : ''\n\t\t})`\n};\n\nexport default definition;\n","import { Tok } from '../parse.js';\n\nfunction parseOklch(color, parsed) {\n\tif (!parsed || parsed[0] !== 'oklch') {\n\t\treturn undefined;\n\t}\n\tconst res = { mode: 'oklch' };\n\tconst [, l, c, h, alpha] = parsed;\n\tif (l.type !== Tok.None) {\n\t\tif (l.type === Tok.Hue) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.l = Math.min(\n\t\t\tMath.max(0, l.type === Tok.Number ? l.value : l.value / 100),\n\t\t\t1\n\t\t);\n\t}\n\tif (c.type !== Tok.None) {\n\t\tres.c = Math.max(\n\t\t\t0,\n\t\t\tc.type === Tok.Number ? c.value : (c.value * 0.4) / 100\n\t\t);\n\t}\n\tif (h.type !== Tok.None) {\n\t\tif (h.type === Tok.Percentage) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.h = h.value;\n\t}\n\tif (alpha.type !== Tok.None) {\n\t\tres.alpha = Math.min(\n\t\t\t1,\n\t\t\tMath.max(\n\t\t\t\t0,\n\t\t\t\talpha.type === Tok.Number ? alpha.value : alpha.value / 100\n\t\t\t)\n\t\t);\n\t}\n\n\treturn res;\n}\n\nexport default parseOklch;\n","import lch from '../lch/definition.js';\nimport convertLabToLch from '../lch/convertLabToLch.js';\nimport convertLchToLab from '../lch/convertLchToLab.js';\nimport convertOklabToRgb from '../oklab/convertOklabToRgb.js';\nimport convertRgbToOklab from '../oklab/convertRgbToOklab.js';\nimport parseOklch from './parseOklch.js';\n\nconst definition = {\n\t...lch,\n\tmode: 'oklch',\n\n\ttoMode: {\n\t\toklab: c => convertLchToLab(c, 'oklab'),\n\t\trgb: c => convertOklabToRgb(convertLchToLab(c, 'oklab'))\n\t},\n\n\tfromMode: {\n\t\trgb: c => convertLabToLch(convertRgbToOklab(c), 'oklch'),\n\t\toklab: c => convertLabToLch(c, 'oklch')\n\t},\n\n\tparse: [parseOklch],\n\tserialize: c =>\n\t\t`oklch(${c.l !== undefined ? c.l : 'none'} ${\n\t\t\tc.c !== undefined ? c.c : 'none'\n\t\t} ${c.h !== undefined ? c.h : 'none'}${\n\t\t\tc.alpha < 1 ? ` / ${c.alpha}` : ''\n\t\t})`,\n\n\tranges: {\n\t\tl: [0, 1],\n\t\tc: [0, 0.4],\n\t\th: [0, 360]\n\t}\n};\n\nexport default definition;\n","/*\n\tConvert Display P3 values to CIE XYZ D65\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n*/\n\nimport convertRgbToLrgb from '../lrgb/convertRgbToLrgb.js';\n\nconst convertP3ToXyz65 = rgb => {\n\tlet { r, g, b, alpha } = convertRgbToLrgb(rgb);\n\tlet res = {\n\t\tmode: 'xyz65',\n\t\tx:\n\t\t\t0.486570948648216 * r +\n\t\t\t0.265667693169093 * g +\n\t\t\t0.1982172852343625 * b,\n\t\ty:\n\t\t\t0.2289745640697487 * r +\n\t\t\t0.6917385218365062 * g +\n\t\t\t0.079286914093745 * b,\n\t\tz: 0.0 * r + 0.0451133818589026 * g + 1.043944368900976 * b\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertP3ToXyz65;\n","/*\n\tCIE XYZ D65 values to Display P3.\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n*/\n\nimport convertLrgbToRgb from '../lrgb/convertLrgbToRgb.js';\n\nconst convertXyz65ToP3 = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = convertLrgbToRgb(\n\t\t{\n\t\t\tr:\n\t\t\t\tx * 2.4934969119414263 -\n\t\t\t\ty * 0.9313836179191242 -\n\t\t\t\t0.402710784450717 * z,\n\t\t\tg:\n\t\t\t\tx * -0.8294889695615749 +\n\t\t\t\ty * 1.7626640603183465 +\n\t\t\t\t0.0236246858419436 * z,\n\t\t\tb:\n\t\t\t\tx * 0.0358458302437845 -\n\t\t\t\ty * 0.0761723892680418 +\n\t\t\t\t0.9568845240076871 * z\n\t\t},\n\t\t'p3'\n\t);\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz65ToP3;\n","import rgb from '../rgb/definition.js';\nimport convertP3ToXyz65 from './convertP3ToXyz65.js';\nimport convertXyz65ToP3 from './convertXyz65ToP3.js';\nimport convertRgbToXyz65 from '../xyz65/convertRgbToXyz65.js';\nimport convertXyz65ToRgb from '../xyz65/convertXyz65ToRgb.js';\n\nconst definition = {\n\t...rgb,\n\tmode: 'p3',\n\tparse: ['display-p3'],\n\tserialize: 'display-p3',\n\n\tfromMode: {\n\t\trgb: color => convertXyz65ToP3(convertRgbToXyz65(color)),\n\t\txyz65: convertXyz65ToP3\n\t},\n\n\ttoMode: {\n\t\trgb: color => convertXyz65ToRgb(convertP3ToXyz65(color)),\n\t\txyz65: convertP3ToXyz65\n\t}\n};\n\nexport default definition;\n","/*\n\tConvert CIE XYZ D50 values to ProPhoto RGB\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n*/\n\nconst gamma = v => {\n\tlet abs = Math.abs(v);\n\tif (abs >= 1 / 512) {\n\t\treturn Math.sign(v) * Math.pow(abs, 1 / 1.8);\n\t}\n\treturn 16 * v;\n};\n\nconst convertXyz50ToProphoto = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = {\n\t\tmode: 'prophoto',\n\t\tr: gamma(\n\t\t\tx * 1.3457868816471585 -\n\t\t\t\ty * 0.2555720873797946 -\n\t\t\t\t0.0511018649755453 * z\n\t\t),\n\t\tg: gamma(\n\t\t\tx * -0.5446307051249019 +\n\t\t\t\ty * 1.5082477428451466 +\n\t\t\t\t0.0205274474364214 * z\n\t\t),\n\t\tb: gamma(x * 0.0 + y * 0.0 + 1.2119675456389452 * z)\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz50ToProphoto;\n","/*\n\tConvert ProPhoto RGB values to CIE XYZ D50\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n*/\n\nconst linearize = (v = 0) => {\n\tlet abs = Math.abs(v);\n\tif (abs >= 16 / 512) {\n\t\treturn Math.sign(v) * Math.pow(abs, 1.8);\n\t}\n\treturn v / 16;\n};\n\nconst convertProphotoToXyz50 = prophoto => {\n\tlet r = linearize(prophoto.r);\n\tlet g = linearize(prophoto.g);\n\tlet b = linearize(prophoto.b);\n\tlet res = {\n\t\tmode: 'xyz50',\n\t\tx:\n\t\t\t0.7977666449006423 * r +\n\t\t\t0.1351812974005331 * g +\n\t\t\t0.0313477341283922 * b,\n\t\ty:\n\t\t\t0.2880748288194013 * r +\n\t\t\t0.7118352342418731 * g +\n\t\t\t0.0000899369387256 * b,\n\t\tz: 0 * r + 0 * g + 0.8251046025104602 * b\n\t};\n\tif (prophoto.alpha !== undefined) {\n\t\tres.alpha = prophoto.alpha;\n\t}\n\treturn res;\n};\n\nexport default convertProphotoToXyz50;\n","import rgb from '../rgb/definition.js';\n\nimport convertXyz50ToProphoto from './convertXyz50ToProphoto.js';\nimport convertProphotoToXyz50 from './convertProphotoToXyz50.js';\n\nimport convertXyz50ToRgb from '../xyz50/convertXyz50ToRgb.js';\nimport convertRgbToXyz50 from '../xyz50/convertRgbToXyz50.js';\n\n/*\n\tProPhoto RGB Color space\n\n\tReferences:\n\t\t* https://en.wikipedia.org/wiki/ProPhoto_RGB_color_space\n */\n\nconst definition = {\n\t...rgb,\n\tmode: 'prophoto',\n\tparse: ['prophoto-rgb'],\n\tserialize: 'prophoto-rgb',\n\n\tfromMode: {\n\t\txyz50: convertXyz50ToProphoto,\n\t\trgb: color => convertXyz50ToProphoto(convertRgbToXyz50(color))\n\t},\n\n\ttoMode: {\n\t\txyz50: convertProphotoToXyz50,\n\t\trgb: color => convertXyz50ToRgb(convertProphotoToXyz50(color))\n\t}\n};\n\nexport default definition;\n","/*\n\tConvert CIE XYZ D65 values to Rec. 2020\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n\t\t* https://www.itu.int/rec/R-REC-BT.2020/en\n*/\n\nconst α = 1.09929682680944;\nconst β = 0.018053968510807;\nconst gamma = v => {\n\tconst abs = Math.abs(v);\n\tif (abs > β) {\n\t\treturn (Math.sign(v) || 1) * (α * Math.pow(abs, 0.45) - (α - 1));\n\t}\n\treturn 4.5 * v;\n};\n\nconst convertXyz65ToRec2020 = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = {\n\t\tmode: 'rec2020',\n\t\tr: gamma(\n\t\t\tx * 1.7166511879712683 -\n\t\t\t\ty * 0.3556707837763925 -\n\t\t\t\t0.2533662813736599 * z\n\t\t),\n\t\tg: gamma(\n\t\t\tx * -0.6666843518324893 +\n\t\t\t\ty * 1.6164812366349395 +\n\t\t\t\t0.0157685458139111 * z\n\t\t),\n\t\tb: gamma(\n\t\t\tx * 0.0176398574453108 -\n\t\t\t\ty * 0.0427706132578085 +\n\t\t\t\t0.9421031212354739 * z\n\t\t)\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz65ToRec2020;\n","/*\n\tConvert Rec. 2020 values to CIE XYZ D65\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n\t\t* https://www.itu.int/rec/R-REC-BT.2020/en\n*/\n\nconst α = 1.09929682680944;\nconst β = 0.018053968510807;\n\nconst linearize = (v = 0) => {\n\tlet abs = Math.abs(v);\n\tif (abs < β * 4.5) {\n\t\treturn v / 4.5;\n\t}\n\treturn (Math.sign(v) || 1) * Math.pow((abs + α - 1) / α, 1 / 0.45);\n};\n\nconst convertRec2020ToXyz65 = rec2020 => {\n\tlet r = linearize(rec2020.r);\n\tlet g = linearize(rec2020.g);\n\tlet b = linearize(rec2020.b);\n\tlet res = {\n\t\tmode: 'xyz65',\n\t\tx:\n\t\t\t0.6369580483012911 * r +\n\t\t\t0.1446169035862083 * g +\n\t\t\t0.1688809751641721 * b,\n\t\ty:\n\t\t\t0.262700212011267 * r +\n\t\t\t0.6779980715188708 * g +\n\t\t\t0.059301716469862 * b,\n\t\tz: 0 * r + 0.0280726930490874 * g + 1.0609850577107909 * b\n\t};\n\tif (rec2020.alpha !== undefined) {\n\t\tres.alpha = rec2020.alpha;\n\t}\n\treturn res;\n};\n\nexport default convertRec2020ToXyz65;\n","import rgb from '../rgb/definition.js';\n\nimport convertXyz65ToRec2020 from './convertXyz65ToRec2020.js';\nimport convertRec2020ToXyz65 from './convertRec2020ToXyz65.js';\n\nimport convertRgbToXyz65 from '../xyz65/convertRgbToXyz65.js';\nimport convertXyz65ToRgb from '../xyz65/convertXyz65ToRgb.js';\n\nconst definition = {\n\t...rgb,\n\tmode: 'rec2020',\n\n\tfromMode: {\n\t\txyz65: convertXyz65ToRec2020,\n\t\trgb: color => convertXyz65ToRec2020(convertRgbToXyz65(color))\n\t},\n\n\ttoMode: {\n\t\txyz65: convertRec2020ToXyz65,\n\t\trgb: color => convertXyz65ToRgb(convertRec2020ToXyz65(color))\n\t},\n\n\tparse: ['rec2020'],\n\tserialize: 'rec2020'\n};\n\nexport default definition;\n","export const bias = 0.00379307325527544933;\nexport const bias_cbrt = Math.cbrt(bias);\n","import convertRgbToLrgb from '../lrgb/convertRgbToLrgb.js';\nimport { bias, bias_cbrt } from './constants.js';\n\nconst transfer = v => Math.cbrt(v) - bias_cbrt;\n\nconst convertRgbToXyb = color => {\n\tconst { r, g, b, alpha } = convertRgbToLrgb(color);\n\tconst l = transfer(0.3 * r + 0.622 * g + 0.078 * b + bias);\n\tconst m = transfer(0.23 * r + 0.692 * g + 0.078 * b + bias);\n\tconst s = transfer(\n\t\t0.24342268924547819 * r +\n\t\t\t0.20476744424496821 * g +\n\t\t\t0.5518098665095536 * b +\n\t\t\tbias\n\t);\n\tconst res = {\n\t\tmode: 'xyb',\n\t\tx: (l - m) / 2,\n\t\ty: (l + m) / 2,\n\t\t/* Apply default chroma from luma (subtract Y from B) */\n\t\tb: s - (l + m) / 2\n\t};\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertRgbToXyb;\n","import convertLrgbToRgb from '../lrgb/convertLrgbToRgb.js';\nimport { bias, bias_cbrt } from './constants.js';\n\nconst transfer = v => Math.pow(v + bias_cbrt, 3);\n\nconst convertXybToRgb = ({ x, y, b, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (b === undefined) b = 0;\n\tconst l = transfer(x + y) - bias;\n\tconst m = transfer(y - x) - bias;\n\t/* Account for chroma from luma: add Y back to B */\n\tconst s = transfer(b + y) - bias;\n\n\tconst res = convertLrgbToRgb({\n\t\tr:\n\t\t\t11.031566904639861 * l -\n\t\t\t9.866943908131562 * m -\n\t\t\t0.16462299650829934 * s,\n\t\tg:\n\t\t\t-3.2541473810744237 * l +\n\t\t\t4.418770377582723 * m -\n\t\t\t0.16462299650829934 * s,\n\t\tb:\n\t\t\t-3.6588512867136815 * l +\n\t\t\t2.7129230459360922 * m +\n\t\t\t1.9459282407775895 * s\n\t});\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertXybToRgb;\n","import { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport convertRgbToXyb from './convertRgbToXyb.js';\nimport convertXybToRgb from './convertXybToRgb.js';\n\n/*\n\tThe XYB color space, used in JPEG XL.\n\tReference: https://ds.jpeg.org/whitepapers/jpeg-xl-whitepaper.pdf\n*/\n\nconst definition = {\n\tmode: 'xyb',\n\tchannels: ['x', 'y', 'b', 'alpha'],\n\tparse: ['--xyb'],\n\tserialize: '--xyb',\n\n\ttoMode: {\n\t\trgb: convertXybToRgb\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToXyb\n\t},\n\n\tranges: {\n\t\tx: [-0.0154, 0.0281],\n\t\ty: [0, 0.8453],\n\t\tb: [-0.2778, 0.388]\n\t},\n\n\tinterpolate: {\n\t\tx: interpolatorLinear,\n\t\ty: interpolatorLinear,\n\t\tb: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","/*\n\tThe XYZ D50 color space\n\t-----------------------\n */\n\nimport convertXyz50ToRgb from './convertXyz50ToRgb.js';\nimport convertXyz50ToLab from '../lab/convertXyz50ToLab.js';\nimport convertRgbToXyz50 from './convertRgbToXyz50.js';\nimport convertLabToXyz50 from '../lab/convertLabToXyz50.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\nconst definition = {\n\tmode: 'xyz50',\n\tparse: ['xyz-d50'],\n\tserialize: 'xyz-d50',\n\n\ttoMode: {\n\t\trgb: convertXyz50ToRgb,\n\t\tlab: convertXyz50ToLab\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToXyz50,\n\t\tlab: convertLabToXyz50\n\t},\n\n\tchannels: ['x', 'y', 'z', 'alpha'],\n\n\tranges: {\n\t\tx: [0, 0.964],\n\t\ty: [0, 0.999],\n\t\tz: [0, 0.825]\n\t},\n\n\tinterpolate: {\n\t\tx: interpolatorLinear,\n\t\ty: interpolatorLinear,\n\t\tz: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","/*\n\tChromatic adaptation of CIE XYZ from D65 to D50 white point\n\tusing the Bradford method.\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html\t\n*/\n\nconst convertXyz65ToXyz50 = xyz65 => {\n\tlet { x, y, z, alpha } = xyz65;\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = {\n\t\tmode: 'xyz50',\n\t\tx:\n\t\t\t1.0479298208405488 * x +\n\t\t\t0.0229467933410191 * y -\n\t\t\t0.0501922295431356 * z,\n\t\ty:\n\t\t\t0.0296278156881593 * x +\n\t\t\t0.990434484573249 * y -\n\t\t\t0.0170738250293851 * z,\n\t\tz:\n\t\t\t-0.0092430581525912 * x +\n\t\t\t0.0150551448965779 * y +\n\t\t\t0.7518742899580008 * z\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz65ToXyz50;\n","/*\n\tChromatic adaptation of CIE XYZ from D50 to D65 white point\n\tusing the Bradford method.\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html\t\n*/\n\nconst convertXyz50ToXyz65 = xyz50 => {\n\tlet { x, y, z, alpha } = xyz50;\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = {\n\t\tmode: 'xyz65',\n\t\tx:\n\t\t\t0.9554734527042182 * x -\n\t\t\t0.0230985368742614 * y +\n\t\t\t0.0632593086610217 * z,\n\t\ty:\n\t\t\t-0.0283697069632081 * x +\n\t\t\t1.0099954580058226 * y +\n\t\t\t0.021041398966943 * z,\n\t\tz:\n\t\t\t0.0123140016883199 * x -\n\t\t\t0.0205076964334779 * y +\n\t\t\t1.3303659366080753 * z\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz50ToXyz65;\n","/*\n\tThe XYZ D65 color space\n\t-----------------------\n */\n\nimport convertXyz65ToRgb from './convertXyz65ToRgb.js';\nimport convertRgbToXyz65 from './convertRgbToXyz65.js';\n\nimport convertXyz65ToXyz50 from './convertXyz65ToXyz50.js';\nimport convertXyz50ToXyz65 from './convertXyz50ToXyz65.js';\n\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\nconst definition = {\n\tmode: 'xyz65',\n\n\ttoMode: {\n\t\trgb: convertXyz65ToRgb,\n\t\txyz50: convertXyz65ToXyz50\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToXyz65,\n\t\txyz50: convertXyz50ToXyz65\n\t},\n\n\tranges: {\n\t\tx: [0, 0.95],\n\t\ty: [0, 1],\n\t\tz: [0, 1.088]\n\t},\n\n\tchannels: ['x', 'y', 'z', 'alpha'],\n\n\tparse: ['xyz', 'xyz-d65'],\n\tserialize: 'xyz-d65',\n\n\tinterpolate: {\n\t\tx: interpolatorLinear,\n\t\ty: interpolatorLinear,\n\t\tz: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","const convertRgbToYiq = ({ r, g, b, alpha }) => {\n\tif (r === undefined) r = 0;\n\tif (g === undefined) g = 0;\n\tif (b === undefined) b = 0;\n\tconst res = {\n\t\tmode: 'yiq',\n\t\ty: 0.29889531 * r + 0.58662247 * g + 0.11448223 * b,\n\t\ti: 0.59597799 * r - 0.2741761 * g - 0.32180189 * b,\n\t\tq: 0.21147017 * r - 0.52261711 * g + 0.31114694 * b\n\t};\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertRgbToYiq;\n","const convertYiqToRgb = ({ y, i, q, alpha }) => {\n\tif (y === undefined) y = 0;\n\tif (i === undefined) i = 0;\n\tif (q === undefined) q = 0;\n\tconst res = {\n\t\tmode: 'rgb',\n\t\tr: y + 0.95608445 * i + 0.6208885 * q,\n\t\tg: y - 0.27137664 * i - 0.6486059 * q,\n\t\tb: y - 1.10561724 * i + 1.70250126 * q\n\t};\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertYiqToRgb;\n","import convertRgbToYiq from './convertRgbToYiq.js';\nimport convertYiqToRgb from './convertYiqToRgb.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\n/*\n\tYIQ Color Space\n\n\tReferences\n\t----------\n\n\tWikipedia:\n\t\thttps://en.wikipedia.org/wiki/YIQ\n\n\t\"Measuring perceived color difference using YIQ NTSC\n\ttransmission color space in mobile applications\"\n\t\t\n\t\tby Yuriy Kotsarenko, Fernando Ramos in:\n\t\tProgramación Matemática y Software (2010) \n\n\tAvailable at:\n\t\t\n\t\thttp://www.progmat.uaem.mx:8080/artVol2Num2/Articulo3Vol2Num2.pdf\n */\n\nconst definition = {\n\tmode: 'yiq',\n\n\ttoMode: {\n\t\trgb: convertYiqToRgb\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToYiq\n\t},\n\n\tchannels: ['y', 'i', 'q', 'alpha'],\n\n\tparse: ['--yiq'],\n\tserialize: '--yiq',\n\n\tranges: {\n\t\ti: [-0.595, 0.595],\n\t\tq: [-0.522, 0.522]\n\t},\n\n\tinterpolate: {\n\t\ty: interpolatorLinear,\n\t\ti: interpolatorLinear,\n\t\tq: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","// Color space definitions\nimport modeA98 from './a98/definition.js';\nimport modeCubehelix from './cubehelix/definition.js';\nimport modeDlab from './dlab/definition.js';\nimport modeDlch from './dlch/definition.js';\nimport modeHsi from './hsi/definition.js';\nimport modeHsl from './hsl/definition.js';\nimport modeHsv from './hsv/definition.js';\nimport modeHwb from './hwb/definition.js';\nimport modeItp from './itp/definition.js';\nimport modeJab from './jab/definition.js';\nimport modeJch from './jch/definition.js';\nimport modeLab from './lab/definition.js';\nimport modeLab65 from './lab65/definition.js';\nimport modeLch from './lch/definition.js';\nimport modeLch65 from './lch65/definition.js';\nimport modeLchuv from './lchuv/definition.js';\nimport modeLrgb from './lrgb/definition.js';\nimport modeLuv from './luv/definition.js';\nimport modeOkhsl from './okhsl/modeOkhsl.js';\nimport modeOkhsv from './okhsv/modeOkhsv.js';\nimport modeOklab from './oklab/definition.js';\nimport modeOklch from './oklch/definition.js';\nimport modeP3 from './p3/definition.js';\nimport modeProphoto from './prophoto/definition.js';\nimport modeRec2020 from './rec2020/definition.js';\nimport modeRgb from './rgb/definition.js';\nimport modeXyb from './xyb/definition.js';\nimport modeXyz50 from './xyz50/definition.js';\nimport modeXyz65 from './xyz65/definition.js';\nimport modeYiq from './yiq/definition.js';\nimport { useMode } from './modes.js';\n\nexport { default as converter } from './converter.js';\n\nexport {\n\tserializeHex,\n\tserializeHex8,\n\tserializeRgb,\n\tserializeHsl,\n\tformatHex,\n\tformatHex8,\n\tformatRgb,\n\tformatHsl,\n\tformatCss\n} from './formatter.js';\n\nexport { default as colorsNamed } from './colors/named.js';\nexport { default as blend } from './blend.js';\nexport { default as random } from './random.js';\n\nexport {\n\tfixupHueShorter,\n\tfixupHueLonger,\n\tfixupHueIncreasing,\n\tfixupHueDecreasing\n} from './fixup/hue.js';\n\nexport { fixupAlpha } from './fixup/alpha.js';\n\nexport {\n\tmapper,\n\tmapAlphaMultiply,\n\tmapAlphaDivide,\n\tmapTransferLinear,\n\tmapTransferGamma\n} from './map.js';\n\nexport { average, averageAngle, averageNumber } from './average.js';\n\nexport { default as round } from './round.js';\nexport {\n\tinterpolate,\n\tinterpolateWith,\n\tinterpolateWithPremultipliedAlpha\n} from './interpolate/interpolate.js';\n\nexport { interpolatorLinear } from './interpolate/linear.js';\n\nexport { interpolatorPiecewise } from './interpolate/piecewise.js';\n\nexport {\n\tinterpolatorSplineBasis,\n\tinterpolatorSplineBasisClosed\n} from './interpolate/splineBasis.js';\n\nexport {\n\tinterpolatorSplineNatural,\n\tinterpolatorSplineNaturalClosed\n} from './interpolate/splineNatural.js';\n\nexport {\n\tinterpolatorSplineMonotone,\n\tinterpolatorSplineMonotone2,\n\tinterpolatorSplineMonotoneClosed\n} from './interpolate/splineMonotone.js';\n\nexport { lerp, unlerp, blerp, trilerp } from './interpolate/lerp.js';\nexport { default as samples } from './samples.js';\nexport {\n\tdisplayable,\n\tinGamut,\n\tclampRgb,\n\tclampChroma,\n\tclampGamut,\n\ttoGamut\n} from './clamp.js';\nexport { default as nearest } from './nearest.js';\nexport { useMode, getMode, useParser, removeParser } from './modes.js';\nexport { default as parse } from './parse.js';\n\nexport {\n\tdifferenceEuclidean,\n\tdifferenceCie76,\n\tdifferenceCie94,\n\tdifferenceCiede2000,\n\tdifferenceCmc,\n\tdifferenceHyab,\n\tdifferenceHueSaturation,\n\tdifferenceHueChroma,\n\tdifferenceHueNaive,\n\tdifferenceKotsarenkoRamos,\n\tdifferenceItp\n} from './difference.js';\n\nexport {\n\tfilterBrightness,\n\tfilterContrast,\n\tfilterSepia,\n\tfilterInvert,\n\tfilterSaturate,\n\tfilterGrayscale,\n\tfilterHueRotate\n} from './filter.js';\n\nexport {\n\tfilterDeficiencyProt,\n\tfilterDeficiencyDeuter,\n\tfilterDeficiencyTrit\n} from './deficiency.js';\n\n// Easings\nexport { default as easingMidpoint } from './easing/midpoint.js';\nexport {\n\teasingSmoothstep,\n\teasingSmoothstepInverse\n} from './easing/smoothstep.js';\nexport { default as easingSmootherstep } from './easing/smootherstep.js';\nexport { default as easingInOutSine } from './easing/inOutSine.js';\nexport { default as easingGamma } from './easing/gamma.js';\n\nexport {\n\tluminance as wcagLuminance,\n\tcontrast as wcagContrast\n} from './wcag.js';\n\nexport { default as parseHsl } from './hsl/parseHsl.js';\nexport { default as parseHwb } from './hwb/parseHwb.js';\nexport { default as parseLab } from './lab/parseLab.js';\nexport { default as parseLch } from './lch/parseLch.js';\nexport { default as parseNamed } from './rgb/parseNamed.js';\nexport { default as parseTransparent } from './rgb/parseTransparent.js';\nexport { default as parseHex } from './rgb/parseHex.js';\nexport { default as parseRgb } from './rgb/parseRgb.js';\nexport { default as parseHslLegacy } from './hsl/parseHslLegacy.js';\nexport { default as parseRgbLegacy } from './rgb/parseRgbLegacy.js';\nexport { default as parseOklab } from './oklab/parseOklab.js';\nexport { default as parseOklch } from './oklch/parseOklch.js';\n\nexport { default as convertA98ToXyz65 } from './a98/convertA98ToXyz65.js';\nexport { default as convertCubehelixToRgb } from './cubehelix/convertCubehelixToRgb.js';\nexport { default as convertDlchToLab65 } from './dlch/convertDlchToLab65.js';\nexport { default as convertHsiToRgb } from './hsi/convertHsiToRgb.js';\nexport { default as convertHslToRgb } from './hsl/convertHslToRgb.js';\nexport { default as convertHsvToRgb } from './hsv/convertHsvToRgb.js';\nexport { default as convertHwbToRgb } from './hwb/convertHwbToRgb.js';\nexport { default as convertItpToXyz65 } from './itp/convertItpToXyz65.js';\nexport { default as convertJabToJch } from './jch/convertJabToJch.js';\nexport { default as convertJabToRgb } from './jab/convertJabToRgb.js';\nexport { default as convertJabToXyz65 } from './jab/convertJabToXyz65.js';\nexport { default as convertJchToJab } from './jch/convertJchToJab.js';\nexport { default as convertLab65ToDlch } from './dlch/convertLab65ToDlch.js';\nexport { default as convertLab65ToRgb } from './lab65/convertLab65ToRgb.js';\nexport { default as convertLab65ToXyz65 } from './lab65/convertLab65ToXyz65.js';\nexport { default as convertLabToLch } from './lch/convertLabToLch.js';\nexport { default as convertLabToRgb } from './lab/convertLabToRgb.js';\nexport { default as convertLabToXyz50 } from './lab/convertLabToXyz50.js';\nexport { default as convertLchToLab } from './lch/convertLchToLab.js';\nexport { default as convertLchuvToLuv } from './lchuv/convertLchuvToLuv.js';\nexport { default as convertLrgbToOklab } from './oklab/convertLrgbToOklab.js';\nexport { default as convertLrgbToRgb } from './lrgb/convertLrgbToRgb.js';\nexport { default as convertLuvToLchuv } from './lchuv/convertLuvToLchuv.js';\nexport { default as convertLuvToXyz50 } from './luv/convertLuvToXyz50.js';\nexport { default as convertOkhslToOklab } from './okhsl/convertOkhslToOklab.js';\nexport { default as convertOkhsvToOklab } from './okhsv/convertOkhsvToOklab.js';\nexport { default as convertOklabToLrgb } from './oklab/convertOklabToLrgb.js';\nexport { default as convertOklabToOkhsl } from './okhsl/convertOklabToOkhsl.js';\nexport { default as convertOklabToOkhsv } from './okhsv/convertOklabToOkhsv.js';\nexport { default as convertOklabToRgb } from './oklab/convertOklabToRgb.js';\nexport { default as convertP3ToXyz65 } from './p3/convertP3ToXyz65.js';\nexport { default as convertProphotoToXyz50 } from './prophoto/convertProphotoToXyz50.js';\nexport { default as convertRec2020ToXyz65 } from './rec2020/convertRec2020ToXyz65.js';\nexport { default as convertRgbToCubehelix } from './cubehelix/convertRgbToCubehelix.js';\nexport { default as convertRgbToHsi } from './hsi/convertRgbToHsi.js';\nexport { default as convertRgbToHsl } from './hsl/convertRgbToHsl.js';\nexport { default as convertRgbToHsv } from './hsv/convertRgbToHsv.js';\nexport { default as convertRgbToHwb } from './hwb/convertRgbToHwb.js';\nexport { default as convertRgbToJab } from './jab/convertRgbToJab.js';\nexport { default as convertRgbToLab } from './lab/convertRgbToLab.js';\nexport { default as convertRgbToLab65 } from './lab65/convertRgbToLab65.js';\nexport { default as convertRgbToLrgb } from './lrgb/convertRgbToLrgb.js';\nexport { default as convertRgbToOklab } from './oklab/convertRgbToOklab.js';\nexport { default as convertRgbToXyb } from './xyb/convertRgbToXyb.js';\nexport { default as convertRgbToXyz50 } from './xyz50/convertRgbToXyz50.js';\nexport { default as convertRgbToXyz65 } from './xyz65/convertRgbToXyz65.js';\nexport { default as convertRgbToYiq } from './yiq/convertRgbToYiq.js';\nexport { default as convertXybToRgb } from './xyb/convertXybToRgb.js';\nexport { default as convertXyz50ToLab } from './lab/convertXyz50ToLab.js';\nexport { default as convertXyz50ToLuv } from './luv/convertXyz50ToLuv.js';\nexport { default as convertXyz50ToProphoto } from './prophoto/convertXyz50ToProphoto.js';\nexport { default as convertXyz50ToRgb } from './xyz50/convertXyz50ToRgb.js';\nexport { default as convertXyz50ToXyz65 } from './xyz65/convertXyz50ToXyz65.js';\nexport { default as convertXyz65ToA98 } from './a98/convertXyz65ToA98.js';\nexport { default as convertXyz65ToItp } from './itp/convertXyz65ToItp.js';\nexport { default as convertXyz65ToJab } from './jab/convertXyz65ToJab.js';\nexport { default as convertXyz65ToLab65 } from './lab65/convertXyz65ToLab65.js';\nexport { default as convertXyz65ToP3 } from './p3/convertXyz65ToP3.js';\nexport { default as convertXyz65ToRec2020 } from './rec2020/convertXyz65ToRec2020.js';\nexport { default as convertXyz65ToRgb } from './xyz65/convertXyz65ToRgb.js';\nexport { default as convertXyz65ToXyz50 } from './xyz65/convertXyz65ToXyz50.js';\nexport { default as convertYiqToRgb } from './yiq/convertYiqToRgb.js';\n\nexport {\n\tmodeA98,\n\tmodeCubehelix,\n\tmodeDlab,\n\tmodeDlch,\n\tmodeHsi,\n\tmodeHsl,\n\tmodeHsv,\n\tmodeHwb,\n\tmodeItp,\n\tmodeJab,\n\tmodeJch,\n\tmodeLab,\n\tmodeLab65,\n\tmodeLch,\n\tmodeLch65,\n\tmodeLchuv,\n\tmodeLrgb,\n\tmodeLuv,\n\tmodeOkhsl,\n\tmodeOkhsv,\n\tmodeOklab,\n\tmodeOklch,\n\tmodeP3,\n\tmodeProphoto,\n\tmodeRec2020,\n\tmodeRgb,\n\tmodeXyb,\n\tmodeXyz50,\n\tmodeXyz65,\n\tmodeYiq\n};\n\nexport const a98 = useMode(modeA98);\nexport const cubehelix = useMode(modeCubehelix);\nexport const dlab = useMode(modeDlab);\nexport const dlch = useMode(modeDlch);\nexport const hsi = useMode(modeHsi);\nexport const hsl = useMode(modeHsl);\nexport const hsv = useMode(modeHsv);\nexport const hwb = useMode(modeHwb);\nexport const itp = useMode(modeItp);\nexport const jab = useMode(modeJab);\nexport const jch = useMode(modeJch);\nexport const lab = useMode(modeLab);\nexport const lab65 = useMode(modeLab65);\nexport const lch = useMode(modeLch);\nexport const lch65 = useMode(modeLch65);\nexport const lchuv = useMode(modeLchuv);\nexport const lrgb = useMode(modeLrgb);\nexport const luv = useMode(modeLuv);\nexport const okhsl = useMode(modeOkhsl);\nexport const okhsv = useMode(modeOkhsv);\nexport const oklab = useMode(modeOklab);\nexport const oklch = useMode(modeOklch);\nexport const p3 = useMode(modeP3);\nexport const prophoto = useMode(modeProphoto);\nexport const rec2020 = useMode(modeRec2020);\nexport const rgb = useMode(modeRgb);\nexport const xyb = useMode(modeXyb);\nexport const xyz50 = useMode(modeXyz50);\nexport const xyz65 = useMode(modeXyz65);\nexport const yiq = useMode(modeYiq);\n","import{DateTime as e}from\"luxon\";import{debounce as t,getPrototypeChain as n,setObjectMethod as r,setObjectValue as i}from\"@basmilius/utils\";import{customRef as a,markRaw as o,toRaw as s}from\"vue\";function c(e){return class extends e{constructor(...e){throw Error(`@adapter: cannot create instance of class.`)}}}function ee(){return(e,t)=>{e[t]=e[t].bind(e)}}function te(e){return(n,r,i)=>{i.value=t(i.value,e,n)}}function ne(e,t){return e===t?!0:e===t}const l=Symbol(),u=Symbol(),d=Symbol(),f=Symbol(),p=Symbol(),m=Symbol(),h=Symbol(),g=Symbol(),_=Symbol(),re=Symbol(),ie=Symbol();function v(e){return e&&typeof e==`object`&&!!e[p]}function y(e){if(!v(e))throw Error(`@dto assert given object is not a class decorated with @Dto.`)}const ae=Symbol();function b(e,t=0,n){return function(...r){let i=e[ae]??=new WeakMap,a=r[t],o=n===void 0?`self`:r[n];if(typeof a!=`object`||!a)return e.call(this,...r);i.has(a)||i.set(a,[]);let s=i.get(a);if(!s.includes(o)){s.push(o);try{return e.call(this,...r)}finally{let e=s.lastIndexOf(o);e!==-1&&s.splice(e,1),s.length===0&&i.delete(a)}}}}function oe(e){return y(e),e.clone()}function x(e){return y(e),e[f]}const S=b(function(e,t,n,r){let i=e[ie];i(e,t,n,r),e[m]&&S(e[m],e[h],e[m][e[h]])},0,1),C=b(function(e){y(e),e[f]&&(e[f]=!1,S(e,f,!1,!0)),!(!e[u]||e[u].length===0)&&e[u].filter(x).forEach(C)});async function se(e,t){!v(e)||!x(e)||(await t(e),C(e))}function ce(e){return y(e),!e[f]}const w=b(function(e,t){y(e),e[f]||(e[f]=!0,S(e,f,!0,!1)),e[m]&&w(e[m],e[h])});function T(e,t,n){t[u]??=[],!t[u].includes(e)&&t[u].push(e),e[m]!==t&&(e[m]=t),e[h]!==n&&(e[h]=n)}function E(e,t,n){if(v(n))T(n,e,t);else if(Array.isArray(n)){for(let r of n)v(r)&&T(r,e,t);n[m]=e,n[h]=t}}function le(e,t){let n=e[re];n(e,t)}function D(e,t){if(u in t){let n=t[u].indexOf(e);n!==-1&&t[u].splice(n,1)}e[m]=void 0,e[h]=void 0}function ue(e,t){if(v(t))D(t,e);else if(Array.isArray(t)){for(let n of t)v(n)&&D(n,e);t[m]=void 0,t[h]=void 0}}const O={};var k={deleteProperty(e,t){if(Reflect.deleteProperty(e,t),A(e,t))return!0;let n=e[m];return n&&S(n,e[h],n[e[h]]),n&&w(n,e[h]),!0},get(e,t,n){if(t===_)return!0;if(A(e,t))return Reflect.get(e,t,n);let r=e[m];return r&&le(r,e[h]),Reflect.get(e,t)},set(e,t,n,r){if(A(e,t))return Reflect.set(e,t,n,r);let i=e[m];return i&&S(i,e[h],i[e[h]]),i&&w(i,e[h]),Reflect.set(e,t,n)}};function A(e,t){return typeof t==`symbol`||typeof e[t]==`function`||t===`length`}var de={get(e,t,n){if(t===_)return!0;if(typeof t==`symbol`)return Reflect.get(e,t,n);let r=e[d][t];if(!r||!r.get)return Reflect.get(e,t,n);let i=r.get.call(e);return le(e,t),E(e,t,i),i},getOwnPropertyDescriptor(e,t){return e[d][t]},ownKeys(e){return e[g]},set(e,t,n,r){if(typeof t==`symbol`)return Reflect.set(e,t,n,r);let i=e[d][t];if(!i||!i.set)return Reflect.set(e,t,n,r);let a=i.get?.call(e)??void 0;return ne(n,a)?!0:(ue(e,a),Array.isArray(n)&&!n[_]&&(n=new Proxy(n,k)),i.set.call(e,n),E(e,t,n),w(e,t),S(e,t,n,a),!0)}},fe={get(e,t,n){return t===`__v_isRef`?!1:t===_?!0:t in e?Reflect.get(e,t,n):Reflect.get(e.value,t)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e.value,t)},ownKeys(e){return Reflect.ownKeys(e.value)},set(e,t,n,r){return t in e?Reflect.set(e,t,n,r):Reflect.set(e.value,t,n)}},pe={construct(e,t,n){t=t.map(e=>Array.isArray(e)?new Proxy(e,k):e);let r=a((r,i)=>{let a=o(Reflect.construct(e,t,n));a[l]=t,a[f]=!1,a[re]=r,a[ie]=i;let s=new Proxy(a,de);return{get:()=>(r(),s),set:()=>void 0}});return new Proxy(r,fe)}};function me(){let e=this;y(e);let t=O[e[p]],n=new t(...e[l]);for(let[e,t]of Object.entries(this[d]))t.set&&(n[e]=v(this[e])?this[e].clone():this[e]);return n}function he(e){for(let t in e){let n=this[d][t];v(this[t])&&typeof e[t]==`object`?this[t].fill(e[t]):n&&n.set&&(this[t]=e[t])}}function ge(){let e={};for(let t of this[g]){let n=this[t];v(n)&&(n=n.toJSON()),e[t]=n}return e}function j(e){ve(e);let t=Object.freeze(n(e)),a=Object.keys(t);return i(e.prototype,d,t),i(e.prototype,p,e.name),i(e.prototype,g,a),i(e,Symbol.hasInstance,t=>typeof t==`object`&&t?.[p]===e.name),r(e,`clone`,me),r(e,`fill`,he),r(e,`toJSON`,ge),_e(e)}function _e(e){let t=new Proxy(e,pe);return O[e.name]=t,t}function ve(e){let t=Object.getPrototypeOf(e.prototype);if(p in t)throw Error(`⛔️ @dto ${e.name} cannot extend parent class which is also decorated with @dto ${t[p]}.`)}function M(e){return e.map(F)}function ye([,t]){return e.fromISO(t)}function N(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,F(t)]).filter(([,e])=>e!==void 0))}const P={};function be([,e,t,n,r]){if(!(t in O))throw Error(`Cannot restore @dto. Dto ${t} was not found.`);if(e in P)return P[e];let i=O[t],a=new i(...M(r));return a.fill(N(n)),P[e]=a,a}function xe(e){return Array.isArray(e)&&e[0]===3058}function Se(e){return Array.isArray(e)&&e[0]===3057}function F(e){switch(!0){case e===null:return null;case Array.isArray(e):switch(!0){case xe(e):return ye(e);case Se(e):return be(e);default:return M(e)}case typeof e==`object`:return N(e);default:return e}}function Ce(e){return F(JSON.parse(e))}function we(e){return[3058,e.toISO({extendedZone:!0,includeOffset:!0})]}function I(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,z(t)]).filter(([,e])=>e!==void 0))}function Te(){return`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function L(e){e=s(e);let t=e.toJSON();return[3057,Te(),e[p],I(t),R(e[l])]}function R(t){switch(!0){case t.every(v):return t.map(L);case t.every(e.isDateTime):return t.map(we);default:return t.map(z)}}function z(t){switch(!0){case t===null:return null;case Array.isArray(t):return R(t);case v(t):return L(t);case e.isDateTime(t):return we(t);case typeof t==`object`:return I(t);case typeof t==`boolean`:case typeof t==`number`:case typeof t==`string`:return t;default:return}}function Ee(e){return JSON.stringify(z(e))}function B(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let V=class{get blob(){return this.#e}get name(){return this.#t}#e;#t;constructor(e,t){this.#e=e,this.#t=t}};V=B([j],V);var H=V;let U=class{get items(){return this.#e}get page(){return this.#t}get pageSize(){return this.#n}get pages(){return this.#r}get total(){return this.#i}#e;#t;#n;#r;#i;constructor(e,t,n,r,i){this.#e=e,this.#t=t,this.#n=n,this.#r=r,this.#i=i}};U=B([j],U);var W=U;let G=class{get code(){return this.#e}get error(){return this.#t}get errorDescription(){return this.#n}get statusCode(){return this.#r}#e;#t;#n;#r;constructor(e,t,n,r){this.#e=e,this.#t=t,this.#n=n,this.#r=r}};G=B([j],G);var K=G;let q=class{get code(){return this.#e}get error(){return this.#t}get errorDescription(){return this.#n}get errors(){return this.#r}get params(){return this.#i}#e;#t;#n;#r;#i;constructor(e,t,n,r,i){this.#e=e,this.#t=t,this.#n=n,this.#r=r,this.#i=i}};q=B([j],q);var J=q,Y;let X=Y=class{static parsePaginatedAdapter(e,t){return new W(e.items.map(t),e.page,e.page_size,e.pages,e.total)}static parseFileNameFromContentDispositionHeader(t){let n=`download-${e.now().toFormat(`yyyy-MM-dd HH-mm-ss`)}`;if(!t.startsWith(`attachment`))return n;let r=/filename[^;=\\n]*=((['\"]).*?\\2|[^;\\n]*)/.exec(t);return(r?.length||0)<2?n:r[1].replaceAll(`'`,``).replaceAll(`\"`,``).replaceAll(`/`,`-`).replaceAll(`:`,`-`)}static parseRequestError(e,t){return new K(e.code,e.error,e.error_description,t)}static parseValidationError(e){let t;return e.errors&&(t={},Object.entries(e.errors).forEach(([e,n])=>{t[e]=Y.parseValidationError(n)})),new J(e.code,e.error,e.error_description,t,e.params)}};X=Y=B([c],X);var Z=class{get data(){return this.#e}get headers(){return this.#t.headers}get ok(){return this.statusCode>=200&&this.statusCode<300}get response(){return this.#t}get statusCode(){return this.#t.status}#e;#t;constructor(e,t){this.#e=e,this.#t=t}},De=class e{get authToken(){return this.#e}set authToken(e){this.#e=e}get baseUrl(){return this.#t}get dataField(){return this.#n}#e;#t;#n;constructor(e,t,n=!1){this.#e=e,this.#t=t,this.#n=n}static get instance(){if(e.#r===null)throw Error(`There is currently no HttpClient instance registered. Register one using the HttpClient.register() function.`);return e.#r}static#r=null;static register(t){e.#r=t}},Q=class extends Error{};const $={};var Oe=class t{get client(){return this.#e}get options(){return this.#r}get path(){return this.#n}set path(e){this.#n=e}get query(){return this.#i}set query(e){this.#i=e}#e;#t=null;#n;#r={};#i=null;constructor(e,t){this.#e=t??De.instance,this.#r.cache=`no-cache`,this.#r.method=`GET`,this.#n=e}autoCancel(e){return this.#t=e,this}bearerToken(e){return e??=this.#e.authToken,e?this.header(`Authorization`,`Bearer ${e}`):(this.#r.headers&&`Authorization`in this.#r.headers&&delete this.#r.headers.Authorization,this)}body(e,t=`application/octet-stream`){return e instanceof FormData?t=null:(Array.isArray(e)||typeof e==`object`)&&(e=JSON.stringify(e),t=`application/json`),this.#r.body=e,t===null?this:this.header(`Content-Type`,t)}header(e,t){return this.#r.headers=this.#r.headers||{},this.#r.headers[e]=t,this}method(e){return this.#r.method=e.toUpperCase(),this}queryString(e){return this.#i=e,this}signal(e=null){return this.#r.signal=e,this}async fetch(){return this.#a().then(e=>e.json())}async fetchBlob(){let t=await this.#a();if(t.status!==200){let e=await t.json();throw`code`in e&&`error`in e&&`error_description`in e?new K(e.code,e.error,e.error_description,t.status):new K(-1,`failed_without_info`,`Request failed without any information from the backend.`,t.status)}let n=t.headers.has(`content-disposition`)?X.parseFileNameFromContentDispositionHeader(t.headers.get(`content-disposition`)??``):`download-${e.now().toFormat(`yyyy-MM-dd HH-mm-ss`)}`;return new H(await t.blob(),n)}async run(){let{data:e,response:t}=await this.#o();return new Z(e,t)}async runAdapter(e){let{data:t,response:n}=await this.#o();return new Z(e(t),n)}async runArrayAdapter(e){return this.runAdapter(t=>t.map(e))}async runEmpty(){return await this.#o()}async runPaginatedAdapter(e){return this.runAdapter(t=>X.parsePaginatedAdapter(t,e))}async runData(){return await this.#o()}async runDataKey(e){let{data:t,response:n}=await this.#o();return new Z(t[e],n)}async runStatusCode(){return(await this.#o()).statusCode}async#a(){if(this.#t!==null){this.#t in $&&$[this.#t].abort(new Q);let e=new AbortController;$[this.#t]=e,this.signal(e.signal)}let e=this.path;this.query!==null&&(e+=`?${this.query.build()}`);let t=await fetch(this.client.baseUrl+e,this.options);return this.#t!==null&&delete $[this.#t],t}async#o(){return await this.#a().then(e=>t.#s(e,this.client.dataField))}static async#s(e,t){if(e.status===204)return new Z(null,e);if(e.headers.has(`content-type`)&&e.headers.get(`content-type`)?.startsWith(`application/json`)){let n=await e.json();if(n&&typeof n==`object`&&`code`in n&&`error`in n&&`error_description`in n)throw`errors`in n?X.parseValidationError(n):X.parseRequestError(n,e.status);return t&&`data`in n?new Z(n.data,e):new Z(n,e)}if(e.status===401||e.status===403||(await e.text()).length===0&&e.status>=200&&e.status<300)return new Z(null,e);throw new K(-1,`not_a_json_response`,`The response was not a JSON response.`,e.status)}},ke=class{request(e,t){return new Oe(e,t)}},Ae=class e{#e;constructor(){this.#e=new URLSearchParams}build(){return this.#e.toString()}append(e,t){return this.#t(this.#e.append.bind(this.#e),e,t)}appendArray(e,t){return t?.forEach(t=>this.append(e,t)),this}delete(e){return this.#e.delete(e),this}get(e){return this.#e.get(e)}getAll(e){return this.#e.getAll(e)}has(e){return this.#e.has(e)}set(e,t){return this.#t(this.#e.set.bind(this.#e),e,t)}#t(e,t,n){if(!n&&n!==!1)return this;switch(typeof n){case`boolean`:e(t,n?`true`:`false`);break;case`number`:e(t,n.toString(10));break;case`string`:e(t,n);break}return this}static builder(){return new e}};function je(e){return e instanceof Q}function Me(e){return e instanceof K}function Ne(e){return e instanceof K&&(e=e.statusCode),e===403||e===401}function Pe(e){return e instanceof J}export{Z as BaseResponse,ke as BaseService,H as BlobResponse,X as HttpAdapter,De as HttpClient,W as Paginated,Ae as QueryString,Q as RequestAbortedError,Oe as RequestBuilder,K as RequestError,J as ValidationError,c as adapter,y as assertDto,ee as bound,oe as cloneDto,te as debounce,Ce as deserialize,j as dto,se as executeIfDtoDirtyAndMarkClean,v as isDto,ce as isDtoClean,x as isDtoDirty,je as isRequestAborted,Me as isRequestError,Ne as isUnsanctionedRequest,Pe as isValidationError,C as markDtoClean,w as markDtoDirty,Ee as serialize};","/*!\n * vue-router v5.0.6\n * (c) 2026 Eduardo San Martin Morote\n * @license MIT\n */\nimport { inject } from \"vue\";\n\n//#region src/utils/env.ts\nconst isBrowser = typeof document !== \"undefined\";\n\n//#endregion\n//#region src/utils/index.ts\n/**\n* Identity function that returns the value as is.\n*\n* @param v - the value to return\n*\n* @internal\n*/\nconst identityFn = (v) => v;\n/**\n* Allows differentiating lazy components from functional components and vue-class-component\n* @internal\n*\n* @param component\n*/\nfunction isRouteComponent(component) {\n\treturn typeof component === \"object\" || \"displayName\" in component || \"props\" in component || \"__vccOpts\" in component;\n}\nfunction isESModule(obj) {\n\treturn obj.__esModule || obj[Symbol.toStringTag] === \"Module\" || obj.default && isRouteComponent(obj.default);\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n\tconst newParams = {};\n\tfor (const key in params) {\n\t\tconst value = params[key];\n\t\tnewParams[key] = isArray(value) ? value.map(fn) : fn(value);\n\t}\n\treturn newParams;\n}\nconst noop = () => {};\n/**\n* Typesafe alternative to Array.isArray\n* https://github.com/microsoft/TypeScript/pull/48228\n*\n* @internal\n*/\nconst isArray = Array.isArray;\nfunction mergeOptions(defaults, partialOptions) {\n\tconst options = {};\n\tfor (const key in defaults) options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n\treturn options;\n}\n\n//#endregion\n//#region src/errors.ts\n/**\n* Flags so we can combine them when checking for multiple errors. This is the internal version of\n* {@link NavigationFailureType}.\n*\n* @internal\n*/\nlet ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {\n\tErrorTypes[ErrorTypes[\"MATCHER_NOT_FOUND\"] = 1] = \"MATCHER_NOT_FOUND\";\n\tErrorTypes[ErrorTypes[\"NAVIGATION_GUARD_REDIRECT\"] = 2] = \"NAVIGATION_GUARD_REDIRECT\";\n\tErrorTypes[ErrorTypes[\"NAVIGATION_ABORTED\"] = 4] = \"NAVIGATION_ABORTED\";\n\tErrorTypes[ErrorTypes[\"NAVIGATION_CANCELLED\"] = 8] = \"NAVIGATION_CANCELLED\";\n\tErrorTypes[ErrorTypes[\"NAVIGATION_DUPLICATED\"] = 16] = \"NAVIGATION_DUPLICATED\";\n\treturn ErrorTypes;\n}({});\nconst NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== \"production\" ? \"navigation failure\" : \"\");\n/**\n* Enumeration with all possible types for navigation failures. Can be passed to\n* {@link isNavigationFailure} to check for specific failures.\n*/\nlet NavigationFailureType = /* @__PURE__ */ function(NavigationFailureType) {\n\t/**\n\t* An aborted navigation is a navigation that failed because a navigation\n\t* guard returned `false` or called `next(false)`\n\t*/\n\tNavigationFailureType[NavigationFailureType[\"aborted\"] = 4] = \"aborted\";\n\t/**\n\t* A cancelled navigation is a navigation that failed because a more recent\n\t* navigation finished started (not necessarily finished).\n\t*/\n\tNavigationFailureType[NavigationFailureType[\"cancelled\"] = 8] = \"cancelled\";\n\t/**\n\t* A duplicated navigation is a navigation that failed because it was\n\t* initiated while already being at the exact same location.\n\t*/\n\tNavigationFailureType[NavigationFailureType[\"duplicated\"] = 16] = \"duplicated\";\n\treturn NavigationFailureType;\n}({});\nconst ErrorTypeMessages = {\n\t[ErrorTypes.MATCHER_NOT_FOUND]({ location, currentLocation }) {\n\t\treturn `No match for\\n ${JSON.stringify(location)}${currentLocation ? \"\\nwhile being at\\n\" + JSON.stringify(currentLocation) : \"\"}`;\n\t},\n\t[ErrorTypes.NAVIGATION_GUARD_REDIRECT]({ from, to }) {\n\t\treturn `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n\t},\n\t[ErrorTypes.NAVIGATION_ABORTED]({ from, to }) {\n\t\treturn `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n\t},\n\t[ErrorTypes.NAVIGATION_CANCELLED]({ from, to }) {\n\t\treturn `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n\t},\n\t[ErrorTypes.NAVIGATION_DUPLICATED]({ from, to: _to }) {\n\t\treturn `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n\t}\n};\n/**\n* Creates a typed NavigationFailure object.\n* @internal\n* @param type - NavigationFailureType\n* @param params - { from, to }\n*/\nfunction createRouterError(type, params) {\n\tif (process.env.NODE_ENV !== \"production\" || false) return assign(new Error(ErrorTypeMessages[type](params)), {\n\t\ttype,\n\t\t[NavigationFailureSymbol]: true\n\t}, params);\n\telse return assign(/* @__PURE__ */ new Error(), {\n\t\ttype,\n\t\t[NavigationFailureSymbol]: true\n\t}, params);\n}\nfunction isNavigationFailure(error, type) {\n\treturn error instanceof Error && NavigationFailureSymbol in error && (type == null || !!(error.type & type));\n}\nconst propertiesToLog = [\n\t\"params\",\n\t\"query\",\n\t\"hash\"\n];\nfunction stringifyRoute(to) {\n\tif (typeof to === \"string\") return to;\n\tif (to.path != null) return to.path;\n\tconst location = {};\n\tfor (const key of propertiesToLog) if (key in to) location[key] = to[key];\n\treturn JSON.stringify(location, null, 2);\n}\n\n//#endregion\n//#region src/injectionSymbols.ts\n/**\n* RouteRecord being rendered by the closest ancestor Router View. Used for\n* `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View\n* Location Matched\n*\n* @internal\n*/\nconst matchedRouteKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location matched\" : \"\");\n/**\n* Allows overriding the router view depth to control which component in\n* `matched` is rendered. rvd stands for Router View Depth\n*\n* @internal\n*/\nconst viewDepthKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view depth\" : \"\");\n/**\n* Allows overriding the router instance returned by `useRouter` in tests. r\n* stands for router\n*\n* @internal\n*/\nconst routerKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router\" : \"\");\n/**\n* Allows overriding the current route returned by `useRoute` in tests. rl\n* stands for route location\n*\n* @internal\n*/\nconst routeLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"route location\" : \"\");\n/**\n* Allows overriding the current route used by router-view. Internally this is\n* used when the `route` prop is passed.\n*\n* @internal\n*/\nconst routerViewLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location\" : \"\");\n\n//#endregion\n//#region src/useApi.ts\n/**\n* Returns the router instance. Equivalent to using `$router` inside\n* templates.\n*/\nfunction useRouter() {\n\treturn inject(routerKey);\n}\n/**\n* Returns the current route location. Equivalent to using `$route` inside\n* templates.\n*/\nfunction useRoute(_name) {\n\treturn inject(routeLocationKey);\n}\n\n//#endregion\nexport { isRouteComponent as _, routerKey as a, isBrowser as b, ErrorTypes as c, isNavigationFailure as d, applyToParams as f, isESModule as g, isArray as h, routeLocationKey as i, NavigationFailureType as l, identityFn as m, useRouter as n, routerViewLocationKey as o, assign as p, matchedRouteKey as r, viewDepthKey as s, useRoute as t, createRouterError as u, mergeOptions as v, noop as y };","/*!\n * vue-router v5.0.6\n * (c) 2026 Eduardo San Martin Morote\n * @license MIT\n */\nimport { _ as isRouteComponent, b as isBrowser, c as ErrorTypes, g as isESModule, h as isArray, p as assign, r as matchedRouteKey, u as createRouterError } from \"./useApi-DtucMc-S.js\";\nimport { getCurrentInstance, inject, onActivated, onDeactivated, onUnmounted, watch } from \"vue\";\nimport { setupDevtoolsPlugin } from \"@vue/devtools-api\";\n\n//#region src/warning.ts\nfunction warn$1(msg) {\n\tconst args = Array.from(arguments).slice(1);\n\tconsole.warn.apply(console, [\"[Vue Router warn]: \" + msg].concat(args));\n}\n\n//#endregion\n//#region src/encoding.ts\n/**\n* Encoding Rules (␣ = Space)\n* - Path: ␣ \" < > # ? { }\n* - Query: ␣ \" < > # & =\n* - Hash: ␣ \" < > `\n*\n* On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\n* defines some extra characters to be encoded. Most browsers do not encode them\n* in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\n* also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)\n* plus `-._~`. This extra safety should be applied to query by patching the\n* string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\n* should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\n* into a `/` if directly typed in. The _backtick_ (`````) should also be\n* encoded everywhere because some browsers like FF encode it when directly\n* written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\n*/\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\n/**\n* NOTE: It's not clear to me if we should encode the + symbol in queries, it\n* seems to be less flexible than not doing so and I can't find out the legacy\n* systems requiring this for regular requests like text/html. In the standard,\n* the encoding of the plus character is only mentioned for\n* application/x-www-form-urlencoded\n* (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\n* leave the plus character as is in queries. To be more flexible, we allow the\n* plus character on the query, but it can also be manually encoded by the user.\n*\n* Resources:\n* - https://url.spec.whatwg.org/#urlencoded-parsing\n* - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\n*/\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\n/**\n* Encode characters that need to be encoded on the path, search and hash\n* sections of the URL.\n*\n* @internal\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction commonEncode(text) {\n\treturn text == null ? \"\" : encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\n/**\n* Encode characters that need to be encoded on the hash section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeHash(text) {\n\treturn commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\n/**\n* Encode characters that need to be encoded query values on the query\n* section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeQueryValue(text) {\n\treturn commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\n/**\n* Like `encodeQueryValue` but also encodes the `=` character.\n*\n* @param text - string to encode\n*/\nfunction encodeQueryKey(text) {\n\treturn encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\n/**\n* Encode characters that need to be encoded on the path section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodePath(text) {\n\treturn commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\n/**\n* Encode characters that need to be encoded on the path section of the URL as a\n* param. This function encodes everything {@link encodePath} does plus the\n* slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\n* string instead.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeParam(text) {\n\treturn encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n\tif (text == null) return null;\n\ttry {\n\t\treturn decodeURIComponent(\"\" + text);\n\t} catch {\n\t\tprocess.env.NODE_ENV !== \"production\" && warn$1(`Error decoding \"${text}\". Using original value`);\n\t}\n\treturn \"\" + text;\n}\n\n//#endregion\n//#region src/location.ts\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\n/**\n* Transforms a URI into a normalized history location\n*\n* @param parseQuery\n* @param location - URI to normalize\n* @param currentLocation - current absolute location. Allows resolving relative\n* paths. Must start with `/`. Defaults to `/`\n* @returns a normalized history location\n*/\nfunction parseURL(parseQuery, location, currentLocation = \"/\") {\n\tlet path, query = {}, searchString = \"\", hash = \"\";\n\tconst hashPos = location.indexOf(\"#\");\n\tlet searchPos = location.indexOf(\"?\");\n\tsearchPos = hashPos >= 0 && searchPos > hashPos ? -1 : searchPos;\n\tif (searchPos >= 0) {\n\t\tpath = location.slice(0, searchPos);\n\t\tsearchString = location.slice(searchPos, hashPos > 0 ? hashPos : location.length);\n\t\tquery = parseQuery(searchString.slice(1));\n\t}\n\tif (hashPos >= 0) {\n\t\tpath = path || location.slice(0, hashPos);\n\t\thash = location.slice(hashPos, location.length);\n\t}\n\tpath = resolveRelativePath(path != null ? path : location, currentLocation);\n\treturn {\n\t\tfullPath: path + searchString + hash,\n\t\tpath,\n\t\tquery,\n\t\thash: decode(hash)\n\t};\n}\nfunction NEW_stringifyURL(stringifyQuery, path, query, hash = \"\") {\n\tconst searchText = stringifyQuery(query);\n\treturn path + (searchText && \"?\") + searchText + encodeHash(hash);\n}\n/**\n* Stringifies a URL object\n*\n* @param stringifyQuery\n* @param location\n*/\nfunction stringifyURL(stringifyQuery, location) {\n\tconst query = location.query ? stringifyQuery(location.query) : \"\";\n\treturn location.path + (query && \"?\") + query + (location.hash || \"\");\n}\n/**\n* Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.\n*\n* @param pathname - location.pathname\n* @param base - base to strip off\n*/\nfunction stripBase(pathname, base) {\n\tif (!base || !pathname.toLowerCase().startsWith(base.toLowerCase())) return pathname;\n\treturn pathname.slice(base.length) || \"/\";\n}\n/**\n* Checks if two RouteLocation are equal. This means that both locations are\n* pointing towards the same {@link RouteRecord} and that all `params`, `query`\n* parameters and `hash` are the same\n*\n* @param stringifyQuery - A function that takes a query object of type LocationQueryRaw and returns a string representation of it.\n* @param a - first {@link RouteLocation}\n* @param b - second {@link RouteLocation}\n*/\nfunction isSameRouteLocation(stringifyQuery, a, b) {\n\tconst aLastIndex = a.matched.length - 1;\n\tconst bLastIndex = b.matched.length - 1;\n\treturn aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery(a.query) === stringifyQuery(b.query) && a.hash === b.hash;\n}\n/**\n* Check if two `RouteRecords` are equal. Takes into account aliases: they are\n* considered equal to the `RouteRecord` they are aliasing.\n*\n* @param a - first {@link RouteRecord}\n* @param b - second {@link RouteRecord}\n*/\nfunction isSameRouteRecord(a, b) {\n\treturn (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n\tif (Object.keys(a).length !== Object.keys(b).length) return false;\n\tfor (var key in a) if (!isSameRouteLocationParamsValue(a[key], b[key])) return false;\n\treturn true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n\treturn isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : (a && a.valueOf()) === (b && b.valueOf());\n}\n/**\n* Check if two arrays are the same or if an array with one single entry is the\n* same as another primitive value. Used to check query and parameters\n*\n* @param a - array of values\n* @param b - array of values or a single value\n*/\nfunction isEquivalentArray(a, b) {\n\treturn isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\n/**\n* Resolves a relative path that starts with `.`.\n*\n* @param to - path location we are resolving\n* @param from - currentLocation.path, should start with `/`\n*/\nfunction resolveRelativePath(to, from) {\n\tif (to.startsWith(\"/\")) return to;\n\tif (process.env.NODE_ENV !== \"production\" && !from.startsWith(\"/\")) {\n\t\twarn$1(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n\t\treturn to;\n\t}\n\tif (!to) return from;\n\tconst fromSegments = from.split(\"/\");\n\tconst toSegments = to.split(\"/\");\n\tconst lastToSegment = toSegments[toSegments.length - 1];\n\tif (lastToSegment === \"..\" || lastToSegment === \".\") toSegments.push(\"\");\n\tlet position = fromSegments.length - 1;\n\tlet toPosition;\n\tlet segment;\n\tfor (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n\t\tsegment = toSegments[toPosition];\n\t\tif (segment === \".\") continue;\n\t\tif (segment === \"..\") {\n\t\t\tif (position > 1) position--;\n\t\t} else break;\n\t}\n\treturn fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition).join(\"/\");\n}\n/**\n* Initial route location where the router is. Can be used in navigation guards\n* to differentiate the initial navigation.\n*\n* @example\n* ```js\n* import { START_LOCATION } from 'vue-router'\n*\n* router.beforeEach((to, from) => {\n* if (from === START_LOCATION) {\n* // initial navigation\n* }\n* })\n* ```\n*/\nconst START_LOCATION_NORMALIZED = {\n\tpath: \"/\",\n\tname: void 0,\n\tparams: {},\n\tquery: {},\n\thash: \"\",\n\tfullPath: \"/\",\n\tmatched: [],\n\tmeta: {},\n\tredirectedFrom: void 0\n};\n\n//#endregion\n//#region src/history/common.ts\nlet NavigationType = /* @__PURE__ */ function(NavigationType) {\n\tNavigationType[\"pop\"] = \"pop\";\n\tNavigationType[\"push\"] = \"push\";\n\treturn NavigationType;\n}({});\nlet NavigationDirection = /* @__PURE__ */ function(NavigationDirection) {\n\tNavigationDirection[\"back\"] = \"back\";\n\tNavigationDirection[\"forward\"] = \"forward\";\n\tNavigationDirection[\"unknown\"] = \"\";\n\treturn NavigationDirection;\n}({});\n/**\n* Starting location for Histories\n*/\nconst START = \"\";\n/**\n* Normalizes a base by removing any trailing slash and reading the base tag if\n* present.\n*\n* @param base - base to normalize\n*/\nfunction normalizeBase(base) {\n\tif (!base) if (isBrowser) {\n\t\tconst baseEl = document.querySelector(\"base\");\n\t\tbase = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n\t\tbase = base.replace(/^\\w+:\\/\\/[^/]+/, \"\");\n\t} else base = \"/\";\n\tif (base[0] !== \"/\" && base[0] !== \"#\") base = \"/\" + base;\n\treturn removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location) {\n\treturn base.replace(BEFORE_HASH_RE, \"#\") + location;\n}\n\n//#endregion\n//#region src/scrollBehavior.ts\nfunction getElementPosition(el, offset) {\n\tconst docRect = document.documentElement.getBoundingClientRect();\n\tconst elRect = el.getBoundingClientRect();\n\treturn {\n\t\tbehavior: offset.behavior,\n\t\tleft: elRect.left - docRect.left - (offset.left || 0),\n\t\ttop: elRect.top - docRect.top - (offset.top || 0)\n\t};\n}\nconst computeScrollPosition = () => ({\n\tleft: window.scrollX,\n\ttop: window.scrollY\n});\nfunction scrollToPosition(position) {\n\tlet scrollToOptions;\n\tif (\"el\" in position) {\n\t\tconst positionEl = position.el;\n\t\tconst isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n\t\t/**\n\t\t* `id`s can accept pretty much any characters, including CSS combinators\n\t\t* like `>` or `~`. It's still possible to retrieve elements using\n\t\t* `document.getElementById('~')` but it needs to be escaped when using\n\t\t* `document.querySelector('#\\\\~')` for it to be valid. The only\n\t\t* requirements for `id`s are them to be unique on the page and to not be\n\t\t* empty (`id=\"\"`). Because of that, when passing an id selector, it should\n\t\t* be properly escaped for it to work with `querySelector`. We could check\n\t\t* for the id selector to be simple (no CSS combinators `+ >~`) but that\n\t\t* would make things inconsistent since they are valid characters for an\n\t\t* `id` but would need to be escaped when using `querySelector`, breaking\n\t\t* their usage and ending up in no selector returned. Selectors need to be\n\t\t* escaped:\n\t\t*\n\t\t* - `#1-thing` becomes `#\\31 -thing`\n\t\t* - `#with~symbols` becomes `#with\\\\~symbols`\n\t\t*\n\t\t* - More information about the topic can be found at\n\t\t* https://mathiasbynens.be/notes/html5-id-class.\n\t\t* - Practical example: https://mathiasbynens.be/demo/html5-id\n\t\t*/\n\t\tif (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n\t\t\tif (!isIdSelector || !document.getElementById(position.el.slice(1))) try {\n\t\t\t\tconst foundEl = document.querySelector(position.el);\n\t\t\t\tif (isIdSelector && foundEl) {\n\t\t\t\t\twarn$1(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\twarn$1(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tconst el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n\t\tif (!el) {\n\t\t\tprocess.env.NODE_ENV !== \"production\" && warn$1(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n\t\t\treturn;\n\t\t}\n\t\tscrollToOptions = getElementPosition(el, position);\n\t} else scrollToOptions = position;\n\tif (\"scrollBehavior\" in document.documentElement.style) window.scrollTo(scrollToOptions);\n\telse window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.scrollX, scrollToOptions.top != null ? scrollToOptions.top : window.scrollY);\n}\nfunction getScrollKey(path, delta) {\n\treturn (history.state ? history.state.position - delta : -1) + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n\tscrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n\tconst scroll = scrollPositions.get(key);\n\tscrollPositions.delete(key);\n\treturn scroll;\n}\n/**\n* ScrollBehavior instance used by the router to compute and restore the scroll\n* position when navigating.\n*/\n\n//#endregion\n//#region src/types/typeGuards.ts\nfunction isRouteLocation(route) {\n\treturn typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n\treturn typeof name === \"string\" || typeof name === \"symbol\";\n}\n\n//#endregion\n//#region src/query.ts\n/**\n* Transforms a queryString into a {@link LocationQuery} object. Accept both, a\n* version with the leading `?` and without Should work as URLSearchParams\n\n* @internal\n*\n* @param search - search string to parse\n* @returns a query object\n*/\nfunction parseQuery(search) {\n\tconst query = {};\n\tif (search === \"\" || search === \"?\") return query;\n\tconst searchParams = (search[0] === \"?\" ? search.slice(1) : search).split(\"&\");\n\tfor (let i = 0; i < searchParams.length; ++i) {\n\t\tconst searchParam = searchParams[i].replace(PLUS_RE, \" \");\n\t\tconst eqPos = searchParam.indexOf(\"=\");\n\t\tconst key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n\t\tconst value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n\t\tif (key in query) {\n\t\t\tlet currentValue = query[key];\n\t\t\tif (!isArray(currentValue)) currentValue = query[key] = [currentValue];\n\t\t\tcurrentValue.push(value);\n\t\t} else query[key] = value;\n\t}\n\treturn query;\n}\n/**\n* Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\n* doesn't prepend a `?`\n*\n* @internal\n*\n* @param query - query object to stringify\n* @returns string version of the query without the leading `?`\n*/\nfunction stringifyQuery(query) {\n\tlet search = \"\";\n\tfor (let key in query) {\n\t\tconst value = query[key];\n\t\tkey = encodeQueryKey(key);\n\t\tif (value == null) {\n\t\t\tif (value !== void 0) search += (search.length ? \"&\" : \"\") + key;\n\t\t\tcontinue;\n\t\t}\n\t\t(isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)]).forEach((value) => {\n\t\t\tif (value !== void 0) {\n\t\t\t\tsearch += (search.length ? \"&\" : \"\") + key;\n\t\t\t\tif (value != null) search += \"=\" + value;\n\t\t\t}\n\t\t});\n\t}\n\treturn search;\n}\n/**\n* Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\n* numbers into strings, removing keys with an undefined value and replacing\n* undefined with null in arrays\n*\n* @param query - query object to normalize\n* @returns a normalized query object\n*/\nfunction normalizeQuery(query) {\n\tconst normalizedQuery = {};\n\tfor (const key in query) {\n\t\tconst value = query[key];\n\t\tif (value !== void 0) normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n\t}\n\treturn normalizedQuery;\n}\n\n//#endregion\n//#region src/utils/callbacks.ts\n/**\n* Create a list of callbacks that can be reset. Used to create before and after navigation guards list\n*/\nfunction useCallbacks() {\n\tlet handlers = [];\n\tfunction add(handler) {\n\t\thandlers.push(handler);\n\t\treturn () => {\n\t\t\tconst i = handlers.indexOf(handler);\n\t\t\tif (i > -1) handlers.splice(i, 1);\n\t\t};\n\t}\n\tfunction reset() {\n\t\thandlers = [];\n\t}\n\treturn {\n\t\tadd,\n\t\tlist: () => handlers.slice(),\n\t\treset\n\t};\n}\n\n//#endregion\n//#region src/navigationGuards.ts\nfunction registerGuard(activeRecordRef, name, guard) {\n\tconst record = activeRecordRef.value;\n\tif (!record) {\n\t\tif (process.env.NODE_ENV !== \"production\") warn$1(`No active route record was found when calling \\`${name === \"updateGuards\" ? \"onBeforeRouteUpdate\" : \"onBeforeRouteLeave\"}()\\`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?`);\n\t\treturn;\n\t}\n\tlet currentRecord = record;\n\tconst removeFromList = () => {\n\t\tcurrentRecord[name].delete(guard);\n\t};\n\tonUnmounted(removeFromList);\n\tonDeactivated(removeFromList);\n\tonActivated(() => {\n\t\tconst newRecord = activeRecordRef.value;\n\t\tif (process.env.NODE_ENV !== \"production\" && !newRecord) warn$1(\"No active route record was found when reactivating component with navigation guard. This is likely a bug in vue-router. Please report it.\");\n\t\tif (newRecord) currentRecord = newRecord;\n\t\tcurrentRecord[name].add(guard);\n\t});\n\tcurrentRecord[name].add(guard);\n}\n/**\n* Add a navigation guard that triggers whenever the component for the current\n* location is about to be left. Similar to {@link beforeRouteLeave} but can be\n* used in any component. The guard is removed when the component is unmounted.\n*\n* @param leaveGuard - {@link NavigationGuard}\n*/\nfunction onBeforeRouteLeave(leaveGuard) {\n\tif (process.env.NODE_ENV !== \"production\" && !getCurrentInstance()) {\n\t\twarn$1(\"getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function\");\n\t\treturn;\n\t}\n\tregisterGuard(inject(matchedRouteKey, {}), \"leaveGuards\", leaveGuard);\n}\n/**\n* Add a navigation guard that triggers whenever the current location is about\n* to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\n* component. The guard is removed when the component is unmounted.\n*\n* @param updateGuard - {@link NavigationGuard}\n*/\nfunction onBeforeRouteUpdate(updateGuard) {\n\tif (process.env.NODE_ENV !== \"production\" && !getCurrentInstance()) {\n\t\twarn$1(\"getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function\");\n\t\treturn;\n\t}\n\tregisterGuard(inject(matchedRouteKey, {}), \"updateGuards\", updateGuard);\n}\nfunction guardToPromiseFn(guard, to, from, record, name, runWithContext = (fn) => fn()) {\n\tconst enterCallbackArray = record && (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n\treturn () => new Promise((resolve, reject) => {\n\t\tconst next = (valid) => {\n\t\t\tif (valid === false) reject(createRouterError(ErrorTypes.NAVIGATION_ABORTED, {\n\t\t\t\tfrom,\n\t\t\t\tto\n\t\t\t}));\n\t\t\telse if (valid instanceof Error) reject(valid);\n\t\t\telse if (isRouteLocation(valid)) reject(createRouterError(ErrorTypes.NAVIGATION_GUARD_REDIRECT, {\n\t\t\t\tfrom: to,\n\t\t\t\tto: valid\n\t\t\t}));\n\t\t\telse {\n\t\t\t\tif (enterCallbackArray && record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") enterCallbackArray.push(valid);\n\t\t\t\tresolve();\n\t\t\t}\n\t\t};\n\t\tconst guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? withDeprecationWarning(canOnlyBeCalledOnce(next, to, from)) : next));\n\t\tlet guardCall = Promise.resolve(guardReturn);\n\t\tif (guard.length < 3) guardCall = guardCall.then(next);\n\t\tif (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n\t\t\tconst message = `The \"next\" callback was never called inside of ${guard.name ? \"\\\"\" + guard.name + \"\\\"\" : \"\"}:\\n${guard.toString()}\\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n\t\t\tif (typeof guardReturn === \"object\" && \"then\" in guardReturn) guardCall = guardCall.then((resolvedValue) => {\n\t\t\t\tif (!next._called) {\n\t\t\t\t\twarn$1(message);\n\t\t\t\t\treturn Promise.reject(/* @__PURE__ */ new Error(\"Invalid navigation guard\"));\n\t\t\t\t}\n\t\t\t\treturn resolvedValue;\n\t\t\t});\n\t\t\telse if (guardReturn !== void 0) {\n\t\t\t\tif (!next._called) {\n\t\t\t\t\twarn$1(message);\n\t\t\t\t\treject(/* @__PURE__ */ new Error(\"Invalid navigation guard\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tguardCall.catch((err) => reject(err));\n\t});\n}\n/**\n* Wraps the next callback to warn when it is used. Dev-only: when __DEV__ is\n* false (production builds), this branch is dead code and is stripped from the\n* bundle.\n*\n* @internal\n*/\nfunction withDeprecationWarning(next) {\n\tlet warned = false;\n\treturn function() {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\twarn$1(\"The `next()` callback in navigation guards is deprecated. Return the value instead of calling `next(value)`.\");\n\t\t}\n\t\treturn next.apply(this, arguments);\n\t};\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n\tlet called = 0;\n\treturn function() {\n\t\tif (called++ === 1) warn$1(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n\t\tnext._called = true;\n\t\tif (called === 1) next.apply(null, arguments);\n\t};\n}\nfunction extractComponentsGuards(matched, guardType, to, from, runWithContext = (fn) => fn()) {\n\tconst guards = [];\n\tfor (const record of matched) {\n\t\tif (process.env.NODE_ENV !== \"production\" && !record.components && record.children && !record.children.length) warn$1(`Record with path \"${record.path}\" is either missing a \"component(s)\" or \"children\" property.`);\n\t\tfor (const name in record.components) {\n\t\t\tlet rawComponent = record.components[name];\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is not a valid component. Received \"${String(rawComponent)}\".`);\n\t\t\t\t\tthrow new Error(\"Invalid route component\");\n\t\t\t\t} else if (\"then\" in rawComponent) {\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is a Promise instead of a function that returns a Promise. Did you write \"import('./MyPage.vue')\" instead of \"() => import('./MyPage.vue')\" ? This will break in production if not fixed.`);\n\t\t\t\t\tconst promise = rawComponent;\n\t\t\t\t\trawComponent = () => promise;\n\t\t\t\t} else if (rawComponent.__asyncLoader && !rawComponent.__warnedDefineAsync) {\n\t\t\t\t\trawComponent.__warnedDefineAsync = true;\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is defined using \"defineAsyncComponent()\". Write \"() => import('./MyPage.vue')\" instead of \"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (guardType !== \"beforeRouteEnter\" && !record.instances[name]) continue;\n\t\t\tif (isRouteComponent(rawComponent)) {\n\t\t\t\tconst guard = (rawComponent.__vccOpts || rawComponent)[guardType];\n\t\t\t\tguard && guards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext));\n\t\t\t} else {\n\t\t\t\tlet componentPromise = rawComponent();\n\t\t\t\tif (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n\t\t\t\t\tcomponentPromise = Promise.resolve(componentPromise);\n\t\t\t\t}\n\t\t\t\tguards.push(() => componentPromise.then((resolved) => {\n\t\t\t\t\tif (!resolved) throw new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`);\n\t\t\t\t\tconst resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n\t\t\t\t\trecord.mods[name] = resolved;\n\t\t\t\t\trecord.components[name] = resolvedComponent;\n\t\t\t\t\tconst guard = (resolvedComponent.__vccOpts || resolvedComponent)[guardType];\n\t\t\t\t\treturn guard && guardToPromiseFn(guard, to, from, record, name, runWithContext)();\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t}\n\treturn guards;\n}\n/**\n* Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.\n*\n* @param route - resolved route to load\n*/\nfunction loadRouteLocation(route) {\n\treturn route.matched.every((record) => record.redirect) ? Promise.reject(/* @__PURE__ */ new Error(\"Cannot load a route that redirects.\")) : Promise.all(route.matched.map((record) => record.components && Promise.all(Object.keys(record.components).reduce((promises, name) => {\n\t\tconst rawComponent = record.components[name];\n\t\tif (typeof rawComponent === \"function\" && !(\"displayName\" in rawComponent)) promises.push(rawComponent().then((resolved) => {\n\t\t\tif (!resolved) return Promise.reject(/* @__PURE__ */ new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\". Ensure you passed a function that returns a promise.`));\n\t\t\tconst resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n\t\t\trecord.mods[name] = resolved;\n\t\t\trecord.components[name] = resolvedComponent;\n\t\t}));\n\t\treturn promises;\n\t}, [])))).then(() => route);\n}\n/**\n* Split the leaving, updating, and entering records.\n* @internal\n*\n* @param to - Location we are navigating to\n* @param from - Location we are navigating from\n*/\nfunction extractChangingRecords(to, from) {\n\tconst leavingRecords = [];\n\tconst updatingRecords = [];\n\tconst enteringRecords = [];\n\tconst len = Math.max(from.matched.length, to.matched.length);\n\tfor (let i = 0; i < len; i++) {\n\t\tconst recordFrom = from.matched[i];\n\t\tif (recordFrom) if (to.matched.find((record) => isSameRouteRecord(record, recordFrom))) updatingRecords.push(recordFrom);\n\t\telse leavingRecords.push(recordFrom);\n\t\tconst recordTo = to.matched[i];\n\t\tif (recordTo) {\n\t\t\tif (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) enteringRecords.push(recordTo);\n\t\t}\n\t}\n\treturn [\n\t\tleavingRecords,\n\t\tupdatingRecords,\n\t\tenteringRecords\n\t];\n}\n\n//#endregion\n//#region src/devtools.ts\n/**\n* Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).\n*\n* @param routeLocation - routeLocation to format\n* @param tooltip - optional tooltip\n* @returns a copy of the routeLocation\n*/\nfunction formatRouteLocation(routeLocation, tooltip) {\n\tconst copy = assign({}, routeLocation, { matched: routeLocation.matched.map((matched) => omit(matched, [\n\t\t\"instances\",\n\t\t\"children\",\n\t\t\"aliasOf\"\n\t])) });\n\treturn { _custom: {\n\t\ttype: null,\n\t\treadOnly: true,\n\t\tdisplay: routeLocation.fullPath,\n\t\ttooltip,\n\t\tvalue: copy\n\t} };\n}\nfunction formatDisplay(display) {\n\treturn { _custom: { display } };\n}\nlet routerId = 0;\nfunction addDevtools(app, router, matcher) {\n\tif (router.__hasDevtools) return;\n\trouter.__hasDevtools = true;\n\tconst id = routerId++;\n\tsetupDevtoolsPlugin({\n\t\tid: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n\t\tlabel: \"Vue Router\",\n\t\tpackageName: \"vue-router\",\n\t\thomepage: \"https://router.vuejs.org\",\n\t\tlogo: \"https://router.vuejs.org/logo.png\",\n\t\tcomponentStateTypes: [\"Routing\"],\n\t\tapp\n\t}, (api) => {\n\t\tapi.on.inspectComponent((payload) => {\n\t\t\tif (payload.instanceData) payload.instanceData.state.push({\n\t\t\t\ttype: \"Routing\",\n\t\t\t\tkey: \"$route\",\n\t\t\t\teditable: false,\n\t\t\t\tvalue: formatRouteLocation(router.currentRoute.value, \"Current Route\")\n\t\t\t});\n\t\t});\n\t\tapi.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n\t\t\tif (componentInstance.__vrv_devtools) {\n\t\t\t\tconst info = componentInstance.__vrv_devtools;\n\t\t\t\tnode.tags.push({\n\t\t\t\t\tlabel: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n\t\t\t\t\ttextColor: 0,\n\t\t\t\t\ttooltip: \"This component is rendered by <router-view>\",\n\t\t\t\t\tbackgroundColor: PINK_500\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (isArray(componentInstance.__vrl_devtools)) {\n\t\t\t\tcomponentInstance.__devtoolsApi = api;\n\t\t\t\tcomponentInstance.__vrl_devtools.forEach((devtoolsData) => {\n\t\t\t\t\tlet label = devtoolsData.route.path;\n\t\t\t\t\tlet backgroundColor = ORANGE_400;\n\t\t\t\t\tlet tooltip = \"\";\n\t\t\t\t\tlet textColor = 0;\n\t\t\t\t\tif (devtoolsData.error) {\n\t\t\t\t\t\tlabel = devtoolsData.error;\n\t\t\t\t\t\tbackgroundColor = RED_100;\n\t\t\t\t\t\ttextColor = RED_700;\n\t\t\t\t\t} else if (devtoolsData.isExactActive) {\n\t\t\t\t\t\tbackgroundColor = LIME_500;\n\t\t\t\t\t\ttooltip = \"This is exactly active\";\n\t\t\t\t\t} else if (devtoolsData.isActive) {\n\t\t\t\t\t\tbackgroundColor = BLUE_600;\n\t\t\t\t\t\ttooltip = \"This link is active\";\n\t\t\t\t\t}\n\t\t\t\t\tnode.tags.push({\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\ttextColor,\n\t\t\t\t\t\ttooltip,\n\t\t\t\t\t\tbackgroundColor\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\twatch(router.currentRoute, () => {\n\t\t\trefreshRoutesView();\n\t\t\tapi.notifyComponentUpdate();\n\t\t\tapi.sendInspectorTree(routerInspectorId);\n\t\t\tapi.sendInspectorState(routerInspectorId);\n\t\t});\n\t\tconst navigationsLayerId = \"router:navigations:\" + id;\n\t\tapi.addTimelineLayer({\n\t\t\tid: navigationsLayerId,\n\t\t\tlabel: `Router${id ? \" \" + id : \"\"} Navigations`,\n\t\t\tcolor: 4237508\n\t\t});\n\t\trouter.onError((error, to) => {\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttitle: \"Error during Navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\tlogType: \"error\",\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\tdata: { error },\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\tlet navigationId = 0;\n\t\trouter.beforeEach((to, from) => {\n\t\t\tconst data = {\n\t\t\t\tguard: formatDisplay(\"beforeEach\"),\n\t\t\t\tfrom: formatRouteLocation(from, \"Current Location during this navigation\"),\n\t\t\t\tto: formatRouteLocation(to, \"Target location\")\n\t\t\t};\n\t\t\tObject.defineProperty(to.meta, \"__navigationId\", { value: navigationId++ });\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\ttitle: \"Start of navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\tdata,\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\trouter.afterEach((to, from, failure) => {\n\t\t\tconst data = { guard: formatDisplay(\"afterEach\") };\n\t\t\tif (failure) {\n\t\t\t\tdata.failure = { _custom: {\n\t\t\t\t\ttype: Error,\n\t\t\t\t\treadOnly: true,\n\t\t\t\t\tdisplay: failure ? failure.message : \"\",\n\t\t\t\t\ttooltip: \"Navigation Failure\",\n\t\t\t\t\tvalue: failure\n\t\t\t\t} };\n\t\t\t\tdata.status = formatDisplay(\"❌\");\n\t\t\t} else data.status = formatDisplay(\"✅\");\n\t\t\tdata.from = formatRouteLocation(from, \"Current Location during this navigation\");\n\t\t\tdata.to = formatRouteLocation(to, \"Target location\");\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttitle: \"End of navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\tdata,\n\t\t\t\t\tlogType: failure ? \"warning\" : \"default\",\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\t/**\n\t\t* Inspector of Existing routes\n\t\t*/\n\t\tconst routerInspectorId = \"router-inspector:\" + id;\n\t\tapi.addInspector({\n\t\t\tid: routerInspectorId,\n\t\t\tlabel: \"Routes\" + (id ? \" \" + id : \"\"),\n\t\t\ticon: \"book\",\n\t\t\ttreeFilterPlaceholder: \"Search routes\"\n\t\t});\n\t\tfunction refreshRoutesView() {\n\t\t\tif (!activeRoutesPayload) return;\n\t\t\tconst payload = activeRoutesPayload;\n\t\t\tlet routes = matcher.getRoutes().filter((route) => !route.parent || !route.parent.record.components);\n\t\t\troutes.forEach(resetMatchStateOnRouteRecord);\n\t\t\tif (payload.filter) routes = routes.filter((route) => isRouteMatching(route, payload.filter.toLowerCase()));\n\t\t\troutes.forEach((route) => markRouteRecordActive(route, router.currentRoute.value));\n\t\t\tpayload.rootNodes = routes.map(formatRouteRecordForInspector);\n\t\t}\n\t\tlet activeRoutesPayload;\n\t\tapi.on.getInspectorTree((payload) => {\n\t\t\tactiveRoutesPayload = payload;\n\t\t\tif (payload.app === app && payload.inspectorId === routerInspectorId) refreshRoutesView();\n\t\t});\n\t\t/**\n\t\t* Display information about the currently selected route record\n\t\t*/\n\t\tapi.on.getInspectorState((payload) => {\n\t\t\tif (payload.app === app && payload.inspectorId === routerInspectorId) {\n\t\t\t\tconst route = matcher.getRoutes().find((route) => route.record.__vd_id === payload.nodeId);\n\t\t\t\tif (route) payload.state = { options: formatRouteRecordMatcherForStateInspector(route) };\n\t\t\t}\n\t\t});\n\t\tapi.sendInspectorTree(routerInspectorId);\n\t\tapi.sendInspectorState(routerInspectorId);\n\t});\n}\nfunction modifierForKey(key) {\n\tif (key.optional) return key.repeatable ? \"*\" : \"?\";\n\telse return key.repeatable ? \"+\" : \"\";\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n\tconst { record } = route;\n\tconst fields = [{\n\t\teditable: false,\n\t\tkey: \"path\",\n\t\tvalue: record.path\n\t}];\n\tif (record.name != null) fields.push({\n\t\teditable: false,\n\t\tkey: \"name\",\n\t\tvalue: record.name\n\t});\n\tfields.push({\n\t\teditable: false,\n\t\tkey: \"regexp\",\n\t\tvalue: route.re\n\t});\n\tif (route.keys.length) fields.push({\n\t\teditable: false,\n\t\tkey: \"keys\",\n\t\tvalue: { _custom: {\n\t\t\ttype: null,\n\t\t\treadOnly: true,\n\t\t\tdisplay: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n\t\t\ttooltip: \"Param keys\",\n\t\t\tvalue: route.keys\n\t\t} }\n\t});\n\tif (record.redirect != null) fields.push({\n\t\teditable: false,\n\t\tkey: \"redirect\",\n\t\tvalue: record.redirect\n\t});\n\tif (route.alias.length) fields.push({\n\t\teditable: false,\n\t\tkey: \"aliases\",\n\t\tvalue: route.alias.map((alias) => alias.record.path)\n\t});\n\tif (Object.keys(route.record.meta).length) fields.push({\n\t\teditable: false,\n\t\tkey: \"meta\",\n\t\tvalue: route.record.meta\n\t});\n\tfields.push({\n\t\tkey: \"score\",\n\t\teditable: false,\n\t\tvalue: { _custom: {\n\t\t\ttype: null,\n\t\t\treadOnly: true,\n\t\t\tdisplay: route.score.map((score) => score.join(\", \")).join(\" | \"),\n\t\t\ttooltip: \"Score used to sort routes\",\n\t\t\tvalue: route.score\n\t\t} }\n\t});\n\treturn fields;\n}\n/**\n* Extracted from tailwind palette\n*/\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nconst RED_100 = 16704226;\nconst RED_700 = 12131356;\nfunction formatRouteRecordForInspector(route) {\n\tconst tags = [];\n\tconst { record } = route;\n\tif (record.name != null) tags.push({\n\t\tlabel: String(record.name),\n\t\ttextColor: 0,\n\t\tbackgroundColor: CYAN_400\n\t});\n\tif (record.aliasOf) tags.push({\n\t\tlabel: \"alias\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: ORANGE_400\n\t});\n\tif (route.__vd_match) tags.push({\n\t\tlabel: \"matches\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: PINK_500\n\t});\n\tif (route.__vd_exactActive) tags.push({\n\t\tlabel: \"exact\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: LIME_500\n\t});\n\tif (route.__vd_active) tags.push({\n\t\tlabel: \"active\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: BLUE_600\n\t});\n\tif (record.redirect) tags.push({\n\t\tlabel: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n\t\ttextColor: 16777215,\n\t\tbackgroundColor: DARK\n\t});\n\tlet id = record.__vd_id;\n\tif (id == null) {\n\t\tid = String(routeRecordId++);\n\t\trecord.__vd_id = id;\n\t}\n\treturn {\n\t\tid,\n\t\tlabel: record.path,\n\t\ttags,\n\t\tchildren: route.children.map(formatRouteRecordForInspector)\n\t};\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n\tconst isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n\troute.__vd_exactActive = route.__vd_active = isExactActive;\n\tif (!isExactActive) route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n\troute.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n\troute.__vd_match = false;\n\troute.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n\tconst found = String(route.re).match(EXTRACT_REGEXP_RE);\n\troute.__vd_match = false;\n\tif (!found || found.length < 3) return false;\n\tif (new RegExp(found[1].replace(/\\$$/, \"\"), found[2]).test(filter)) {\n\t\troute.children.forEach((child) => isRouteMatching(child, filter));\n\t\tif (route.record.path !== \"/\" || filter === \"/\") {\n\t\t\troute.__vd_match = route.re.test(filter);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\tconst path = route.record.path.toLowerCase();\n\tconst decodedPath = decode(path);\n\tif (!filter.startsWith(\"/\") && (decodedPath.includes(filter) || path.includes(filter))) return true;\n\tif (decodedPath.startsWith(filter) || path.startsWith(filter)) return true;\n\tif (route.record.name && String(route.record.name).includes(filter)) return true;\n\treturn route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n\tconst ret = {};\n\tfor (const key in obj) if (!keys.includes(key)) ret[key] = obj[key];\n\treturn ret;\n}\n\n//#endregion\nexport { resolveRelativePath as A, normalizeBase as C, isSameRouteLocationParams as D, isSameRouteLocation as E, encodeParam as F, encodePath as I, warn$1 as L, stripBase as M, decode as N, isSameRouteRecord as O, encodeHash as P, createHref as S, START_LOCATION_NORMALIZED as T, saveScrollPosition as _, loadRouteLocation as a, NavigationType as b, useCallbacks as c, stringifyQuery as d, isRouteLocation as f, getScrollKey as g, getSavedScrollPosition as h, guardToPromiseFn as i, stringifyURL as j, parseURL as k, normalizeQuery as l, computeScrollPosition as m, extractChangingRecords as n, onBeforeRouteLeave as o, isRouteName as p, extractComponentsGuards as r, onBeforeRouteUpdate as s, addDevtools as t, parseQuery as u, scrollToPosition as v, NEW_stringifyURL as w, START as x, NavigationDirection as y };","/*!\n * vue-router v5.0.6\n * (c) 2026 Eduardo San Martin Morote\n * @license MIT\n */\nimport { a as routerKey, b as isBrowser, c as ErrorTypes, d as isNavigationFailure, f as applyToParams, h as isArray, i as routeLocationKey, l as NavigationFailureType, n as useRouter, o as routerViewLocationKey, p as assign, r as matchedRouteKey, s as viewDepthKey, t as useRoute, u as createRouterError, v as mergeOptions, y as noop } from \"./useApi-DtucMc-S.js\";\nimport { C as normalizeBase, D as isSameRouteLocationParams, E as isSameRouteLocation, F as encodeParam, L as warn$1, M as stripBase, N as decode, O as isSameRouteRecord, P as encodeHash, S as createHref, T as START_LOCATION_NORMALIZED, _ as saveScrollPosition, a as loadRouteLocation, b as NavigationType, c as useCallbacks, d as stringifyQuery, f as isRouteLocation, g as getScrollKey, h as getSavedScrollPosition, i as guardToPromiseFn, j as stringifyURL, k as parseURL, l as normalizeQuery, m as computeScrollPosition, n as extractChangingRecords, o as onBeforeRouteLeave, p as isRouteName, r as extractComponentsGuards, s as onBeforeRouteUpdate, t as addDevtools, u as parseQuery, v as scrollToPosition, x as START, y as NavigationDirection } from \"./devtools-BPov6AZY.js\";\nimport { computed, defineComponent, getCurrentInstance, h, inject, nextTick, provide, reactive, ref, shallowReactive, shallowRef, unref, watch, watchEffect } from \"vue\";\n\n//#region src/history/html5.ts\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\n/**\n* Creates a normalized history location from a window.location object\n* @param base - The base path\n* @param location - The window.location object\n*/\nfunction createCurrentLocation(base, location) {\n\tconst { pathname, search, hash } = location;\n\tconst hashPos = base.indexOf(\"#\");\n\tif (hashPos > -1) {\n\t\tlet slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n\t\tlet pathFromHash = hash.slice(slicePos);\n\t\tif (pathFromHash[0] !== \"/\") pathFromHash = \"/\" + pathFromHash;\n\t\treturn stripBase(pathFromHash, \"\");\n\t}\n\treturn stripBase(pathname, base) + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n\tlet listeners = [];\n\tlet teardowns = [];\n\tlet pauseState = null;\n\tconst popStateHandler = ({ state }) => {\n\t\tconst to = createCurrentLocation(base, location);\n\t\tconst from = currentLocation.value;\n\t\tconst fromState = historyState.value;\n\t\tlet delta = 0;\n\t\tif (state) {\n\t\t\tcurrentLocation.value = to;\n\t\t\thistoryState.value = state;\n\t\t\tif (pauseState && pauseState === from) {\n\t\t\t\tpauseState = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdelta = fromState ? state.position - fromState.position : 0;\n\t\t} else replace(to);\n\t\tlisteners.forEach((listener) => {\n\t\t\tlistener(currentLocation.value, from, {\n\t\t\t\tdelta,\n\t\t\t\ttype: NavigationType.pop,\n\t\t\t\tdirection: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown\n\t\t\t});\n\t\t});\n\t};\n\tfunction pauseListeners() {\n\t\tpauseState = currentLocation.value;\n\t}\n\tfunction listen(callback) {\n\t\tlisteners.push(callback);\n\t\tconst teardown = () => {\n\t\t\tconst index = listeners.indexOf(callback);\n\t\t\tif (index > -1) listeners.splice(index, 1);\n\t\t};\n\t\tteardowns.push(teardown);\n\t\treturn teardown;\n\t}\n\tfunction beforeUnloadListener() {\n\t\tif (document.visibilityState === \"hidden\") {\n\t\t\tconst { history } = window;\n\t\t\tif (!history.state) return;\n\t\t\thistory.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), \"\");\n\t\t}\n\t}\n\tfunction destroy() {\n\t\tfor (const teardown of teardowns) teardown();\n\t\tteardowns = [];\n\t\twindow.removeEventListener(\"popstate\", popStateHandler);\n\t\twindow.removeEventListener(\"pagehide\", beforeUnloadListener);\n\t\tdocument.removeEventListener(\"visibilitychange\", beforeUnloadListener);\n\t}\n\twindow.addEventListener(\"popstate\", popStateHandler);\n\twindow.addEventListener(\"pagehide\", beforeUnloadListener);\n\tdocument.addEventListener(\"visibilitychange\", beforeUnloadListener);\n\treturn {\n\t\tpauseListeners,\n\t\tlisten,\n\t\tdestroy\n\t};\n}\n/**\n* Creates a state object\n*/\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n\treturn {\n\t\tback,\n\t\tcurrent,\n\t\tforward,\n\t\treplaced,\n\t\tposition: window.history.length,\n\t\tscroll: computeScroll ? computeScrollPosition() : null\n\t};\n}\nfunction useHistoryStateNavigation(base) {\n\tconst { history, location } = window;\n\tconst currentLocation = { value: createCurrentLocation(base, location) };\n\tconst historyState = { value: history.state };\n\tif (!historyState.value) changeLocation(currentLocation.value, {\n\t\tback: null,\n\t\tcurrent: currentLocation.value,\n\t\tforward: null,\n\t\tposition: history.length - 1,\n\t\treplaced: true,\n\t\tscroll: null\n\t}, true);\n\tfunction changeLocation(to, state, replace) {\n\t\t/**\n\t\t* if a base tag is provided, and we are on a normal domain, we have to\n\t\t* respect the provided `base` attribute because pushState() will use it and\n\t\t* potentially erase anything before the `#` like at\n\t\t* https://github.com/vuejs/router/issues/685 where a base of\n\t\t* `/folder/#` but a base of `/` would erase the `/folder/` section. If\n\t\t* there is no host, the `<base>` tag makes no sense and if there isn't a\n\t\t* base tag we can just use everything after the `#`.\n\t\t*/\n\t\tconst hashIndex = base.indexOf(\"#\");\n\t\tconst url = hashIndex > -1 ? (location.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n\t\ttry {\n\t\t\thistory[replace ? \"replaceState\" : \"pushState\"](state, \"\", url);\n\t\t\thistoryState.value = state;\n\t\t} catch (err) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") warn$1(\"Error with push/replace State\", err);\n\t\t\telse console.error(err);\n\t\t\tlocation[replace ? \"replace\" : \"assign\"](url);\n\t\t}\n\t}\n\tfunction replace(to, data) {\n\t\tchangeLocation(to, assign({}, history.state, buildState(historyState.value.back, to, historyState.value.forward, true), data, { position: historyState.value.position }), true);\n\t\tcurrentLocation.value = to;\n\t}\n\tfunction push(to, data) {\n\t\tconst currentState = assign({}, historyState.value, history.state, {\n\t\t\tforward: to,\n\t\t\tscroll: computeScrollPosition()\n\t\t});\n\t\tif (process.env.NODE_ENV !== \"production\" && !history.state) warn$1(\"history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\\n\\nhistory.replaceState(history.state, '', url)\\n\\nYou can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state\");\n\t\tchangeLocation(currentState.current, currentState, true);\n\t\tchangeLocation(to, assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data), false);\n\t\tcurrentLocation.value = to;\n\t}\n\treturn {\n\t\tlocation: currentLocation,\n\t\tstate: historyState,\n\t\tpush,\n\t\treplace\n\t};\n}\n/**\n* Creates an HTML5 history. Most common history for single page applications.\n*\n* @param base -\n*/\nfunction createWebHistory(base) {\n\tbase = normalizeBase(base);\n\tconst historyNavigation = useHistoryStateNavigation(base);\n\tconst historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n\tfunction go(delta, triggerListeners = true) {\n\t\tif (!triggerListeners) historyListeners.pauseListeners();\n\t\thistory.go(delta);\n\t}\n\tconst routerHistory = assign({\n\t\tlocation: \"\",\n\t\tbase,\n\t\tgo,\n\t\tcreateHref: createHref.bind(null, base)\n\t}, historyNavigation, historyListeners);\n\tObject.defineProperty(routerHistory, \"location\", {\n\t\tenumerable: true,\n\t\tget: () => historyNavigation.location.value\n\t});\n\tObject.defineProperty(routerHistory, \"state\", {\n\t\tenumerable: true,\n\t\tget: () => historyNavigation.state.value\n\t});\n\treturn routerHistory;\n}\n\n//#endregion\n//#region src/history/memory.ts\n/**\n* Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\n* It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\n*\n* @param base - Base applied to all urls, defaults to '/'\n* @returns a history object that can be passed to the router constructor\n*/\nfunction createMemoryHistory(base = \"\") {\n\tlet listeners = [];\n\tlet queue = [[START, {}]];\n\tlet position = 0;\n\tbase = normalizeBase(base);\n\tfunction setLocation(location, state = {}) {\n\t\tposition++;\n\t\tif (position !== queue.length) queue.splice(position);\n\t\tqueue.push([location, state]);\n\t}\n\tfunction triggerListeners(to, from, { direction, delta }) {\n\t\tconst info = {\n\t\t\tdirection,\n\t\t\tdelta,\n\t\t\ttype: NavigationType.pop\n\t\t};\n\t\tfor (const callback of listeners) callback(to, from, info);\n\t}\n\tconst routerHistory = {\n\t\tlocation: START,\n\t\tstate: {},\n\t\tbase,\n\t\tcreateHref: createHref.bind(null, base),\n\t\treplace(to, state) {\n\t\t\tqueue.splice(position--, 1);\n\t\t\tsetLocation(to, state);\n\t\t},\n\t\tpush(to, state) {\n\t\t\tsetLocation(to, state);\n\t\t},\n\t\tlisten(callback) {\n\t\t\tlisteners.push(callback);\n\t\t\treturn () => {\n\t\t\t\tconst index = listeners.indexOf(callback);\n\t\t\t\tif (index > -1) listeners.splice(index, 1);\n\t\t\t};\n\t\t},\n\t\tdestroy() {\n\t\t\tlisteners = [];\n\t\t\tqueue = [[START, {}]];\n\t\t\tposition = 0;\n\t\t},\n\t\tgo(delta, shouldTrigger = true) {\n\t\t\tconst from = this.location;\n\t\t\tconst direction = delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\n\t\t\tposition = Math.max(0, Math.min(position + delta, queue.length - 1));\n\t\t\tif (shouldTrigger) triggerListeners(this.location, from, {\n\t\t\t\tdirection,\n\t\t\t\tdelta\n\t\t\t});\n\t\t}\n\t};\n\tObject.defineProperty(routerHistory, \"location\", {\n\t\tenumerable: true,\n\t\tget: () => queue[position][0]\n\t});\n\tObject.defineProperty(routerHistory, \"state\", {\n\t\tenumerable: true,\n\t\tget: () => queue[position][1]\n\t});\n\treturn routerHistory;\n}\n\n//#endregion\n//#region src/history/hash.ts\n/**\n* Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to\n* handle any URL is not possible.\n*\n* @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `<base>` tag\n* in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()\n* calls**, meaning that if you use a `<base>` tag, it's `href` value **has to match this parameter** (ignoring anything\n* after the `#`).\n*\n* @example\n* ```js\n* // at https://example.com/folder\n* createWebHashHistory() // gives a url of `https://example.com/folder#`\n* createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\n* // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\n* createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\n* // you should avoid doing this because it changes the original url and breaks copying urls\n* createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\n*\n* // at file:///usr/etc/folder/index.html\n* // for locations with no `host`, the base is ignored\n* createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\n* ```\n*/\nfunction createWebHashHistory(base) {\n\tbase = location.host ? base || location.pathname + location.search : \"\";\n\tif (!base.includes(\"#\")) base += \"#\";\n\tif (process.env.NODE_ENV !== \"production\" && !base.endsWith(\"#/\") && !base.endsWith(\"#\")) warn$1(`A hash base must end with a \"#\":\\n\"${base}\" should be \"${base.replace(/#.*$/, \"#\")}\".`);\n\treturn createWebHistory(base);\n}\n\n//#endregion\n//#region src/matcher/pathTokenizer.ts\nlet TokenType = /* @__PURE__ */ function(TokenType) {\n\tTokenType[TokenType[\"Static\"] = 0] = \"Static\";\n\tTokenType[TokenType[\"Param\"] = 1] = \"Param\";\n\tTokenType[TokenType[\"Group\"] = 2] = \"Group\";\n\treturn TokenType;\n}({});\nvar TokenizerState = /* @__PURE__ */ function(TokenizerState) {\n\tTokenizerState[TokenizerState[\"Static\"] = 0] = \"Static\";\n\tTokenizerState[TokenizerState[\"Param\"] = 1] = \"Param\";\n\tTokenizerState[TokenizerState[\"ParamRegExp\"] = 2] = \"ParamRegExp\";\n\tTokenizerState[TokenizerState[\"ParamRegExpEnd\"] = 3] = \"ParamRegExpEnd\";\n\tTokenizerState[TokenizerState[\"EscapeNext\"] = 4] = \"EscapeNext\";\n\treturn TokenizerState;\n}(TokenizerState || {});\nconst ROOT_TOKEN = {\n\ttype: TokenType.Static,\n\tvalue: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n\tif (!path) return [[]];\n\tif (path === \"/\") return [[ROOT_TOKEN]];\n\tif (!path.startsWith(\"/\")) throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n\tfunction crash(message) {\n\t\tthrow new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n\t}\n\tlet state = TokenizerState.Static;\n\tlet previousState = state;\n\tconst tokens = [];\n\tlet segment;\n\tfunction finalizeSegment() {\n\t\tif (segment) tokens.push(segment);\n\t\tsegment = [];\n\t}\n\tlet i = 0;\n\tlet char;\n\tlet buffer = \"\";\n\tlet customRe = \"\";\n\tfunction consumeBuffer() {\n\t\tif (!buffer) return;\n\t\tif (state === TokenizerState.Static) segment.push({\n\t\t\ttype: TokenType.Static,\n\t\t\tvalue: buffer\n\t\t});\n\t\telse if (state === TokenizerState.Param || state === TokenizerState.ParamRegExp || state === TokenizerState.ParamRegExpEnd) {\n\t\t\tif (segment.length > 1 && (char === \"*\" || char === \"+\")) crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n\t\t\tsegment.push({\n\t\t\t\ttype: TokenType.Param,\n\t\t\t\tvalue: buffer,\n\t\t\t\tregexp: customRe,\n\t\t\t\trepeatable: char === \"*\" || char === \"+\",\n\t\t\t\toptional: char === \"*\" || char === \"?\"\n\t\t\t});\n\t\t} else crash(\"Invalid state to consume buffer\");\n\t\tbuffer = \"\";\n\t}\n\tfunction addCharToBuffer() {\n\t\tbuffer += char;\n\t}\n\twhile (i < path.length) {\n\t\tchar = path[i++];\n\t\tif (char === \"\\\\\" && state !== TokenizerState.ParamRegExp) {\n\t\t\tpreviousState = state;\n\t\t\tstate = TokenizerState.EscapeNext;\n\t\t\tcontinue;\n\t\t}\n\t\tswitch (state) {\n\t\t\tcase TokenizerState.Static:\n\t\t\t\tif (char === \"/\") {\n\t\t\t\t\tif (buffer) consumeBuffer();\n\t\t\t\t\tfinalizeSegment();\n\t\t\t\t} else if (char === \":\") {\n\t\t\t\t\tconsumeBuffer();\n\t\t\t\t\tstate = TokenizerState.Param;\n\t\t\t\t} else addCharToBuffer();\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.EscapeNext:\n\t\t\t\taddCharToBuffer();\n\t\t\t\tstate = previousState;\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.Param:\n\t\t\t\tif (char === \"(\") state = TokenizerState.ParamRegExp;\n\t\t\t\telse if (VALID_PARAM_RE.test(char)) addCharToBuffer();\n\t\t\t\telse {\n\t\t\t\t\tconsumeBuffer();\n\t\t\t\t\tstate = TokenizerState.Static;\n\t\t\t\t\tif (char !== \"*\" && char !== \"?\" && char !== \"+\") i--;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.ParamRegExp:\n\t\t\t\tif (char === \")\") if (customRe[customRe.length - 1] == \"\\\\\") customRe = customRe.slice(0, -1) + char;\n\t\t\t\telse state = TokenizerState.ParamRegExpEnd;\n\t\t\t\telse customRe += char;\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.ParamRegExpEnd:\n\t\t\t\tconsumeBuffer();\n\t\t\t\tstate = TokenizerState.Static;\n\t\t\t\tif (char !== \"*\" && char !== \"?\" && char !== \"+\") i--;\n\t\t\t\tcustomRe = \"\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcrash(\"Unknown state\");\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif (state === TokenizerState.ParamRegExp) crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n\tconsumeBuffer();\n\tfinalizeSegment();\n\treturn tokens;\n}\n\n//#endregion\n//#region src/matcher/pathParserRanker.ts\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n\tsensitive: false,\n\tstrict: false,\n\tstart: true,\n\tend: true\n};\nvar PathScore = /* @__PURE__ */ function(PathScore) {\n\tPathScore[PathScore[\"_multiplier\"] = 10] = \"_multiplier\";\n\tPathScore[PathScore[\"Root\"] = 90] = \"Root\";\n\tPathScore[PathScore[\"Segment\"] = 40] = \"Segment\";\n\tPathScore[PathScore[\"SubSegment\"] = 30] = \"SubSegment\";\n\tPathScore[PathScore[\"Static\"] = 40] = \"Static\";\n\tPathScore[PathScore[\"Dynamic\"] = 20] = \"Dynamic\";\n\tPathScore[PathScore[\"BonusCustomRegExp\"] = 10] = \"BonusCustomRegExp\";\n\tPathScore[PathScore[\"BonusWildcard\"] = -50] = \"BonusWildcard\";\n\tPathScore[PathScore[\"BonusRepeatable\"] = -20] = \"BonusRepeatable\";\n\tPathScore[PathScore[\"BonusOptional\"] = -8] = \"BonusOptional\";\n\tPathScore[PathScore[\"BonusStrict\"] = .7000000000000001] = \"BonusStrict\";\n\tPathScore[PathScore[\"BonusCaseSensitive\"] = .25] = \"BonusCaseSensitive\";\n\treturn PathScore;\n}(PathScore || {});\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\n/**\n* Creates a path parser from an array of Segments (a segment is an array of Tokens)\n*\n* @param segments - array of segments returned by tokenizePath\n* @param extraOptions - optional options for the regexp\n* @returns a PathParser\n*/\nfunction tokensToParser(segments, extraOptions) {\n\tconst options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n\tconst score = [];\n\tlet pattern = options.start ? \"^\" : \"\";\n\tconst keys = [];\n\tfor (const segment of segments) {\n\t\tconst segmentScores = segment.length ? [] : [PathScore.Root];\n\t\tif (options.strict && !segment.length) pattern += \"/\";\n\t\tfor (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n\t\t\tconst token = segment[tokenIndex];\n\t\t\tlet subSegmentScore = PathScore.Segment + (options.sensitive ? PathScore.BonusCaseSensitive : 0);\n\t\t\tif (token.type === TokenType.Static) {\n\t\t\t\tif (!tokenIndex) pattern += \"/\";\n\t\t\t\tpattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n\t\t\t\tsubSegmentScore += PathScore.Static;\n\t\t\t} else if (token.type === TokenType.Param) {\n\t\t\t\tconst { value, repeatable, optional, regexp } = token;\n\t\t\t\tkeys.push({\n\t\t\t\t\tname: value,\n\t\t\t\t\trepeatable,\n\t\t\t\t\toptional\n\t\t\t\t});\n\t\t\t\tconst re = regexp ? regexp : BASE_PARAM_PATTERN;\n\t\t\t\tif (re !== BASE_PARAM_PATTERN) {\n\t\t\t\t\tsubSegmentScore += PathScore.BonusCustomRegExp;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnew RegExp(`(${re})`);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\tthrow new Error(`Invalid custom RegExp for param \"${value}\" (${re}): ` + err.message);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlet subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;\n\t\t\t\tif (!tokenIndex) subPattern = optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n\t\t\t\tif (optional) subPattern += \"?\";\n\t\t\t\tpattern += subPattern;\n\t\t\t\tsubSegmentScore += PathScore.Dynamic;\n\t\t\t\tif (optional) subSegmentScore += PathScore.BonusOptional;\n\t\t\t\tif (repeatable) subSegmentScore += PathScore.BonusRepeatable;\n\t\t\t\tif (re === \".*\") subSegmentScore += PathScore.BonusWildcard;\n\t\t\t}\n\t\t\tsegmentScores.push(subSegmentScore);\n\t\t}\n\t\tscore.push(segmentScores);\n\t}\n\tif (options.strict && options.end) {\n\t\tconst i = score.length - 1;\n\t\tscore[i][score[i].length - 1] += PathScore.BonusStrict;\n\t}\n\tif (!options.strict) pattern += \"/?\";\n\tif (options.end) pattern += \"$\";\n\telse if (options.strict && !pattern.endsWith(\"/\")) pattern += \"(?:/|$)\";\n\tconst re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n\tfunction parse(path) {\n\t\tconst match = path.match(re);\n\t\tconst params = {};\n\t\tif (!match) return null;\n\t\tfor (let i = 1; i < match.length; i++) {\n\t\t\tconst value = match[i] || \"\";\n\t\t\tconst key = keys[i - 1];\n\t\t\tparams[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n\t\t}\n\t\treturn params;\n\t}\n\tfunction stringify(params) {\n\t\tlet path = \"\";\n\t\tlet avoidDuplicatedSlash = false;\n\t\tfor (const segment of segments) {\n\t\t\tif (!avoidDuplicatedSlash || !path.endsWith(\"/\")) path += \"/\";\n\t\t\tavoidDuplicatedSlash = false;\n\t\t\tfor (const token of segment) if (token.type === TokenType.Static) path += token.value;\n\t\t\telse if (token.type === TokenType.Param) {\n\t\t\t\tconst { value, repeatable, optional } = token;\n\t\t\t\tconst param = value in params ? params[value] : \"\";\n\t\t\t\tif (isArray(param) && !repeatable) throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n\t\t\t\tconst text = isArray(param) ? param.join(\"/\") : param;\n\t\t\t\tif (!text) if (optional) {\n\t\t\t\t\tif (segment.length < 2) if (path.endsWith(\"/\")) path = path.slice(0, -1);\n\t\t\t\t\telse avoidDuplicatedSlash = true;\n\t\t\t\t} else throw new Error(`Missing required param \"${value}\"`);\n\t\t\t\tpath += text;\n\t\t\t}\n\t\t}\n\t\treturn path || \"/\";\n\t}\n\treturn {\n\t\tre,\n\t\tscore,\n\t\tkeys,\n\t\tparse,\n\t\tstringify\n\t};\n}\n/**\n* Compares an array of numbers as used in PathParser.score and returns a\n* number. This function can be used to `sort` an array\n*\n* @param a - first array of numbers\n* @param b - second array of numbers\n* @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n* should be sorted first\n*/\nfunction compareScoreArray(a, b) {\n\tlet i = 0;\n\twhile (i < a.length && i < b.length) {\n\t\tconst diff = b[i] - a[i];\n\t\tif (diff) return diff;\n\t\ti++;\n\t}\n\tif (a.length < b.length) return a.length === 1 && a[0] === PathScore.Static + PathScore.Segment ? -1 : 1;\n\telse if (a.length > b.length) return b.length === 1 && b[0] === PathScore.Static + PathScore.Segment ? 1 : -1;\n\treturn 0;\n}\n/**\n* Compare function that can be used with `sort` to sort an array of PathParser\n*\n* @param a - first PathParser\n* @param b - second PathParser\n* @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n*/\nfunction comparePathParserScore(a, b) {\n\tlet i = 0;\n\tconst aScore = a.score;\n\tconst bScore = b.score;\n\twhile (i < aScore.length && i < bScore.length) {\n\t\tconst comp = compareScoreArray(aScore[i], bScore[i]);\n\t\tif (comp) return comp;\n\t\ti++;\n\t}\n\tif (Math.abs(bScore.length - aScore.length) === 1) {\n\t\tif (isLastScoreNegative(aScore)) return 1;\n\t\tif (isLastScoreNegative(bScore)) return -1;\n\t}\n\treturn bScore.length - aScore.length;\n}\n/**\n* This allows detecting splats at the end of a path: /home/:id(.*)*\n*\n* @param score - score to check\n* @returns true if the last entry is negative\n*/\nfunction isLastScoreNegative(score) {\n\tconst last = score[score.length - 1];\n\treturn score.length > 0 && last[last.length - 1] < 0;\n}\nconst PATH_PARSER_OPTIONS_DEFAULTS = {\n\tstrict: false,\n\tend: true,\n\tsensitive: false\n};\n\n//#endregion\n//#region src/matcher/pathMatcher.ts\nfunction createRouteRecordMatcher(record, parent, options) {\n\tconst parser = tokensToParser(tokenizePath(record.path), options);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst existingKeys = /* @__PURE__ */ new Set();\n\t\tfor (const key of parser.keys) {\n\t\t\tif (existingKeys.has(key.name)) warn$1(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n\t\t\texistingKeys.add(key.name);\n\t\t}\n\t}\n\tconst matcher = assign(parser, {\n\t\trecord,\n\t\tparent,\n\t\tchildren: [],\n\t\talias: []\n\t});\n\tif (parent) {\n\t\tif (!matcher.record.aliasOf === !parent.record.aliasOf) parent.children.push(matcher);\n\t}\n\treturn matcher;\n}\n\n//#endregion\n//#region src/matcher/index.ts\n/**\n* Creates a Router Matcher.\n*\n* @internal\n* @param routes - array of initial routes\n* @param globalOptions - global route options\n*/\nfunction createRouterMatcher(routes, globalOptions) {\n\tconst matchers = [];\n\tconst matcherMap = /* @__PURE__ */ new Map();\n\tglobalOptions = mergeOptions(PATH_PARSER_OPTIONS_DEFAULTS, globalOptions);\n\tfunction getRecordMatcher(name) {\n\t\treturn matcherMap.get(name);\n\t}\n\tfunction addRoute(record, parent, originalRecord) {\n\t\tconst isRootAdd = !originalRecord;\n\t\tconst mainNormalizedRecord = normalizeRouteRecord(record);\n\t\tif (process.env.NODE_ENV !== \"production\") checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n\t\tmainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n\t\tconst options = mergeOptions(globalOptions, record);\n\t\tconst normalizedRecords = [mainNormalizedRecord];\n\t\tif (\"alias\" in record) {\n\t\t\tconst aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n\t\t\tfor (const alias of aliases) normalizedRecords.push(normalizeRouteRecord(assign({}, mainNormalizedRecord, {\n\t\t\t\tcomponents: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n\t\t\t\tpath: alias,\n\t\t\t\taliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n\t\t\t})));\n\t\t}\n\t\tlet matcher;\n\t\tlet originalMatcher;\n\t\tfor (const normalizedRecord of normalizedRecords) {\n\t\t\tconst { path } = normalizedRecord;\n\t\t\tif (parent && path[0] !== \"/\") {\n\t\t\t\tconst parentPath = parent.record.path;\n\t\t\t\tconst connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n\t\t\t\tnormalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") throw new Error(\"Catch all routes (\\\"*\\\") must now be defined using a param with a custom regexp.\\nSee more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.\");\n\t\t\tmatcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n\t\t\tif (process.env.NODE_ENV !== \"production\" && parent && path[0] === \"/\") checkMissingParamsInAbsolutePath(matcher, parent);\n\t\t\tif (originalRecord) {\n\t\t\t\toriginalRecord.alias.push(matcher);\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") checkSameParams(originalRecord, matcher);\n\t\t\t} else {\n\t\t\t\toriginalMatcher = originalMatcher || matcher;\n\t\t\t\tif (originalMatcher !== matcher) originalMatcher.alias.push(matcher);\n\t\t\t\tif (isRootAdd && record.name && !isAliasRecord(matcher)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") checkSameNameAsAncestor(record, parent);\n\t\t\t\t\tremoveRoute(record.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isMatchable(matcher)) insertMatcher(matcher);\n\t\t\tif (mainNormalizedRecord.children) {\n\t\t\t\tconst children = mainNormalizedRecord.children;\n\t\t\t\tfor (let i = 0; i < children.length; i++) addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n\t\t\t}\n\t\t\toriginalRecord = originalRecord || matcher;\n\t\t}\n\t\treturn originalMatcher ? () => {\n\t\t\tremoveRoute(originalMatcher);\n\t\t} : noop;\n\t}\n\tfunction removeRoute(matcherRef) {\n\t\tif (isRouteName(matcherRef)) {\n\t\t\tconst matcher = matcherMap.get(matcherRef);\n\t\t\tif (matcher) {\n\t\t\t\tmatcherMap.delete(matcherRef);\n\t\t\t\tmatchers.splice(matchers.indexOf(matcher), 1);\n\t\t\t\tmatcher.children.forEach(removeRoute);\n\t\t\t\tmatcher.alias.forEach(removeRoute);\n\t\t\t}\n\t\t} else {\n\t\t\tconst index = matchers.indexOf(matcherRef);\n\t\t\tif (index > -1) {\n\t\t\t\tmatchers.splice(index, 1);\n\t\t\t\tif (matcherRef.record.name) matcherMap.delete(matcherRef.record.name);\n\t\t\t\tmatcherRef.children.forEach(removeRoute);\n\t\t\t\tmatcherRef.alias.forEach(removeRoute);\n\t\t\t}\n\t\t}\n\t}\n\tfunction getRoutes() {\n\t\treturn matchers;\n\t}\n\tfunction insertMatcher(matcher) {\n\t\tconst index = findInsertionIndex(matcher, matchers);\n\t\tmatchers.splice(index, 0, matcher);\n\t\tif (matcher.record.name && !isAliasRecord(matcher)) matcherMap.set(matcher.record.name, matcher);\n\t}\n\tfunction resolve(location, currentLocation) {\n\t\tlet matcher;\n\t\tlet params = {};\n\t\tlet path;\n\t\tlet name;\n\t\tif (\"name\" in location && location.name) {\n\t\t\tmatcher = matcherMap.get(location.name);\n\t\t\tif (!matcher) throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND, { location });\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tconst invalidParams = Object.keys(location.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n\t\t\t\tif (invalidParams.length) warn$1(`Discarded invalid param(s) \"${invalidParams.join(\"\\\", \\\"\")}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n\t\t\t}\n\t\t\tname = matcher.record.name;\n\t\t\tparams = assign(pickParams(currentLocation.params, matcher.keys.filter((k) => !k.optional).concat(matcher.parent ? matcher.parent.keys.filter((k) => k.optional) : []).map((k) => k.name)), location.params && pickParams(location.params, matcher.keys.map((k) => k.name)));\n\t\t\tpath = matcher.stringify(params);\n\t\t} else if (location.path != null) {\n\t\t\tpath = location.path;\n\t\t\tif (process.env.NODE_ENV !== \"production\" && !path.startsWith(\"/\")) warn$1(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n\t\t\tmatcher = matchers.find((m) => m.re.test(path));\n\t\t\tif (matcher) {\n\t\t\t\tparams = matcher.parse(path);\n\t\t\t\tname = matcher.record.name;\n\t\t\t}\n\t\t} else {\n\t\t\tmatcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m) => m.re.test(currentLocation.path));\n\t\t\tif (!matcher) throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND, {\n\t\t\t\tlocation,\n\t\t\t\tcurrentLocation\n\t\t\t});\n\t\t\tname = matcher.record.name;\n\t\t\tparams = assign({}, currentLocation.params, location.params);\n\t\t\tpath = matcher.stringify(params);\n\t\t}\n\t\tconst matched = [];\n\t\tlet parentMatcher = matcher;\n\t\twhile (parentMatcher) {\n\t\t\tmatched.unshift(parentMatcher.record);\n\t\t\tparentMatcher = parentMatcher.parent;\n\t\t}\n\t\treturn {\n\t\t\tname,\n\t\t\tpath,\n\t\t\tparams,\n\t\t\tmatched,\n\t\t\tmeta: mergeMetaFields(matched)\n\t\t};\n\t}\n\troutes.forEach((route) => addRoute(route));\n\tfunction clearRoutes() {\n\t\tmatchers.length = 0;\n\t\tmatcherMap.clear();\n\t}\n\treturn {\n\t\taddRoute,\n\t\tresolve,\n\t\tremoveRoute,\n\t\tclearRoutes,\n\t\tgetRoutes,\n\t\tgetRecordMatcher\n\t};\n}\n/**\n* Picks an object param to contain only specified keys.\n*\n* @param params - params object to pick from\n* @param keys - keys to pick\n*/\nfunction pickParams(params, keys) {\n\tconst newParams = {};\n\tfor (const key of keys) if (key in params) newParams[key] = params[key];\n\treturn newParams;\n}\n/**\n* Normalizes a RouteRecordRaw. Creates a copy\n*\n* @param record\n* @returns the normalized version\n*/\nfunction normalizeRouteRecord(record) {\n\tconst normalized = {\n\t\tpath: record.path,\n\t\tredirect: record.redirect,\n\t\tname: record.name,\n\t\tmeta: record.meta || {},\n\t\taliasOf: record.aliasOf,\n\t\tbeforeEnter: record.beforeEnter,\n\t\tprops: normalizeRecordProps(record),\n\t\tchildren: record.children || [],\n\t\tinstances: {},\n\t\tleaveGuards: /* @__PURE__ */ new Set(),\n\t\tupdateGuards: /* @__PURE__ */ new Set(),\n\t\tenterCallbacks: {},\n\t\tcomponents: \"components\" in record ? record.components || null : record.component && { default: record.component }\n\t};\n\tObject.defineProperty(normalized, \"mods\", { value: {} });\n\treturn normalized;\n}\n/**\n* Normalize the optional `props` in a record to always be an object similar to\n* components. Also accept a boolean for components.\n* @param record\n*/\nfunction normalizeRecordProps(record) {\n\tconst propsObject = {};\n\tconst props = record.props || false;\n\tif (\"component\" in record) propsObject.default = props;\n\telse for (const name in record.components) propsObject[name] = typeof props === \"object\" ? props[name] : props;\n\treturn propsObject;\n}\n/**\n* Checks if a record or any of its parent is an alias\n* @param record\n*/\nfunction isAliasRecord(record) {\n\twhile (record) {\n\t\tif (record.record.aliasOf) return true;\n\t\trecord = record.parent;\n\t}\n\treturn false;\n}\n/**\n* Merge meta fields of an array of records\n*\n* @param matched - array of matched records\n*/\nfunction mergeMetaFields(matched) {\n\treturn matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction isSameParam(a, b) {\n\treturn a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\n/**\n* Check if a path and its alias have the same required params\n*\n* @param a - original record\n* @param b - alias record\n*/\nfunction checkSameParams(a, b) {\n\tfor (const key of a.keys) if (!key.optional && !b.keys.find(isSameParam.bind(null, key))) return warn$1(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n\tfor (const key of b.keys) if (!key.optional && !a.keys.find(isSameParam.bind(null, key))) return warn$1(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n}\n/**\n* A route with a name and a child with an empty path without a name should warn when adding the route\n*\n* @param mainNormalizedRecord - RouteRecordNormalized\n* @param parent - RouteRecordMatcher\n*/\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n\tif (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path && mainNormalizedRecord.children.length === 0) warn$1(`The route named \"${String(parent.record.name)}\" has a child without a name, an empty path, and no children. This is probably a mistake: using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to silence the warning.`);\n}\nfunction checkSameNameAsAncestor(record, parent) {\n\tfor (let ancestor = parent; ancestor; ancestor = ancestor.parent) if (ancestor.record.name === record.name) throw new Error(`A route named \"${String(record.name)}\" has been added as a ${parent === ancestor ? \"child\" : \"descendant\"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`);\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n\tfor (const key of parent.keys) if (!record.keys.find(isSameParam.bind(null, key))) return warn$1(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n}\n/**\n* Performs a binary search to find the correct insertion index for a new matcher.\n*\n* Matchers are primarily sorted by their score. If scores are tied then we also consider parent/child relationships,\n* with descendants coming before ancestors. If there's still a tie, new routes are inserted after existing routes.\n*\n* @param matcher - new matcher to be inserted\n* @param matchers - existing matchers\n*/\nfunction findInsertionIndex(matcher, matchers) {\n\tlet lower = 0;\n\tlet upper = matchers.length;\n\twhile (lower !== upper) {\n\t\tconst mid = lower + upper >> 1;\n\t\tif (comparePathParserScore(matcher, matchers[mid]) < 0) upper = mid;\n\t\telse lower = mid + 1;\n\t}\n\tconst insertionAncestor = getInsertionAncestor(matcher);\n\tif (insertionAncestor) {\n\t\tupper = matchers.lastIndexOf(insertionAncestor, upper - 1);\n\t\tif (process.env.NODE_ENV !== \"production\" && upper < 0) warn$1(`Finding ancestor route \"${insertionAncestor.record.path}\" failed for \"${matcher.record.path}\"`);\n\t}\n\treturn upper;\n}\nfunction getInsertionAncestor(matcher) {\n\tlet ancestor = matcher;\n\twhile (ancestor = ancestor.parent) if (isMatchable(ancestor) && comparePathParserScore(matcher, ancestor) === 0) return ancestor;\n}\n/**\n* Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without\n* a component, or name, or redirect, are just used to group other routes.\n* @param matcher\n* @param matcher.record record of the matcher\n* @returns\n*/\nfunction isMatchable({ record }) {\n\treturn !!(record.name || record.components && Object.keys(record.components).length || record.redirect);\n}\n\n//#endregion\n//#region src/RouterLink.ts\n/**\n* Returns the internal behavior of a {@link RouterLink} without the rendering part.\n*\n* @param props - a `to` location and an optional `replace` flag\n*/\nfunction useLink(props) {\n\tconst router = inject(routerKey);\n\tconst currentRoute = inject(routeLocationKey);\n\tlet hasPrevious = false;\n\tlet previousTo = null;\n\tconst route = computed(() => {\n\t\tconst to = unref(props.to);\n\t\tif (process.env.NODE_ENV !== \"production\" && (!hasPrevious || to !== previousTo)) {\n\t\t\tif (!isRouteLocation(to)) if (hasPrevious) warn$1(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- previous to:`, previousTo, `\\n- props:`, props);\n\t\t\telse warn$1(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- props:`, props);\n\t\t\tpreviousTo = to;\n\t\t\thasPrevious = true;\n\t\t}\n\t\treturn router.resolve(to);\n\t});\n\tconst activeRecordIndex = computed(() => {\n\t\tconst { matched } = route.value;\n\t\tconst { length } = matched;\n\t\tconst routeMatched = matched[length - 1];\n\t\tconst currentMatched = currentRoute.matched;\n\t\tif (!routeMatched || !currentMatched.length) return -1;\n\t\tconst index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n\t\tif (index > -1) return index;\n\t\tconst parentRecordPath = getOriginalPath(matched[length - 2]);\n\t\treturn length > 1 && getOriginalPath(routeMatched) === parentRecordPath && currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index;\n\t});\n\tconst isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n\tconst isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n\tfunction navigate(e = {}) {\n\t\tif (guardEvent(e)) {\n\t\t\tconst p = router[unref(props.replace) ? \"replace\" : \"push\"](unref(props.to)).catch(noop);\n\t\t\tif (props.viewTransition && typeof document !== \"undefined\" && \"startViewTransition\" in document) document.startViewTransition(() => p);\n\t\t\treturn p;\n\t\t}\n\t\treturn Promise.resolve();\n\t}\n\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n\t\tconst instance = getCurrentInstance();\n\t\tif (instance) {\n\t\t\tconst linkContextDevtools = {\n\t\t\t\troute: route.value,\n\t\t\t\tisActive: isActive.value,\n\t\t\t\tisExactActive: isExactActive.value,\n\t\t\t\terror: null\n\t\t\t};\n\t\t\tinstance.__vrl_devtools = instance.__vrl_devtools || [];\n\t\t\tinstance.__vrl_devtools.push(linkContextDevtools);\n\t\t\twatchEffect(() => {\n\t\t\t\tlinkContextDevtools.route = route.value;\n\t\t\t\tlinkContextDevtools.isActive = isActive.value;\n\t\t\t\tlinkContextDevtools.isExactActive = isExactActive.value;\n\t\t\t\tlinkContextDevtools.error = isRouteLocation(unref(props.to)) ? null : \"Invalid \\\"to\\\" value\";\n\t\t\t}, { flush: \"post\" });\n\t\t}\n\t}\n\t/**\n\t* NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this\n\t*/\n\treturn {\n\t\troute,\n\t\thref: computed(() => route.value.href),\n\t\tisActive,\n\t\tisExactActive,\n\t\tnavigate\n\t};\n}\nfunction preferSingleVNode(vnodes) {\n\treturn vnodes.length === 1 ? vnodes[0] : vnodes;\n}\nconst RouterLinkImpl = /* @__PURE__ */ defineComponent({\n\tname: \"RouterLink\",\n\tcompatConfig: { MODE: 3 },\n\tprops: {\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\trequired: true\n\t\t},\n\t\treplace: Boolean,\n\t\tactiveClass: String,\n\t\texactActiveClass: String,\n\t\tcustom: Boolean,\n\t\tariaCurrentValue: {\n\t\t\ttype: String,\n\t\t\tdefault: \"page\"\n\t\t},\n\t\tviewTransition: Boolean\n\t},\n\tuseLink,\n\tsetup(props, { slots }) {\n\t\tconst link = reactive(useLink(props));\n\t\tconst { options } = inject(routerKey);\n\t\tconst elClass = computed(() => ({\n\t\t\t[getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n\t\t\t[getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n\t\t}));\n\t\treturn () => {\n\t\t\tconst children = slots.default && preferSingleVNode(slots.default(link));\n\t\t\treturn props.custom ? children : h(\"a\", {\n\t\t\t\t\"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n\t\t\t\thref: link.href,\n\t\t\t\tonClick: link.navigate,\n\t\t\t\tclass: elClass.value\n\t\t\t}, children);\n\t\t};\n\t}\n});\n/**\n* Component to render a link that triggers a navigation on click.\n*/\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n\tif (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return;\n\tif (e.defaultPrevented) return;\n\tif (e.button !== void 0 && e.button !== 0) return;\n\tif (e.currentTarget && e.currentTarget.getAttribute) {\n\t\tconst target = e.currentTarget.getAttribute(\"target\");\n\t\tif (/\\b_blank\\b/i.test(target)) return;\n\t}\n\tif (e.preventDefault) e.preventDefault();\n\treturn true;\n}\nfunction includesParams(outer, inner) {\n\tfor (const key in inner) {\n\t\tconst innerValue = inner[key];\n\t\tconst outerValue = outer[key];\n\t\tif (typeof innerValue === \"string\") {\n\t\t\tif (innerValue !== outerValue) return false;\n\t\t} else if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value.valueOf() !== outerValue[i].valueOf())) return false;\n\t}\n\treturn true;\n}\n/**\n* Get the original path value of a record by following its aliasOf\n* @param record\n*/\nfunction getOriginalPath(record) {\n\treturn record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\n/**\n* Utility class to get the active class based on defaults.\n* @param propClass\n* @param globalClass\n* @param defaultClass\n*/\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\n\n//#endregion\n//#region src/RouterView.ts\nconst RouterViewImpl = /* @__PURE__ */ defineComponent({\n\tname: \"RouterView\",\n\tinheritAttrs: false,\n\tprops: {\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: \"default\"\n\t\t},\n\t\troute: Object\n\t},\n\tcompatConfig: { MODE: 3 },\n\tsetup(props, { attrs, slots }) {\n\t\tprocess.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n\t\tconst injectedRoute = inject(routerViewLocationKey);\n\t\tconst routeToDisplay = computed(() => props.route || injectedRoute.value);\n\t\tconst injectedDepth = inject(viewDepthKey, 0);\n\t\tconst depth = computed(() => {\n\t\t\tlet initialDepth = unref(injectedDepth);\n\t\t\tconst { matched } = routeToDisplay.value;\n\t\t\tlet matchedRoute;\n\t\t\twhile ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) initialDepth++;\n\t\t\treturn initialDepth;\n\t\t});\n\t\tconst matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n\t\tprovide(viewDepthKey, computed(() => depth.value + 1));\n\t\tprovide(matchedRouteKey, matchedRouteRef);\n\t\tprovide(routerViewLocationKey, routeToDisplay);\n\t\tconst viewRef = ref();\n\t\twatch(() => [\n\t\t\tviewRef.value,\n\t\t\tmatchedRouteRef.value,\n\t\t\tprops.name\n\t\t], ([instance, to, name], [oldInstance, from, _oldName]) => {\n\t\t\tif (to) {\n\t\t\t\tto.instances[name] = instance;\n\t\t\t\tif (from && from !== to && instance && instance === oldInstance) {\n\t\t\t\t\tif (!to.leaveGuards.size) to.leaveGuards = from.leaveGuards;\n\t\t\t\t\tif (!to.updateGuards.size) to.updateGuards = from.updateGuards;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (instance && to && (!from || !isSameRouteRecord(to, from) || !oldInstance)) (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n\t\t}, { flush: \"post\" });\n\t\treturn () => {\n\t\t\tconst route = routeToDisplay.value;\n\t\t\tconst currentName = props.name;\n\t\t\tconst matchedRoute = matchedRouteRef.value;\n\t\t\tconst ViewComponent = matchedRoute && matchedRoute.components[currentName];\n\t\t\tif (!ViewComponent) return normalizeSlot(slots.default, {\n\t\t\t\tComponent: ViewComponent,\n\t\t\t\troute\n\t\t\t});\n\t\t\tconst routePropsOption = matchedRoute.props[currentName];\n\t\t\tconst routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n\t\t\tconst onVnodeUnmounted = (vnode) => {\n\t\t\t\tif (vnode.component.isUnmounted) matchedRoute.instances[currentName] = null;\n\t\t\t};\n\t\t\tconst component = h(ViewComponent, assign({}, routeProps, attrs, {\n\t\t\t\tonVnodeUnmounted,\n\t\t\t\tref: viewRef\n\t\t\t}));\n\t\t\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser && component.ref) {\n\t\t\t\tconst info = {\n\t\t\t\t\tdepth: depth.value,\n\t\t\t\t\tname: matchedRoute.name,\n\t\t\t\t\tpath: matchedRoute.path,\n\t\t\t\t\tmeta: matchedRoute.meta\n\t\t\t\t};\n\t\t\t\t(isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i]).forEach((instance) => {\n\t\t\t\t\tinstance.__vrv_devtools = info;\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn normalizeSlot(slots.default, {\n\t\t\t\tComponent: component,\n\t\t\t\troute\n\t\t\t}) || component;\n\t\t};\n\t}\n});\nfunction normalizeSlot(slot, data) {\n\tif (!slot) return null;\n\tconst slotContent = slot(data);\n\treturn slotContent.length === 1 ? slotContent[0] : slotContent;\n}\n/**\n* Component to display the current route the user is at.\n*/\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n\tconst instance = getCurrentInstance();\n\tconst parentName = instance.parent && instance.parent.type.name;\n\tconst parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n\tif (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\")) && typeof parentSubTreeType === \"object\" && parentSubTreeType.name === \"RouterView\") {\n\t\tconst comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n\t\twarn$1(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.\nUse slot props instead:\n\n<router-view v-slot=\"{ Component }\">\n <${comp}>\\n <component :is=\"Component\" />\\n </${comp}>\\n</router-view>`);\n\t}\n}\n\n//#endregion\n//#region src/router.ts\n/**\n* Creates a Router instance that can be used by a Vue app.\n*\n* @param options - {@link RouterOptions}\n*/\nfunction createRouter(options) {\n\tconst matcher = createRouterMatcher(options.routes, options);\n\tconst parseQuery$1 = options.parseQuery || parseQuery;\n\tconst stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n\tconst routerHistory = options.history;\n\tif (process.env.NODE_ENV !== \"production\" && !routerHistory) throw new Error(\"Provide the \\\"history\\\" option when calling \\\"createRouter()\\\": https://router.vuejs.org/api/interfaces/RouterOptions.html#history\");\n\tconst beforeGuards = useCallbacks();\n\tconst beforeResolveGuards = useCallbacks();\n\tconst afterGuards = useCallbacks();\n\tconst currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n\tlet pendingLocation = START_LOCATION_NORMALIZED;\n\tif (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) history.scrollRestoration = \"manual\";\n\tconst normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n\tconst encodeParams = applyToParams.bind(null, encodeParam);\n\tconst decodeParams = applyToParams.bind(null, decode);\n\tfunction addRoute(parentOrRoute, route) {\n\t\tlet parent;\n\t\tlet record;\n\t\tif (isRouteName(parentOrRoute)) {\n\t\t\tparent = matcher.getRecordMatcher(parentOrRoute);\n\t\t\tif (process.env.NODE_ENV !== \"production\" && !parent) warn$1(`Parent route \"${String(parentOrRoute)}\" not found when adding child route`, route);\n\t\t\trecord = route;\n\t\t} else record = parentOrRoute;\n\t\treturn matcher.addRoute(record, parent);\n\t}\n\tfunction removeRoute(name) {\n\t\tconst recordMatcher = matcher.getRecordMatcher(name);\n\t\tif (recordMatcher) matcher.removeRoute(recordMatcher);\n\t\telse if (process.env.NODE_ENV !== \"production\") warn$1(`Cannot remove non-existent route \"${String(name)}\"`);\n\t}\n\tfunction getRoutes() {\n\t\treturn matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n\t}\n\tfunction hasRoute(name) {\n\t\treturn !!matcher.getRecordMatcher(name);\n\t}\n\tfunction resolve(rawLocation, currentLocation) {\n\t\tcurrentLocation = assign({}, currentLocation || currentRoute.value);\n\t\tif (typeof rawLocation === \"string\") {\n\t\t\tconst locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n\t\t\tconst matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n\t\t\tconst href = routerHistory.createHref(locationNormalized.fullPath);\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (href.startsWith(\"//\")) warn$1(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n\t\t\t\telse if (!matchedRoute.matched.length) warn$1(`No match found for location with path \"${rawLocation}\"`);\n\t\t\t}\n\t\t\treturn assign(locationNormalized, matchedRoute, {\n\t\t\t\tparams: decodeParams(matchedRoute.params),\n\t\t\t\tredirectedFrom: void 0,\n\t\t\t\thref\n\t\t\t});\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\" && !isRouteLocation(rawLocation)) {\n\t\t\twarn$1(`router.resolve() was passed an invalid location. This will fail in production.\\n- Location:`, rawLocation);\n\t\t\treturn resolve({});\n\t\t}\n\t\tlet matcherLocation;\n\t\tif (rawLocation.path != null) {\n\t\t\tif (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && Object.keys(rawLocation.params).length) warn$1(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n\t\t\tmatcherLocation = assign({}, rawLocation, { path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path });\n\t\t} else {\n\t\t\tconst targetParams = assign({}, rawLocation.params);\n\t\t\tfor (const key in targetParams) if (targetParams[key] == null) delete targetParams[key];\n\t\t\tmatcherLocation = assign({}, rawLocation, { params: encodeParams(targetParams) });\n\t\t\tcurrentLocation.params = encodeParams(currentLocation.params);\n\t\t}\n\t\tconst matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n\t\tconst hash = rawLocation.hash || \"\";\n\t\tif (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) warn$1(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n\t\tmatchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n\t\tconst fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n\t\t\thash: encodeHash(hash),\n\t\t\tpath: matchedRoute.path\n\t\t}));\n\t\tconst href = routerHistory.createHref(fullPath);\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (href.startsWith(\"//\")) warn$1(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n\t\t\telse if (!matchedRoute.matched.length) warn$1(`No match found for location with path \"${rawLocation.path != null ? rawLocation.path : rawLocation}\"`);\n\t\t}\n\t\treturn assign({\n\t\t\tfullPath,\n\t\t\thash,\n\t\t\tquery: stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n\t\t}, matchedRoute, {\n\t\t\tredirectedFrom: void 0,\n\t\t\thref\n\t\t});\n\t}\n\tfunction locationAsObject(to) {\n\t\treturn typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n\t}\n\tfunction checkCanceledNavigation(to, from) {\n\t\tif (pendingLocation !== to) return createRouterError(ErrorTypes.NAVIGATION_CANCELLED, {\n\t\t\tfrom,\n\t\t\tto\n\t\t});\n\t}\n\tfunction push(to) {\n\t\treturn pushWithRedirect(to);\n\t}\n\tfunction replace(to) {\n\t\treturn push(assign(locationAsObject(to), { replace: true }));\n\t}\n\tfunction handleRedirectRecord(to, from) {\n\t\tconst lastMatched = to.matched[to.matched.length - 1];\n\t\tif (lastMatched && lastMatched.redirect) {\n\t\t\tconst { redirect } = lastMatched;\n\t\t\tlet newTargetLocation = typeof redirect === \"function\" ? redirect(to, from) : redirect;\n\t\t\tif (typeof newTargetLocation === \"string\") {\n\t\t\t\tnewTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : { path: newTargetLocation };\n\t\t\t\tnewTargetLocation.params = {};\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV !== \"production\" && newTargetLocation.path == null && !(\"name\" in newTargetLocation)) {\n\t\t\t\twarn$1(`Invalid redirect found:\\n${JSON.stringify(newTargetLocation, null, 2)}\\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n\t\t\t\tthrow new Error(\"Invalid redirect\");\n\t\t\t}\n\t\t\treturn assign({\n\t\t\t\tquery: to.query,\n\t\t\t\thash: to.hash,\n\t\t\t\tparams: newTargetLocation.path != null ? {} : to.params\n\t\t\t}, newTargetLocation);\n\t\t}\n\t}\n\tfunction pushWithRedirect(to, redirectedFrom) {\n\t\tconst targetLocation = pendingLocation = resolve(to);\n\t\tconst from = currentRoute.value;\n\t\tconst data = to.state;\n\t\tconst force = to.force;\n\t\tconst replace = to.replace === true;\n\t\tconst shouldRedirect = handleRedirectRecord(targetLocation, from);\n\t\tif (shouldRedirect) return pushWithRedirect(assign(locationAsObject(shouldRedirect), {\n\t\t\tstate: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n\t\t\tforce,\n\t\t\treplace\n\t\t}), redirectedFrom || targetLocation);\n\t\tconst toLocation = targetLocation;\n\t\ttoLocation.redirectedFrom = redirectedFrom;\n\t\tlet failure;\n\t\tif (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n\t\t\tfailure = createRouterError(ErrorTypes.NAVIGATION_DUPLICATED, {\n\t\t\t\tto: toLocation,\n\t\t\t\tfrom\n\t\t\t});\n\t\t\thandleScroll(from, from, true, false);\n\t\t}\n\t\treturn (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT) ? error : markAsReady(error) : triggerError(error, toLocation, from)).then((failure) => {\n\t\t\tif (failure) {\n\t\t\t\tif (isNavigationFailure(failure, ErrorTypes.NAVIGATION_GUARD_REDIRECT)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\" && isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) && redirectedFrom && (redirectedFrom._count = redirectedFrom._count ? redirectedFrom._count + 1 : 1) > 30) {\n\t\t\t\t\t\twarn$1(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n\t\t\t\t\t\treturn Promise.reject(/* @__PURE__ */ new Error(\"Infinite redirect in navigation guard\"));\n\t\t\t\t\t}\n\t\t\t\t\treturn pushWithRedirect(assign({ replace }, locationAsObject(failure.to), {\n\t\t\t\t\t\tstate: typeof failure.to === \"object\" ? assign({}, data, failure.to.state) : data,\n\t\t\t\t\t\tforce\n\t\t\t\t\t}), redirectedFrom || toLocation);\n\t\t\t\t}\n\t\t\t} else failure = finalizeNavigation(toLocation, from, true, replace, data);\n\t\t\ttriggerAfterEach(toLocation, from, failure);\n\t\t\treturn failure;\n\t\t});\n\t}\n\t/**\n\t* Helper to reject and skip all navigation guards if a new navigation happened\n\t* @param to\n\t* @param from\n\t*/\n\tfunction checkCanceledNavigationAndReject(to, from) {\n\t\tconst error = checkCanceledNavigation(to, from);\n\t\treturn error ? Promise.reject(error) : Promise.resolve();\n\t}\n\tfunction runWithContext(fn) {\n\t\tconst app = installedApps.values().next().value;\n\t\treturn app && typeof app.runWithContext === \"function\" ? app.runWithContext(fn) : fn();\n\t}\n\tfunction navigate(to, from) {\n\t\tlet guards;\n\t\tconst [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n\t\tguards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n\t\tfor (const record of leavingRecords) record.leaveGuards.forEach((guard) => {\n\t\t\tguards.push(guardToPromiseFn(guard, to, from));\n\t\t});\n\t\tconst canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n\t\tguards.push(canceledNavigationCheck);\n\t\treturn runGuardQueue(guards).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const guard of beforeGuards.list()) guards.push(guardToPromiseFn(guard, to, from));\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n\t\t\tfor (const record of updatingRecords) record.updateGuards.forEach((guard) => {\n\t\t\t\tguards.push(guardToPromiseFn(guard, to, from));\n\t\t\t});\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const record of enteringRecords) if (record.beforeEnter) if (isArray(record.beforeEnter)) for (const beforeEnter of record.beforeEnter) guards.push(guardToPromiseFn(beforeEnter, to, from));\n\t\t\telse guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tto.matched.forEach((record) => record.enterCallbacks = {});\n\t\t\tguards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from, runWithContext);\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const guard of beforeResolveGuards.list()) guards.push(guardToPromiseFn(guard, to, from));\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).catch((err) => isNavigationFailure(err, ErrorTypes.NAVIGATION_CANCELLED) ? err : Promise.reject(err));\n\t}\n\tfunction triggerAfterEach(to, from, failure) {\n\t\tafterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));\n\t}\n\t/**\n\t* - Cleans up any navigation guards\n\t* - Changes the url if necessary\n\t* - Calls the scrollBehavior\n\t*/\n\tfunction finalizeNavigation(toLocation, from, isPush, replace, data) {\n\t\tconst error = checkCanceledNavigation(toLocation, from);\n\t\tif (error) return error;\n\t\tconst isFirstNavigation = from === START_LOCATION_NORMALIZED;\n\t\tconst state = !isBrowser ? {} : history.state;\n\t\tif (isPush) if (replace || isFirstNavigation) routerHistory.replace(toLocation.fullPath, assign({ scroll: isFirstNavigation && state && state.scroll }, data));\n\t\telse routerHistory.push(toLocation.fullPath, data);\n\t\tcurrentRoute.value = toLocation;\n\t\thandleScroll(toLocation, from, isPush, isFirstNavigation);\n\t\tmarkAsReady();\n\t}\n\tlet removeHistoryListener;\n\tfunction setupListeners() {\n\t\tif (removeHistoryListener) return;\n\t\tremoveHistoryListener = routerHistory.listen((to, _from, info) => {\n\t\t\tif (!router.listening) return;\n\t\t\tconst toLocation = resolve(to);\n\t\t\tconst shouldRedirect = handleRedirectRecord(toLocation, router.currentRoute.value);\n\t\t\tif (shouldRedirect) {\n\t\t\t\tpushWithRedirect(assign(shouldRedirect, {\n\t\t\t\t\treplace: true,\n\t\t\t\t\tforce: true\n\t\t\t\t}), toLocation).catch(noop);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tpendingLocation = toLocation;\n\t\t\tconst from = currentRoute.value;\n\t\t\tif (isBrowser) saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n\t\t\tnavigate(toLocation, from).catch((error) => {\n\t\t\t\tif (isNavigationFailure(error, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_CANCELLED)) return error;\n\t\t\t\tif (isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT)) {\n\t\t\t\t\tpushWithRedirect(assign(locationAsObject(error.to), { force: true }), toLocation).then((failure) => {\n\t\t\t\t\t\tif (isNavigationFailure(failure, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_DUPLICATED) && !info.delta && info.type === NavigationType.pop) routerHistory.go(-1, false);\n\t\t\t\t\t}).catch(noop);\n\t\t\t\t\treturn Promise.reject();\n\t\t\t\t}\n\t\t\t\tif (info.delta) routerHistory.go(-info.delta, false);\n\t\t\t\treturn triggerError(error, toLocation, from);\n\t\t\t}).then((failure) => {\n\t\t\t\tfailure = failure || finalizeNavigation(toLocation, from, false);\n\t\t\t\tif (failure) {\n\t\t\t\t\tif (info.delta && !isNavigationFailure(failure, ErrorTypes.NAVIGATION_CANCELLED)) routerHistory.go(-info.delta, false);\n\t\t\t\t\telse if (info.type === NavigationType.pop && isNavigationFailure(failure, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_DUPLICATED)) routerHistory.go(-1, false);\n\t\t\t\t}\n\t\t\t\ttriggerAfterEach(toLocation, from, failure);\n\t\t\t}).catch(noop);\n\t\t});\n\t}\n\tlet readyHandlers = useCallbacks();\n\tlet errorListeners = useCallbacks();\n\tlet ready;\n\t/**\n\t* Trigger errorListeners added via onError and throws the error as well\n\t*\n\t* @param error - error to throw\n\t* @param to - location we were navigating to when the error happened\n\t* @param from - location we were navigating from when the error happened\n\t* @returns the error as a rejected promise\n\t*/\n\tfunction triggerError(error, to, from) {\n\t\tmarkAsReady(error);\n\t\tconst list = errorListeners.list();\n\t\tif (list.length) list.forEach((handler) => handler(error, to, from));\n\t\telse {\n\t\t\tif (process.env.NODE_ENV !== \"production\") warn$1(\"uncaught error during route navigation:\");\n\t\t\tconsole.error(error);\n\t\t}\n\t\treturn Promise.reject(error);\n\t}\n\tfunction isReady() {\n\t\tif (ready && currentRoute.value !== START_LOCATION_NORMALIZED) return Promise.resolve();\n\t\treturn new Promise((resolve, reject) => {\n\t\t\treadyHandlers.add([resolve, reject]);\n\t\t});\n\t}\n\tfunction markAsReady(err) {\n\t\tif (!ready) {\n\t\t\tready = !err;\n\t\t\tsetupListeners();\n\t\t\treadyHandlers.list().forEach(([resolve, reject]) => err ? reject(err) : resolve());\n\t\t\treadyHandlers.reset();\n\t\t}\n\t\treturn err;\n\t}\n\tfunction handleScroll(to, from, isPush, isFirstNavigation) {\n\t\tconst { scrollBehavior } = options;\n\t\tif (!isBrowser || !scrollBehavior) return Promise.resolve();\n\t\tconst scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n\t\treturn nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));\n\t}\n\tconst go = (delta) => routerHistory.go(delta);\n\tlet started;\n\tconst installedApps = /* @__PURE__ */ new Set();\n\tconst router = {\n\t\tcurrentRoute,\n\t\tlistening: true,\n\t\taddRoute,\n\t\tremoveRoute,\n\t\tclearRoutes: matcher.clearRoutes,\n\t\thasRoute,\n\t\tgetRoutes,\n\t\tresolve,\n\t\toptions,\n\t\tpush,\n\t\treplace,\n\t\tgo,\n\t\tback: () => go(-1),\n\t\tforward: () => go(1),\n\t\tbeforeEach: beforeGuards.add,\n\t\tbeforeResolve: beforeResolveGuards.add,\n\t\tafterEach: afterGuards.add,\n\t\tonError: errorListeners.add,\n\t\tisReady,\n\t\tinstall(app) {\n\t\t\tapp.component(\"RouterLink\", RouterLink);\n\t\t\tapp.component(\"RouterView\", RouterView);\n\t\t\tapp.config.globalProperties.$router = router;\n\t\t\tObject.defineProperty(app.config.globalProperties, \"$route\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => unref(currentRoute)\n\t\t\t});\n\t\t\tif (isBrowser && !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n\t\t\t\tstarted = true;\n\t\t\t\tpush(routerHistory.location).catch((err) => {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") warn$1(\"Unexpected error when starting the router:\", err);\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst reactiveRoute = {};\n\t\t\tfor (const key in START_LOCATION_NORMALIZED) Object.defineProperty(reactiveRoute, key, {\n\t\t\t\tget: () => currentRoute.value[key],\n\t\t\t\tenumerable: true\n\t\t\t});\n\t\t\tapp.provide(routerKey, router);\n\t\t\tapp.provide(routeLocationKey, shallowReactive(reactiveRoute));\n\t\t\tapp.provide(routerViewLocationKey, currentRoute);\n\t\t\tconst unmountApp = app.unmount;\n\t\t\tinstalledApps.add(app);\n\t\t\tapp.unmount = function() {\n\t\t\t\tinstalledApps.delete(app);\n\t\t\t\tif (installedApps.size < 1) {\n\t\t\t\t\tpendingLocation = START_LOCATION_NORMALIZED;\n\t\t\t\t\tremoveHistoryListener && removeHistoryListener();\n\t\t\t\t\tremoveHistoryListener = null;\n\t\t\t\t\tcurrentRoute.value = START_LOCATION_NORMALIZED;\n\t\t\t\t\tstarted = false;\n\t\t\t\t\tready = false;\n\t\t\t\t}\n\t\t\t\tunmountApp();\n\t\t\t};\n\t\t\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser && true) addDevtools(app, router, matcher);\n\t\t}\n\t};\n\tfunction runGuardQueue(guards) {\n\t\treturn guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n\t}\n\treturn router;\n}\n\n//#endregion\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };","import{computed as e,customRef as t,getCurrentInstance as n,isRef as r,onMounted as i,onScopeDispose as a,onUnmounted as o,provide as s,ref as c,unref as l,watch as u,watchEffect as d}from\"vue\";import{converter as f,formatHex as p}from\"culori\";import{cloneDto as m,isRequestError as h,isUnsanctionedRequest as g,markDtoClean as _}from\"@basmilius/http-client\";import{debounce as v,isHtmlElement as y}from\"@basmilius/utils\";import{useRoute as b,useRouter as x,viewDepthKey as S}from\"vue-router\";import{merge as ee}from\"lodash-es\";import{createPinia as C,defineStore as w,getActivePinia as T,setActivePinia as te,storeToRefs as E}from\"pinia\";function D(e){return e||null}const O=f(`oklch`),k=[25,50,100,200,300,400,500,600,700,800,900,950],A={25:0,50:.05,100:.1,200:.2,300:.35,400:.48,500:.55,600:.65,700:.75,800:.85,900:.93,950:.98};function j(e,t=0,n=1){return Math.min(n,Math.max(t,e))}function ne(e,t=`color`){let n=O(e);if(!n||n.mode!==`oklch`)throw Error(`Invalid color`);let r={};for(let e of k){let i=A[e],a=e<500?n.l+(1-n.l)*(1-i/A[500]):n.l*(1-(i-A[500])/(1-A[500]));a=j(a);let o=1-Math.abs(i-A[500])*1.4,s=(n.c??0)*j(o,.2,1);r[`--${t}-${e}`]=p({mode:`oklch`,l:a,c:s,h:n.h})}return r}var M=class extends Error{},N=class extends Error{},P=class extends Error{},F=class extends Error{};const I=Symbol();function L(e,t){R(e)&&(e=e[I]);let n=async(...n)=>{try{return await e(...n)}catch(e){throw h(e)&&e.statusCode===403?new M:g(e)?new P:t&&typeof t==`function`?(t(e),new N):e}};return n[I]=e,n}function R(e){return I in e}function z(e){return(t=>L(t,e))}function B(e,t,n=JSON.stringify,r=JSON.parse){let i=localStorage.getItem(e),a=t;if(i)try{a=r(i)}catch{localStorage.removeItem(e)}let o=c(a);return u(o,t=>{t==null?localStorage.removeItem(e):localStorage.setItem(e,n(t))},{deep:!0}),o}function V(e,t){return B(e,t,e=>e??``,e=>e===``?null:e)}function H(e){return(t=>(...n)=>(e(),t(...n)))}function U(...e){return e.map(l).map(W)}function W(e){if(!e)throw new F;return e}function G(e){let t=l(e);return t?y(t)?t:t.$el??null:null}function K(e,t,n){let r=c([]);i(()=>{document.addEventListener(`pointerdown`,a)}),o(()=>{document.removeEventListener(`pointerdown`,a)});function a(e){l(t)&&!l(r).some(t=>t.contains(e.target))&&n(e)}d(()=>{let t=[];(Array.isArray(e)?e:[e]).forEach(e=>{let n=G(e);n&&t.push(n)}),r.value=t})}function q(){let t=n();return e(()=>t?.uid??(t?.proxy)._uid??0)}function J(e,t){return async()=>{await navigator.clipboard.writeText(l(e)),t?.()}}function Y(e,n,i=!1){let a=c(r(e)?e.value:e),o=t((e,t)=>({get(){return e(),a.value},set:X(e=>{a.value=e,t()},n,i)}));return r(e)&&u(e,e=>o.value=e),o}function X(e,t,n=!1){let r;return(...i)=>{n&&!r&&e(...i),clearTimeout(r),r=setTimeout(()=>requestAnimationFrame(()=>e(...i)),t)}}function Z(t=0,n=!1){let r=c(n),i=c(0),a=e(()=>l(r)||l(i)>0);function o(e){return(async(...t)=>(i.value++,await e(...t).finally(()=>i.value--)))}let s=Y(a,t);return u(i,()=>{l(r)&&(r.value=!1)}),{isLoading:s,loaded:o}}const re=[5,10,25,50,100];function Q(){let e=c(re),t=c(1),n=c(25),r=c(0);function i(e){t.value=e}function a(e){n.value=e}function o(e){r.value=e}return{limits:e,page:t,perPage:n,total:r,setPage:i,setPerPage:a,setTotal:o}}function ie(e,t=[]){let{isLoading:n,loaded:r}=Z(),{limits:i,page:a,perPage:o,total:s,setPage:d,setPerPage:f,setTotal:p}=Q(),m=c(!1),h=c(!0),g=c([]);async function _(){let t=l(a),n=l(o);try{let i=await r(e)((t-1)*n,n);if(i===!1)return;h.value?(h.value=!1,i.data.items.length===0&&(m.value=!0)):i.data.items.length>0&&(m.value=!1),g.value=i.data.items,p(i.data.total)}catch(e){if(e instanceof F)return;throw e}}return u([a,o,...t],_,{immediate:!0}),{displayEmpty:m,isLoading:n,items:g,limits:i,page:a,perPage:o,total:s,reload:_,setPage:d,setPerPage:f,setTotal:p}}function ae(e,t){return v(e,t)}function oe(e){let t=c();return u(e,e=>{e&&(t.value=m(e),_(t.value))},{immediate:!0}),t}function se(e,t){let n=c();i(()=>{a()}),o(()=>{clearTimeout(n.value)});function r(){n.value=setTimeout(()=>requestAnimationFrame(a),l(e))}function a(){r(),t()}}function ce(e){let{isLoading:t,loaded:n}=Z();return[n(e),t]}function le(){let e=c(null),t=c(null);return u(e,(e,n,r)=>{e&&(t.value=URL.createObjectURL(e),r(()=>{t.value&&=(URL.revokeObjectURL(t.value),null)}))},{immediate:!0}),{file:e,url:t,delete:()=>{e.value=null,t.value=null},upload:t=>{e.value=t}}}function ue(){let e=c(!1);return i(()=>e.value=!0),e}function de(e,t,n){n??={attributes:!0};let r,i=u(e,e=>{o();let i=G(e);i&&(r=new MutationObserver(t),r.observe(i,n))},{immediate:!0});function o(){r&&=(r.disconnect(),void 0)}function s(){o(),i()}a(s)}const fe=[{index:0,type:`too_weak`,minimumDiversity:0,minimumLength:0},{index:1,type:`weak`,minimumDiversity:2,minimumLength:6},{index:2,type:`medium`,minimumDiversity:3,minimumLength:8},{index:3,type:`strong`,minimumDiversity:4,minimumLength:10}],pe=[{regex:RegExp(`[a-z]`),type:`lowercase`},{regex:RegExp(`[A-Z]`),type:`uppercase`},{regex:RegExp(`[0-9]`),type:`number`},{regex:RegExp(`[!\"#$%&'()*+,-./:;<=>?@[\\\\\\\\\\\\]^_\\`{|}~]`),type:`symbol`}];function me(t){return e(()=>{let e=l(t);if(e.length===0)return null;let n=pe.filter(t=>t.regex.test(e)).map(e=>e.type);return{length:e.length,strength:fe.sort((e,t)=>t.index-e.index).find(t=>n.length>=t.minimumDiversity&&e.length>=t.minimumLength).type,rules:n}})}function he(e,t,n){n??={};let r,i=u(e,e=>{o();let i=G(e);i&&(r=new ResizeObserver(t),r.observe(i,n))},{immediate:!0});function o(){r&&=(r.disconnect(),void 0)}function s(){o(),i()}a(s)}function ge(e,...t){let n=new e,r=Object.getOwnPropertyNames(e.prototype).filter(e=>e!==`constructor`),i={};for(let e of r)i[e]=L(n[e].bind(n)),t.forEach(t=>i[e]=t(i[e]));return i}function $(){let t=b();return e(()=>{let e=[];return l(t).matched.forEach(t=>t.name&&e.push(t.name)),e})}function _e(t,n=!1){let r=$();return e(n?()=>l(r).some(e=>e.startsWith(t)):()=>l(r).some(e=>e===t))}function ve(t){let n=b(),r=e(()=>l(n).matched.findIndex(e=>!!e.components&&l(t)in e.components)),i=e(()=>l(n).matched[l(r)]),a=e(()=>l(i)?.path);return s(S,r),{route:n,viewKey:a}}function ye(...e){let t=x(),n=async(e,n=!1)=>n?await t.replace(e):await t.push(e);for(let t of e)n=t(n);return{navigate:n,push:e=>n(e),replace:e=>n(e,!0)}}function be(){let t=b();return e(()=>{let e=l(t).matched,n={};for(let t=e.length-1;t>=0;--t){let r=e[t];if(!r||typeof r.meta!=`object`)continue;let i={...r.meta};if(`navigation`in n){let{navigation:e,...t}=i;i=t}n=ee(n,i)}return n})}function xe(e,t=null){let n=b(),r=c(l(n).params[e]??t);return u(()=>l(n).params[e],e=>{r.value=e||null},{immediate:!0}),r}function Se(t){let n=b();return e(()=>{let e=l(t);for(let t of l(n).matched)if(t.components&&e in t.components)return t.components[e];return null})}function Ce(e,t){let n=w(e,t);return()=>{let e=n(),t=Object.getOwnPropertyNames(e),r=E(e),i={};for(let n of t)if(!(n.startsWith(`$`)||n.startsWith(`_`))){if(n in r){i[n]=r[n];continue}i[n]=e[n]}return i}}export{M as ForbiddenException,N as HandledException,P as UnauthorizedException,F as UnresolvedDependencyException,C as createPinia,Ce as defineStore,D as emptyNull,ne as generateColorPalette,T as getActivePinia,L as guarded,z as onError,B as persistentRef,V as persistentStringRef,H as runBefore,te as setActivePinia,U as unrefAll,G as unwrapElement,K as useClickOutside,q as useComponentId,J as useCopy,ie as useDataTable,ae as useDebounced,Y as useDebouncedRef,oe as useDtoForm,se as useInterval,_e as useIsView,Z as useLoaded,ce as useLoadedAction,le as useLocalFile,ue as useMounted,de as useMutationObserver,ve as useNamedRoute,ye as useNavigate,Q as usePagination,me as usePasswordStrength,he as useResizeObserver,be as useRouteMeta,$ as useRouteNames,xe as useRouteParam,Se as useRouteView,ge as useService};\n//# sourceMappingURL=index.mjs.map","import{a as e,d as t,f as n,n as r,r as i,s as a,t as o}from\"./util-CwaOsSvo.js\";import{computed as s,onMounted as c,onUnmounted as l,ref as u,unref as d,watch as f}from\"vue\";import{DateTime as p}from\"luxon\";import{unwrapElement as m,useMutationObserver as h}from\"@basmilius/common\";function g(e,t){let n=u(!1),r=u(e),i=s(()=>{let e=[],t=d(r).month,n=d(r).startOf(`month`);do e.push(n),n=n.plus({day:1});while(n.month===t);let i=e[0],a=e[e.length-1];for(let t=1;t<i.weekday;++t)e.unshift(i.minus({day:t}));for(let t=a.weekday+1;t<=7;++t)e.push(a.plus({day:t-a.weekday}));for(;e.length/7<6;){let t=e[e.length-1];for(let n=1;n<=7;++n)e.push(t.plus({day:n}))}return e}),a=s(()=>d(i).slice(0,7).map(e=>e.toLocaleString({weekday:t?.weekDayLength??`short`}))),o=s(()=>d(r).plus({month:1})),c=s(()=>d(r).minus({month:1})),l=s(()=>d(r).toLocaleString({month:t?.monthLength??`long`})),f=s(()=>d(r).year.toString());function p(e){n.value=r.value>e,r.value=e}function m(){p(d(r).plus({month:1}))}function h(){p(d(r).minus({month:1}))}return{isTransitioningToPast:n,viewDate:r,viewDateNext:o,viewDatePrevious:c,viewMonth:l,viewYear:f,dates:i,days:a,setViewDate:p,nextMonth:m,previousMonth:h}}function _(e,t){return{months:s(()=>{let n=[],r=d(e),i=r.startOf(`year`);for(;i.month<=12&&i.year===r.year;)n.push({date:i,label:i.toLocaleString({month:t})}),i=i.plus({months:1});return n})}}function v(e,t=10){let n=u(0),r=s(()=>{let r=d(e).year,i=[],a=r-r%t+d(n)*t;for(let e=0;e<t;++e)i.push(a+e);return i});function i(){++n.value}function a(){--n.value}return f(e,()=>n.value=0),{years:r,next:i,previous:a}}function y(e,t,n,r={passive:!0}){f(e,(e,i,a)=>{e&&(e.addEventListener(t,n,r),a(()=>e.removeEventListener(t,n)))},{immediate:!0})}function b(t,n={}){let r=u(n.initial??!1);return f(t,(i,a,o)=>{let s=e(t);if(!s)return;let c=new IntersectionObserver(e=>r.value=e[0]?.isIntersecting??!1,n);c.observe(s),o(()=>c.disconnect())},{immediate:!0}),r}function x(e,t){let n=`flux/${e}`,r=u(i()??t);function i(){if(n in localStorage){let e=JSON.parse(localStorage.getItem(n));return Array.isArray(e)&&e[0]===`DateTime`&&(e=p.fromISO(e[1])),e}return null}return f(r,e=>{let t=e;p.isDateTime(e)&&(t=[`DateTime`,e.toISO({includeOffset:!0,extendedZone:!0})]),localStorage.setItem(n,JSON.stringify(t))}),r}function S(t){let n=u(!0),r=u(!0);return f(t,(i,a,o)=>{let s=e(t);if(!s)return;let c=()=>{let{scrollTop:e,scrollHeight:t,clientHeight:i}=s;n.value=e<=0,r.value=Math.ceil(e+i)>=t},l=new ResizeObserver(c);l.observe(s);for(let e of Array.from(s.children))l.observe(e);let u=new MutationObserver(e=>{for(let t of e){for(let e of Array.from(t.addedNodes))e instanceof Element&&l.observe(e);for(let e of Array.from(t.removedNodes))e instanceof Element&&l.unobserve(e)}c()});u.observe(s,{childList:!0}),s.addEventListener(`scroll`,c,{passive:!0}),c(),o(()=>{s.removeEventListener(`scroll`,c),l.disconnect(),u.disconnect()})},{immediate:!0}),{isAtStart:n,isAtEnd:r}}function C(e){let t=u(0),n=u(0);return e||=u(document),y(e,`scroll`,()=>{let r=d(e);r instanceof Document&&(r=r.scrollingElement),t.value=r?.scrollLeft??0,n.value=r?.scrollTop??0}),{x:t,y:n}}let w=0;function T(e=!1){let t=u(`focus-trap-${++w}`),n=u(!1);return c(()=>r.add(d(t),e=>n.value=e,e)),l(()=>r.remove(d(t))),n}function E(t,n){f(t,(r,i,a)=>{if(!e(t)||d(n))return;let o=document.activeElement;a(()=>{requestAnimationFrame(()=>o?.focus())})})}function D(t,r={}){if(o)return;let{disable:a=u(!1),disableReturn:s=u(!1),attachTo:c=null}=r,l=T(!a);E(t,s),f(t,(r,a,o)=>{let s=e(t),u=c||document;l.value&&s&&document.activeElement&&!s.contains(document.activeElement)&&!s.querySelector(`[autofocus]`)&&i(s,document.activeElement,!0);function d(e){if(!l.value||!s)return;let t=e.target||document.body;s.contains(t)||(e.preventDefault(),e.stopImmediatePropagation(),i(s,t))}function f(e){if(!l.value||!s)return;(!e.relatedTarget||e.relatedTarget===document.body)&&(e.preventDefault(),s.focus());let t=e.target||document.body;s.contains(t)||i(s,t)}if(u.addEventListener(`focusin`,d,{capture:!0}),u.addEventListener(`focusout`,f,{capture:!0}),s){let e=n(s),t=e.findIndex(e=>e.classList.contains(`is-active`)),r=e.findIndex(e=>!e.hasAttribute(`aria-disabled`)),i=e[0];t>-1&&(i=e[t]),r>-1&&(i=e[r]),i&&i.focus()}o(()=>{u.removeEventListener(`focusin`,d),u.removeEventListener(`focusout`,f)})},{immediate:!0}),f(()=>a,()=>{let r=e(t);if(l.value=!a,a||!r)return;let i=n(r);i.includes(document.activeElement)||i[0]?.focus()},{immediate:!0})}function O(e){let t=u(null);c(()=>t.value=r.subscribe(e)),l(()=>t.value?.())}function k(e,{cycle:t=!0,direction:r=`bidirectional`}={}){h(e,()=>a(i(),!1));function i(){let t=n(m(e)),r=t.findIndex(e=>e.classList.contains(`is-active`)),i=t.findIndex(e=>!e.hasAttribute(`aria-disabled`));return r>-1?r:i>-1?i:0}function a(t,r=!0){let i=n(m(e));i.forEach((e,n)=>e.tabIndex=n===t?0:-1),r&&i[t]?.focus()}function o(i){let o=m(e),s=n(o);if(![`Enter`,` `].includes(i.key))switch(r){case`bidirectional`:A(i,o,s,a);break;case`horizontal`:case`vertical`:j(i,o,t,r,s,a);break}}f(e,(t,n,r)=>{let s=m(e);s&&(s.addEventListener(`keydown`,o),a(i(),!1),r(()=>s.removeEventListener(`keydown`,o)))},{immediate:!0})}function A(e,n,r,i){let a;switch(e.key){case`ArrowUp`:a=`up`;break;case`ArrowDown`:a=`down`;break;case`ArrowLeft`:a=`left`;break;case`ArrowRight`:a=`right`;break;default:return}let o=t(n,document.activeElement,a);o&&i(r.indexOf(o)),e.preventDefault()}function j(e,t,n,r,i,o){let s;if(e.key===(r===`horizontal`?`ArrowLeft`:`ArrowUp`))s=-1;else if(e.key===(r===`horizontal`?`ArrowRight`:`ArrowDown`))s=1;else return;let c=a(t,s);c?o(i.indexOf(c)):n&&o(s===1?0:i.length-1),e.preventDefault()}export{T as a,x as c,v as d,_ as f,E as i,b as l,O as n,C as o,g as p,D as r,S as s,k as t,y as u};\n//# sourceMappingURL=composable-CJXC7sly.js.map","import type { ComputedRef, InjectionKey, Ref } from 'vue';\nimport type { FluxPressableType, FluxTo } from '@flux-ui/types';\n\nexport const FluxApplicationInjectionKey: InjectionKey<FluxApplicationInjection> = Symbol();\n\nexport type FluxApplicationContextInfo = {\n readonly id: symbol;\n readonly title: string;\n readonly subtitle?: string;\n readonly to?: FluxTo;\n readonly entryTo?: FluxTo;\n readonly href?: string;\n readonly type?: FluxPressableType;\n};\n\nexport type FluxApplicationInjection = {\n readonly activeContext: ComputedRef<FluxApplicationContextInfo | undefined>;\n readonly contexts: ComputedRef<readonly FluxApplicationContextInfo[]>;\n readonly isMenuCollapsed: Ref<boolean>;\n readonly layout: Ref<FluxApplicationLayout>;\n readonly showDesktopMenuToggle: Ref<boolean>;\n readonly totalLevels: ComputedRef<number>;\n readonly viewIndex: Ref<number>;\n goToChild(): void;\n goToCurrent(): void;\n goToLevel(index: number): void;\n goToMain(): void;\n goToParent(): void;\n pushContext(info: FluxApplicationContextInfo): void;\n removeContext(id: symbol): void;\n};\n\nexport type FluxApplicationLayout =\n | 'default'\n | 'dashboard'\n | 'full'\n | 'medium'\n | 'narrow';\n","import { type RouteLocationNormalizedLoaded, useRoute as useVueRoute } from 'vue-router';\n\n/**\n * Internal alias for vue-router's `useRoute`. Exists so the rest of the\n * package can import a single, controlled `useRoute` symbol — making it\n * trivial to swap in a wrapper later (e.g. modal-aware variants) without\n * touching every call site.\n */\nexport default function (): RouteLocationNormalizedLoaded {\n return useVueRoute();\n}\n","import { computed, type ComputedRef, type Ref, unref } from 'vue';\nimport type { RouteRecordNormalized } from 'vue-router';\nimport useRoute from './useRoute';\n\n/**\n * Returns **all** matched route records that expose a named view with\n * the given `name`, paired with their depth in `route.matched`. Powers\n * `<FluxApplicationMenuContextStack>` so every level of a nested route\n * tree can render its own menu component (instead of vue-router's\n * default behaviour of only rendering the deepest one).\n */\nexport default function (nameRef: Ref<string> | string): ComputedRef<NamedRouteMatch[]> {\n const route = useRoute();\n\n return computed(() => {\n const name = unref(nameRef);\n const matches: NamedRouteMatch[] = [];\n\n route.matched.forEach((record, depth) => {\n if (!record.components || !(name in record.components)) {\n return;\n }\n\n matches.push({depth, record});\n });\n\n return matches;\n });\n}\n\nexport type NamedRouteMatch = {\n readonly depth: number;\n readonly record: RouteRecordNormalized;\n};\n","@use '$flux/css/mixin';\n\n:root {\n --application-duration: 360ms;\n --application-menu-surface: var(--gray-100);\n --application-menu-surface-stroke: var(--gray-200);\n --application-menu-width: 300px;\n --application-menu-width-collapsed: 69px;\n --application-side-width: 300px;\n --application-top-height: 66px;\n}\n\n[dark] {\n --application-menu-surface: color-mix(in srgb, var(--gray-25), black 25%);\n --application-menu-surface-stroke: var(--gray-100);\n}\n\n.application {\n position: relative;\n display: flex;\n transition: padding var(--application-duration) var(--swift-out);\n transition-property: padding-left, padding-right;\n\n &:has(> .applicationSide) {\n padding-right: var(--application-side-width);\n }\n}\n\n.applicationBody {\n position: relative;\n display: flex;\n min-width: 0;\n min-height: 100dvh;\n flex-flow: column;\n flex-grow: 1;\n\n &:has(> .applicationContentFull > :is(.calendar, .table)) {\n max-height: 100dvh;\n }\n}\n\n.applicationMenuBackdrop {\n position: fixed;\n display: none;\n inset: 0;\n width: 100dvw;\n height: 100dvh;\n padding: 0;\n border: 0;\n background: rgb(from var(--gray-200) r g b / .5);\n backdrop-filter: blur(3px) saturate(180%);\n transition: var(--application-duration) var(--swift-out);\n transition-property: background, backdrop-filter, opacity;\n z-index: 1900;\n}\n\n@include mixin.breakpoint-up(lg) {\n .application:has(> .applicationMenu) {\n padding-left: var(--application-menu-width);\n }\n\n .application:has(> .applicationMenu[data-collapsed][data-collapsible]) {\n padding-left: var(--application-menu-width-collapsed);\n }\n}\n\n@include mixin.breakpoint-down(md) {\n .application {\n &:has(> .applicationSide) {\n padding-right: 0;\n }\n }\n\n .applicationMenuBackdrop {\n display: block;\n }\n\n .application:has(> .applicationMenu[data-collapsed]) .applicationMenuBackdrop {\n pointer-events: none;\n opacity: 0;\n }\n\n html[data-application-menu-open],\n html[data-application-menu-open] body {\n overflow: hidden;\n overscroll-behavior: contain;\n }\n}\n","<template>\n <div :class=\"$style.application\">\n <slot name=\"menu\"/>\n\n <div :class=\"$style.applicationBody\">\n <slot/>\n </div>\n\n <slot name=\"side\"/>\n\n <button\n type=\"button\"\n aria-label=\"Close menu\"\n :class=\"$style.applicationMenuBackdrop\"\n @click=\"isMenuCollapsed = true\"/>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { useRemembered } from '@flux-ui/internals';\n import { computed, onUnmounted, provide, ref, shallowRef, toRef, type VNode, watch } from 'vue';\n import { type FluxApplicationContextInfo, FluxApplicationInjectionKey, type FluxApplicationLayout } from '../data';\n import useNamedRoutes from '../routing/useNamedRoutes';\n import useRoute from '../routing/useRoute';\n import $style from '../css/component/Application.module.scss';\n\n const {\n contextMenuName = 'menu',\n showDesktopMenuToggle = false\n } = defineProps<{\n readonly contextMenuName?: string;\n readonly showDesktopMenuToggle?: boolean;\n }>();\n\n defineSlots<{\n default(): VNode[];\n menu(): VNode[];\n side(): VNode[];\n }>();\n\n const route = useRoute();\n const matchedMenuRoutes = useNamedRoutes(toRef(() => contextMenuName));\n\n const isMenuCollapsed = useRemembered('application-menu-collapsed', true);\n const layout = ref<FluxApplicationLayout>('default');\n\n const totalLevels = computed(() => 1 + matchedMenuRoutes.value.length);\n const viewIndex = ref(0);\n\n function clampViewIndex(target: number): number {\n if (target < 0) {\n return 0;\n }\n const max = totalLevels.value - 1;\n if (target > max) {\n return max;\n }\n return target;\n }\n\n function goToLevel(index: number): void {\n viewIndex.value = clampViewIndex(index);\n }\n\n function goToMain(): void {\n viewIndex.value = 0;\n }\n\n function goToCurrent(): void {\n viewIndex.value = totalLevels.value - 1;\n }\n\n function goToParent(): void {\n viewIndex.value = clampViewIndex(viewIndex.value - 1);\n }\n\n function goToChild(): void {\n viewIndex.value = clampViewIndex(viewIndex.value + 1);\n }\n\n const contextStack = shallowRef<FluxApplicationContextInfo[]>([]);\n const contexts = computed(() => contextStack.value);\n const activeContext = computed(() => contextStack.value.at(-1));\n\n function pushContext(info: FluxApplicationContextInfo): void {\n contextStack.value = [...contextStack.value, info];\n }\n\n function removeContext(id: symbol): void {\n contextStack.value = contextStack.value.filter(entry => entry.id !== id);\n }\n\n provide(FluxApplicationInjectionKey, {\n activeContext,\n contexts,\n isMenuCollapsed,\n layout,\n showDesktopMenuToggle: toRef(() => showDesktopMenuToggle),\n totalLevels,\n viewIndex,\n goToChild,\n goToCurrent,\n goToLevel,\n goToMain,\n goToParent,\n pushContext,\n removeContext\n });\n\n watch(() => route.fullPath, () => {\n viewIndex.value = totalLevels.value - 1;\n });\n\n watch(totalLevels, (next) => {\n viewIndex.value = clampViewIndex(viewIndex.value);\n\n // On initial route resolve, totalLevels jumps from 1 to its\n // real value. Snap to the deepest level so the user lands on\n // the right context without seeing a slide animation.\n if (viewIndex.value === 0 && next > 1) {\n viewIndex.value = next - 1;\n }\n }, {immediate: true});\n\n watch(isMenuCollapsed, collapsed => {\n if (typeof document === 'undefined') {\n return;\n }\n\n if (collapsed) {\n delete document.documentElement.dataset.applicationMenuOpen;\n } else {\n document.documentElement.dataset.applicationMenuOpen = '';\n }\n }, {immediate: true});\n\n onUnmounted(() => {\n if (typeof document !== 'undefined') {\n delete document.documentElement.dataset.applicationMenuOpen;\n }\n });\n</script>\n","<template>\n <div :class=\"$style.application\">\n <slot name=\"menu\"/>\n\n <div :class=\"$style.applicationBody\">\n <slot/>\n </div>\n\n <slot name=\"side\"/>\n\n <button\n type=\"button\"\n aria-label=\"Close menu\"\n :class=\"$style.applicationMenuBackdrop\"\n @click=\"isMenuCollapsed = true\"/>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { useRemembered } from '@flux-ui/internals';\n import { computed, onUnmounted, provide, ref, shallowRef, toRef, type VNode, watch } from 'vue';\n import { type FluxApplicationContextInfo, FluxApplicationInjectionKey, type FluxApplicationLayout } from '../data';\n import useNamedRoutes from '../routing/useNamedRoutes';\n import useRoute from '../routing/useRoute';\n import $style from '../css/component/Application.module.scss';\n\n const {\n contextMenuName = 'menu',\n showDesktopMenuToggle = false\n } = defineProps<{\n readonly contextMenuName?: string;\n readonly showDesktopMenuToggle?: boolean;\n }>();\n\n defineSlots<{\n default(): VNode[];\n menu(): VNode[];\n side(): VNode[];\n }>();\n\n const route = useRoute();\n const matchedMenuRoutes = useNamedRoutes(toRef(() => contextMenuName));\n\n const isMenuCollapsed = useRemembered('application-menu-collapsed', true);\n const layout = ref<FluxApplicationLayout>('default');\n\n const totalLevels = computed(() => 1 + matchedMenuRoutes.value.length);\n const viewIndex = ref(0);\n\n function clampViewIndex(target: number): number {\n if (target < 0) {\n return 0;\n }\n const max = totalLevels.value - 1;\n if (target > max) {\n return max;\n }\n return target;\n }\n\n function goToLevel(index: number): void {\n viewIndex.value = clampViewIndex(index);\n }\n\n function goToMain(): void {\n viewIndex.value = 0;\n }\n\n function goToCurrent(): void {\n viewIndex.value = totalLevels.value - 1;\n }\n\n function goToParent(): void {\n viewIndex.value = clampViewIndex(viewIndex.value - 1);\n }\n\n function goToChild(): void {\n viewIndex.value = clampViewIndex(viewIndex.value + 1);\n }\n\n const contextStack = shallowRef<FluxApplicationContextInfo[]>([]);\n const contexts = computed(() => contextStack.value);\n const activeContext = computed(() => contextStack.value.at(-1));\n\n function pushContext(info: FluxApplicationContextInfo): void {\n contextStack.value = [...contextStack.value, info];\n }\n\n function removeContext(id: symbol): void {\n contextStack.value = contextStack.value.filter(entry => entry.id !== id);\n }\n\n provide(FluxApplicationInjectionKey, {\n activeContext,\n contexts,\n isMenuCollapsed,\n layout,\n showDesktopMenuToggle: toRef(() => showDesktopMenuToggle),\n totalLevels,\n viewIndex,\n goToChild,\n goToCurrent,\n goToLevel,\n goToMain,\n goToParent,\n pushContext,\n removeContext\n });\n\n watch(() => route.fullPath, () => {\n viewIndex.value = totalLevels.value - 1;\n });\n\n watch(totalLevels, (next) => {\n viewIndex.value = clampViewIndex(viewIndex.value);\n\n // On initial route resolve, totalLevels jumps from 1 to its\n // real value. Snap to the deepest level so the user lands on\n // the right context without seeing a slide animation.\n if (viewIndex.value === 0 && next > 1) {\n viewIndex.value = next - 1;\n }\n }, {immediate: true});\n\n watch(isMenuCollapsed, collapsed => {\n if (typeof document === 'undefined') {\n return;\n }\n\n if (collapsed) {\n delete document.documentElement.dataset.applicationMenuOpen;\n } else {\n document.documentElement.dataset.applicationMenuOpen = '';\n }\n }, {immediate: true});\n\n onUnmounted(() => {\n if (typeof document !== 'undefined') {\n delete document.documentElement.dataset.applicationMenuOpen;\n }\n });\n</script>\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import { computed, type ComputedRef, toRef } from 'vue';\nimport useNamedRoutes from '../routing/useNamedRoutes';\n\nexport default function (name: string = 'menu'): UseApplicationContextMenu {\n const matches = useNamedRoutes(toRef(() => name));\n\n const hasContextMenu = computed(() => matches.value.length > 0);\n const contextMenuKey = computed(() => matches.value.map(m => m.record.path).join('|') || undefined);\n\n return {\n contextMenuKey,\n hasContextMenu\n };\n}\n\ntype UseApplicationContextMenu = {\n readonly contextMenuKey: ComputedRef<string | undefined>;\n readonly hasContextMenu: ComputedRef<boolean>;\n};\n","import { inject } from 'vue';\nimport { type FluxApplicationInjection, FluxApplicationInjectionKey } from '../data';\n\nexport default function (): FluxApplicationInjection {\n const injection = inject(FluxApplicationInjectionKey);\n\n if (!injection) {\n throw new Error('[Flux] useApplicationInjection() was used outside a FluxApplication component.');\n }\n\n return injection;\n}\n","import { computed, type ComputedRef, type Ref } from 'vue';\nimport type { FluxApplicationContextInfo, FluxApplicationLayout } from '../data';\nimport useApplicationInjection from './useApplicationInjection';\n\nexport default function (): UseApplicationMenu {\n const {\n activeContext,\n contexts,\n isMenuCollapsed,\n layout,\n totalLevels,\n viewIndex,\n goToChild,\n goToCurrent,\n goToLevel,\n goToMain,\n goToParent\n } = useApplicationInjection();\n\n const isMainMenuVisible = computed(() => viewIndex.value === 0);\n const canGoBack = computed(() => viewIndex.value > 0);\n const canGoForward = computed(() => viewIndex.value < totalLevels.value - 1);\n\n return {\n activeContext,\n canGoBack,\n canGoForward,\n contexts,\n isMainMenuVisible,\n isMenuCollapsed,\n layout,\n totalLevels,\n viewIndex,\n\n goToChild,\n goToCurrent,\n goToLevel,\n goToMain,\n goToParent,\n\n close: () => isMenuCollapsed.value = true,\n open: () => isMenuCollapsed.value = false,\n toggle: () => isMenuCollapsed.value = !isMenuCollapsed.value,\n\n // Convenience aliases mapping onto the viewIndex model.\n showMainMenu: goToMain,\n showContextMenu: goToCurrent,\n toggleMainMenu: () => {\n if (viewIndex.value === 0) {\n goToCurrent();\n } else {\n goToMain();\n }\n }\n };\n}\n\ntype UseApplicationMenu = {\n readonly activeContext: ComputedRef<FluxApplicationContextInfo | undefined>;\n readonly canGoBack: ComputedRef<boolean>;\n readonly canGoForward: ComputedRef<boolean>;\n readonly contexts: ComputedRef<readonly FluxApplicationContextInfo[]>;\n readonly isMainMenuVisible: ComputedRef<boolean>;\n readonly isMenuCollapsed: Ref<boolean>;\n readonly layout: Ref<FluxApplicationLayout>;\n readonly totalLevels: ComputedRef<number>;\n readonly viewIndex: Ref<number>;\n close(): void;\n goToChild(): void;\n goToCurrent(): void;\n goToLevel(index: number): void;\n goToMain(): void;\n goToParent(): void;\n open(): void;\n showContextMenu(): void;\n showMainMenu(): void;\n toggle(): void;\n toggleMainMenu(): void;\n};\n","@use '$flux/css/mixin';\n\n.applicationContent {\n position: relative;\n display: flex;\n container: applicationContent / inline-size;\n margin-left: auto;\n margin-right: auto;\n padding-top: 21px;\n padding-bottom: 42px;\n flex-flow: column;\n flex-grow: 1;\n gap: 21px;\n}\n\n.applicationContentDefault,\n.applicationContentDashboard {\n composes: applicationContent;\n\n width: min(1620px, 100% - 42px);\n}\n\n.applicationContentDashboard {\n gap: 45px;\n}\n\n.applicationContentFull {\n composes: applicationContent;\n\n padding-top: 0;\n padding-bottom: 0;\n width: calc(100% - 42px);\n}\n\n.applicationContentMedium {\n composes: applicationContent;\n\n width: min(1280px, 100% - 42px);\n}\n\n.applicationContentNarrow {\n composes: applicationContent;\n\n width: min(840px, 100% - 42px);\n}\n\n.applicationContentFull {\n &:has(> :is(:local(.calendar), :local(.table))) {\n min-height: 0;\n width: 100%;\n contain: paint;\n overflow: hidden;\n }\n\n > :is(:local(.calendar), :local(.table)) {\n max-height: 100%;\n flex-grow: 1;\n }\n\n > :local(.calendar) {\n border-left: 0;\n border-right: 0;\n border-radius: 0;\n\n :local(.calendarActions) {\n padding-left: 21px;\n padding-right: 21px;\n }\n }\n\n > :local(.table) {\n :local(.tableCell):first-child :local(.tableCellContent) {\n padding-left: 21px;\n }\n\n :local(.tableCell):last-child :local(.tableCellContent) {\n padding-right: 21px;\n }\n }\n}\n\n@include mixin.breakpoint-down(md) {\n .applicationContentDefault,\n .applicationContentMedium,\n .applicationContentNarrow {\n gap: 15px;\n }\n\n .applicationContentDashboard {\n gap: 30px;\n }\n\n .applicationContentFull {\n width: 100%;\n }\n\n .applicationContentFull {\n > :is(.calendar, .table) {\n margin-left: 0;\n margin-right: 0;\n height: auto;\n }\n\n > .calendar .calendarActions {\n padding-left: 12px;\n padding-right: 12px;\n }\n\n > .table {\n .tableCell:first-child .tableCellContent {\n padding-left: 12px;\n }\n\n .tableCell:last-child .tableCellContent {\n padding-right: 12px;\n }\n }\n }\n}\n","<template>\n <main\n :class=\"clsx(\n layout === 'default' && $style.applicationContentDefault,\n layout === 'dashboard' && $style.applicationContentDashboard,\n layout === 'full' && $style.applicationContentFull,\n layout === 'medium' && $style.applicationContentMedium,\n layout === 'narrow' && $style.applicationContentNarrow\n )\"\n aria-label=\"Application Content\">\n <slot/>\n </main>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import clsx from 'clsx';\n import { useApplicationInjection } from '../composable';\n import type { FluxApplicationLayout } from '../data';\n import $style from '../css/component/ApplicationContent.module.scss';\n import { watch } from 'vue';\n\n const {\n layout = 'default'\n } = defineProps<{\n readonly layout?: FluxApplicationLayout;\n }>();\n\n defineSlots<{\n default(): any;\n }>();\n\n const {layout: layoutRef} = useApplicationInjection();\n\n watch(() => layout, () => layoutRef.value = layout, {immediate: true});\n</script>\n","<template>\n <main\n :class=\"clsx(\n layout === 'default' && $style.applicationContentDefault,\n layout === 'dashboard' && $style.applicationContentDashboard,\n layout === 'full' && $style.applicationContentFull,\n layout === 'medium' && $style.applicationContentMedium,\n layout === 'narrow' && $style.applicationContentNarrow\n )\"\n aria-label=\"Application Content\">\n <slot/>\n </main>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import clsx from 'clsx';\n import { useApplicationInjection } from '../composable';\n import type { FluxApplicationLayout } from '../data';\n import $style from '../css/component/ApplicationContent.module.scss';\n import { watch } from 'vue';\n\n const {\n layout = 'default'\n } = defineProps<{\n readonly layout?: FluxApplicationLayout;\n }>();\n\n defineSlots<{\n default(): any;\n }>();\n\n const {layout: layoutRef} = useApplicationInjection();\n\n watch(() => layout, () => layoutRef.value = layout, {immediate: true});\n</script>\n",".applicationHero {\n display: flex;\n align-items: center;\n flex-flow: row;\n gap: 21px;\n}\n\n.applicationHeroBody {\n display: flex;\n flex-flow: column;\n flex-grow: 1;\n gap: 6px;\n}\n\n.applicationHeroSubtitle {\n color: var(--foreground-secondary);\n font-size: 18px;\n}\n","<template>\n <header :class=\"$style.applicationHero\">\n <slot name=\"start\"/>\n\n <div :class=\"$style.applicationHeroBody\">\n <slot name=\"before\"/>\n\n <h1>{{ title }}</h1>\n\n <p\n v-if=\"subtitle\"\n :class=\"$style.applicationHeroSubtitle\">\n {{ subtitle }}\n </p>\n\n <slot name=\"after\"/>\n </div>\n\n <slot name=\"end\"/>\n </header>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationHero.module.scss';\n\n defineProps<{\n readonly title: string;\n readonly subtitle?: string;\n }>();\n\n defineSlots<{\n after?(): VNode[];\n before?(): VNode[];\n end?(): VNode[];\n start?(): VNode[];\n }>();\n</script>\n","<template>\n <header :class=\"$style.applicationHero\">\n <slot name=\"start\"/>\n\n <div :class=\"$style.applicationHeroBody\">\n <slot name=\"before\"/>\n\n <h1>{{ title }}</h1>\n\n <p\n v-if=\"subtitle\"\n :class=\"$style.applicationHeroSubtitle\">\n {{ subtitle }}\n </p>\n\n <slot name=\"after\"/>\n </div>\n\n <slot name=\"end\"/>\n </header>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationHero.module.scss';\n\n defineProps<{\n readonly title: string;\n readonly subtitle?: string;\n }>();\n\n defineSlots<{\n after?(): VNode[];\n before?(): VNode[];\n end?(): VNode[];\n start?(): VNode[];\n }>();\n</script>\n","@use '$flux/css/mixin';\n\n.applicationMenu {\n position: fixed;\n display: flex;\n top: 0;\n left: 0;\n height: 100dvh;\n width: var(--application-menu-width);\n flex-flow: column;\n transition: var(--application-duration) var(--swift-out);\n transition-property: translate, width;\n background: var(--application-menu-surface);\n border-right: 1px solid var(--application-menu-surface-stroke);\n overflow: hidden;\n z-index: 500;\n}\n\n.applicationMenuFooter,\n.applicationMenuHeader,\n.applicationMenuPanel {\n padding: 12px;\n gap: 12px;\n}\n\n.applicationMenuFooter,\n.applicationMenuHeader {\n position: relative;\n background: var(--application-menu-surface);\n z-index: 1;\n\n &::before {\n position: absolute;\n left: 0;\n right: 0;\n height: 18px;\n width: 100%;\n content: '';\n pointer-events: none;\n }\n}\n\n.applicationMenuFooter {\n max-height: 50vh;\n padding-bottom: max(12px, env(safe-area-inset-bottom));\n transition: var(--application-duration) var(--swift-out);\n transition-property: max-height, opacity, padding-top, padding-bottom;\n\n &::before {\n bottom: 100%;\n background: linear-gradient(to top, var(--application-menu-surface), transparent);\n transition: opacity var(--application-duration) var(--swift-out);\n }\n\n /**\n * Collapses the footer in sync with the slider track when the\n * user navigates into a context-menu panel. Animating `max-height`\n * is the standard hack to transition a height-auto element; 50vh\n * is far above any realistic footer height yet small enough to\n * animate smoothly without the leading edge appearing to \"wait\".\n */\n &[data-hidden] {\n max-height: 0;\n padding-top: 0;\n padding-bottom: 0;\n opacity: 0;\n pointer-events: none;\n overflow: hidden;\n\n &::before {\n opacity: 0;\n }\n }\n}\n\n.applicationMenuHeader {\n padding-top: max(12px, env(safe-area-inset-top));\n border-bottom: 1px solid var(--application-menu-surface-stroke);\n\n &::before {\n top: calc(100% + 1px);\n background: linear-gradient(to bottom, var(--application-menu-surface), transparent);\n }\n}\n\n.applicationMenuStage {\n position: relative;\n min-height: 0;\n flex: 1 1 auto;\n overflow: hidden;\n}\n\n.applicationMenuTrack {\n display: flex;\n flex-flow: row nowrap;\n height: 100%;\n transform: translateX(calc(var(--view-index, 0) * -100%));\n transition: transform var(--application-duration) var(--swift-out);\n will-change: transform;\n}\n\n.applicationMenuPanel {\n display: flex;\n flex: 0 0 100%;\n flex-flow: column;\n width: 100%;\n overflow-y: auto;\n}\n\n.applicationMenuPageIndicator {\n display: flex;\n flex-flow: row nowrap;\n gap: 6px;\n justify-content: center;\n align-items: center;\n padding: 9px 12px;\n background: var(--application-menu-surface);\n z-index: 1;\n}\n\n.applicationMenuPageIndicatorDot {\n height: 6px;\n width: 6px;\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 1.5px solid var(--application-menu-surface-stroke);\n border-radius: 50%;\n transition: 200ms var(--swift-out);\n transition-property: background, border-color, transform;\n\n @include mixin.hover {\n border-color: var(--foreground-secondary);\n transform: scale(1.2);\n }\n\n @include mixin.focus-ring;\n}\n\n.applicationMenuPageIndicatorDotActive {\n background: var(--foreground-prominent);\n border-color: var(--foreground-prominent);\n}\n\n/**\n * No visual animation on enter/leave — just hold the leaving panel in\n * the DOM for the duration of the slider's translate transition so it\n * stays visible while the track slides away from it. Without this the\n * v-for would unmount the panel the moment matches shrinks, leaving\n * the slider sliding over an empty track.\n */\n.applicationMenuPanelEnterActive,\n.applicationMenuPanelEnterFrom,\n.applicationMenuPanelLeaveActive,\n.applicationMenuPanelLeaveTo {\n transition: opacity var(--application-duration) var(--swift-out);\n}\n\n.applicationMenuPanelLeaveActive {\n pointer-events: none;\n}\n\n.applicationMenu :local(.divider) {\n margin: 3px 12px;\n}\n\n.applicationMenu :local(.dividerContent)::before,\n.applicationMenu :local(.dividerContent)::after,\n.applicationMenu :local(.dividerLine) {\n background: var(--application-menu-surface-stroke);\n}\n\n.applicationMenu :local(.menuSubHeader) {\n --surface: var(--application-menu-surface);\n}\n\n.applicationMenu :local(.menuItem) {\n position: relative;\n\n @include mixin.hover {\n background: var(--gray-200);\n }\n\n &:active {\n background: var(--gray-300);\n }\n\n &::before {\n position: absolute;\n display: block;\n content: '';\n top: 50%;\n right: 0;\n height: 1em;\n width: 3px;\n background: var(--foreground-secondary);\n border-radius: var(--radius);\n opacity: 0;\n transition: 300ms var(--swift-out);\n transition-property: height, opacity;\n translate: 8px -50%;\n }\n}\n\n.applicationMenu :local(.menuItemIcon) {\n color: var(--foreground-secondary);\n}\n\n.applicationMenu :local(.menuItemLabel) {\n transition: var(--application-duration) var(--swift-out);\n transition-property: filter, opacity, translate;\n white-space: nowrap;\n}\n\n.applicationMenu :local(.menuItemActive) {\n background: var(--gray-200);\n color: var(--foreground-prominent);\n\n &::before {\n height: 1.6em;\n opacity: 1;\n }\n}\n\n.applicationMenu :local(.menuItemActive) :local(.menuItemIcon) {\n color: var(--foreground);\n}\n\n.applicationMenu :local(.menuItemActive) :local(.menuItemLabel) {\n font-weight: 500;\n}\n\n.applicationMenuAccount {\n position: relative;\n\n pointer-events: none;\n}\n\n.applicationMenuAccountSwitcher {\n composes: applicationMenuAccount;\n\n pointer-events: auto;\n}\n\n.applicationMenuAccount :local(.menuItemLabel) {\n font-weight: 600;\n}\n\n.applicationMenuAccount :local(.avatar) {\n margin: -5px;\n font-size: 30px;\n}\n\n.applicationMenuContext {\n display: flex;\n margin-top: -12px;\n margin-left: -12px;\n margin-right: -12px;\n padding: 15px;\n flex-flow: row nowrap;\n gap: 15px;\n border: 1px solid var(--application-menu-surface-stroke);\n border-top: 0;\n border-left: 0;\n border-right: 0;\n}\n\n.applicationMenuContextContent {\n display: flex;\n align-self: center;\n flex-flow: column;\n\n :global(strong) {\n color: var(--foreground-prominent);\n }\n\n :global(span) {\n color: var(--foreground-secondary);\n font-size: 14px;\n }\n}\n\n.applicationMenuContextPill {\n position: relative;\n display: flex;\n flex-flow: row nowrap;\n gap: 9px;\n align-items: center;\n margin: -3px -6px 6px;\n padding: 9px 12px;\n cursor: pointer;\n color: var(--foreground-secondary);\n background: transparent;\n border: 1px solid var(--application-menu-surface-stroke);\n border-radius: var(--radius);\n transition: background 200ms var(--swift-out);\n\n @include mixin.hover {\n background: var(--gray-200);\n }\n\n &:active {\n background: var(--gray-300);\n }\n\n @include mixin.focus-ring;\n}\n\n.applicationMenuContextPillContent {\n display: flex;\n flex: 1 1 auto;\n flex-flow: column;\n min-width: 0;\n\n :global(strong) {\n font-weight: 500;\n font-size: 14px;\n line-height: 1.2;\n white-space: nowrap;\n overflow: hidden;\n color: var(--foreground-prominent);\n text-overflow: ellipsis;\n transition: var(--application-duration) var(--swift-out);\n transition-property: filter, opacity, translate;\n }\n\n :global(span) {\n font-size: 12px;\n line-height: 1.2;\n white-space: nowrap;\n overflow: hidden;\n color: var(--foreground-secondary);\n text-overflow: ellipsis;\n transition: var(--application-duration) var(--swift-out);\n transition-property: filter, opacity, translate;\n }\n}\n\n.applicationMenuPromo {\n display: flex;\n padding: 12px;\n flex-flow: row;\n gap: 12px;\n background: var(--gray-25);\n border: 1px solid var(--application-menu-surface-stroke);\n border-radius: var(--radius);\n}\n\n.applicationMenuPromo > :local(.icon) {\n margin: 2px;\n color: var(--gray-600);\n font-size: 16px;\n}\n\n.applicationMenuPromoContent {\n display: flex;\n flex-flow: column;\n gap: 6px;\n font-size: 14px;\n}\n\n.applicationMenuPromoContent :global(a) {\n color: var(--gray-700);\n}\n\n.applicationMenuToggle:local(.menuItem) {\n height: min-content;\n align-self: center;\n color: var(--foreground);\n flex-grow: 0;\n flex-shrink: 0;\n}\n\n.applicationMenuToggleIcon {\n height: 1em;\n width: 1em;\n flex-shrink: 0;\n font-size: 18px;\n line-height: 1;\n overflow: visible;\n\n :global(path) {\n fill: currentColor;\n }\n}\n\n@include mixin.breakpoint-up(lg) {\n .applicationMenu[data-collapsed][data-collapsible] {\n width: var(--application-menu-width-collapsed);\n\n :local(.menuItemLabel) {\n filter: blur(6px);\n opacity: 0;\n translate: -12px 0;\n }\n\n .applicationMenuPromo,\n .applicationMenuContext {\n opacity: 0;\n pointer-events: none;\n }\n\n .applicationMenuContextPillContent :global(strong),\n .applicationMenuContextPillContent :global(span) {\n filter: blur(6px);\n opacity: 0;\n translate: -12px 0;\n }\n }\n}\n\n@include mixin.breakpoint-down(md) {\n .applicationMenu {\n width: min(300px, calc(100dvw - 42px));\n z-index: 2000;\n }\n\n .applicationMenu[data-collapsed] {\n translate: -100% 0;\n }\n}\n","<template>\n <aside\n :class=\"$style.applicationMenu\"\n :data-collapsed=\"isMenuCollapsed ? '' : undefined\"\n :data-collapsible=\"showDesktopMenuToggle ? '' : undefined\">\n <FluxMenu\n v-if=\"slots.header\"\n :class=\"$style.applicationMenuHeader\">\n <slot name=\"header\"/>\n </FluxMenu>\n\n <div :class=\"$style.applicationMenuStage\">\n <div\n :class=\"$style.applicationMenuTrack\"\n :style=\"{'--view-index': viewIndex}\">\n <FluxMenu :class=\"$style.applicationMenuPanel\">\n <slot/>\n </FluxMenu>\n\n <slot name=\"context\"/>\n </div>\n </div>\n\n <nav\n v-if=\"showPageIndicator && totalLevels > 1\"\n :class=\"$style.applicationMenuPageIndicator\"\n aria-label=\"Menu levels\">\n <button\n v-for=\"level in totalLevels\"\n :key=\"level - 1\"\n type=\"button\"\n :class=\"[\n $style.applicationMenuPageIndicatorDot,\n (level - 1) === viewIndex && $style.applicationMenuPageIndicatorDotActive\n ]\"\n :aria-current=\"(level - 1) === viewIndex ? 'true' : undefined\"\n :aria-label=\"(level - 1) === 0 ? 'Hoofdmenu' : `Niveau ${level - 1}`\"\n @click=\"goToLevel(level - 1)\"/>\n </nav>\n\n <FluxMenu\n v-if=\"slots.footer\"\n :class=\"$style.applicationMenuFooter\"\n :data-hidden=\"!isMainMenuVisible ? '' : undefined\">\n <slot name=\"footer\"/>\n </FluxMenu>\n </aside>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenu } from '@flux-ui/components';\n import { type VNode } from 'vue';\n import { useApplicationInjection, useApplicationMenu } from '../composable';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const {\n showPageIndicator = true\n } = defineProps<{\n readonly showPageIndicator?: boolean;\n }>();\n\n const slots = defineSlots<{\n default(): VNode;\n context?(): VNode;\n footer?(): VNode;\n header?(): VNode;\n }>();\n\n const {isMenuCollapsed, showDesktopMenuToggle} = useApplicationInjection();\n const {goToLevel, isMainMenuVisible, totalLevels, viewIndex} = useApplicationMenu();\n</script>\n","<template>\n <aside\n :class=\"$style.applicationMenu\"\n :data-collapsed=\"isMenuCollapsed ? '' : undefined\"\n :data-collapsible=\"showDesktopMenuToggle ? '' : undefined\">\n <FluxMenu\n v-if=\"slots.header\"\n :class=\"$style.applicationMenuHeader\">\n <slot name=\"header\"/>\n </FluxMenu>\n\n <div :class=\"$style.applicationMenuStage\">\n <div\n :class=\"$style.applicationMenuTrack\"\n :style=\"{'--view-index': viewIndex}\">\n <FluxMenu :class=\"$style.applicationMenuPanel\">\n <slot/>\n </FluxMenu>\n\n <slot name=\"context\"/>\n </div>\n </div>\n\n <nav\n v-if=\"showPageIndicator && totalLevels > 1\"\n :class=\"$style.applicationMenuPageIndicator\"\n aria-label=\"Menu levels\">\n <button\n v-for=\"level in totalLevels\"\n :key=\"level - 1\"\n type=\"button\"\n :class=\"[\n $style.applicationMenuPageIndicatorDot,\n (level - 1) === viewIndex && $style.applicationMenuPageIndicatorDotActive\n ]\"\n :aria-current=\"(level - 1) === viewIndex ? 'true' : undefined\"\n :aria-label=\"(level - 1) === 0 ? 'Hoofdmenu' : `Niveau ${level - 1}`\"\n @click=\"goToLevel(level - 1)\"/>\n </nav>\n\n <FluxMenu\n v-if=\"slots.footer\"\n :class=\"$style.applicationMenuFooter\"\n :data-hidden=\"!isMainMenuVisible ? '' : undefined\">\n <slot name=\"footer\"/>\n </FluxMenu>\n </aside>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenu } from '@flux-ui/components';\n import { type VNode } from 'vue';\n import { useApplicationInjection, useApplicationMenu } from '../composable';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const {\n showPageIndicator = true\n } = defineProps<{\n readonly showPageIndicator?: boolean;\n }>();\n\n const slots = defineSlots<{\n default(): VNode;\n context?(): VNode;\n footer?(): VNode;\n header?(): VNode;\n }>();\n\n const {isMenuCollapsed, showDesktopMenuToggle} = useApplicationInjection();\n const {goToLevel, isMainMenuVisible, totalLevels, viewIndex} = useApplicationMenu();\n</script>\n","<template>\n <FluxFlyout is-auto-width>\n <template #opener=\"{open}\">\n <FluxMenuItem\n :class=\"slots.switcher ? $style.applicationMenuAccountSwitcher : $style.applicationMenuAccount\"\n :icon-leading=\"icon\"\n :icon-trailing=\"slots.switcher ? 'angle-down' : undefined\"\n :image-alt=\"imageAlt\"\n :image-src=\"imageSrc\"\n :label=\"label\"\n @click=\"slots.switcher && open()\">\n <template\n v-if=\"slots.avatar\"\n #before>\n <slot name=\"avatar\"/>\n </template>\n </FluxMenuItem>\n </template>\n\n <template v-if=\"slots.switcher\">\n <FluxPane>\n <slot name=\"switcher\"/>\n </FluxPane>\n </template>\n </FluxFlyout>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxFlyout, FluxMenuItem, FluxPane } from '@flux-ui/components';\n import type { FluxIconName } from '@flux-ui/types';\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n readonly imageAlt?: string;\n readonly imageSrc?: string;\n readonly label: string;\n }>();\n\n const slots = defineSlots<{\n avatar?(): VNode;\n switcher?(): VNode;\n }>();\n</script>\n","<template>\n <FluxFlyout is-auto-width>\n <template #opener=\"{open}\">\n <FluxMenuItem\n :class=\"slots.switcher ? $style.applicationMenuAccountSwitcher : $style.applicationMenuAccount\"\n :icon-leading=\"icon\"\n :icon-trailing=\"slots.switcher ? 'angle-down' : undefined\"\n :image-alt=\"imageAlt\"\n :image-src=\"imageSrc\"\n :label=\"label\"\n @click=\"slots.switcher && open()\">\n <template\n v-if=\"slots.avatar\"\n #before>\n <slot name=\"avatar\"/>\n </template>\n </FluxMenuItem>\n </template>\n\n <template v-if=\"slots.switcher\">\n <FluxPane>\n <slot name=\"switcher\"/>\n </FluxPane>\n </template>\n </FluxFlyout>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxFlyout, FluxMenuItem, FluxPane } from '@flux-ui/components';\n import type { FluxIconName } from '@flux-ui/types';\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n readonly imageAlt?: string;\n readonly imageSrc?: string;\n readonly label: string;\n }>();\n\n const slots = defineSlots<{\n avatar?(): VNode;\n switcher?(): VNode;\n }>();\n</script>\n","import { inject, onBeforeUnmount, onMounted, watch } from 'vue';\nimport { type FluxApplicationContextInfo, FluxApplicationInjectionKey } from '../data';\n\nexport default function (info: () => Omit<FluxApplicationContextInfo, 'id'>): void {\n const injection = inject(FluxApplicationInjectionKey, null);\n\n if (!injection) {\n return;\n }\n\n const id = Symbol('application-context');\n\n onMounted(() => {\n injection.pushContext({id, ...info()});\n });\n\n watch(info, next => {\n injection.removeContext(id);\n injection.pushContext({id, ...next});\n });\n\n onBeforeUnmount(() => {\n injection.removeContext(id);\n });\n}\n","<template>\n <div :class=\"$style.applicationMenuContext\">\n <FluxSecondaryButton\n icon-leading=\"angle-left\"\n size=\"small\"\n :tabindex=\"tabindex\"\n :href=\"canSlide ? undefined : href\"\n :rel=\"rel\"\n :target=\"target\"\n :to=\"canSlide ? undefined : to\"\n :type=\"canSlide ? 'button' : type\"\n @click=\"onBack\"/>\n\n <div :class=\"$style.applicationMenuContextContent\">\n <strong>{{ title }}</strong>\n <span v-if=\"subtitle\">{{ subtitle }}</span>\n </div>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxSecondaryButton } from '@flux-ui/components';\n import type { FluxPressableType, FluxTo } from '@flux-ui/types';\n import { computed, inject } from 'vue';\n import { matchedRouteKey } from 'vue-router';\n import { FluxApplicationInjectionKey } from '../data';\n import useApplicationContextRegistration from '../composable/useApplicationContextRegistration';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const props = defineProps<{\n readonly subtitle?: string;\n readonly title: string;\n readonly tabindex?: string | number;\n readonly href?: string;\n readonly rel?: string;\n readonly target?: string;\n readonly to?: FluxTo;\n readonly entryTo?: FluxTo;\n readonly type?: FluxPressableType;\n }>();\n\n const injection = inject(FluxApplicationInjectionKey, null);\n const matchedRoute = inject(matchedRouteKey, null);\n\n const canSlide = computed(() => {\n if (!injection) {\n return false;\n }\n return injection.viewIndex.value > 0;\n });\n\n const autoEntryTo = computed<FluxTo | undefined>(() => {\n const record = matchedRoute?.value;\n\n if (!record || typeof record.name !== 'string') {\n return undefined;\n }\n\n return {name: record.name};\n });\n\n function onBack(): void {\n if (canSlide.value && injection) {\n injection.goToParent();\n }\n }\n\n useApplicationContextRegistration(() => ({\n title: props.title,\n subtitle: props.subtitle,\n to: props.to,\n entryTo: props.entryTo ?? autoEntryTo.value,\n href: props.href,\n type: props.type\n }));\n</script>\n","<template>\n <div :class=\"$style.applicationMenuContext\">\n <FluxSecondaryButton\n icon-leading=\"angle-left\"\n size=\"small\"\n :tabindex=\"tabindex\"\n :href=\"canSlide ? undefined : href\"\n :rel=\"rel\"\n :target=\"target\"\n :to=\"canSlide ? undefined : to\"\n :type=\"canSlide ? 'button' : type\"\n @click=\"onBack\"/>\n\n <div :class=\"$style.applicationMenuContextContent\">\n <strong>{{ title }}</strong>\n <span v-if=\"subtitle\">{{ subtitle }}</span>\n </div>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxSecondaryButton } from '@flux-ui/components';\n import type { FluxPressableType, FluxTo } from '@flux-ui/types';\n import { computed, inject } from 'vue';\n import { matchedRouteKey } from 'vue-router';\n import { FluxApplicationInjectionKey } from '../data';\n import useApplicationContextRegistration from '../composable/useApplicationContextRegistration';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const props = defineProps<{\n readonly subtitle?: string;\n readonly title: string;\n readonly tabindex?: string | number;\n readonly href?: string;\n readonly rel?: string;\n readonly target?: string;\n readonly to?: FluxTo;\n readonly entryTo?: FluxTo;\n readonly type?: FluxPressableType;\n }>();\n\n const injection = inject(FluxApplicationInjectionKey, null);\n const matchedRoute = inject(matchedRouteKey, null);\n\n const canSlide = computed(() => {\n if (!injection) {\n return false;\n }\n return injection.viewIndex.value > 0;\n });\n\n const autoEntryTo = computed<FluxTo | undefined>(() => {\n const record = matchedRoute?.value;\n\n if (!record || typeof record.name !== 'string') {\n return undefined;\n }\n\n return {name: record.name};\n });\n\n function onBack(): void {\n if (canSlide.value && injection) {\n injection.goToParent();\n }\n }\n\n useApplicationContextRegistration(() => ({\n title: props.title,\n subtitle: props.subtitle,\n to: props.to,\n entryTo: props.entryTo ?? autoEntryTo.value,\n href: props.href,\n type: props.type\n }));\n</script>\n","<template>\n <TransitionGroup\n :enter-active-class=\"$style.applicationMenuPanelEnterActive\"\n :enter-from-class=\"$style.applicationMenuPanelEnterFrom\"\n :leave-active-class=\"$style.applicationMenuPanelLeaveActive\"\n :leave-to-class=\"$style.applicationMenuPanelLeaveTo\">\n <FluxMenu\n v-for=\"match in matches\"\n :key=\"match.record.path\"\n :class=\"$style.applicationMenuPanel\">\n <ScopedRouterView\n :depth=\"match.depth\"\n :view-name=\"name\"/>\n </FluxMenu>\n </TransitionGroup>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenu } from '@flux-ui/components';\n import { defineComponent, h, provide, ref, toRef, type VNode } from 'vue';\n import { RouterView, viewDepthKey } from 'vue-router';\n import useNamedRoutes from '../routing/useNamedRoutes';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const {\n name = 'menu'\n } = defineProps<{\n readonly name?: string;\n }>();\n\n const matches = useNamedRoutes(toRef(() => name));\n\n const ScopedRouterView = defineComponent({\n name: 'FluxApplicationMenuScopedRouterView',\n props: {\n depth: {\n type: Number,\n required: true\n },\n viewName: {\n type: String,\n required: true\n }\n },\n setup(props): () => VNode {\n provide(viewDepthKey, ref(props.depth));\n\n return () => h(RouterView, {name: props.viewName});\n }\n });\n</script>\n","<template>\n <TransitionGroup\n :enter-active-class=\"$style.applicationMenuPanelEnterActive\"\n :enter-from-class=\"$style.applicationMenuPanelEnterFrom\"\n :leave-active-class=\"$style.applicationMenuPanelLeaveActive\"\n :leave-to-class=\"$style.applicationMenuPanelLeaveTo\">\n <FluxMenu\n v-for=\"match in matches\"\n :key=\"match.record.path\"\n :class=\"$style.applicationMenuPanel\">\n <ScopedRouterView\n :depth=\"match.depth\"\n :view-name=\"name\"/>\n </FluxMenu>\n </TransitionGroup>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenu } from '@flux-ui/components';\n import { defineComponent, h, provide, ref, toRef, type VNode } from 'vue';\n import { RouterView, viewDepthKey } from 'vue-router';\n import useNamedRoutes from '../routing/useNamedRoutes';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const {\n name = 'menu'\n } = defineProps<{\n readonly name?: string;\n }>();\n\n const matches = useNamedRoutes(toRef(() => name));\n\n const ScopedRouterView = defineComponent({\n name: 'FluxApplicationMenuScopedRouterView',\n props: {\n depth: {\n type: Number,\n required: true\n },\n viewName: {\n type: String,\n required: true\n }\n },\n setup(props): () => VNode {\n provide(viewDepthKey, ref(props.depth));\n\n return () => h(RouterView, {name: props.viewName});\n }\n });\n</script>\n","<template>\n <div :class=\"$style.applicationMenuPromo\">\n <FluxIcon\n v-if=\"icon\"\n :name=\"icon\"/>\n\n <div :class=\"$style.applicationMenuPromoContent\">\n <slot/>\n </div>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxIcon } from '@flux-ui/components';\n import type { FluxIconName } from '@flux-ui/types';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n }>();\n</script>\n","<template>\n <div :class=\"$style.applicationMenuPromo\">\n <FluxIcon\n v-if=\"icon\"\n :name=\"icon\"/>\n\n <div :class=\"$style.applicationMenuPromoContent\">\n <slot/>\n </div>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxIcon } from '@flux-ui/components';\n import type { FluxIconName } from '@flux-ui/types';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n }>();\n</script>\n","<template>\n <FluxMenuItem\n :class=\"$style.applicationMenuToggle\"\n @click=\"isMenuCollapsed = !isMenuCollapsed\">\n <template #before>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 18 18\"\n :class=\"$style.applicationMenuToggleIcon\">\n <path\n fill-rule=\"evenodd\"\n d=\"M0 15V3a3 3 0 0 1 3-3h3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a3.04 3.04 0 0 1-3-3M2 3a1 1 0 0 1 1-1h2v14H3a1 1 0 0 1-1-1z\"\n clip-rule=\"evenodd\"/>\n\n <path d=\"M16 15V3a1 1 0 0 0-1-1h-5a1 1 0 0 1 0-2h5c1.63.04 3 1.33 3 3v12a3.07 3.07 0 0 1-3 3h-5a1 1 0 1 1 0-2h5a1 1 0 0 0 1-1\"/>\n </svg>\n </template>\n </FluxMenuItem>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenuItem } from '@flux-ui/components';\n import { useApplicationInjection } from '../composable';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const {isMenuCollapsed} = useApplicationInjection();\n</script>\n","<template>\n <FluxMenuItem\n :class=\"$style.applicationMenuToggle\"\n @click=\"isMenuCollapsed = !isMenuCollapsed\">\n <template #before>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 18 18\"\n :class=\"$style.applicationMenuToggleIcon\">\n <path\n fill-rule=\"evenodd\"\n d=\"M0 15V3a3 3 0 0 1 3-3h3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a3.04 3.04 0 0 1-3-3M2 3a1 1 0 0 1 1-1h2v14H3a1 1 0 0 1-1-1z\"\n clip-rule=\"evenodd\"/>\n\n <path d=\"M16 15V3a1 1 0 0 0-1-1h-5a1 1 0 0 1 0-2h5c1.63.04 3 1.33 3 3v12a3.07 3.07 0 0 1-3 3h-5a1 1 0 1 1 0-2h5a1 1 0 0 0 1-1\"/>\n </svg>\n </template>\n </FluxMenuItem>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenuItem } from '@flux-ui/components';\n import { useApplicationInjection } from '../composable';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const {isMenuCollapsed} = useApplicationInjection();\n</script>\n","@use '$flux/css/mixin';\n\n.applicationSection {\n display: flex;\n flex-flow: column;\n gap: 21px;\n}\n\n.applicationSectionHeader {\n display: flex;\n align-items: center;\n flex-flow: row;\n gap: 21px;\n\n :global(h2) {\n flex-grow: 1;\n color: var(--foreground-prominent);\n }\n}\n\n.applicationSectionInfo {\n font-size: 14px;\n color: var(--foreground-secondary);\n}\n\n.applicationSectionContent {\n display: flex;\n flex-flow: column;\n flex-grow: 1;\n gap: 21px;\n}\n\n:local(.gridColumn) > .applicationSection {\n min-height: 100%;\n}\n\n@include mixin.breakpoint-down(md) {\n .applicationSectionHeader {\n align-items: flex-start;\n flex-flow: column;\n gap: 0;\n }\n}\n","<template>\n <section :class=\"$style.applicationSection\">\n <header\n v-if=\"title || info || slots.end\"\n :class=\"$style.applicationSectionHeader\">\n <h2 v-if=\"title\">\n {{ title }}\n </h2>\n\n <slot name=\"end\"/>\n\n <span\n v-if=\"info\"\n :class=\"$style.applicationSectionInfo\">\n {{ info }}\n </span>\n </header>\n\n <div :class=\"$style.applicationSectionContent\">\n <slot/>\n </div>\n </section>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationSection.module.scss';\n\n defineProps<{\n readonly title?: string;\n readonly info?: string;\n }>();\n\n const slots = defineSlots<{\n default(): VNode;\n end?(): VNode;\n }>();\n</script>\n","<template>\n <section :class=\"$style.applicationSection\">\n <header\n v-if=\"title || info || slots.end\"\n :class=\"$style.applicationSectionHeader\">\n <h2 v-if=\"title\">\n {{ title }}\n </h2>\n\n <slot name=\"end\"/>\n\n <span\n v-if=\"info\"\n :class=\"$style.applicationSectionInfo\">\n {{ info }}\n </span>\n </header>\n\n <div :class=\"$style.applicationSectionContent\">\n <slot/>\n </div>\n </section>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationSection.module.scss';\n\n defineProps<{\n readonly title?: string;\n readonly info?: string;\n }>();\n\n const slots = defineSlots<{\n default(): VNode;\n end?(): VNode;\n }>();\n</script>\n","@use '$flux/css/mixin';\n\n.applicationSide {\n position: fixed;\n display: flex;\n top: 0;\n right: 0;\n height: 100dvh;\n width: var(--application-side-width);\n flex-flow: column;\n background: var(--surface);\n border-left: 1px solid var(--surface-stroke);\n overflow: hidden;\n z-index: 500;\n}\n\n@include mixin.breakpoint-down(lg) {\n .applicationSide {\n display: none;\n }\n}\n","<template>\n <aside :class=\"$style.applicationSide\">\n <slot/>\n </aside>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationSide.module.scss';\n\n defineSlots<{\n default(): VNode;\n }>();\n</script>\n","<template>\n <aside :class=\"$style.applicationSide\">\n <slot/>\n </aside>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationSide.module.scss';\n\n defineSlots<{\n default(): VNode;\n }>();\n</script>\n","@use '$flux/css/mixin';\n\n.applicationTop {\n position: sticky;\n top: 0;\n background: rgb(from var(--surface) r g b / .975);\n background-clip: padding-box;\n backdrop-filter: blur(3px) saturate(180%);\n border-bottom: 1px solid transparent;\n transition: 300ms var(--swift-out);\n transition-property: border-color, box-shadow;\n z-index: 400;\n}\n\n.applicationTopScrolled {\n composes: applicationTop;\n\n border-bottom-color: var(--surface-stroke-out);\n box-shadow: var(--shadow-lg);\n}\n\n.applicationTopBar {\n display: flex;\n height: var(--application-top-height);\n padding-left: 21px;\n padding-right: 21px;\n align-items: center;\n flex-flow: row;\n gap: 15px;\n color: var(--foreground-prominent);\n}\n\n.applicationTopBarTitle {\n font-size: 16px;\n font-weight: 700;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.applicationTopBar > :local(.separator) {\n height: 18px;\n}\n\n@include mixin.breakpoint-up(lg) {\n .applicationTopMenuToggleHidden {\n display: none;\n }\n}\n\n.applicationTopTabs {\n position: relative;\n display: flex;\n margin-top: -6px;\n margin-left: auto;\n margin-right: auto;\n flex-flow: row;\n gap: 21px;\n\n :local(.tabBar) {\n --tab-padding: 18px;\n\n width: 100%;\n box-shadow: unset;\n }\n}\n\n.applicationTopTabsDefault,\n.applicationTopTabsDashboard {\n composes: applicationTopTabs;\n\n width: min(1620px, 100% - 42px);\n}\n\n.applicationTopTabsFull {\n composes: applicationTopTabs;\n\n width: calc(100% - 42px);\n}\n\n.applicationTopTabsMedium {\n composes: applicationTopTabs;\n\n width: min(1280px, 100% - 42px);\n}\n\n.applicationTopTabsNarrow {\n composes: applicationTopTabs;\n\n width: min(840px, 100% - 42px);\n}\n\n@include mixin.breakpoint-down(md) {\n .applicationTop,\n .applicationTopScrolled {\n padding-top: env(safe-area-inset-top);\n }\n\n .applicationTopBar > :local(.icon) {\n display: none;\n }\n\n .applicationMenuToggle {\n margin-left: -12px;\n margin-right: -15px;\n }\n}\n\n.applicationTop:has(+ .applicationContentFull > :local(.table)) {\n border-bottom-color: var(--surface-stroke-out);\n}\n","<template>\n <header :class=\"y > 1 ? $style.applicationTopScrolled : $style.applicationTop\">\n <div :class=\"$style.applicationTopBar\">\n <FluxApplicationMenuToggle :class=\"!showDesktopMenuToggle && $style.applicationTopMenuToggleHidden\"/>\n\n <slot name=\"start\"/>\n\n <FluxFadeTransition>\n <FluxIcon\n v-if=\"icon\"\n :key=\"icon\"\n :name=\"icon\"/>\n </FluxFadeTransition>\n\n <FluxFadeTransition>\n <span\n v-if=\"title\"\n :key=\"title\"\n :class=\"$style.applicationTopBarTitle\">\n {{ title }}\n </span>\n </FluxFadeTransition>\n\n <FluxSpacer/>\n\n <slot name=\"end\"/>\n </div>\n\n <FluxRouteTransition>\n <div\n v-if=\"slots.tabs\"\n :class=\"clsx(\n layout === 'default' && $style.applicationTopTabsDefault,\n layout === 'dashboard' && $style.applicationTopTabsDashboard,\n layout === 'full' && $style.applicationTopTabsFull,\n layout === 'medium' && $style.applicationTopTabsMedium,\n layout === 'narrow' && $style.applicationTopTabsNarrow\n )\">\n <FluxTabBar>\n <slot name=\"tabs\"/>\n </FluxTabBar>\n </div>\n\n <div v-else/>\n </FluxRouteTransition>\n </header>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxFadeTransition, FluxIcon, FluxRouteTransition, FluxSpacer, FluxTabBar } from '@flux-ui/components';\n import { useScrollPosition } from '@flux-ui/internals';\n import type { FluxIconName } from '@flux-ui/types';\n import clsx from 'clsx';\n import type { VNode } from 'vue';\n import { useApplicationInjection } from '../composable';\n import FluxApplicationMenuToggle from './FluxApplicationMenuToggle.vue';\n import $style from '../css/component/ApplicationTop.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n readonly title?: string;\n }>();\n\n const slots = defineSlots<{\n end?(): VNode;\n start?(): VNode;\n tabs?(): VNode;\n }>();\n\n const {layout, showDesktopMenuToggle} = useApplicationInjection();\n const {y} = useScrollPosition();\n</script>\n","<template>\n <header :class=\"y > 1 ? $style.applicationTopScrolled : $style.applicationTop\">\n <div :class=\"$style.applicationTopBar\">\n <FluxApplicationMenuToggle :class=\"!showDesktopMenuToggle && $style.applicationTopMenuToggleHidden\"/>\n\n <slot name=\"start\"/>\n\n <FluxFadeTransition>\n <FluxIcon\n v-if=\"icon\"\n :key=\"icon\"\n :name=\"icon\"/>\n </FluxFadeTransition>\n\n <FluxFadeTransition>\n <span\n v-if=\"title\"\n :key=\"title\"\n :class=\"$style.applicationTopBarTitle\">\n {{ title }}\n </span>\n </FluxFadeTransition>\n\n <FluxSpacer/>\n\n <slot name=\"end\"/>\n </div>\n\n <FluxRouteTransition>\n <div\n v-if=\"slots.tabs\"\n :class=\"clsx(\n layout === 'default' && $style.applicationTopTabsDefault,\n layout === 'dashboard' && $style.applicationTopTabsDashboard,\n layout === 'full' && $style.applicationTopTabsFull,\n layout === 'medium' && $style.applicationTopTabsMedium,\n layout === 'narrow' && $style.applicationTopTabsNarrow\n )\">\n <FluxTabBar>\n <slot name=\"tabs\"/>\n </FluxTabBar>\n </div>\n\n <div v-else/>\n </FluxRouteTransition>\n </header>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxFadeTransition, FluxIcon, FluxRouteTransition, FluxSpacer, FluxTabBar } from '@flux-ui/components';\n import { useScrollPosition } from '@flux-ui/internals';\n import type { FluxIconName } from '@flux-ui/types';\n import clsx from 'clsx';\n import type { VNode } from 'vue';\n import { useApplicationInjection } from '../composable';\n import FluxApplicationMenuToggle from './FluxApplicationMenuToggle.vue';\n import $style from '../css/component/ApplicationTop.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n readonly title?: string;\n }>();\n\n const slots = defineSlots<{\n end?(): VNode;\n start?(): VNode;\n tabs?(): VNode;\n }>();\n\n const {layout, showDesktopMenuToggle} = useApplicationInjection();\n const {y} = useScrollPosition();\n</script>\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,142],"mappings":";;;;AAAw+F,SAASA,IAAE,GAAE;CAAC,IAAI,IAAE,EAAE;AAAC,IAAE;AAAC,MAAG,EAAE,SAAO,GAAG;AAAM,OAAI,IAAG,CAAC,GAAE,MAAK,OAAO,QAAQ,OAAO,0BAA0B,EAAE,UAAU,CAAC,CAAC;GAAC;GAAc;GAAQ;GAAS,CAAC,SAAS,EAAE,IAAE,CAAC,EAAE,OAAK,CAAC,EAAE,QAAM,EAAE,KAAG;UAAS,IAAE,OAAO,eAAe,EAAE;AAAE,QAAO;;AAAupV,SAASC,IAAE,GAAE,GAAE,GAAE;AAAC,GAAE,UAAU,KAAG;;AAAE,SAASC,IAAE,GAAE,GAAE,GAAE;AAAC,QAAO,eAAe,GAAE,GAAE,EAAC,OAAM,GAAE,CAAC;;;;ACAp8b,IAAM,eAAe,OAAO,QAAQ;AACnC,KAAI,OAAO,UAAU,SAAU;AAG/B,KAAI,QAAQ,EACX,QAAO;EACN,MAAM;EACN,IAAM,SAAS,IAAK,KAAS,SAAS,IAAK,OAAS;EACpD,IAAM,SAAS,IAAK,KAAQ,QAAQ,OAAS;EAC7C,IAAK,QAAQ,KAAS,SAAS,IAAK,OAAS;EAC7C;AAIF,KAAI,QAAQ,EACX,QAAO;E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AAA,OAAM,KAAA,aAAkB,MAAA,8BAAM,CAAC,2BAA+C,MAAA,OAAM,KAAA,eAAoB,MAAA,8BAAM,CAAC,6BAAiD,MAAA,OAAM,KAAA,UAAe,MAAA,8BAAM,CAAC,wBAA4C,MAAA,OAAM,KAAA,YAAiB,MAAA,8BAAM,CAAC,0BAA8C,MAAA,OAAM,KAAA,YAAiB,MAAA,8BAAM,CAAC,yBAAA,CAAA;QAOpX,YAEa,MAAA,WAAA,EAAA,MAAA;4BADU,CAAnB,WAAmB,KAAA,QAAA,OAAA,CAAA,CAAA;;6BAI3B,mBAAa,OAAA,WAAA,EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["x","G","K","num","hue","c","num","c","definition","linearize","gamma","fn","fn","definition","rgb","definition","k","e","k","e","fn","e","k","f","e","k","definition","definition","definition","hue","c","definition","definition","definition","parseHwb","definition","p","d0","n","p","n","definition","definition","k","k","f","k","definition","definition","lab","definition","definition","lch","u_fn","v_fn","un","vn","k","k","definition","definition","rgb","definition","modeHsl","modeHsv","definition","lab","definition","lch","definition","rgb","gamma","linearize","definition","rgb","α","β","definition","rgb","transfer","definition","definition","definition","modeA98","modeCubehelix","modeDlab","modeDlch","modeHsi","modeHsl","modeHsv","modeHwb","modeItp","modeJab","modeJch","modeLab","modeLab65","modeLch","modeLch65","modeLchuv","modeLrgb","modeLuv","modeOklab","modeOklch","modeP3","modeProphoto","modeRec2020","modeRgb","modeXyb","modeXyz50","modeXyz65","modeYiq","h","y","x","C","O","k","A","fe","pe","a","o","n","i","r","#e","#t","#n","#r","#i","e","f","u","p","f","d"],"sources":["../../../node_modules/.bun/@basmilius+utils@3.20.2/node_modules/@basmilius/utils/dist/index.mjs","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseNumber.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/colors/named.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseNamed.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseHex.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/util/regex.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseRgbLegacy.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/_prepare.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/converter.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/modes.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/parse.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseTransparent.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/interpolate/lerp.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/interpolate/piecewise.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/interpolate/linear.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/fixup/alpha.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/a98/convertA98ToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/a98/convertXyz65ToA98.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lrgb/convertRgbToLrgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/convertRgbToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lrgb/convertLrgbToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/convertXyz65ToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/a98/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/util/normalizeHue.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/fixup/hue.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/cubehelix/constants.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/cubehelix/convertRgbToCubehelix.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/cubehelix/convertCubehelixToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/difference.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/average.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/cubehelix/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch/convertLabToLch.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch/convertLchToLab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/constants.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/constants.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertLab65ToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertLab65ToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertXyz65ToLab65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertRgbToLab65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlch/constants.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlch/convertDlchToLab65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlch/convertLab65ToDlch.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlab/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlch/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsi/convertHsiToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsi/convertRgbToHsi.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsi/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/convertHslToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/convertRgbToHsl.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/util/hue.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/parseHslLegacy.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/parseHsl.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsv/convertHsvToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsv/convertRgbToHsv.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsv/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hwb/convertHwbToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hwb/convertRgbToHwb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hwb/parseHwb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hwb/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hdr/transfer.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/itp/convertItpToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/itp/convertXyz65ToItp.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/itp/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/convertXyz65ToJab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/convertJabToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/convertRgbToJab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/convertJabToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jch/convertJabToJch.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jch/convertJchToJab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jch/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz50/constants.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertLabToXyz50.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz50/convertXyz50ToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertLabToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz50/convertRgbToXyz50.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertXyz50ToLab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertRgbToLab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/parseLab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch/parseLch.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch65/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lchuv/convertLuvToLchuv.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lchuv/convertLchuvToLuv.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/luv/convertXyz50ToLuv.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/luv/convertLuvToXyz50.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lchuv/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lrgb/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/luv/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/convertLrgbToOklab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/convertRgbToOklab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/convertOklabToLrgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/convertOklabToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsl/helpers.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsl/convertOklabToOkhsl.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsl/convertOkhslToOklab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsl/modeOkhsl.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsv/convertOklabToOkhsv.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsv/convertOkhsvToOklab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsv/modeOkhsv.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/parseOklab.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklch/parseOklch.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklch/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/p3/convertP3ToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/p3/convertXyz65ToP3.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/p3/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/prophoto/convertXyz50ToProphoto.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/prophoto/convertProphotoToXyz50.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/prophoto/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rec2020/convertXyz65ToRec2020.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rec2020/convertRec2020ToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rec2020/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyb/constants.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyb/convertRgbToXyb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyb/convertXybToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyb/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz50/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/convertXyz65ToXyz50.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/convertXyz50ToXyz65.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/yiq/convertRgbToYiq.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/yiq/convertYiqToRgb.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/yiq/definition.js","../../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/index.js","../../../node_modules/.bun/@basmilius+http-client@3.20.2+96a7401e32316653/node_modules/@basmilius/http-client/dist/index.mjs","../../../node_modules/.bun/vue-router@5.0.6+b33d84df931f4fef/node_modules/vue-router/dist/useApi-DtucMc-S.js","../../../node_modules/.bun/vue-router@5.0.6+b33d84df931f4fef/node_modules/vue-router/dist/devtools-BPov6AZY.js","../../../node_modules/.bun/vue-router@5.0.6+b33d84df931f4fef/node_modules/vue-router/dist/vue-router.js","../../../node_modules/.bun/@basmilius+common@3.20.2+86506a35734fb3e7/node_modules/@basmilius/common/dist/index.mjs","../../internals/dist/composable-CJXC7sly.js","../src/data/index.ts","../src/routing/useRoute.ts","../src/routing/useNamedRoutes.ts","../src/css/component/Application.module.scss","../src/component/FluxApplication.vue","../src/component/FluxApplication.vue","../../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../src/composable/useApplicationContextMenu.ts","../src/composable/useApplicationInjection.ts","../src/composable/useApplicationMenu.ts","../src/css/component/ApplicationContent.module.scss","../src/component/FluxApplicationContent.vue","../src/component/FluxApplicationContent.vue","../src/css/component/ApplicationHero.module.scss","../src/component/FluxApplicationHero.vue","../src/component/FluxApplicationHero.vue","../src/css/component/ApplicationMenu.module.scss","../src/component/FluxApplicationMenu.vue","../src/component/FluxApplicationMenu.vue","../src/component/FluxApplicationMenuAccount.vue","../src/component/FluxApplicationMenuAccount.vue","../src/composable/useApplicationContextRegistration.ts","../src/component/FluxApplicationMenuContext.vue","../src/component/FluxApplicationMenuContext.vue","../src/component/FluxApplicationMenuContextStack.vue","../src/component/FluxApplicationMenuContextStack.vue","../src/component/FluxApplicationMenuPromo.vue","../src/component/FluxApplicationMenuPromo.vue","../src/component/FluxApplicationMenuToggle.vue","../src/component/FluxApplicationMenuToggle.vue","../src/css/component/ApplicationSection.module.scss","../src/component/FluxApplicationSection.vue","../src/component/FluxApplicationSection.vue","../src/css/component/ApplicationSide.module.scss","../src/component/FluxApplicationSide.vue","../src/component/FluxApplicationSide.vue","../src/css/component/ApplicationTop.module.scss","../src/component/FluxApplicationTop.vue","../src/component/FluxApplicationTop.vue"],"sourcesContent":["import{DateTime as e}from\"luxon\";function t(e,t){return Math.round(e/t)*t}function n(e,n,r,i){return Math.max(n,Math.min(r,+t(e*(r-n)+n,i).toPrecision(4)))}function r(e){return e.toString().split(`.`)[1]?.length??0}function i(e,t,n){let r=[],i=[],a;return(...o)=>(clearTimeout(a),a=setTimeout(async()=>{try{let t=await e.apply(n,o);r.forEach(e=>e(t))}catch(e){i.forEach(t=>t(e))}r=[],i=[]},t),new Promise((e,t)=>{r.push(e),i.push(t)}))}function a(e,t){if(!e.startsWith(`https://`)&&!e.startsWith(`http://`)&&!e.startsWith(`blob:`))throw Error(`Unsupported URL scheme for download: ${e}`);let n=document.createElement(`a`);n.download=t,n.href=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function o(e,t){let n=URL.createObjectURL(e);a(n,t),URL.revokeObjectURL(n)}function s(e,t,n){o(new Blob([e],{type:n}),t)}function c(e){return e.toLocaleString({year:`numeric`,month:`long`,day:`numeric`})}function l(e){return e.toLocaleString({weekday:`long`,day:`numeric`,month:`long`})}function u(e){return e.toLocaleString({year:`numeric`,month:`long`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function d(e){return e.toLocaleString({month:`long`})}function f(e){return e.toLocaleString({month:`long`,year:`numeric`})}function p(e,t=0){let n=typeof navigator<`u`?navigator.language:`nl-NL`;return new Intl.NumberFormat(n,{maximumFractionDigits:t,minimumFractionDigits:t}).format(e)}function m(e){return new Intl.NumberFormat(navigator.language,{maximumFractionDigits:1,minimumFractionDigits:0,style:`percent`}).format(e)}function h(e){return e.toLocaleString({hour:`2-digit`,minute:`2-digit`})}function g(e,t,n=5,r){let i=[1,5,10,25,50,100,250,500,1e3,2500,5e3,1e4],a=[.1,.5,...i],o=t-e,s=r?a:i;for(let r of s){let i=Math.floor(o/r),a=[];if(!(i>n+1)){a.push(e);for(let t=1;t<i;++t)a.push(t*r+e);return a.push(t),a}}let c=10**(o.toString().length-1),l=[];for(let t=0;t<o;t+=c)l.push(t+e);return l}function _(e){return e.hour>=6&&e.hour<10?`alert`:e.hour>=10&&e.hour<18?`focused`:e.hour>=18&&e.hour<22?`wind_down`:`sleep`}function v(e){return e.hour>=5&&e.hour<12?`morning`:e.hour>=12&&e.hour<17?`afternoon`:e.hour>=17&&e.hour<22?`evening`:`night`}function y(t){let n=e.now();switch(t){case`afternoon`:return[n.set({hour:12,minute:0,second:0,millisecond:0}),n.set({hour:17,minute:0,second:0,millisecond:0})];case`evening`:return[n.set({hour:17,minute:0,second:0,millisecond:0}),n.set({hour:22,minute:0,second:0,millisecond:0})];case`morning`:return[n.set({hour:5,minute:0,second:0,millisecond:0}),n.set({hour:12,minute:0,second:0,millisecond:0})];case`night`:return[n.set({hour:22,minute:0,second:0,millisecond:0}),n.set({hour:22,minute:0,second:0,millisecond:0}).plus({hours:7})]}}function b(e){let t=e.year%100;t%=19,t>9&&(t-=19),t=t*11%30+e.month+e.day,e.month<3&&(t+=2),e.year<2e3?t-=4:t-=8.3,t=Math.floor(t+.5)%30;let n=(t<0?t+30:t)/29.530588853;return n<.03||n>.97?`new_moon`:n<.22?`waxing_crescent`:n<.28?`first_quarter`:n<.47?`waxing_gibbous`:n<.53?`full_moon`:n<.72?`waning_gibbous`:n<.78?`last_quarter`:`waning_crescent`}function x(e){let t={};do{if(e.name===``)break;for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(e.prototype)))[`constructor`,`clone`,`toJSON`].includes(n)||!r.get&&!r.set||(t[n]=r)}while(e=Object.getPrototypeOf(e));return t}const S={af:[`Afghanistan`,33,65],ax:[`Åland Islands`,60.116667,19.9],al:[`Albania`,41,20],dz:[`Algeria`,28,3],as:[`American Samoa`,-14.3333,-170],ad:[`Andorra`,42.5,1.6],ao:[`Angola`,-12.5,18.5],ai:[`Anguilla`,18.25,-63.1667],aq:[`Antarctica`,-90,0],ag:[`Antigua and Barbuda`,17.05,-61.8],ar:[`Argentina`,-34,-64],am:[`Armenia`,40,45],aw:[`Aruba`,12.5,-69.9667],au:[`Australia`,-27,133],at:[`Austria`,47.3333,13.3333],az:[`Azerbaijan`,40.5,47.5],bs:[`Bahamas`,24.25,-76],bh:[`Bahrain`,26,50.55],bd:[`Bangladesh`,24,90],bb:[`Barbados`,13.1667,-59.5333],by:[`Belarus`,53,28],be:[`Belgium`,50.8333,4],bz:[`Belize`,17.25,-88.75],bj:[`Benin`,9.5,2.25],bm:[`Bermuda`,32.3333,-64.75],bt:[`Bhutan`,27.5,90.5],bo:[`Bolivia`,-17,-65],bq:[`Bonaire, Sint Eustatius and Saba`,12.183333,-68.233333],ba:[`Bosnia and Herzegovina`,44,18],bw:[`Botswana`,-22,24],bv:[`Bouvet Island`,-54.4333,3.4],br:[`Brazil`,-10,-55],io:[`British Indian Ocean Territory`,-6,71.5],bn:[`Brunei`,4.5,114.6667],bg:[`Bulgaria`,43,25],bf:[`Burkina Faso`,13,-2],bi:[`Burundi`,-3.5,30],kh:[`Cambodia`,13,105],cm:[`Cameroon`,6,12],ca:[`Canada`,60,-95],cv:[`Cape Verde`,16,-24],ky:[`Cayman Islands`,19.5,-80.5],cf:[`Central African Republic`,7,21],td:[`Chad`,15,19],cl:[`Chile`,-30,-71],cn:[`China`,35,105],cx:[`Christmas Island`,-10.5,105.6667],cc:[`Cocos (Keeling) Islands`,-12.5,96.8333],co:[`Colombia`,4,-72],km:[`Comoros`,-12.1667,44.25],cd:[`Congo, Democratic Republic of the`,0,25],cg:[`Congo`,-1,15],ck:[`Cook Islands`,-21.2333,-159.7667],cr:[`Costa Rica`,10,-84],ci:[`Côte d'Ivoire`,8,-5],hr:[`Croatia`,45.1667,15.5],cu:[`Cuba`,21.5,-80],cw:[`Curaçao`,12.166667,-68.966667],cy:[`Cyprus`,35,33],cz:[`Czech Republic`,49.75,15.5],dk:[`Denmark`,56,10],dj:[`Djibouti`,11.5,43],dm:[`Dominica`,15.4167,-61.3333],do:[`Dominican Republic`,19,-70.6667],ec:[`Ecuador`,-2,-77.5],eg:[`Egypt`,27,30],sv:[`El Salvador`,13.8333,-88.9167],gq:[`Equatorial Guinea`,2,10],er:[`Eritrea`,15,39],ee:[`Estonia`,59,26],et:[`Ethiopia`,8,38],fk:[`Falkland Islands (Malvinas)`,-51.75,-59],fo:[`Faroe Islands`,62,-7],fj:[`Fiji`,-18,175],fi:[`Finland`,64,26],fr:[`France`,46,2],gf:[`French Guiana`,4,-53],pf:[`French Polynesia`,-15,-140],tf:[`French Southern Territories`,-43,67],ga:[`Gabon`,-1,11.75],gm:[`Gambia`,13.4667,-16.5667],ge:[`Georgia`,42,43.5],de:[`Germany`,51,9],gh:[`Ghana`,8,-2],gi:[`Gibraltar`,36.1833,-5.3667],gr:[`Greece`,39,22],gl:[`Greenland`,72,-40],gd:[`Grenada`,12.1167,-61.6667],gp:[`Guadeloupe`,16.25,-61.5833],gu:[`Guam`,13.4667,144.7833],gt:[`Guatemala`,15.5,-90.25],gg:[`Guernsey`,49.5,-2.56],gw:[`Guinea-Bissau`,12,-15],gn:[`Guinea`,11,-10],gy:[`Guyana`,5,-59],ht:[`Haiti`,19,-72.4167],hm:[`Heard Island and McDonald Islands`,-53.1,72.5167],va:[`Holy See`,41.9,12.45],hn:[`Honduras`,15,-86.5],hk:[`Hong Kong`,22.25,114.1667],hu:[`Hungary`,47,20],is:[`Iceland`,65,-18],in:[`India`,20,77],id:[`Indonesia`,-5,120],ir:[`Iran`,32,53],iq:[`Iraq`,33,44],ie:[`Ireland`,53,-8],im:[`Isle of Man`,54.23,-4.55],il:[`Israel`,31.5,34.75],it:[`Italy`,42.8333,12.8333],jm:[`Jamaica`,18.25,-77.5],jp:[`Japan`,36,138],je:[`Jersey`,49.21,-2.13],jo:[`Jordan`,31,36],kz:[`Kazakhstan`,48,68],ke:[`Kenya`,1,38],ki:[`Kiribati`,1.4167,173],kp:[`Korea, North`,40,127],kr:[`Korea, South`,37,127.5],xk:[`Kosovo`,42.583333,21],kw:[`Kuwait`,29.3375,47.6581],kg:[`Kyrgyzstan`,41,75],la:[`Laos`,18,105],lv:[`Latvia`,57,25],lb:[`Lebanon`,33.8333,35.8333],ls:[`Lesotho`,-29.5,28.5],lr:[`Liberia`,6.5,-9.5],ly:[`Libya`,25,17],li:[`Liechtenstein`,47.1667,9.5333],lt:[`Lithuania`,56,24],lu:[`Luxembourg`,49.75,6.1667],mo:[`Macao`,22.1667,113.55],mk:[`North Macedonia`,41.8333,22],mg:[`Madagascar`,-20,47],mw:[`Malawi`,-13.5,34],my:[`Malaysia`,2.5,112.5],mv:[`Maldives`,3.25,73],ml:[`Mali`,17,-4],mt:[`Malta`,35.8333,14.5833],mh:[`Marshall Islands`,9,168],mq:[`Martinique`,14.6667,-61],mr:[`Mauritania`,20,-12],mu:[`Mauritius`,-20.2833,57.55],yt:[`Mayotte`,-12.8333,45.1667],mx:[`Mexico`,23,-102],fm:[`Micronesia`,6.9167,158.25],md:[`Moldova`,47,29],mc:[`Monaco`,43.7333,7.4],mn:[`Mongolia`,46,105],me:[`Montenegro`,42,19],ms:[`Montserrat`,16.75,-62.2],ma:[`Morocco`,32,-5],mz:[`Mozambique`,-18.25,35],mm:[`Myanmar`,22,98],na:[`Namibia`,-22,17],nr:[`Nauru`,-.5333,166.9167],np:[`Nepal`,28,84],nl:[`Netherlands`,52.5,5.75],nc:[`New Caledonia`,-21.5,165.5],nz:[`New Zealand`,-41,174],ni:[`Nicaragua`,13,-85],ne:[`Niger`,16,8],ng:[`Nigeria`,10,8],nu:[`Niue`,-19.0333,-169.8667],nf:[`Norfolk Island`,-29.0333,167.95],mp:[`Northern Mariana Islands`,15.2,145.75],no:[`Norway`,62,10],om:[`Oman`,21,57],pk:[`Pakistan`,30,70],pw:[`Palau`,7.5,134.5],ps:[`Palestine`,32,35.25],pa:[`Panama`,9,-80],pg:[`Papua New Guinea`,-6,147],py:[`Paraguay`,-23,-58],pe:[`Peru`,-10,-76],ph:[`Philippines`,13,122],pn:[`Pitcairn`,-24.7,-127.4],pl:[`Poland`,52,20],pt:[`Portugal`,39.5,-8],pr:[`Puerto Rico`,18.25,-66.5],qa:[`Qatar`,25.5,51.25],re:[`Réunion`,-21.1,55.6],ro:[`Romania`,46,25],ru:[`Russia`,60,100],rw:[`Rwanda`,-2,30],bl:[`Saint Barthélemy`,17.897728,-62.834244],sh:[`Saint Helena`,-15.9333,-5.7],kn:[`Saint Kitts and Nevis`,17.3333,-62.75],lc:[`Saint Lucia`,13.8833,-61.1333],mf:[`Saint Martin`,18.075278,-63.06],pm:[`Saint Pierre and Miquelon`,46.8333,-56.3333],vc:[`Saint Vincent and the Grenadines`,13.25,-61.2],ws:[`Samoa`,-13.5833,-172.3333],sm:[`San Marino`,43.7667,12.4167],st:[`Sao Tome and Principe`,1,7],sa:[`Saudi Arabia`,25,45],sn:[`Senegal`,14,-14],rs:[`Serbia`,44,21],sc:[`Seychelles`,-4.5833,55.6667],sl:[`Sierra Leone`,8.5,-11.5],sg:[`Singapore`,1.3667,103.8],sx:[`Sint Maarten`,18.033333,-63.05],sk:[`Slovakia`,48.6667,19.5],si:[`Slovenia`,46,15],sb:[`Solomon Islands`,-8,159],so:[`Somalia`,10,49],za:[`South Africa`,-29,24],gs:[`South Georgia and the South Sandwich Islands`,-54.5,-37],ss:[`South Sudan`,8,30],es:[`Spain`,40,-4],lk:[`Sri Lanka`,7,81],sd:[`Sudan`,15,30],sr:[`Suriname`,4,-56],sj:[`Svalbard and Jan Mayen`,78,20],sz:[`Swaziland`,-26.5,31.5],se:[`Sweden`,62,15],ch:[`Switzerland`,47,8],sy:[`Syria`,35,38],tw:[`Taiwan`,23.5,121],tj:[`Tajikistan`,39,71],tz:[`Tanzania`,-6,35],th:[`Thailand`,15,100],tl:[`Timor-Leste`,-8.55,125.5167],tg:[`Togo`,8,1.1667],tk:[`Tokelau`,-9,-172],to:[`Tonga`,-20,-175],tt:[`Trinidad and Tobago`,11,-61],tn:[`Tunisia`,34,9],tr:[`Turkey`,39,35],tm:[`Turkmenistan`,40,60],tc:[`Turks and Caicos Islands`,21.75,-71.5833],tv:[`Tuvalu`,-8,178],ug:[`Uganda`,1,32],ua:[`Ukraine`,49,32],ae:[`United Arab Emirates`,24,54],gb:[`United Kingdom`,54,-2],um:[`United States Minor Outlying Islands`,19.2833,166.6],us:[`United States`,38,-97],uy:[`Uruguay`,-33,-56],uz:[`Uzbekistan`,41,64],vu:[`Vanuatu`,-16,167],ve:[`Venezuela`,8,-66],vn:[`Vietnam`,16,106],vg:[`Virgin Islands, British`,18.5,-64.5],vi:[`Virgin Islands, U.S.`,18.3333,-64.8333],wf:[`Wallis and Futuna`,-13.3,-176.2],eh:[`Western Sahara`,24.5,-13],ye:[`Yemen`,15,48],zm:[`Zambia`,-15,30],zw:[`Zimbabwe`,-20,30]};function C(e){return S[e]??null}function w(e){let t=C(e);if(!t)return null;let[,n]=t;return n>=0}const T={autumn:[9,10,11],spring:[3,4,5],summer:[6,7,8],winter:[12,1,2]},E={autumn:[3,4,5],spring:[9,10,11],summer:[12,1,2],winter:[6,7,8]};function D(e,t){let n=w(e),r=t.month,i=n?T:E;for(let e of[`autumn`,`spring`,`summer`,`winter`])if(i[e].includes(r))return e;return null}function O(e){switch(e){case`spring`:return`fresh`;case`summer`:return`energetic`;case`autumn`:return`cozy`;case`winter`:return`warm`}}function k(e){return e.weekday===6||e.weekday===7?`off`:e.hour>=9&&e.hour<12?`work`:e.hour>=12&&e.hour<13?`break`:e.hour>=13&&e.hour<17?`work`:`off`}function A(e){return e.month===3&&e.day>=21||e.month===4&&e.day<=19?`aries`:e.month===4&&e.day>=20||e.month===5&&e.day<=20?`taurus`:e.month===5&&e.day>=21||e.month===6&&e.day<=20?`gemini`:e.month===6&&e.day>=21||e.month===7&&e.day<=22?`cancer`:e.month===7&&e.day>=23||e.month===8&&e.day<=22?`leo`:e.month===8&&e.day>=23||e.month===9&&e.day<=22?`virgo`:e.month===9&&e.day>=23||e.month===10&&e.day<=22?`libra`:e.month===10&&e.day>=23||e.month===11&&e.day<=21?`scorpio`:e.month===11&&e.day>=22||e.month===12&&e.day<=21?`sagittarius`:e.month===12&&e.day>=22||e.month===1&&e.day<=19?`capricorn`:e.month===1&&e.day>=20||e.month===2&&e.day<=18?`aquarius`:`pisces`}function j(e){let t=parseInt(e.startsWith(`#`)?e.substring(1):e,16);return[t>>16&255,t>>8&255,t&255]}function M(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function N(e,t,n){let r,i,a;if(e/=360,t/=100,n/=100,t===0)r=i=a=n;else{let o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;r=M(s,o,e+1/3),i=M(s,o,e),a=M(s,o,e-1/3)}return r=Math.round(r*255),i=Math.round(i*255),a=Math.round(a*255),[r,i,a]}function P(e,t,n){e/=255,t/=255,n/=255;let r=Math.min(e,t,n),i=Math.max(e,t,n),a=i-r,o,s=i===0?0:a/i,c=i;return i===r?o=0:(o=i===e?(t-n)/a+(t<n?6:0):i===t?(n-e)/a+2:(e-t)/a+4,o/=6),[o,s,c]}function ee(e,t,n){return P(...N(e,t,n))}function F(e,t,n){let r=0,i=0,a=0,o=Math.floor(e*6),s=e*6-o,c=n*(1-t),l=n*(1-s*t),u=n*(1-(1-s)*t);switch(o%6){case 0:r=n,i=u,a=c;break;case 1:r=l,i=n,a=c;break;case 2:r=c,i=n,a=u;break;case 3:r=c,i=l,a=n;break;case 4:r=u,i=c,a=n;break;case 5:r=n,i=c,a=l;break}return r=Math.round(r*255),i=Math.round(i*255),a=Math.round(a*255),[r,i,a]}function I(e,t,n){e/=255,t/=255,n/=255;let r=Math.min(e,t,n),i=Math.max(e,t,n),a=i-r,o,s,c;return o=a===0?0:i===e?(t-n)/a%6:i===t?(n-e)/a+2:(e-t)/a+4,o=Math.round(o*60),o<0&&(o+=360),c=(i+r)/2,s=a===0?0:a/(1-Math.abs(2*c-1)),s=+(s*100).toFixed(1),c=+(c*100).toFixed(1),[o,s,c]}function L(e,t,n){return I(...F(e,t,n))}function R(e){return globalThis.document?e instanceof HTMLElement:!1}function z(e,t){let n=!1;for(let r=0,i=t.length-1;r<t.length;i=r++){let a=t[r][0],o=t[r][1],s=t[i][0],c=t[i][1];o>e[1]!=c>e[1]&&e[0]<(s-a)*(e[1]-o)/(c-o)+a&&(n=!n)}return n}function B(e,t){return t.hasSame(e,`day`)}function V(e){let t=new Uint32Array(1);t[0]=e;function n(){let e=t[0]=t[0]+1831565813|0,n=Math.imul(e^e>>>15,1|e);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}function r(e,t){return n()*(t-e)+e}function i(){return V(n()*2**32)}return{fork:i,next:n,nextBetween:r}}function H(e){window.location===window.parent.location?window.location.href=e:window.open(e,`_top`)}async function U(e){let t=document.createElement(`iframe`);t.style.position=`fixed`,t.style.top=`-100dvh`,t.style.left=`-100dvw`,t.style.width=`1px`,t.style.height=`1px`,document.body.appendChild(t);let n=t.contentDocument??t.contentWindow?.document;if(!n)throw document.body.removeChild(t),Error(`Cannot print, no access to the framed document.`);n.documentElement.innerHTML=e;let r=Array.from(n.getElementsByTagName(`img`));await Promise.all(r.map(e=>new Promise(t=>{e.complete?t(void 0):(e.addEventListener(`load`,t,{passive:!0}),e.addEventListener(`error`,t,{passive:!0}))}))),t.contentWindow?.print(),setTimeout(()=>{document.body.removeChild(t)},1e3)}function W(e,t,n){return`#${e.toString(16).padStart(2,`0`)}${t.toString(16).padStart(2,`0`)}${n.toString(16).padStart(2,`0`)}`}function G(e,t,n){e.prototype[t]=n}function K(e,t,n){Object.defineProperty(e,t,{value:n})}function q(e){`startViewTransition`in document?document.startViewTransition(e):e()}async function J(e){return new Promise(t=>setTimeout(t,e))}const Y=`✔`,X=`✘`,Z=`—`,Q=`–`,$=()=>void 0;export{Y as CHECK,X as CROSS,Z as MDASH,Q as NDASH,$ as NOOP,n as clampWithStepPrecision,r as countDecimals,i as debounce,o as downloadBlob,s as downloadString,a as downloadUrl,c as formatDate,l as formatDateFull,u as formatDateTime,d as formatMonth,f as formatMonthYear,p as formatNumber,m as formatPercentage,h as formatTime,g as generateStepTicks,_ as getCircadianPhase,v as getDayPeriod,y as getDayPeriodRange,b as getMoonPhase,x as getPrototypeChain,D as getSeason,O as getSeasonalMood,k as getWorkdayPeriod,A as getZodiacSign,j as hexToRGB,ee as hslToHSV,N as hslToRGB,L as hsvToHSL,F as hsvToRGB,M as hueToRGB,R as isHtmlElement,w as isNorthernHemisphere,z as isPointInPolygon,B as isToday,V as mulberry32,H as openUrl,U as printHtml,W as rgbToHEX,I as rgbToHSL,P as rgbToHSV,t as roundStep,G as setObjectMethod,K as setObjectValue,q as viewTransition,J as waitFor};\n//# sourceMappingURL=index.mjs.map","const parseNumber = (color, len) => {\n\tif (typeof color !== 'number') return;\n\n\t// hex3: #c93 -> #cc9933\n\tif (len === 3) {\n\t\treturn {\n\t\t\tmode: 'rgb',\n\t\t\tr: (((color >> 8) & 0xf) | ((color >> 4) & 0xf0)) / 255,\n\t\t\tg: (((color >> 4) & 0xf) | (color & 0xf0)) / 255,\n\t\t\tb: ((color & 0xf) | ((color << 4) & 0xf0)) / 255\n\t\t};\n\t}\n\n\t// hex4: #c931 -> #cc993311\n\tif (len === 4) {\n\t\treturn {\n\t\t\tmode: 'rgb',\n\t\t\tr: (((color >> 12) & 0xf) | ((color >> 8) & 0xf0)) / 255,\n\t\t\tg: (((color >> 8) & 0xf) | ((color >> 4) & 0xf0)) / 255,\n\t\t\tb: (((color >> 4) & 0xf) | (color & 0xf0)) / 255,\n\t\t\talpha: ((color & 0xf) | ((color << 4) & 0xf0)) / 255\n\t\t};\n\t}\n\n\t// hex6: #f0f1f2\n\tif (len === 6) {\n\t\treturn {\n\t\t\tmode: 'rgb',\n\t\t\tr: ((color >> 16) & 0xff) / 255,\n\t\t\tg: ((color >> 8) & 0xff) / 255,\n\t\t\tb: (color & 0xff) / 255\n\t\t};\n\t}\n\n\t// hex8: #f0f1f2ff\n\tif (len === 8) {\n\t\treturn {\n\t\t\tmode: 'rgb',\n\t\t\tr: ((color >> 24) & 0xff) / 255,\n\t\t\tg: ((color >> 16) & 0xff) / 255,\n\t\t\tb: ((color >> 8) & 0xff) / 255,\n\t\t\talpha: (color & 0xff) / 255\n\t\t};\n\t}\n};\n\nexport default parseNumber;\n","const named = {\n\taliceblue: 0xf0f8ff,\n\tantiquewhite: 0xfaebd7,\n\taqua: 0x00ffff,\n\taquamarine: 0x7fffd4,\n\tazure: 0xf0ffff,\n\tbeige: 0xf5f5dc,\n\tbisque: 0xffe4c4,\n\tblack: 0x000000,\n\tblanchedalmond: 0xffebcd,\n\tblue: 0x0000ff,\n\tblueviolet: 0x8a2be2,\n\tbrown: 0xa52a2a,\n\tburlywood: 0xdeb887,\n\tcadetblue: 0x5f9ea0,\n\tchartreuse: 0x7fff00,\n\tchocolate: 0xd2691e,\n\tcoral: 0xff7f50,\n\tcornflowerblue: 0x6495ed,\n\tcornsilk: 0xfff8dc,\n\tcrimson: 0xdc143c,\n\tcyan: 0x00ffff,\n\tdarkblue: 0x00008b,\n\tdarkcyan: 0x008b8b,\n\tdarkgoldenrod: 0xb8860b,\n\tdarkgray: 0xa9a9a9,\n\tdarkgreen: 0x006400,\n\tdarkgrey: 0xa9a9a9,\n\tdarkkhaki: 0xbdb76b,\n\tdarkmagenta: 0x8b008b,\n\tdarkolivegreen: 0x556b2f,\n\tdarkorange: 0xff8c00,\n\tdarkorchid: 0x9932cc,\n\tdarkred: 0x8b0000,\n\tdarksalmon: 0xe9967a,\n\tdarkseagreen: 0x8fbc8f,\n\tdarkslateblue: 0x483d8b,\n\tdarkslategray: 0x2f4f4f,\n\tdarkslategrey: 0x2f4f4f,\n\tdarkturquoise: 0x00ced1,\n\tdarkviolet: 0x9400d3,\n\tdeeppink: 0xff1493,\n\tdeepskyblue: 0x00bfff,\n\tdimgray: 0x696969,\n\tdimgrey: 0x696969,\n\tdodgerblue: 0x1e90ff,\n\tfirebrick: 0xb22222,\n\tfloralwhite: 0xfffaf0,\n\tforestgreen: 0x228b22,\n\tfuchsia: 0xff00ff,\n\tgainsboro: 0xdcdcdc,\n\tghostwhite: 0xf8f8ff,\n\tgold: 0xffd700,\n\tgoldenrod: 0xdaa520,\n\tgray: 0x808080,\n\tgreen: 0x008000,\n\tgreenyellow: 0xadff2f,\n\tgrey: 0x808080,\n\thoneydew: 0xf0fff0,\n\thotpink: 0xff69b4,\n\tindianred: 0xcd5c5c,\n\tindigo: 0x4b0082,\n\tivory: 0xfffff0,\n\tkhaki: 0xf0e68c,\n\tlavender: 0xe6e6fa,\n\tlavenderblush: 0xfff0f5,\n\tlawngreen: 0x7cfc00,\n\tlemonchiffon: 0xfffacd,\n\tlightblue: 0xadd8e6,\n\tlightcoral: 0xf08080,\n\tlightcyan: 0xe0ffff,\n\tlightgoldenrodyellow: 0xfafad2,\n\tlightgray: 0xd3d3d3,\n\tlightgreen: 0x90ee90,\n\tlightgrey: 0xd3d3d3,\n\tlightpink: 0xffb6c1,\n\tlightsalmon: 0xffa07a,\n\tlightseagreen: 0x20b2aa,\n\tlightskyblue: 0x87cefa,\n\tlightslategray: 0x778899,\n\tlightslategrey: 0x778899,\n\tlightsteelblue: 0xb0c4de,\n\tlightyellow: 0xffffe0,\n\tlime: 0x00ff00,\n\tlimegreen: 0x32cd32,\n\tlinen: 0xfaf0e6,\n\tmagenta: 0xff00ff,\n\tmaroon: 0x800000,\n\tmediumaquamarine: 0x66cdaa,\n\tmediumblue: 0x0000cd,\n\tmediumorchid: 0xba55d3,\n\tmediumpurple: 0x9370db,\n\tmediumseagreen: 0x3cb371,\n\tmediumslateblue: 0x7b68ee,\n\tmediumspringgreen: 0x00fa9a,\n\tmediumturquoise: 0x48d1cc,\n\tmediumvioletred: 0xc71585,\n\tmidnightblue: 0x191970,\n\tmintcream: 0xf5fffa,\n\tmistyrose: 0xffe4e1,\n\tmoccasin: 0xffe4b5,\n\tnavajowhite: 0xffdead,\n\tnavy: 0x000080,\n\toldlace: 0xfdf5e6,\n\tolive: 0x808000,\n\tolivedrab: 0x6b8e23,\n\torange: 0xffa500,\n\torangered: 0xff4500,\n\torchid: 0xda70d6,\n\tpalegoldenrod: 0xeee8aa,\n\tpalegreen: 0x98fb98,\n\tpaleturquoise: 0xafeeee,\n\tpalevioletred: 0xdb7093,\n\tpapayawhip: 0xffefd5,\n\tpeachpuff: 0xffdab9,\n\tperu: 0xcd853f,\n\tpink: 0xffc0cb,\n\tplum: 0xdda0dd,\n\tpowderblue: 0xb0e0e6,\n\tpurple: 0x800080,\n\n\t// Added in CSS Colors Level 4:\n\t// https://drafts.csswg.org/css-color/#changes-from-3\n\trebeccapurple: 0x663399,\n\n\tred: 0xff0000,\n\trosybrown: 0xbc8f8f,\n\troyalblue: 0x4169e1,\n\tsaddlebrown: 0x8b4513,\n\tsalmon: 0xfa8072,\n\tsandybrown: 0xf4a460,\n\tseagreen: 0x2e8b57,\n\tseashell: 0xfff5ee,\n\tsienna: 0xa0522d,\n\tsilver: 0xc0c0c0,\n\tskyblue: 0x87ceeb,\n\tslateblue: 0x6a5acd,\n\tslategray: 0x708090,\n\tslategrey: 0x708090,\n\tsnow: 0xfffafa,\n\tspringgreen: 0x00ff7f,\n\tsteelblue: 0x4682b4,\n\ttan: 0xd2b48c,\n\tteal: 0x008080,\n\tthistle: 0xd8bfd8,\n\ttomato: 0xff6347,\n\tturquoise: 0x40e0d0,\n\tviolet: 0xee82ee,\n\twheat: 0xf5deb3,\n\twhite: 0xffffff,\n\twhitesmoke: 0xf5f5f5,\n\tyellow: 0xffff00,\n\tyellowgreen: 0x9acd32\n};\n\nexport default named;\n","import parseNumber from './parseNumber.js';\nimport named from '../colors/named.js';\n\n// Also supports the `transparent` color as defined in:\n// https://drafts.csswg.org/css-color/#transparent-black\nconst parseNamed = color => {\n\treturn parseNumber(named[color.toLowerCase()], 6);\n};\n\nexport default parseNamed;\n","import parseNumber from './parseNumber.js';\n\nconst hex = /^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i;\n\nconst parseHex = color => {\n\tlet match;\n\t// eslint-disable-next-line no-cond-assign\n\treturn (match = color.match(hex))\n\t\t? parseNumber(parseInt(match[1], 16), match[1].length)\n\t\t: undefined;\n};\n\nexport default parseHex;\n","/*\n\tBasic building blocks for color regexes\n\t---------------------------------------\n\n\tThese regexes are expressed as strings\n\tto be interpolated in the color regexes.\n */\n\n// <number>\nexport const num = '([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)';\n\n// <number> or 'none'\nexport const num_none = `(?:${num}|none)`;\n\n// <percentage>\nexport const per = `${num}%`;\n\n// <percent> or 'none'\nexport const per_none = `(?:${num}%|none)`;\n\n// <number-percentage> (<alpha-value>)\nexport const num_per = `(?:${num}%|${num})`;\n\n// <number-percentage> (<alpha-value>) or 'none'\nexport const num_per_none = `(?:${num}%|${num}|none)`;\n\n// <hue>\nexport const hue = `(?:${num}(deg|grad|rad|turn)|${num})`;\n\n// <hue> or 'none'\nexport const hue_none = `(?:${num}(deg|grad|rad|turn)|${num}|none)`;\n\nexport const c = `\\\\s*,\\\\s*`; // comma\nexport const so = '\\\\s*'; // space, optional\nexport const s = `\\\\s+`; // space\n\nexport const rx_num_per_none = new RegExp('^' + num_per_none + '$');\n","import { num, per, num_per, c } from '../util/regex.js';\n\n/*\n\trgb() regular expressions for legacy format\n\tReference: https://drafts.csswg.org/css-color/#rgb-functions\n */\nconst rgb_num_old = new RegExp(\n\t`^rgba?\\\\(\\\\s*${num}${c}${num}${c}${num}\\\\s*(?:,\\\\s*${num_per}\\\\s*)?\\\\)$`\n);\n\nconst rgb_per_old = new RegExp(\n\t`^rgba?\\\\(\\\\s*${per}${c}${per}${c}${per}\\\\s*(?:,\\\\s*${num_per}\\\\s*)?\\\\)$`\n);\n\nconst parseRgbLegacy = color => {\n\tlet res = { mode: 'rgb' };\n\tlet match;\n\tif ((match = color.match(rgb_num_old))) {\n\t\tif (match[1] !== undefined) {\n\t\t\tres.r = match[1] / 255;\n\t\t}\n\t\tif (match[2] !== undefined) {\n\t\t\tres.g = match[2] / 255;\n\t\t}\n\t\tif (match[3] !== undefined) {\n\t\t\tres.b = match[3] / 255;\n\t\t}\n\t} else if ((match = color.match(rgb_per_old))) {\n\t\tif (match[1] !== undefined) {\n\t\t\tres.r = match[1] / 100;\n\t\t}\n\t\tif (match[2] !== undefined) {\n\t\t\tres.g = match[2] / 100;\n\t\t}\n\t\tif (match[3] !== undefined) {\n\t\t\tres.b = match[3] / 100;\n\t\t}\n\t} else {\n\t\treturn undefined;\n\t}\n\n\tif (match[4] !== undefined) {\n\t\tres.alpha = Math.max(0, Math.min(1, match[4] / 100));\n\t} else if (match[5] !== undefined) {\n\t\tres.alpha = Math.max(0, Math.min(1, +match[5]));\n\t}\n\n\treturn res;\n};\n\nexport default parseRgbLegacy;\n","import parse from './parse.js';\n\nconst prepare = (color, mode) =>\n\tcolor === undefined\n\t\t? undefined\n\t\t: typeof color !== 'object'\n\t\t? parse(color)\n\t\t: color.mode !== undefined\n\t\t? color\n\t\t: mode\n\t\t? { ...color, mode }\n\t\t: undefined;\n\nexport default prepare;\n","import { converters } from './modes.js';\nimport prepare from './_prepare.js';\n\nconst converter =\n\t(target_mode = 'rgb') =>\n\tcolor =>\n\t\t(color = prepare(color, target_mode)) !== undefined\n\t\t\t? // if the color's mode corresponds to our target mode\n\t\t\t color.mode === target_mode\n\t\t\t\t? // then just return the color\n\t\t\t\t color\n\t\t\t\t: // otherwise check to see if we have a dedicated\n\t\t\t\t// converter for the target mode\n\t\t\t\tconverters[color.mode][target_mode]\n\t\t\t\t? // and return its result...\n\t\t\t\t converters[color.mode][target_mode](color)\n\t\t\t\t: // ...otherwise pass through RGB as an intermediary step.\n\t\t\t\t// if the target mode is RGB...\n\t\t\t\ttarget_mode === 'rgb'\n\t\t\t\t? // just return the RGB\n\t\t\t\t converters[color.mode].rgb(color)\n\t\t\t\t: // otherwise convert color.mode -> RGB -> target_mode\n\t\t\t\t converters.rgb[target_mode](converters[color.mode].rgb(color))\n\t\t\t: undefined;\n\nexport default converter;\n","import converter from './converter.js';\n\nconst converters = {};\nconst modes = {};\n\nconst parsers = [];\nconst colorProfiles = {};\n\nconst identity = v => v;\n\nconst useMode = definition => {\n\tconverters[definition.mode] = {\n\t\t...converters[definition.mode],\n\t\t...definition.toMode\n\t};\n\n\tObject.keys(definition.fromMode || {}).forEach(k => {\n\t\tif (!converters[k]) {\n\t\t\tconverters[k] = {};\n\t\t}\n\t\tconverters[k][definition.mode] = definition.fromMode[k];\n\t});\n\n\t// Color space channel ranges\n\tif (!definition.ranges) {\n\t\tdefinition.ranges = {};\n\t}\n\n\tif (!definition.difference) {\n\t\tdefinition.difference = {};\n\t}\n\n\tdefinition.channels.forEach(channel => {\n\t\t// undefined channel ranges default to the [0, 1] interval\n\t\tif (definition.ranges[channel] === undefined) {\n\t\t\tdefinition.ranges[channel] = [0, 1];\n\t\t}\n\n\t\tif (!definition.interpolate[channel]) {\n\t\t\tthrow new Error(`Missing interpolator for: ${channel}`);\n\t\t}\n\n\t\tif (typeof definition.interpolate[channel] === 'function') {\n\t\t\tdefinition.interpolate[channel] = {\n\t\t\t\tuse: definition.interpolate[channel]\n\t\t\t};\n\t\t}\n\n\t\tif (!definition.interpolate[channel].fixup) {\n\t\t\tdefinition.interpolate[channel].fixup = identity;\n\t\t}\n\t});\n\n\tmodes[definition.mode] = definition;\n\t(definition.parse || []).forEach(parser => {\n\t\tuseParser(parser, definition.mode);\n\t});\n\n\treturn converter(definition.mode);\n};\n\nconst getMode = mode => modes[mode];\n\nconst useParser = (parser, mode) => {\n\tif (typeof parser === 'string') {\n\t\tif (!mode) {\n\t\t\tthrow new Error(`'mode' required when 'parser' is a string`);\n\t\t}\n\t\tcolorProfiles[parser] = mode;\n\t} else if (typeof parser === 'function') {\n\t\tif (parsers.indexOf(parser) < 0) {\n\t\t\tparsers.push(parser);\n\t\t}\n\t}\n};\n\nconst removeParser = parser => {\n\tif (typeof parser === 'string') {\n\t\tdelete colorProfiles[parser];\n\t} else if (typeof parser === 'function') {\n\t\tconst idx = parsers.indexOf(parser);\n\t\tif (idx > 0) {\n\t\t\tparsers.splice(idx, 1);\n\t\t}\n\t}\n};\n\nexport {\n\tuseMode,\n\tgetMode,\n\tuseParser,\n\tremoveParser,\n\tconverters,\n\tparsers,\n\tcolorProfiles\n};\n","import { parsers, colorProfiles, getMode } from './modes.js';\n\n/* eslint-disable-next-line no-control-regex */\nconst IdentStartCodePoint = /[^\\x00-\\x7F]|[a-zA-Z_]/;\n\n/* eslint-disable-next-line no-control-regex */\nconst IdentCodePoint = /[^\\x00-\\x7F]|[-\\w]/;\n\nexport const Tok = {\n\tFunction: 'function',\n\tIdent: 'ident',\n\tNumber: 'number',\n\tPercentage: 'percentage',\n\tParenClose: ')',\n\tNone: 'none',\n\tHue: 'hue',\n\tAlpha: 'alpha'\n};\n\nlet _i = 0;\n\n/*\n\t4.3.10. Check if three code points would start a number\n\thttps://drafts.csswg.org/css-syntax/#starts-with-a-number\n */\nfunction is_num(chars) {\n\tlet ch = chars[_i];\n\tlet ch1 = chars[_i + 1];\n\tif (ch === '-' || ch === '+') {\n\t\treturn /\\d/.test(ch1) || (ch1 === '.' && /\\d/.test(chars[_i + 2]));\n\t}\n\tif (ch === '.') {\n\t\treturn /\\d/.test(ch1);\n\t}\n\treturn /\\d/.test(ch);\n}\n\n/*\n\tCheck if the stream starts with an identifier.\n */\n\nfunction is_ident(chars) {\n\tif (_i >= chars.length) {\n\t\treturn false;\n\t}\n\tlet ch = chars[_i];\n\tif (IdentStartCodePoint.test(ch)) {\n\t\treturn true;\n\t}\n\tif (ch === '-') {\n\t\tif (chars.length - _i < 2) {\n\t\t\treturn false;\n\t\t}\n\t\tlet ch1 = chars[_i + 1];\n\t\tif (ch1 === '-' || IdentStartCodePoint.test(ch1)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\treturn false;\n}\n\n/*\n\t4.3.3. Consume a numeric token\n\thttps://drafts.csswg.org/css-syntax/#consume-numeric-token\n */\n\nconst huenits = {\n\tdeg: 1,\n\trad: 180 / Math.PI,\n\tgrad: 9 / 10,\n\tturn: 360\n};\n\nfunction num(chars) {\n\tlet value = '';\n\tif (chars[_i] === '-' || chars[_i] === '+') {\n\t\tvalue += chars[_i++];\n\t}\n\tvalue += digits(chars);\n\tif (chars[_i] === '.' && /\\d/.test(chars[_i + 1])) {\n\t\tvalue += chars[_i++] + digits(chars);\n\t}\n\tif (chars[_i] === 'e' || chars[_i] === 'E') {\n\t\tif (\n\t\t\t(chars[_i + 1] === '-' || chars[_i + 1] === '+') &&\n\t\t\t/\\d/.test(chars[_i + 2])\n\t\t) {\n\t\t\tvalue += chars[_i++] + chars[_i++] + digits(chars);\n\t\t} else if (/\\d/.test(chars[_i + 1])) {\n\t\t\tvalue += chars[_i++] + digits(chars);\n\t\t}\n\t}\n\tif (is_ident(chars)) {\n\t\tlet id = ident(chars);\n\t\tif (id === 'deg' || id === 'rad' || id === 'turn' || id === 'grad') {\n\t\t\treturn { type: Tok.Hue, value: value * huenits[id] };\n\t\t}\n\t\treturn undefined;\n\t}\n\tif (chars[_i] === '%') {\n\t\t_i++;\n\t\treturn { type: Tok.Percentage, value: +value };\n\t}\n\treturn { type: Tok.Number, value: +value };\n}\n\n/*\n\tConsume digits.\n */\nfunction digits(chars) {\n\tlet v = '';\n\twhile (/\\d/.test(chars[_i])) {\n\t\tv += chars[_i++];\n\t}\n\treturn v;\n}\n\n/*\n\tConsume an identifier.\n */\nfunction ident(chars) {\n\tlet v = '';\n\twhile (_i < chars.length && IdentCodePoint.test(chars[_i])) {\n\t\tv += chars[_i++];\n\t}\n\treturn v;\n}\n\n/*\n\tConsume an ident-like token.\n */\nfunction identlike(chars) {\n\tlet v = ident(chars);\n\tif (chars[_i] === '(') {\n\t\t_i++;\n\t\treturn { type: Tok.Function, value: v };\n\t}\n\tif (v === 'none') {\n\t\treturn { type: Tok.None, value: undefined };\n\t}\n\treturn { type: Tok.Ident, value: v };\n}\n\nexport function tokenize(str = '') {\n\tlet chars = str.trim();\n\tlet tokens = [];\n\tlet ch;\n\n\t/* reset counter */\n\t_i = 0;\n\n\twhile (_i < chars.length) {\n\t\tch = chars[_i++];\n\n\t\t/*\n\t\t\tConsume whitespace without emitting it\n\t\t */\n\t\tif (ch === '\\n' || ch === '\\t' || ch === ' ') {\n\t\t\twhile (\n\t\t\t\t_i < chars.length &&\n\t\t\t\t(chars[_i] === '\\n' || chars[_i] === '\\t' || chars[_i] === ' ')\n\t\t\t) {\n\t\t\t\t_i++;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (ch === ',') {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (ch === ')') {\n\t\t\ttokens.push({ type: Tok.ParenClose });\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (ch === '+') {\n\t\t\t_i--;\n\t\t\tif (is_num(chars)) {\n\t\t\t\ttokens.push(num(chars));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (ch === '-') {\n\t\t\t_i--;\n\t\t\tif (is_num(chars)) {\n\t\t\t\ttokens.push(num(chars));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (is_ident(chars)) {\n\t\t\t\ttokens.push({ type: Tok.Ident, value: ident(chars) });\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (ch === '.') {\n\t\t\t_i--;\n\t\t\tif (is_num(chars)) {\n\t\t\t\ttokens.push(num(chars));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (ch === '/') {\n\t\t\twhile (\n\t\t\t\t_i < chars.length &&\n\t\t\t\t(chars[_i] === '\\n' || chars[_i] === '\\t' || chars[_i] === ' ')\n\t\t\t) {\n\t\t\t\t_i++;\n\t\t\t}\n\t\t\tlet alpha;\n\t\t\tif (is_num(chars)) {\n\t\t\t\talpha = num(chars);\n\t\t\t\tif (alpha.type !== Tok.Hue) {\n\t\t\t\t\ttokens.push({ type: Tok.Alpha, value: alpha });\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (is_ident(chars)) {\n\t\t\t\tif (ident(chars) === 'none') {\n\t\t\t\t\ttokens.push({\n\t\t\t\t\t\ttype: Tok.Alpha,\n\t\t\t\t\t\tvalue: { type: Tok.None, value: undefined }\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (/\\d/.test(ch)) {\n\t\t\t_i--;\n\t\t\ttokens.push(num(chars));\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (IdentStartCodePoint.test(ch)) {\n\t\t\t_i--;\n\t\t\ttokens.push(identlike(chars));\n\t\t\tcontinue;\n\t\t}\n\n\t\t/*\n\t\t\tTreat everything not already handled as an error.\n\t\t */\n\t\treturn undefined;\n\t}\n\n\treturn tokens;\n}\n\nexport function parseColorSyntax(tokens) {\n\ttokens._i = 0;\n\tlet token = tokens[tokens._i++];\n\tif (!token || token.type !== Tok.Function || token.value !== 'color') {\n\t\treturn undefined;\n\t}\n\ttoken = tokens[tokens._i++];\n\tif (token.type !== Tok.Ident) {\n\t\treturn undefined;\n\t}\n\tconst mode = colorProfiles[token.value];\n\tif (!mode) {\n\t\treturn undefined;\n\t}\n\tconst res = { mode };\n\tconst coords = consumeCoords(tokens, false);\n\tif (!coords) {\n\t\treturn undefined;\n\t}\n\tconst channels = getMode(mode).channels;\n\tfor (let ii = 0, c, ch; ii < channels.length; ii++) {\n\t\tc = coords[ii];\n\t\tch = channels[ii];\n\t\tif (c.type !== Tok.None) {\n\t\t\tres[ch] = c.type === Tok.Number ? c.value : c.value / 100;\n\t\t\tif (ch === 'alpha') {\n\t\t\t\tres[ch] = Math.max(0, Math.min(1, res[ch]));\n\t\t\t}\n\t\t}\n\t}\n\treturn res;\n}\n\nfunction consumeCoords(tokens, includeHue) {\n\tconst coords = [];\n\tlet token;\n\twhile (tokens._i < tokens.length) {\n\t\ttoken = tokens[tokens._i++];\n\t\tif (\n\t\t\ttoken.type === Tok.None ||\n\t\t\ttoken.type === Tok.Number ||\n\t\t\ttoken.type === Tok.Alpha ||\n\t\t\ttoken.type === Tok.Percentage ||\n\t\t\t(includeHue && token.type === Tok.Hue)\n\t\t) {\n\t\t\tcoords.push(token);\n\t\t\tcontinue;\n\t\t}\n\t\tif (token.type === Tok.ParenClose) {\n\t\t\tif (tokens._i < tokens.length) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tif (coords.length < 3 || coords.length > 4) {\n\t\treturn undefined;\n\t}\n\n\tif (coords.length === 4) {\n\t\tif (coords[3].type !== Tok.Alpha) {\n\t\t\treturn undefined;\n\t\t}\n\t\tcoords[3] = coords[3].value;\n\t}\n\tif (coords.length === 3) {\n\t\tcoords.push({ type: Tok.None, value: undefined });\n\t}\n\n\treturn coords.every(c => c.type !== Tok.Alpha) ? coords : undefined;\n}\n\nexport function parseModernSyntax(tokens, includeHue) {\n\ttokens._i = 0;\n\tlet token = tokens[tokens._i++];\n\tif (!token || token.type !== Tok.Function) {\n\t\treturn undefined;\n\t}\n\tlet coords = consumeCoords(tokens, includeHue);\n\tif (!coords) {\n\t\treturn undefined;\n\t}\n\tcoords.unshift(token.value);\n\treturn coords;\n}\n\nconst parse = color => {\n\tif (typeof color !== 'string') {\n\t\treturn undefined;\n\t}\n\tconst tokens = tokenize(color);\n\tconst parsed = tokens ? parseModernSyntax(tokens, true) : undefined;\n\tlet result = undefined;\n\tlet i = 0;\n\tlet len = parsers.length;\n\twhile (i < len) {\n\t\tif ((result = parsers[i++](color, parsed)) !== undefined) {\n\t\t\treturn result;\n\t\t}\n\t}\n\treturn tokens ? parseColorSyntax(tokens) : undefined;\n};\n\nexport default parse;\n","import { Tok } from '../parse.js';\n\nfunction parseRgb(color, parsed) {\n\tif (!parsed || (parsed[0] !== 'rgb' && parsed[0] !== 'rgba')) {\n\t\treturn undefined;\n\t}\n\tconst res = { mode: 'rgb' };\n\tconst [, r, g, b, alpha] = parsed;\n\tif (r.type === Tok.Hue || g.type === Tok.Hue || b.type === Tok.Hue) {\n\t\treturn undefined;\n\t}\n\tif (r.type !== Tok.None) {\n\t\tres.r = r.type === Tok.Number ? r.value / 255 : r.value / 100;\n\t}\n\tif (g.type !== Tok.None) {\n\t\tres.g = g.type === Tok.Number ? g.value / 255 : g.value / 100;\n\t}\n\tif (b.type !== Tok.None) {\n\t\tres.b = b.type === Tok.Number ? b.value / 255 : b.value / 100;\n\t}\n\tif (alpha.type !== Tok.None) {\n\t\tres.alpha = Math.min(\n\t\t\t1,\n\t\t\tMath.max(\n\t\t\t\t0,\n\t\t\t\talpha.type === Tok.Number ? alpha.value : alpha.value / 100\n\t\t\t)\n\t\t);\n\t}\n\n\treturn res;\n}\n\nexport default parseRgb;\n","const parseTransparent = c =>\n\tc === 'transparent'\n\t\t? { mode: 'rgb', r: 0, g: 0, b: 0, alpha: 0 }\n\t\t: undefined;\n\nexport default parseTransparent;\n","const lerp = (a, b, t) => a + t * (b - a);\nconst unlerp = (a, b, v) => (v - a) / (b - a);\n\nconst blerp = (a00, a01, a10, a11, tx, ty) => {\n\treturn lerp(lerp(a00, a01, tx), lerp(a10, a11, tx), ty);\n};\n\nconst trilerp = (\n\ta000,\n\ta010,\n\ta100,\n\ta110,\n\ta001,\n\ta011,\n\ta101,\n\ta111,\n\ttx,\n\tty,\n\ttz\n) => {\n\treturn lerp(\n\t\tblerp(a000, a010, a100, a110, tx, ty),\n\t\tblerp(a001, a011, a101, a111, tx, ty),\n\t\ttz\n\t);\n};\n\nexport { lerp, blerp, trilerp, unlerp };\n","const get_classes = arr => {\n\tlet classes = [];\n\tfor (let i = 0; i < arr.length - 1; i++) {\n\t\tlet a = arr[i];\n\t\tlet b = arr[i + 1];\n\t\tif (a === undefined && b === undefined) {\n\t\t\tclasses.push(undefined);\n\t\t} else if (a !== undefined && b !== undefined) {\n\t\t\tclasses.push([a, b]);\n\t\t} else {\n\t\t\tclasses.push(a !== undefined ? [a, a] : [b, b]);\n\t\t}\n\t}\n\treturn classes;\n};\n\nconst interpolatorPiecewise = interpolator => arr => {\n\tlet classes = get_classes(arr);\n\treturn t => {\n\t\tlet cls = t * classes.length;\n\t\tlet idx = t >= 1 ? classes.length - 1 : Math.max(Math.floor(cls), 0);\n\t\tlet pair = classes[idx];\n\t\treturn pair === undefined\n\t\t\t? undefined\n\t\t\t: interpolator(pair[0], pair[1], cls - idx);\n\t};\n};\n\nexport { interpolatorPiecewise };\n","import { lerp } from './lerp.js';\nimport { interpolatorPiecewise } from './piecewise.js';\n\nexport const interpolatorLinear = interpolatorPiecewise(lerp);\n","const fixupAlpha = arr => {\n\tlet some_defined = false;\n\tlet res = arr.map(v => {\n\t\tif (v !== undefined) {\n\t\t\tsome_defined = true;\n\t\t\treturn v;\n\t\t}\n\t\treturn 1;\n\t});\n\treturn some_defined ? res : arr;\n};\n\nexport { fixupAlpha };\n","import parseNamed from './parseNamed.js';\nimport parseHex from './parseHex.js';\nimport parseRgbLegacy from './parseRgbLegacy.js';\nimport parseRgb from './parseRgb.js';\nimport parseTransparent from './parseTransparent.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\n/*\n\tsRGB color space\n */\n\nconst definition = {\n\tmode: 'rgb',\n\tchannels: ['r', 'g', 'b', 'alpha'],\n\tparse: [\n\t\tparseRgb,\n\t\tparseHex,\n\t\tparseRgbLegacy,\n\t\tparseNamed,\n\t\tparseTransparent,\n\t\t'srgb'\n\t],\n\tserialize: 'srgb',\n\tinterpolate: {\n\t\tr: interpolatorLinear,\n\t\tg: interpolatorLinear,\n\t\tb: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\tgamut: true,\n\twhite: { r: 1, g: 1, b: 1 },\n\tblack: { r: 0, g: 0, b: 0 }\n};\n\nexport default definition;\n","/*\n\tConvert A98 RGB values to CIE XYZ D65\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n\t\t* https://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf\n*/\n\nconst linearize = (v = 0) => Math.pow(Math.abs(v), 563 / 256) * Math.sign(v);\n\nconst convertA98ToXyz65 = a98 => {\n\tlet r = linearize(a98.r);\n\tlet g = linearize(a98.g);\n\tlet b = linearize(a98.b);\n\tlet res = {\n\t\tmode: 'xyz65',\n\t\tx:\n\t\t\t0.5766690429101305 * r +\n\t\t\t0.1855582379065463 * g +\n\t\t\t0.1882286462349947 * b,\n\t\ty:\n\t\t\t0.297344975250536 * r +\n\t\t\t0.6273635662554661 * g +\n\t\t\t0.0752914584939979 * b,\n\t\tz:\n\t\t\t0.0270313613864123 * r +\n\t\t\t0.0706888525358272 * g +\n\t\t\t0.9913375368376386 * b\n\t};\n\tif (a98.alpha !== undefined) {\n\t\tres.alpha = a98.alpha;\n\t}\n\treturn res;\n};\n\nexport default convertA98ToXyz65;\n","/*\n\tConvert CIE XYZ D65 values to A98 RGB\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n*/\n\nconst gamma = v => Math.pow(Math.abs(v), 256 / 563) * Math.sign(v);\n\nconst convertXyz65ToA98 = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = {\n\t\tmode: 'a98',\n\t\tr: gamma(\n\t\t\tx * 2.0415879038107465 -\n\t\t\t\ty * 0.5650069742788597 -\n\t\t\t\t0.3447313507783297 * z\n\t\t),\n\t\tg: gamma(\n\t\t\tx * -0.9692436362808798 +\n\t\t\t\ty * 1.8759675015077206 +\n\t\t\t\t0.0415550574071756 * z\n\t\t),\n\t\tb: gamma(\n\t\t\tx * 0.0134442806320312 -\n\t\t\t\ty * 0.1183623922310184 +\n\t\t\t\t1.0151749943912058 * z\n\t\t)\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz65ToA98;\n","const fn = (c = 0) => {\n\tconst abs = Math.abs(c);\n\tif (abs <= 0.04045) {\n\t\treturn c / 12.92;\n\t}\n\treturn (Math.sign(c) || 1) * Math.pow((abs + 0.055) / 1.055, 2.4);\n};\n\nconst convertRgbToLrgb = ({ r, g, b, alpha }) => {\n\tlet res = {\n\t\tmode: 'lrgb',\n\t\tr: fn(r),\n\t\tg: fn(g),\n\t\tb: fn(b)\n\t};\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertRgbToLrgb;\n","/*\n\tConvert sRGB values to CIE XYZ D65\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n\t\t* https://observablehq.com/@danburzo/color-matrix-calculator\n*/\n\nimport convertRgbToLrgb from '../lrgb/convertRgbToLrgb.js';\n\nconst convertRgbToXyz65 = rgb => {\n\tlet { r, g, b, alpha } = convertRgbToLrgb(rgb);\n\tlet res = {\n\t\tmode: 'xyz65',\n\t\tx:\n\t\t\t0.4123907992659593 * r +\n\t\t\t0.357584339383878 * g +\n\t\t\t0.1804807884018343 * b,\n\t\ty:\n\t\t\t0.2126390058715102 * r +\n\t\t\t0.715168678767756 * g +\n\t\t\t0.0721923153607337 * b,\n\t\tz:\n\t\t\t0.0193308187155918 * r +\n\t\t\t0.119194779794626 * g +\n\t\t\t0.9505321522496607 * b\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertRgbToXyz65;\n","const fn = (c = 0) => {\n\tconst abs = Math.abs(c);\n\tif (abs > 0.0031308) {\n\t\treturn (Math.sign(c) || 1) * (1.055 * Math.pow(abs, 1 / 2.4) - 0.055);\n\t}\n\treturn c * 12.92;\n};\n\nconst convertLrgbToRgb = ({ r, g, b, alpha }, mode = 'rgb') => {\n\tlet res = {\n\t\tmode,\n\t\tr: fn(r),\n\t\tg: fn(g),\n\t\tb: fn(b)\n\t};\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertLrgbToRgb;\n","/*\n\tCIE XYZ D65 values to sRGB.\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n\t\t* https://observablehq.com/@danburzo/color-matrix-calculator\n*/\n\nimport convertLrgbToRgb from '../lrgb/convertLrgbToRgb.js';\n\nconst convertXyz65ToRgb = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = convertLrgbToRgb({\n\t\tr:\n\t\t\tx * 3.2409699419045226 -\n\t\t\ty * 1.5373831775700939 -\n\t\t\t0.4986107602930034 * z,\n\t\tg:\n\t\t\tx * -0.9692436362808796 +\n\t\t\ty * 1.8759675015077204 +\n\t\t\t0.0415550574071756 * z,\n\t\tb:\n\t\t\tx * 0.0556300796969936 -\n\t\t\ty * 0.2039769588889765 +\n\t\t\t1.0569715142428784 * z\n\t});\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz65ToRgb;\n","import rgb from '../rgb/definition.js';\n\nimport convertA98ToXyz65 from './convertA98ToXyz65.js';\nimport convertXyz65ToA98 from './convertXyz65ToA98.js';\nimport convertRgbToXyz65 from '../xyz65/convertRgbToXyz65.js';\nimport convertXyz65ToRgb from '../xyz65/convertXyz65ToRgb.js';\n\nconst definition = {\n\t...rgb,\n\tmode: 'a98',\n\tparse: ['a98-rgb'],\n\tserialize: 'a98-rgb',\n\n\tfromMode: {\n\t\trgb: color => convertXyz65ToA98(convertRgbToXyz65(color)),\n\t\txyz65: convertXyz65ToA98\n\t},\n\n\ttoMode: {\n\t\trgb: color => convertXyz65ToRgb(convertA98ToXyz65(color)),\n\t\txyz65: convertA98ToXyz65\n\t}\n};\n\nexport default definition;\n","const normalizeHue = hue => ((hue = hue % 360) < 0 ? hue + 360 : hue);\n\nexport default normalizeHue;\n","import normalizeHue from '../util/normalizeHue.js';\n\nconst hue = (hues, fn) => {\n\treturn hues\n\t\t.map((hue, idx, arr) => {\n\t\t\tif (hue === undefined) {\n\t\t\t\treturn hue;\n\t\t\t}\n\t\t\tlet normalized = normalizeHue(hue);\n\t\t\tif (idx === 0 || hues[idx - 1] === undefined) {\n\t\t\t\treturn normalized;\n\t\t\t}\n\t\t\treturn fn(normalized - normalizeHue(arr[idx - 1]));\n\t\t})\n\t\t.reduce((acc, curr) => {\n\t\t\tif (\n\t\t\t\t!acc.length ||\n\t\t\t\tcurr === undefined ||\n\t\t\t\tacc[acc.length - 1] === undefined\n\t\t\t) {\n\t\t\t\tacc.push(curr);\n\t\t\t\treturn acc;\n\t\t\t}\n\t\t\tacc.push(curr + acc[acc.length - 1]);\n\t\t\treturn acc;\n\t\t}, []);\n};\n\nconst fixupHueShorter = arr =>\n\thue(arr, d => (Math.abs(d) <= 180 ? d : d - 360 * Math.sign(d)));\nconst fixupHueLonger = arr =>\n\thue(arr, d => (Math.abs(d) >= 180 || d === 0 ? d : d - 360 * Math.sign(d)));\nconst fixupHueIncreasing = arr => hue(arr, d => (d >= 0 ? d : d + 360));\nconst fixupHueDecreasing = arr => hue(arr, d => (d <= 0 ? d : d - 360));\n\nexport {\n\tfixupHueShorter,\n\tfixupHueLonger,\n\tfixupHueIncreasing,\n\tfixupHueDecreasing\n};\n","export const M = [-0.14861, 1.78277, -0.29227, -0.90649, 1.97294, 0];\n\nexport const degToRad = Math.PI / 180;\nexport const radToDeg = 180 / Math.PI;\n","/*\n\tConvert a RGB color to the Cubehelix HSL color space.\n\n\tThis computation is not present in Green's paper:\n\thttps://arxiv.org/pdf/1108.5083.pdf\n\n\t...but can be derived from the inverse, HSL to RGB conversion.\n\n\tIt matches the math in Mike Bostock's D3 implementation:\n\n\thttps://github.com/d3/d3-color/blob/master/src/cubehelix.js\n */\n\nimport { radToDeg, M } from './constants.js';\n\nlet DE = M[3] * M[4];\nlet BE = M[1] * M[4];\nlet BCAD = M[1] * M[2] - M[0] * M[3];\n\nconst convertRgbToCubehelix = ({ r, g, b, alpha }) => {\n\tif (r === undefined) r = 0;\n\tif (g === undefined) g = 0;\n\tif (b === undefined) b = 0;\n\tlet l = (BCAD * b + r * DE - g * BE) / (BCAD + DE - BE);\n\tlet x = b - l;\n\tlet y = (M[4] * (g - l) - M[2] * x) / M[3];\n\n\tlet res = {\n\t\tmode: 'cubehelix',\n\t\tl: l,\n\t\ts:\n\t\t\tl === 0 || l === 1\n\t\t\t\t? undefined\n\t\t\t\t: Math.sqrt(x * x + y * y) / (M[4] * l * (1 - l))\n\t};\n\n\tif (res.s) res.h = Math.atan2(y, x) * radToDeg - 120;\n\tif (alpha !== undefined) res.alpha = alpha;\n\n\treturn res;\n};\n\nexport default convertRgbToCubehelix;\n","import { degToRad, M } from './constants.js';\n\nconst convertCubehelixToRgb = ({ h, s, l, alpha }) => {\n\tlet res = { mode: 'rgb' };\n\n\th = (h === undefined ? 0 : h + 120) * degToRad;\n\tif (l === undefined) l = 0;\n\n\tlet amp = s === undefined ? 0 : s * l * (1 - l);\n\n\tlet cosh = Math.cos(h);\n\tlet sinh = Math.sin(h);\n\n\tres.r = l + amp * (M[0] * cosh + M[1] * sinh);\n\tres.g = l + amp * (M[2] * cosh + M[3] * sinh);\n\tres.b = l + amp * (M[4] * cosh + M[5] * sinh);\n\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertCubehelixToRgb;\n","import { getMode } from './modes.js';\nimport converter from './converter.js';\nimport normalizeHue from './util/normalizeHue.js';\n\nconst differenceHueSaturation = (std, smp) => {\n\tif (std.h === undefined || smp.h === undefined || !std.s || !smp.s) {\n\t\treturn 0;\n\t}\n\tlet std_h = normalizeHue(std.h);\n\tlet smp_h = normalizeHue(smp.h);\n\tlet dH = Math.sin((((smp_h - std_h + 360) / 2) * Math.PI) / 180);\n\treturn 2 * Math.sqrt(std.s * smp.s) * dH;\n};\n\nconst differenceHueNaive = (std, smp) => {\n\tif (std.h === undefined || smp.h === undefined) {\n\t\treturn 0;\n\t}\n\tlet std_h = normalizeHue(std.h);\n\tlet smp_h = normalizeHue(smp.h);\n\tif (Math.abs(smp_h - std_h) > 180) {\n\t\t// todo should this be normalized once again?\n\t\treturn std_h - (smp_h - 360 * Math.sign(smp_h - std_h));\n\t}\n\treturn smp_h - std_h;\n};\n\nconst differenceHueChroma = (std, smp) => {\n\tif (std.h === undefined || smp.h === undefined || !std.c || !smp.c) {\n\t\treturn 0;\n\t}\n\tlet std_h = normalizeHue(std.h);\n\tlet smp_h = normalizeHue(smp.h);\n\tlet dH = Math.sin((((smp_h - std_h + 360) / 2) * Math.PI) / 180);\n\treturn 2 * Math.sqrt(std.c * smp.c) * dH;\n};\n\nconst differenceEuclidean = (mode = 'rgb', weights = [1, 1, 1, 0]) => {\n\tlet def = getMode(mode);\n\tlet channels = def.channels;\n\tlet diffs = def.difference;\n\tlet conv = converter(mode);\n\treturn (std, smp) => {\n\t\tlet ConvStd = conv(std);\n\t\tlet ConvSmp = conv(smp);\n\t\treturn Math.sqrt(\n\t\t\tchannels.reduce((sum, k, idx) => {\n\t\t\t\tlet delta = diffs[k]\n\t\t\t\t\t? diffs[k](ConvStd, ConvSmp)\n\t\t\t\t\t: ConvStd[k] - ConvSmp[k];\n\t\t\t\treturn (\n\t\t\t\t\tsum +\n\t\t\t\t\t(weights[idx] || 0) * Math.pow(isNaN(delta) ? 0 : delta, 2)\n\t\t\t\t);\n\t\t\t}, 0)\n\t\t);\n\t};\n};\n\nconst differenceCie76 = () => differenceEuclidean('lab65');\n\nconst differenceCie94 = (kL = 1, K1 = 0.045, K2 = 0.015) => {\n\tlet lab = converter('lab65');\n\n\treturn (std, smp) => {\n\t\tlet LabStd = lab(std);\n\t\tlet LabSmp = lab(smp);\n\n\t\t// Extract Lab values, and compute Chroma\n\t\tlet lStd = LabStd.l;\n\t\tlet aStd = LabStd.a;\n\t\tlet bStd = LabStd.b;\n\t\tlet cStd = Math.sqrt(aStd * aStd + bStd * bStd);\n\n\t\tlet lSmp = LabSmp.l;\n\t\tlet aSmp = LabSmp.a;\n\t\tlet bSmp = LabSmp.b;\n\t\tlet cSmp = Math.sqrt(aSmp * aSmp + bSmp * bSmp);\n\n\t\tlet dL2 = Math.pow(lStd - lSmp, 2);\n\t\tlet dC2 = Math.pow(cStd - cSmp, 2);\n\t\tlet dH2 = Math.pow(aStd - aSmp, 2) + Math.pow(bStd - bSmp, 2) - dC2;\n\n\t\treturn Math.sqrt(\n\t\t\tdL2 / Math.pow(kL, 2) +\n\t\t\t\tdC2 / Math.pow(1 + K1 * cStd, 2) +\n\t\t\t\tdH2 / Math.pow(1 + K2 * cStd, 2)\n\t\t);\n\t};\n};\n\n/*\n\tCIEDE2000 color difference, original Matlab implementation by Gaurav Sharma\n\tBased on \"The CIEDE2000 Color-Difference Formula: Implementation Notes, Supplementary Test Data, and Mathematical Observations\" \n\tby Gaurav Sharma, Wencheng Wu, Edul N. Dalal in Color Research and Application, vol. 30. No. 1, pp. 21-30, February 2005.\n\thttp://www2.ece.rochester.edu/~gsharma/ciede2000/\n */\n\nconst differenceCiede2000 = (Kl = 1, Kc = 1, Kh = 1) => {\n\tlet lab = converter('lab65');\n\treturn (std, smp) => {\n\t\tlet LabStd = lab(std);\n\t\tlet LabSmp = lab(smp);\n\n\t\tlet lStd = LabStd.l;\n\t\tlet aStd = LabStd.a;\n\t\tlet bStd = LabStd.b;\n\t\tlet cStd = Math.sqrt(aStd * aStd + bStd * bStd);\n\n\t\tlet lSmp = LabSmp.l;\n\t\tlet aSmp = LabSmp.a;\n\t\tlet bSmp = LabSmp.b;\n\t\tlet cSmp = Math.sqrt(aSmp * aSmp + bSmp * bSmp);\n\n\t\tlet cAvg = (cStd + cSmp) / 2;\n\n\t\tlet G =\n\t\t\t0.5 *\n\t\t\t(1 -\n\t\t\t\tMath.sqrt(\n\t\t\t\t\tMath.pow(cAvg, 7) / (Math.pow(cAvg, 7) + Math.pow(25, 7))\n\t\t\t\t));\n\n\t\tlet apStd = aStd * (1 + G);\n\t\tlet apSmp = aSmp * (1 + G);\n\n\t\tlet cpStd = Math.sqrt(apStd * apStd + bStd * bStd);\n\t\tlet cpSmp = Math.sqrt(apSmp * apSmp + bSmp * bSmp);\n\n\t\tlet hpStd =\n\t\t\tMath.abs(apStd) + Math.abs(bStd) === 0\n\t\t\t\t? 0\n\t\t\t\t: Math.atan2(bStd, apStd);\n\t\thpStd += (hpStd < 0) * 2 * Math.PI;\n\n\t\tlet hpSmp =\n\t\t\tMath.abs(apSmp) + Math.abs(bSmp) === 0\n\t\t\t\t? 0\n\t\t\t\t: Math.atan2(bSmp, apSmp);\n\t\thpSmp += (hpSmp < 0) * 2 * Math.PI;\n\n\t\tlet dL = lSmp - lStd;\n\t\tlet dC = cpSmp - cpStd;\n\n\t\tlet dhp = cpStd * cpSmp === 0 ? 0 : hpSmp - hpStd;\n\t\tdhp -= (dhp > Math.PI) * 2 * Math.PI;\n\t\tdhp += (dhp < -Math.PI) * 2 * Math.PI;\n\n\t\tlet dH = 2 * Math.sqrt(cpStd * cpSmp) * Math.sin(dhp / 2);\n\n\t\tlet Lp = (lStd + lSmp) / 2;\n\t\tlet Cp = (cpStd + cpSmp) / 2;\n\n\t\tlet hp;\n\t\tif (cpStd * cpSmp === 0) {\n\t\t\thp = hpStd + hpSmp;\n\t\t} else {\n\t\t\thp = (hpStd + hpSmp) / 2;\n\t\t\thp -= (Math.abs(hpStd - hpSmp) > Math.PI) * Math.PI;\n\t\t\thp += (hp < 0) * 2 * Math.PI;\n\t\t}\n\n\t\tlet Lpm50 = Math.pow(Lp - 50, 2);\n\t\tlet T =\n\t\t\t1 -\n\t\t\t0.17 * Math.cos(hp - Math.PI / 6) +\n\t\t\t0.24 * Math.cos(2 * hp) +\n\t\t\t0.32 * Math.cos(3 * hp + Math.PI / 30) -\n\t\t\t0.2 * Math.cos(4 * hp - (63 * Math.PI) / 180);\n\n\t\tlet Sl = 1 + (0.015 * Lpm50) / Math.sqrt(20 + Lpm50);\n\t\tlet Sc = 1 + 0.045 * Cp;\n\t\tlet Sh = 1 + 0.015 * Cp * T;\n\n\t\tlet deltaTheta =\n\t\t\t((30 * Math.PI) / 180) *\n\t\t\tMath.exp(-1 * Math.pow(((180 / Math.PI) * hp - 275) / 25, 2));\n\t\tlet Rc =\n\t\t\t2 *\n\t\t\tMath.sqrt(Math.pow(Cp, 7) / (Math.pow(Cp, 7) + Math.pow(25, 7)));\n\n\t\tlet Rt = -1 * Math.sin(2 * deltaTheta) * Rc;\n\n\t\treturn Math.sqrt(\n\t\t\tMath.pow(dL / (Kl * Sl), 2) +\n\t\t\t\tMath.pow(dC / (Kc * Sc), 2) +\n\t\t\t\tMath.pow(dH / (Kh * Sh), 2) +\n\t\t\t\t(((Rt * dC) / (Kc * Sc)) * dH) / (Kh * Sh)\n\t\t);\n\t};\n};\n\n/*\n\tCMC (l:c) difference formula\n\n\tReferences:\n\t\thttps://en.wikipedia.org/wiki/Color_difference#CMC_l:c_(1984)\n\t\thttp://www.brucelindbloom.com/index.html?Eqn_DeltaE_CMC.html\n */\nconst differenceCmc = (l = 1, c = 1) => {\n\tlet lab = converter('lab65');\n\n\t/*\n\t\tComparte two colors:\n\t\tstd - standard (first) color\n\t\tsmp - sample (second) color\n\t */\n\treturn (std, smp) => {\n\t\t// convert standard color to Lab\n\t\tlet LabStd = lab(std);\n\t\tlet lStd = LabStd.l;\n\t\tlet aStd = LabStd.a;\n\t\tlet bStd = LabStd.b;\n\n\t\t// Obtain hue/chroma\n\t\tlet cStd = Math.sqrt(aStd * aStd + bStd * bStd);\n\t\tlet hStd = Math.atan2(bStd, aStd);\n\t\thStd = hStd + 2 * Math.PI * (hStd < 0);\n\n\t\t// convert sample color to Lab, obtain LCh\n\t\tlet LabSmp = lab(smp);\n\t\tlet lSmp = LabSmp.l;\n\t\tlet aSmp = LabSmp.a;\n\t\tlet bSmp = LabSmp.b;\n\n\t\t// Obtain chroma\n\t\tlet cSmp = Math.sqrt(aSmp * aSmp + bSmp * bSmp);\n\n\t\t// lightness delta squared\n\t\tlet dL2 = Math.pow(lStd - lSmp, 2);\n\n\t\t// chroma delta squared\n\t\tlet dC2 = Math.pow(cStd - cSmp, 2);\n\n\t\t// hue delta squared\n\t\tlet dH2 = Math.pow(aStd - aSmp, 2) + Math.pow(bStd - bSmp, 2) - dC2;\n\n\t\tlet F = Math.sqrt(Math.pow(cStd, 4) / (Math.pow(cStd, 4) + 1900));\n\t\tlet T =\n\t\t\thStd >= (164 / 180) * Math.PI && hStd <= (345 / 180) * Math.PI\n\t\t\t\t? 0.56 + Math.abs(0.2 * Math.cos(hStd + (168 / 180) * Math.PI))\n\t\t\t\t: 0.36 + Math.abs(0.4 * Math.cos(hStd + (35 / 180) * Math.PI));\n\n\t\tlet Sl = lStd < 16 ? 0.511 : (0.040975 * lStd) / (1 + 0.01765 * lStd);\n\t\tlet Sc = (0.0638 * cStd) / (1 + 0.0131 * cStd) + 0.638;\n\t\tlet Sh = Sc * (F * T + 1 - F);\n\n\t\treturn Math.sqrt(\n\t\t\tdL2 / Math.pow(l * Sl, 2) +\n\t\t\t\tdC2 / Math.pow(c * Sc, 2) +\n\t\t\t\tdH2 / Math.pow(Sh, 2)\n\t\t);\n\t};\n};\n\n/*\n\n\tHyAB color difference formula, introduced in:\n\n\t\tAbasi S, Amani Tehran M, Fairchild MD. \n\t\t\"Distance metrics for very large color differences.\"\n\t\tColor Res Appl. 2019; 1–16. \n\t\thttps://doi.org/10.1002/col.22451\n\n\tPDF available at:\n\t\n\t\thttp://markfairchild.org/PDFs/PAP40.pdf\n */\nconst differenceHyab = () => {\n\tlet lab = converter('lab65');\n\treturn (std, smp) => {\n\t\tlet LabStd = lab(std);\n\t\tlet LabSmp = lab(smp);\n\t\tlet dL = LabStd.l - LabSmp.l;\n\t\tlet dA = LabStd.a - LabSmp.a;\n\t\tlet dB = LabStd.b - LabSmp.b;\n\t\treturn Math.abs(dL) + Math.sqrt(dA * dA + dB * dB);\n\t};\n};\n\n/*\n\t\"Measuring perceived color difference using YIQ NTSC\n\ttransmission color space in mobile applications\"\n\t\t\n\t\tby Yuriy Kotsarenko, Fernando Ramos in:\n\t\tProgramación Matemática y Software (2010) \n\n\tAvailable at:\n\t\t\n\t\thttp://www.progmat.uaem.mx:8080/artVol2Num2/Articulo3Vol2Num2.pdf\n */\nconst differenceKotsarenkoRamos = () =>\n\tdifferenceEuclidean('yiq', [0.5053, 0.299, 0.1957]);\n\n/*\n\tΔE_ITP, as defined in Rec. ITU-R BT.2124:\n\n\thttps://www.itu.int/rec/R-REC-BT.2124/en\n*/\nconst differenceItp = () =>\n\tdifferenceEuclidean('itp', [518400, 129600, 518400]);\n\nexport {\n\tdifferenceHueChroma,\n\tdifferenceHueSaturation,\n\tdifferenceHueNaive,\n\tdifferenceEuclidean,\n\tdifferenceCie76,\n\tdifferenceCie94,\n\tdifferenceCiede2000,\n\tdifferenceCmc,\n\tdifferenceHyab,\n\tdifferenceKotsarenkoRamos,\n\tdifferenceItp\n};\n","import converter from './converter.js';\nimport { getMode } from './modes.js';\n\nconst averageAngle = val => {\n\t// See: https://en.wikipedia.org/wiki/Mean_of_circular_quantities\n\tlet sum = val.reduce(\n\t\t(sum, val) => {\n\t\t\tif (val !== undefined) {\n\t\t\t\tlet rad = (val * Math.PI) / 180;\n\t\t\t\tsum.sin += Math.sin(rad);\n\t\t\t\tsum.cos += Math.cos(rad);\n\t\t\t}\n\t\t\treturn sum;\n\t\t},\n\t\t{ sin: 0, cos: 0 }\n\t);\n\tlet angle = (Math.atan2(sum.sin, sum.cos) * 180) / Math.PI;\n\treturn angle < 0 ? 360 + angle : angle;\n};\n\nconst averageNumber = val => {\n\tlet a = val.filter(v => v !== undefined);\n\treturn a.length ? a.reduce((sum, v) => sum + v, 0) / a.length : undefined;\n};\n\nconst isfn = o => typeof o === 'function';\n\nfunction average(colors, mode = 'rgb', overrides) {\n\tlet def = getMode(mode);\n\tlet cc = colors.map(converter(mode));\n\treturn def.channels.reduce(\n\t\t(res, ch) => {\n\t\t\tlet arr = cc.map(c => c[ch]).filter(val => val !== undefined);\n\t\t\tif (arr.length) {\n\t\t\t\tlet fn;\n\t\t\t\tif (isfn(overrides)) {\n\t\t\t\t\tfn = overrides;\n\t\t\t\t} else if (overrides && isfn(overrides[ch])) {\n\t\t\t\t\tfn = overrides[ch];\n\t\t\t\t} else if (def.average && isfn(def.average[ch])) {\n\t\t\t\t\tfn = def.average[ch];\n\t\t\t\t} else {\n\t\t\t\t\tfn = averageNumber;\n\t\t\t\t}\n\t\t\t\tres[ch] = fn(arr, ch);\n\t\t\t}\n\t\t\treturn res;\n\t\t},\n\t\t{ mode }\n\t);\n}\n\nexport { average, averageAngle, averageNumber };\n","/* \n\tDave Green's Cubehelix\n\t----------------------\n\n\tGreen, D. A., 2011, \"A colour scheme for the display of astronomical intensity images\", \n\tBulletin of the Astronomical Society of India, 39, 289. (2011BASI...39..289G at ADS.) \n\n\thttps://www.mrao.cam.ac.uk/%7Edag/CUBEHELIX/\n\thttps://arxiv.org/pdf/1108.5083.pdf\n\n\tAlthough Cubehelix was defined to be a method to obtain a colour scheme,\n\tit actually contains a definition of a colour space, as identified by \n\tMike Bostock and implemented in D3.js.\n\n\tGreen's paper introduces the following terminology:\n\n\t* \ta `lightness` dimension in the interval [0, 1] \n\t\ton which we interpolate to obtain the colour scheme\n\t*\ta `start` colour that is analogous to a Hue in HSL space\n\t*\ta number of `rotations` around the Hue cylinder.\n\t*\ta `hue` parameter which should more appropriately be called `saturation`\n\t\n\tAs such, the original definition of the Cubehelix scheme is actually an\n\tinterpolation between two colors in the Cubehelix space:\n\n\tH: start \t\t\t\tH: start + 360 * rotations\n\tS: hue \t\t\t->\t\tS: hue\n\tL: 0\t\t\t\t\tL: 1\n\n\tWe can therefore extend the interpolation to any two colors in this space,\n\twith a variable Saturation and a Lightness interval other than the fixed 0 -> 1.\n*/\n\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport convertRgbToCubehelix from './convertRgbToCubehelix.js';\nimport convertCubehelixToRgb from './convertCubehelixToRgb.js';\nimport { differenceHueSaturation } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'cubehelix',\n\tchannels: ['h', 's', 'l', 'alpha'],\n\tparse: ['--cubehelix'],\n\tserialize: '--cubehelix',\n\n\tranges: {\n\t\th: [0, 360],\n\t\ts: [0, 4.614],\n\t\tl: [0, 1]\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToCubehelix\n\t},\n\n\ttoMode: {\n\t\trgb: convertCubehelixToRgb\n\t},\n\n\tinterpolate: {\n\t\th: {\n\t\t\tuse: interpolatorLinear,\n\t\t\tfixup: fixupHueShorter\n\t\t},\n\t\ts: interpolatorLinear,\n\t\tl: interpolatorLinear,\n\t\talpha: {\n\t\t\tuse: interpolatorLinear,\n\t\t\tfixup: fixupAlpha\n\t\t}\n\t},\n\n\tdifference: {\n\t\th: differenceHueSaturation\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","import normalizeHue from '../util/normalizeHue.js';\n\n/* \n\tReferences: \n\t\t* https://drafts.csswg.org/css-color/#lab-to-lch\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n*/\nconst convertLabToLch = ({ l, a, b, alpha }, mode = 'lch') => {\n\tif (a === undefined) a = 0;\n\tif (b === undefined) b = 0;\n\tlet c = Math.sqrt(a * a + b * b);\n\tlet res = { mode, l, c };\n\tif (c) res.h = normalizeHue((Math.atan2(b, a) * 180) / Math.PI);\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertLabToLch;\n","/* \n\tReferences: \n\t\t* https://drafts.csswg.org/css-color/#lch-to-lab\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n*/\nconst convertLchToLab = ({ l, c, h, alpha }, mode = 'lab') => {\n\tif (h === undefined) h = 0;\n\tlet res = {\n\t\tmode,\n\t\tl,\n\t\ta: c ? c * Math.cos((h / 180) * Math.PI) : 0,\n\t\tb: c ? c * Math.sin((h / 180) * Math.PI) : 0\n\t};\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertLchToLab;\n","export const k = Math.pow(29, 3) / Math.pow(3, 3);\nexport const e = Math.pow(6, 3) / Math.pow(29, 3);\n","/*\n\tThe XYZ tristimulus values (white point)\n\tof standard illuminants for the CIE 1931 2° \n\tstandard observer.\n\n\tSee: https://en.wikipedia.org/wiki/Standard_illuminant\n */\n\nexport const D50 = {\n\tX: 0.3457 / 0.3585,\n\tY: 1,\n\tZ: (1 - 0.3457 - 0.3585) / 0.3585\n};\n\nexport const D65 = {\n\tX: 0.3127 / 0.329,\n\tY: 1,\n\tZ: (1 - 0.3127 - 0.329) / 0.329\n};\n\nexport const k = Math.pow(29, 3) / Math.pow(3, 3);\nexport const e = Math.pow(6, 3) / Math.pow(29, 3);\n","import { k, e } from '../xyz65/constants.js';\nimport { D65 } from '../constants.js';\n\nlet fn = v => (Math.pow(v, 3) > e ? Math.pow(v, 3) : (116 * v - 16) / k);\n\nconst convertLab65ToXyz65 = ({ l, a, b, alpha }) => {\n\tif (l === undefined) l = 0;\n\tif (a === undefined) a = 0;\n\tif (b === undefined) b = 0;\n\n\tlet fy = (l + 16) / 116;\n\tlet fx = a / 500 + fy;\n\tlet fz = fy - b / 200;\n\n\tlet res = {\n\t\tmode: 'xyz65',\n\t\tx: fn(fx) * D65.X,\n\t\ty: fn(fy) * D65.Y,\n\t\tz: fn(fz) * D65.Z\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertLab65ToXyz65;\n","import convertLab65ToXyz65 from './convertLab65ToXyz65.js';\nimport convertXyz65ToRgb from '../xyz65/convertXyz65ToRgb.js';\n\nconst convertLab65ToRgb = lab => convertXyz65ToRgb(convertLab65ToXyz65(lab));\n\nexport default convertLab65ToRgb;\n","import { k, e } from '../xyz65/constants.js';\nimport { D65 } from '../constants.js';\n\nconst f = value => (value > e ? Math.cbrt(value) : (k * value + 16) / 116);\n\nconst convertXyz65ToLab65 = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet f0 = f(x / D65.X);\n\tlet f1 = f(y / D65.Y);\n\tlet f2 = f(z / D65.Z);\n\n\tlet res = {\n\t\tmode: 'lab65',\n\t\tl: 116 * f1 - 16,\n\t\ta: 500 * (f0 - f1),\n\t\tb: 200 * (f1 - f2)\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertXyz65ToLab65;\n","import convertRgbToXyz65 from '../xyz65/convertRgbToXyz65.js';\nimport convertXyz65ToLab65 from './convertXyz65ToLab65.js';\n\nconst convertRgbToLab65 = rgb => {\n\tlet res = convertXyz65ToLab65(convertRgbToXyz65(rgb));\n\n\t// Fixes achromatic RGB colors having a _slight_ chroma due to floating-point errors\n\t// and approximated computations in sRGB <-> CIELab.\n\t// See: https://github.com/d3/d3-color/pull/46\n\tif (rgb.r === rgb.b && rgb.b === rgb.g) {\n\t\tres.a = res.b = 0;\n\t}\n\treturn res;\n};\n\nexport default convertRgbToLab65;\n","export const kE = 1;\nexport const kCH = 1;\nexport const θ = (26 / 180) * Math.PI;\nexport const cosθ = Math.cos(θ);\nexport const sinθ = Math.sin(θ);\nexport const factor = 100 / Math.log(139 / 100); // ~ 303.67\n","import { kCH, kE, sinθ, cosθ, θ, factor } from './constants.js';\n\n/*\n\tConvert DIN99o LCh to CIELab D65\n\t--------------------------------\n */\n\nconst convertDlchToLab65 = ({ l, c, h, alpha }) => {\n\tif (l === undefined) l = 0;\n\tif (c === undefined) c = 0;\n\tif (h === undefined) h = 0;\n\tlet res = {\n\t\tmode: 'lab65',\n\t\tl: (Math.exp((l * kE) / factor) - 1) / 0.0039\n\t};\n\n\tlet G = (Math.exp(0.0435 * c * kCH * kE) - 1) / 0.075;\n\tlet e = G * Math.cos((h / 180) * Math.PI - θ);\n\tlet f = G * Math.sin((h / 180) * Math.PI - θ);\n\tres.a = e * cosθ - (f / 0.83) * sinθ;\n\tres.b = e * sinθ + (f / 0.83) * cosθ;\n\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertDlchToLab65;\n","import { kCH, kE, sinθ, cosθ, θ, factor } from './constants.js';\nimport normalizeHue from '../util/normalizeHue.js';\n\n/*\n\tConvert CIELab D65 to DIN99o LCh\n\t================================\n */\n\nconst convertLab65ToDlch = ({ l, a, b, alpha }) => {\n\tif (l === undefined) l = 0;\n\tif (a === undefined) a = 0;\n\tif (b === undefined) b = 0;\n\tlet e = a * cosθ + b * sinθ;\n\tlet f = 0.83 * (b * cosθ - a * sinθ);\n\tlet G = Math.sqrt(e * e + f * f);\n\tlet res = {\n\t\tmode: 'dlch',\n\t\tl: (factor / kE) * Math.log(1 + 0.0039 * l),\n\t\tc: Math.log(1 + 0.075 * G) / (0.0435 * kCH * kE)\n\t};\n\n\tif (res.c) {\n\t\tres.h = normalizeHue(((Math.atan2(f, e) + θ) / Math.PI) * 180);\n\t}\n\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertLab65ToDlch;\n","import convertLabToLch from '../lch/convertLabToLch.js';\nimport convertLchToLab from '../lch/convertLchToLab.js';\nimport convertLab65ToRgb from '../lab65/convertLab65ToRgb.js';\nimport convertRgbToLab65 from '../lab65/convertRgbToLab65.js';\nimport convertDlchToLab65 from '../dlch/convertDlchToLab65.js';\nimport convertLab65ToDlch from '../dlch/convertLab65ToDlch.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\nconst convertDlabToLab65 = c => convertDlchToLab65(convertLabToLch(c, 'dlch'));\nconst convertLab65ToDlab = c => convertLchToLab(convertLab65ToDlch(c), 'dlab');\n\nconst definition = {\n\tmode: 'dlab',\n\n\tparse: ['--din99o-lab'],\n\tserialize: '--din99o-lab',\n\n\ttoMode: {\n\t\tlab65: convertDlabToLab65,\n\t\trgb: c => convertLab65ToRgb(convertDlabToLab65(c))\n\t},\n\n\tfromMode: {\n\t\tlab65: convertLab65ToDlab,\n\t\trgb: c => convertLab65ToDlab(convertRgbToLab65(c))\n\t},\n\n\tchannels: ['l', 'a', 'b', 'alpha'],\n\n\tranges: {\n\t\tl: [0, 100],\n\t\ta: [-40.09, 45.501],\n\t\tb: [-40.469, 44.344]\n\t},\n\n\tinterpolate: {\n\t\tl: interpolatorLinear,\n\t\ta: interpolatorLinear,\n\t\tb: interpolatorLinear,\n\t\talpha: {\n\t\t\tuse: interpolatorLinear,\n\t\t\tfixup: fixupAlpha\n\t\t}\n\t}\n};\n\nexport default definition;\n","import convertLabToLch from '../lch/convertLabToLch.js';\nimport convertLchToLab from '../lch/convertLchToLab.js';\nimport convertDlchToLab65 from './convertDlchToLab65.js';\nimport convertLab65ToDlch from './convertLab65ToDlch.js';\nimport convertLab65ToRgb from '../lab65/convertLab65ToRgb.js';\nimport convertRgbToLab65 from '../lab65/convertRgbToLab65.js';\n\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueChroma } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'dlch',\n\n\tparse: ['--din99o-lch'],\n\tserialize: '--din99o-lch',\n\n\ttoMode: {\n\t\tlab65: convertDlchToLab65,\n\t\tdlab: c => convertLchToLab(c, 'dlab'),\n\t\trgb: c => convertLab65ToRgb(convertDlchToLab65(c))\n\t},\n\n\tfromMode: {\n\t\tlab65: convertLab65ToDlch,\n\t\tdlab: c => convertLabToLch(c, 'dlch'),\n\t\trgb: c => convertLab65ToDlch(convertRgbToLab65(c))\n\t},\n\n\tchannels: ['l', 'c', 'h', 'alpha'],\n\n\tranges: {\n\t\tl: [0, 100],\n\t\tc: [0, 51.484],\n\t\th: [0, 360]\n\t},\n\n\tinterpolate: {\n\t\tl: interpolatorLinear,\n\t\tc: interpolatorLinear,\n\t\th: {\n\t\t\tuse: interpolatorLinear,\n\t\t\tfixup: fixupHueShorter\n\t\t},\n\t\talpha: {\n\t\t\tuse: interpolatorLinear,\n\t\t\tfixup: fixupAlpha\n\t\t}\n\t},\n\n\tdifference: {\n\t\th: differenceHueChroma\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","import normalizeHue from '../util/normalizeHue.js';\n\n// Based on: https://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB\n\nexport default function convertHsiToRgb({ h, s, i, alpha }) {\n\th = normalizeHue(h !== undefined ? h : 0);\n\tif (s === undefined) s = 0;\n\tif (i === undefined) i = 0;\n\tlet f = Math.abs(((h / 60) % 2) - 1);\n\tlet res;\n\tswitch (Math.floor(h / 60)) {\n\t\tcase 0:\n\t\t\tres = {\n\t\t\t\tr: i * (1 + s * (3 / (2 - f) - 1)),\n\t\t\t\tg: i * (1 + s * ((3 * (1 - f)) / (2 - f) - 1)),\n\t\t\t\tb: i * (1 - s)\n\t\t\t};\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tres = {\n\t\t\t\tr: i * (1 + s * ((3 * (1 - f)) / (2 - f) - 1)),\n\t\t\t\tg: i * (1 + s * (3 / (2 - f) - 1)),\n\t\t\t\tb: i * (1 - s)\n\t\t\t};\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tres = {\n\t\t\t\tr: i * (1 - s),\n\t\t\t\tg: i * (1 + s * (3 / (2 - f) - 1)),\n\t\t\t\tb: i * (1 + s * ((3 * (1 - f)) / (2 - f) - 1))\n\t\t\t};\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tres = {\n\t\t\t\tr: i * (1 - s),\n\t\t\t\tg: i * (1 + s * ((3 * (1 - f)) / (2 - f) - 1)),\n\t\t\t\tb: i * (1 + s * (3 / (2 - f) - 1))\n\t\t\t};\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tres = {\n\t\t\t\tr: i * (1 + s * ((3 * (1 - f)) / (2 - f) - 1)),\n\t\t\t\tg: i * (1 - s),\n\t\t\t\tb: i * (1 + s * (3 / (2 - f) - 1))\n\t\t\t};\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tres = {\n\t\t\t\tr: i * (1 + s * (3 / (2 - f) - 1)),\n\t\t\t\tg: i * (1 - s),\n\t\t\t\tb: i * (1 + s * ((3 * (1 - f)) / (2 - f) - 1))\n\t\t\t};\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tres = { r: i * (1 - s), g: i * (1 - s), b: i * (1 - s) };\n\t}\n\n\tres.mode = 'rgb';\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n}\n","// Based on: https://en.wikipedia.org/wiki/HSL_and_HSV#Formal_derivation\n\nexport default function convertRgbToHsi({ r, g, b, alpha }) {\n\tif (r === undefined) r = 0;\n\tif (g === undefined) g = 0;\n\tif (b === undefined) b = 0;\n\tlet M = Math.max(r, g, b),\n\t\tm = Math.min(r, g, b);\n\tlet res = {\n\t\tmode: 'hsi',\n\t\ts: r + g + b === 0 ? 0 : 1 - (3 * m) / (r + g + b),\n\t\ti: (r + g + b) / 3\n\t};\n\tif (M - m !== 0)\n\t\tres.h =\n\t\t\t(M === r\n\t\t\t\t? (g - b) / (M - m) + (g < b) * 6\n\t\t\t\t: M === g\n\t\t\t\t? (b - r) / (M - m) + 2\n\t\t\t\t: (r - g) / (M - m) + 4) * 60;\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n}\n","import convertHsiToRgb from './convertHsiToRgb.js';\nimport convertRgbToHsi from './convertRgbToHsi.js';\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueSaturation } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'hsi',\n\n\ttoMode: {\n\t\trgb: convertHsiToRgb\n\t},\n\n\tparse: ['--hsi'],\n\tserialize: '--hsi',\n\n\tfromMode: {\n\t\trgb: convertRgbToHsi\n\t},\n\n\tchannels: ['h', 's', 'i', 'alpha'],\n\n\tranges: {\n\t\th: [0, 360]\n\t},\n\n\tgamut: 'rgb',\n\n\tinterpolate: {\n\t\th: { use: interpolatorLinear, fixup: fixupHueShorter },\n\t\ts: interpolatorLinear,\n\t\ti: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\n\tdifference: {\n\t\th: differenceHueSaturation\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","import normalizeHue from '../util/normalizeHue.js';\n// Based on: https://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB\n\nexport default function convertHslToRgb({ h, s, l, alpha }) {\n\th = normalizeHue(h !== undefined ? h : 0);\n\tif (s === undefined) s = 0;\n\tif (l === undefined) l = 0;\n\tlet m1 = l + s * (l < 0.5 ? l : 1 - l);\n\tlet m2 = m1 - (m1 - l) * 2 * Math.abs(((h / 60) % 2) - 1);\n\tlet res;\n\tswitch (Math.floor(h / 60)) {\n\t\tcase 0:\n\t\t\tres = { r: m1, g: m2, b: 2 * l - m1 };\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tres = { r: m2, g: m1, b: 2 * l - m1 };\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tres = { r: 2 * l - m1, g: m1, b: m2 };\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tres = { r: 2 * l - m1, g: m2, b: m1 };\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tres = { r: m2, g: 2 * l - m1, b: m1 };\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tres = { r: m1, g: 2 * l - m1, b: m2 };\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tres = { r: 2 * l - m1, g: 2 * l - m1, b: 2 * l - m1 };\n\t}\n\tres.mode = 'rgb';\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n}\n","// Based on: https://en.wikipedia.org/wiki/HSL_and_HSV#Formal_derivation\n\nexport default function convertRgbToHsl({ r, g, b, alpha }) {\n\tif (r === undefined) r = 0;\n\tif (g === undefined) g = 0;\n\tif (b === undefined) b = 0;\n\tlet M = Math.max(r, g, b),\n\t\tm = Math.min(r, g, b);\n\tlet res = {\n\t\tmode: 'hsl',\n\t\ts: M === m ? 0 : (M - m) / (1 - Math.abs(M + m - 1)),\n\t\tl: 0.5 * (M + m)\n\t};\n\tif (M - m !== 0)\n\t\tres.h =\n\t\t\t(M === r\n\t\t\t\t? (g - b) / (M - m) + (g < b) * 6\n\t\t\t\t: M === g\n\t\t\t\t? (b - r) / (M - m) + 2\n\t\t\t\t: (r - g) / (M - m) + 4) * 60;\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n}\n","const hueToDeg = (val, unit) => {\n\tswitch (unit) {\n\t\tcase 'deg':\n\t\t\treturn +val;\n\t\tcase 'rad':\n\t\t\treturn (val / Math.PI) * 180;\n\t\tcase 'grad':\n\t\t\treturn (val / 10) * 9;\n\t\tcase 'turn':\n\t\t\treturn val * 360;\n\t}\n};\n\nexport default hueToDeg;\n","import hueToDeg from '../util/hue.js';\nimport { hue, per, num_per, c } from '../util/regex.js';\n\n/*\n\thsl() regular expressions for legacy format\n\tReference: https://drafts.csswg.org/css-color/#the-hsl-notation\n */\nconst hsl_old = new RegExp(\n\t`^hsla?\\\\(\\\\s*${hue}${c}${per}${c}${per}\\\\s*(?:,\\\\s*${num_per}\\\\s*)?\\\\)$`\n);\n\nconst parseHslLegacy = color => {\n\tlet match = color.match(hsl_old);\n\tif (!match) return;\n\tlet res = { mode: 'hsl' };\n\n\tif (match[3] !== undefined) {\n\t\tres.h = +match[3];\n\t} else if (match[1] !== undefined && match[2] !== undefined) {\n\t\tres.h = hueToDeg(match[1], match[2]);\n\t}\n\n\tif (match[4] !== undefined) {\n\t\tres.s = Math.min(Math.max(0, match[4] / 100), 1);\n\t}\n\n\tif (match[5] !== undefined) {\n\t\tres.l = Math.min(Math.max(0, match[5] / 100), 1);\n\t}\n\n\tif (match[6] !== undefined) {\n\t\tres.alpha = Math.max(0, Math.min(1, match[6] / 100));\n\t} else if (match[7] !== undefined) {\n\t\tres.alpha = Math.max(0, Math.min(1, +match[7]));\n\t}\n\treturn res;\n};\n\nexport default parseHslLegacy;\n","import { Tok } from '../parse.js';\n\nfunction parseHsl(color, parsed) {\n\tif (!parsed || (parsed[0] !== 'hsl' && parsed[0] !== 'hsla')) {\n\t\treturn undefined;\n\t}\n\tconst res = { mode: 'hsl' };\n\tconst [, h, s, l, alpha] = parsed;\n\n\tif (h.type !== Tok.None) {\n\t\tif (h.type === Tok.Percentage) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.h = h.value;\n\t}\n\n\tif (s.type !== Tok.None) {\n\t\tif (s.type === Tok.Hue) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.s = s.value / 100;\n\t}\n\n\tif (l.type !== Tok.None) {\n\t\tif (l.type === Tok.Hue) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.l = l.value / 100;\n\t}\n\n\tif (alpha.type !== Tok.None) {\n\t\tres.alpha = Math.min(\n\t\t\t1,\n\t\t\tMath.max(\n\t\t\t\t0,\n\t\t\t\talpha.type === Tok.Number ? alpha.value : alpha.value / 100\n\t\t\t)\n\t\t);\n\t}\n\n\treturn res;\n}\n\nexport default parseHsl;\n","import convertHslToRgb from './convertHslToRgb.js';\nimport convertRgbToHsl from './convertRgbToHsl.js';\nimport parseHslLegacy from './parseHslLegacy.js';\nimport parseHsl from './parseHsl.js';\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueSaturation } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'hsl',\n\n\ttoMode: {\n\t\trgb: convertHslToRgb\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToHsl\n\t},\n\n\tchannels: ['h', 's', 'l', 'alpha'],\n\n\tranges: {\n\t\th: [0, 360]\n\t},\n\n\tgamut: 'rgb',\n\n\tparse: [parseHsl, parseHslLegacy],\n\tserialize: c =>\n\t\t`hsl(${c.h !== undefined ? c.h : 'none'} ${\n\t\t\tc.s !== undefined ? c.s * 100 + '%' : 'none'\n\t\t} ${c.l !== undefined ? c.l * 100 + '%' : 'none'}${\n\t\t\tc.alpha < 1 ? ` / ${c.alpha}` : ''\n\t\t})`,\n\n\tinterpolate: {\n\t\th: { use: interpolatorLinear, fixup: fixupHueShorter },\n\t\ts: interpolatorLinear,\n\t\tl: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\n\tdifference: {\n\t\th: differenceHueSaturation\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","import normalizeHue from '../util/normalizeHue.js';\n\n// Based on: https://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB\n\nexport default function convertHsvToRgb({ h, s, v, alpha }) {\n\th = normalizeHue(h !== undefined ? h : 0);\n\tif (s === undefined) s = 0;\n\tif (v === undefined) v = 0;\n\tlet f = Math.abs(((h / 60) % 2) - 1);\n\tlet res;\n\tswitch (Math.floor(h / 60)) {\n\t\tcase 0:\n\t\t\tres = { r: v, g: v * (1 - s * f), b: v * (1 - s) };\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tres = { r: v * (1 - s * f), g: v, b: v * (1 - s) };\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tres = { r: v * (1 - s), g: v, b: v * (1 - s * f) };\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tres = { r: v * (1 - s), g: v * (1 - s * f), b: v };\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tres = { r: v * (1 - s * f), g: v * (1 - s), b: v };\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tres = { r: v, g: v * (1 - s), b: v * (1 - s * f) };\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tres = { r: v * (1 - s), g: v * (1 - s), b: v * (1 - s) };\n\t}\n\tres.mode = 'rgb';\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n}\n","// Based on: https://en.wikipedia.org/wiki/HSL_and_HSV#Formal_derivation\n\nexport default function convertRgbToHsv({ r, g, b, alpha }) {\n\tif (r === undefined) r = 0;\n\tif (g === undefined) g = 0;\n\tif (b === undefined) b = 0;\n\tlet M = Math.max(r, g, b),\n\t\tm = Math.min(r, g, b);\n\tlet res = {\n\t\tmode: 'hsv',\n\t\ts: M === 0 ? 0 : 1 - m / M,\n\t\tv: M\n\t};\n\tif (M - m !== 0)\n\t\tres.h =\n\t\t\t(M === r\n\t\t\t\t? (g - b) / (M - m) + (g < b) * 6\n\t\t\t\t: M === g\n\t\t\t\t? (b - r) / (M - m) + 2\n\t\t\t\t: (r - g) / (M - m) + 4) * 60;\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n}\n","import convertHsvToRgb from './convertHsvToRgb.js';\nimport convertRgbToHsv from './convertRgbToHsv.js';\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueSaturation } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'hsv',\n\n\ttoMode: {\n\t\trgb: convertHsvToRgb\n\t},\n\n\tparse: ['--hsv'],\n\tserialize: '--hsv',\n\n\tfromMode: {\n\t\trgb: convertRgbToHsv\n\t},\n\n\tchannels: ['h', 's', 'v', 'alpha'],\n\n\tranges: {\n\t\th: [0, 360]\n\t},\n\n\tgamut: 'rgb',\n\n\tinterpolate: {\n\t\th: { use: interpolatorLinear, fixup: fixupHueShorter },\n\t\ts: interpolatorLinear,\n\t\tv: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\n\tdifference: {\n\t\th: differenceHueSaturation\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","/*\n\tHWB to RGB converter\n\t--------------------\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#hwb-to-rgb\n\t\t* https://en.wikipedia.org/wiki/HWB_color_model\n\t\t* http://alvyray.com/Papers/CG/HWB_JGTv208.pdf\n */\n\nimport convertHsvToRgb from '../hsv/convertHsvToRgb.js';\n\nexport default function convertHwbToRgb({ h, w, b, alpha }) {\n\tif (w === undefined) w = 0;\n\tif (b === undefined) b = 0;\n\t// normalize w + b to 1\n\tif (w + b > 1) {\n\t\tlet s = w + b;\n\t\tw /= s;\n\t\tb /= s;\n\t}\n\treturn convertHsvToRgb({\n\t\th: h,\n\t\ts: b === 1 ? 1 : 1 - w / (1 - b),\n\t\tv: 1 - b,\n\t\talpha: alpha\n\t});\n}\n","/*\n\tRGB to HWB converter\n\t--------------------\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#hwb-to-rgb\n\t\t* https://en.wikipedia.org/wiki/HWB_color_model\n\t\t* http://alvyray.com/Papers/CG/HWB_JGTv208.pdf\n */\n\nimport convertRgbToHsv from '../hsv/convertRgbToHsv.js';\n\nexport default function convertRgbToHwb(rgba) {\n\tlet hsv = convertRgbToHsv(rgba);\n\tif (hsv === undefined) return undefined;\n\tlet s = hsv.s !== undefined ? hsv.s : 0;\n\tlet v = hsv.v !== undefined ? hsv.v : 0;\n\tlet res = {\n\t\tmode: 'hwb',\n\t\tw: (1 - s) * v,\n\t\tb: 1 - v\n\t};\n\tif (hsv.h !== undefined) res.h = hsv.h;\n\tif (hsv.alpha !== undefined) res.alpha = hsv.alpha;\n\treturn res;\n}\n","import { Tok } from '../parse.js';\n\nfunction ParseHwb(color, parsed) {\n\tif (!parsed || parsed[0] !== 'hwb') {\n\t\treturn undefined;\n\t}\n\tconst res = { mode: 'hwb' };\n\tconst [, h, w, b, alpha] = parsed;\n\n\tif (h.type !== Tok.None) {\n\t\tif (h.type === Tok.Percentage) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.h = h.value;\n\t}\n\n\tif (w.type !== Tok.None) {\n\t\tif (w.type === Tok.Hue) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.w = w.value / 100;\n\t}\n\n\tif (b.type !== Tok.None) {\n\t\tif (b.type === Tok.Hue) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.b = b.value / 100;\n\t}\n\n\tif (alpha.type !== Tok.None) {\n\t\tres.alpha = Math.min(\n\t\t\t1,\n\t\t\tMath.max(\n\t\t\t\t0,\n\t\t\t\talpha.type === Tok.Number ? alpha.value : alpha.value / 100\n\t\t\t)\n\t\t);\n\t}\n\n\treturn res;\n}\n\nexport default ParseHwb;\n","import convertHwbToRgb from './convertHwbToRgb.js';\nimport convertRgbToHwb from './convertRgbToHwb.js';\nimport parseHwb from './parseHwb.js';\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueNaive } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'hwb',\n\n\ttoMode: {\n\t\trgb: convertHwbToRgb\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToHwb\n\t},\n\n\tchannels: ['h', 'w', 'b', 'alpha'],\n\n\tranges: {\n\t\th: [0, 360]\n\t},\n\n\tgamut: 'rgb',\n\n\tparse: [parseHwb],\n\tserialize: c =>\n\t\t`hwb(${c.h !== undefined ? c.h : 'none'} ${\n\t\t\tc.w !== undefined ? c.w * 100 + '%' : 'none'\n\t\t} ${c.b !== undefined ? c.b * 100 + '%' : 'none'}${\n\t\t\tc.alpha < 1 ? ` / ${c.alpha}` : ''\n\t\t})`,\n\n\tinterpolate: {\n\t\th: { use: interpolatorLinear, fixup: fixupHueShorter },\n\t\tw: interpolatorLinear,\n\t\tb: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\n\tdifference: {\n\t\th: differenceHueNaive\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","/*\n\thttps://en.wikipedia.org/wiki/Transfer_functions_in_imaging\n*/\n\nexport const M1 = 0.1593017578125;\nexport const M2 = 78.84375;\nexport const C1 = 0.8359375;\nexport const C2 = 18.8515625;\nexport const C3 = 18.6875;\n\n/*\n\tPerceptual Quantizer, as defined in Rec. BT 2100-2 (2018)\n\n\t* https://www.itu.int/rec/R-REC-BT.2100-2-201807-I/en\n\t* https://en.wikipedia.org/wiki/Perceptual_quantizer\n*/\n\n/* PQ EOTF, defined for `v` in [0,1]. */\nexport function transferPqDecode(v) {\n\tif (v < 0) return 0;\n\tconst c = Math.pow(v, 1 / M2);\n\treturn 1e4 * Math.pow(Math.max(0, c - C1) / (C2 - C3 * c), 1 / M1);\n}\n\n/* PQ EOTF^-1, defined for `v` in [0, 1e4]. */\nexport function transferPqEncode(v) {\n\tif (v < 0) return 0;\n\tconst c = Math.pow(v / 1e4, M1);\n\treturn Math.pow((C1 + C2 * c) / (1 + C3 * c), M2);\n}\n","import { YW } from '../hdr/constants.js';\nimport { transferPqDecode } from '../hdr/transfer.js';\n\nconst toRel = c => Math.max(c / YW, 0);\n\nconst convertItpToXyz65 = ({ i, t, p, alpha }) => {\n\tif (i === undefined) i = 0;\n\tif (t === undefined) t = 0;\n\tif (p === undefined) p = 0;\n\n\tconst l = transferPqDecode(\n\t\ti + 0.008609037037932761 * t + 0.11102962500302593 * p\n\t);\n\tconst m = transferPqDecode(\n\t\ti - 0.00860903703793275 * t - 0.11102962500302599 * p\n\t);\n\tconst s = transferPqDecode(\n\t\ti + 0.5600313357106791 * t - 0.32062717498731885 * p\n\t);\n\n\tconst res = {\n\t\tmode: 'xyz65',\n\t\tx: toRel(\n\t\t\t2.0701522183894219 * l -\n\t\t\t\t1.3263473389671556 * m +\n\t\t\t\t0.2066510476294051 * s\n\t\t),\n\t\ty: toRel(\n\t\t\t0.3647385209748074 * l +\n\t\t\t\t0.680566024947227 * m -\n\t\t\t\t0.0453045459220346 * s\n\t\t),\n\t\tz: toRel(\n\t\t\t-0.049747207535812 * l -\n\t\t\t\t0.0492609666966138 * m +\n\t\t\t\t1.1880659249923042 * s\n\t\t)\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertItpToXyz65;\n","import { YW } from '../hdr/constants.js';\nimport { transferPqEncode } from '../hdr/transfer.js';\n\nconst toAbs = (c = 0) => Math.max(c * YW, 0);\n\nconst convertXyz65ToItp = ({ x, y, z, alpha }) => {\n\tconst absX = toAbs(x);\n\tconst absY = toAbs(y);\n\tconst absZ = toAbs(z);\n\tconst l = transferPqEncode(\n\t\t0.3592832590121217 * absX +\n\t\t\t0.6976051147779502 * absY -\n\t\t\t0.0358915932320289 * absZ\n\t);\n\tconst m = transferPqEncode(\n\t\t-0.1920808463704995 * absX +\n\t\t\t1.1004767970374323 * absY +\n\t\t\t0.0753748658519118 * absZ\n\t);\n\tconst s = transferPqEncode(\n\t\t0.0070797844607477 * absX +\n\t\t\t0.0748396662186366 * absY +\n\t\t\t0.8433265453898765 * absZ\n\t);\n\n\tconst i = 0.5 * l + 0.5 * m;\n\tconst t = 1.61376953125 * l - 3.323486328125 * m + 1.709716796875 * s;\n\tconst p = 4.378173828125 * l - 4.24560546875 * m - 0.132568359375 * s;\n\n\tconst res = { mode: 'itp', i, t, p };\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertXyz65ToItp;\n","import { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport convertItpToXyz65 from './convertItpToXyz65.js';\nimport convertXyz65ToItp from './convertXyz65ToItp.js';\nimport convertRgbToXyz65 from '../xyz65/convertRgbToXyz65.js';\nimport convertXyz65ToRgb from '../xyz65/convertXyz65ToRgb.js';\n\n/*\n ICtCp (or ITP) color space, as defined in ITU-R Recommendation BT.2100.\n\n ICtCp is drafted to be supported in CSS within\n [CSS Color HDR Module Level 1](https://drafts.csswg.org/css-color-hdr/#ICtCp) spec.\n*/\n\nconst definition = {\n\tmode: 'itp',\n\tchannels: ['i', 't', 'p', 'alpha'],\n\tparse: ['--ictcp'],\n\tserialize: '--ictcp',\n\n\ttoMode: {\n\t\txyz65: convertItpToXyz65,\n\t\trgb: color => convertXyz65ToRgb(convertItpToXyz65(color))\n\t},\n\n\tfromMode: {\n\t\txyz65: convertXyz65ToItp,\n\t\trgb: color => convertXyz65ToItp(convertRgbToXyz65(color))\n\t},\n\n\tranges: {\n\t\ti: [0, 0.581],\n\t\tt: [-0.369, 0.272],\n\t\tp: [-0.164, 0.331]\n\t},\n\n\tinterpolate: {\n\t\ti: interpolatorLinear,\n\t\tt: interpolatorLinear,\n\t\tp: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","import { M1 as n, C1, C2, C3 } from '../hdr/transfer.js';\nconst p = 134.03437499999998; // = 1.7 * 2523 / Math.pow(2, 5);\nconst d0 = 1.6295499532821566e-11;\n\n/* \n\tThe encoding function is derived from Perceptual Quantizer.\n*/\nconst jabPqEncode = v => {\n\tif (v < 0) return 0;\n\tlet vn = Math.pow(v / 10000, n);\n\treturn Math.pow((C1 + C2 * vn) / (1 + C3 * vn), p);\n};\n\n// Convert to Absolute XYZ\nconst abs = (v = 0) => Math.max(v * 203, 0);\n\nconst convertXyz65ToJab = ({ x, y, z, alpha }) => {\n\tx = abs(x);\n\ty = abs(y);\n\tz = abs(z);\n\n\tlet xp = 1.15 * x - 0.15 * z;\n\tlet yp = 0.66 * y + 0.34 * x;\n\n\tlet l = jabPqEncode(0.41478972 * xp + 0.579999 * yp + 0.014648 * z);\n\tlet m = jabPqEncode(-0.20151 * xp + 1.120649 * yp + 0.0531008 * z);\n\tlet s = jabPqEncode(-0.0166008 * xp + 0.2648 * yp + 0.6684799 * z);\n\n\tlet i = (l + m) / 2;\n\n\tlet res = {\n\t\tmode: 'jab',\n\t\tj: (0.44 * i) / (1 - 0.56 * i) - d0,\n\t\ta: 3.524 * l - 4.066708 * m + 0.542708 * s,\n\t\tb: 0.199076 * l + 1.096799 * m - 1.295875 * s\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertXyz65ToJab;\n","import { M1 as n, C1, C2, C3 } from '../hdr/transfer.js';\nconst p = 134.03437499999998; // = 1.7 * 2523 / Math.pow(2, 5);\nconst d0 = 1.6295499532821566e-11;\n\n/* \n\tThe encoding function is derived from Perceptual Quantizer.\n*/\nconst jabPqDecode = v => {\n\tif (v < 0) return 0;\n\tlet vp = Math.pow(v, 1 / p);\n\treturn 10000 * Math.pow((C1 - vp) / (C3 * vp - C2), 1 / n);\n};\n\nconst rel = v => v / 203;\n\nconst convertJabToXyz65 = ({ j, a, b, alpha }) => {\n\tif (j === undefined) j = 0;\n\tif (a === undefined) a = 0;\n\tif (b === undefined) b = 0;\n\tlet i = (j + d0) / (0.44 + 0.56 * (j + d0));\n\n\tlet l = jabPqDecode(i + 0.13860504 * a + 0.058047316 * b);\n\tlet m = jabPqDecode(i - 0.13860504 * a - 0.058047316 * b);\n\tlet s = jabPqDecode(i - 0.096019242 * a - 0.8118919 * b);\n\n\tlet res = {\n\t\tmode: 'xyz65',\n\t\tx: rel(\n\t\t\t1.661373024652174 * l -\n\t\t\t\t0.914523081304348 * m +\n\t\t\t\t0.23136208173913045 * s\n\t\t),\n\t\ty: rel(\n\t\t\t-0.3250758611844533 * l +\n\t\t\t\t1.571847026732543 * m -\n\t\t\t\t0.21825383453227928 * s\n\t\t),\n\t\tz: rel(-0.090982811 * l - 0.31272829 * m + 1.5227666 * s)\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertJabToXyz65;\n","/*\n\tConvert sRGB to JzAzBz.\n\n\tFor achromatic sRGB colors, adjust the equivalent JzAzBz color\n\tto be achromatic as well, insteading of having a very slight chroma.\n */\n\nimport convertXyz65ToJab from './convertXyz65ToJab.js';\nimport convertRgbToXyz65 from '../xyz65/convertRgbToXyz65.js';\n\nconst convertRgbToJab = rgb => {\n\tlet res = convertXyz65ToJab(convertRgbToXyz65(rgb));\n\tif (rgb.r === rgb.b && rgb.b === rgb.g) {\n\t\tres.a = res.b = 0;\n\t}\n\treturn res;\n};\n\nexport default convertRgbToJab;\n","import convertXyz65ToRgb from '../xyz65/convertXyz65ToRgb.js';\nimport convertJabToXyz65 from './convertJabToXyz65.js';\n\nconst convertJabToRgb = color => convertXyz65ToRgb(convertJabToXyz65(color));\n\nexport default convertJabToRgb;\n","/*\n\tThe JzAzBz color space.\n\n\tBased on:\n\n\tMuhammad Safdar, Guihua Cui, Youn Jin Kim, and Ming Ronnier Luo, \n\t\"Perceptually uniform color space for image signals \n\tincluding high dynamic range and wide gamut,\" \n\tOpt. Express 25, 15131-15151 (2017) \n\n\thttps://doi.org/10.1364/OE.25.015131\n */\n\nimport convertXyz65ToJab from './convertXyz65ToJab.js';\nimport convertJabToXyz65 from './convertJabToXyz65.js';\nimport convertRgbToJab from './convertRgbToJab.js';\nimport convertJabToRgb from './convertJabToRgb.js';\n\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\nconst definition = {\n\tmode: 'jab',\n\tchannels: ['j', 'a', 'b', 'alpha'],\n\n\tparse: ['--jzazbz'],\n\tserialize: '--jzazbz',\n\n\tfromMode: {\n\t\trgb: convertRgbToJab,\n\t\txyz65: convertXyz65ToJab\n\t},\n\n\ttoMode: {\n\t\trgb: convertJabToRgb,\n\t\txyz65: convertJabToXyz65\n\t},\n\n\tranges: {\n\t\tj: [0, 0.222],\n\t\ta: [-0.109, 0.129],\n\t\tb: [-0.185, 0.134]\n\t},\n\n\tinterpolate: {\n\t\tj: interpolatorLinear,\n\t\ta: interpolatorLinear,\n\t\tb: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","import normalizeHue from '../util/normalizeHue.js';\n\nconst convertJabToJch = ({ j, a, b, alpha }) => {\n\tif (a === undefined) a = 0;\n\tif (b === undefined) b = 0;\n\tlet c = Math.sqrt(a * a + b * b);\n\tlet res = {\n\t\tmode: 'jch',\n\t\tj,\n\t\tc\n\t};\n\tif (c) {\n\t\tres.h = normalizeHue((Math.atan2(b, a) * 180) / Math.PI);\n\t}\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertJabToJch;\n","const convertJchToJab = ({ j, c, h, alpha }) => {\n\tif (h === undefined) h = 0;\n\tlet res = {\n\t\tmode: 'jab',\n\t\tj,\n\t\ta: c ? c * Math.cos((h / 180) * Math.PI) : 0,\n\t\tb: c ? c * Math.sin((h / 180) * Math.PI) : 0\n\t};\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertJchToJab;\n","import convertJabToJch from './convertJabToJch.js';\nimport convertJchToJab from './convertJchToJab.js';\nimport convertJabToRgb from '../jab/convertJabToRgb.js';\nimport convertRgbToJab from '../jab/convertRgbToJab.js';\n\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueChroma } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'jch',\n\n\tparse: ['--jzczhz'],\n\tserialize: '--jzczhz',\n\n\ttoMode: {\n\t\tjab: convertJchToJab,\n\t\trgb: c => convertJabToRgb(convertJchToJab(c))\n\t},\n\n\tfromMode: {\n\t\trgb: c => convertJabToJch(convertRgbToJab(c)),\n\t\tjab: convertJabToJch\n\t},\n\n\tchannels: ['j', 'c', 'h', 'alpha'],\n\n\tranges: {\n\t\tj: [0, 0.221],\n\t\tc: [0, 0.19],\n\t\th: [0, 360]\n\t},\n\n\tinterpolate: {\n\t\th: { use: interpolatorLinear, fixup: fixupHueShorter },\n\t\tc: interpolatorLinear,\n\t\tj: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\n\tdifference: {\n\t\th: differenceHueChroma\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","export const k = Math.pow(29, 3) / Math.pow(3, 3);\nexport const e = Math.pow(6, 3) / Math.pow(29, 3);\n","import { k, e } from '../xyz50/constants.js';\nimport { D50 } from '../constants.js';\n\nlet fn = v => (Math.pow(v, 3) > e ? Math.pow(v, 3) : (116 * v - 16) / k);\n\nconst convertLabToXyz50 = ({ l, a, b, alpha }) => {\n\tif (l === undefined) l = 0;\n\tif (a === undefined) a = 0;\n\tif (b === undefined) b = 0;\n\tlet fy = (l + 16) / 116;\n\tlet fx = a / 500 + fy;\n\tlet fz = fy - b / 200;\n\n\tlet res = {\n\t\tmode: 'xyz50',\n\t\tx: fn(fx) * D50.X,\n\t\ty: fn(fy) * D50.Y,\n\t\tz: fn(fz) * D50.Z\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertLabToXyz50;\n","/*\n\tCIE XYZ D50 values to sRGB.\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n*/\n\nimport convertLrgbToRgb from '../lrgb/convertLrgbToRgb.js';\n\nconst convertXyz50ToRgb = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = convertLrgbToRgb({\n\t\tr:\n\t\t\tx * 3.1341359569958707 -\n\t\t\ty * 1.6173863321612538 -\n\t\t\t0.4906619460083532 * z,\n\t\tg:\n\t\t\tx * -0.978795502912089 +\n\t\t\ty * 1.916254567259524 +\n\t\t\t0.03344273116131949 * z,\n\t\tb:\n\t\t\tx * 0.07195537988411677 -\n\t\t\ty * 0.2289768264158322 +\n\t\t\t1.405386058324125 * z\n\t});\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz50ToRgb;\n","import convertLabToXyz50 from './convertLabToXyz50.js';\nimport convertXyz50ToRgb from '../xyz50/convertXyz50ToRgb.js';\n\nconst convertLabToRgb = lab => convertXyz50ToRgb(convertLabToXyz50(lab));\n\nexport default convertLabToRgb;\n","/*\n\tConvert sRGB values to CIE XYZ D50\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n\t\n*/\n\nimport convertRgbToLrgb from '../lrgb/convertRgbToLrgb.js';\n\nconst convertRgbToXyz50 = rgb => {\n\tlet { r, g, b, alpha } = convertRgbToLrgb(rgb);\n\tlet res = {\n\t\tmode: 'xyz50',\n\t\tx:\n\t\t\t0.436065742824811 * r +\n\t\t\t0.3851514688337912 * g +\n\t\t\t0.14307845442264197 * b,\n\t\ty:\n\t\t\t0.22249319175623702 * r +\n\t\t\t0.7168870538238823 * g +\n\t\t\t0.06061979053616537 * b,\n\t\tz:\n\t\t\t0.013923904500943465 * r +\n\t\t\t0.09708128566574634 * g +\n\t\t\t0.7140993584005155 * b\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertRgbToXyz50;\n","import { k, e } from '../xyz50/constants.js';\nimport { D50 } from '../constants.js';\n\nconst f = value => (value > e ? Math.cbrt(value) : (k * value + 16) / 116);\n\nconst convertXyz50ToLab = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet f0 = f(x / D50.X);\n\tlet f1 = f(y / D50.Y);\n\tlet f2 = f(z / D50.Z);\n\n\tlet res = {\n\t\tmode: 'lab',\n\t\tl: 116 * f1 - 16,\n\t\ta: 500 * (f0 - f1),\n\t\tb: 200 * (f1 - f2)\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertXyz50ToLab;\n","import convertRgbToXyz50 from '../xyz50/convertRgbToXyz50.js';\nimport convertXyz50ToLab from './convertXyz50ToLab.js';\n\nconst convertRgbToLab = rgb => {\n\tlet res = convertXyz50ToLab(convertRgbToXyz50(rgb));\n\n\t// Fixes achromatic RGB colors having a _slight_ chroma due to floating-point errors\n\t// and approximated computations in sRGB <-> CIELab.\n\t// See: https://github.com/d3/d3-color/pull/46\n\tif (rgb.r === rgb.b && rgb.b === rgb.g) {\n\t\tres.a = res.b = 0;\n\t}\n\treturn res;\n};\n\nexport default convertRgbToLab;\n","import { Tok } from '../parse.js';\n\nfunction parseLab(color, parsed) {\n\tif (!parsed || parsed[0] !== 'lab') {\n\t\treturn undefined;\n\t}\n\tconst res = { mode: 'lab' };\n\tconst [, l, a, b, alpha] = parsed;\n\tif (l.type === Tok.Hue || a.type === Tok.Hue || b.type === Tok.Hue) {\n\t\treturn undefined;\n\t}\n\tif (l.type !== Tok.None) {\n\t\tres.l = Math.min(Math.max(0, l.value), 100);\n\t}\n\tif (a.type !== Tok.None) {\n\t\tres.a = a.type === Tok.Number ? a.value : (a.value * 125) / 100;\n\t}\n\tif (b.type !== Tok.None) {\n\t\tres.b = b.type === Tok.Number ? b.value : (b.value * 125) / 100;\n\t}\n\tif (alpha.type !== Tok.None) {\n\t\tres.alpha = Math.min(\n\t\t\t1,\n\t\t\tMath.max(\n\t\t\t\t0,\n\t\t\t\talpha.type === Tok.Number ? alpha.value : alpha.value / 100\n\t\t\t)\n\t\t);\n\t}\n\n\treturn res;\n}\n\nexport default parseLab;\n","import convertLabToRgb from './convertLabToRgb.js';\nimport convertLabToXyz50 from './convertLabToXyz50.js';\nimport convertRgbToLab from './convertRgbToLab.js';\nimport convertXyz50ToLab from './convertXyz50ToLab.js';\nimport parseLab from './parseLab.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\nconst definition = {\n\tmode: 'lab',\n\n\ttoMode: {\n\t\txyz50: convertLabToXyz50,\n\t\trgb: convertLabToRgb\n\t},\n\n\tfromMode: {\n\t\txyz50: convertXyz50ToLab,\n\t\trgb: convertRgbToLab\n\t},\n\n\tchannels: ['l', 'a', 'b', 'alpha'],\n\n\tranges: {\n\t\tl: [0, 100],\n\t\ta: [-125, 125],\n\t\tb: [-125, 125]\n\t},\n\n\tparse: [parseLab],\n\tserialize: c =>\n\t\t`lab(${c.l !== undefined ? c.l : 'none'} ${\n\t\t\tc.a !== undefined ? c.a : 'none'\n\t\t} ${c.b !== undefined ? c.b : 'none'}${\n\t\t\tc.alpha < 1 ? ` / ${c.alpha}` : ''\n\t\t})`,\n\n\tinterpolate: {\n\t\tl: interpolatorLinear,\n\t\ta: interpolatorLinear,\n\t\tb: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","import convertLab65ToRgb from './convertLab65ToRgb.js';\nimport convertLab65ToXyz65 from './convertLab65ToXyz65.js';\nimport convertRgbToLab65 from './convertRgbToLab65.js';\nimport convertXyz65ToLab65 from './convertXyz65ToLab65.js';\nimport lab from '../lab/definition.js';\n\nconst definition = {\n\t...lab,\n\tmode: 'lab65',\n\n\tparse: ['--lab-d65'],\n\tserialize: '--lab-d65',\n\n\ttoMode: {\n\t\txyz65: convertLab65ToXyz65,\n\t\trgb: convertLab65ToRgb\n\t},\n\n\tfromMode: {\n\t\txyz65: convertXyz65ToLab65,\n\t\trgb: convertRgbToLab65\n\t},\n\n\tranges: {\n\t\tl: [0, 100],\n\t\ta: [-125, 125],\n\t\tb: [-125, 125]\n\t}\n};\n\nexport default definition;\n","import { Tok } from '../parse.js';\n\nfunction parseLch(color, parsed) {\n\tif (!parsed || parsed[0] !== 'lch') {\n\t\treturn undefined;\n\t}\n\tconst res = { mode: 'lch' };\n\tconst [, l, c, h, alpha] = parsed;\n\tif (l.type !== Tok.None) {\n\t\tif (l.type === Tok.Hue) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.l = Math.min(Math.max(0, l.value), 100);\n\t}\n\tif (c.type !== Tok.None) {\n\t\tres.c = Math.max(\n\t\t\t0,\n\t\t\tc.type === Tok.Number ? c.value : (c.value * 150) / 100\n\t\t);\n\t}\n\tif (h.type !== Tok.None) {\n\t\tif (h.type === Tok.Percentage) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.h = h.value;\n\t}\n\tif (alpha.type !== Tok.None) {\n\t\tres.alpha = Math.min(\n\t\t\t1,\n\t\t\tMath.max(\n\t\t\t\t0,\n\t\t\t\talpha.type === Tok.Number ? alpha.value : alpha.value / 100\n\t\t\t)\n\t\t);\n\t}\n\n\treturn res;\n}\n\nexport default parseLch;\n","import convertLabToLch from './convertLabToLch.js';\nimport convertLchToLab from './convertLchToLab.js';\nimport convertLabToRgb from '../lab/convertLabToRgb.js';\nimport convertRgbToLab from '../lab/convertRgbToLab.js';\nimport parseLch from './parseLch.js';\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueChroma } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst definition = {\n\tmode: 'lch',\n\n\ttoMode: {\n\t\tlab: convertLchToLab,\n\t\trgb: c => convertLabToRgb(convertLchToLab(c))\n\t},\n\n\tfromMode: {\n\t\trgb: c => convertLabToLch(convertRgbToLab(c)),\n\t\tlab: convertLabToLch\n\t},\n\n\tchannels: ['l', 'c', 'h', 'alpha'],\n\n\tranges: {\n\t\tl: [0, 100],\n\t\tc: [0, 150],\n\t\th: [0, 360]\n\t},\n\n\tparse: [parseLch],\n\tserialize: c =>\n\t\t`lch(${c.l !== undefined ? c.l : 'none'} ${\n\t\t\tc.c !== undefined ? c.c : 'none'\n\t\t} ${c.h !== undefined ? c.h : 'none'}${\n\t\t\tc.alpha < 1 ? ` / ${c.alpha}` : ''\n\t\t})`,\n\n\tinterpolate: {\n\t\th: { use: interpolatorLinear, fixup: fixupHueShorter },\n\t\tc: interpolatorLinear,\n\t\tl: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\n\tdifference: {\n\t\th: differenceHueChroma\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","import convertLabToLch from '../lch/convertLabToLch.js';\nimport convertLchToLab from '../lch/convertLchToLab.js';\nimport convertLab65ToRgb from '../lab65/convertLab65ToRgb.js';\nimport convertRgbToLab65 from '../lab65/convertRgbToLab65.js';\nimport lch from '../lch/definition.js';\n\nconst definition = {\n\t...lch,\n\tmode: 'lch65',\n\n\tparse: ['--lch-d65'],\n\tserialize: '--lch-d65',\n\n\ttoMode: {\n\t\tlab65: c => convertLchToLab(c, 'lab65'),\n\t\trgb: c => convertLab65ToRgb(convertLchToLab(c, 'lab65'))\n\t},\n\n\tfromMode: {\n\t\trgb: c => convertLabToLch(convertRgbToLab65(c), 'lch65'),\n\t\tlab65: c => convertLabToLch(c, 'lch65')\n\t},\n\n\tranges: {\n\t\tl: [0, 100],\n\t\tc: [0, 150],\n\t\th: [0, 360]\n\t}\n};\n\nexport default definition;\n","import normalizeHue from '../util/normalizeHue.js';\n\nconst convertLuvToLchuv = ({ l, u, v, alpha }) => {\n\tif (u === undefined) u = 0;\n\tif (v === undefined) v = 0;\n\tlet c = Math.sqrt(u * u + v * v);\n\tlet res = {\n\t\tmode: 'lchuv',\n\t\tl: l,\n\t\tc: c\n\t};\n\tif (c) {\n\t\tres.h = normalizeHue((Math.atan2(v, u) * 180) / Math.PI);\n\t}\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertLuvToLchuv;\n","const convertLchuvToLuv = ({ l, c, h, alpha }) => {\n\tif (h === undefined) h = 0;\n\tlet res = {\n\t\tmode: 'luv',\n\t\tl: l,\n\t\tu: c ? c * Math.cos((h / 180) * Math.PI) : 0,\n\t\tv: c ? c * Math.sin((h / 180) * Math.PI) : 0\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertLchuvToLuv;\n","import { k, e } from '../xyz50/constants.js';\nimport { D50 } from '../constants.js';\n\nexport const u_fn = (x, y, z) => (4 * x) / (x + 15 * y + 3 * z);\nexport const v_fn = (x, y, z) => (9 * y) / (x + 15 * y + 3 * z);\n\nexport const un = u_fn(D50.X, D50.Y, D50.Z);\nexport const vn = v_fn(D50.X, D50.Y, D50.Z);\n\nconst l_fn = value => (value <= e ? k * value : 116 * Math.cbrt(value) - 16);\n\nconst convertXyz50ToLuv = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet l = l_fn(y / D50.Y);\n\tlet u = u_fn(x, y, z);\n\tlet v = v_fn(x, y, z);\n\n\t// guard against NaNs produced by `xyz(0 0 0)` black\n\tif (!isFinite(u) || !isFinite(v)) {\n\t\tl = u = v = 0;\n\t} else {\n\t\tu = 13 * l * (u - un);\n\t\tv = 13 * l * (v - vn);\n\t}\n\n\tlet res = {\n\t\tmode: 'luv',\n\t\tl,\n\t\tu,\n\t\tv\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertXyz50ToLuv;\n","import { k } from '../xyz50/constants.js';\nimport { D50 } from '../constants.js';\n\nexport const u_fn = (x, y, z) => (4 * x) / (x + 15 * y + 3 * z);\nexport const v_fn = (x, y, z) => (9 * y) / (x + 15 * y + 3 * z);\n\nexport const un = u_fn(D50.X, D50.Y, D50.Z);\nexport const vn = v_fn(D50.X, D50.Y, D50.Z);\n\nconst convertLuvToXyz50 = ({ l, u, v, alpha }) => {\n\tif (l === undefined) l = 0;\n\tif (l === 0) {\n\t\treturn { mode: 'xyz50', x: 0, y: 0, z: 0 };\n\t}\n\n\tif (u === undefined) u = 0;\n\tif (v === undefined) v = 0;\n\n\tlet up = u / (13 * l) + un;\n\tlet vp = v / (13 * l) + vn;\n\tlet y = D50.Y * (l <= 8 ? l / k : Math.pow((l + 16) / 116, 3));\n\tlet x = (y * (9 * up)) / (4 * vp);\n\tlet z = (y * (12 - 3 * up - 20 * vp)) / (4 * vp);\n\n\tlet res = { mode: 'xyz50', x, y, z };\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertLuvToXyz50;\n","/*\n\tCIELChuv color space\n\t--------------------\n\n\tReference: \n\n\t\thttps://en.wikipedia.org/wiki/CIELUV\n */\n\nimport convertLuvToLchuv from './convertLuvToLchuv.js';\nimport convertLchuvToLuv from './convertLchuvToLuv.js';\nimport convertXyz50ToLuv from '../luv/convertXyz50ToLuv.js';\nimport convertLuvToXyz50 from '../luv/convertLuvToXyz50.js';\nimport convertXyz50ToRgb from '../xyz50/convertXyz50ToRgb.js';\nimport convertRgbToXyz50 from '../xyz50/convertRgbToXyz50.js';\n\nimport { fixupHueShorter } from '../fixup/hue.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { differenceHueChroma } from '../difference.js';\nimport { averageAngle } from '../average.js';\n\nconst convertRgbToLchuv = rgb =>\n\tconvertLuvToLchuv(convertXyz50ToLuv(convertRgbToXyz50(rgb)));\nconst convertLchuvToRgb = lchuv =>\n\tconvertXyz50ToRgb(convertLuvToXyz50(convertLchuvToLuv(lchuv)));\n\nconst definition = {\n\tmode: 'lchuv',\n\n\ttoMode: {\n\t\tluv: convertLchuvToLuv,\n\t\trgb: convertLchuvToRgb\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToLchuv,\n\t\tluv: convertLuvToLchuv\n\t},\n\n\tchannels: ['l', 'c', 'h', 'alpha'],\n\n\tparse: ['--lchuv'],\n\tserialize: '--lchuv',\n\n\tranges: {\n\t\tl: [0, 100],\n\t\tc: [0, 176.956],\n\t\th: [0, 360]\n\t},\n\n\tinterpolate: {\n\t\th: { use: interpolatorLinear, fixup: fixupHueShorter },\n\t\tc: interpolatorLinear,\n\t\tl: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t},\n\n\tdifference: {\n\t\th: differenceHueChroma\n\t},\n\n\taverage: {\n\t\th: averageAngle\n\t}\n};\n\nexport default definition;\n","import rgb from '../rgb/definition.js';\nimport convertRgbToLrgb from './convertRgbToLrgb.js';\nimport convertLrgbToRgb from './convertLrgbToRgb.js';\n\nconst definition = {\n\t...rgb,\n\tmode: 'lrgb',\n\n\ttoMode: {\n\t\trgb: convertLrgbToRgb\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToLrgb\n\t},\n\n\tparse: ['srgb-linear'],\n\tserialize: 'srgb-linear'\n};\n\nexport default definition;\n","/*\n\tCIELUV color space\n\t------------------\n\n\tReference: \n\n\t\thttps://en.wikipedia.org/wiki/CIELUV\n */\n\nimport convertXyz50ToLuv from './convertXyz50ToLuv.js';\nimport convertLuvToXyz50 from './convertLuvToXyz50.js';\nimport convertXyz50ToRgb from '../xyz50/convertXyz50ToRgb.js';\nimport convertRgbToXyz50 from '../xyz50/convertRgbToXyz50.js';\n\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\nconst definition = {\n\tmode: 'luv',\n\n\ttoMode: {\n\t\txyz50: convertLuvToXyz50,\n\t\trgb: luv => convertXyz50ToRgb(convertLuvToXyz50(luv))\n\t},\n\n\tfromMode: {\n\t\txyz50: convertXyz50ToLuv,\n\t\trgb: rgb => convertXyz50ToLuv(convertRgbToXyz50(rgb))\n\t},\n\n\tchannels: ['l', 'u', 'v', 'alpha'],\n\n\tparse: ['--luv'],\n\tserialize: '--luv',\n\n\tranges: {\n\t\tl: [0, 100],\n\t\tu: [-84.936, 175.042],\n\t\tv: [-125.882, 87.243]\n\t},\n\n\tinterpolate: {\n\t\tl: interpolatorLinear,\n\t\tu: interpolatorLinear,\n\t\tv: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","const convertLrgbToOklab = ({ r, g, b, alpha }) => {\n\tif (r === undefined) r = 0;\n\tif (g === undefined) g = 0;\n\tif (b === undefined) b = 0;\n\n\tlet L = Math.cbrt(\n\t\t0.412221469470763 * r + 0.5363325372617348 * g + 0.0514459932675022 * b\n\t);\n\tlet M = Math.cbrt(\n\t\t0.2119034958178252 * r + 0.6806995506452344 * g + 0.1073969535369406 * b\n\t);\n\tlet S = Math.cbrt(\n\t\t0.0883024591900564 * r + 0.2817188391361215 * g + 0.6299787016738222 * b\n\t);\n\n\tlet res = {\n\t\tmode: 'oklab',\n\t\tl:\n\t\t\t0.210454268309314 * L +\n\t\t\t0.7936177747023054 * M -\n\t\t\t0.0040720430116193 * S,\n\t\ta:\n\t\t\t1.9779985324311684 * L -\n\t\t\t2.4285922420485799 * M +\n\t\t\t0.450593709617411 * S,\n\t\tb:\n\t\t\t0.0259040424655478 * L +\n\t\t\t0.7827717124575296 * M -\n\t\t\t0.8086757549230774 * S\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertLrgbToOklab;\n","import convertRgbToLrgb from '../lrgb/convertRgbToLrgb.js';\nimport convertLrgbToOklab from './convertLrgbToOklab.js';\n\nconst convertRgbToOklab = rgb => {\n\tlet res = convertLrgbToOklab(convertRgbToLrgb(rgb));\n\tif (rgb.r === rgb.b && rgb.b === rgb.g) {\n\t\tres.a = res.b = 0;\n\t}\n\treturn res;\n};\n\nexport default convertRgbToOklab;\n","const convertOklabToLrgb = ({ l, a, b, alpha }) => {\n\tif (l === undefined) l = 0;\n\tif (a === undefined) a = 0;\n\tif (b === undefined) b = 0;\n\n\tlet L = Math.pow(l + 0.3963377773761749 * a + 0.2158037573099136 * b, 3);\n\tlet M = Math.pow(l - 0.1055613458156586 * a - 0.0638541728258133 * b, 3);\n\tlet S = Math.pow(l - 0.0894841775298119 * a - 1.2914855480194092 * b, 3);\n\n\tlet res = {\n\t\tmode: 'lrgb',\n\t\tr:\n\t\t\t4.0767416360759574 * L -\n\t\t\t3.3077115392580616 * M +\n\t\t\t0.2309699031821044 * S,\n\t\tg:\n\t\t\t-1.2684379732850317 * L +\n\t\t\t2.6097573492876887 * M -\n\t\t\t0.3413193760026573 * S,\n\t\tb:\n\t\t\t-0.0041960761386756 * L -\n\t\t\t0.7034186179359362 * M +\n\t\t\t1.7076146940746117 * S\n\t};\n\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\n\treturn res;\n};\n\nexport default convertOklabToLrgb;\n","import convertLrgbToRgb from '../lrgb/convertLrgbToRgb.js';\nimport convertOklabToLrgb from './convertOklabToLrgb.js';\n\nconst convertOklabToRgb = c => convertLrgbToRgb(convertOklabToLrgb(c));\n\nexport default convertOklabToRgb;\n","/*\n\tAdapted from code by Björn Ottosson,\n\treleased under the MIT license:\n\n\tCopyright (c) 2021 Björn Ottosson\n\n\tPermission is hereby granted, free of charge, to any person obtaining a copy of\n\tthis software and associated documentation files (the \"Software\"), to deal in\n\tthe Software without restriction, including without limitation the rights to\n\tuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n\tof the Software, and to permit persons to whom the Software is furnished to do\n\tso, subject to the following conditions:\n\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n */\n\nimport convertOklabToLrgb from '../oklab/convertOklabToLrgb.js';\n\nexport function toe(x) {\n\tconst k_1 = 0.206;\n\tconst k_2 = 0.03;\n\tconst k_3 = (1 + k_1) / (1 + k_2);\n\treturn (\n\t\t0.5 *\n\t\t(k_3 * x -\n\t\t\tk_1 +\n\t\t\tMath.sqrt((k_3 * x - k_1) * (k_3 * x - k_1) + 4 * k_2 * k_3 * x))\n\t);\n}\n\nexport function toe_inv(x) {\n\tconst k_1 = 0.206;\n\tconst k_2 = 0.03;\n\tconst k_3 = (1 + k_1) / (1 + k_2);\n\treturn (x * x + k_1 * x) / (k_3 * (x + k_2));\n}\n\n// Finds the maximum saturation possible for a given hue that fits in sRGB\n// Saturation here is defined as S = C/L\n// a and b must be normalized so a^2 + b^2 == 1\nfunction compute_max_saturation(a, b) {\n\t// Max saturation will be when one of r, g or b goes below zero.\n\n\t// Select different coefficients depending on which component goes below zero first\n\tlet k0, k1, k2, k3, k4, wl, wm, ws;\n\n\tif (-1.88170328 * a - 0.80936493 * b > 1) {\n\t\t// Red component\n\t\tk0 = +1.19086277;\n\t\tk1 = +1.76576728;\n\t\tk2 = +0.59662641;\n\t\tk3 = +0.75515197;\n\t\tk4 = +0.56771245;\n\t\twl = +4.0767416621;\n\t\twm = -3.3077115913;\n\t\tws = +0.2309699292;\n\t} else if (1.81444104 * a - 1.19445276 * b > 1) {\n\t\t// Green component\n\t\tk0 = +0.73956515;\n\t\tk1 = -0.45954404;\n\t\tk2 = +0.08285427;\n\t\tk3 = +0.1254107;\n\t\tk4 = +0.14503204;\n\t\twl = -1.2684380046;\n\t\twm = +2.6097574011;\n\t\tws = -0.3413193965;\n\t} else {\n\t\t// Blue component\n\t\tk0 = +1.35733652;\n\t\tk1 = -0.00915799;\n\t\tk2 = -1.1513021;\n\t\tk3 = -0.50559606;\n\t\tk4 = +0.00692167;\n\t\twl = -0.0041960863;\n\t\twm = -0.7034186147;\n\t\tws = +1.707614701;\n\t}\n\n\t// Approximate max saturation using a polynomial:\n\tlet S = k0 + k1 * a + k2 * b + k3 * a * a + k4 * a * b;\n\n\t// Do one step Halley's method to get closer\n\t// this gives an error less than 10e6, except for some blue hues where the dS/dh is close to infinite\n\t// this should be sufficient for most applications, otherwise do two/three steps\n\n\tlet k_l = +0.3963377774 * a + 0.2158037573 * b;\n\tlet k_m = -0.1055613458 * a - 0.0638541728 * b;\n\tlet k_s = -0.0894841775 * a - 1.291485548 * b;\n\n\t{\n\t\tlet l_ = 1 + S * k_l;\n\t\tlet m_ = 1 + S * k_m;\n\t\tlet s_ = 1 + S * k_s;\n\n\t\tlet l = l_ * l_ * l_;\n\t\tlet m = m_ * m_ * m_;\n\t\tlet s = s_ * s_ * s_;\n\n\t\tlet l_dS = 3 * k_l * l_ * l_;\n\t\tlet m_dS = 3 * k_m * m_ * m_;\n\t\tlet s_dS = 3 * k_s * s_ * s_;\n\n\t\tlet l_dS2 = 6 * k_l * k_l * l_;\n\t\tlet m_dS2 = 6 * k_m * k_m * m_;\n\t\tlet s_dS2 = 6 * k_s * k_s * s_;\n\n\t\tlet f = wl * l + wm * m + ws * s;\n\t\tlet f1 = wl * l_dS + wm * m_dS + ws * s_dS;\n\t\tlet f2 = wl * l_dS2 + wm * m_dS2 + ws * s_dS2;\n\n\t\tS = S - (f * f1) / (f1 * f1 - 0.5 * f * f2);\n\t}\n\n\treturn S;\n}\n\nexport function find_cusp(a, b) {\n\t// First, find the maximum saturation (saturation S = C/L)\n\tlet S_cusp = compute_max_saturation(a, b);\n\n\t// Convert to linear sRGB to find the first point where at least one of r,g or b >= 1:\n\tlet rgb = convertOklabToLrgb({ l: 1, a: S_cusp * a, b: S_cusp * b });\n\tlet L_cusp = Math.cbrt(1 / Math.max(rgb.r, rgb.g, rgb.b));\n\tlet C_cusp = L_cusp * S_cusp;\n\n\treturn [L_cusp, C_cusp];\n}\n\n// Finds intersection of the line defined by\n// L = L0 * (1 - t) + t * L1;\n// C = t * C1;\n// a and b must be normalized so a^2 + b^2 == 1\nfunction find_gamut_intersection(a, b, L1, C1, L0, cusp = null) {\n\tif (!cusp) {\n\t\t// Find the cusp of the gamut triangle\n\t\tcusp = find_cusp(a, b);\n\t}\n\n\t// Find the intersection for upper and lower half seprately\n\tlet t;\n\tif ((L1 - L0) * cusp[1] - (cusp[0] - L0) * C1 <= 0) {\n\t\t// Lower half\n\n\t\tt = (cusp[1] * L0) / (C1 * cusp[0] + cusp[1] * (L0 - L1));\n\t} else {\n\t\t// Upper half\n\n\t\t// First intersect with triangle\n\t\tt = (cusp[1] * (L0 - 1)) / (C1 * (cusp[0] - 1) + cusp[1] * (L0 - L1));\n\n\t\t// Then one step Halley's method\n\t\t{\n\t\t\tlet dL = L1 - L0;\n\t\t\tlet dC = C1;\n\n\t\t\tlet k_l = +0.3963377774 * a + 0.2158037573 * b;\n\t\t\tlet k_m = -0.1055613458 * a - 0.0638541728 * b;\n\t\t\tlet k_s = -0.0894841775 * a - 1.291485548 * b;\n\n\t\t\tlet l_dt = dL + dC * k_l;\n\t\t\tlet m_dt = dL + dC * k_m;\n\t\t\tlet s_dt = dL + dC * k_s;\n\n\t\t\t// If higher accuracy is required, 2 or 3 iterations of the following block can be used:\n\t\t\t{\n\t\t\t\tlet L = L0 * (1 - t) + t * L1;\n\t\t\t\tlet C = t * C1;\n\n\t\t\t\tlet l_ = L + C * k_l;\n\t\t\t\tlet m_ = L + C * k_m;\n\t\t\t\tlet s_ = L + C * k_s;\n\n\t\t\t\tlet l = l_ * l_ * l_;\n\t\t\t\tlet m = m_ * m_ * m_;\n\t\t\t\tlet s = s_ * s_ * s_;\n\n\t\t\t\tlet ldt = 3 * l_dt * l_ * l_;\n\t\t\t\tlet mdt = 3 * m_dt * m_ * m_;\n\t\t\t\tlet sdt = 3 * s_dt * s_ * s_;\n\n\t\t\t\tlet ldt2 = 6 * l_dt * l_dt * l_;\n\t\t\t\tlet mdt2 = 6 * m_dt * m_dt * m_;\n\t\t\t\tlet sdt2 = 6 * s_dt * s_dt * s_;\n\n\t\t\t\tlet r =\n\t\t\t\t\t4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s - 1;\n\t\t\t\tlet r1 =\n\t\t\t\t\t4.0767416621 * ldt -\n\t\t\t\t\t3.3077115913 * mdt +\n\t\t\t\t\t0.2309699292 * sdt;\n\t\t\t\tlet r2 =\n\t\t\t\t\t4.0767416621 * ldt2 -\n\t\t\t\t\t3.3077115913 * mdt2 +\n\t\t\t\t\t0.2309699292 * sdt2;\n\n\t\t\t\tlet u_r = r1 / (r1 * r1 - 0.5 * r * r2);\n\t\t\t\tlet t_r = -r * u_r;\n\n\t\t\t\tlet g =\n\t\t\t\t\t-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s - 1;\n\t\t\t\tlet g1 =\n\t\t\t\t\t-1.2684380046 * ldt +\n\t\t\t\t\t2.6097574011 * mdt -\n\t\t\t\t\t0.3413193965 * sdt;\n\t\t\t\tlet g2 =\n\t\t\t\t\t-1.2684380046 * ldt2 +\n\t\t\t\t\t2.6097574011 * mdt2 -\n\t\t\t\t\t0.3413193965 * sdt2;\n\n\t\t\t\tlet u_g = g1 / (g1 * g1 - 0.5 * g * g2);\n\t\t\t\tlet t_g = -g * u_g;\n\n\t\t\t\tlet b =\n\t\t\t\t\t-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s - 1;\n\t\t\t\tlet b1 =\n\t\t\t\t\t-0.0041960863 * ldt -\n\t\t\t\t\t0.7034186147 * mdt +\n\t\t\t\t\t1.707614701 * sdt;\n\t\t\t\tlet b2 =\n\t\t\t\t\t-0.0041960863 * ldt2 -\n\t\t\t\t\t0.7034186147 * mdt2 +\n\t\t\t\t\t1.707614701 * sdt2;\n\n\t\t\t\tlet u_b = b1 / (b1 * b1 - 0.5 * b * b2);\n\t\t\t\tlet t_b = -b * u_b;\n\n\t\t\t\tt_r = u_r >= 0 ? t_r : 10e5;\n\t\t\t\tt_g = u_g >= 0 ? t_g : 10e5;\n\t\t\t\tt_b = u_b >= 0 ? t_b : 10e5;\n\n\t\t\t\tt += Math.min(t_r, Math.min(t_g, t_b));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn t;\n}\n\nexport function get_ST_max(a_, b_, cusp = null) {\n\tif (!cusp) {\n\t\tcusp = find_cusp(a_, b_);\n\t}\n\tlet L = cusp[0];\n\tlet C = cusp[1];\n\treturn [C / L, C / (1 - L)];\n}\n\nexport function get_ST_mid(a_, b_) {\n\tlet S =\n\t\t0.11516993 +\n\t\t1 /\n\t\t\t(+7.4477897 +\n\t\t\t\t4.1590124 * b_ +\n\t\t\t\ta_ *\n\t\t\t\t\t(-2.19557347 +\n\t\t\t\t\t\t1.75198401 * b_ +\n\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t(-2.13704948 -\n\t\t\t\t\t\t\t\t10.02301043 * b_ +\n\t\t\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t\t\t(-4.24894561 +\n\t\t\t\t\t\t\t\t\t\t5.38770819 * b_ +\n\t\t\t\t\t\t\t\t\t\t4.69891013 * a_))));\n\n\tlet T =\n\t\t0.11239642 +\n\t\t1 /\n\t\t\t(+1.6132032 -\n\t\t\t\t0.68124379 * b_ +\n\t\t\t\ta_ *\n\t\t\t\t\t(+0.40370612 +\n\t\t\t\t\t\t0.90148123 * b_ +\n\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t(-0.27087943 +\n\t\t\t\t\t\t\t\t0.6122399 * b_ +\n\t\t\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t\t\t(+0.00299215 -\n\t\t\t\t\t\t\t\t\t\t0.45399568 * b_ -\n\t\t\t\t\t\t\t\t\t\t0.14661872 * a_))));\n\n\treturn [S, T];\n}\n\nexport function get_Cs(L, a_, b_) {\n\tlet cusp = find_cusp(a_, b_);\n\n\tlet C_max = find_gamut_intersection(a_, b_, L, 1, L, cusp);\n\tlet ST_max = get_ST_max(a_, b_, cusp);\n\n\tlet S_mid =\n\t\t0.11516993 +\n\t\t1 /\n\t\t\t(+7.4477897 +\n\t\t\t\t4.1590124 * b_ +\n\t\t\t\ta_ *\n\t\t\t\t\t(-2.19557347 +\n\t\t\t\t\t\t1.75198401 * b_ +\n\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t(-2.13704948 -\n\t\t\t\t\t\t\t\t10.02301043 * b_ +\n\t\t\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t\t\t(-4.24894561 +\n\t\t\t\t\t\t\t\t\t\t5.38770819 * b_ +\n\t\t\t\t\t\t\t\t\t\t4.69891013 * a_))));\n\n\tlet T_mid =\n\t\t0.11239642 +\n\t\t1 /\n\t\t\t(+1.6132032 -\n\t\t\t\t0.68124379 * b_ +\n\t\t\t\ta_ *\n\t\t\t\t\t(+0.40370612 +\n\t\t\t\t\t\t0.90148123 * b_ +\n\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t(-0.27087943 +\n\t\t\t\t\t\t\t\t0.6122399 * b_ +\n\t\t\t\t\t\t\t\ta_ *\n\t\t\t\t\t\t\t\t\t(+0.00299215 -\n\t\t\t\t\t\t\t\t\t\t0.45399568 * b_ -\n\t\t\t\t\t\t\t\t\t\t0.14661872 * a_))));\n\n\tlet k = C_max / Math.min(L * ST_max[0], (1 - L) * ST_max[1]);\n\n\tlet C_a = L * S_mid;\n\tlet C_b = (1 - L) * T_mid;\n\tlet C_mid =\n\t\t0.9 *\n\t\tk *\n\t\tMath.sqrt(\n\t\t\tMath.sqrt(\n\t\t\t\t1 / (1 / (C_a * C_a * C_a * C_a) + 1 / (C_b * C_b * C_b * C_b))\n\t\t\t)\n\t\t);\n\n\tC_a = L * 0.4;\n\tC_b = (1 - L) * 0.8;\n\tlet C_0 = Math.sqrt(1 / (1 / (C_a * C_a) + 1 / (C_b * C_b)));\n\treturn [C_0, C_mid, C_max];\n}\n","/*\n\tAdapted from code by Björn Ottosson,\n\treleased under the MIT license:\n\n\tCopyright (c) 2021 Björn Ottosson\n\n\tPermission is hereby granted, free of charge, to any person obtaining a copy of\n\tthis software and associated documentation files (the \"Software\"), to deal in\n\tthe Software without restriction, including without limitation the rights to\n\tuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n\tof the Software, and to permit persons to whom the Software is furnished to do\n\tso, subject to the following conditions:\n\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n */\n\nimport normalizeHue from '../util/normalizeHue.js';\nimport { get_Cs, toe } from './helpers.js';\n\nexport default function convertOklabToOkhsl(lab) {\n\tconst l = lab.l !== undefined ? lab.l : 0;\n\tconst a = lab.a !== undefined ? lab.a : 0;\n\tconst b = lab.b !== undefined ? lab.b : 0;\n\n\tconst ret = { mode: 'okhsl', l: toe(l) };\n\n\tif (lab.alpha !== undefined) {\n\t\tret.alpha = lab.alpha;\n\t}\n\tlet c = Math.sqrt(a * a + b * b);\n\tif (!c) {\n\t\tret.s = 0;\n\t\treturn ret;\n\t}\n\tlet [C_0, C_mid, C_max] = get_Cs(l, a / c, b / c);\n\tlet s;\n\tif (c < C_mid) {\n\t\tlet k_0 = 0;\n\t\tlet k_1 = 0.8 * C_0;\n\t\tlet k_2 = 1 - k_1 / C_mid;\n\t\tlet t = (c - k_0) / (k_1 + k_2 * (c - k_0));\n\t\ts = t * 0.8;\n\t} else {\n\t\tlet k_0 = C_mid;\n\t\tlet k_1 = (0.2 * C_mid * C_mid * 1.25 * 1.25) / C_0;\n\t\tlet k_2 = 1 - k_1 / (C_max - C_mid);\n\t\tlet t = (c - k_0) / (k_1 + k_2 * (c - k_0));\n\t\ts = 0.8 + 0.2 * t;\n\t}\n\tif (s) {\n\t\tret.s = s;\n\t\tret.h = normalizeHue((Math.atan2(b, a) * 180) / Math.PI);\n\t}\n\treturn ret;\n}\n","/*\n\tAdapted from code by Björn Ottosson,\n\treleased under the MIT license:\n\n\tCopyright (c) 2021 Björn Ottosson\n\n\tPermission is hereby granted, free of charge, to any person obtaining a copy of\n\tthis software and associated documentation files (the \"Software\"), to deal in\n\tthe Software without restriction, including without limitation the rights to\n\tuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n\tof the Software, and to permit persons to whom the Software is furnished to do\n\tso, subject to the following conditions:\n\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n */\n\nimport { toe_inv, get_Cs } from './helpers.js';\n\nexport default function convertOkhslToOklab(hsl) {\n\tlet h = hsl.h !== undefined ? hsl.h : 0;\n\tlet s = hsl.s !== undefined ? hsl.s : 0;\n\tlet l = hsl.l !== undefined ? hsl.l : 0;\n\n\tconst ret = { mode: 'oklab', l: toe_inv(l) };\n\n\tif (hsl.alpha !== undefined) {\n\t\tret.alpha = hsl.alpha;\n\t}\n\n\tif (!s || l === 1) {\n\t\tret.a = ret.b = 0;\n\t\treturn ret;\n\t}\n\n\tlet a_ = Math.cos((h / 180) * Math.PI);\n\tlet b_ = Math.sin((h / 180) * Math.PI);\n\tlet [C_0, C_mid, C_max] = get_Cs(ret.l, a_, b_);\n\tlet t, k_0, k_1, k_2;\n\tif (s < 0.8) {\n\t\tt = 1.25 * s;\n\t\tk_0 = 0;\n\t\tk_1 = 0.8 * C_0;\n\t\tk_2 = 1 - k_1 / C_mid;\n\t} else {\n\t\tt = 5 * (s - 0.8);\n\t\tk_0 = C_mid;\n\t\tk_1 = (0.2 * C_mid * C_mid * 1.25 * 1.25) / C_0;\n\t\tk_2 = 1 - k_1 / (C_max - C_mid);\n\t}\n\tlet C = k_0 + (t * k_1) / (1 - k_2 * t);\n\tret.a = C * a_;\n\tret.b = C * b_;\n\n\treturn ret;\n}\n","import convertRgbToOklab from '../oklab/convertRgbToOklab.js';\nimport convertOklabToRgb from '../oklab/convertOklabToRgb.js';\nimport convertOklabToOkhsl from './convertOklabToOkhsl.js';\nimport convertOkhslToOklab from './convertOkhslToOklab.js';\n\nimport modeHsl from '../hsl/definition.js';\n\nconst modeOkhsl = {\n\t...modeHsl,\n\tmode: 'okhsl',\n\tchannels: ['h', 's', 'l', 'alpha'],\n\tparse: ['--okhsl'],\n\tserialize: '--okhsl',\n\tfromMode: {\n\t\toklab: convertOklabToOkhsl,\n\t\trgb: c => convertOklabToOkhsl(convertRgbToOklab(c))\n\t},\n\ttoMode: {\n\t\toklab: convertOkhslToOklab,\n\t\trgb: c => convertOklabToRgb(convertOkhslToOklab(c))\n\t}\n};\n\nexport default modeOkhsl;\n","/*\n\tAdapted from code by Björn Ottosson,\n\treleased under the MIT license:\n\n\tCopyright (c) 2021 Björn Ottosson\n\n\tPermission is hereby granted, free of charge, to any person obtaining a copy of\n\tthis software and associated documentation files (the \"Software\"), to deal in\n\tthe Software without restriction, including without limitation the rights to\n\tuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n\tof the Software, and to permit persons to whom the Software is furnished to do\n\tso, subject to the following conditions:\n\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n */\n\nimport normalizeHue from '../util/normalizeHue.js';\nimport convertOklabToLrgb from '../oklab/convertOklabToLrgb.js';\nimport { get_ST_max, toe_inv, toe } from '../okhsl/helpers.js';\n\nexport default function convertOklabToOkhsv(lab) {\n\tlet l = lab.l !== undefined ? lab.l : 0;\n\tlet a = lab.a !== undefined ? lab.a : 0;\n\tlet b = lab.b !== undefined ? lab.b : 0;\n\n\tlet c = Math.sqrt(a * a + b * b);\n\n\t// TODO: c = 0\n\tlet a_ = c ? a / c : 1;\n\tlet b_ = c ? b / c : 1;\n\n\tlet [S_max, T] = get_ST_max(a_, b_);\n\tlet S_0 = 0.5;\n\tlet k = 1 - S_0 / S_max;\n\n\tlet t = T / (c + l * T);\n\tlet L_v = t * l;\n\tlet C_v = t * c;\n\n\tlet L_vt = toe_inv(L_v);\n\tlet C_vt = (C_v * L_vt) / L_v;\n\n\tlet rgb_scale = convertOklabToLrgb({ l: L_vt, a: a_ * C_vt, b: b_ * C_vt });\n\tlet scale_L = Math.cbrt(\n\t\t1 / Math.max(rgb_scale.r, rgb_scale.g, rgb_scale.b, 0)\n\t);\n\n\tl = l / scale_L;\n\tc = ((c / scale_L) * toe(l)) / l;\n\tl = toe(l);\n\n\tconst ret = {\n\t\tmode: 'okhsv',\n\t\ts: c ? ((S_0 + T) * C_v) / (T * S_0 + T * k * C_v) : 0,\n\t\tv: l ? l / L_v : 0\n\t};\n\tif (ret.s) {\n\t\tret.h = normalizeHue((Math.atan2(b, a) * 180) / Math.PI);\n\t}\n\tif (lab.alpha !== undefined) {\n\t\tret.alpha = lab.alpha;\n\t}\n\treturn ret;\n}\n","/*\n\tCopyright (c) 2021 Björn Ottosson\n\n\tPermission is hereby granted, free of charge, to any person obtaining a copy of\n\tthis software and associated documentation files (the \"Software\"), to deal in\n\tthe Software without restriction, including without limitation the rights to\n\tuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n\tof the Software, and to permit persons to whom the Software is furnished to do\n\tso, subject to the following conditions:\n\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n */\n\nimport convertOklabToLrgb from '../oklab/convertOklabToLrgb.js';\nimport { get_ST_max, toe_inv } from '../okhsl/helpers.js';\n\nexport default function convertOkhsvToOklab(hsv) {\n\tconst ret = { mode: 'oklab' };\n\tif (hsv.alpha !== undefined) {\n\t\tret.alpha = hsv.alpha;\n\t}\n\n\tconst h = hsv.h !== undefined ? hsv.h : 0;\n\tconst s = hsv.s !== undefined ? hsv.s : 0;\n\tconst v = hsv.v !== undefined ? hsv.v : 0;\n\n\tconst a_ = Math.cos((h / 180) * Math.PI);\n\tconst b_ = Math.sin((h / 180) * Math.PI);\n\n\tconst [S_max, T] = get_ST_max(a_, b_);\n\tconst S_0 = 0.5;\n\tconst k = 1 - S_0 / S_max;\n\tconst L_v = 1 - (s * S_0) / (S_0 + T - T * k * s);\n\tconst C_v = (s * T * S_0) / (S_0 + T - T * k * s);\n\n\tconst L_vt = toe_inv(L_v);\n\tconst C_vt = (C_v * L_vt) / L_v;\n\tconst rgb_scale = convertOklabToLrgb({\n\t\tl: L_vt,\n\t\ta: a_ * C_vt,\n\t\tb: b_ * C_vt\n\t});\n\tconst scale_L = Math.cbrt(\n\t\t1 / Math.max(rgb_scale.r, rgb_scale.g, rgb_scale.b, 0)\n\t);\n\n\tconst L_new = toe_inv(v * L_v);\n\tconst C = (C_v * L_new) / L_v;\n\n\tret.l = L_new * scale_L;\n\tret.a = C * a_ * scale_L;\n\tret.b = C * b_ * scale_L;\n\n\treturn ret;\n}\n","import convertRgbToOklab from '../oklab/convertRgbToOklab.js';\nimport convertOklabToRgb from '../oklab/convertOklabToRgb.js';\nimport convertOklabToOkhsv from './convertOklabToOkhsv.js';\nimport convertOkhsvToOklab from './convertOkhsvToOklab.js';\n\nimport modeHsv from '../hsv/definition.js';\n\nconst modeOkhsv = {\n\t...modeHsv,\n\tmode: 'okhsv',\n\tchannels: ['h', 's', 'v', 'alpha'],\n\tparse: ['--okhsv'],\n\tserialize: '--okhsv',\n\tfromMode: {\n\t\toklab: convertOklabToOkhsv,\n\t\trgb: c => convertOklabToOkhsv(convertRgbToOklab(c))\n\t},\n\ttoMode: {\n\t\toklab: convertOkhsvToOklab,\n\t\trgb: c => convertOklabToRgb(convertOkhsvToOklab(c))\n\t}\n};\n\nexport default modeOkhsv;\n","import { Tok } from '../parse.js';\n\nfunction parseOklab(color, parsed) {\n\tif (!parsed || parsed[0] !== 'oklab') {\n\t\treturn undefined;\n\t}\n\tconst res = { mode: 'oklab' };\n\tconst [, l, a, b, alpha] = parsed;\n\tif (l.type === Tok.Hue || a.type === Tok.Hue || b.type === Tok.Hue) {\n\t\treturn undefined;\n\t}\n\tif (l.type !== Tok.None) {\n\t\tres.l = Math.min(\n\t\t\tMath.max(0, l.type === Tok.Number ? l.value : l.value / 100),\n\t\t\t1\n\t\t);\n\t}\n\tif (a.type !== Tok.None) {\n\t\tres.a = a.type === Tok.Number ? a.value : (a.value * 0.4) / 100;\n\t}\n\tif (b.type !== Tok.None) {\n\t\tres.b = b.type === Tok.Number ? b.value : (b.value * 0.4) / 100;\n\t}\n\tif (alpha.type !== Tok.None) {\n\t\tres.alpha = Math.min(\n\t\t\t1,\n\t\t\tMath.max(\n\t\t\t\t0,\n\t\t\t\talpha.type === Tok.Number ? alpha.value : alpha.value / 100\n\t\t\t)\n\t\t);\n\t}\n\n\treturn res;\n}\n\nexport default parseOklab;\n","import convertOklabToLrgb from './convertOklabToLrgb.js';\nimport convertLrgbToOklab from './convertLrgbToOklab.js';\nimport convertRgbToOklab from './convertRgbToOklab.js';\nimport convertOklabToRgb from './convertOklabToRgb.js';\nimport parseOklab from './parseOklab.js';\n\nimport lab from '../lab/definition.js';\n\n/*\n\tOklab, a perceptual color space for image processing by Björn Ottosson\n\tReference: https://bottosson.github.io/posts/oklab/\n */\n\nconst definition = {\n\t...lab,\n\tmode: 'oklab',\n\n\ttoMode: {\n\t\tlrgb: convertOklabToLrgb,\n\t\trgb: convertOklabToRgb\n\t},\n\n\tfromMode: {\n\t\tlrgb: convertLrgbToOklab,\n\t\trgb: convertRgbToOklab\n\t},\n\n\tranges: {\n\t\tl: [0, 1],\n\t\ta: [-0.4, 0.4],\n\t\tb: [-0.4, 0.4]\n\t},\n\n\tparse: [parseOklab],\n\tserialize: c =>\n\t\t`oklab(${c.l !== undefined ? c.l : 'none'} ${\n\t\t\tc.a !== undefined ? c.a : 'none'\n\t\t} ${c.b !== undefined ? c.b : 'none'}${\n\t\t\tc.alpha < 1 ? ` / ${c.alpha}` : ''\n\t\t})`\n};\n\nexport default definition;\n","import { Tok } from '../parse.js';\n\nfunction parseOklch(color, parsed) {\n\tif (!parsed || parsed[0] !== 'oklch') {\n\t\treturn undefined;\n\t}\n\tconst res = { mode: 'oklch' };\n\tconst [, l, c, h, alpha] = parsed;\n\tif (l.type !== Tok.None) {\n\t\tif (l.type === Tok.Hue) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.l = Math.min(\n\t\t\tMath.max(0, l.type === Tok.Number ? l.value : l.value / 100),\n\t\t\t1\n\t\t);\n\t}\n\tif (c.type !== Tok.None) {\n\t\tres.c = Math.max(\n\t\t\t0,\n\t\t\tc.type === Tok.Number ? c.value : (c.value * 0.4) / 100\n\t\t);\n\t}\n\tif (h.type !== Tok.None) {\n\t\tif (h.type === Tok.Percentage) {\n\t\t\treturn undefined;\n\t\t}\n\t\tres.h = h.value;\n\t}\n\tif (alpha.type !== Tok.None) {\n\t\tres.alpha = Math.min(\n\t\t\t1,\n\t\t\tMath.max(\n\t\t\t\t0,\n\t\t\t\talpha.type === Tok.Number ? alpha.value : alpha.value / 100\n\t\t\t)\n\t\t);\n\t}\n\n\treturn res;\n}\n\nexport default parseOklch;\n","import lch from '../lch/definition.js';\nimport convertLabToLch from '../lch/convertLabToLch.js';\nimport convertLchToLab from '../lch/convertLchToLab.js';\nimport convertOklabToRgb from '../oklab/convertOklabToRgb.js';\nimport convertRgbToOklab from '../oklab/convertRgbToOklab.js';\nimport parseOklch from './parseOklch.js';\n\nconst definition = {\n\t...lch,\n\tmode: 'oklch',\n\n\ttoMode: {\n\t\toklab: c => convertLchToLab(c, 'oklab'),\n\t\trgb: c => convertOklabToRgb(convertLchToLab(c, 'oklab'))\n\t},\n\n\tfromMode: {\n\t\trgb: c => convertLabToLch(convertRgbToOklab(c), 'oklch'),\n\t\toklab: c => convertLabToLch(c, 'oklch')\n\t},\n\n\tparse: [parseOklch],\n\tserialize: c =>\n\t\t`oklch(${c.l !== undefined ? c.l : 'none'} ${\n\t\t\tc.c !== undefined ? c.c : 'none'\n\t\t} ${c.h !== undefined ? c.h : 'none'}${\n\t\t\tc.alpha < 1 ? ` / ${c.alpha}` : ''\n\t\t})`,\n\n\tranges: {\n\t\tl: [0, 1],\n\t\tc: [0, 0.4],\n\t\th: [0, 360]\n\t}\n};\n\nexport default definition;\n","/*\n\tConvert Display P3 values to CIE XYZ D65\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n*/\n\nimport convertRgbToLrgb from '../lrgb/convertRgbToLrgb.js';\n\nconst convertP3ToXyz65 = rgb => {\n\tlet { r, g, b, alpha } = convertRgbToLrgb(rgb);\n\tlet res = {\n\t\tmode: 'xyz65',\n\t\tx:\n\t\t\t0.486570948648216 * r +\n\t\t\t0.265667693169093 * g +\n\t\t\t0.1982172852343625 * b,\n\t\ty:\n\t\t\t0.2289745640697487 * r +\n\t\t\t0.6917385218365062 * g +\n\t\t\t0.079286914093745 * b,\n\t\tz: 0.0 * r + 0.0451133818589026 * g + 1.043944368900976 * b\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertP3ToXyz65;\n","/*\n\tCIE XYZ D65 values to Display P3.\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n*/\n\nimport convertLrgbToRgb from '../lrgb/convertLrgbToRgb.js';\n\nconst convertXyz65ToP3 = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = convertLrgbToRgb(\n\t\t{\n\t\t\tr:\n\t\t\t\tx * 2.4934969119414263 -\n\t\t\t\ty * 0.9313836179191242 -\n\t\t\t\t0.402710784450717 * z,\n\t\t\tg:\n\t\t\t\tx * -0.8294889695615749 +\n\t\t\t\ty * 1.7626640603183465 +\n\t\t\t\t0.0236246858419436 * z,\n\t\t\tb:\n\t\t\t\tx * 0.0358458302437845 -\n\t\t\t\ty * 0.0761723892680418 +\n\t\t\t\t0.9568845240076871 * z\n\t\t},\n\t\t'p3'\n\t);\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz65ToP3;\n","import rgb from '../rgb/definition.js';\nimport convertP3ToXyz65 from './convertP3ToXyz65.js';\nimport convertXyz65ToP3 from './convertXyz65ToP3.js';\nimport convertRgbToXyz65 from '../xyz65/convertRgbToXyz65.js';\nimport convertXyz65ToRgb from '../xyz65/convertXyz65ToRgb.js';\n\nconst definition = {\n\t...rgb,\n\tmode: 'p3',\n\tparse: ['display-p3'],\n\tserialize: 'display-p3',\n\n\tfromMode: {\n\t\trgb: color => convertXyz65ToP3(convertRgbToXyz65(color)),\n\t\txyz65: convertXyz65ToP3\n\t},\n\n\ttoMode: {\n\t\trgb: color => convertXyz65ToRgb(convertP3ToXyz65(color)),\n\t\txyz65: convertP3ToXyz65\n\t}\n};\n\nexport default definition;\n","/*\n\tConvert CIE XYZ D50 values to ProPhoto RGB\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n*/\n\nconst gamma = v => {\n\tlet abs = Math.abs(v);\n\tif (abs >= 1 / 512) {\n\t\treturn Math.sign(v) * Math.pow(abs, 1 / 1.8);\n\t}\n\treturn 16 * v;\n};\n\nconst convertXyz50ToProphoto = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = {\n\t\tmode: 'prophoto',\n\t\tr: gamma(\n\t\t\tx * 1.3457868816471585 -\n\t\t\t\ty * 0.2555720873797946 -\n\t\t\t\t0.0511018649755453 * z\n\t\t),\n\t\tg: gamma(\n\t\t\tx * -0.5446307051249019 +\n\t\t\t\ty * 1.5082477428451466 +\n\t\t\t\t0.0205274474364214 * z\n\t\t),\n\t\tb: gamma(x * 0.0 + y * 0.0 + 1.2119675456389452 * z)\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz50ToProphoto;\n","/*\n\tConvert ProPhoto RGB values to CIE XYZ D50\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n*/\n\nconst linearize = (v = 0) => {\n\tlet abs = Math.abs(v);\n\tif (abs >= 16 / 512) {\n\t\treturn Math.sign(v) * Math.pow(abs, 1.8);\n\t}\n\treturn v / 16;\n};\n\nconst convertProphotoToXyz50 = prophoto => {\n\tlet r = linearize(prophoto.r);\n\tlet g = linearize(prophoto.g);\n\tlet b = linearize(prophoto.b);\n\tlet res = {\n\t\tmode: 'xyz50',\n\t\tx:\n\t\t\t0.7977666449006423 * r +\n\t\t\t0.1351812974005331 * g +\n\t\t\t0.0313477341283922 * b,\n\t\ty:\n\t\t\t0.2880748288194013 * r +\n\t\t\t0.7118352342418731 * g +\n\t\t\t0.0000899369387256 * b,\n\t\tz: 0 * r + 0 * g + 0.8251046025104602 * b\n\t};\n\tif (prophoto.alpha !== undefined) {\n\t\tres.alpha = prophoto.alpha;\n\t}\n\treturn res;\n};\n\nexport default convertProphotoToXyz50;\n","import rgb from '../rgb/definition.js';\n\nimport convertXyz50ToProphoto from './convertXyz50ToProphoto.js';\nimport convertProphotoToXyz50 from './convertProphotoToXyz50.js';\n\nimport convertXyz50ToRgb from '../xyz50/convertXyz50ToRgb.js';\nimport convertRgbToXyz50 from '../xyz50/convertRgbToXyz50.js';\n\n/*\n\tProPhoto RGB Color space\n\n\tReferences:\n\t\t* https://en.wikipedia.org/wiki/ProPhoto_RGB_color_space\n */\n\nconst definition = {\n\t...rgb,\n\tmode: 'prophoto',\n\tparse: ['prophoto-rgb'],\n\tserialize: 'prophoto-rgb',\n\n\tfromMode: {\n\t\txyz50: convertXyz50ToProphoto,\n\t\trgb: color => convertXyz50ToProphoto(convertRgbToXyz50(color))\n\t},\n\n\ttoMode: {\n\t\txyz50: convertProphotoToXyz50,\n\t\trgb: color => convertXyz50ToRgb(convertProphotoToXyz50(color))\n\t}\n};\n\nexport default definition;\n","/*\n\tConvert CIE XYZ D65 values to Rec. 2020\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n\t\t* https://www.itu.int/rec/R-REC-BT.2020/en\n*/\n\nconst α = 1.09929682680944;\nconst β = 0.018053968510807;\nconst gamma = v => {\n\tconst abs = Math.abs(v);\n\tif (abs > β) {\n\t\treturn (Math.sign(v) || 1) * (α * Math.pow(abs, 0.45) - (α - 1));\n\t}\n\treturn 4.5 * v;\n};\n\nconst convertXyz65ToRec2020 = ({ x, y, z, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = {\n\t\tmode: 'rec2020',\n\t\tr: gamma(\n\t\t\tx * 1.7166511879712683 -\n\t\t\t\ty * 0.3556707837763925 -\n\t\t\t\t0.2533662813736599 * z\n\t\t),\n\t\tg: gamma(\n\t\t\tx * -0.6666843518324893 +\n\t\t\t\ty * 1.6164812366349395 +\n\t\t\t\t0.0157685458139111 * z\n\t\t),\n\t\tb: gamma(\n\t\t\tx * 0.0176398574453108 -\n\t\t\t\ty * 0.0427706132578085 +\n\t\t\t\t0.9421031212354739 * z\n\t\t)\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz65ToRec2020;\n","/*\n\tConvert Rec. 2020 values to CIE XYZ D65\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n\t\t* https://www.itu.int/rec/R-REC-BT.2020/en\n*/\n\nconst α = 1.09929682680944;\nconst β = 0.018053968510807;\n\nconst linearize = (v = 0) => {\n\tlet abs = Math.abs(v);\n\tif (abs < β * 4.5) {\n\t\treturn v / 4.5;\n\t}\n\treturn (Math.sign(v) || 1) * Math.pow((abs + α - 1) / α, 1 / 0.45);\n};\n\nconst convertRec2020ToXyz65 = rec2020 => {\n\tlet r = linearize(rec2020.r);\n\tlet g = linearize(rec2020.g);\n\tlet b = linearize(rec2020.b);\n\tlet res = {\n\t\tmode: 'xyz65',\n\t\tx:\n\t\t\t0.6369580483012911 * r +\n\t\t\t0.1446169035862083 * g +\n\t\t\t0.1688809751641721 * b,\n\t\ty:\n\t\t\t0.262700212011267 * r +\n\t\t\t0.6779980715188708 * g +\n\t\t\t0.059301716469862 * b,\n\t\tz: 0 * r + 0.0280726930490874 * g + 1.0609850577107909 * b\n\t};\n\tif (rec2020.alpha !== undefined) {\n\t\tres.alpha = rec2020.alpha;\n\t}\n\treturn res;\n};\n\nexport default convertRec2020ToXyz65;\n","import rgb from '../rgb/definition.js';\n\nimport convertXyz65ToRec2020 from './convertXyz65ToRec2020.js';\nimport convertRec2020ToXyz65 from './convertRec2020ToXyz65.js';\n\nimport convertRgbToXyz65 from '../xyz65/convertRgbToXyz65.js';\nimport convertXyz65ToRgb from '../xyz65/convertXyz65ToRgb.js';\n\nconst definition = {\n\t...rgb,\n\tmode: 'rec2020',\n\n\tfromMode: {\n\t\txyz65: convertXyz65ToRec2020,\n\t\trgb: color => convertXyz65ToRec2020(convertRgbToXyz65(color))\n\t},\n\n\ttoMode: {\n\t\txyz65: convertRec2020ToXyz65,\n\t\trgb: color => convertXyz65ToRgb(convertRec2020ToXyz65(color))\n\t},\n\n\tparse: ['rec2020'],\n\tserialize: 'rec2020'\n};\n\nexport default definition;\n","export const bias = 0.00379307325527544933;\nexport const bias_cbrt = Math.cbrt(bias);\n","import convertRgbToLrgb from '../lrgb/convertRgbToLrgb.js';\nimport { bias, bias_cbrt } from './constants.js';\n\nconst transfer = v => Math.cbrt(v) - bias_cbrt;\n\nconst convertRgbToXyb = color => {\n\tconst { r, g, b, alpha } = convertRgbToLrgb(color);\n\tconst l = transfer(0.3 * r + 0.622 * g + 0.078 * b + bias);\n\tconst m = transfer(0.23 * r + 0.692 * g + 0.078 * b + bias);\n\tconst s = transfer(\n\t\t0.24342268924547819 * r +\n\t\t\t0.20476744424496821 * g +\n\t\t\t0.5518098665095536 * b +\n\t\t\tbias\n\t);\n\tconst res = {\n\t\tmode: 'xyb',\n\t\tx: (l - m) / 2,\n\t\ty: (l + m) / 2,\n\t\t/* Apply default chroma from luma (subtract Y from B) */\n\t\tb: s - (l + m) / 2\n\t};\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertRgbToXyb;\n","import convertLrgbToRgb from '../lrgb/convertLrgbToRgb.js';\nimport { bias, bias_cbrt } from './constants.js';\n\nconst transfer = v => Math.pow(v + bias_cbrt, 3);\n\nconst convertXybToRgb = ({ x, y, b, alpha }) => {\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (b === undefined) b = 0;\n\tconst l = transfer(x + y) - bias;\n\tconst m = transfer(y - x) - bias;\n\t/* Account for chroma from luma: add Y back to B */\n\tconst s = transfer(b + y) - bias;\n\n\tconst res = convertLrgbToRgb({\n\t\tr:\n\t\t\t11.031566904639861 * l -\n\t\t\t9.866943908131562 * m -\n\t\t\t0.16462299650829934 * s,\n\t\tg:\n\t\t\t-3.2541473810744237 * l +\n\t\t\t4.418770377582723 * m -\n\t\t\t0.16462299650829934 * s,\n\t\tb:\n\t\t\t-3.6588512867136815 * l +\n\t\t\t2.7129230459360922 * m +\n\t\t\t1.9459282407775895 * s\n\t});\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertXybToRgb;\n","import { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\nimport convertRgbToXyb from './convertRgbToXyb.js';\nimport convertXybToRgb from './convertXybToRgb.js';\n\n/*\n\tThe XYB color space, used in JPEG XL.\n\tReference: https://ds.jpeg.org/whitepapers/jpeg-xl-whitepaper.pdf\n*/\n\nconst definition = {\n\tmode: 'xyb',\n\tchannels: ['x', 'y', 'b', 'alpha'],\n\tparse: ['--xyb'],\n\tserialize: '--xyb',\n\n\ttoMode: {\n\t\trgb: convertXybToRgb\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToXyb\n\t},\n\n\tranges: {\n\t\tx: [-0.0154, 0.0281],\n\t\ty: [0, 0.8453],\n\t\tb: [-0.2778, 0.388]\n\t},\n\n\tinterpolate: {\n\t\tx: interpolatorLinear,\n\t\ty: interpolatorLinear,\n\t\tb: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","/*\n\tThe XYZ D50 color space\n\t-----------------------\n */\n\nimport convertXyz50ToRgb from './convertXyz50ToRgb.js';\nimport convertXyz50ToLab from '../lab/convertXyz50ToLab.js';\nimport convertRgbToXyz50 from './convertRgbToXyz50.js';\nimport convertLabToXyz50 from '../lab/convertLabToXyz50.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\nconst definition = {\n\tmode: 'xyz50',\n\tparse: ['xyz-d50'],\n\tserialize: 'xyz-d50',\n\n\ttoMode: {\n\t\trgb: convertXyz50ToRgb,\n\t\tlab: convertXyz50ToLab\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToXyz50,\n\t\tlab: convertLabToXyz50\n\t},\n\n\tchannels: ['x', 'y', 'z', 'alpha'],\n\n\tranges: {\n\t\tx: [0, 0.964],\n\t\ty: [0, 0.999],\n\t\tz: [0, 0.825]\n\t},\n\n\tinterpolate: {\n\t\tx: interpolatorLinear,\n\t\ty: interpolatorLinear,\n\t\tz: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","/*\n\tChromatic adaptation of CIE XYZ from D65 to D50 white point\n\tusing the Bradford method.\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html\t\n*/\n\nconst convertXyz65ToXyz50 = xyz65 => {\n\tlet { x, y, z, alpha } = xyz65;\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = {\n\t\tmode: 'xyz50',\n\t\tx:\n\t\t\t1.0479298208405488 * x +\n\t\t\t0.0229467933410191 * y -\n\t\t\t0.0501922295431356 * z,\n\t\ty:\n\t\t\t0.0296278156881593 * x +\n\t\t\t0.990434484573249 * y -\n\t\t\t0.0170738250293851 * z,\n\t\tz:\n\t\t\t-0.0092430581525912 * x +\n\t\t\t0.0150551448965779 * y +\n\t\t\t0.7518742899580008 * z\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz65ToXyz50;\n","/*\n\tChromatic adaptation of CIE XYZ from D50 to D65 white point\n\tusing the Bradford method.\n\n\tReferences:\n\t\t* https://drafts.csswg.org/css-color/#color-conversion-code\n\t\t* http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html\t\n*/\n\nconst convertXyz50ToXyz65 = xyz50 => {\n\tlet { x, y, z, alpha } = xyz50;\n\tif (x === undefined) x = 0;\n\tif (y === undefined) y = 0;\n\tif (z === undefined) z = 0;\n\tlet res = {\n\t\tmode: 'xyz65',\n\t\tx:\n\t\t\t0.9554734527042182 * x -\n\t\t\t0.0230985368742614 * y +\n\t\t\t0.0632593086610217 * z,\n\t\ty:\n\t\t\t-0.0283697069632081 * x +\n\t\t\t1.0099954580058226 * y +\n\t\t\t0.021041398966943 * z,\n\t\tz:\n\t\t\t0.0123140016883199 * x -\n\t\t\t0.0205076964334779 * y +\n\t\t\t1.3303659366080753 * z\n\t};\n\tif (alpha !== undefined) {\n\t\tres.alpha = alpha;\n\t}\n\treturn res;\n};\n\nexport default convertXyz50ToXyz65;\n","/*\n\tThe XYZ D65 color space\n\t-----------------------\n */\n\nimport convertXyz65ToRgb from './convertXyz65ToRgb.js';\nimport convertRgbToXyz65 from './convertRgbToXyz65.js';\n\nimport convertXyz65ToXyz50 from './convertXyz65ToXyz50.js';\nimport convertXyz50ToXyz65 from './convertXyz50ToXyz65.js';\n\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\nconst definition = {\n\tmode: 'xyz65',\n\n\ttoMode: {\n\t\trgb: convertXyz65ToRgb,\n\t\txyz50: convertXyz65ToXyz50\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToXyz65,\n\t\txyz50: convertXyz50ToXyz65\n\t},\n\n\tranges: {\n\t\tx: [0, 0.95],\n\t\ty: [0, 1],\n\t\tz: [0, 1.088]\n\t},\n\n\tchannels: ['x', 'y', 'z', 'alpha'],\n\n\tparse: ['xyz', 'xyz-d65'],\n\tserialize: 'xyz-d65',\n\n\tinterpolate: {\n\t\tx: interpolatorLinear,\n\t\ty: interpolatorLinear,\n\t\tz: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","const convertRgbToYiq = ({ r, g, b, alpha }) => {\n\tif (r === undefined) r = 0;\n\tif (g === undefined) g = 0;\n\tif (b === undefined) b = 0;\n\tconst res = {\n\t\tmode: 'yiq',\n\t\ty: 0.29889531 * r + 0.58662247 * g + 0.11448223 * b,\n\t\ti: 0.59597799 * r - 0.2741761 * g - 0.32180189 * b,\n\t\tq: 0.21147017 * r - 0.52261711 * g + 0.31114694 * b\n\t};\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertRgbToYiq;\n","const convertYiqToRgb = ({ y, i, q, alpha }) => {\n\tif (y === undefined) y = 0;\n\tif (i === undefined) i = 0;\n\tif (q === undefined) q = 0;\n\tconst res = {\n\t\tmode: 'rgb',\n\t\tr: y + 0.95608445 * i + 0.6208885 * q,\n\t\tg: y - 0.27137664 * i - 0.6486059 * q,\n\t\tb: y - 1.10561724 * i + 1.70250126 * q\n\t};\n\tif (alpha !== undefined) res.alpha = alpha;\n\treturn res;\n};\n\nexport default convertYiqToRgb;\n","import convertRgbToYiq from './convertRgbToYiq.js';\nimport convertYiqToRgb from './convertYiqToRgb.js';\nimport { interpolatorLinear } from '../interpolate/linear.js';\nimport { fixupAlpha } from '../fixup/alpha.js';\n\n/*\n\tYIQ Color Space\n\n\tReferences\n\t----------\n\n\tWikipedia:\n\t\thttps://en.wikipedia.org/wiki/YIQ\n\n\t\"Measuring perceived color difference using YIQ NTSC\n\ttransmission color space in mobile applications\"\n\t\t\n\t\tby Yuriy Kotsarenko, Fernando Ramos in:\n\t\tProgramación Matemática y Software (2010) \n\n\tAvailable at:\n\t\t\n\t\thttp://www.progmat.uaem.mx:8080/artVol2Num2/Articulo3Vol2Num2.pdf\n */\n\nconst definition = {\n\tmode: 'yiq',\n\n\ttoMode: {\n\t\trgb: convertYiqToRgb\n\t},\n\n\tfromMode: {\n\t\trgb: convertRgbToYiq\n\t},\n\n\tchannels: ['y', 'i', 'q', 'alpha'],\n\n\tparse: ['--yiq'],\n\tserialize: '--yiq',\n\n\tranges: {\n\t\ti: [-0.595, 0.595],\n\t\tq: [-0.522, 0.522]\n\t},\n\n\tinterpolate: {\n\t\ty: interpolatorLinear,\n\t\ti: interpolatorLinear,\n\t\tq: interpolatorLinear,\n\t\talpha: { use: interpolatorLinear, fixup: fixupAlpha }\n\t}\n};\n\nexport default definition;\n","// Color space definitions\nimport modeA98 from './a98/definition.js';\nimport modeCubehelix from './cubehelix/definition.js';\nimport modeDlab from './dlab/definition.js';\nimport modeDlch from './dlch/definition.js';\nimport modeHsi from './hsi/definition.js';\nimport modeHsl from './hsl/definition.js';\nimport modeHsv from './hsv/definition.js';\nimport modeHwb from './hwb/definition.js';\nimport modeItp from './itp/definition.js';\nimport modeJab from './jab/definition.js';\nimport modeJch from './jch/definition.js';\nimport modeLab from './lab/definition.js';\nimport modeLab65 from './lab65/definition.js';\nimport modeLch from './lch/definition.js';\nimport modeLch65 from './lch65/definition.js';\nimport modeLchuv from './lchuv/definition.js';\nimport modeLrgb from './lrgb/definition.js';\nimport modeLuv from './luv/definition.js';\nimport modeOkhsl from './okhsl/modeOkhsl.js';\nimport modeOkhsv from './okhsv/modeOkhsv.js';\nimport modeOklab from './oklab/definition.js';\nimport modeOklch from './oklch/definition.js';\nimport modeP3 from './p3/definition.js';\nimport modeProphoto from './prophoto/definition.js';\nimport modeRec2020 from './rec2020/definition.js';\nimport modeRgb from './rgb/definition.js';\nimport modeXyb from './xyb/definition.js';\nimport modeXyz50 from './xyz50/definition.js';\nimport modeXyz65 from './xyz65/definition.js';\nimport modeYiq from './yiq/definition.js';\nimport { useMode } from './modes.js';\n\nexport { default as converter } from './converter.js';\n\nexport {\n\tserializeHex,\n\tserializeHex8,\n\tserializeRgb,\n\tserializeHsl,\n\tformatHex,\n\tformatHex8,\n\tformatRgb,\n\tformatHsl,\n\tformatCss\n} from './formatter.js';\n\nexport { default as colorsNamed } from './colors/named.js';\nexport { default as blend } from './blend.js';\nexport { default as random } from './random.js';\n\nexport {\n\tfixupHueShorter,\n\tfixupHueLonger,\n\tfixupHueIncreasing,\n\tfixupHueDecreasing\n} from './fixup/hue.js';\n\nexport { fixupAlpha } from './fixup/alpha.js';\n\nexport {\n\tmapper,\n\tmapAlphaMultiply,\n\tmapAlphaDivide,\n\tmapTransferLinear,\n\tmapTransferGamma\n} from './map.js';\n\nexport { average, averageAngle, averageNumber } from './average.js';\n\nexport { default as round } from './round.js';\nexport {\n\tinterpolate,\n\tinterpolateWith,\n\tinterpolateWithPremultipliedAlpha\n} from './interpolate/interpolate.js';\n\nexport { interpolatorLinear } from './interpolate/linear.js';\n\nexport { interpolatorPiecewise } from './interpolate/piecewise.js';\n\nexport {\n\tinterpolatorSplineBasis,\n\tinterpolatorSplineBasisClosed\n} from './interpolate/splineBasis.js';\n\nexport {\n\tinterpolatorSplineNatural,\n\tinterpolatorSplineNaturalClosed\n} from './interpolate/splineNatural.js';\n\nexport {\n\tinterpolatorSplineMonotone,\n\tinterpolatorSplineMonotone2,\n\tinterpolatorSplineMonotoneClosed\n} from './interpolate/splineMonotone.js';\n\nexport { lerp, unlerp, blerp, trilerp } from './interpolate/lerp.js';\nexport { default as samples } from './samples.js';\nexport {\n\tdisplayable,\n\tinGamut,\n\tclampRgb,\n\tclampChroma,\n\tclampGamut,\n\ttoGamut\n} from './clamp.js';\nexport { default as nearest } from './nearest.js';\nexport { useMode, getMode, useParser, removeParser } from './modes.js';\nexport { default as parse } from './parse.js';\n\nexport {\n\tdifferenceEuclidean,\n\tdifferenceCie76,\n\tdifferenceCie94,\n\tdifferenceCiede2000,\n\tdifferenceCmc,\n\tdifferenceHyab,\n\tdifferenceHueSaturation,\n\tdifferenceHueChroma,\n\tdifferenceHueNaive,\n\tdifferenceKotsarenkoRamos,\n\tdifferenceItp\n} from './difference.js';\n\nexport {\n\tfilterBrightness,\n\tfilterContrast,\n\tfilterSepia,\n\tfilterInvert,\n\tfilterSaturate,\n\tfilterGrayscale,\n\tfilterHueRotate\n} from './filter.js';\n\nexport {\n\tfilterDeficiencyProt,\n\tfilterDeficiencyDeuter,\n\tfilterDeficiencyTrit\n} from './deficiency.js';\n\n// Easings\nexport { default as easingMidpoint } from './easing/midpoint.js';\nexport {\n\teasingSmoothstep,\n\teasingSmoothstepInverse\n} from './easing/smoothstep.js';\nexport { default as easingSmootherstep } from './easing/smootherstep.js';\nexport { default as easingInOutSine } from './easing/inOutSine.js';\nexport { default as easingGamma } from './easing/gamma.js';\n\nexport {\n\tluminance as wcagLuminance,\n\tcontrast as wcagContrast\n} from './wcag.js';\n\nexport { default as parseHsl } from './hsl/parseHsl.js';\nexport { default as parseHwb } from './hwb/parseHwb.js';\nexport { default as parseLab } from './lab/parseLab.js';\nexport { default as parseLch } from './lch/parseLch.js';\nexport { default as parseNamed } from './rgb/parseNamed.js';\nexport { default as parseTransparent } from './rgb/parseTransparent.js';\nexport { default as parseHex } from './rgb/parseHex.js';\nexport { default as parseRgb } from './rgb/parseRgb.js';\nexport { default as parseHslLegacy } from './hsl/parseHslLegacy.js';\nexport { default as parseRgbLegacy } from './rgb/parseRgbLegacy.js';\nexport { default as parseOklab } from './oklab/parseOklab.js';\nexport { default as parseOklch } from './oklch/parseOklch.js';\n\nexport { default as convertA98ToXyz65 } from './a98/convertA98ToXyz65.js';\nexport { default as convertCubehelixToRgb } from './cubehelix/convertCubehelixToRgb.js';\nexport { default as convertDlchToLab65 } from './dlch/convertDlchToLab65.js';\nexport { default as convertHsiToRgb } from './hsi/convertHsiToRgb.js';\nexport { default as convertHslToRgb } from './hsl/convertHslToRgb.js';\nexport { default as convertHsvToRgb } from './hsv/convertHsvToRgb.js';\nexport { default as convertHwbToRgb } from './hwb/convertHwbToRgb.js';\nexport { default as convertItpToXyz65 } from './itp/convertItpToXyz65.js';\nexport { default as convertJabToJch } from './jch/convertJabToJch.js';\nexport { default as convertJabToRgb } from './jab/convertJabToRgb.js';\nexport { default as convertJabToXyz65 } from './jab/convertJabToXyz65.js';\nexport { default as convertJchToJab } from './jch/convertJchToJab.js';\nexport { default as convertLab65ToDlch } from './dlch/convertLab65ToDlch.js';\nexport { default as convertLab65ToRgb } from './lab65/convertLab65ToRgb.js';\nexport { default as convertLab65ToXyz65 } from './lab65/convertLab65ToXyz65.js';\nexport { default as convertLabToLch } from './lch/convertLabToLch.js';\nexport { default as convertLabToRgb } from './lab/convertLabToRgb.js';\nexport { default as convertLabToXyz50 } from './lab/convertLabToXyz50.js';\nexport { default as convertLchToLab } from './lch/convertLchToLab.js';\nexport { default as convertLchuvToLuv } from './lchuv/convertLchuvToLuv.js';\nexport { default as convertLrgbToOklab } from './oklab/convertLrgbToOklab.js';\nexport { default as convertLrgbToRgb } from './lrgb/convertLrgbToRgb.js';\nexport { default as convertLuvToLchuv } from './lchuv/convertLuvToLchuv.js';\nexport { default as convertLuvToXyz50 } from './luv/convertLuvToXyz50.js';\nexport { default as convertOkhslToOklab } from './okhsl/convertOkhslToOklab.js';\nexport { default as convertOkhsvToOklab } from './okhsv/convertOkhsvToOklab.js';\nexport { default as convertOklabToLrgb } from './oklab/convertOklabToLrgb.js';\nexport { default as convertOklabToOkhsl } from './okhsl/convertOklabToOkhsl.js';\nexport { default as convertOklabToOkhsv } from './okhsv/convertOklabToOkhsv.js';\nexport { default as convertOklabToRgb } from './oklab/convertOklabToRgb.js';\nexport { default as convertP3ToXyz65 } from './p3/convertP3ToXyz65.js';\nexport { default as convertProphotoToXyz50 } from './prophoto/convertProphotoToXyz50.js';\nexport { default as convertRec2020ToXyz65 } from './rec2020/convertRec2020ToXyz65.js';\nexport { default as convertRgbToCubehelix } from './cubehelix/convertRgbToCubehelix.js';\nexport { default as convertRgbToHsi } from './hsi/convertRgbToHsi.js';\nexport { default as convertRgbToHsl } from './hsl/convertRgbToHsl.js';\nexport { default as convertRgbToHsv } from './hsv/convertRgbToHsv.js';\nexport { default as convertRgbToHwb } from './hwb/convertRgbToHwb.js';\nexport { default as convertRgbToJab } from './jab/convertRgbToJab.js';\nexport { default as convertRgbToLab } from './lab/convertRgbToLab.js';\nexport { default as convertRgbToLab65 } from './lab65/convertRgbToLab65.js';\nexport { default as convertRgbToLrgb } from './lrgb/convertRgbToLrgb.js';\nexport { default as convertRgbToOklab } from './oklab/convertRgbToOklab.js';\nexport { default as convertRgbToXyb } from './xyb/convertRgbToXyb.js';\nexport { default as convertRgbToXyz50 } from './xyz50/convertRgbToXyz50.js';\nexport { default as convertRgbToXyz65 } from './xyz65/convertRgbToXyz65.js';\nexport { default as convertRgbToYiq } from './yiq/convertRgbToYiq.js';\nexport { default as convertXybToRgb } from './xyb/convertXybToRgb.js';\nexport { default as convertXyz50ToLab } from './lab/convertXyz50ToLab.js';\nexport { default as convertXyz50ToLuv } from './luv/convertXyz50ToLuv.js';\nexport { default as convertXyz50ToProphoto } from './prophoto/convertXyz50ToProphoto.js';\nexport { default as convertXyz50ToRgb } from './xyz50/convertXyz50ToRgb.js';\nexport { default as convertXyz50ToXyz65 } from './xyz65/convertXyz50ToXyz65.js';\nexport { default as convertXyz65ToA98 } from './a98/convertXyz65ToA98.js';\nexport { default as convertXyz65ToItp } from './itp/convertXyz65ToItp.js';\nexport { default as convertXyz65ToJab } from './jab/convertXyz65ToJab.js';\nexport { default as convertXyz65ToLab65 } from './lab65/convertXyz65ToLab65.js';\nexport { default as convertXyz65ToP3 } from './p3/convertXyz65ToP3.js';\nexport { default as convertXyz65ToRec2020 } from './rec2020/convertXyz65ToRec2020.js';\nexport { default as convertXyz65ToRgb } from './xyz65/convertXyz65ToRgb.js';\nexport { default as convertXyz65ToXyz50 } from './xyz65/convertXyz65ToXyz50.js';\nexport { default as convertYiqToRgb } from './yiq/convertYiqToRgb.js';\n\nexport {\n\tmodeA98,\n\tmodeCubehelix,\n\tmodeDlab,\n\tmodeDlch,\n\tmodeHsi,\n\tmodeHsl,\n\tmodeHsv,\n\tmodeHwb,\n\tmodeItp,\n\tmodeJab,\n\tmodeJch,\n\tmodeLab,\n\tmodeLab65,\n\tmodeLch,\n\tmodeLch65,\n\tmodeLchuv,\n\tmodeLrgb,\n\tmodeLuv,\n\tmodeOkhsl,\n\tmodeOkhsv,\n\tmodeOklab,\n\tmodeOklch,\n\tmodeP3,\n\tmodeProphoto,\n\tmodeRec2020,\n\tmodeRgb,\n\tmodeXyb,\n\tmodeXyz50,\n\tmodeXyz65,\n\tmodeYiq\n};\n\nexport const a98 = useMode(modeA98);\nexport const cubehelix = useMode(modeCubehelix);\nexport const dlab = useMode(modeDlab);\nexport const dlch = useMode(modeDlch);\nexport const hsi = useMode(modeHsi);\nexport const hsl = useMode(modeHsl);\nexport const hsv = useMode(modeHsv);\nexport const hwb = useMode(modeHwb);\nexport const itp = useMode(modeItp);\nexport const jab = useMode(modeJab);\nexport const jch = useMode(modeJch);\nexport const lab = useMode(modeLab);\nexport const lab65 = useMode(modeLab65);\nexport const lch = useMode(modeLch);\nexport const lch65 = useMode(modeLch65);\nexport const lchuv = useMode(modeLchuv);\nexport const lrgb = useMode(modeLrgb);\nexport const luv = useMode(modeLuv);\nexport const okhsl = useMode(modeOkhsl);\nexport const okhsv = useMode(modeOkhsv);\nexport const oklab = useMode(modeOklab);\nexport const oklch = useMode(modeOklch);\nexport const p3 = useMode(modeP3);\nexport const prophoto = useMode(modeProphoto);\nexport const rec2020 = useMode(modeRec2020);\nexport const rgb = useMode(modeRgb);\nexport const xyb = useMode(modeXyb);\nexport const xyz50 = useMode(modeXyz50);\nexport const xyz65 = useMode(modeXyz65);\nexport const yiq = useMode(modeYiq);\n","import{DateTime as e}from\"luxon\";import{debounce as t,getPrototypeChain as n,setObjectMethod as r,setObjectValue as i}from\"@basmilius/utils\";import{customRef as a,markRaw as o,toRaw as s}from\"vue\";function c(e){return class extends e{constructor(...e){throw Error(`@adapter: cannot create instance of class.`)}}}function ee(){return(e,t)=>{e[t]=e[t].bind(e)}}function te(e){return(n,r,i)=>{i.value=t(i.value,e,n)}}function ne(e,t){return e===t?!0:e===t}const l=Symbol(),u=Symbol(),d=Symbol(),f=Symbol(),p=Symbol(),m=Symbol(),h=Symbol(),g=Symbol(),_=Symbol(),re=Symbol(),ie=Symbol();function v(e){return e&&typeof e==`object`&&!!e[p]}function y(e){if(!v(e))throw Error(`@dto assert given object is not a class decorated with @Dto.`)}const ae=Symbol();function b(e,t=0,n){return function(...r){let i=e[ae]??=new WeakMap,a=r[t],o=n===void 0?`self`:r[n];if(typeof a!=`object`||!a)return e.call(this,...r);i.has(a)||i.set(a,[]);let s=i.get(a);if(!s.includes(o)){s.push(o);try{return e.call(this,...r)}finally{let e=s.lastIndexOf(o);e!==-1&&s.splice(e,1),s.length===0&&i.delete(a)}}}}function oe(e){return y(e),e.clone()}function x(e){return y(e),e[f]}const S=b(function(e,t,n,r){let i=e[ie];i(e,t,n,r),e[m]&&S(e[m],e[h],e[m][e[h]])},0,1),C=b(function(e){y(e),e[f]&&(e[f]=!1,S(e,f,!1,!0)),!(!e[u]||e[u].length===0)&&e[u].filter(x).forEach(C)});async function se(e,t){!v(e)||!x(e)||(await t(e),C(e))}function ce(e){return y(e),!e[f]}const w=b(function(e,t){y(e),e[f]||(e[f]=!0,S(e,f,!0,!1)),e[m]&&w(e[m],e[h])});function T(e,t,n){t[u]??=[],!t[u].includes(e)&&t[u].push(e),e[m]!==t&&(e[m]=t),e[h]!==n&&(e[h]=n)}function E(e,t,n){if(v(n))T(n,e,t);else if(Array.isArray(n)){for(let r of n)v(r)&&T(r,e,t);n[m]=e,n[h]=t}}function le(e,t){let n=e[re];n(e,t)}function D(e,t){if(u in t){let n=t[u].indexOf(e);n!==-1&&t[u].splice(n,1)}e[m]=void 0,e[h]=void 0}function ue(e,t){if(v(t))D(t,e);else if(Array.isArray(t)){for(let n of t)v(n)&&D(n,e);t[m]=void 0,t[h]=void 0}}const O={};var k={deleteProperty(e,t){if(Reflect.deleteProperty(e,t),A(e,t))return!0;let n=e[m];return n&&S(n,e[h],n[e[h]]),n&&w(n,e[h]),!0},get(e,t,n){if(t===_)return!0;if(A(e,t))return Reflect.get(e,t,n);let r=e[m];return r&&le(r,e[h]),Reflect.get(e,t)},set(e,t,n,r){if(A(e,t))return Reflect.set(e,t,n,r);let i=e[m];return i&&S(i,e[h],i[e[h]]),i&&w(i,e[h]),Reflect.set(e,t,n)}};function A(e,t){return typeof t==`symbol`||typeof e[t]==`function`||t===`length`}var de={get(e,t,n){if(t===_)return!0;if(typeof t==`symbol`)return Reflect.get(e,t,n);let r=e[d][t];if(!r||!r.get)return Reflect.get(e,t,n);let i=r.get.call(e);return le(e,t),E(e,t,i),i},getOwnPropertyDescriptor(e,t){return e[d][t]},ownKeys(e){return e[g]},set(e,t,n,r){if(typeof t==`symbol`)return Reflect.set(e,t,n,r);let i=e[d][t];if(!i||!i.set)return Reflect.set(e,t,n,r);let a=i.get?.call(e)??void 0;return ne(n,a)?!0:(ue(e,a),Array.isArray(n)&&!n[_]&&(n=new Proxy(n,k)),i.set.call(e,n),E(e,t,n),w(e,t),S(e,t,n,a),!0)}},fe={get(e,t,n){return t===`__v_isRef`?!1:t===_?!0:t in e?Reflect.get(e,t,n):Reflect.get(e.value,t)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e.value,t)},ownKeys(e){return Reflect.ownKeys(e.value)},set(e,t,n,r){return t in e?Reflect.set(e,t,n,r):Reflect.set(e.value,t,n)}},pe={construct(e,t,n){t=t.map(e=>Array.isArray(e)?new Proxy(e,k):e);let r=a((r,i)=>{let a=o(Reflect.construct(e,t,n));a[l]=t,a[f]=!1,a[re]=r,a[ie]=i;let s=new Proxy(a,de);return{get:()=>(r(),s),set:()=>void 0}});return new Proxy(r,fe)}};function me(){let e=this;y(e);let t=O[e[p]],n=new t(...e[l]);for(let[e,t]of Object.entries(this[d]))t.set&&(n[e]=v(this[e])?this[e].clone():this[e]);return n}function he(e){for(let t in e){let n=this[d][t];v(this[t])&&typeof e[t]==`object`?this[t].fill(e[t]):n&&n.set&&(this[t]=e[t])}}function ge(){let e={};for(let t of this[g]){let n=this[t];v(n)&&(n=n.toJSON()),e[t]=n}return e}function j(e){ve(e);let t=Object.freeze(n(e)),a=Object.keys(t);return i(e.prototype,d,t),i(e.prototype,p,e.name),i(e.prototype,g,a),i(e,Symbol.hasInstance,t=>typeof t==`object`&&t?.[p]===e.name),r(e,`clone`,me),r(e,`fill`,he),r(e,`toJSON`,ge),_e(e)}function _e(e){let t=new Proxy(e,pe);return O[e.name]=t,t}function ve(e){let t=Object.getPrototypeOf(e.prototype);if(p in t)throw Error(`⛔️ @dto ${e.name} cannot extend parent class which is also decorated with @dto ${t[p]}.`)}function M(e){return e.map(F)}function ye([,t]){return e.fromISO(t)}function N(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,F(t)]).filter(([,e])=>e!==void 0))}const P={};function be([,e,t,n,r]){if(!(t in O))throw Error(`Cannot restore @dto. Dto ${t} was not found.`);if(e in P)return P[e];let i=O[t],a=new i(...M(r));return a.fill(N(n)),P[e]=a,a}function xe(e){return Array.isArray(e)&&e[0]===3058}function Se(e){return Array.isArray(e)&&e[0]===3057}function F(e){switch(!0){case e===null:return null;case Array.isArray(e):switch(!0){case xe(e):return ye(e);case Se(e):return be(e);default:return M(e)}case typeof e==`object`:return N(e);default:return e}}function Ce(e){return F(JSON.parse(e))}function we(e){return[3058,e.toISO({extendedZone:!0,includeOffset:!0})]}function I(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,z(t)]).filter(([,e])=>e!==void 0))}function Te(){return`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function L(e){e=s(e);let t=e.toJSON();return[3057,Te(),e[p],I(t),R(e[l])]}function R(t){switch(!0){case t.every(v):return t.map(L);case t.every(e.isDateTime):return t.map(we);default:return t.map(z)}}function z(t){switch(!0){case t===null:return null;case Array.isArray(t):return R(t);case v(t):return L(t);case e.isDateTime(t):return we(t);case typeof t==`object`:return I(t);case typeof t==`boolean`:case typeof t==`number`:case typeof t==`string`:return t;default:return}}function Ee(e){return JSON.stringify(z(e))}function B(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let V=class{get blob(){return this.#e}get name(){return this.#t}#e;#t;constructor(e,t){this.#e=e,this.#t=t}};V=B([j],V);var H=V;let U=class{get items(){return this.#e}get page(){return this.#t}get pageSize(){return this.#n}get pages(){return this.#r}get total(){return this.#i}#e;#t;#n;#r;#i;constructor(e,t,n,r,i){this.#e=e,this.#t=t,this.#n=n,this.#r=r,this.#i=i}};U=B([j],U);var W=U;let G=class{get code(){return this.#e}get error(){return this.#t}get errorDescription(){return this.#n}get statusCode(){return this.#r}#e;#t;#n;#r;constructor(e,t,n,r){this.#e=e,this.#t=t,this.#n=n,this.#r=r}};G=B([j],G);var K=G;let q=class{get code(){return this.#e}get error(){return this.#t}get errorDescription(){return this.#n}get errors(){return this.#r}get params(){return this.#i}#e;#t;#n;#r;#i;constructor(e,t,n,r,i){this.#e=e,this.#t=t,this.#n=n,this.#r=r,this.#i=i}};q=B([j],q);var J=q,Y;let X=Y=class{static parsePaginatedAdapter(e,t){return new W(e.items.map(t),e.page,e.page_size,e.pages,e.total)}static parseFileNameFromContentDispositionHeader(t){let n=`download-${e.now().toFormat(`yyyy-MM-dd HH-mm-ss`)}`;if(!t.startsWith(`attachment`))return n;let r=/filename[^;=\\n]*=((['\"]).*?\\2|[^;\\n]*)/.exec(t);return(r?.length||0)<2?n:r[1].replaceAll(`'`,``).replaceAll(`\"`,``).replaceAll(`/`,`-`).replaceAll(`:`,`-`)}static parseRequestError(e,t){return new K(e.code,e.error,e.error_description,t)}static parseValidationError(e){let t;return e.errors&&(t={},Object.entries(e.errors).forEach(([e,n])=>{t[e]=Y.parseValidationError(n)})),new J(e.code,e.error,e.error_description,t,e.params)}};X=Y=B([c],X);var Z=class{get data(){return this.#e}get headers(){return this.#t.headers}get ok(){return this.statusCode>=200&&this.statusCode<300}get response(){return this.#t}get statusCode(){return this.#t.status}#e;#t;constructor(e,t){this.#e=e,this.#t=t}},De=class e{get authToken(){return this.#e}set authToken(e){this.#e=e}get baseUrl(){return this.#t}get dataField(){return this.#n}#e;#t;#n;constructor(e,t,n=!1){this.#e=e,this.#t=t,this.#n=n}static get instance(){if(e.#r===null)throw Error(`There is currently no HttpClient instance registered. Register one using the HttpClient.register() function.`);return e.#r}static#r=null;static register(t){e.#r=t}},Q=class extends Error{};const $={};var Oe=class t{get client(){return this.#e}get options(){return this.#r}get path(){return this.#n}set path(e){this.#n=e}get query(){return this.#i}set query(e){this.#i=e}#e;#t=null;#n;#r={};#i=null;constructor(e,t){this.#e=t??De.instance,this.#r.cache=`no-cache`,this.#r.method=`GET`,this.#n=e}autoCancel(e){return this.#t=e,this}bearerToken(e){return e??=this.#e.authToken,e?this.header(`Authorization`,`Bearer ${e}`):(this.#r.headers&&`Authorization`in this.#r.headers&&delete this.#r.headers.Authorization,this)}body(e,t=`application/octet-stream`){return e instanceof FormData?t=null:(Array.isArray(e)||typeof e==`object`)&&(e=JSON.stringify(e),t=`application/json`),this.#r.body=e,t===null?this:this.header(`Content-Type`,t)}header(e,t){return this.#r.headers=this.#r.headers||{},this.#r.headers[e]=t,this}method(e){return this.#r.method=e.toUpperCase(),this}queryString(e){return this.#i=e,this}signal(e=null){return this.#r.signal=e,this}async fetch(){return this.#a().then(e=>e.json())}async fetchBlob(){let t=await this.#a();if(t.status!==200){let e=await t.json();throw`code`in e&&`error`in e&&`error_description`in e?new K(e.code,e.error,e.error_description,t.status):new K(-1,`failed_without_info`,`Request failed without any information from the backend.`,t.status)}let n=t.headers.has(`content-disposition`)?X.parseFileNameFromContentDispositionHeader(t.headers.get(`content-disposition`)??``):`download-${e.now().toFormat(`yyyy-MM-dd HH-mm-ss`)}`;return new H(await t.blob(),n)}async run(){let{data:e,response:t}=await this.#o();return new Z(e,t)}async runAdapter(e){let{data:t,response:n}=await this.#o();return new Z(e(t),n)}async runArrayAdapter(e){return this.runAdapter(t=>t.map(e))}async runEmpty(){return await this.#o()}async runPaginatedAdapter(e){return this.runAdapter(t=>X.parsePaginatedAdapter(t,e))}async runData(){return await this.#o()}async runDataKey(e){let{data:t,response:n}=await this.#o();return new Z(t[e],n)}async runStatusCode(){return(await this.#o()).statusCode}async#a(){if(this.#t!==null){this.#t in $&&$[this.#t].abort(new Q);let e=new AbortController;$[this.#t]=e,this.signal(e.signal)}let e=this.path;this.query!==null&&(e+=`?${this.query.build()}`);let t=await fetch(this.client.baseUrl+e,this.options);return this.#t!==null&&delete $[this.#t],t}async#o(){return await this.#a().then(e=>t.#s(e,this.client.dataField))}static async#s(e,t){if(e.status===204)return new Z(null,e);if(e.headers.has(`content-type`)&&e.headers.get(`content-type`)?.startsWith(`application/json`)){let n=await e.json();if(n&&typeof n==`object`&&`code`in n&&`error`in n&&`error_description`in n)throw`errors`in n?X.parseValidationError(n):X.parseRequestError(n,e.status);return t&&`data`in n?new Z(n.data,e):new Z(n,e)}if(e.status===401||e.status===403||(await e.text()).length===0&&e.status>=200&&e.status<300)return new Z(null,e);throw new K(-1,`not_a_json_response`,`The response was not a JSON response.`,e.status)}},ke=class{request(e,t){return new Oe(e,t)}},Ae=class e{#e;constructor(){this.#e=new URLSearchParams}build(){return this.#e.toString()}append(e,t){return this.#t(this.#e.append.bind(this.#e),e,t)}appendArray(e,t){return t?.forEach(t=>this.append(e,t)),this}delete(e){return this.#e.delete(e),this}get(e){return this.#e.get(e)}getAll(e){return this.#e.getAll(e)}has(e){return this.#e.has(e)}set(e,t){return this.#t(this.#e.set.bind(this.#e),e,t)}#t(e,t,n){if(!n&&n!==!1)return this;switch(typeof n){case`boolean`:e(t,n?`true`:`false`);break;case`number`:e(t,n.toString(10));break;case`string`:e(t,n);break}return this}static builder(){return new e}};function je(e){return e instanceof Q}function Me(e){return e instanceof K}function Ne(e){return e instanceof K&&(e=e.statusCode),e===403||e===401}function Pe(e){return e instanceof J}export{Z as BaseResponse,ke as BaseService,H as BlobResponse,X as HttpAdapter,De as HttpClient,W as Paginated,Ae as QueryString,Q as RequestAbortedError,Oe as RequestBuilder,K as RequestError,J as ValidationError,c as adapter,y as assertDto,ee as bound,oe as cloneDto,te as debounce,Ce as deserialize,j as dto,se as executeIfDtoDirtyAndMarkClean,v as isDto,ce as isDtoClean,x as isDtoDirty,je as isRequestAborted,Me as isRequestError,Ne as isUnsanctionedRequest,Pe as isValidationError,C as markDtoClean,w as markDtoDirty,Ee as serialize};","/*!\n * vue-router v5.0.6\n * (c) 2026 Eduardo San Martin Morote\n * @license MIT\n */\nimport { inject } from \"vue\";\n\n//#region src/utils/env.ts\nconst isBrowser = typeof document !== \"undefined\";\n\n//#endregion\n//#region src/utils/index.ts\n/**\n* Identity function that returns the value as is.\n*\n* @param v - the value to return\n*\n* @internal\n*/\nconst identityFn = (v) => v;\n/**\n* Allows differentiating lazy components from functional components and vue-class-component\n* @internal\n*\n* @param component\n*/\nfunction isRouteComponent(component) {\n\treturn typeof component === \"object\" || \"displayName\" in component || \"props\" in component || \"__vccOpts\" in component;\n}\nfunction isESModule(obj) {\n\treturn obj.__esModule || obj[Symbol.toStringTag] === \"Module\" || obj.default && isRouteComponent(obj.default);\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n\tconst newParams = {};\n\tfor (const key in params) {\n\t\tconst value = params[key];\n\t\tnewParams[key] = isArray(value) ? value.map(fn) : fn(value);\n\t}\n\treturn newParams;\n}\nconst noop = () => {};\n/**\n* Typesafe alternative to Array.isArray\n* https://github.com/microsoft/TypeScript/pull/48228\n*\n* @internal\n*/\nconst isArray = Array.isArray;\nfunction mergeOptions(defaults, partialOptions) {\n\tconst options = {};\n\tfor (const key in defaults) options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n\treturn options;\n}\n\n//#endregion\n//#region src/errors.ts\n/**\n* Flags so we can combine them when checking for multiple errors. This is the internal version of\n* {@link NavigationFailureType}.\n*\n* @internal\n*/\nlet ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {\n\tErrorTypes[ErrorTypes[\"MATCHER_NOT_FOUND\"] = 1] = \"MATCHER_NOT_FOUND\";\n\tErrorTypes[ErrorTypes[\"NAVIGATION_GUARD_REDIRECT\"] = 2] = \"NAVIGATION_GUARD_REDIRECT\";\n\tErrorTypes[ErrorTypes[\"NAVIGATION_ABORTED\"] = 4] = \"NAVIGATION_ABORTED\";\n\tErrorTypes[ErrorTypes[\"NAVIGATION_CANCELLED\"] = 8] = \"NAVIGATION_CANCELLED\";\n\tErrorTypes[ErrorTypes[\"NAVIGATION_DUPLICATED\"] = 16] = \"NAVIGATION_DUPLICATED\";\n\treturn ErrorTypes;\n}({});\nconst NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== \"production\" ? \"navigation failure\" : \"\");\n/**\n* Enumeration with all possible types for navigation failures. Can be passed to\n* {@link isNavigationFailure} to check for specific failures.\n*/\nlet NavigationFailureType = /* @__PURE__ */ function(NavigationFailureType) {\n\t/**\n\t* An aborted navigation is a navigation that failed because a navigation\n\t* guard returned `false` or called `next(false)`\n\t*/\n\tNavigationFailureType[NavigationFailureType[\"aborted\"] = 4] = \"aborted\";\n\t/**\n\t* A cancelled navigation is a navigation that failed because a more recent\n\t* navigation finished started (not necessarily finished).\n\t*/\n\tNavigationFailureType[NavigationFailureType[\"cancelled\"] = 8] = \"cancelled\";\n\t/**\n\t* A duplicated navigation is a navigation that failed because it was\n\t* initiated while already being at the exact same location.\n\t*/\n\tNavigationFailureType[NavigationFailureType[\"duplicated\"] = 16] = \"duplicated\";\n\treturn NavigationFailureType;\n}({});\nconst ErrorTypeMessages = {\n\t[ErrorTypes.MATCHER_NOT_FOUND]({ location, currentLocation }) {\n\t\treturn `No match for\\n ${JSON.stringify(location)}${currentLocation ? \"\\nwhile being at\\n\" + JSON.stringify(currentLocation) : \"\"}`;\n\t},\n\t[ErrorTypes.NAVIGATION_GUARD_REDIRECT]({ from, to }) {\n\t\treturn `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n\t},\n\t[ErrorTypes.NAVIGATION_ABORTED]({ from, to }) {\n\t\treturn `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n\t},\n\t[ErrorTypes.NAVIGATION_CANCELLED]({ from, to }) {\n\t\treturn `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n\t},\n\t[ErrorTypes.NAVIGATION_DUPLICATED]({ from, to: _to }) {\n\t\treturn `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n\t}\n};\n/**\n* Creates a typed NavigationFailure object.\n* @internal\n* @param type - NavigationFailureType\n* @param params - { from, to }\n*/\nfunction createRouterError(type, params) {\n\tif (process.env.NODE_ENV !== \"production\" || false) return assign(new Error(ErrorTypeMessages[type](params)), {\n\t\ttype,\n\t\t[NavigationFailureSymbol]: true\n\t}, params);\n\telse return assign(/* @__PURE__ */ new Error(), {\n\t\ttype,\n\t\t[NavigationFailureSymbol]: true\n\t}, params);\n}\nfunction isNavigationFailure(error, type) {\n\treturn error instanceof Error && NavigationFailureSymbol in error && (type == null || !!(error.type & type));\n}\nconst propertiesToLog = [\n\t\"params\",\n\t\"query\",\n\t\"hash\"\n];\nfunction stringifyRoute(to) {\n\tif (typeof to === \"string\") return to;\n\tif (to.path != null) return to.path;\n\tconst location = {};\n\tfor (const key of propertiesToLog) if (key in to) location[key] = to[key];\n\treturn JSON.stringify(location, null, 2);\n}\n\n//#endregion\n//#region src/injectionSymbols.ts\n/**\n* RouteRecord being rendered by the closest ancestor Router View. Used for\n* `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View\n* Location Matched\n*\n* @internal\n*/\nconst matchedRouteKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location matched\" : \"\");\n/**\n* Allows overriding the router view depth to control which component in\n* `matched` is rendered. rvd stands for Router View Depth\n*\n* @internal\n*/\nconst viewDepthKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view depth\" : \"\");\n/**\n* Allows overriding the router instance returned by `useRouter` in tests. r\n* stands for router\n*\n* @internal\n*/\nconst routerKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router\" : \"\");\n/**\n* Allows overriding the current route returned by `useRoute` in tests. rl\n* stands for route location\n*\n* @internal\n*/\nconst routeLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"route location\" : \"\");\n/**\n* Allows overriding the current route used by router-view. Internally this is\n* used when the `route` prop is passed.\n*\n* @internal\n*/\nconst routerViewLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location\" : \"\");\n\n//#endregion\n//#region src/useApi.ts\n/**\n* Returns the router instance. Equivalent to using `$router` inside\n* templates.\n*/\nfunction useRouter() {\n\treturn inject(routerKey);\n}\n/**\n* Returns the current route location. Equivalent to using `$route` inside\n* templates.\n*/\nfunction useRoute(_name) {\n\treturn inject(routeLocationKey);\n}\n\n//#endregion\nexport { isRouteComponent as _, routerKey as a, isBrowser as b, ErrorTypes as c, isNavigationFailure as d, applyToParams as f, isESModule as g, isArray as h, routeLocationKey as i, NavigationFailureType as l, identityFn as m, useRouter as n, routerViewLocationKey as o, assign as p, matchedRouteKey as r, viewDepthKey as s, useRoute as t, createRouterError as u, mergeOptions as v, noop as y };","/*!\n * vue-router v5.0.6\n * (c) 2026 Eduardo San Martin Morote\n * @license MIT\n */\nimport { _ as isRouteComponent, b as isBrowser, c as ErrorTypes, g as isESModule, h as isArray, p as assign, r as matchedRouteKey, u as createRouterError } from \"./useApi-DtucMc-S.js\";\nimport { getCurrentInstance, inject, onActivated, onDeactivated, onUnmounted, watch } from \"vue\";\nimport { setupDevtoolsPlugin } from \"@vue/devtools-api\";\n\n//#region src/warning.ts\nfunction warn$1(msg) {\n\tconst args = Array.from(arguments).slice(1);\n\tconsole.warn.apply(console, [\"[Vue Router warn]: \" + msg].concat(args));\n}\n\n//#endregion\n//#region src/encoding.ts\n/**\n* Encoding Rules (␣ = Space)\n* - Path: ␣ \" < > # ? { }\n* - Query: ␣ \" < > # & =\n* - Hash: ␣ \" < > `\n*\n* On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\n* defines some extra characters to be encoded. Most browsers do not encode them\n* in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\n* also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)\n* plus `-._~`. This extra safety should be applied to query by patching the\n* string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\n* should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\n* into a `/` if directly typed in. The _backtick_ (`````) should also be\n* encoded everywhere because some browsers like FF encode it when directly\n* written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\n*/\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\n/**\n* NOTE: It's not clear to me if we should encode the + symbol in queries, it\n* seems to be less flexible than not doing so and I can't find out the legacy\n* systems requiring this for regular requests like text/html. In the standard,\n* the encoding of the plus character is only mentioned for\n* application/x-www-form-urlencoded\n* (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\n* leave the plus character as is in queries. To be more flexible, we allow the\n* plus character on the query, but it can also be manually encoded by the user.\n*\n* Resources:\n* - https://url.spec.whatwg.org/#urlencoded-parsing\n* - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\n*/\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\n/**\n* Encode characters that need to be encoded on the path, search and hash\n* sections of the URL.\n*\n* @internal\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction commonEncode(text) {\n\treturn text == null ? \"\" : encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\n/**\n* Encode characters that need to be encoded on the hash section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeHash(text) {\n\treturn commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\n/**\n* Encode characters that need to be encoded query values on the query\n* section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeQueryValue(text) {\n\treturn commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\n/**\n* Like `encodeQueryValue` but also encodes the `=` character.\n*\n* @param text - string to encode\n*/\nfunction encodeQueryKey(text) {\n\treturn encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\n/**\n* Encode characters that need to be encoded on the path section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodePath(text) {\n\treturn commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\n/**\n* Encode characters that need to be encoded on the path section of the URL as a\n* param. This function encodes everything {@link encodePath} does plus the\n* slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\n* string instead.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeParam(text) {\n\treturn encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n\tif (text == null) return null;\n\ttry {\n\t\treturn decodeURIComponent(\"\" + text);\n\t} catch {\n\t\tprocess.env.NODE_ENV !== \"production\" && warn$1(`Error decoding \"${text}\". Using original value`);\n\t}\n\treturn \"\" + text;\n}\n\n//#endregion\n//#region src/location.ts\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\n/**\n* Transforms a URI into a normalized history location\n*\n* @param parseQuery\n* @param location - URI to normalize\n* @param currentLocation - current absolute location. Allows resolving relative\n* paths. Must start with `/`. Defaults to `/`\n* @returns a normalized history location\n*/\nfunction parseURL(parseQuery, location, currentLocation = \"/\") {\n\tlet path, query = {}, searchString = \"\", hash = \"\";\n\tconst hashPos = location.indexOf(\"#\");\n\tlet searchPos = location.indexOf(\"?\");\n\tsearchPos = hashPos >= 0 && searchPos > hashPos ? -1 : searchPos;\n\tif (searchPos >= 0) {\n\t\tpath = location.slice(0, searchPos);\n\t\tsearchString = location.slice(searchPos, hashPos > 0 ? hashPos : location.length);\n\t\tquery = parseQuery(searchString.slice(1));\n\t}\n\tif (hashPos >= 0) {\n\t\tpath = path || location.slice(0, hashPos);\n\t\thash = location.slice(hashPos, location.length);\n\t}\n\tpath = resolveRelativePath(path != null ? path : location, currentLocation);\n\treturn {\n\t\tfullPath: path + searchString + hash,\n\t\tpath,\n\t\tquery,\n\t\thash: decode(hash)\n\t};\n}\nfunction NEW_stringifyURL(stringifyQuery, path, query, hash = \"\") {\n\tconst searchText = stringifyQuery(query);\n\treturn path + (searchText && \"?\") + searchText + encodeHash(hash);\n}\n/**\n* Stringifies a URL object\n*\n* @param stringifyQuery\n* @param location\n*/\nfunction stringifyURL(stringifyQuery, location) {\n\tconst query = location.query ? stringifyQuery(location.query) : \"\";\n\treturn location.path + (query && \"?\") + query + (location.hash || \"\");\n}\n/**\n* Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.\n*\n* @param pathname - location.pathname\n* @param base - base to strip off\n*/\nfunction stripBase(pathname, base) {\n\tif (!base || !pathname.toLowerCase().startsWith(base.toLowerCase())) return pathname;\n\treturn pathname.slice(base.length) || \"/\";\n}\n/**\n* Checks if two RouteLocation are equal. This means that both locations are\n* pointing towards the same {@link RouteRecord} and that all `params`, `query`\n* parameters and `hash` are the same\n*\n* @param stringifyQuery - A function that takes a query object of type LocationQueryRaw and returns a string representation of it.\n* @param a - first {@link RouteLocation}\n* @param b - second {@link RouteLocation}\n*/\nfunction isSameRouteLocation(stringifyQuery, a, b) {\n\tconst aLastIndex = a.matched.length - 1;\n\tconst bLastIndex = b.matched.length - 1;\n\treturn aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery(a.query) === stringifyQuery(b.query) && a.hash === b.hash;\n}\n/**\n* Check if two `RouteRecords` are equal. Takes into account aliases: they are\n* considered equal to the `RouteRecord` they are aliasing.\n*\n* @param a - first {@link RouteRecord}\n* @param b - second {@link RouteRecord}\n*/\nfunction isSameRouteRecord(a, b) {\n\treturn (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n\tif (Object.keys(a).length !== Object.keys(b).length) return false;\n\tfor (var key in a) if (!isSameRouteLocationParamsValue(a[key], b[key])) return false;\n\treturn true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n\treturn isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : (a && a.valueOf()) === (b && b.valueOf());\n}\n/**\n* Check if two arrays are the same or if an array with one single entry is the\n* same as another primitive value. Used to check query and parameters\n*\n* @param a - array of values\n* @param b - array of values or a single value\n*/\nfunction isEquivalentArray(a, b) {\n\treturn isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\n/**\n* Resolves a relative path that starts with `.`.\n*\n* @param to - path location we are resolving\n* @param from - currentLocation.path, should start with `/`\n*/\nfunction resolveRelativePath(to, from) {\n\tif (to.startsWith(\"/\")) return to;\n\tif (process.env.NODE_ENV !== \"production\" && !from.startsWith(\"/\")) {\n\t\twarn$1(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n\t\treturn to;\n\t}\n\tif (!to) return from;\n\tconst fromSegments = from.split(\"/\");\n\tconst toSegments = to.split(\"/\");\n\tconst lastToSegment = toSegments[toSegments.length - 1];\n\tif (lastToSegment === \"..\" || lastToSegment === \".\") toSegments.push(\"\");\n\tlet position = fromSegments.length - 1;\n\tlet toPosition;\n\tlet segment;\n\tfor (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n\t\tsegment = toSegments[toPosition];\n\t\tif (segment === \".\") continue;\n\t\tif (segment === \"..\") {\n\t\t\tif (position > 1) position--;\n\t\t} else break;\n\t}\n\treturn fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition).join(\"/\");\n}\n/**\n* Initial route location where the router is. Can be used in navigation guards\n* to differentiate the initial navigation.\n*\n* @example\n* ```js\n* import { START_LOCATION } from 'vue-router'\n*\n* router.beforeEach((to, from) => {\n* if (from === START_LOCATION) {\n* // initial navigation\n* }\n* })\n* ```\n*/\nconst START_LOCATION_NORMALIZED = {\n\tpath: \"/\",\n\tname: void 0,\n\tparams: {},\n\tquery: {},\n\thash: \"\",\n\tfullPath: \"/\",\n\tmatched: [],\n\tmeta: {},\n\tredirectedFrom: void 0\n};\n\n//#endregion\n//#region src/history/common.ts\nlet NavigationType = /* @__PURE__ */ function(NavigationType) {\n\tNavigationType[\"pop\"] = \"pop\";\n\tNavigationType[\"push\"] = \"push\";\n\treturn NavigationType;\n}({});\nlet NavigationDirection = /* @__PURE__ */ function(NavigationDirection) {\n\tNavigationDirection[\"back\"] = \"back\";\n\tNavigationDirection[\"forward\"] = \"forward\";\n\tNavigationDirection[\"unknown\"] = \"\";\n\treturn NavigationDirection;\n}({});\n/**\n* Starting location for Histories\n*/\nconst START = \"\";\n/**\n* Normalizes a base by removing any trailing slash and reading the base tag if\n* present.\n*\n* @param base - base to normalize\n*/\nfunction normalizeBase(base) {\n\tif (!base) if (isBrowser) {\n\t\tconst baseEl = document.querySelector(\"base\");\n\t\tbase = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n\t\tbase = base.replace(/^\\w+:\\/\\/[^/]+/, \"\");\n\t} else base = \"/\";\n\tif (base[0] !== \"/\" && base[0] !== \"#\") base = \"/\" + base;\n\treturn removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location) {\n\treturn base.replace(BEFORE_HASH_RE, \"#\") + location;\n}\n\n//#endregion\n//#region src/scrollBehavior.ts\nfunction getElementPosition(el, offset) {\n\tconst docRect = document.documentElement.getBoundingClientRect();\n\tconst elRect = el.getBoundingClientRect();\n\treturn {\n\t\tbehavior: offset.behavior,\n\t\tleft: elRect.left - docRect.left - (offset.left || 0),\n\t\ttop: elRect.top - docRect.top - (offset.top || 0)\n\t};\n}\nconst computeScrollPosition = () => ({\n\tleft: window.scrollX,\n\ttop: window.scrollY\n});\nfunction scrollToPosition(position) {\n\tlet scrollToOptions;\n\tif (\"el\" in position) {\n\t\tconst positionEl = position.el;\n\t\tconst isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n\t\t/**\n\t\t* `id`s can accept pretty much any characters, including CSS combinators\n\t\t* like `>` or `~`. It's still possible to retrieve elements using\n\t\t* `document.getElementById('~')` but it needs to be escaped when using\n\t\t* `document.querySelector('#\\\\~')` for it to be valid. The only\n\t\t* requirements for `id`s are them to be unique on the page and to not be\n\t\t* empty (`id=\"\"`). Because of that, when passing an id selector, it should\n\t\t* be properly escaped for it to work with `querySelector`. We could check\n\t\t* for the id selector to be simple (no CSS combinators `+ >~`) but that\n\t\t* would make things inconsistent since they are valid characters for an\n\t\t* `id` but would need to be escaped when using `querySelector`, breaking\n\t\t* their usage and ending up in no selector returned. Selectors need to be\n\t\t* escaped:\n\t\t*\n\t\t* - `#1-thing` becomes `#\\31 -thing`\n\t\t* - `#with~symbols` becomes `#with\\\\~symbols`\n\t\t*\n\t\t* - More information about the topic can be found at\n\t\t* https://mathiasbynens.be/notes/html5-id-class.\n\t\t* - Practical example: https://mathiasbynens.be/demo/html5-id\n\t\t*/\n\t\tif (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n\t\t\tif (!isIdSelector || !document.getElementById(position.el.slice(1))) try {\n\t\t\t\tconst foundEl = document.querySelector(position.el);\n\t\t\t\tif (isIdSelector && foundEl) {\n\t\t\t\t\twarn$1(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\twarn$1(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tconst el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n\t\tif (!el) {\n\t\t\tprocess.env.NODE_ENV !== \"production\" && warn$1(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n\t\t\treturn;\n\t\t}\n\t\tscrollToOptions = getElementPosition(el, position);\n\t} else scrollToOptions = position;\n\tif (\"scrollBehavior\" in document.documentElement.style) window.scrollTo(scrollToOptions);\n\telse window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.scrollX, scrollToOptions.top != null ? scrollToOptions.top : window.scrollY);\n}\nfunction getScrollKey(path, delta) {\n\treturn (history.state ? history.state.position - delta : -1) + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n\tscrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n\tconst scroll = scrollPositions.get(key);\n\tscrollPositions.delete(key);\n\treturn scroll;\n}\n/**\n* ScrollBehavior instance used by the router to compute and restore the scroll\n* position when navigating.\n*/\n\n//#endregion\n//#region src/types/typeGuards.ts\nfunction isRouteLocation(route) {\n\treturn typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n\treturn typeof name === \"string\" || typeof name === \"symbol\";\n}\n\n//#endregion\n//#region src/query.ts\n/**\n* Transforms a queryString into a {@link LocationQuery} object. Accept both, a\n* version with the leading `?` and without Should work as URLSearchParams\n\n* @internal\n*\n* @param search - search string to parse\n* @returns a query object\n*/\nfunction parseQuery(search) {\n\tconst query = {};\n\tif (search === \"\" || search === \"?\") return query;\n\tconst searchParams = (search[0] === \"?\" ? search.slice(1) : search).split(\"&\");\n\tfor (let i = 0; i < searchParams.length; ++i) {\n\t\tconst searchParam = searchParams[i].replace(PLUS_RE, \" \");\n\t\tconst eqPos = searchParam.indexOf(\"=\");\n\t\tconst key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n\t\tconst value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n\t\tif (key in query) {\n\t\t\tlet currentValue = query[key];\n\t\t\tif (!isArray(currentValue)) currentValue = query[key] = [currentValue];\n\t\t\tcurrentValue.push(value);\n\t\t} else query[key] = value;\n\t}\n\treturn query;\n}\n/**\n* Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\n* doesn't prepend a `?`\n*\n* @internal\n*\n* @param query - query object to stringify\n* @returns string version of the query without the leading `?`\n*/\nfunction stringifyQuery(query) {\n\tlet search = \"\";\n\tfor (let key in query) {\n\t\tconst value = query[key];\n\t\tkey = encodeQueryKey(key);\n\t\tif (value == null) {\n\t\t\tif (value !== void 0) search += (search.length ? \"&\" : \"\") + key;\n\t\t\tcontinue;\n\t\t}\n\t\t(isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)]).forEach((value) => {\n\t\t\tif (value !== void 0) {\n\t\t\t\tsearch += (search.length ? \"&\" : \"\") + key;\n\t\t\t\tif (value != null) search += \"=\" + value;\n\t\t\t}\n\t\t});\n\t}\n\treturn search;\n}\n/**\n* Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\n* numbers into strings, removing keys with an undefined value and replacing\n* undefined with null in arrays\n*\n* @param query - query object to normalize\n* @returns a normalized query object\n*/\nfunction normalizeQuery(query) {\n\tconst normalizedQuery = {};\n\tfor (const key in query) {\n\t\tconst value = query[key];\n\t\tif (value !== void 0) normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n\t}\n\treturn normalizedQuery;\n}\n\n//#endregion\n//#region src/utils/callbacks.ts\n/**\n* Create a list of callbacks that can be reset. Used to create before and after navigation guards list\n*/\nfunction useCallbacks() {\n\tlet handlers = [];\n\tfunction add(handler) {\n\t\thandlers.push(handler);\n\t\treturn () => {\n\t\t\tconst i = handlers.indexOf(handler);\n\t\t\tif (i > -1) handlers.splice(i, 1);\n\t\t};\n\t}\n\tfunction reset() {\n\t\thandlers = [];\n\t}\n\treturn {\n\t\tadd,\n\t\tlist: () => handlers.slice(),\n\t\treset\n\t};\n}\n\n//#endregion\n//#region src/navigationGuards.ts\nfunction registerGuard(activeRecordRef, name, guard) {\n\tconst record = activeRecordRef.value;\n\tif (!record) {\n\t\tif (process.env.NODE_ENV !== \"production\") warn$1(`No active route record was found when calling \\`${name === \"updateGuards\" ? \"onBeforeRouteUpdate\" : \"onBeforeRouteLeave\"}()\\`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?`);\n\t\treturn;\n\t}\n\tlet currentRecord = record;\n\tconst removeFromList = () => {\n\t\tcurrentRecord[name].delete(guard);\n\t};\n\tonUnmounted(removeFromList);\n\tonDeactivated(removeFromList);\n\tonActivated(() => {\n\t\tconst newRecord = activeRecordRef.value;\n\t\tif (process.env.NODE_ENV !== \"production\" && !newRecord) warn$1(\"No active route record was found when reactivating component with navigation guard. This is likely a bug in vue-router. Please report it.\");\n\t\tif (newRecord) currentRecord = newRecord;\n\t\tcurrentRecord[name].add(guard);\n\t});\n\tcurrentRecord[name].add(guard);\n}\n/**\n* Add a navigation guard that triggers whenever the component for the current\n* location is about to be left. Similar to {@link beforeRouteLeave} but can be\n* used in any component. The guard is removed when the component is unmounted.\n*\n* @param leaveGuard - {@link NavigationGuard}\n*/\nfunction onBeforeRouteLeave(leaveGuard) {\n\tif (process.env.NODE_ENV !== \"production\" && !getCurrentInstance()) {\n\t\twarn$1(\"getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function\");\n\t\treturn;\n\t}\n\tregisterGuard(inject(matchedRouteKey, {}), \"leaveGuards\", leaveGuard);\n}\n/**\n* Add a navigation guard that triggers whenever the current location is about\n* to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\n* component. The guard is removed when the component is unmounted.\n*\n* @param updateGuard - {@link NavigationGuard}\n*/\nfunction onBeforeRouteUpdate(updateGuard) {\n\tif (process.env.NODE_ENV !== \"production\" && !getCurrentInstance()) {\n\t\twarn$1(\"getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function\");\n\t\treturn;\n\t}\n\tregisterGuard(inject(matchedRouteKey, {}), \"updateGuards\", updateGuard);\n}\nfunction guardToPromiseFn(guard, to, from, record, name, runWithContext = (fn) => fn()) {\n\tconst enterCallbackArray = record && (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n\treturn () => new Promise((resolve, reject) => {\n\t\tconst next = (valid) => {\n\t\t\tif (valid === false) reject(createRouterError(ErrorTypes.NAVIGATION_ABORTED, {\n\t\t\t\tfrom,\n\t\t\t\tto\n\t\t\t}));\n\t\t\telse if (valid instanceof Error) reject(valid);\n\t\t\telse if (isRouteLocation(valid)) reject(createRouterError(ErrorTypes.NAVIGATION_GUARD_REDIRECT, {\n\t\t\t\tfrom: to,\n\t\t\t\tto: valid\n\t\t\t}));\n\t\t\telse {\n\t\t\t\tif (enterCallbackArray && record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") enterCallbackArray.push(valid);\n\t\t\t\tresolve();\n\t\t\t}\n\t\t};\n\t\tconst guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? withDeprecationWarning(canOnlyBeCalledOnce(next, to, from)) : next));\n\t\tlet guardCall = Promise.resolve(guardReturn);\n\t\tif (guard.length < 3) guardCall = guardCall.then(next);\n\t\tif (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n\t\t\tconst message = `The \"next\" callback was never called inside of ${guard.name ? \"\\\"\" + guard.name + \"\\\"\" : \"\"}:\\n${guard.toString()}\\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n\t\t\tif (typeof guardReturn === \"object\" && \"then\" in guardReturn) guardCall = guardCall.then((resolvedValue) => {\n\t\t\t\tif (!next._called) {\n\t\t\t\t\twarn$1(message);\n\t\t\t\t\treturn Promise.reject(/* @__PURE__ */ new Error(\"Invalid navigation guard\"));\n\t\t\t\t}\n\t\t\t\treturn resolvedValue;\n\t\t\t});\n\t\t\telse if (guardReturn !== void 0) {\n\t\t\t\tif (!next._called) {\n\t\t\t\t\twarn$1(message);\n\t\t\t\t\treject(/* @__PURE__ */ new Error(\"Invalid navigation guard\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tguardCall.catch((err) => reject(err));\n\t});\n}\n/**\n* Wraps the next callback to warn when it is used. Dev-only: when __DEV__ is\n* false (production builds), this branch is dead code and is stripped from the\n* bundle.\n*\n* @internal\n*/\nfunction withDeprecationWarning(next) {\n\tlet warned = false;\n\treturn function() {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\twarn$1(\"The `next()` callback in navigation guards is deprecated. Return the value instead of calling `next(value)`.\");\n\t\t}\n\t\treturn next.apply(this, arguments);\n\t};\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n\tlet called = 0;\n\treturn function() {\n\t\tif (called++ === 1) warn$1(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n\t\tnext._called = true;\n\t\tif (called === 1) next.apply(null, arguments);\n\t};\n}\nfunction extractComponentsGuards(matched, guardType, to, from, runWithContext = (fn) => fn()) {\n\tconst guards = [];\n\tfor (const record of matched) {\n\t\tif (process.env.NODE_ENV !== \"production\" && !record.components && record.children && !record.children.length) warn$1(`Record with path \"${record.path}\" is either missing a \"component(s)\" or \"children\" property.`);\n\t\tfor (const name in record.components) {\n\t\t\tlet rawComponent = record.components[name];\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is not a valid component. Received \"${String(rawComponent)}\".`);\n\t\t\t\t\tthrow new Error(\"Invalid route component\");\n\t\t\t\t} else if (\"then\" in rawComponent) {\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is a Promise instead of a function that returns a Promise. Did you write \"import('./MyPage.vue')\" instead of \"() => import('./MyPage.vue')\" ? This will break in production if not fixed.`);\n\t\t\t\t\tconst promise = rawComponent;\n\t\t\t\t\trawComponent = () => promise;\n\t\t\t\t} else if (rawComponent.__asyncLoader && !rawComponent.__warnedDefineAsync) {\n\t\t\t\t\trawComponent.__warnedDefineAsync = true;\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is defined using \"defineAsyncComponent()\". Write \"() => import('./MyPage.vue')\" instead of \"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (guardType !== \"beforeRouteEnter\" && !record.instances[name]) continue;\n\t\t\tif (isRouteComponent(rawComponent)) {\n\t\t\t\tconst guard = (rawComponent.__vccOpts || rawComponent)[guardType];\n\t\t\t\tguard && guards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext));\n\t\t\t} else {\n\t\t\t\tlet componentPromise = rawComponent();\n\t\t\t\tif (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n\t\t\t\t\tcomponentPromise = Promise.resolve(componentPromise);\n\t\t\t\t}\n\t\t\t\tguards.push(() => componentPromise.then((resolved) => {\n\t\t\t\t\tif (!resolved) throw new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`);\n\t\t\t\t\tconst resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n\t\t\t\t\trecord.mods[name] = resolved;\n\t\t\t\t\trecord.components[name] = resolvedComponent;\n\t\t\t\t\tconst guard = (resolvedComponent.__vccOpts || resolvedComponent)[guardType];\n\t\t\t\t\treturn guard && guardToPromiseFn(guard, to, from, record, name, runWithContext)();\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t}\n\treturn guards;\n}\n/**\n* Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.\n*\n* @param route - resolved route to load\n*/\nfunction loadRouteLocation(route) {\n\treturn route.matched.every((record) => record.redirect) ? Promise.reject(/* @__PURE__ */ new Error(\"Cannot load a route that redirects.\")) : Promise.all(route.matched.map((record) => record.components && Promise.all(Object.keys(record.components).reduce((promises, name) => {\n\t\tconst rawComponent = record.components[name];\n\t\tif (typeof rawComponent === \"function\" && !(\"displayName\" in rawComponent)) promises.push(rawComponent().then((resolved) => {\n\t\t\tif (!resolved) return Promise.reject(/* @__PURE__ */ new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\". Ensure you passed a function that returns a promise.`));\n\t\t\tconst resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n\t\t\trecord.mods[name] = resolved;\n\t\t\trecord.components[name] = resolvedComponent;\n\t\t}));\n\t\treturn promises;\n\t}, [])))).then(() => route);\n}\n/**\n* Split the leaving, updating, and entering records.\n* @internal\n*\n* @param to - Location we are navigating to\n* @param from - Location we are navigating from\n*/\nfunction extractChangingRecords(to, from) {\n\tconst leavingRecords = [];\n\tconst updatingRecords = [];\n\tconst enteringRecords = [];\n\tconst len = Math.max(from.matched.length, to.matched.length);\n\tfor (let i = 0; i < len; i++) {\n\t\tconst recordFrom = from.matched[i];\n\t\tif (recordFrom) if (to.matched.find((record) => isSameRouteRecord(record, recordFrom))) updatingRecords.push(recordFrom);\n\t\telse leavingRecords.push(recordFrom);\n\t\tconst recordTo = to.matched[i];\n\t\tif (recordTo) {\n\t\t\tif (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) enteringRecords.push(recordTo);\n\t\t}\n\t}\n\treturn [\n\t\tleavingRecords,\n\t\tupdatingRecords,\n\t\tenteringRecords\n\t];\n}\n\n//#endregion\n//#region src/devtools.ts\n/**\n* Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).\n*\n* @param routeLocation - routeLocation to format\n* @param tooltip - optional tooltip\n* @returns a copy of the routeLocation\n*/\nfunction formatRouteLocation(routeLocation, tooltip) {\n\tconst copy = assign({}, routeLocation, { matched: routeLocation.matched.map((matched) => omit(matched, [\n\t\t\"instances\",\n\t\t\"children\",\n\t\t\"aliasOf\"\n\t])) });\n\treturn { _custom: {\n\t\ttype: null,\n\t\treadOnly: true,\n\t\tdisplay: routeLocation.fullPath,\n\t\ttooltip,\n\t\tvalue: copy\n\t} };\n}\nfunction formatDisplay(display) {\n\treturn { _custom: { display } };\n}\nlet routerId = 0;\nfunction addDevtools(app, router, matcher) {\n\tif (router.__hasDevtools) return;\n\trouter.__hasDevtools = true;\n\tconst id = routerId++;\n\tsetupDevtoolsPlugin({\n\t\tid: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n\t\tlabel: \"Vue Router\",\n\t\tpackageName: \"vue-router\",\n\t\thomepage: \"https://router.vuejs.org\",\n\t\tlogo: \"https://router.vuejs.org/logo.png\",\n\t\tcomponentStateTypes: [\"Routing\"],\n\t\tapp\n\t}, (api) => {\n\t\tapi.on.inspectComponent((payload) => {\n\t\t\tif (payload.instanceData) payload.instanceData.state.push({\n\t\t\t\ttype: \"Routing\",\n\t\t\t\tkey: \"$route\",\n\t\t\t\teditable: false,\n\t\t\t\tvalue: formatRouteLocation(router.currentRoute.value, \"Current Route\")\n\t\t\t});\n\t\t});\n\t\tapi.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n\t\t\tif (componentInstance.__vrv_devtools) {\n\t\t\t\tconst info = componentInstance.__vrv_devtools;\n\t\t\t\tnode.tags.push({\n\t\t\t\t\tlabel: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n\t\t\t\t\ttextColor: 0,\n\t\t\t\t\ttooltip: \"This component is rendered by <router-view>\",\n\t\t\t\t\tbackgroundColor: PINK_500\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (isArray(componentInstance.__vrl_devtools)) {\n\t\t\t\tcomponentInstance.__devtoolsApi = api;\n\t\t\t\tcomponentInstance.__vrl_devtools.forEach((devtoolsData) => {\n\t\t\t\t\tlet label = devtoolsData.route.path;\n\t\t\t\t\tlet backgroundColor = ORANGE_400;\n\t\t\t\t\tlet tooltip = \"\";\n\t\t\t\t\tlet textColor = 0;\n\t\t\t\t\tif (devtoolsData.error) {\n\t\t\t\t\t\tlabel = devtoolsData.error;\n\t\t\t\t\t\tbackgroundColor = RED_100;\n\t\t\t\t\t\ttextColor = RED_700;\n\t\t\t\t\t} else if (devtoolsData.isExactActive) {\n\t\t\t\t\t\tbackgroundColor = LIME_500;\n\t\t\t\t\t\ttooltip = \"This is exactly active\";\n\t\t\t\t\t} else if (devtoolsData.isActive) {\n\t\t\t\t\t\tbackgroundColor = BLUE_600;\n\t\t\t\t\t\ttooltip = \"This link is active\";\n\t\t\t\t\t}\n\t\t\t\t\tnode.tags.push({\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\ttextColor,\n\t\t\t\t\t\ttooltip,\n\t\t\t\t\t\tbackgroundColor\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\twatch(router.currentRoute, () => {\n\t\t\trefreshRoutesView();\n\t\t\tapi.notifyComponentUpdate();\n\t\t\tapi.sendInspectorTree(routerInspectorId);\n\t\t\tapi.sendInspectorState(routerInspectorId);\n\t\t});\n\t\tconst navigationsLayerId = \"router:navigations:\" + id;\n\t\tapi.addTimelineLayer({\n\t\t\tid: navigationsLayerId,\n\t\t\tlabel: `Router${id ? \" \" + id : \"\"} Navigations`,\n\t\t\tcolor: 4237508\n\t\t});\n\t\trouter.onError((error, to) => {\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttitle: \"Error during Navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\tlogType: \"error\",\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\tdata: { error },\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\tlet navigationId = 0;\n\t\trouter.beforeEach((to, from) => {\n\t\t\tconst data = {\n\t\t\t\tguard: formatDisplay(\"beforeEach\"),\n\t\t\t\tfrom: formatRouteLocation(from, \"Current Location during this navigation\"),\n\t\t\t\tto: formatRouteLocation(to, \"Target location\")\n\t\t\t};\n\t\t\tObject.defineProperty(to.meta, \"__navigationId\", { value: navigationId++ });\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\ttitle: \"Start of navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\tdata,\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\trouter.afterEach((to, from, failure) => {\n\t\t\tconst data = { guard: formatDisplay(\"afterEach\") };\n\t\t\tif (failure) {\n\t\t\t\tdata.failure = { _custom: {\n\t\t\t\t\ttype: Error,\n\t\t\t\t\treadOnly: true,\n\t\t\t\t\tdisplay: failure ? failure.message : \"\",\n\t\t\t\t\ttooltip: \"Navigation Failure\",\n\t\t\t\t\tvalue: failure\n\t\t\t\t} };\n\t\t\t\tdata.status = formatDisplay(\"❌\");\n\t\t\t} else data.status = formatDisplay(\"✅\");\n\t\t\tdata.from = formatRouteLocation(from, \"Current Location during this navigation\");\n\t\t\tdata.to = formatRouteLocation(to, \"Target location\");\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttitle: \"End of navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\tdata,\n\t\t\t\t\tlogType: failure ? \"warning\" : \"default\",\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\t/**\n\t\t* Inspector of Existing routes\n\t\t*/\n\t\tconst routerInspectorId = \"router-inspector:\" + id;\n\t\tapi.addInspector({\n\t\t\tid: routerInspectorId,\n\t\t\tlabel: \"Routes\" + (id ? \" \" + id : \"\"),\n\t\t\ticon: \"book\",\n\t\t\ttreeFilterPlaceholder: \"Search routes\"\n\t\t});\n\t\tfunction refreshRoutesView() {\n\t\t\tif (!activeRoutesPayload) return;\n\t\t\tconst payload = activeRoutesPayload;\n\t\t\tlet routes = matcher.getRoutes().filter((route) => !route.parent || !route.parent.record.components);\n\t\t\troutes.forEach(resetMatchStateOnRouteRecord);\n\t\t\tif (payload.filter) routes = routes.filter((route) => isRouteMatching(route, payload.filter.toLowerCase()));\n\t\t\troutes.forEach((route) => markRouteRecordActive(route, router.currentRoute.value));\n\t\t\tpayload.rootNodes = routes.map(formatRouteRecordForInspector);\n\t\t}\n\t\tlet activeRoutesPayload;\n\t\tapi.on.getInspectorTree((payload) => {\n\t\t\tactiveRoutesPayload = payload;\n\t\t\tif (payload.app === app && payload.inspectorId === routerInspectorId) refreshRoutesView();\n\t\t});\n\t\t/**\n\t\t* Display information about the currently selected route record\n\t\t*/\n\t\tapi.on.getInspectorState((payload) => {\n\t\t\tif (payload.app === app && payload.inspectorId === routerInspectorId) {\n\t\t\t\tconst route = matcher.getRoutes().find((route) => route.record.__vd_id === payload.nodeId);\n\t\t\t\tif (route) payload.state = { options: formatRouteRecordMatcherForStateInspector(route) };\n\t\t\t}\n\t\t});\n\t\tapi.sendInspectorTree(routerInspectorId);\n\t\tapi.sendInspectorState(routerInspectorId);\n\t});\n}\nfunction modifierForKey(key) {\n\tif (key.optional) return key.repeatable ? \"*\" : \"?\";\n\telse return key.repeatable ? \"+\" : \"\";\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n\tconst { record } = route;\n\tconst fields = [{\n\t\teditable: false,\n\t\tkey: \"path\",\n\t\tvalue: record.path\n\t}];\n\tif (record.name != null) fields.push({\n\t\teditable: false,\n\t\tkey: \"name\",\n\t\tvalue: record.name\n\t});\n\tfields.push({\n\t\teditable: false,\n\t\tkey: \"regexp\",\n\t\tvalue: route.re\n\t});\n\tif (route.keys.length) fields.push({\n\t\teditable: false,\n\t\tkey: \"keys\",\n\t\tvalue: { _custom: {\n\t\t\ttype: null,\n\t\t\treadOnly: true,\n\t\t\tdisplay: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n\t\t\ttooltip: \"Param keys\",\n\t\t\tvalue: route.keys\n\t\t} }\n\t});\n\tif (record.redirect != null) fields.push({\n\t\teditable: false,\n\t\tkey: \"redirect\",\n\t\tvalue: record.redirect\n\t});\n\tif (route.alias.length) fields.push({\n\t\teditable: false,\n\t\tkey: \"aliases\",\n\t\tvalue: route.alias.map((alias) => alias.record.path)\n\t});\n\tif (Object.keys(route.record.meta).length) fields.push({\n\t\teditable: false,\n\t\tkey: \"meta\",\n\t\tvalue: route.record.meta\n\t});\n\tfields.push({\n\t\tkey: \"score\",\n\t\teditable: false,\n\t\tvalue: { _custom: {\n\t\t\ttype: null,\n\t\t\treadOnly: true,\n\t\t\tdisplay: route.score.map((score) => score.join(\", \")).join(\" | \"),\n\t\t\ttooltip: \"Score used to sort routes\",\n\t\t\tvalue: route.score\n\t\t} }\n\t});\n\treturn fields;\n}\n/**\n* Extracted from tailwind palette\n*/\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nconst RED_100 = 16704226;\nconst RED_700 = 12131356;\nfunction formatRouteRecordForInspector(route) {\n\tconst tags = [];\n\tconst { record } = route;\n\tif (record.name != null) tags.push({\n\t\tlabel: String(record.name),\n\t\ttextColor: 0,\n\t\tbackgroundColor: CYAN_400\n\t});\n\tif (record.aliasOf) tags.push({\n\t\tlabel: \"alias\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: ORANGE_400\n\t});\n\tif (route.__vd_match) tags.push({\n\t\tlabel: \"matches\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: PINK_500\n\t});\n\tif (route.__vd_exactActive) tags.push({\n\t\tlabel: \"exact\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: LIME_500\n\t});\n\tif (route.__vd_active) tags.push({\n\t\tlabel: \"active\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: BLUE_600\n\t});\n\tif (record.redirect) tags.push({\n\t\tlabel: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n\t\ttextColor: 16777215,\n\t\tbackgroundColor: DARK\n\t});\n\tlet id = record.__vd_id;\n\tif (id == null) {\n\t\tid = String(routeRecordId++);\n\t\trecord.__vd_id = id;\n\t}\n\treturn {\n\t\tid,\n\t\tlabel: record.path,\n\t\ttags,\n\t\tchildren: route.children.map(formatRouteRecordForInspector)\n\t};\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n\tconst isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n\troute.__vd_exactActive = route.__vd_active = isExactActive;\n\tif (!isExactActive) route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n\troute.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n\troute.__vd_match = false;\n\troute.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n\tconst found = String(route.re).match(EXTRACT_REGEXP_RE);\n\troute.__vd_match = false;\n\tif (!found || found.length < 3) return false;\n\tif (new RegExp(found[1].replace(/\\$$/, \"\"), found[2]).test(filter)) {\n\t\troute.children.forEach((child) => isRouteMatching(child, filter));\n\t\tif (route.record.path !== \"/\" || filter === \"/\") {\n\t\t\troute.__vd_match = route.re.test(filter);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\tconst path = route.record.path.toLowerCase();\n\tconst decodedPath = decode(path);\n\tif (!filter.startsWith(\"/\") && (decodedPath.includes(filter) || path.includes(filter))) return true;\n\tif (decodedPath.startsWith(filter) || path.startsWith(filter)) return true;\n\tif (route.record.name && String(route.record.name).includes(filter)) return true;\n\treturn route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n\tconst ret = {};\n\tfor (const key in obj) if (!keys.includes(key)) ret[key] = obj[key];\n\treturn ret;\n}\n\n//#endregion\nexport { resolveRelativePath as A, normalizeBase as C, isSameRouteLocationParams as D, isSameRouteLocation as E, encodeParam as F, encodePath as I, warn$1 as L, stripBase as M, decode as N, isSameRouteRecord as O, encodeHash as P, createHref as S, START_LOCATION_NORMALIZED as T, saveScrollPosition as _, loadRouteLocation as a, NavigationType as b, useCallbacks as c, stringifyQuery as d, isRouteLocation as f, getScrollKey as g, getSavedScrollPosition as h, guardToPromiseFn as i, stringifyURL as j, parseURL as k, normalizeQuery as l, computeScrollPosition as m, extractChangingRecords as n, onBeforeRouteLeave as o, isRouteName as p, extractComponentsGuards as r, onBeforeRouteUpdate as s, addDevtools as t, parseQuery as u, scrollToPosition as v, NEW_stringifyURL as w, START as x, NavigationDirection as y };","/*!\n * vue-router v5.0.6\n * (c) 2026 Eduardo San Martin Morote\n * @license MIT\n */\nimport { a as routerKey, b as isBrowser, c as ErrorTypes, d as isNavigationFailure, f as applyToParams, h as isArray, i as routeLocationKey, l as NavigationFailureType, n as useRouter, o as routerViewLocationKey, p as assign, r as matchedRouteKey, s as viewDepthKey, t as useRoute, u as createRouterError, v as mergeOptions, y as noop } from \"./useApi-DtucMc-S.js\";\nimport { C as normalizeBase, D as isSameRouteLocationParams, E as isSameRouteLocation, F as encodeParam, L as warn$1, M as stripBase, N as decode, O as isSameRouteRecord, P as encodeHash, S as createHref, T as START_LOCATION_NORMALIZED, _ as saveScrollPosition, a as loadRouteLocation, b as NavigationType, c as useCallbacks, d as stringifyQuery, f as isRouteLocation, g as getScrollKey, h as getSavedScrollPosition, i as guardToPromiseFn, j as stringifyURL, k as parseURL, l as normalizeQuery, m as computeScrollPosition, n as extractChangingRecords, o as onBeforeRouteLeave, p as isRouteName, r as extractComponentsGuards, s as onBeforeRouteUpdate, t as addDevtools, u as parseQuery, v as scrollToPosition, x as START, y as NavigationDirection } from \"./devtools-BPov6AZY.js\";\nimport { computed, defineComponent, getCurrentInstance, h, inject, nextTick, provide, reactive, ref, shallowReactive, shallowRef, unref, watch, watchEffect } from \"vue\";\n\n//#region src/history/html5.ts\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\n/**\n* Creates a normalized history location from a window.location object\n* @param base - The base path\n* @param location - The window.location object\n*/\nfunction createCurrentLocation(base, location) {\n\tconst { pathname, search, hash } = location;\n\tconst hashPos = base.indexOf(\"#\");\n\tif (hashPos > -1) {\n\t\tlet slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n\t\tlet pathFromHash = hash.slice(slicePos);\n\t\tif (pathFromHash[0] !== \"/\") pathFromHash = \"/\" + pathFromHash;\n\t\treturn stripBase(pathFromHash, \"\");\n\t}\n\treturn stripBase(pathname, base) + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n\tlet listeners = [];\n\tlet teardowns = [];\n\tlet pauseState = null;\n\tconst popStateHandler = ({ state }) => {\n\t\tconst to = createCurrentLocation(base, location);\n\t\tconst from = currentLocation.value;\n\t\tconst fromState = historyState.value;\n\t\tlet delta = 0;\n\t\tif (state) {\n\t\t\tcurrentLocation.value = to;\n\t\t\thistoryState.value = state;\n\t\t\tif (pauseState && pauseState === from) {\n\t\t\t\tpauseState = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdelta = fromState ? state.position - fromState.position : 0;\n\t\t} else replace(to);\n\t\tlisteners.forEach((listener) => {\n\t\t\tlistener(currentLocation.value, from, {\n\t\t\t\tdelta,\n\t\t\t\ttype: NavigationType.pop,\n\t\t\t\tdirection: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown\n\t\t\t});\n\t\t});\n\t};\n\tfunction pauseListeners() {\n\t\tpauseState = currentLocation.value;\n\t}\n\tfunction listen(callback) {\n\t\tlisteners.push(callback);\n\t\tconst teardown = () => {\n\t\t\tconst index = listeners.indexOf(callback);\n\t\t\tif (index > -1) listeners.splice(index, 1);\n\t\t};\n\t\tteardowns.push(teardown);\n\t\treturn teardown;\n\t}\n\tfunction beforeUnloadListener() {\n\t\tif (document.visibilityState === \"hidden\") {\n\t\t\tconst { history } = window;\n\t\t\tif (!history.state) return;\n\t\t\thistory.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), \"\");\n\t\t}\n\t}\n\tfunction destroy() {\n\t\tfor (const teardown of teardowns) teardown();\n\t\tteardowns = [];\n\t\twindow.removeEventListener(\"popstate\", popStateHandler);\n\t\twindow.removeEventListener(\"pagehide\", beforeUnloadListener);\n\t\tdocument.removeEventListener(\"visibilitychange\", beforeUnloadListener);\n\t}\n\twindow.addEventListener(\"popstate\", popStateHandler);\n\twindow.addEventListener(\"pagehide\", beforeUnloadListener);\n\tdocument.addEventListener(\"visibilitychange\", beforeUnloadListener);\n\treturn {\n\t\tpauseListeners,\n\t\tlisten,\n\t\tdestroy\n\t};\n}\n/**\n* Creates a state object\n*/\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n\treturn {\n\t\tback,\n\t\tcurrent,\n\t\tforward,\n\t\treplaced,\n\t\tposition: window.history.length,\n\t\tscroll: computeScroll ? computeScrollPosition() : null\n\t};\n}\nfunction useHistoryStateNavigation(base) {\n\tconst { history, location } = window;\n\tconst currentLocation = { value: createCurrentLocation(base, location) };\n\tconst historyState = { value: history.state };\n\tif (!historyState.value) changeLocation(currentLocation.value, {\n\t\tback: null,\n\t\tcurrent: currentLocation.value,\n\t\tforward: null,\n\t\tposition: history.length - 1,\n\t\treplaced: true,\n\t\tscroll: null\n\t}, true);\n\tfunction changeLocation(to, state, replace) {\n\t\t/**\n\t\t* if a base tag is provided, and we are on a normal domain, we have to\n\t\t* respect the provided `base` attribute because pushState() will use it and\n\t\t* potentially erase anything before the `#` like at\n\t\t* https://github.com/vuejs/router/issues/685 where a base of\n\t\t* `/folder/#` but a base of `/` would erase the `/folder/` section. If\n\t\t* there is no host, the `<base>` tag makes no sense and if there isn't a\n\t\t* base tag we can just use everything after the `#`.\n\t\t*/\n\t\tconst hashIndex = base.indexOf(\"#\");\n\t\tconst url = hashIndex > -1 ? (location.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n\t\ttry {\n\t\t\thistory[replace ? \"replaceState\" : \"pushState\"](state, \"\", url);\n\t\t\thistoryState.value = state;\n\t\t} catch (err) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") warn$1(\"Error with push/replace State\", err);\n\t\t\telse console.error(err);\n\t\t\tlocation[replace ? \"replace\" : \"assign\"](url);\n\t\t}\n\t}\n\tfunction replace(to, data) {\n\t\tchangeLocation(to, assign({}, history.state, buildState(historyState.value.back, to, historyState.value.forward, true), data, { position: historyState.value.position }), true);\n\t\tcurrentLocation.value = to;\n\t}\n\tfunction push(to, data) {\n\t\tconst currentState = assign({}, historyState.value, history.state, {\n\t\t\tforward: to,\n\t\t\tscroll: computeScrollPosition()\n\t\t});\n\t\tif (process.env.NODE_ENV !== \"production\" && !history.state) warn$1(\"history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\\n\\nhistory.replaceState(history.state, '', url)\\n\\nYou can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state\");\n\t\tchangeLocation(currentState.current, currentState, true);\n\t\tchangeLocation(to, assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data), false);\n\t\tcurrentLocation.value = to;\n\t}\n\treturn {\n\t\tlocation: currentLocation,\n\t\tstate: historyState,\n\t\tpush,\n\t\treplace\n\t};\n}\n/**\n* Creates an HTML5 history. Most common history for single page applications.\n*\n* @param base -\n*/\nfunction createWebHistory(base) {\n\tbase = normalizeBase(base);\n\tconst historyNavigation = useHistoryStateNavigation(base);\n\tconst historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n\tfunction go(delta, triggerListeners = true) {\n\t\tif (!triggerListeners) historyListeners.pauseListeners();\n\t\thistory.go(delta);\n\t}\n\tconst routerHistory = assign({\n\t\tlocation: \"\",\n\t\tbase,\n\t\tgo,\n\t\tcreateHref: createHref.bind(null, base)\n\t}, historyNavigation, historyListeners);\n\tObject.defineProperty(routerHistory, \"location\", {\n\t\tenumerable: true,\n\t\tget: () => historyNavigation.location.value\n\t});\n\tObject.defineProperty(routerHistory, \"state\", {\n\t\tenumerable: true,\n\t\tget: () => historyNavigation.state.value\n\t});\n\treturn routerHistory;\n}\n\n//#endregion\n//#region src/history/memory.ts\n/**\n* Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\n* It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\n*\n* @param base - Base applied to all urls, defaults to '/'\n* @returns a history object that can be passed to the router constructor\n*/\nfunction createMemoryHistory(base = \"\") {\n\tlet listeners = [];\n\tlet queue = [[START, {}]];\n\tlet position = 0;\n\tbase = normalizeBase(base);\n\tfunction setLocation(location, state = {}) {\n\t\tposition++;\n\t\tif (position !== queue.length) queue.splice(position);\n\t\tqueue.push([location, state]);\n\t}\n\tfunction triggerListeners(to, from, { direction, delta }) {\n\t\tconst info = {\n\t\t\tdirection,\n\t\t\tdelta,\n\t\t\ttype: NavigationType.pop\n\t\t};\n\t\tfor (const callback of listeners) callback(to, from, info);\n\t}\n\tconst routerHistory = {\n\t\tlocation: START,\n\t\tstate: {},\n\t\tbase,\n\t\tcreateHref: createHref.bind(null, base),\n\t\treplace(to, state) {\n\t\t\tqueue.splice(position--, 1);\n\t\t\tsetLocation(to, state);\n\t\t},\n\t\tpush(to, state) {\n\t\t\tsetLocation(to, state);\n\t\t},\n\t\tlisten(callback) {\n\t\t\tlisteners.push(callback);\n\t\t\treturn () => {\n\t\t\t\tconst index = listeners.indexOf(callback);\n\t\t\t\tif (index > -1) listeners.splice(index, 1);\n\t\t\t};\n\t\t},\n\t\tdestroy() {\n\t\t\tlisteners = [];\n\t\t\tqueue = [[START, {}]];\n\t\t\tposition = 0;\n\t\t},\n\t\tgo(delta, shouldTrigger = true) {\n\t\t\tconst from = this.location;\n\t\t\tconst direction = delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\n\t\t\tposition = Math.max(0, Math.min(position + delta, queue.length - 1));\n\t\t\tif (shouldTrigger) triggerListeners(this.location, from, {\n\t\t\t\tdirection,\n\t\t\t\tdelta\n\t\t\t});\n\t\t}\n\t};\n\tObject.defineProperty(routerHistory, \"location\", {\n\t\tenumerable: true,\n\t\tget: () => queue[position][0]\n\t});\n\tObject.defineProperty(routerHistory, \"state\", {\n\t\tenumerable: true,\n\t\tget: () => queue[position][1]\n\t});\n\treturn routerHistory;\n}\n\n//#endregion\n//#region src/history/hash.ts\n/**\n* Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to\n* handle any URL is not possible.\n*\n* @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `<base>` tag\n* in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()\n* calls**, meaning that if you use a `<base>` tag, it's `href` value **has to match this parameter** (ignoring anything\n* after the `#`).\n*\n* @example\n* ```js\n* // at https://example.com/folder\n* createWebHashHistory() // gives a url of `https://example.com/folder#`\n* createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\n* // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\n* createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\n* // you should avoid doing this because it changes the original url and breaks copying urls\n* createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\n*\n* // at file:///usr/etc/folder/index.html\n* // for locations with no `host`, the base is ignored\n* createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\n* ```\n*/\nfunction createWebHashHistory(base) {\n\tbase = location.host ? base || location.pathname + location.search : \"\";\n\tif (!base.includes(\"#\")) base += \"#\";\n\tif (process.env.NODE_ENV !== \"production\" && !base.endsWith(\"#/\") && !base.endsWith(\"#\")) warn$1(`A hash base must end with a \"#\":\\n\"${base}\" should be \"${base.replace(/#.*$/, \"#\")}\".`);\n\treturn createWebHistory(base);\n}\n\n//#endregion\n//#region src/matcher/pathTokenizer.ts\nlet TokenType = /* @__PURE__ */ function(TokenType) {\n\tTokenType[TokenType[\"Static\"] = 0] = \"Static\";\n\tTokenType[TokenType[\"Param\"] = 1] = \"Param\";\n\tTokenType[TokenType[\"Group\"] = 2] = \"Group\";\n\treturn TokenType;\n}({});\nvar TokenizerState = /* @__PURE__ */ function(TokenizerState) {\n\tTokenizerState[TokenizerState[\"Static\"] = 0] = \"Static\";\n\tTokenizerState[TokenizerState[\"Param\"] = 1] = \"Param\";\n\tTokenizerState[TokenizerState[\"ParamRegExp\"] = 2] = \"ParamRegExp\";\n\tTokenizerState[TokenizerState[\"ParamRegExpEnd\"] = 3] = \"ParamRegExpEnd\";\n\tTokenizerState[TokenizerState[\"EscapeNext\"] = 4] = \"EscapeNext\";\n\treturn TokenizerState;\n}(TokenizerState || {});\nconst ROOT_TOKEN = {\n\ttype: TokenType.Static,\n\tvalue: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n\tif (!path) return [[]];\n\tif (path === \"/\") return [[ROOT_TOKEN]];\n\tif (!path.startsWith(\"/\")) throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n\tfunction crash(message) {\n\t\tthrow new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n\t}\n\tlet state = TokenizerState.Static;\n\tlet previousState = state;\n\tconst tokens = [];\n\tlet segment;\n\tfunction finalizeSegment() {\n\t\tif (segment) tokens.push(segment);\n\t\tsegment = [];\n\t}\n\tlet i = 0;\n\tlet char;\n\tlet buffer = \"\";\n\tlet customRe = \"\";\n\tfunction consumeBuffer() {\n\t\tif (!buffer) return;\n\t\tif (state === TokenizerState.Static) segment.push({\n\t\t\ttype: TokenType.Static,\n\t\t\tvalue: buffer\n\t\t});\n\t\telse if (state === TokenizerState.Param || state === TokenizerState.ParamRegExp || state === TokenizerState.ParamRegExpEnd) {\n\t\t\tif (segment.length > 1 && (char === \"*\" || char === \"+\")) crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n\t\t\tsegment.push({\n\t\t\t\ttype: TokenType.Param,\n\t\t\t\tvalue: buffer,\n\t\t\t\tregexp: customRe,\n\t\t\t\trepeatable: char === \"*\" || char === \"+\",\n\t\t\t\toptional: char === \"*\" || char === \"?\"\n\t\t\t});\n\t\t} else crash(\"Invalid state to consume buffer\");\n\t\tbuffer = \"\";\n\t}\n\tfunction addCharToBuffer() {\n\t\tbuffer += char;\n\t}\n\twhile (i < path.length) {\n\t\tchar = path[i++];\n\t\tif (char === \"\\\\\" && state !== TokenizerState.ParamRegExp) {\n\t\t\tpreviousState = state;\n\t\t\tstate = TokenizerState.EscapeNext;\n\t\t\tcontinue;\n\t\t}\n\t\tswitch (state) {\n\t\t\tcase TokenizerState.Static:\n\t\t\t\tif (char === \"/\") {\n\t\t\t\t\tif (buffer) consumeBuffer();\n\t\t\t\t\tfinalizeSegment();\n\t\t\t\t} else if (char === \":\") {\n\t\t\t\t\tconsumeBuffer();\n\t\t\t\t\tstate = TokenizerState.Param;\n\t\t\t\t} else addCharToBuffer();\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.EscapeNext:\n\t\t\t\taddCharToBuffer();\n\t\t\t\tstate = previousState;\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.Param:\n\t\t\t\tif (char === \"(\") state = TokenizerState.ParamRegExp;\n\t\t\t\telse if (VALID_PARAM_RE.test(char)) addCharToBuffer();\n\t\t\t\telse {\n\t\t\t\t\tconsumeBuffer();\n\t\t\t\t\tstate = TokenizerState.Static;\n\t\t\t\t\tif (char !== \"*\" && char !== \"?\" && char !== \"+\") i--;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.ParamRegExp:\n\t\t\t\tif (char === \")\") if (customRe[customRe.length - 1] == \"\\\\\") customRe = customRe.slice(0, -1) + char;\n\t\t\t\telse state = TokenizerState.ParamRegExpEnd;\n\t\t\t\telse customRe += char;\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.ParamRegExpEnd:\n\t\t\t\tconsumeBuffer();\n\t\t\t\tstate = TokenizerState.Static;\n\t\t\t\tif (char !== \"*\" && char !== \"?\" && char !== \"+\") i--;\n\t\t\t\tcustomRe = \"\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcrash(\"Unknown state\");\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif (state === TokenizerState.ParamRegExp) crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n\tconsumeBuffer();\n\tfinalizeSegment();\n\treturn tokens;\n}\n\n//#endregion\n//#region src/matcher/pathParserRanker.ts\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n\tsensitive: false,\n\tstrict: false,\n\tstart: true,\n\tend: true\n};\nvar PathScore = /* @__PURE__ */ function(PathScore) {\n\tPathScore[PathScore[\"_multiplier\"] = 10] = \"_multiplier\";\n\tPathScore[PathScore[\"Root\"] = 90] = \"Root\";\n\tPathScore[PathScore[\"Segment\"] = 40] = \"Segment\";\n\tPathScore[PathScore[\"SubSegment\"] = 30] = \"SubSegment\";\n\tPathScore[PathScore[\"Static\"] = 40] = \"Static\";\n\tPathScore[PathScore[\"Dynamic\"] = 20] = \"Dynamic\";\n\tPathScore[PathScore[\"BonusCustomRegExp\"] = 10] = \"BonusCustomRegExp\";\n\tPathScore[PathScore[\"BonusWildcard\"] = -50] = \"BonusWildcard\";\n\tPathScore[PathScore[\"BonusRepeatable\"] = -20] = \"BonusRepeatable\";\n\tPathScore[PathScore[\"BonusOptional\"] = -8] = \"BonusOptional\";\n\tPathScore[PathScore[\"BonusStrict\"] = .7000000000000001] = \"BonusStrict\";\n\tPathScore[PathScore[\"BonusCaseSensitive\"] = .25] = \"BonusCaseSensitive\";\n\treturn PathScore;\n}(PathScore || {});\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\n/**\n* Creates a path parser from an array of Segments (a segment is an array of Tokens)\n*\n* @param segments - array of segments returned by tokenizePath\n* @param extraOptions - optional options for the regexp\n* @returns a PathParser\n*/\nfunction tokensToParser(segments, extraOptions) {\n\tconst options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n\tconst score = [];\n\tlet pattern = options.start ? \"^\" : \"\";\n\tconst keys = [];\n\tfor (const segment of segments) {\n\t\tconst segmentScores = segment.length ? [] : [PathScore.Root];\n\t\tif (options.strict && !segment.length) pattern += \"/\";\n\t\tfor (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n\t\t\tconst token = segment[tokenIndex];\n\t\t\tlet subSegmentScore = PathScore.Segment + (options.sensitive ? PathScore.BonusCaseSensitive : 0);\n\t\t\tif (token.type === TokenType.Static) {\n\t\t\t\tif (!tokenIndex) pattern += \"/\";\n\t\t\t\tpattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n\t\t\t\tsubSegmentScore += PathScore.Static;\n\t\t\t} else if (token.type === TokenType.Param) {\n\t\t\t\tconst { value, repeatable, optional, regexp } = token;\n\t\t\t\tkeys.push({\n\t\t\t\t\tname: value,\n\t\t\t\t\trepeatable,\n\t\t\t\t\toptional\n\t\t\t\t});\n\t\t\t\tconst re = regexp ? regexp : BASE_PARAM_PATTERN;\n\t\t\t\tif (re !== BASE_PARAM_PATTERN) {\n\t\t\t\t\tsubSegmentScore += PathScore.BonusCustomRegExp;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnew RegExp(`(${re})`);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\tthrow new Error(`Invalid custom RegExp for param \"${value}\" (${re}): ` + err.message);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlet subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;\n\t\t\t\tif (!tokenIndex) subPattern = optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n\t\t\t\tif (optional) subPattern += \"?\";\n\t\t\t\tpattern += subPattern;\n\t\t\t\tsubSegmentScore += PathScore.Dynamic;\n\t\t\t\tif (optional) subSegmentScore += PathScore.BonusOptional;\n\t\t\t\tif (repeatable) subSegmentScore += PathScore.BonusRepeatable;\n\t\t\t\tif (re === \".*\") subSegmentScore += PathScore.BonusWildcard;\n\t\t\t}\n\t\t\tsegmentScores.push(subSegmentScore);\n\t\t}\n\t\tscore.push(segmentScores);\n\t}\n\tif (options.strict && options.end) {\n\t\tconst i = score.length - 1;\n\t\tscore[i][score[i].length - 1] += PathScore.BonusStrict;\n\t}\n\tif (!options.strict) pattern += \"/?\";\n\tif (options.end) pattern += \"$\";\n\telse if (options.strict && !pattern.endsWith(\"/\")) pattern += \"(?:/|$)\";\n\tconst re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n\tfunction parse(path) {\n\t\tconst match = path.match(re);\n\t\tconst params = {};\n\t\tif (!match) return null;\n\t\tfor (let i = 1; i < match.length; i++) {\n\t\t\tconst value = match[i] || \"\";\n\t\t\tconst key = keys[i - 1];\n\t\t\tparams[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n\t\t}\n\t\treturn params;\n\t}\n\tfunction stringify(params) {\n\t\tlet path = \"\";\n\t\tlet avoidDuplicatedSlash = false;\n\t\tfor (const segment of segments) {\n\t\t\tif (!avoidDuplicatedSlash || !path.endsWith(\"/\")) path += \"/\";\n\t\t\tavoidDuplicatedSlash = false;\n\t\t\tfor (const token of segment) if (token.type === TokenType.Static) path += token.value;\n\t\t\telse if (token.type === TokenType.Param) {\n\t\t\t\tconst { value, repeatable, optional } = token;\n\t\t\t\tconst param = value in params ? params[value] : \"\";\n\t\t\t\tif (isArray(param) && !repeatable) throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n\t\t\t\tconst text = isArray(param) ? param.join(\"/\") : param;\n\t\t\t\tif (!text) if (optional) {\n\t\t\t\t\tif (segment.length < 2) if (path.endsWith(\"/\")) path = path.slice(0, -1);\n\t\t\t\t\telse avoidDuplicatedSlash = true;\n\t\t\t\t} else throw new Error(`Missing required param \"${value}\"`);\n\t\t\t\tpath += text;\n\t\t\t}\n\t\t}\n\t\treturn path || \"/\";\n\t}\n\treturn {\n\t\tre,\n\t\tscore,\n\t\tkeys,\n\t\tparse,\n\t\tstringify\n\t};\n}\n/**\n* Compares an array of numbers as used in PathParser.score and returns a\n* number. This function can be used to `sort` an array\n*\n* @param a - first array of numbers\n* @param b - second array of numbers\n* @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n* should be sorted first\n*/\nfunction compareScoreArray(a, b) {\n\tlet i = 0;\n\twhile (i < a.length && i < b.length) {\n\t\tconst diff = b[i] - a[i];\n\t\tif (diff) return diff;\n\t\ti++;\n\t}\n\tif (a.length < b.length) return a.length === 1 && a[0] === PathScore.Static + PathScore.Segment ? -1 : 1;\n\telse if (a.length > b.length) return b.length === 1 && b[0] === PathScore.Static + PathScore.Segment ? 1 : -1;\n\treturn 0;\n}\n/**\n* Compare function that can be used with `sort` to sort an array of PathParser\n*\n* @param a - first PathParser\n* @param b - second PathParser\n* @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n*/\nfunction comparePathParserScore(a, b) {\n\tlet i = 0;\n\tconst aScore = a.score;\n\tconst bScore = b.score;\n\twhile (i < aScore.length && i < bScore.length) {\n\t\tconst comp = compareScoreArray(aScore[i], bScore[i]);\n\t\tif (comp) return comp;\n\t\ti++;\n\t}\n\tif (Math.abs(bScore.length - aScore.length) === 1) {\n\t\tif (isLastScoreNegative(aScore)) return 1;\n\t\tif (isLastScoreNegative(bScore)) return -1;\n\t}\n\treturn bScore.length - aScore.length;\n}\n/**\n* This allows detecting splats at the end of a path: /home/:id(.*)*\n*\n* @param score - score to check\n* @returns true if the last entry is negative\n*/\nfunction isLastScoreNegative(score) {\n\tconst last = score[score.length - 1];\n\treturn score.length > 0 && last[last.length - 1] < 0;\n}\nconst PATH_PARSER_OPTIONS_DEFAULTS = {\n\tstrict: false,\n\tend: true,\n\tsensitive: false\n};\n\n//#endregion\n//#region src/matcher/pathMatcher.ts\nfunction createRouteRecordMatcher(record, parent, options) {\n\tconst parser = tokensToParser(tokenizePath(record.path), options);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst existingKeys = /* @__PURE__ */ new Set();\n\t\tfor (const key of parser.keys) {\n\t\t\tif (existingKeys.has(key.name)) warn$1(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n\t\t\texistingKeys.add(key.name);\n\t\t}\n\t}\n\tconst matcher = assign(parser, {\n\t\trecord,\n\t\tparent,\n\t\tchildren: [],\n\t\talias: []\n\t});\n\tif (parent) {\n\t\tif (!matcher.record.aliasOf === !parent.record.aliasOf) parent.children.push(matcher);\n\t}\n\treturn matcher;\n}\n\n//#endregion\n//#region src/matcher/index.ts\n/**\n* Creates a Router Matcher.\n*\n* @internal\n* @param routes - array of initial routes\n* @param globalOptions - global route options\n*/\nfunction createRouterMatcher(routes, globalOptions) {\n\tconst matchers = [];\n\tconst matcherMap = /* @__PURE__ */ new Map();\n\tglobalOptions = mergeOptions(PATH_PARSER_OPTIONS_DEFAULTS, globalOptions);\n\tfunction getRecordMatcher(name) {\n\t\treturn matcherMap.get(name);\n\t}\n\tfunction addRoute(record, parent, originalRecord) {\n\t\tconst isRootAdd = !originalRecord;\n\t\tconst mainNormalizedRecord = normalizeRouteRecord(record);\n\t\tif (process.env.NODE_ENV !== \"production\") checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n\t\tmainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n\t\tconst options = mergeOptions(globalOptions, record);\n\t\tconst normalizedRecords = [mainNormalizedRecord];\n\t\tif (\"alias\" in record) {\n\t\t\tconst aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n\t\t\tfor (const alias of aliases) normalizedRecords.push(normalizeRouteRecord(assign({}, mainNormalizedRecord, {\n\t\t\t\tcomponents: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n\t\t\t\tpath: alias,\n\t\t\t\taliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n\t\t\t})));\n\t\t}\n\t\tlet matcher;\n\t\tlet originalMatcher;\n\t\tfor (const normalizedRecord of normalizedRecords) {\n\t\t\tconst { path } = normalizedRecord;\n\t\t\tif (parent && path[0] !== \"/\") {\n\t\t\t\tconst parentPath = parent.record.path;\n\t\t\t\tconst connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n\t\t\t\tnormalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") throw new Error(\"Catch all routes (\\\"*\\\") must now be defined using a param with a custom regexp.\\nSee more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.\");\n\t\t\tmatcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n\t\t\tif (process.env.NODE_ENV !== \"production\" && parent && path[0] === \"/\") checkMissingParamsInAbsolutePath(matcher, parent);\n\t\t\tif (originalRecord) {\n\t\t\t\toriginalRecord.alias.push(matcher);\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") checkSameParams(originalRecord, matcher);\n\t\t\t} else {\n\t\t\t\toriginalMatcher = originalMatcher || matcher;\n\t\t\t\tif (originalMatcher !== matcher) originalMatcher.alias.push(matcher);\n\t\t\t\tif (isRootAdd && record.name && !isAliasRecord(matcher)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") checkSameNameAsAncestor(record, parent);\n\t\t\t\t\tremoveRoute(record.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isMatchable(matcher)) insertMatcher(matcher);\n\t\t\tif (mainNormalizedRecord.children) {\n\t\t\t\tconst children = mainNormalizedRecord.children;\n\t\t\t\tfor (let i = 0; i < children.length; i++) addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n\t\t\t}\n\t\t\toriginalRecord = originalRecord || matcher;\n\t\t}\n\t\treturn originalMatcher ? () => {\n\t\t\tremoveRoute(originalMatcher);\n\t\t} : noop;\n\t}\n\tfunction removeRoute(matcherRef) {\n\t\tif (isRouteName(matcherRef)) {\n\t\t\tconst matcher = matcherMap.get(matcherRef);\n\t\t\tif (matcher) {\n\t\t\t\tmatcherMap.delete(matcherRef);\n\t\t\t\tmatchers.splice(matchers.indexOf(matcher), 1);\n\t\t\t\tmatcher.children.forEach(removeRoute);\n\t\t\t\tmatcher.alias.forEach(removeRoute);\n\t\t\t}\n\t\t} else {\n\t\t\tconst index = matchers.indexOf(matcherRef);\n\t\t\tif (index > -1) {\n\t\t\t\tmatchers.splice(index, 1);\n\t\t\t\tif (matcherRef.record.name) matcherMap.delete(matcherRef.record.name);\n\t\t\t\tmatcherRef.children.forEach(removeRoute);\n\t\t\t\tmatcherRef.alias.forEach(removeRoute);\n\t\t\t}\n\t\t}\n\t}\n\tfunction getRoutes() {\n\t\treturn matchers;\n\t}\n\tfunction insertMatcher(matcher) {\n\t\tconst index = findInsertionIndex(matcher, matchers);\n\t\tmatchers.splice(index, 0, matcher);\n\t\tif (matcher.record.name && !isAliasRecord(matcher)) matcherMap.set(matcher.record.name, matcher);\n\t}\n\tfunction resolve(location, currentLocation) {\n\t\tlet matcher;\n\t\tlet params = {};\n\t\tlet path;\n\t\tlet name;\n\t\tif (\"name\" in location && location.name) {\n\t\t\tmatcher = matcherMap.get(location.name);\n\t\t\tif (!matcher) throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND, { location });\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tconst invalidParams = Object.keys(location.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n\t\t\t\tif (invalidParams.length) warn$1(`Discarded invalid param(s) \"${invalidParams.join(\"\\\", \\\"\")}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n\t\t\t}\n\t\t\tname = matcher.record.name;\n\t\t\tparams = assign(pickParams(currentLocation.params, matcher.keys.filter((k) => !k.optional).concat(matcher.parent ? matcher.parent.keys.filter((k) => k.optional) : []).map((k) => k.name)), location.params && pickParams(location.params, matcher.keys.map((k) => k.name)));\n\t\t\tpath = matcher.stringify(params);\n\t\t} else if (location.path != null) {\n\t\t\tpath = location.path;\n\t\t\tif (process.env.NODE_ENV !== \"production\" && !path.startsWith(\"/\")) warn$1(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n\t\t\tmatcher = matchers.find((m) => m.re.test(path));\n\t\t\tif (matcher) {\n\t\t\t\tparams = matcher.parse(path);\n\t\t\t\tname = matcher.record.name;\n\t\t\t}\n\t\t} else {\n\t\t\tmatcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m) => m.re.test(currentLocation.path));\n\t\t\tif (!matcher) throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND, {\n\t\t\t\tlocation,\n\t\t\t\tcurrentLocation\n\t\t\t});\n\t\t\tname = matcher.record.name;\n\t\t\tparams = assign({}, currentLocation.params, location.params);\n\t\t\tpath = matcher.stringify(params);\n\t\t}\n\t\tconst matched = [];\n\t\tlet parentMatcher = matcher;\n\t\twhile (parentMatcher) {\n\t\t\tmatched.unshift(parentMatcher.record);\n\t\t\tparentMatcher = parentMatcher.parent;\n\t\t}\n\t\treturn {\n\t\t\tname,\n\t\t\tpath,\n\t\t\tparams,\n\t\t\tmatched,\n\t\t\tmeta: mergeMetaFields(matched)\n\t\t};\n\t}\n\troutes.forEach((route) => addRoute(route));\n\tfunction clearRoutes() {\n\t\tmatchers.length = 0;\n\t\tmatcherMap.clear();\n\t}\n\treturn {\n\t\taddRoute,\n\t\tresolve,\n\t\tremoveRoute,\n\t\tclearRoutes,\n\t\tgetRoutes,\n\t\tgetRecordMatcher\n\t};\n}\n/**\n* Picks an object param to contain only specified keys.\n*\n* @param params - params object to pick from\n* @param keys - keys to pick\n*/\nfunction pickParams(params, keys) {\n\tconst newParams = {};\n\tfor (const key of keys) if (key in params) newParams[key] = params[key];\n\treturn newParams;\n}\n/**\n* Normalizes a RouteRecordRaw. Creates a copy\n*\n* @param record\n* @returns the normalized version\n*/\nfunction normalizeRouteRecord(record) {\n\tconst normalized = {\n\t\tpath: record.path,\n\t\tredirect: record.redirect,\n\t\tname: record.name,\n\t\tmeta: record.meta || {},\n\t\taliasOf: record.aliasOf,\n\t\tbeforeEnter: record.beforeEnter,\n\t\tprops: normalizeRecordProps(record),\n\t\tchildren: record.children || [],\n\t\tinstances: {},\n\t\tleaveGuards: /* @__PURE__ */ new Set(),\n\t\tupdateGuards: /* @__PURE__ */ new Set(),\n\t\tenterCallbacks: {},\n\t\tcomponents: \"components\" in record ? record.components || null : record.component && { default: record.component }\n\t};\n\tObject.defineProperty(normalized, \"mods\", { value: {} });\n\treturn normalized;\n}\n/**\n* Normalize the optional `props` in a record to always be an object similar to\n* components. Also accept a boolean for components.\n* @param record\n*/\nfunction normalizeRecordProps(record) {\n\tconst propsObject = {};\n\tconst props = record.props || false;\n\tif (\"component\" in record) propsObject.default = props;\n\telse for (const name in record.components) propsObject[name] = typeof props === \"object\" ? props[name] : props;\n\treturn propsObject;\n}\n/**\n* Checks if a record or any of its parent is an alias\n* @param record\n*/\nfunction isAliasRecord(record) {\n\twhile (record) {\n\t\tif (record.record.aliasOf) return true;\n\t\trecord = record.parent;\n\t}\n\treturn false;\n}\n/**\n* Merge meta fields of an array of records\n*\n* @param matched - array of matched records\n*/\nfunction mergeMetaFields(matched) {\n\treturn matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction isSameParam(a, b) {\n\treturn a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\n/**\n* Check if a path and its alias have the same required params\n*\n* @param a - original record\n* @param b - alias record\n*/\nfunction checkSameParams(a, b) {\n\tfor (const key of a.keys) if (!key.optional && !b.keys.find(isSameParam.bind(null, key))) return warn$1(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n\tfor (const key of b.keys) if (!key.optional && !a.keys.find(isSameParam.bind(null, key))) return warn$1(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n}\n/**\n* A route with a name and a child with an empty path without a name should warn when adding the route\n*\n* @param mainNormalizedRecord - RouteRecordNormalized\n* @param parent - RouteRecordMatcher\n*/\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n\tif (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path && mainNormalizedRecord.children.length === 0) warn$1(`The route named \"${String(parent.record.name)}\" has a child without a name, an empty path, and no children. This is probably a mistake: using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to silence the warning.`);\n}\nfunction checkSameNameAsAncestor(record, parent) {\n\tfor (let ancestor = parent; ancestor; ancestor = ancestor.parent) if (ancestor.record.name === record.name) throw new Error(`A route named \"${String(record.name)}\" has been added as a ${parent === ancestor ? \"child\" : \"descendant\"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`);\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n\tfor (const key of parent.keys) if (!record.keys.find(isSameParam.bind(null, key))) return warn$1(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n}\n/**\n* Performs a binary search to find the correct insertion index for a new matcher.\n*\n* Matchers are primarily sorted by their score. If scores are tied then we also consider parent/child relationships,\n* with descendants coming before ancestors. If there's still a tie, new routes are inserted after existing routes.\n*\n* @param matcher - new matcher to be inserted\n* @param matchers - existing matchers\n*/\nfunction findInsertionIndex(matcher, matchers) {\n\tlet lower = 0;\n\tlet upper = matchers.length;\n\twhile (lower !== upper) {\n\t\tconst mid = lower + upper >> 1;\n\t\tif (comparePathParserScore(matcher, matchers[mid]) < 0) upper = mid;\n\t\telse lower = mid + 1;\n\t}\n\tconst insertionAncestor = getInsertionAncestor(matcher);\n\tif (insertionAncestor) {\n\t\tupper = matchers.lastIndexOf(insertionAncestor, upper - 1);\n\t\tif (process.env.NODE_ENV !== \"production\" && upper < 0) warn$1(`Finding ancestor route \"${insertionAncestor.record.path}\" failed for \"${matcher.record.path}\"`);\n\t}\n\treturn upper;\n}\nfunction getInsertionAncestor(matcher) {\n\tlet ancestor = matcher;\n\twhile (ancestor = ancestor.parent) if (isMatchable(ancestor) && comparePathParserScore(matcher, ancestor) === 0) return ancestor;\n}\n/**\n* Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without\n* a component, or name, or redirect, are just used to group other routes.\n* @param matcher\n* @param matcher.record record of the matcher\n* @returns\n*/\nfunction isMatchable({ record }) {\n\treturn !!(record.name || record.components && Object.keys(record.components).length || record.redirect);\n}\n\n//#endregion\n//#region src/RouterLink.ts\n/**\n* Returns the internal behavior of a {@link RouterLink} without the rendering part.\n*\n* @param props - a `to` location and an optional `replace` flag\n*/\nfunction useLink(props) {\n\tconst router = inject(routerKey);\n\tconst currentRoute = inject(routeLocationKey);\n\tlet hasPrevious = false;\n\tlet previousTo = null;\n\tconst route = computed(() => {\n\t\tconst to = unref(props.to);\n\t\tif (process.env.NODE_ENV !== \"production\" && (!hasPrevious || to !== previousTo)) {\n\t\t\tif (!isRouteLocation(to)) if (hasPrevious) warn$1(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- previous to:`, previousTo, `\\n- props:`, props);\n\t\t\telse warn$1(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- props:`, props);\n\t\t\tpreviousTo = to;\n\t\t\thasPrevious = true;\n\t\t}\n\t\treturn router.resolve(to);\n\t});\n\tconst activeRecordIndex = computed(() => {\n\t\tconst { matched } = route.value;\n\t\tconst { length } = matched;\n\t\tconst routeMatched = matched[length - 1];\n\t\tconst currentMatched = currentRoute.matched;\n\t\tif (!routeMatched || !currentMatched.length) return -1;\n\t\tconst index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n\t\tif (index > -1) return index;\n\t\tconst parentRecordPath = getOriginalPath(matched[length - 2]);\n\t\treturn length > 1 && getOriginalPath(routeMatched) === parentRecordPath && currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index;\n\t});\n\tconst isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n\tconst isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n\tfunction navigate(e = {}) {\n\t\tif (guardEvent(e)) {\n\t\t\tconst p = router[unref(props.replace) ? \"replace\" : \"push\"](unref(props.to)).catch(noop);\n\t\t\tif (props.viewTransition && typeof document !== \"undefined\" && \"startViewTransition\" in document) document.startViewTransition(() => p);\n\t\t\treturn p;\n\t\t}\n\t\treturn Promise.resolve();\n\t}\n\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n\t\tconst instance = getCurrentInstance();\n\t\tif (instance) {\n\t\t\tconst linkContextDevtools = {\n\t\t\t\troute: route.value,\n\t\t\t\tisActive: isActive.value,\n\t\t\t\tisExactActive: isExactActive.value,\n\t\t\t\terror: null\n\t\t\t};\n\t\t\tinstance.__vrl_devtools = instance.__vrl_devtools || [];\n\t\t\tinstance.__vrl_devtools.push(linkContextDevtools);\n\t\t\twatchEffect(() => {\n\t\t\t\tlinkContextDevtools.route = route.value;\n\t\t\t\tlinkContextDevtools.isActive = isActive.value;\n\t\t\t\tlinkContextDevtools.isExactActive = isExactActive.value;\n\t\t\t\tlinkContextDevtools.error = isRouteLocation(unref(props.to)) ? null : \"Invalid \\\"to\\\" value\";\n\t\t\t}, { flush: \"post\" });\n\t\t}\n\t}\n\t/**\n\t* NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this\n\t*/\n\treturn {\n\t\troute,\n\t\thref: computed(() => route.value.href),\n\t\tisActive,\n\t\tisExactActive,\n\t\tnavigate\n\t};\n}\nfunction preferSingleVNode(vnodes) {\n\treturn vnodes.length === 1 ? vnodes[0] : vnodes;\n}\nconst RouterLinkImpl = /* @__PURE__ */ defineComponent({\n\tname: \"RouterLink\",\n\tcompatConfig: { MODE: 3 },\n\tprops: {\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\trequired: true\n\t\t},\n\t\treplace: Boolean,\n\t\tactiveClass: String,\n\t\texactActiveClass: String,\n\t\tcustom: Boolean,\n\t\tariaCurrentValue: {\n\t\t\ttype: String,\n\t\t\tdefault: \"page\"\n\t\t},\n\t\tviewTransition: Boolean\n\t},\n\tuseLink,\n\tsetup(props, { slots }) {\n\t\tconst link = reactive(useLink(props));\n\t\tconst { options } = inject(routerKey);\n\t\tconst elClass = computed(() => ({\n\t\t\t[getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n\t\t\t[getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n\t\t}));\n\t\treturn () => {\n\t\t\tconst children = slots.default && preferSingleVNode(slots.default(link));\n\t\t\treturn props.custom ? children : h(\"a\", {\n\t\t\t\t\"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n\t\t\t\thref: link.href,\n\t\t\t\tonClick: link.navigate,\n\t\t\t\tclass: elClass.value\n\t\t\t}, children);\n\t\t};\n\t}\n});\n/**\n* Component to render a link that triggers a navigation on click.\n*/\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n\tif (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return;\n\tif (e.defaultPrevented) return;\n\tif (e.button !== void 0 && e.button !== 0) return;\n\tif (e.currentTarget && e.currentTarget.getAttribute) {\n\t\tconst target = e.currentTarget.getAttribute(\"target\");\n\t\tif (/\\b_blank\\b/i.test(target)) return;\n\t}\n\tif (e.preventDefault) e.preventDefault();\n\treturn true;\n}\nfunction includesParams(outer, inner) {\n\tfor (const key in inner) {\n\t\tconst innerValue = inner[key];\n\t\tconst outerValue = outer[key];\n\t\tif (typeof innerValue === \"string\") {\n\t\t\tif (innerValue !== outerValue) return false;\n\t\t} else if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value.valueOf() !== outerValue[i].valueOf())) return false;\n\t}\n\treturn true;\n}\n/**\n* Get the original path value of a record by following its aliasOf\n* @param record\n*/\nfunction getOriginalPath(record) {\n\treturn record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\n/**\n* Utility class to get the active class based on defaults.\n* @param propClass\n* @param globalClass\n* @param defaultClass\n*/\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\n\n//#endregion\n//#region src/RouterView.ts\nconst RouterViewImpl = /* @__PURE__ */ defineComponent({\n\tname: \"RouterView\",\n\tinheritAttrs: false,\n\tprops: {\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: \"default\"\n\t\t},\n\t\troute: Object\n\t},\n\tcompatConfig: { MODE: 3 },\n\tsetup(props, { attrs, slots }) {\n\t\tprocess.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n\t\tconst injectedRoute = inject(routerViewLocationKey);\n\t\tconst routeToDisplay = computed(() => props.route || injectedRoute.value);\n\t\tconst injectedDepth = inject(viewDepthKey, 0);\n\t\tconst depth = computed(() => {\n\t\t\tlet initialDepth = unref(injectedDepth);\n\t\t\tconst { matched } = routeToDisplay.value;\n\t\t\tlet matchedRoute;\n\t\t\twhile ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) initialDepth++;\n\t\t\treturn initialDepth;\n\t\t});\n\t\tconst matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n\t\tprovide(viewDepthKey, computed(() => depth.value + 1));\n\t\tprovide(matchedRouteKey, matchedRouteRef);\n\t\tprovide(routerViewLocationKey, routeToDisplay);\n\t\tconst viewRef = ref();\n\t\twatch(() => [\n\t\t\tviewRef.value,\n\t\t\tmatchedRouteRef.value,\n\t\t\tprops.name\n\t\t], ([instance, to, name], [oldInstance, from, _oldName]) => {\n\t\t\tif (to) {\n\t\t\t\tto.instances[name] = instance;\n\t\t\t\tif (from && from !== to && instance && instance === oldInstance) {\n\t\t\t\t\tif (!to.leaveGuards.size) to.leaveGuards = from.leaveGuards;\n\t\t\t\t\tif (!to.updateGuards.size) to.updateGuards = from.updateGuards;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (instance && to && (!from || !isSameRouteRecord(to, from) || !oldInstance)) (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n\t\t}, { flush: \"post\" });\n\t\treturn () => {\n\t\t\tconst route = routeToDisplay.value;\n\t\t\tconst currentName = props.name;\n\t\t\tconst matchedRoute = matchedRouteRef.value;\n\t\t\tconst ViewComponent = matchedRoute && matchedRoute.components[currentName];\n\t\t\tif (!ViewComponent) return normalizeSlot(slots.default, {\n\t\t\t\tComponent: ViewComponent,\n\t\t\t\troute\n\t\t\t});\n\t\t\tconst routePropsOption = matchedRoute.props[currentName];\n\t\t\tconst routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n\t\t\tconst onVnodeUnmounted = (vnode) => {\n\t\t\t\tif (vnode.component.isUnmounted) matchedRoute.instances[currentName] = null;\n\t\t\t};\n\t\t\tconst component = h(ViewComponent, assign({}, routeProps, attrs, {\n\t\t\t\tonVnodeUnmounted,\n\t\t\t\tref: viewRef\n\t\t\t}));\n\t\t\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser && component.ref) {\n\t\t\t\tconst info = {\n\t\t\t\t\tdepth: depth.value,\n\t\t\t\t\tname: matchedRoute.name,\n\t\t\t\t\tpath: matchedRoute.path,\n\t\t\t\t\tmeta: matchedRoute.meta\n\t\t\t\t};\n\t\t\t\t(isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i]).forEach((instance) => {\n\t\t\t\t\tinstance.__vrv_devtools = info;\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn normalizeSlot(slots.default, {\n\t\t\t\tComponent: component,\n\t\t\t\troute\n\t\t\t}) || component;\n\t\t};\n\t}\n});\nfunction normalizeSlot(slot, data) {\n\tif (!slot) return null;\n\tconst slotContent = slot(data);\n\treturn slotContent.length === 1 ? slotContent[0] : slotContent;\n}\n/**\n* Component to display the current route the user is at.\n*/\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n\tconst instance = getCurrentInstance();\n\tconst parentName = instance.parent && instance.parent.type.name;\n\tconst parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n\tif (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\")) && typeof parentSubTreeType === \"object\" && parentSubTreeType.name === \"RouterView\") {\n\t\tconst comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n\t\twarn$1(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.\nUse slot props instead:\n\n<router-view v-slot=\"{ Component }\">\n <${comp}>\\n <component :is=\"Component\" />\\n </${comp}>\\n</router-view>`);\n\t}\n}\n\n//#endregion\n//#region src/router.ts\n/**\n* Creates a Router instance that can be used by a Vue app.\n*\n* @param options - {@link RouterOptions}\n*/\nfunction createRouter(options) {\n\tconst matcher = createRouterMatcher(options.routes, options);\n\tconst parseQuery$1 = options.parseQuery || parseQuery;\n\tconst stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n\tconst routerHistory = options.history;\n\tif (process.env.NODE_ENV !== \"production\" && !routerHistory) throw new Error(\"Provide the \\\"history\\\" option when calling \\\"createRouter()\\\": https://router.vuejs.org/api/interfaces/RouterOptions.html#history\");\n\tconst beforeGuards = useCallbacks();\n\tconst beforeResolveGuards = useCallbacks();\n\tconst afterGuards = useCallbacks();\n\tconst currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n\tlet pendingLocation = START_LOCATION_NORMALIZED;\n\tif (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) history.scrollRestoration = \"manual\";\n\tconst normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n\tconst encodeParams = applyToParams.bind(null, encodeParam);\n\tconst decodeParams = applyToParams.bind(null, decode);\n\tfunction addRoute(parentOrRoute, route) {\n\t\tlet parent;\n\t\tlet record;\n\t\tif (isRouteName(parentOrRoute)) {\n\t\t\tparent = matcher.getRecordMatcher(parentOrRoute);\n\t\t\tif (process.env.NODE_ENV !== \"production\" && !parent) warn$1(`Parent route \"${String(parentOrRoute)}\" not found when adding child route`, route);\n\t\t\trecord = route;\n\t\t} else record = parentOrRoute;\n\t\treturn matcher.addRoute(record, parent);\n\t}\n\tfunction removeRoute(name) {\n\t\tconst recordMatcher = matcher.getRecordMatcher(name);\n\t\tif (recordMatcher) matcher.removeRoute(recordMatcher);\n\t\telse if (process.env.NODE_ENV !== \"production\") warn$1(`Cannot remove non-existent route \"${String(name)}\"`);\n\t}\n\tfunction getRoutes() {\n\t\treturn matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n\t}\n\tfunction hasRoute(name) {\n\t\treturn !!matcher.getRecordMatcher(name);\n\t}\n\tfunction resolve(rawLocation, currentLocation) {\n\t\tcurrentLocation = assign({}, currentLocation || currentRoute.value);\n\t\tif (typeof rawLocation === \"string\") {\n\t\t\tconst locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n\t\t\tconst matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n\t\t\tconst href = routerHistory.createHref(locationNormalized.fullPath);\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (href.startsWith(\"//\")) warn$1(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n\t\t\t\telse if (!matchedRoute.matched.length) warn$1(`No match found for location with path \"${rawLocation}\"`);\n\t\t\t}\n\t\t\treturn assign(locationNormalized, matchedRoute, {\n\t\t\t\tparams: decodeParams(matchedRoute.params),\n\t\t\t\tredirectedFrom: void 0,\n\t\t\t\thref\n\t\t\t});\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\" && !isRouteLocation(rawLocation)) {\n\t\t\twarn$1(`router.resolve() was passed an invalid location. This will fail in production.\\n- Location:`, rawLocation);\n\t\t\treturn resolve({});\n\t\t}\n\t\tlet matcherLocation;\n\t\tif (rawLocation.path != null) {\n\t\t\tif (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && Object.keys(rawLocation.params).length) warn$1(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n\t\t\tmatcherLocation = assign({}, rawLocation, { path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path });\n\t\t} else {\n\t\t\tconst targetParams = assign({}, rawLocation.params);\n\t\t\tfor (const key in targetParams) if (targetParams[key] == null) delete targetParams[key];\n\t\t\tmatcherLocation = assign({}, rawLocation, { params: encodeParams(targetParams) });\n\t\t\tcurrentLocation.params = encodeParams(currentLocation.params);\n\t\t}\n\t\tconst matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n\t\tconst hash = rawLocation.hash || \"\";\n\t\tif (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) warn$1(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n\t\tmatchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n\t\tconst fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n\t\t\thash: encodeHash(hash),\n\t\t\tpath: matchedRoute.path\n\t\t}));\n\t\tconst href = routerHistory.createHref(fullPath);\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (href.startsWith(\"//\")) warn$1(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n\t\t\telse if (!matchedRoute.matched.length) warn$1(`No match found for location with path \"${rawLocation.path != null ? rawLocation.path : rawLocation}\"`);\n\t\t}\n\t\treturn assign({\n\t\t\tfullPath,\n\t\t\thash,\n\t\t\tquery: stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n\t\t}, matchedRoute, {\n\t\t\tredirectedFrom: void 0,\n\t\t\thref\n\t\t});\n\t}\n\tfunction locationAsObject(to) {\n\t\treturn typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n\t}\n\tfunction checkCanceledNavigation(to, from) {\n\t\tif (pendingLocation !== to) return createRouterError(ErrorTypes.NAVIGATION_CANCELLED, {\n\t\t\tfrom,\n\t\t\tto\n\t\t});\n\t}\n\tfunction push(to) {\n\t\treturn pushWithRedirect(to);\n\t}\n\tfunction replace(to) {\n\t\treturn push(assign(locationAsObject(to), { replace: true }));\n\t}\n\tfunction handleRedirectRecord(to, from) {\n\t\tconst lastMatched = to.matched[to.matched.length - 1];\n\t\tif (lastMatched && lastMatched.redirect) {\n\t\t\tconst { redirect } = lastMatched;\n\t\t\tlet newTargetLocation = typeof redirect === \"function\" ? redirect(to, from) : redirect;\n\t\t\tif (typeof newTargetLocation === \"string\") {\n\t\t\t\tnewTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : { path: newTargetLocation };\n\t\t\t\tnewTargetLocation.params = {};\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV !== \"production\" && newTargetLocation.path == null && !(\"name\" in newTargetLocation)) {\n\t\t\t\twarn$1(`Invalid redirect found:\\n${JSON.stringify(newTargetLocation, null, 2)}\\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n\t\t\t\tthrow new Error(\"Invalid redirect\");\n\t\t\t}\n\t\t\treturn assign({\n\t\t\t\tquery: to.query,\n\t\t\t\thash: to.hash,\n\t\t\t\tparams: newTargetLocation.path != null ? {} : to.params\n\t\t\t}, newTargetLocation);\n\t\t}\n\t}\n\tfunction pushWithRedirect(to, redirectedFrom) {\n\t\tconst targetLocation = pendingLocation = resolve(to);\n\t\tconst from = currentRoute.value;\n\t\tconst data = to.state;\n\t\tconst force = to.force;\n\t\tconst replace = to.replace === true;\n\t\tconst shouldRedirect = handleRedirectRecord(targetLocation, from);\n\t\tif (shouldRedirect) return pushWithRedirect(assign(locationAsObject(shouldRedirect), {\n\t\t\tstate: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n\t\t\tforce,\n\t\t\treplace\n\t\t}), redirectedFrom || targetLocation);\n\t\tconst toLocation = targetLocation;\n\t\ttoLocation.redirectedFrom = redirectedFrom;\n\t\tlet failure;\n\t\tif (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n\t\t\tfailure = createRouterError(ErrorTypes.NAVIGATION_DUPLICATED, {\n\t\t\t\tto: toLocation,\n\t\t\t\tfrom\n\t\t\t});\n\t\t\thandleScroll(from, from, true, false);\n\t\t}\n\t\treturn (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT) ? error : markAsReady(error) : triggerError(error, toLocation, from)).then((failure) => {\n\t\t\tif (failure) {\n\t\t\t\tif (isNavigationFailure(failure, ErrorTypes.NAVIGATION_GUARD_REDIRECT)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\" && isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) && redirectedFrom && (redirectedFrom._count = redirectedFrom._count ? redirectedFrom._count + 1 : 1) > 30) {\n\t\t\t\t\t\twarn$1(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n\t\t\t\t\t\treturn Promise.reject(/* @__PURE__ */ new Error(\"Infinite redirect in navigation guard\"));\n\t\t\t\t\t}\n\t\t\t\t\treturn pushWithRedirect(assign({ replace }, locationAsObject(failure.to), {\n\t\t\t\t\t\tstate: typeof failure.to === \"object\" ? assign({}, data, failure.to.state) : data,\n\t\t\t\t\t\tforce\n\t\t\t\t\t}), redirectedFrom || toLocation);\n\t\t\t\t}\n\t\t\t} else failure = finalizeNavigation(toLocation, from, true, replace, data);\n\t\t\ttriggerAfterEach(toLocation, from, failure);\n\t\t\treturn failure;\n\t\t});\n\t}\n\t/**\n\t* Helper to reject and skip all navigation guards if a new navigation happened\n\t* @param to\n\t* @param from\n\t*/\n\tfunction checkCanceledNavigationAndReject(to, from) {\n\t\tconst error = checkCanceledNavigation(to, from);\n\t\treturn error ? Promise.reject(error) : Promise.resolve();\n\t}\n\tfunction runWithContext(fn) {\n\t\tconst app = installedApps.values().next().value;\n\t\treturn app && typeof app.runWithContext === \"function\" ? app.runWithContext(fn) : fn();\n\t}\n\tfunction navigate(to, from) {\n\t\tlet guards;\n\t\tconst [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n\t\tguards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n\t\tfor (const record of leavingRecords) record.leaveGuards.forEach((guard) => {\n\t\t\tguards.push(guardToPromiseFn(guard, to, from));\n\t\t});\n\t\tconst canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n\t\tguards.push(canceledNavigationCheck);\n\t\treturn runGuardQueue(guards).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const guard of beforeGuards.list()) guards.push(guardToPromiseFn(guard, to, from));\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n\t\t\tfor (const record of updatingRecords) record.updateGuards.forEach((guard) => {\n\t\t\t\tguards.push(guardToPromiseFn(guard, to, from));\n\t\t\t});\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const record of enteringRecords) if (record.beforeEnter) if (isArray(record.beforeEnter)) for (const beforeEnter of record.beforeEnter) guards.push(guardToPromiseFn(beforeEnter, to, from));\n\t\t\telse guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tto.matched.forEach((record) => record.enterCallbacks = {});\n\t\t\tguards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from, runWithContext);\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const guard of beforeResolveGuards.list()) guards.push(guardToPromiseFn(guard, to, from));\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).catch((err) => isNavigationFailure(err, ErrorTypes.NAVIGATION_CANCELLED) ? err : Promise.reject(err));\n\t}\n\tfunction triggerAfterEach(to, from, failure) {\n\t\tafterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));\n\t}\n\t/**\n\t* - Cleans up any navigation guards\n\t* - Changes the url if necessary\n\t* - Calls the scrollBehavior\n\t*/\n\tfunction finalizeNavigation(toLocation, from, isPush, replace, data) {\n\t\tconst error = checkCanceledNavigation(toLocation, from);\n\t\tif (error) return error;\n\t\tconst isFirstNavigation = from === START_LOCATION_NORMALIZED;\n\t\tconst state = !isBrowser ? {} : history.state;\n\t\tif (isPush) if (replace || isFirstNavigation) routerHistory.replace(toLocation.fullPath, assign({ scroll: isFirstNavigation && state && state.scroll }, data));\n\t\telse routerHistory.push(toLocation.fullPath, data);\n\t\tcurrentRoute.value = toLocation;\n\t\thandleScroll(toLocation, from, isPush, isFirstNavigation);\n\t\tmarkAsReady();\n\t}\n\tlet removeHistoryListener;\n\tfunction setupListeners() {\n\t\tif (removeHistoryListener) return;\n\t\tremoveHistoryListener = routerHistory.listen((to, _from, info) => {\n\t\t\tif (!router.listening) return;\n\t\t\tconst toLocation = resolve(to);\n\t\t\tconst shouldRedirect = handleRedirectRecord(toLocation, router.currentRoute.value);\n\t\t\tif (shouldRedirect) {\n\t\t\t\tpushWithRedirect(assign(shouldRedirect, {\n\t\t\t\t\treplace: true,\n\t\t\t\t\tforce: true\n\t\t\t\t}), toLocation).catch(noop);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tpendingLocation = toLocation;\n\t\t\tconst from = currentRoute.value;\n\t\t\tif (isBrowser) saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n\t\t\tnavigate(toLocation, from).catch((error) => {\n\t\t\t\tif (isNavigationFailure(error, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_CANCELLED)) return error;\n\t\t\t\tif (isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT)) {\n\t\t\t\t\tpushWithRedirect(assign(locationAsObject(error.to), { force: true }), toLocation).then((failure) => {\n\t\t\t\t\t\tif (isNavigationFailure(failure, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_DUPLICATED) && !info.delta && info.type === NavigationType.pop) routerHistory.go(-1, false);\n\t\t\t\t\t}).catch(noop);\n\t\t\t\t\treturn Promise.reject();\n\t\t\t\t}\n\t\t\t\tif (info.delta) routerHistory.go(-info.delta, false);\n\t\t\t\treturn triggerError(error, toLocation, from);\n\t\t\t}).then((failure) => {\n\t\t\t\tfailure = failure || finalizeNavigation(toLocation, from, false);\n\t\t\t\tif (failure) {\n\t\t\t\t\tif (info.delta && !isNavigationFailure(failure, ErrorTypes.NAVIGATION_CANCELLED)) routerHistory.go(-info.delta, false);\n\t\t\t\t\telse if (info.type === NavigationType.pop && isNavigationFailure(failure, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_DUPLICATED)) routerHistory.go(-1, false);\n\t\t\t\t}\n\t\t\t\ttriggerAfterEach(toLocation, from, failure);\n\t\t\t}).catch(noop);\n\t\t});\n\t}\n\tlet readyHandlers = useCallbacks();\n\tlet errorListeners = useCallbacks();\n\tlet ready;\n\t/**\n\t* Trigger errorListeners added via onError and throws the error as well\n\t*\n\t* @param error - error to throw\n\t* @param to - location we were navigating to when the error happened\n\t* @param from - location we were navigating from when the error happened\n\t* @returns the error as a rejected promise\n\t*/\n\tfunction triggerError(error, to, from) {\n\t\tmarkAsReady(error);\n\t\tconst list = errorListeners.list();\n\t\tif (list.length) list.forEach((handler) => handler(error, to, from));\n\t\telse {\n\t\t\tif (process.env.NODE_ENV !== \"production\") warn$1(\"uncaught error during route navigation:\");\n\t\t\tconsole.error(error);\n\t\t}\n\t\treturn Promise.reject(error);\n\t}\n\tfunction isReady() {\n\t\tif (ready && currentRoute.value !== START_LOCATION_NORMALIZED) return Promise.resolve();\n\t\treturn new Promise((resolve, reject) => {\n\t\t\treadyHandlers.add([resolve, reject]);\n\t\t});\n\t}\n\tfunction markAsReady(err) {\n\t\tif (!ready) {\n\t\t\tready = !err;\n\t\t\tsetupListeners();\n\t\t\treadyHandlers.list().forEach(([resolve, reject]) => err ? reject(err) : resolve());\n\t\t\treadyHandlers.reset();\n\t\t}\n\t\treturn err;\n\t}\n\tfunction handleScroll(to, from, isPush, isFirstNavigation) {\n\t\tconst { scrollBehavior } = options;\n\t\tif (!isBrowser || !scrollBehavior) return Promise.resolve();\n\t\tconst scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n\t\treturn nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));\n\t}\n\tconst go = (delta) => routerHistory.go(delta);\n\tlet started;\n\tconst installedApps = /* @__PURE__ */ new Set();\n\tconst router = {\n\t\tcurrentRoute,\n\t\tlistening: true,\n\t\taddRoute,\n\t\tremoveRoute,\n\t\tclearRoutes: matcher.clearRoutes,\n\t\thasRoute,\n\t\tgetRoutes,\n\t\tresolve,\n\t\toptions,\n\t\tpush,\n\t\treplace,\n\t\tgo,\n\t\tback: () => go(-1),\n\t\tforward: () => go(1),\n\t\tbeforeEach: beforeGuards.add,\n\t\tbeforeResolve: beforeResolveGuards.add,\n\t\tafterEach: afterGuards.add,\n\t\tonError: errorListeners.add,\n\t\tisReady,\n\t\tinstall(app) {\n\t\t\tapp.component(\"RouterLink\", RouterLink);\n\t\t\tapp.component(\"RouterView\", RouterView);\n\t\t\tapp.config.globalProperties.$router = router;\n\t\t\tObject.defineProperty(app.config.globalProperties, \"$route\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => unref(currentRoute)\n\t\t\t});\n\t\t\tif (isBrowser && !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n\t\t\t\tstarted = true;\n\t\t\t\tpush(routerHistory.location).catch((err) => {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") warn$1(\"Unexpected error when starting the router:\", err);\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst reactiveRoute = {};\n\t\t\tfor (const key in START_LOCATION_NORMALIZED) Object.defineProperty(reactiveRoute, key, {\n\t\t\t\tget: () => currentRoute.value[key],\n\t\t\t\tenumerable: true\n\t\t\t});\n\t\t\tapp.provide(routerKey, router);\n\t\t\tapp.provide(routeLocationKey, shallowReactive(reactiveRoute));\n\t\t\tapp.provide(routerViewLocationKey, currentRoute);\n\t\t\tconst unmountApp = app.unmount;\n\t\t\tinstalledApps.add(app);\n\t\t\tapp.unmount = function() {\n\t\t\t\tinstalledApps.delete(app);\n\t\t\t\tif (installedApps.size < 1) {\n\t\t\t\t\tpendingLocation = START_LOCATION_NORMALIZED;\n\t\t\t\t\tremoveHistoryListener && removeHistoryListener();\n\t\t\t\t\tremoveHistoryListener = null;\n\t\t\t\t\tcurrentRoute.value = START_LOCATION_NORMALIZED;\n\t\t\t\t\tstarted = false;\n\t\t\t\t\tready = false;\n\t\t\t\t}\n\t\t\t\tunmountApp();\n\t\t\t};\n\t\t\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser && true) addDevtools(app, router, matcher);\n\t\t}\n\t};\n\tfunction runGuardQueue(guards) {\n\t\treturn guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n\t}\n\treturn router;\n}\n\n//#endregion\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };","import{computed as e,customRef as t,getCurrentInstance as n,isRef as r,onMounted as i,onScopeDispose as a,onUnmounted as o,provide as s,ref as c,unref as l,watch as u,watchEffect as d}from\"vue\";import{converter as f,formatHex as p}from\"culori\";import{cloneDto as m,isRequestError as h,isUnsanctionedRequest as g,markDtoClean as _}from\"@basmilius/http-client\";import{debounce as v,isHtmlElement as y}from\"@basmilius/utils\";import{useRoute as b,useRouter as x,viewDepthKey as S}from\"vue-router\";import{merge as ee}from\"lodash-es\";import{createPinia as C,defineStore as w,getActivePinia as T,setActivePinia as te,storeToRefs as E}from\"pinia\";function D(e){return e||null}const O=f(`oklch`),k=[25,50,100,200,300,400,500,600,700,800,900,950],A={25:0,50:.05,100:.1,200:.2,300:.35,400:.48,500:.55,600:.65,700:.75,800:.85,900:.93,950:.98};function j(e,t=0,n=1){return Math.min(n,Math.max(t,e))}function ne(e,t=`color`){let n=O(e);if(!n||n.mode!==`oklch`)throw Error(`Invalid color`);let r={};for(let e of k){let i=A[e],a=e<500?n.l+(1-n.l)*(1-i/A[500]):n.l*(1-(i-A[500])/(1-A[500]));a=j(a);let o=1-Math.abs(i-A[500])*1.4,s=(n.c??0)*j(o,.2,1);r[`--${t}-${e}`]=p({mode:`oklch`,l:a,c:s,h:n.h})}return r}var M=class extends Error{},N=class extends Error{},P=class extends Error{},F=class extends Error{};const I=Symbol();function L(e,t){R(e)&&(e=e[I]);let n=async(...n)=>{try{return await e(...n)}catch(e){throw h(e)&&e.statusCode===403?new M:g(e)?new P:t&&typeof t==`function`?(t(e),new N):e}};return n[I]=e,n}function R(e){return I in e}function z(e){return(t=>L(t,e))}function B(e,t,n=JSON.stringify,r=JSON.parse){let i=localStorage.getItem(e),a=t;if(i)try{a=r(i)}catch{localStorage.removeItem(e)}let o=c(a);return u(o,t=>{t==null?localStorage.removeItem(e):localStorage.setItem(e,n(t))},{deep:!0}),o}function V(e,t){return B(e,t,e=>e??``,e=>e===``?null:e)}function H(e){return(t=>(...n)=>(e(),t(...n)))}function U(...e){return e.map(l).map(W)}function W(e){if(!e)throw new F;return e}function G(e){let t=l(e);return t?y(t)?t:t.$el??null:null}function K(e,t,n){let r=c([]);i(()=>{document.addEventListener(`pointerdown`,a)}),o(()=>{document.removeEventListener(`pointerdown`,a)});function a(e){l(t)&&!l(r).some(t=>t.contains(e.target))&&n(e)}d(()=>{let t=[];(Array.isArray(e)?e:[e]).forEach(e=>{let n=G(e);n&&t.push(n)}),r.value=t})}function q(){let t=n();return e(()=>t?.uid??(t?.proxy)._uid??0)}function J(e,t){return async()=>{await navigator.clipboard.writeText(l(e)),t?.()}}function Y(e,n,i=!1){let a=c(r(e)?e.value:e),o=t((e,t)=>({get(){return e(),a.value},set:X(e=>{a.value=e,t()},n,i)}));return r(e)&&u(e,e=>o.value=e),o}function X(e,t,n=!1){let r;return(...i)=>{n&&!r&&e(...i),clearTimeout(r),r=setTimeout(()=>requestAnimationFrame(()=>e(...i)),t)}}function Z(t=0,n=!1){let r=c(n),i=c(0),a=e(()=>l(r)||l(i)>0);function o(e){return(async(...t)=>(i.value++,await e(...t).finally(()=>i.value--)))}let s=Y(a,t);return u(i,()=>{l(r)&&(r.value=!1)}),{isLoading:s,loaded:o}}const re=[5,10,25,50,100];function Q(){let e=c(re),t=c(1),n=c(25),r=c(0);function i(e){t.value=e}function a(e){n.value=e}function o(e){r.value=e}return{limits:e,page:t,perPage:n,total:r,setPage:i,setPerPage:a,setTotal:o}}function ie(e,t=[]){let{isLoading:n,loaded:r}=Z(),{limits:i,page:a,perPage:o,total:s,setPage:d,setPerPage:f,setTotal:p}=Q(),m=c(!1),h=c(!0),g=c([]);async function _(){let t=l(a),n=l(o);try{let i=await r(e)((t-1)*n,n);if(i===!1)return;h.value?(h.value=!1,i.data.items.length===0&&(m.value=!0)):i.data.items.length>0&&(m.value=!1),g.value=i.data.items,p(i.data.total)}catch(e){if(e instanceof F)return;throw e}}return u([a,o,...t],_,{immediate:!0}),{displayEmpty:m,isLoading:n,items:g,limits:i,page:a,perPage:o,total:s,reload:_,setPage:d,setPerPage:f,setTotal:p}}function ae(e,t){return v(e,t)}function oe(e){let t=c();return u(e,e=>{e&&(t.value=m(e),_(t.value))},{immediate:!0}),t}function se(e,t){let n=c();i(()=>{a()}),o(()=>{clearTimeout(n.value)});function r(){n.value=setTimeout(()=>requestAnimationFrame(a),l(e))}function a(){r(),t()}}function ce(e){let{isLoading:t,loaded:n}=Z();return[n(e),t]}function le(){let e=c(null),t=c(null);return u(e,(e,n,r)=>{e&&(t.value=URL.createObjectURL(e),r(()=>{t.value&&=(URL.revokeObjectURL(t.value),null)}))},{immediate:!0}),{file:e,url:t,delete:()=>{e.value=null,t.value=null},upload:t=>{e.value=t}}}function ue(){let e=c(!1);return i(()=>e.value=!0),e}function de(e,t,n){n??={attributes:!0};let r,i=u(e,e=>{o();let i=G(e);i&&(r=new MutationObserver(t),r.observe(i,n))},{immediate:!0});function o(){r&&=(r.disconnect(),void 0)}function s(){o(),i()}a(s)}const fe=[{index:0,type:`too_weak`,minimumDiversity:0,minimumLength:0},{index:1,type:`weak`,minimumDiversity:2,minimumLength:6},{index:2,type:`medium`,minimumDiversity:3,minimumLength:8},{index:3,type:`strong`,minimumDiversity:4,minimumLength:10}],pe=[{regex:RegExp(`[a-z]`),type:`lowercase`},{regex:RegExp(`[A-Z]`),type:`uppercase`},{regex:RegExp(`[0-9]`),type:`number`},{regex:RegExp(`[!\"#$%&'()*+,-./:;<=>?@[\\\\\\\\\\\\]^_\\`{|}~]`),type:`symbol`}];function me(t){return e(()=>{let e=l(t);if(e.length===0)return null;let n=pe.filter(t=>t.regex.test(e)).map(e=>e.type);return{length:e.length,strength:fe.sort((e,t)=>t.index-e.index).find(t=>n.length>=t.minimumDiversity&&e.length>=t.minimumLength).type,rules:n}})}function he(e,t,n){n??={};let r,i=u(e,e=>{o();let i=G(e);i&&(r=new ResizeObserver(t),r.observe(i,n))},{immediate:!0});function o(){r&&=(r.disconnect(),void 0)}function s(){o(),i()}a(s)}function ge(e,...t){let n=new e,r=Object.getOwnPropertyNames(e.prototype).filter(e=>e!==`constructor`),i={};for(let e of r)i[e]=L(n[e].bind(n)),t.forEach(t=>i[e]=t(i[e]));return i}function $(){let t=b();return e(()=>{let e=[];return l(t).matched.forEach(t=>t.name&&e.push(t.name)),e})}function _e(t,n=!1){let r=$();return e(n?()=>l(r).some(e=>e.startsWith(t)):()=>l(r).some(e=>e===t))}function ve(t){let n=b(),r=e(()=>l(n).matched.findIndex(e=>!!e.components&&l(t)in e.components)),i=e(()=>l(n).matched[l(r)]),a=e(()=>l(i)?.path);return s(S,r),{route:n,viewKey:a}}function ye(...e){let t=x(),n=async(e,n=!1)=>n?await t.replace(e):await t.push(e);for(let t of e)n=t(n);return{navigate:n,push:e=>n(e),replace:e=>n(e,!0)}}function be(){let t=b();return e(()=>{let e=l(t).matched,n={};for(let t=e.length-1;t>=0;--t){let r=e[t];if(!r||typeof r.meta!=`object`)continue;let i={...r.meta};if(`navigation`in n){let{navigation:e,...t}=i;i=t}n=ee(n,i)}return n})}function xe(e,t=null){let n=b(),r=c(l(n).params[e]??t);return u(()=>l(n).params[e],e=>{r.value=e||null},{immediate:!0}),r}function Se(t){let n=b();return e(()=>{let e=l(t);for(let t of l(n).matched)if(t.components&&e in t.components)return t.components[e];return null})}function Ce(e,t){let n=w(e,t);return()=>{let e=n(),t=Object.getOwnPropertyNames(e),r=E(e),i={};for(let n of t)if(!(n.startsWith(`$`)||n.startsWith(`_`))){if(n in r){i[n]=r[n];continue}i[n]=e[n]}return i}}export{M as ForbiddenException,N as HandledException,P as UnauthorizedException,F as UnresolvedDependencyException,C as createPinia,Ce as defineStore,D as emptyNull,ne as generateColorPalette,T as getActivePinia,L as guarded,z as onError,B as persistentRef,V as persistentStringRef,H as runBefore,te as setActivePinia,U as unrefAll,G as unwrapElement,K as useClickOutside,q as useComponentId,J as useCopy,ie as useDataTable,ae as useDebounced,Y as useDebouncedRef,oe as useDtoForm,se as useInterval,_e as useIsView,Z as useLoaded,ce as useLoadedAction,le as useLocalFile,ue as useMounted,de as useMutationObserver,ve as useNamedRoute,ye as useNavigate,Q as usePagination,me as usePasswordStrength,he as useResizeObserver,be as useRouteMeta,$ as useRouteNames,xe as useRouteParam,Se as useRouteView,ge as useService};\n//# sourceMappingURL=index.mjs.map","import{a as e,d as t,f as n,n as r,r as i,s as a,t as o}from\"./util-CwaOsSvo.js\";import{computed as s,onMounted as c,onUnmounted as l,ref as u,unref as d,watch as f}from\"vue\";import{DateTime as p}from\"luxon\";import{unwrapElement as m,useMutationObserver as h}from\"@basmilius/common\";function g(e,t){let n=u(!1),r=u(e),i=s(()=>{let e=[],t=d(r).month,n=d(r).startOf(`month`);do e.push(n),n=n.plus({day:1});while(n.month===t);let i=e[0],a=e[e.length-1];for(let t=1;t<i.weekday;++t)e.unshift(i.minus({day:t}));for(let t=a.weekday+1;t<=7;++t)e.push(a.plus({day:t-a.weekday}));for(;e.length/7<6;){let t=e[e.length-1];for(let n=1;n<=7;++n)e.push(t.plus({day:n}))}return e}),a=s(()=>d(i).slice(0,7).map(e=>e.toLocaleString({weekday:t?.weekDayLength??`short`}))),o=s(()=>d(r).plus({month:1})),c=s(()=>d(r).minus({month:1})),l=s(()=>d(r).toLocaleString({month:t?.monthLength??`long`})),f=s(()=>d(r).year.toString());function p(e){n.value=r.value>e,r.value=e}function m(){p(d(r).plus({month:1}))}function h(){p(d(r).minus({month:1}))}return{isTransitioningToPast:n,viewDate:r,viewDateNext:o,viewDatePrevious:c,viewMonth:l,viewYear:f,dates:i,days:a,setViewDate:p,nextMonth:m,previousMonth:h}}function _(e,t){return{months:s(()=>{let n=[],r=d(e),i=r.startOf(`year`);for(;i.month<=12&&i.year===r.year;)n.push({date:i,label:i.toLocaleString({month:t})}),i=i.plus({months:1});return n})}}function v(e,t=10){let n=u(0),r=s(()=>{let r=d(e).year,i=[],a=r-r%t+d(n)*t;for(let e=0;e<t;++e)i.push(a+e);return i});function i(){++n.value}function a(){--n.value}return f(e,()=>n.value=0),{years:r,next:i,previous:a}}function y(e,t,n,r={passive:!0}){f(e,(e,i,a)=>{e&&(e.addEventListener(t,n,r),a(()=>e.removeEventListener(t,n)))},{immediate:!0})}function b(t,n={}){let r=u(n.initial??!1);return f(t,(i,a,o)=>{let s=e(t);if(!s)return;let c=new IntersectionObserver(e=>r.value=e[0]?.isIntersecting??!1,n);c.observe(s),o(()=>c.disconnect())},{immediate:!0}),r}function x(e,t){let n=`flux/${e}`,r=u(i()??t);function i(){if(n in localStorage){let e=JSON.parse(localStorage.getItem(n));return Array.isArray(e)&&e[0]===`DateTime`&&(e=p.fromISO(e[1])),e}return null}return f(r,e=>{let t=e;p.isDateTime(e)&&(t=[`DateTime`,e.toISO({includeOffset:!0,extendedZone:!0})]),localStorage.setItem(n,JSON.stringify(t))}),r}function S(t){let n=u(!0),r=u(!0);return f(t,(i,a,o)=>{let s=e(t);if(!s)return;let c=()=>{let{scrollTop:e,scrollHeight:t,clientHeight:i}=s;n.value=e<=0,r.value=Math.ceil(e+i)>=t},l=new ResizeObserver(c);l.observe(s);for(let e of Array.from(s.children))l.observe(e);let u=new MutationObserver(e=>{for(let t of e){for(let e of Array.from(t.addedNodes))e instanceof Element&&l.observe(e);for(let e of Array.from(t.removedNodes))e instanceof Element&&l.unobserve(e)}c()});u.observe(s,{childList:!0}),s.addEventListener(`scroll`,c,{passive:!0}),c(),o(()=>{s.removeEventListener(`scroll`,c),l.disconnect(),u.disconnect()})},{immediate:!0}),{isAtStart:n,isAtEnd:r}}function C(e){let t=u(0),n=u(0);return e||=u(document),y(e,`scroll`,()=>{let r=d(e);r instanceof Document&&(r=r.scrollingElement),t.value=r?.scrollLeft??0,n.value=r?.scrollTop??0}),{x:t,y:n}}let w=0;function T(e=!1){let t=u(`focus-trap-${++w}`),n=u(!1);return c(()=>r.add(d(t),e=>n.value=e,e)),l(()=>r.remove(d(t))),n}function E(t,n){f(t,(r,i,a)=>{if(!e(t)||d(n))return;let o=document.activeElement;a(()=>{requestAnimationFrame(()=>o?.focus())})})}function D(t,r={}){if(o)return;let{disable:a=u(!1),disableReturn:s=u(!1),attachTo:c=null}=r,l=T(!a);E(t,s),f(t,(r,a,o)=>{let s=e(t),u=c||document;l.value&&s&&document.activeElement&&!s.contains(document.activeElement)&&!s.querySelector(`[autofocus]`)&&i(s,document.activeElement,!0);function d(e){if(!l.value||!s)return;let t=e.target||document.body;s.contains(t)||(e.preventDefault(),e.stopImmediatePropagation(),i(s,t))}function f(e){if(!l.value||!s)return;(!e.relatedTarget||e.relatedTarget===document.body)&&(e.preventDefault(),s.focus());let t=e.target||document.body;s.contains(t)||i(s,t)}if(u.addEventListener(`focusin`,d,{capture:!0}),u.addEventListener(`focusout`,f,{capture:!0}),s){let e=n(s),t=e.findIndex(e=>e.classList.contains(`is-active`)),r=e.findIndex(e=>!e.hasAttribute(`aria-disabled`)),i=e[0];t>-1&&(i=e[t]),r>-1&&(i=e[r]),i&&i.focus()}o(()=>{u.removeEventListener(`focusin`,d),u.removeEventListener(`focusout`,f)})},{immediate:!0}),f(()=>a,()=>{let r=e(t);if(l.value=!a,a||!r)return;let i=n(r);i.includes(document.activeElement)||i[0]?.focus()},{immediate:!0})}function O(e){let t=u(null);c(()=>t.value=r.subscribe(e)),l(()=>t.value?.())}function k(e,{cycle:t=!0,direction:r=`bidirectional`}={}){h(e,()=>a(i(),!1));function i(){let t=n(m(e)),r=t.findIndex(e=>e.classList.contains(`is-active`)),i=t.findIndex(e=>!e.hasAttribute(`aria-disabled`));return r>-1?r:i>-1?i:0}function a(t,r=!0){let i=n(m(e));i.forEach((e,n)=>e.tabIndex=n===t?0:-1),r&&i[t]?.focus()}function o(i){let o=m(e),s=n(o);if(![`Enter`,` `].includes(i.key))switch(r){case`bidirectional`:A(i,o,s,a);break;case`horizontal`:case`vertical`:j(i,o,t,r,s,a);break}}f(e,(t,n,r)=>{let s=m(e);s&&(s.addEventListener(`keydown`,o),a(i(),!1),r(()=>s.removeEventListener(`keydown`,o)))},{immediate:!0})}function A(e,n,r,i){let a;switch(e.key){case`ArrowUp`:a=`up`;break;case`ArrowDown`:a=`down`;break;case`ArrowLeft`:a=`left`;break;case`ArrowRight`:a=`right`;break;default:return}let o=t(n,document.activeElement,a);o&&i(r.indexOf(o)),e.preventDefault()}function j(e,t,n,r,i,o){let s;if(e.key===(r===`horizontal`?`ArrowLeft`:`ArrowUp`))s=-1;else if(e.key===(r===`horizontal`?`ArrowRight`:`ArrowDown`))s=1;else return;let c=a(t,s);c?o(i.indexOf(c)):n&&o(s===1?0:i.length-1),e.preventDefault()}export{T as a,x as c,v as d,_ as f,E as i,b as l,O as n,C as o,g as p,D as r,S as s,k as t,y as u};\n//# sourceMappingURL=composable-CJXC7sly.js.map","import type { ComputedRef, InjectionKey, Ref } from 'vue';\nimport type { FluxPressableType, FluxTo } from '@flux-ui/types';\n\nexport const FluxApplicationInjectionKey: InjectionKey<FluxApplicationInjection> = Symbol();\n\nexport type FluxApplicationContextInfo = {\n readonly id: symbol;\n readonly title: string;\n readonly subtitle?: string;\n readonly to?: FluxTo;\n readonly entryTo?: FluxTo;\n readonly href?: string;\n readonly type?: FluxPressableType;\n};\n\nexport type FluxApplicationInjection = {\n readonly activeContext: ComputedRef<FluxApplicationContextInfo | undefined>;\n readonly contexts: ComputedRef<readonly FluxApplicationContextInfo[]>;\n readonly isMenuCollapsed: Ref<boolean>;\n readonly layout: Ref<FluxApplicationLayout>;\n readonly showDesktopMenuToggle: Ref<boolean>;\n readonly totalLevels: ComputedRef<number>;\n readonly viewIndex: Ref<number>;\n goToChild(): void;\n goToCurrent(): void;\n goToLevel(index: number): void;\n goToMain(): void;\n goToParent(): void;\n pushContext(info: FluxApplicationContextInfo): void;\n removeContext(id: symbol): void;\n};\n\nexport type FluxApplicationLayout =\n | 'default'\n | 'dashboard'\n | 'full'\n | 'medium'\n | 'narrow';\n","import { type RouteLocationNormalizedLoaded, useRoute as useVueRoute } from 'vue-router';\n\n/**\n * Internal alias for vue-router's `useRoute`. Exists so the rest of the\n * package can import a single, controlled `useRoute` symbol — making it\n * trivial to swap in a wrapper later (e.g. modal-aware variants) without\n * touching every call site.\n */\nexport default function (): RouteLocationNormalizedLoaded {\n return useVueRoute();\n}\n","import { computed, type ComputedRef, type Ref, unref } from 'vue';\nimport type { RouteRecordNormalized } from 'vue-router';\nimport useRoute from './useRoute';\n\n/**\n * Returns **all** matched route records that expose a named view with\n * the given `name`, paired with their depth in `route.matched`. Powers\n * `<FluxApplicationMenuContextStack>` so every level of a nested route\n * tree can render its own menu component (instead of vue-router's\n * default behaviour of only rendering the deepest one).\n */\nexport default function (nameRef: Ref<string> | string): ComputedRef<NamedRouteMatch[]> {\n const route = useRoute();\n\n return computed(() => {\n const name = unref(nameRef);\n const matches: NamedRouteMatch[] = [];\n\n route.matched.forEach((record, depth) => {\n if (!record.components || !(name in record.components)) {\n return;\n }\n\n matches.push({depth, record});\n });\n\n return matches;\n });\n}\n\nexport type NamedRouteMatch = {\n readonly depth: number;\n readonly record: RouteRecordNormalized;\n};\n","@use '$flux/css/mixin';\n\n:root {\n --application-duration: 360ms;\n --application-menu-surface: var(--gray-100);\n --application-menu-surface-stroke: var(--gray-200);\n --application-menu-width: 300px;\n --application-menu-width-collapsed: 69px;\n --application-side-width: 300px;\n --application-top-height: 66px;\n}\n\n[dark] {\n --application-menu-surface: color-mix(in srgb, var(--gray-25), black 25%);\n --application-menu-surface-stroke: var(--gray-100);\n}\n\n.application {\n position: relative;\n display: flex;\n transition: padding var(--application-duration) var(--swift-out);\n transition-property: padding-left, padding-right;\n\n &:has(> .applicationSide) {\n padding-right: var(--application-side-width);\n }\n}\n\n.applicationBody {\n position: relative;\n display: flex;\n min-width: 0;\n min-height: 100dvh;\n flex-flow: column;\n flex-grow: 1;\n\n &:has(> .applicationContentFull > :is(.calendar, .table)) {\n max-height: 100dvh;\n }\n}\n\n.applicationMenuBackdrop {\n position: fixed;\n display: none;\n inset: 0;\n width: 100dvw;\n height: 100dvh;\n padding: 0;\n border: 0;\n background: rgb(from var(--gray-200) r g b / .5);\n backdrop-filter: blur(3px) saturate(180%);\n transition: var(--application-duration) var(--swift-out);\n transition-property: background, backdrop-filter, opacity;\n z-index: 1900;\n}\n\n@include mixin.breakpoint-up(lg) {\n .application:has(> .applicationMenu) {\n padding-left: var(--application-menu-width);\n }\n\n .application:has(> .applicationMenu[data-collapsed][data-collapsible]) {\n padding-left: var(--application-menu-width-collapsed);\n }\n}\n\n@include mixin.breakpoint-down(md) {\n .application {\n &:has(> .applicationSide) {\n padding-right: 0;\n }\n }\n\n .applicationMenuBackdrop {\n display: block;\n }\n\n .application:has(> .applicationMenu[data-collapsed]) .applicationMenuBackdrop {\n pointer-events: none;\n opacity: 0;\n }\n\n html[data-application-menu-open],\n html[data-application-menu-open] body {\n overflow: hidden;\n overscroll-behavior: contain;\n }\n}\n","<template>\n <div :class=\"$style.application\">\n <slot name=\"menu\"/>\n\n <div :class=\"$style.applicationBody\">\n <slot/>\n </div>\n\n <slot name=\"side\"/>\n\n <button\n type=\"button\"\n aria-label=\"Close menu\"\n :class=\"$style.applicationMenuBackdrop\"\n @click=\"isMenuCollapsed = true\"/>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { useRemembered } from '@flux-ui/internals';\n import { computed, onUnmounted, provide, ref, shallowRef, toRef, type VNode, watch } from 'vue';\n import { type FluxApplicationContextInfo, FluxApplicationInjectionKey, type FluxApplicationLayout } from '../data';\n import useNamedRoutes from '../routing/useNamedRoutes';\n import useRoute from '../routing/useRoute';\n import $style from '../css/component/Application.module.scss';\n\n const {\n contextMenuName = 'menu',\n showDesktopMenuToggle = false\n } = defineProps<{\n readonly contextMenuName?: string;\n readonly showDesktopMenuToggle?: boolean;\n }>();\n\n defineSlots<{\n default(): VNode[];\n menu(): VNode[];\n side(): VNode[];\n }>();\n\n const route = useRoute();\n const matchedMenuRoutes = useNamedRoutes(toRef(() => contextMenuName));\n\n const isMenuCollapsed = useRemembered('application-menu-collapsed', true);\n const layout = ref<FluxApplicationLayout>('default');\n\n const totalLevels = computed(() => 1 + matchedMenuRoutes.value.length);\n const viewIndex = ref(0);\n\n function clampViewIndex(target: number): number {\n if (target < 0) {\n return 0;\n }\n const max = totalLevels.value - 1;\n if (target > max) {\n return max;\n }\n return target;\n }\n\n function goToLevel(index: number): void {\n viewIndex.value = clampViewIndex(index);\n }\n\n function goToMain(): void {\n viewIndex.value = 0;\n }\n\n function goToCurrent(): void {\n viewIndex.value = totalLevels.value - 1;\n }\n\n function goToParent(): void {\n viewIndex.value = clampViewIndex(viewIndex.value - 1);\n }\n\n function goToChild(): void {\n viewIndex.value = clampViewIndex(viewIndex.value + 1);\n }\n\n const contextStack = shallowRef<FluxApplicationContextInfo[]>([]);\n const contexts = computed(() => contextStack.value);\n const activeContext = computed(() => contextStack.value.at(-1));\n\n function pushContext(info: FluxApplicationContextInfo): void {\n contextStack.value = [...contextStack.value, info];\n }\n\n function removeContext(id: symbol): void {\n contextStack.value = contextStack.value.filter(entry => entry.id !== id);\n }\n\n provide(FluxApplicationInjectionKey, {\n activeContext,\n contexts,\n isMenuCollapsed,\n layout,\n showDesktopMenuToggle: toRef(() => showDesktopMenuToggle),\n totalLevels,\n viewIndex,\n goToChild,\n goToCurrent,\n goToLevel,\n goToMain,\n goToParent,\n pushContext,\n removeContext\n });\n\n watch(() => route.fullPath, () => {\n viewIndex.value = totalLevels.value - 1;\n });\n\n watch(totalLevels, (next) => {\n viewIndex.value = clampViewIndex(viewIndex.value);\n\n // On initial route resolve, totalLevels jumps from 1 to its\n // real value. Snap to the deepest level so the user lands on\n // the right context without seeing a slide animation.\n if (viewIndex.value === 0 && next > 1) {\n viewIndex.value = next - 1;\n }\n }, {immediate: true});\n\n watch(isMenuCollapsed, collapsed => {\n if (typeof document === 'undefined') {\n return;\n }\n\n if (collapsed) {\n delete document.documentElement.dataset.applicationMenuOpen;\n } else {\n document.documentElement.dataset.applicationMenuOpen = '';\n }\n }, {immediate: true});\n\n onUnmounted(() => {\n if (typeof document !== 'undefined') {\n delete document.documentElement.dataset.applicationMenuOpen;\n }\n });\n</script>\n","<template>\n <div :class=\"$style.application\">\n <slot name=\"menu\"/>\n\n <div :class=\"$style.applicationBody\">\n <slot/>\n </div>\n\n <slot name=\"side\"/>\n\n <button\n type=\"button\"\n aria-label=\"Close menu\"\n :class=\"$style.applicationMenuBackdrop\"\n @click=\"isMenuCollapsed = true\"/>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { useRemembered } from '@flux-ui/internals';\n import { computed, onUnmounted, provide, ref, shallowRef, toRef, type VNode, watch } from 'vue';\n import { type FluxApplicationContextInfo, FluxApplicationInjectionKey, type FluxApplicationLayout } from '../data';\n import useNamedRoutes from '../routing/useNamedRoutes';\n import useRoute from '../routing/useRoute';\n import $style from '../css/component/Application.module.scss';\n\n const {\n contextMenuName = 'menu',\n showDesktopMenuToggle = false\n } = defineProps<{\n readonly contextMenuName?: string;\n readonly showDesktopMenuToggle?: boolean;\n }>();\n\n defineSlots<{\n default(): VNode[];\n menu(): VNode[];\n side(): VNode[];\n }>();\n\n const route = useRoute();\n const matchedMenuRoutes = useNamedRoutes(toRef(() => contextMenuName));\n\n const isMenuCollapsed = useRemembered('application-menu-collapsed', true);\n const layout = ref<FluxApplicationLayout>('default');\n\n const totalLevels = computed(() => 1 + matchedMenuRoutes.value.length);\n const viewIndex = ref(0);\n\n function clampViewIndex(target: number): number {\n if (target < 0) {\n return 0;\n }\n const max = totalLevels.value - 1;\n if (target > max) {\n return max;\n }\n return target;\n }\n\n function goToLevel(index: number): void {\n viewIndex.value = clampViewIndex(index);\n }\n\n function goToMain(): void {\n viewIndex.value = 0;\n }\n\n function goToCurrent(): void {\n viewIndex.value = totalLevels.value - 1;\n }\n\n function goToParent(): void {\n viewIndex.value = clampViewIndex(viewIndex.value - 1);\n }\n\n function goToChild(): void {\n viewIndex.value = clampViewIndex(viewIndex.value + 1);\n }\n\n const contextStack = shallowRef<FluxApplicationContextInfo[]>([]);\n const contexts = computed(() => contextStack.value);\n const activeContext = computed(() => contextStack.value.at(-1));\n\n function pushContext(info: FluxApplicationContextInfo): void {\n contextStack.value = [...contextStack.value, info];\n }\n\n function removeContext(id: symbol): void {\n contextStack.value = contextStack.value.filter(entry => entry.id !== id);\n }\n\n provide(FluxApplicationInjectionKey, {\n activeContext,\n contexts,\n isMenuCollapsed,\n layout,\n showDesktopMenuToggle: toRef(() => showDesktopMenuToggle),\n totalLevels,\n viewIndex,\n goToChild,\n goToCurrent,\n goToLevel,\n goToMain,\n goToParent,\n pushContext,\n removeContext\n });\n\n watch(() => route.fullPath, () => {\n viewIndex.value = totalLevels.value - 1;\n });\n\n watch(totalLevels, (next) => {\n viewIndex.value = clampViewIndex(viewIndex.value);\n\n // On initial route resolve, totalLevels jumps from 1 to its\n // real value. Snap to the deepest level so the user lands on\n // the right context without seeing a slide animation.\n if (viewIndex.value === 0 && next > 1) {\n viewIndex.value = next - 1;\n }\n }, {immediate: true});\n\n watch(isMenuCollapsed, collapsed => {\n if (typeof document === 'undefined') {\n return;\n }\n\n if (collapsed) {\n delete document.documentElement.dataset.applicationMenuOpen;\n } else {\n document.documentElement.dataset.applicationMenuOpen = '';\n }\n }, {immediate: true});\n\n onUnmounted(() => {\n if (typeof document !== 'undefined') {\n delete document.documentElement.dataset.applicationMenuOpen;\n }\n });\n</script>\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import { computed, type ComputedRef, toRef } from 'vue';\nimport useNamedRoutes from '../routing/useNamedRoutes';\n\nexport default function (name: string = 'menu'): UseApplicationContextMenu {\n const matches = useNamedRoutes(toRef(() => name));\n\n const hasContextMenu = computed(() => matches.value.length > 0);\n const contextMenuKey = computed(() => matches.value.map(m => m.record.path).join('|') || undefined);\n\n return {\n contextMenuKey,\n hasContextMenu\n };\n}\n\ntype UseApplicationContextMenu = {\n readonly contextMenuKey: ComputedRef<string | undefined>;\n readonly hasContextMenu: ComputedRef<boolean>;\n};\n","import { inject } from 'vue';\nimport { type FluxApplicationInjection, FluxApplicationInjectionKey } from '../data';\n\nexport default function (): FluxApplicationInjection {\n const injection = inject(FluxApplicationInjectionKey);\n\n if (!injection) {\n throw new Error('[Flux] useApplicationInjection() was used outside a FluxApplication component.');\n }\n\n return injection;\n}\n","import { computed, type ComputedRef, type Ref } from 'vue';\nimport type { FluxApplicationContextInfo, FluxApplicationLayout } from '../data';\nimport useApplicationInjection from './useApplicationInjection';\n\nexport default function (): UseApplicationMenu {\n const {\n activeContext,\n contexts,\n isMenuCollapsed,\n layout,\n totalLevels,\n viewIndex,\n goToChild,\n goToCurrent,\n goToLevel,\n goToMain,\n goToParent\n } = useApplicationInjection();\n\n const isMainMenuVisible = computed(() => viewIndex.value === 0);\n const canGoBack = computed(() => viewIndex.value > 0);\n const canGoForward = computed(() => viewIndex.value < totalLevels.value - 1);\n\n return {\n activeContext,\n canGoBack,\n canGoForward,\n contexts,\n isMainMenuVisible,\n isMenuCollapsed,\n layout,\n totalLevels,\n viewIndex,\n\n goToChild,\n goToCurrent,\n goToLevel,\n goToMain,\n goToParent,\n\n close: () => isMenuCollapsed.value = true,\n open: () => isMenuCollapsed.value = false,\n toggle: () => isMenuCollapsed.value = !isMenuCollapsed.value,\n\n // Convenience aliases mapping onto the viewIndex model.\n showMainMenu: goToMain,\n showContextMenu: goToCurrent,\n toggleMainMenu: () => {\n if (viewIndex.value === 0) {\n goToCurrent();\n } else {\n goToMain();\n }\n }\n };\n}\n\ntype UseApplicationMenu = {\n readonly activeContext: ComputedRef<FluxApplicationContextInfo | undefined>;\n readonly canGoBack: ComputedRef<boolean>;\n readonly canGoForward: ComputedRef<boolean>;\n readonly contexts: ComputedRef<readonly FluxApplicationContextInfo[]>;\n readonly isMainMenuVisible: ComputedRef<boolean>;\n readonly isMenuCollapsed: Ref<boolean>;\n readonly layout: Ref<FluxApplicationLayout>;\n readonly totalLevels: ComputedRef<number>;\n readonly viewIndex: Ref<number>;\n close(): void;\n goToChild(): void;\n goToCurrent(): void;\n goToLevel(index: number): void;\n goToMain(): void;\n goToParent(): void;\n open(): void;\n showContextMenu(): void;\n showMainMenu(): void;\n toggle(): void;\n toggleMainMenu(): void;\n};\n","@use '$flux/css/mixin';\n\n.applicationContent {\n position: relative;\n display: flex;\n container: applicationContent / inline-size;\n margin-left: auto;\n margin-right: auto;\n padding-top: 21px;\n padding-bottom: 42px;\n flex-flow: column;\n flex-grow: 1;\n gap: 21px;\n}\n\n.applicationContentDefault,\n.applicationContentDashboard {\n composes: applicationContent;\n\n width: min(1620px, 100% - 42px);\n}\n\n.applicationContentDashboard {\n gap: 45px;\n}\n\n.applicationContentFull {\n composes: applicationContent;\n\n padding-top: 0;\n padding-bottom: 0;\n width: calc(100% - 42px);\n}\n\n.applicationContentMedium {\n composes: applicationContent;\n\n width: min(1280px, 100% - 42px);\n}\n\n.applicationContentNarrow {\n composes: applicationContent;\n\n width: min(840px, 100% - 42px);\n}\n\n.applicationContentFull {\n &:has(> :is(:local(.calendar), :local(.table))) {\n min-height: 0;\n width: 100%;\n contain: paint;\n overflow: hidden;\n }\n\n > :is(:local(.calendar), :local(.table)) {\n max-height: 100%;\n flex-grow: 1;\n }\n\n > :local(.calendar) {\n border-left: 0;\n border-right: 0;\n border-radius: 0;\n\n :local(.calendarActions) {\n padding-left: 21px;\n padding-right: 21px;\n }\n }\n\n > :local(.table) {\n :local(.tableCell):first-child :local(.tableCellContent) {\n padding-left: 21px;\n }\n\n :local(.tableCell):last-child :local(.tableCellContent) {\n padding-right: 21px;\n }\n }\n}\n\n@include mixin.breakpoint-down(md) {\n .applicationContentDefault,\n .applicationContentMedium,\n .applicationContentNarrow {\n gap: 15px;\n }\n\n .applicationContentDashboard {\n gap: 30px;\n }\n\n .applicationContentFull {\n width: 100%;\n }\n\n .applicationContentFull {\n > :is(.calendar, .table) {\n margin-left: 0;\n margin-right: 0;\n height: auto;\n }\n\n > .calendar .calendarActions {\n padding-left: 12px;\n padding-right: 12px;\n }\n\n > .table {\n .tableCell:first-child .tableCellContent {\n padding-left: 12px;\n }\n\n .tableCell:last-child .tableCellContent {\n padding-right: 12px;\n }\n }\n }\n}\n","<template>\n <main\n :class=\"clsx(\n layout === 'default' && $style.applicationContentDefault,\n layout === 'dashboard' && $style.applicationContentDashboard,\n layout === 'full' && $style.applicationContentFull,\n layout === 'medium' && $style.applicationContentMedium,\n layout === 'narrow' && $style.applicationContentNarrow\n )\"\n aria-label=\"Application Content\">\n <slot/>\n </main>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import clsx from 'clsx';\n import { useApplicationInjection } from '../composable';\n import type { FluxApplicationLayout } from '../data';\n import $style from '../css/component/ApplicationContent.module.scss';\n import { watch } from 'vue';\n\n const {\n layout = 'default'\n } = defineProps<{\n readonly layout?: FluxApplicationLayout;\n }>();\n\n defineSlots<{\n default(): any;\n }>();\n\n const {layout: layoutRef} = useApplicationInjection();\n\n watch(() => layout, () => layoutRef.value = layout, {immediate: true});\n</script>\n","<template>\n <main\n :class=\"clsx(\n layout === 'default' && $style.applicationContentDefault,\n layout === 'dashboard' && $style.applicationContentDashboard,\n layout === 'full' && $style.applicationContentFull,\n layout === 'medium' && $style.applicationContentMedium,\n layout === 'narrow' && $style.applicationContentNarrow\n )\"\n aria-label=\"Application Content\">\n <slot/>\n </main>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import clsx from 'clsx';\n import { useApplicationInjection } from '../composable';\n import type { FluxApplicationLayout } from '../data';\n import $style from '../css/component/ApplicationContent.module.scss';\n import { watch } from 'vue';\n\n const {\n layout = 'default'\n } = defineProps<{\n readonly layout?: FluxApplicationLayout;\n }>();\n\n defineSlots<{\n default(): any;\n }>();\n\n const {layout: layoutRef} = useApplicationInjection();\n\n watch(() => layout, () => layoutRef.value = layout, {immediate: true});\n</script>\n",".applicationHero {\n display: flex;\n align-items: center;\n flex-flow: row;\n gap: 21px;\n}\n\n.applicationHeroBody {\n display: flex;\n flex-flow: column;\n flex-grow: 1;\n gap: 6px;\n}\n\n.applicationHeroSubtitle {\n color: var(--foreground-secondary);\n font-size: 18px;\n}\n","<template>\n <header :class=\"$style.applicationHero\">\n <slot name=\"start\"/>\n\n <div :class=\"$style.applicationHeroBody\">\n <slot name=\"before\"/>\n\n <h1>{{ title }}</h1>\n\n <p\n v-if=\"subtitle\"\n :class=\"$style.applicationHeroSubtitle\">\n {{ subtitle }}\n </p>\n\n <slot name=\"after\"/>\n </div>\n\n <slot name=\"end\"/>\n </header>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationHero.module.scss';\n\n defineProps<{\n readonly title: string;\n readonly subtitle?: string;\n }>();\n\n defineSlots<{\n after?(): VNode[];\n before?(): VNode[];\n end?(): VNode[];\n start?(): VNode[];\n }>();\n</script>\n","<template>\n <header :class=\"$style.applicationHero\">\n <slot name=\"start\"/>\n\n <div :class=\"$style.applicationHeroBody\">\n <slot name=\"before\"/>\n\n <h1>{{ title }}</h1>\n\n <p\n v-if=\"subtitle\"\n :class=\"$style.applicationHeroSubtitle\">\n {{ subtitle }}\n </p>\n\n <slot name=\"after\"/>\n </div>\n\n <slot name=\"end\"/>\n </header>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationHero.module.scss';\n\n defineProps<{\n readonly title: string;\n readonly subtitle?: string;\n }>();\n\n defineSlots<{\n after?(): VNode[];\n before?(): VNode[];\n end?(): VNode[];\n start?(): VNode[];\n }>();\n</script>\n","@use '$flux/css/mixin';\n\n.applicationMenu {\n position: fixed;\n display: flex;\n top: 0;\n left: 0;\n height: 100dvh;\n width: var(--application-menu-width);\n flex-flow: column;\n transition: var(--application-duration) var(--swift-out);\n transition-property: translate, width;\n background: var(--application-menu-surface);\n border-right: 1px solid var(--application-menu-surface-stroke);\n overflow: hidden;\n z-index: 500;\n}\n\n.applicationMenuFooter,\n.applicationMenuHeader,\n.applicationMenuPanel {\n padding: 12px;\n gap: 12px;\n}\n\n.applicationMenuFooter,\n.applicationMenuHeader {\n position: relative;\n background: var(--application-menu-surface);\n z-index: 1;\n\n &::before {\n position: absolute;\n left: 0;\n right: 0;\n height: 18px;\n width: 100%;\n content: '';\n pointer-events: none;\n }\n}\n\n.applicationMenuFooter {\n max-height: 50vh;\n padding-bottom: max(12px, env(safe-area-inset-bottom));\n transition: var(--application-duration) var(--swift-out);\n transition-property: max-height, opacity, padding-top, padding-bottom;\n\n &::before {\n bottom: 100%;\n background: linear-gradient(to top, var(--application-menu-surface), transparent);\n transition: opacity var(--application-duration) var(--swift-out);\n }\n\n /**\n * Collapses the footer in sync with the slider track when the\n * user navigates into a context-menu panel. Animating `max-height`\n * is the standard hack to transition a height-auto element; 50vh\n * is far above any realistic footer height yet small enough to\n * animate smoothly without the leading edge appearing to \"wait\".\n */\n &[data-hidden] {\n max-height: 0;\n padding-top: 0;\n padding-bottom: 0;\n opacity: 0;\n pointer-events: none;\n overflow: hidden;\n\n &::before {\n opacity: 0;\n }\n }\n}\n\n.applicationMenuHeader {\n padding-top: max(12px, env(safe-area-inset-top));\n border-bottom: 1px solid var(--application-menu-surface-stroke);\n\n &::before {\n top: calc(100% + 1px);\n background: linear-gradient(to bottom, var(--application-menu-surface), transparent);\n }\n}\n\n.applicationMenuStage {\n position: relative;\n min-height: 0;\n flex: 1 1 auto;\n overflow: hidden;\n}\n\n.applicationMenuTrack {\n display: flex;\n flex-flow: row nowrap;\n height: 100%;\n transform: translateX(calc(var(--view-index, 0) * -100%));\n transition: transform var(--application-duration) var(--swift-out);\n will-change: transform;\n}\n\n.applicationMenuPanel {\n display: flex;\n flex: 0 0 100%;\n flex-flow: column;\n width: 100%;\n overflow-y: auto;\n}\n\n.applicationMenuPageIndicator {\n display: flex;\n flex-flow: row nowrap;\n gap: 6px;\n justify-content: center;\n align-items: center;\n padding: 9px 12px;\n background: var(--application-menu-surface);\n z-index: 1;\n}\n\n.applicationMenuPageIndicatorDot {\n height: 6px;\n width: 6px;\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 1.5px solid var(--application-menu-surface-stroke);\n border-radius: 50%;\n transition: 200ms var(--swift-out);\n transition-property: background, border-color, transform;\n\n @include mixin.hover {\n border-color: var(--foreground-secondary);\n transform: scale(1.2);\n }\n\n @include mixin.focus-ring;\n}\n\n.applicationMenuPageIndicatorDotActive {\n background: var(--foreground-prominent);\n border-color: var(--foreground-prominent);\n}\n\n/**\n * No visual animation on enter/leave — just hold the leaving panel in\n * the DOM for the duration of the slider's translate transition so it\n * stays visible while the track slides away from it. Without this the\n * v-for would unmount the panel the moment matches shrinks, leaving\n * the slider sliding over an empty track.\n */\n.applicationMenuPanelEnterActive,\n.applicationMenuPanelEnterFrom,\n.applicationMenuPanelLeaveActive,\n.applicationMenuPanelLeaveTo {\n transition: opacity var(--application-duration) var(--swift-out);\n}\n\n.applicationMenuPanelLeaveActive {\n pointer-events: none;\n}\n\n.applicationMenu :local(.divider) {\n margin: 3px 12px;\n}\n\n.applicationMenu :local(.dividerContent)::before,\n.applicationMenu :local(.dividerContent)::after,\n.applicationMenu :local(.dividerLine) {\n background: var(--application-menu-surface-stroke);\n}\n\n.applicationMenu :local(.menuSubHeader) {\n --surface: var(--application-menu-surface);\n}\n\n.applicationMenu :local(.menuItem) {\n position: relative;\n\n @include mixin.hover {\n background: var(--gray-200);\n }\n\n &:active {\n background: var(--gray-300);\n }\n\n &::before {\n position: absolute;\n display: block;\n content: '';\n top: 50%;\n right: 0;\n height: 1em;\n width: 3px;\n background: var(--foreground-secondary);\n border-radius: var(--radius);\n opacity: 0;\n transition: 300ms var(--swift-out);\n transition-property: height, opacity;\n translate: 8px -50%;\n }\n}\n\n.applicationMenu :local(.menuItemIcon) {\n color: var(--foreground-secondary);\n}\n\n.applicationMenu :local(.menuItemLabel) {\n transition: var(--application-duration) var(--swift-out);\n transition-property: filter, opacity, translate;\n white-space: nowrap;\n}\n\n.applicationMenu :local(.menuItemActive) {\n background: var(--gray-200);\n color: var(--foreground-prominent);\n\n &::before {\n height: 1.6em;\n opacity: 1;\n }\n}\n\n.applicationMenu :local(.menuItemActive) :local(.menuItemIcon) {\n color: var(--foreground);\n}\n\n.applicationMenu :local(.menuItemActive) :local(.menuItemLabel) {\n font-weight: 500;\n}\n\n.applicationMenuAccount {\n position: relative;\n\n pointer-events: none;\n}\n\n.applicationMenuAccountSwitcher {\n composes: applicationMenuAccount;\n\n pointer-events: auto;\n}\n\n.applicationMenuAccount :local(.menuItemLabel) {\n font-weight: 600;\n}\n\n.applicationMenuAccount :local(.avatar) {\n margin: -5px;\n font-size: 30px;\n}\n\n.applicationMenuContext {\n display: flex;\n margin-top: -12px;\n margin-left: -12px;\n margin-right: -12px;\n padding: 15px;\n flex-flow: row nowrap;\n gap: 15px;\n border: 1px solid var(--application-menu-surface-stroke);\n border-top: 0;\n border-left: 0;\n border-right: 0;\n}\n\n.applicationMenuContextContent {\n display: flex;\n align-self: center;\n flex-flow: column;\n\n :global(strong) {\n color: var(--foreground-prominent);\n }\n\n :global(span) {\n color: var(--foreground-secondary);\n font-size: 14px;\n }\n}\n\n.applicationMenuContextPill {\n position: relative;\n display: flex;\n flex-flow: row nowrap;\n gap: 9px;\n align-items: center;\n margin: -3px -6px 6px;\n padding: 9px 12px;\n cursor: pointer;\n color: var(--foreground-secondary);\n background: transparent;\n border: 1px solid var(--application-menu-surface-stroke);\n border-radius: var(--radius);\n transition: background 200ms var(--swift-out);\n\n @include mixin.hover {\n background: var(--gray-200);\n }\n\n &:active {\n background: var(--gray-300);\n }\n\n @include mixin.focus-ring;\n}\n\n.applicationMenuContextPillContent {\n display: flex;\n flex: 1 1 auto;\n flex-flow: column;\n min-width: 0;\n\n :global(strong) {\n font-weight: 500;\n font-size: 14px;\n line-height: 1.2;\n white-space: nowrap;\n overflow: hidden;\n color: var(--foreground-prominent);\n text-overflow: ellipsis;\n transition: var(--application-duration) var(--swift-out);\n transition-property: filter, opacity, translate;\n }\n\n :global(span) {\n font-size: 12px;\n line-height: 1.2;\n white-space: nowrap;\n overflow: hidden;\n color: var(--foreground-secondary);\n text-overflow: ellipsis;\n transition: var(--application-duration) var(--swift-out);\n transition-property: filter, opacity, translate;\n }\n}\n\n.applicationMenuPromo {\n display: flex;\n padding: 12px;\n flex-flow: row;\n gap: 12px;\n background: var(--gray-25);\n border: 1px solid var(--application-menu-surface-stroke);\n border-radius: var(--radius);\n}\n\n.applicationMenuPromo > :local(.icon) {\n margin: 2px;\n color: var(--gray-600);\n font-size: 16px;\n}\n\n.applicationMenuPromoContent {\n display: flex;\n flex-flow: column;\n gap: 6px;\n font-size: 14px;\n}\n\n.applicationMenuPromoContent :global(a) {\n color: var(--gray-700);\n}\n\n.applicationMenuToggle:local(.menuItem) {\n height: min-content;\n align-self: center;\n color: var(--foreground);\n flex-grow: 0;\n flex-shrink: 0;\n}\n\n.applicationMenuToggleIcon {\n height: 1em;\n width: 1em;\n flex-shrink: 0;\n font-size: 18px;\n line-height: 1;\n overflow: visible;\n\n :global(path) {\n fill: currentColor;\n }\n}\n\n@include mixin.breakpoint-up(lg) {\n .applicationMenu[data-collapsed][data-collapsible] {\n width: var(--application-menu-width-collapsed);\n\n :local(.menuItemLabel) {\n filter: blur(6px);\n opacity: 0;\n translate: -12px 0;\n }\n\n .applicationMenuPromo,\n .applicationMenuContext {\n opacity: 0;\n pointer-events: none;\n }\n\n .applicationMenuContextPillContent :global(strong),\n .applicationMenuContextPillContent :global(span) {\n filter: blur(6px);\n opacity: 0;\n translate: -12px 0;\n }\n }\n}\n\n@include mixin.breakpoint-down(md) {\n .applicationMenu {\n width: min(300px, calc(100dvw - 42px));\n z-index: 2000;\n }\n\n .applicationMenu[data-collapsed] {\n translate: -100% 0;\n }\n}\n","<template>\n <aside\n :class=\"$style.applicationMenu\"\n :data-collapsed=\"isMenuCollapsed ? '' : undefined\"\n :data-collapsible=\"showDesktopMenuToggle ? '' : undefined\">\n <FluxMenu\n v-if=\"slots.header\"\n :class=\"$style.applicationMenuHeader\">\n <slot name=\"header\"/>\n </FluxMenu>\n\n <div :class=\"$style.applicationMenuStage\">\n <div\n :class=\"$style.applicationMenuTrack\"\n :style=\"{'--view-index': viewIndex}\">\n <FluxMenu :class=\"$style.applicationMenuPanel\">\n <slot/>\n </FluxMenu>\n\n <slot name=\"context\"/>\n </div>\n </div>\n\n <nav\n v-if=\"showPageIndicator && totalLevels > 1\"\n :class=\"$style.applicationMenuPageIndicator\"\n aria-label=\"Menu levels\">\n <button\n v-for=\"level in totalLevels\"\n :key=\"level - 1\"\n type=\"button\"\n :class=\"[\n $style.applicationMenuPageIndicatorDot,\n (level - 1) === viewIndex && $style.applicationMenuPageIndicatorDotActive\n ]\"\n :aria-current=\"(level - 1) === viewIndex ? 'true' : undefined\"\n :aria-label=\"(level - 1) === 0 ? 'Hoofdmenu' : `Niveau ${level - 1}`\"\n @click=\"goToLevel(level - 1)\"/>\n </nav>\n\n <FluxMenu\n v-if=\"slots.footer\"\n :class=\"$style.applicationMenuFooter\"\n :data-hidden=\"!isMainMenuVisible ? '' : undefined\">\n <slot name=\"footer\"/>\n </FluxMenu>\n </aside>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenu } from '@flux-ui/components';\n import { type VNode } from 'vue';\n import { useApplicationInjection, useApplicationMenu } from '../composable';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const {\n showPageIndicator = true\n } = defineProps<{\n readonly showPageIndicator?: boolean;\n }>();\n\n const slots = defineSlots<{\n default(): VNode;\n context?(): VNode;\n footer?(): VNode;\n header?(): VNode;\n }>();\n\n const {isMenuCollapsed, showDesktopMenuToggle} = useApplicationInjection();\n const {goToLevel, isMainMenuVisible, totalLevels, viewIndex} = useApplicationMenu();\n</script>\n","<template>\n <aside\n :class=\"$style.applicationMenu\"\n :data-collapsed=\"isMenuCollapsed ? '' : undefined\"\n :data-collapsible=\"showDesktopMenuToggle ? '' : undefined\">\n <FluxMenu\n v-if=\"slots.header\"\n :class=\"$style.applicationMenuHeader\">\n <slot name=\"header\"/>\n </FluxMenu>\n\n <div :class=\"$style.applicationMenuStage\">\n <div\n :class=\"$style.applicationMenuTrack\"\n :style=\"{'--view-index': viewIndex}\">\n <FluxMenu :class=\"$style.applicationMenuPanel\">\n <slot/>\n </FluxMenu>\n\n <slot name=\"context\"/>\n </div>\n </div>\n\n <nav\n v-if=\"showPageIndicator && totalLevels > 1\"\n :class=\"$style.applicationMenuPageIndicator\"\n aria-label=\"Menu levels\">\n <button\n v-for=\"level in totalLevels\"\n :key=\"level - 1\"\n type=\"button\"\n :class=\"[\n $style.applicationMenuPageIndicatorDot,\n (level - 1) === viewIndex && $style.applicationMenuPageIndicatorDotActive\n ]\"\n :aria-current=\"(level - 1) === viewIndex ? 'true' : undefined\"\n :aria-label=\"(level - 1) === 0 ? 'Hoofdmenu' : `Niveau ${level - 1}`\"\n @click=\"goToLevel(level - 1)\"/>\n </nav>\n\n <FluxMenu\n v-if=\"slots.footer\"\n :class=\"$style.applicationMenuFooter\"\n :data-hidden=\"!isMainMenuVisible ? '' : undefined\">\n <slot name=\"footer\"/>\n </FluxMenu>\n </aside>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenu } from '@flux-ui/components';\n import { type VNode } from 'vue';\n import { useApplicationInjection, useApplicationMenu } from '../composable';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const {\n showPageIndicator = true\n } = defineProps<{\n readonly showPageIndicator?: boolean;\n }>();\n\n const slots = defineSlots<{\n default(): VNode;\n context?(): VNode;\n footer?(): VNode;\n header?(): VNode;\n }>();\n\n const {isMenuCollapsed, showDesktopMenuToggle} = useApplicationInjection();\n const {goToLevel, isMainMenuVisible, totalLevels, viewIndex} = useApplicationMenu();\n</script>\n","<template>\n <FluxFlyout is-auto-width>\n <template #opener=\"{open}\">\n <FluxMenuItem\n :class=\"slots.switcher ? $style.applicationMenuAccountSwitcher : $style.applicationMenuAccount\"\n :icon-leading=\"icon\"\n :icon-trailing=\"slots.switcher ? 'angle-down' : undefined\"\n :image-alt=\"imageAlt\"\n :image-src=\"imageSrc\"\n :label=\"label\"\n @click=\"slots.switcher && open()\">\n <template\n v-if=\"slots.avatar\"\n #before>\n <slot name=\"avatar\"/>\n </template>\n </FluxMenuItem>\n </template>\n\n <template v-if=\"slots.switcher\">\n <FluxPane>\n <slot name=\"switcher\"/>\n </FluxPane>\n </template>\n </FluxFlyout>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxFlyout, FluxMenuItem, FluxPane } from '@flux-ui/components';\n import type { FluxIconName } from '@flux-ui/types';\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n readonly imageAlt?: string;\n readonly imageSrc?: string;\n readonly label: string;\n }>();\n\n const slots = defineSlots<{\n avatar?(): VNode;\n switcher?(): VNode;\n }>();\n</script>\n","<template>\n <FluxFlyout is-auto-width>\n <template #opener=\"{open}\">\n <FluxMenuItem\n :class=\"slots.switcher ? $style.applicationMenuAccountSwitcher : $style.applicationMenuAccount\"\n :icon-leading=\"icon\"\n :icon-trailing=\"slots.switcher ? 'angle-down' : undefined\"\n :image-alt=\"imageAlt\"\n :image-src=\"imageSrc\"\n :label=\"label\"\n @click=\"slots.switcher && open()\">\n <template\n v-if=\"slots.avatar\"\n #before>\n <slot name=\"avatar\"/>\n </template>\n </FluxMenuItem>\n </template>\n\n <template v-if=\"slots.switcher\">\n <FluxPane>\n <slot name=\"switcher\"/>\n </FluxPane>\n </template>\n </FluxFlyout>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxFlyout, FluxMenuItem, FluxPane } from '@flux-ui/components';\n import type { FluxIconName } from '@flux-ui/types';\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n readonly imageAlt?: string;\n readonly imageSrc?: string;\n readonly label: string;\n }>();\n\n const slots = defineSlots<{\n avatar?(): VNode;\n switcher?(): VNode;\n }>();\n</script>\n","import { inject, onBeforeUnmount, onMounted, watch } from 'vue';\nimport { type FluxApplicationContextInfo, FluxApplicationInjectionKey } from '../data';\n\nexport default function (info: () => Omit<FluxApplicationContextInfo, 'id'>): void {\n const injection = inject(FluxApplicationInjectionKey, null);\n\n if (!injection) {\n return;\n }\n\n const id = Symbol('application-context');\n\n onMounted(() => {\n injection.pushContext({id, ...info()});\n });\n\n watch(info, next => {\n injection.removeContext(id);\n injection.pushContext({id, ...next});\n });\n\n onBeforeUnmount(() => {\n injection.removeContext(id);\n });\n}\n","<template>\n <div :class=\"$style.applicationMenuContext\">\n <FluxSecondaryButton\n icon-leading=\"angle-left\"\n size=\"small\"\n :tabindex=\"tabindex\"\n :href=\"canSlide ? undefined : href\"\n :rel=\"rel\"\n :target=\"target\"\n :to=\"canSlide ? undefined : to\"\n :type=\"canSlide ? 'button' : type\"\n @click=\"onBack\"/>\n\n <div :class=\"$style.applicationMenuContextContent\">\n <strong>{{ title }}</strong>\n <span v-if=\"subtitle\">{{ subtitle }}</span>\n </div>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxSecondaryButton } from '@flux-ui/components';\n import type { FluxPressableType, FluxTo } from '@flux-ui/types';\n import { computed, inject } from 'vue';\n import { matchedRouteKey } from 'vue-router';\n import { FluxApplicationInjectionKey } from '../data';\n import useApplicationContextRegistration from '../composable/useApplicationContextRegistration';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const props = defineProps<{\n readonly subtitle?: string;\n readonly title: string;\n readonly tabindex?: string | number;\n readonly href?: string;\n readonly rel?: string;\n readonly target?: string;\n readonly to?: FluxTo;\n readonly entryTo?: FluxTo;\n readonly type?: FluxPressableType;\n }>();\n\n const injection = inject(FluxApplicationInjectionKey, null);\n const matchedRoute = inject(matchedRouteKey, null);\n\n const canSlide = computed(() => {\n if (!injection) {\n return false;\n }\n return injection.viewIndex.value > 0;\n });\n\n const autoEntryTo = computed<FluxTo | undefined>(() => {\n const record = matchedRoute?.value;\n\n if (!record || typeof record.name !== 'string') {\n return undefined;\n }\n\n return {name: record.name};\n });\n\n function onBack(): void {\n if (canSlide.value && injection) {\n injection.goToParent();\n }\n }\n\n useApplicationContextRegistration(() => ({\n title: props.title,\n subtitle: props.subtitle,\n to: props.to,\n entryTo: props.entryTo ?? autoEntryTo.value,\n href: props.href,\n type: props.type\n }));\n</script>\n","<template>\n <div :class=\"$style.applicationMenuContext\">\n <FluxSecondaryButton\n icon-leading=\"angle-left\"\n size=\"small\"\n :tabindex=\"tabindex\"\n :href=\"canSlide ? undefined : href\"\n :rel=\"rel\"\n :target=\"target\"\n :to=\"canSlide ? undefined : to\"\n :type=\"canSlide ? 'button' : type\"\n @click=\"onBack\"/>\n\n <div :class=\"$style.applicationMenuContextContent\">\n <strong>{{ title }}</strong>\n <span v-if=\"subtitle\">{{ subtitle }}</span>\n </div>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxSecondaryButton } from '@flux-ui/components';\n import type { FluxPressableType, FluxTo } from '@flux-ui/types';\n import { computed, inject } from 'vue';\n import { matchedRouteKey } from 'vue-router';\n import { FluxApplicationInjectionKey } from '../data';\n import useApplicationContextRegistration from '../composable/useApplicationContextRegistration';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const props = defineProps<{\n readonly subtitle?: string;\n readonly title: string;\n readonly tabindex?: string | number;\n readonly href?: string;\n readonly rel?: string;\n readonly target?: string;\n readonly to?: FluxTo;\n readonly entryTo?: FluxTo;\n readonly type?: FluxPressableType;\n }>();\n\n const injection = inject(FluxApplicationInjectionKey, null);\n const matchedRoute = inject(matchedRouteKey, null);\n\n const canSlide = computed(() => {\n if (!injection) {\n return false;\n }\n return injection.viewIndex.value > 0;\n });\n\n const autoEntryTo = computed<FluxTo | undefined>(() => {\n const record = matchedRoute?.value;\n\n if (!record || typeof record.name !== 'string') {\n return undefined;\n }\n\n return {name: record.name};\n });\n\n function onBack(): void {\n if (canSlide.value && injection) {\n injection.goToParent();\n }\n }\n\n useApplicationContextRegistration(() => ({\n title: props.title,\n subtitle: props.subtitle,\n to: props.to,\n entryTo: props.entryTo ?? autoEntryTo.value,\n href: props.href,\n type: props.type\n }));\n</script>\n","<template>\n <TransitionGroup\n :enter-active-class=\"$style.applicationMenuPanelEnterActive\"\n :enter-from-class=\"$style.applicationMenuPanelEnterFrom\"\n :leave-active-class=\"$style.applicationMenuPanelLeaveActive\"\n :leave-to-class=\"$style.applicationMenuPanelLeaveTo\">\n <FluxMenu\n v-for=\"match in matches\"\n :key=\"match.record.path\"\n :class=\"$style.applicationMenuPanel\">\n <ScopedRouterView\n :depth=\"match.depth\"\n :view-name=\"name\"/>\n </FluxMenu>\n </TransitionGroup>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenu } from '@flux-ui/components';\n import { defineComponent, h, provide, ref, toRef, type VNode } from 'vue';\n import { RouterView, viewDepthKey } from 'vue-router';\n import useNamedRoutes from '../routing/useNamedRoutes';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const {\n name = 'menu'\n } = defineProps<{\n readonly name?: string;\n }>();\n\n const matches = useNamedRoutes(toRef(() => name));\n\n const ScopedRouterView = defineComponent({\n name: 'FluxApplicationMenuScopedRouterView',\n props: {\n depth: {\n type: Number,\n required: true\n },\n viewName: {\n type: String,\n required: true\n }\n },\n setup(props): () => VNode {\n provide(viewDepthKey, ref(props.depth));\n\n return () => h(RouterView, {name: props.viewName});\n }\n });\n</script>\n","<template>\n <TransitionGroup\n :enter-active-class=\"$style.applicationMenuPanelEnterActive\"\n :enter-from-class=\"$style.applicationMenuPanelEnterFrom\"\n :leave-active-class=\"$style.applicationMenuPanelLeaveActive\"\n :leave-to-class=\"$style.applicationMenuPanelLeaveTo\">\n <FluxMenu\n v-for=\"match in matches\"\n :key=\"match.record.path\"\n :class=\"$style.applicationMenuPanel\">\n <ScopedRouterView\n :depth=\"match.depth\"\n :view-name=\"name\"/>\n </FluxMenu>\n </TransitionGroup>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenu } from '@flux-ui/components';\n import { defineComponent, h, provide, ref, toRef, type VNode } from 'vue';\n import { RouterView, viewDepthKey } from 'vue-router';\n import useNamedRoutes from '../routing/useNamedRoutes';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const {\n name = 'menu'\n } = defineProps<{\n readonly name?: string;\n }>();\n\n const matches = useNamedRoutes(toRef(() => name));\n\n const ScopedRouterView = defineComponent({\n name: 'FluxApplicationMenuScopedRouterView',\n props: {\n depth: {\n type: Number,\n required: true\n },\n viewName: {\n type: String,\n required: true\n }\n },\n setup(props): () => VNode {\n provide(viewDepthKey, ref(props.depth));\n\n return () => h(RouterView, {name: props.viewName});\n }\n });\n</script>\n","<template>\n <div :class=\"$style.applicationMenuPromo\">\n <FluxIcon\n v-if=\"icon\"\n :name=\"icon\"/>\n\n <div :class=\"$style.applicationMenuPromoContent\">\n <slot/>\n </div>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxIcon } from '@flux-ui/components';\n import type { FluxIconName } from '@flux-ui/types';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n }>();\n</script>\n","<template>\n <div :class=\"$style.applicationMenuPromo\">\n <FluxIcon\n v-if=\"icon\"\n :name=\"icon\"/>\n\n <div :class=\"$style.applicationMenuPromoContent\">\n <slot/>\n </div>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxIcon } from '@flux-ui/components';\n import type { FluxIconName } from '@flux-ui/types';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n }>();\n</script>\n","<template>\n <FluxMenuItem\n :class=\"$style.applicationMenuToggle\"\n @click=\"isMenuCollapsed = !isMenuCollapsed\">\n <template #before>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 18 18\"\n :class=\"$style.applicationMenuToggleIcon\">\n <path\n fill-rule=\"evenodd\"\n d=\"M0 15V3a3 3 0 0 1 3-3h3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a3.04 3.04 0 0 1-3-3M2 3a1 1 0 0 1 1-1h2v14H3a1 1 0 0 1-1-1z\"\n clip-rule=\"evenodd\"/>\n\n <path d=\"M16 15V3a1 1 0 0 0-1-1h-5a1 1 0 0 1 0-2h5c1.63.04 3 1.33 3 3v12a3.07 3.07 0 0 1-3 3h-5a1 1 0 1 1 0-2h5a1 1 0 0 0 1-1\"/>\n </svg>\n </template>\n </FluxMenuItem>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenuItem } from '@flux-ui/components';\n import { useApplicationInjection } from '../composable';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const {isMenuCollapsed} = useApplicationInjection();\n</script>\n","<template>\n <FluxMenuItem\n :class=\"$style.applicationMenuToggle\"\n @click=\"isMenuCollapsed = !isMenuCollapsed\">\n <template #before>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 18 18\"\n :class=\"$style.applicationMenuToggleIcon\">\n <path\n fill-rule=\"evenodd\"\n d=\"M0 15V3a3 3 0 0 1 3-3h3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a3.04 3.04 0 0 1-3-3M2 3a1 1 0 0 1 1-1h2v14H3a1 1 0 0 1-1-1z\"\n clip-rule=\"evenodd\"/>\n\n <path d=\"M16 15V3a1 1 0 0 0-1-1h-5a1 1 0 0 1 0-2h5c1.63.04 3 1.33 3 3v12a3.07 3.07 0 0 1-3 3h-5a1 1 0 1 1 0-2h5a1 1 0 0 0 1-1\"/>\n </svg>\n </template>\n </FluxMenuItem>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenuItem } from '@flux-ui/components';\n import { useApplicationInjection } from '../composable';\n import $style from '../css/component/ApplicationMenu.module.scss';\n\n const {isMenuCollapsed} = useApplicationInjection();\n</script>\n","@use '$flux/css/mixin';\n\n.applicationSection {\n display: flex;\n flex-flow: column;\n gap: 21px;\n}\n\n.applicationSectionHeader {\n display: flex;\n align-items: center;\n flex-flow: row;\n gap: 21px;\n\n :global(h2) {\n flex-grow: 1;\n color: var(--foreground-prominent);\n }\n}\n\n.applicationSectionInfo {\n font-size: 14px;\n color: var(--foreground-secondary);\n}\n\n.applicationSectionContent {\n display: flex;\n flex-flow: column;\n flex-grow: 1;\n gap: 21px;\n}\n\n:local(.gridColumn) > .applicationSection {\n min-height: 100%;\n}\n\n@include mixin.breakpoint-down(md) {\n .applicationSectionHeader {\n align-items: flex-start;\n flex-flow: column;\n gap: 0;\n }\n}\n","<template>\n <section :class=\"$style.applicationSection\">\n <header\n v-if=\"title || info || slots.end\"\n :class=\"$style.applicationSectionHeader\">\n <h2 v-if=\"title\">\n {{ title }}\n </h2>\n\n <slot name=\"end\"/>\n\n <span\n v-if=\"info\"\n :class=\"$style.applicationSectionInfo\">\n {{ info }}\n </span>\n </header>\n\n <div :class=\"$style.applicationSectionContent\">\n <slot/>\n </div>\n </section>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationSection.module.scss';\n\n defineProps<{\n readonly title?: string;\n readonly info?: string;\n }>();\n\n const slots = defineSlots<{\n default(): VNode;\n end?(): VNode;\n }>();\n</script>\n","<template>\n <section :class=\"$style.applicationSection\">\n <header\n v-if=\"title || info || slots.end\"\n :class=\"$style.applicationSectionHeader\">\n <h2 v-if=\"title\">\n {{ title }}\n </h2>\n\n <slot name=\"end\"/>\n\n <span\n v-if=\"info\"\n :class=\"$style.applicationSectionInfo\">\n {{ info }}\n </span>\n </header>\n\n <div :class=\"$style.applicationSectionContent\">\n <slot/>\n </div>\n </section>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationSection.module.scss';\n\n defineProps<{\n readonly title?: string;\n readonly info?: string;\n }>();\n\n const slots = defineSlots<{\n default(): VNode;\n end?(): VNode;\n }>();\n</script>\n","@use '$flux/css/mixin';\n\n.applicationSide {\n position: fixed;\n display: flex;\n top: 0;\n right: 0;\n height: 100dvh;\n width: var(--application-side-width);\n flex-flow: column;\n background: var(--surface);\n border-left: 1px solid var(--surface-stroke);\n overflow: hidden;\n z-index: 500;\n}\n\n@include mixin.breakpoint-down(lg) {\n .applicationSide {\n display: none;\n }\n}\n","<template>\n <aside :class=\"$style.applicationSide\">\n <slot/>\n </aside>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationSide.module.scss';\n\n defineSlots<{\n default(): VNode;\n }>();\n</script>\n","<template>\n <aside :class=\"$style.applicationSide\">\n <slot/>\n </aside>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import type { VNode } from 'vue';\n import $style from '../css/component/ApplicationSide.module.scss';\n\n defineSlots<{\n default(): VNode;\n }>();\n</script>\n","@use '$flux/css/mixin';\n\n.applicationTop {\n position: sticky;\n top: 0;\n background: rgb(from var(--surface) r g b / .975);\n background-clip: padding-box;\n backdrop-filter: blur(3px) saturate(180%);\n border-bottom: 1px solid transparent;\n transition: 300ms var(--swift-out);\n transition-property: border-color, box-shadow;\n z-index: 400;\n}\n\n.applicationTopScrolled {\n composes: applicationTop;\n\n border-bottom-color: var(--surface-stroke-out);\n box-shadow: var(--shadow-lg);\n}\n\n.applicationTopBar {\n display: flex;\n height: var(--application-top-height);\n padding-left: 21px;\n padding-right: 21px;\n align-items: center;\n flex-flow: row;\n gap: 15px;\n color: var(--foreground-prominent);\n}\n\n.applicationTopBarTitle {\n font-size: 16px;\n font-weight: 700;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.applicationTopBar > :local(.separator) {\n height: 18px;\n}\n\n@include mixin.breakpoint-up(lg) {\n .applicationTopMenuToggleHidden {\n display: none;\n }\n}\n\n.applicationTopTabs {\n position: relative;\n display: flex;\n margin-top: -6px;\n margin-left: auto;\n margin-right: auto;\n flex-flow: row;\n gap: 21px;\n\n :local(.tabBar) {\n --tab-padding: 18px;\n\n width: 100%;\n box-shadow: unset;\n }\n}\n\n.applicationTopTabsDefault,\n.applicationTopTabsDashboard {\n composes: applicationTopTabs;\n\n width: min(1620px, 100% - 42px);\n}\n\n.applicationTopTabsFull {\n composes: applicationTopTabs;\n\n width: calc(100% - 42px);\n}\n\n.applicationTopTabsMedium {\n composes: applicationTopTabs;\n\n width: min(1280px, 100% - 42px);\n}\n\n.applicationTopTabsNarrow {\n composes: applicationTopTabs;\n\n width: min(840px, 100% - 42px);\n}\n\n@include mixin.breakpoint-down(md) {\n .applicationTop,\n .applicationTopScrolled {\n padding-top: env(safe-area-inset-top);\n }\n\n .applicationTopBar > :local(.icon) {\n display: none;\n }\n\n .applicationMenuToggle {\n margin-left: -12px;\n margin-right: -15px;\n }\n}\n\n.applicationTop:has(+ .applicationContentFull > :local(.table)) {\n border-bottom-color: var(--surface-stroke-out);\n}\n","<template>\n <header :class=\"y > 1 ? $style.applicationTopScrolled : $style.applicationTop\">\n <div :class=\"$style.applicationTopBar\">\n <FluxApplicationMenuToggle :class=\"!showDesktopMenuToggle && $style.applicationTopMenuToggleHidden\"/>\n\n <slot name=\"start\"/>\n\n <FluxFadeTransition>\n <FluxIcon\n v-if=\"icon\"\n :key=\"icon\"\n :name=\"icon\"/>\n </FluxFadeTransition>\n\n <FluxFadeTransition>\n <span\n v-if=\"title\"\n :key=\"title\"\n :class=\"$style.applicationTopBarTitle\">\n {{ title }}\n </span>\n </FluxFadeTransition>\n\n <FluxSpacer/>\n\n <slot name=\"end\"/>\n </div>\n\n <FluxRouteTransition>\n <div\n v-if=\"slots.tabs\"\n :class=\"clsx(\n layout === 'default' && $style.applicationTopTabsDefault,\n layout === 'dashboard' && $style.applicationTopTabsDashboard,\n layout === 'full' && $style.applicationTopTabsFull,\n layout === 'medium' && $style.applicationTopTabsMedium,\n layout === 'narrow' && $style.applicationTopTabsNarrow\n )\">\n <FluxTabBar>\n <slot name=\"tabs\"/>\n </FluxTabBar>\n </div>\n\n <div v-else/>\n </FluxRouteTransition>\n </header>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxFadeTransition, FluxIcon, FluxRouteTransition, FluxSpacer, FluxTabBar } from '@flux-ui/components';\n import { useScrollPosition } from '@flux-ui/internals';\n import type { FluxIconName } from '@flux-ui/types';\n import clsx from 'clsx';\n import type { VNode } from 'vue';\n import { useApplicationInjection } from '../composable';\n import FluxApplicationMenuToggle from './FluxApplicationMenuToggle.vue';\n import $style from '../css/component/ApplicationTop.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n readonly title?: string;\n }>();\n\n const slots = defineSlots<{\n end?(): VNode;\n start?(): VNode;\n tabs?(): VNode;\n }>();\n\n const {layout, showDesktopMenuToggle} = useApplicationInjection();\n const {y} = useScrollPosition();\n</script>\n","<template>\n <header :class=\"y > 1 ? $style.applicationTopScrolled : $style.applicationTop\">\n <div :class=\"$style.applicationTopBar\">\n <FluxApplicationMenuToggle :class=\"!showDesktopMenuToggle && $style.applicationTopMenuToggleHidden\"/>\n\n <slot name=\"start\"/>\n\n <FluxFadeTransition>\n <FluxIcon\n v-if=\"icon\"\n :key=\"icon\"\n :name=\"icon\"/>\n </FluxFadeTransition>\n\n <FluxFadeTransition>\n <span\n v-if=\"title\"\n :key=\"title\"\n :class=\"$style.applicationTopBarTitle\">\n {{ title }}\n </span>\n </FluxFadeTransition>\n\n <FluxSpacer/>\n\n <slot name=\"end\"/>\n </div>\n\n <FluxRouteTransition>\n <div\n v-if=\"slots.tabs\"\n :class=\"clsx(\n layout === 'default' && $style.applicationTopTabsDefault,\n layout === 'dashboard' && $style.applicationTopTabsDashboard,\n layout === 'full' && $style.applicationTopTabsFull,\n layout === 'medium' && $style.applicationTopTabsMedium,\n layout === 'narrow' && $style.applicationTopTabsNarrow\n )\">\n <FluxTabBar>\n <slot name=\"tabs\"/>\n </FluxTabBar>\n </div>\n\n <div v-else/>\n </FluxRouteTransition>\n </header>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxFadeTransition, FluxIcon, FluxRouteTransition, FluxSpacer, FluxTabBar } from '@flux-ui/components';\n import { useScrollPosition } from '@flux-ui/internals';\n import type { FluxIconName } from '@flux-ui/types';\n import clsx from 'clsx';\n import type { VNode } from 'vue';\n import { useApplicationInjection } from '../composable';\n import FluxApplicationMenuToggle from './FluxApplicationMenuToggle.vue';\n import $style from '../css/component/ApplicationTop.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n readonly title?: string;\n }>();\n\n const slots = defineSlots<{\n end?(): VNode;\n start?(): VNode;\n tabs?(): VNode;\n }>();\n\n const {layout, showDesktopMenuToggle} = useApplicationInjection();\n const {y} = useScrollPosition();\n</script>\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,142],"mappings":";;;;AAAw+F,SAASA,IAAE,GAAE;CAAC,IAAI,IAAE,EAAE;AAAC,IAAE;AAAC,MAAG,EAAE,SAAO,GAAG;AAAM,OAAI,IAAG,CAAC,GAAE,MAAK,OAAO,QAAQ,OAAO,0BAA0B,EAAE,UAAU,CAAC,CAAC;GAAC;GAAc;GAAQ;GAAS,CAAC,SAAS,EAAE,IAAE,CAAC,EAAE,OAAK,CAAC,EAAE,QAAM,EAAE,KAAG;UAAS,IAAE,OAAO,eAAe,EAAE;AAAE,QAAO;;AAAupV,SAASC,IAAE,GAAE,GAAE,GAAE;AAAC,GAAE,UAAU,KAAG;;AAAE,SAASC,IAAE,GAAE,GAAE,GAAE;AAAC,QAAO,eAAe,GAAE,GAAE,EAAC,OAAM,GAAE,CAAC;;;;ACAp8b,IAAM,eAAe,OAAO,QAAQ;AACnC,KAAI,OAAO,UAAU,SAAU;AAG/B,KAAI,QAAQ,EACX,QAAO;EACN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