react-modern-audio-player 0.0.2 → 1.0.1
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/LICENSE +21 -0
- package/README.md +300 -0
- package/dist/index.cjs +129 -112
- package/dist/index.css +1 -1
- package/dist/index.es.js +858 -3523
- package/dist/types/components/AudioPlayer/Context/StateContext/placement.d.ts +2 -3
- package/dist/types/components/AudioPlayer/Interface/Controller/Button/PrevNnextBtn.d.ts +1 -0
- package/dist/types/components/AudioPlayer/Interface/Controller/Button/VolumeTriggerBtn.d.ts +1 -0
- package/dist/types/components/AudioPlayer/Interface/Controller/Button/index.d.ts +1 -0
- package/dist/types/components/AudioPlayer/Interface/Controller/Tooltip/Volume/Content.d.ts +3 -3
- package/dist/types/components/AudioPlayer/Player.d.ts +5 -3
- package/dist/types/components/Drawer/Drawer.d.ts +2 -5
- package/dist/types/components/Drawer/DrawerContent.d.ts +2 -3
- package/dist/types/components/Dropdown/Dropdown.d.ts +18 -0
- package/dist/types/components/Dropdown/DropdownContent.d.ts +10 -0
- package/dist/types/components/Dropdown/DropdownContext.d.ts +8 -0
- package/dist/types/components/Dropdown/DropdownTrigger.d.ts +2 -0
- package/dist/types/components/Dropdown/index.d.ts +3 -0
- package/dist/types/components/Dropdown/useDropdown.d.ts +9 -0
- package/dist/types/components/Grid/Item.d.ts +7 -2
- package/dist/types/hooks/useClickOutside.d.ts +3 -0
- package/dist/types/utils/generateGridTemplateValues.d.ts +1 -1
- package/package.json +4 -11
- package/dist/types/components/AudioPlayer/Interface/Controller/Tooltip/Volume/Trigger.d.ts +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var $=require("react"),$f=require("react-dom"),Me=require("styled-components");function Yo(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var k=Yo($),Nr=Yo($f),me=Yo(Me);function Al(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=Al(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Dr(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Al(e))&&(n&&(n+=" "),n+=t);return n}function Jo(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Qo={};Jo(Qo,"SSRProvider",()=>xf);Jo(Qo,"useSSRSafeId",()=>Cl);Jo(Qo,"useIsSSR",()=>Bt);const Br={prefix:String(Math.round(Math.random()*1e10)),current:0},Sr=k.default.createContext(Br);function xf(e){let t=$.useContext(Sr),r=$.useMemo(()=>({prefix:t===Br?"":`${t.prefix}-${++t.current}`,current:0}),[t]);return k.default.createElement(Sr.Provider,{value:r},e.children)}let Ef=Boolean(typeof window!="undefined"&&window.document&&window.document.createElement);function Cl(e){let t=$.useContext(Sr);return t===Br&&!Ef&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."),$.useMemo(()=>e||`react-aria${t.prefix}-${++t.current}`,[e])}function Bt(){let t=$.useContext(Sr)!==Br,[r,n]=$.useState(t);return typeof window!="undefined"&&t&&$.useLayoutEffect(()=>{n(!1)},[]),r}var Nn=function(e,t){return Nn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},Nn(e,t)};function Hr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Nn(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var ne=function(){return ne=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},ne.apply(this,arguments)};function cn(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var Z;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Z||(Z={}));var ue;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(ue||(ue={}));var Mt;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Mt||(Mt={}));function Hs(e){return e.type===ue.literal}function Pf(e){return e.type===ue.argument}function _l(e){return e.type===ue.number}function kl(e){return e.type===ue.date}function Ol(e){return e.type===ue.time}function Il(e){return e.type===ue.select}function Rl(e){return e.type===ue.plural}function wf(e){return e.type===ue.pound}function Ml(e){return e.type===ue.tag}function Ll(e){return!!(e&&typeof e=="object"&&e.type===Mt.number)}function Dn(e){return!!(e&&typeof e=="object"&&e.type===Mt.dateTime)}var Nl=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Tf=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Sf(e){var t={};return e.replace(Tf,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"short":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var Af=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Cf(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Af).filter(function(v){return v.length>0}),r=[],n=0,a=t;n<a.length;n++){var i=a[n],s=i.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],l=s.slice(1),u=0,f=l;u<f.length;u++){var g=f[u];if(g.length===0)throw new Error("Invalid number skeleton")}r.push({stem:o,options:l})}return r}function _f(e){return e.replace(/^(.*?)-/,"")}var Fs=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Dl=/^(@+)?(\+|#+)?[rs]?$/g,kf=/(\*)(0+)|(#+)(0+)|(0+)/g,Bl=/^(0+)$/;function Us(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Dl,function(r,n,a){return typeof a!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):a==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof a=="string"?a.length:0)),""}),t}function Hl(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Of(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Bl.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Ws(e){var t={},r=Hl(e);return r||t}function If(e){for(var t={},r=0,n=e;r<n.length;r++){var a=n[r];switch(a.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=a.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=_f(a.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=ne(ne(ne({},t),{notation:"scientific"}),a.options.reduce(function(l,u){return ne(ne({},l),Ws(u))},{}));continue;case"engineering":t=ne(ne(ne({},t),{notation:"engineering"}),a.options.reduce(function(l,u){return ne(ne({},l),Ws(u))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(a.options[0]);continue;case"integer-width":if(a.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(kf,function(l,u,f,g,v,b){if(u)t.minimumIntegerDigits=f.length;else{if(g&&v)throw new Error("We currently do not support maximum integer digits");if(b)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Bl.test(a.stem)){t.minimumIntegerDigits=a.stem.length;continue}if(Fs.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(Fs,function(l,u,f,g,v,b){return f==="*"?t.minimumFractionDigits=u.length:g&&g[0]==="#"?t.maximumFractionDigits=g.length:v&&b?(t.minimumFractionDigits=v.length,t.maximumFractionDigits=v.length+b.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var i=a.options[0];i==="w"?t=ne(ne({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=ne(ne({},t),Us(i)));continue}if(Dl.test(a.stem)){t=ne(ne({},t),Us(a.stem));continue}var s=Hl(a.stem);s&&(t=ne(ne({},t),s));var o=Of(a.stem);o&&(t=ne(ne({},t),o))}return t}var mr={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function Rf(e,t){for(var r="",n=0;n<e.length;n++){var a=e.charAt(n);if(a==="j"){for(var i=0;n+1<e.length&&e.charAt(n+1)===a;)i++,n++;var s=1+(i&1),o=i<2?1:3+(i>>1),l="a",u=Mf(t);for((u=="H"||u=="k")&&(o=0);o-- >0;)r+=l;for(;s-- >0;)r=u+r}else a==="J"?r+="H":r+=a}return r}function Mf(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var a=mr[n||""]||mr[r||""]||mr["".concat(r,"-001")]||mr["001"];return a[0]}var fn,Lf=new RegExp("^".concat(Nl.source,"*")),Nf=new RegExp("".concat(Nl.source,"*$"));function ee(e,t){return{start:e,end:t}}var Df=!!String.prototype.startsWith,Bf=!!String.fromCodePoint,Hf=!!Object.fromEntries,Ff=!!String.prototype.codePointAt,Uf=!!String.prototype.trimStart,Wf=!!String.prototype.trimEnd,Vf=!!Number.isSafeInteger,jf=Vf?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Bn=!0;try{var Gf=Ul("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Bn=((fn=Gf.exec("a"))===null||fn===void 0?void 0:fn[0])==="a"}catch{Bn=!1}var Vs=Df?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Hn=Bf?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",a=t.length,i=0,s;a>i;){if(s=t[i++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},js=Hf?Object.fromEntries:function(t){for(var r={},n=0,a=t;n<a.length;n++){var i=a[n],s=i[0],o=i[1];r[s]=o}return r},Fl=Ff?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var a=t.charCodeAt(r),i;return a<55296||a>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?a:(a-55296<<10)+(i-56320)+65536}},zf=Uf?function(t){return t.trimStart()}:function(t){return t.replace(Lf,"")},Xf=Wf?function(t){return t.trimEnd()}:function(t){return t.replace(Nf,"")};function Ul(e,t){return new RegExp(e,t)}var Fn;if(Bn){var Gs=Ul("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Fn=function(t,r){var n;Gs.lastIndex=r;var a=Gs.exec(t);return(n=a[1])!==null&&n!==void 0?n:""}}else Fn=function(t,r){for(var n=[];;){var a=Fl(t,r);if(a===void 0||Wl(a)||Jf(a))break;n.push(a),r+=a>=65536?2:1}return Hn.apply(void 0,n)};var Kf=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var a=[];!this.isEOF();){var i=this.char();if(i===123){var s=this.parseArgument(t,n);if(s.err)return s;a.push(s.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var o=this.clonePosition();this.bump(),a.push({type:ue.pound,location:ee(o,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(Z.UNMATCHED_CLOSING_TAG,ee(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Un(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;a.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;a.push(s.val)}}}return{val:a,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:ue.literal,value:"<".concat(a,"/>"),location:ee(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var s=i.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Un(this.char()))return this.error(Z.INVALID_TAG,ee(o,this.clonePosition()));var l=this.clonePosition(),u=this.parseTagName();return a!==u?this.error(Z.UNMATCHED_CLOSING_TAG,ee(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ue.tag,value:a,children:s,location:ee(n,this.clonePosition())},err:null}:this.error(Z.INVALID_TAG,ee(o,this.clonePosition())))}else return this.error(Z.UNCLOSED_TAG,ee(n,this.clonePosition()))}else return this.error(Z.INVALID_TAG,ee(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Yf(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),a="";;){var i=this.tryParseQuote(r);if(i){a+=i;continue}var s=this.tryParseUnquoted(t,r);if(s){a+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){a+=o;continue}break}var l=ee(n,this.clonePosition());return{val:{type:ue.literal,value:a,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!qf(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Hn.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Hn(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Z.EXPECT_ARGUMENT_CLOSING_BRACE,ee(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Z.EMPTY_ARGUMENT,ee(n,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(Z.MALFORMED_ARGUMENT,ee(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Z.EXPECT_ARGUMENT_CLOSING_BRACE,ee(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:ue.argument,value:a,location:ee(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Z.EXPECT_ARGUMENT_CLOSING_BRACE,ee(n,this.clonePosition())):this.parseArgumentOptions(t,r,a,n);default:return this.error(Z.MALFORMED_ARGUMENT,ee(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Fn(this.message,r),a=r+n.length;this.bumpTo(a);var i=this.clonePosition(),s=ee(t,i);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,a){var i,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(o){case"":return this.error(Z.EXPECT_ARGUMENT_TYPE,ee(s,l));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),g=this.parseSimpleArgStyleIfPossible();if(g.err)return g;var v=Xf(g.val);if(v.length===0)return this.error(Z.EXPECT_ARGUMENT_STYLE,ee(this.clonePosition(),this.clonePosition()));var b=ee(f,this.clonePosition());u={style:v,styleLocation:b}}var w=this.tryParseArgumentClose(a);if(w.err)return w;var T=ee(a,this.clonePosition());if(u&&Vs(u==null?void 0:u.style,"::",0)){var _=zf(u.style.slice(2));if(o==="number"){var g=this.parseNumberSkeletonFromString(_,u.styleLocation);return g.err?g:{val:{type:ue.number,value:n,location:T,style:g.val},err:null}}else{if(_.length===0)return this.error(Z.EXPECT_DATE_TIME_SKELETON,T);var A=_;this.locale&&(A=Rf(_,this.locale));var v={type:Mt.dateTime,pattern:A,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Sf(A):{}},S=o==="date"?ue.date:ue.time;return{val:{type:S,value:n,location:T,style:v},err:null}}}return{val:{type:o==="number"?ue.number:o==="date"?ue.date:ue.time,value:n,location:T,style:(i=u==null?void 0:u.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var O=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Z.EXPECT_SELECT_ARGUMENT_OPTIONS,ee(O,ne({},O)));this.bumpSpace();var y=this.parseIdentifierIfPossible(),H=0;if(o!=="select"&&y.value==="offset"){if(!this.bumpIf(":"))return this.error(Z.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ee(this.clonePosition(),this.clonePosition()));this.bumpSpace();var g=this.tryParseDecimalInteger(Z.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Z.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(g.err)return g;this.bumpSpace(),y=this.parseIdentifierIfPossible(),H=g.val}var M=this.tryParsePluralOrSelectOptions(t,o,r,y);if(M.err)return M;var w=this.tryParseArgumentClose(a);if(w.err)return w;var D=ee(a,this.clonePosition());return o==="select"?{val:{type:ue.select,value:n,options:js(M.val),location:D},err:null}:{val:{type:ue.plural,value:n,options:js(M.val),offset:H,pluralType:o==="plural"?"cardinal":"ordinal",location:D},err:null}}default:return this.error(Z.INVALID_ARGUMENT_TYPE,ee(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(Z.EXPECT_ARGUMENT_CLOSING_BRACE,ee(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Z.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ee(a,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=Cf(t)}catch{return this.error(Z.INVALID_NUMBER_SKELETON,r)}return{val:{type:Mt.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?If(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,a){for(var i,s=!1,o=[],l=new Set,u=a.value,f=a.location;;){if(u.length===0){var g=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var v=this.tryParseDecimalInteger(Z.EXPECT_PLURAL_ARGUMENT_SELECTOR,Z.INVALID_PLURAL_ARGUMENT_SELECTOR);if(v.err)return v;f=ee(g,this.clonePosition()),u=this.message.slice(g.offset,this.offset())}else break}if(l.has(u))return this.error(r==="select"?Z.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Z.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);u==="other"&&(s=!0),this.bumpSpace();var b=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?Z.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Z.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,ee(this.clonePosition(),this.clonePosition()));var w=this.parseMessage(t+1,r,n);if(w.err)return w;var T=this.tryParseArgumentClose(b);if(T.err)return T;o.push([u,{value:w.val,location:ee(b,this.clonePosition())}]),l.add(u),this.bumpSpace(),i=this.parseIdentifierIfPossible(),u=i.value,f=i.location}return o.length===0?this.error(r==="select"?Z.EXPECT_SELECT_ARGUMENT_SELECTOR:Z.EXPECT_PLURAL_ARGUMENT_SELECTOR,ee(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(Z.MISSING_OTHER_CLAUSE,ee(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)i=!0,s=s*10+(o-48),this.bump();else break}var l=ee(a,this.clonePosition());return i?(s*=n,jf(s)?{val:s,err:null}:this.error(r,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=Fl(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Vs(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Wl(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n!=null?n:null},e}();function Un(e){return e>=97&&e<=122||e>=65&&e<=90}function qf(e){return Un(e)||e===47}function Yf(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Wl(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Jf(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Wn(e){e.forEach(function(t){if(delete t.location,Il(t)||Rl(t))for(var r in t.options)delete t.options[r].location,Wn(t.options[r].value);else _l(t)&&Ll(t.style)||(kl(t)||Ol(t))&&Dn(t.style)?delete t.style.location:Ml(t)&&Wn(t.children)})}function Qf(e,t){t===void 0&&(t={}),t=ne({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Kf(e,t).parse();if(r.err){var n=SyntaxError(Z[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||Wn(r.val),r.val}function dn(e,t){var r=t&&t.cache?t.cache:ad,n=t&&t.serializer?t.serializer:nd,a=t&&t.strategy?t.strategy:ed;return a(e,{cache:r,serializer:n})}function Zf(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Vl(e,t,r,n){var a=Zf(n)?n:r(n),i=t.get(a);return typeof i=="undefined"&&(i=e.call(this,n),t.set(a,i)),i}function jl(e,t,r){var n=Array.prototype.slice.call(arguments,3),a=r(n),i=t.get(a);return typeof i=="undefined"&&(i=e.apply(this,n),t.set(a,i)),i}function Zo(e,t,r,n,a){return r.bind(t,e,n,a)}function ed(e,t){var r=e.length===1?Vl:jl;return Zo(e,this,r,t.cache.create(),t.serializer)}function td(e,t){return Zo(e,this,jl,t.cache.create(),t.serializer)}function rd(e,t){return Zo(e,this,Vl,t.cache.create(),t.serializer)}var nd=function(){return JSON.stringify(arguments)};function es(){this.cache=Object.create(null)}es.prototype.get=function(e){return this.cache[e]};es.prototype.set=function(e,t){this.cache[e]=t};var ad={create:function(){return new es}},pn={variadic:td,monadic:rd},Lt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Lt||(Lt={}));var Fr=function(e){Hr(t,e);function t(r,n,a){var i=e.call(this,r)||this;return i.code=n,i.originalMessage=a,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),zs=function(e){Hr(t,e);function t(r,n,a,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(a).join('", "'),'"'),Lt.INVALID_VALUE,i)||this}return t}(Fr),id=function(e){Hr(t,e);function t(r,n,a){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Lt.INVALID_VALUE,a)||this}return t}(Fr),od=function(e){Hr(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),Lt.MISSING_VALUE,n)||this}return t}(Fr),$e;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})($e||($e={}));function sd(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==$e.literal||r.type!==$e.literal?t.push(r):n.value+=r.value,t},[])}function ld(e){return typeof e=="function"}function wr(e,t,r,n,a,i,s){if(e.length===1&&Hs(e[0]))return[{type:$e.literal,value:e[0].value}];for(var o=[],l=0,u=e;l<u.length;l++){var f=u[l];if(Hs(f)){o.push({type:$e.literal,value:f.value});continue}if(wf(f)){typeof i=="number"&&o.push({type:$e.literal,value:r.getNumberFormat(t).format(i)});continue}var g=f.value;if(!(a&&g in a))throw new od(g,s);var v=a[g];if(Pf(f)){(!v||typeof v=="string"||typeof v=="number")&&(v=typeof v=="string"||typeof v=="number"?String(v):""),o.push({type:typeof v=="string"?$e.literal:$e.object,value:v});continue}if(kl(f)){var b=typeof f.style=="string"?n.date[f.style]:Dn(f.style)?f.style.parsedOptions:void 0;o.push({type:$e.literal,value:r.getDateTimeFormat(t,b).format(v)});continue}if(Ol(f)){var b=typeof f.style=="string"?n.time[f.style]:Dn(f.style)?f.style.parsedOptions:n.time.medium;o.push({type:$e.literal,value:r.getDateTimeFormat(t,b).format(v)});continue}if(_l(f)){var b=typeof f.style=="string"?n.number[f.style]:Ll(f.style)?f.style.parsedOptions:void 0;b&&b.scale&&(v=v*(b.scale||1)),o.push({type:$e.literal,value:r.getNumberFormat(t,b).format(v)});continue}if(Ml(f)){var w=f.children,T=f.value,_=a[T];if(!ld(_))throw new id(T,"function",s);var A=wr(w,t,r,n,a,i),S=_(A.map(function(H){return H.value}));Array.isArray(S)||(S=[S]),o.push.apply(o,S.map(function(H){return{type:typeof H=="string"?$e.literal:$e.object,value:H}}))}if(Il(f)){var O=f.options[v]||f.options.other;if(!O)throw new zs(f.value,v,Object.keys(f.options),s);o.push.apply(o,wr(O.value,t,r,n,a));continue}if(Rl(f)){var O=f.options["=".concat(v)];if(!O){if(!Intl.PluralRules)throw new Fr(`Intl.PluralRules is not available in this environment.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var P=require("react"),Vo=require("react-dom"),be=require("styled-components");function mn(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var W=mn(P),xa=mn(Vo),ae=mn(be);function Aa(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=Aa(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function vn(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Aa(e))&&(n&&(n+=" "),n+=t);return n}function gn(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var bn={};gn(bn,"SSRProvider",()=>Uo);gn(bn,"useSSRSafeId",()=>Ta);gn(bn,"useIsSSR",()=>at);const Xt={prefix:String(Math.round(Math.random()*1e10)),current:0},Dt=W.default.createContext(Xt);function Uo(e){let t=P.useContext(Dt),r=P.useMemo(()=>({prefix:t===Xt?"":`${t.prefix}-${++t.current}`,current:0}),[t]);return W.default.createElement(Dt.Provider,{value:r},e.children)}let jo=Boolean(typeof window!="undefined"&&window.document&&window.document.createElement);function Ta(e){let t=P.useContext(Dt);return t===Xt&&!jo&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."),P.useMemo(()=>e||`react-aria${t.prefix}-${++t.current}`,[e])}function at(){let t=P.useContext(Dt)!==Xt,[r,n]=P.useState(t);return typeof window!="undefined"&&t&&P.useLayoutEffect(()=>{n(!1)},[]),r}var Rr=function(e,t){return Rr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},Rr(e,t)};function Kt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Rr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var J=function(){return J=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},J.apply(this,arguments)};function dr(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var X;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(X||(X={}));var te;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(te||(te={}));var rt;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(rt||(rt={}));function zn(e){return e.type===te.literal}function Go(e){return e.type===te.argument}function Ca(e){return e.type===te.number}function Sa(e){return e.type===te.date}function ka(e){return e.type===te.time}function Oa(e){return e.type===te.select}function Ra(e){return e.type===te.plural}function zo(e){return e.type===te.pound}function _a(e){return e.type===te.tag}function Ma(e){return!!(e&&typeof e=="object"&&e.type===rt.number)}function _r(e){return!!(e&&typeof e=="object"&&e.type===rt.dateTime)}var La=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Xo=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Ko(e){var t={};return e.replace(Xo,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"short":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var Yo=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function qo(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Yo).filter(function(b){return b.length>0}),r=[],n=0,a=t;n<a.length;n++){var i=a[n],s=i.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],l=s.slice(1),h=0,p=l;h<p.length;h++){var w=p[h];if(w.length===0)throw new Error("Invalid number skeleton")}r.push({stem:o,options:l})}return r}function Jo(e){return e.replace(/^(.*?)-/,"")}var Xn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Ia=/^(@+)?(\+|#+)?[rs]?$/g,Qo=/(\*)(0+)|(#+)(0+)|(0+)/g,Na=/^(0+)$/;function Kn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Ia,function(r,n,a){return typeof a!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):a==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof a=="string"?a.length:0)),""}),t}function Da(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Zo(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Na.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Yn(e){var t={},r=Da(e);return r||t}function es(e){for(var t={},r=0,n=e;r<n.length;r++){var a=n[r];switch(a.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=a.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Jo(a.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=J(J(J({},t),{notation:"scientific"}),a.options.reduce(function(l,h){return J(J({},l),Yn(h))},{}));continue;case"engineering":t=J(J(J({},t),{notation:"engineering"}),a.options.reduce(function(l,h){return J(J({},l),Yn(h))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(a.options[0]);continue;case"integer-width":if(a.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(Qo,function(l,h,p,w,b,v){if(h)t.minimumIntegerDigits=p.length;else{if(w&&b)throw new Error("We currently do not support maximum integer digits");if(v)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Na.test(a.stem)){t.minimumIntegerDigits=a.stem.length;continue}if(Xn.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(Xn,function(l,h,p,w,b,v){return p==="*"?t.minimumFractionDigits=h.length:w&&w[0]==="#"?t.maximumFractionDigits=w.length:b&&v?(t.minimumFractionDigits=b.length,t.maximumFractionDigits=b.length+v.length):(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length),""});var i=a.options[0];i==="w"?t=J(J({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=J(J({},t),Kn(i)));continue}if(Ia.test(a.stem)){t=J(J({},t),Kn(a.stem));continue}var s=Da(a.stem);s&&(t=J(J({},t),s));var o=Zo(a.stem);o&&(t=J(J({},t),o))}return t}var Ct={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function ts(e,t){for(var r="",n=0;n<e.length;n++){var a=e.charAt(n);if(a==="j"){for(var i=0;n+1<e.length&&e.charAt(n+1)===a;)i++,n++;var s=1+(i&1),o=i<2?1:3+(i>>1),l="a",h=rs(t);for((h=="H"||h=="k")&&(o=0);o-- >0;)r+=l;for(;s-- >0;)r=h+r}else a==="J"?r+="H":r+=a}return r}function rs(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var a=Ct[n||""]||Ct[r||""]||Ct["".concat(r,"-001")]||Ct["001"];return a[0]}var hr,ns=new RegExp("^".concat(La.source,"*")),as=new RegExp("".concat(La.source,"*$"));function K(e,t){return{start:e,end:t}}var is=!!String.prototype.startsWith,os=!!String.fromCodePoint,ss=!!Object.fromEntries,ls=!!String.prototype.codePointAt,us=!!String.prototype.trimStart,cs=!!String.prototype.trimEnd,fs=!!Number.isSafeInteger,ds=fs?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Mr=!0;try{var hs=Ha("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Mr=((hr=hs.exec("a"))===null||hr===void 0?void 0:hr[0])==="a"}catch{Mr=!1}var qn=is?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Lr=os?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",a=t.length,i=0,s;a>i;){if(s=t[i++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},Jn=ss?Object.fromEntries:function(t){for(var r={},n=0,a=t;n<a.length;n++){var i=a[n],s=i[0],o=i[1];r[s]=o}return r},Ba=ls?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var a=t.charCodeAt(r),i;return a<55296||a>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?a:(a-55296<<10)+(i-56320)+65536}},ps=us?function(t){return t.trimStart()}:function(t){return t.replace(ns,"")},ms=cs?function(t){return t.trimEnd()}:function(t){return t.replace(as,"")};function Ha(e,t){return new RegExp(e,t)}var Ir;if(Mr){var Qn=Ha("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ir=function(t,r){var n;Qn.lastIndex=r;var a=Qn.exec(t);return(n=a[1])!==null&&n!==void 0?n:""}}else Ir=function(t,r){for(var n=[];;){var a=Ba(t,r);if(a===void 0||Fa(a)||ys(a))break;n.push(a),r+=a>=65536?2:1}return Lr.apply(void 0,n)};var vs=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var a=[];!this.isEOF();){var i=this.char();if(i===123){var s=this.parseArgument(t,n);if(s.err)return s;a.push(s.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var o=this.clonePosition();this.bump(),a.push({type:te.pound,location:K(o,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(X.UNMATCHED_CLOSING_TAG,K(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Nr(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;a.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;a.push(s.val)}}}return{val:a,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:te.literal,value:"<".concat(a,"/>"),location:K(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var s=i.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Nr(this.char()))return this.error(X.INVALID_TAG,K(o,this.clonePosition()));var l=this.clonePosition(),h=this.parseTagName();return a!==h?this.error(X.UNMATCHED_CLOSING_TAG,K(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:te.tag,value:a,children:s,location:K(n,this.clonePosition())},err:null}:this.error(X.INVALID_TAG,K(o,this.clonePosition())))}else return this.error(X.UNCLOSED_TAG,K(n,this.clonePosition()))}else return this.error(X.INVALID_TAG,K(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&bs(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),a="";;){var i=this.tryParseQuote(r);if(i){a+=i;continue}var s=this.tryParseUnquoted(t,r);if(s){a+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){a+=o;continue}break}var l=K(n,this.clonePosition());return{val:{type:te.literal,value:a,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!gs(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Lr.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Lr(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,K(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(X.EMPTY_ARGUMENT,K(n,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(X.MALFORMED_ARGUMENT,K(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,K(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:te.argument,value:a,location:K(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,K(n,this.clonePosition())):this.parseArgumentOptions(t,r,a,n);default:return this.error(X.MALFORMED_ARGUMENT,K(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Ir(this.message,r),a=r+n.length;this.bumpTo(a);var i=this.clonePosition(),s=K(t,i);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,a){var i,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(o){case"":return this.error(X.EXPECT_ARGUMENT_TYPE,K(s,l));case"number":case"date":case"time":{this.bumpSpace();var h=null;if(this.bumpIf(",")){this.bumpSpace();var p=this.clonePosition(),w=this.parseSimpleArgStyleIfPossible();if(w.err)return w;var b=ms(w.val);if(b.length===0)return this.error(X.EXPECT_ARGUMENT_STYLE,K(this.clonePosition(),this.clonePosition()));var v=K(p,this.clonePosition());h={style:b,styleLocation:v}}var x=this.tryParseArgumentClose(a);if(x.err)return x;var A=K(a,this.clonePosition());if(h&&qn(h==null?void 0:h.style,"::",0)){var k=ps(h.style.slice(2));if(o==="number"){var w=this.parseNumberSkeletonFromString(k,h.styleLocation);return w.err?w:{val:{type:te.number,value:n,location:A,style:w.val},err:null}}else{if(k.length===0)return this.error(X.EXPECT_DATE_TIME_SKELETON,A);var C=k;this.locale&&(C=ts(k,this.locale));var b={type:rt.dateTime,pattern:C,location:h.styleLocation,parsedOptions:this.shouldParseSkeletons?Ko(C):{}},S=o==="date"?te.date:te.time;return{val:{type:S,value:n,location:A,style:b},err:null}}}return{val:{type:o==="number"?te.number:o==="date"?te.date:te.time,value:n,location:A,style:(i=h==null?void 0:h.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var O=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(X.EXPECT_SELECT_ARGUMENT_OPTIONS,K(O,J({},O)));this.bumpSpace();var g=this.parseIdentifierIfPossible(),D=0;if(o!=="select"&&g.value==="offset"){if(!this.bumpIf(":"))return this.error(X.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,K(this.clonePosition(),this.clonePosition()));this.bumpSpace();var w=this.tryParseDecimalInteger(X.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,X.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(w.err)return w;this.bumpSpace(),g=this.parseIdentifierIfPossible(),D=w.val}var M=this.tryParsePluralOrSelectOptions(t,o,r,g);if(M.err)return M;var x=this.tryParseArgumentClose(a);if(x.err)return x;var N=K(a,this.clonePosition());return o==="select"?{val:{type:te.select,value:n,options:Jn(M.val),location:N},err:null}:{val:{type:te.plural,value:n,options:Jn(M.val),offset:D,pluralType:o==="plural"?"cardinal":"ordinal",location:N},err:null}}default:return this.error(X.INVALID_ARGUMENT_TYPE,K(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,K(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(X.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,K(a,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=qo(t)}catch{return this.error(X.INVALID_NUMBER_SKELETON,r)}return{val:{type:rt.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?es(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,a){for(var i,s=!1,o=[],l=new Set,h=a.value,p=a.location;;){if(h.length===0){var w=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var b=this.tryParseDecimalInteger(X.EXPECT_PLURAL_ARGUMENT_SELECTOR,X.INVALID_PLURAL_ARGUMENT_SELECTOR);if(b.err)return b;p=K(w,this.clonePosition()),h=this.message.slice(w.offset,this.offset())}else break}if(l.has(h))return this.error(r==="select"?X.DUPLICATE_SELECT_ARGUMENT_SELECTOR:X.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,p);h==="other"&&(s=!0),this.bumpSpace();var v=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?X.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:X.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,K(this.clonePosition(),this.clonePosition()));var x=this.parseMessage(t+1,r,n);if(x.err)return x;var A=this.tryParseArgumentClose(v);if(A.err)return A;o.push([h,{value:x.val,location:K(v,this.clonePosition())}]),l.add(h),this.bumpSpace(),i=this.parseIdentifierIfPossible(),h=i.value,p=i.location}return o.length===0?this.error(r==="select"?X.EXPECT_SELECT_ARGUMENT_SELECTOR:X.EXPECT_PLURAL_ARGUMENT_SELECTOR,K(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(X.MISSING_OTHER_CLAUSE,K(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)i=!0,s=s*10+(o-48),this.bump();else break}var l=K(a,this.clonePosition());return i?(s*=n,ds(s)?{val:s,err:null}:this.error(r,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=Ba(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(qn(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Fa(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n!=null?n:null},e}();function Nr(e){return e>=97&&e<=122||e>=65&&e<=90}function gs(e){return Nr(e)||e===47}function bs(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Fa(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ys(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Dr(e){e.forEach(function(t){if(delete t.location,Oa(t)||Ra(t))for(var r in t.options)delete t.options[r].location,Dr(t.options[r].value);else Ca(t)&&Ma(t.style)||(Sa(t)||ka(t))&&_r(t.style)?delete t.style.location:_a(t)&&Dr(t.children)})}function $s(e,t){t===void 0&&(t={}),t=J({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new vs(e,t).parse();if(r.err){var n=SyntaxError(X[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||Dr(r.val),r.val}function pr(e,t){var r=t&&t.cache?t.cache:Ts,n=t&&t.serializer?t.serializer:As,a=t&&t.strategy?t.strategy:Es;return a(e,{cache:r,serializer:n})}function ws(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Wa(e,t,r,n){var a=ws(n)?n:r(n),i=t.get(a);return typeof i=="undefined"&&(i=e.call(this,n),t.set(a,i)),i}function Va(e,t,r){var n=Array.prototype.slice.call(arguments,3),a=r(n),i=t.get(a);return typeof i=="undefined"&&(i=e.apply(this,n),t.set(a,i)),i}function yn(e,t,r,n,a){return r.bind(t,e,n,a)}function Es(e,t){var r=e.length===1?Wa:Va;return yn(e,this,r,t.cache.create(),t.serializer)}function Ps(e,t){return yn(e,this,Va,t.cache.create(),t.serializer)}function xs(e,t){return yn(e,this,Wa,t.cache.create(),t.serializer)}var As=function(){return JSON.stringify(arguments)};function $n(){this.cache=Object.create(null)}$n.prototype.get=function(e){return this.cache[e]};$n.prototype.set=function(e,t){this.cache[e]=t};var Ts={create:function(){return new $n}},mr={variadic:Ps,monadic:xs},nt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(nt||(nt={}));var Yt=function(e){Kt(t,e);function t(r,n,a){var i=e.call(this,r)||this;return i.code=n,i.originalMessage=a,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Zn=function(e){Kt(t,e);function t(r,n,a,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(a).join('", "'),'"'),nt.INVALID_VALUE,i)||this}return t}(Yt),Cs=function(e){Kt(t,e);function t(r,n,a){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),nt.INVALID_VALUE,a)||this}return t}(Yt),Ss=function(e){Kt(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),nt.MISSING_VALUE,n)||this}return t}(Yt),se;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(se||(se={}));function ks(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==se.literal||r.type!==se.literal?t.push(r):n.value+=r.value,t},[])}function Os(e){return typeof e=="function"}function Lt(e,t,r,n,a,i,s){if(e.length===1&&zn(e[0]))return[{type:se.literal,value:e[0].value}];for(var o=[],l=0,h=e;l<h.length;l++){var p=h[l];if(zn(p)){o.push({type:se.literal,value:p.value});continue}if(zo(p)){typeof i=="number"&&o.push({type:se.literal,value:r.getNumberFormat(t).format(i)});continue}var w=p.value;if(!(a&&w in a))throw new Ss(w,s);var b=a[w];if(Go(p)){(!b||typeof b=="string"||typeof b=="number")&&(b=typeof b=="string"||typeof b=="number"?String(b):""),o.push({type:typeof b=="string"?se.literal:se.object,value:b});continue}if(Sa(p)){var v=typeof p.style=="string"?n.date[p.style]:_r(p.style)?p.style.parsedOptions:void 0;o.push({type:se.literal,value:r.getDateTimeFormat(t,v).format(b)});continue}if(ka(p)){var v=typeof p.style=="string"?n.time[p.style]:_r(p.style)?p.style.parsedOptions:n.time.medium;o.push({type:se.literal,value:r.getDateTimeFormat(t,v).format(b)});continue}if(Ca(p)){var v=typeof p.style=="string"?n.number[p.style]:Ma(p.style)?p.style.parsedOptions:void 0;v&&v.scale&&(b=b*(v.scale||1)),o.push({type:se.literal,value:r.getNumberFormat(t,v).format(b)});continue}if(_a(p)){var x=p.children,A=p.value,k=a[A];if(!Os(k))throw new Cs(A,"function",s);var C=Lt(x,t,r,n,a,i),S=k(C.map(function(D){return D.value}));Array.isArray(S)||(S=[S]),o.push.apply(o,S.map(function(D){return{type:typeof D=="string"?se.literal:se.object,value:D}}))}if(Oa(p)){var O=p.options[b]||p.options.other;if(!O)throw new Zn(p.value,b,Object.keys(p.options),s);o.push.apply(o,Lt(O.value,t,r,n,a));continue}if(Ra(p)){var O=p.options["=".concat(b)];if(!O){if(!Intl.PluralRules)throw new Yt(`Intl.PluralRules is not available in this environment.
|
|
2
2
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
-
`,Lt.MISSING_INTL_API,s);var y=r.getPluralRules(t,{type:f.pluralType}).select(v-(f.offset||0));O=f.options[y]||f.options.other}if(!O)throw new zs(f.value,v,Object.keys(f.options),s);o.push.apply(o,wr(O.value,t,r,n,a,v-(f.offset||0)));continue}}return sd(o)}function ud(e,t){return t?ne(ne(ne({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=ne(ne({},e[n]),t[n]||{}),r},{})):e}function cd(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=ud(e[n],t[n]),r},ne({},e)):e}function hn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function fd(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:dn(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,cn([void 0],r,!1)))},{cache:hn(e.number),strategy:pn.variadic}),getDateTimeFormat:dn(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,cn([void 0],r,!1)))},{cache:hn(e.dateTime),strategy:pn.variadic}),getPluralRules:dn(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,cn([void 0],r,!1)))},{cache:hn(e.pluralRules),strategy:pn.variadic})}}var dd=function(){function e(t,r,n,a){var i=this;if(r===void 0&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(s){var o=i.formatToParts(s);if(o.length===1)return o[0].value;var l=o.reduce(function(u,f){return!u.length||f.type!==$e.literal||typeof u[u.length-1]!="string"?u.push(f.value):u[u.length-1]+=f.value,u},[]);return l.length<=1?l[0]||"":l},this.formatToParts=function(s){return wr(i.ast,i.locales,i.formatters,i.formats,s,void 0,i.message)},this.resolvedOptions=function(){return{locale:i.resolvedLocale.toString()}},this.getAst=function(){return i.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:a==null?void 0:a.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=cd(e.formats,n),this.formatters=a&&a.formatters||fd(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=Qf,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),pd=dd;function Gl(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var hd={};Gl(hd,"MessageDictionary",()=>zl);class zl{getStringForLocale(t,r){let n=this.messages[r];n||(n=md(r,this.messages,this.defaultLocale),this.messages[r]=n);let a=n[t];if(!a)throw new Error(`Could not find intl message ${t} in ${r} locale`);return a}constructor(t,r="en-US"){this.messages={...t},this.defaultLocale=r}}function md(e,t,r="en-US"){if(t[e])return t[e];let n=vd(e);if(t[n])return t[n];for(let a in t)if(a.startsWith(n+"-"))return t[a];return t[r]}function vd(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}var bd={};Gl(bd,"MessageFormatter",()=>Xl);class Xl{format(t,r){let n=this.cache[t];if(!n){let i=this.messages.getStringForLocale(t,this.locale);if(!i)throw new Error(`Could not find intl message ${t} in ${this.locale} locale`);n=new pd(i,this.locale),this.cache[t]=n}let a;return r&&(a=Object.keys(r).reduce((i,s)=>(i[s]=r[s]==null?!1:r[s],i),{})),n.format(a)}constructor(t,r){this.locale=t,this.messages=r,this.cache={}}}let mn=new Map;class gd{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} \u2013 ${this.formatter.format(r)}`}formatRangeToParts(t,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(t),a=this.formatter.formatToParts(r);return[...n.map(i=>({...i,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...a.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return xd()&&(this.resolvedHourCycle||(this.resolvedHourCycle=Ed(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,r={}){this.formatter=Kl(t,r),this.options=r}}const yd={true:{ja:"h11"},false:{}};function Kl(e,t={}){if(typeof t.hour12=="boolean"&&$d()){t={...t};let a=yd[String(t.hour12)][e.split("-")[0]],i=t.hour12?"h12":"h23";t.hourCycle=a!=null?a:i,delete t.hour12}let r=e+(t?Object.entries(t).sort((a,i)=>a[0]<i[0]?-1:1).join():"");if(mn.has(r))return mn.get(r);let n=new Intl.DateTimeFormat(e,t);return mn.set(r,n),n}let vn=null;function $d(){return vn==null&&(vn=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),vn}let bn=null;function xd(){return bn==null&&(bn=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),bn}function Ed(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=Kl(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(i=>i.type==="hour").value,10),a=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(i=>i.type==="hour").value,10);if(n===0&&a===23)return"h23";if(n===24&&a===23)return"h24";if(n===0&&a===11)return"h11";if(n===12&&a===11)return"h12";throw new Error("Unexpected hour cycle result")}let gn=new Map,Vn=!1;try{Vn=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Ar=!1;try{Ar=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const ql={degree:{narrow:{default:"\xB0","ja-JP":" \u5EA6","zh-TW":"\u5EA6","sl-SI":" \xB0"}}};class Pd{format(t){let r="";if(!Vn&&this.options.signDisplay!=null?r=Td(this.numberFormatter,this.options.signDisplay,t):r=this.numberFormatter.format(t),this.options.style==="unit"&&!Ar){var n;let{unit:a,unitDisplay:i="short",locale:s}=this.resolvedOptions(),o=(n=ql[a])===null||n===void 0?void 0:n[i];r+=o[s]||o.default}return r}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,r){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} \u2013 ${this.format(r)}`}formatRangeToParts(t,r){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.numberFormatter.formatToParts(t),a=this.numberFormatter.formatToParts(r);return[...n.map(i=>({...i,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...a.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!Vn&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Ar&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,r={}){this.numberFormatter=wd(t,r),this.options=r}}function wd(e,t={}){let{numberingSystem:r}=t;if(r&&e.indexOf("-u-nu-")===-1&&(e=`${e}-u-nu-${r}`),t.style==="unit"&&!Ar){var n;let{unit:s,unitDisplay:o="short"}=t;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((n=ql[s])===null||n===void 0)&&n[o]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${o}`);t={...t,style:"decimal"}}let a=e+(t?Object.entries(t).sort((s,o)=>s[0]<o[0]?-1:1).join():"");if(gn.has(a))return gn.get(a);let i=new Intl.NumberFormat(e,t);return gn.set(a,i),i}function Td(e,t,r){if(t==="auto")return e.format(r);if(t==="never")return e.format(Math.abs(r));{let n=!1;if(t==="always"?n=r>0||Object.is(r,0):t==="exceptZero"&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),n){let a=e.format(-r),i=e.format(r),s=a.replace(i,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),a.replace(i,"!!!").replace(s,"+").replace("!!!",i)}else return e.format(r)}}function mt(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Yl={};mt(Yl,"I18nProvider",()=>tu);mt(Yl,"useLocale",()=>Qe);const Sd=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Ad=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Jl(e){if(Intl.Locale){let r=new Intl.Locale(e).maximize().script;return Sd.has(r)}let t=e.split("-")[0];return Ad.has(t)}function Ql(){let e=typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Jl(e)?"rtl":"ltr"}}let jn=Ql(),qt=new Set;function Xs(){jn=Ql();for(let e of qt)e(jn)}function Zl(){let e=Bt(),[t,r]=$.useState(jn);return $.useEffect(()=>(qt.size===0&&window.addEventListener("languagechange",Xs),qt.add(r),()=>{qt.delete(r),qt.size===0&&window.removeEventListener("languagechange",Xs)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const eu=k.default.createContext(null);function tu(e){let{locale:t,children:r}=e,n=Zl(),a=t?{locale:t,direction:Jl(t)?"rtl":"ltr"}:n;return k.default.createElement(eu.Provider,{value:a},r)}function Qe(){let e=Zl();return $.useContext(eu)||e}var Cd={};mt(Cd,"useMessageFormatter",()=>ru);const Ks=new WeakMap;function _d(e){let t=Ks.get(e);return t||(t=new zl(e),Ks.set(e,t)),t}function ru(e){let{locale:t}=Qe(),r=$.useMemo(()=>_d(e),[e]),n=$.useMemo(()=>new Xl(t,r),[t,r]);return $.useCallback((a,i)=>n.format(a,i),[n])}var kd={};mt(kd,"useDateFormatter",()=>Od);function Od(e){let t=$.useRef(null);e&&t.current&&Id(e,t.current)&&(e=t.current),t.current=e;let{locale:r}=Qe();return $.useMemo(()=>new gd(r,e),[r,e])}function Id(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a of r)if(t[a]!==e[a])return!1;return!0}var Rd={};mt(Rd,"useNumberFormatter",()=>Md);function Md(e={}){let{locale:t}=Qe();return $.useMemo(()=>new Pd(t,e),[t,e])}var Ld={};mt(Ld,"useCollator",()=>nu);let yn=new Map;function nu(e){let{locale:t}=Qe(),r=t+(e?Object.entries(e).sort((a,i)=>a[0]<i[0]?-1:1).join():"");if(yn.has(r))return yn.get(r);let n=new Intl.Collator(t,e);return yn.set(r,n),n}var Nd={};mt(Nd,"useFilter",()=>Dd);function Dd(e){let t=nu({usage:"search",...e});return{startsWith(r,n){return n.length===0?!0:(r=r.normalize("NFC"),n=n.normalize("NFC"),t.compare(r.slice(0,n.length),n)===0)},endsWith(r,n){return n.length===0?!0:(r=r.normalize("NFC"),n=n.normalize("NFC"),t.compare(r.slice(-n.length),n)===0)},contains(r,n){if(n.length===0)return!0;r=r.normalize("NFC"),n=n.normalize("NFC");let a=0,i=n.length;for(;a+i<=r.length;a++){let s=r.slice(a,a+i);if(t.compare(n,s)===0)return!0}return!1}}}function Ur(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Bd={};Ur(Bd,"useControlledState",()=>ts);function ts(e,t,r){let[n,a]=$.useState(e||t),i=$.useRef(e!==void 0),s=i.current,o=e!==void 0,l=$.useRef(n);s!==o&&console.warn(`WARN: A component changed from ${s?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}.`),i.current=o;let u=$.useCallback((f,...g)=>{let v=(b,...w)=>{r&&(Object.is(l.current,b)||r(b,...w)),o||(l.current=b)};typeof f=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),a((w,...T)=>{let _=f(o?l.current:w,...T);return v(_,...g),o?w:_})):(o||a(f),v(f,...g))},[o,r]);return o?l.current=e:e=n,[e,u]}var rs={};Ur(rs,"clamp",()=>au);Ur(rs,"snapValueToStep",()=>iu);Ur(rs,"toFixedNumber",()=>Hd);function au(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function iu(e,t,r,n){let a=(e-(isNaN(t)?0:t))%n,i=Math.abs(a)*2>=n?e+Math.sign(a)*(n-Math.abs(a)):e-a;isNaN(t)?!isNaN(r)&&i>r&&(i=Math.floor(r/n)*n):i<t?i=t:!isNaN(r)&&i>r&&(i=t+Math.floor((r-t)/n)*n);let s=n.toString(),o=s.indexOf("."),l=o>=0?s.length-o:0;if(l>0){let u=Math.pow(10,l);i=Math.round(i*u)/u}return i}function Hd(e,t,r=10){const n=Math.pow(r,t);return Math.round(e*n)/n}function re(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var ns={};re(ns,"useId",()=>nr);re(ns,"mergeIds",()=>ou);re(ns,"useSlotId",()=>Ud);var Fd={};re(Fd,"useLayoutEffect",()=>ve);const ve=typeof window!="undefined"?k.default.useLayoutEffect:()=>{};let Cr=new Map;function nr(e){let[t,r]=$.useState(e),n=$.useRef(null),a=Cl(t),i=$.useCallback(s=>{n.current=s},[]);return Cr.set(a,i),ve(()=>{let s=a;return()=>{Cr.delete(s)}},[a]),$.useEffect(()=>{let s=n.current;s&&(n.current=null,r(s))}),a}function ou(e,t){if(e===t)return e;let r=Cr.get(e);if(r)return r(t),t;let n=Cr.get(t);return n?(n(e),e):t}function Ud(e=[]){let t=nr(),[r,n]=us(t),a=$.useCallback(()=>{n(function*(){yield t,yield document.getElementById(t)?t:null})},[t,n]);return ve(a,[t,a,...e]),r}var Wd={};re(Wd,"chain",()=>Nt);function Nt(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}var Vd={};re(Vd,"mergeProps",()=>ie);function ie(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let a in n){let i=t[a],s=n[a];typeof i=="function"&&typeof s=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=Nt(i,s):(a==="className"||a==="UNSAFE_className")&&typeof i=="string"&&typeof s=="string"?t[a]=Dr(i,s):a==="id"&&i&&s?t.id=ou(i,s):t[a]=s!==void 0?s:i}}return t}var jd={};re(jd,"mergeRefs",()=>Gd);function Gd(...e){return t=>{for(let r of e)typeof r=="function"?r(t):r!=null&&(r.current=t)}}var zd={};re(zd,"filterDOMProps",()=>be);const Xd=new Set(["id"]),Kd=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),qd=/^(data-.*)$/;function be(e,t={}){let{labelable:r,propNames:n}=t,a={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Xd.has(i)||r&&Kd.has(i)||(n==null?void 0:n.has(i))||qd.test(i))&&(a[i]=e[i]);return a}var Yd={};re(Yd,"focusWithoutScrolling",()=>dt);function dt(e){if(Jd())e.focus({preventScroll:!0});else{let t=Qd(e);e.focus(),Zd(t)}}let vr=null;function Jd(){if(vr==null){vr=!1;try{var e=document.createElement("div");e.focus({get preventScroll(){return vr=!0,!0}})}catch{}}return vr}function Qd(e){for(var t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function Zd(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}var ep={};re(ep,"getOffset",()=>su);function su(e,t,r="horizontal"){let n=e.getBoundingClientRect();return t?r==="horizontal"?n.right:n.bottom:r==="horizontal"?n.left:n.top}var lu={};re(lu,"clamp",()=>au);re(lu,"snapValueToStep",()=>iu);var tp={};re(tp,"runAfterTransition",()=>as);let Ct=new Map,Gn=new Set;function qs(){if(typeof window=="undefined")return;let e=r=>{let n=Ct.get(r.target);n||(n=new Set,Ct.set(r.target,n),r.target.addEventListener("transitioncancel",t)),n.add(r.propertyName)},t=r=>{let n=Ct.get(r.target);if(!!n&&(n.delete(r.propertyName),n.size===0&&(r.target.removeEventListener("transitioncancel",t),Ct.delete(r.target)),Ct.size===0)){for(let a of Gn)a();Gn.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document!="undefined"&&(document.readyState!=="loading"?qs():document.addEventListener("DOMContentLoaded",qs));function as(e){requestAnimationFrame(()=>{Ct.size===0?e():Gn.add(e)})}var rp={};re(rp,"useDrag1D",()=>np);const br=[];function np(e){console.warn("useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html");let{containerRef:t,reverse:r,orientation:n,onHover:a,onDrag:i,onPositionChange:s,onIncrement:o,onDecrement:l,onIncrementToMax:u,onDecrementToMin:f,onCollapseToggle:g}=e,v=D=>n==="horizontal"?D.clientX:D.clientY,b=D=>{let L=su(t.current,r,n),I=v(D);return r?L-I:I-L},w=$.useRef(!1),T=$.useRef(0),_=$.useRef({onPositionChange:s,onDrag:i});_.current.onDrag=i,_.current.onPositionChange=s;let A=D=>{D.preventDefault();let L=b(D);w.current||(w.current=!0,_.current.onDrag&&_.current.onDrag(!0),_.current.onPositionChange&&_.current.onPositionChange(L)),T.current!==L&&(T.current=L,s&&s(L))},S=D=>{const L=D.target;w.current=!1;let I=b(D);_.current.onDrag&&_.current.onDrag(!1),_.current.onPositionChange&&_.current.onPositionChange(I),br.splice(br.indexOf(L),1),window.removeEventListener("mouseup",S,!1),window.removeEventListener("mousemove",A,!1)};return{onMouseDown:D=>{const L=D.currentTarget;br.some(I=>L.contains(I))||(br.push(L),window.addEventListener("mousemove",A,!1),window.addEventListener("mouseup",S,!1))},onMouseEnter:()=>{a&&a(!0)},onMouseOut:()=>{a&&a(!1)},onKeyDown:D=>{switch(D.key){case"Left":case"ArrowLeft":n==="horizontal"&&(D.preventDefault(),l&&!r?l():o&&r&&o());break;case"Up":case"ArrowUp":n==="vertical"&&(D.preventDefault(),l&&!r?l():o&&r&&o());break;case"Right":case"ArrowRight":n==="horizontal"&&(D.preventDefault(),o&&!r?o():l&&r&&l());break;case"Down":case"ArrowDown":n==="vertical"&&(D.preventDefault(),o&&!r?o():l&&r&&l());break;case"Home":D.preventDefault(),f&&f();break;case"End":D.preventDefault(),u&&u();break;case"Enter":D.preventDefault(),g&&g();break}}}}var ap={};re(ap,"useGlobalListeners",()=>Wr);function Wr(){let e=$.useRef(new Map),t=$.useCallback((a,i,s,o)=>{let l=o!=null&&o.once?(...u)=>{e.current.delete(s),s(...u)}:s;e.current.set(s,{type:i,eventTarget:a,fn:l,options:o}),a.addEventListener(i,s,o)},[]),r=$.useCallback((a,i,s,o)=>{var l;let u=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;a.removeEventListener(i,u,o),e.current.delete(s)},[]),n=$.useCallback(()=>{e.current.forEach((a,i)=>{r(a.eventTarget,a.type,i,a.options)})},[r]);return $.useEffect(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}var ip={};re(ip,"useLabels",()=>uu);function uu(e,t){let{id:r,"aria-label":n,"aria-labelledby":a}=e;return r=nr(r),a&&n?a=[...new Set([...a.trim().split(/\s+/),r])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),!n&&!a&&t&&(n=t),{id:r,"aria-label":n,"aria-labelledby":a}}var op={};re(op,"useObjectRef",()=>sp);function sp(e){const t=$.useRef();return ve(()=>{!e||(typeof e=="function"?e(t.current):e.current=t.current)},[e]),t}var lp={};re(lp,"useUpdateEffect",()=>up);function up(e,t){const r=$.useRef(!0);$.useEffect(()=>{r.current?r.current=!1:e()},t)}var cp={};re(cp,"useResizeObserver",()=>cu);function fp(){return typeof window.ResizeObserver!="undefined"}function cu(e){const{ref:t,onResize:r}=e;$.useEffect(()=>{let n=t==null?void 0:t.current;if(!!n)if(fp()){const a=new window.ResizeObserver(i=>{!i.length||r()});return a.observe(n),()=>{n&&a.unobserve(n)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,t])}var dp={};re(dp,"useSyncRef",()=>Vr);function Vr(e,t){ve(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref.current=null}},[e,t])}var pp={};re(pp,"getScrollParent",()=>is);function is(e){for(;e&&!hp(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function hp(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}var mp={};re(mp,"useViewportSize",()=>os);let Ve=typeof window!="undefined"&&window.visualViewport;function os(){let[e,t]=$.useState(()=>Ys());return $.useEffect(()=>{let r=()=>{t(n=>{let a=Ys();return a.width===n.width&&a.height===n.height?n:a})};return Ve?Ve.addEventListener("resize",r):window.addEventListener("resize",r),()=>{Ve?Ve.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),e}function Ys(){return{width:(Ve==null?void 0:Ve.width)||window.innerWidth,height:(Ve==null?void 0:Ve.height)||window.innerHeight}}var vp={};re(vp,"useDescription",()=>fu);let bp=0;const $n=new Map;function fu(e){let[t,r]=$.useState(null);return ve(()=>{if(!e)return;let n=$n.get(e);if(n)r(n.element.id);else{let a=`react-aria-description-${bp++}`;r(a);let i=document.createElement("div");i.id=a,i.style.display="none",i.textContent=e,document.body.appendChild(i),n={refCount:0,element:i},$n.set(e,n)}return n.refCount++,()=>{--n.refCount===0&&(n.element.remove(),$n.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}var it={};re(it,"isMac",()=>jr);re(it,"isIPhone",()=>du);re(it,"isIPad",()=>pu);re(it,"isIOS",()=>ar);re(it,"isAppleDevice",()=>gp);re(it,"isWebKit",()=>yp);re(it,"isChrome",()=>hu);re(it,"isAndroid",()=>$p);function ss(e){var t;return typeof window=="undefined"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(r=>e.test(r.brand)))||e.test(window.navigator.userAgent)}function ls(e){return typeof window!="undefined"&&window.navigator!=null?e.test((window.navigator.userAgentData||window.navigator).platform):!1}function jr(){return ls(/^Mac/i)}function du(){return ls(/^iPhone/i)}function pu(){return ls(/^iPad/i)||jr()&&navigator.maxTouchPoints>1}function ar(){return du()||pu()}function gp(){return jr()||ar()}function yp(){return ss(/AppleWebKit/i)&&!hu()}function hu(){return ss(/Chrome/i)}function $p(){return ss(/Android/i)}var xp={};re(xp,"useEvent",()=>mu);function mu(e,t,r,n){let a=$.useRef(r);a.current=r;let i=r==null;$.useEffect(()=>{if(i)return;let s=e.current,o=l=>a.current.call(this,l);return s.addEventListener(t,o,n),()=>{s.removeEventListener(t,o,n)}},[e,t,n,i])}var Ep={};re(Ep,"useValueEffect",()=>us);function us(e){let[t,r]=$.useState(e),n=$.useRef(t),a=$.useRef(null);n.current=t;let i=$.useRef(null);i.current=()=>{let o=a.current.next();if(o.done){a.current=null;return}t===o.value?i.current():r(o.value)},ve(()=>{a.current&&i.current()});let s=$.useCallback(o=>{a.current=o(n.current),i.current()},[a,i]);return[t,s]}var Pp={};re(Pp,"scrollIntoView",()=>wp);function wp(e,t){let r=Js(e,t,"left"),n=Js(e,t,"top"),a=t.offsetWidth,i=t.offsetHeight,s=e.scrollLeft,o=e.scrollTop,l=s+e.offsetWidth,u=o+e.offsetHeight;r<=s?s=r:r+a>l&&(s+=r+a-l),n<=o?o=n:n+i>u&&(o+=n+i-u),e.scrollLeft=s,e.scrollTop=o}function Js(e,t,r){const n=r==="left"?"offsetLeft":"offsetTop";let a=0;for(;t.offsetParent&&(a+=t[n],t.offsetParent!==e);){if(t.offsetParent.contains(e)){a-=e[n];break}t=t.offsetParent}return a}function ae(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var cs={};ae(cs,"shouldKeepSpectrumClassNames",()=>rt);ae(cs,"keepSpectrumClassNames",()=>Tp);ae(cs,"classNames",()=>X);let rt=!1;function Tp(){rt=!0,console.warn("Legacy spectrum-prefixed class names enabled for backward compatibility. We recommend replacing instances of CSS overrides targeting spectrum selectors in your app with custom class names of your own, and disabling this flag.")}function X(e,...t){let r=[];for(let n of t)if(typeof n=="object"&&n){let a={};for(let i in n)e[i]&&(a[e[i]]=n[i]),(rt||!e[i])&&(a[i]=n[i]);r.push(a)}else typeof n=="string"?(e[n]&&r.push(e[n]),(rt||!e[n])&&r.push(n)):r.push(n);return Dr(...r)}var Sp={};ae(Sp,"getWrappedElement",()=>Ap);function Ap(e){let t;return typeof e=="string"?t=k.default.createElement("span",null,e):t=k.default.Children.only(e),t}var Cp={};ae(Cp,"useMediaQuery",()=>_r);function _r(e){let t=typeof window!="undefined"&&typeof window.matchMedia=="function",[r,n]=$.useState(()=>t?window.matchMedia(e).matches:!1);return $.useEffect(()=>{if(!t)return;let i=window.matchMedia(e),s=o=>{n(o.matches)};return i.addListener(s),()=>{i.removeListener(s)}},[t,e]),Bt()?!1:r}var Ht={};ae(Ht,"createDOMRef",()=>Gr);ae(Ht,"createFocusableRef",()=>vu);ae(Ht,"useDOMRef",()=>Se);ae(Ht,"useFocusableRef",()=>vt);ae(Ht,"unwrapDOMRef",()=>bu);ae(Ht,"useUnwrapDOMRef",()=>_p);function Gr(e){return{UNSAFE_getDOMNode(){return e.current}}}function vu(e,t=e){return{...Gr(e),focus(){t.current&&t.current.focus()}}}function Se(e){let t=$.useRef(null);return $.useImperativeHandle(e,()=>Gr(t)),t}function vt(e,t){let r=$.useRef(null);return $.useImperativeHandle(e,()=>vu(r,t)),r}function bu(e){return{get current(){return e.current&&e.current.UNSAFE_getDOMNode()}}}function _p(e){return $.useMemo(()=>bu(e),[e])}var ot={};ae(ot,"baseStyleProps",()=>ir);ae(ot,"dimensionValue",()=>te);ae(ot,"passthroughStyle",()=>pe);ae(ot,"viewStyleProps",()=>$u);ae(ot,"responsiveDimensionValue",()=>ft);ae(ot,"getResponsiveProp",()=>zr);ae(ot,"convertStyleProps",()=>Eu);ae(ot,"useStyleProps",()=>le);var fs={};ae(fs,"BreakpointProvider",()=>gu);ae(fs,"useMatchedBreakpoints",()=>yu);ae(fs,"useBreakpoint",()=>ps);const ds=k.default.createContext(null);ds.displayName="BreakpointContext";function gu(e){let{children:t,matchedBreakpoints:r}=e;return k.default.createElement(ds.Provider,{value:{matchedBreakpoints:r}},t)}function yu(e){let t=Object.entries(e).sort(([,l],[,u])=>u-l),r=t.map(([,l])=>`(min-width: ${l}px)`),n=typeof window!="undefined"&&typeof window.matchMedia=="function",a=()=>{let l=[];for(let u in r){let f=r[u];window.matchMedia(f).matches&&l.push(t[u][0])}return l.push("base"),l},[i,s]=$.useState(()=>n?a():["base"]);return $.useEffect(()=>{if(!n)return;let l=()=>{const u=a();s(f=>f.length!==u.length||f.some((g,v)=>g!==u[v])?[...u]:f)};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[n]),Bt()?["base"]:i}function ps(){return $.useContext(ds)}const ir={margin:["margin",te],marginStart:[Pe("marginLeft","marginRight"),te],marginEnd:[Pe("marginRight","marginLeft"),te],marginTop:["marginTop",te],marginBottom:["marginBottom",te],marginX:[["marginLeft","marginRight"],te],marginY:[["marginTop","marginBottom"],te],width:["width",te],height:["height",te],minWidth:["minWidth",te],minHeight:["minHeight",te],maxWidth:["maxWidth",te],maxHeight:["maxHeight",te],isHidden:["display",Mp],alignSelf:["alignSelf",pe],justifySelf:["justifySelf",pe],position:["position",xn],zIndex:["zIndex",xn],top:["top",te],bottom:["bottom",te],start:[Pe("left","right"),te],end:[Pe("right","left"),te],left:["left",te],right:["right",te],order:["order",xn],flex:["flex",Lp],flexGrow:["flexGrow",pe],flexShrink:["flexShrink",pe],flexBasis:["flexBasis",pe],gridArea:["gridArea",pe],gridColumn:["gridColumn",pe],gridColumnEnd:["gridColumnEnd",pe],gridColumnStart:["gridColumnStart",pe],gridRow:["gridRow",pe],gridRowEnd:["gridRowEnd",pe],gridRowStart:["gridRowStart",pe]},$u={...ir,backgroundColor:["backgroundColor",Rp],borderWidth:["borderWidth",ze],borderStartWidth:[Pe("borderLeftWidth","borderRightWidth"),ze],borderEndWidth:[Pe("borderRightWidth","borderLeftWidth"),ze],borderLeftWidth:["borderLeftWidth",ze],borderRightWidth:["borderRightWidth",ze],borderTopWidth:["borderTopWidth",ze],borderBottomWidth:["borderBottomWidth",ze],borderXWidth:[["borderLeftWidth","borderRightWidth"],ze],borderYWidth:[["borderTopWidth","borderBottomWidth"],ze],borderColor:["borderColor",Ge],borderStartColor:[Pe("borderLeftColor","borderRightColor"),Ge],borderEndColor:[Pe("borderRightColor","borderLeftColor"),Ge],borderLeftColor:["borderLeftColor",Ge],borderRightColor:["borderRightColor",Ge],borderTopColor:["borderTopColor",Ge],borderBottomColor:["borderBottomColor",Ge],borderXColor:[["borderLeftColor","borderRightColor"],Ge],borderYColor:[["borderTopColor","borderBottomColor"],Ge],borderRadius:["borderRadius",Xe],borderTopStartRadius:[Pe("borderTopLeftRadius","borderTopRightRadius"),Xe],borderTopEndRadius:[Pe("borderTopRightRadius","borderTopLeftRadius"),Xe],borderBottomStartRadius:[Pe("borderBottomLeftRadius","borderBottomRightRadius"),Xe],borderBottomEndRadius:[Pe("borderBottomRightRadius","borderBottomLeftRadius"),Xe],borderTopLeftRadius:["borderTopLeftRadius",Xe],borderTopRightRadius:["borderTopRightRadius",Xe],borderBottomLeftRadius:["borderBottomLeftRadius",Xe],borderBottomRightRadius:["borderBottomRightRadius",Xe],padding:["padding",te],paddingStart:[Pe("paddingLeft","paddingRight"),te],paddingEnd:[Pe("paddingRight","paddingLeft"),te],paddingLeft:["paddingLeft",te],paddingRight:["paddingRight",te],paddingTop:["paddingTop",te],paddingBottom:["paddingBottom",te],paddingX:[["paddingLeft","paddingRight"],te],paddingY:[["paddingTop","paddingBottom"],te],overflow:["overflow",pe]},Qs={borderWidth:"borderStyle",borderLeftWidth:"borderLeftStyle",borderRightWidth:"borderRightStyle",borderTopWidth:"borderTopStyle",borderBottomWidth:"borderBottomStyle"};function Pe(e,t){return r=>r==="rtl"?t:e}const kp=/(%|px|em|rem|vw|vh|auto|cm|mm|in|pt|pc|ex|ch|rem|vmin|vmax|fr)$/,Op=/^\s*\w+\(/,Ip=/(static-)?size-\d+|single-line-(height|width)/g;function te(e){return typeof e=="number"?e+"px":kp.test(e)?e:Op.test(e)?e.replace(Ip,"var(--spectrum-global-dimension-$&, var(--spectrum-alias-$&))"):`var(--spectrum-global-dimension-${e}, var(--spectrum-alias-${e}))`}function ft(e,t){return e=zr(e,t),te(e)}function xu(e,t="default"){return`var(--spectrum-global-color-${e}, var(--spectrum-semantic-${e}-color-${t}))`}function Rp(e){return`var(--spectrum-alias-background-color-${e}, ${xu(e,"background")})`}function Ge(e){return e==="default"?"var(--spectrum-alias-border-color)":`var(--spectrum-alias-border-color-${e}, ${xu(e,"border")})`}function ze(e){return`var(--spectrum-alias-border-size-${e})`}function Xe(e){return`var(--spectrum-alias-border-radius-${e})`}function Mp(e){return e?"none":void 0}function xn(e){return e}function Lp(e){return typeof e=="boolean"?e?"1":void 0:""+e}function Eu(e,t,r,n){let a={};for(let i in e){let s=t[i];if(!s||e[i]==null)continue;let[o,l]=s;typeof o=="function"&&(o=o(r));let u=zr(e[i],n),f=l(u);if(Array.isArray(o))for(let g of o)a[g]=f;else a[o]=f}for(let i in Qs)a[i]&&(a[Qs[i]]="solid",a.boxSizing="border-box");return a}function le(e,t=ir,r={}){let{UNSAFE_className:n,UNSAFE_style:a,...i}=e,s=ps(),{direction:o}=Qe(),{matchedBreakpoints:l=(s==null?void 0:s.matchedBreakpoints)||["base"]}=r,u=Eu(e,t,o,l),f={...a,...u};i.className&&console.warn("The className prop is unsafe and is unsupported in React Spectrum v3. Please use style props with Spectrum variables, or UNSAFE_className if you absolutely must do something custom. Note that this may break in future versions due to DOM structure changes."),i.style&&console.warn("The style prop is unsafe and is unsupported in React Spectrum v3. Please use style props with Spectrum variables, or UNSAFE_style if you absolutely must do something custom. Note that this may break in future versions due to DOM structure changes.");let g={style:f,className:n};return zr(e.isHidden,l)&&(g.hidden=!0),{styleProps:g}}function pe(e){return e}function zr(e,t){if(e&&typeof e=="object"&&!Array.isArray(e)){for(let r=0;r<t.length;r++){let n=t[r];if(e[n]!=null)return e[n]}return e.base}return e}var Xr={};ae(Xr,"useSlotProps",()=>Oe);ae(Xr,"cssModuleToSlots",()=>Np);ae(Xr,"SlotProvider",()=>or);ae(Xr,"ClearSlots",()=>sr);let kr=k.default.createContext(null);function Oe(e,t){let r=e.slot||t,{[r]:n={}}=$.useContext(kr)||{};return ie(e,ie(n,{id:e.id}))}function Np(e){return Object.keys(e).reduce((t,r)=>(t[r]={UNSAFE_className:e[r]},t),{})}function or(e){let t=$.useContext(kr)||{},{slots:r={},children:n}=e,a=$.useMemo(()=>Object.keys(t).concat(Object.keys(r)).reduce((i,s)=>({...i,[s]:ie(t[s]||{},r[s]||{})}),{}),[t,r]);return k.default.createElement(kr.Provider,{value:a},n)}function sr(e){let{children:t,...r}=e,n=t;return k.default.Children.toArray(t).length<=1&&typeof t=="function"&&(n=k.default.cloneElement(k.default.Children.only(t),r)),k.default.createElement(kr.Provider,{value:{}},n)}var Dp={};ae(Dp,"useHasChild",()=>Bp);function Bp(e,t){let[r,n]=$.useState(!0);return ve(()=>{n(!!(t.current&&t.current.querySelector(e)))},[n,e,t]),r}var Hp={};ae(Hp,"useResizeObserver",()=>cu);var Fp={};ae(Fp,"useIsMobileDevice",()=>Wp);const Up=700;function Wp(){return Bt()||typeof window=="undefined"?!1:window.screen.width<=Up}var Vp={};ae(Vp,"useValueEffect",()=>us);function tr(e){return e&&e.ownerDocument||document}function jp(e){var t=tr(e);return t&&t.defaultView||window}function Gp(e,t){return jp(e).getComputedStyle(e,t)}var zp=/([A-Z])/g;function Xp(e){return e.replace(zp,"-$1").toLowerCase()}var Kp=/^ms-/;function gr(e){return Xp(e).replace(Kp,"-ms-")}var qp=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Yp(e){return!!(e&&qp.test(e))}function tt(e,t){var r="",n="";if(typeof t=="string")return e.style.getPropertyValue(gr(t))||Gp(e).getPropertyValue(gr(t));Object.keys(t).forEach(function(a){var i=t[a];!i&&i!==0?e.style.removeProperty(gr(a)):Yp(a)?n+=a+"("+i+") ":r+=gr(a)+": "+i+";"}),n&&(r+="transform: "+n+";"),e.style.cssText+=";"+r}function Jp(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function Qp(e){return"nodeType"in e&&e.nodeType===document.DOCUMENT_NODE}function Zp(e){return"window"in e&&e.window===e?e:Qp(e)&&e.defaultView||!1}function Pu(e){var t=e==="pageXOffset"?"scrollLeft":"scrollTop";function r(n,a){var i=Zp(n);if(a===void 0)return i?i[e]:n[t];i?i.scrollTo(i[e],a):n[t]=a}return r}var Jt=Pu("pageXOffset"),Qt=Pu("pageYOffset");function Ot(e){var t=tr(e),r={top:0,left:0,height:0,width:0},n=t&&t.documentElement;return!n||!Jp(n,e)||(e.getBoundingClientRect!==void 0&&(r=e.getBoundingClientRect()),r={top:r.top+Qt(n)-(n.clientTop||0),left:r.left+Jt(n)-(n.clientLeft||0),width:r.width,height:r.height}),r}function zn(){return zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zn.apply(this,arguments)}var eh=function(t){return!!t&&"offsetParent"in t};function th(e){for(var t=tr(e),r=e&&e.offsetParent;eh(r)&&r.nodeName!=="HTML"&&tt(r,"position")==="static";)r=r.offsetParent;return r||t.documentElement}var rh=function(t){return t.nodeName&&t.nodeName.toLowerCase()};function Zs(e,t){var r={top:0,left:0},n;if(tt(e,"position")==="fixed")n=e.getBoundingClientRect();else{var a=t||th(e);n=Ot(e),rh(a)!=="html"&&(r=Ot(a));var i=String(tt(a,"borderTopWidth")||0);r.top+=parseInt(i,10)-Qt(a)||0;var s=String(tt(a,"borderLeftWidth")||0);r.left+=parseInt(s,10)-Jt(a)||0}var o=String(tt(e,"marginTop")||0),l=String(tt(e,"marginLeft")||0);return zn({},n,{top:n.top-r.top-(parseInt(o,10)||0),left:n.left-r.left-(parseInt(l,10)||0)})}function ge(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var nh={};ge(nh,"Pressable",()=>fh);var ah={};ge(ah,"usePress",()=>lr);let _t="default",Xn="",Tr=new WeakMap;function Kn(e){ar()?(_t==="default"&&(Xn=document.documentElement.style.webkitUserSelect,document.documentElement.style.webkitUserSelect="none"),_t="disabled"):e&&(Tr.set(e,e.style.userSelect),e.style.userSelect="none")}function Yt(e){if(ar()){if(_t!=="disabled")return;_t="restoring",setTimeout(()=>{as(()=>{_t==="restoring"&&(document.documentElement.style.webkitUserSelect==="none"&&(document.documentElement.style.webkitUserSelect=Xn||""),Xn="",_t="default")})},300)}else if(e&&Tr.has(e)){let t=Tr.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),Tr.delete(e)}}function qn(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}class ih{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,r){this.nativeEvent=r,this.target=r.target,this.currentTarget=r.currentTarget,this.relatedTarget=r.relatedTarget,this.bubbles=r.bubbles,this.cancelable=r.cancelable,this.defaultPrevented=r.defaultPrevented,this.eventPhase=r.eventPhase,this.isTrusted=r.isTrusted,this.timeStamp=r.timeStamp,this.type=t}}function wu(e){let t=$.useRef({isFocused:!1,onBlur:e,observer:null});return t.current.onBlur=e,ve(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),$.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r.target,a=i=>{var s,o;t.current.isFocused=!1,n.disabled&&((o=(s=t.current).onBlur)===null||o===void 0||o.call(s,new ih("blur",i))),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{t.current.isFocused&&n.disabled&&(t.current.observer.disconnect(),n.dispatchEvent(new FocusEvent("blur")),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})))}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[])}const Or=k.default.createContext(null);Or.displayName="PressResponderContext";function oh(e){let t=$.useContext(Or);if(t){let{register:r,...n}=t;e=ie(n,e),r()}return Vr(t,e.ref),e}function lr(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:a,onPressUp:i,isDisabled:s,isPressed:o,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:f,ref:g,...v}=oh(e),b=$.useRef(null);b.current={onPress:t,onPressChange:r,onPressStart:n,onPressEnd:a,onPressUp:i,isDisabled:s,shouldCancelOnPointerExit:u};let[w,T]=$.useState(!1),_=$.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:A,removeAllGlobalListeners:S}=Wr(),O=$.useMemo(()=>{let y=_.current,H=(P,m)=>{let{onPressStart:h,onPressChange:x,isDisabled:p}=b.current;p||y.didFirePressStart||(h&&h({type:"pressstart",pointerType:m,target:P.currentTarget,shiftKey:P.shiftKey,metaKey:P.metaKey,ctrlKey:P.ctrlKey,altKey:P.altKey}),x&&x(!0),y.didFirePressStart=!0,T(!0))},M=(P,m,h=!0)=>{let{onPressEnd:x,onPressChange:p,onPress:d,isDisabled:C}=b.current;!y.didFirePressStart||(y.ignoreClickAfterPress=!0,y.didFirePressStart=!1,x&&x({type:"pressend",pointerType:m,target:P.currentTarget,shiftKey:P.shiftKey,metaKey:P.metaKey,ctrlKey:P.ctrlKey,altKey:P.altKey}),p&&p(!1),T(!1),d&&h&&!C&&d({type:"press",pointerType:m,target:P.currentTarget,shiftKey:P.shiftKey,metaKey:P.metaKey,ctrlKey:P.ctrlKey,altKey:P.altKey}))},D=(P,m)=>{let{onPressUp:h,isDisabled:x}=b.current;x||h&&h({type:"pressup",pointerType:m,target:P.currentTarget,shiftKey:P.shiftKey,metaKey:P.metaKey,ctrlKey:P.ctrlKey,altKey:P.altKey})},L=P=>{y.isPressed&&(y.isOverTarget&&M(Ke(y.target,P),y.pointerType,!1),y.isPressed=!1,y.isOverTarget=!1,y.activePointerId=null,y.pointerType=null,S(),f||Yt(y.target))},I={onKeyDown(P){En(P.nativeEvent)&&P.currentTarget.contains(P.target)&&(tl(P.target)&&P.preventDefault(),P.stopPropagation(),!y.isPressed&&!P.repeat&&(y.target=P.currentTarget,y.isPressed=!0,H(P,"keyboard"),A(document,"keyup",B,!1)))},onKeyUp(P){En(P.nativeEvent)&&!P.repeat&&P.currentTarget.contains(P.target)&&D(Ke(y.target,P),"keyboard")},onClick(P){P&&!P.currentTarget.contains(P.target)||P&&P.button===0&&(P.stopPropagation(),s&&P.preventDefault(),!y.ignoreClickAfterPress&&!y.ignoreEmulatedMouseEvents&&(y.pointerType==="virtual"||qn(P.nativeEvent))&&(!s&&!l&&dt(P.currentTarget),H(P,"virtual"),D(P,"virtual"),M(P,"virtual")),y.ignoreEmulatedMouseEvents=!1,y.ignoreClickAfterPress=!1)}},B=P=>{if(y.isPressed&&En(P)){tl(P.target)&&P.preventDefault(),P.stopPropagation(),y.isPressed=!1;let m=P.target;M(Ke(y.target,P),"keyboard",y.target.contains(m)),S(),(y.target.contains(m)&&Tu(y.target)||y.target.getAttribute("role")==="link")&&y.target.click()}};if(typeof PointerEvent!="undefined"){I.onPointerDown=x=>{if(!(x.button!==0||!x.currentTarget.contains(x.target))){if(ch(x.nativeEvent)){y.pointerType="virtual";return}Pn(x.currentTarget)&&x.preventDefault(),y.pointerType=x.pointerType,x.stopPropagation(),y.isPressed||(y.isPressed=!0,y.isOverTarget=!0,y.activePointerId=x.pointerId,y.target=x.currentTarget,!s&&!l&&dt(x.currentTarget),f||Kn(y.target),H(x,y.pointerType),A(document,"pointermove",P,!1),A(document,"pointerup",m,!1),A(document,"pointercancel",h,!1))}},I.onMouseDown=x=>{!x.currentTarget.contains(x.target)||x.button===0&&(Pn(x.currentTarget)&&x.preventDefault(),x.stopPropagation())},I.onPointerUp=x=>{!x.currentTarget.contains(x.target)||y.pointerType==="virtual"||x.button===0&&xt(x,x.currentTarget)&&D(x,y.pointerType||x.pointerType)};let P=x=>{x.pointerId===y.activePointerId&&(xt(x,y.target)?y.isOverTarget||(y.isOverTarget=!0,H(Ke(y.target,x),y.pointerType)):y.isOverTarget&&(y.isOverTarget=!1,M(Ke(y.target,x),y.pointerType,!1),b.current.shouldCancelOnPointerExit&&L(x)))},m=x=>{x.pointerId===y.activePointerId&&y.isPressed&&x.button===0&&(xt(x,y.target)?M(Ke(y.target,x),y.pointerType):y.isOverTarget&&M(Ke(y.target,x),y.pointerType,!1),y.isPressed=!1,y.isOverTarget=!1,y.activePointerId=null,y.pointerType=null,S(),f||Yt(y.target))},h=x=>{L(x)};I.onDragStart=x=>{!x.currentTarget.contains(x.target)||L(x)}}else{I.onMouseDown=h=>{h.button!==0||!h.currentTarget.contains(h.target)||(Pn(h.currentTarget)&&h.preventDefault(),h.stopPropagation(),!y.ignoreEmulatedMouseEvents&&(y.isPressed=!0,y.isOverTarget=!0,y.target=h.currentTarget,y.pointerType=qn(h.nativeEvent)?"virtual":"mouse",!s&&!l&&dt(h.currentTarget),H(h,y.pointerType),A(document,"mouseup",P,!1)))},I.onMouseEnter=h=>{!h.currentTarget.contains(h.target)||(h.stopPropagation(),y.isPressed&&!y.ignoreEmulatedMouseEvents&&(y.isOverTarget=!0,H(h,y.pointerType)))},I.onMouseLeave=h=>{!h.currentTarget.contains(h.target)||(h.stopPropagation(),y.isPressed&&!y.ignoreEmulatedMouseEvents&&(y.isOverTarget=!1,M(h,y.pointerType,!1),b.current.shouldCancelOnPointerExit&&L(h)))},I.onMouseUp=h=>{!h.currentTarget.contains(h.target)||!y.ignoreEmulatedMouseEvents&&h.button===0&&D(h,y.pointerType)};let P=h=>{if(h.button===0){if(y.isPressed=!1,S(),y.ignoreEmulatedMouseEvents){y.ignoreEmulatedMouseEvents=!1;return}xt(h,y.target)?M(Ke(y.target,h),y.pointerType):y.isOverTarget&&M(Ke(y.target,h),y.pointerType,!1),y.isOverTarget=!1}};I.onTouchStart=h=>{if(!h.currentTarget.contains(h.target))return;h.stopPropagation();let x=sh(h.nativeEvent);!x||(y.activePointerId=x.identifier,y.ignoreEmulatedMouseEvents=!0,y.isOverTarget=!0,y.isPressed=!0,y.target=h.currentTarget,y.pointerType="touch",!s&&!l&&dt(h.currentTarget),f||Kn(y.target),H(h,y.pointerType),A(window,"scroll",m,!0))},I.onTouchMove=h=>{if(!h.currentTarget.contains(h.target)||(h.stopPropagation(),!y.isPressed))return;let x=el(h.nativeEvent,y.activePointerId);x&&xt(x,h.currentTarget)?y.isOverTarget||(y.isOverTarget=!0,H(h,y.pointerType)):y.isOverTarget&&(y.isOverTarget=!1,M(h,y.pointerType,!1),b.current.shouldCancelOnPointerExit&&L(h))},I.onTouchEnd=h=>{if(!h.currentTarget.contains(h.target)||(h.stopPropagation(),!y.isPressed))return;let x=el(h.nativeEvent,y.activePointerId);x&&xt(x,h.currentTarget)?(D(h,y.pointerType),M(h,y.pointerType)):y.isOverTarget&&M(h,y.pointerType,!1),y.isPressed=!1,y.activePointerId=null,y.isOverTarget=!1,y.ignoreEmulatedMouseEvents=!0,f||Yt(y.target),S()},I.onTouchCancel=h=>{!h.currentTarget.contains(h.target)||(h.stopPropagation(),y.isPressed&&L(h))};let m=h=>{y.isPressed&&h.target.contains(y.target)&&L({currentTarget:y.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};I.onDragStart=h=>{!h.currentTarget.contains(h.target)||L(h)}}return I},[A,s,l,S,f]);return $.useEffect(()=>()=>{f||Yt(_.current.target)},[f]),{isPressed:o||w,pressProps:ie(v,O)}}function Tu(e){return e.tagName==="A"&&e.hasAttribute("href")}function En(e){const{key:t,code:r,target:n}=e,a=n,{tagName:i,isContentEditable:s}=a,o=a.getAttribute("role");return(t==="Enter"||t===" "||t==="Spacebar"||r==="Space")&&i!=="INPUT"&&i!=="TEXTAREA"&&s!==!0&&(!Tu(a)||o==="button"&&t!=="Enter")&&!(o==="link"&&t!=="Enter")}function sh(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function el(e,t){const r=e.changedTouches;for(let n=0;n<r.length;n++){const a=r[n];if(a.identifier===t)return a}return null}function Ke(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function lh(e){let t=e.width/2||e.radiusX||0,r=e.height/2||e.radiusY||0;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function uh(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function xt(e,t){let r=t.getBoundingClientRect(),n=lh(e);return uh(r,n)}function Pn(e){return!e.draggable}function tl(e){return!((e.tagName==="INPUT"||e.tagName==="BUTTON")&&e.type==="submit")}function ch(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}const fh=k.default.forwardRef(({children:e,...t},r)=>{let n=$.useRef();r=r!=null?r:n;let{pressProps:a}=lr({...t,ref:r}),i=k.default.Children.only(e);return k.default.cloneElement(i,{ref:r,...ie(i.props,a)})});var dh={};ge(dh,"PressResponder",()=>ph);const ph=k.default.forwardRef(({children:e,...t},r)=>{let n=$.useRef(!1),a=$.useContext(Or),i=ie(a||{},{...t,ref:r||(a==null?void 0:a.ref),register(){n.current=!0,a&&a.register()}});return Vr(a,r),$.useEffect(()=>{n.current||console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.")},[]),k.default.createElement(Or.Provider,{value:i},e)});var hh={};ge(hh,"useFocus",()=>Kr);function Kr(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:a}=e;const i=$.useCallback(l=>{if(l.target===l.currentTarget)return n&&n(l),a&&a(!1),!0},[n,a]),s=wu(i),o=$.useCallback(l=>{l.target===l.currentTarget&&(r&&r(l),a&&a(!0),s(l))},[a,r,s]);return{focusProps:{onFocus:!t&&(r||a||n)?o:void 0,onBlur:!t&&(n||a)?i:null}}}var Ft={};ge(Ft,"isFocusVisible",()=>ur);ge(Ft,"getInteractionModality",()=>hs);ge(Ft,"setInteractionModality",()=>$h);ge(Ft,"useInteractionModality",()=>xh);ge(Ft,"useFocusVisible",()=>Ph);ge(Ft,"useFocusVisibleListener",()=>ms);let Je=null,rr=new Set,rl=!1,pt=!1,Yn=!1;const mh={Tab:!0,Escape:!0};function qr(e,t){for(let r of rr)r(e,t)}function vh(e){return!(e.metaKey||!jr()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function nl(e){pt=!0,vh(e)&&(Je="keyboard",qr("keyboard",e))}function Et(e){Je="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(pt=!0,qr("pointer",e))}function bh(e){qn(e)&&(pt=!0,Je="virtual")}function gh(e){e.target===window||e.target===document||(!pt&&!Yn&&(Je="virtual",qr("virtual",e)),pt=!1,Yn=!1)}function yh(){pt=!1,Yn=!0}function Ir(){if(typeof window=="undefined"||rl)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){pt=!0,e.apply(this,arguments)},document.addEventListener("keydown",nl,!0),document.addEventListener("keyup",nl,!0),document.addEventListener("click",bh,!0),window.addEventListener("focus",gh,!0),window.addEventListener("blur",yh,!1),typeof PointerEvent!="undefined"?(document.addEventListener("pointerdown",Et,!0),document.addEventListener("pointermove",Et,!0),document.addEventListener("pointerup",Et,!0)):(document.addEventListener("mousedown",Et,!0),document.addEventListener("mousemove",Et,!0),document.addEventListener("mouseup",Et,!0)),rl=!0}typeof document!="undefined"&&(document.readyState!=="loading"?Ir():document.addEventListener("DOMContentLoaded",Ir));function ur(){return Je!=="pointer"}function hs(){return Je}function $h(e){Je=e,qr(e,null)}function xh(){Ir();let[e,t]=$.useState(Je);return $.useEffect(()=>{let r=()=>{t(Je)};return rr.add(r),()=>{rr.delete(r)}},[]),e}function Eh(e,t,r){return!(e&&t==="keyboard"&&r instanceof KeyboardEvent&&!mh[r.key])}function Ph(e={}){let{isTextInput:t,autoFocus:r}=e,[n,a]=$.useState(r||ur());return ms(i=>{a(i)},[t],{isTextInput:t}),{isFocusVisible:n}}function ms(e,t,r){Ir(),$.useEffect(()=>{let n=(a,i)=>{!Eh(r==null?void 0:r.isTextInput,a,i)||e(ur())};return rr.add(n),()=>{rr.delete(n)}},t)}var wh={};ge(wh,"useFocusWithin",()=>vs);function vs(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:a}=e,i=$.useRef({isFocusWithin:!1}),s=$.useCallback(u=>{i.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(i.current.isFocusWithin=!1,r&&r(u),a&&a(!1))},[r,a,i]),o=wu(s),l=$.useCallback(u=>{i.current.isFocusWithin||(n&&n(u),a&&a(!0),i.current.isFocusWithin=!0,o(u))},[n,a,o]);return t?{focusWithinProps:{onFocus:null,onBlur:null}}:{focusWithinProps:{onFocus:l,onBlur:s}}}var Th={};ge(Th,"useHover",()=>Ze);let Rr=!1,wn=0;function Jn(){Rr=!0,setTimeout(()=>{Rr=!1},50)}function al(e){e.pointerType==="touch"&&Jn()}function Sh(){if(typeof document!="undefined")return typeof PointerEvent!="undefined"?document.addEventListener("pointerup",al):document.addEventListener("touchend",Jn),wn++,()=>{wn--,!(wn>0)&&(typeof PointerEvent!="undefined"?document.removeEventListener("pointerup",al):document.removeEventListener("touchend",Jn))}}function Ze(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:a}=e,[i,s]=$.useState(!1),o=$.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;$.useEffect(Sh,[]);let{hoverProps:l,triggerHoverEnd:u}=$.useMemo(()=>{let f=(b,w)=>{if(o.pointerType=w,a||w==="touch"||o.isHovered||!b.currentTarget.contains(b.target))return;o.isHovered=!0;let T=b.currentTarget;o.target=T,t&&t({type:"hoverstart",target:T,pointerType:w}),r&&r(!0),s(!0)},g=(b,w)=>{if(o.pointerType="",o.target=null,w==="touch"||!o.isHovered)return;o.isHovered=!1;let T=b.currentTarget;n&&n({type:"hoverend",target:T,pointerType:w}),r&&r(!1),s(!1)},v={};return typeof PointerEvent!="undefined"?(v.onPointerEnter=b=>{Rr&&b.pointerType==="mouse"||f(b,b.pointerType)},v.onPointerLeave=b=>{!a&&b.currentTarget.contains(b.target)&&g(b,b.pointerType)}):(v.onTouchStart=()=>{o.ignoreEmulatedMouseEvents=!0},v.onMouseEnter=b=>{!o.ignoreEmulatedMouseEvents&&!Rr&&f(b,"mouse"),o.ignoreEmulatedMouseEvents=!1},v.onMouseLeave=b=>{!a&&b.currentTarget.contains(b.target)&&g(b,"mouse")}),{hoverProps:v,triggerHoverEnd:g}},[t,r,n,a,o]);return $.useEffect(()=>{a&&u({currentTarget:o.target},o.pointerType)},[a]),{hoverProps:l,isHovered:i}}var Ah={};ge(Ah,"useInteractOutside",()=>Su);function Su(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:a}=e,s=$.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1,onInteractOutside:r,onInteractOutsideStart:a}).current;s.onInteractOutside=r,s.onInteractOutsideStart=a,$.useEffect(()=>{if(n)return;let o=l=>{yr(l,t)&&s.onInteractOutside&&(s.onInteractOutsideStart&&s.onInteractOutsideStart(l),s.isPointerDown=!0)};if(typeof PointerEvent!="undefined"){let l=u=>{s.isPointerDown&&s.onInteractOutside&&yr(u,t)&&(s.isPointerDown=!1,s.onInteractOutside(u))};return document.addEventListener("pointerdown",o,!0),document.addEventListener("pointerup",l,!0),()=>{document.removeEventListener("pointerdown",o,!0),document.removeEventListener("pointerup",l,!0)}}else{let l=f=>{s.ignoreEmulatedMouseEvents?s.ignoreEmulatedMouseEvents=!1:s.isPointerDown&&s.onInteractOutside&&yr(f,t)&&(s.isPointerDown=!1,s.onInteractOutside(f))},u=f=>{s.ignoreEmulatedMouseEvents=!0,s.onInteractOutside&&s.isPointerDown&&yr(f,t)&&(s.isPointerDown=!1,s.onInteractOutside(f))};return document.addEventListener("mousedown",o,!0),document.addEventListener("mouseup",l,!0),document.addEventListener("touchstart",o,!0),document.addEventListener("touchend",u,!0),()=>{document.removeEventListener("mousedown",o,!0),document.removeEventListener("mouseup",l,!0),document.removeEventListener("touchstart",o,!0),document.removeEventListener("touchend",u,!0)}}},[t,s,n])}function yr(e,t){if(e.button>0)return!1;if(e.target){const r=e.target.ownerDocument;if(!r||!r.documentElement.contains(e.target))return!1}return t.current&&!t.current.contains(e.target)}var Ch={};ge(Ch,"useKeyboard",()=>Au);function il(e){if(!e)return;let t=!0;return r=>{let n={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(n),t&&r.stopPropagation()}}function Au(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:il(e.onKeyDown),onKeyUp:il(e.onKeyUp)}}}var _h={};ge(_h,"useMove",()=>kh);function kh(e){let{onMoveStart:t,onMove:r,onMoveEnd:n}=e,a=$.useRef({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:i,removeGlobalListener:s}=Wr();return{moveProps:$.useMemo(()=>{let l={},u=()=>{Kn(),a.current.didMove=!1},f=(b,w,T,_)=>{T===0&&_===0||(a.current.didMove||(a.current.didMove=!0,t==null||t({type:"movestart",pointerType:w,shiftKey:b.shiftKey,metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey})),r({type:"move",pointerType:w,deltaX:T,deltaY:_,shiftKey:b.shiftKey,metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey}))},g=(b,w)=>{Yt(),a.current.didMove&&(n==null||n({type:"moveend",pointerType:w,shiftKey:b.shiftKey,metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey}))};if(typeof PointerEvent=="undefined"){let b=A=>{A.button===0&&(f(A,"mouse",A.pageX-a.current.lastPosition.pageX,A.pageY-a.current.lastPosition.pageY),a.current.lastPosition={pageX:A.pageX,pageY:A.pageY})},w=A=>{A.button===0&&(g(A,"mouse"),s(window,"mousemove",b,!1),s(window,"mouseup",w,!1))};l.onMouseDown=A=>{A.button===0&&(u(),A.stopPropagation(),A.preventDefault(),a.current.lastPosition={pageX:A.pageX,pageY:A.pageY},i(window,"mousemove",b,!1),i(window,"mouseup",w,!1))};let T=A=>{let S=[...A.changedTouches].findIndex(({identifier:O})=>O===a.current.id);if(S>=0){let{pageX:O,pageY:y}=A.changedTouches[S];f(A,"touch",O-a.current.lastPosition.pageX,y-a.current.lastPosition.pageY),a.current.lastPosition={pageX:O,pageY:y}}},_=A=>{[...A.changedTouches].findIndex(({identifier:O})=>O===a.current.id)>=0&&(g(A,"touch"),a.current.id=null,s(window,"touchmove",T),s(window,"touchend",_),s(window,"touchcancel",_))};l.onTouchStart=A=>{if(A.changedTouches.length===0||a.current.id!=null)return;let{pageX:S,pageY:O,identifier:y}=A.changedTouches[0];u(),A.stopPropagation(),A.preventDefault(),a.current.lastPosition={pageX:S,pageY:O},a.current.id=y,i(window,"touchmove",T,!1),i(window,"touchend",_,!1),i(window,"touchcancel",_,!1)}}else{let b=T=>{if(T.pointerId===a.current.id){let _=T.pointerType||"mouse";f(T,_,T.pageX-a.current.lastPosition.pageX,T.pageY-a.current.lastPosition.pageY),a.current.lastPosition={pageX:T.pageX,pageY:T.pageY}}},w=T=>{if(T.pointerId===a.current.id){let _=T.pointerType||"mouse";g(T,_),a.current.id=null,s(window,"pointermove",b,!1),s(window,"pointerup",w,!1),s(window,"pointercancel",w,!1)}};l.onPointerDown=T=>{T.button===0&&a.current.id==null&&(u(),T.stopPropagation(),T.preventDefault(),a.current.lastPosition={pageX:T.pageX,pageY:T.pageY},a.current.id=T.pointerId,i(window,"pointermove",b,!1),i(window,"pointerup",w,!1),i(window,"pointercancel",w,!1))}}let v=(b,w,T)=>{u(),f(b,"keyboard",w,T),g(b,"keyboard")};return l.onKeyDown=b=>{switch(b.key){case"Left":case"ArrowLeft":b.preventDefault(),b.stopPropagation(),v(b,-1,0);break;case"Right":case"ArrowRight":b.preventDefault(),b.stopPropagation(),v(b,1,0);break;case"Up":case"ArrowUp":b.preventDefault(),b.stopPropagation(),v(b,0,-1);break;case"Down":case"ArrowDown":b.preventDefault(),b.stopPropagation(),v(b,0,1);break}},l},[a,t,r,n,i,s])}}var Oh={};ge(Oh,"useScrollWheel",()=>Ih);function Ih(e,t){let{onScroll:r,isDisabled:n}=e,a=$.useCallback(i=>{i.ctrlKey||(i.preventDefault(),i.stopPropagation(),r&&r({deltaX:i.deltaX,deltaY:i.deltaY}))},[r]);mu(t,"wheel",n?null:a)}var Rh={};ge(Rh,"useLongPress",()=>Lh);const Mh=500;function Lh(e){let{isDisabled:t,onLongPressStart:r,onLongPressEnd:n,onLongPress:a,threshold:i=Mh,accessibilityDescription:s}=e;const o=$.useRef(null);let{addGlobalListener:l,removeGlobalListener:u}=Wr(),{pressProps:f}=lr({isDisabled:t,onPressStart(v){if((v.pointerType==="mouse"||v.pointerType==="touch")&&(r&&r({...v,type:"longpressstart"}),o.current=setTimeout(()=>{v.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),a&&a({...v,type:"longpress"}),o.current=null},i),v.pointerType==="touch")){let b=w=>{w.preventDefault()};l(v.target,"contextmenu",b,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{u(v.target,"contextmenu",b)},30)},{once:!0})}},onPressEnd(v){o.current&&clearTimeout(o.current),n&&(v.pointerType==="mouse"||v.pointerType==="touch")&&n({...v,type:"longpressend"})}}),g=fu(a&&!t?s:null);return{longPressProps:ie(f,g)}}function Cu(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var _u={};Cu(_u,"useVisuallyHidden",()=>ku);Cu(_u,"VisuallyHidden",()=>Ou);const ol={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:1,whiteSpace:"nowrap"};function ku(e={}){let{style:t,isFocusable:r}=e,[n,a]=$.useState(!1),{focusProps:i}=Kr({isDisabled:!r,onFocusChange:a}),s=$.useMemo(()=>n?t:t?{...ol,...t}:ol,[n]);return{visuallyHiddenProps:{...i,style:s}}}function Ou(e){let{children:t,elementType:r="div",isFocusable:n,style:a,...i}=e,{visuallyHiddenProps:s}=ku(e);return k.default.createElement(r,ie(i,s),t)}function Fe(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function Nh(e){return e&&e.__esModule?e.default:e}var Dh={};Fe(Dh,"useOverlayPosition",()=>Ru);const sl={top:"top",bottom:"top",left:"left",right:"left"},Mr={top:"bottom",bottom:"top",left:"right",right:"left"},Bh={top:"left",left:"top"},Qn={top:"height",left:"width"},$r={};let Pt=typeof window!="undefined"&&window.visualViewport;function Hh(e){let t=0,r=0,n=0,a=0,i={};if(e.tagName==="BODY"){var s;t=(s=Pt==null?void 0:Pt.width)!==null&&s!==void 0?s:document.documentElement.clientWidth;var o;r=(o=Pt==null?void 0:Pt.height)!==null&&o!==void 0?o:document.documentElement.clientHeight,i.top=Qt(tr(e).documentElement)||Qt(e),i.left=Jt(tr(e).documentElement)||Jt(e)}else({width:t,height:r,top:n,left:a}=Ot(e)),i.top=Qt(e),i.left=Jt(e);return{width:t,height:r,scroll:i,top:n,left:a}}function Fh(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function ll(e,t,r,n,a){let i=n.scroll[e],s=n[Qn[e]],o=t-a-i,l=t+a-i+r;return o<0?-o:l>s?Math.max(s-l,-o):0}function Uh(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function ul(e){if($r[e])return $r[e];let[t,r]=e.split(" "),n=sl[t]||"right",a=Bh[n];sl[r]||(r="center");let i=Qn[n],s=Qn[a];return $r[e]={placement:t,crossPlacement:r,axis:n,crossAxis:a,size:i,crossSize:s},$r[e]}function Tn(e,t,r,n,a,i,s,o){let{placement:l,crossPlacement:u,axis:f,crossAxis:g,size:v,crossSize:b}=n,w={};w[g]=e[g],u==="center"?w[g]+=(e[b]-r[b])/2:u!==g&&(w[g]+=e[b]-r[b]),w[g]+=i;let T=e[g]+e[b]/2-r[b],_=e[g]+e[b]/2;if(w[g]=Math.min(Math.max(T,w[g]),_),l===f){const A=o?s[v]:t[v];w[Mr[f]]=Math.floor(A-e[f]+a)}else w[f]=Math.floor(e[f]+e[v]+a);return w}function Wh(e,t,r,n,a,i){return e.top!=null?Math.max(0,t.height+t.top+t.scroll.top-(r.top+e.top)-(a.top+a.bottom+i)):Math.max(0,n.top+r.top-(t.top+t.scroll.top)-(a.top+a.bottom+i))}function cl(e,t,r,n,a,i){let{placement:s,axis:o,size:l}=i;return s===o?Math.max(0,r[o]-e[o]-e.scroll[o]+t[o]-n[o]-n[Mr[o]]-a):Math.max(0,e[l]+e[o]+e.scroll[o]-t[o]-r[o]-r[l]-n[o]-n[Mr[o]]-a)}function Vh(e,t,r,n,a,i,s,o,l,u,f,g,v){let b=ul(e),{size:w,crossAxis:T,crossSize:_,placement:A,crossPlacement:S}=b,O=Tn(t,o,r,b,u,f,l,g),y=u,H=cl(o,l,t,a,i+u,b);if(s&&n[w]>H){let I=ul(`${Mr[A]} ${S}`),B=Tn(t,o,r,I,u,f,l,g);cl(o,l,t,a,i+u,I)>H&&(b=I,O=B,y=u)}let M=ll(T,O[T],r[_],o,i);O[T]+=M;let D=Wh(O,o,l,t,a,i);v&&v<D&&(D=v),r.height=Math.min(r.height,D),O=Tn(t,o,r,b,y,f,l,g),M=ll(T,O[T],r[_],o,i),O[T]+=M;let L={};return L[T]=t[T]-O[T]+t[_]/2,{position:O,maxHeight:D,arrowOffsetLeft:L.left,arrowOffsetTop:L.top,placement:b.placement}}function jh(e){let{placement:t,targetNode:r,overlayNode:n,scrollNode:a,padding:i,shouldFlip:s,boundaryElement:o,offset:l,crossOffset:u,maxHeight:f}=e,g=n.offsetParent||document.body,v=g.tagName==="BODY";const b=window.getComputedStyle(g).position;let w=!!b&&b!=="static",T=v?Ot(r):Zs(r,g);if(!v){let H=String(tt(r,"marginTop")),M=String(tt(r,"marginLeft"));T.top+=parseInt(H,10)||0,T.left+=parseInt(M,10)||0}let _=Ot(n),A=Uh(n);_.width+=A.left+A.right,_.height+=A.top+A.bottom;let S=Fh(a),O=Hh(o),y=o.tagName==="BODY"?Ot(g):Zs(g,o);return Vh(t,T,_,S,A,i,s,O,y,l,u,w,f)}const Iu=new WeakMap;function Gh(e){let{triggerRef:t,isOpen:r,onClose:n}=e;$.useEffect(()=>{if(!r)return;let a=i=>{let s=i.target;if(!t.current||s instanceof Node&&!s.contains(t.current))return;let o=n||Iu.get(t.current);o&&o()};return window.addEventListener("scroll",a,!0),()=>{window.removeEventListener("scroll",a,!0)}},[r,n,t])}let wt=typeof window!="undefined"&&window.visualViewport;function Ru(e){let{direction:t}=Qe(),{targetRef:r,overlayRef:n,scrollRef:a=n,placement:i="bottom",containerPadding:s=12,shouldFlip:o=!0,boundaryElement:l=typeof document!="undefined"?document.body:null,offset:u=0,crossOffset:f=0,shouldUpdatePosition:g=!0,isOpen:v=!0,onClose:b,maxHeight:w}=e,[T,_]=$.useState({position:{},arrowOffsetLeft:void 0,arrowOffsetTop:void 0,maxHeight:void 0,placement:void 0}),A=[g,i,n.current,r.current,a.current,s,o,l,u,f,v,t,w],S=$.useCallback(()=>{g===!1||!v||!n.current||!r.current||!a.current||!l||_(jh({placement:Xh(i,t),overlayNode:n.current,targetNode:r.current,scrollNode:a.current,padding:s,shouldFlip:o,boundaryElement:l,offset:u,crossOffset:f,maxHeight:w}))},A);ve(S,A),zh(S);let O=$.useRef(!1);ve(()=>{let H,M=()=>{O.current=!0,clearTimeout(H),H=setTimeout(()=>{O.current=!1},500),S()};return wt==null||wt.addEventListener("resize",M),()=>{wt==null||wt.removeEventListener("resize",M)}},[S]);let y=$.useCallback(()=>{O.current||b()},[b,O]);return Gh({triggerRef:r,isOpen:v,onClose:b?y:void 0}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...T.position,maxHeight:T.maxHeight}},placement:T.placement,arrowProps:{style:{left:T.arrowOffsetLeft,top:T.arrowOffsetTop}},updatePosition:S}}function zh(e){ve(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function Xh(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}var Kh={};Fe(Kh,"useOverlay",()=>Yr);const qe=[];function Yr(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:a,isDismissable:i=!1,isKeyboardDismissDisabled:s=!1,shouldCloseOnInteractOutside:o}=e;$.useEffect(()=>(a&&qe.push(t),()=>{let w=qe.indexOf(t);w>=0&&qe.splice(w,1)}),[a,t]);let l=()=>{qe[qe.length-1]===t&&r&&r()},u=w=>{(!o||o(w.target))&&qe[qe.length-1]===t&&(w.stopPropagation(),w.preventDefault())},f=w=>{(!o||o(w.target))&&(qe[qe.length-1]===t&&(w.stopPropagation(),w.preventDefault()),l())},g=w=>{w.key==="Escape"&&!s&&(w.stopPropagation(),w.preventDefault(),l())};Su({ref:t,onInteractOutside:i?f:null,onInteractOutsideStart:u});let{focusWithinProps:v}=vs({isDisabled:!n,onBlurWithin:w=>{(!o||o(w.relatedTarget))&&r()}}),b=w=>{w.target===w.currentTarget&&w.preventDefault()};return{overlayProps:{onKeyDown:g,...v},underlayProps:{onPointerDown:b}}}var qh={};Fe(qh,"useOverlayTrigger",()=>Yh);function Yh(e,t,r){let{type:n}=e,{isOpen:a}=t;$.useEffect(()=>{r&&r.current&&Iu.set(r.current,t.close)});let i;n==="menu"?i=!0:n==="listbox"&&(i="listbox");let s=nr();return{triggerProps:{"aria-haspopup":i,"aria-expanded":a,"aria-controls":a?s:null},overlayProps:{id:s}}}var Jh={};Fe(Jh,"usePreventScroll",()=>bs);const Sn=typeof window!="undefined"&&window.visualViewport,Qh=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function bs(e={}){let{isDisabled:t}=e;ve(()=>{if(!t)return ar()?em():Zh()},[t])}function Zh(){return Nt(Zt(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Zt(document.documentElement,"overflow","hidden"))}function em(){let e,t=0,r=g=>{e=is(g.target),!(e===document.documentElement&&e===document.body)&&(t=g.changedTouches[0].pageY)},n=g=>{if(e===document.documentElement||e===document.body){g.preventDefault();return}let v=g.changedTouches[0].pageY,b=e.scrollTop,w=e.scrollHeight-e.clientHeight;(b<=0&&v>t||b>=w&&v<t)&&g.preventDefault(),t=v},a=g=>{let v=g.target;dl(v)&&v!==document.activeElement&&(g.preventDefault(),v.style.transform="translateY(-2000px)",v.focus(),requestAnimationFrame(()=>{v.style.transform=""}))},i=g=>{let v=g.target;dl(v)&&(v.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{v.style.transform="",Sn&&(Sn.height<window.innerHeight?requestAnimationFrame(()=>{fl(v)}):Sn.addEventListener("resize",()=>fl(v),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},o=window.pageXOffset,l=window.pageYOffset,u=Nt(Zt(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Zt(document.documentElement,"overflow","hidden"),Zt(document.body,"marginTop",`-${l}px`));window.scrollTo(0,0);let f=Nt(jt(document,"touchstart",r,{passive:!1,capture:!0}),jt(document,"touchmove",n,{passive:!1,capture:!0}),jt(document,"touchend",a,{passive:!1,capture:!0}),jt(document,"focus",i,!0),jt(window,"scroll",s));return()=>{u(),f(),window.scrollTo(o,l)}}function Zt(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function jt(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function fl(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let r=is(e);if(r!==document.documentElement&&r!==document.body&&r!==e){let n=r.getBoundingClientRect().top,a=e.getBoundingClientRect().top;a>n+e.clientHeight&&(r.scrollTop+=a-n)}e=r.parentElement}}function dl(e){return e instanceof HTMLInputElement&&!Qh.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var cr={};Fe(cr,"ModalProvider",()=>gs);Fe(cr,"useModalProvider",()=>ys);Fe(cr,"OverlayProvider",()=>Mu);Fe(cr,"OverlayContainer",()=>rm);Fe(cr,"useModal",()=>Jr);const Lr=k.default.createContext(null);function gs(e){let{children:t}=e,r=$.useContext(Lr),[n,a]=$.useState(0),i=$.useMemo(()=>({parent:r,modalCount:n,addModal(){a(s=>s+1),r&&r.addModal()},removeModal(){a(s=>s-1),r&&r.removeModal()}}),[r,n]);return k.default.createElement(Lr.Provider,{value:i},t)}function ys(){let e=$.useContext(Lr);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:null}}}function tm(e){let{modalProviderProps:t}=ys();return k.default.createElement("div",{"data-overlay-container":!0,...e,...t})}function Mu(e){return k.default.createElement(gs,null,k.default.createElement(tm,e))}function rm(e){let{portalContainer:t=document.body,...r}=e;k.default.useEffect(()=>{if(t.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[t]);let n=k.default.createElement(Mu,r);return Nr.default.createPortal(n,t)}function Jr(e){let t=$.useContext(Lr);if(!t)throw new Error("Modal is not contained within a provider");return $.useEffect(()=>{if(!((e==null?void 0:e.isDisabled)||!t||!t.parent))return t.parent.addModal(),()=>{t&&t.parent&&t.parent.removeModal()}},[t,t.parent,e==null?void 0:e.isDisabled]),{modalProps:{"data-ismodal":!(e!=null&&e.isDisabled)}}}var nm={};Fe(nm,"DismissButton",()=>am);var Lu={},Nu={};Nu=JSON.parse('{"dismiss":"\u062A\u062C\u0627\u0647\u0644"}');var Du={};Du=JSON.parse('{"dismiss":"\u041E\u0442\u0445\u0432\u044A\u0440\u043B\u044F\u043D\u0435"}');var Bu={};Bu=JSON.parse('{"dismiss":"Odstranit"}');var Hu={};Hu=JSON.parse('{"dismiss":"Luk"}');var Fu={};Fu=JSON.parse('{"dismiss":"Schlie\xDFen"}');var Uu={};Uu=JSON.parse('{"dismiss":"\u0391\u03C0\u03CC\u03C1\u03C1\u03B9\u03C8\u03B7"}');var Wu={};Wu=JSON.parse('{"dismiss":"Dismiss"}');var Vu={};Vu=JSON.parse('{"dismiss":"Descartar"}');var ju={};ju=JSON.parse('{"dismiss":"L\xF5peta"}');var Gu={};Gu=JSON.parse('{"dismiss":"Hylk\xE4\xE4"}');var zu={};zu=JSON.parse('{"dismiss":"Rejeter"}');var Xu={};Xu=JSON.parse('{"dismiss":"\u05D4\u05EA\u05E2\u05DC\u05DD"}');var Ku={};Ku=JSON.parse('{"dismiss":"Odbaci"}');var qu={};qu=JSON.parse('{"dismiss":"Elutas\xEDt\xE1s"}');var Yu={};Yu=JSON.parse('{"dismiss":"Ignora"}');var Ju={};Ju=JSON.parse('{"dismiss":"\u9589\u3058\u308B"}');var Qu={};Qu=JSON.parse('{"dismiss":"\uBB34\uC2DC"}');var Zu={};Zu=JSON.parse('{"dismiss":"Atmesti"}');var ec={};ec=JSON.parse('{"dismiss":"Ner\u0101d\u012Bt"}');var tc={};tc=JSON.parse('{"dismiss":"Lukk"}');var rc={};rc=JSON.parse('{"dismiss":"Negeren"}');var nc={};nc=JSON.parse('{"dismiss":"Zignoruj"}');var ac={};ac=JSON.parse('{"dismiss":"Descartar"}');var ic={};ic=JSON.parse('{"dismiss":"Dispensar"}');var oc={};oc=JSON.parse('{"dismiss":"Revocare"}');var sc={};sc=JSON.parse('{"dismiss":"\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C"}');var lc={};lc=JSON.parse('{"dismiss":"Zru\u0161i\u0165"}');var uc={};uc=JSON.parse('{"dismiss":"Opusti"}');var cc={};cc=JSON.parse('{"dismiss":"Odbaci"}');var fc={};fc=JSON.parse('{"dismiss":"Avvisa"}');var dc={};dc=JSON.parse('{"dismiss":"Kapat"}');var pc={};pc=JSON.parse('{"dismiss":"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"}');var hc={};hc=JSON.parse('{"dismiss":"\u53D6\u6D88"}');var mc={};mc=JSON.parse('{"dismiss":"\u95DC\u9589"}');Lu={"ar-AE":Nu,"bg-BG":Du,"cs-CZ":Bu,"da-DK":Hu,"de-DE":Fu,"el-GR":Uu,"en-US":Wu,"es-ES":Vu,"et-EE":ju,"fi-FI":Gu,"fr-FR":zu,"he-IL":Xu,"hr-HR":Ku,"hu-HU":qu,"it-IT":Yu,"ja-JP":Ju,"ko-KR":Qu,"lt-LT":Zu,"lv-LV":ec,"nb-NO":tc,"nl-NL":rc,"pl-PL":nc,"pt-BR":ac,"pt-PT":ic,"ro-RO":oc,"ru-RU":sc,"sk-SK":lc,"sl-SI":uc,"sr-SP":cc,"sv-SE":fc,"tr-TR":dc,"uk-UA":pc,"zh-CN":hc,"zh-TW":mc};function am(e){let{onDismiss:t,...r}=e,n=ru(Nh(Lu)),a=uu(r,n("dismiss")),i=()=>{t&&t()};return k.default.createElement(Ou,null,k.default.createElement("button",{...a,tabIndex:-1,onClick:i}))}var im={};Fe(im,"ariaHideOutside",()=>om);let Gt=new WeakMap;function om(e,t=document.body){let r=new Set(e),n=new Set,a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(l){return l instanceof HTMLElement&&l.dataset.liveAnnouncer==="true"&&r.add(l),r.has(l)||n.has(l.parentElement)?NodeFilter.FILTER_REJECT:l instanceof HTMLElement&&l.getAttribute("role")==="row"||e.some(u=>l.contains(u))?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}}),i=l=>{var u;let f=(u=Gt.get(l))!==null&&u!==void 0?u:0;l.getAttribute("aria-hidden")==="true"&&f===0||(f===0&&l.setAttribute("aria-hidden","true"),n.add(l),Gt.set(l,f+1))},s=a.nextNode();for(;s!=null;)i(s),s=a.nextNode();let o=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...r,...n].some(f=>f.contains(u.target)))for(let f of u.addedNodes)f instanceof HTMLElement&&f.dataset.liveAnnouncer==="true"?r.add(f):f instanceof Element&&i(f)});return o.observe(t,{childList:!0,subtree:!0}),()=>{o.disconnect();for(let l of n){let u=Gt.get(l);u===1?(l.removeAttribute("aria-hidden"),Gt.delete(l)):Gt.set(l,u-1)}}}function pl(e){return e&&e.__esModule?e.default:e}function bt(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var $s={};bt($s,"useProvider",()=>Ut);bt($s,"Provider",()=>Es);bt($s,"useProviderProps",()=>fr);var vc={};bt(vc,"spectrum",()=>Zn,e=>Zn=e);var Zn;Zn="spectrum_b37d53";var Qr={};bt(Qr,"spectrum",()=>ea,e=>ea=e);bt(Qr,"spectrum-Body",()=>ta,e=>ta=e);bt(Qr,"spectrum-Body--italic",()=>ra,e=>ra=e);var ea,ta,ra;ea="spectrum_2a241c";ta="spectrum-Body_2a241c";ra="spectrum-Body--italic_2a241c";function sm(e,t){let r=_r("(prefers-color-scheme: dark)"),n=_r("(prefers-color-scheme: light)");return e.dark&&r?"dark":e.light&&n?"light":e.dark&&t==="dark"?"dark":e.light&&t==="light"||!e.dark||e.light?"light":"dark"}function lm(e){return _r("(any-pointer: fine)")&&e.medium?"medium":e.large?"large":"medium"}var bc={};bc=JSON.parse('{"name":"@react-spectrum/provider","version":"3.4.1","description":"Spectrum UI components in React","license":"Apache-2.0","main":"dist/main.js","module":"dist/module.js","types":"dist/types.d.ts","source":"src/index.ts","files":["dist","src"],"sideEffects":["*.css"],"targets":{"main":{"includeNodeModules":["@adobe/spectrum-css-temp"]},"module":{"includeNodeModules":["@adobe/spectrum-css-temp"]}},"repository":{"type":"git","url":"https://github.com/adobe/react-spectrum"},"dependencies":{"@babel/runtime":"^7.6.2","@react-aria/i18n":"^3.4.1","@react-aria/overlays":"^3.9.1","@react-aria/utils":"^3.13.1","@react-spectrum/utils":"^3.7.1","@react-types/provider":"^3.5.1","@react-types/shared":"^3.13.1","clsx":"^1.1.1"},"devDependencies":{"@adobe/spectrum-css-temp":"3.0.0-alpha.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"},"publishConfig":{"access":"public"}}');const xs=k.default.createContext(null);xs.displayName="ProviderContext";const um={S:640,M:768,L:1024,XL:1280,XXL:1536};function cm(e,t){let r=Ut(),n=r&&r.colorScheme,a=r&&r.breakpoints,{theme:i=r&&r.theme,defaultColorScheme:s}=e,o=sm(i,s),l=lm(i),{locale:u}=Qe(),f=!!i[n],{colorScheme:g=f?n:o,scale:v=r?r.scale:l,locale:b=r?u:null,breakpoints:w=r?a:um,children:T,isQuiet:_,isEmphasized:A,isDisabled:S,isRequired:O,isReadOnly:y,validationState:H,...M}=e,D={version:bc.version,theme:i,breakpoints:w,colorScheme:g,scale:v,isQuiet:_,isEmphasized:A,isDisabled:S,isRequired:O,isReadOnly:y,validationState:H},L=yu(w),I={};Object.entries(D).forEach(([x,p])=>p!==void 0&&(I[x]=p));let B=Object.assign({},r,I),P=T,m=be(M),{styleProps:h}=le(M,void 0,{matchedBreakpoints:L});return(!r||e.locale||i!==r.theme||g!==r.colorScheme||v!==r.scale||Object.keys(m).length>0||M.UNSAFE_className||Object.keys(h.style).length>0)&&(P=k.default.createElement(fm,{...e,UNSAFE_style:{isolation:r?void 0:"isolate",...h.style},ref:t},P)),k.default.createElement(xs.Provider,{value:B},k.default.createElement(tu,{locale:b},k.default.createElement(gu,{matchedBreakpoints:L},k.default.createElement(gs,null,P))))}let Es=k.default.forwardRef(cm);const fm=k.default.forwardRef(function(t,r){let{children:n,...a}=t,{locale:i,direction:s}=Qe(),{theme:o,colorScheme:l,scale:u}=Ut(),{modalProviderProps:f}=ys(),{styleProps:g}=le(a),v=Se(r),b=Object.keys(o[l])[0],w=Object.keys(o[u])[0],T=Dr(g.className,pl(vc).spectrum,pl(Qr).spectrum,o[l][b],o[u][w],o.global?Object.values(o.global):null,{"react-spectrum-provider":rt,spectrum:rt,[b]:rt,[w]:rt});var _,A;let S={...g.style,colorScheme:(A=(_=t.colorScheme)!==null&&_!==void 0?_:l)!==null&&A!==void 0?A:Object.keys(o).filter(y=>y==="light"||y==="dark").join(" ")},O=$.useRef(!1);return $.useEffect(()=>{if(s&&v.current){let y=v.current.parentElement.closest("[dir]"),H=y&&y.getAttribute("dir");H&&H!==s&&!O.current&&(console.warn(`Language directions cannot be nested. ${s} inside ${H}.`),O.current=!0)}},[s,v,O]),k.default.createElement("div",{...be(a),...g,...f,className:T,style:S,lang:i,dir:s,ref:v},n)});function Ut(){return $.useContext(xs)}function fr(e){let t=Ut();return t?Object.assign({},{isQuiet:t.isQuiet,isEmphasized:t.isEmphasized,isDisabled:t.isDisabled,isRequired:t.isRequired,isReadOnly:t.isReadOnly,validationState:t.validationState},e):e}function zt(e){return e&&e.__esModule?e.default:e}function Ue(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var gc={};Ue(gc,"spectrum--darkest",()=>na,e=>na=e);var na;na="spectrum--darkest_256eeb";var st={};Ue(st,"spectrum",()=>aa,e=>aa=e);Ue(st,"spectrum--medium",()=>ia,e=>ia=e);Ue(st,"spectrum--large",()=>oa,e=>oa=e);Ue(st,"spectrum--darkest",()=>sa,e=>sa=e);Ue(st,"spectrum--dark",()=>la,e=>la=e);Ue(st,"spectrum--light",()=>ua,e=>ua=e);Ue(st,"spectrum--lightest",()=>ca,e=>ca=e);var aa,ia,oa,sa,la,ua,ca;aa="spectrum_9e130c";ia="spectrum--medium_9e130c";oa="spectrum--large_9e130c";sa="spectrum--darkest_9e130c";la="spectrum--dark_9e130c";ua="spectrum--light_9e130c";ca="spectrum--lightest_9e130c";var yc={};Ue(yc,"spectrum--large",()=>fa,e=>fa=e);var fa;fa="spectrum--large_c40598";var $c={};Ue($c,"spectrum--light",()=>da,e=>da=e);var da;da="spectrum--light_a40724";var xc={};Ue(xc,"spectrum--medium",()=>pa,e=>pa=e);var pa;pa="spectrum--medium_4b172c";let dm={global:zt(st),light:zt($c),dark:zt(gc),medium:zt(xc),large:zt(yc)};const K=e=>{const t=$.useContext(e);if(!t)throw new Error(`Cannot find ${e}Provider`);return t},pm=10,De={templateArea:{artwork:"row1-1",trackInfo:"row1-2",trackTimeCurrent:"row1-3",trackTimeDuration:"row1-4",progress:"row1-5",repeatType:"row1-6",volume:"row1-7",playButton:"row1-8",playList:"row1-9"}},oe=$.createContext(null);function hm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ec(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}),t}var Zr={exports:{}},en={};/**
|
|
3
|
+
`,nt.MISSING_INTL_API,s);var g=r.getPluralRules(t,{type:p.pluralType}).select(b-(p.offset||0));O=p.options[g]||p.options.other}if(!O)throw new Zn(p.value,b,Object.keys(p.options),s);o.push.apply(o,Lt(O.value,t,r,n,a,b-(p.offset||0)));continue}}return ks(o)}function Rs(e,t){return t?J(J(J({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=J(J({},e[n]),t[n]||{}),r},{})):e}function _s(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=Rs(e[n],t[n]),r},J({},e)):e}function vr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Ms(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:pr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,dr([void 0],r,!1)))},{cache:vr(e.number),strategy:mr.variadic}),getDateTimeFormat:pr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,dr([void 0],r,!1)))},{cache:vr(e.dateTime),strategy:mr.variadic}),getPluralRules:pr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,dr([void 0],r,!1)))},{cache:vr(e.pluralRules),strategy:mr.variadic})}}var Ls=function(){function e(t,r,n,a){var i=this;if(r===void 0&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(s){var o=i.formatToParts(s);if(o.length===1)return o[0].value;var l=o.reduce(function(h,p){return!h.length||p.type!==se.literal||typeof h[h.length-1]!="string"?h.push(p.value):h[h.length-1]+=p.value,h},[]);return l.length<=1?l[0]||"":l},this.formatToParts=function(s){return Lt(i.ast,i.locales,i.formatters,i.formats,s,void 0,i.message)},this.resolvedOptions=function(){return{locale:i.resolvedLocale.toString()}},this.getAst=function(){return i.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:a==null?void 0:a.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=_s(e.formats,n),this.formatters=a&&a.formatters||Ms(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=$s,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Is=Ls;function Ua(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Ns={};Ua(Ns,"MessageDictionary",()=>ja);class ja{getStringForLocale(t,r){let n=this.messages[r];n||(n=Ds(r,this.messages,this.defaultLocale),this.messages[r]=n);let a=n[t];if(!a)throw new Error(`Could not find intl message ${t} in ${r} locale`);return a}constructor(t,r="en-US"){this.messages={...t},this.defaultLocale=r}}function Ds(e,t,r="en-US"){if(t[e])return t[e];let n=Bs(e);if(t[n])return t[n];for(let a in t)if(a.startsWith(n+"-"))return t[a];return t[r]}function Bs(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}var Hs={};Ua(Hs,"MessageFormatter",()=>Ga);class Ga{format(t,r){let n=this.cache[t];if(!n){let i=this.messages.getStringForLocale(t,this.locale);if(!i)throw new Error(`Could not find intl message ${t} in ${this.locale} locale`);n=new Is(i,this.locale),this.cache[t]=n}let a;return r&&(a=Object.keys(r).reduce((i,s)=>(i[s]=r[s]==null?!1:r[s],i),{})),n.format(a)}constructor(t,r){this.locale=t,this.messages=r,this.cache={}}}let gr=new Map;class Fs{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} \u2013 ${this.formatter.format(r)}`}formatRangeToParts(t,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(t),a=this.formatter.formatToParts(r);return[...n.map(i=>({...i,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...a.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return Us()&&(this.resolvedHourCycle||(this.resolvedHourCycle=js(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,r={}){this.formatter=za(t,r),this.options=r}}const Ws={true:{ja:"h11"},false:{}};function za(e,t={}){if(typeof t.hour12=="boolean"&&Vs()){t={...t};let a=Ws[String(t.hour12)][e.split("-")[0]],i=t.hour12?"h12":"h23";t.hourCycle=a!=null?a:i,delete t.hour12}let r=e+(t?Object.entries(t).sort((a,i)=>a[0]<i[0]?-1:1).join():"");if(gr.has(r))return gr.get(r);let n=new Intl.DateTimeFormat(e,t);return gr.set(r,n),n}let br=null;function Vs(){return br==null&&(br=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),br}let yr=null;function Us(){return yr==null&&(yr=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),yr}function js(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=za(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(i=>i.type==="hour").value,10),a=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(i=>i.type==="hour").value,10);if(n===0&&a===23)return"h23";if(n===24&&a===23)return"h24";if(n===0&&a===11)return"h11";if(n===12&&a===11)return"h12";throw new Error("Unexpected hour cycle result")}let $r=new Map,Br=!1;try{Br=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Bt=!1;try{Bt=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Xa={degree:{narrow:{default:"\xB0","ja-JP":" \u5EA6","zh-TW":"\u5EA6","sl-SI":" \xB0"}}};class Gs{format(t){let r="";if(!Br&&this.options.signDisplay!=null?r=Xs(this.numberFormatter,this.options.signDisplay,t):r=this.numberFormatter.format(t),this.options.style==="unit"&&!Bt){var n;let{unit:a,unitDisplay:i="short",locale:s}=this.resolvedOptions(),o=(n=Xa[a])===null||n===void 0?void 0:n[i];r+=o[s]||o.default}return r}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,r){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} \u2013 ${this.format(r)}`}formatRangeToParts(t,r){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.numberFormatter.formatToParts(t),a=this.numberFormatter.formatToParts(r);return[...n.map(i=>({...i,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...a.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!Br&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Bt&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,r={}){this.numberFormatter=zs(t,r),this.options=r}}function zs(e,t={}){let{numberingSystem:r}=t;if(r&&e.indexOf("-u-nu-")===-1&&(e=`${e}-u-nu-${r}`),t.style==="unit"&&!Bt){var n;let{unit:s,unitDisplay:o="short"}=t;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((n=Xa[s])===null||n===void 0)&&n[o]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${o}`);t={...t,style:"decimal"}}let a=e+(t?Object.entries(t).sort((s,o)=>s[0]<o[0]?-1:1).join():"");if($r.has(a))return $r.get(a);let i=new Intl.NumberFormat(e,t);return $r.set(a,i),i}function Xs(e,t,r){if(t==="auto")return e.format(r);if(t==="never")return e.format(Math.abs(r));{let n=!1;if(t==="always"?n=r>0||Object.is(r,0):t==="exceptZero"&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),n){let a=e.format(-r),i=e.format(r),s=a.replace(i,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),a.replace(i,"!!!").replace(s,"+").replace("!!!",i)}else return e.format(r)}}function je(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Ka={};je(Ka,"I18nProvider",()=>Za);je(Ka,"useLocale",()=>_e);const Ks=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Ys=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Ya(e){if(Intl.Locale){let r=new Intl.Locale(e).maximize().script;return Ks.has(r)}let t=e.split("-")[0];return Ys.has(t)}function qa(){let e=typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Ya(e)?"rtl":"ltr"}}let Hr=qa(),ct=new Set;function ea(){Hr=qa();for(let e of ct)e(Hr)}function Ja(){let e=at(),[t,r]=P.useState(Hr);return P.useEffect(()=>(ct.size===0&&window.addEventListener("languagechange",ea),ct.add(r),()=>{ct.delete(r),ct.size===0&&window.removeEventListener("languagechange",ea)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const Qa=W.default.createContext(null);function Za(e){let{locale:t,children:r}=e,n=Ja(),a=t?{locale:t,direction:Ya(t)?"rtl":"ltr"}:n;return W.default.createElement(Qa.Provider,{value:a},r)}function _e(){let e=Ja();return P.useContext(Qa)||e}var qs={};je(qs,"useMessageFormatter",()=>ei);const ta=new WeakMap;function Js(e){let t=ta.get(e);return t||(t=new ja(e),ta.set(e,t)),t}function ei(e){let{locale:t}=_e(),r=P.useMemo(()=>Js(e),[e]),n=P.useMemo(()=>new Ga(t,r),[t,r]);return P.useCallback((a,i)=>n.format(a,i),[n])}var Qs={};je(Qs,"useDateFormatter",()=>Zs);function Zs(e){let t=P.useRef(null);e&&t.current&&el(e,t.current)&&(e=t.current),t.current=e;let{locale:r}=_e();return P.useMemo(()=>new Fs(r,e),[r,e])}function el(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a of r)if(t[a]!==e[a])return!1;return!0}var tl={};je(tl,"useNumberFormatter",()=>rl);function rl(e={}){let{locale:t}=_e();return P.useMemo(()=>new Gs(t,e),[t,e])}var nl={};je(nl,"useCollator",()=>ti);let wr=new Map;function ti(e){let{locale:t}=_e(),r=t+(e?Object.entries(e).sort((a,i)=>a[0]<i[0]?-1:1).join():"");if(wr.has(r))return wr.get(r);let n=new Intl.Collator(t,e);return wr.set(r,n),n}var al={};je(al,"useFilter",()=>il);function il(e){let t=ti({usage:"search",...e});return{startsWith(r,n){return n.length===0?!0:(r=r.normalize("NFC"),n=n.normalize("NFC"),t.compare(r.slice(0,n.length),n)===0)},endsWith(r,n){return n.length===0?!0:(r=r.normalize("NFC"),n=n.normalize("NFC"),t.compare(r.slice(-n.length),n)===0)},contains(r,n){if(n.length===0)return!0;r=r.normalize("NFC"),n=n.normalize("NFC");let a=0,i=n.length;for(;a+i<=r.length;a++){let s=r.slice(a,a+i);if(t.compare(n,s)===0)return!0}return!1}}}function qt(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var ol={};qt(ol,"useControlledState",()=>sl);function sl(e,t,r){let[n,a]=P.useState(e||t),i=P.useRef(e!==void 0),s=i.current,o=e!==void 0,l=P.useRef(n);s!==o&&console.warn(`WARN: A component changed from ${s?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}.`),i.current=o;let h=P.useCallback((p,...w)=>{let b=(v,...x)=>{r&&(Object.is(l.current,v)||r(v,...x)),o||(l.current=v)};typeof p=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),a((x,...A)=>{let k=p(o?l.current:x,...A);return b(k,...w),o?x:k})):(o||a(p),b(p,...w))},[o,r]);return o?l.current=e:e=n,[e,h]}var wn={};qt(wn,"clamp",()=>ri);qt(wn,"snapValueToStep",()=>ni);qt(wn,"toFixedNumber",()=>ll);function ri(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function ni(e,t,r,n){let a=(e-(isNaN(t)?0:t))%n,i=Math.abs(a)*2>=n?e+Math.sign(a)*(n-Math.abs(a)):e-a;isNaN(t)?!isNaN(r)&&i>r&&(i=Math.floor(r/n)*n):i<t?i=t:!isNaN(r)&&i>r&&(i=t+Math.floor((r-t)/n)*n);let s=n.toString(),o=s.indexOf("."),l=o>=0?s.length-o:0;if(l>0){let h=Math.pow(10,l);i=Math.round(i*h)/h}return i}function ll(e,t,r=10){const n=Math.pow(r,t);return Math.round(e*n)/n}function q(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var En={};q(En,"useId",()=>Jt);q(En,"mergeIds",()=>ai);q(En,"useSlotId",()=>cl);var ul={};q(ul,"useLayoutEffect",()=>he);const he=typeof window!="undefined"?W.default.useLayoutEffect:()=>{};let Ht=new Map;function Jt(e){let[t,r]=P.useState(e),n=P.useRef(null),a=Ta(t),i=P.useCallback(s=>{n.current=s},[]);return Ht.set(a,i),he(()=>{let s=a;return()=>{Ht.delete(s)}},[a]),P.useEffect(()=>{let s=n.current;s&&(n.current=null,r(s))}),a}function ai(e,t){if(e===t)return e;let r=Ht.get(e);if(r)return r(t),t;let n=Ht.get(t);return n?(n(e),e):t}function cl(e=[]){let t=Jt(),[r,n]=Cn(t),a=P.useCallback(()=>{n(function*(){yield t,yield document.getElementById(t)?t:null})},[t,n]);return he(a,[t,a,...e]),r}var fl={};q(fl,"chain",()=>bt);function bt(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}var dl={};q(dl,"mergeProps",()=>Pe);function Pe(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let a in n){let i=t[a],s=n[a];typeof i=="function"&&typeof s=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=bt(i,s):(a==="className"||a==="UNSAFE_className")&&typeof i=="string"&&typeof s=="string"?t[a]=vn(i,s):a==="id"&&i&&s?t.id=ai(i,s):t[a]=s!==void 0?s:i}}return t}var hl={};q(hl,"mergeRefs",()=>pl);function pl(...e){return t=>{for(let r of e)typeof r=="function"?r(t):r!=null&&(r.current=t)}}var ml={};q(ml,"filterDOMProps",()=>xe);const vl=new Set(["id"]),gl=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),bl=/^(data-.*)$/;function xe(e,t={}){let{labelable:r,propNames:n}=t,a={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(vl.has(i)||r&&gl.has(i)||(n==null?void 0:n.has(i))||bl.test(i))&&(a[i]=e[i]);return a}var yl={};q(yl,"focusWithoutScrolling",()=>ft);function ft(e){if($l())e.focus({preventScroll:!0});else{let t=wl(e);e.focus(),El(t)}}let St=null;function $l(){if(St==null){St=!1;try{var e=document.createElement("div");e.focus({get preventScroll(){return St=!0,!0}})}catch{}}return St}function wl(e){for(var t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function El(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}var Pl={};q(Pl,"getOffset",()=>ii);function ii(e,t,r="horizontal"){let n=e.getBoundingClientRect();return t?r==="horizontal"?n.right:n.bottom:r==="horizontal"?n.left:n.top}var oi={};q(oi,"clamp",()=>ri);q(oi,"snapValueToStep",()=>ni);var xl={};q(xl,"runAfterTransition",()=>si);let Qe=new Map,Fr=new Set;function ra(){if(typeof window=="undefined")return;let e=r=>{let n=Qe.get(r.target);n||(n=new Set,Qe.set(r.target,n),r.target.addEventListener("transitioncancel",t)),n.add(r.propertyName)},t=r=>{let n=Qe.get(r.target);if(!!n&&(n.delete(r.propertyName),n.size===0&&(r.target.removeEventListener("transitioncancel",t),Qe.delete(r.target)),Qe.size===0)){for(let a of Fr)a();Fr.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document!="undefined"&&(document.readyState!=="loading"?ra():document.addEventListener("DOMContentLoaded",ra));function si(e){requestAnimationFrame(()=>{Qe.size===0?e():Fr.add(e)})}var Al={};q(Al,"useDrag1D",()=>Tl);const kt=[];function Tl(e){console.warn("useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html");let{containerRef:t,reverse:r,orientation:n,onHover:a,onDrag:i,onPositionChange:s,onIncrement:o,onDecrement:l,onIncrementToMax:h,onDecrementToMin:p,onCollapseToggle:w}=e,b=N=>n==="horizontal"?N.clientX:N.clientY,v=N=>{let I=ii(t.current,r,n),R=b(N);return r?I-R:R-I},x=P.useRef(!1),A=P.useRef(0),k=P.useRef({onPositionChange:s,onDrag:i});k.current.onDrag=i,k.current.onPositionChange=s;let C=N=>{N.preventDefault();let I=v(N);x.current||(x.current=!0,k.current.onDrag&&k.current.onDrag(!0),k.current.onPositionChange&&k.current.onPositionChange(I)),A.current!==I&&(A.current=I,s&&s(I))},S=N=>{const I=N.target;x.current=!1;let R=v(N);k.current.onDrag&&k.current.onDrag(!1),k.current.onPositionChange&&k.current.onPositionChange(R),kt.splice(kt.indexOf(I),1),window.removeEventListener("mouseup",S,!1),window.removeEventListener("mousemove",C,!1)};return{onMouseDown:N=>{const I=N.currentTarget;kt.some(R=>I.contains(R))||(kt.push(I),window.addEventListener("mousemove",C,!1),window.addEventListener("mouseup",S,!1))},onMouseEnter:()=>{a&&a(!0)},onMouseOut:()=>{a&&a(!1)},onKeyDown:N=>{switch(N.key){case"Left":case"ArrowLeft":n==="horizontal"&&(N.preventDefault(),l&&!r?l():o&&r&&o());break;case"Up":case"ArrowUp":n==="vertical"&&(N.preventDefault(),l&&!r?l():o&&r&&o());break;case"Right":case"ArrowRight":n==="horizontal"&&(N.preventDefault(),o&&!r?o():l&&r&&l());break;case"Down":case"ArrowDown":n==="vertical"&&(N.preventDefault(),o&&!r?o():l&&r&&l());break;case"Home":N.preventDefault(),p&&p();break;case"End":N.preventDefault(),h&&h();break;case"Enter":N.preventDefault(),w&&w();break}}}}var Cl={};q(Cl,"useGlobalListeners",()=>Qt);function Qt(){let e=P.useRef(new Map),t=P.useCallback((a,i,s,o)=>{let l=o!=null&&o.once?(...h)=>{e.current.delete(s),s(...h)}:s;e.current.set(s,{type:i,eventTarget:a,fn:l,options:o}),a.addEventListener(i,s,o)},[]),r=P.useCallback((a,i,s,o)=>{var l;let h=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;a.removeEventListener(i,h,o),e.current.delete(s)},[]),n=P.useCallback(()=>{e.current.forEach((a,i)=>{r(a.eventTarget,a.type,i,a.options)})},[r]);return P.useEffect(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}var Sl={};q(Sl,"useLabels",()=>li);function li(e,t){let{id:r,"aria-label":n,"aria-labelledby":a}=e;return r=Jt(r),a&&n?a=[...new Set([...a.trim().split(/\s+/),r])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),!n&&!a&&t&&(n=t),{id:r,"aria-label":n,"aria-labelledby":a}}var kl={};q(kl,"useObjectRef",()=>Ol);function Ol(e){const t=P.useRef();return he(()=>{!e||(typeof e=="function"?e(t.current):e.current=t.current)},[e]),t}var Rl={};q(Rl,"useUpdateEffect",()=>_l);function _l(e,t){const r=P.useRef(!0);P.useEffect(()=>{r.current?r.current=!1:e()},t)}var Ml={};q(Ml,"useResizeObserver",()=>ui);function Ll(){return typeof window.ResizeObserver!="undefined"}function ui(e){const{ref:t,onResize:r}=e;P.useEffect(()=>{let n=t==null?void 0:t.current;if(!!n)if(Ll()){const a=new window.ResizeObserver(i=>{!i.length||r()});return a.observe(n),()=>{n&&a.unobserve(n)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,t])}var Il={};q(Il,"useSyncRef",()=>Pn);function Pn(e,t){he(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref.current=null}},[e,t])}var Nl={};q(Nl,"getScrollParent",()=>xn);function xn(e){for(;e&&!Dl(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function Dl(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}var Bl={};q(Bl,"useViewportSize",()=>Hl);let Ee=typeof window!="undefined"&&window.visualViewport;function Hl(){let[e,t]=P.useState(()=>na());return P.useEffect(()=>{let r=()=>{t(n=>{let a=na();return a.width===n.width&&a.height===n.height?n:a})};return Ee?Ee.addEventListener("resize",r):window.addEventListener("resize",r),()=>{Ee?Ee.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),e}function na(){return{width:(Ee==null?void 0:Ee.width)||window.innerWidth,height:(Ee==null?void 0:Ee.height)||window.innerHeight}}var Fl={};q(Fl,"useDescription",()=>ci);let Wl=0;const Er=new Map;function ci(e){let[t,r]=P.useState(null);return he(()=>{if(!e)return;let n=Er.get(e);if(n)r(n.element.id);else{let a=`react-aria-description-${Wl++}`;r(a);let i=document.createElement("div");i.id=a,i.style.display="none",i.textContent=e,document.body.appendChild(i),n={refCount:0,element:i},Er.set(e,n)}return n.refCount++,()=>{--n.refCount===0&&(n.element.remove(),Er.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}var Ne={};q(Ne,"isMac",()=>Zt);q(Ne,"isIPhone",()=>fi);q(Ne,"isIPad",()=>di);q(Ne,"isIOS",()=>wt);q(Ne,"isAppleDevice",()=>Vl);q(Ne,"isWebKit",()=>Ul);q(Ne,"isChrome",()=>hi);q(Ne,"isAndroid",()=>jl);function An(e){var t;return typeof window=="undefined"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(r=>e.test(r.brand)))||e.test(window.navigator.userAgent)}function Tn(e){return typeof window!="undefined"&&window.navigator!=null?e.test((window.navigator.userAgentData||window.navigator).platform):!1}function Zt(){return Tn(/^Mac/i)}function fi(){return Tn(/^iPhone/i)}function di(){return Tn(/^iPad/i)||Zt()&&navigator.maxTouchPoints>1}function wt(){return fi()||di()}function Vl(){return Zt()||wt()}function Ul(){return An(/AppleWebKit/i)&&!hi()}function hi(){return An(/Chrome/i)}function jl(){return An(/Android/i)}var Gl={};q(Gl,"useEvent",()=>pi);function pi(e,t,r,n){let a=P.useRef(r);a.current=r;let i=r==null;P.useEffect(()=>{if(i)return;let s=e.current,o=l=>a.current.call(this,l);return s.addEventListener(t,o,n),()=>{s.removeEventListener(t,o,n)}},[e,t,n,i])}var zl={};q(zl,"useValueEffect",()=>Cn);function Cn(e){let[t,r]=P.useState(e),n=P.useRef(t),a=P.useRef(null);n.current=t;let i=P.useRef(null);i.current=()=>{let o=a.current.next();if(o.done){a.current=null;return}t===o.value?i.current():r(o.value)},he(()=>{a.current&&i.current()});let s=P.useCallback(o=>{a.current=o(n.current),i.current()},[a,i]);return[t,s]}var Xl={};q(Xl,"scrollIntoView",()=>Kl);function Kl(e,t){let r=aa(e,t,"left"),n=aa(e,t,"top"),a=t.offsetWidth,i=t.offsetHeight,s=e.scrollLeft,o=e.scrollTop,l=s+e.offsetWidth,h=o+e.offsetHeight;r<=s?s=r:r+a>l&&(s+=r+a-l),n<=o?o=n:n+i>h&&(o+=n+i-h),e.scrollLeft=s,e.scrollTop=o}function aa(e,t,r){const n=r==="left"?"offsetLeft":"offsetTop";let a=0;for(;t.offsetParent&&(a+=t[n],t.offsetParent!==e);){if(t.offsetParent.contains(e)){a-=e[n];break}t=t.offsetParent}return a}function Q(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Sn={};Q(Sn,"shouldKeepSpectrumClassNames",()=>Le);Q(Sn,"keepSpectrumClassNames",()=>Yl);Q(Sn,"classNames",()=>It);let Le=!1;function Yl(){Le=!0,console.warn("Legacy spectrum-prefixed class names enabled for backward compatibility. We recommend replacing instances of CSS overrides targeting spectrum selectors in your app with custom class names of your own, and disabling this flag.")}function It(e,...t){let r=[];for(let n of t)if(typeof n=="object"&&n){let a={};for(let i in n)e[i]&&(a[e[i]]=n[i]),(Le||!e[i])&&(a[i]=n[i]);r.push(a)}else typeof n=="string"?(e[n]&&r.push(e[n]),(Le||!e[n])&&r.push(n)):r.push(n);return vn(...r)}var ql={};Q(ql,"getWrappedElement",()=>Jl);function Jl(e){let t;return typeof e=="string"?t=W.default.createElement("span",null,e):t=W.default.Children.only(e),t}var Ql={};Q(Ql,"useMediaQuery",()=>Ft);function Ft(e){let t=typeof window!="undefined"&&typeof window.matchMedia=="function",[r,n]=P.useState(()=>t?window.matchMedia(e).matches:!1);return P.useEffect(()=>{if(!t)return;let i=window.matchMedia(e),s=o=>{n(o.matches)};return i.addListener(s),()=>{i.removeListener(s)}},[t,e]),at()?!1:r}var it={};Q(it,"createDOMRef",()=>kn);Q(it,"createFocusableRef",()=>mi);Q(it,"useDOMRef",()=>De);Q(it,"useFocusableRef",()=>Zl);Q(it,"unwrapDOMRef",()=>vi);Q(it,"useUnwrapDOMRef",()=>eu);function kn(e){return{UNSAFE_getDOMNode(){return e.current}}}function mi(e,t=e){return{...kn(e),focus(){t.current&&t.current.focus()}}}function De(e){let t=P.useRef(null);return P.useImperativeHandle(e,()=>kn(t)),t}function Zl(e,t){let r=P.useRef(null);return P.useImperativeHandle(e,()=>mi(r,t)),r}function vi(e){return{get current(){return e.current&&e.current.UNSAFE_getDOMNode()}}}function eu(e){return P.useMemo(()=>vi(e),[e])}var Be={};Q(Be,"baseStyleProps",()=>er);Q(Be,"dimensionValue",()=>Y);Q(Be,"passthroughStyle",()=>ne);Q(Be,"viewStyleProps",()=>yi);Q(Be,"responsiveDimensionValue",()=>We);Q(Be,"getResponsiveProp",()=>tr);Q(Be,"convertStyleProps",()=>wi);Q(Be,"useStyleProps",()=>Ae);var On={};Q(On,"BreakpointProvider",()=>gi);Q(On,"useMatchedBreakpoints",()=>bi);Q(On,"useBreakpoint",()=>_n);const Rn=W.default.createContext(null);Rn.displayName="BreakpointContext";function gi(e){let{children:t,matchedBreakpoints:r}=e;return W.default.createElement(Rn.Provider,{value:{matchedBreakpoints:r}},t)}function bi(e){let t=Object.entries(e).sort(([,l],[,h])=>h-l),r=t.map(([,l])=>`(min-width: ${l}px)`),n=typeof window!="undefined"&&typeof window.matchMedia=="function",a=()=>{let l=[];for(let h in r){let p=r[h];window.matchMedia(p).matches&&l.push(t[h][0])}return l.push("base"),l},[i,s]=P.useState(()=>n?a():["base"]);return P.useEffect(()=>{if(!n)return;let l=()=>{const h=a();s(p=>p.length!==h.length||p.some((w,b)=>w!==h[b])?[...h]:p)};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[n]),at()?["base"]:i}function _n(){return P.useContext(Rn)}const er={margin:["margin",Y],marginStart:[ce("marginLeft","marginRight"),Y],marginEnd:[ce("marginRight","marginLeft"),Y],marginTop:["marginTop",Y],marginBottom:["marginBottom",Y],marginX:[["marginLeft","marginRight"],Y],marginY:[["marginTop","marginBottom"],Y],width:["width",Y],height:["height",Y],minWidth:["minWidth",Y],minHeight:["minHeight",Y],maxWidth:["maxWidth",Y],maxHeight:["maxHeight",Y],isHidden:["display",iu],alignSelf:["alignSelf",ne],justifySelf:["justifySelf",ne],position:["position",Pr],zIndex:["zIndex",Pr],top:["top",Y],bottom:["bottom",Y],start:[ce("left","right"),Y],end:[ce("right","left"),Y],left:["left",Y],right:["right",Y],order:["order",Pr],flex:["flex",ou],flexGrow:["flexGrow",ne],flexShrink:["flexShrink",ne],flexBasis:["flexBasis",ne],gridArea:["gridArea",ne],gridColumn:["gridColumn",ne],gridColumnEnd:["gridColumnEnd",ne],gridColumnStart:["gridColumnStart",ne],gridRow:["gridRow",ne],gridRowEnd:["gridRowEnd",ne],gridRowStart:["gridRowStart",ne]},yi={...er,backgroundColor:["backgroundColor",au],borderWidth:["borderWidth",Ce],borderStartWidth:[ce("borderLeftWidth","borderRightWidth"),Ce],borderEndWidth:[ce("borderRightWidth","borderLeftWidth"),Ce],borderLeftWidth:["borderLeftWidth",Ce],borderRightWidth:["borderRightWidth",Ce],borderTopWidth:["borderTopWidth",Ce],borderBottomWidth:["borderBottomWidth",Ce],borderXWidth:[["borderLeftWidth","borderRightWidth"],Ce],borderYWidth:[["borderTopWidth","borderBottomWidth"],Ce],borderColor:["borderColor",Te],borderStartColor:[ce("borderLeftColor","borderRightColor"),Te],borderEndColor:[ce("borderRightColor","borderLeftColor"),Te],borderLeftColor:["borderLeftColor",Te],borderRightColor:["borderRightColor",Te],borderTopColor:["borderTopColor",Te],borderBottomColor:["borderBottomColor",Te],borderXColor:[["borderLeftColor","borderRightColor"],Te],borderYColor:[["borderTopColor","borderBottomColor"],Te],borderRadius:["borderRadius",Se],borderTopStartRadius:[ce("borderTopLeftRadius","borderTopRightRadius"),Se],borderTopEndRadius:[ce("borderTopRightRadius","borderTopLeftRadius"),Se],borderBottomStartRadius:[ce("borderBottomLeftRadius","borderBottomRightRadius"),Se],borderBottomEndRadius:[ce("borderBottomRightRadius","borderBottomLeftRadius"),Se],borderTopLeftRadius:["borderTopLeftRadius",Se],borderTopRightRadius:["borderTopRightRadius",Se],borderBottomLeftRadius:["borderBottomLeftRadius",Se],borderBottomRightRadius:["borderBottomRightRadius",Se],padding:["padding",Y],paddingStart:[ce("paddingLeft","paddingRight"),Y],paddingEnd:[ce("paddingRight","paddingLeft"),Y],paddingLeft:["paddingLeft",Y],paddingRight:["paddingRight",Y],paddingTop:["paddingTop",Y],paddingBottom:["paddingBottom",Y],paddingX:[["paddingLeft","paddingRight"],Y],paddingY:[["paddingTop","paddingBottom"],Y],overflow:["overflow",ne]},ia={borderWidth:"borderStyle",borderLeftWidth:"borderLeftStyle",borderRightWidth:"borderRightStyle",borderTopWidth:"borderTopStyle",borderBottomWidth:"borderBottomStyle"};function ce(e,t){return r=>r==="rtl"?t:e}const tu=/(%|px|em|rem|vw|vh|auto|cm|mm|in|pt|pc|ex|ch|rem|vmin|vmax|fr)$/,ru=/^\s*\w+\(/,nu=/(static-)?size-\d+|single-line-(height|width)/g;function Y(e){return typeof e=="number"?e+"px":tu.test(e)?e:ru.test(e)?e.replace(nu,"var(--spectrum-global-dimension-$&, var(--spectrum-alias-$&))"):`var(--spectrum-global-dimension-${e}, var(--spectrum-alias-${e}))`}function We(e,t){return e=tr(e,t),Y(e)}function $i(e,t="default"){return`var(--spectrum-global-color-${e}, var(--spectrum-semantic-${e}-color-${t}))`}function au(e){return`var(--spectrum-alias-background-color-${e}, ${$i(e,"background")})`}function Te(e){return e==="default"?"var(--spectrum-alias-border-color)":`var(--spectrum-alias-border-color-${e}, ${$i(e,"border")})`}function Ce(e){return`var(--spectrum-alias-border-size-${e})`}function Se(e){return`var(--spectrum-alias-border-radius-${e})`}function iu(e){return e?"none":void 0}function Pr(e){return e}function ou(e){return typeof e=="boolean"?e?"1":void 0:""+e}function wi(e,t,r,n){let a={};for(let i in e){let s=t[i];if(!s||e[i]==null)continue;let[o,l]=s;typeof o=="function"&&(o=o(r));let h=tr(e[i],n),p=l(h);if(Array.isArray(o))for(let w of o)a[w]=p;else a[o]=p}for(let i in ia)a[i]&&(a[ia[i]]="solid",a.boxSizing="border-box");return a}function Ae(e,t=er,r={}){let{UNSAFE_className:n,UNSAFE_style:a,...i}=e,s=_n(),{direction:o}=_e(),{matchedBreakpoints:l=(s==null?void 0:s.matchedBreakpoints)||["base"]}=r,h=wi(e,t,o,l),p={...a,...h};i.className&&console.warn("The className prop is unsafe and is unsupported in React Spectrum v3. Please use style props with Spectrum variables, or UNSAFE_className if you absolutely must do something custom. Note that this may break in future versions due to DOM structure changes."),i.style&&console.warn("The style prop is unsafe and is unsupported in React Spectrum v3. Please use style props with Spectrum variables, or UNSAFE_style if you absolutely must do something custom. Note that this may break in future versions due to DOM structure changes.");let w={style:p,className:n};return tr(e.isHidden,l)&&(w.hidden=!0),{styleProps:w}}function ne(e){return e}function tr(e,t){if(e&&typeof e=="object"&&!Array.isArray(e)){for(let r=0;r<t.length;r++){let n=t[r];if(e[n]!=null)return e[n]}return e.base}return e}var rr={};Q(rr,"useSlotProps",()=>Et);Q(rr,"cssModuleToSlots",()=>su);Q(rr,"SlotProvider",()=>lu);Q(rr,"ClearSlots",()=>Pt);let Wt=W.default.createContext(null);function Et(e,t){let r=e.slot||t,{[r]:n={}}=P.useContext(Wt)||{};return Pe(e,Pe(n,{id:e.id}))}function su(e){return Object.keys(e).reduce((t,r)=>(t[r]={UNSAFE_className:e[r]},t),{})}function lu(e){let t=P.useContext(Wt)||{},{slots:r={},children:n}=e,a=P.useMemo(()=>Object.keys(t).concat(Object.keys(r)).reduce((i,s)=>({...i,[s]:Pe(t[s]||{},r[s]||{})}),{}),[t,r]);return W.default.createElement(Wt.Provider,{value:a},n)}function Pt(e){let{children:t,...r}=e,n=t;return W.default.Children.toArray(t).length<=1&&typeof t=="function"&&(n=W.default.cloneElement(W.default.Children.only(t),r)),W.default.createElement(Wt.Provider,{value:{}},n)}var uu={};Q(uu,"useHasChild",()=>cu);function cu(e,t){let[r,n]=P.useState(!0);return he(()=>{n(!!(t.current&&t.current.querySelector(e)))},[n,e,t]),r}var fu={};Q(fu,"useResizeObserver",()=>ui);var du={};Q(du,"useIsMobileDevice",()=>pu);const hu=700;function pu(){return at()||typeof window=="undefined"?!1:window.screen.width<=hu}var mu={};Q(mu,"useValueEffect",()=>Cn);function yt(e){return e&&e.ownerDocument||document}function vu(e){var t=yt(e);return t&&t.defaultView||window}function gu(e,t){return vu(e).getComputedStyle(e,t)}var bu=/([A-Z])/g;function yu(e){return e.replace(bu,"-$1").toLowerCase()}var $u=/^ms-/;function Ot(e){return yu(e).replace($u,"-ms-")}var wu=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Eu(e){return!!(e&&wu.test(e))}function Me(e,t){var r="",n="";if(typeof t=="string")return e.style.getPropertyValue(Ot(t))||gu(e).getPropertyValue(Ot(t));Object.keys(t).forEach(function(a){var i=t[a];!i&&i!==0?e.style.removeProperty(Ot(a)):Eu(a)?n+=a+"("+i+") ":r+=Ot(a)+": "+i+";"}),n&&(r+="transform: "+n+";"),e.style.cssText+=";"+r}function Pu(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function xu(e){return"nodeType"in e&&e.nodeType===document.DOCUMENT_NODE}function Au(e){return"window"in e&&e.window===e?e:xu(e)&&e.defaultView||!1}function Ei(e){var t=e==="pageXOffset"?"scrollLeft":"scrollTop";function r(n,a){var i=Au(n);if(a===void 0)return i?i[e]:n[t];i?i.scrollTo(i[e],a):n[t]=a}return r}var ht=Ei("pageXOffset"),pt=Ei("pageYOffset");function et(e){var t=yt(e),r={top:0,left:0,height:0,width:0},n=t&&t.documentElement;return!n||!Pu(n,e)||(e.getBoundingClientRect!==void 0&&(r=e.getBoundingClientRect()),r={top:r.top+pt(n)-(n.clientTop||0),left:r.left+ht(n)-(n.clientLeft||0),width:r.width,height:r.height}),r}function Wr(){return Wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wr.apply(this,arguments)}var Tu=function(t){return!!t&&"offsetParent"in t};function Cu(e){for(var t=yt(e),r=e&&e.offsetParent;Tu(r)&&r.nodeName!=="HTML"&&Me(r,"position")==="static";)r=r.offsetParent;return r||t.documentElement}var Su=function(t){return t.nodeName&&t.nodeName.toLowerCase()};function oa(e,t){var r={top:0,left:0},n;if(Me(e,"position")==="fixed")n=e.getBoundingClientRect();else{var a=t||Cu(e);n=et(e),Su(a)!=="html"&&(r=et(a));var i=String(Me(a,"borderTopWidth")||0);r.top+=parseInt(i,10)-pt(a)||0;var s=String(Me(a,"borderLeftWidth")||0);r.left+=parseInt(s,10)-ht(a)||0}var o=String(Me(e,"marginTop")||0),l=String(Me(e,"marginLeft")||0);return Wr({},n,{top:n.top-r.top-(parseInt(o,10)||0),left:n.left-r.left-(parseInt(l,10)||0)})}function ie(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var ku={};ie(ku,"Pressable",()=>Du);var Ou={};ie(Ou,"usePress",()=>Mn);let Ze="default",Vr="",Nt=new WeakMap;function Ur(e){wt()?(Ze==="default"&&(Vr=document.documentElement.style.webkitUserSelect,document.documentElement.style.webkitUserSelect="none"),Ze="disabled"):e&&(Nt.set(e,e.style.userSelect),e.style.userSelect="none")}function dt(e){if(wt()){if(Ze!=="disabled")return;Ze="restoring",setTimeout(()=>{si(()=>{Ze==="restoring"&&(document.documentElement.style.webkitUserSelect==="none"&&(document.documentElement.style.webkitUserSelect=Vr||""),Vr="",Ze="default")})},300)}else if(e&&Nt.has(e)){let t=Nt.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),Nt.delete(e)}}function jr(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}class Ru{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,r){this.nativeEvent=r,this.target=r.target,this.currentTarget=r.currentTarget,this.relatedTarget=r.relatedTarget,this.bubbles=r.bubbles,this.cancelable=r.cancelable,this.defaultPrevented=r.defaultPrevented,this.eventPhase=r.eventPhase,this.isTrusted=r.isTrusted,this.timeStamp=r.timeStamp,this.type=t}}function Pi(e){let t=P.useRef({isFocused:!1,onBlur:e,observer:null});return t.current.onBlur=e,he(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),P.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r.target,a=i=>{var s,o;t.current.isFocused=!1,n.disabled&&((o=(s=t.current).onBlur)===null||o===void 0||o.call(s,new Ru("blur",i))),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{t.current.isFocused&&n.disabled&&(t.current.observer.disconnect(),n.dispatchEvent(new FocusEvent("blur")),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})))}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[])}const Vt=W.default.createContext(null);Vt.displayName="PressResponderContext";function _u(e){let t=P.useContext(Vt);if(t){let{register:r,...n}=t;e=Pe(n,e),r()}return Pn(t,e.ref),e}function Mn(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:a,onPressUp:i,isDisabled:s,isPressed:o,preventFocusOnPress:l,shouldCancelOnPointerExit:h,allowTextSelectionOnPress:p,ref:w,...b}=_u(e),v=P.useRef(null);v.current={onPress:t,onPressChange:r,onPressStart:n,onPressEnd:a,onPressUp:i,isDisabled:s,shouldCancelOnPointerExit:h};let[x,A]=P.useState(!1),k=P.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:C,removeAllGlobalListeners:S}=Qt(),O=P.useMemo(()=>{let g=k.current,D=(E,m)=>{let{onPressStart:d,onPressChange:y,isDisabled:f}=v.current;f||g.didFirePressStart||(d&&d({type:"pressstart",pointerType:m,target:E.currentTarget,shiftKey:E.shiftKey,metaKey:E.metaKey,ctrlKey:E.ctrlKey,altKey:E.altKey}),y&&y(!0),g.didFirePressStart=!0,A(!0))},M=(E,m,d=!0)=>{let{onPressEnd:y,onPressChange:f,onPress:c,isDisabled:T}=v.current;!g.didFirePressStart||(g.ignoreClickAfterPress=!0,g.didFirePressStart=!1,y&&y({type:"pressend",pointerType:m,target:E.currentTarget,shiftKey:E.shiftKey,metaKey:E.metaKey,ctrlKey:E.ctrlKey,altKey:E.altKey}),f&&f(!1),A(!1),c&&d&&!T&&c({type:"press",pointerType:m,target:E.currentTarget,shiftKey:E.shiftKey,metaKey:E.metaKey,ctrlKey:E.ctrlKey,altKey:E.altKey}))},N=(E,m)=>{let{onPressUp:d,isDisabled:y}=v.current;y||d&&d({type:"pressup",pointerType:m,target:E.currentTarget,shiftKey:E.shiftKey,metaKey:E.metaKey,ctrlKey:E.ctrlKey,altKey:E.altKey})},I=E=>{g.isPressed&&(g.isOverTarget&&M(ke(g.target,E),g.pointerType,!1),g.isPressed=!1,g.isOverTarget=!1,g.activePointerId=null,g.pointerType=null,S(),p||dt(g.target))},R={onKeyDown(E){xr(E.nativeEvent)&&E.currentTarget.contains(E.target)&&(la(E.target)&&E.preventDefault(),E.stopPropagation(),!g.isPressed&&!E.repeat&&(g.target=E.currentTarget,g.isPressed=!0,D(E,"keyboard"),C(document,"keyup",B,!1)))},onKeyUp(E){xr(E.nativeEvent)&&!E.repeat&&E.currentTarget.contains(E.target)&&N(ke(g.target,E),"keyboard")},onClick(E){E&&!E.currentTarget.contains(E.target)||E&&E.button===0&&(E.stopPropagation(),s&&E.preventDefault(),!g.ignoreClickAfterPress&&!g.ignoreEmulatedMouseEvents&&(g.pointerType==="virtual"||jr(E.nativeEvent))&&(!s&&!l&&ft(E.currentTarget),D(E,"virtual"),N(E,"virtual"),M(E,"virtual")),g.ignoreEmulatedMouseEvents=!1,g.ignoreClickAfterPress=!1)}},B=E=>{if(g.isPressed&&xr(E)){la(E.target)&&E.preventDefault(),E.stopPropagation(),g.isPressed=!1;let m=E.target;M(ke(g.target,E),"keyboard",g.target.contains(m)),S(),(g.target.contains(m)&&xi(g.target)||g.target.getAttribute("role")==="link")&&g.target.click()}};if(typeof PointerEvent!="undefined"){R.onPointerDown=y=>{if(!(y.button!==0||!y.currentTarget.contains(y.target))){if(Nu(y.nativeEvent)){g.pointerType="virtual";return}Ar(y.currentTarget)&&y.preventDefault(),g.pointerType=y.pointerType,y.stopPropagation(),g.isPressed||(g.isPressed=!0,g.isOverTarget=!0,g.activePointerId=y.pointerId,g.target=y.currentTarget,!s&&!l&&ft(y.currentTarget),p||Ur(g.target),D(y,g.pointerType),C(document,"pointermove",E,!1),C(document,"pointerup",m,!1),C(document,"pointercancel",d,!1))}},R.onMouseDown=y=>{!y.currentTarget.contains(y.target)||y.button===0&&(Ar(y.currentTarget)&&y.preventDefault(),y.stopPropagation())},R.onPointerUp=y=>{!y.currentTarget.contains(y.target)||g.pointerType==="virtual"||y.button===0&&Ke(y,y.currentTarget)&&N(y,g.pointerType||y.pointerType)};let E=y=>{y.pointerId===g.activePointerId&&(Ke(y,g.target)?g.isOverTarget||(g.isOverTarget=!0,D(ke(g.target,y),g.pointerType)):g.isOverTarget&&(g.isOverTarget=!1,M(ke(g.target,y),g.pointerType,!1),v.current.shouldCancelOnPointerExit&&I(y)))},m=y=>{y.pointerId===g.activePointerId&&g.isPressed&&y.button===0&&(Ke(y,g.target)?M(ke(g.target,y),g.pointerType):g.isOverTarget&&M(ke(g.target,y),g.pointerType,!1),g.isPressed=!1,g.isOverTarget=!1,g.activePointerId=null,g.pointerType=null,S(),p||dt(g.target))},d=y=>{I(y)};R.onDragStart=y=>{!y.currentTarget.contains(y.target)||I(y)}}else{R.onMouseDown=d=>{d.button!==0||!d.currentTarget.contains(d.target)||(Ar(d.currentTarget)&&d.preventDefault(),d.stopPropagation(),!g.ignoreEmulatedMouseEvents&&(g.isPressed=!0,g.isOverTarget=!0,g.target=d.currentTarget,g.pointerType=jr(d.nativeEvent)?"virtual":"mouse",!s&&!l&&ft(d.currentTarget),D(d,g.pointerType),C(document,"mouseup",E,!1)))},R.onMouseEnter=d=>{!d.currentTarget.contains(d.target)||(d.stopPropagation(),g.isPressed&&!g.ignoreEmulatedMouseEvents&&(g.isOverTarget=!0,D(d,g.pointerType)))},R.onMouseLeave=d=>{!d.currentTarget.contains(d.target)||(d.stopPropagation(),g.isPressed&&!g.ignoreEmulatedMouseEvents&&(g.isOverTarget=!1,M(d,g.pointerType,!1),v.current.shouldCancelOnPointerExit&&I(d)))},R.onMouseUp=d=>{!d.currentTarget.contains(d.target)||!g.ignoreEmulatedMouseEvents&&d.button===0&&N(d,g.pointerType)};let E=d=>{if(d.button===0){if(g.isPressed=!1,S(),g.ignoreEmulatedMouseEvents){g.ignoreEmulatedMouseEvents=!1;return}Ke(d,g.target)?M(ke(g.target,d),g.pointerType):g.isOverTarget&&M(ke(g.target,d),g.pointerType,!1),g.isOverTarget=!1}};R.onTouchStart=d=>{if(!d.currentTarget.contains(d.target))return;d.stopPropagation();let y=Mu(d.nativeEvent);!y||(g.activePointerId=y.identifier,g.ignoreEmulatedMouseEvents=!0,g.isOverTarget=!0,g.isPressed=!0,g.target=d.currentTarget,g.pointerType="touch",!s&&!l&&ft(d.currentTarget),p||Ur(g.target),D(d,g.pointerType),C(window,"scroll",m,!0))},R.onTouchMove=d=>{if(!d.currentTarget.contains(d.target)||(d.stopPropagation(),!g.isPressed))return;let y=sa(d.nativeEvent,g.activePointerId);y&&Ke(y,d.currentTarget)?g.isOverTarget||(g.isOverTarget=!0,D(d,g.pointerType)):g.isOverTarget&&(g.isOverTarget=!1,M(d,g.pointerType,!1),v.current.shouldCancelOnPointerExit&&I(d))},R.onTouchEnd=d=>{if(!d.currentTarget.contains(d.target)||(d.stopPropagation(),!g.isPressed))return;let y=sa(d.nativeEvent,g.activePointerId);y&&Ke(y,d.currentTarget)?(N(d,g.pointerType),M(d,g.pointerType)):g.isOverTarget&&M(d,g.pointerType,!1),g.isPressed=!1,g.activePointerId=null,g.isOverTarget=!1,g.ignoreEmulatedMouseEvents=!0,p||dt(g.target),S()},R.onTouchCancel=d=>{!d.currentTarget.contains(d.target)||(d.stopPropagation(),g.isPressed&&I(d))};let m=d=>{g.isPressed&&d.target.contains(g.target)&&I({currentTarget:g.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=d=>{!d.currentTarget.contains(d.target)||I(d)}}return R},[C,s,l,S,p]);return P.useEffect(()=>()=>{p||dt(k.current.target)},[p]),{isPressed:o||x,pressProps:Pe(b,O)}}function xi(e){return e.tagName==="A"&&e.hasAttribute("href")}function xr(e){const{key:t,code:r,target:n}=e,a=n,{tagName:i,isContentEditable:s}=a,o=a.getAttribute("role");return(t==="Enter"||t===" "||t==="Spacebar"||r==="Space")&&i!=="INPUT"&&i!=="TEXTAREA"&&s!==!0&&(!xi(a)||o==="button"&&t!=="Enter")&&!(o==="link"&&t!=="Enter")}function Mu(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function sa(e,t){const r=e.changedTouches;for(let n=0;n<r.length;n++){const a=r[n];if(a.identifier===t)return a}return null}function ke(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function Lu(e){let t=e.width/2||e.radiusX||0,r=e.height/2||e.radiusY||0;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function Iu(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Ke(e,t){let r=t.getBoundingClientRect(),n=Lu(e);return Iu(r,n)}function Ar(e){return!e.draggable}function la(e){return!((e.tagName==="INPUT"||e.tagName==="BUTTON")&&e.type==="submit")}function Nu(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}const Du=W.default.forwardRef(({children:e,...t},r)=>{let n=P.useRef();r=r!=null?r:n;let{pressProps:a}=Mn({...t,ref:r}),i=W.default.Children.only(e);return W.default.cloneElement(i,{ref:r,...Pe(i.props,a)})});var Bu={};ie(Bu,"PressResponder",()=>Hu);const Hu=W.default.forwardRef(({children:e,...t},r)=>{let n=P.useRef(!1),a=P.useContext(Vt),i=Pe(a||{},{...t,ref:r||(a==null?void 0:a.ref),register(){n.current=!0,a&&a.register()}});return Pn(a,r),P.useEffect(()=>{n.current||console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.")},[]),W.default.createElement(Vt.Provider,{value:i},e)});var Fu={};ie(Fu,"useFocus",()=>Ai);function Ai(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:a}=e;const i=P.useCallback(l=>{if(l.target===l.currentTarget)return n&&n(l),a&&a(!1),!0},[n,a]),s=Pi(i),o=P.useCallback(l=>{l.target===l.currentTarget&&(r&&r(l),a&&a(!0),s(l))},[a,r,s]);return{focusProps:{onFocus:!t&&(r||a||n)?o:void 0,onBlur:!t&&(n||a)?i:null}}}var ot={};ie(ot,"isFocusVisible",()=>Ln);ie(ot,"getInteractionModality",()=>zu);ie(ot,"setInteractionModality",()=>Xu);ie(ot,"useInteractionModality",()=>Ku);ie(ot,"useFocusVisible",()=>qu);ie(ot,"useFocusVisibleListener",()=>Ti);let Re=null,$t=new Set,ua=!1,Ve=!1,Gr=!1;const Wu={Tab:!0,Escape:!0};function nr(e,t){for(let r of $t)r(e,t)}function Vu(e){return!(e.metaKey||!Zt()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ca(e){Ve=!0,Vu(e)&&(Re="keyboard",nr("keyboard",e))}function Ye(e){Re="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Ve=!0,nr("pointer",e))}function Uu(e){jr(e)&&(Ve=!0,Re="virtual")}function ju(e){e.target===window||e.target===document||(!Ve&&!Gr&&(Re="virtual",nr("virtual",e)),Ve=!1,Gr=!1)}function Gu(){Ve=!1,Gr=!0}function Ut(){if(typeof window=="undefined"||ua)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){Ve=!0,e.apply(this,arguments)},document.addEventListener("keydown",ca,!0),document.addEventListener("keyup",ca,!0),document.addEventListener("click",Uu,!0),window.addEventListener("focus",ju,!0),window.addEventListener("blur",Gu,!1),typeof PointerEvent!="undefined"?(document.addEventListener("pointerdown",Ye,!0),document.addEventListener("pointermove",Ye,!0),document.addEventListener("pointerup",Ye,!0)):(document.addEventListener("mousedown",Ye,!0),document.addEventListener("mousemove",Ye,!0),document.addEventListener("mouseup",Ye,!0)),ua=!0}typeof document!="undefined"&&(document.readyState!=="loading"?Ut():document.addEventListener("DOMContentLoaded",Ut));function Ln(){return Re!=="pointer"}function zu(){return Re}function Xu(e){Re=e,nr(e,null)}function Ku(){Ut();let[e,t]=P.useState(Re);return P.useEffect(()=>{let r=()=>{t(Re)};return $t.add(r),()=>{$t.delete(r)}},[]),e}function Yu(e,t,r){return!(e&&t==="keyboard"&&r instanceof KeyboardEvent&&!Wu[r.key])}function qu(e={}){let{isTextInput:t,autoFocus:r}=e,[n,a]=P.useState(r||Ln());return Ti(i=>{a(i)},[t],{isTextInput:t}),{isFocusVisible:n}}function Ti(e,t,r){Ut(),P.useEffect(()=>{let n=(a,i)=>{!Yu(r==null?void 0:r.isTextInput,a,i)||e(Ln())};return $t.add(n),()=>{$t.delete(n)}},t)}var Ju={};ie(Ju,"useFocusWithin",()=>Ci);function Ci(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:a}=e,i=P.useRef({isFocusWithin:!1}),s=P.useCallback(h=>{i.current.isFocusWithin&&!h.currentTarget.contains(h.relatedTarget)&&(i.current.isFocusWithin=!1,r&&r(h),a&&a(!1))},[r,a,i]),o=Pi(s),l=P.useCallback(h=>{i.current.isFocusWithin||(n&&n(h),a&&a(!0),i.current.isFocusWithin=!0,o(h))},[n,a,o]);return t?{focusWithinProps:{onFocus:null,onBlur:null}}:{focusWithinProps:{onFocus:l,onBlur:s}}}var Qu={};ie(Qu,"useHover",()=>ec);let jt=!1,Tr=0;function zr(){jt=!0,setTimeout(()=>{jt=!1},50)}function fa(e){e.pointerType==="touch"&&zr()}function Zu(){if(typeof document!="undefined")return typeof PointerEvent!="undefined"?document.addEventListener("pointerup",fa):document.addEventListener("touchend",zr),Tr++,()=>{Tr--,!(Tr>0)&&(typeof PointerEvent!="undefined"?document.removeEventListener("pointerup",fa):document.removeEventListener("touchend",zr))}}function ec(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:a}=e,[i,s]=P.useState(!1),o=P.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;P.useEffect(Zu,[]);let{hoverProps:l,triggerHoverEnd:h}=P.useMemo(()=>{let p=(v,x)=>{if(o.pointerType=x,a||x==="touch"||o.isHovered||!v.currentTarget.contains(v.target))return;o.isHovered=!0;let A=v.currentTarget;o.target=A,t&&t({type:"hoverstart",target:A,pointerType:x}),r&&r(!0),s(!0)},w=(v,x)=>{if(o.pointerType="",o.target=null,x==="touch"||!o.isHovered)return;o.isHovered=!1;let A=v.currentTarget;n&&n({type:"hoverend",target:A,pointerType:x}),r&&r(!1),s(!1)},b={};return typeof PointerEvent!="undefined"?(b.onPointerEnter=v=>{jt&&v.pointerType==="mouse"||p(v,v.pointerType)},b.onPointerLeave=v=>{!a&&v.currentTarget.contains(v.target)&&w(v,v.pointerType)}):(b.onTouchStart=()=>{o.ignoreEmulatedMouseEvents=!0},b.onMouseEnter=v=>{!o.ignoreEmulatedMouseEvents&&!jt&&p(v,"mouse"),o.ignoreEmulatedMouseEvents=!1},b.onMouseLeave=v=>{!a&&v.currentTarget.contains(v.target)&&w(v,"mouse")}),{hoverProps:b,triggerHoverEnd:w}},[t,r,n,a,o]);return P.useEffect(()=>{a&&h({currentTarget:o.target},o.pointerType)},[a]),{hoverProps:l,isHovered:i}}var tc={};ie(tc,"useInteractOutside",()=>Si);function Si(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:a}=e,s=P.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1,onInteractOutside:r,onInteractOutsideStart:a}).current;s.onInteractOutside=r,s.onInteractOutsideStart=a,P.useEffect(()=>{if(n)return;let o=l=>{Rt(l,t)&&s.onInteractOutside&&(s.onInteractOutsideStart&&s.onInteractOutsideStart(l),s.isPointerDown=!0)};if(typeof PointerEvent!="undefined"){let l=h=>{s.isPointerDown&&s.onInteractOutside&&Rt(h,t)&&(s.isPointerDown=!1,s.onInteractOutside(h))};return document.addEventListener("pointerdown",o,!0),document.addEventListener("pointerup",l,!0),()=>{document.removeEventListener("pointerdown",o,!0),document.removeEventListener("pointerup",l,!0)}}else{let l=p=>{s.ignoreEmulatedMouseEvents?s.ignoreEmulatedMouseEvents=!1:s.isPointerDown&&s.onInteractOutside&&Rt(p,t)&&(s.isPointerDown=!1,s.onInteractOutside(p))},h=p=>{s.ignoreEmulatedMouseEvents=!0,s.onInteractOutside&&s.isPointerDown&&Rt(p,t)&&(s.isPointerDown=!1,s.onInteractOutside(p))};return document.addEventListener("mousedown",o,!0),document.addEventListener("mouseup",l,!0),document.addEventListener("touchstart",o,!0),document.addEventListener("touchend",h,!0),()=>{document.removeEventListener("mousedown",o,!0),document.removeEventListener("mouseup",l,!0),document.removeEventListener("touchstart",o,!0),document.removeEventListener("touchend",h,!0)}}},[t,s,n])}function Rt(e,t){if(e.button>0)return!1;if(e.target){const r=e.target.ownerDocument;if(!r||!r.documentElement.contains(e.target))return!1}return t.current&&!t.current.contains(e.target)}var rc={};ie(rc,"useKeyboard",()=>nc);function da(e){if(!e)return;let t=!0;return r=>{let n={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(n),t&&r.stopPropagation()}}function nc(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:da(e.onKeyDown),onKeyUp:da(e.onKeyUp)}}}var ac={};ie(ac,"useMove",()=>ic);function ic(e){let{onMoveStart:t,onMove:r,onMoveEnd:n}=e,a=P.useRef({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:i,removeGlobalListener:s}=Qt();return{moveProps:P.useMemo(()=>{let l={},h=()=>{Ur(),a.current.didMove=!1},p=(v,x,A,k)=>{A===0&&k===0||(a.current.didMove||(a.current.didMove=!0,t==null||t({type:"movestart",pointerType:x,shiftKey:v.shiftKey,metaKey:v.metaKey,ctrlKey:v.ctrlKey,altKey:v.altKey})),r({type:"move",pointerType:x,deltaX:A,deltaY:k,shiftKey:v.shiftKey,metaKey:v.metaKey,ctrlKey:v.ctrlKey,altKey:v.altKey}))},w=(v,x)=>{dt(),a.current.didMove&&(n==null||n({type:"moveend",pointerType:x,shiftKey:v.shiftKey,metaKey:v.metaKey,ctrlKey:v.ctrlKey,altKey:v.altKey}))};if(typeof PointerEvent=="undefined"){let v=C=>{C.button===0&&(p(C,"mouse",C.pageX-a.current.lastPosition.pageX,C.pageY-a.current.lastPosition.pageY),a.current.lastPosition={pageX:C.pageX,pageY:C.pageY})},x=C=>{C.button===0&&(w(C,"mouse"),s(window,"mousemove",v,!1),s(window,"mouseup",x,!1))};l.onMouseDown=C=>{C.button===0&&(h(),C.stopPropagation(),C.preventDefault(),a.current.lastPosition={pageX:C.pageX,pageY:C.pageY},i(window,"mousemove",v,!1),i(window,"mouseup",x,!1))};let A=C=>{let S=[...C.changedTouches].findIndex(({identifier:O})=>O===a.current.id);if(S>=0){let{pageX:O,pageY:g}=C.changedTouches[S];p(C,"touch",O-a.current.lastPosition.pageX,g-a.current.lastPosition.pageY),a.current.lastPosition={pageX:O,pageY:g}}},k=C=>{[...C.changedTouches].findIndex(({identifier:O})=>O===a.current.id)>=0&&(w(C,"touch"),a.current.id=null,s(window,"touchmove",A),s(window,"touchend",k),s(window,"touchcancel",k))};l.onTouchStart=C=>{if(C.changedTouches.length===0||a.current.id!=null)return;let{pageX:S,pageY:O,identifier:g}=C.changedTouches[0];h(),C.stopPropagation(),C.preventDefault(),a.current.lastPosition={pageX:S,pageY:O},a.current.id=g,i(window,"touchmove",A,!1),i(window,"touchend",k,!1),i(window,"touchcancel",k,!1)}}else{let v=A=>{if(A.pointerId===a.current.id){let k=A.pointerType||"mouse";p(A,k,A.pageX-a.current.lastPosition.pageX,A.pageY-a.current.lastPosition.pageY),a.current.lastPosition={pageX:A.pageX,pageY:A.pageY}}},x=A=>{if(A.pointerId===a.current.id){let k=A.pointerType||"mouse";w(A,k),a.current.id=null,s(window,"pointermove",v,!1),s(window,"pointerup",x,!1),s(window,"pointercancel",x,!1)}};l.onPointerDown=A=>{A.button===0&&a.current.id==null&&(h(),A.stopPropagation(),A.preventDefault(),a.current.lastPosition={pageX:A.pageX,pageY:A.pageY},a.current.id=A.pointerId,i(window,"pointermove",v,!1),i(window,"pointerup",x,!1),i(window,"pointercancel",x,!1))}}let b=(v,x,A)=>{h(),p(v,"keyboard",x,A),w(v,"keyboard")};return l.onKeyDown=v=>{switch(v.key){case"Left":case"ArrowLeft":v.preventDefault(),v.stopPropagation(),b(v,-1,0);break;case"Right":case"ArrowRight":v.preventDefault(),v.stopPropagation(),b(v,1,0);break;case"Up":case"ArrowUp":v.preventDefault(),v.stopPropagation(),b(v,0,-1);break;case"Down":case"ArrowDown":v.preventDefault(),v.stopPropagation(),b(v,0,1);break}},l},[a,t,r,n,i,s])}}var oc={};ie(oc,"useScrollWheel",()=>sc);function sc(e,t){let{onScroll:r,isDisabled:n}=e,a=P.useCallback(i=>{i.ctrlKey||(i.preventDefault(),i.stopPropagation(),r&&r({deltaX:i.deltaX,deltaY:i.deltaY}))},[r]);pi(t,"wheel",n?null:a)}var lc={};ie(lc,"useLongPress",()=>cc);const uc=500;function cc(e){let{isDisabled:t,onLongPressStart:r,onLongPressEnd:n,onLongPress:a,threshold:i=uc,accessibilityDescription:s}=e;const o=P.useRef(null);let{addGlobalListener:l,removeGlobalListener:h}=Qt(),{pressProps:p}=Mn({isDisabled:t,onPressStart(b){if((b.pointerType==="mouse"||b.pointerType==="touch")&&(r&&r({...b,type:"longpressstart"}),o.current=setTimeout(()=>{b.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),a&&a({...b,type:"longpress"}),o.current=null},i),b.pointerType==="touch")){let v=x=>{x.preventDefault()};l(b.target,"contextmenu",v,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{h(b.target,"contextmenu",v)},30)},{once:!0})}},onPressEnd(b){o.current&&clearTimeout(o.current),n&&(b.pointerType==="mouse"||b.pointerType==="touch")&&n({...b,type:"longpressend"})}}),w=ci(a&&!t?s:null);return{longPressProps:Pe(p,w)}}function ki(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Oi={};ki(Oi,"useVisuallyHidden",()=>Ri);ki(Oi,"VisuallyHidden",()=>_i);const ha={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:1,whiteSpace:"nowrap"};function Ri(e={}){let{style:t,isFocusable:r}=e,[n,a]=P.useState(!1),{focusProps:i}=Ai({isDisabled:!r,onFocusChange:a}),s=P.useMemo(()=>n?t:t?{...ha,...t}:ha,[n]);return{visuallyHiddenProps:{...i,style:s}}}function _i(e){let{children:t,elementType:r="div",isFocusable:n,style:a,...i}=e,{visuallyHiddenProps:s}=Ri(e);return W.default.createElement(r,Pe(i,s),t)}function ye(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function fc(e){return e&&e.__esModule?e.default:e}var dc={};ye(dc,"useOverlayPosition",()=>wc);const pa={top:"top",bottom:"top",left:"left",right:"left"},Gt={top:"bottom",bottom:"top",left:"right",right:"left"},hc={top:"left",left:"top"},Xr={top:"height",left:"width"},_t={};let qe=typeof window!="undefined"&&window.visualViewport;function pc(e){let t=0,r=0,n=0,a=0,i={};if(e.tagName==="BODY"){var s;t=(s=qe==null?void 0:qe.width)!==null&&s!==void 0?s:document.documentElement.clientWidth;var o;r=(o=qe==null?void 0:qe.height)!==null&&o!==void 0?o:document.documentElement.clientHeight,i.top=pt(yt(e).documentElement)||pt(e),i.left=ht(yt(e).documentElement)||ht(e)}else({width:t,height:r,top:n,left:a}=et(e)),i.top=pt(e),i.left=ht(e);return{width:t,height:r,scroll:i,top:n,left:a}}function mc(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function ma(e,t,r,n,a){let i=n.scroll[e],s=n[Xr[e]],o=t-a-i,l=t+a-i+r;return o<0?-o:l>s?Math.max(s-l,-o):0}function vc(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function va(e){if(_t[e])return _t[e];let[t,r]=e.split(" "),n=pa[t]||"right",a=hc[n];pa[r]||(r="center");let i=Xr[n],s=Xr[a];return _t[e]={placement:t,crossPlacement:r,axis:n,crossAxis:a,size:i,crossSize:s},_t[e]}function Cr(e,t,r,n,a,i,s,o){let{placement:l,crossPlacement:h,axis:p,crossAxis:w,size:b,crossSize:v}=n,x={};x[w]=e[w],h==="center"?x[w]+=(e[v]-r[v])/2:h!==w&&(x[w]+=e[v]-r[v]),x[w]+=i;let A=e[w]+e[v]/2-r[v],k=e[w]+e[v]/2;if(x[w]=Math.min(Math.max(A,x[w]),k),l===p){const C=o?s[b]:t[b];x[Gt[p]]=Math.floor(C-e[p]+a)}else x[p]=Math.floor(e[p]+e[b]+a);return x}function gc(e,t,r,n,a,i){return e.top!=null?Math.max(0,t.height+t.top+t.scroll.top-(r.top+e.top)-(a.top+a.bottom+i)):Math.max(0,n.top+r.top-(t.top+t.scroll.top)-(a.top+a.bottom+i))}function ga(e,t,r,n,a,i){let{placement:s,axis:o,size:l}=i;return s===o?Math.max(0,r[o]-e[o]-e.scroll[o]+t[o]-n[o]-n[Gt[o]]-a):Math.max(0,e[l]+e[o]+e.scroll[o]-t[o]-r[o]-r[l]-n[o]-n[Gt[o]]-a)}function bc(e,t,r,n,a,i,s,o,l,h,p,w,b){let v=va(e),{size:x,crossAxis:A,crossSize:k,placement:C,crossPlacement:S}=v,O=Cr(t,o,r,v,h,p,l,w),g=h,D=ga(o,l,t,a,i+h,v);if(s&&n[x]>D){let R=va(`${Gt[C]} ${S}`),B=Cr(t,o,r,R,h,p,l,w);ga(o,l,t,a,i+h,R)>D&&(v=R,O=B,g=h)}let M=ma(A,O[A],r[k],o,i);O[A]+=M;let N=gc(O,o,l,t,a,i);b&&b<N&&(N=b),r.height=Math.min(r.height,N),O=Cr(t,o,r,v,g,p,l,w),M=ma(A,O[A],r[k],o,i),O[A]+=M;let I={};return I[A]=t[A]-O[A]+t[k]/2,{position:O,maxHeight:N,arrowOffsetLeft:I.left,arrowOffsetTop:I.top,placement:v.placement}}function yc(e){let{placement:t,targetNode:r,overlayNode:n,scrollNode:a,padding:i,shouldFlip:s,boundaryElement:o,offset:l,crossOffset:h,maxHeight:p}=e,w=n.offsetParent||document.body,b=w.tagName==="BODY";const v=window.getComputedStyle(w).position;let x=!!v&&v!=="static",A=b?et(r):oa(r,w);if(!b){let D=String(Me(r,"marginTop")),M=String(Me(r,"marginLeft"));A.top+=parseInt(D,10)||0,A.left+=parseInt(M,10)||0}let k=et(n),C=vc(n);k.width+=C.left+C.right,k.height+=C.top+C.bottom;let S=mc(a),O=pc(o),g=o.tagName==="BODY"?et(w):oa(w,o);return bc(t,A,k,S,C,i,s,O,g,l,h,x,p)}const Mi=new WeakMap;function $c(e){let{triggerRef:t,isOpen:r,onClose:n}=e;P.useEffect(()=>{if(!r)return;let a=i=>{let s=i.target;if(!t.current||s instanceof Node&&!s.contains(t.current))return;let o=n||Mi.get(t.current);o&&o()};return window.addEventListener("scroll",a,!0),()=>{window.removeEventListener("scroll",a,!0)}},[r,n,t])}let Je=typeof window!="undefined"&&window.visualViewport;function wc(e){let{direction:t}=_e(),{targetRef:r,overlayRef:n,scrollRef:a=n,placement:i="bottom",containerPadding:s=12,shouldFlip:o=!0,boundaryElement:l=typeof document!="undefined"?document.body:null,offset:h=0,crossOffset:p=0,shouldUpdatePosition:w=!0,isOpen:b=!0,onClose:v,maxHeight:x}=e,[A,k]=P.useState({position:{},arrowOffsetLeft:void 0,arrowOffsetTop:void 0,maxHeight:void 0,placement:void 0}),C=[w,i,n.current,r.current,a.current,s,o,l,h,p,b,t,x],S=P.useCallback(()=>{w===!1||!b||!n.current||!r.current||!a.current||!l||k(yc({placement:Pc(i,t),overlayNode:n.current,targetNode:r.current,scrollNode:a.current,padding:s,shouldFlip:o,boundaryElement:l,offset:h,crossOffset:p,maxHeight:x}))},C);he(S,C),Ec(S);let O=P.useRef(!1);he(()=>{let D,M=()=>{O.current=!0,clearTimeout(D),D=setTimeout(()=>{O.current=!1},500),S()};return Je==null||Je.addEventListener("resize",M),()=>{Je==null||Je.removeEventListener("resize",M)}},[S]);let g=P.useCallback(()=>{O.current||v()},[v,O]);return $c({triggerRef:r,isOpen:b,onClose:v?g:void 0}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...A.position,maxHeight:A.maxHeight}},placement:A.placement,arrowProps:{style:{left:A.arrowOffsetLeft,top:A.arrowOffsetTop}},updatePosition:S}}function Ec(e){he(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function Pc(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}var xc={};ye(xc,"useOverlay",()=>Ac);const Oe=[];function Ac(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:a,isDismissable:i=!1,isKeyboardDismissDisabled:s=!1,shouldCloseOnInteractOutside:o}=e;P.useEffect(()=>(a&&Oe.push(t),()=>{let x=Oe.indexOf(t);x>=0&&Oe.splice(x,1)}),[a,t]);let l=()=>{Oe[Oe.length-1]===t&&r&&r()},h=x=>{(!o||o(x.target))&&Oe[Oe.length-1]===t&&(x.stopPropagation(),x.preventDefault())},p=x=>{(!o||o(x.target))&&(Oe[Oe.length-1]===t&&(x.stopPropagation(),x.preventDefault()),l())},w=x=>{x.key==="Escape"&&!s&&(x.stopPropagation(),x.preventDefault(),l())};Si({ref:t,onInteractOutside:i?p:null,onInteractOutsideStart:h});let{focusWithinProps:b}=Ci({isDisabled:!n,onBlurWithin:x=>{(!o||o(x.relatedTarget))&&r()}}),v=x=>{x.target===x.currentTarget&&x.preventDefault()};return{overlayProps:{onKeyDown:w,...b},underlayProps:{onPointerDown:v}}}var Tc={};ye(Tc,"useOverlayTrigger",()=>Cc);function Cc(e,t,r){let{type:n}=e,{isOpen:a}=t;P.useEffect(()=>{r&&r.current&&Mi.set(r.current,t.close)});let i;n==="menu"?i=!0:n==="listbox"&&(i="listbox");let s=Jt();return{triggerProps:{"aria-haspopup":i,"aria-expanded":a,"aria-controls":a?s:null},overlayProps:{id:s}}}var Sc={};ye(Sc,"usePreventScroll",()=>Oc);const Sr=typeof window!="undefined"&&window.visualViewport,kc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Oc(e={}){let{isDisabled:t}=e;he(()=>{if(!t)return wt()?_c():Rc()},[t])}function Rc(){return bt(mt(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),mt(document.documentElement,"overflow","hidden"))}function _c(){let e,t=0,r=w=>{e=xn(w.target),!(e===document.documentElement&&e===document.body)&&(t=w.changedTouches[0].pageY)},n=w=>{if(e===document.documentElement||e===document.body){w.preventDefault();return}let b=w.changedTouches[0].pageY,v=e.scrollTop,x=e.scrollHeight-e.clientHeight;(v<=0&&b>t||v>=x&&b<t)&&w.preventDefault(),t=b},a=w=>{let b=w.target;ya(b)&&b!==document.activeElement&&(w.preventDefault(),b.style.transform="translateY(-2000px)",b.focus(),requestAnimationFrame(()=>{b.style.transform=""}))},i=w=>{let b=w.target;ya(b)&&(b.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{b.style.transform="",Sr&&(Sr.height<window.innerHeight?requestAnimationFrame(()=>{ba(b)}):Sr.addEventListener("resize",()=>ba(b),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},o=window.pageXOffset,l=window.pageYOffset,h=bt(mt(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),mt(document.documentElement,"overflow","hidden"),mt(document.body,"marginTop",`-${l}px`));window.scrollTo(0,0);let p=bt(st(document,"touchstart",r,{passive:!1,capture:!0}),st(document,"touchmove",n,{passive:!1,capture:!0}),st(document,"touchend",a,{passive:!1,capture:!0}),st(document,"focus",i,!0),st(window,"scroll",s));return()=>{h(),p(),window.scrollTo(o,l)}}function mt(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function st(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function ba(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let r=xn(e);if(r!==document.documentElement&&r!==document.body&&r!==e){let n=r.getBoundingClientRect().top,a=e.getBoundingClientRect().top;a>n+e.clientHeight&&(r.scrollTop+=a-n)}e=r.parentElement}}function ya(e){return e instanceof HTMLInputElement&&!kc.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var xt={};ye(xt,"ModalProvider",()=>In);ye(xt,"useModalProvider",()=>Nn);ye(xt,"OverlayProvider",()=>Li);ye(xt,"OverlayContainer",()=>Lc);ye(xt,"useModal",()=>Ic);const zt=W.default.createContext(null);function In(e){let{children:t}=e,r=P.useContext(zt),[n,a]=P.useState(0),i=P.useMemo(()=>({parent:r,modalCount:n,addModal(){a(s=>s+1),r&&r.addModal()},removeModal(){a(s=>s-1),r&&r.removeModal()}}),[r,n]);return W.default.createElement(zt.Provider,{value:i},t)}function Nn(){let e=P.useContext(zt);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:null}}}function Mc(e){let{modalProviderProps:t}=Nn();return W.default.createElement("div",{"data-overlay-container":!0,...e,...t})}function Li(e){return W.default.createElement(In,null,W.default.createElement(Mc,e))}function Lc(e){let{portalContainer:t=document.body,...r}=e;W.default.useEffect(()=>{if(t.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[t]);let n=W.default.createElement(Li,r);return xa.default.createPortal(n,t)}function Ic(e){let t=P.useContext(zt);if(!t)throw new Error("Modal is not contained within a provider");return P.useEffect(()=>{if(!((e==null?void 0:e.isDisabled)||!t||!t.parent))return t.parent.addModal(),()=>{t&&t.parent&&t.parent.removeModal()}},[t,t.parent,e==null?void 0:e.isDisabled]),{modalProps:{"data-ismodal":!(e!=null&&e.isDisabled)}}}var Nc={};ye(Nc,"DismissButton",()=>Dc);var Ii={},Ni={};Ni=JSON.parse('{"dismiss":"\u062A\u062C\u0627\u0647\u0644"}');var Di={};Di=JSON.parse('{"dismiss":"\u041E\u0442\u0445\u0432\u044A\u0440\u043B\u044F\u043D\u0435"}');var Bi={};Bi=JSON.parse('{"dismiss":"Odstranit"}');var Hi={};Hi=JSON.parse('{"dismiss":"Luk"}');var Fi={};Fi=JSON.parse('{"dismiss":"Schlie\xDFen"}');var Wi={};Wi=JSON.parse('{"dismiss":"\u0391\u03C0\u03CC\u03C1\u03C1\u03B9\u03C8\u03B7"}');var Vi={};Vi=JSON.parse('{"dismiss":"Dismiss"}');var Ui={};Ui=JSON.parse('{"dismiss":"Descartar"}');var ji={};ji=JSON.parse('{"dismiss":"L\xF5peta"}');var Gi={};Gi=JSON.parse('{"dismiss":"Hylk\xE4\xE4"}');var zi={};zi=JSON.parse('{"dismiss":"Rejeter"}');var Xi={};Xi=JSON.parse('{"dismiss":"\u05D4\u05EA\u05E2\u05DC\u05DD"}');var Ki={};Ki=JSON.parse('{"dismiss":"Odbaci"}');var Yi={};Yi=JSON.parse('{"dismiss":"Elutas\xEDt\xE1s"}');var qi={};qi=JSON.parse('{"dismiss":"Ignora"}');var Ji={};Ji=JSON.parse('{"dismiss":"\u9589\u3058\u308B"}');var Qi={};Qi=JSON.parse('{"dismiss":"\uBB34\uC2DC"}');var Zi={};Zi=JSON.parse('{"dismiss":"Atmesti"}');var eo={};eo=JSON.parse('{"dismiss":"Ner\u0101d\u012Bt"}');var to={};to=JSON.parse('{"dismiss":"Lukk"}');var ro={};ro=JSON.parse('{"dismiss":"Negeren"}');var no={};no=JSON.parse('{"dismiss":"Zignoruj"}');var ao={};ao=JSON.parse('{"dismiss":"Descartar"}');var io={};io=JSON.parse('{"dismiss":"Dispensar"}');var oo={};oo=JSON.parse('{"dismiss":"Revocare"}');var so={};so=JSON.parse('{"dismiss":"\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C"}');var lo={};lo=JSON.parse('{"dismiss":"Zru\u0161i\u0165"}');var uo={};uo=JSON.parse('{"dismiss":"Opusti"}');var co={};co=JSON.parse('{"dismiss":"Odbaci"}');var fo={};fo=JSON.parse('{"dismiss":"Avvisa"}');var ho={};ho=JSON.parse('{"dismiss":"Kapat"}');var po={};po=JSON.parse('{"dismiss":"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"}');var mo={};mo=JSON.parse('{"dismiss":"\u53D6\u6D88"}');var vo={};vo=JSON.parse('{"dismiss":"\u95DC\u9589"}');Ii={"ar-AE":Ni,"bg-BG":Di,"cs-CZ":Bi,"da-DK":Hi,"de-DE":Fi,"el-GR":Wi,"en-US":Vi,"es-ES":Ui,"et-EE":ji,"fi-FI":Gi,"fr-FR":zi,"he-IL":Xi,"hr-HR":Ki,"hu-HU":Yi,"it-IT":qi,"ja-JP":Ji,"ko-KR":Qi,"lt-LT":Zi,"lv-LV":eo,"nb-NO":to,"nl-NL":ro,"pl-PL":no,"pt-BR":ao,"pt-PT":io,"ro-RO":oo,"ru-RU":so,"sk-SK":lo,"sl-SI":uo,"sr-SP":co,"sv-SE":fo,"tr-TR":ho,"uk-UA":po,"zh-CN":mo,"zh-TW":vo};function Dc(e){let{onDismiss:t,...r}=e,n=ei(fc(Ii)),a=li(r,n("dismiss")),i=()=>{t&&t()};return W.default.createElement(_i,null,W.default.createElement("button",{...a,tabIndex:-1,onClick:i}))}var Bc={};ye(Bc,"ariaHideOutside",()=>Hc);let lt=new WeakMap;function Hc(e,t=document.body){let r=new Set(e),n=new Set,a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(l){return l instanceof HTMLElement&&l.dataset.liveAnnouncer==="true"&&r.add(l),r.has(l)||n.has(l.parentElement)?NodeFilter.FILTER_REJECT:l instanceof HTMLElement&&l.getAttribute("role")==="row"||e.some(h=>l.contains(h))?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}}),i=l=>{var h;let p=(h=lt.get(l))!==null&&h!==void 0?h:0;l.getAttribute("aria-hidden")==="true"&&p===0||(p===0&&l.setAttribute("aria-hidden","true"),n.add(l),lt.set(l,p+1))},s=a.nextNode();for(;s!=null;)i(s),s=a.nextNode();let o=new MutationObserver(l=>{for(let h of l)if(!(h.type!=="childList"||h.addedNodes.length===0)&&![...r,...n].some(p=>p.contains(h.target)))for(let p of h.addedNodes)p instanceof HTMLElement&&p.dataset.liveAnnouncer==="true"?r.add(p):p instanceof Element&&i(p)});return o.observe(t,{childList:!0,subtree:!0}),()=>{o.disconnect();for(let l of n){let h=lt.get(l);h===1?(l.removeAttribute("aria-hidden"),lt.delete(l)):lt.set(l,h-1)}}}function $a(e){return e&&e.__esModule?e.default:e}function Ge(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Dn={};Ge(Dn,"useProvider",()=>ir);Ge(Dn,"Provider",()=>yo);Ge(Dn,"useProviderProps",()=>Gc);var go={};Ge(go,"spectrum",()=>Kr,e=>Kr=e);var Kr;Kr="spectrum_b37d53";var ar={};Ge(ar,"spectrum",()=>Yr,e=>Yr=e);Ge(ar,"spectrum-Body",()=>qr,e=>qr=e);Ge(ar,"spectrum-Body--italic",()=>Jr,e=>Jr=e);var Yr,qr,Jr;Yr="spectrum_2a241c";qr="spectrum-Body_2a241c";Jr="spectrum-Body--italic_2a241c";function Fc(e,t){let r=Ft("(prefers-color-scheme: dark)"),n=Ft("(prefers-color-scheme: light)");return e.dark&&r?"dark":e.light&&n?"light":e.dark&&t==="dark"?"dark":e.light&&t==="light"||!e.dark||e.light?"light":"dark"}function Wc(e){return Ft("(any-pointer: fine)")&&e.medium?"medium":e.large?"large":"medium"}var bo={};bo=JSON.parse('{"name":"@react-spectrum/provider","version":"3.4.1","description":"Spectrum UI components in React","license":"Apache-2.0","main":"dist/main.js","module":"dist/module.js","types":"dist/types.d.ts","source":"src/index.ts","files":["dist","src"],"sideEffects":["*.css"],"targets":{"main":{"includeNodeModules":["@adobe/spectrum-css-temp"]},"module":{"includeNodeModules":["@adobe/spectrum-css-temp"]}},"repository":{"type":"git","url":"https://github.com/adobe/react-spectrum"},"dependencies":{"@babel/runtime":"^7.6.2","@react-aria/i18n":"^3.4.1","@react-aria/overlays":"^3.9.1","@react-aria/utils":"^3.13.1","@react-spectrum/utils":"^3.7.1","@react-types/provider":"^3.5.1","@react-types/shared":"^3.13.1","clsx":"^1.1.1"},"devDependencies":{"@adobe/spectrum-css-temp":"3.0.0-alpha.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"},"publishConfig":{"access":"public"}}');const Bn=W.default.createContext(null);Bn.displayName="ProviderContext";const Vc={S:640,M:768,L:1024,XL:1280,XXL:1536};function Uc(e,t){let r=ir(),n=r&&r.colorScheme,a=r&&r.breakpoints,{theme:i=r&&r.theme,defaultColorScheme:s}=e,o=Fc(i,s),l=Wc(i),{locale:h}=_e(),p=!!i[n],{colorScheme:w=p?n:o,scale:b=r?r.scale:l,locale:v=r?h:null,breakpoints:x=r?a:Vc,children:A,isQuiet:k,isEmphasized:C,isDisabled:S,isRequired:O,isReadOnly:g,validationState:D,...M}=e,N={version:bo.version,theme:i,breakpoints:x,colorScheme:w,scale:b,isQuiet:k,isEmphasized:C,isDisabled:S,isRequired:O,isReadOnly:g,validationState:D},I=bi(x),R={};Object.entries(N).forEach(([y,f])=>f!==void 0&&(R[y]=f));let B=Object.assign({},r,R),E=A,m=xe(M),{styleProps:d}=Ae(M,void 0,{matchedBreakpoints:I});return(!r||e.locale||i!==r.theme||w!==r.colorScheme||b!==r.scale||Object.keys(m).length>0||M.UNSAFE_className||Object.keys(d.style).length>0)&&(E=W.default.createElement(jc,{...e,UNSAFE_style:{isolation:r?void 0:"isolate",...d.style},ref:t},E)),W.default.createElement(Bn.Provider,{value:B},W.default.createElement(Za,{locale:v},W.default.createElement(gi,{matchedBreakpoints:I},W.default.createElement(In,null,E))))}let yo=W.default.forwardRef(Uc);const jc=W.default.forwardRef(function(t,r){let{children:n,...a}=t,{locale:i,direction:s}=_e(),{theme:o,colorScheme:l,scale:h}=ir(),{modalProviderProps:p}=Nn(),{styleProps:w}=Ae(a),b=De(r),v=Object.keys(o[l])[0],x=Object.keys(o[h])[0],A=vn(w.className,$a(go).spectrum,$a(ar).spectrum,o[l][v],o[h][x],o.global?Object.values(o.global):null,{"react-spectrum-provider":Le,spectrum:Le,[v]:Le,[x]:Le});var k,C;let S={...w.style,colorScheme:(C=(k=t.colorScheme)!==null&&k!==void 0?k:l)!==null&&C!==void 0?C:Object.keys(o).filter(g=>g==="light"||g==="dark").join(" ")},O=P.useRef(!1);return P.useEffect(()=>{if(s&&b.current){let g=b.current.parentElement.closest("[dir]"),D=g&&g.getAttribute("dir");D&&D!==s&&!O.current&&(console.warn(`Language directions cannot be nested. ${s} inside ${D}.`),O.current=!0)}},[s,b,O]),W.default.createElement("div",{...xe(a),...w,...p,className:A,style:S,lang:i,dir:s,ref:b},n)});function ir(){return P.useContext(Bn)}function Gc(e){let t=ir();return t?Object.assign({},{isQuiet:t.isQuiet,isEmphasized:t.isEmphasized,isDisabled:t.isDisabled,isRequired:t.isRequired,isReadOnly:t.isReadOnly,validationState:t.validationState},e):e}function ut(e){return e&&e.__esModule?e.default:e}function $e(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var $o={};$e($o,"spectrum--darkest",()=>Qr,e=>Qr=e);var Qr;Qr="spectrum--darkest_256eeb";var He={};$e(He,"spectrum",()=>Zr,e=>Zr=e);$e(He,"spectrum--medium",()=>en,e=>en=e);$e(He,"spectrum--large",()=>tn,e=>tn=e);$e(He,"spectrum--darkest",()=>rn,e=>rn=e);$e(He,"spectrum--dark",()=>nn,e=>nn=e);$e(He,"spectrum--light",()=>an,e=>an=e);$e(He,"spectrum--lightest",()=>on,e=>on=e);var Zr,en,tn,rn,nn,an,on;Zr="spectrum_9e130c";en="spectrum--medium_9e130c";tn="spectrum--large_9e130c";rn="spectrum--darkest_9e130c";nn="spectrum--dark_9e130c";an="spectrum--light_9e130c";on="spectrum--lightest_9e130c";var wo={};$e(wo,"spectrum--large",()=>sn,e=>sn=e);var sn;sn="spectrum--large_c40598";var Eo={};$e(Eo,"spectrum--light",()=>ln,e=>ln=e);var ln;ln="spectrum--light_a40724";var Po={};$e(Po,"spectrum--medium",()=>un,e=>un=e);var un;un="spectrum--medium_4b172c";let zc={global:ut(He),light:ut(Eo),dark:ut($o),medium:ut(Po),large:ut(wo)};const j=e=>{const t=P.useContext(e);if(!t)throw new Error(`Cannot find ${e}Provider`);return t},pe={templateArea:{artwork:"row1-1",trackInfo:"row1-2",trackTimeCurrent:"row1-3",trackTimeDuration:"row1-4",progress:"row1-5",repeatType:"row1-6",volume:"row1-7",playButton:"row1-8",playList:"row1-9"}},ee=P.createContext(null);function Xc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var or={exports:{}},sr={};/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
6
6
|
*
|
|
@@ -8,7 +8,7 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var
|
|
11
|
+
*/var Kc=W.default,Yc=Symbol.for("react.element"),qc=Symbol.for("react.fragment"),Jc=Object.prototype.hasOwnProperty,Qc=Kc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Zc={key:!0,ref:!0,__self:!0,__source:!0};function xo(e,t,r){var n,a={},i=null,s=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)Jc.call(t,n)&&!Zc.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:Yc,type:e,key:i,ref:s,props:a,_owner:Qc.current}}sr.Fragment=qc;sr.jsx=xo;sr.jsxs=xo;or.exports=sr;const L=or.exports.jsx,le=or.exports.jsxs,ze=or.exports.Fragment,ef=({children:e,rootContainerProps:t})=>{const{playerPlacement:r}=j(ee),[n,a]=P.useState();return P.useLayoutEffect(()=>{r&&a((()=>{switch(r){case"bottom":return{bottom:0};case"top":return{top:0};case"bottom-left":return{bottom:0,left:0};case"bottom-right":return{bottom:0,right:0};case"top-left":return{top:0,left:0};case"top-right":return{top:0,right:0}}})())},[r]),L(yo,{theme:zc,width:"100%",position:r&&"fixed",UNSAFE_className:"rm-audio-player-provider",...n,...t,children:e})},ue=P.createContext(null),Hn=e=>{const t=`${Math.floor(e/60)}`.padStart(2,"0"),r=`${Math.floor(e%60)}`.padStart(2,"0");return`${t}:${r}`},Fn=(e,t,r)=>{if(!e)return;const{progressHandleEl:n,progressValueEl:a,trackCurTimeEl:i,trackDurationEl:s,audioEl:o,waveformInst:l}=e;r&&(o&&(o.currentTime=0),l==null||l.seekTo(0)),n&&a&&(a.style.transform="scaleX(0)",n.style.transform="translateX(0px)"),i&&s&&(i.innerHTML="00:00",r||(s.innerHTML=t?Hn(t):"00:00"))},tf=(e,t)=>{var r,n,a,i;switch(t.type){case"NEXT_AUDIO":{if(e.curAudioState.repeatType==="NONE"&&e.curIdx+1===e.playList.length)return{...e,curAudioState:{...e.curAudioState,isPlaying:!1}};if(e.curAudioState.repeatType==="SHUFFLE"){let o=0;const l=()=>{o=Math.round(Math.random()*(e.playList.length-1))};for(;o===e.curIdx;)l();return{...e,curPlayId:e.playList[o].id,curIdx:o}}const s=(e.curIdx+1)%e.playList.length;return{...e,curIdx:s,curPlayId:e.playList[s].id}}case"PREV_AUDIO":{if(((r=e.elementRefs)==null?void 0:r.audioEl)&&((n=e.elementRefs)==null?void 0:n.audioEl.currentTime)>1||((a=e.elementRefs)==null?void 0:a.waveformInst)&&((i=e.elementRefs)==null?void 0:i.waveformInst.getCurrentTime())>1||e.curAudioState.repeatType==="NONE"&&e.curIdx===0)return Fn(e.elementRefs,void 0,!0),e;if(e.curAudioState.repeatType==="SHUFFLE"){const o=Math.round(Math.random()*(e.playList.length-1));return{...e,curPlayId:e.playList[o].id,curIdx:o}}const s=(e.curIdx-1+e.playList.length)%e.playList.length;return{...e,curPlayId:e.playList[s].id,curIdx:s}}case"UPDATE_PLAY_LIST":{const s=t.playList.find(o=>o.id===e.curPlayId);return s?{...e,playList:t.playList,curIdx:s.index}:(console.error("UPDATE_PLAY_LIST ERROR - curPlayId is not found on playList"),e)}case"SET_VOLUME":return{...e,curAudioState:{...e.curAudioState,volume:t.volume}};case"SET_INITIAL_AUDIO_STATE":return{...e,curAudioState:{...e.curAudioState,...t.audioInitialState},curPlayId:t.audioInitialState.curPlayId};case"SET_PlAY_STATE":return t.state!==void 0?{...e,curAudioState:{...e.curAudioState,isPlaying:t.state}}:{...e,curAudioState:{...e.curAudioState,isPlaying:!e.curAudioState.isPlaying}};case"SET_CURRENT_INDEX":return{...e,curPlayId:t.currentAudioId,curIdx:t.currentIndex};case"SET_REPEAT_TYPE":return{...e,curAudioState:{...e.curAudioState,repeatType:t.repeatType}};case"SET_PLACEMENTS":return{...e,playerPlacement:t.playerPlacement||e.playerPlacement,playListPlacement:t.playListPlacement||e.playListPlacement,interfacePlacement:t.interfacePlacement};case"SET_MUTED":return{...e,curAudioState:{...e.curAudioState,muted:t.muted}};case"SET_ACTIVE_UI":return{...e,activeUI:{...t.activeUI}};case"SET_ELEMENT_REFS":return{...e,elementRefs:{...e.elementRefs,...t.elementRefs}};case"SET_CUSTOM_ICONS":return{...e,customIcons:{...e.customIcons,...t.customIcons}};case"SET_COVER_IMGS_CSS":return{...e,coverImgsCss:{...e.coverImgsCss,...t.coverImgsCss}};default:throw new Error("Unhandled action")}},rf=({children:e})=>{const[t,r]=P.useReducer(tf,{playList:[],curPlayId:1,curIdx:0,curAudioState:{isPlaying:!1,repeatType:"ALL",volume:1},activeUI:{playButton:!0},playListPlacement:"bottom",interfacePlacement:{templateArea:{playButton:pe.templateArea.playButton}}});return L(ee.Provider,{value:t,children:L(ue.Provider,{value:r,children:e})})};const nf=be.createGlobalStyle`
|
|
12
12
|
|
|
13
13
|
html,
|
|
14
14
|
body,
|
|
@@ -141,21 +141,23 @@ button{
|
|
|
141
141
|
cursor: pointer;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
* {
|
|
145
|
+
box-sizing: border-box;
|
|
146
|
+
}
|
|
147
|
+
`;function lr(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var af={};lr(af,"View",()=>Wn);function of(e,t){e=Et(e);let{elementType:r="div",children:n,...a}=e,{styleProps:i}=Ae(e,yi),s=De(t);return W.default.createElement(r,{...xe(a),...i,ref:s},W.default.createElement(Pt,null,n))}const Wn=P.forwardRef(of);var sf={};lr(sf,"Content",()=>uf);function lf(e,t){e=Et(e,"content");let{children:r,...n}=e,{styleProps:a}=Ae(n),i=De(t);return W.default.createElement("section",{...xe(n),...a,ref:i},W.default.createElement(Pt,null,r))}const uf=P.forwardRef(lf);var cf={};lr(cf,"Footer",()=>df);function ff(e,t){e=Et(e,"footer");let{children:r,...n}=e,{styleProps:a}=Ae(n),i=De(t);return W.default.createElement("footer",{...xe(n),...a,ref:i},W.default.createElement(Pt,null,r))}const df=P.forwardRef(ff);var hf={};lr(hf,"Header",()=>mf);function pf(e,t){e=Et(e,"header");let{children:r,...n}=e,{styleProps:a}=Ae(n),i=De(t);return W.default.createElement("header",{...xe(n),...a,ref:i},W.default.createElement(Pt,null,r))}const mf=P.forwardRef(pf),vf=()=>{const{curAudioState:e,elementRefs:t}=j(ee),r=j(ue),n=P.useCallback(s=>{if(s.currentTarget.readyState===0||!t)return;const o=s.currentTarget.currentTime,l=s.currentTarget.duration,{trackCurTimeEl:h,progressBarEl:p,progressValueEl:w,progressHandleEl:b}=t;if(h&&(h.innerText=Hn(o)),p&&w&&b){const v=p.clientWidth,x=o/l*v;w.style.transform=`scaleX(${o/l})`,b.style.transform=`translateX(${x}px)`}},[t]),a=P.useCallback(()=>{if(!!(t!=null&&t.audioEl)){if(e.repeatType==="ONE"){t.audioEl.currentTime=0,t.audioEl.play();return}r({type:"NEXT_AUDIO"})}},[r,e.repeatType,t==null?void 0:t.audioEl]),i=P.useCallback(s=>{if(!t)return;const{duration:o}=s.currentTarget;Fn(t,o)},[t]);return P.useEffect(()=>{!(t!=null&&t.audioEl)||(e.isPlaying?t==null||t.audioEl.play():t==null||t.audioEl.pause())},[t==null?void 0:t.audioEl,e.isPlaying]),P.useEffect(()=>{!(t!=null&&t.audioEl)||(t.audioEl.volume=e.volume)},[t==null?void 0:t.audioEl,e.volume]),{onTimeUpdate:n,onEnded:a,onLoadedMetadata:i}},gf=()=>{const e=P.useRef(null),{curAudioState:t,curPlayId:r,playList:n}=j(ee),a=j(ue),i=n.find(l=>l.id===r),s=Object.fromEntries(Object.entries(t).filter(l=>!(l[0]==="isPlaying"||l[0]==="repeatType"||l[0]==="curPlayId"))),o=vf();return P.useEffect(()=>{!e.current||a({type:"SET_ELEMENT_REFS",elementRefs:{audioEl:e.current}})},[e.current,a]),L("audio",{id:"rm-audio-player-audio",autoPlay:t.isPlaying,ref:e,src:i.src,...o,...s})},bf=e=>{const t=P.useRef();return P.useLayoutEffect(()=>{const r=Object.entries(e).reduce((n,[a,i])=>({...n,[a]:window.getComputedStyle(document.getElementsByClassName("rm-audio-player-provider")[0]).getPropertyValue(`${i}`)}),{});t.current=r},[e]),t};var Ao={exports:{}};/*!
|
|
147
148
|
* wavesurfer.js 6.2.0 (2022-05-16)
|
|
148
149
|
* https://wavesurfer-js.org
|
|
149
150
|
* @license BSD-3-Clause
|
|
150
|
-
*/(function(e,t){(function(n,a){e.exports=a()})(self,()=>(()=>{var r={"./src/drawer.canvasentry.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var u=g(l("./src/util/style.js")),f=g(l("./src/util/get-id.js"));function g(_){return _&&_.__esModule?_:{default:_}}function v(_,A){if(!(_ instanceof A))throw new TypeError("Cannot call a class as a function")}function b(_,A){for(var S=0;S<A.length;S++){var O=A[S];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(_,O.key,O)}}function w(_,A,S){return A&&b(_.prototype,A),S&&b(_,S),Object.defineProperty(_,"prototype",{writable:!1}),_}var T=function(){function _(){v(this,_),this.wave=null,this.waveCtx=null,this.progress=null,this.progressCtx=null,this.start=0,this.end=1,this.id=(0,f.default)(typeof this.constructor.name!="undefined"?this.constructor.name.toLowerCase()+"_":"canvasentry_"),this.canvasContextAttributes={}}return w(_,[{key:"initWave",value:function(S){this.wave=S,this.waveCtx=this.wave.getContext("2d",this.canvasContextAttributes)}},{key:"initProgress",value:function(S){this.progress=S,this.progressCtx=this.progress.getContext("2d",this.canvasContextAttributes)}},{key:"updateDimensions",value:function(S,O,y,H){this.start=this.wave.offsetLeft/O||0,this.end=this.start+S/O,this.wave.width=y,this.wave.height=H;var M={width:S+"px"};(0,u.default)(this.wave,M),this.hasProgressCanvas&&(this.progress.width=y,this.progress.height=H,(0,u.default)(this.progress,M))}},{key:"clearWave",value:function(){this.waveCtx.clearRect(0,0,this.waveCtx.canvas.width,this.waveCtx.canvas.height),this.hasProgressCanvas&&this.progressCtx.clearRect(0,0,this.progressCtx.canvas.width,this.progressCtx.canvas.height)}},{key:"setFillStyles",value:function(S,O){this.waveCtx.fillStyle=this.getFillStyle(this.waveCtx,S),this.hasProgressCanvas&&(this.progressCtx.fillStyle=this.getFillStyle(this.progressCtx,O))}},{key:"getFillStyle",value:function(S,O){if(typeof O=="string"||O instanceof CanvasGradient)return O;var y=S.createLinearGradient(0,0,0,S.canvas.height);return O.forEach(function(H,M){return y.addColorStop(M/O.length,H)}),y}},{key:"applyCanvasTransforms",value:function(S){S&&(this.waveCtx.setTransform(0,1,1,0,0,0),this.hasProgressCanvas&&this.progressCtx.setTransform(0,1,1,0,0,0))}},{key:"fillRects",value:function(S,O,y,H,M){this.fillRectToContext(this.waveCtx,S,O,y,H,M),this.hasProgressCanvas&&this.fillRectToContext(this.progressCtx,S,O,y,H,M)}},{key:"fillRectToContext",value:function(S,O,y,H,M,D){!S||(D?this.drawRoundedRect(S,O,y,H,M,D):S.fillRect(O,y,H,M))}},{key:"drawRoundedRect",value:function(S,O,y,H,M,D){M!==0&&(M<0&&(M*=-1,y-=M),S.beginPath(),S.moveTo(O+D,y),S.lineTo(O+H-D,y),S.quadraticCurveTo(O+H,y,O+H,y+D),S.lineTo(O+H,y+M-D),S.quadraticCurveTo(O+H,y+M,O+H-D,y+M),S.lineTo(O+D,y+M),S.quadraticCurveTo(O,y+M,O,y+M-D),S.lineTo(O,y+D),S.quadraticCurveTo(O,y,O+D,y),S.closePath(),S.fill())}},{key:"drawLines",value:function(S,O,y,H,M,D){this.drawLineToContext(this.waveCtx,S,O,y,H,M,D),this.hasProgressCanvas&&this.drawLineToContext(this.progressCtx,S,O,y,H,M,D)}},{key:"drawLineToContext",value:function(S,O,y,H,M,D,L){if(!!S){var I=O.length/2,B=Math.round(I*this.start),P=Math.round(I*this.end)+1,m=B,h=P,x=this.wave.width/(h-m-1),p=H+M,d=y/H;S.beginPath(),S.moveTo((m-B)*x,p),S.lineTo((m-B)*x,p-Math.round((O[2*m]||0)/d));var C,E,c;for(C=m;C<h;C++)E=O[2*C]||0,c=Math.round(E/d),S.lineTo((C-B)*x+this.halfPixel,p-c);var R=h-1;for(R;R>=m;R--)E=O[2*R+1]||0,c=Math.round(E/d),S.lineTo((R-B)*x+this.halfPixel,p-c);S.lineTo((m-B)*x,p-Math.round((O[2*m+1]||0)/d)),S.closePath(),S.fill()}}},{key:"destroy",value:function(){this.waveCtx=null,this.wave=null,this.progressCtx=null,this.progress=null}},{key:"getImage",value:function(S,O,y){var H=this;if(y==="blob")return new Promise(function(M){H.wave.toBlob(M,S,O)});if(y==="dataURL")return this.wave.toDataURL(S,O)}}]),_}();o.default=T,s.exports=o.default},"./src/drawer.js":(s,o,l)=>{function u(L){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},u(L)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var f=v(l("./src/util/index.js"));function g(L){if(typeof WeakMap!="function")return null;var I=new WeakMap,B=new WeakMap;return(g=function(m){return m?B:I})(L)}function v(L,I){if(!I&&L&&L.__esModule)return L;if(L===null||u(L)!=="object"&&typeof L!="function")return{default:L};var B=g(I);if(B&&B.has(L))return B.get(L);var P={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var h in L)if(h!=="default"&&Object.prototype.hasOwnProperty.call(L,h)){var x=m?Object.getOwnPropertyDescriptor(L,h):null;x&&(x.get||x.set)?Object.defineProperty(P,h,x):P[h]=L[h]}return P.default=L,B&&B.set(L,P),P}function b(L,I){if(!(L instanceof I))throw new TypeError("Cannot call a class as a function")}function w(L,I){for(var B=0;B<I.length;B++){var P=I[B];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}function T(L,I,B){return I&&w(L.prototype,I),B&&w(L,B),Object.defineProperty(L,"prototype",{writable:!1}),L}function _(L,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(I&&I.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),Object.defineProperty(L,"prototype",{writable:!1}),I&&A(L,I)}function A(L,I){return A=Object.setPrototypeOf||function(P,m){return P.__proto__=m,P},A(L,I)}function S(L){var I=H();return function(){var P=M(L),m;if(I){var h=M(this).constructor;m=Reflect.construct(P,arguments,h)}else m=P.apply(this,arguments);return O(this,m)}}function O(L,I){if(I&&(u(I)==="object"||typeof I=="function"))return I;if(I!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(L)}function y(L){if(L===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L}function H(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function M(L){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(B){return B.__proto__||Object.getPrototypeOf(B)},M(L)}var D=function(L){_(B,L);var I=S(B);function B(P,m){var h;return b(this,B),h=I.call(this),h.container=f.withOrientation(P,m.vertical),h.params=m,h.width=0,h.height=m.height*h.params.pixelRatio,h.lastPos=0,h.wrapper=null,h}return T(B,[{key:"style",value:function(m,h){return f.style(m,h)}},{key:"createWrapper",value:function(){this.wrapper=f.withOrientation(this.container.appendChild(document.createElement("wave")),this.params.vertical),this.style(this.wrapper,{display:"block",position:"relative",userSelect:"none",webkitUserSelect:"none",height:this.params.height+"px"}),(this.params.fillParent||this.params.scrollParent)&&this.style(this.wrapper,{width:"100%",cursor:this.params.hideCursor?"none":"auto",overflowX:this.params.hideScrollbar?"hidden":"auto",overflowY:"hidden"}),this.setupWrapperEvents()}},{key:"handleEvent",value:function(m,h){!h&&m.preventDefault();var x=f.withOrientation(m.targetTouches?m.targetTouches[0]:m,this.params.vertical).clientX,p=this.wrapper.getBoundingClientRect(),d=this.width,C=this.getWidth(),E=this.getProgressPixels(p,x),c;return!this.params.fillParent&&d<C?c=E*(this.params.pixelRatio/d)||0:c=(E+this.wrapper.scrollLeft)/this.wrapper.scrollWidth||0,f.clamp(c,0,1)}},{key:"getProgressPixels",value:function(m,h){return this.params.rtl?m.right-h:h-m.left}},{key:"setupWrapperEvents",value:function(){var m=this;this.wrapper.addEventListener("click",function(h){var x=f.withOrientation(h,m.params.vertical),p=m.wrapper.offsetHeight-m.wrapper.clientHeight;if(p!==0){var d=m.wrapper.getBoundingClientRect();if(x.clientY>=d.bottom-p)return}m.params.interact&&m.fireEvent("click",h,m.handleEvent(h))}),this.wrapper.addEventListener("dblclick",function(h){m.params.interact&&m.fireEvent("dblclick",h,m.handleEvent(h))}),this.wrapper.addEventListener("scroll",function(h){return m.fireEvent("scroll",h)})}},{key:"drawPeaks",value:function(m,h,x,p){this.setWidth(h)||this.clearWave(),this.params.barWidth?this.drawBars(m,0,x,p):this.drawWave(m,0,x,p)}},{key:"resetScroll",value:function(){this.wrapper!==null&&(this.wrapper.scrollLeft=0)}},{key:"recenter",value:function(m){var h=this.wrapper.scrollWidth*m;this.recenterOnPosition(h,!0)}},{key:"recenterOnPosition",value:function(m,h){var x=this.wrapper.scrollLeft,p=~~(this.wrapper.clientWidth/2),d=this.wrapper.scrollWidth-this.wrapper.clientWidth,C=m-p,E=C-x;if(d!=0){if(!h&&-p<=E&&E<p){var c=this.params.autoCenterRate;c/=p,c*=d,E=Math.max(-c,Math.min(c,E)),C=x+E}C=Math.max(0,Math.min(d,C)),C!=x&&(this.wrapper.scrollLeft=C)}}},{key:"getScrollX",value:function(){var m=0;if(this.wrapper){var h=this.params.pixelRatio;if(m=Math.round(this.wrapper.scrollLeft*h),this.params.scrollParent){var x=~~(this.wrapper.scrollWidth*h-this.getWidth());m=Math.min(x,Math.max(0,m))}}return m}},{key:"getWidth",value:function(){return Math.round(this.container.clientWidth*this.params.pixelRatio)}},{key:"setWidth",value:function(m){if(this.width==m)return!1;if(this.width=m,this.params.fillParent||this.params.scrollParent)this.style(this.wrapper,{width:""});else{var h=~~(this.width/this.params.pixelRatio)+"px";this.style(this.wrapper,{width:h})}return this.updateSize(),!0}},{key:"setHeight",value:function(m){return m==this.height?!1:(this.height=m,this.style(this.wrapper,{height:~~(this.height/this.params.pixelRatio)+"px"}),this.updateSize(),!0)}},{key:"progress",value:function(m){var h=1/this.params.pixelRatio,x=Math.round(m*this.width)*h;if(x<this.lastPos||x-this.lastPos>=h){if(this.lastPos=x,this.params.scrollParent&&this.params.autoCenter){var p=~~(this.wrapper.scrollWidth*m);this.recenterOnPosition(p,this.params.autoCenterImmediately)}this.updateProgress(x)}}},{key:"destroy",value:function(){this.unAll(),this.wrapper&&(this.wrapper.parentNode==this.container.domElement&&this.container.removeChild(this.wrapper.domElement),this.wrapper=null)}},{key:"updateCursor",value:function(){}},{key:"updateSize",value:function(){}},{key:"drawBars",value:function(m,h,x,p){}},{key:"drawWave",value:function(m,h,x,p){}},{key:"clearWave",value:function(){}},{key:"updateProgress",value:function(m){}}]),B}(f.Observer);o.default=D,s.exports=o.default},"./src/drawer.multicanvas.js":(s,o,l)=>{function u(P){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},u(P)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var f=T(l("./src/drawer.js")),g=w(l("./src/util/index.js")),v=T(l("./src/drawer.canvasentry.js"));function b(P){if(typeof WeakMap!="function")return null;var m=new WeakMap,h=new WeakMap;return(b=function(p){return p?h:m})(P)}function w(P,m){if(!m&&P&&P.__esModule)return P;if(P===null||u(P)!=="object"&&typeof P!="function")return{default:P};var h=b(m);if(h&&h.has(P))return h.get(P);var x={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in P)if(d!=="default"&&Object.prototype.hasOwnProperty.call(P,d)){var C=p?Object.getOwnPropertyDescriptor(P,d):null;C&&(C.get||C.set)?Object.defineProperty(x,d,C):x[d]=P[d]}return x.default=P,h&&h.set(P,x),x}function T(P){return P&&P.__esModule?P:{default:P}}function _(P,m){if(!(P instanceof m))throw new TypeError("Cannot call a class as a function")}function A(P,m){for(var h=0;h<m.length;h++){var x=m[h];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(P,x.key,x)}}function S(P,m,h){return m&&A(P.prototype,m),h&&A(P,h),Object.defineProperty(P,"prototype",{writable:!1}),P}function O(P,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(m&&m.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),Object.defineProperty(P,"prototype",{writable:!1}),m&&y(P,m)}function y(P,m){return y=Object.setPrototypeOf||function(x,p){return x.__proto__=p,x},y(P,m)}function H(P){var m=L();return function(){var x=I(P),p;if(m){var d=I(this).constructor;p=Reflect.construct(x,arguments,d)}else p=x.apply(this,arguments);return M(this,p)}}function M(P,m){if(m&&(u(m)==="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D(P)}function D(P){if(P===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P}function L(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function I(P){return I=Object.setPrototypeOf?Object.getPrototypeOf:function(h){return h.__proto__||Object.getPrototypeOf(h)},I(P)}var B=function(P){O(h,P);var m=H(h);function h(x,p){var d;return _(this,h),d=m.call(this,x,p),d.maxCanvasWidth=p.maxCanvasWidth,d.maxCanvasElementWidth=Math.round(p.maxCanvasWidth/p.pixelRatio),d.hasProgressCanvas=p.waveColor!=p.progressColor,d.halfPixel=.5/p.pixelRatio,d.canvases=[],d.progressWave=null,d.EntryClass=v.default,d.canvasContextAttributes=p.drawingContextAttributes,d.overlap=2*Math.ceil(p.pixelRatio/2),d.barRadius=p.barRadius||0,d.vertical=p.vertical,d}return S(h,[{key:"init",value:function(){this.createWrapper(),this.createElements()}},{key:"createElements",value:function(){this.progressWave=g.withOrientation(this.wrapper.appendChild(document.createElement("wave")),this.params.vertical),this.style(this.progressWave,{position:"absolute",zIndex:3,left:0,top:0,bottom:0,overflow:"hidden",width:"0",display:"none",boxSizing:"border-box",borderRightStyle:"solid",pointerEvents:"none"}),this.addCanvas(),this.updateCursor()}},{key:"updateCursor",value:function(){this.style(this.progressWave,{borderRightWidth:this.params.cursorWidth+"px",borderRightColor:this.params.cursorColor})}},{key:"updateSize",value:function(){for(var p=this,d=Math.round(this.width/this.params.pixelRatio),C=Math.ceil(d/(this.maxCanvasElementWidth+this.overlap));this.canvases.length<C;)this.addCanvas();for(;this.canvases.length>C;)this.removeCanvas();var E=this.maxCanvasWidth+this.overlap,c=this.canvases.length-1;this.canvases.forEach(function(R,F){F==c&&(E=p.width-p.maxCanvasWidth*c),p.updateDimensions(R,E,p.height),R.clearWave()})}},{key:"addCanvas",value:function(){var p=new this.EntryClass;p.canvasContextAttributes=this.canvasContextAttributes,p.hasProgressCanvas=this.hasProgressCanvas,p.halfPixel=this.halfPixel;var d=this.maxCanvasElementWidth*this.canvases.length,C=g.withOrientation(this.wrapper.appendChild(document.createElement("canvas")),this.params.vertical);if(this.style(C,{position:"absolute",zIndex:2,left:d+"px",top:0,bottom:0,height:"100%",pointerEvents:"none"}),p.initWave(C),this.hasProgressCanvas){var E=g.withOrientation(this.progressWave.appendChild(document.createElement("canvas")),this.params.vertical);this.style(E,{position:"absolute",left:d+"px",top:0,bottom:0,height:"100%"}),p.initProgress(E)}this.canvases.push(p)}},{key:"removeCanvas",value:function(){var p=this.canvases[this.canvases.length-1];p.wave.parentElement.removeChild(p.wave.domElement),this.hasProgressCanvas&&p.progress.parentElement.removeChild(p.progress.domElement),p&&(p.destroy(),p=null),this.canvases.pop()}},{key:"updateDimensions",value:function(p,d,C){var E=Math.round(d/this.params.pixelRatio),c=Math.round(this.width/this.params.pixelRatio);p.updateDimensions(E,c,d,C),this.style(this.progressWave,{display:"block"})}},{key:"clearWave",value:function(){var p=this;g.frame(function(){p.canvases.forEach(function(d){return d.clearWave()})})()}},{key:"drawBars",value:function(p,d,C,E){var c=this;return this.prepareDraw(p,d,C,E,function(R){var F=R.absmax,W=R.hasMinVals;R.height;var U=R.offsetY,q=R.halfH,Q=R.peaks,z=R.channelIndex;if(C!==void 0){var de=W?2:1,Ae=Q.length/de,se=c.params.barWidth*c.params.pixelRatio,We=c.params.barGap===null?Math.max(c.params.pixelRatio,~~(se/2)):Math.max(c.params.pixelRatio,c.params.barGap*c.params.pixelRatio),ye=se+We,Ne=Ae/c.width,bf=C,gf=E,$t=bf;for($t;$t<gf;$t+=ye){var ln=0,un=Math.floor($t*Ne)*de,yf=Math.floor(($t+ye)*Ne)*de;do{var Bs=Math.abs(Q[un]);Bs>ln&&(ln=Bs),un+=de}while(un<yf);var hr=Math.round(ln/F*q);hr==0&&c.params.barMinHeight&&(hr=c.params.barMinHeight),c.fillRect($t+c.halfPixel,q-hr+U,se+c.halfPixel,hr*2,c.barRadius,z)}}})}},{key:"drawWave",value:function(p,d,C,E){var c=this;return this.prepareDraw(p,d,C,E,function(R){var F=R.absmax,W=R.hasMinVals;R.height;var U=R.offsetY,q=R.halfH,Q=R.peaks,z=R.channelIndex;if(!W){var de=[],Ae=Q.length,se=0;for(se;se<Ae;se++)de[2*se]=Q[se],de[2*se+1]=-Q[se];Q=de}C!==void 0&&c.drawLine(Q,F,q,U,C,E,z),c.fillRect(0,q+U-c.halfPixel,c.width,c.halfPixel,c.barRadius,z)})}},{key:"drawLine",value:function(p,d,C,E,c,R,F){var W=this,U=this.params.splitChannelsOptions.channelColors[F]||{},q=U.waveColor,Q=U.progressColor;this.canvases.forEach(function(z,de){W.setFillStyles(z,q,Q),W.applyCanvasTransforms(z,W.params.vertical),z.drawLines(p,d,C,E,c,R)})}},{key:"fillRect",value:function(p,d,C,E,c,R){var F=Math.floor(p/this.maxCanvasWidth),W=Math.min(Math.ceil((p+C)/this.maxCanvasWidth)+1,this.canvases.length),U=F;for(U;U<W;U++){var q=this.canvases[U],Q=U*this.maxCanvasWidth,z={x1:Math.max(p,U*this.maxCanvasWidth),y1:d,x2:Math.min(p+C,U*this.maxCanvasWidth+q.wave.width),y2:d+E};if(z.x1<z.x2){var de=this.params.splitChannelsOptions.channelColors[R]||{},Ae=de.waveColor,se=de.progressColor;this.setFillStyles(q,Ae,se),this.applyCanvasTransforms(q,this.params.vertical),q.fillRects(z.x1-Q,z.y1,z.x2-z.x1,z.y2-z.y1,c)}}}},{key:"hideChannel",value:function(p){return this.params.splitChannels&&this.params.splitChannelsOptions.filterChannels.includes(p)}},{key:"prepareDraw",value:function(p,d,C,E,c,R,F){var W=this;return g.frame(function(){if(p[0]instanceof Array){var U=p;if(W.params.splitChannels){var q=U.filter(function(ye,Ne){return!W.hideChannel(Ne)});W.params.splitChannelsOptions.overlay||W.setHeight(Math.max(q.length,1)*W.params.height*W.params.pixelRatio);var Q;return W.params.splitChannelsOptions&&W.params.splitChannelsOptions.relativeNormalization&&(Q=g.max(U.map(function(ye){return g.absMax(ye)}))),U.forEach(function(ye,Ne){return W.prepareDraw(ye,Ne,C,E,c,q.indexOf(ye),Q)})}p=U[0]}if(!W.hideChannel(d)){var z=1/W.params.barHeight;W.params.normalize&&(z=F===void 0?g.absMax(p):F);var de=[].some.call(p,function(ye){return ye<0}),Ae=W.params.height*W.params.pixelRatio,se=Ae/2,We=Ae*R||0;return W.params.splitChannelsOptions&&W.params.splitChannelsOptions.overlay&&(We=0),c({absmax:z,hasMinVals:de,height:Ae,offsetY:We,halfH:se,peaks:p,channelIndex:d})}})()}},{key:"setFillStyles",value:function(p){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.params.waveColor,C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.params.progressColor;p.setFillStyles(d,C)}},{key:"applyCanvasTransforms",value:function(p){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;p.applyCanvasTransforms(d)}},{key:"getImage",value:function(p,d,C){if(C==="blob")return Promise.all(this.canvases.map(function(c){return c.getImage(p,d,C)}));if(C==="dataURL"){var E=this.canvases.map(function(c){return c.getImage(p,d,C)});return E.length>1?E:E[0]}}},{key:"updateProgress",value:function(p){this.style(this.progressWave,{width:p+"px"})}}]),h}(f.default);o.default=B,s.exports=o.default},"./src/mediaelement-webaudio.js":(s,o,l)=>{function u(I){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},u(I)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var f=g(l("./src/mediaelement.js"));function g(I){return I&&I.__esModule?I:{default:I}}function v(I,B){if(!(I instanceof B))throw new TypeError("Cannot call a class as a function")}function b(I,B){for(var P=0;P<B.length;P++){var m=B[P];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(I,m.key,m)}}function w(I,B,P){return B&&b(I.prototype,B),P&&b(I,P),Object.defineProperty(I,"prototype",{writable:!1}),I}function T(){return typeof Reflect!="undefined"&&Reflect.get?T=Reflect.get:T=function(B,P,m){var h=_(B,P);if(!!h){var x=Object.getOwnPropertyDescriptor(h,P);return x.get?x.get.call(arguments.length<3?B:m):x.value}},T.apply(this,arguments)}function _(I,B){for(;!Object.prototype.hasOwnProperty.call(I,B)&&(I=D(I),I!==null););return I}function A(I,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(B&&B.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),Object.defineProperty(I,"prototype",{writable:!1}),B&&S(I,B)}function S(I,B){return S=Object.setPrototypeOf||function(m,h){return m.__proto__=h,m},S(I,B)}function O(I){var B=M();return function(){var m=D(I),h;if(B){var x=D(this).constructor;h=Reflect.construct(m,arguments,x)}else h=m.apply(this,arguments);return y(this,h)}}function y(I,B){if(B&&(u(B)==="object"||typeof B=="function"))return B;if(B!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return H(I)}function H(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}function M(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function D(I){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)},D(I)}var L=function(I){A(P,I);var B=O(P);function P(m){var h;return v(this,P),h=B.call(this,m),h.params=m,h.sourceMediaElement=null,h}return w(P,[{key:"init",value:function(){this.setPlaybackRate(this.params.audioRate),this.createTimer(),this.createVolumeNode(),this.createScriptNode(),this.createAnalyserNode()}},{key:"_load",value:function(h,x,p){T(D(P.prototype),"_load",this).call(this,h,x,p),this.createMediaElementSource(h)}},{key:"createMediaElementSource",value:function(h){this.sourceMediaElement=this.ac.createMediaElementSource(h),this.sourceMediaElement.connect(this.analyser)}},{key:"play",value:function(h,x){return this.resumeAudioContext(),T(D(P.prototype),"play",this).call(this,h,x)}},{key:"destroy",value:function(){T(D(P.prototype),"destroy",this).call(this),this.destroyWebAudio()}}]),P}(f.default);o.default=L,s.exports=o.default},"./src/mediaelement.js":(s,o,l)=>{function u(m){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},u(m)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var f=w(l("./src/webaudio.js")),g=b(l("./src/util/index.js"));function v(m){if(typeof WeakMap!="function")return null;var h=new WeakMap,x=new WeakMap;return(v=function(d){return d?x:h})(m)}function b(m,h){if(!h&&m&&m.__esModule)return m;if(m===null||u(m)!=="object"&&typeof m!="function")return{default:m};var x=v(h);if(x&&x.has(m))return x.get(m);var p={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in m)if(C!=="default"&&Object.prototype.hasOwnProperty.call(m,C)){var E=d?Object.getOwnPropertyDescriptor(m,C):null;E&&(E.get||E.set)?Object.defineProperty(p,C,E):p[C]=m[C]}return p.default=m,x&&x.set(m,p),p}function w(m){return m&&m.__esModule?m:{default:m}}function T(m,h){if(!(m instanceof h))throw new TypeError("Cannot call a class as a function")}function _(m,h){for(var x=0;x<h.length;x++){var p=h[x];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(m,p.key,p)}}function A(m,h,x){return h&&_(m.prototype,h),x&&_(m,x),Object.defineProperty(m,"prototype",{writable:!1}),m}function S(){return typeof Reflect!="undefined"&&Reflect.get?S=Reflect.get:S=function(h,x,p){var d=O(h,x);if(!!d){var C=Object.getOwnPropertyDescriptor(d,x);return C.get?C.get.call(arguments.length<3?h:p):C.value}},S.apply(this,arguments)}function O(m,h){for(;!Object.prototype.hasOwnProperty.call(m,h)&&(m=B(m),m!==null););return m}function y(m,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(h&&h.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),h&&H(m,h)}function H(m,h){return H=Object.setPrototypeOf||function(p,d){return p.__proto__=d,p},H(m,h)}function M(m){var h=I();return function(){var p=B(m),d;if(h){var C=B(this).constructor;d=Reflect.construct(p,arguments,C)}else d=p.apply(this,arguments);return D(this,d)}}function D(m,h){if(h&&(u(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return L(m)}function L(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function I(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(m){return B=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)},B(m)}var P=function(m){y(x,m);var h=M(x);function x(p){var d;return T(this,x),d=h.call(this,p),d.params=p,d.media={currentTime:0,duration:0,paused:!0,playbackRate:1,play:function(){},pause:function(){},volume:0},d.mediaType=p.mediaType.toLowerCase(),d.elementPosition=p.elementPosition,d.peaks=null,d.playbackRate=1,d.volume=1,d.isMuted=!1,d.buffer=null,d.onPlayEnd=null,d.mediaListeners={},d}return A(x,[{key:"init",value:function(){this.setPlaybackRate(this.params.audioRate),this.createTimer()}},{key:"_setupMediaListeners",value:function(){var d=this;this.mediaListeners.error=function(){d.fireEvent("error","Error loading media element")},this.mediaListeners.canplay=function(){d.fireEvent("canplay")},this.mediaListeners.ended=function(){d.fireEvent("finish")},this.mediaListeners.play=function(){d.fireEvent("play")},this.mediaListeners.pause=function(){d.fireEvent("pause")},this.mediaListeners.seeked=function(C){d.fireEvent("seek")},this.mediaListeners.volumechange=function(C){d.isMuted=d.media.muted,d.isMuted?d.volume=0:d.volume=d.media.volume,d.fireEvent("volume")},Object.keys(this.mediaListeners).forEach(function(C){d.media.removeEventListener(C,d.mediaListeners[C]),d.media.addEventListener(C,d.mediaListeners[C])})}},{key:"createTimer",value:function(){var d=this,C=function E(){d.isPaused()||(d.fireEvent("audioprocess",d.getCurrentTime()),g.frame(E)())};this.on("play",C),this.on("pause",function(){d.fireEvent("audioprocess",d.getCurrentTime())})}},{key:"load",value:function(d,C,E,c){var R=document.createElement(this.mediaType);R.controls=this.params.mediaControls,R.autoplay=this.params.autoplay||!1,R.preload=c==null?"auto":c,R.src=d,R.style.width="100%";var F=C.querySelector(this.mediaType);F&&C.removeChild(F),C.appendChild(R),this._load(R,E,c)}},{key:"loadElt",value:function(d,C){d.controls=this.params.mediaControls,d.autoplay=this.params.autoplay||!1,this._load(d,C,d.preload)}},{key:"_load",value:function(d,C,E){if(!(d instanceof HTMLMediaElement)||typeof d.addEventListener=="undefined")throw new Error("media parameter is not a valid media element");typeof d.load=="function"&&!(C&&E=="none")&&d.load(),this.media=d,this._setupMediaListeners(),this.peaks=C,this.onPlayEnd=null,this.buffer=null,this.isMuted=d.muted,this.setPlaybackRate(this.playbackRate),this.setVolume(this.volume)}},{key:"isPaused",value:function(){return!this.media||this.media.paused}},{key:"getDuration",value:function(){if(this.explicitDuration)return this.explicitDuration;var d=(this.buffer||this.media).duration;return d>=1/0&&(d=this.media.seekable.end(0)),d}},{key:"getCurrentTime",value:function(){return this.media&&this.media.currentTime}},{key:"getPlayedPercents",value:function(){return this.getCurrentTime()/this.getDuration()||0}},{key:"getPlaybackRate",value:function(){return this.playbackRate||this.media.playbackRate}},{key:"setPlaybackRate",value:function(d){this.playbackRate=d||1,this.media.playbackRate=this.playbackRate}},{key:"seekTo",value:function(d){d!=null&&!isNaN(d)&&(this.media.currentTime=d),this.clearPlayEnd()}},{key:"play",value:function(d,C){this.seekTo(d);var E=this.media.play();return C&&this.setPlayEnd(C),E}},{key:"pause",value:function(){var d;return this.media&&(d=this.media.pause()),this.clearPlayEnd(),d}},{key:"setPlayEnd",value:function(d){var C=this;this.clearPlayEnd(),this._onPlayEnd=function(E){E>=d&&(C.pause(),C.seekTo(d))},this.on("audioprocess",this._onPlayEnd)}},{key:"clearPlayEnd",value:function(){this._onPlayEnd&&(this.un("audioprocess",this._onPlayEnd),this._onPlayEnd=null)}},{key:"getPeaks",value:function(d,C,E){return this.buffer?S(B(x.prototype),"getPeaks",this).call(this,d,C,E):this.peaks||[]}},{key:"setSinkId",value:function(d){return d?this.media.setSinkId?this.media.setSinkId(d):Promise.reject(new Error("setSinkId is not supported in your browser")):Promise.reject(new Error("Invalid deviceId: "+d))}},{key:"getVolume",value:function(){return this.volume}},{key:"setVolume",value:function(d){this.volume=d,this.media.volume!==this.volume&&(this.media.volume=this.volume)}},{key:"setMute",value:function(d){this.isMuted=this.media.muted=d}},{key:"destroy",value:function(){var d=this;this.pause(),this.unAll(),this.destroyed=!0,Object.keys(this.mediaListeners).forEach(function(C){d.media&&d.media.removeEventListener(C,d.mediaListeners[C])}),this.params.removeMediaElementOnDestroy&&this.media&&this.media.parentNode&&this.media.parentNode.removeChild(this.media),this.media=null}}]),x}(f.default);o.default=P,s.exports=o.default},"./src/peakcache.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;function l(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function u(v,b){for(var w=0;w<b.length;w++){var T=b[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(v,T.key,T)}}function f(v,b,w){return b&&u(v.prototype,b),w&&u(v,w),Object.defineProperty(v,"prototype",{writable:!1}),v}var g=function(){function v(){l(this,v),this.clearPeakCache()}return f(v,[{key:"clearPeakCache",value:function(){this.peakCacheRanges=[],this.peakCacheLength=-1}},{key:"addRangeToPeakCache",value:function(w,T,_){w!=this.peakCacheLength&&(this.clearPeakCache(),this.peakCacheLength=w);for(var A=[],S=0;S<this.peakCacheRanges.length&&this.peakCacheRanges[S]<T;)S++;for(S%2==0&&A.push(T);S<this.peakCacheRanges.length&&this.peakCacheRanges[S]<=_;)A.push(this.peakCacheRanges[S]),S++;S%2==0&&A.push(_),A=A.filter(function(y,H,M){return H==0?y!=M[H+1]:H==M.length-1?y!=M[H-1]:y!=M[H-1]&&y!=M[H+1]}),this.peakCacheRanges=this.peakCacheRanges.concat(A),this.peakCacheRanges=this.peakCacheRanges.sort(function(y,H){return y-H}).filter(function(y,H,M){return H==0?y!=M[H+1]:H==M.length-1?y!=M[H-1]:y!=M[H-1]&&y!=M[H+1]});var O=[];for(S=0;S<A.length;S+=2)O.push([A[S],A[S+1]]);return O}},{key:"getCacheRanges",value:function(){var w=[],T;for(T=0;T<this.peakCacheRanges.length;T+=2)w.push([this.peakCacheRanges[T],this.peakCacheRanges[T+1]]);return w}}]),v}();o.default=g,s.exports=o.default},"./src/util/absMax.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=v;var u=g(l("./src/util/max.js")),f=g(l("./src/util/min.js"));function g(b){return b&&b.__esModule?b:{default:b}}function v(b){var w=(0,u.default)(b),T=(0,f.default)(b);return-T>w?-T:w}s.exports=o.default},"./src/util/clamp.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(u,f,g){return Math.min(Math.max(f,u),g)}s.exports=o.default},"./src/util/fetch.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=T;var u=f(l("./src/util/observer.js"));function f(_){return _&&_.__esModule?_:{default:_}}function g(_,A){if(!(_ instanceof A))throw new TypeError("Cannot call a class as a function")}function v(_,A){for(var S=0;S<A.length;S++){var O=A[S];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(_,O.key,O)}}function b(_,A,S){return A&&v(_.prototype,A),S&&v(_,S),Object.defineProperty(_,"prototype",{writable:!1}),_}var w=function(){function _(A,S,O){g(this,_),this.instance=A,this.instance._reader=O.body.getReader(),this.total=parseInt(S,10),this.loaded=0}return b(_,[{key:"start",value:function(S){var O=this,y=function H(){O.instance._reader.read().then(function(M){var D=M.done,L=M.value;if(D){O.total===0&&O.instance.onProgress.call(O.instance,{loaded:O.loaded,total:O.total,lengthComputable:!1}),S.close();return}O.loaded+=L.byteLength,O.instance.onProgress.call(O.instance,{loaded:O.loaded,total:O.total,lengthComputable:O.total!==0}),S.enqueue(L),H()}).catch(function(M){S.error(M)})};y()}}]),_}();function T(_){if(_){if(!_.url)throw new Error("fetch url missing")}else throw new Error("fetch options missing");var A=new u.default,S=new Headers,O=new Request(_.url);A.controller=new AbortController,_&&_.requestHeaders&&_.requestHeaders.forEach(function(M){S.append(M.key,M.value)});var y=_.responseType||"json",H={method:_.method||"GET",headers:S,mode:_.mode||"cors",credentials:_.credentials||"same-origin",cache:_.cache||"default",redirect:_.redirect||"follow",referrer:_.referrer||"client",signal:A.controller.signal};return fetch(O,H).then(function(M){A.response=M;var D=!0;M.body||(D=!1);var L=M.headers.get("content-length");return L===null&&(D=!1),D?(A.onProgress=function(I){A.fireEvent("progress",I)},new Response(new ReadableStream(new w(A,L,M)),H)):M}).then(function(M){var D;if(M.ok)switch(y){case"arraybuffer":return M.arrayBuffer();case"json":return M.json();case"blob":return M.blob();case"text":return M.text();default:D="Unknown responseType: "+y;break}throw D||(D="HTTP error status: "+M.status),new Error(D)}).then(function(M){A.fireEvent("success",M)}).catch(function(M){A.fireEvent("error",M)}),A.fetchRequest=O,A}s.exports=o.default},"./src/util/frame.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=g;var u=f(l("./src/util/request-animation-frame.js"));function f(v){return v&&v.__esModule?v:{default:v}}function g(v){return function(){for(var b=arguments.length,w=new Array(b),T=0;T<b;T++)w[T]=arguments[T];return(0,u.default)(function(){return v.apply(void 0,w)})}}s.exports=o.default},"./src/util/get-id.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(u){return u===void 0&&(u="wavesurfer_"),u+Math.random().toString(32).substring(2)}s.exports=o.default},"./src/util/index.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),Object.defineProperty(o,"Observer",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(o,"absMax",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(o,"clamp",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(o,"debounce",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(o,"fetchFile",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(o,"frame",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(o,"getId",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(o,"ignoreSilenceMode",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(o,"max",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(o,"min",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(o,"preventClick",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(o,"requestAnimationFrame",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(o,"style",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(o,"withOrientation",{enumerable:!0,get:function(){return H.default}});var u=D(l("./src/util/get-id.js")),f=D(l("./src/util/max.js")),g=D(l("./src/util/min.js")),v=D(l("./src/util/absMax.js")),b=D(l("./src/util/observer.js")),w=D(l("./src/util/style.js")),T=D(l("./src/util/request-animation-frame.js")),_=D(l("./src/util/frame.js")),A=D(l("./node_modules/debounce/index.js")),S=D(l("./src/util/prevent-click.js")),O=D(l("./src/util/fetch.js")),y=D(l("./src/util/clamp.js")),H=D(l("./src/util/orientation.js")),M=D(l("./src/util/silence-mode.js"));function D(L){return L&&L.__esModule?L:{default:L}}},"./src/util/max.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(u){var f=-1/0;return Object.keys(u).forEach(function(g){u[g]>f&&(f=u[g])}),f}s.exports=o.default},"./src/util/min.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(u){var f=Number(1/0);return Object.keys(u).forEach(function(g){u[g]<f&&(f=u[g])}),f}s.exports=o.default},"./src/util/observer.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;function l(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function u(v,b){for(var w=0;w<b.length;w++){var T=b[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(v,T.key,T)}}function f(v,b,w){return b&&u(v.prototype,b),w&&u(v,w),Object.defineProperty(v,"prototype",{writable:!1}),v}var g=function(){function v(){l(this,v),this._disabledEventEmissions=[],this.handlers=null}return f(v,[{key:"on",value:function(w,T){var _=this;this.handlers||(this.handlers={});var A=this.handlers[w];return A||(A=this.handlers[w]=[]),A.push(T),{name:w,callback:T,un:function(O,y){return _.un(O,y)}}}},{key:"un",value:function(w,T){if(!!this.handlers){var _=this.handlers[w],A;if(_)if(T)for(A=_.length-1;A>=0;A--)_[A]==T&&_.splice(A,1);else _.length=0}}},{key:"unAll",value:function(){this.handlers=null}},{key:"once",value:function(w,T){var _=this,A=function S(){for(var O=arguments.length,y=new Array(O),H=0;H<O;H++)y[H]=arguments[H];T.apply(_,y),setTimeout(function(){_.un(w,S)},0)};return this.on(w,A)}},{key:"setDisabledEventEmissions",value:function(w){this._disabledEventEmissions=w}},{key:"_isDisabledEventEmission",value:function(w){return this._disabledEventEmissions&&this._disabledEventEmissions.includes(w)}},{key:"fireEvent",value:function(w){for(var T=arguments.length,_=new Array(T>1?T-1:0),A=1;A<T;A++)_[A-1]=arguments[A];if(!(!this.handlers||this._isDisabledEventEmission(w))){var S=this.handlers[w];S&&S.forEach(function(O){O.apply(void 0,_)})}}}]),v}();o.default=g,s.exports=o.default},"./src/util/orientation.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=g;var l={width:"height",height:"width",overflowX:"overflowY",overflowY:"overflowX",clientWidth:"clientHeight",clientHeight:"clientWidth",clientX:"clientY",clientY:"clientX",scrollWidth:"scrollHeight",scrollLeft:"scrollTop",offsetLeft:"offsetTop",offsetTop:"offsetLeft",offsetHeight:"offsetWidth",offsetWidth:"offsetHeight",left:"top",right:"bottom",top:"left",bottom:"right",borderRightStyle:"borderBottomStyle",borderRightWidth:"borderBottomWidth",borderRightColor:"borderBottomColor"};function u(v,b){return Object.prototype.hasOwnProperty.call(l,v)&&b?l[v]:v}var f=Symbol("isProxy");function g(v,b){return v[f]?v:new Proxy(v,{get:function(T,_,A){if(_===f)return!0;if(_==="domElement")return T;if(_==="style")return g(T.style,b);if(_==="canvas")return g(T.canvas,b);if(_==="getBoundingClientRect")return function(){return g(T.getBoundingClientRect.apply(T,arguments),b)};if(_==="getContext")return function(){return g(T.getContext.apply(T,arguments),b)};var S=T[u(_,b)];return typeof S=="function"?S.bind(T):S},set:function(T,_,A){return T[u(_,b)]=A,!0}})}s.exports=o.default},"./src/util/prevent-click.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=u;function l(f){f.stopPropagation(),document.body.removeEventListener("click",l,!0)}function u(f){document.body.addEventListener("click",l,!0)}s.exports=o.default},"./src/util/request-animation-frame.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var l=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(u,f){return setTimeout(u,1e3/60)}).bind(window);o.default=l,s.exports=o.default},"./src/util/silence-mode.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(){var u="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAABhTEFNRTMuMTAwA8MAAAAAAAAAABQgJAUHQQAB9AAAAnGMHkkIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADgnABGiAAQBCqgCRMAAgEAH///////////////7+n/9FTuQsQH//////2NG0jWUGlio5gLQTOtIoeR2WX////X4s9Atb/JRVCbBUpeRUq//////////////////9RUi0f2jn/+xDECgPCjAEQAABN4AAANIAAAAQVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==",f=document.createElement("div");f.innerHTML='<audio x-webkit-airplay="deny"></audio>';var g=f.children.item(0);g.src=u,g.preload="auto",g.type="audio/mpeg",g.disableRemotePlayback=!0,g.play(),g.remove(),f.remove()}s.exports=o.default},"./src/util/style.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(u,f){return Object.keys(f).forEach(function(g){u.style[g]!==f[g]&&(u.style[g]=f[g])}),u}s.exports=o.default},"./src/wavesurfer.js":(s,o,l)=>{function u(p){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},u(p)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var f=S(l("./src/util/index.js")),g=_(l("./src/drawer.multicanvas.js")),v=_(l("./src/webaudio.js")),b=_(l("./src/mediaelement.js")),w=_(l("./src/peakcache.js")),T=_(l("./src/mediaelement-webaudio.js"));function _(p){return p&&p.__esModule?p:{default:p}}function A(p){if(typeof WeakMap!="function")return null;var d=new WeakMap,C=new WeakMap;return(A=function(c){return c?C:d})(p)}function S(p,d){if(!d&&p&&p.__esModule)return p;if(p===null||u(p)!=="object"&&typeof p!="function")return{default:p};var C=A(d);if(C&&C.has(p))return C.get(p);var E={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var R in p)if(R!=="default"&&Object.prototype.hasOwnProperty.call(p,R)){var F=c?Object.getOwnPropertyDescriptor(p,R):null;F&&(F.get||F.set)?Object.defineProperty(E,R,F):E[R]=p[R]}return E.default=p,C&&C.set(p,E),E}function O(p,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(d&&d.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),d&&y(p,d)}function y(p,d){return y=Object.setPrototypeOf||function(E,c){return E.__proto__=c,E},y(p,d)}function H(p){var d=L();return function(){var E=I(p),c;if(d){var R=I(this).constructor;c=Reflect.construct(E,arguments,R)}else c=E.apply(this,arguments);return M(this,c)}}function M(p,d){if(d&&(u(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D(p)}function D(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p}function L(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function I(p){return I=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)},I(p)}function B(p,d,C){return d in p?Object.defineProperty(p,d,{value:C,enumerable:!0,configurable:!0,writable:!0}):p[d]=C,p}function P(p,d){if(!(p instanceof d))throw new TypeError("Cannot call a class as a function")}function m(p,d){for(var C=0;C<d.length;C++){var E=d[C];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(p,E.key,E)}}function h(p,d,C){return d&&m(p.prototype,d),C&&m(p,C),Object.defineProperty(p,"prototype",{writable:!1}),p}var x=function(p){O(C,p);var d=H(C);function C(E){var c;if(P(this,C),c=d.call(this),B(D(c),"defaultParams",{audioContext:null,audioScriptProcessor:null,audioRate:1,autoCenter:!0,autoCenterRate:5,autoCenterImmediately:!1,backend:"WebAudio",backgroundColor:null,barHeight:1,barRadius:0,barGap:null,barMinHeight:null,container:null,cursorColor:"#333",cursorWidth:1,dragSelection:!0,drawingContextAttributes:{desynchronized:!1},duration:null,fillParent:!0,forceDecode:!1,height:128,hideScrollbar:!1,hideCursor:!1,ignoreSilenceMode:!1,interact:!0,loopSelection:!0,maxCanvasWidth:4e3,mediaContainer:null,mediaControls:!1,mediaType:"audio",minPxPerSec:20,normalize:!1,partialRender:!1,pixelRatio:window.devicePixelRatio||screen.deviceXDPI/screen.logicalXDPI,plugins:[],progressColor:"#555",removeMediaElementOnDestroy:!0,renderer:g.default,responsive:!1,rtl:!1,scrollParent:!1,skipLength:2,splitChannels:!1,splitChannelsOptions:{overlay:!1,channelColors:{},filterChannels:[],relativeNormalization:!1},vertical:!1,waveColor:"#999",xhr:{}}),B(D(c),"backends",{MediaElement:b.default,WebAudio:v.default,MediaElementWebAudio:T.default}),B(D(c),"util",f),c.params=Object.assign({},c.defaultParams,E),c.params.splitChannelsOptions=Object.assign({},c.defaultParams.splitChannelsOptions,E.splitChannelsOptions),c.container=typeof E.container=="string"?document.querySelector(c.params.container):c.params.container,!c.container)throw new Error("Container element not found");if(c.params.mediaContainer==null?c.mediaContainer=c.container:typeof c.params.mediaContainer=="string"?c.mediaContainer=document.querySelector(c.params.mediaContainer):c.mediaContainer=c.params.mediaContainer,!c.mediaContainer)throw new Error("Media Container element not found");if(c.params.maxCanvasWidth<=1)throw new Error("maxCanvasWidth must be greater than 1");if(c.params.maxCanvasWidth%2==1)throw new Error("maxCanvasWidth must be an even number");if(c.params.rtl===!0&&(c.params.vertical===!0?f.style(c.container,{transform:"rotateX(180deg)"}):f.style(c.container,{transform:"rotateY(180deg)"})),c.params.backgroundColor&&c.setBackgroundColor(c.params.backgroundColor),c.savedVolume=0,c.isMuted=!1,c.tmpEvents=[],c.currentRequest=null,c.arraybuffer=null,c.drawer=null,c.backend=null,c.peakCache=null,typeof c.params.renderer!="function")throw new Error("Renderer parameter is invalid");c.Drawer=c.params.renderer,c.params.backend=="AudioElement"&&(c.params.backend="MediaElement"),(c.params.backend=="WebAudio"||c.params.backend==="MediaElementWebAudio")&&!v.default.prototype.supportsWebAudio.call(null)&&(c.params.backend="MediaElement"),c.Backend=c.backends[c.params.backend],c.initialisedPluginList={},c.isDestroyed=!1,c.isReady=!1;var R=0;return c._onResize=f.debounce(function(){c.drawer.wrapper&&R!=c.drawer.wrapper.clientWidth&&!c.params.scrollParent&&(R=c.drawer.wrapper.clientWidth,R&&c.drawer.fireEvent("redraw"))},typeof c.params.responsive=="number"?c.params.responsive:100),M(c,D(c))}return h(C,[{key:"init",value:function(){return this.registerPlugins(this.params.plugins),this.createDrawer(),this.createBackend(),this.createPeakCache(),this}},{key:"registerPlugins",value:function(c){var R=this;return c.forEach(function(F){return R.addPlugin(F)}),c.forEach(function(F){F.deferInit||R.initPlugin(F.name)}),this.fireEvent("plugins-registered",c),this}},{key:"getActivePlugins",value:function(){return this.initialisedPluginList}},{key:"addPlugin",value:function(c){var R=this;if(!c.name)throw new Error("Plugin does not have a name!");if(!c.instance)throw new Error("Plugin ".concat(c.name," does not have an instance property!"));c.staticProps&&Object.keys(c.staticProps).forEach(function(U){R[U]=c.staticProps[U]});var F=c.instance,W=Object.getOwnPropertyNames(f.Observer.prototype);return W.forEach(function(U){F.prototype[U]=f.Observer.prototype[U]}),this[c.name]=new F(c.params||{},this),this.fireEvent("plugin-added",c.name),this}},{key:"initPlugin",value:function(c){if(!this[c])throw new Error("Plugin ".concat(c," has not been added yet!"));return this.initialisedPluginList[c]&&this.destroyPlugin(c),this[c].init(),this.initialisedPluginList[c]=!0,this.fireEvent("plugin-initialised",c),this}},{key:"destroyPlugin",value:function(c){if(!this[c])throw new Error("Plugin ".concat(c," has not been added yet and cannot be destroyed!"));if(!this.initialisedPluginList[c])throw new Error("Plugin ".concat(c," is not active and cannot be destroyed!"));if(typeof this[c].destroy!="function")throw new Error("Plugin ".concat(c," does not have a destroy function!"));return this[c].destroy(),delete this.initialisedPluginList[c],this.fireEvent("plugin-destroyed",c),this}},{key:"destroyAllPlugins",value:function(){var c=this;Object.keys(this.initialisedPluginList).forEach(function(R){return c.destroyPlugin(R)})}},{key:"createDrawer",value:function(){var c=this;this.drawer=new this.Drawer(this.container,this.params),this.drawer.init(),this.fireEvent("drawer-created",this.drawer),this.params.responsive!==!1&&(window.addEventListener("resize",this._onResize,!0),window.addEventListener("orientationchange",this._onResize,!0)),this.drawer.on("redraw",function(){c.drawBuffer(),c.drawer.progress(c.backend.getPlayedPercents())}),this.drawer.on("click",function(R,F){setTimeout(function(){return c.seekTo(F)},0)}),this.drawer.on("scroll",function(R){c.params.partialRender&&c.drawBuffer(),c.fireEvent("scroll",R)})}},{key:"createBackend",value:function(){var c=this;this.backend&&this.backend.destroy(),this.backend=new this.Backend(this.params),this.backend.init(),this.fireEvent("backend-created",this.backend),this.backend.on("finish",function(){c.drawer.progress(c.backend.getPlayedPercents()),c.fireEvent("finish")}),this.backend.on("play",function(){return c.fireEvent("play")}),this.backend.on("pause",function(){return c.fireEvent("pause")}),this.backend.on("audioprocess",function(R){c.drawer.progress(c.backend.getPlayedPercents()),c.fireEvent("audioprocess",R)}),(this.params.backend==="MediaElement"||this.params.backend==="MediaElementWebAudio")&&(this.backend.on("seek",function(){c.drawer.progress(c.backend.getPlayedPercents())}),this.backend.on("volume",function(){var R=c.getVolume();c.fireEvent("volume",R),c.backend.isMuted!==c.isMuted&&(c.isMuted=c.backend.isMuted,c.fireEvent("mute",c.isMuted))}))}},{key:"createPeakCache",value:function(){this.params.partialRender&&(this.peakCache=new w.default)}},{key:"getDuration",value:function(){return this.backend.getDuration()}},{key:"getCurrentTime",value:function(){return this.backend.getCurrentTime()}},{key:"setCurrentTime",value:function(c){c>=this.getDuration()?this.seekTo(1):this.seekTo(c/this.getDuration())}},{key:"play",value:function(c,R){var F=this;return this.params.ignoreSilenceMode&&f.ignoreSilenceMode(),this.fireEvent("interaction",function(){return F.play(c,R)}),this.backend.play(c,R)}},{key:"setPlayEnd",value:function(c){this.backend.setPlayEnd(c)}},{key:"pause",value:function(){if(!this.backend.isPaused())return this.backend.pause()}},{key:"playPause",value:function(){return this.backend.isPaused()?this.play():this.pause()}},{key:"isPlaying",value:function(){return!this.backend.isPaused()}},{key:"skipBackward",value:function(c){this.skip(-c||-this.params.skipLength)}},{key:"skipForward",value:function(c){this.skip(c||this.params.skipLength)}},{key:"skip",value:function(c){var R=this.getDuration()||1,F=this.getCurrentTime()||0;F=Math.max(0,Math.min(R,F+(c||0))),this.seekAndCenter(F/R)}},{key:"seekAndCenter",value:function(c){this.seekTo(c),this.drawer.recenter(c)}},{key:"seekTo",value:function(c){var R=this;if(typeof c!="number"||!isFinite(c)||c<0||c>1)throw new Error("Error calling wavesurfer.seekTo, parameter must be a number between 0 and 1!");this.fireEvent("interaction",function(){return R.seekTo(c)});var F=this.params.backend==="WebAudio",W=this.backend.isPaused();F&&!W&&this.backend.pause();var U=this.params.scrollParent;this.params.scrollParent=!1,this.backend.seekTo(c*this.getDuration()),this.drawer.progress(c),F&&!W&&this.backend.play(),this.params.scrollParent=U,this.fireEvent("seek",c)}},{key:"stop",value:function(){this.pause(),this.seekTo(0),this.drawer.progress(0)}},{key:"setSinkId",value:function(c){return this.backend.setSinkId(c)}},{key:"setVolume",value:function(c){this.backend.setVolume(c),this.fireEvent("volume",c)}},{key:"getVolume",value:function(){return this.backend.getVolume()}},{key:"setPlaybackRate",value:function(c){this.backend.setPlaybackRate(c)}},{key:"getPlaybackRate",value:function(){return this.backend.getPlaybackRate()}},{key:"toggleMute",value:function(){this.setMute(!this.isMuted)}},{key:"setMute",value:function(c){if(c===this.isMuted){this.fireEvent("mute",this.isMuted);return}this.backend.setMute?(this.backend.setMute(c),this.isMuted=c):c?(this.savedVolume=this.backend.getVolume(),this.backend.setVolume(0),this.isMuted=!0,this.fireEvent("volume",0)):(this.backend.setVolume(this.savedVolume),this.isMuted=!1,this.fireEvent("volume",this.savedVolume)),this.fireEvent("mute",this.isMuted)}},{key:"getMute",value:function(){return this.isMuted}},{key:"getFilters",value:function(){return this.backend.filters||[]}},{key:"toggleScroll",value:function(){this.params.scrollParent=!this.params.scrollParent,this.drawBuffer()}},{key:"toggleInteraction",value:function(){this.params.interact=!this.params.interact}},{key:"getWaveColor",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.params.splitChannelsOptions.channelColors[c]?this.params.splitChannelsOptions.channelColors[c].waveColor:this.params.waveColor}},{key:"setWaveColor",value:function(c){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.params.splitChannelsOptions.channelColors[R]?this.params.splitChannelsOptions.channelColors[R].waveColor=c:this.params.waveColor=c,this.drawBuffer()}},{key:"getProgressColor",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.params.splitChannelsOptions.channelColors[c]?this.params.splitChannelsOptions.channelColors[c].progressColor:this.params.progressColor}},{key:"setProgressColor",value:function(c,R){this.params.splitChannelsOptions.channelColors[R]?this.params.splitChannelsOptions.channelColors[R].progressColor=c:this.params.progressColor=c,this.drawBuffer()}},{key:"getBackgroundColor",value:function(){return this.params.backgroundColor}},{key:"setBackgroundColor",value:function(c){this.params.backgroundColor=c,f.style(this.container,{background:this.params.backgroundColor})}},{key:"getCursorColor",value:function(){return this.params.cursorColor}},{key:"setCursorColor",value:function(c){this.params.cursorColor=c,this.drawer.updateCursor()}},{key:"getHeight",value:function(){return this.params.height}},{key:"setHeight",value:function(c){this.params.height=c,this.drawer.setHeight(c*this.params.pixelRatio),this.drawBuffer()}},{key:"setFilteredChannels",value:function(c){this.params.splitChannelsOptions.filterChannels=c,this.drawBuffer()}},{key:"drawBuffer",value:function(){var c=Math.round(this.getDuration()*this.params.minPxPerSec*this.params.pixelRatio),R=this.drawer.getWidth(),F=c,W=0,U=Math.max(W+R,F);this.params.fillParent&&(!this.params.scrollParent||c<R)&&(F=R,W=0,U=F);var q;if(this.params.partialRender){var Q=this.peakCache.addRangeToPeakCache(F,W,U),z;for(z=0;z<Q.length;z++)q=this.backend.getPeaks(F,Q[z][0],Q[z][1]),this.drawer.drawPeaks(q,F,Q[z][0],Q[z][1])}else q=this.backend.getPeaks(F,W,U),this.drawer.drawPeaks(q,F,W,U);this.fireEvent("redraw",q,F)}},{key:"zoom",value:function(c){c?(this.params.minPxPerSec=c,this.params.scrollParent=!0):(this.params.minPxPerSec=this.defaultParams.minPxPerSec,this.params.scrollParent=!1),this.drawBuffer(),this.drawer.progress(this.backend.getPlayedPercents()),this.drawer.recenter(this.getCurrentTime()/this.getDuration()),this.fireEvent("zoom",c)}},{key:"loadArrayBuffer",value:function(c){var R=this;this.decodeArrayBuffer(c,function(F){R.isDestroyed||R.loadDecodedBuffer(F)})}},{key:"loadDecodedBuffer",value:function(c){this.backend.load(c),this.drawBuffer(),this.isReady=!0,this.fireEvent("ready")}},{key:"loadBlob",value:function(c){var R=this,F=new FileReader;F.addEventListener("progress",function(W){return R.onProgress(W)}),F.addEventListener("load",function(W){return R.loadArrayBuffer(W.target.result)}),F.addEventListener("error",function(){return R.fireEvent("error","Error reading file")}),F.readAsArrayBuffer(c),this.empty()}},{key:"load",value:function(c,R,F,W){if(!c)throw new Error("url parameter cannot be empty");if(this.empty(),F){var U={"Preload is not 'auto', 'none' or 'metadata'":["auto","metadata","none"].indexOf(F)===-1,"Peaks are not provided":!R,"Backend is not of type 'MediaElement' or 'MediaElementWebAudio'":["MediaElement","MediaElementWebAudio"].indexOf(this.params.backend)===-1,"Url is not of type string":typeof c!="string"},q=Object.keys(U).filter(function(Q){return U[Q]});q.length&&(console.warn(`Preload parameter of wavesurfer.load will be ignored because:
|
|
151
|
-
- `+
|
|
152
|
-
- `)),F=null)}switch(this.params.backend==="WebAudio"&&c instanceof HTMLMediaElement&&(c=c.src),this.params.backend){case"WebAudio":return this.loadBuffer(c,R,W);case"MediaElement":case"MediaElementWebAudio":return this.loadMediaElement(c,R,F,W)}}},{key:"loadBuffer",value:function(c,R,F){var W=this,U=function(Q){return Q&&W.tmpEvents.push(W.once("ready",Q)),W.getArrayBuffer(c,function(z){return W.loadArrayBuffer(z)})};if(R)this.backend.setPeaks(R,F),this.drawBuffer(),this.fireEvent("waveform-ready"),this.tmpEvents.push(this.once("interaction",U));else return U()}},{key:"loadMediaElement",value:function(c,R,F,W){var U=this,q=c;if(typeof c=="string")this.backend.load(q,this.mediaContainer,R,F);else{var Q=c;this.backend.loadElt(Q,R),q=Q.src}this.tmpEvents.push(this.backend.once("canplay",function(){U.backend.destroyed||(U.drawBuffer(),U.isReady=!0,U.fireEvent("ready"))}),this.backend.once("error",function(z){return U.fireEvent("error",z)})),R&&(this.backend.setPeaks(R,W),this.drawBuffer(),this.fireEvent("waveform-ready")),(!R||this.params.forceDecode)&&this.backend.supportsWebAudio()&&this.getArrayBuffer(q,function(z){U.decodeArrayBuffer(z,function(de){U.backend.buffer=de,U.backend.setPeaks(null),U.drawBuffer(),U.fireEvent("waveform-ready")})})}},{key:"decodeArrayBuffer",value:function(c,R){var F=this;this.isDestroyed||(this.arraybuffer=c,this.backend.decodeArrayBuffer(c,function(W){!F.isDestroyed&&F.arraybuffer==c&&(R(W),F.arraybuffer=null)},function(){return F.fireEvent("error","Error decoding audiobuffer")}))}},{key:"getArrayBuffer",value:function(c,R){var F=this,W=Object.assign({url:c,responseType:"arraybuffer"},this.params.xhr),U=f.fetchFile(W);return this.currentRequest=U,this.tmpEvents.push(U.on("progress",function(q){F.onProgress(q)}),U.on("success",function(q){R(q),F.currentRequest=null}),U.on("error",function(q){F.fireEvent("error",q),F.currentRequest=null})),U}},{key:"onProgress",value:function(c){var R;c.lengthComputable?R=c.loaded/c.total:R=c.loaded/(c.loaded+1e6),this.fireEvent("loading",Math.round(R*100),c.target)}},{key:"exportPCM",value:function(c,R,F,W,U){c=c||1024,W=W||0,R=R||1e4,F=F||!1;var q=this.backend.getPeaks(c,W,U),Q=[].map.call(q,function(z){return Math.round(z*R)/R});return new Promise(function(z,de){if(!F){var Ae=new Blob([JSON.stringify(Q)],{type:"application/json;charset=utf-8"}),se=URL.createObjectURL(Ae);window.open(se),URL.revokeObjectURL(se)}z(Q)})}},{key:"exportImage",value:function(c,R,F){return c||(c="image/png"),R||(R=1),F||(F="dataURL"),this.drawer.getImage(c,R,F)}},{key:"cancelAjax",value:function(){this.currentRequest&&this.currentRequest.controller&&(this.currentRequest._reader&&this.currentRequest._reader.cancel().catch(function(c){}),this.currentRequest.controller.abort(),this.currentRequest=null)}},{key:"clearTmpEvents",value:function(){this.tmpEvents.forEach(function(c){return c.un()})}},{key:"empty",value:function(){this.backend.isPaused()||(this.stop(),this.backend.disconnectSource()),this.isReady=!1,this.cancelAjax(),this.clearTmpEvents(),this.drawer.progress(0),this.drawer.setWidth(0),this.drawer.drawPeaks({length:this.drawer.getWidth()},0)}},{key:"destroy",value:function(){this.destroyAllPlugins(),this.fireEvent("destroy"),this.cancelAjax(),this.clearTmpEvents(),this.unAll(),this.params.responsive!==!1&&(window.removeEventListener("resize",this._onResize,!0),window.removeEventListener("orientationchange",this._onResize,!0)),this.backend&&(this.backend.destroy(),this.backend=null),this.drawer&&this.drawer.destroy(),this.isDestroyed=!0,this.isReady=!1,this.arraybuffer=null}}],[{key:"create",value:function(c){var R=new C(c);return R.init()}}]),C}(f.Observer);o.default=x,B(x,"VERSION","6.2.0"),B(x,"util",f),s.exports=o.default},"./src/webaudio.js":(s,o,l)=>{function u(m){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},u(m)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var f=v(l("./src/util/index.js"));function g(m){if(typeof WeakMap!="function")return null;var h=new WeakMap,x=new WeakMap;return(g=function(d){return d?x:h})(m)}function v(m,h){if(!h&&m&&m.__esModule)return m;if(m===null||u(m)!=="object"&&typeof m!="function")return{default:m};var x=g(h);if(x&&x.has(m))return x.get(m);var p={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in m)if(C!=="default"&&Object.prototype.hasOwnProperty.call(m,C)){var E=d?Object.getOwnPropertyDescriptor(m,C):null;E&&(E.get||E.set)?Object.defineProperty(p,C,E):p[C]=m[C]}return p.default=m,x&&x.set(m,p),p}function b(m,h){if(!(m instanceof h))throw new TypeError("Cannot call a class as a function")}function w(m,h){for(var x=0;x<h.length;x++){var p=h[x];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(m,p.key,p)}}function T(m,h,x){return h&&w(m.prototype,h),x&&w(m,x),Object.defineProperty(m,"prototype",{writable:!1}),m}function _(m,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(h&&h.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),h&&A(m,h)}function A(m,h){return A=Object.setPrototypeOf||function(p,d){return p.__proto__=d,p},A(m,h)}function S(m){var h=H();return function(){var p=M(m),d;if(h){var C=M(this).constructor;d=Reflect.construct(p,arguments,C)}else d=p.apply(this,arguments);return O(this,d)}}function O(m,h){if(h&&(u(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(m)}function y(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function H(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function M(m){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)},M(m)}function D(m,h,x){return h in m?Object.defineProperty(m,h,{value:x,enumerable:!0,configurable:!0,writable:!0}):m[h]=x,m}var L="playing",I="paused",B="finished",P=function(m){_(x,m);var h=S(x);function x(p){var d,C,E;return b(this,x),E=h.call(this),D(y(E),"audioContext",null),D(y(E),"offlineAudioContext",null),D(y(E),"stateBehaviors",(d={},D(d,L,{init:function(){this.addOnAudioProcess()},getPlayedPercents:function(){var R=this.getDuration();return this.getCurrentTime()/R||0},getCurrentTime:function(){return this.startPosition+this.getPlayedTime()}}),D(d,I,{init:function(){this.removeOnAudioProcess()},getPlayedPercents:function(){var R=this.getDuration();return this.getCurrentTime()/R||0},getCurrentTime:function(){return this.startPosition}}),D(d,B,{init:function(){this.removeOnAudioProcess(),this.fireEvent("finish")},getPlayedPercents:function(){return 1},getCurrentTime:function(){return this.getDuration()}}),d)),E.params=p,E.ac=p.audioContext||(E.supportsWebAudio()?E.getAudioContext():{}),E.lastPlay=E.ac.currentTime,E.startPosition=0,E.scheduledPause=null,E.states=(C={},D(C,L,Object.create(E.stateBehaviors[L])),D(C,I,Object.create(E.stateBehaviors[I])),D(C,B,Object.create(E.stateBehaviors[B])),C),E.buffer=null,E.filters=[],E.gainNode=null,E.mergedPeaks=null,E.offlineAc=null,E.peaks=null,E.playbackRate=1,E.analyser=null,E.scriptNode=null,E.source=null,E.splitPeaks=[],E.state=null,E.explicitDuration=p.duration,E.sinkStreamDestination=null,E.sinkAudioElement=null,E.destroyed=!1,E}return T(x,[{key:"supportsWebAudio",value:function(){return!!(window.AudioContext||window.webkitAudioContext)}},{key:"getAudioContext",value:function(){return window.WaveSurferAudioContext||(window.WaveSurferAudioContext=new(window.AudioContext||window.webkitAudioContext)),window.WaveSurferAudioContext}},{key:"getOfflineAudioContext",value:function(d){return window.WaveSurferOfflineAudioContext||(window.WaveSurferOfflineAudioContext=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,2,d)),window.WaveSurferOfflineAudioContext}},{key:"init",value:function(){this.createVolumeNode(),this.createScriptNode(),this.createAnalyserNode(),this.setState(I),this.setPlaybackRate(this.params.audioRate),this.setLength(0)}},{key:"disconnectFilters",value:function(){this.filters&&(this.filters.forEach(function(d){d&&d.disconnect()}),this.filters=null,this.analyser.connect(this.gainNode))}},{key:"setState",value:function(d){this.state!==this.states[d]&&(this.state=this.states[d],this.state.init.call(this))}},{key:"setFilter",value:function(){for(var d=arguments.length,C=new Array(d),E=0;E<d;E++)C[E]=arguments[E];this.setFilters(C)}},{key:"setFilters",value:function(d){this.disconnectFilters(),d&&d.length&&(this.filters=d,this.analyser.disconnect(),d.reduce(function(C,E){return C.connect(E),E},this.analyser).connect(this.gainNode))}},{key:"createScriptNode",value:function(){this.params.audioScriptProcessor?this.scriptNode=this.params.audioScriptProcessor:this.ac.createScriptProcessor?this.scriptNode=this.ac.createScriptProcessor(x.scriptBufferSize):this.scriptNode=this.ac.createJavaScriptNode(x.scriptBufferSize),this.scriptNode.connect(this.ac.destination)}},{key:"addOnAudioProcess",value:function(){var d=this;this.scriptNode.onaudioprocess=function(){var C=d.getCurrentTime();C>=d.getDuration()?(d.setState(B),d.fireEvent("pause")):C>=d.scheduledPause?d.pause():d.state===d.states[L]&&d.fireEvent("audioprocess",C)}}},{key:"removeOnAudioProcess",value:function(){this.scriptNode.onaudioprocess=null}},{key:"createAnalyserNode",value:function(){this.analyser=this.ac.createAnalyser(),this.analyser.connect(this.gainNode)}},{key:"createVolumeNode",value:function(){this.ac.createGain?this.gainNode=this.ac.createGain():this.gainNode=this.ac.createGainNode(),this.gainNode.connect(this.ac.destination)}},{key:"setSinkId",value:function(d){return d?(this.sinkAudioElement||(this.sinkAudioElement=new window.Audio,this.sinkAudioElement.autoplay=!0),this.sinkAudioElement.setSinkId?(this.sinkStreamDestination||(this.sinkStreamDestination=this.ac.createMediaStreamDestination()),this.gainNode.disconnect(),this.gainNode.connect(this.sinkStreamDestination),this.sinkAudioElement.srcObject=this.sinkStreamDestination.stream,this.sinkAudioElement.setSinkId(d)):Promise.reject(new Error("setSinkId is not supported in your browser"))):Promise.reject(new Error("Invalid deviceId: "+d))}},{key:"setVolume",value:function(d){this.gainNode.gain.setValueAtTime(d,this.ac.currentTime)}},{key:"getVolume",value:function(){return this.gainNode.gain.value}},{key:"decodeArrayBuffer",value:function(d,C,E){this.offlineAc||(this.offlineAc=this.getOfflineAudioContext(this.ac&&this.ac.sampleRate?this.ac.sampleRate:44100)),"webkitAudioContext"in window?this.offlineAc.decodeAudioData(d,function(c){return C(c)},E):this.offlineAc.decodeAudioData(d).then(function(c){return C(c)}).catch(function(c){return E(c)})}},{key:"setPeaks",value:function(d,C){C!=null&&(this.explicitDuration=C),this.peaks=d}},{key:"setLength",value:function(d){if(!(this.mergedPeaks&&d==2*this.mergedPeaks.length-1+2)){this.splitPeaks=[],this.mergedPeaks=[];var C=this.buffer?this.buffer.numberOfChannels:1,E;for(E=0;E<C;E++)this.splitPeaks[E]=[],this.splitPeaks[E][2*(d-1)]=0,this.splitPeaks[E][2*(d-1)+1]=0;this.mergedPeaks[2*(d-1)]=0,this.mergedPeaks[2*(d-1)+1]=0}}},{key:"getPeaks",value:function(d,C,E){if(this.peaks)return this.peaks;if(!this.buffer)return[];if(C=C||0,E=E||d-1,this.setLength(d),!this.buffer)return this.params.splitChannels?this.splitPeaks:this.mergedPeaks;if(!this.buffer.length){var c=this.createBuffer(1,4096,this.sampleRate);this.buffer=c.buffer}var R=this.buffer.length/d,F=~~(R/10)||1,W=this.buffer.numberOfChannels,U;for(U=0;U<W;U++){var q=this.splitPeaks[U],Q=this.buffer.getChannelData(U),z=void 0;for(z=C;z<=E;z++){var de=~~(z*R),Ae=~~(de+R),se=Q[de],We=se,ye=void 0;for(ye=de;ye<Ae;ye+=F){var Ne=Q[ye];Ne>We&&(We=Ne),Ne<se&&(se=Ne)}q[2*z]=We,q[2*z+1]=se,(U==0||We>this.mergedPeaks[2*z])&&(this.mergedPeaks[2*z]=We),(U==0||se<this.mergedPeaks[2*z+1])&&(this.mergedPeaks[2*z+1]=se)}}return this.params.splitChannels?this.splitPeaks:this.mergedPeaks}},{key:"getPlayedPercents",value:function(){return this.state.getPlayedPercents.call(this)}},{key:"disconnectSource",value:function(){this.source&&this.source.disconnect()}},{key:"destroyWebAudio",value:function(){this.disconnectFilters(),this.disconnectSource(),this.gainNode.disconnect(),this.scriptNode.disconnect(),this.analyser.disconnect(),this.params.closeAudioContext&&(typeof this.ac.close=="function"&&this.ac.state!="closed"&&this.ac.close(),this.ac=null,this.params.audioContext?this.params.audioContext=null:window.WaveSurferAudioContext=null,window.WaveSurferOfflineAudioContext=null),this.sinkStreamDestination&&(this.sinkAudioElement.pause(),this.sinkAudioElement.srcObject=null,this.sinkStreamDestination.disconnect(),this.sinkStreamDestination=null)}},{key:"destroy",value:function(){this.isPaused()||this.pause(),this.unAll(),this.buffer=null,this.destroyed=!0,this.destroyWebAudio()}},{key:"load",value:function(d){this.startPosition=0,this.lastPlay=this.ac.currentTime,this.buffer=d,this.createSource()}},{key:"createSource",value:function(){this.disconnectSource(),this.source=this.ac.createBufferSource(),this.source.start=this.source.start||this.source.noteGrainOn,this.source.stop=this.source.stop||this.source.noteOff,this.setPlaybackRate(this.playbackRate),this.source.buffer=this.buffer,this.source.connect(this.analyser)}},{key:"resumeAudioContext",value:function(){this.ac.state=="suspended"&&this.ac.resume&&this.ac.resume()}},{key:"isPaused",value:function(){return this.state!==this.states[L]}},{key:"getDuration",value:function(){return this.explicitDuration?this.explicitDuration:this.buffer?this.buffer.duration:0}},{key:"seekTo",value:function(d,C){if(!!this.buffer)return this.scheduledPause=null,d==null&&(d=this.getCurrentTime(),d>=this.getDuration()&&(d=0)),C==null&&(C=this.getDuration()),this.startPosition=d,this.lastPlay=this.ac.currentTime,this.state===this.states[B]&&this.setState(I),{start:d,end:C}}},{key:"getPlayedTime",value:function(){return(this.ac.currentTime-this.lastPlay)*this.playbackRate}},{key:"play",value:function(d,C){if(!!this.buffer){this.createSource();var E=this.seekTo(d,C);d=E.start,C=E.end,this.scheduledPause=C,this.source.start(0,d),this.resumeAudioContext(),this.setState(L),this.fireEvent("play")}}},{key:"pause",value:function(){this.scheduledPause=null,this.startPosition+=this.getPlayedTime();try{this.source&&this.source.stop(0)}catch{}this.setState(I),this.fireEvent("pause")}},{key:"getCurrentTime",value:function(){return this.state.getCurrentTime.call(this)}},{key:"getPlaybackRate",value:function(){return this.playbackRate}},{key:"setPlaybackRate",value:function(d){this.playbackRate=d||1,this.source&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.ac.currentTime)}},{key:"setPlayEnd",value:function(d){this.scheduledPause=d}}]),x}(f.Observer);o.default=P,D(P,"scriptBufferSize",256),s.exports=o.default},"./node_modules/debounce/index.js":s=>{function o(l,u,f){var g,v,b,w,T;u==null&&(u=100);function _(){var S=Date.now()-w;S<u&&S>=0?g=setTimeout(_,u-S):(g=null,f||(T=l.apply(b,v),b=v=null))}var A=function(){b=this,v=arguments,w=Date.now();var S=f&&!g;return g||(g=setTimeout(_,u)),S&&(T=l.apply(b,v),b=v=null),T};return A.clear=function(){g&&(clearTimeout(g),g=null)},A.flush=function(){g&&(T=l.apply(b,v),b=v=null,clearTimeout(g),g=null)},A}o.debounce=o,s.exports=o}},n={};function a(s){var o=n[s];if(o!==void 0)return o.exports;var l=n[s]={exports:{}};return r[s](l,l.exports,a),l.exports}var i=a("./src/wavesurfer.js");return i})())})(wc);var Hm=hm(wc.exports);const Fm=()=>{const e=K(Ee),{curAudioState:t,curIdx:r,playList:n,elementRefs:a}=K(oe),[i,s]=$.useState(!1),o=$.useCallback(()=>{if(!(a!=null&&a.waveformInst)||!a.trackCurTimeEl)return;const{trackCurTimeEl:v}=a,b=a.waveformInst.getCurrentTime();v.innerText=Ps(b)},[a]),[l,u]=$.useState();$.useEffect(()=>{!(a!=null&&a.waveformInst)||!n[r]||(l==null?void 0:l.src)!==n[r].src&&(u(n[r]),s(!1),a.waveformInst.load(n[r].src),a.waveformInst.on("ready",()=>{ws(a,a.waveformInst.getDuration()),s(!0),a.waveformInst.on("seek",()=>o())}))},[n,r,a==null?void 0:a.waveformInst,l,a,o]),$.useEffect(()=>{!i||!(a!=null&&a.waveformInst)||(t.isPlaying?a.waveformInst.play():a.waveformInst.pause())},[i,t.isPlaying,a==null?void 0:a.waveformInst]);const[f,g]=$.useState(!1);return $.useEffect(()=>{if(!(a!=null&&a.waveformInst)||(a.waveformInst.on("finish",()=>g(!0)),!f))return;(()=>{var b,w;if(g(!1),t.repeatType==="ONE"){(b=a.waveformInst)==null||b.seekTo(0),(w=a.waveformInst)==null||w.play();return}e({type:"NEXT_AUDIO"})})()},[a==null?void 0:a.waveformInst,e,t.repeatType,f]),$.useEffect(()=>{if(!i)return;const v=setInterval(o,1e3);return t.isPlaying||clearInterval(v),()=>clearInterval(v)},[t.isPlaying,o,i]),$.useEffect(()=>{if(!(!(a!=null&&a.waveformInst)||!i)){if(t.muted){a.waveformInst.setVolume(0),a.waveformInst.setMute(!0);return}a.waveformInst.setVolume(t.volume)}},[t.volume,a==null?void 0:a.waveformInst,t.muted,i]),null},Um=()=>{const e=K(Ee),{elementRefs:t}=K(oe),r=Bm({progressColor:"--rs-audio-player-waveform-bar",waveColor:"--rs-audio-player-waveform-background"});return $.useEffect(()=>{if((t==null?void 0:t.waveformInst)||!r.current)return;const n=Hm.create({barWidth:1,cursorWidth:2,container:"#rs-waveform",backend:"WebAudio",height:80,progressColor:`${r.current.progressColor}`,responsive:!0,waveColor:`${r.current.waveColor}`,cursorColor:"var(--rs-audio-player-waveform-cursor)"});e({type:"SET_ELEMENT_REFS",elementRefs:{waveformInst:n}})},[t==null?void 0:t.waveformInst,e,r.current]),Fm(),null},Wm=()=>{const{curPlayId:e,playList:t,activeUI:r}=K(oe);return t.find(i=>i.id===e)&&t.length!==0?r.progress==="waveform"?N(Um,{}):N(Dm,{}):null},rn=me.default.button`
|
|
151
|
+
*/(function(e,t){(function(n,a){e.exports=a()})(self,()=>(()=>{var r={"./src/drawer.canvasentry.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var h=w(l("./src/util/style.js")),p=w(l("./src/util/get-id.js"));function w(k){return k&&k.__esModule?k:{default:k}}function b(k,C){if(!(k instanceof C))throw new TypeError("Cannot call a class as a function")}function v(k,C){for(var S=0;S<C.length;S++){var O=C[S];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(k,O.key,O)}}function x(k,C,S){return C&&v(k.prototype,C),S&&v(k,S),Object.defineProperty(k,"prototype",{writable:!1}),k}var A=function(){function k(){b(this,k),this.wave=null,this.waveCtx=null,this.progress=null,this.progressCtx=null,this.start=0,this.end=1,this.id=(0,p.default)(typeof this.constructor.name!="undefined"?this.constructor.name.toLowerCase()+"_":"canvasentry_"),this.canvasContextAttributes={}}return x(k,[{key:"initWave",value:function(S){this.wave=S,this.waveCtx=this.wave.getContext("2d",this.canvasContextAttributes)}},{key:"initProgress",value:function(S){this.progress=S,this.progressCtx=this.progress.getContext("2d",this.canvasContextAttributes)}},{key:"updateDimensions",value:function(S,O,g,D){this.start=this.wave.offsetLeft/O||0,this.end=this.start+S/O,this.wave.width=g,this.wave.height=D;var M={width:S+"px"};(0,h.default)(this.wave,M),this.hasProgressCanvas&&(this.progress.width=g,this.progress.height=D,(0,h.default)(this.progress,M))}},{key:"clearWave",value:function(){this.waveCtx.clearRect(0,0,this.waveCtx.canvas.width,this.waveCtx.canvas.height),this.hasProgressCanvas&&this.progressCtx.clearRect(0,0,this.progressCtx.canvas.width,this.progressCtx.canvas.height)}},{key:"setFillStyles",value:function(S,O){this.waveCtx.fillStyle=this.getFillStyle(this.waveCtx,S),this.hasProgressCanvas&&(this.progressCtx.fillStyle=this.getFillStyle(this.progressCtx,O))}},{key:"getFillStyle",value:function(S,O){if(typeof O=="string"||O instanceof CanvasGradient)return O;var g=S.createLinearGradient(0,0,0,S.canvas.height);return O.forEach(function(D,M){return g.addColorStop(M/O.length,D)}),g}},{key:"applyCanvasTransforms",value:function(S){S&&(this.waveCtx.setTransform(0,1,1,0,0,0),this.hasProgressCanvas&&this.progressCtx.setTransform(0,1,1,0,0,0))}},{key:"fillRects",value:function(S,O,g,D,M){this.fillRectToContext(this.waveCtx,S,O,g,D,M),this.hasProgressCanvas&&this.fillRectToContext(this.progressCtx,S,O,g,D,M)}},{key:"fillRectToContext",value:function(S,O,g,D,M,N){!S||(N?this.drawRoundedRect(S,O,g,D,M,N):S.fillRect(O,g,D,M))}},{key:"drawRoundedRect",value:function(S,O,g,D,M,N){M!==0&&(M<0&&(M*=-1,g-=M),S.beginPath(),S.moveTo(O+N,g),S.lineTo(O+D-N,g),S.quadraticCurveTo(O+D,g,O+D,g+N),S.lineTo(O+D,g+M-N),S.quadraticCurveTo(O+D,g+M,O+D-N,g+M),S.lineTo(O+N,g+M),S.quadraticCurveTo(O,g+M,O,g+M-N),S.lineTo(O,g+N),S.quadraticCurveTo(O,g,O+N,g),S.closePath(),S.fill())}},{key:"drawLines",value:function(S,O,g,D,M,N){this.drawLineToContext(this.waveCtx,S,O,g,D,M,N),this.hasProgressCanvas&&this.drawLineToContext(this.progressCtx,S,O,g,D,M,N)}},{key:"drawLineToContext",value:function(S,O,g,D,M,N,I){if(!!S){var R=O.length/2,B=Math.round(R*this.start),E=Math.round(R*this.end)+1,m=B,d=E,y=this.wave.width/(d-m-1),f=D+M,c=g/D;S.beginPath(),S.moveTo((m-B)*y,f),S.lineTo((m-B)*y,f-Math.round((O[2*m]||0)/c));var T,$,u;for(T=m;T<d;T++)$=O[2*T]||0,u=Math.round($/c),S.lineTo((T-B)*y+this.halfPixel,f-u);var _=d-1;for(_;_>=m;_--)$=O[2*_+1]||0,u=Math.round($/c),S.lineTo((_-B)*y+this.halfPixel,f-u);S.lineTo((m-B)*y,f-Math.round((O[2*m+1]||0)/c)),S.closePath(),S.fill()}}},{key:"destroy",value:function(){this.waveCtx=null,this.wave=null,this.progressCtx=null,this.progress=null}},{key:"getImage",value:function(S,O,g){var D=this;if(g==="blob")return new Promise(function(M){D.wave.toBlob(M,S,O)});if(g==="dataURL")return this.wave.toDataURL(S,O)}}]),k}();o.default=A,s.exports=o.default},"./src/drawer.js":(s,o,l)=>{function h(I){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},h(I)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=b(l("./src/util/index.js"));function w(I){if(typeof WeakMap!="function")return null;var R=new WeakMap,B=new WeakMap;return(w=function(m){return m?B:R})(I)}function b(I,R){if(!R&&I&&I.__esModule)return I;if(I===null||h(I)!=="object"&&typeof I!="function")return{default:I};var B=w(R);if(B&&B.has(I))return B.get(I);var E={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in I)if(d!=="default"&&Object.prototype.hasOwnProperty.call(I,d)){var y=m?Object.getOwnPropertyDescriptor(I,d):null;y&&(y.get||y.set)?Object.defineProperty(E,d,y):E[d]=I[d]}return E.default=I,B&&B.set(I,E),E}function v(I,R){if(!(I instanceof R))throw new TypeError("Cannot call a class as a function")}function x(I,R){for(var B=0;B<R.length;B++){var E=R[B];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(I,E.key,E)}}function A(I,R,B){return R&&x(I.prototype,R),B&&x(I,B),Object.defineProperty(I,"prototype",{writable:!1}),I}function k(I,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(R&&R.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),Object.defineProperty(I,"prototype",{writable:!1}),R&&C(I,R)}function C(I,R){return C=Object.setPrototypeOf||function(E,m){return E.__proto__=m,E},C(I,R)}function S(I){var R=D();return function(){var E=M(I),m;if(R){var d=M(this).constructor;m=Reflect.construct(E,arguments,d)}else m=E.apply(this,arguments);return O(this,m)}}function O(I,R){if(R&&(h(R)==="object"||typeof R=="function"))return R;if(R!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g(I)}function g(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}function D(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function M(I){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(B){return B.__proto__||Object.getPrototypeOf(B)},M(I)}var N=function(I){k(B,I);var R=S(B);function B(E,m){var d;return v(this,B),d=R.call(this),d.container=p.withOrientation(E,m.vertical),d.params=m,d.width=0,d.height=m.height*d.params.pixelRatio,d.lastPos=0,d.wrapper=null,d}return A(B,[{key:"style",value:function(m,d){return p.style(m,d)}},{key:"createWrapper",value:function(){this.wrapper=p.withOrientation(this.container.appendChild(document.createElement("wave")),this.params.vertical),this.style(this.wrapper,{display:"block",position:"relative",userSelect:"none",webkitUserSelect:"none",height:this.params.height+"px"}),(this.params.fillParent||this.params.scrollParent)&&this.style(this.wrapper,{width:"100%",cursor:this.params.hideCursor?"none":"auto",overflowX:this.params.hideScrollbar?"hidden":"auto",overflowY:"hidden"}),this.setupWrapperEvents()}},{key:"handleEvent",value:function(m,d){!d&&m.preventDefault();var y=p.withOrientation(m.targetTouches?m.targetTouches[0]:m,this.params.vertical).clientX,f=this.wrapper.getBoundingClientRect(),c=this.width,T=this.getWidth(),$=this.getProgressPixels(f,y),u;return!this.params.fillParent&&c<T?u=$*(this.params.pixelRatio/c)||0:u=($+this.wrapper.scrollLeft)/this.wrapper.scrollWidth||0,p.clamp(u,0,1)}},{key:"getProgressPixels",value:function(m,d){return this.params.rtl?m.right-d:d-m.left}},{key:"setupWrapperEvents",value:function(){var m=this;this.wrapper.addEventListener("click",function(d){var y=p.withOrientation(d,m.params.vertical),f=m.wrapper.offsetHeight-m.wrapper.clientHeight;if(f!==0){var c=m.wrapper.getBoundingClientRect();if(y.clientY>=c.bottom-f)return}m.params.interact&&m.fireEvent("click",d,m.handleEvent(d))}),this.wrapper.addEventListener("dblclick",function(d){m.params.interact&&m.fireEvent("dblclick",d,m.handleEvent(d))}),this.wrapper.addEventListener("scroll",function(d){return m.fireEvent("scroll",d)})}},{key:"drawPeaks",value:function(m,d,y,f){this.setWidth(d)||this.clearWave(),this.params.barWidth?this.drawBars(m,0,y,f):this.drawWave(m,0,y,f)}},{key:"resetScroll",value:function(){this.wrapper!==null&&(this.wrapper.scrollLeft=0)}},{key:"recenter",value:function(m){var d=this.wrapper.scrollWidth*m;this.recenterOnPosition(d,!0)}},{key:"recenterOnPosition",value:function(m,d){var y=this.wrapper.scrollLeft,f=~~(this.wrapper.clientWidth/2),c=this.wrapper.scrollWidth-this.wrapper.clientWidth,T=m-f,$=T-y;if(c!=0){if(!d&&-f<=$&&$<f){var u=this.params.autoCenterRate;u/=f,u*=c,$=Math.max(-u,Math.min(u,$)),T=y+$}T=Math.max(0,Math.min(c,T)),T!=y&&(this.wrapper.scrollLeft=T)}}},{key:"getScrollX",value:function(){var m=0;if(this.wrapper){var d=this.params.pixelRatio;if(m=Math.round(this.wrapper.scrollLeft*d),this.params.scrollParent){var y=~~(this.wrapper.scrollWidth*d-this.getWidth());m=Math.min(y,Math.max(0,m))}}return m}},{key:"getWidth",value:function(){return Math.round(this.container.clientWidth*this.params.pixelRatio)}},{key:"setWidth",value:function(m){if(this.width==m)return!1;if(this.width=m,this.params.fillParent||this.params.scrollParent)this.style(this.wrapper,{width:""});else{var d=~~(this.width/this.params.pixelRatio)+"px";this.style(this.wrapper,{width:d})}return this.updateSize(),!0}},{key:"setHeight",value:function(m){return m==this.height?!1:(this.height=m,this.style(this.wrapper,{height:~~(this.height/this.params.pixelRatio)+"px"}),this.updateSize(),!0)}},{key:"progress",value:function(m){var d=1/this.params.pixelRatio,y=Math.round(m*this.width)*d;if(y<this.lastPos||y-this.lastPos>=d){if(this.lastPos=y,this.params.scrollParent&&this.params.autoCenter){var f=~~(this.wrapper.scrollWidth*m);this.recenterOnPosition(f,this.params.autoCenterImmediately)}this.updateProgress(y)}}},{key:"destroy",value:function(){this.unAll(),this.wrapper&&(this.wrapper.parentNode==this.container.domElement&&this.container.removeChild(this.wrapper.domElement),this.wrapper=null)}},{key:"updateCursor",value:function(){}},{key:"updateSize",value:function(){}},{key:"drawBars",value:function(m,d,y,f){}},{key:"drawWave",value:function(m,d,y,f){}},{key:"clearWave",value:function(){}},{key:"updateProgress",value:function(m){}}]),B}(p.Observer);o.default=N,s.exports=o.default},"./src/drawer.multicanvas.js":(s,o,l)=>{function h(E){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},h(E)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=A(l("./src/drawer.js")),w=x(l("./src/util/index.js")),b=A(l("./src/drawer.canvasentry.js"));function v(E){if(typeof WeakMap!="function")return null;var m=new WeakMap,d=new WeakMap;return(v=function(f){return f?d:m})(E)}function x(E,m){if(!m&&E&&E.__esModule)return E;if(E===null||h(E)!=="object"&&typeof E!="function")return{default:E};var d=v(m);if(d&&d.has(E))return d.get(E);var y={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in E)if(c!=="default"&&Object.prototype.hasOwnProperty.call(E,c)){var T=f?Object.getOwnPropertyDescriptor(E,c):null;T&&(T.get||T.set)?Object.defineProperty(y,c,T):y[c]=E[c]}return y.default=E,d&&d.set(E,y),y}function A(E){return E&&E.__esModule?E:{default:E}}function k(E,m){if(!(E instanceof m))throw new TypeError("Cannot call a class as a function")}function C(E,m){for(var d=0;d<m.length;d++){var y=m[d];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(E,y.key,y)}}function S(E,m,d){return m&&C(E.prototype,m),d&&C(E,d),Object.defineProperty(E,"prototype",{writable:!1}),E}function O(E,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(m&&m.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),m&&g(E,m)}function g(E,m){return g=Object.setPrototypeOf||function(y,f){return y.__proto__=f,y},g(E,m)}function D(E){var m=I();return function(){var y=R(E),f;if(m){var c=R(this).constructor;f=Reflect.construct(y,arguments,c)}else f=y.apply(this,arguments);return M(this,f)}}function M(E,m){if(m&&(h(m)==="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N(E)}function N(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function I(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function R(E){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(d){return d.__proto__||Object.getPrototypeOf(d)},R(E)}var B=function(E){O(d,E);var m=D(d);function d(y,f){var c;return k(this,d),c=m.call(this,y,f),c.maxCanvasWidth=f.maxCanvasWidth,c.maxCanvasElementWidth=Math.round(f.maxCanvasWidth/f.pixelRatio),c.hasProgressCanvas=f.waveColor!=f.progressColor,c.halfPixel=.5/f.pixelRatio,c.canvases=[],c.progressWave=null,c.EntryClass=b.default,c.canvasContextAttributes=f.drawingContextAttributes,c.overlap=2*Math.ceil(f.pixelRatio/2),c.barRadius=f.barRadius||0,c.vertical=f.vertical,c}return S(d,[{key:"init",value:function(){this.createWrapper(),this.createElements()}},{key:"createElements",value:function(){this.progressWave=w.withOrientation(this.wrapper.appendChild(document.createElement("wave")),this.params.vertical),this.style(this.progressWave,{position:"absolute",zIndex:3,left:0,top:0,bottom:0,overflow:"hidden",width:"0",display:"none",boxSizing:"border-box",borderRightStyle:"solid",pointerEvents:"none"}),this.addCanvas(),this.updateCursor()}},{key:"updateCursor",value:function(){this.style(this.progressWave,{borderRightWidth:this.params.cursorWidth+"px",borderRightColor:this.params.cursorColor})}},{key:"updateSize",value:function(){for(var f=this,c=Math.round(this.width/this.params.pixelRatio),T=Math.ceil(c/(this.maxCanvasElementWidth+this.overlap));this.canvases.length<T;)this.addCanvas();for(;this.canvases.length>T;)this.removeCanvas();var $=this.maxCanvasWidth+this.overlap,u=this.canvases.length-1;this.canvases.forEach(function(_,H){H==u&&($=f.width-f.maxCanvasWidth*u),f.updateDimensions(_,$,f.height),_.clearWave()})}},{key:"addCanvas",value:function(){var f=new this.EntryClass;f.canvasContextAttributes=this.canvasContextAttributes,f.hasProgressCanvas=this.hasProgressCanvas,f.halfPixel=this.halfPixel;var c=this.maxCanvasElementWidth*this.canvases.length,T=w.withOrientation(this.wrapper.appendChild(document.createElement("canvas")),this.params.vertical);if(this.style(T,{position:"absolute",zIndex:2,left:c+"px",top:0,bottom:0,height:"100%",pointerEvents:"none"}),f.initWave(T),this.hasProgressCanvas){var $=w.withOrientation(this.progressWave.appendChild(document.createElement("canvas")),this.params.vertical);this.style($,{position:"absolute",left:c+"px",top:0,bottom:0,height:"100%"}),f.initProgress($)}this.canvases.push(f)}},{key:"removeCanvas",value:function(){var f=this.canvases[this.canvases.length-1];f.wave.parentElement.removeChild(f.wave.domElement),this.hasProgressCanvas&&f.progress.parentElement.removeChild(f.progress.domElement),f&&(f.destroy(),f=null),this.canvases.pop()}},{key:"updateDimensions",value:function(f,c,T){var $=Math.round(c/this.params.pixelRatio),u=Math.round(this.width/this.params.pixelRatio);f.updateDimensions($,u,c,T),this.style(this.progressWave,{display:"block"})}},{key:"clearWave",value:function(){var f=this;w.frame(function(){f.canvases.forEach(function(c){return c.clearWave()})})()}},{key:"drawBars",value:function(f,c,T,$){var u=this;return this.prepareDraw(f,c,T,$,function(_){var H=_.absmax,V=_.hasMinVals;_.height;var F=_.offsetY,G=_.halfH,z=_.peaks,U=_.channelIndex;if(T!==void 0){var re=V?2:1,fe=z.length/re,Z=u.params.barWidth*u.params.pixelRatio,we=u.params.barGap===null?Math.max(u.params.pixelRatio,~~(Z/2)):Math.max(u.params.pixelRatio,u.params.barGap*u.params.pixelRatio),oe=Z+we,ve=fe/u.width,Ho=T,Fo=$,Xe=Ho;for(Xe;Xe<Fo;Xe+=oe){var cr=0,fr=Math.floor(Xe*ve)*re,Wo=Math.floor((Xe+oe)*ve)*re;do{var Gn=Math.abs(z[fr]);Gn>cr&&(cr=Gn),fr+=re}while(fr<Wo);var Tt=Math.round(cr/H*G);Tt==0&&u.params.barMinHeight&&(Tt=u.params.barMinHeight),u.fillRect(Xe+u.halfPixel,G-Tt+F,Z+u.halfPixel,Tt*2,u.barRadius,U)}}})}},{key:"drawWave",value:function(f,c,T,$){var u=this;return this.prepareDraw(f,c,T,$,function(_){var H=_.absmax,V=_.hasMinVals;_.height;var F=_.offsetY,G=_.halfH,z=_.peaks,U=_.channelIndex;if(!V){var re=[],fe=z.length,Z=0;for(Z;Z<fe;Z++)re[2*Z]=z[Z],re[2*Z+1]=-z[Z];z=re}T!==void 0&&u.drawLine(z,H,G,F,T,$,U),u.fillRect(0,G+F-u.halfPixel,u.width,u.halfPixel,u.barRadius,U)})}},{key:"drawLine",value:function(f,c,T,$,u,_,H){var V=this,F=this.params.splitChannelsOptions.channelColors[H]||{},G=F.waveColor,z=F.progressColor;this.canvases.forEach(function(U,re){V.setFillStyles(U,G,z),V.applyCanvasTransforms(U,V.params.vertical),U.drawLines(f,c,T,$,u,_)})}},{key:"fillRect",value:function(f,c,T,$,u,_){var H=Math.floor(f/this.maxCanvasWidth),V=Math.min(Math.ceil((f+T)/this.maxCanvasWidth)+1,this.canvases.length),F=H;for(F;F<V;F++){var G=this.canvases[F],z=F*this.maxCanvasWidth,U={x1:Math.max(f,F*this.maxCanvasWidth),y1:c,x2:Math.min(f+T,F*this.maxCanvasWidth+G.wave.width),y2:c+$};if(U.x1<U.x2){var re=this.params.splitChannelsOptions.channelColors[_]||{},fe=re.waveColor,Z=re.progressColor;this.setFillStyles(G,fe,Z),this.applyCanvasTransforms(G,this.params.vertical),G.fillRects(U.x1-z,U.y1,U.x2-U.x1,U.y2-U.y1,u)}}}},{key:"hideChannel",value:function(f){return this.params.splitChannels&&this.params.splitChannelsOptions.filterChannels.includes(f)}},{key:"prepareDraw",value:function(f,c,T,$,u,_,H){var V=this;return w.frame(function(){if(f[0]instanceof Array){var F=f;if(V.params.splitChannels){var G=F.filter(function(oe,ve){return!V.hideChannel(ve)});V.params.splitChannelsOptions.overlay||V.setHeight(Math.max(G.length,1)*V.params.height*V.params.pixelRatio);var z;return V.params.splitChannelsOptions&&V.params.splitChannelsOptions.relativeNormalization&&(z=w.max(F.map(function(oe){return w.absMax(oe)}))),F.forEach(function(oe,ve){return V.prepareDraw(oe,ve,T,$,u,G.indexOf(oe),z)})}f=F[0]}if(!V.hideChannel(c)){var U=1/V.params.barHeight;V.params.normalize&&(U=H===void 0?w.absMax(f):H);var re=[].some.call(f,function(oe){return oe<0}),fe=V.params.height*V.params.pixelRatio,Z=fe/2,we=fe*_||0;return V.params.splitChannelsOptions&&V.params.splitChannelsOptions.overlay&&(we=0),u({absmax:U,hasMinVals:re,height:fe,offsetY:we,halfH:Z,peaks:f,channelIndex:c})}})()}},{key:"setFillStyles",value:function(f){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.params.waveColor,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.params.progressColor;f.setFillStyles(c,T)}},{key:"applyCanvasTransforms",value:function(f){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;f.applyCanvasTransforms(c)}},{key:"getImage",value:function(f,c,T){if(T==="blob")return Promise.all(this.canvases.map(function(u){return u.getImage(f,c,T)}));if(T==="dataURL"){var $=this.canvases.map(function(u){return u.getImage(f,c,T)});return $.length>1?$:$[0]}}},{key:"updateProgress",value:function(f){this.style(this.progressWave,{width:f+"px"})}}]),d}(p.default);o.default=B,s.exports=o.default},"./src/mediaelement-webaudio.js":(s,o,l)=>{function h(R){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},h(R)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=w(l("./src/mediaelement.js"));function w(R){return R&&R.__esModule?R:{default:R}}function b(R,B){if(!(R instanceof B))throw new TypeError("Cannot call a class as a function")}function v(R,B){for(var E=0;E<B.length;E++){var m=B[E];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(R,m.key,m)}}function x(R,B,E){return B&&v(R.prototype,B),E&&v(R,E),Object.defineProperty(R,"prototype",{writable:!1}),R}function A(){return typeof Reflect!="undefined"&&Reflect.get?A=Reflect.get:A=function(B,E,m){var d=k(B,E);if(!!d){var y=Object.getOwnPropertyDescriptor(d,E);return y.get?y.get.call(arguments.length<3?B:m):y.value}},A.apply(this,arguments)}function k(R,B){for(;!Object.prototype.hasOwnProperty.call(R,B)&&(R=N(R),R!==null););return R}function C(R,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(B&&B.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Object.defineProperty(R,"prototype",{writable:!1}),B&&S(R,B)}function S(R,B){return S=Object.setPrototypeOf||function(m,d){return m.__proto__=d,m},S(R,B)}function O(R){var B=M();return function(){var m=N(R),d;if(B){var y=N(this).constructor;d=Reflect.construct(m,arguments,y)}else d=m.apply(this,arguments);return g(this,d)}}function g(R,B){if(B&&(h(B)==="object"||typeof B=="function"))return B;if(B!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D(R)}function D(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function M(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function N(R){return N=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},N(R)}var I=function(R){C(E,R);var B=O(E);function E(m){var d;return b(this,E),d=B.call(this,m),d.params=m,d.sourceMediaElement=null,d}return x(E,[{key:"init",value:function(){this.setPlaybackRate(this.params.audioRate),this.createTimer(),this.createVolumeNode(),this.createScriptNode(),this.createAnalyserNode()}},{key:"_load",value:function(d,y,f){A(N(E.prototype),"_load",this).call(this,d,y,f),this.createMediaElementSource(d)}},{key:"createMediaElementSource",value:function(d){this.sourceMediaElement=this.ac.createMediaElementSource(d),this.sourceMediaElement.connect(this.analyser)}},{key:"play",value:function(d,y){return this.resumeAudioContext(),A(N(E.prototype),"play",this).call(this,d,y)}},{key:"destroy",value:function(){A(N(E.prototype),"destroy",this).call(this),this.destroyWebAudio()}}]),E}(p.default);o.default=I,s.exports=o.default},"./src/mediaelement.js":(s,o,l)=>{function h(m){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},h(m)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=x(l("./src/webaudio.js")),w=v(l("./src/util/index.js"));function b(m){if(typeof WeakMap!="function")return null;var d=new WeakMap,y=new WeakMap;return(b=function(c){return c?y:d})(m)}function v(m,d){if(!d&&m&&m.__esModule)return m;if(m===null||h(m)!=="object"&&typeof m!="function")return{default:m};var y=b(d);if(y&&y.has(m))return y.get(m);var f={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in m)if(T!=="default"&&Object.prototype.hasOwnProperty.call(m,T)){var $=c?Object.getOwnPropertyDescriptor(m,T):null;$&&($.get||$.set)?Object.defineProperty(f,T,$):f[T]=m[T]}return f.default=m,y&&y.set(m,f),f}function x(m){return m&&m.__esModule?m:{default:m}}function A(m,d){if(!(m instanceof d))throw new TypeError("Cannot call a class as a function")}function k(m,d){for(var y=0;y<d.length;y++){var f=d[y];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(m,f.key,f)}}function C(m,d,y){return d&&k(m.prototype,d),y&&k(m,y),Object.defineProperty(m,"prototype",{writable:!1}),m}function S(){return typeof Reflect!="undefined"&&Reflect.get?S=Reflect.get:S=function(d,y,f){var c=O(d,y);if(!!c){var T=Object.getOwnPropertyDescriptor(c,y);return T.get?T.get.call(arguments.length<3?d:f):T.value}},S.apply(this,arguments)}function O(m,d){for(;!Object.prototype.hasOwnProperty.call(m,d)&&(m=B(m),m!==null););return m}function g(m,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(d&&d.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),d&&D(m,d)}function D(m,d){return D=Object.setPrototypeOf||function(f,c){return f.__proto__=c,f},D(m,d)}function M(m){var d=R();return function(){var f=B(m),c;if(d){var T=B(this).constructor;c=Reflect.construct(f,arguments,T)}else c=f.apply(this,arguments);return N(this,c)}}function N(m,d){if(d&&(h(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return I(m)}function I(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function R(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(m){return B=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},B(m)}var E=function(m){g(y,m);var d=M(y);function y(f){var c;return A(this,y),c=d.call(this,f),c.params=f,c.media={currentTime:0,duration:0,paused:!0,playbackRate:1,play:function(){},pause:function(){},volume:0},c.mediaType=f.mediaType.toLowerCase(),c.elementPosition=f.elementPosition,c.peaks=null,c.playbackRate=1,c.volume=1,c.isMuted=!1,c.buffer=null,c.onPlayEnd=null,c.mediaListeners={},c}return C(y,[{key:"init",value:function(){this.setPlaybackRate(this.params.audioRate),this.createTimer()}},{key:"_setupMediaListeners",value:function(){var c=this;this.mediaListeners.error=function(){c.fireEvent("error","Error loading media element")},this.mediaListeners.canplay=function(){c.fireEvent("canplay")},this.mediaListeners.ended=function(){c.fireEvent("finish")},this.mediaListeners.play=function(){c.fireEvent("play")},this.mediaListeners.pause=function(){c.fireEvent("pause")},this.mediaListeners.seeked=function(T){c.fireEvent("seek")},this.mediaListeners.volumechange=function(T){c.isMuted=c.media.muted,c.isMuted?c.volume=0:c.volume=c.media.volume,c.fireEvent("volume")},Object.keys(this.mediaListeners).forEach(function(T){c.media.removeEventListener(T,c.mediaListeners[T]),c.media.addEventListener(T,c.mediaListeners[T])})}},{key:"createTimer",value:function(){var c=this,T=function $(){c.isPaused()||(c.fireEvent("audioprocess",c.getCurrentTime()),w.frame($)())};this.on("play",T),this.on("pause",function(){c.fireEvent("audioprocess",c.getCurrentTime())})}},{key:"load",value:function(c,T,$,u){var _=document.createElement(this.mediaType);_.controls=this.params.mediaControls,_.autoplay=this.params.autoplay||!1,_.preload=u==null?"auto":u,_.src=c,_.style.width="100%";var H=T.querySelector(this.mediaType);H&&T.removeChild(H),T.appendChild(_),this._load(_,$,u)}},{key:"loadElt",value:function(c,T){c.controls=this.params.mediaControls,c.autoplay=this.params.autoplay||!1,this._load(c,T,c.preload)}},{key:"_load",value:function(c,T,$){if(!(c instanceof HTMLMediaElement)||typeof c.addEventListener=="undefined")throw new Error("media parameter is not a valid media element");typeof c.load=="function"&&!(T&&$=="none")&&c.load(),this.media=c,this._setupMediaListeners(),this.peaks=T,this.onPlayEnd=null,this.buffer=null,this.isMuted=c.muted,this.setPlaybackRate(this.playbackRate),this.setVolume(this.volume)}},{key:"isPaused",value:function(){return!this.media||this.media.paused}},{key:"getDuration",value:function(){if(this.explicitDuration)return this.explicitDuration;var c=(this.buffer||this.media).duration;return c>=1/0&&(c=this.media.seekable.end(0)),c}},{key:"getCurrentTime",value:function(){return this.media&&this.media.currentTime}},{key:"getPlayedPercents",value:function(){return this.getCurrentTime()/this.getDuration()||0}},{key:"getPlaybackRate",value:function(){return this.playbackRate||this.media.playbackRate}},{key:"setPlaybackRate",value:function(c){this.playbackRate=c||1,this.media.playbackRate=this.playbackRate}},{key:"seekTo",value:function(c){c!=null&&!isNaN(c)&&(this.media.currentTime=c),this.clearPlayEnd()}},{key:"play",value:function(c,T){this.seekTo(c);var $=this.media.play();return T&&this.setPlayEnd(T),$}},{key:"pause",value:function(){var c;return this.media&&(c=this.media.pause()),this.clearPlayEnd(),c}},{key:"setPlayEnd",value:function(c){var T=this;this.clearPlayEnd(),this._onPlayEnd=function($){$>=c&&(T.pause(),T.seekTo(c))},this.on("audioprocess",this._onPlayEnd)}},{key:"clearPlayEnd",value:function(){this._onPlayEnd&&(this.un("audioprocess",this._onPlayEnd),this._onPlayEnd=null)}},{key:"getPeaks",value:function(c,T,$){return this.buffer?S(B(y.prototype),"getPeaks",this).call(this,c,T,$):this.peaks||[]}},{key:"setSinkId",value:function(c){return c?this.media.setSinkId?this.media.setSinkId(c):Promise.reject(new Error("setSinkId is not supported in your browser")):Promise.reject(new Error("Invalid deviceId: "+c))}},{key:"getVolume",value:function(){return this.volume}},{key:"setVolume",value:function(c){this.volume=c,this.media.volume!==this.volume&&(this.media.volume=this.volume)}},{key:"setMute",value:function(c){this.isMuted=this.media.muted=c}},{key:"destroy",value:function(){var c=this;this.pause(),this.unAll(),this.destroyed=!0,Object.keys(this.mediaListeners).forEach(function(T){c.media&&c.media.removeEventListener(T,c.mediaListeners[T])}),this.params.removeMediaElementOnDestroy&&this.media&&this.media.parentNode&&this.media.parentNode.removeChild(this.media),this.media=null}}]),y}(p.default);o.default=E,s.exports=o.default},"./src/peakcache.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;function l(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function h(b,v){for(var x=0;x<v.length;x++){var A=v[x];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(b,A.key,A)}}function p(b,v,x){return v&&h(b.prototype,v),x&&h(b,x),Object.defineProperty(b,"prototype",{writable:!1}),b}var w=function(){function b(){l(this,b),this.clearPeakCache()}return p(b,[{key:"clearPeakCache",value:function(){this.peakCacheRanges=[],this.peakCacheLength=-1}},{key:"addRangeToPeakCache",value:function(x,A,k){x!=this.peakCacheLength&&(this.clearPeakCache(),this.peakCacheLength=x);for(var C=[],S=0;S<this.peakCacheRanges.length&&this.peakCacheRanges[S]<A;)S++;for(S%2==0&&C.push(A);S<this.peakCacheRanges.length&&this.peakCacheRanges[S]<=k;)C.push(this.peakCacheRanges[S]),S++;S%2==0&&C.push(k),C=C.filter(function(g,D,M){return D==0?g!=M[D+1]:D==M.length-1?g!=M[D-1]:g!=M[D-1]&&g!=M[D+1]}),this.peakCacheRanges=this.peakCacheRanges.concat(C),this.peakCacheRanges=this.peakCacheRanges.sort(function(g,D){return g-D}).filter(function(g,D,M){return D==0?g!=M[D+1]:D==M.length-1?g!=M[D-1]:g!=M[D-1]&&g!=M[D+1]});var O=[];for(S=0;S<C.length;S+=2)O.push([C[S],C[S+1]]);return O}},{key:"getCacheRanges",value:function(){var x=[],A;for(A=0;A<this.peakCacheRanges.length;A+=2)x.push([this.peakCacheRanges[A],this.peakCacheRanges[A+1]]);return x}}]),b}();o.default=w,s.exports=o.default},"./src/util/absMax.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=b;var h=w(l("./src/util/max.js")),p=w(l("./src/util/min.js"));function w(v){return v&&v.__esModule?v:{default:v}}function b(v){var x=(0,h.default)(v),A=(0,p.default)(v);return-A>x?-A:x}s.exports=o.default},"./src/util/clamp.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h,p,w){return Math.min(Math.max(p,h),w)}s.exports=o.default},"./src/util/fetch.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=A;var h=p(l("./src/util/observer.js"));function p(k){return k&&k.__esModule?k:{default:k}}function w(k,C){if(!(k instanceof C))throw new TypeError("Cannot call a class as a function")}function b(k,C){for(var S=0;S<C.length;S++){var O=C[S];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(k,O.key,O)}}function v(k,C,S){return C&&b(k.prototype,C),S&&b(k,S),Object.defineProperty(k,"prototype",{writable:!1}),k}var x=function(){function k(C,S,O){w(this,k),this.instance=C,this.instance._reader=O.body.getReader(),this.total=parseInt(S,10),this.loaded=0}return v(k,[{key:"start",value:function(S){var O=this,g=function D(){O.instance._reader.read().then(function(M){var N=M.done,I=M.value;if(N){O.total===0&&O.instance.onProgress.call(O.instance,{loaded:O.loaded,total:O.total,lengthComputable:!1}),S.close();return}O.loaded+=I.byteLength,O.instance.onProgress.call(O.instance,{loaded:O.loaded,total:O.total,lengthComputable:O.total!==0}),S.enqueue(I),D()}).catch(function(M){S.error(M)})};g()}}]),k}();function A(k){if(k){if(!k.url)throw new Error("fetch url missing")}else throw new Error("fetch options missing");var C=new h.default,S=new Headers,O=new Request(k.url);C.controller=new AbortController,k&&k.requestHeaders&&k.requestHeaders.forEach(function(M){S.append(M.key,M.value)});var g=k.responseType||"json",D={method:k.method||"GET",headers:S,mode:k.mode||"cors",credentials:k.credentials||"same-origin",cache:k.cache||"default",redirect:k.redirect||"follow",referrer:k.referrer||"client",signal:C.controller.signal};return fetch(O,D).then(function(M){C.response=M;var N=!0;M.body||(N=!1);var I=M.headers.get("content-length");return I===null&&(N=!1),N?(C.onProgress=function(R){C.fireEvent("progress",R)},new Response(new ReadableStream(new x(C,I,M)),D)):M}).then(function(M){var N;if(M.ok)switch(g){case"arraybuffer":return M.arrayBuffer();case"json":return M.json();case"blob":return M.blob();case"text":return M.text();default:N="Unknown responseType: "+g;break}throw N||(N="HTTP error status: "+M.status),new Error(N)}).then(function(M){C.fireEvent("success",M)}).catch(function(M){C.fireEvent("error",M)}),C.fetchRequest=O,C}s.exports=o.default},"./src/util/frame.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=w;var h=p(l("./src/util/request-animation-frame.js"));function p(b){return b&&b.__esModule?b:{default:b}}function w(b){return function(){for(var v=arguments.length,x=new Array(v),A=0;A<v;A++)x[A]=arguments[A];return(0,h.default)(function(){return b.apply(void 0,x)})}}s.exports=o.default},"./src/util/get-id.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h){return h===void 0&&(h="wavesurfer_"),h+Math.random().toString(32).substring(2)}s.exports=o.default},"./src/util/index.js":(s,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),Object.defineProperty(o,"Observer",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(o,"absMax",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(o,"clamp",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(o,"debounce",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(o,"fetchFile",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(o,"frame",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(o,"getId",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(o,"ignoreSilenceMode",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(o,"max",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(o,"min",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(o,"preventClick",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(o,"requestAnimationFrame",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(o,"style",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(o,"withOrientation",{enumerable:!0,get:function(){return D.default}});var h=N(l("./src/util/get-id.js")),p=N(l("./src/util/max.js")),w=N(l("./src/util/min.js")),b=N(l("./src/util/absMax.js")),v=N(l("./src/util/observer.js")),x=N(l("./src/util/style.js")),A=N(l("./src/util/request-animation-frame.js")),k=N(l("./src/util/frame.js")),C=N(l("./node_modules/debounce/index.js")),S=N(l("./src/util/prevent-click.js")),O=N(l("./src/util/fetch.js")),g=N(l("./src/util/clamp.js")),D=N(l("./src/util/orientation.js")),M=N(l("./src/util/silence-mode.js"));function N(I){return I&&I.__esModule?I:{default:I}}},"./src/util/max.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h){var p=-1/0;return Object.keys(h).forEach(function(w){h[w]>p&&(p=h[w])}),p}s.exports=o.default},"./src/util/min.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h){var p=Number(1/0);return Object.keys(h).forEach(function(w){h[w]<p&&(p=h[w])}),p}s.exports=o.default},"./src/util/observer.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;function l(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function h(b,v){for(var x=0;x<v.length;x++){var A=v[x];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(b,A.key,A)}}function p(b,v,x){return v&&h(b.prototype,v),x&&h(b,x),Object.defineProperty(b,"prototype",{writable:!1}),b}var w=function(){function b(){l(this,b),this._disabledEventEmissions=[],this.handlers=null}return p(b,[{key:"on",value:function(x,A){var k=this;this.handlers||(this.handlers={});var C=this.handlers[x];return C||(C=this.handlers[x]=[]),C.push(A),{name:x,callback:A,un:function(O,g){return k.un(O,g)}}}},{key:"un",value:function(x,A){if(!!this.handlers){var k=this.handlers[x],C;if(k)if(A)for(C=k.length-1;C>=0;C--)k[C]==A&&k.splice(C,1);else k.length=0}}},{key:"unAll",value:function(){this.handlers=null}},{key:"once",value:function(x,A){var k=this,C=function S(){for(var O=arguments.length,g=new Array(O),D=0;D<O;D++)g[D]=arguments[D];A.apply(k,g),setTimeout(function(){k.un(x,S)},0)};return this.on(x,C)}},{key:"setDisabledEventEmissions",value:function(x){this._disabledEventEmissions=x}},{key:"_isDisabledEventEmission",value:function(x){return this._disabledEventEmissions&&this._disabledEventEmissions.includes(x)}},{key:"fireEvent",value:function(x){for(var A=arguments.length,k=new Array(A>1?A-1:0),C=1;C<A;C++)k[C-1]=arguments[C];if(!(!this.handlers||this._isDisabledEventEmission(x))){var S=this.handlers[x];S&&S.forEach(function(O){O.apply(void 0,k)})}}}]),b}();o.default=w,s.exports=o.default},"./src/util/orientation.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=w;var l={width:"height",height:"width",overflowX:"overflowY",overflowY:"overflowX",clientWidth:"clientHeight",clientHeight:"clientWidth",clientX:"clientY",clientY:"clientX",scrollWidth:"scrollHeight",scrollLeft:"scrollTop",offsetLeft:"offsetTop",offsetTop:"offsetLeft",offsetHeight:"offsetWidth",offsetWidth:"offsetHeight",left:"top",right:"bottom",top:"left",bottom:"right",borderRightStyle:"borderBottomStyle",borderRightWidth:"borderBottomWidth",borderRightColor:"borderBottomColor"};function h(b,v){return Object.prototype.hasOwnProperty.call(l,b)&&v?l[b]:b}var p=Symbol("isProxy");function w(b,v){return b[p]?b:new Proxy(b,{get:function(A,k,C){if(k===p)return!0;if(k==="domElement")return A;if(k==="style")return w(A.style,v);if(k==="canvas")return w(A.canvas,v);if(k==="getBoundingClientRect")return function(){return w(A.getBoundingClientRect.apply(A,arguments),v)};if(k==="getContext")return function(){return w(A.getContext.apply(A,arguments),v)};var S=A[h(k,v)];return typeof S=="function"?S.bind(A):S},set:function(A,k,C){return A[h(k,v)]=C,!0}})}s.exports=o.default},"./src/util/prevent-click.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=h;function l(p){p.stopPropagation(),document.body.removeEventListener("click",l,!0)}function h(p){document.body.addEventListener("click",l,!0)}s.exports=o.default},"./src/util/request-animation-frame.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var l=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(h,p){return setTimeout(h,1e3/60)}).bind(window);o.default=l,s.exports=o.default},"./src/util/silence-mode.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(){var h="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAABhTEFNRTMuMTAwA8MAAAAAAAAAABQgJAUHQQAB9AAAAnGMHkkIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADgnABGiAAQBCqgCRMAAgEAH///////////////7+n/9FTuQsQH//////2NG0jWUGlio5gLQTOtIoeR2WX////X4s9Atb/JRVCbBUpeRUq//////////////////9RUi0f2jn/+xDECgPCjAEQAABN4AAANIAAAAQVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==",p=document.createElement("div");p.innerHTML='<audio x-webkit-airplay="deny"></audio>';var w=p.children.item(0);w.src=h,w.preload="auto",w.type="audio/mpeg",w.disableRemotePlayback=!0,w.play(),w.remove(),p.remove()}s.exports=o.default},"./src/util/style.js":(s,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.default=l;function l(h,p){return Object.keys(p).forEach(function(w){h.style[w]!==p[w]&&(h.style[w]=p[w])}),h}s.exports=o.default},"./src/wavesurfer.js":(s,o,l)=>{function h(f){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},h(f)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=S(l("./src/util/index.js")),w=k(l("./src/drawer.multicanvas.js")),b=k(l("./src/webaudio.js")),v=k(l("./src/mediaelement.js")),x=k(l("./src/peakcache.js")),A=k(l("./src/mediaelement-webaudio.js"));function k(f){return f&&f.__esModule?f:{default:f}}function C(f){if(typeof WeakMap!="function")return null;var c=new WeakMap,T=new WeakMap;return(C=function(u){return u?T:c})(f)}function S(f,c){if(!c&&f&&f.__esModule)return f;if(f===null||h(f)!=="object"&&typeof f!="function")return{default:f};var T=C(c);if(T&&T.has(f))return T.get(f);var $={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in f)if(_!=="default"&&Object.prototype.hasOwnProperty.call(f,_)){var H=u?Object.getOwnPropertyDescriptor(f,_):null;H&&(H.get||H.set)?Object.defineProperty($,_,H):$[_]=f[_]}return $.default=f,T&&T.set(f,$),$}function O(f,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(c&&c.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),Object.defineProperty(f,"prototype",{writable:!1}),c&&g(f,c)}function g(f,c){return g=Object.setPrototypeOf||function($,u){return $.__proto__=u,$},g(f,c)}function D(f){var c=I();return function(){var $=R(f),u;if(c){var _=R(this).constructor;u=Reflect.construct($,arguments,_)}else u=$.apply(this,arguments);return M(this,u)}}function M(f,c){if(c&&(h(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N(f)}function N(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}function I(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function R(f){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)},R(f)}function B(f,c,T){return c in f?Object.defineProperty(f,c,{value:T,enumerable:!0,configurable:!0,writable:!0}):f[c]=T,f}function E(f,c){if(!(f instanceof c))throw new TypeError("Cannot call a class as a function")}function m(f,c){for(var T=0;T<c.length;T++){var $=c[T];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(f,$.key,$)}}function d(f,c,T){return c&&m(f.prototype,c),T&&m(f,T),Object.defineProperty(f,"prototype",{writable:!1}),f}var y=function(f){O(T,f);var c=D(T);function T($){var u;if(E(this,T),u=c.call(this),B(N(u),"defaultParams",{audioContext:null,audioScriptProcessor:null,audioRate:1,autoCenter:!0,autoCenterRate:5,autoCenterImmediately:!1,backend:"WebAudio",backgroundColor:null,barHeight:1,barRadius:0,barGap:null,barMinHeight:null,container:null,cursorColor:"#333",cursorWidth:1,dragSelection:!0,drawingContextAttributes:{desynchronized:!1},duration:null,fillParent:!0,forceDecode:!1,height:128,hideScrollbar:!1,hideCursor:!1,ignoreSilenceMode:!1,interact:!0,loopSelection:!0,maxCanvasWidth:4e3,mediaContainer:null,mediaControls:!1,mediaType:"audio",minPxPerSec:20,normalize:!1,partialRender:!1,pixelRatio:window.devicePixelRatio||screen.deviceXDPI/screen.logicalXDPI,plugins:[],progressColor:"#555",removeMediaElementOnDestroy:!0,renderer:w.default,responsive:!1,rtl:!1,scrollParent:!1,skipLength:2,splitChannels:!1,splitChannelsOptions:{overlay:!1,channelColors:{},filterChannels:[],relativeNormalization:!1},vertical:!1,waveColor:"#999",xhr:{}}),B(N(u),"backends",{MediaElement:v.default,WebAudio:b.default,MediaElementWebAudio:A.default}),B(N(u),"util",p),u.params=Object.assign({},u.defaultParams,$),u.params.splitChannelsOptions=Object.assign({},u.defaultParams.splitChannelsOptions,$.splitChannelsOptions),u.container=typeof $.container=="string"?document.querySelector(u.params.container):u.params.container,!u.container)throw new Error("Container element not found");if(u.params.mediaContainer==null?u.mediaContainer=u.container:typeof u.params.mediaContainer=="string"?u.mediaContainer=document.querySelector(u.params.mediaContainer):u.mediaContainer=u.params.mediaContainer,!u.mediaContainer)throw new Error("Media Container element not found");if(u.params.maxCanvasWidth<=1)throw new Error("maxCanvasWidth must be greater than 1");if(u.params.maxCanvasWidth%2==1)throw new Error("maxCanvasWidth must be an even number");if(u.params.rtl===!0&&(u.params.vertical===!0?p.style(u.container,{transform:"rotateX(180deg)"}):p.style(u.container,{transform:"rotateY(180deg)"})),u.params.backgroundColor&&u.setBackgroundColor(u.params.backgroundColor),u.savedVolume=0,u.isMuted=!1,u.tmpEvents=[],u.currentRequest=null,u.arraybuffer=null,u.drawer=null,u.backend=null,u.peakCache=null,typeof u.params.renderer!="function")throw new Error("Renderer parameter is invalid");u.Drawer=u.params.renderer,u.params.backend=="AudioElement"&&(u.params.backend="MediaElement"),(u.params.backend=="WebAudio"||u.params.backend==="MediaElementWebAudio")&&!b.default.prototype.supportsWebAudio.call(null)&&(u.params.backend="MediaElement"),u.Backend=u.backends[u.params.backend],u.initialisedPluginList={},u.isDestroyed=!1,u.isReady=!1;var _=0;return u._onResize=p.debounce(function(){u.drawer.wrapper&&_!=u.drawer.wrapper.clientWidth&&!u.params.scrollParent&&(_=u.drawer.wrapper.clientWidth,_&&u.drawer.fireEvent("redraw"))},typeof u.params.responsive=="number"?u.params.responsive:100),M(u,N(u))}return d(T,[{key:"init",value:function(){return this.registerPlugins(this.params.plugins),this.createDrawer(),this.createBackend(),this.createPeakCache(),this}},{key:"registerPlugins",value:function(u){var _=this;return u.forEach(function(H){return _.addPlugin(H)}),u.forEach(function(H){H.deferInit||_.initPlugin(H.name)}),this.fireEvent("plugins-registered",u),this}},{key:"getActivePlugins",value:function(){return this.initialisedPluginList}},{key:"addPlugin",value:function(u){var _=this;if(!u.name)throw new Error("Plugin does not have a name!");if(!u.instance)throw new Error("Plugin ".concat(u.name," does not have an instance property!"));u.staticProps&&Object.keys(u.staticProps).forEach(function(F){_[F]=u.staticProps[F]});var H=u.instance,V=Object.getOwnPropertyNames(p.Observer.prototype);return V.forEach(function(F){H.prototype[F]=p.Observer.prototype[F]}),this[u.name]=new H(u.params||{},this),this.fireEvent("plugin-added",u.name),this}},{key:"initPlugin",value:function(u){if(!this[u])throw new Error("Plugin ".concat(u," has not been added yet!"));return this.initialisedPluginList[u]&&this.destroyPlugin(u),this[u].init(),this.initialisedPluginList[u]=!0,this.fireEvent("plugin-initialised",u),this}},{key:"destroyPlugin",value:function(u){if(!this[u])throw new Error("Plugin ".concat(u," has not been added yet and cannot be destroyed!"));if(!this.initialisedPluginList[u])throw new Error("Plugin ".concat(u," is not active and cannot be destroyed!"));if(typeof this[u].destroy!="function")throw new Error("Plugin ".concat(u," does not have a destroy function!"));return this[u].destroy(),delete this.initialisedPluginList[u],this.fireEvent("plugin-destroyed",u),this}},{key:"destroyAllPlugins",value:function(){var u=this;Object.keys(this.initialisedPluginList).forEach(function(_){return u.destroyPlugin(_)})}},{key:"createDrawer",value:function(){var u=this;this.drawer=new this.Drawer(this.container,this.params),this.drawer.init(),this.fireEvent("drawer-created",this.drawer),this.params.responsive!==!1&&(window.addEventListener("resize",this._onResize,!0),window.addEventListener("orientationchange",this._onResize,!0)),this.drawer.on("redraw",function(){u.drawBuffer(),u.drawer.progress(u.backend.getPlayedPercents())}),this.drawer.on("click",function(_,H){setTimeout(function(){return u.seekTo(H)},0)}),this.drawer.on("scroll",function(_){u.params.partialRender&&u.drawBuffer(),u.fireEvent("scroll",_)})}},{key:"createBackend",value:function(){var u=this;this.backend&&this.backend.destroy(),this.backend=new this.Backend(this.params),this.backend.init(),this.fireEvent("backend-created",this.backend),this.backend.on("finish",function(){u.drawer.progress(u.backend.getPlayedPercents()),u.fireEvent("finish")}),this.backend.on("play",function(){return u.fireEvent("play")}),this.backend.on("pause",function(){return u.fireEvent("pause")}),this.backend.on("audioprocess",function(_){u.drawer.progress(u.backend.getPlayedPercents()),u.fireEvent("audioprocess",_)}),(this.params.backend==="MediaElement"||this.params.backend==="MediaElementWebAudio")&&(this.backend.on("seek",function(){u.drawer.progress(u.backend.getPlayedPercents())}),this.backend.on("volume",function(){var _=u.getVolume();u.fireEvent("volume",_),u.backend.isMuted!==u.isMuted&&(u.isMuted=u.backend.isMuted,u.fireEvent("mute",u.isMuted))}))}},{key:"createPeakCache",value:function(){this.params.partialRender&&(this.peakCache=new x.default)}},{key:"getDuration",value:function(){return this.backend.getDuration()}},{key:"getCurrentTime",value:function(){return this.backend.getCurrentTime()}},{key:"setCurrentTime",value:function(u){u>=this.getDuration()?this.seekTo(1):this.seekTo(u/this.getDuration())}},{key:"play",value:function(u,_){var H=this;return this.params.ignoreSilenceMode&&p.ignoreSilenceMode(),this.fireEvent("interaction",function(){return H.play(u,_)}),this.backend.play(u,_)}},{key:"setPlayEnd",value:function(u){this.backend.setPlayEnd(u)}},{key:"pause",value:function(){if(!this.backend.isPaused())return this.backend.pause()}},{key:"playPause",value:function(){return this.backend.isPaused()?this.play():this.pause()}},{key:"isPlaying",value:function(){return!this.backend.isPaused()}},{key:"skipBackward",value:function(u){this.skip(-u||-this.params.skipLength)}},{key:"skipForward",value:function(u){this.skip(u||this.params.skipLength)}},{key:"skip",value:function(u){var _=this.getDuration()||1,H=this.getCurrentTime()||0;H=Math.max(0,Math.min(_,H+(u||0))),this.seekAndCenter(H/_)}},{key:"seekAndCenter",value:function(u){this.seekTo(u),this.drawer.recenter(u)}},{key:"seekTo",value:function(u){var _=this;if(typeof u!="number"||!isFinite(u)||u<0||u>1)throw new Error("Error calling wavesurfer.seekTo, parameter must be a number between 0 and 1!");this.fireEvent("interaction",function(){return _.seekTo(u)});var H=this.params.backend==="WebAudio",V=this.backend.isPaused();H&&!V&&this.backend.pause();var F=this.params.scrollParent;this.params.scrollParent=!1,this.backend.seekTo(u*this.getDuration()),this.drawer.progress(u),H&&!V&&this.backend.play(),this.params.scrollParent=F,this.fireEvent("seek",u)}},{key:"stop",value:function(){this.pause(),this.seekTo(0),this.drawer.progress(0)}},{key:"setSinkId",value:function(u){return this.backend.setSinkId(u)}},{key:"setVolume",value:function(u){this.backend.setVolume(u),this.fireEvent("volume",u)}},{key:"getVolume",value:function(){return this.backend.getVolume()}},{key:"setPlaybackRate",value:function(u){this.backend.setPlaybackRate(u)}},{key:"getPlaybackRate",value:function(){return this.backend.getPlaybackRate()}},{key:"toggleMute",value:function(){this.setMute(!this.isMuted)}},{key:"setMute",value:function(u){if(u===this.isMuted){this.fireEvent("mute",this.isMuted);return}this.backend.setMute?(this.backend.setMute(u),this.isMuted=u):u?(this.savedVolume=this.backend.getVolume(),this.backend.setVolume(0),this.isMuted=!0,this.fireEvent("volume",0)):(this.backend.setVolume(this.savedVolume),this.isMuted=!1,this.fireEvent("volume",this.savedVolume)),this.fireEvent("mute",this.isMuted)}},{key:"getMute",value:function(){return this.isMuted}},{key:"getFilters",value:function(){return this.backend.filters||[]}},{key:"toggleScroll",value:function(){this.params.scrollParent=!this.params.scrollParent,this.drawBuffer()}},{key:"toggleInteraction",value:function(){this.params.interact=!this.params.interact}},{key:"getWaveColor",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.params.splitChannelsOptions.channelColors[u]?this.params.splitChannelsOptions.channelColors[u].waveColor:this.params.waveColor}},{key:"setWaveColor",value:function(u){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.params.splitChannelsOptions.channelColors[_]?this.params.splitChannelsOptions.channelColors[_].waveColor=u:this.params.waveColor=u,this.drawBuffer()}},{key:"getProgressColor",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.params.splitChannelsOptions.channelColors[u]?this.params.splitChannelsOptions.channelColors[u].progressColor:this.params.progressColor}},{key:"setProgressColor",value:function(u,_){this.params.splitChannelsOptions.channelColors[_]?this.params.splitChannelsOptions.channelColors[_].progressColor=u:this.params.progressColor=u,this.drawBuffer()}},{key:"getBackgroundColor",value:function(){return this.params.backgroundColor}},{key:"setBackgroundColor",value:function(u){this.params.backgroundColor=u,p.style(this.container,{background:this.params.backgroundColor})}},{key:"getCursorColor",value:function(){return this.params.cursorColor}},{key:"setCursorColor",value:function(u){this.params.cursorColor=u,this.drawer.updateCursor()}},{key:"getHeight",value:function(){return this.params.height}},{key:"setHeight",value:function(u){this.params.height=u,this.drawer.setHeight(u*this.params.pixelRatio),this.drawBuffer()}},{key:"setFilteredChannels",value:function(u){this.params.splitChannelsOptions.filterChannels=u,this.drawBuffer()}},{key:"drawBuffer",value:function(){var u=Math.round(this.getDuration()*this.params.minPxPerSec*this.params.pixelRatio),_=this.drawer.getWidth(),H=u,V=0,F=Math.max(V+_,H);this.params.fillParent&&(!this.params.scrollParent||u<_)&&(H=_,V=0,F=H);var G;if(this.params.partialRender){var z=this.peakCache.addRangeToPeakCache(H,V,F),U;for(U=0;U<z.length;U++)G=this.backend.getPeaks(H,z[U][0],z[U][1]),this.drawer.drawPeaks(G,H,z[U][0],z[U][1])}else G=this.backend.getPeaks(H,V,F),this.drawer.drawPeaks(G,H,V,F);this.fireEvent("redraw",G,H)}},{key:"zoom",value:function(u){u?(this.params.minPxPerSec=u,this.params.scrollParent=!0):(this.params.minPxPerSec=this.defaultParams.minPxPerSec,this.params.scrollParent=!1),this.drawBuffer(),this.drawer.progress(this.backend.getPlayedPercents()),this.drawer.recenter(this.getCurrentTime()/this.getDuration()),this.fireEvent("zoom",u)}},{key:"loadArrayBuffer",value:function(u){var _=this;this.decodeArrayBuffer(u,function(H){_.isDestroyed||_.loadDecodedBuffer(H)})}},{key:"loadDecodedBuffer",value:function(u){this.backend.load(u),this.drawBuffer(),this.isReady=!0,this.fireEvent("ready")}},{key:"loadBlob",value:function(u){var _=this,H=new FileReader;H.addEventListener("progress",function(V){return _.onProgress(V)}),H.addEventListener("load",function(V){return _.loadArrayBuffer(V.target.result)}),H.addEventListener("error",function(){return _.fireEvent("error","Error reading file")}),H.readAsArrayBuffer(u),this.empty()}},{key:"load",value:function(u,_,H,V){if(!u)throw new Error("url parameter cannot be empty");if(this.empty(),H){var F={"Preload is not 'auto', 'none' or 'metadata'":["auto","metadata","none"].indexOf(H)===-1,"Peaks are not provided":!_,"Backend is not of type 'MediaElement' or 'MediaElementWebAudio'":["MediaElement","MediaElementWebAudio"].indexOf(this.params.backend)===-1,"Url is not of type string":typeof u!="string"},G=Object.keys(F).filter(function(z){return F[z]});G.length&&(console.warn(`Preload parameter of wavesurfer.load will be ignored because:
|
|
152
|
+
- `+G.join(`
|
|
153
|
+
- `)),H=null)}switch(this.params.backend==="WebAudio"&&u instanceof HTMLMediaElement&&(u=u.src),this.params.backend){case"WebAudio":return this.loadBuffer(u,_,V);case"MediaElement":case"MediaElementWebAudio":return this.loadMediaElement(u,_,H,V)}}},{key:"loadBuffer",value:function(u,_,H){var V=this,F=function(z){return z&&V.tmpEvents.push(V.once("ready",z)),V.getArrayBuffer(u,function(U){return V.loadArrayBuffer(U)})};if(_)this.backend.setPeaks(_,H),this.drawBuffer(),this.fireEvent("waveform-ready"),this.tmpEvents.push(this.once("interaction",F));else return F()}},{key:"loadMediaElement",value:function(u,_,H,V){var F=this,G=u;if(typeof u=="string")this.backend.load(G,this.mediaContainer,_,H);else{var z=u;this.backend.loadElt(z,_),G=z.src}this.tmpEvents.push(this.backend.once("canplay",function(){F.backend.destroyed||(F.drawBuffer(),F.isReady=!0,F.fireEvent("ready"))}),this.backend.once("error",function(U){return F.fireEvent("error",U)})),_&&(this.backend.setPeaks(_,V),this.drawBuffer(),this.fireEvent("waveform-ready")),(!_||this.params.forceDecode)&&this.backend.supportsWebAudio()&&this.getArrayBuffer(G,function(U){F.decodeArrayBuffer(U,function(re){F.backend.buffer=re,F.backend.setPeaks(null),F.drawBuffer(),F.fireEvent("waveform-ready")})})}},{key:"decodeArrayBuffer",value:function(u,_){var H=this;this.isDestroyed||(this.arraybuffer=u,this.backend.decodeArrayBuffer(u,function(V){!H.isDestroyed&&H.arraybuffer==u&&(_(V),H.arraybuffer=null)},function(){return H.fireEvent("error","Error decoding audiobuffer")}))}},{key:"getArrayBuffer",value:function(u,_){var H=this,V=Object.assign({url:u,responseType:"arraybuffer"},this.params.xhr),F=p.fetchFile(V);return this.currentRequest=F,this.tmpEvents.push(F.on("progress",function(G){H.onProgress(G)}),F.on("success",function(G){_(G),H.currentRequest=null}),F.on("error",function(G){H.fireEvent("error",G),H.currentRequest=null})),F}},{key:"onProgress",value:function(u){var _;u.lengthComputable?_=u.loaded/u.total:_=u.loaded/(u.loaded+1e6),this.fireEvent("loading",Math.round(_*100),u.target)}},{key:"exportPCM",value:function(u,_,H,V,F){u=u||1024,V=V||0,_=_||1e4,H=H||!1;var G=this.backend.getPeaks(u,V,F),z=[].map.call(G,function(U){return Math.round(U*_)/_});return new Promise(function(U,re){if(!H){var fe=new Blob([JSON.stringify(z)],{type:"application/json;charset=utf-8"}),Z=URL.createObjectURL(fe);window.open(Z),URL.revokeObjectURL(Z)}U(z)})}},{key:"exportImage",value:function(u,_,H){return u||(u="image/png"),_||(_=1),H||(H="dataURL"),this.drawer.getImage(u,_,H)}},{key:"cancelAjax",value:function(){this.currentRequest&&this.currentRequest.controller&&(this.currentRequest._reader&&this.currentRequest._reader.cancel().catch(function(u){}),this.currentRequest.controller.abort(),this.currentRequest=null)}},{key:"clearTmpEvents",value:function(){this.tmpEvents.forEach(function(u){return u.un()})}},{key:"empty",value:function(){this.backend.isPaused()||(this.stop(),this.backend.disconnectSource()),this.isReady=!1,this.cancelAjax(),this.clearTmpEvents(),this.drawer.progress(0),this.drawer.setWidth(0),this.drawer.drawPeaks({length:this.drawer.getWidth()},0)}},{key:"destroy",value:function(){this.destroyAllPlugins(),this.fireEvent("destroy"),this.cancelAjax(),this.clearTmpEvents(),this.unAll(),this.params.responsive!==!1&&(window.removeEventListener("resize",this._onResize,!0),window.removeEventListener("orientationchange",this._onResize,!0)),this.backend&&(this.backend.destroy(),this.backend=null),this.drawer&&this.drawer.destroy(),this.isDestroyed=!0,this.isReady=!1,this.arraybuffer=null}}],[{key:"create",value:function(u){var _=new T(u);return _.init()}}]),T}(p.Observer);o.default=y,B(y,"VERSION","6.2.0"),B(y,"util",p),s.exports=o.default},"./src/webaudio.js":(s,o,l)=>{function h(m){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},h(m)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var p=b(l("./src/util/index.js"));function w(m){if(typeof WeakMap!="function")return null;var d=new WeakMap,y=new WeakMap;return(w=function(c){return c?y:d})(m)}function b(m,d){if(!d&&m&&m.__esModule)return m;if(m===null||h(m)!=="object"&&typeof m!="function")return{default:m};var y=w(d);if(y&&y.has(m))return y.get(m);var f={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in m)if(T!=="default"&&Object.prototype.hasOwnProperty.call(m,T)){var $=c?Object.getOwnPropertyDescriptor(m,T):null;$&&($.get||$.set)?Object.defineProperty(f,T,$):f[T]=m[T]}return f.default=m,y&&y.set(m,f),f}function v(m,d){if(!(m instanceof d))throw new TypeError("Cannot call a class as a function")}function x(m,d){for(var y=0;y<d.length;y++){var f=d[y];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(m,f.key,f)}}function A(m,d,y){return d&&x(m.prototype,d),y&&x(m,y),Object.defineProperty(m,"prototype",{writable:!1}),m}function k(m,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(d&&d.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),d&&C(m,d)}function C(m,d){return C=Object.setPrototypeOf||function(f,c){return f.__proto__=c,f},C(m,d)}function S(m){var d=D();return function(){var f=M(m),c;if(d){var T=M(this).constructor;c=Reflect.construct(f,arguments,T)}else c=f.apply(this,arguments);return O(this,c)}}function O(m,d){if(d&&(h(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g(m)}function g(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function D(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function M(m){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},M(m)}function N(m,d,y){return d in m?Object.defineProperty(m,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):m[d]=y,m}var I="playing",R="paused",B="finished",E=function(m){k(y,m);var d=S(y);function y(f){var c,T,$;return v(this,y),$=d.call(this),N(g($),"audioContext",null),N(g($),"offlineAudioContext",null),N(g($),"stateBehaviors",(c={},N(c,I,{init:function(){this.addOnAudioProcess()},getPlayedPercents:function(){var _=this.getDuration();return this.getCurrentTime()/_||0},getCurrentTime:function(){return this.startPosition+this.getPlayedTime()}}),N(c,R,{init:function(){this.removeOnAudioProcess()},getPlayedPercents:function(){var _=this.getDuration();return this.getCurrentTime()/_||0},getCurrentTime:function(){return this.startPosition}}),N(c,B,{init:function(){this.removeOnAudioProcess(),this.fireEvent("finish")},getPlayedPercents:function(){return 1},getCurrentTime:function(){return this.getDuration()}}),c)),$.params=f,$.ac=f.audioContext||($.supportsWebAudio()?$.getAudioContext():{}),$.lastPlay=$.ac.currentTime,$.startPosition=0,$.scheduledPause=null,$.states=(T={},N(T,I,Object.create($.stateBehaviors[I])),N(T,R,Object.create($.stateBehaviors[R])),N(T,B,Object.create($.stateBehaviors[B])),T),$.buffer=null,$.filters=[],$.gainNode=null,$.mergedPeaks=null,$.offlineAc=null,$.peaks=null,$.playbackRate=1,$.analyser=null,$.scriptNode=null,$.source=null,$.splitPeaks=[],$.state=null,$.explicitDuration=f.duration,$.sinkStreamDestination=null,$.sinkAudioElement=null,$.destroyed=!1,$}return A(y,[{key:"supportsWebAudio",value:function(){return!!(window.AudioContext||window.webkitAudioContext)}},{key:"getAudioContext",value:function(){return window.WaveSurferAudioContext||(window.WaveSurferAudioContext=new(window.AudioContext||window.webkitAudioContext)),window.WaveSurferAudioContext}},{key:"getOfflineAudioContext",value:function(c){return window.WaveSurferOfflineAudioContext||(window.WaveSurferOfflineAudioContext=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,2,c)),window.WaveSurferOfflineAudioContext}},{key:"init",value:function(){this.createVolumeNode(),this.createScriptNode(),this.createAnalyserNode(),this.setState(R),this.setPlaybackRate(this.params.audioRate),this.setLength(0)}},{key:"disconnectFilters",value:function(){this.filters&&(this.filters.forEach(function(c){c&&c.disconnect()}),this.filters=null,this.analyser.connect(this.gainNode))}},{key:"setState",value:function(c){this.state!==this.states[c]&&(this.state=this.states[c],this.state.init.call(this))}},{key:"setFilter",value:function(){for(var c=arguments.length,T=new Array(c),$=0;$<c;$++)T[$]=arguments[$];this.setFilters(T)}},{key:"setFilters",value:function(c){this.disconnectFilters(),c&&c.length&&(this.filters=c,this.analyser.disconnect(),c.reduce(function(T,$){return T.connect($),$},this.analyser).connect(this.gainNode))}},{key:"createScriptNode",value:function(){this.params.audioScriptProcessor?this.scriptNode=this.params.audioScriptProcessor:this.ac.createScriptProcessor?this.scriptNode=this.ac.createScriptProcessor(y.scriptBufferSize):this.scriptNode=this.ac.createJavaScriptNode(y.scriptBufferSize),this.scriptNode.connect(this.ac.destination)}},{key:"addOnAudioProcess",value:function(){var c=this;this.scriptNode.onaudioprocess=function(){var T=c.getCurrentTime();T>=c.getDuration()?(c.setState(B),c.fireEvent("pause")):T>=c.scheduledPause?c.pause():c.state===c.states[I]&&c.fireEvent("audioprocess",T)}}},{key:"removeOnAudioProcess",value:function(){this.scriptNode.onaudioprocess=null}},{key:"createAnalyserNode",value:function(){this.analyser=this.ac.createAnalyser(),this.analyser.connect(this.gainNode)}},{key:"createVolumeNode",value:function(){this.ac.createGain?this.gainNode=this.ac.createGain():this.gainNode=this.ac.createGainNode(),this.gainNode.connect(this.ac.destination)}},{key:"setSinkId",value:function(c){return c?(this.sinkAudioElement||(this.sinkAudioElement=new window.Audio,this.sinkAudioElement.autoplay=!0),this.sinkAudioElement.setSinkId?(this.sinkStreamDestination||(this.sinkStreamDestination=this.ac.createMediaStreamDestination()),this.gainNode.disconnect(),this.gainNode.connect(this.sinkStreamDestination),this.sinkAudioElement.srcObject=this.sinkStreamDestination.stream,this.sinkAudioElement.setSinkId(c)):Promise.reject(new Error("setSinkId is not supported in your browser"))):Promise.reject(new Error("Invalid deviceId: "+c))}},{key:"setVolume",value:function(c){this.gainNode.gain.setValueAtTime(c,this.ac.currentTime)}},{key:"getVolume",value:function(){return this.gainNode.gain.value}},{key:"decodeArrayBuffer",value:function(c,T,$){this.offlineAc||(this.offlineAc=this.getOfflineAudioContext(this.ac&&this.ac.sampleRate?this.ac.sampleRate:44100)),"webkitAudioContext"in window?this.offlineAc.decodeAudioData(c,function(u){return T(u)},$):this.offlineAc.decodeAudioData(c).then(function(u){return T(u)}).catch(function(u){return $(u)})}},{key:"setPeaks",value:function(c,T){T!=null&&(this.explicitDuration=T),this.peaks=c}},{key:"setLength",value:function(c){if(!(this.mergedPeaks&&c==2*this.mergedPeaks.length-1+2)){this.splitPeaks=[],this.mergedPeaks=[];var T=this.buffer?this.buffer.numberOfChannels:1,$;for($=0;$<T;$++)this.splitPeaks[$]=[],this.splitPeaks[$][2*(c-1)]=0,this.splitPeaks[$][2*(c-1)+1]=0;this.mergedPeaks[2*(c-1)]=0,this.mergedPeaks[2*(c-1)+1]=0}}},{key:"getPeaks",value:function(c,T,$){if(this.peaks)return this.peaks;if(!this.buffer)return[];if(T=T||0,$=$||c-1,this.setLength(c),!this.buffer)return this.params.splitChannels?this.splitPeaks:this.mergedPeaks;if(!this.buffer.length){var u=this.createBuffer(1,4096,this.sampleRate);this.buffer=u.buffer}var _=this.buffer.length/c,H=~~(_/10)||1,V=this.buffer.numberOfChannels,F;for(F=0;F<V;F++){var G=this.splitPeaks[F],z=this.buffer.getChannelData(F),U=void 0;for(U=T;U<=$;U++){var re=~~(U*_),fe=~~(re+_),Z=z[re],we=Z,oe=void 0;for(oe=re;oe<fe;oe+=H){var ve=z[oe];ve>we&&(we=ve),ve<Z&&(Z=ve)}G[2*U]=we,G[2*U+1]=Z,(F==0||we>this.mergedPeaks[2*U])&&(this.mergedPeaks[2*U]=we),(F==0||Z<this.mergedPeaks[2*U+1])&&(this.mergedPeaks[2*U+1]=Z)}}return this.params.splitChannels?this.splitPeaks:this.mergedPeaks}},{key:"getPlayedPercents",value:function(){return this.state.getPlayedPercents.call(this)}},{key:"disconnectSource",value:function(){this.source&&this.source.disconnect()}},{key:"destroyWebAudio",value:function(){this.disconnectFilters(),this.disconnectSource(),this.gainNode.disconnect(),this.scriptNode.disconnect(),this.analyser.disconnect(),this.params.closeAudioContext&&(typeof this.ac.close=="function"&&this.ac.state!="closed"&&this.ac.close(),this.ac=null,this.params.audioContext?this.params.audioContext=null:window.WaveSurferAudioContext=null,window.WaveSurferOfflineAudioContext=null),this.sinkStreamDestination&&(this.sinkAudioElement.pause(),this.sinkAudioElement.srcObject=null,this.sinkStreamDestination.disconnect(),this.sinkStreamDestination=null)}},{key:"destroy",value:function(){this.isPaused()||this.pause(),this.unAll(),this.buffer=null,this.destroyed=!0,this.destroyWebAudio()}},{key:"load",value:function(c){this.startPosition=0,this.lastPlay=this.ac.currentTime,this.buffer=c,this.createSource()}},{key:"createSource",value:function(){this.disconnectSource(),this.source=this.ac.createBufferSource(),this.source.start=this.source.start||this.source.noteGrainOn,this.source.stop=this.source.stop||this.source.noteOff,this.setPlaybackRate(this.playbackRate),this.source.buffer=this.buffer,this.source.connect(this.analyser)}},{key:"resumeAudioContext",value:function(){this.ac.state=="suspended"&&this.ac.resume&&this.ac.resume()}},{key:"isPaused",value:function(){return this.state!==this.states[I]}},{key:"getDuration",value:function(){return this.explicitDuration?this.explicitDuration:this.buffer?this.buffer.duration:0}},{key:"seekTo",value:function(c,T){if(!!this.buffer)return this.scheduledPause=null,c==null&&(c=this.getCurrentTime(),c>=this.getDuration()&&(c=0)),T==null&&(T=this.getDuration()),this.startPosition=c,this.lastPlay=this.ac.currentTime,this.state===this.states[B]&&this.setState(R),{start:c,end:T}}},{key:"getPlayedTime",value:function(){return(this.ac.currentTime-this.lastPlay)*this.playbackRate}},{key:"play",value:function(c,T){if(!!this.buffer){this.createSource();var $=this.seekTo(c,T);c=$.start,T=$.end,this.scheduledPause=T,this.source.start(0,c),this.resumeAudioContext(),this.setState(I),this.fireEvent("play")}}},{key:"pause",value:function(){this.scheduledPause=null,this.startPosition+=this.getPlayedTime();try{this.source&&this.source.stop(0)}catch{}this.setState(R),this.fireEvent("pause")}},{key:"getCurrentTime",value:function(){return this.state.getCurrentTime.call(this)}},{key:"getPlaybackRate",value:function(){return this.playbackRate}},{key:"setPlaybackRate",value:function(c){this.playbackRate=c||1,this.source&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.ac.currentTime)}},{key:"setPlayEnd",value:function(c){this.scheduledPause=c}}]),y}(p.Observer);o.default=E,N(E,"scriptBufferSize",256),s.exports=o.default},"./node_modules/debounce/index.js":s=>{function o(l,h,p){var w,b,v,x,A;h==null&&(h=100);function k(){var S=Date.now()-x;S<h&&S>=0?w=setTimeout(k,h-S):(w=null,p||(A=l.apply(v,b),v=b=null))}var C=function(){v=this,b=arguments,x=Date.now();var S=p&&!w;return w||(w=setTimeout(k,h)),S&&(A=l.apply(v,b),v=b=null),A};return C.clear=function(){w&&(clearTimeout(w),w=null)},C.flush=function(){w&&(A=l.apply(v,b),v=b=null,clearTimeout(w),w=null)},C}o.debounce=o,s.exports=o}},n={};function a(s){var o=n[s];if(o!==void 0)return o.exports;var l=n[s]={exports:{}};return r[s](l,l.exports,a),l.exports}var i=a("./src/wavesurfer.js");return i})())})(Ao);var yf=Xc(Ao.exports);const $f=()=>{const e=j(ue),{curAudioState:t,curIdx:r,playList:n,elementRefs:a}=j(ee),[i,s]=P.useState(!1),o=P.useCallback(()=>{if(!(a!=null&&a.waveformInst)||!a.trackCurTimeEl)return;const{trackCurTimeEl:b}=a,v=a.waveformInst.getCurrentTime();b.innerText=Hn(v)},[a]),[l,h]=P.useState();P.useEffect(()=>{!(a!=null&&a.waveformInst)||!n[r]||(l==null?void 0:l.src)!==n[r].src&&(h(n[r]),s(!1),a.waveformInst.load(n[r].src),a.waveformInst.on("ready",()=>{Fn(a,a.waveformInst.getDuration()),s(!0),a.waveformInst.on("seek",()=>o())}))},[n,r,a==null?void 0:a.waveformInst,l,a,o]),P.useEffect(()=>{!i||!(a!=null&&a.waveformInst)||(t.isPlaying?a.waveformInst.play():a.waveformInst.pause())},[i,t.isPlaying,a==null?void 0:a.waveformInst]);const[p,w]=P.useState(!1);return P.useEffect(()=>{if(!(a!=null&&a.waveformInst)||(a.waveformInst.on("finish",()=>w(!0)),!p))return;(()=>{var v,x;if(w(!1),t.repeatType==="ONE"){(v=a.waveformInst)==null||v.seekTo(0),(x=a.waveformInst)==null||x.play();return}e({type:"NEXT_AUDIO"})})()},[a==null?void 0:a.waveformInst,e,t.repeatType,p]),P.useEffect(()=>{if(!i)return;const b=setInterval(o,1e3);return t.isPlaying||clearInterval(b),()=>clearInterval(b)},[t.isPlaying,o,i]),P.useEffect(()=>{if(!(!(a!=null&&a.waveformInst)||!i)){if(t.muted){a.waveformInst.setVolume(0),a.waveformInst.setMute(!0);return}a.waveformInst.setVolume(t.volume)}},[t.volume,a==null?void 0:a.waveformInst,t.muted,i]),null},wf=()=>{const e=j(ue),{elementRefs:t}=j(ee),r=bf({progressColor:"--rm-audio-player-waveform-bar",waveColor:"--rm-audio-player-waveform-background"});return P.useEffect(()=>{if((t==null?void 0:t.waveformInst)||!r.current)return;const n=yf.create({barWidth:1,cursorWidth:2,container:"#rm-waveform",backend:"WebAudio",height:80,progressColor:`${r.current.progressColor}`,responsive:!0,waveColor:`${r.current.waveColor}`,cursorColor:"var(--rm-audio-player-waveform-cursor)"});e({type:"SET_ELEMENT_REFS",elementRefs:{waveformInst:n}})},[t==null?void 0:t.waveformInst,e,r.current]),$f(),null},Ef=()=>{const{curPlayId:e,playList:t,activeUI:r}=j(ee);return t.find(i=>i.id===e)&&t.length!==0?r.progress==="waveform"?L(wf,{}):L(gf,{}):null},At=ae.default.button`
|
|
153
154
|
display: flex;
|
|
154
155
|
width: 20px;
|
|
155
156
|
height: 100%;
|
|
156
157
|
svg {
|
|
157
158
|
width: 100%;
|
|
158
159
|
height: 100%;
|
|
160
|
+
pointer-events: none;
|
|
159
161
|
}
|
|
160
162
|
&:hover {
|
|
161
163
|
transform: scale(1.1);
|
|
@@ -165,51 +167,39 @@ button{
|
|
|
165
167
|
opacity: 0.5;
|
|
166
168
|
transition: all 0.2s ease-out;
|
|
167
169
|
}
|
|
168
|
-
`;var
|
|
170
|
+
`;var To={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},wa=W.default.createContext&&W.default.createContext(To),Ie=globalThis&&globalThis.__assign||function(){return Ie=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Ie.apply(this,arguments)},Pf=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};function Co(e){return e&&e.map(function(t,r){return W.default.createElement(t.tag,Ie({key:r},t.attr),Co(t.child))})}function me(e){return function(t){return W.default.createElement(xf,Ie({attr:Ie({},e.attr)},t),Co(e.child))}}function xf(e){var t=function(r){var n=e.attr,a=e.size,i=e.title,s=Pf(e,["attr","size","title"]),o=a||r.size||"1em",l;return r.className&&(l=r.className),e.className&&(l=(l?l+" ":"")+e.className),W.default.createElement("svg",Ie({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,s,{className:l,style:Ie(Ie({color:e.color||r.color},r.style),e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),i&&W.default.createElement("title",null,i),e.children)};return wa!==void 0?W.default.createElement(wa.Consumer,null,function(r){return t(r)}):t(To)}function Af(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"}}]})(e)}function Tf(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"}}]})(e)}function Cf(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 10h11v2H3zM3 6h11v2H3zM3 14h7v2H3zM16 13v8l6-4z"}}]})(e)}const de=({render:e,customIcon:t})=>L(ze,{children:t!=null?t:e}),Sf=ae.default(At)`
|
|
169
171
|
width: 35px;
|
|
170
|
-
`,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
display: flex;
|
|
182
|
-
align-items: ${e!=null&&e.includes("top")?"flex-start":"flex-end"};
|
|
183
|
-
}
|
|
172
|
+
`,kf=()=>{const{curAudioState:e,customIcons:t}=j(ee),r=j(ue),n=()=>r({type:"SET_PlAY_STATE"}),a=P.useMemo(()=>e.isPlaying?L(de,{render:L(Af,{}),customIcon:t==null?void 0:t.pause}):L(de,{render:L(Tf,{}),customIcon:t==null?void 0:t.play}),[e.isPlaying,t==null?void 0:t.pause,t==null?void 0:t.play]);return L(Sf,{onClick:n,className:"play-button",children:a})};function Of(e){return me({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zM8 14.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5 6.5 2.91 6.5 6.5-2.91 6.5-6.5 6.5z"}},{tag:"path",attr:{d:"M7 8l4-3v6z"}},{tag:"path",attr:{d:"M5 5h2v6h-2v-6z"}}]})(e)}function Rf(e){return me({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0c4.418 0 8 3.582 8 8s-3.582 8-8 8-8-3.582-8-8 3.582-8 8-8zM8 14.5c3.59 0 6.5-2.91 6.5-6.5s-2.91-6.5-6.5-6.5-6.5 2.91-6.5 6.5 2.91 6.5 6.5 6.5z"}},{tag:"path",attr:{d:"M9 8l-4-3v6z"}},{tag:"path",attr:{d:"M11 5h-2v6h2v-6z"}}]})(e)}const Ea=({type:e,visible:t})=>{const{customIcons:r}=j(ee),n=j(ue),a=()=>{e==="next"&&n({type:"NEXT_AUDIO"}),e==="prev"&&n({type:"PREV_AUDIO"})},i=P.useMemo(()=>e==="next"?L(de,{render:L(Rf,{}),customIcon:r==null?void 0:r.next}):e==="prev"?L(de,{render:L(Of,{}),customIcon:r==null?void 0:r.prev}):null,[r==null?void 0:r.next,r==null?void 0:r.prev,e]);return t?L(At,{onClick:a,className:"prev-n-next-button",children:i}):null};function _f(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M18 4l3 3l-3 3"}},{tag:"path",attr:{d:"M18 20l3 -3l-3 -3"}},{tag:"path",attr:{d:"M3 7h3a5 5 0 0 1 5 5a5 5 0 0 0 5 5h5"}},{tag:"path",attr:{d:"M21 7h-5a4.978 4.978 0 0 0 -2.998 .998m-4.002 8.003a4.984 4.984 0 0 1 -3 .999h-3"}}]})(e)}function Mf(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M4 12v-3c0 -1.336 .873 -2.468 2.08 -2.856m3.92 -.144h10m-3 -3l3 3l-3 3"}},{tag:"path",attr:{d:"M20 12v3a3 3 0 0 1 -.133 .886m-1.99 1.984a3 3 0 0 1 -.877 .13h-13m3 3l-3 -3l3 -3"}},{tag:"path",attr:{d:"M3 3l18 18"}}]})(e)}function Lf(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3"}},{tag:"path",attr:{d:"M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3"}},{tag:"path",attr:{d:"M11 11l1 -1v4"}}]})(e)}function If(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3"}},{tag:"path",attr:{d:"M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3"}}]})(e)}function Nf(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M15 8a5 5 0 0 1 0 8"}},{tag:"path",attr:{d:"M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a0.8 .8 0 0 1 1.5 .5v14a0.8 .8 0 0 1 -1.5 .5l-3.5 -4.5"}}]})(e)}function Pa(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a0.8 .8 0 0 1 1.5 .5v14a0.8 .8 0 0 1 -1.5 .5l-3.5 -4.5"}},{tag:"path",attr:{d:"M16 10l4 4m0 -4l-4 4"}}]})(e)}function Df(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M15 8a5 5 0 0 1 0 8"}},{tag:"path",attr:{d:"M17.7 5a9 9 0 0 1 0 14"}},{tag:"path",attr:{d:"M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a0.8 .8 0 0 1 1.5 .5v14a0.8 .8 0 0 1 -1.5 .5l-3.5 -4.5"}}]})(e)}const Bf=()=>{const{curAudioState:e,customIcons:t,activeUI:r}=j(ee),n=j(ue),a=P.useCallback(()=>{switch(e.repeatType){case"ALL":n({type:"SET_REPEAT_TYPE",repeatType:"ONE"});break;case"ONE":n({type:"SET_REPEAT_TYPE",repeatType:"NONE"});break;case"NONE":n({type:"SET_REPEAT_TYPE",repeatType:"SHUFFLE"});break;case"SHUFFLE":n({type:"SET_REPEAT_TYPE",repeatType:"ALL"});break}},[e.repeatType,n]),i=P.useMemo(()=>{switch(e.repeatType){case"ALL":return L(de,{render:L(If,{}),customIcon:t==null?void 0:t.repeatAll});case"ONE":return L(de,{render:L(Lf,{}),customIcon:t==null?void 0:t.repeatOne});case"NONE":return L(de,{render:L(Mf,{}),customIcon:t==null?void 0:t.repeatNone});case"SHUFFLE":return L(de,{render:L(_f,{}),customIcon:t==null?void 0:t.repeatShuffle})}},[e.repeatType,t==null?void 0:t.repeatAll,t==null?void 0:t.repeatNone,t==null?void 0:t.repeatOne,t==null?void 0:t.repeatShuffle]);return L(At,{onClick:a,className:"repeat-button",children:i})},Hf=({isOpen:e})=>{const{customIcons:t}=j(ee);return L(At,{children:L(de,{render:L(Cf,{size:"100%",color:e?"var(--rm-audio-player-sortable-list-button-active)":void 0}),customIcon:t==null?void 0:t.playList})})},So=P.forwardRef((e,t)=>{const{curAudioState:r,customIcons:n}=j(ee),a=j(ue),i=P.useCallback(()=>a({type:"SET_MUTED",muted:!r.muted}),[a,r.muted]),s=P.useMemo(()=>{const o={size:"100%"};if(r.muted)return L(de,{render:L(Pa,{...o}),customIcon:n==null?void 0:n.volumeMuted});switch((h=>{if(h===0)return"mute";if(h<=.5)return"low";if(h>.5)return"high"})(r.volume)){case"mute":return L(de,{render:L(Pa,{...o}),customIcon:n==null?void 0:n.volumeMuted});case"low":return L(de,{render:L(Nf,{...o}),customIcon:n==null?void 0:n.volumeHalf});case"high":return L(de,{render:L(Df,{...o}),customIcon:n==null?void 0:n.volumeFull});default:return null}},[r.muted,r.volume,n==null?void 0:n.volumeMuted,n==null?void 0:n.volumeFull,n==null?void 0:n.volumeHalf]);return L(At,{onClick:i,className:"volume-trigger-container",ref:t,children:s})});So.displayName="VolumeTriggerBtn";const Vn=P.createContext(null),ko=be.keyframes({"0%":{opacity:0,transform:"scale(0.95)"},"60%":{opacity:.75,transform:"scale(1.05)"},"100%":{opacity:1,transform:"scale(1)"}}),Oo=be.keyframes({"0%":{opacity:1,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(0.5)"}}),Un=({visible:e,name:t,leaveTime:r,enterTime:n,clearTime:a,onExited:i,onEntered:s,children:o})=>{const[l,h]=P.useState(""),[p,w]=P.useState(!1);return P.useLayoutEffect(()=>{const b=e?"enter":"leave",v=e?n:r;e&&!p&&w(!0),h(`${t}-${b}`);const x=setTimeout(()=>{h(`${t}-${b} ${t}-${b}-active`),b==="leave"?i==null||i():s==null||s(),clearTimeout(x)},v),A=setTimeout(()=>{e||(h(t),w(!1)),clearTimeout(A)},v+a);return()=>{clearTimeout(x),clearTimeout(A)}},[e,p]),p?P.cloneElement(o,{className:`${o.props.className} ${l}`}):null},Ro=(e,t)=>{P.useEffect(()=>{const r=n=>{const a=e.current,{target:i}=n;!n||!a||a.contains(i)||t(n)};return document.addEventListener("click",r),()=>document.removeEventListener("click",r)},[e,t])},vt=({outboundClickActive:e=!1,placement:t="bottom",children:r,isOpen:n,onOpenChange:a})=>{const i=P.useRef(null),[s,o]=W.default.Children.toArray(r),[l,h]=P.useState(!1);return Ro(i,()=>{!e||(h(!1),a&&a(!1))}),P.useLayoutEffect(()=>{n!==void 0&&h(n)},[n]),L(Ff,{className:"drawer-container",ref:i,children:L(Vn.Provider,{value:{isOpen:l,setIsOpen:h,onOpenChange:a},children:le(ze,{children:[t==="top"&&o,s,t==="bottom"&&o]})})})},Ff=ae.default.div`
|
|
173
|
+
position: relative;
|
|
174
|
+
min-width: 20px;
|
|
175
|
+
min-height: 20px;
|
|
176
|
+
.drawer-trigger-wrapper {
|
|
177
|
+
width: 100%;
|
|
178
|
+
height: 100%;
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
position: absolute;
|
|
181
|
+
display: flex;
|
|
182
|
+
}
|
|
184
183
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
184
|
+
.drawer-content-wrapper {
|
|
185
|
+
transform-origin: center top;
|
|
186
|
+
}
|
|
188
187
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
.drawer-content-wrapper-enter {
|
|
189
|
+
animation: ${ko} 0.25s ease-out normal forwards;
|
|
190
|
+
}
|
|
192
191
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
`,uv=({children:e,isWithAnimation:t=!0,...r})=>{const{isOpen:n,setIsOpen:a}=K(Ss);return t?N(Ac,{visible:n,name:"drawer-content-wrapper",enterTime:20,leaveTime:60,clearTime:300,onExited:()=>a(!1),onEntered:()=>a(!0),children:N(bl,{...r,children:e})}):N(bl,{...r,children:e})},bl=me.default.div`
|
|
198
|
-
${({placement:e})=>Me.css`
|
|
199
|
-
position: absolute;
|
|
200
|
-
top: ${e==="top"?"0":void 0};
|
|
201
|
-
bottom: ${e==="bottom"?"0":void 0};
|
|
202
|
-
left: ${e==="left"?"0":void 0};
|
|
203
|
-
right: ${e==="right"?"0":void 0};
|
|
204
|
-
`}
|
|
205
|
-
`,cv=({children:e})=>{const{isOpen:t,setIsOpen:r,onOpenChange:n}=K(Ss);return N("div",{className:"drawer-trigger-wrapper",onClick:()=>{r(!t),n&&n(!t)},children:e})};er.Content=uv;er.Trigger=cv;const ha=({children:e})=>N(fv,{className:"sortable-list-container",children:e}),fv=me.default.ul`
|
|
192
|
+
.drawer-content-wrapper-leave {
|
|
193
|
+
animation: ${Oo} 0.1s ease-in forwards;
|
|
194
|
+
}
|
|
195
|
+
`,Wf=({children:e,isWithAnimation:t=!0})=>{const{isOpen:r,setIsOpen:n}=j(Vn),a=()=>n(!1),i=()=>n(!0),s=P.useMemo(()=>L("div",{className:"drawer-content-container",children:e}),[e]);return t?L(Un,{visible:r,name:"drawer-content-wrapper",enterTime:20,leaveTime:60,clearTime:300,onExited:a,onEntered:i,children:s}):s},Vf=({children:e})=>{const{isOpen:t,setIsOpen:r,onOpenChange:n}=j(Vn);return L("div",{className:"drawer-trigger-wrapper",onClick:()=>{r(!t),n&&n(!t)},children:e})};vt.Content=Wf;vt.Trigger=Vf;const cn=({children:e})=>L(Uf,{className:"sortable-list-container",children:e}),Uf=ae.default.ul`
|
|
206
196
|
ul,
|
|
207
197
|
li {
|
|
208
198
|
list-style-type: none;
|
|
209
199
|
}
|
|
210
200
|
cursor: pointer;
|
|
211
|
-
`;function
|
|
212
|
-
`)}function
|
|
201
|
+
`;function Fe(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function kr(e){return e&&e.__esModule?e.default:e}var ur={};Fe(ur,"repeat",()=>zf);Fe(ur,"minmax",()=>Xf);Fe(ur,"fitContent",()=>Kf);Fe(ur,"Grid",()=>_o);const jf={...er,autoFlow:["gridAutoFlow",ne],autoColumns:["gridAutoColumns",Ue],autoRows:["gridAutoRows",Ue],areas:["gridTemplateAreas",Yf],columns:["gridTemplateColumns",fn],rows:["gridTemplateRows",fn],gap:["gap",Y],rowGap:["rowGap",Y],columnGap:["columnGap",Y],justifyItems:["justifyItems",ne],justifyContent:["justifyContent",ne],alignItems:["alignItems",ne],alignContent:["alignContent",ne]};function Gf(e,t){let{children:r,...n}=e,{styleProps:a}=Ae(n,jf);a.style.display="grid";let i=De(t);return W.default.createElement("div",{...xe(n),...a,ref:i},r)}function zf(e,t){return`repeat(${e}, ${fn(t)})`}function Xf(e,t){return`minmax(${Ue(e)}, ${Ue(t)})`}function Kf(e){return`fit-content(${Ue(e)})`}function Yf(e){return e.map(t=>`"${t}"`).join(`
|
|
202
|
+
`)}function Ue(e){return/^max-content|min-content|minmax|auto|fit-content|repeat|subgrid/.test(e)?e:Y(e)}function fn(e){return Array.isArray(e)?e.map(Ue).join(" "):Ue(e)}const _o=P.forwardRef(Gf);var qf={};Fe(qf,"Flex",()=>jn);var tt={};Fe(tt,"flex-container",()=>dn,e=>dn=e);Fe(tt,"flex",()=>hn,e=>hn=e);Fe(tt,"flex-gap",()=>pn,e=>pn=e);var dn,hn,pn;dn="flex-container_e15493";hn="flex_e15493";pn="flex-gap_e15493";const Jf={direction:["flexDirection",ne],wrap:["flexWrap",Zf],justifyContent:["justifyContent",Or],alignItems:["alignItems",Or],alignContent:["alignContent",Or]};function Qf(e,t){let{children:r,...n}=e,a=_n(),i=(a==null?void 0:a.matchedBreakpoints)||["base"],{styleProps:s}=Ae(n),{styleProps:o}=Ae(n,Jf),l=De(t),h=at();if((e.gap||e.rowGap||e.columnGap)&&(h||!ed())){let w={...o.style,"--column-gap":e.columnGap!=null?We(e.columnGap,i):void 0,"--row-gap":e.rowGap!=null?We(e.rowGap,i):void 0,"--gap":e.gap!=null?We(e.gap,i):void 0};return W.default.createElement("div",{...xe(n),...s,className:It(kr(tt),"flex-container",s.className),ref:l},W.default.createElement("div",{className:It(kr(tt),"flex","flex-gap"),style:w},r))}let p={...s.style,...o.style};return e.gap!=null&&(p.gap=We(e.gap,i)),e.columnGap!=null&&(p.columnGap=We(e.columnGap,i)),e.rowGap!=null&&(p.rowGap=We(e.rowGap,i)),W.default.createElement("div",{...xe(n),className:It(kr(tt),"flex",s.className),style:p,ref:l},r)}function Or(e){return e==="start"?"flex-start":e==="end"?"flex-end":e}function Zf(e){return typeof e=="boolean"?e?"wrap":"nowrap":e}let Mt=null;function ed(){if(Mt!=null)return Mt;if(typeof document=="undefined")return!1;var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),Mt=e.scrollHeight===1,e.parentNode.removeChild(e),Mt}const jn=P.forwardRef(Qf),td=({index:e,dragStartIdx:t,listData:r,draggable:n=!0,onDragStart:a,onDragOver:i,onDrop:s,onClick:o})=>({draggable:n,onDragStart:l=>{l.stopPropagation(),l.currentTarget.classList.add("dragstart"),a&&a(l)},onDragEnd:l=>{l.stopPropagation(),l.currentTarget.classList.remove("dragstart")},onDragEnter:l=>{l.stopPropagation(),l.currentTarget.classList.add("dragover")},onDragLeave:l=>{l.stopPropagation(),l.currentTarget.classList.remove("dragover")},onDragOver:l=>{l.preventDefault(),l.stopPropagation(),i&&i(l)},onDrop:l=>{l.stopPropagation(),l.currentTarget.classList.remove("dragover");const h=[...r],p=r[t];h.splice(t,1);const w=(t<e?[...h.slice(0,e),p,...h.slice(e,h.length)]:[...h.slice(0,e),p,...h.slice(e,h.length)]).map((b,v)=>({...b,index:v}));s&&s(l,w)},onClick:l=>{l.stopPropagation(),o&&o(l)}}),rd=e=>{const{children:t,...r}=e,n=td(r);return L(nd,{className:"list-item-root-container",...n,children:L(jn,{alignItems:"center",children:t})})},nd=ae.default.li`
|
|
213
203
|
border: 2px solid transparent;
|
|
214
204
|
transition: all 0.3s ease-in-out;
|
|
215
205
|
|
|
@@ -226,18 +216,18 @@ button{
|
|
|
226
216
|
backdrop-filter: blur(20px);
|
|
227
217
|
box-shadow: 0px 3.58195px 22.3872px -2.68646px rgb(0 0 0 / 20%);
|
|
228
218
|
}
|
|
229
|
-
`;
|
|
219
|
+
`;cn.Item=rd;var Mo={exports:{}};/*!
|
|
230
220
|
Copyright (c) 2018 Jed Watson.
|
|
231
221
|
Licensed under the MIT License (MIT), see
|
|
232
222
|
http://jedwatson.github.io/classnames
|
|
233
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],a=0;a<arguments.length;a++){var i=arguments[a];if(!!i){var s=typeof i;if(s==="string"||s==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var o=r.apply(null,i);o&&n.push(o)}}else if(s==="object")if(i.toString===Object.prototype.toString)for(var l in i)t.call(i,l)&&i[l]&&n.push(l);else n.push(i.toString())}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(
|
|
223
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],a=0;a<arguments.length;a++){var i=arguments[a];if(!!i){var s=typeof i;if(s==="string"||s==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var o=r.apply(null,i);o&&n.push(o)}}else if(s==="object")if(i.toString===Object.prototype.toString)for(var l in i)t.call(i,l)&&i[l]&&n.push(l);else n.push(i.toString())}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Mo);var ad=Mo.exports;const id=({data:e})=>{const{curPlayId:t,coverImgsCss:r}=j(ee);return L(od,{className:ad("list-item-container",{curPlayed:t===e.id}),children:le("div",{className:"list-item-contents-wrapper",children:[L("div",{className:"album-cover-wrapper",children:L("img",{src:e.img,alt:"",style:r==null?void 0:r.listThumbnail})}),le("div",{className:"album-info-wrapper",children:[e.writer&&L("span",{className:"writer",children:e.writer}),e.name&&L("span",{className:"title",children:e.name}),e.description&&L("div",{className:"description",children:e.description})]})]})})},od=ae.default.div`
|
|
234
224
|
width: 100%;
|
|
235
225
|
height: 100%;
|
|
236
226
|
display: flex;
|
|
237
227
|
align-items: center;
|
|
238
228
|
padding: 10px 20px;
|
|
239
229
|
&.curPlayed {
|
|
240
|
-
background: var(--
|
|
230
|
+
background: var(--rm-audio-player-selected-list-item-background);
|
|
241
231
|
}
|
|
242
232
|
.list-item-contents-wrapper {
|
|
243
233
|
width: 100%;
|
|
@@ -265,7 +255,7 @@ button{
|
|
|
265
255
|
overflow: hidden;
|
|
266
256
|
}
|
|
267
257
|
}
|
|
268
|
-
`,
|
|
258
|
+
`,sd=({setIsOpen:e})=>{const{playList:t,activeUI:r}=j(ee),n=j(ue),[a,i]=P.useState(0),s=P.useCallback(o=>{n({type:"SET_CURRENT_INDEX",currentIndex:o,currentAudioId:t[o].id})},[n,t]);return{cssTransitionEventProps:{onExited:()=>e(!1),onEntered:()=>e(!0)},sortableItemEventProps:{draggable:r.playList!=="unSortable"||r.all,dragStartIdx:a,onDragStart:o=>i(o),onDrop:(o,l)=>n({type:"UPDATE_PLAY_LIST",playList:l}),onClick:o=>s(o)}}},ld=({isOpen:e,setIsOpen:t})=>{const{playList:r}=j(ee),{cssTransitionEventProps:n,sortableItemEventProps:a}=sd({setIsOpen:t}),{onClick:i,onDragStart:s,...o}=a;return r.length!==0?xa.default.createPortal(L(Un,{visible:e,name:"playlist-content",enterTime:20,leaveTime:20,clearTime:300,...n,children:L(ud,{className:"play-list-container",children:L(cn,{children:r.map((l,h)=>L(cn.Item,{index:h,listData:r,onClick:()=>i(h),onDragStart:()=>s(h),...o,children:L(id,{data:l})},`sortable-item-${h}`))})})}),document.querySelector(".sortable-play-list")):L(ze,{})},ud=ae.default.div`
|
|
269
259
|
height: 20vh;
|
|
270
260
|
transition-property: max-height, opacity;
|
|
271
261
|
overflow-x: hidden;
|
|
@@ -291,99 +281,90 @@ button{
|
|
|
291
281
|
transition-duration: 0.25s;
|
|
292
282
|
transition-timing-function: 0.2s cubic-bezier(0.66, -0.41, 1, 1);
|
|
293
283
|
}
|
|
294
|
-
`,
|
|
284
|
+
`,cd=()=>{const[e,t]=P.useState(!1);return le(vt,{onOpenChange:t,children:[L(vt.Trigger,{children:L(Hf,{isOpen:e})}),L(vt.Content,{children:L(ld,{isOpen:e,setIsOpen:t})})]})},fd=()=>{const{elementRefs:e}=j(ee),[t,r]=P.useState(!1),n=P.useCallback(a=>{if(!(e!=null&&e.audioEl))return;const{clientX:i}=a,{clientWidth:s}=a.currentTarget,o=a.currentTarget.getBoundingClientRect(),p=(i-o.x)/s*e.audioEl.duration;e.audioEl.currentTime=p},[e==null?void 0:e.audioEl]);return{onMouseDown:()=>r(!0),onMouseUp:()=>r(!1),onMouseLeave:()=>r(!1),onMouseMove:t?n:void 0,onClick:n}},dd=()=>{const e=P.useRef(null),t=P.useRef(null),r=P.useRef(null),n=j(ue),a=fd();return P.useEffect(()=>{if(e.current&&t.current&&r.current){const i=e.current,s=t.current,o=r.current;n({type:"SET_ELEMENT_REFS",elementRefs:{progressBarEl:i,progressValueEl:s,progressHandleEl:o}})}},[r,e,t,n]),le(hd,{className:"bar-progress-wrapper",...a,children:[L("div",{className:"rm-player-progress-bar",ref:e,children:L("div",{className:"rm-player-progress",ref:t})}),L("div",{className:"rm-player-progress-handle",ref:r})]})},hd=ae.default.div`
|
|
295
285
|
display: flex;
|
|
296
286
|
width: 100%;
|
|
297
|
-
height:
|
|
298
|
-
padding:
|
|
287
|
+
height: 18px;
|
|
288
|
+
padding: 8px 0;
|
|
299
289
|
cursor: pointer;
|
|
300
290
|
position: relative;
|
|
301
291
|
align-items: center;
|
|
302
|
-
.
|
|
292
|
+
.rm-player-progress-bar {
|
|
303
293
|
position: relative;
|
|
304
294
|
width: 100%;
|
|
305
295
|
height: 100%;
|
|
306
296
|
overflow: hidden;
|
|
307
|
-
background-color: var(--
|
|
297
|
+
background-color: var(--rm-audio-player-progress-bar-background);
|
|
308
298
|
}
|
|
309
|
-
.
|
|
299
|
+
.rm-player-progress {
|
|
310
300
|
position: absolute;
|
|
311
301
|
left: 0;
|
|
312
302
|
width: 100%;
|
|
313
303
|
height: 100%;
|
|
314
|
-
background-color: var(--
|
|
304
|
+
background-color: var(--rm-audio-player-progress-bar);
|
|
315
305
|
transform-origin: 0 0;
|
|
316
306
|
transform: scaleX(0);
|
|
317
307
|
}
|
|
318
308
|
&:hover {
|
|
319
|
-
.
|
|
309
|
+
.rm-player-progress-handle {
|
|
320
310
|
opacity: 1;
|
|
321
311
|
}
|
|
322
312
|
}
|
|
323
|
-
.
|
|
313
|
+
.rm-player-progress-handle {
|
|
324
314
|
position: absolute;
|
|
325
315
|
left: -4px;
|
|
326
|
-
background-color: var(--
|
|
316
|
+
background-color: var(--rm-audio-player-progress-bar);
|
|
327
317
|
border-radius: 100%;
|
|
328
318
|
height: 8px;
|
|
329
319
|
width: 8px;
|
|
330
320
|
opacity: 0;
|
|
331
321
|
transition: opacity 0.2s ease-in-out;
|
|
332
322
|
}
|
|
333
|
-
`,
|
|
323
|
+
`,pd=ae.default.div`
|
|
334
324
|
display: flex;
|
|
335
325
|
width: 100%;
|
|
336
|
-
#
|
|
326
|
+
#rm-waveform {
|
|
337
327
|
width: 100%;
|
|
338
328
|
wave {
|
|
339
329
|
cursor: pointer !important;
|
|
340
330
|
}
|
|
341
331
|
}
|
|
342
|
-
`,
|
|
332
|
+
`,md=()=>L(pd,{className:"waveform-wrapper",children:L("div",{id:"rm-waveform"})}),vd=ae.default.div`
|
|
343
333
|
min-width: 200px;
|
|
344
334
|
padding: 0 10px;
|
|
345
|
-
`,Hv=()=>{const{activeUI:e}=K(oe),t=e.progress!==void 0?!!e.progress:e.all,r=$.useMemo(()=>e.progress==="waveform"?N(Dv,{}):N(Mv,{}),[e.progress]);return t?N(Bv,{className:"progress-container",children:r}):null},Be=Cc,kc=$.forwardRef((e,t)=>N(Ts,{justifySelf:"center",padding:"0 5px",ref:t,...e,children:e.children}));kc.displayName="GridItem";Be.Item=kc;var Vt={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Vt);var Cs={};Object.defineProperty(Cs,"__esModule",{value:!0});Cs.AlertSmall=Oc;var _n=Fv(k.default);function Fv(e){return e&&e.__esModule?e:{default:e}}function ya(){return ya=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ya.apply(this,arguments)}function Uv(e,t){if(e==null)return{};var r=Wv(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function Wv(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Oc(e){var t=e.scale,r=t===void 0?"M":t,n=Uv(e,["scale"]);return _n.default.createElement("svg",ya({},n,n),r==="L"&&_n.default.createElement("path",{d:"M8.564 1.289L.2 16.256A.5.5 0 0 0 .636 17h16.728a.5.5 0 0 0 .436-.744L9.436 1.289a.5.5 0 0 0-.872 0zM10 14.75a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25zm0-3a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-6a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25z"}),r==="M"&&_n.default.createElement("path",{d:"M6.66 1.003L.157 12.643a.389.389 0 0 0 .339.58h13.01a.389.389 0 0 0 .34-.58L7.338 1.004a.389.389 0 0 0-.678 0zm1.118 10.47a.194.194 0 0 1-.195.194H6.417a.194.194 0 0 1-.195-.195v-1.166a.194.194 0 0 1 .195-.195h1.166a.194.194 0 0 1 .195.195zm0-2.334a.194.194 0 0 1-.195.194H6.417a.194.194 0 0 1-.195-.194V4.472a.194.194 0 0 1 .195-.194h1.166a.194.194 0 0 1 .195.194z"}))}Oc.displayName="AlertSmall";function Ic(e){return e&&e.__esModule?e.default:e}function j(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Vv={};j(Vv,"Icon",()=>Rc);var G={};j(G,"spectrum-Icon",()=>$a,e=>$a=e);j(G,"spectrum-UIIcon",()=>xa,e=>xa=e);j(G,"spectrum-Icon--sizeXXS",()=>Ea,e=>Ea=e);j(G,"spectrum-Icon--sizeXS",()=>Pa,e=>Pa=e);j(G,"spectrum-Icon--sizeS",()=>wa,e=>wa=e);j(G,"spectrum-Icon--sizeM",()=>Ta,e=>Ta=e);j(G,"spectrum-Icon--sizeL",()=>Sa,e=>Sa=e);j(G,"spectrum-Icon--sizeXL",()=>Aa,e=>Aa=e);j(G,"spectrum-Icon--sizeXXL",()=>Ca,e=>Ca=e);j(G,"spectrum--medium",()=>_a,e=>_a=e);j(G,"spectrum-UIIcon--large",()=>ka,e=>ka=e);j(G,"spectrum-UIIcon--medium",()=>Oa,e=>Oa=e);j(G,"spectrum--large",()=>Ia,e=>Ia=e);j(G,"spectrum-UIIcon-AlertMedium",()=>Ra,e=>Ra=e);j(G,"spectrum-UIIcon-AlertSmall",()=>Ma,e=>Ma=e);j(G,"spectrum-UIIcon-ArrowDownSmall",()=>La,e=>La=e);j(G,"spectrum-UIIcon-ArrowLeftMedium",()=>Na,e=>Na=e);j(G,"spectrum-UIIcon-Asterisk",()=>Da,e=>Da=e);j(G,"spectrum-UIIcon-CheckmarkMedium",()=>Ba,e=>Ba=e);j(G,"spectrum-UIIcon-CheckmarkSmall",()=>Ha,e=>Ha=e);j(G,"spectrum-UIIcon-ChevronDownMedium",()=>Fa,e=>Fa=e);j(G,"spectrum-UIIcon-ChevronDownSmall",()=>Ua,e=>Ua=e);j(G,"spectrum-UIIcon-ChevronLeftLarge",()=>Wa,e=>Wa=e);j(G,"spectrum-UIIcon-ChevronLeftMedium",()=>Va,e=>Va=e);j(G,"spectrum-UIIcon-ChevronRightLarge",()=>ja,e=>ja=e);j(G,"spectrum-UIIcon-ChevronRightMedium",()=>Ga,e=>Ga=e);j(G,"spectrum-UIIcon-ChevronRightSmall",()=>za,e=>za=e);j(G,"spectrum-UIIcon-ChevronUpSmall",()=>Xa,e=>Xa=e);j(G,"spectrum-UIIcon-CornerTriangle",()=>Ka,e=>Ka=e);j(G,"spectrum-UIIcon-CrossLarge",()=>qa,e=>qa=e);j(G,"spectrum-UIIcon-CrossMedium",()=>Ya,e=>Ya=e);j(G,"spectrum-UIIcon-CrossSmall",()=>Ja,e=>Ja=e);j(G,"spectrum-UIIcon-DashSmall",()=>Qa,e=>Qa=e);j(G,"spectrum-UIIcon-DoubleGripper",()=>Za,e=>Za=e);j(G,"spectrum-UIIcon-FolderBreadcrumb",()=>ei,e=>ei=e);j(G,"spectrum-UIIcon-HelpMedium",()=>ti,e=>ti=e);j(G,"spectrum-UIIcon-HelpSmall",()=>ri,e=>ri=e);j(G,"spectrum-UIIcon-InfoMedium",()=>ni,e=>ni=e);j(G,"spectrum-UIIcon-InfoSmall",()=>ai,e=>ai=e);j(G,"spectrum-UIIcon-ListGripper",()=>ii,e=>ii=e);j(G,"spectrum-UIIcon-Magnifier",()=>oi,e=>oi=e);j(G,"spectrum-UIIcon-SkipLeft",()=>si,e=>si=e);j(G,"spectrum-UIIcon-SkipRight",()=>li,e=>li=e);j(G,"spectrum-UIIcon-Star",()=>ui,e=>ui=e);j(G,"spectrum-UIIcon-StarOutline",()=>ci,e=>ci=e);j(G,"spectrum-UIIcon-SuccessMedium",()=>fi,e=>fi=e);j(G,"spectrum-UIIcon-SuccessSmall",()=>di,e=>di=e);j(G,"spectrum-UIIcon-TripleGripper",()=>pi,e=>pi=e);var $a,xa,Ea,Pa,wa,Ta,Sa,Aa,Ca,_a,ka,Oa,Ia,Ra,Ma,La,Na,Da,Ba,Ha,Fa,Ua,Wa,Va,ja,Ga,za,Xa,Ka,qa,Ya,Ja,Qa,Za,ei,ti,ri,ni,ai,ii,oi,si,li,ui,ci,fi,di,pi;$a="spectrum-Icon_368b34";xa="spectrum-UIIcon_368b34";Ea="spectrum-Icon--sizeXXS_368b34";Pa="spectrum-Icon--sizeXS_368b34";wa="spectrum-Icon--sizeS_368b34";Ta="spectrum-Icon--sizeM_368b34";Sa="spectrum-Icon--sizeL_368b34";Aa="spectrum-Icon--sizeXL_368b34";Ca="spectrum-Icon--sizeXXL_368b34";_a="spectrum--medium_368b34";ka="spectrum-UIIcon--large_368b34";Oa="spectrum-UIIcon--medium_368b34";Ia="spectrum--large_368b34";Ra="spectrum-UIIcon-AlertMedium_368b34";Ma="spectrum-UIIcon-AlertSmall_368b34";La="spectrum-UIIcon-ArrowDownSmall_368b34";Na="spectrum-UIIcon-ArrowLeftMedium_368b34";Da="spectrum-UIIcon-Asterisk_368b34";Ba="spectrum-UIIcon-CheckmarkMedium_368b34";Ha="spectrum-UIIcon-CheckmarkSmall_368b34";Fa="spectrum-UIIcon-ChevronDownMedium_368b34";Ua="spectrum-UIIcon-ChevronDownSmall_368b34";Wa="spectrum-UIIcon-ChevronLeftLarge_368b34";Va="spectrum-UIIcon-ChevronLeftMedium_368b34";ja="spectrum-UIIcon-ChevronRightLarge_368b34";Ga="spectrum-UIIcon-ChevronRightMedium_368b34";za="spectrum-UIIcon-ChevronRightSmall_368b34";Xa="spectrum-UIIcon-ChevronUpSmall_368b34";Ka="spectrum-UIIcon-CornerTriangle_368b34";qa="spectrum-UIIcon-CrossLarge_368b34";Ya="spectrum-UIIcon-CrossMedium_368b34";Ja="spectrum-UIIcon-CrossSmall_368b34";Qa="spectrum-UIIcon-DashSmall_368b34";Za="spectrum-UIIcon-DoubleGripper_368b34";ei="spectrum-UIIcon-FolderBreadcrumb_368b34";ti="spectrum-UIIcon-HelpMedium_368b34";ri="spectrum-UIIcon-HelpSmall_368b34";ni="spectrum-UIIcon-InfoMedium_368b34";ai="spectrum-UIIcon-InfoSmall_368b34";ii="spectrum-UIIcon-ListGripper_368b34";oi="spectrum-UIIcon-Magnifier_368b34";si="spectrum-UIIcon-SkipLeft_368b34";li="spectrum-UIIcon-SkipRight_368b34";ui="spectrum-UIIcon-Star_368b34";ci="spectrum-UIIcon-StarOutline_368b34";fi="spectrum-UIIcon-SuccessMedium_368b34";di="spectrum-UIIcon-SuccessSmall_368b34";pi="spectrum-UIIcon-TripleGripper_368b34";function jv(e){return`var(--spectrum-semantic-${e}-color-icon)`}const Gv={...ir,color:["color",jv]};function Rc(e){e=Oe(e,"icon");let{children:t,size:r,"aria-label":n,"aria-hidden":a,...i}=e,{styleProps:s}=le(i,Gv),o=Ut(),l="M";o!==null&&(l=o.scale==="large"?"L":"M"),a||(a=void 0);let u=r||l;return k.default.cloneElement(t,{...be(i),...s,focusable:"false","aria-label":n,"aria-hidden":n?a||void 0:!0,role:"img",className:X(Ic(G),t.props.className,"spectrum-Icon",`spectrum-Icon--size${u}`,s.className)})}var zv={};j(zv,"UIIcon",()=>Mc);function Mc(e){e=Oe(e,"icon");let{children:t,"aria-label":r,"aria-hidden":n,...a}=e,{styleProps:i}=le(a),s=Ut(),o="M";return s!==null&&(o=s.scale==="large"?"L":"M"),n||(n=void 0),k.default.cloneElement(t,{...be(a),...i,scale:o,focusable:"false","aria-label":r,"aria-hidden":r?n||void 0:!0,role:"img",className:X(Ic(G),t.props.className,"spectrum-Icon",{[`spectrum-UIIcon-${t.type.displayName}`]:t.type.displayName},i.className)})}var Xv=Object.freeze(Object.defineProperty({__proto__:null,Icon:Rc,UIIcon:Mc},Symbol.toStringTag,{value:"Module"})),dr=Ec(Xv),Kv=Vt.exports,qv=Qv,Yv=Cs,Jv=dr,gl=Kv(k.default);function Qv(e){return gl.default.createElement(Jv.UIIcon,e,gl.default.createElement(Yv.AlertSmall,null))}var _s={};Object.defineProperty(_s,"__esModule",{value:!0});_s.InfoSmall=Lc;var kn=Zv(k.default);function Zv(e){return e&&e.__esModule?e:{default:e}}function hi(){return hi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hi.apply(this,arguments)}function eb(e,t){if(e==null)return{};var r=tb(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function tb(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Lc(e){var t=e.scale,r=t===void 0?"M":t,n=eb(e,["scale"]);return kn.default.createElement("svg",hi({},n,n),r==="L"&&kn.default.createElement("path",{d:"M9 1a8 8 0 1 0 8 8 8 8 0 0 0-8-8zm-.15 2.15a1.359 1.359 0 0 1 1.431 1.283q.004.064.001.129A1.332 1.332 0 0 1 8.85 5.994a1.353 1.353 0 0 1-1.432-1.433 1.359 1.359 0 0 1 1.304-1.412q.064-.002.128.001zM11 13.5a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5H8V9h-.5a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 .5.5V12h.5a.5.5 0 0 1 .5.5z"}),r==="M"&&kn.default.createElement("path",{d:"M7 .778A6.222 6.222 0 1 0 13.222 7 6.222 6.222 0 0 0 7 .778zM6.883 2.45a1.057 1.057 0 0 1 1.113.998q.003.05.001.1a1.036 1.036 0 0 1-1.114 1.114A1.052 1.052 0 0 1 5.77 3.547 1.057 1.057 0 0 1 6.784 2.45q.05-.002.1.001zm1.673 8.05a.389.389 0 0 1-.39.389H5.834a.389.389 0 0 1-.389-.389v-.778a.389.389 0 0 1 .39-.389h.388V7h-.389a.389.389 0 0 1-.389-.389v-.778a.389.389 0 0 1 .39-.389h1.555a.389.389 0 0 1 .389.39v3.5h.389a.389.389 0 0 1 .389.388z"}))}Lc.displayName="InfoSmall";var rb=Vt.exports,nb=ob,ab=_s,ib=dr,yl=rb(k.default);function ob(e){return yl.default.createElement(ib.UIIcon,e,yl.default.createElement(ab.InfoSmall,null))}var ks={};Object.defineProperty(ks,"__esModule",{value:!0});ks.SuccessSmall=Nc;var On=sb(k.default);function sb(e){return e&&e.__esModule?e:{default:e}}function mi(){return mi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mi.apply(this,arguments)}function lb(e,t){if(e==null)return{};var r=ub(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function ub(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Nc(e){var t=e.scale,r=t===void 0?"M":t,n=lb(e,["scale"]);return On.default.createElement("svg",mi({},n,n),r==="L"&&On.default.createElement("path",{d:"M9 1a8 8 0 1 0 8 8 8 8 0 0 0-8-8zm5.333 4.54l-6.324 8.13a.6.6 0 0 1-.437.23h-.037a.6.6 0 0 1-.425-.176l-3.893-3.9a.6.6 0 0 1 0-.849l.663-.663a.6.6 0 0 1 .848 0L7.4 10.991l5.256-6.754a.6.6 0 0 1 .843-.1l.728.566a.6.6 0 0 1 .106.837z"}),r==="M"&&On.default.createElement("path",{d:"M7 .778A6.222 6.222 0 1 0 13.222 7 6.222 6.222 0 0 0 7 .778zm4.148 3.53l-4.919 6.324a.467.467 0 0 1-.34.18h-.028a.467.467 0 0 1-.331-.138L2.502 7.641a.467.467 0 0 1 0-.66l.516-.516a.467.467 0 0 1 .66 0l2.078 2.084 4.088-5.254a.467.467 0 0 1 .655-.078l.566.44a.467.467 0 0 1 .083.652z"}))}Nc.displayName="SuccessSmall";var cb=Vt.exports,fb=hb,db=ks,pb=dr,$l=cb(k.default);function hb(e){return $l.default.createElement(pb.UIIcon,e,$l.default.createElement(db.SuccessSmall,null))}function et(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var an={};et(an,"FocusScope",()=>gb);et(an,"useFocusManager",()=>yb);et(an,"getFocusableTreeWalker",()=>Ie);et(an,"createFocusManager",()=>Ab);var mb={};et(mb,"focusSafely",()=>Os);function Os(e){if(hs()==="virtual"){let t=document.activeElement;as(()=>{document.activeElement===t&&document.contains(e)&&dt(e)})}else dt(e)}function vb(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;let{display:t,visibility:r}=e.style,n=t!=="none"&&r!=="hidden"&&r!=="collapse";if(n){const{getComputedStyle:a}=e.ownerDocument.defaultView;let{display:i,visibility:s}=a(e);n=i!=="none"&&s!=="hidden"&&s!=="collapse"}return n}function bb(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Dc(e,t){return e.nodeName!=="#comment"&&vb(e)&&bb(e,t)&&(!e.parentElement||Dc(e.parentElement,e))}const vi=k.default.createContext(null);let xe=null,Rt=new Map;function gb(e){let{children:t,contain:r,restoreFocus:n,autoFocus:a}=e,i=$.useRef(),s=$.useRef(),o=$.useRef([]),l=$.useContext(vi),u=l==null?void 0:l.scopeRef;ve(()=>{let g=i.current.nextSibling,v=[];for(;g&&g!==s.current;)v.push(g),g=g.nextSibling;o.current=v},[t,u]),ve(()=>(Rt.set(o,u),()=>{(o===xe||on(o,xe))&&(!u||Rt.has(u))&&(xe=u),Rt.delete(o)}),[o,u]),Pb(o,r),Sb(o,n,r),Tb(o,a);let f=$b(o);return k.default.createElement(vi.Provider,{value:{scopeRef:o,focusManager:f}},k.default.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),t,k.default.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:s}))}function yb(){var e;return(e=$.useContext(vi))===null||e===void 0?void 0:e.focusManager}function $b(e){return{focusNext(t={}){let r=e.current,{from:n,tabbable:a,wrap:i}=t,s=n||document.activeElement,o=r[0].previousElementSibling,l=Ie(kt(r),{tabbable:a},r);l.currentNode=He(s,r)?s:o;let u=l.nextNode();return!u&&i&&(l.currentNode=o,u=l.nextNode()),u&&we(u,!0),u},focusPrevious(t={}){let r=e.current,{from:n,tabbable:a,wrap:i}=t,s=n||document.activeElement,o=r[r.length-1].nextElementSibling,l=Ie(kt(r),{tabbable:a},r);l.currentNode=He(s,r)?s:o;let u=l.previousNode();return!u&&i&&(l.currentNode=o,u=l.previousNode()),u&&we(u,!0),u},focusFirst(t={}){let r=e.current,{tabbable:n}=t,a=Ie(kt(r),{tabbable:n},r);a.currentNode=r[0].previousElementSibling;let i=a.nextNode();return i&&we(i,!0),i},focusLast(t={}){let r=e.current,{tabbable:n}=t,a=Ie(kt(r),{tabbable:n},r);a.currentNode=r[r.length-1].nextElementSibling;let i=a.previousNode();return i&&we(i,!0),i}}}const Is=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],xb=Is.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Is.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Eb=Is.join(':not([hidden]):not([tabindex="-1"]),');function kt(e){return e[0].parentElement}function Pb(e,t){let r=$.useRef(),n=$.useRef(null);ve(()=>{let a=e.current;if(!t)return;let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||e!==xe)return;let u=document.activeElement,f=e.current;if(!He(u,f))return;let g=Ie(kt(f),{tabbable:!0},f);g.currentNode=u;let v=l.shiftKey?g.previousNode():g.nextNode();v||(g.currentNode=l.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,v=l.shiftKey?g.previousNode():g.nextNode()),l.preventDefault(),v&&we(v,!0)},s=l=>{!xe||on(xe,e)?(xe=e,r.current=l.target):e===xe&&!xl(l.target,e)?r.current?r.current.focus():xe&&Bc(xe.current):e===xe&&(r.current=l.target)},o=l=>{n.current=requestAnimationFrame(()=>{e===xe&&!xl(document.activeElement,e)&&(xe=e,r.current=l.target,r.current.focus())})};return document.addEventListener("keydown",i,!1),document.addEventListener("focusin",s,!1),a.forEach(l=>l.addEventListener("focusin",s,!1)),a.forEach(l=>l.addEventListener("focusout",o,!1)),()=>{document.removeEventListener("keydown",i,!1),document.removeEventListener("focusin",s,!1),a.forEach(l=>l.removeEventListener("focusin",s,!1)),a.forEach(l=>l.removeEventListener("focusout",o,!1))}},[e,t]),$.useEffect(()=>()=>cancelAnimationFrame(n.current),[n])}function wb(e){for(let t of Rt.keys())if(He(e,t.current))return!0;return!1}function He(e,t){return t.some(r=>r.contains(e))}function xl(e,t){for(let r of Rt.keys())if((r===t||on(t,r))&&He(e,r.current))return!0;return!1}function on(e,t){let r=Rt.get(t);return r?r===e?!0:on(e,r):!1}function we(e,t=!1){if(e!=null&&!t)try{Os(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function Bc(e){let t=e[0].previousElementSibling,r=Ie(kt(e),{tabbable:!0},e);r.currentNode=t,we(r.nextNode())}function Tb(e,t){const r=k.default.useRef(t);$.useEffect(()=>{r.current&&(xe=e,He(document.activeElement,xe.current)||Bc(e.current)),r.current=!1},[])}function Sb(e,t,r){const n=$.useRef(typeof document!="undefined"?document.activeElement:null);ve(()=>{let a=n.current;if(!t)return;let i=s=>{if(s.key!=="Tab"||s.altKey||s.ctrlKey||s.metaKey)return;let o=document.activeElement;if(!He(o,e.current))return;let l=Ie(document.body,{tabbable:!0});l.currentNode=o;let u=s.shiftKey?l.previousNode():l.nextNode();if((!document.body.contains(a)||a===document.body)&&(a=null),(!u||!He(u,e.current))&&a){l.currentNode=a;do u=s.shiftKey?l.previousNode():l.nextNode();while(He(u,e.current));s.preventDefault(),s.stopPropagation(),u?we(u,!0):wb(a)?we(a,!0):o.blur()}};return r||document.addEventListener("keydown",i,!0),()=>{r||document.removeEventListener("keydown",i,!0),t&&a&&He(document.activeElement,e.current)&&requestAnimationFrame(()=>{document.body.contains(a)&&we(a)})}},[e,t,r])}function Ie(e,t,r){let n=t!=null&&t.tabbable?Eb:xb,a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){var s;return!(t==null||(s=t.from)===null||s===void 0)&&s.contains(i)?NodeFilter.FILTER_REJECT:i.matches(n)&&Dc(i)&&(!r||He(i,r))&&(!(t!=null&&t.accept)||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(a.currentNode=t.from),a}function Ab(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return;let{from:a,tabbable:i=t.tabbable,wrap:s=t.wrap,accept:o=t.accept}=r,l=a||document.activeElement,u=Ie(n,{tabbable:i,accept:o});n.contains(l)&&(u.currentNode=l);let f=u.nextNode();return!f&&s&&(u.currentNode=n,f=u.nextNode()),f&&we(f,!0),f},focusPrevious(r=t){let n=e.current;if(!n)return;let{from:a,tabbable:i=t.tabbable,wrap:s=t.wrap,accept:o=t.accept}=r,l=a||document.activeElement,u=Ie(n,{tabbable:i,accept:o});if(n.contains(l))u.currentNode=l;else{let g=In(u);return g&&we(g,!0),g}let f=u.previousNode();return!f&&s&&(u.currentNode=n,f=In(u)),f&&we(f,!0),f},focusFirst(r=t){let n=e.current;if(!n)return;let{tabbable:a=t.tabbable,accept:i=t.accept}=r,o=Ie(n,{tabbable:a,accept:i}).nextNode();return o&&we(o,!0),o},focusLast(r=t){let n=e.current;if(!n)return;let{tabbable:a=t.tabbable,accept:i=t.accept}=r,s=Ie(n,{tabbable:a,accept:i}),o=In(s);return o&&we(o,!0),o}}}function In(e){let t,r;do r=e.lastChild(),r&&(t=r);while(r);return t}var Cb={};et(Cb,"FocusRing",()=>gt);var _b={};et(_b,"useFocusRing",()=>Hc);function Hc(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,a=$.useRef({isFocused:!1,isFocusVisible:t||ur()}),[i,s]=$.useState(!1),[o,l]=$.useState(()=>a.current.isFocused&&a.current.isFocusVisible),u=$.useCallback(()=>l(a.current.isFocused&&a.current.isFocusVisible),[]),f=$.useCallback(b=>{a.current.isFocused=b,s(b),u()},[u]);ms(b=>{a.current.isFocusVisible=b,u()},[],{isTextInput:r});let{focusProps:g}=Kr({isDisabled:n,onFocusChange:f}),{focusWithinProps:v}=vs({isDisabled:!n,onFocusWithinChange:f});return{isFocused:i,isFocusVisible:a.current.isFocused&&o,focusProps:n?v:g}}function gt(e){let{children:t,focusClass:r,focusRingClass:n}=e,{isFocused:a,isFocusVisible:i,focusProps:s}=Hc(e),o=k.default.Children.only(t);return k.default.cloneElement(o,ie(o.props,{...s,className:Dr({[r||""]:a,[n||""]:i})}))}var Fc={};et(Fc,"FocusableProvider",()=>Wc);et(Fc,"useFocusable",()=>Rs);let Uc=k.default.createContext(null);function kb(e){let t=$.useContext(Uc)||{};Vr(t,e);let{ref:r,...n}=t;return n}function Ob(e,t){let{children:r,...n}=e,a={...n,ref:t};return k.default.createElement(Uc.Provider,{value:a},r)}let Wc=k.default.forwardRef(Ob);function Rs(e,t){let{focusProps:r}=Kr(e),{keyboardProps:n}=Au(e),a=ie(r,n),i=kb(t),s=e.isDisabled?{}:i,o=$.useRef(e.autoFocus);return $.useEffect(()=>{o.current&&t.current&&Os(t.current),o.current=!1},[t]),{focusableProps:ie({...a,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function Vc(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var Ib={};Vc(Ib,"useTooltip",()=>jc);function jc(e,t){let r=be(e,{labelable:!0}),{hoverProps:n}=Ze({onHoverStart:()=>t==null?void 0:t.open(!0),onHoverEnd:()=>t==null?void 0:t.close()});return{tooltipProps:ie(r,n,{role:"tooltip"})}}var Rb={};Vc(Rb,"useTooltipTrigger",()=>Gc);function Gc(e,t,r){let{isDisabled:n,trigger:a}=e,i=nr(),s=$.useRef(!1),o=$.useRef(!1),l=()=>{(s.current||o.current)&&t.open(o.current)},u=S=>{!s.current&&!o.current&&t.close(S)};$.useEffect(()=>{let S=O=>{r&&r.current&&O.key==="Escape"&&t.close(!0)};if(t.isOpen)return document.addEventListener("keydown",S,!0),()=>{document.removeEventListener("keydown",S,!0)}},[r,t]);let f=()=>{a!=="focus"&&(hs()==="pointer"?s.current=!0:s.current=!1,l())},g=()=>{a!=="focus"&&(o.current=!1,s.current=!1,u())},v=()=>{o.current=!1,s.current=!1,u(!0)},b=()=>{ur()&&(o.current=!0,l())},w=()=>{o.current=!1,s.current=!1,u(!0)},{hoverProps:T}=Ze({isDisabled:n,onHoverStart:f,onHoverEnd:g}),{pressProps:_}=lr({onPressStart:v}),{focusableProps:A}=Rs({isDisabled:n,onFocus:b,onBlur:w},r);return{triggerProps:{"aria-describedby":t.isOpen?i:void 0,...ie(A,T,_)},tooltipProps:{id:i}}}var zc={exports:{}},Mb="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lb=Mb,Nb=Lb;function Xc(){}function Kc(){}Kc.resetWarningCache=Xc;var Db=function(){function e(n,a,i,s,o,l){if(l!==Nb){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Kc,resetWarningCache:Xc};return r.PropTypes=r,r};zc.exports=Db();function qc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Yc(e){function t(r){var n=this.constructor.getDerivedStateFromProps(e,r);return n!=null?n:null}this.setState(t.bind(this))}function Jc(e,t){try{var r=this.props,n=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,n)}finally{this.props=r,this.state=n}}qc.__suppressDeprecationWarning=!0;Yc.__suppressDeprecationWarning=!0;Jc.__suppressDeprecationWarning=!0;function Bb(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof t.getSnapshotBeforeUpdate!="function")return e;var r=null,n=null,a=null;if(typeof t.componentWillMount=="function"?r="componentWillMount":typeof t.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof t.componentWillReceiveProps=="function"?n="componentWillReceiveProps":typeof t.UNSAFE_componentWillReceiveProps=="function"&&(n="UNSAFE_componentWillReceiveProps"),typeof t.componentWillUpdate=="function"?a="componentWillUpdate":typeof t.UNSAFE_componentWillUpdate=="function"&&(a="UNSAFE_componentWillUpdate"),r!==null||n!==null||a!==null){var i=e.displayName||e.name,s=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=qc,t.componentWillReceiveProps=Yc),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=Jc;var o=t.componentDidUpdate;t.componentDidUpdate=function(u,f,g){var v=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:g;o.call(this,u,f,v)}}return e}var Hb=Object.freeze(Object.defineProperty({__proto__:null,polyfill:Bb},Symbol.toStringTag,{value:"Module"})),Fb=Ec(Hb),Qc=void 0,Ub=jb(zc.exports),Rn=Zc(k.default),Wb=Zc(Nr.default),Vb=Fb;function Zc(e){return e&&e.__esModule?e:{default:e}}function jb(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}}return t.default=e,t}function Gb(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function zb(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Er="unmounted",Tt="exited",St="entering",Xt="entered",El="exiting",je=function(e){zb(t,e);function t(n,a){var i;i=e.call(this,n,a)||this;var s=a.transitionGroup,o=s&&!s.isMounting?n.enter:n.appear,l;return i.appearStatus=null,n.in?o?(l=Tt,i.appearStatus=St):l=Xt:n.unmountOnExit||n.mountOnEnter?l=Er:l=Tt,i.state={status:l},i.nextCallback=null,i}var r=t.prototype;return r.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(a,i){var s=a.in;return s&&i.status===Er?{status:Tt}:null},r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(a){var i=null;if(a!==this.props){var s=this.state.status;this.props.in?s!==St&&s!==Xt&&(i=St):(s===St||s===Xt)&&(i=El)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var a=this.props.timeout,i,s,o;return i=s=o=a,a!=null&&typeof a!="number"&&(i=a.exit,s=a.enter,o=a.appear!==void 0?a.appear:s),{exit:i,enter:s,appear:o}},r.updateStatus=function(a,i){if(a===void 0&&(a=!1),i!==null){this.cancelNextCallback();var s=Wb.default.findDOMNode(this);i===St?this.performEnter(s,a):this.performExit(s)}else this.props.unmountOnExit&&this.state.status===Tt&&this.setState({status:Er})},r.performEnter=function(a,i){var s=this,o=this.props.enter,l=this.context.transitionGroup?this.context.transitionGroup.isMounting:i,u=this.getTimeouts(),f=l?u.appear:u.enter;if(!i&&!o){this.safeSetState({status:Xt},function(){s.props.onEntered(a)});return}this.props.onEnter(a,l),this.safeSetState({status:St},function(){s.props.onEntering(a,l),s.onTransitionEnd(a,f,function(){s.safeSetState({status:Xt},function(){s.props.onEntered(a,l)})})})},r.performExit=function(a){var i=this,s=this.props.exit,o=this.getTimeouts();if(!s){this.safeSetState({status:Tt},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:El},function(){i.props.onExiting(a),i.onTransitionEnd(a,o.exit,function(){i.safeSetState({status:Tt},function(){i.props.onExited(a)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(a,i){i=this.setNextCallback(i),this.setState(a,i)},r.setNextCallback=function(a){var i=this,s=!0;return this.nextCallback=function(o){s&&(s=!1,i.nextCallback=null,a(o))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(a,i,s){this.setNextCallback(s);var o=i==null&&!this.props.addEndListener;if(!a||o){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(a,this.nextCallback),i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var a=this.state.status;if(a===Er)return null;var i=this.props,s=i.children,o=Gb(i,["children"]);if(delete o.in,delete o.mountOnEnter,delete o.unmountOnExit,delete o.appear,delete o.enter,delete o.exit,delete o.timeout,delete o.addEndListener,delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,typeof s=="function")return s(a,o);var l=Rn.default.Children.only(s);return Rn.default.cloneElement(l,o)},t}(Rn.default.Component);je.contextTypes={transitionGroup:Ub.object};je.childContextTypes={transitionGroup:function(){}};je.propTypes={};function At(){}je.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:At,onEntering:At,onEntered:At,onExit:At,onExiting:At,onExited:At};je.UNMOUNTED=0;je.EXITED=1;je.ENTERING=2;je.ENTERED=3;je.EXITING=4;var Xb=(0,Vb.polyfill)(je);Qc=Xb;function J(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function Re(e){return e&&e.__esModule?e.default:e}var Kb={};J(Kb,"Overlay",()=>pr);var qb={};J(qb,"OpenTransition",()=>ef);const Yb={entering:!1,entered:!0};function ef(e){return k.default.createElement(Qc,{timeout:{enter:0,exit:350},...e},t=>k.default.Children.map(e.children,r=>r&&k.default.cloneElement(r,{isOpen:!!Yb[t]})))}function Jb(e,t){let{children:r,isOpen:n,container:a,onEnter:i,onEntering:s,onEntered:o,onExit:l,onExiting:u,onExited:f}=e,[g,v]=$.useState(!n),b=$.useCallback(()=>{v(!1),o&&o()},[o]),w=$.useCallback(()=>{v(!0),f&&f()},[f]);if(!(n||!g))return null;let _=k.default.createElement(Es,{ref:t,UNSAFE_style:{background:"transparent",isolation:"isolate"}},k.default.createElement(ef,{in:n,appear:!0,onExit:l,onExiting:u,onExited:w,onEnter:i,onEntering:s,onEntered:b},r));return Nr.default.createPortal(_,a||document.body)}let pr=k.default.forwardRef(Jb);var Qb={};J(Qb,"Popover",()=>a0);var _e={};J(_e,"spectrum-Popover",()=>bi,e=>bi=e);J(_e,"react-spectrum-Popover",()=>gi,e=>gi=e);J(_e,"spectrum-Dialog-content",()=>yi,e=>yi=e);J(_e,"spectrum-Modal-wrapper",()=>$i,e=>$i=e);J(_e,"react-spectrum-Modal-wrapper",()=>xi,e=>xi=e);J(_e,"spectrum-Modal",()=>Ei,e=>Ei=e);J(_e,"react-spectrum-Modal",()=>Pi,e=>Pi=e);J(_e,"spectrum-Tray",()=>wi,e=>wi=e);J(_e,"react-spectrum-Tray",()=>Ti,e=>Ti=e);var bi,gi,yi,$i,xi,Ei,Pi,wi,Ti;bi="spectrum-Popover_38efea";gi="react-spectrum-Popover_38efea";yi="spectrum-Dialog-content_38efea";$i="spectrum-Modal-wrapper_38efea";xi="react-spectrum-Modal-wrapper_38efea";Ei="spectrum-Modal_38efea";Pi="react-spectrum-Modal_38efea";wi="spectrum-Tray_38efea";Ti="react-spectrum-Tray_38efea";var ke={};J(ke,"spectrum-Popover",()=>Si,e=>Si=e);J(ke,"is-open",()=>Ai,e=>Ai=e);J(ke,"spectrum-Popover--bottom",()=>Ci,e=>Ci=e);J(ke,"spectrum-Popover--top",()=>_i,e=>_i=e);J(ke,"spectrum-Popover--right",()=>ki,e=>ki=e);J(ke,"spectrum-Popover--left",()=>Oi,e=>Oi=e);J(ke,"spectrum-Popover-tip",()=>Ii,e=>Ii=e);J(ke,"spectrum-Popover-tip-triangle",()=>Ri,e=>Ri=e);J(ke,"spectrum-Popover--dialog",()=>Mi,e=>Mi=e);J(ke,"spectrum-Popover--withTip",()=>Li,e=>Li=e);var Si,Ai,Ci,_i,ki,Oi,Ii,Ri,Mi,Li;Si="spectrum-Popover_6115b8";Ai="is-open_6115b8";Ci="spectrum-Popover--bottom_6115b8";_i="spectrum-Popover--top_6115b8";ki="spectrum-Popover--right_6115b8";Oi="spectrum-Popover--left_6115b8";Ii="spectrum-Popover-tip_6115b8";Ri="spectrum-Popover-tip-triangle_6115b8";Mi="spectrum-Popover--dialog_6115b8";Li="spectrum-Popover--withTip_6115b8";let Zb={left:"right",right:"right",top:"bottom",bottom:"bottom"};function e0(e,t){let{children:r,placement:n,arrowProps:a,onClose:i,shouldCloseOnBlur:s,hideArrow:o,isKeyboardDismissDisabled:l,isNonModal:u,isDismissable:f=!0,...g}=e,v=Se(t),{styleProps:b}=le(e);return k.default.createElement(pr,g,k.default.createElement(t0,{...b,ref:v,placement:n,arrowProps:a,onClose:i,shouldCloseOnBlur:s,isKeyboardDismissDisabled:l,hideArrow:o,isNonModal:u,isDismissable:f},r))}const t0=$.forwardRef((e,t)=>{let{children:r,placement:n="bottom",arrowProps:a,isOpen:i,hideArrow:s,shouldCloseOnBlur:o,isKeyboardDismissDisabled:l,isNonModal:u,isDismissable:f,...g}=e,{overlayProps:v}=Yr({...e,isDismissable:f&&i},t),{modalProps:b}=Jr({isDisabled:u});return k.default.createElement("div",{...ie(g,v,b),ref:t,className:X(Re(ke),"spectrum-Popover",`spectrum-Popover--${n}`,{"spectrum-Popover--withTip":!s,"is-open":i},X(Re(_e),"spectrum-Popover","react-spectrum-Popover"),g.className),role:"presentation","data-testid":"popover"},r,s?null:k.default.createElement(n0,{arrowProps:a,direction:Zb[n]}))});let r0=Math.sqrt(2);function n0(e){let[t,r]=$.useState(20),[n,a]=$.useState(1),i=$.useRef();ve(()=>{if(i.current){let O=window.getComputedStyle(i.current).getPropertyValue("--spectrum-popover-tip-size");O!==""&&r(parseInt(O,10)/2);let y=window.getComputedStyle(i.current).getPropertyValue("--spectrum-popover-tip-borderWidth");y!==""&&a(parseInt(y,10))}},[i]);let s=e.direction==="top"||e.direction==="bottom",o=e.direction==="left"||e.direction==="top",l=n*r0,u=l/2,f=2*t+2*l,g=t+l,v=o?g:0,b=o?u:g-u,w=u,T=f/2,_=f-u,A=s?["M",w,v,"L",T,b,"L",_,v]:["M",v,w,"L",b,T,"L",v,_],S=e.arrowProps;return k.default.createElement("svg",{xmlns:"http://www.w3.org/svg/2000",width:Math.ceil(s?f:g),height:Math.ceil(s?g:f),style:e.style,className:X(Re(ke),"spectrum-Popover-tip"),ref:i,...S},k.default.createElement("path",{className:X(Re(ke),"spectrum-Popover-tip-triangle"),d:A.join(" ")}))}let a0=$.forwardRef(e0);var i0={};J(i0,"Modal",()=>u0);var at={};J(at,"spectrum-Modal",()=>Ni,e=>Ni=e);J(at,"is-open",()=>Di,e=>Di=e);J(at,"spectrum-Modal-wrapper",()=>Bi,e=>Bi=e);J(at,"spectrum-Modal--responsive",()=>Hi,e=>Hi=e);J(at,"spectrum-Modal--fullscreen",()=>Fi,e=>Fi=e);J(at,"spectrum-Modal--fullscreenTakeover",()=>Ui,e=>Ui=e);var Ni,Di,Bi,Hi,Fi,Ui;Ni="spectrum-Modal_f81956";Di="is-open_f81956";Bi="spectrum-Modal-wrapper_f81956";Hi="spectrum-Modal--responsive_f81956";Fi="spectrum-Modal--fullscreen_f81956";Ui="spectrum-Modal--fullscreenTakeover_f81956";var Ms={};J(Ms,"spectrum-Underlay",()=>Wi,e=>Wi=e);J(Ms,"is-open",()=>Vi,e=>Vi=e);var Wi,Vi;Wi="spectrum-Underlay_eb7615";Vi="is-open_eb7615";function tf({isOpen:e}){return k.default.createElement("div",{className:X(Re(Ms),"spectrum-Underlay",{"is-open":e})})}function o0(e,t){let{children:r,onClose:n,type:a,...i}=e,s=Se(t),{styleProps:o}=le(e),{overlayProps:l,underlayProps:u}=Yr(e,s);return k.default.createElement(pr,i,k.default.createElement(tf,u),k.default.createElement(l0,{...o,onClose:n,type:a,ref:s,overlayProps:l},r))}let s0={fullscreen:"fullscreen",fullscreenTakeover:"fullscreenTakeover"},l0=$.forwardRef(function(e,t){let{children:r,isOpen:n,type:a,overlayProps:i,...s}=e,o=s0[a];bs();let{modalProps:l}=Jr(),u=X(Re(at),"spectrum-Modal-wrapper",X(Re(_e),"spectrum-Modal-wrapper","react-spectrum-Modal-wrapper")),f=X(Re(at),"spectrum-Modal",{"is-open":n},X(Re(_e),"spectrum-Modal","react-spectrum-Modal"),{[`spectrum-Modal--${o}`]:o},s.className),v={"--spectrum-visual-viewport-height":os().height+"px"};return k.default.createElement("div",{className:u,style:v},k.default.createElement("div",{...ie(s,i,l),ref:t,className:f,"data-testid":"modal"},r))}),u0=$.forwardRef(o0);var c0={};J(c0,"Tray",()=>p0);var Dt={};J(Dt,"spectrum-Tray",()=>ji,e=>ji=e);J(Dt,"is-open",()=>Gi,e=>Gi=e);J(Dt,"spectrum-Tray-wrapper",()=>zi,e=>zi=e);J(Dt,"spectrum-Tray--fixedHeight",()=>Xi,e=>Xi=e);var ji,Gi,zi,Xi;ji="spectrum-Tray_23bf66";Gi="is-open_23bf66";zi="spectrum-Tray-wrapper_23bf66";Xi="spectrum-Tray--fixedHeight_23bf66";function f0(e,t){let{children:r,onClose:n,isFixedHeight:a,isNonModal:i,...s}=e,o=Se(t),{styleProps:l}=le(e),{overlayProps:u,underlayProps:f}=Yr({...e,isDismissable:!0},o);return k.default.createElement(pr,s,k.default.createElement(tf,f),k.default.createElement(d0,{...l,onClose:n,ref:o,overlayProps:u,isFixedHeight:a,isNonModal:i},r))}let d0=$.forwardRef(function(e,t){let{children:r,isOpen:n,isFixedHeight:a,isNonModal:i,overlayProps:s,...o}=e;bs();let{modalProps:l}=Jr({isDisabled:i}),f={"--spectrum-visual-viewport-height":os().height+"px"},g=X(Re(Dt),"spectrum-Tray-wrapper"),v=X(Re(Dt),"spectrum-Tray",{"is-open":n,"spectrum-Tray--fixedHeight":a},X(Re(_e),"spectrum-Tray","react-spectrum-Tray"),o.className),b=ie(o,s);return k.default.createElement("div",{className:g,style:f},k.default.createElement("div",{...b,...l,className:v,ref:t,"data-testid":"tray"},r))}),p0=$.forwardRef(f0);function h0(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var m0={};h0(m0,"useOverlayTriggerState",()=>rf);function rf(e){let[t,r]=ts(e.isOpen,e.defaultOpen||!1,e.onOpenChange);return{isOpen:t,setOpen:r,open(){r(!0)},close(){r(!1)},toggle(){r(!t)}}}function v0(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var b0={};v0(b0,"useTooltipTriggerState",()=>nf);const g0=1500,Pl=500;let ut={},y0=0,Kt=!1,Ye=null,ct=null;function nf(e={}){let{delay:t=g0}=e,{isOpen:r,open:n,close:a}=rf(e),i=$.useMemo(()=>`${++y0}`,[]),s=$.useRef(),o=()=>{ut[i]=f},l=()=>{for(let v in ut)v!==i&&(ut[v](!0),delete ut[v])},u=()=>{clearTimeout(s.current),s.current=null,l(),o(),Kt=!0,n(),Ye&&(clearTimeout(Ye),Ye=null),ct&&(clearTimeout(ct),ct=null)},f=v=>{v?(clearTimeout(s.current),s.current=null,a()):s.current||(s.current=setTimeout(()=>{s.current=null,a()},Pl)),Ye&&(clearTimeout(Ye),Ye=null),Kt&&(ct&&clearTimeout(ct),ct=setTimeout(()=>{delete ut[i],ct=null,Kt=!1},Pl))},g=()=>{l(),o(),!r&&!Ye&&!Kt?Ye=setTimeout(()=>{Ye=null,Kt=!0,u()},t):r||u()};return $.useEffect(()=>()=>{clearTimeout(s.current),ut[i]&&delete ut[i]},[i]),{isOpen:r,open:v=>{!v&&t>0&&!s.current?g():u()},close:f}}function Pr(e){return e&&e.__esModule?e.default:e}function he(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var $0={};he($0,"Tooltip",()=>of);var fe={};he(fe,"spectrum-Tooltip",()=>Ki,e=>Ki=e);he(fe,"is-open",()=>qi,e=>qi=e);he(fe,"spectrum-Tooltip--bottom",()=>Yi,e=>Yi=e);he(fe,"spectrum-Tooltip--top",()=>Ji,e=>Ji=e);he(fe,"spectrum-Tooltip--right",()=>Qi,e=>Qi=e);he(fe,"spectrum-Tooltip--left",()=>Zi,e=>Zi=e);he(fe,"spectrum-Tooltip-tip",()=>eo,e=>eo=e);he(fe,"spectrum-Tooltip-typeIcon",()=>to,e=>to=e);he(fe,"spectrum-Tooltip-label",()=>ro,e=>ro=e);he(fe,"u-tooltip-showOnHover",()=>no,e=>no=e);he(fe,"is-hovered",()=>ao,e=>ao=e);he(fe,"is-focused",()=>io,e=>io=e);he(fe,"spectrum-Tooltip--negative",()=>oo,e=>oo=e);he(fe,"spectrum-Tooltip--error",()=>so,e=>so=e);he(fe,"spectrum-Tooltip--info",()=>lo,e=>lo=e);he(fe,"spectrum-Tooltip--help",()=>uo,e=>uo=e);he(fe,"spectrum-Tooltip--positive",()=>co,e=>co=e);he(fe,"spectrum-Tooltip--success",()=>fo,e=>fo=e);var Ki,qi,Yi,Ji,Qi,Zi,eo,to,ro,no,ao,io,oo,so,lo,uo,co,fo;Ki="spectrum-Tooltip_22ae94";qi="is-open_22ae94";Yi="spectrum-Tooltip--bottom_22ae94";Ji="spectrum-Tooltip--top_22ae94";Qi="spectrum-Tooltip--right_22ae94";Zi="spectrum-Tooltip--left_22ae94";eo="spectrum-Tooltip-tip_22ae94";to="spectrum-Tooltip-typeIcon_22ae94";ro="spectrum-Tooltip-label_22ae94";no="u-tooltip-showOnHover_22ae94";ao="is-hovered_22ae94";io="is-focused_22ae94";oo="spectrum-Tooltip--negative_22ae94";so="spectrum-Tooltip--error_22ae94";lo="spectrum-Tooltip--info_22ae94";uo="spectrum-Tooltip--help_22ae94";co="spectrum-Tooltip--positive_22ae94";fo="spectrum-Tooltip--success_22ae94";const af=k.default.createContext({});let x0={info:nb,positive:fb,negative:qv};function E0(e,t){let{ref:r,arrowProps:n,state:a,...i}=$.useContext(af),s=$.useRef();r=r||s,e=ie(e,i);let{variant:o="neutral",placement:l="top",isOpen:u,showIcon:f,...g}=e,{styleProps:v}=le(g),{tooltipProps:b}=jc(e,a);$.useImperativeHandle(t,()=>Gr(r));let w=x0[o];return k.default.createElement("div",{...v,...b,className:X(Pr(fe),"spectrum-Tooltip",`spectrum-Tooltip--${o}`,`spectrum-Tooltip--${l}`,{"is-open":u},v.className),ref:r},f&&o!=="neutral"&&k.default.createElement(w,{UNSAFE_className:X(Pr(fe),"spectrum-Tooltip-typeIcon"),"aria-hidden":!0}),e.children&&k.default.createElement("span",{className:X(Pr(fe),"spectrum-Tooltip-label")},e.children),k.default.createElement("span",{...n,className:X(Pr(fe),"spectrum-Tooltip-tip")}))}let of=k.default.forwardRef(E0);var P0={};he(P0,"TooltipTrigger",()=>sf);const w0=-1,T0=0;function po(e){let{children:t,crossOffset:r=T0,isDisabled:n,offset:a=w0,trigger:i}=e,[s,o]=k.default.Children.toArray(t),l=nf(e),u=$.useRef(),f=$.useRef(),{triggerProps:g,tooltipProps:v}=Gc({isDisabled:n,trigger:i},l,u),{overlayProps:b,arrowProps:w,placement:T}=Ru({placement:e.placement||"top",targetRef:u,overlayRef:f,offset:a,crossOffset:r,isOpen:l.isOpen});return k.default.createElement(Wc,{...g,ref:u},s,k.default.createElement(af.Provider,{value:{state:l,placement:T,ref:f,UNSAFE_style:b.style,arrowProps:w,...v}},k.default.createElement(pr,{isOpen:l.isOpen},o)))}po.getCollectionNode=function*(e){let t=[];k.default.Children.forEach(e.children,a=>{k.default.isValidElement(a)&&t.push(a)});let[r,n]=t;yield{element:r,wrapper:a=>k.default.createElement(po,{key:a.key,...e},a,n)}};let sf=po;const S0=me.default.div`
|
|
354
|
-
|
|
355
|
-
height: 20px;
|
|
356
|
-
display: flex;
|
|
357
|
-
align-items: center;
|
|
358
|
-
justify-content: center;
|
|
359
|
-
`,lf=$.forwardRef((e,t)=>{const{curAudioState:r,customIcons:n}=K(oe),a=K(Ee),i=$.useCallback(()=>a({type:"SET_MUTED",muted:!r.muted}),[a,r.muted]),s=$.useMemo(()=>{const o={size:"100%"};if(r.muted)return N(Ce,{render:N(vl,{...o}),customIcon:n==null?void 0:n.volumeMuted});switch((u=>{if(u===0)return"mute";if(u<=.5)return"low";if(u>.5)return"high"})(r.volume)){case"mute":return N(Ce,{render:N(vl,{...o}),customIcon:n==null?void 0:n.volumeMuted});case"low":return N(Ce,{render:N(rv,{...o}),customIcon:n==null?void 0:n.volumeHalf});case"high":return N(Ce,{render:N(nv,{...o}),customIcon:n==null?void 0:n.volumeFull});default:return null}},[r.muted,r.volume,n==null?void 0:n.volumeMuted,n==null?void 0:n.volumeFull,n==null?void 0:n.volumeHalf]);return N(S0,{onClick:i,className:"volume-trigger-container",ref:t,children:s})});lf.displayName="Trigger";function Ls(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var A0={};Ls(A0,"Text",()=>sn);function C0(e,t){e=Oe(e,"text");let{children:r,...n}=e,{styleProps:a}=le(n),i=Se(t);return k.default.createElement("span",{...be(n),...a,ref:i},r)}const sn=$.forwardRef(C0);var _0={};Ls(_0,"Heading",()=>O0);function k0(e,t){e=Oe(e,"heading");let{children:r,level:n=3,...a}=e,{styleProps:i}=le(a),s=Se(t),o=`h${n}`;return k.default.createElement(o,{...be(a),...i,ref:s},r)}const O0=$.forwardRef(k0);var I0={};Ls(I0,"Keyboard",()=>M0);function R0(e,t){e=Oe(e,"keyboard");let{children:r,...n}=e,{styleProps:a}=le(n),i=Se(t);return k.default.createElement("kbd",{...be(n),...a,dir:"ltr",ref:i},r)}const M0=$.forwardRef(R0);function uf(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var L0={};uf(L0,"useButton",()=>yt);function yt(e,t){let{elementType:r="button",isDisabled:n,onPress:a,onPressStart:i,onPressEnd:s,onPressChange:o,preventFocusOnPress:l,allowFocusWhenDisabled:u,onClick:f,href:g,target:v,rel:b,type:w="button"}=e,T;r==="button"?T={type:w,disabled:n}:T={role:"button",tabIndex:n?void 0:0,href:r==="a"&&n?void 0:g,target:r==="a"?v:void 0,type:r==="input"?w:void 0,disabled:r==="input"?n:void 0,"aria-disabled":!n||r==="input"?void 0:n,rel:r==="a"?b:void 0};let{pressProps:_,isPressed:A}=lr({onPressStart:i,onPressEnd:s,onPressChange:o,onPress:a,isDisabled:n,preventFocusOnPress:l,ref:t}),{focusableProps:S}=Rs(e,t);u&&(S.tabIndex=n?-1:S.tabIndex);let O=ie(S,_,be(e,{labelable:!0}));return{isPressed:A,buttonProps:ie(T,O,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],onClick:y=>{f&&(f(y),console.warn("onClick is deprecated, please use onPress"))}})}}var N0={};uf(N0,"useToggleButton",()=>cf);function cf(e,t,r){const{isSelected:n}=t,{isPressed:a,buttonProps:i}=yt({...e,onPress:Nt(t.toggle,e.onPress)},r);return{isPressed:a,buttonProps:ie(i,{"aria-pressed":n})}}var Ns={};Object.defineProperty(Ns,"__esModule",{value:!0});Ns.CornerTriangle=ff;var Mn=D0(k.default);function D0(e){return e&&e.__esModule?e:{default:e}}function ho(){return ho=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ho.apply(this,arguments)}function B0(e,t){if(e==null)return{};var r=H0(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function H0(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function ff(e){var t=e.scale,r=t===void 0?"M":t,n=B0(e,["scale"]);return Mn.default.createElement("svg",ho({},n,n),r==="L"&&Mn.default.createElement("path",{d:"M5.74.01a.25.25 0 0 0-.177.073l-5.48 5.48a.25.25 0 0 0 .177.427h5.48a.25.25 0 0 0 .25-.25V.26a.25.25 0 0 0-.25-.25z"}),r==="M"&&Mn.default.createElement("path",{d:"M4.74.01a.25.25 0 0 0-.177.073l-4.48 4.48a.25.25 0 0 0 .177.427h4.48a.25.25 0 0 0 .25-.25V.26a.25.25 0 0 0-.25-.25z"}))}ff.displayName="CornerTriangle";var F0=Vt.exports,U0=j0,W0=Ns,V0=dr,wl=F0(k.default);function j0(e){return wl.default.createElement(V0.UIIcon,e,wl.default.createElement(W0.CornerTriangle,null))}var Ds={};Object.defineProperty(Ds,"__esModule",{value:!0});Ds.CrossSmall=df;var Ln=G0(k.default);function G0(e){return e&&e.__esModule?e:{default:e}}function mo(){return mo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mo.apply(this,arguments)}function z0(e,t){if(e==null)return{};var r=X0(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function X0(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function df(e){var t=e.scale,r=t===void 0?"M":t,n=z0(e,["scale"]);return Ln.default.createElement("svg",mo({},n,n),r==="L"&&Ln.default.createElement("path",{d:"M9.317 8.433L5.884 5l3.433-3.433a.625.625 0 1 0-.884-.884L5 4.116 1.567.683a.625.625 0 1 0-.884.884C.83 1.713 2.77 3.657 4.116 5L.683 8.433a.625.625 0 1 0 .884.884L5 5.884l3.433 3.433a.625.625 0 0 0 .884-.884z"}),r==="M"&&Ln.default.createElement("path",{d:"M7.317 6.433L4.884 4l2.433-2.433a.625.625 0 1 0-.884-.884L4 3.116 1.567.683a.625.625 0 1 0-.884.884L3.116 4 .683 6.433a.625.625 0 1 0 .884.884L4 4.884l2.433 2.433a.625.625 0 0 0 .884-.884z"}))}df.displayName="CrossSmall";var K0=Vt.exports,q0=Q0,Y0=Ds,J0=dr,Tl=K0(k.default);function Q0(e){return Tl.default.createElement(J0.UIIcon,e,Tl.default.createElement(Y0.CrossSmall,null))}function Z0(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var eg={};Z0(eg,"useToggleState",()=>pf);function pf(e={}){let{isReadOnly:t}=e,[r,n]=ts(e.isSelected,e.defaultSelected||!1,e.onChange);function a(s){t||n(s)}function i(){t||n(!r)}return{isSelected:r,setSelected:a,toggle:i}}function ce(e){return e&&e.__esModule?e.default:e}function Y(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var tg={};Y(tg,"Button",()=>ng);var V={};Y(V,"spectrum-Button",()=>vo,e=>vo=e);Y(V,"spectrum-ActionButton",()=>bo,e=>bo=e);Y(V,"spectrum-LogicButton",()=>go,e=>go=e);Y(V,"spectrum-FieldButton",()=>yo,e=>yo=e);Y(V,"spectrum-ClearButton",()=>$o,e=>$o=e);Y(V,"focus-ring",()=>xo,e=>xo=e);Y(V,"spectrum-Icon",()=>Eo,e=>Eo=e);Y(V,"spectrum-ActionButton--emphasized",()=>Po,e=>Po=e);Y(V,"spectrum-ActionButton--staticColor",()=>wo,e=>wo=e);Y(V,"is-hovered",()=>To,e=>To=e);Y(V,"spectrum-Button-label",()=>So,e=>So=e);Y(V,"spectrum-ActionButton-label",()=>Ao,e=>Ao=e);Y(V,"spectrum-ActionButton-hold",()=>Co,e=>Co=e);Y(V,"spectrum-ActionButton--quiet",()=>_o,e=>_o=e);Y(V,"is-disabled",()=>ko,e=>ko=e);Y(V,"is-open",()=>Oo,e=>Oo=e);Y(V,"spectrum-FieldButton--quiet",()=>Io,e=>Io=e);Y(V,"spectrum-ClearButton--overBackground",()=>Ro,e=>Ro=e);Y(V,"spectrum-ClearButton--small",()=>Mo,e=>Mo=e);Y(V,"is-focused",()=>Lo,e=>Lo=e);Y(V,"is-active",()=>No,e=>No=e);Y(V,"spectrum-Button--cta",()=>Do,e=>Do=e);Y(V,"spectrum-Button--primary",()=>Bo,e=>Bo=e);Y(V,"spectrum-Button--secondary",()=>Ho,e=>Ho=e);Y(V,"spectrum-Button--warning",()=>Fo,e=>Fo=e);Y(V,"spectrum-Button--overBackground",()=>Uo,e=>Uo=e);Y(V,"spectrum-Button--quiet",()=>Wo,e=>Wo=e);Y(V,"is-selected",()=>Vo,e=>Vo=e);Y(V,"spectrum-ActionButton--staticWhite",()=>jo,e=>jo=e);Y(V,"spectrum-ActionButton--staticBlack",()=>Go,e=>Go=e);Y(V,"spectrum-LogicButton--and",()=>zo,e=>zo=e);Y(V,"spectrum-LogicButton--or",()=>Xo,e=>Xo=e);Y(V,"is-placeholder",()=>Ko,e=>Ko=e);Y(V,"spectrum-FieldButton--invalid",()=>qo,e=>qo=e);var vo,bo,go,yo,$o,xo,Eo,Po,wo,To,So,Ao,Co,_o,ko,Oo,Io,Ro,Mo,Lo,No,Do,Bo,Ho,Fo,Uo,Wo,Vo,jo,Go,zo,Xo,Ko,qo;vo="spectrum-Button_e2d99e";bo="spectrum-ActionButton_e2d99e";go="spectrum-LogicButton_e2d99e";yo="spectrum-FieldButton_e2d99e";$o="spectrum-ClearButton_e2d99e";xo="focus-ring_e2d99e";Eo="spectrum-Icon_e2d99e";Po="spectrum-ActionButton--emphasized_e2d99e";wo="spectrum-ActionButton--staticColor_e2d99e";To="is-hovered_e2d99e";So="spectrum-Button-label_e2d99e";Ao="spectrum-ActionButton-label_e2d99e";Co="spectrum-ActionButton-hold_e2d99e";_o="spectrum-ActionButton--quiet_e2d99e";ko="is-disabled_e2d99e";Oo="is-open_e2d99e";Io="spectrum-FieldButton--quiet_e2d99e";Ro="spectrum-ClearButton--overBackground_e2d99e";Mo="spectrum-ClearButton--small_e2d99e";Lo="is-focused_e2d99e";No="is-active_e2d99e";Do="spectrum-Button--cta_e2d99e";Bo="spectrum-Button--primary_e2d99e";Ho="spectrum-Button--secondary_e2d99e";Fo="spectrum-Button--warning_e2d99e";Uo="spectrum-Button--overBackground_e2d99e";Wo="spectrum-Button--quiet_e2d99e";Vo="is-selected_e2d99e";jo="spectrum-ActionButton--staticWhite_e2d99e";Go="spectrum-ActionButton--staticBlack_e2d99e";zo="spectrum-LogicButton--and_e2d99e";Xo="spectrum-LogicButton--or_e2d99e";Ko="is-placeholder_e2d99e";qo="spectrum-FieldButton--invalid_e2d99e";let Sl={negative:"warning"};function rg(e,t){e=fr(e),e=Oe(e,"button");let{elementType:r="button",children:n,variant:a,isQuiet:i,isDisabled:s,autoFocus:o,...l}=e,u=vt(t),{buttonProps:f,isPressed:g}=yt(e,u),{hoverProps:v,isHovered:b}=Ze({isDisabled:s}),{styleProps:w}=le(l),T=a;return Sl[a]&&(T=Sl[a]),k.default.createElement(gt,{focusRingClass:X(ce(V),"focus-ring"),autoFocus:o},k.default.createElement(r,{...w,...ie(f,v),ref:u,className:X(ce(V),"spectrum-Button",`spectrum-Button--${T}`,{"spectrum-Button--quiet":i,"is-disabled":s,"is-active":g,"is-hovered":b},w.className)},k.default.createElement(or,{slots:{icon:{size:"S",UNSAFE_className:X(ce(V),"spectrum-Icon")},text:{UNSAFE_className:X(ce(V),"spectrum-Button-label")}}},typeof n=="string"?k.default.createElement(sn,null,n):n)))}let ng=k.default.forwardRef(rg);var ag={};Y(ag,"ActionButton",()=>hf);function ig(e,t){e=fr(e),e=Oe(e,"actionButton");let{isQuiet:r,isDisabled:n,staticColor:a,children:i,autoFocus:s,holdAffordance:o,...l}=e,u=vt(t),{buttonProps:f,isPressed:g}=yt(e,u),{hoverProps:v,isHovered:b}=Ze({isDisabled:n}),{styleProps:w}=le(l),T=k.default.Children.toArray(e.children).every(_=>!k.default.isValidElement(_));return k.default.createElement(gt,{focusRingClass:X(ce(V),"focus-ring"),autoFocus:s},k.default.createElement("button",{...w,...ie(f,v),ref:u,className:X(ce(V),"spectrum-ActionButton",{"spectrum-ActionButton--quiet":r,"spectrum-ActionButton--staticColor":!!a,"spectrum-ActionButton--staticWhite":a==="white","spectrum-ActionButton--staticBlack":a==="black","is-active":g,"is-disabled":n,"is-hovered":b},w.className)},o&&k.default.createElement(U0,{UNSAFE_className:X(ce(V),"spectrum-ActionButton-hold")}),k.default.createElement(or,{slots:{icon:{size:"S",UNSAFE_className:X(ce(V),"spectrum-Icon")},text:{UNSAFE_className:X(ce(V),"spectrum-ActionButton-label")}}},typeof i=="string"||T?k.default.createElement(sn,null,i):i)))}let hf=k.default.forwardRef(ig);var og={};Y(og,"FieldButton",()=>lg);function sg(e,t){e=Oe(e,"button");let{isQuiet:r,isDisabled:n,validationState:a,children:i,autoFocus:s,isActive:o,focusRingClass:l,...u}=e,f=vt(t),{buttonProps:g,isPressed:v}=yt(e,f),{hoverProps:b,isHovered:w}=Ze({isDisabled:n}),{styleProps:T}=le(u);return k.default.createElement(gt,{focusRingClass:X(ce(V),"focus-ring",l),autoFocus:s},k.default.createElement("button",{...ie(g,b),ref:f,className:X(ce(V),"spectrum-FieldButton",{"spectrum-FieldButton--quiet":r,"is-active":o||v,"is-disabled":n,"spectrum-FieldButton--invalid":a==="invalid","is-hovered":w},T.className)},k.default.createElement(or,{slots:{icon:{size:"S",UNSAFE_className:X(ce(V),"spectrum-Icon")}}},i)))}let lg=k.default.forwardRef(sg);var ug={};Y(ug,"LogicButton",()=>fg);function cg(e,t){e=fr(e);let{variant:r,children:n,isDisabled:a,autoFocus:i,...s}=e,o=vt(t),{buttonProps:l,isPressed:u}=yt(e,o),{hoverProps:f,isHovered:g}=Ze({isDisabled:a}),{styleProps:v}=le(s);return k.default.createElement(gt,{focusRingClass:X(ce(V),"focus-ring"),autoFocus:i},k.default.createElement("button",{...v,...ie(l,f),ref:o,className:X(ce(V),"spectrum-LogicButton",{[`spectrum-LogicButton--${r}`]:r,"is-disabled":a,"is-active":u,"is-hovered":g},v.className)},k.default.createElement("span",{className:X(ce(V),"spectrum-Button-label")},n)))}let fg=k.default.forwardRef(cg);var dg={};Y(dg,"ClearButton",()=>hg);function pg(e,t){let{children:r=k.default.createElement(q0,{UNSAFE_className:ce(V)["spectrum-Icon"]}),focusClassName:n,variant:a,autoFocus:i,isDisabled:s,preventFocus:o,elementType:l=o?"div":"button",...u}=e,f=vt(t),{buttonProps:g,isPressed:v}=yt({...e,elementType:l},f),{hoverProps:b,isHovered:w}=Ze({isDisabled:s}),{styleProps:T}=le(u);o&&delete g.tabIndex;let _=l;return k.default.createElement(gt,{focusRingClass:X(ce(V),"focus-ring",n),autoFocus:i},k.default.createElement(_,{...T,...ie(g,b),ref:f,className:X(ce(V),"spectrum-ClearButton",{[`spectrum-ClearButton--${a}`]:a,"is-disabled":s,"is-active":v,"is-hovered":w},T.className)},r))}let hg=k.default.forwardRef(pg);var mg={};Y(mg,"ToggleButton",()=>bg);function vg(e,t){e=fr(e);let{isQuiet:r,isDisabled:n,isEmphasized:a,staticColor:i,children:s,autoFocus:o,...l}=e,u=vt(t),f=pf(e),{buttonProps:g,isPressed:v}=cf(e,f,u),{hoverProps:b,isHovered:w}=Ze({isDisabled:n}),{styleProps:T}=le(l),_=k.default.Children.toArray(e.children).every(A=>!k.default.isValidElement(A));return k.default.createElement(gt,{focusRingClass:X(ce(V),"focus-ring"),autoFocus:o},k.default.createElement("button",{...T,...ie(g,b),ref:u,className:X(ce(V),"spectrum-ActionButton",{"spectrum-ActionButton--quiet":r,"spectrum-ActionButton--emphasized":a,"spectrum-ActionButton--staticColor":!!i,"spectrum-ActionButton--staticWhite":i==="white","spectrum-ActionButton--staticBlack":i==="black","is-active":v,"is-disabled":n,"is-hovered":w,"is-selected":f.isSelected},T.className)},k.default.createElement(or,{slots:{icon:{size:"S",UNSAFE_className:X(ce(V),"spectrum-Icon")},text:{UNSAFE_className:X(ce(V),"spectrum-ActionButton-label")}}},typeof s=="string"||_?k.default.createElement(sn,null,s):s)))}let bg=k.default.forwardRef(vg);const gg=({placement:e})=>{const t=$.useRef(null),{curAudioState:r}=K(oe),n=K(Ee),a=$.useCallback(i=>{i.stopPropagation(),i.preventDefault(),r.muted&&n({type:"SET_MUTED",muted:!1});const{value:s}=i.target,o=parseFloat(s);n({type:"SET_VOLUME",volume:o})},[r.muted,n]);return N(yg,{contentPlacement:e,volumeValue:r.volume*100,ref:t,className:"volume-content-container",children:N("div",{className:"volume-panel-wrapper",children:N("input",{className:"volume-slider-input",type:"range",style:{cursor:"pointer"},defaultValue:r.volume,onChange:a,min:"0",max:"1",step:"0.01"})})})},yg=me.default.div`
|
|
360
|
-
${({contentPlacement:e,volumeValue:t})=>Me.css`
|
|
361
|
-
--rs-audio-player-volume-value: ${t}%;
|
|
362
|
-
width: 30px;
|
|
363
|
-
height: 118px;
|
|
364
|
-
|
|
365
|
-
${(e==null?void 0:e.includes("top"))&&Me.css`
|
|
335
|
+
`,gd=()=>{const{activeUI:e}=j(ee),t=P.useMemo(()=>e.progress==="waveform"?L(md,{}):L(dd,{}),[e.progress]);return L(vd,{className:"progress-container",children:t})},ge=_o,Lo=P.forwardRef(({children:e,visible:t=!0,...r},n)=>L(Wn,{justifySelf:"center",padding:t?"0 5px":void 0,ref:n,...r,children:t&&e}));Lo.displayName="GridItem";ge.Item=Lo;const bd=({placement:e})=>{const t=P.useRef(null),{curAudioState:r}=j(ee),n=j(ue),a=P.useCallback(i=>{i.stopPropagation(),i.preventDefault(),r.muted&&n({type:"SET_MUTED",muted:!1});const{value:s}=i.target,o=parseFloat(s);n({type:"SET_VOLUME",volume:o})},[r.muted,n]);return L(yd,{contentPlacement:e,volumeValue:r.volume*100,ref:t,className:"volume-content-container",children:L("div",{className:"volume-panel-wrapper",children:L("input",{className:"volume-slider-input",type:"range",style:{cursor:"pointer"},defaultValue:r.volume,onChange:a,min:"0",max:"1",step:"0.01"})})})},yd=ae.default.div`
|
|
336
|
+
${({contentPlacement:e,volumeValue:t})=>be.css`
|
|
337
|
+
--rm-audio-player-volume-value: ${t}%;
|
|
338
|
+
position: relative;
|
|
339
|
+
height: 119px;
|
|
340
|
+
width: 32px;
|
|
341
|
+
display: flex;
|
|
342
|
+
align-items: center;
|
|
343
|
+
justify-content: center;
|
|
344
|
+
${(e==null?void 0:e.includes("top"))&&be.css`
|
|
366
345
|
bottom: auto;
|
|
367
346
|
`}
|
|
368
347
|
|
|
369
348
|
.volume-panel-wrapper {
|
|
370
349
|
width: 30px;
|
|
371
|
-
background-color: var(--
|
|
372
|
-
border: 1px solid var(--
|
|
350
|
+
background-color: var(--rm-audio-player-volume-panel-background);
|
|
351
|
+
border: 1px solid var(--rm-audio-player-volume-panel-border);
|
|
373
352
|
border-radius: 5px;
|
|
374
353
|
height: 118px;
|
|
375
354
|
box-shadow: 0 2px 4px rgb(0 0 0 /10%);
|
|
376
|
-
|
|
355
|
+
position: absolute;
|
|
356
|
+
bottom: 5px;
|
|
357
|
+
${(e==null?void 0:e.includes("bottom"))&&be.css`
|
|
377
358
|
transform: rotateX(180deg);
|
|
378
|
-
|
|
359
|
+
top: 5px;
|
|
379
360
|
`}
|
|
380
361
|
&:before {
|
|
381
362
|
content: "";
|
|
382
363
|
bottom: -10px;
|
|
383
364
|
left: 7.9px;
|
|
384
365
|
border-color: transparent transparent
|
|
385
|
-
var(--
|
|
386
|
-
var(--
|
|
366
|
+
var(--rm-audio-player-volume-panel-border)
|
|
367
|
+
var(--rm-audio-player-volume-panel-border);
|
|
387
368
|
border-style: solid;
|
|
388
369
|
border-width: 5px;
|
|
389
370
|
box-shadow: -3px 3px 4px rgb(0 0 0 / 10%);
|
|
@@ -403,8 +384,8 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
|
|
|
403
384
|
bottom: -8px;
|
|
404
385
|
left: 9px;
|
|
405
386
|
border-color: transparent transparent
|
|
406
|
-
var(--
|
|
407
|
-
var(--
|
|
387
|
+
var(--rm-audio-player-volume-panel-background)
|
|
388
|
+
var(--rm-audio-player-volume-panel-background);
|
|
408
389
|
border-style: solid;
|
|
409
390
|
border-width: 4px;
|
|
410
391
|
z-index: 1;
|
|
@@ -430,7 +411,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
|
|
|
430
411
|
height: 2px;
|
|
431
412
|
width: 92px;
|
|
432
413
|
-webkit-appearance: none;
|
|
433
|
-
background-color: var(--
|
|
414
|
+
background-color: var(--rm-audio-player-volume-background);
|
|
434
415
|
outline-color: transparent;
|
|
435
416
|
transform-origin: 75px 75px;
|
|
436
417
|
transform: rotate(-90deg);
|
|
@@ -446,7 +427,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
|
|
|
446
427
|
height: 16px;
|
|
447
428
|
border-radius: 12px;
|
|
448
429
|
overflow: visible;
|
|
449
|
-
background: var(--
|
|
430
|
+
background: var(--rm-audio-player-volume-thumb);
|
|
450
431
|
}
|
|
451
432
|
|
|
452
433
|
&::-moz-range-thumb {
|
|
@@ -454,7 +435,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
|
|
|
454
435
|
height: 16px;
|
|
455
436
|
border-radius: 12px;
|
|
456
437
|
overflow: visible;
|
|
457
|
-
background: var(--
|
|
438
|
+
background: var(--rm-audio-player-volume-thumb);
|
|
458
439
|
border: none;
|
|
459
440
|
}
|
|
460
441
|
&::-moz-range-track {
|
|
@@ -472,9 +453,9 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
|
|
|
472
453
|
background-size: 100% 3px;
|
|
473
454
|
background-image: linear-gradient(
|
|
474
455
|
90deg,
|
|
475
|
-
var(--
|
|
476
|
-
var(--
|
|
477
|
-
var(--
|
|
456
|
+
var(--rm-audio-player-volume-fill) var(--rm-audio-player-volume-value),
|
|
457
|
+
var(--rm-audio-player-volume-track)
|
|
458
|
+
var(--rm-audio-player-volume-value)
|
|
478
459
|
);
|
|
479
460
|
}
|
|
480
461
|
|
|
@@ -493,14 +474,50 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
|
|
|
493
474
|
background-size: 100% 3px;
|
|
494
475
|
background-image: linear-gradient(
|
|
495
476
|
90deg,
|
|
496
|
-
var(--
|
|
497
|
-
var(--
|
|
498
|
-
var(--
|
|
477
|
+
var(--rm-audio-player-volume-fill) var(--rm-audio-player-volume-value),
|
|
478
|
+
var(--rm-audio-player-volume-track)
|
|
479
|
+
var(--rm-audio-player-volume-value)
|
|
499
480
|
);
|
|
500
481
|
}
|
|
501
482
|
}
|
|
502
483
|
`}
|
|
503
|
-
|
|
484
|
+
`,Io=P.createContext(null),No=({clickArea:e,triggerType:t,isOpen:r,setIsOpen:n,onOpenChange:a})=>{const i=P.useRef(),s=p=>{const w=()=>{clearTimeout(i.current),i.current=void 0},b=v=>{n(v),a&&a(v),w()};if(w(),p){i.current=window.setTimeout(()=>b(!0),100);return}i.current=window.setTimeout(()=>b(!1),100)},o=p=>{t==="hover"&&s(p)};return{onClick:e==="content"?p=>{p.stopPropagation(),p.nativeEvent.stopImmediatePropagation()}:()=>{t==="click"&&(n(!r),a&&a(!r))},onKeyUp:()=>o(!0),onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onFocus:()=>o(!0),onBlur:()=>o(!1)}},gt=({triggerType:e="click",outboundClickActive:t=!0,children:r,isOpen:n,placement:a="bottom",onOpenChange:i})=>{const s=P.useRef(null),[o,l]=W.default.Children.toArray(r),[h,p]=P.useState(!1),w=No({setIsOpen:p,isOpen:h,triggerType:e,clickArea:"root"});return Ro(s,()=>t&&p(!1)),P.useLayoutEffect(()=>{n!==void 0&&p(n)},[n]),L($d,{className:"dropdown-container",ref:s,...w,children:L(Io.Provider,{value:{dropdownRef:s,placement:a,isOpen:h,setIsOpen:p,onOpenChange:i},children:le(ze,{children:[o,l]})})})},$d=ae.default.div`
|
|
485
|
+
position: relative;
|
|
486
|
+
display: flex;
|
|
487
|
+
align-items: center;
|
|
488
|
+
justify-content: center;
|
|
489
|
+
min-width: 20px;
|
|
490
|
+
min-height: 20px;
|
|
491
|
+
.dropdown-trigger-wrapper {
|
|
492
|
+
width: 100%;
|
|
493
|
+
height: 100%;
|
|
494
|
+
cursor: pointer;
|
|
495
|
+
position: absolute;
|
|
496
|
+
display: flex;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.dropdown-content-wrapper {
|
|
500
|
+
transform-origin: center top;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.dropdown-content-wrapper-enter {
|
|
504
|
+
animation: ${ko} 0.25s ease-out normal forwards;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.dropdown-content-wrapper-leave {
|
|
508
|
+
animation: ${Oo} 0.1s ease-in forwards;
|
|
509
|
+
}
|
|
510
|
+
`,wd=({children:e,isWithAnimation:t=!0,...r})=>{const{dropdownRef:n,placement:a,isOpen:i,setIsOpen:s}=j(Io),[o,l]=P.useState(),{onClick:h}=No({setIsOpen:s,isOpen:i,clickArea:"content"}),p=()=>s(!1),w=()=>s(!0);P.useEffect(()=>{n.current&&l({width:n.current.offsetWidth,height:n.current.offsetHeight})},[n.current]);const b=P.useMemo(()=>o?L(Ed,{...r,dropdownSize:o,placement:a,onClick:h,children:e}):null,[e,r,o,a,h]);return t?L(Un,{visible:i,name:"dropdown-content-wrapper",enterTime:20,leaveTime:60,clearTime:300,onExited:p,onEntered:w,children:b}):b},Ed=ae.default.div`
|
|
511
|
+
${({placement:e,dropdownSize:t})=>be.css`
|
|
512
|
+
position: absolute;
|
|
513
|
+
top: ${e==="bottom"?`${t.height}px`:void 0};
|
|
514
|
+
margin-top: ${e==="bottom"?"5px":void 0};
|
|
515
|
+
bottom: ${e==="top"?`${t.height}px`:void 0};
|
|
516
|
+
margin-bottom: ${e==="top"?"5px":void 0};
|
|
517
|
+
left: ${e==="right"?`${t.width}px`:void 0};
|
|
518
|
+
right: ${e==="left"?`${t.width}px`:void 0};
|
|
519
|
+
`}
|
|
520
|
+
`,Pd=({children:e})=>L("div",{className:"dropdown-trigger-wrapper",children:e});gt.Content=wd;gt.Trigger=Pd;const xd=()=>{const e=P.useRef(null),[t,r]=P.useState("bottom");return P.useEffect(()=>{e.current&&r((()=>e.current.getBoundingClientRect().top<window.innerHeight/2?"bottom":"top")())},[e.current]),le(gt,{placement:t,triggerType:"hover",children:[L(gt.Trigger,{children:L(So,{ref:e})}),L(gt.Content,{children:L(bd,{placement:t})})]})},Ad=()=>{var r,n,a,i,s,o,l,h,p,w,b,v,x,A,k,C;const{interfacePlacement:e,activeUI:t}=j(ee);return le(ze,{children:[L(ge.Item,{gridArea:((r=e==null?void 0:e.itemCustomArea)==null?void 0:r.progress)||((n=e==null?void 0:e.templateArea)==null?void 0:n.progress)||pe.templateArea.progress,width:"100%",visible:Boolean(t.progress!==void 0?t.progress:t.all),children:L(gd,{})}),L(ge.Item,{gridArea:((a=e==null?void 0:e.itemCustomArea)==null?void 0:a.repeatType)||((i=e==null?void 0:e.templateArea)==null?void 0:i.repeatType)||pe.templateArea.repeatType,visible:Boolean((s=t.repeatType)!=null?s:t.all),children:L(Bf,{})}),L(ge.Item,{gridArea:((o=e==null?void 0:e.itemCustomArea)==null?void 0:o.playButton)||((l=e==null?void 0:e.templateArea)==null?void 0:l.playButton)||pe.templateArea.playButton,visible:Boolean((h=t.playButton)!=null?h:t.all),children:le(jn,{UNSAFE_className:"btn-wrapper",alignItems:"center",gap:"10px",children:[L(Ea,{type:"prev",visible:Boolean((p=t.prevNnext)!=null?p:t.all)}),L(kf,{}),L(Ea,{type:"next",visible:Boolean((w=t.prevNnext)!=null?w:t.all)})]})}),L(ge.Item,{gridArea:((b=e==null?void 0:e.itemCustomArea)==null?void 0:b.volume)||((v=e==null?void 0:e.templateArea)==null?void 0:v.volume)||pe.templateArea.volume,visible:Boolean((x=t.volume)!=null?x:t.all),children:L(xd,{})}),L(ge.Item,{gridArea:((A=e==null?void 0:e.itemCustomArea)==null?void 0:A.playList)||((k=e==null?void 0:e.templateArea)==null?void 0:k.playList)||pe.templateArea.playList,visible:Boolean((C=t.playList)!=null?C:t.all),children:L(cd,{})})]})},Td=ae.default.div`
|
|
504
521
|
display: flex;
|
|
505
522
|
align-items: center;
|
|
506
523
|
width: 100%;
|
|
@@ -509,7 +526,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
|
|
|
509
526
|
width: 50px;
|
|
510
527
|
height: 50px;
|
|
511
528
|
}
|
|
512
|
-
`,
|
|
529
|
+
`,Cd=()=>{var n;const{playList:e,curIdx:t,coverImgsCss:r}=j(ee);return L(Td,{className:"artwork-container",children:L("img",{src:(n=e[t])==null?void 0:n.img,alt:"",style:r==null?void 0:r.artwork})})},Sd=ae.default.div`
|
|
513
530
|
display: grid;
|
|
514
531
|
align-items: center;
|
|
515
532
|
row-gap: 5px;
|
|
@@ -525,38 +542,38 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
|
|
|
525
542
|
.writer {
|
|
526
543
|
font-size: 0.875rem;
|
|
527
544
|
}
|
|
528
|
-
`,
|
|
545
|
+
`,kd=()=>{const{playList:e,curIdx:t}=j(ee),r=e[t];return L(Sd,{className:"track-info-container",children:r!=null&&r.customTrackInfo?r.customTrackInfo:le(ze,{children:[(r==null?void 0:r.name)&&L("span",{className:"title",children:r.name}),(r==null?void 0:r.writer)&&L("span",{className:"writer",children:r.writer})]})})},Od=()=>{const e=P.useRef(null),{activeUI:t}=j(ee),r=j(ue);return P.useEffect(()=>{if(e.current){const n=e.current;r({type:"SET_ELEMENT_REFS",elementRefs:{trackCurTimeEl:n}})}},[e.current,r]),L(_d,{type:t.trackTime,className:"track-time-current-container",children:L("span",{ref:e,className:"track-current-time",children:"00:00"})})},Rd=()=>{const e=P.useRef(null),{activeUI:t}=j(ee),r=j(ue);return P.useEffect(()=>{if(e.current){const n=e.current;r({type:"SET_ELEMENT_REFS",elementRefs:{trackDurationEl:n}})}},[e.current,r]),L(Md,{type:t.trackTime,className:"track-time-duration-container",children:L("span",{ref:e,className:"track-duration",children:"00:00"})})},Do=ae.default.div`
|
|
529
546
|
display: flex;
|
|
530
547
|
align-items: center;
|
|
531
548
|
justify-content: center;
|
|
532
549
|
min-height: 16px;
|
|
533
550
|
font-family: monospace;
|
|
534
551
|
font-size: 1.2rem;
|
|
535
|
-
`,
|
|
536
|
-
${({type:e})=>
|
|
552
|
+
`,_d=ae.default(Do)`
|
|
553
|
+
${({type:e})=>be.css`
|
|
537
554
|
.track-current-time {
|
|
538
555
|
font-weight: 700;
|
|
539
556
|
letter-spacing: -0.1rem;
|
|
540
|
-
color: var(--
|
|
557
|
+
color: var(--rm-audio-player-track-current-time);
|
|
541
558
|
margin-right: ${e!=="separation-mode"&&"-10px"};
|
|
542
559
|
}
|
|
543
560
|
`}
|
|
544
|
-
`,
|
|
545
|
-
${({type:e})=>
|
|
561
|
+
`,Md=ae.default(Do)`
|
|
562
|
+
${({type:e})=>be.css`
|
|
546
563
|
.track-duration {
|
|
547
564
|
display: flex;
|
|
548
|
-
color: var(--
|
|
565
|
+
color: var(--rm-audio-player-track-duration);
|
|
549
566
|
letter-spacing: -0.1rem;
|
|
550
567
|
}
|
|
551
|
-
${e!=="separation-mode"&&
|
|
568
|
+
${e!=="separation-mode"&&be.css`
|
|
552
569
|
.track-duration:before {
|
|
553
570
|
content: "/";
|
|
554
571
|
margin: 0 0.3rem;
|
|
555
572
|
}
|
|
556
573
|
`}
|
|
557
574
|
`}
|
|
558
|
-
`,
|
|
575
|
+
`,Ld=()=>{var i,s,o,l,h,p,w,b,v,x,A,k,C,S,O,g,D,M;const{interfacePlacement:e,playList:t,curIdx:r,activeUI:n}=j(ee),a=Boolean((h=(o=(i=t[r])==null?void 0:i.customTrackInfo)!=null?o:(s=t[r])==null?void 0:s.writer)!=null?h:(l=t[r])==null?void 0:l.name)&&Boolean((p=n.trackInfo)!=null?p:n.all);return le(ze,{children:[L(ge.Item,{gridArea:((w=e==null?void 0:e.itemCustomArea)==null?void 0:w.artwork)||((b=e==null?void 0:e.templateArea)==null?void 0:b.artwork)||pe.templateArea.artwork,visible:Boolean(((v=t[r])==null?void 0:v.img)&&((x=n.artwork)!=null?x:n.all)),children:L(Cd,{})}),L(ge.Item,{gridArea:((A=e==null?void 0:e.itemCustomArea)==null?void 0:A.trackInfo)||((k=e==null?void 0:e.templateArea)==null?void 0:k.trackInfo)||pe.templateArea.trackInfo,visible:a,children:L(kd,{})}),L(ge.Item,{gridArea:((C=e==null?void 0:e.itemCustomArea)==null?void 0:C.trackTimeCurrent)||((S=e==null?void 0:e.templateArea)==null?void 0:S.trackTimeCurrent)||pe.templateArea.trackTimeCurrent,visible:Boolean((O=n.trackTime)!=null?O:n.all),children:L(Od,{})}),L(ge.Item,{gridArea:((g=e==null?void 0:e.itemCustomArea)==null?void 0:g.trackTimeDuration)||((D=e==null?void 0:e.templateArea)==null?void 0:D.trackTimeDuration)||pe.templateArea.trackTimeDuration,visible:Boolean((M=n.trackTime)!=null?M:n.all),children:L(Rd,{})})]})},Id=(e,t)=>{const r=e.all?Object.keys(pe.templateArea).filter(p=>(p==="trackTimeCurrent"||p==="trackTimeDuration")&&e.trackTime===!1?!1:e[p]!==void 0?e[p]:!0):Object.entries(e).filter(([,p])=>p).map(([p])=>p);(()=>{r.find(p=>p==="trackTime")&&(r.splice(r.indexOf("trackTime"),1),r.push("trackTimeCurrent"),r.push("trackTimeDuration"))})();const a={...pe.templateArea,...t},i=Object.entries(a).map(([p,w])=>{const[b,v]=w.split("-");return{key:p,row:Number(b.split("row")[1]),col:Number(v)}}).filter(({key:p})=>r.includes(p)).sort((p,w)=>p.col-w.col);let s=1;(()=>{for(let p=0;p<i.length;p++)s=Math.max(s,i[p].row)})();const l=new Array(s).fill("").map((p,w)=>{let b="";for(let v=0;v<i.length;v++)b+=` row${w+1}-${i[v].col}`,v===0&&(b=b.trim());return b}),h=new Array(s).fill("").map((p,w)=>{const b=window?window.innerWidth-100:1500;let v="";for(let x=0;x<i.length;x++){if(x===0&&(v=v.trim()),w===0&&i[x].key==="progress"){v+=" 1fr";continue}v+=` fit-content(${b}px)`}return v});return{gridAreas:l,gridColumns:h}},Nd=ae.default.div`
|
|
559
576
|
.interface-grid {
|
|
560
577
|
padding: 0.5rem 10px;
|
|
561
578
|
}
|
|
562
|
-
`,
|
|
579
|
+
`,Dd=()=>{const{interfacePlacement:e,activeUI:t,playListPlacement:r}=j(ee),{gridAreas:n,gridColumns:a}=Id(t,e==null?void 0:e.templateArea);return le(Nd,{className:"interface-container",children:[r==="top"&&L("div",{className:"sortable-play-list"}),le(ge,{alignItems:"center",justifyContent:"center",areas:n,minHeight:"30px",columns:a,UNSAFE_className:"interface-grid",children:[L(Ld,{}),L(Ad,{})]}),r==="bottom"&&L("div",{className:"sortable-play-list"})]})},Bd=({playList:e,audioInitialState:t,placement:r={},activeUI:n,customIcons:a,coverImgsCss:i})=>{const s=j(ue);return P.useLayoutEffect(()=>{const{player:o,playList:l,interface:h}=r;s({type:"SET_PLACEMENTS",playerPlacement:o,playListPlacement:l,interfacePlacement:h})},[s,r]),P.useLayoutEffect(()=>{n&&s({type:"SET_ACTIVE_UI",activeUI:n})},[n,s]),P.useLayoutEffect(()=>{i&&s({type:"SET_COVER_IMGS_CSS",coverImgsCss:i})},[s,i]),P.useEffect(()=>{t&&s({type:"SET_INITIAL_AUDIO_STATE",audioInitialState:t})},[t,s]),P.useEffect(()=>{s({type:"UPDATE_PLAY_LIST",playList:e})},[s,e]),P.useEffect(()=>{a&&s({type:"SET_CUSTOM_ICONS",customIcons:a})},[a,s]),le(Wn,{id:"rm-audio-player",UNSAFE_className:"rm-audio-player-container",children:[L(Ef,{}),L(Dd,{})]})},Bo=({rootContainerProps:e,...t})=>L(rf,{children:le(ef,{rootContainerProps:e,children:[L(nf,{}),L(Bd,{...t})]})});exports.AudioPlayerWithProvider=Bo;exports.default=Bo;
|