@zaide6137/m3-components-web 0.1.37 → 0.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/big-calendar/index.css +2 -0
- package/dist/big-calendar/index.d.mts +57 -0
- package/dist/big-calendar/index.d.ts +57 -0
- package/dist/big-calendar/index.js +124 -0
- package/dist/big-calendar/index.mjs +124 -0
- package/dist/button/index.css +2 -0
- package/dist/button/index.d.mts +24 -0
- package/dist/button/index.d.ts +24 -0
- package/dist/button/index.js +2 -0
- package/dist/button/index.mjs +2 -0
- package/dist/chunk-52NSALGS.js +111 -0
- package/dist/chunk-5M4SBNJL.js +1 -0
- package/dist/chunk-HSTTEB7U.mjs +111 -0
- package/dist/chunk-LCX5IU2V.js +111 -0
- package/dist/chunk-ONNUY5W2.mjs +111 -0
- package/dist/chunk-ZDPRP4UO.mjs +0 -0
- package/dist/core/index.d.mts +64 -0
- package/dist/core/index.d.ts +64 -0
- package/dist/core/index.js +1 -0
- package/dist/core/index.mjs +1 -0
- package/dist/index.d.mts +21 -81
- package/dist/index.d.ts +21 -81
- package/dist/index.js +116 -7
- package/dist/index.mjs +116 -7
- package/package.json +35 -10
- package/dist/index.css +0 -3
- package/dist/index.css.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,118 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Arguments: `+Array.prototype.slice.call(o).join("")+`
|
|
5
|
-
`+new Error().stack),a=false;}return n.apply(this,arguments)},n)}var ne={};function ee(e,n){t.deprecationHandler!=null&&t.deprecationHandler(e,n),ne[e]||(z(n),ne[e]=true);}t.suppressDeprecationWarnings=false,t.deprecationHandler=null;function oe(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function be(e){var n,a;for(a in e)d(e,a)&&(n=e[a],oe(n)?this[a]=n:this["_"+a]=n);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source);}function we(e,n){var a=S({},e),o;for(o in n)d(n,o)&&(c(e[o])&&c(n[o])?(a[o]={},S(a[o],e[o]),S(a[o],n[o])):n[o]!=null?a[o]=n[o]:delete a[o]);for(o in e)d(e,o)&&!d(n,o)&&c(e[o])&&(a[o]=S({},a[o]));return a}function L(e){e!=null&&this.set(e);}var me;Object.keys?me=Object.keys:me=function(e){var n,a=[];for(n in e)d(e,n)&&a.push(n);return a};var Oe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function ke(e,n,a){var o=this._calendar[e]||this._calendar.sameElse;return oe(o)?o.call(n,a):o}function fe(e,n,a){var o=""+Math.abs(e),s=n-o.length,u=e>=0;return (u?a?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+o}var tt=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ke=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,rt={},Fe={};function O(e,n,a,o){var s=o;typeof o=="string"&&(s=function(){return this[o]()}),e&&(Fe[e]=s),n&&(Fe[n[0]]=function(){return fe(s.apply(this,arguments),n[1],n[2])}),a&&(Fe[a]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)});}function Ht(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Ut(e){var n=e.match(tt),a,o;for(a=0,o=n.length;a<o;a++)Fe[n[a]]?n[a]=Fe[n[a]]:n[a]=Ht(n[a]);return function(s){var u="",g;for(g=0;g<o;g++)u+=oe(n[g])?n[g].call(s,e):n[g];return u}}function ct(e,n){return e.isValid()?(n=Wt(n,e.localeData()),rt[n]=rt[n]||Ut(n),rt[n](e)):e.localeData().invalidDate()}function Wt(e,n){var a=5;function o(s){return n.longDateFormat(s)||s}for(Ke.lastIndex=0;a>=0&&Ke.test(e);)e=e.replace(Ke,o),Ke.lastIndex=0,a-=1;return e}var zt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function br(e){var n=this._longDateFormat[e],a=this._longDateFormat[e.toUpperCase()];return n||!a?n:(this._longDateFormat[e]=a.match(tt).map(function(o){return o==="MMMM"||o==="MM"||o==="DD"||o==="dddd"?o.slice(1):o}).join(""),this._longDateFormat[e])}var wr="Invalid date";function pa(){return this._invalidDate}var ga="%d",ya=/\d{1,2}/;function ba(e){return this._ordinal.replace("%d",e)}var wa={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function va(e,n,a,o){var s=this._relativeTime[a];return oe(s)?s(e,n,a,o):s.replace(/%d/i,e)}function xa(e,n){var a=this._relativeTime[e>0?"future":"past"];return oe(a)?a(n):a.replace(/%s/i,n)}var en={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Se(e){return typeof e=="string"?en[e]||en[e.toLowerCase()]:void 0}function vr(e){var n={},a,o;for(o in e)d(e,o)&&(a=Se(o),a&&(n[a]=e[o]));return n}var ka={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Sa(e){var n=[],a;for(a in e)d(e,a)&&n.push({unit:a,priority:ka[a]});return n.sort(function(o,s){return o.priority-s.priority}),n}var tn=/\d/,ve=/\d\d/,rn=/\d{3}/,xr=/\d{4}/,Gt=/[+-]?\d{6}/,te=/\d\d?/,nn=/\d\d\d\d?/,an=/\d\d\d\d\d\d?/,jt=/\d{1,3}/,kr=/\d{1,4}/,$t=/[+-]?\d{1,6}/,ut=/\d+/,qt=/[+-]?\d+/,Pa=/Z|[+-]\d\d:?\d\d/gi,Kt=/Z|[+-]\d\d(?::?\d\d)?/gi,Da=/[+-]?\d+(\.\d{1,3})?/,Pt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,dt=/^[1-9]\d?/,Sr=/^([1-9]\d|\d)/,Xt;Xt={};function A(e,n,a){Xt[e]=oe(n)?n:function(o,s){return o&&a?a:n};}function Ca(e,n){return d(Xt,e)?Xt[e](n._strict,n._locale):new RegExp(Ta(e))}function Ta(e){return Le(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,a,o,s,u){return a||o||s||u}))}function Le(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Pe(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function W(e){var n=+e,a=0;return n!==0&&isFinite(n)&&(a=Pe(n)),a}var Pr={};function Q(e,n){var a,o=n,s;for(typeof e=="string"&&(e=[e]),x(n)&&(o=function(u,g){g[n]=W(u);}),s=e.length,a=0;a<s;a++)Pr[e[a]]=o;}function Dt(e,n){Q(e,function(a,o,s,u){s._w=s._w||{},n(a,s._w,s,u);});}function _a(e,n,a){n!=null&&d(Pr,e)&&Pr[e](n,a._a,a,e);}function Zt(e){return e%4===0&&e%100!==0||e%400===0}var pe=0,Ye=1,Re=2,de=3,Ce=4,Ve=5,nt=6,Ma=7,Aa=8;O("Y",0,0,function(){var e=this.year();return e<=9999?fe(e,4):"+"+e}),O(0,["YY",2],0,function(){return this.year()%100}),O(0,["YYYY",4],0,"year"),O(0,["YYYYY",5],0,"year"),O(0,["YYYYYY",6,true],0,"year"),A("Y",qt),A("YY",te,ve),A("YYYY",kr,xr),A("YYYYY",$t,Gt),A("YYYYYY",$t,Gt),Q(["YYYYY","YYYYYY"],pe),Q("YYYY",function(e,n){n[pe]=e.length===2?t.parseTwoDigitYear(e):W(e);}),Q("YY",function(e,n){n[pe]=t.parseTwoDigitYear(e);}),Q("Y",function(e,n){n[pe]=parseInt(e,10);});function Ct(e){return Zt(e)?366:365}t.parseTwoDigitYear=function(e){return W(e)+(W(e)>68?1900:2e3)};var on=ht("FullYear",true);function Oa(){return Zt(this.year())}function ht(e,n){return function(a){return a!=null?(sn(this,e,a),t.updateOffset(this,n),this):Tt(this,e)}}function Tt(e,n){if(!e.isValid())return NaN;var a=e._d,o=e._isUTC;switch(n){case "Milliseconds":return o?a.getUTCMilliseconds():a.getMilliseconds();case "Seconds":return o?a.getUTCSeconds():a.getSeconds();case "Minutes":return o?a.getUTCMinutes():a.getMinutes();case "Hours":return o?a.getUTCHours():a.getHours();case "Date":return o?a.getUTCDate():a.getDate();case "Day":return o?a.getUTCDay():a.getDay();case "Month":return o?a.getUTCMonth():a.getMonth();case "FullYear":return o?a.getUTCFullYear():a.getFullYear();default:return NaN}}function sn(e,n,a){var o,s,u,g,M;if(!(!e.isValid()||isNaN(a))){switch(o=e._d,s=e._isUTC,n){case "Milliseconds":return void(s?o.setUTCMilliseconds(a):o.setMilliseconds(a));case "Seconds":return void(s?o.setUTCSeconds(a):o.setSeconds(a));case "Minutes":return void(s?o.setUTCMinutes(a):o.setMinutes(a));case "Hours":return void(s?o.setUTCHours(a):o.setHours(a));case "Date":return void(s?o.setUTCDate(a):o.setDate(a));case "FullYear":break;default:return}u=a,g=e.month(),M=e.date(),M=M===29&&g===1&&!Zt(u)?28:M,s?o.setUTCFullYear(u,g,M):o.setFullYear(u,g,M);}}function Fa(e){return e=Se(e),oe(this[e])?this[e]():this}function Ra(e,n){if(typeof e=="object"){e=vr(e);var a=Sa(e),o,s=a.length;for(o=0;o<s;o++)this[a[o].unit](e[a[o].unit]);}else if(e=Se(e),oe(this[e]))return this[e](n);return this}function Ia(e,n){return (e%n+n)%n}var se;Array.prototype.indexOf?se=Array.prototype.indexOf:se=function(e){var n;for(n=0;n<this.length;++n)if(this[n]===e)return n;return -1};function Dr(e,n){if(isNaN(e)||isNaN(n))return NaN;var a=Ia(n,12);return e+=(n-a)/12,a===1?Zt(e)?29:28:31-a%7%2}O("M",["MM",2],"Mo",function(){return this.month()+1}),O("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),O("MMMM",0,0,function(e){return this.localeData().months(this,e)}),A("M",te,dt),A("MM",te,ve),A("MMM",function(e,n){return n.monthsShortRegex(e)}),A("MMMM",function(e,n){return n.monthsRegex(e)}),Q(["M","MM"],function(e,n){n[Ye]=W(e)-1;}),Q(["MMM","MMMM"],function(e,n,a,o){var s=a._locale.monthsParse(e,o,a._strict);s!=null?n[Ye]=s:m(a).invalidMonth=e;});var Ea="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ln="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),cn=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Na=Pt,La=Pt;function Ya(e,n){return e?l(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||cn).test(n)?"format":"standalone"][e.month()]:l(this._months)?this._months:this._months.standalone}function Va(e,n){return e?l(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[cn.test(n)?"format":"standalone"][e.month()]:l(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Ba(e,n,a){var o,s,u,g=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)u=D([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(u,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(u,"").toLocaleLowerCase();return a?n==="MMM"?(s=se.call(this._shortMonthsParse,g),s!==-1?s:null):(s=se.call(this._longMonthsParse,g),s!==-1?s:null):n==="MMM"?(s=se.call(this._shortMonthsParse,g),s!==-1?s:(s=se.call(this._longMonthsParse,g),s!==-1?s:null)):(s=se.call(this._longMonthsParse,g),s!==-1?s:(s=se.call(this._shortMonthsParse,g),s!==-1?s:null))}function Ha(e,n,a){var o,s,u;if(this._monthsParseExact)return Ba.call(this,e,n,a);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;o<12;o++){if(s=D([2e3,o]),a&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!a&&!this._monthsParse[o]&&(u="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[o]=new RegExp(u.replace(".",""),"i")),a&&n==="MMMM"&&this._longMonthsParse[o].test(e))return o;if(a&&n==="MMM"&&this._shortMonthsParse[o].test(e))return o;if(!a&&this._monthsParse[o].test(e))return o}}function un(e,n){if(!e.isValid())return e;if(typeof n=="string"){if(/^\d+$/.test(n))n=W(n);else if(n=e.localeData().monthsParse(n),!x(n))return e}var a=n,o=e.date();return o=o<29?o:Math.min(o,Dr(e.year(),a)),e._isUTC?e._d.setUTCMonth(a,o):e._d.setMonth(a,o),e}function dn(e){return e!=null?(un(this,e),t.updateOffset(this,true),this):Tt(this,"Month")}function Ua(){return Dr(this.year(),this.month())}function Wa(e){return this._monthsParseExact?(d(this,"_monthsRegex")||hn.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Na),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function za(e){return this._monthsParseExact?(d(this,"_monthsRegex")||hn.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=La),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function hn(){function e(N,G){return G.length-N.length}var n=[],a=[],o=[],s,u,g,M;for(s=0;s<12;s++)u=D([2e3,s]),g=Le(this.monthsShort(u,"")),M=Le(this.months(u,"")),n.push(g),a.push(M),o.push(M),o.push(g);n.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i");}function Ga(e,n,a,o,s,u,g){var M;return e<100&&e>=0?(M=new Date(e+400,n,a,o,s,u,g),isFinite(M.getFullYear())&&M.setFullYear(e)):M=new Date(e,n,a,o,s,u,g),M}function _t(e){var n,a;return e<100&&e>=0?(a=Array.prototype.slice.call(arguments),a[0]=e+400,n=new Date(Date.UTC.apply(null,a)),isFinite(n.getUTCFullYear())&&n.setUTCFullYear(e)):n=new Date(Date.UTC.apply(null,arguments)),n}function Jt(e,n,a){var o=7+n-a,s=(7+_t(e,0,o).getUTCDay()-n)%7;return -s+o-1}function fn(e,n,a,o,s){var u=(7+a-o)%7,g=Jt(e,o,s),M=1+7*(n-1)+u+g,N,G;return M<=0?(N=e-1,G=Ct(N)+M):M>Ct(e)?(N=e+1,G=M-Ct(e)):(N=e,G=M),{year:N,dayOfYear:G}}function Mt(e,n,a){var o=Jt(e.year(),n,a),s=Math.floor((e.dayOfYear()-o-1)/7)+1,u,g;return s<1?(g=e.year()-1,u=s+Be(g,n,a)):s>Be(e.year(),n,a)?(u=s-Be(e.year(),n,a),g=e.year()+1):(g=e.year(),u=s),{week:u,year:g}}function Be(e,n,a){var o=Jt(e,n,a),s=Jt(e+1,n,a);return (Ct(e)-o+s)/7}O("w",["ww",2],"wo","week"),O("W",["WW",2],"Wo","isoWeek"),A("w",te,dt),A("ww",te,ve),A("W",te,dt),A("WW",te,ve),Dt(["w","ww","W","WW"],function(e,n,a,o){n[o.substr(0,1)]=W(e);});function ja(e){return Mt(e,this._week.dow,this._week.doy).week}var $a={dow:0,doy:6};function qa(){return this._week.dow}function Ka(){return this._week.doy}function Xa(e){var n=this.localeData().week(this);return e==null?n:this.add((e-n)*7,"d")}function Za(e){var n=Mt(this,1,4).week;return e==null?n:this.add((e-n)*7,"d")}O("d",0,"do","day"),O("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),O("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),O("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),O("e",0,0,"weekday"),O("E",0,0,"isoWeekday"),A("d",te),A("e",te),A("E",te),A("dd",function(e,n){return n.weekdaysMinRegex(e)}),A("ddd",function(e,n){return n.weekdaysShortRegex(e)}),A("dddd",function(e,n){return n.weekdaysRegex(e)}),Dt(["dd","ddd","dddd"],function(e,n,a,o){var s=a._locale.weekdaysParse(e,o,a._strict);s!=null?n.d=s:m(a).invalidWeekday=e;}),Dt(["d","e","E"],function(e,n,a,o){n[o]=W(e);});function Ja(e,n){return typeof e!="string"?e:isNaN(e)?(e=n.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Qa(e,n){return typeof e=="string"?n.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Cr(e,n){return e.slice(n,7).concat(e.slice(0,n))}var eo="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),mn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),to="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ro=Pt,no=Pt,ao=Pt;function oo(e,n){var a=l(this._weekdays)?this._weekdays:this._weekdays[e&&e!==true&&this._weekdays.isFormat.test(n)?"format":"standalone"];return e===true?Cr(a,this._week.dow):e?a[e.day()]:a}function io(e){return e===true?Cr(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function so(e){return e===true?Cr(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function lo(e,n,a){var o,s,u,g=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)u=D([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(u,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(u,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(u,"").toLocaleLowerCase();return a?n==="dddd"?(s=se.call(this._weekdaysParse,g),s!==-1?s:null):n==="ddd"?(s=se.call(this._shortWeekdaysParse,g),s!==-1?s:null):(s=se.call(this._minWeekdaysParse,g),s!==-1?s:null):n==="dddd"?(s=se.call(this._weekdaysParse,g),s!==-1||(s=se.call(this._shortWeekdaysParse,g),s!==-1)?s:(s=se.call(this._minWeekdaysParse,g),s!==-1?s:null)):n==="ddd"?(s=se.call(this._shortWeekdaysParse,g),s!==-1||(s=se.call(this._weekdaysParse,g),s!==-1)?s:(s=se.call(this._minWeekdaysParse,g),s!==-1?s:null)):(s=se.call(this._minWeekdaysParse,g),s!==-1||(s=se.call(this._weekdaysParse,g),s!==-1)?s:(s=se.call(this._shortWeekdaysParse,g),s!==-1?s:null))}function co(e,n,a){var o,s,u;if(this._weekdaysParseExact)return lo.call(this,e,n,a);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(s=D([2e3,1]).day(o),a&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[o]||(u="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[o]=new RegExp(u.replace(".",""),"i")),a&&n==="dddd"&&this._fullWeekdaysParse[o].test(e))return o;if(a&&n==="ddd"&&this._shortWeekdaysParse[o].test(e))return o;if(a&&n==="dd"&&this._minWeekdaysParse[o].test(e))return o;if(!a&&this._weekdaysParse[o].test(e))return o}}function uo(e){if(!this.isValid())return e!=null?this:NaN;var n=Tt(this,"Day");return e!=null?(e=Ja(e,this.localeData()),this.add(e-n,"d")):n}function ho(e){if(!this.isValid())return e!=null?this:NaN;var n=(this.day()+7-this.localeData()._week.dow)%7;return e==null?n:this.add(e-n,"d")}function fo(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var n=Qa(e,this.localeData());return this.day(this.day()%7?n:n-7)}else return this.day()||7}function mo(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Tr.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=ro),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function po(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Tr.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=no),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function go(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Tr.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ao),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Tr(){function e(ye,Ge){return Ge.length-ye.length}var n=[],a=[],o=[],s=[],u,g,M,N,G;for(u=0;u<7;u++)g=D([2e3,1]).day(u),M=Le(this.weekdaysMin(g,"")),N=Le(this.weekdaysShort(g,"")),G=Le(this.weekdays(g,"")),n.push(M),a.push(N),o.push(G),s.push(M),s.push(N),s.push(G);n.sort(e),a.sort(e),o.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+n.join("|")+")","i");}function _r(){return this.hours()%12||12}function yo(){return this.hours()||24}O("H",["HH",2],0,"hour"),O("h",["hh",2],0,_r),O("k",["kk",2],0,yo),O("hmm",0,0,function(){return ""+_r.apply(this)+fe(this.minutes(),2)}),O("hmmss",0,0,function(){return ""+_r.apply(this)+fe(this.minutes(),2)+fe(this.seconds(),2)}),O("Hmm",0,0,function(){return ""+this.hours()+fe(this.minutes(),2)}),O("Hmmss",0,0,function(){return ""+this.hours()+fe(this.minutes(),2)+fe(this.seconds(),2)});function pn(e,n){O(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),n)});}pn("a",true),pn("A",false);function gn(e,n){return n._meridiemParse}A("a",gn),A("A",gn),A("H",te,Sr),A("h",te,dt),A("k",te,dt),A("HH",te,ve),A("hh",te,ve),A("kk",te,ve),A("hmm",nn),A("hmmss",an),A("Hmm",nn),A("Hmmss",an),Q(["H","HH"],de),Q(["k","kk"],function(e,n,a){var o=W(e);n[de]=o===24?0:o;}),Q(["a","A"],function(e,n,a){a._isPm=a._locale.isPM(e),a._meridiem=e;}),Q(["h","hh"],function(e,n,a){n[de]=W(e),m(a).bigHour=true;}),Q("hmm",function(e,n,a){var o=e.length-2;n[de]=W(e.substr(0,o)),n[Ce]=W(e.substr(o)),m(a).bigHour=true;}),Q("hmmss",function(e,n,a){var o=e.length-4,s=e.length-2;n[de]=W(e.substr(0,o)),n[Ce]=W(e.substr(o,2)),n[Ve]=W(e.substr(s)),m(a).bigHour=true;}),Q("Hmm",function(e,n,a){var o=e.length-2;n[de]=W(e.substr(0,o)),n[Ce]=W(e.substr(o));}),Q("Hmmss",function(e,n,a){var o=e.length-4,s=e.length-2;n[de]=W(e.substr(0,o)),n[Ce]=W(e.substr(o,2)),n[Ve]=W(e.substr(s));});function bo(e){return (e+"").toLowerCase().charAt(0)==="p"}var wo=/[ap]\.?m?\.?/i,vo=ht("Hours",true);function xo(e,n,a){return e>11?a?"pm":"PM":a?"am":"AM"}var yn={calendar:Oe,longDateFormat:zt,invalidDate:wr,ordinal:ga,dayOfMonthOrdinalParse:ya,relativeTime:wa,months:Ea,monthsShort:ln,week:$a,weekdays:eo,weekdaysMin:to,weekdaysShort:mn,meridiemParse:wo},ae={},At={},Ot;function ko(e,n){var a,o=Math.min(e.length,n.length);for(a=0;a<o;a+=1)if(e[a]!==n[a])return a;return o}function bn(e){return e&&e.toLowerCase().replace("_","-")}function So(e){for(var n=0,a,o,s,u;n<e.length;){for(u=bn(e[n]).split("-"),a=u.length,o=bn(e[n+1]),o=o?o.split("-"):null;a>0;){if(s=Qt(u.slice(0,a).join("-")),s)return s;if(o&&o.length>=a&&ko(u,o)>=a-1)break;a--;}n++;}return Ot}function Po(e){return !!(e&&e.match("^[^/\\\\]*$"))}function Qt(e){var n=null,a;if(ae[e]===void 0&&typeof St<"u"&&St&&St.exports&&Po(e))try{n=Ot._abbr,a=jn,a("./locale/"+e),Xe(n);}catch{ae[e]=null;}return ae[e]}function Xe(e,n){var a;return e&&(p(n)?a=He(e):a=Mr(e,n),a?Ot=a:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ot._abbr}function Mr(e,n){if(n!==null){var a,o=yn;if(n.abbr=e,ae[e]!=null)ee("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=ae[e]._config;else if(n.parentLocale!=null)if(ae[n.parentLocale]!=null)o=ae[n.parentLocale]._config;else if(a=Qt(n.parentLocale),a!=null)o=a._config;else return At[n.parentLocale]||(At[n.parentLocale]=[]),At[n.parentLocale].push({name:e,config:n}),null;return ae[e]=new L(we(o,n)),At[e]&&At[e].forEach(function(s){Mr(s.name,s.config);}),Xe(e),ae[e]}else return delete ae[e],null}function Do(e,n){if(n!=null){var a,o,s=yn;ae[e]!=null&&ae[e].parentLocale!=null?ae[e].set(we(ae[e]._config,n)):(o=Qt(e),o!=null&&(s=o._config),n=we(s,n),o==null&&(n.abbr=e),a=new L(n),a.parentLocale=ae[e],ae[e]=a),Xe(e);}else ae[e]!=null&&(ae[e].parentLocale!=null?(ae[e]=ae[e].parentLocale,e===Xe()&&Xe(e)):ae[e]!=null&&delete ae[e]);return ae[e]}function He(e){var n;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ot;if(!l(e)){if(n=Qt(e),n)return n;e=[e];}return So(e)}function Co(){return me(ae)}function Ar(e){var n,a=e._a;return a&&m(e).overflow===-2&&(n=a[Ye]<0||a[Ye]>11?Ye:a[Re]<1||a[Re]>Dr(a[pe],a[Ye])?Re:a[de]<0||a[de]>24||a[de]===24&&(a[Ce]!==0||a[Ve]!==0||a[nt]!==0)?de:a[Ce]<0||a[Ce]>59?Ce:a[Ve]<0||a[Ve]>59?Ve:a[nt]<0||a[nt]>999?nt:-1,m(e)._overflowDayOfYear&&(n<pe||n>Re)&&(n=Re),m(e)._overflowWeeks&&n===-1&&(n=Ma),m(e)._overflowWeekday&&n===-1&&(n=Aa),m(e).overflow=n),e}var To=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_o=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mo=/Z|[+-]\d\d(?::?\d\d)?/,er=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,false],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,false],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,false],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,false],["YYYY",/\d{4}/,false]],Or=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ao=/^\/?Date\((-?\d+)/i,Oo=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Fo={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function wn(e){var n,a,o=e._i,s=To.exec(o)||_o.exec(o),u,g,M,N,G=er.length,ye=Or.length;if(s){for(m(e).iso=true,n=0,a=G;n<a;n++)if(er[n][1].exec(s[1])){g=er[n][0],u=er[n][2]!==false;break}if(g==null){e._isValid=false;return}if(s[3]){for(n=0,a=ye;n<a;n++)if(Or[n][1].exec(s[3])){M=(s[2]||" ")+Or[n][0];break}if(M==null){e._isValid=false;return}}if(!u&&M!=null){e._isValid=false;return}if(s[4])if(Mo.exec(s[4]))N="Z";else {e._isValid=false;return}e._f=g+(M||"")+(N||""),Rr(e);}else e._isValid=false;}function Ro(e,n,a,o,s,u){var g=[Io(e),ln.indexOf(n),parseInt(a,10),parseInt(o,10),parseInt(s,10)];return u&&g.push(parseInt(u,10)),g}function Io(e){var n=parseInt(e,10);return n<=49?2e3+n:n<=999?1900+n:n}function Eo(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function No(e,n,a){if(e){var o=mn.indexOf(e),s=new Date(n[0],n[1],n[2]).getDay();if(o!==s)return m(a).weekdayMismatch=true,a._isValid=false,false}return true}function Lo(e,n,a){if(e)return Fo[e];if(n)return 0;var o=parseInt(a,10),s=o%100,u=(o-s)/100;return u*60+s}function vn(e){var n=Oo.exec(Eo(e._i)),a;if(n){if(a=Ro(n[4],n[3],n[2],n[5],n[6],n[7]),!No(n[1],a,e))return;e._a=a,e._tzm=Lo(n[8],n[9],n[10]),e._d=_t.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=true;}else e._isValid=false;}function Yo(e){var n=Ao.exec(e._i);if(n!==null){e._d=new Date(+n[1]);return}if(wn(e),e._isValid===false)delete e._isValid;else return;if(vn(e),e._isValid===false)delete e._isValid;else return;e._strict?e._isValid=false:t.createFromInputFallback(e);}t.createFromInputFallback=U("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""));});function ft(e,n,a){return e??n??a}function Vo(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function Fr(e){var n,a,o=[],s,u,g;if(!e._d){for(s=Vo(e),e._w&&e._a[Re]==null&&e._a[Ye]==null&&Bo(e),e._dayOfYear!=null&&(g=ft(e._a[pe],s[pe]),(e._dayOfYear>Ct(g)||e._dayOfYear===0)&&(m(e)._overflowDayOfYear=true),a=_t(g,0,e._dayOfYear),e._a[Ye]=a.getUTCMonth(),e._a[Re]=a.getUTCDate()),n=0;n<3&&e._a[n]==null;++n)e._a[n]=o[n]=s[n];for(;n<7;n++)e._a[n]=o[n]=e._a[n]==null?n===2?1:0:e._a[n];e._a[de]===24&&e._a[Ce]===0&&e._a[Ve]===0&&e._a[nt]===0&&(e._nextDay=true,e._a[de]=0),e._d=(e._useUTC?_t:Ga).apply(null,o),u=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[de]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==u&&(m(e).weekdayMismatch=true);}}function Bo(e){var n,a,o,s,u,g,M,N,G;n=e._w,n.GG!=null||n.W!=null||n.E!=null?(u=1,g=4,a=ft(n.GG,e._a[pe],Mt(re(),1,4).year),o=ft(n.W,1),s=ft(n.E,1),(s<1||s>7)&&(N=true)):(u=e._locale._week.dow,g=e._locale._week.doy,G=Mt(re(),u,g),a=ft(n.gg,e._a[pe],G.year),o=ft(n.w,G.week),n.d!=null?(s=n.d,(s<0||s>6)&&(N=true)):n.e!=null?(s=n.e+u,(n.e<0||n.e>6)&&(N=true)):s=u),o<1||o>Be(a,u,g)?m(e)._overflowWeeks=true:N!=null?m(e)._overflowWeekday=true:(M=fn(a,o,s,u,g),e._a[pe]=M.year,e._dayOfYear=M.dayOfYear);}t.ISO_8601=function(){},t.RFC_2822=function(){};function Rr(e){if(e._f===t.ISO_8601){wn(e);return}if(e._f===t.RFC_2822){vn(e);return}e._a=[],m(e).empty=true;var n=""+e._i,a,o,s,u,g,M=n.length,N=0,G,ye;for(s=Wt(e._f,e._locale).match(tt)||[],ye=s.length,a=0;a<ye;a++)u=s[a],o=(n.match(Ca(u,e))||[])[0],o&&(g=n.substr(0,n.indexOf(o)),g.length>0&&m(e).unusedInput.push(g),n=n.slice(n.indexOf(o)+o.length),N+=o.length),Fe[u]?(o?m(e).empty=false:m(e).unusedTokens.push(u),_a(u,o,e)):e._strict&&!o&&m(e).unusedTokens.push(u);m(e).charsLeftOver=M-N,n.length>0&&m(e).unusedInput.push(n),e._a[de]<=12&&m(e).bigHour===true&&e._a[de]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[de]=Ho(e._locale,e._a[de],e._meridiem),G=m(e).era,G!==null&&(e._a[pe]=e._locale.erasConvertYear(G,e._a[pe])),Fr(e),Ar(e);}function Ho(e,n,a){var o;return a==null?n:e.meridiemHour!=null?e.meridiemHour(n,a):(e.isPM!=null&&(o=e.isPM(a),o&&n<12&&(n+=12),!o&&n===12&&(n=0)),n)}function Uo(e){var n,a,o,s,u,g,M=false,N=e._f.length;if(N===0){m(e).invalidFormat=true,e._d=new Date(NaN);return}for(s=0;s<N;s++)u=0,g=false,n=Z({},e),e._useUTC!=null&&(n._useUTC=e._useUTC),n._f=e._f[s],Rr(n),T(n)&&(g=true),u+=m(n).charsLeftOver,u+=m(n).unusedTokens.length*10,m(n).score=u,M?u<o&&(o=u,a=n):(o==null||u<o||g)&&(o=u,a=n,g&&(M=true));S(e,a||n);}function Wo(e){if(!e._d){var n=vr(e._i),a=n.day===void 0?n.date:n.day;e._a=k([n.year,n.month,a,n.hour,n.minute,n.second,n.millisecond],function(o){return o&&parseInt(o,10)}),Fr(e);}}function zo(e){var n=new $(Ar(xn(e)));return n._nextDay&&(n.add(1,"d"),n._nextDay=void 0),n}function xn(e){var n=e._i,a=e._f;return e._locale=e._locale||He(e._l),n===null||a===void 0&&n===""?Y({nullInput:true}):(typeof n=="string"&&(e._i=n=e._locale.preparse(n)),V(n)?new $(Ar(n)):(w(n)?e._d=n:l(a)?Uo(e):a?Rr(e):Go(e),T(e)||(e._d=null),e))}function Go(e){var n=e._i;p(n)?e._d=new Date(t.now()):w(n)?e._d=new Date(n.valueOf()):typeof n=="string"?Yo(e):l(n)?(e._a=k(n.slice(0),function(a){return parseInt(a,10)}),Fr(e)):c(n)?Wo(e):x(n)?e._d=new Date(n):t.createFromInputFallback(e);}function kn(e,n,a,o,s){var u={};return (n===true||n===false)&&(o=n,n=void 0),(a===true||a===false)&&(o=a,a=void 0),(c(e)&&h(e)||l(e)&&e.length===0)&&(e=void 0),u._isAMomentObject=true,u._useUTC=u._isUTC=s,u._l=a,u._i=e,u._f=n,u._strict=o,zo(u)}function re(e,n,a,o){return kn(e,n,a,o,false)}var jo=U("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=re.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Y()}),$o=U("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=re.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Y()});function Sn(e,n){var a,o;if(n.length===1&&l(n[0])&&(n=n[0]),!n.length)return re();for(a=n[0],o=1;o<n.length;++o)(!n[o].isValid()||n[o][e](a))&&(a=n[o]);return a}function qo(){var e=[].slice.call(arguments,0);return Sn("isBefore",e)}function Ko(){var e=[].slice.call(arguments,0);return Sn("isAfter",e)}var Xo=function(){return Date.now?Date.now():+new Date},Ft=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Zo(e){var n,a=false,o,s=Ft.length;for(n in e)if(d(e,n)&&!(se.call(Ft,n)!==-1&&(e[n]==null||!isNaN(e[n]))))return false;for(o=0;o<s;++o)if(e[Ft[o]]){if(a)return false;parseFloat(e[Ft[o]])!==W(e[Ft[o]])&&(a=true);}return true}function Jo(){return this._isValid}function Qo(){return Te(NaN)}function tr(e){var n=vr(e),a=n.year||0,o=n.quarter||0,s=n.month||0,u=n.week||n.isoWeek||0,g=n.day||0,M=n.hour||0,N=n.minute||0,G=n.second||0,ye=n.millisecond||0;this._isValid=Zo(n),this._milliseconds=+ye+G*1e3+N*6e4+M*1e3*60*60,this._days=+g+u*7,this._months=+s+o*3+a*12,this._data={},this._locale=He(),this._bubble();}function rr(e){return e instanceof tr}function Ir(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function ei(e,n,a){var o=Math.min(e.length,n.length),s=Math.abs(e.length-n.length),u=0,g;for(g=0;g<o;g++)(W(e[g])!==W(n[g]))&&u++;return u+s}function Pn(e,n){O(e,0,0,function(){var a=this.utcOffset(),o="+";return a<0&&(a=-a,o="-"),o+fe(~~(a/60),2)+n+fe(~~a%60,2)});}Pn("Z",":"),Pn("ZZ",""),A("Z",Kt),A("ZZ",Kt),Q(["Z","ZZ"],function(e,n,a){a._useUTC=true,a._tzm=Er(Kt,e);});var ti=/([\+\-]|\d\d)/gi;function Er(e,n){var a=(n||"").match(e),o,s,u;return a===null?null:(o=a[a.length-1]||[],s=(o+"").match(ti)||["-",0,0],u=+(s[1]*60)+W(s[2]),u===0?0:s[0]==="+"?u:-u)}function Nr(e,n){var a,o;return n._isUTC?(a=n.clone(),o=(V(e)||w(e)?e.valueOf():re(e).valueOf())-a.valueOf(),a._d.setTime(a._d.valueOf()+o),t.updateOffset(a,false),a):re(e).local()}function Lr(e){return -Math.round(e._d.getTimezoneOffset())}t.updateOffset=function(){};function ri(e,n,a){var o=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Er(Kt,e),e===null)return this}else Math.abs(e)<16&&!a&&(e=e*60);return !this._isUTC&&n&&(s=Lr(this)),this._offset=e,this._isUTC=true,s!=null&&this.add(s,"m"),o!==e&&(!n||this._changeInProgress?_n(this,Te(e-o,"m"),1,false):this._changeInProgress||(this._changeInProgress=true,t.updateOffset(this,true),this._changeInProgress=null)),this}else return this._isUTC?o:Lr(this)}function ni(e,n){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,n),this):-this.utcOffset()}function ai(e){return this.utcOffset(0,e)}function oi(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=false,e&&this.subtract(Lr(this),"m")),this}function ii(){if(this._tzm!=null)this.utcOffset(this._tzm,false,true);else if(typeof this._i=="string"){var e=Er(Pa,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,true);}return this}function si(e){return this.isValid()?(e=e?re(e).utcOffset():0,(this.utcOffset()-e)%60===0):false}function li(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ci(){if(!p(this._isDSTShifted))return this._isDSTShifted;var e={},n;return Z(e,this),e=xn(e),e._a?(n=e._isUTC?D(e._a):re(e._a),this._isDSTShifted=this.isValid()&&ei(e._a,n.toArray())>0):this._isDSTShifted=false,this._isDSTShifted}function ui(){return this.isValid()?!this._isUTC:false}function di(){return this.isValid()?this._isUTC:false}function Dn(){return this.isValid()?this._isUTC&&this._offset===0:false}var hi=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,fi=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Te(e,n){var a=e,o=null,s,u,g;return rr(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:x(e)||!isNaN(+e)?(a={},n?a[n]=+e:a.milliseconds=+e):(o=hi.exec(e))?(s=o[1]==="-"?-1:1,a={y:0,d:W(o[Re])*s,h:W(o[de])*s,m:W(o[Ce])*s,s:W(o[Ve])*s,ms:W(Ir(o[nt]*1e3))*s}):(o=fi.exec(e))?(s=o[1]==="-"?-1:1,a={y:at(o[2],s),M:at(o[3],s),w:at(o[4],s),d:at(o[5],s),h:at(o[6],s),m:at(o[7],s),s:at(o[8],s)}):a==null?a={}:typeof a=="object"&&("from"in a||"to"in a)&&(g=mi(re(a.from),re(a.to)),a={},a.ms=g.milliseconds,a.M=g.months),u=new tr(a),rr(e)&&d(e,"_locale")&&(u._locale=e._locale),rr(e)&&d(e,"_isValid")&&(u._isValid=e._isValid),u}Te.fn=tr.prototype,Te.invalid=Qo;function at(e,n){var a=e&&parseFloat(e.replace(",","."));return (isNaN(a)?0:a)*n}function Cn(e,n){var a={};return a.months=n.month()-e.month()+(n.year()-e.year())*12,e.clone().add(a.months,"M").isAfter(n)&&--a.months,a.milliseconds=+n-+e.clone().add(a.months,"M"),a}function mi(e,n){var a;return e.isValid()&&n.isValid()?(n=Nr(n,e),e.isBefore(n)?a=Cn(e,n):(a=Cn(n,e),a.milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0}}function Tn(e,n){return function(a,o){var s,u;return o!==null&&!isNaN(+o)&&(ee(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),u=a,a=o,o=u),s=Te(a,o),_n(this,s,e),this}}function _n(e,n,a,o){var s=n._milliseconds,u=Ir(n._days),g=Ir(n._months);e.isValid()&&(o=o??true,g&&un(e,Tt(e,"Month")+g*a),u&&sn(e,"Date",Tt(e,"Date")+u*a),s&&e._d.setTime(e._d.valueOf()+s*a),o&&t.updateOffset(e,u||g));}var pi=Tn(1,"add"),gi=Tn(-1,"subtract");function Mn(e){return typeof e=="string"||e instanceof String}function yi(e){return V(e)||w(e)||Mn(e)||x(e)||wi(e)||bi(e)||e===null||e===void 0}function bi(e){var n=c(e)&&!h(e),a=false,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,u,g=o.length;for(s=0;s<g;s+=1)u=o[s],a=a||d(e,u);return n&&a}function wi(e){var n=l(e),a=false;return n&&(a=e.filter(function(o){return !x(o)&&Mn(e)}).length===0),n&&a}function vi(e){var n=c(e)&&!h(e),a=false,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,u;for(s=0;s<o.length;s+=1)u=o[s],a=a||d(e,u);return n&&a}function xi(e,n){var a=e.diff(n,"days",true);return a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse"}function ki(e,n){arguments.length===1&&(arguments[0]?yi(arguments[0])?(e=arguments[0],n=void 0):vi(arguments[0])&&(n=arguments[0],e=void 0):(e=void 0,n=void 0));var a=e||re(),o=Nr(a,this).startOf("day"),s=t.calendarFormat(this,o)||"sameElse",u=n&&(oe(n[s])?n[s].call(this,a):n[s]);return this.format(u||this.localeData().calendar(s,this,re(a)))}function Si(){return new $(this)}function Pi(e,n){var a=V(e)?e:re(e);return this.isValid()&&a.isValid()?(n=Se(n)||"millisecond",n==="millisecond"?this.valueOf()>a.valueOf():a.valueOf()<this.clone().startOf(n).valueOf()):false}function Di(e,n){var a=V(e)?e:re(e);return this.isValid()&&a.isValid()?(n=Se(n)||"millisecond",n==="millisecond"?this.valueOf()<a.valueOf():this.clone().endOf(n).valueOf()<a.valueOf()):false}function Ci(e,n,a,o){var s=V(e)?e:re(e),u=V(n)?n:re(n);return this.isValid()&&s.isValid()&&u.isValid()?(o=o||"()",(o[0]==="("?this.isAfter(s,a):!this.isBefore(s,a))&&(o[1]===")"?this.isBefore(u,a):!this.isAfter(u,a))):false}function Ti(e,n){var a=V(e)?e:re(e),o;return this.isValid()&&a.isValid()?(n=Se(n)||"millisecond",n==="millisecond"?this.valueOf()===a.valueOf():(o=a.valueOf(),this.clone().startOf(n).valueOf()<=o&&o<=this.clone().endOf(n).valueOf())):false}function _i(e,n){return this.isSame(e,n)||this.isAfter(e,n)}function Mi(e,n){return this.isSame(e,n)||this.isBefore(e,n)}function Ai(e,n,a){var o,s,u;if(!this.isValid())return NaN;if(o=Nr(e,this),!o.isValid())return NaN;switch(s=(o.utcOffset()-this.utcOffset())*6e4,n=Se(n),n){case "year":u=nr(this,o)/12;break;case "month":u=nr(this,o);break;case "quarter":u=nr(this,o)/3;break;case "second":u=(this-o)/1e3;break;case "minute":u=(this-o)/6e4;break;case "hour":u=(this-o)/36e5;break;case "day":u=(this-o-s)/864e5;break;case "week":u=(this-o-s)/6048e5;break;default:u=this-o;}return a?u:Pe(u)}function nr(e,n){if(e.date()<n.date())return -nr(n,e);var a=(n.year()-e.year())*12+(n.month()-e.month()),o=e.clone().add(a,"months"),s,u;return n-o<0?(s=e.clone().add(a-1,"months"),u=(n-o)/(o-s)):(s=e.clone().add(a+1,"months"),u=(n-o)/(s-o)),-(a+u)||0}t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Oi(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Fi(e){if(!this.isValid())return null;var n=e!==true,a=n?this.clone().utc():this;return a.year()<0||a.year()>9999?ct(a,n?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):oe(Date.prototype.toISOString)?n?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ct(a,"Z")):ct(a,n?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ri(){if(!this.isValid())return "moment.invalid(/* "+this._i+" */)";var e="moment",n="",a,o,s,u;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",n="Z"),a="["+e+'("]',o=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",u=n+'[")]',this.format(a+o+s+u)}function Ii(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=ct(this,e);return this.localeData().postformat(n)}function Ei(e,n){return this.isValid()&&(V(e)&&e.isValid()||re(e).isValid())?Te({to:this,from:e}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function Ni(e){return this.from(re(),e)}function Li(e,n){return this.isValid()&&(V(e)&&e.isValid()||re(e).isValid())?Te({from:this,to:e}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function Yi(e){return this.to(re(),e)}function An(e){var n;return e===void 0?this._locale._abbr:(n=He(e),n!=null&&(this._locale=n),this)}var On=U("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Fn(){return this._locale}var ar=1e3,mt=60*ar,or=60*mt,Rn=(365*400+97)*24*or;function pt(e,n){return (e%n+n)%n}function In(e,n,a){return e<100&&e>=0?new Date(e+400,n,a)-Rn:new Date(e,n,a).valueOf()}function En(e,n,a){return e<100&&e>=0?Date.UTC(e+400,n,a)-Rn:Date.UTC(e,n,a)}function Vi(e){var n,a;if(e=Se(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?En:In,e){case "year":n=a(this.year(),0,1);break;case "quarter":n=a(this.year(),this.month()-this.month()%3,1);break;case "month":n=a(this.year(),this.month(),1);break;case "week":n=a(this.year(),this.month(),this.date()-this.weekday());break;case "isoWeek":n=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case "day":case "date":n=a(this.year(),this.month(),this.date());break;case "hour":n=this._d.valueOf(),n-=pt(n+(this._isUTC?0:this.utcOffset()*mt),or);break;case "minute":n=this._d.valueOf(),n-=pt(n,mt);break;case "second":n=this._d.valueOf(),n-=pt(n,ar);break}return this._d.setTime(n),t.updateOffset(this,true),this}function Bi(e){var n,a;if(e=Se(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?En:In,e){case "year":n=a(this.year()+1,0,1)-1;break;case "quarter":n=a(this.year(),this.month()-this.month()%3+3,1)-1;break;case "month":n=a(this.year(),this.month()+1,1)-1;break;case "week":n=a(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case "isoWeek":n=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case "day":case "date":n=a(this.year(),this.month(),this.date()+1)-1;break;case "hour":n=this._d.valueOf(),n+=or-pt(n+(this._isUTC?0:this.utcOffset()*mt),or)-1;break;case "minute":n=this._d.valueOf(),n+=mt-pt(n,mt)-1;break;case "second":n=this._d.valueOf(),n+=ar-pt(n,ar)-1;break}return this._d.setTime(n),t.updateOffset(this,true),this}function Hi(){return this._d.valueOf()-(this._offset||0)*6e4}function Ui(){return Math.floor(this.valueOf()/1e3)}function Wi(){return new Date(this.valueOf())}function zi(){var e=this;return [e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Gi(){var e=this;return {years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function ji(){return this.isValid()?this.toISOString():null}function $i(){return T(this)}function qi(){return S({},m(this))}function Ki(){return m(this).overflow}function Xi(){return {input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}O("N",0,0,"eraAbbr"),O("NN",0,0,"eraAbbr"),O("NNN",0,0,"eraAbbr"),O("NNNN",0,0,"eraName"),O("NNNNN",0,0,"eraNarrow"),O("y",["y",1],"yo","eraYear"),O("y",["yy",2],0,"eraYear"),O("y",["yyy",3],0,"eraYear"),O("y",["yyyy",4],0,"eraYear"),A("N",Yr),A("NN",Yr),A("NNN",Yr),A("NNNN",ss),A("NNNNN",ls),Q(["N","NN","NNN","NNNN","NNNNN"],function(e,n,a,o){var s=a._locale.erasParse(e,o,a._strict);s?m(a).era=s:m(a).invalidEra=e;}),A("y",ut),A("yy",ut),A("yyy",ut),A("yyyy",ut),A("yo",cs),Q(["y","yy","yyy","yyyy"],pe),Q(["yo"],function(e,n,a,o){var s;a._locale._eraYearOrdinalRegex&&(s=e.match(a._locale._eraYearOrdinalRegex)),a._locale.eraYearOrdinalParse?n[pe]=a._locale.eraYearOrdinalParse(e,s):n[pe]=parseInt(e,10);});function Zi(e,n){var a,o,s,u=this._eras||He("en")._eras;for(a=0,o=u.length;a<o;++a)switch(typeof u[a].since==="string"&&(s=t(u[a].since).startOf("day"),u[a].since=s.valueOf()),typeof u[a].until){case "undefined":u[a].until=1/0;break;case "string":s=t(u[a].until).startOf("day").valueOf(),u[a].until=s.valueOf();break}return u}function Ji(e,n,a){var o,s,u=this.eras(),g,M,N;for(e=e.toUpperCase(),o=0,s=u.length;o<s;++o)if(g=u[o].name.toUpperCase(),M=u[o].abbr.toUpperCase(),N=u[o].narrow.toUpperCase(),a)switch(n){case "N":case "NN":case "NNN":if(M===e)return u[o];break;case "NNNN":if(g===e)return u[o];break;case "NNNNN":if(N===e)return u[o];break}else if([g,M,N].indexOf(e)>=0)return u[o]}function Qi(e,n){var a=e.since<=e.until?1:-1;return n===void 0?t(e.since).year():t(e.since).year()+(n-e.offset)*a}function es(){var e,n,a,o=this.localeData().eras();for(e=0,n=o.length;e<n;++e)if(a=this.clone().startOf("day").valueOf(),o[e].since<=a&&a<=o[e].until||o[e].until<=a&&a<=o[e].since)return o[e].name;return ""}function ts(){var e,n,a,o=this.localeData().eras();for(e=0,n=o.length;e<n;++e)if(a=this.clone().startOf("day").valueOf(),o[e].since<=a&&a<=o[e].until||o[e].until<=a&&a<=o[e].since)return o[e].narrow;return ""}function rs(){var e,n,a,o=this.localeData().eras();for(e=0,n=o.length;e<n;++e)if(a=this.clone().startOf("day").valueOf(),o[e].since<=a&&a<=o[e].until||o[e].until<=a&&a<=o[e].since)return o[e].abbr;return ""}function ns(){var e,n,a,o,s=this.localeData().eras();for(e=0,n=s.length;e<n;++e)if(a=s[e].since<=s[e].until?1:-1,o=this.clone().startOf("day").valueOf(),s[e].since<=o&&o<=s[e].until||s[e].until<=o&&o<=s[e].since)return (this.year()-t(s[e].since).year())*a+s[e].offset;return this.year()}function as(e){return d(this,"_erasNameRegex")||Vr.call(this),e?this._erasNameRegex:this._erasRegex}function os(e){return d(this,"_erasAbbrRegex")||Vr.call(this),e?this._erasAbbrRegex:this._erasRegex}function is(e){return d(this,"_erasNarrowRegex")||Vr.call(this),e?this._erasNarrowRegex:this._erasRegex}function Yr(e,n){return n.erasAbbrRegex(e)}function ss(e,n){return n.erasNameRegex(e)}function ls(e,n){return n.erasNarrowRegex(e)}function cs(e,n){return n._eraYearOrdinalRegex||ut}function Vr(){var e=[],n=[],a=[],o=[],s,u,g,M,N,G=this.eras();for(s=0,u=G.length;s<u;++s)g=Le(G[s].name),M=Le(G[s].abbr),N=Le(G[s].narrow),n.push(g),e.push(M),a.push(N),o.push(g),o.push(M),o.push(N);this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i");}O(0,["gg",2],0,function(){return this.weekYear()%100}),O(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ir(e,n){O(0,[e,e.length],0,n);}ir("gggg","weekYear"),ir("ggggg","weekYear"),ir("GGGG","isoWeekYear"),ir("GGGGG","isoWeekYear"),A("G",qt),A("g",qt),A("GG",te,ve),A("gg",te,ve),A("GGGG",kr,xr),A("gggg",kr,xr),A("GGGGG",$t,Gt),A("ggggg",$t,Gt),Dt(["gggg","ggggg","GGGG","GGGGG"],function(e,n,a,o){n[o.substr(0,2)]=W(e);}),Dt(["gg","GG"],function(e,n,a,o){n[o]=t.parseTwoDigitYear(e);});function us(e){return Nn.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function ds(e){return Nn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function hs(){return Be(this.year(),1,4)}function fs(){return Be(this.isoWeekYear(),1,4)}function ms(){var e=this.localeData()._week;return Be(this.year(),e.dow,e.doy)}function ps(){var e=this.localeData()._week;return Be(this.weekYear(),e.dow,e.doy)}function Nn(e,n,a,o,s){var u;return e==null?Mt(this,o,s).year:(u=Be(e,o,s),n>u&&(n=u),gs.call(this,e,n,a,o,s))}function gs(e,n,a,o,s){var u=fn(e,n,a,o,s),g=_t(u.year,0,u.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}O("Q",0,"Qo","quarter"),A("Q",tn),Q("Q",function(e,n){n[Ye]=(W(e)-1)*3;});function ys(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}O("D",["DD",2],"Do","date"),A("D",te,dt),A("DD",te,ve),A("Do",function(e,n){return e?n._dayOfMonthOrdinalParse||n._ordinalParse:n._dayOfMonthOrdinalParseLenient}),Q(["D","DD"],Re),Q("Do",function(e,n){n[Re]=W(e.match(te)[0]);});var Ln=ht("Date",true);O("DDD",["DDDD",3],"DDDo","dayOfYear"),A("DDD",jt),A("DDDD",rn),Q(["DDD","DDDD"],function(e,n,a){a._dayOfYear=W(e);});function bs(e){var n=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?n:this.add(e-n,"d")}O("m",["mm",2],0,"minute"),A("m",te,Sr),A("mm",te,ve),Q(["m","mm"],Ce);var ws=ht("Minutes",false);O("s",["ss",2],0,"second"),A("s",te,Sr),A("ss",te,ve),Q(["s","ss"],Ve);var vs=ht("Seconds",false);O("S",0,0,function(){return ~~(this.millisecond()/100)}),O(0,["SS",2],0,function(){return ~~(this.millisecond()/10)}),O(0,["SSS",3],0,"millisecond"),O(0,["SSSS",4],0,function(){return this.millisecond()*10}),O(0,["SSSSS",5],0,function(){return this.millisecond()*100}),O(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),O(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),O(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),O(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),A("S",jt,tn),A("SS",jt,ve),A("SSS",jt,rn);var Ze,Yn;for(Ze="SSSS";Ze.length<=9;Ze+="S")A(Ze,ut);function xs(e,n){n[nt]=W(("0."+e)*1e3);}for(Ze="S";Ze.length<=9;Ze+="S")Q(Ze,xs);Yn=ht("Milliseconds",false),O("z",0,0,"zoneAbbr"),O("zz",0,0,"zoneName");function ks(){return this._isUTC?"UTC":""}function Ss(){return this._isUTC?"Coordinated Universal Time":""}var P=$.prototype;P.add=pi,P.calendar=ki,P.clone=Si,P.diff=Ai,P.endOf=Bi,P.format=Ii,P.from=Ei,P.fromNow=Ni,P.to=Li,P.toNow=Yi,P.get=Fa,P.invalidAt=Ki,P.isAfter=Pi,P.isBefore=Di,P.isBetween=Ci,P.isSame=Ti,P.isSameOrAfter=_i,P.isSameOrBefore=Mi,P.isValid=$i,P.lang=On,P.locale=An,P.localeData=Fn,P.max=$o,P.min=jo,P.parsingFlags=qi,P.set=Ra,P.startOf=Vi,P.subtract=gi,P.toArray=zi,P.toObject=Gi,P.toDate=Wi,P.toISOString=Fi,P.inspect=Ri,typeof Symbol<"u"&&Symbol.for!=null&&(P[Symbol.for("nodejs.util.inspect.custom")]=function(){return "Moment<"+this.format()+">"}),P.toJSON=ji,P.toString=Oi,P.unix=Ui,P.valueOf=Hi,P.creationData=Xi,P.eraName=es,P.eraNarrow=ts,P.eraAbbr=rs,P.eraYear=ns,P.year=on,P.isLeapYear=Oa,P.weekYear=us,P.isoWeekYear=ds,P.quarter=P.quarters=ys,P.month=dn,P.daysInMonth=Ua,P.week=P.weeks=Xa,P.isoWeek=P.isoWeeks=Za,P.weeksInYear=ms,P.weeksInWeekYear=ps,P.isoWeeksInYear=hs,P.isoWeeksInISOWeekYear=fs,P.date=Ln,P.day=P.days=uo,P.weekday=ho,P.isoWeekday=fo,P.dayOfYear=bs,P.hour=P.hours=vo,P.minute=P.minutes=ws,P.second=P.seconds=vs,P.millisecond=P.milliseconds=Yn,P.utcOffset=ri,P.utc=ai,P.local=oi,P.parseZone=ii,P.hasAlignedHourOffset=si,P.isDST=li,P.isLocal=ui,P.isUtcOffset=di,P.isUtc=Dn,P.isUTC=Dn,P.zoneAbbr=ks,P.zoneName=Ss,P.dates=U("dates accessor is deprecated. Use date instead.",Ln),P.months=U("months accessor is deprecated. Use month instead",dn),P.years=U("years accessor is deprecated. Use year instead",on),P.zone=U("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",ni),P.isDSTShifted=U("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ci);function Ps(e){return re(e*1e3)}function Ds(){return re.apply(null,arguments).parseZone()}function Vn(e){return e}var K=L.prototype;K.calendar=ke,K.longDateFormat=br,K.invalidDate=pa,K.ordinal=ba,K.preparse=Vn,K.postformat=Vn,K.relativeTime=va,K.pastFuture=xa,K.set=be,K.eras=Zi,K.erasParse=Ji,K.erasConvertYear=Qi,K.erasAbbrRegex=os,K.erasNameRegex=as,K.erasNarrowRegex=is,K.months=Ya,K.monthsShort=Va,K.monthsParse=Ha,K.monthsRegex=za,K.monthsShortRegex=Wa,K.week=ja,K.firstDayOfYear=Ka,K.firstDayOfWeek=qa,K.weekdays=oo,K.weekdaysMin=so,K.weekdaysShort=io,K.weekdaysParse=co,K.weekdaysRegex=mo,K.weekdaysShortRegex=po,K.weekdaysMinRegex=go,K.isPM=bo,K.meridiem=xo;function sr(e,n,a,o){var s=He(),u=D().set(o,n);return s[a](u,e)}function Bn(e,n,a){if(x(e)&&(n=e,e=void 0),e=e||"",n!=null)return sr(e,n,a,"month");var o,s=[];for(o=0;o<12;o++)s[o]=sr(e,o,a,"month");return s}function Br(e,n,a,o){typeof e=="boolean"?(x(n)&&(a=n,n=void 0),n=n||""):(n=e,a=n,e=false,x(n)&&(a=n,n=void 0),n=n||"");var s=He(),u=e?s._week.dow:0,g,M=[];if(a!=null)return sr(n,(a+u)%7,o,"day");for(g=0;g<7;g++)M[g]=sr(n,(g+u)%7,o,"day");return M}function Cs(e,n){return Bn(e,n,"months")}function Ts(e,n){return Bn(e,n,"monthsShort")}function _s(e,n,a){return Br(e,n,a,"weekdays")}function Ms(e,n,a){return Br(e,n,a,"weekdaysShort")}function As(e,n,a){return Br(e,n,a,"weekdaysMin")}Xe("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var n=e%10,a=W(e%100/10)===1?"th":n===1?"st":n===2?"nd":n===3?"rd":"th";return e+a}}),t.lang=U("moment.lang is deprecated. Use moment.locale instead.",Xe),t.langData=U("moment.langData is deprecated. Use moment.localeData instead.",He);var Ue=Math.abs;function Os(){var e=this._data;return this._milliseconds=Ue(this._milliseconds),this._days=Ue(this._days),this._months=Ue(this._months),e.milliseconds=Ue(e.milliseconds),e.seconds=Ue(e.seconds),e.minutes=Ue(e.minutes),e.hours=Ue(e.hours),e.months=Ue(e.months),e.years=Ue(e.years),this}function Hn(e,n,a,o){var s=Te(n,a);return e._milliseconds+=o*s._milliseconds,e._days+=o*s._days,e._months+=o*s._months,e._bubble()}function Fs(e,n){return Hn(this,e,n,1)}function Rs(e,n){return Hn(this,e,n,-1)}function Un(e){return e<0?Math.floor(e):Math.ceil(e)}function Is(){var e=this._milliseconds,n=this._days,a=this._months,o=this._data,s,u,g,M,N;return e>=0&&n>=0&&a>=0||e<=0&&n<=0&&a<=0||(e+=Un(Hr(a)+n)*864e5,n=0,a=0),o.milliseconds=e%1e3,s=Pe(e/1e3),o.seconds=s%60,u=Pe(s/60),o.minutes=u%60,g=Pe(u/60),o.hours=g%24,n+=Pe(g/24),N=Pe(Wn(n)),a+=N,n-=Un(Hr(N)),M=Pe(a/12),a%=12,o.days=n,o.months=a,o.years=M,this}function Wn(e){return e*4800/146097}function Hr(e){return e*146097/4800}function Es(e){if(!this.isValid())return NaN;var n,a,o=this._milliseconds;if(e=Se(e),e==="month"||e==="quarter"||e==="year")switch(n=this._days+o/864e5,a=this._months+Wn(n),e){case "month":return a;case "quarter":return a/3;case "year":return a/12}else switch(n=this._days+Math.round(Hr(this._months)),e){case "week":return n/7+o/6048e5;case "day":return n+o/864e5;case "hour":return n*24+o/36e5;case "minute":return n*1440+o/6e4;case "second":return n*86400+o/1e3;case "millisecond":return Math.floor(n*864e5)+o;default:throw new Error("Unknown unit "+e)}}function We(e){return function(){return this.as(e)}}var zn=We("ms"),Ns=We("s"),Ls=We("m"),Ys=We("h"),Vs=We("d"),Bs=We("w"),Hs=We("M"),Us=We("Q"),Ws=We("y"),zs=zn;function Gs(){return Te(this)}function js(e){return e=Se(e),this.isValid()?this[e+"s"]():NaN}function ot(e){return function(){return this.isValid()?this._data[e]:NaN}}var $s=ot("milliseconds"),qs=ot("seconds"),Ks=ot("minutes"),Xs=ot("hours"),Zs=ot("days"),Js=ot("months"),Qs=ot("years");function el(){return Pe(this.days()/7)}var ze=Math.round,gt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function tl(e,n,a,o,s){return s.relativeTime(n||1,!!a,e,o)}function rl(e,n,a,o){var s=Te(e).abs(),u=ze(s.as("s")),g=ze(s.as("m")),M=ze(s.as("h")),N=ze(s.as("d")),G=ze(s.as("M")),ye=ze(s.as("w")),Ge=ze(s.as("y")),Je=u<=a.ss&&["s",u]||u<a.s&&["ss",u]||g<=1&&["m"]||g<a.m&&["mm",g]||M<=1&&["h"]||M<a.h&&["hh",M]||N<=1&&["d"]||N<a.d&&["dd",N];return a.w!=null&&(Je=Je||ye<=1&&["w"]||ye<a.w&&["ww",ye]),Je=Je||G<=1&&["M"]||G<a.M&&["MM",G]||Ge<=1&&["y"]||["yy",Ge],Je[2]=n,Je[3]=+e>0,Je[4]=o,tl.apply(null,Je)}function nl(e){return e===void 0?ze:typeof e=="function"?(ze=e,true):false}function al(e,n){return gt[e]===void 0?false:n===void 0?gt[e]:(gt[e]=n,e==="s"&&(gt.ss=n-1),true)}function ol(e,n){if(!this.isValid())return this.localeData().invalidDate();var a=false,o=gt,s,u;return typeof e=="object"&&(n=e,e=false),typeof e=="boolean"&&(a=e),typeof n=="object"&&(o=Object.assign({},gt,n),n.s!=null&&n.ss==null&&(o.ss=n.s-1)),s=this.localeData(),u=rl(this,!a,o,s),a&&(u=s.pastFuture(+this,u)),s.postformat(u)}var Ur=Math.abs;function yt(e){return (e>0)-(e<0)||+e}function lr(){if(!this.isValid())return this.localeData().invalidDate();var e=Ur(this._milliseconds)/1e3,n=Ur(this._days),a=Ur(this._months),o,s,u,g,M=this.asSeconds(),N,G,ye,Ge;return M?(o=Pe(e/60),s=Pe(o/60),e%=60,o%=60,u=Pe(a/12),a%=12,g=e?e.toFixed(3).replace(/\.?0+$/,""):"",N=M<0?"-":"",G=yt(this._months)!==yt(M)?"-":"",ye=yt(this._days)!==yt(M)?"-":"",Ge=yt(this._milliseconds)!==yt(M)?"-":"",N+"P"+(u?G+u+"Y":"")+(a?G+a+"M":"")+(n?ye+n+"D":"")+(s||o||e?"T":"")+(s?Ge+s+"H":"")+(o?Ge+o+"M":"")+(e?Ge+g+"S":"")):"P0D"}var j=tr.prototype;j.isValid=Jo,j.abs=Os,j.add=Fs,j.subtract=Rs,j.as=Es,j.asMilliseconds=zn,j.asSeconds=Ns,j.asMinutes=Ls,j.asHours=Ys,j.asDays=Vs,j.asWeeks=Bs,j.asMonths=Hs,j.asQuarters=Us,j.asYears=Ws,j.valueOf=zs,j._bubble=Is,j.clone=Gs,j.get=js,j.milliseconds=$s,j.seconds=qs,j.minutes=Ks,j.hours=Xs,j.days=Zs,j.weeks=el,j.months=Js,j.years=Qs,j.humanize=ol,j.toISOString=lr,j.toString=lr,j.toJSON=lr,j.locale=An,j.localeData=Fn,j.toIsoString=U("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lr),j.lang=On,O("X",0,0,"unix"),O("x",0,0,"valueOf"),A("x",qt),A("X",Da),Q("X",function(e,n,a){a._d=new Date(parseFloat(e)*1e3);}),Q("x",function(e,n,a){a._d=new Date(W(e));});return t.version="2.30.1",r(re),t.fn=P,t.min=qo,t.max=Ko,t.now=Xo,t.utc=D,t.unix=Ps,t.months=Cs,t.isDate=w,t.locale=Xe,t.invalid=Y,t.duration=Te,t.isMoment=V,t.weekdays=_s,t.parseZone=Ds,t.localeData=He,t.isDuration=rr,t.monthsShort=Ts,t.weekdaysMin=As,t.defineLocale=Mr,t.updateLocale=Do,t.locales=Co,t.weekdaysShort=Ms,t.normalizeUnits=Se,t.relativeTimeRounding=nl,t.relativeTimeThreshold=al,t.calendarFormat=xi,t.prototype=P,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t}));});function ge(i){return i<0?-1:i===0?0:1}function it(i,t,r){return (1-r)*i+r*t}function qn(i,t,r){return r<i?i:r>t?t:r}function ue(i,t,r){return r<i?i:r>t?t:r}function bt(i){return i=i%360,i<0&&(i=i+360),i}function he(i){return i=i%360,i<0&&(i=i+360),i}function Rt(i,t){let r=i[0]*t[0][0]+i[1]*t[0][1]+i[2]*t[0][2],l=i[0]*t[1][0]+i[1]*t[1][1]+i[2]*t[1][2],c=i[0]*t[2][0]+i[1]*t[2][1]+i[2]*t[2][2];return [r,l,c]}var Kn=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],fl=[[3.2413774792388685,-1.5376652402851851,-0.49885366846268053],[-0.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-0.20395524564742123,1.0571799111220335]],Xn=[95.047,100,108.883];function cr(i,t,r){return (255<<24|(i&255)<<16|(t&255)<<8|r&255)>>>0}function zr(i){let t=st(i[0]),r=st(i[1]),l=st(i[2]);return cr(t,r,l)}function Et(i){return i>>16&255}function Nt(i){return i>>8&255}function Lt(i){return i&255}function Zn(i,t,r){let l=fl,c=l[0][0]*i+l[0][1]*t+l[0][2]*r,d=l[1][0]*i+l[1][1]*t+l[1][2]*r,h=l[2][0]*i+l[2][1]*t+l[2][2]*r,p=st(c),x=st(d),w=st(h);return cr(p,x,w)}function ml(i){let t=Ie(Et(i)),r=Ie(Nt(i)),l=Ie(Lt(i));return Rt([t,r,l],Kn)}function Gr(i){let t=Ie(Et(i)),r=Ie(Nt(i)),l=Ie(Lt(i)),c=Kn,d=c[0][0]*t+c[0][1]*r+c[0][2]*l,h=c[1][0]*t+c[1][1]*r+c[1][2]*l,p=c[2][0]*t+c[2][1]*r+c[2][2]*l,x=Xn,w=d/x[0],k=h/x[1],S=p/x[2],D=It(w),C=It(k),m=It(S),v=116*C-16,T=500*(D-C),Y=200*(C-m);return [v,T,Y]}function Jn(i){let t=_e(i),r=st(t);return cr(r,r,r)}function ur(i){let t=ml(i)[1];return 116*It(t/100)-16}function _e(i){return 100*pl((i+16)/116)}function Yt(i){return It(i/100)*116-16}function Ie(i){let t=i/255;return t<=.040449936?t/12.92*100:Math.pow((t+.055)/1.055,2.4)*100}function st(i){let t=i/100,r=0;return t<=.0031308?r=t*12.92:r=1.055*Math.pow(t,1/2.4)-.055,qn(0,255,Math.round(r*255))}function Qn(){return Xn}function It(i){let t=.008856451679035631,r=24389/27;return i>t?Math.pow(i,1/3):(r*i+16)/116}function pl(i){let t=.008856451679035631,r=24389/27,l=i*i*i;return l>t?l:(116*i-16)/r}var xe=class i{static make(t=Qn(),r=200/Math.PI*_e(50)/100,l=50,c=2,d=false){let h=t,p=h[0]*.401288+h[1]*.650173+h[2]*-0.051461,x=h[0]*-0.250268+h[1]*1.204414+h[2]*.045854,w=h[0]*-2079e-6+h[1]*.048952+h[2]*.953127,k=.8+c/10,S=k>=.9?it(.59,.69,(k-.9)*10):it(.525,.59,(k-.8)*10),D=d?1:k*(1-1/3.6*Math.exp((-r-42)/92));D=D>1?1:D<0?0:D;let C=k,m=[D*(100/p)+1-D,D*(100/x)+1-D,D*(100/w)+1-D],v=1/(5*r+1),T=v*v*v*v,Y=1-T,H=T*r+.1*Y*Y*Math.cbrt(5*r),X=_e(l)/t[1],Z=1.48+Math.sqrt(X),$=.725/Math.pow(X,.2),V=$,z=[Math.pow(H*m[0]*p/100,.42),Math.pow(H*m[1]*x/100,.42),Math.pow(H*m[2]*w/100,.42)],U=[400*z[0]/(z[0]+27.13),400*z[1]/(z[1]+27.13),400*z[2]/(z[2]+27.13)],ne=(2*U[0]+U[1]+.05*U[2])*$;return new i(X,ne,$,V,S,C,m,H,Math.pow(H,.25),Z)}constructor(t,r,l,c,d,h,p,x,w,k){this.n=t,this.aw=r,this.nbb=l,this.ncb=c,this.c=d,this.nc=h,this.rgbD=p,this.fl=x,this.fLRoot=w,this.z=k;}};xe.DEFAULT=xe.make();var Ee=class i{constructor(t,r,l,c,d,h,p,x,w){this.hue=t,this.chroma=r,this.j=l,this.q=c,this.m=d,this.s=h,this.jstar=p,this.astar=x,this.bstar=w;}distance(t){let r=this.jstar-t.jstar,l=this.astar-t.astar,c=this.bstar-t.bstar,d=Math.sqrt(r*r+l*l+c*c);return 1.41*Math.pow(d,.63)}static fromInt(t){return i.fromIntInViewingConditions(t,xe.DEFAULT)}static fromIntInViewingConditions(t,r){let l=(t&16711680)>>16,c=(t&65280)>>8,d=t&255,h=Ie(l),p=Ie(c),x=Ie(d),w=.41233895*h+.35762064*p+.18051042*x,k=.2126*h+.7152*p+.0722*x,S=.01932141*h+.11916382*p+.95034478*x,D=.401288*w+.650173*k-.051461*S,C=-0.250268*w+1.204414*k+.045854*S,m=-2079e-6*w+.048952*k+.953127*S,v=r.rgbD[0]*D,T=r.rgbD[1]*C,Y=r.rgbD[2]*m,H=Math.pow(r.fl*Math.abs(v)/100,.42),X=Math.pow(r.fl*Math.abs(T)/100,.42),Z=Math.pow(r.fl*Math.abs(Y)/100,.42),$=ge(v)*400*H/(H+27.13),V=ge(T)*400*X/(X+27.13),z=ge(Y)*400*Z/(Z+27.13),U=(11*$+-12*V+z)/11,ne=($+V-2*z)/9,ee=(20*$+20*V+21*z)/20,oe=(40*$+20*V+z)/20,we=Math.atan2(ne,U)*180/Math.PI,L=he(we),me=L*Math.PI/180,Oe=oe*r.nbb,ke=100*Math.pow(Oe/r.aw,r.c*r.z),fe=4/r.c*Math.sqrt(ke/100)*(r.aw+4)*r.fLRoot,tt=L<20.14?L+360:L,Ke=.25*(Math.cos(tt*Math.PI/180+2)+3.8),Fe=5e4/13*Ke*r.nc*r.ncb*Math.sqrt(U*U+ne*ne)/(ee+.305),O=Math.pow(Fe,.9)*Math.pow(1.64-Math.pow(.29,r.n),.73),Ht=O*Math.sqrt(ke/100),Ut=Ht*r.fLRoot,ct=50*Math.sqrt(O*r.c/(r.aw+4)),Wt=(1+100*.007)*ke/(1+.007*ke),zt=1/.0228*Math.log(1+.0228*Ut),br=zt*Math.cos(me),wr=zt*Math.sin(me);return new i(L,Ht,ke,fe,Ut,ct,Wt,br,wr)}static fromJch(t,r,l){return i.fromJchInViewingConditions(t,r,l,xe.DEFAULT)}static fromJchInViewingConditions(t,r,l,c){let d=4/c.c*Math.sqrt(t/100)*(c.aw+4)*c.fLRoot,h=r*c.fLRoot,p=r/Math.sqrt(t/100),x=50*Math.sqrt(p*c.c/(c.aw+4)),w=l*Math.PI/180,k=(1+100*.007)*t/(1+.007*t),S=1/.0228*Math.log(1+.0228*h),D=S*Math.cos(w),C=S*Math.sin(w);return new i(l,r,t,d,h,x,k,D,C)}static fromUcs(t,r,l){return i.fromUcsInViewingConditions(t,r,l,xe.DEFAULT)}static fromUcsInViewingConditions(t,r,l,c){let d=r,h=l,p=Math.sqrt(d*d+h*h),w=(Math.exp(p*.0228)-1)/.0228/c.fLRoot,k=Math.atan2(h,d)*(180/Math.PI);k<0&&(k+=360);let S=t/(1-(t-100)*.007);return i.fromJchInViewingConditions(S,w,k,c)}toInt(){return this.viewed(xe.DEFAULT)}viewed(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),l=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),c=this.hue*Math.PI/180,d=.25*(Math.cos(c+2)+3.8),h=t.aw*Math.pow(this.j/100,1/t.c/t.z),p=d*(5e4/13)*t.nc*t.ncb,x=h/t.nbb,w=Math.sin(c),k=Math.cos(c),S=23*(x+.305)*l/(23*p+11*l*k+108*l*w),D=S*k,C=S*w,m=(460*x+451*D+288*C)/1403,v=(460*x-891*D-261*C)/1403,T=(460*x-220*D-6300*C)/1403,Y=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),H=ge(m)*(100/t.fl)*Math.pow(Y,1/.42),X=Math.max(0,27.13*Math.abs(v)/(400-Math.abs(v))),Z=ge(v)*(100/t.fl)*Math.pow(X,1/.42),$=Math.max(0,27.13*Math.abs(T)/(400-Math.abs(T))),V=ge(T)*(100/t.fl)*Math.pow($,1/.42),z=H/t.rgbD[0],U=Z/t.rgbD[1],ne=V/t.rgbD[2],ee=1.86206786*z-1.01125463*U+.14918677*ne,oe=.38752654*z+.62144744*U-.00897398*ne,be=-0.0158415*z-.03412294*U+1.04996444*ne;return Zn(ee,oe,be)}static fromXyzInViewingConditions(t,r,l,c){let d=.401288*t+.650173*r-.051461*l,h=-0.250268*t+1.204414*r+.045854*l,p=-2079e-6*t+.048952*r+.953127*l,x=c.rgbD[0]*d,w=c.rgbD[1]*h,k=c.rgbD[2]*p,S=Math.pow(c.fl*Math.abs(x)/100,.42),D=Math.pow(c.fl*Math.abs(w)/100,.42),C=Math.pow(c.fl*Math.abs(k)/100,.42),m=ge(x)*400*S/(S+27.13),v=ge(w)*400*D/(D+27.13),T=ge(k)*400*C/(C+27.13),Y=(11*m+-12*v+T)/11,H=(m+v-2*T)/9,X=(20*m+20*v+21*T)/20,Z=(40*m+20*v+T)/20,V=Math.atan2(H,Y)*180/Math.PI,z=V<0?V+360:V>=360?V-360:V,U=z*Math.PI/180,ne=Z*c.nbb,ee=100*Math.pow(ne/c.aw,c.c*c.z),oe=4/c.c*Math.sqrt(ee/100)*(c.aw+4)*c.fLRoot,be=z<20.14?z+360:z,we=1/4*(Math.cos(be*Math.PI/180+2)+3.8),me=5e4/13*we*c.nc*c.ncb*Math.sqrt(Y*Y+H*H)/(X+.305),Oe=Math.pow(me,.9)*Math.pow(1.64-Math.pow(.29,c.n),.73),ke=Oe*Math.sqrt(ee/100),fe=ke*c.fLRoot,tt=50*Math.sqrt(Oe*c.c/(c.aw+4)),Ke=(1+100*.007)*ee/(1+.007*ee),rt=Math.log(1+.0228*fe)/.0228,Fe=rt*Math.cos(U),O=rt*Math.sin(U);return new i(z,ke,ee,oe,fe,tt,Ke,Fe,O)}xyzInViewingConditions(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),l=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),c=this.hue*Math.PI/180,d=.25*(Math.cos(c+2)+3.8),h=t.aw*Math.pow(this.j/100,1/t.c/t.z),p=d*(5e4/13)*t.nc*t.ncb,x=h/t.nbb,w=Math.sin(c),k=Math.cos(c),S=23*(x+.305)*l/(23*p+11*l*k+108*l*w),D=S*k,C=S*w,m=(460*x+451*D+288*C)/1403,v=(460*x-891*D-261*C)/1403,T=(460*x-220*D-6300*C)/1403,Y=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),H=ge(m)*(100/t.fl)*Math.pow(Y,1/.42),X=Math.max(0,27.13*Math.abs(v)/(400-Math.abs(v))),Z=ge(v)*(100/t.fl)*Math.pow(X,1/.42),$=Math.max(0,27.13*Math.abs(T)/(400-Math.abs(T))),V=ge(T)*(100/t.fl)*Math.pow($,1/.42),z=H/t.rgbD[0],U=Z/t.rgbD[1],ne=V/t.rgbD[2],ee=1.86206786*z-1.01125463*U+.14918677*ne,oe=.38752654*z+.62144744*U-.00897398*ne,be=-0.0158415*z-.03412294*U+1.04996444*ne;return [ee,oe,be]}};var Ae=class i{static sanitizeRadians(t){return (t+Math.PI*8)%(Math.PI*2)}static trueDelinearized(t){let r=t/100,l=0;return r<=.0031308?l=r*12.92:l=1.055*Math.pow(r,1/2.4)-.055,l*255}static chromaticAdaptation(t){let r=Math.pow(Math.abs(t),.42);return ge(t)*400*r/(r+27.13)}static hueOf(t){let r=Rt(t,i.SCALED_DISCOUNT_FROM_LINRGB),l=i.chromaticAdaptation(r[0]),c=i.chromaticAdaptation(r[1]),d=i.chromaticAdaptation(r[2]),h=(11*l+-12*c+d)/11,p=(l+c-2*d)/9;return Math.atan2(p,h)}static areInCyclicOrder(t,r,l){let c=i.sanitizeRadians(r-t),d=i.sanitizeRadians(l-t);return c<d}static intercept(t,r,l){return (r-t)/(l-t)}static lerpPoint(t,r,l){return [t[0]+(l[0]-t[0])*r,t[1]+(l[1]-t[1])*r,t[2]+(l[2]-t[2])*r]}static setCoordinate(t,r,l,c){let d=i.intercept(t[c],r,l[c]);return i.lerpPoint(t,d,l)}static isBounded(t){return 0<=t&&t<=100}static nthVertex(t,r){let l=i.Y_FROM_LINRGB[0],c=i.Y_FROM_LINRGB[1],d=i.Y_FROM_LINRGB[2],h=r%4<=1?0:100,p=r%2===0?0:100;if(r<4){let x=h,w=p,k=(t-x*c-w*d)/l;return i.isBounded(k)?[k,x,w]:[-1,-1,-1]}else if(r<8){let x=h,w=p,k=(t-w*l-x*d)/c;return i.isBounded(k)?[w,k,x]:[-1,-1,-1]}else {let x=h,w=p,k=(t-x*l-w*c)/d;return i.isBounded(k)?[x,w,k]:[-1,-1,-1]}}static bisectToSegment(t,r){let l=[-1,-1,-1],c=l,d=0,h=0,p=false,x=true;for(let w=0;w<12;w++){let k=i.nthVertex(t,w);if(k[0]<0)continue;let S=i.hueOf(k);if(!p){l=k,c=k,d=S,h=S,p=true;continue}(x||i.areInCyclicOrder(d,S,h))&&(x=false,i.areInCyclicOrder(d,r,S)?(c=k,h=S):(l=k,d=S));}return [l,c]}static midpoint(t,r){return [(t[0]+r[0])/2,(t[1]+r[1])/2,(t[2]+r[2])/2]}static criticalPlaneBelow(t){return Math.floor(t-.5)}static criticalPlaneAbove(t){return Math.ceil(t-.5)}static bisectToLimit(t,r){let l=i.bisectToSegment(t,r),c=l[0],d=i.hueOf(c),h=l[1];for(let p=0;p<3;p++)if(c[p]!==h[p]){let x=-1,w=255;c[p]<h[p]?(x=i.criticalPlaneBelow(i.trueDelinearized(c[p])),w=i.criticalPlaneAbove(i.trueDelinearized(h[p]))):(x=i.criticalPlaneAbove(i.trueDelinearized(c[p])),w=i.criticalPlaneBelow(i.trueDelinearized(h[p])));for(let k=0;k<8&&!(Math.abs(w-x)<=1);k++){let S=Math.floor((x+w)/2),D=i.CRITICAL_PLANES[S],C=i.setCoordinate(c,D,h,p),m=i.hueOf(C);i.areInCyclicOrder(d,r,m)?(h=C,w=S):(c=C,d=m,x=S);}}return i.midpoint(c,h)}static inverseChromaticAdaptation(t){let r=Math.abs(t),l=Math.max(0,27.13*r/(400-r));return ge(t)*Math.pow(l,1/.42)}static findResultByJ(t,r,l){let c=Math.sqrt(l)*11,d=xe.DEFAULT,h=1/Math.pow(1.64-Math.pow(.29,d.n),.73),x=.25*(Math.cos(t+2)+3.8)*(5e4/13)*d.nc*d.ncb,w=Math.sin(t),k=Math.cos(t);for(let S=0;S<5;S++){let D=c/100,C=r===0||c===0?0:r/Math.sqrt(D),m=Math.pow(C*h,1/.9),T=d.aw*Math.pow(D,1/d.c/d.z)/d.nbb,Y=23*(T+.305)*m/(23*x+11*m*k+108*m*w),H=Y*k,X=Y*w,Z=(460*T+451*H+288*X)/1403,$=(460*T-891*H-261*X)/1403,V=(460*T-220*H-6300*X)/1403,z=i.inverseChromaticAdaptation(Z),U=i.inverseChromaticAdaptation($),ne=i.inverseChromaticAdaptation(V),ee=Rt([z,U,ne],i.LINRGB_FROM_SCALED_DISCOUNT);if(ee[0]<0||ee[1]<0||ee[2]<0)return 0;let oe=i.Y_FROM_LINRGB[0],be=i.Y_FROM_LINRGB[1],we=i.Y_FROM_LINRGB[2],L=oe*ee[0]+be*ee[1]+we*ee[2];if(L<=0)return 0;if(S===4||Math.abs(L-l)<.002)return ee[0]>100.01||ee[1]>100.01||ee[2]>100.01?0:zr(ee);c=c-(L-l)*c/(2*L);}return 0}static solveToInt(t,r,l){if(r<1e-4||l<1e-4||l>99.9999)return Jn(l);t=he(t);let c=t/180*Math.PI,d=_e(l),h=i.findResultByJ(c,r,d);if(h!==0)return h;let p=i.bisectToLimit(d,c);return zr(p)}static solveToCam(t,r,l){return Ee.fromInt(i.solveToInt(t,r,l))}};Ae.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];Ae.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];Ae.Y_FROM_LINRGB=[.2126,.7152,.0722];Ae.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var F=class i{static from(t,r,l){return new i(Ae.solveToInt(t,r,l))}static fromInt(t){return new i(t)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(t){this.setInternalState(Ae.solveToInt(t,this.internalChroma,this.internalTone));}get chroma(){return this.internalChroma}set chroma(t){this.setInternalState(Ae.solveToInt(this.internalHue,t,this.internalTone));}get tone(){return this.internalTone}set tone(t){this.setInternalState(Ae.solveToInt(this.internalHue,this.internalChroma,t));}setValue(t,r){this[t]=r;}toString(){return `HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`}static isBlue(t){return t>=250&&t<270}static isYellow(t){return t>=105&&t<125}static isCyan(t){return t>=170&&t<207}constructor(t){this.argb=t;let r=Ee.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=ur(t),this.argb=t;}setInternalState(t){let r=Ee.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=ur(t),this.argb=t;}inViewingConditions(t){let l=Ee.fromInt(this.toInt()).xyzInViewingConditions(t),c=Ee.fromXyzInViewingConditions(l[0],l[1],l[2],xe.make());return i.from(c.hue,c.chroma,Yt(l[1]))}};var le=class i{static ratioOfTones(t,r){return t=ue(0,100,t),r=ue(0,100,r),i.ratioOfYs(_e(t),_e(r))}static ratioOfYs(t,r){let l=t>r?t:r,c=l===r?t:r;return (l+5)/(c+5)}static lighter(t,r){if(t<0||t>100)return -1;let l=_e(t),c=r*(l+5)-5,d=i.ratioOfYs(c,l),h=Math.abs(d-r);if(d<r&&h>.04)return -1;let p=Yt(c)+.4;return p<0||p>100?-1:p}static darker(t,r){if(t<0||t>100)return -1;let l=_e(t),c=(l+5)/r-5,d=i.ratioOfYs(l,c),h=Math.abs(d-r);if(d<r&&h>.04)return -1;let p=Yt(c)-.4;return p<0||p>100?-1:p}static lighterUnsafe(t,r){let l=i.lighter(t,r);return l<0?100:l}static darkerUnsafe(t,r){let l=i.darker(t,r);return l<0?0:l}};var lt=class i{static isDisliked(t){let r=Math.round(t.hue)>=90&&Math.round(t.hue)<=111,l=Math.round(t.chroma)>16,c=Math.round(t.tone)<65;return r&&l&&c}static fixIfDisliked(t){return i.isDisliked(t)?F.from(t.hue,t.chroma,70):t}};function gl(i,t,r){if(i.name!==r.name)throw new Error(`Attempting to extend color ${i.name} with color ${r.name} of different name for spec version ${t}.`);if(i.isBackground!==r.isBackground)throw new Error(`Attempting to extend color ${i.name} as a ${i.isBackground?"background":"foreground"} with color ${r.name} as a ${r.isBackground?"background":"foreground"} for spec version ${t}.`)}function E(i,t,r){return gl(i,t,r),y.fromPalette({name:i.name,palette:l=>l.specVersion===t?r.palette(l):i.palette(l),tone:l=>l.specVersion===t?r.tone(l):i.tone(l),isBackground:i.isBackground,chromaMultiplier:l=>{let c=l.specVersion===t?r.chromaMultiplier:i.chromaMultiplier;return c!==void 0?c(l):1},background:l=>{let c=l.specVersion===t?r.background:i.background;return c!==void 0?c(l):void 0},secondBackground:l=>{let c=l.specVersion===t?r.secondBackground:i.secondBackground;return c!==void 0?c(l):void 0},contrastCurve:l=>{let c=l.specVersion===t?r.contrastCurve:i.contrastCurve;return c!==void 0?c(l):void 0},toneDeltaPair:l=>{let c=l.specVersion===t?r.toneDeltaPair:i.toneDeltaPair;return c!==void 0?c(l):void 0}})}var y=class i{static fromPalette(t){return new i(t.name??"",t.palette,t.tone??i.getInitialToneFromBackground(t.background),t.isBackground??false,t.chromaMultiplier,t.background,t.secondBackground,t.contrastCurve,t.toneDeltaPair)}static getInitialToneFromBackground(t){return t===void 0?r=>50:r=>t(r)?t(r).getTone(r):50}constructor(t,r,l,c,d,h,p,x,w){if(this.name=t,this.palette=r,this.tone=l,this.isBackground=c,this.chromaMultiplier=d,this.background=h,this.secondBackground=p,this.contrastCurve=x,this.toneDeltaPair=w,this.hctCache=new Map,!h&&p)throw new Error(`Color ${t} has secondBackgrounddefined, but background is not defined.`);if(!h&&x)throw new Error(`Color ${t} has contrastCurvedefined, but background is not defined.`);if(h&&!x)throw new Error(`Color ${t} has backgrounddefined, but contrastCurve is not defined.`)}clone(){return i.fromPalette({name:this.name,palette:this.palette,tone:this.tone,isBackground:this.isBackground,chromaMultiplier:this.chromaMultiplier,background:this.background,secondBackground:this.secondBackground,contrastCurve:this.contrastCurve,toneDeltaPair:this.toneDeltaPair})}clearCache(){this.hctCache.clear();}getArgb(t){return this.getHct(t).toInt()}getHct(t){let r=this.hctCache.get(t);if(r!=null)return r;let l=ea(t.specVersion).getHct(t,this);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,l),l}getTone(t){return ea(t.specVersion).getTone(t,this)}static foregroundTone(t,r){let l=le.lighterUnsafe(t,r),c=le.darkerUnsafe(t,r),d=le.ratioOfTones(l,t),h=le.ratioOfTones(c,t);if(i.tonePrefersLightForeground(t)){let x=Math.abs(d-h)<.1&&d<r&&h<r;return d>=r||d>=h||x?l:c}else return h>=r||h>=d?c:l}static tonePrefersLightForeground(t){return Math.round(t)<60}static toneAllowsLightForeground(t){return Math.round(t)<=49}static enableLightForeground(t){return i.tonePrefersLightForeground(t)&&!i.toneAllowsLightForeground(t)?49:t}},jr=class{getHct(t,r){let l=r.getTone(t);return r.palette(t).getHct(l)}getTone(t,r){let l=t.contrastLevel<0,c=r.toneDeltaPair?r.toneDeltaPair(t):void 0;if(c){let d=c.roleA,h=c.roleB,p=c.delta,x=c.polarity,w=c.stayTogether,k=x==="nearer"||x==="lighter"&&!t.isDark||x==="darker"&&t.isDark,S=k?d:h,D=k?h:d,C=r.name===S.name,m=t.isDark?1:-1,v=S.tone(t),T=D.tone(t);if(r.background&&S.contrastCurve&&D.contrastCurve){let Y=r.background(t),H=S.contrastCurve(t),X=D.contrastCurve(t);if(Y&&H&&X){let Z=Y.getTone(t),$=H.get(t.contrastLevel),V=X.get(t.contrastLevel);le.ratioOfTones(Z,v)<$&&(v=y.foregroundTone(Z,$)),le.ratioOfTones(Z,T)<V&&(T=y.foregroundTone(Z,V)),l&&(v=y.foregroundTone(Z,$),T=y.foregroundTone(Z,V));}}return (T-v)*m<p&&(T=ue(0,100,v+p*m),(T-v)*m>=p||(v=ue(0,100,T-p*m))),50<=v&&v<60?m>0?(v=60,T=Math.max(T,v+p*m)):(v=49,T=Math.min(T,v+p*m)):50<=T&&T<60&&(w?m>0?(v=60,T=Math.max(T,v+p*m)):(v=49,T=Math.min(T,v+p*m)):m>0?T=60:T=49),C?v:T}else {let d=r.tone(t);if(r.background==null||r.background(t)===void 0||r.contrastCurve==null||r.contrastCurve(t)===void 0)return d;let h=r.background(t).getTone(t),p=r.contrastCurve(t).get(t.contrastLevel);if(le.ratioOfTones(h,d)>=p||(d=y.foregroundTone(h,p)),l&&(d=y.foregroundTone(h,p)),r.isBackground&&50<=d&&d<60&&(le.ratioOfTones(49,h)>=p?d=49:d=60),r.secondBackground==null||r.secondBackground(t)===void 0)return d;let[x,w]=[r.background,r.secondBackground],[k,S]=[x(t).getTone(t),w(t).getTone(t)],[D,C]=[Math.max(k,S),Math.min(k,S)];if(le.ratioOfTones(D,d)>=p&&le.ratioOfTones(C,d)>=p)return d;let m=le.lighter(D,p),v=le.darker(C,p),T=[];return m!==-1&&T.push(m),v!==-1&&T.push(v),y.tonePrefersLightForeground(k)||y.tonePrefersLightForeground(S)?m<0?100:m:T.length===1?T[0]:v<0?0:v}}},$r=class{getHct(t,r){let l=r.palette(t),c=r.getTone(t),d=l.hue,h=l.chroma*(r.chromaMultiplier?r.chromaMultiplier(t):1);return F.from(d,h,c)}getTone(t,r){let l=r.toneDeltaPair?r.toneDeltaPair(t):void 0;if(l){let c=l.roleA,d=l.roleB,h=l.polarity,p=l.constraint,x=h==="darker"||h==="relative_lighter"&&t.isDark||h==="relative_darker"&&!t.isDark?-l.delta:l.delta,w=r.name===c.name,k=w?c:d,S=w?d:c,D=k.tone(t),C=S.getTone(t),m=x*(w?1:-1);if(p==="exact"?D=ue(0,100,C+m):p==="nearer"?m>0?D=ue(0,100,ue(C,C+m,D)):D=ue(0,100,ue(C+m,C,D)):p==="farther"&&(m>0?D=ue(C+m,100,D):D=ue(0,C+m,D)),r.background&&r.contrastCurve){let v=r.background(t),T=r.contrastCurve(t);if(v&&T){let Y=v.getTone(t),H=T.get(t.contrastLevel);D=le.ratioOfTones(Y,D)>=H&&t.contrastLevel>=0?D:y.foregroundTone(Y,H);}}return r.isBackground&&!r.name.endsWith("_fixed_dim")&&(D>=57?D=ue(65,100,D):D=ue(0,49,D)),D}else {let c=r.tone(t);if(r.background==null||r.background(t)===void 0||r.contrastCurve==null||r.contrastCurve(t)===void 0)return c;let d=r.background(t).getTone(t),h=r.contrastCurve(t).get(t.contrastLevel);if(c=le.ratioOfTones(d,c)>=h&&t.contrastLevel>=0?c:y.foregroundTone(d,h),r.isBackground&&!r.name.endsWith("_fixed_dim")&&(c>=57?c=ue(65,100,c):c=ue(0,49,c)),r.secondBackground==null||r.secondBackground(t)===void 0)return c;let[p,x]=[r.background,r.secondBackground],[w,k]=[p(t).getTone(t),x(t).getTone(t)],[S,D]=[Math.max(w,k),Math.min(w,k)];if(le.ratioOfTones(S,c)>=h&&le.ratioOfTones(D,c)>=h)return c;let C=le.lighter(S,h),m=le.darker(D,h),v=[];return C!==-1&&v.push(C),m!==-1&&v.push(m),y.tonePrefersLightForeground(w)||y.tonePrefersLightForeground(k)?C<0?100:C:v.length===1?v[0]:m<0?0:m}}},yl=new jr,bl=new $r;function ea(i){return i==="2025"?bl:yl}var _=class i{static fromInt(t){let r=F.fromInt(t);return i.fromHct(r)}static fromHct(t){return new i(t.hue,t.chroma,t)}static fromHueAndChroma(t,r){let l=new qr(t,r).create();return new i(t,r,l)}constructor(t,r,l){this.hue=t,this.chroma=r,this.keyColor=l,this.cache=new Map;}tone(t){let r=this.cache.get(t);return r===void 0&&(t==99&&F.isYellow(this.hue)?r=this.averageArgb(this.tone(98),this.tone(100)):r=F.from(this.hue,this.chroma,t).toInt(),this.cache.set(t,r)),r}getHct(t){return F.fromInt(this.tone(t))}averageArgb(t,r){let l=t>>>16&255,c=t>>>8&255,d=t&255,h=r>>>16&255,p=r>>>8&255,x=r&255,w=Math.round((l+h)/2),k=Math.round((c+p)/2),S=Math.round((d+x)/2);return (255<<24|(w&255)<<16|(k&255)<<8|S&255)>>>0}},qr=class{constructor(t,r){this.hue=t,this.requestedChroma=r,this.chromaCache=new Map,this.maxChromaValue=200;}create(){let c=0,d=100;for(;c<d;){let h=Math.floor((c+d)/2),p=this.maxChroma(h)<this.maxChroma(h+1);if(this.maxChroma(h)>=this.requestedChroma-.01)if(Math.abs(c-50)<Math.abs(d-50))d=h;else {if(c===h)return F.from(this.hue,this.requestedChroma,c);c=h;}else p?c=h+1:d=h;}return F.from(this.hue,this.requestedChroma,c)}maxChroma(t){if(this.chromaCache.has(t))return this.chromaCache.get(t);let r=F.from(this.hue,this.maxChromaValue,t).chroma;return this.chromaCache.set(t,r),r}};var Vt=class i{constructor(t){this.input=t,this.hctsByTempCache=[],this.hctsByHueCache=[],this.tempsByHctCache=new Map,this.inputRelativeTemperatureCache=-1,this.complementCache=null;}get hctsByTemp(){if(this.hctsByTempCache.length>0)return this.hctsByTempCache;let t=this.hctsByHue.concat([this.input]),r=this.tempsByHct;return t.sort((l,c)=>r.get(l)-r.get(c)),this.hctsByTempCache=t,t}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(t=5,r=12){let l=Math.round(this.input.hue),c=this.hctsByHue[l],d=this.relativeTemperature(c),h=[c],p=0;for(let m=0;m<360;m++){let v=bt(l+m),T=this.hctsByHue[v],Y=this.relativeTemperature(T),H=Math.abs(Y-d);d=Y,p+=H;}let x=1,w=p/r,k=0;for(d=this.relativeTemperature(c);h.length<r;){let m=bt(l+x),v=this.hctsByHue[m],T=this.relativeTemperature(v),Y=Math.abs(T-d);k+=Y;let H=h.length*w,X=k>=H,Z=1;for(;X&&h.length<r;){h.push(v);let $=(h.length+Z)*w;X=k>=$,Z++;}if(d=T,x++,x>360){for(;h.length<r;)h.push(v);break}}let S=[this.input],D=Math.floor((t-1)/2);for(let m=1;m<D+1;m++){let v=0-m;for(;v<0;)v=h.length+v;v>=h.length&&(v=v%h.length),S.splice(0,0,h[v]);}let C=t-D-1;for(let m=1;m<C+1;m++){let v=m;for(;v<0;)v=h.length+v;v>=h.length&&(v=v%h.length),S.push(h[v]);}return S}get complement(){if(this.complementCache!=null)return this.complementCache;let t=this.coldest.hue,r=this.tempsByHct.get(this.coldest),l=this.warmest.hue,d=this.tempsByHct.get(this.warmest)-r,h=i.isBetween(this.input.hue,t,l),p=h?l:t,x=h?t:l,w=1,k=1e3,S=this.hctsByHue[Math.round(this.input.hue)],D=1-this.inputRelativeTemperature;for(let C=0;C<=360;C+=1){let m=he(p+w*C);if(!i.isBetween(m,p,x))continue;let v=this.hctsByHue[Math.round(m)],T=(this.tempsByHct.get(v)-r)/d,Y=Math.abs(D-T);Y<k&&(k=Y,S=v);}return this.complementCache=S,this.complementCache}relativeTemperature(t){let r=this.tempsByHct.get(this.warmest)-this.tempsByHct.get(this.coldest),l=this.tempsByHct.get(t)-this.tempsByHct.get(this.coldest);return r===0?.5:l/r}get inputRelativeTemperature(){return this.inputRelativeTemperatureCache>=0?this.inputRelativeTemperatureCache:(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input),this.inputRelativeTemperatureCache)}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;let t=this.hctsByHue.concat([this.input]),r=new Map;for(let l of t)r.set(l,i.rawTemperature(l));return this.tempsByHctCache=r,r}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;let t=[];for(let r=0;r<=360;r+=1){let l=F.from(r,this.input.chroma,this.input.tone);t.push(l);}return this.hctsByHueCache=t,this.hctsByHueCache}static isBetween(t,r,l){return r<l?r<=t&&t<=l:r<=t||t<=l}static rawTemperature(t){let r=Gr(t.toInt()),l=he(Math.atan2(r[2],r[1])*180/Math.PI),c=Math.sqrt(r[1]*r[1]+r[2]*r[2]);return -0.5+.02*Math.pow(c,1.07)*Math.cos(he(l-50)*Math.PI/180)}};var R=class{constructor(t,r,l,c){this.low=t,this.normal=r,this.medium=l,this.high=c;}get(t){return t<=-1?this.low:t<0?it(this.low,this.normal,(t- -1)/1):t<.5?it(this.normal,this.medium,(t-0)/.5):t<1?it(this.medium,this.high,(t-.5)/.5):this.high}};var q=class{constructor(t,r,l,c,d,h){this.roleA=t,this.roleB=r,this.delta=l,this.polarity=c,this.stayTogether=d,this.constraint=h,this.constraint=h??"exact";}};var f;(function(i){i[i.MONOCHROME=0]="MONOCHROME",i[i.NEUTRAL=1]="NEUTRAL",i[i.TONAL_SPOT=2]="TONAL_SPOT",i[i.VIBRANT=3]="VIBRANT",i[i.EXPRESSIVE=4]="EXPRESSIVE",i[i.FIDELITY=5]="FIDELITY",i[i.CONTENT=6]="CONTENT",i[i.RAINBOW=7]="RAINBOW",i[i.FRUIT_SALAD=8]="FRUIT_SALAD";})(f||(f={}));function wt(i){return i.variant===f.FIDELITY||i.variant===f.CONTENT}function ie(i){return i.variant===f.MONOCHROME}function wl(i,t,r,l){let c=r,d=F.from(i,t,r);if(d.chroma<t){let h=d.chroma;for(;d.chroma<t;){c+=l?-1:1;let p=F.from(i,t,c);if(h>p.chroma||Math.abs(p.chroma-t)<.4)break;let x=Math.abs(p.chroma-t),w=Math.abs(d.chroma-t);x<w&&(d=p),h=Math.max(h,p.chroma);}}return c}var dr=class{primaryPaletteKeyColor(){return y.fromPalette({name:"primary_palette_key_color",palette:t=>t.primaryPalette,tone:t=>t.primaryPalette.keyColor.tone})}secondaryPaletteKeyColor(){return y.fromPalette({name:"secondary_palette_key_color",palette:t=>t.secondaryPalette,tone:t=>t.secondaryPalette.keyColor.tone})}tertiaryPaletteKeyColor(){return y.fromPalette({name:"tertiary_palette_key_color",palette:t=>t.tertiaryPalette,tone:t=>t.tertiaryPalette.keyColor.tone})}neutralPaletteKeyColor(){return y.fromPalette({name:"neutral_palette_key_color",palette:t=>t.neutralPalette,tone:t=>t.neutralPalette.keyColor.tone})}neutralVariantPaletteKeyColor(){return y.fromPalette({name:"neutral_variant_palette_key_color",palette:t=>t.neutralVariantPalette,tone:t=>t.neutralVariantPalette.keyColor.tone})}errorPaletteKeyColor(){return y.fromPalette({name:"error_palette_key_color",palette:t=>t.errorPalette,tone:t=>t.errorPalette.keyColor.tone})}background(){return y.fromPalette({name:"background",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}onBackground(){return y.fromPalette({name:"on_background",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.background(),contrastCurve:t=>new R(3,3,4.5,7)})}surface(){return y.fromPalette({name:"surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}surfaceDim(){return y.fromPalette({name:"surface_dim",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:new R(87,87,80,75).get(t.contrastLevel),isBackground:true})}surfaceBright(){return y.fromPalette({name:"surface_bright",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(24,24,29,34).get(t.contrastLevel):98,isBackground:true})}surfaceContainerLowest(){return y.fromPalette({name:"surface_container_lowest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(4,4,2,0).get(t.contrastLevel):100,isBackground:true})}surfaceContainerLow(){return y.fromPalette({name:"surface_container_low",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(10,10,11,12).get(t.contrastLevel):new R(96,96,96,95).get(t.contrastLevel),isBackground:true})}surfaceContainer(){return y.fromPalette({name:"surface_container",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(12,12,16,20).get(t.contrastLevel):new R(94,94,92,90).get(t.contrastLevel),isBackground:true})}surfaceContainerHigh(){return y.fromPalette({name:"surface_container_high",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(17,17,21,25).get(t.contrastLevel):new R(92,92,88,85).get(t.contrastLevel),isBackground:true})}surfaceContainerHighest(){return y.fromPalette({name:"surface_container_highest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(22,22,26,30).get(t.contrastLevel):new R(90,90,84,80).get(t.contrastLevel),isBackground:true})}onSurface(){return y.fromPalette({name:"on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.highestSurface(t),contrastCurve:t=>new R(4.5,7,11,21)})}surfaceVariant(){return y.fromPalette({name:"surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:90,isBackground:true})}onSurfaceVariant(){return y.fromPalette({name:"on_surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?80:30,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,11)})}inverseSurface(){return y.fromPalette({name:"inverse_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:20,isBackground:true})}inverseOnSurface(){return y.fromPalette({name:"inverse_on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?20:95,background:t=>this.inverseSurface(),contrastCurve:t=>new R(4.5,7,11,21)})}outline(){return y.fromPalette({name:"outline",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?60:50,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1.5,3,4.5,7)})}outlineVariant(){return y.fromPalette({name:"outline_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:80,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5)})}shadow(){return y.fromPalette({name:"shadow",palette:t=>t.neutralPalette,tone:t=>0})}scrim(){return y.fromPalette({name:"scrim",palette:t=>t.neutralPalette,tone:t=>0})}surfaceTint(){return y.fromPalette({name:"surface_tint",palette:t=>t.primaryPalette,tone:t=>t.isDark?80:40,isBackground:true})}primary(){return y.fromPalette({name:"primary",palette:t=>t.primaryPalette,tone:t=>ie(t)?t.isDark?100:0:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new q(this.primaryContainer(),this.primary(),10,"nearer",false)})}primaryDim(){}onPrimary(){return y.fromPalette({name:"on_primary",palette:t=>t.primaryPalette,tone:t=>ie(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.primary(),contrastCurve:t=>new R(4.5,7,11,21)})}primaryContainer(){return y.fromPalette({name:"primary_container",palette:t=>t.primaryPalette,tone:t=>wt(t)?t.sourceColorHct.tone:ie(t)?t.isDark?85:25:t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.primaryContainer(),this.primary(),10,"nearer",false)})}onPrimaryContainer(){return y.fromPalette({name:"on_primary_container",palette:t=>t.primaryPalette,tone:t=>wt(t)?y.foregroundTone(this.primaryContainer().tone(t),4.5):ie(t)?t.isDark?0:100:t.isDark?90:30,background:t=>this.primaryContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}inversePrimary(){return y.fromPalette({name:"inverse_primary",palette:t=>t.primaryPalette,tone:t=>t.isDark?40:80,background:t=>this.inverseSurface(),contrastCurve:t=>new R(3,4.5,7,7)})}secondary(){return y.fromPalette({name:"secondary",palette:t=>t.secondaryPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new q(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}secondaryDim(){}onSecondary(){return y.fromPalette({name:"on_secondary",palette:t=>t.secondaryPalette,tone:t=>ie(t)?t.isDark?10:100:t.isDark?20:100,background:t=>this.secondary(),contrastCurve:t=>new R(4.5,7,11,21)})}secondaryContainer(){return y.fromPalette({name:"secondary_container",palette:t=>t.secondaryPalette,tone:t=>{let r=t.isDark?30:90;return ie(t)?t.isDark?30:85:wt(t)?wl(t.secondaryPalette.hue,t.secondaryPalette.chroma,r,!t.isDark):r},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}onSecondaryContainer(){return y.fromPalette({name:"on_secondary_container",palette:t=>t.secondaryPalette,tone:t=>ie(t)?t.isDark?90:10:wt(t)?y.foregroundTone(this.secondaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.secondaryContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}tertiary(){return y.fromPalette({name:"tertiary",palette:t=>t.tertiaryPalette,tone:t=>ie(t)?t.isDark?90:25:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new q(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}tertiaryDim(){}onTertiary(){return y.fromPalette({name:"on_tertiary",palette:t=>t.tertiaryPalette,tone:t=>ie(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.tertiary(),contrastCurve:t=>new R(4.5,7,11,21)})}tertiaryContainer(){return y.fromPalette({name:"tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>{if(ie(t))return t.isDark?60:49;if(!wt(t))return t.isDark?30:90;let r=t.tertiaryPalette.getHct(t.sourceColorHct.tone);return lt.fixIfDisliked(r).tone},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}onTertiaryContainer(){return y.fromPalette({name:"on_tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>ie(t)?t.isDark?0:100:wt(t)?y.foregroundTone(this.tertiaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.tertiaryContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}error(){return y.fromPalette({name:"error",palette:t=>t.errorPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new q(this.errorContainer(),this.error(),10,"nearer",false)})}errorDim(){}onError(){return y.fromPalette({name:"on_error",palette:t=>t.errorPalette,tone:t=>t.isDark?20:100,background:t=>this.error(),contrastCurve:t=>new R(4.5,7,11,21)})}errorContainer(){return y.fromPalette({name:"error_container",palette:t=>t.errorPalette,tone:t=>t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.errorContainer(),this.error(),10,"nearer",false)})}onErrorContainer(){return y.fromPalette({name:"on_error_container",palette:t=>t.errorPalette,tone:t=>ie(t)?t.isDark?90:10:t.isDark?90:30,background:t=>this.errorContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}primaryFixed(){return y.fromPalette({name:"primary_fixed",palette:t=>t.primaryPalette,tone:t=>ie(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}primaryFixedDim(){return y.fromPalette({name:"primary_fixed_dim",palette:t=>t.primaryPalette,tone:t=>ie(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}onPrimaryFixed(){return y.fromPalette({name:"on_primary_fixed",palette:t=>t.primaryPalette,tone:t=>ie(t)?100:10,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new R(4.5,7,11,21)})}onPrimaryFixedVariant(){return y.fromPalette({name:"on_primary_fixed_variant",palette:t=>t.primaryPalette,tone:t=>ie(t)?90:30,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new R(3,4.5,7,11)})}secondaryFixed(){return y.fromPalette({name:"secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>ie(t)?80:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}secondaryFixedDim(){return y.fromPalette({name:"secondary_fixed_dim",palette:t=>t.secondaryPalette,tone:t=>ie(t)?70:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}onSecondaryFixed(){return y.fromPalette({name:"on_secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>10,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new R(4.5,7,11,21)})}onSecondaryFixedVariant(){return y.fromPalette({name:"on_secondary_fixed_variant",palette:t=>t.secondaryPalette,tone:t=>ie(t)?25:30,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new R(3,4.5,7,11)})}tertiaryFixed(){return y.fromPalette({name:"tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>ie(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}tertiaryFixedDim(){return y.fromPalette({name:"tertiary_fixed_dim",palette:t=>t.tertiaryPalette,tone:t=>ie(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new q(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}onTertiaryFixed(){return y.fromPalette({name:"on_tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>ie(t)?100:10,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new R(4.5,7,11,21)})}onTertiaryFixedVariant(){return y.fromPalette({name:"on_tertiary_fixed_variant",palette:t=>t.tertiaryPalette,tone:t=>ie(t)?90:30,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new R(3,4.5,7,11)})}highestSurface(t){return t.isDark?this.surfaceBright():this.surfaceDim()}};function B(i,t=0,r=100,l=1){let c=ta(i.hue,i.chroma*l,100,true);return ue(t,r,c)}function Qe(i,t=0,r=100){let l=ta(i.hue,i.chroma,0,false);return ue(t,r,l)}function ta(i,t,r,l){let c=r,d=F.from(i,t,c);for(;d.chroma<t&&!(r<0||r>100);){r+=l?-1:1;let h=F.from(i,t,r);d.chroma<h.chroma&&(d=h,c=r);}return c}function I(i){return i===1.5?new R(1.5,1.5,3,5.5):i===3?new R(3,3,4.5,7):i===4.5?new R(4.5,4.5,7,11):i===6?new R(6,6,7,11):i===7?new R(7,7,11,21):i===9?new R(9,9,11,21):i===11?new R(11,11,21,21):i===21?new R(21,21,21,21):new R(i,i,7,21)}var hr=class extends dr{surface(){let t=y.fromPalette({name:"surface",palette:r=>r.neutralPalette,tone:r=>(super.surface().tone(r),r.platform==="phone"?r.isDark?4:F.isYellow(r.neutralPalette.hue)?99:r.variant===f.VIBRANT?97:98:0),isBackground:true});return E(super.surface(),"2025",t)}surfaceDim(){let t=y.fromPalette({name:"surface_dim",palette:r=>r.neutralPalette,tone:r=>r.isDark?4:F.isYellow(r.neutralPalette.hue)?90:r.variant===f.VIBRANT?85:87,isBackground:true,chromaMultiplier:r=>{if(!r.isDark){if(r.variant===f.NEUTRAL)return 2.5;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?2.7:1.75;if(r.variant===f.VIBRANT)return 1.36}return 1}});return E(super.surfaceDim(),"2025",t)}surfaceBright(){let t=y.fromPalette({name:"surface_bright",palette:r=>r.neutralPalette,tone:r=>r.isDark?18:F.isYellow(r.neutralPalette.hue)?99:r.variant===f.VIBRANT?97:98,isBackground:true,chromaMultiplier:r=>{if(r.isDark){if(r.variant===f.NEUTRAL)return 2.5;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?2.7:1.75;if(r.variant===f.VIBRANT)return 1.36}return 1}});return E(super.surfaceBright(),"2025",t)}surfaceContainerLowest(){let t=y.fromPalette({name:"surface_container_lowest",palette:r=>r.neutralPalette,tone:r=>r.isDark?0:100,isBackground:true});return E(super.surfaceContainerLowest(),"2025",t)}surfaceContainerLow(){let t=y.fromPalette({name:"surface_container_low",palette:r=>r.neutralPalette,tone:r=>r.platform==="phone"?r.isDark?6:F.isYellow(r.neutralPalette.hue)?98:r.variant===f.VIBRANT?95:96:15,isBackground:true,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 1.3;if(r.variant===f.TONAL_SPOT)return 1.25;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?1.3:1.15;if(r.variant===f.VIBRANT)return 1.08}return 1}});return E(super.surfaceContainerLow(),"2025",t)}surfaceContainer(){let t=y.fromPalette({name:"surface_container",palette:r=>r.neutralPalette,tone:r=>r.platform==="phone"?r.isDark?9:F.isYellow(r.neutralPalette.hue)?96:r.variant===f.VIBRANT?92:94:20,isBackground:true,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 1.6;if(r.variant===f.TONAL_SPOT)return 1.4;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?1.6:1.3;if(r.variant===f.VIBRANT)return 1.15}return 1}});return E(super.surfaceContainer(),"2025",t)}surfaceContainerHigh(){let t=y.fromPalette({name:"surface_container_high",palette:r=>r.neutralPalette,tone:r=>r.platform==="phone"?r.isDark?12:F.isYellow(r.neutralPalette.hue)?94:r.variant===f.VIBRANT?90:92:25,isBackground:true,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 1.9;if(r.variant===f.TONAL_SPOT)return 1.5;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?1.95:1.45;if(r.variant===f.VIBRANT)return 1.22}return 1}});return E(super.surfaceContainerHigh(),"2025",t)}surfaceContainerHighest(){let t=y.fromPalette({name:"surface_container_highest",palette:r=>r.neutralPalette,tone:r=>r.isDark?15:F.isYellow(r.neutralPalette.hue)?92:r.variant===f.VIBRANT?88:90,isBackground:true,chromaMultiplier:r=>r.variant===f.NEUTRAL?2.2:r.variant===f.TONAL_SPOT?1.7:r.variant===f.EXPRESSIVE?F.isYellow(r.neutralPalette.hue)?2.3:1.6:r.variant===f.VIBRANT?1.29:1});return E(super.surfaceContainerHighest(),"2025",t)}onSurface(){let t=y.fromPalette({name:"on_surface",palette:r=>r.neutralPalette,tone:r=>r.variant===f.VIBRANT?B(r.neutralPalette,0,100,1.1):y.getInitialToneFromBackground(l=>l.platform==="phone"?this.highestSurface(l):this.surfaceContainerHigh())(r),chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.isDark&&r.platform==="phone"?I(11):I(9)});return E(super.onSurface(),"2025",t)}onSurfaceVariant(){let t=y.fromPalette({name:"on_surface_variant",palette:r=>r.neutralPalette,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?r.isDark?I(6):I(4.5):I(7)});return E(super.onSurfaceVariant(),"2025",t)}outline(){let t=y.fromPalette({name:"outline",palette:r=>r.neutralPalette,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(3):I(4.5)});return E(super.outline(),"2025",t)}outlineVariant(){let t=y.fromPalette({name:"outline_variant",palette:r=>r.neutralPalette,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(1.5):I(3)});return E(super.outlineVariant(),"2025",t)}inverseSurface(){let t=y.fromPalette({name:"inverse_surface",palette:r=>r.neutralPalette,tone:r=>r.isDark?98:4,isBackground:true});return E(super.inverseSurface(),"2025",t)}inverseOnSurface(){let t=y.fromPalette({name:"inverse_on_surface",palette:r=>r.neutralPalette,background:r=>this.inverseSurface(),contrastCurve:r=>I(7)});return E(super.inverseOnSurface(),"2025",t)}primary(){let t=y.fromPalette({name:"primary",palette:r=>r.primaryPalette,tone:r=>r.variant===f.NEUTRAL?r.platform==="phone"?r.isDark?80:40:90:r.variant===f.TONAL_SPOT?r.platform==="phone"?r.isDark?80:B(r.primaryPalette):B(r.primaryPalette,0,90):r.variant===f.EXPRESSIVE?r.platform==="phone"?B(r.primaryPalette,0,F.isYellow(r.primaryPalette.hue)?25:F.isCyan(r.primaryPalette.hue)?88:98):B(r.primaryPalette):r.platform==="phone"?B(r.primaryPalette,0,F.isCyan(r.primaryPalette.hue)?88:98):B(r.primaryPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7),toneDeltaPair:r=>r.platform==="phone"?new q(this.primaryContainer(),this.primary(),5,"relative_lighter",true,"farther"):void 0});return E(super.primary(),"2025",t)}primaryDim(){return y.fromPalette({name:"primary_dim",palette:t=>t.primaryPalette,tone:t=>t.variant===f.NEUTRAL?85:t.variant===f.TONAL_SPOT?B(t.primaryPalette,0,90):B(t.primaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>I(4.5),toneDeltaPair:t=>new q(this.primaryDim(),this.primary(),5,"darker",true,"farther")})}onPrimary(){let t=y.fromPalette({name:"on_primary",palette:r=>r.primaryPalette,background:r=>r.platform==="phone"?this.primary():this.primaryDim(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onPrimary(),"2025",t)}primaryContainer(){let t=y.fromPalette({name:"primary_container",palette:r=>r.primaryPalette,tone:r=>r.platform==="watch"?30:r.variant===f.NEUTRAL?r.isDark?30:90:r.variant===f.TONAL_SPOT?r.isDark?Qe(r.primaryPalette,35,93):B(r.primaryPalette,0,90):r.variant===f.EXPRESSIVE?r.isDark?B(r.primaryPalette,30,93):B(r.primaryPalette,78,F.isCyan(r.primaryPalette.hue)?88:90):r.isDark?Qe(r.primaryPalette,66,93):B(r.primaryPalette,66,F.isCyan(r.primaryPalette.hue)?88:93),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="phone"?void 0:new q(this.primaryContainer(),this.primaryDim(),10,"darker",true,"farther"),contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.primaryContainer(),"2025",t)}onPrimaryContainer(){let t=y.fromPalette({name:"on_primary_container",palette:r=>r.primaryPalette,background:r=>this.primaryContainer(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onPrimaryContainer(),"2025",t)}primaryFixed(){let t=y.fromPalette({name:"primary_fixed",palette:r=>r.primaryPalette,tone:r=>{let l=Object.assign({},r,{isDark:false,contrastLevel:0});return this.primaryContainer().getTone(l)},isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.primaryFixed(),"2025",t)}primaryFixedDim(){let t=y.fromPalette({name:"primary_fixed_dim",palette:r=>r.primaryPalette,tone:r=>this.primaryFixed().getTone(r),isBackground:true,toneDeltaPair:r=>new q(this.primaryFixedDim(),this.primaryFixed(),5,"darker",true,"exact")});return E(super.primaryFixedDim(),"2025",t)}onPrimaryFixed(){let t=y.fromPalette({name:"on_primary_fixed",palette:r=>r.primaryPalette,background:r=>this.primaryFixedDim(),contrastCurve:r=>I(7)});return E(super.onPrimaryFixed(),"2025",t)}onPrimaryFixedVariant(){let t=y.fromPalette({name:"on_primary_fixed_variant",palette:r=>r.primaryPalette,background:r=>this.primaryFixedDim(),contrastCurve:r=>I(4.5)});return E(super.onPrimaryFixedVariant(),"2025",t)}inversePrimary(){let t=y.fromPalette({name:"inverse_primary",palette:r=>r.primaryPalette,tone:r=>B(r.primaryPalette),background:r=>this.inverseSurface(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.inversePrimary(),"2025",t)}secondary(){let t=y.fromPalette({name:"secondary",palette:r=>r.secondaryPalette,tone:r=>r.platform==="watch"?r.variant===f.NEUTRAL?90:B(r.secondaryPalette,0,90):r.variant===f.NEUTRAL?r.isDark?Qe(r.secondaryPalette,0,98):B(r.secondaryPalette):r.variant===f.VIBRANT?B(r.secondaryPalette,0,r.isDark?90:98):r.isDark?80:B(r.secondaryPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7),toneDeltaPair:r=>r.platform==="phone"?new q(this.secondaryContainer(),this.secondary(),5,"relative_lighter",true,"farther"):void 0});return E(super.secondary(),"2025",t)}secondaryDim(){return y.fromPalette({name:"secondary_dim",palette:t=>t.secondaryPalette,tone:t=>t.variant===f.NEUTRAL?85:B(t.secondaryPalette,0,90),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>I(4.5),toneDeltaPair:t=>new q(this.secondaryDim(),this.secondary(),5,"darker",true,"farther")})}onSecondary(){let t=y.fromPalette({name:"on_secondary",palette:r=>r.secondaryPalette,background:r=>r.platform==="phone"?this.secondary():this.secondaryDim(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onSecondary(),"2025",t)}secondaryContainer(){let t=y.fromPalette({name:"secondary_container",palette:r=>r.secondaryPalette,tone:r=>r.platform==="watch"?30:r.variant===f.VIBRANT?r.isDark?Qe(r.secondaryPalette,30,40):B(r.secondaryPalette,84,90):r.variant===f.EXPRESSIVE?r.isDark?15:B(r.secondaryPalette,90,95):r.isDark?25:90,isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="watch"?new q(this.secondaryContainer(),this.secondaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.secondaryContainer(),"2025",t)}onSecondaryContainer(){let t=y.fromPalette({name:"on_secondary_container",palette:r=>r.secondaryPalette,background:r=>this.secondaryContainer(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onSecondaryContainer(),"2025",t)}secondaryFixed(){let t=y.fromPalette({name:"secondary_fixed",palette:r=>r.secondaryPalette,tone:r=>{let l=Object.assign({},r,{isDark:false,contrastLevel:0});return this.secondaryContainer().getTone(l)},isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.secondaryFixed(),"2025",t)}secondaryFixedDim(){let t=y.fromPalette({name:"secondary_fixed_dim",palette:r=>r.secondaryPalette,tone:r=>this.secondaryFixed().getTone(r),isBackground:true,toneDeltaPair:r=>new q(this.secondaryFixedDim(),this.secondaryFixed(),5,"darker",true,"exact")});return E(super.secondaryFixedDim(),"2025",t)}onSecondaryFixed(){let t=y.fromPalette({name:"on_secondary_fixed",palette:r=>r.secondaryPalette,background:r=>this.secondaryFixedDim(),contrastCurve:r=>I(7)});return E(super.onSecondaryFixed(),"2025",t)}onSecondaryFixedVariant(){let t=y.fromPalette({name:"on_secondary_fixed_variant",palette:r=>r.secondaryPalette,background:r=>this.secondaryFixedDim(),contrastCurve:r=>I(4.5)});return E(super.onSecondaryFixedVariant(),"2025",t)}tertiary(){let t=y.fromPalette({name:"tertiary",palette:r=>r.tertiaryPalette,tone:r=>r.platform==="watch"?r.variant===f.TONAL_SPOT?B(r.tertiaryPalette,0,90):B(r.tertiaryPalette):r.variant===f.EXPRESSIVE||r.variant===f.VIBRANT?B(r.tertiaryPalette,0,F.isCyan(r.tertiaryPalette.hue)?88:r.isDark?98:100):r.isDark?B(r.tertiaryPalette,0,98):B(r.tertiaryPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7),toneDeltaPair:r=>r.platform==="phone"?new q(this.tertiaryContainer(),this.tertiary(),5,"relative_lighter",true,"farther"):void 0});return E(super.tertiary(),"2025",t)}tertiaryDim(){return y.fromPalette({name:"tertiary_dim",palette:t=>t.tertiaryPalette,tone:t=>t.variant===f.TONAL_SPOT?B(t.tertiaryPalette,0,90):B(t.tertiaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>I(4.5),toneDeltaPair:t=>new q(this.tertiaryDim(),this.tertiary(),5,"darker",true,"farther")})}onTertiary(){let t=y.fromPalette({name:"on_tertiary",palette:r=>r.tertiaryPalette,background:r=>r.platform==="phone"?this.tertiary():this.tertiaryDim(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onTertiary(),"2025",t)}tertiaryContainer(){let t=y.fromPalette({name:"tertiary_container",palette:r=>r.tertiaryPalette,tone:r=>r.platform==="watch"?r.variant===f.TONAL_SPOT?B(r.tertiaryPalette,0,90):B(r.tertiaryPalette):r.variant===f.NEUTRAL?r.isDark?B(r.tertiaryPalette,0,93):B(r.tertiaryPalette,0,96):r.variant===f.TONAL_SPOT?B(r.tertiaryPalette,0,r.isDark?93:100):r.variant===f.EXPRESSIVE?B(r.tertiaryPalette,75,F.isCyan(r.tertiaryPalette.hue)?88:r.isDark?93:100):r.isDark?B(r.tertiaryPalette,0,93):B(r.tertiaryPalette,72,100),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="watch"?new q(this.tertiaryContainer(),this.tertiaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.tertiaryContainer(),"2025",t)}onTertiaryContainer(){let t=y.fromPalette({name:"on_tertiary_container",palette:r=>r.tertiaryPalette,background:r=>this.tertiaryContainer(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onTertiaryContainer(),"2025",t)}tertiaryFixed(){let t=y.fromPalette({name:"tertiary_fixed",palette:r=>r.tertiaryPalette,tone:r=>{let l=Object.assign({},r,{isDark:false,contrastLevel:0});return this.tertiaryContainer().getTone(l)},isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.tertiaryFixed(),"2025",t)}tertiaryFixedDim(){let t=y.fromPalette({name:"tertiary_fixed_dim",palette:r=>r.tertiaryPalette,tone:r=>this.tertiaryFixed().getTone(r),isBackground:true,toneDeltaPair:r=>new q(this.tertiaryFixedDim(),this.tertiaryFixed(),5,"darker",true,"exact")});return E(super.tertiaryFixedDim(),"2025",t)}onTertiaryFixed(){let t=y.fromPalette({name:"on_tertiary_fixed",palette:r=>r.tertiaryPalette,background:r=>this.tertiaryFixedDim(),contrastCurve:r=>I(7)});return E(super.onTertiaryFixed(),"2025",t)}onTertiaryFixedVariant(){let t=y.fromPalette({name:"on_tertiary_fixed_variant",palette:r=>r.tertiaryPalette,background:r=>this.tertiaryFixedDim(),contrastCurve:r=>I(4.5)});return E(super.onTertiaryFixedVariant(),"2025",t)}error(){let t=y.fromPalette({name:"error",palette:r=>r.errorPalette,tone:r=>r.platform==="phone"?r.isDark?Qe(r.errorPalette,0,98):B(r.errorPalette):Qe(r.errorPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7),toneDeltaPair:r=>r.platform==="phone"?new q(this.errorContainer(),this.error(),5,"relative_lighter",true,"farther"):void 0});return E(super.error(),"2025",t)}errorDim(){return y.fromPalette({name:"error_dim",palette:t=>t.errorPalette,tone:t=>Qe(t.errorPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>I(4.5),toneDeltaPair:t=>new q(this.errorDim(),this.error(),5,"darker",true,"farther")})}onError(){let t=y.fromPalette({name:"on_error",palette:r=>r.errorPalette,background:r=>r.platform==="phone"?this.error():this.errorDim(),contrastCurve:r=>r.platform==="phone"?I(6):I(7)});return E(super.onError(),"2025",t)}errorContainer(){let t=y.fromPalette({name:"error_container",palette:r=>r.errorPalette,tone:r=>r.platform==="watch"?30:r.isDark?Qe(r.errorPalette,30,93):B(r.errorPalette,0,90),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="watch"?new q(this.errorContainer(),this.errorDim(),10,"darker",true,"farther"):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?I(1.5):void 0});return E(super.errorContainer(),"2025",t)}onErrorContainer(){let t=y.fromPalette({name:"on_error_container",palette:r=>r.errorPalette,background:r=>this.errorContainer(),contrastCurve:r=>r.platform==="phone"?I(4.5):I(7)});return E(super.onErrorContainer(),"2025",t)}surfaceVariant(){let t=Object.assign(this.surfaceContainerHighest().clone(),{name:"surface_variant"});return E(super.surfaceVariant(),"2025",t)}surfaceTint(){let t=Object.assign(this.primary().clone(),{name:"surface_tint"});return E(super.surfaceTint(),"2025",t)}background(){let t=Object.assign(this.surface().clone(),{name:"background"});return E(super.background(),"2025",t)}onBackground(){let t=Object.assign(this.onSurface().clone(),{name:"on_background",tone:r=>r.platform==="watch"?100:this.onSurface().getTone(r)});return E(super.onBackground(),"2025",t)}};var b=class i{constructor(){this.allColors=[this.background(),this.onBackground(),this.surface(),this.surfaceDim(),this.surfaceBright(),this.surfaceContainerLowest(),this.surfaceContainerLow(),this.surfaceContainer(),this.surfaceContainerHigh(),this.surfaceContainerHighest(),this.onSurface(),this.onSurfaceVariant(),this.outline(),this.outlineVariant(),this.inverseSurface(),this.inverseOnSurface(),this.primary(),this.primaryDim(),this.onPrimary(),this.primaryContainer(),this.onPrimaryContainer(),this.primaryFixed(),this.primaryFixedDim(),this.onPrimaryFixed(),this.onPrimaryFixedVariant(),this.inversePrimary(),this.secondary(),this.secondaryDim(),this.onSecondary(),this.secondaryContainer(),this.onSecondaryContainer(),this.secondaryFixed(),this.secondaryFixedDim(),this.onSecondaryFixed(),this.onSecondaryFixedVariant(),this.tertiary(),this.tertiaryDim(),this.onTertiary(),this.tertiaryContainer(),this.onTertiaryContainer(),this.tertiaryFixed(),this.tertiaryFixedDim(),this.onTertiaryFixed(),this.onTertiaryFixedVariant(),this.error(),this.errorDim(),this.onError(),this.errorContainer(),this.onErrorContainer()].filter(t=>t!==void 0);}highestSurface(t){return i.colorSpec.highestSurface(t)}primaryPaletteKeyColor(){return i.colorSpec.primaryPaletteKeyColor()}secondaryPaletteKeyColor(){return i.colorSpec.secondaryPaletteKeyColor()}tertiaryPaletteKeyColor(){return i.colorSpec.tertiaryPaletteKeyColor()}neutralPaletteKeyColor(){return i.colorSpec.neutralPaletteKeyColor()}neutralVariantPaletteKeyColor(){return i.colorSpec.neutralVariantPaletteKeyColor()}errorPaletteKeyColor(){return i.colorSpec.errorPaletteKeyColor()}background(){return i.colorSpec.background()}onBackground(){return i.colorSpec.onBackground()}surface(){return i.colorSpec.surface()}surfaceDim(){return i.colorSpec.surfaceDim()}surfaceBright(){return i.colorSpec.surfaceBright()}surfaceContainerLowest(){return i.colorSpec.surfaceContainerLowest()}surfaceContainerLow(){return i.colorSpec.surfaceContainerLow()}surfaceContainer(){return i.colorSpec.surfaceContainer()}surfaceContainerHigh(){return i.colorSpec.surfaceContainerHigh()}surfaceContainerHighest(){return i.colorSpec.surfaceContainerHighest()}onSurface(){return i.colorSpec.onSurface()}surfaceVariant(){return i.colorSpec.surfaceVariant()}onSurfaceVariant(){return i.colorSpec.onSurfaceVariant()}outline(){return i.colorSpec.outline()}outlineVariant(){return i.colorSpec.outlineVariant()}inverseSurface(){return i.colorSpec.inverseSurface()}inverseOnSurface(){return i.colorSpec.inverseOnSurface()}shadow(){return i.colorSpec.shadow()}scrim(){return i.colorSpec.scrim()}surfaceTint(){return i.colorSpec.surfaceTint()}primary(){return i.colorSpec.primary()}primaryDim(){return i.colorSpec.primaryDim()}onPrimary(){return i.colorSpec.onPrimary()}primaryContainer(){return i.colorSpec.primaryContainer()}onPrimaryContainer(){return i.colorSpec.onPrimaryContainer()}inversePrimary(){return i.colorSpec.inversePrimary()}primaryFixed(){return i.colorSpec.primaryFixed()}primaryFixedDim(){return i.colorSpec.primaryFixedDim()}onPrimaryFixed(){return i.colorSpec.onPrimaryFixed()}onPrimaryFixedVariant(){return i.colorSpec.onPrimaryFixedVariant()}secondary(){return i.colorSpec.secondary()}secondaryDim(){return i.colorSpec.secondaryDim()}onSecondary(){return i.colorSpec.onSecondary()}secondaryContainer(){return i.colorSpec.secondaryContainer()}onSecondaryContainer(){return i.colorSpec.onSecondaryContainer()}secondaryFixed(){return i.colorSpec.secondaryFixed()}secondaryFixedDim(){return i.colorSpec.secondaryFixedDim()}onSecondaryFixed(){return i.colorSpec.onSecondaryFixed()}onSecondaryFixedVariant(){return i.colorSpec.onSecondaryFixedVariant()}tertiary(){return i.colorSpec.tertiary()}tertiaryDim(){return i.colorSpec.tertiaryDim()}onTertiary(){return i.colorSpec.onTertiary()}tertiaryContainer(){return i.colorSpec.tertiaryContainer()}onTertiaryContainer(){return i.colorSpec.onTertiaryContainer()}tertiaryFixed(){return i.colorSpec.tertiaryFixed()}tertiaryFixedDim(){return i.colorSpec.tertiaryFixedDim()}onTertiaryFixed(){return i.colorSpec.onTertiaryFixed()}onTertiaryFixedVariant(){return i.colorSpec.onTertiaryFixedVariant()}error(){return i.colorSpec.error()}errorDim(){return i.colorSpec.errorDim()}onError(){return i.colorSpec.onError()}errorContainer(){return i.colorSpec.errorContainer()}onErrorContainer(){return i.colorSpec.onErrorContainer()}static highestSurface(t){return i.colorSpec.highestSurface(t)}};b.contentAccentToneDelta=15;b.colorSpec=new hr;b.primaryPaletteKeyColor=b.colorSpec.primaryPaletteKeyColor();b.secondaryPaletteKeyColor=b.colorSpec.secondaryPaletteKeyColor();b.tertiaryPaletteKeyColor=b.colorSpec.tertiaryPaletteKeyColor();b.neutralPaletteKeyColor=b.colorSpec.neutralPaletteKeyColor();b.neutralVariantPaletteKeyColor=b.colorSpec.neutralVariantPaletteKeyColor();b.background=b.colorSpec.background();b.onBackground=b.colorSpec.onBackground();b.surface=b.colorSpec.surface();b.surfaceDim=b.colorSpec.surfaceDim();b.surfaceBright=b.colorSpec.surfaceBright();b.surfaceContainerLowest=b.colorSpec.surfaceContainerLowest();b.surfaceContainerLow=b.colorSpec.surfaceContainerLow();b.surfaceContainer=b.colorSpec.surfaceContainer();b.surfaceContainerHigh=b.colorSpec.surfaceContainerHigh();b.surfaceContainerHighest=b.colorSpec.surfaceContainerHighest();b.onSurface=b.colorSpec.onSurface();b.surfaceVariant=b.colorSpec.surfaceVariant();b.onSurfaceVariant=b.colorSpec.onSurfaceVariant();b.inverseSurface=b.colorSpec.inverseSurface();b.inverseOnSurface=b.colorSpec.inverseOnSurface();b.outline=b.colorSpec.outline();b.outlineVariant=b.colorSpec.outlineVariant();b.shadow=b.colorSpec.shadow();b.scrim=b.colorSpec.scrim();b.surfaceTint=b.colorSpec.surfaceTint();b.primary=b.colorSpec.primary();b.onPrimary=b.colorSpec.onPrimary();b.primaryContainer=b.colorSpec.primaryContainer();b.onPrimaryContainer=b.colorSpec.onPrimaryContainer();b.inversePrimary=b.colorSpec.inversePrimary();b.secondary=b.colorSpec.secondary();b.onSecondary=b.colorSpec.onSecondary();b.secondaryContainer=b.colorSpec.secondaryContainer();b.onSecondaryContainer=b.colorSpec.onSecondaryContainer();b.tertiary=b.colorSpec.tertiary();b.onTertiary=b.colorSpec.onTertiary();b.tertiaryContainer=b.colorSpec.tertiaryContainer();b.onTertiaryContainer=b.colorSpec.onTertiaryContainer();b.error=b.colorSpec.error();b.onError=b.colorSpec.onError();b.errorContainer=b.colorSpec.errorContainer();b.onErrorContainer=b.colorSpec.onErrorContainer();b.primaryFixed=b.colorSpec.primaryFixed();b.primaryFixedDim=b.colorSpec.primaryFixedDim();b.onPrimaryFixed=b.colorSpec.onPrimaryFixed();b.onPrimaryFixedVariant=b.colorSpec.onPrimaryFixedVariant();b.secondaryFixed=b.colorSpec.secondaryFixed();b.secondaryFixedDim=b.colorSpec.secondaryFixedDim();b.onSecondaryFixed=b.colorSpec.onSecondaryFixed();b.onSecondaryFixedVariant=b.colorSpec.onSecondaryFixedVariant();b.tertiaryFixed=b.colorSpec.tertiaryFixed();b.tertiaryFixedDim=b.colorSpec.tertiaryFixedDim();b.onTertiaryFixed=b.colorSpec.onTertiaryFixed();b.onTertiaryFixedVariant=b.colorSpec.onTertiaryFixedVariant();var J=class i{static maybeFallbackSpecVersion(t,r){switch(r){case f.EXPRESSIVE:case f.VIBRANT:case f.TONAL_SPOT:case f.NEUTRAL:return t;default:return "2021"}}constructor(t){this.sourceColorArgb=t.sourceColorHct.toInt(),this.variant=t.variant,this.contrastLevel=t.contrastLevel,this.isDark=t.isDark,this.platform=t.platform??"phone",this.specVersion=i.maybeFallbackSpecVersion(t.specVersion??"2021",this.variant),this.sourceColorHct=t.sourceColorHct,this.primaryPalette=t.primaryPalette??vt(this.specVersion).getPrimaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.secondaryPalette=t.secondaryPalette??vt(this.specVersion).getSecondaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.tertiaryPalette=t.tertiaryPalette??vt(this.specVersion).getTertiaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralPalette=t.neutralPalette??vt(this.specVersion).getNeutralPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralVariantPalette=t.neutralVariantPalette??vt(this.specVersion).getNeutralVariantPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.errorPalette=t.errorPalette??vt(this.specVersion).getErrorPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel)??_.fromHueAndChroma(25,84),this.colors=new b;}toString(){return `Scheme: variant=${f[this.variant]}, mode=${this.isDark?"dark":"light"}, platform=${this.platform}, contrastLevel=${this.contrastLevel.toFixed(1)}, seed=${this.sourceColorHct.toString()}, specVersion=${this.specVersion}`}static getPiecewiseHue(t,r,l){let c=Math.min(r.length-1,l.length),d=t.hue;for(let h=0;h<c;h++)if(d>=r[h]&&d<r[h+1])return he(l[h]);return d}static getRotatedHue(t,r,l){let c=i.getPiecewiseHue(t,r,l);return Math.min(r.length-1,l.length)<=0&&(c=0),he(t.hue+c)}getArgb(t){return t.getArgb(this)}getHct(t){return t.getHct(this)}get primaryPaletteKeyColor(){return this.getArgb(this.colors.primaryPaletteKeyColor())}get secondaryPaletteKeyColor(){return this.getArgb(this.colors.secondaryPaletteKeyColor())}get tertiaryPaletteKeyColor(){return this.getArgb(this.colors.tertiaryPaletteKeyColor())}get neutralPaletteKeyColor(){return this.getArgb(this.colors.neutralPaletteKeyColor())}get neutralVariantPaletteKeyColor(){return this.getArgb(this.colors.neutralVariantPaletteKeyColor())}get errorPaletteKeyColor(){return this.getArgb(this.colors.errorPaletteKeyColor())}get background(){return this.getArgb(this.colors.background())}get onBackground(){return this.getArgb(this.colors.onBackground())}get surface(){return this.getArgb(this.colors.surface())}get surfaceDim(){return this.getArgb(this.colors.surfaceDim())}get surfaceBright(){return this.getArgb(this.colors.surfaceBright())}get surfaceContainerLowest(){return this.getArgb(this.colors.surfaceContainerLowest())}get surfaceContainerLow(){return this.getArgb(this.colors.surfaceContainerLow())}get surfaceContainer(){return this.getArgb(this.colors.surfaceContainer())}get surfaceContainerHigh(){return this.getArgb(this.colors.surfaceContainerHigh())}get surfaceContainerHighest(){return this.getArgb(this.colors.surfaceContainerHighest())}get onSurface(){return this.getArgb(this.colors.onSurface())}get surfaceVariant(){return this.getArgb(this.colors.surfaceVariant())}get onSurfaceVariant(){return this.getArgb(this.colors.onSurfaceVariant())}get inverseSurface(){return this.getArgb(this.colors.inverseSurface())}get inverseOnSurface(){return this.getArgb(this.colors.inverseOnSurface())}get outline(){return this.getArgb(this.colors.outline())}get outlineVariant(){return this.getArgb(this.colors.outlineVariant())}get shadow(){return this.getArgb(this.colors.shadow())}get scrim(){return this.getArgb(this.colors.scrim())}get surfaceTint(){return this.getArgb(this.colors.surfaceTint())}get primary(){return this.getArgb(this.colors.primary())}get primaryDim(){let t=this.colors.primaryDim();if(t===void 0)throw new Error("`primaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onPrimary(){return this.getArgb(this.colors.onPrimary())}get primaryContainer(){return this.getArgb(this.colors.primaryContainer())}get onPrimaryContainer(){return this.getArgb(this.colors.onPrimaryContainer())}get primaryFixed(){return this.getArgb(this.colors.primaryFixed())}get primaryFixedDim(){return this.getArgb(this.colors.primaryFixedDim())}get onPrimaryFixed(){return this.getArgb(this.colors.onPrimaryFixed())}get onPrimaryFixedVariant(){return this.getArgb(this.colors.onPrimaryFixedVariant())}get inversePrimary(){return this.getArgb(this.colors.inversePrimary())}get secondary(){return this.getArgb(this.colors.secondary())}get secondaryDim(){let t=this.colors.secondaryDim();if(t===void 0)throw new Error("`secondaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onSecondary(){return this.getArgb(this.colors.onSecondary())}get secondaryContainer(){return this.getArgb(this.colors.secondaryContainer())}get onSecondaryContainer(){return this.getArgb(this.colors.onSecondaryContainer())}get secondaryFixed(){return this.getArgb(this.colors.secondaryFixed())}get secondaryFixedDim(){return this.getArgb(this.colors.secondaryFixedDim())}get onSecondaryFixed(){return this.getArgb(this.colors.onSecondaryFixed())}get onSecondaryFixedVariant(){return this.getArgb(this.colors.onSecondaryFixedVariant())}get tertiary(){return this.getArgb(this.colors.tertiary())}get tertiaryDim(){let t=this.colors.tertiaryDim();if(t===void 0)throw new Error("`tertiaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onTertiary(){return this.getArgb(this.colors.onTertiary())}get tertiaryContainer(){return this.getArgb(this.colors.tertiaryContainer())}get onTertiaryContainer(){return this.getArgb(this.colors.onTertiaryContainer())}get tertiaryFixed(){return this.getArgb(this.colors.tertiaryFixed())}get tertiaryFixedDim(){return this.getArgb(this.colors.tertiaryFixedDim())}get onTertiaryFixed(){return this.getArgb(this.colors.onTertiaryFixed())}get onTertiaryFixedVariant(){return this.getArgb(this.colors.onTertiaryFixedVariant())}get error(){return this.getArgb(this.colors.error())}get errorDim(){let t=this.colors.errorDim();if(t===void 0)throw new Error("`errorDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onError(){return this.getArgb(this.colors.onError())}get errorContainer(){return this.getArgb(this.colors.errorContainer())}get onErrorContainer(){return this.getArgb(this.colors.onErrorContainer())}};J.DEFAULT_SPEC_VERSION="2021";J.DEFAULT_PLATFORM="phone";var fr=class{getPrimaryPalette(t,r,l,c,d){switch(t){case f.CONTENT:case f.FIDELITY:return _.fromHueAndChroma(r.hue,r.chroma);case f.FRUIT_SALAD:return _.fromHueAndChroma(he(r.hue-50),48);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,12);case f.RAINBOW:return _.fromHueAndChroma(r.hue,48);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,36);case f.EXPRESSIVE:return _.fromHueAndChroma(he(r.hue+240),40);case f.VIBRANT:return _.fromHueAndChroma(r.hue,200);default:throw new Error(`Unsupported variant: ${t}`)}}getSecondaryPalette(t,r,l,c,d){switch(t){case f.CONTENT:case f.FIDELITY:return _.fromHueAndChroma(r.hue,Math.max(r.chroma-32,r.chroma*.5));case f.FRUIT_SALAD:return _.fromHueAndChroma(he(r.hue-50),36);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,8);case f.RAINBOW:return _.fromHueAndChroma(r.hue,16);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,16);case f.EXPRESSIVE:return _.fromHueAndChroma(J.getRotatedHue(r,[0,21,51,121,151,191,271,321,360],[45,95,45,20,45,90,45,45,45]),24);case f.VIBRANT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,41,61,101,131,181,251,301,360],[18,15,10,12,15,18,15,12,12]),24);default:throw new Error(`Unsupported variant: ${t}`)}}getTertiaryPalette(t,r,l,c,d){switch(t){case f.CONTENT:return _.fromHct(lt.fixIfDisliked(new Vt(r).analogous(3,6)[2]));case f.FIDELITY:return _.fromHct(lt.fixIfDisliked(new Vt(r).complement));case f.FRUIT_SALAD:return _.fromHueAndChroma(r.hue,36);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,16);case f.RAINBOW:case f.TONAL_SPOT:return _.fromHueAndChroma(he(r.hue+60),24);case f.EXPRESSIVE:return _.fromHueAndChroma(J.getRotatedHue(r,[0,21,51,121,151,191,271,321,360],[120,120,20,45,20,15,20,120,120]),32);case f.VIBRANT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,41,61,101,131,181,251,301,360],[35,30,20,25,30,35,30,25,25]),32);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralPalette(t,r,l,c,d){switch(t){case f.CONTENT:case f.FIDELITY:return _.fromHueAndChroma(r.hue,r.chroma/8);case f.FRUIT_SALAD:return _.fromHueAndChroma(r.hue,10);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,2);case f.RAINBOW:return _.fromHueAndChroma(r.hue,0);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,6);case f.EXPRESSIVE:return _.fromHueAndChroma(he(r.hue+15),8);case f.VIBRANT:return _.fromHueAndChroma(r.hue,10);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralVariantPalette(t,r,l,c,d){switch(t){case f.CONTENT:return _.fromHueAndChroma(r.hue,r.chroma/8+4);case f.FIDELITY:return _.fromHueAndChroma(r.hue,r.chroma/8+4);case f.FRUIT_SALAD:return _.fromHueAndChroma(r.hue,16);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,2);case f.RAINBOW:return _.fromHueAndChroma(r.hue,0);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,8);case f.EXPRESSIVE:return _.fromHueAndChroma(he(r.hue+15),12);case f.VIBRANT:return _.fromHueAndChroma(r.hue,12);default:throw new Error(`Unsupported variant: ${t}`)}}getErrorPalette(t,r,l,c,d){}},Kr=class i extends fr{getPrimaryPalette(t,r,l,c,d){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,c==="phone"?F.isBlue(r.hue)?12:8:F.isBlue(r.hue)?16:12);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,c==="phone"&&l?26:32);case f.EXPRESSIVE:return _.fromHueAndChroma(r.hue,c==="phone"?l?36:48:40);case f.VIBRANT:return _.fromHueAndChroma(r.hue,c==="phone"?74:56);default:return super.getPrimaryPalette(t,r,l,c,d)}}getSecondaryPalette(t,r,l,c,d){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,c==="phone"?F.isBlue(r.hue)?6:4:F.isBlue(r.hue)?10:6);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,16);case f.EXPRESSIVE:return _.fromHueAndChroma(J.getRotatedHue(r,[0,105,140,204,253,278,300,333,360],[-160,155,-100,96,-96,-156,-165,-160]),c==="phone"&&l?16:24);case f.VIBRANT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,38,105,140,333,360],[-14,10,-14,10,-14]),c==="phone"?56:36);default:return super.getSecondaryPalette(t,r,l,c,d)}}getTertiaryPalette(t,r,l,c,d){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(J.getRotatedHue(r,[0,38,105,161,204,278,333,360],[-32,26,10,-39,24,-15,-32]),c==="phone"?20:36);case f.TONAL_SPOT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,20,71,161,333,360],[-40,48,-32,40,-32]),c==="phone"?28:32);case f.EXPRESSIVE:return _.fromHueAndChroma(J.getRotatedHue(r,[0,105,140,204,253,278,300,333,360],[-165,160,-105,101,-101,-160,-170,-165]),48);case f.VIBRANT:return _.fromHueAndChroma(J.getRotatedHue(r,[0,38,71,105,140,161,253,333,360],[-72,35,24,-24,62,50,62,-72]),56);default:return super.getTertiaryPalette(t,r,l,c,d)}}static getExpressiveNeutralHue(t){return J.getRotatedHue(t,[0,71,124,253,278,300,360],[10,0,10,0,10,0])}static getExpressiveNeutralChroma(t,r,l){let c=i.getExpressiveNeutralHue(t);return l==="phone"?r?F.isYellow(c)?6:14:18:12}static getVibrantNeutralHue(t){return J.getRotatedHue(t,[0,38,105,140,333,360],[-14,10,-14,10,-14])}static getVibrantNeutralChroma(t,r){let l=i.getVibrantNeutralHue(t);return r==="phone"||F.isBlue(l)?28:20}getNeutralPalette(t,r,l,c,d){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,c==="phone"?1.4:6);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,c==="phone"?5:10);case f.EXPRESSIVE:return _.fromHueAndChroma(i.getExpressiveNeutralHue(r),i.getExpressiveNeutralChroma(r,l,c));case f.VIBRANT:return _.fromHueAndChroma(i.getVibrantNeutralHue(r),i.getVibrantNeutralChroma(r,c));default:return super.getNeutralPalette(t,r,l,c,d)}}getNeutralVariantPalette(t,r,l,c,d){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,(c==="phone"?1.4:6)*2.2);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,(c==="phone"?5:10)*1.7);case f.EXPRESSIVE:let h=i.getExpressiveNeutralHue(r),p=i.getExpressiveNeutralChroma(r,l,c);return _.fromHueAndChroma(h,p*(h>=105&&h<125?1.6:2.3));case f.VIBRANT:let x=i.getVibrantNeutralHue(r),w=i.getVibrantNeutralChroma(r,c);return _.fromHueAndChroma(x,w*1.29);default:return super.getNeutralVariantPalette(t,r,l,c,d)}}getErrorPalette(t,r,l,c,d){let h=J.getPiecewiseHue(r,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);switch(t){case f.NEUTRAL:return _.fromHueAndChroma(h,c==="phone"?50:40);case f.TONAL_SPOT:return _.fromHueAndChroma(h,c==="phone"?60:48);case f.EXPRESSIVE:return _.fromHueAndChroma(h,c==="phone"?64:48);case f.VIBRANT:return _.fromHueAndChroma(h,c==="phone"?80:60);default:return super.getErrorPalette(t,r,l,c,d)}}},vl=new fr,xl=new Kr;function vt(i){return i==="2025"?xl:vl}var mr=class extends J{constructor(t,r,l,c=J.DEFAULT_SPEC_VERSION,d=J.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:f.VIBRANT,contrastLevel:l,isDark:r,platform:d,specVersion:c});}};function Xr(i){let t=Et(i),r=Nt(i),l=Lt(i),c=[t.toString(16),r.toString(16),l.toString(16)];for(let[d,h]of c.entries())h.length===1&&(c[d]="0"+h);return "#"+c.join("")}function na(i){i=i.replace("#","");let t=i.length===3,r=i.length===6,l=i.length===8;if(!t&&!r&&!l)throw new Error("unexpected hex "+i);let c=0,d=0,h=0;return t?(c=$e(i.slice(0,1).repeat(2)),d=$e(i.slice(1,2).repeat(2)),h=$e(i.slice(2,3).repeat(2))):r?(c=$e(i.slice(0,2)),d=$e(i.slice(2,4)),h=$e(i.slice(4,6))):l&&(c=$e(i.slice(2,4)),d=$e(i.slice(4,6)),h=$e(i.slice(6,8))),(255<<24|(c&255)<<16|(d&255)<<8|h&255)>>>0}function $e(i){return parseInt(i,16)}function xt(i,t){let r=F.fromInt(na(i)),l=new mr(r,t,0),c={},d=["primary","onPrimary","primaryContainer","onPrimaryContainer","secondary","onSecondary","secondaryContainer","onSecondaryContainer","tertiary","onTertiary","tertiaryContainer","onTertiaryContainer","error","onError","errorContainer","onErrorContainer","background","onBackground","surface","onSurface","surfaceVariant","onSurfaceVariant","outline","outlineVariant","shadow","scrim","inverseSurface","inverseOnSurface","inversePrimary","surfaceDim","surfaceBright","surfaceContainerLowest","surfaceContainerLow","surfaceContainer","surfaceContainerHigh","surfaceContainerHighest"];for(let h of d){let p=b[h];p&&(c[h]=Xr(p.getArgb(l)));}return c}function et(i,t){let r=i.replace("#",""),l=parseInt(r.substring(0,2),16),c=parseInt(r.substring(2,4),16),d=parseInt(r.substring(4,6),16);return `rgba(${l}, ${c}, ${d}, ${t})`}function aa(i,t){let r=0,l=0,c=0;return i.length===4?(r=parseInt(i[1]+i[1],16),l=parseInt(i[2]+i[2],16),c=parseInt(i[3]+i[3],16)):i.length===7&&(r=parseInt(i.slice(1,3),16),l=parseInt(i.slice(3,5),16),c=parseInt(i.slice(5,7),16)),`rgba(${r}, ${l}, ${c}, ${t})`}function Ld(i){let t=i.replace("#",""),r=parseInt(t.substring(0,2),16),l=parseInt(t.substring(2,4),16),c=parseInt(t.substring(4,6),16);return .2126*r+.7152*l+.0722*c<128}var ia=createContext(null),Ml=xt("#6750A4",false),Hd=({children:i,seedColor:t="#6750A4",defaultColorScheme:r="auto"})=>{let l=useRef(t),[c,d]=useState(r),[h,p]=useState(()=>{let w=r==="dark";return r==="auto"&&typeof window<"u"&&(w=window.matchMedia("(prefers-color-scheme: dark)").matches),xt(l.current,w)});useEffect(()=>{if(c==="auto"&&typeof window<"u"){let w=window.matchMedia("(prefers-color-scheme: dark)"),k=S=>{p(xt(l.current,S.matches));};return w.addEventListener("change",k),()=>w.removeEventListener("change",k)}},[c]);let x=useMemo(()=>({themeColors:h,systemTheme:c,setThemeColors:w=>{l.current=w;let k=c==="dark";c==="auto"&&(k=typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:false),p(xt(w,k));},setColorScheme:w=>{d(w);let k=w==="dark";w==="auto"&&(k=typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:false),p(xt(l.current,k));}}),[h,c]);return jsx(ia.Provider,{value:x,children:i})},kt=()=>{let i=useContext(ia);return i||{themeColors:Ml,systemTheme:"auto",setThemeColors:()=>{throw new Error("[@zaide6137/m3-components-web] Wrap your app in <ThemeProvider>.")},setColorScheme:()=>{throw new Error("[@zaide6137/m3-components-web] Wrap your app in <ThemeProvider>.")}}};var yr=$n(Jr());var Qr=$n(Jr());var sa=forwardRef((i,t)=>{let{className:r,shape:l,type:c,hoverEffect:d=true,text:h,icon:p,onClick:x,disabled:w,loading:k=false}=i,{themeColors:S}=kt(),D=w?c==="filled"?{backgroundColor:et(S.onSurface,.12),color:et(S.onSurface,.38),border:"none"}:{backgroundColor:"transparent",color:et(S.onSurface,.38),border:`1px solid ${et(S.onSurface,.12)}`}:c==="filled"?{backgroundColor:S.primary,color:S.onPrimary,border:"none"}:{backgroundColor:"transparent",color:S.primary,border:`1px solid ${S.primary}`},C=40,m=l==="rounded-full"?32:l==="rounded-lg"?12:l==="rounded-md"?8:4;return jsx(motion.button,{disabled:w||k,onClick:!w&&!k?x:void 0,className:`${r||""} m3-components-button`,style:{backgroundColor:D.backgroundColor,color:D.color,border:D.border,borderRadius:"40px"},initial:{borderRadius:C},animate:{borderRadius:C},whileHover:!w&&!k&&d?{borderRadius:m,backgroundColor:c==="outlined"?et(S.primary,.08):S.primary}:{},transition:{ease:["easeIn","easeOut"],duration:.2},children:jsxs("div",{className:"m3-components-button-content",children:[k&&jsx("span",{style:{marginRight:"4px"},children:"... "}),p&&jsx("span",{className:"m3-components-button-icon",children:p}),jsx("span",{className:"m3-components-button-text",children:h})]})})});var la=({date:i,onPrev:t,onNext:r,onToday:l,view:c,onViewChange:d})=>{let{themeColors:h}=kt(),[p,x]=useState(false),w=(0, Qr.default)(),k=w.format("MMM").toUpperCase(),S=w.format("DD"),D=(0, Qr.default)(i).format("MMMM YYYY"),C=Math.ceil(w.date()/7),m=c.charAt(0).toUpperCase()+c.slice(1);return jsxs("div",{className:"m3-components-bigcalendar-toolbar",children:[jsxs("div",{className:"m3-components-bigcalendar-toolbar-w1",children:[jsxs("div",{className:"m3-components-bigcalendar-toolbar-date-box",style:{backgroundColor:h.surfaceContainerLowest,borderColor:h.outlineVariant},children:[jsx("div",{className:"m3-components-bigcalendar-toolbar-w2",style:{backgroundColor:h.primary},children:jsx("span",{className:"m3-components-bigcalendar-toolbar-date-month",style:{color:h.onPrimary},children:k})}),jsx("span",{className:"m3-components-bigcalendar-toolbar-date-day",style:{color:h.onSurface},children:S})]}),jsxs("div",{className:"m3-components-bigcalendar-toolbar-w3",children:[jsx("div",{className:"m3-components-bigcalendar-toolbar-w4",children:jsx("div",{className:"m3-components-bigcalendar-toolbar-w5",children:jsx("h1",{className:"m3-components-bigcalendar-toolbar-title",style:{color:h.onSurface},children:D})})}),jsxs("span",{className:"m3-components-bigcalendar-toolbar-week-badge",style:{color:h.onSurfaceVariant,borderColor:h.outlineVariant},children:["Week ",C]})]})]}),jsxs("div",{className:"m3-components-bigcalendar-toolbar-w6",children:[jsxs("div",{className:"m3-components-bigcalendar-toolbar-nav-group",style:{borderColor:h.outlineVariant},children:[jsx("button",{onClick:t,className:"m3-components-bigcalendar-toolbar-nav-prev",style:{borderColor:h.outlineVariant,color:h.onSurface},children:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"m3-components-bigcalendar-toolbar-nav-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),jsx("button",{onClick:l,className:"m3-components-bigcalendar-toolbar-nav-today",style:{color:h.onSurface},children:"Today"}),jsx("button",{onClick:r,className:"m3-components-bigcalendar-toolbar-nav-next",style:{borderColor:h.outlineVariant,color:h.onSurface},children:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"m3-components-bigcalendar-toolbar-nav-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})})]}),jsxs("div",{className:"m3-components-bigcalendar-toolbar-w7",children:[jsxs("button",{onClick:()=>x(!p),className:"m3-components-bigcalendar-toolbar-dropdown-btn",style:{borderColor:h.outlineVariant,color:h.onSurface},children:[jsx("span",{className:"m3-components-bigcalendar-toolbar-dropdown-label",children:"View by:"}),m,jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:`m3-components-bigcalendar-toolbar-dropdown-icon ${p?"rotate-180":""}`,children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})]}),jsx(AnimatePresence,{children:p&&jsxs(Fragment,{children:[jsx("div",{className:"m3-components-bigcalendar-toolbar-dropdown-backdrop",onClick:()=>x(false)}),jsx(motion.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.15},className:"m3-components-bigcalendar-toolbar-dropdown-menu",style:{backgroundColor:h.surfaceContainerHigh,borderColor:h.outlineVariant},children:["month","week","day"].map(v=>jsx("button",{onClick:()=>{d(v),x(false);},className:"m3-components-bigcalendar-toolbar-dropdown-item",style:{color:c===v?h.primary:h.onSurface},children:v.charAt(0).toUpperCase()+v.slice(1)},v))})]})})]}),jsx(sa,{type:"filled",shape:"rounded-lg",text:"+ Create",onClick:()=>{}})]})]})};var da=({event:i,onMouseEnter:t,onMouseLeave:r})=>{let l=i.resource,c=l.eventStyleFilled??true,d=l.eventStyle||{backgroundColor:l.eventSeedColor||"#6750A4",contentColor:"#FFFFFF"},h=c?d.backgroundColor:et(d.backgroundColor,.15),p=c?"transparent":d.backgroundColor,x=c?d.contentColor:d.backgroundColor,w=useRef(null),[k,S]=useState(1e3);useEffect(()=>{if(!w.current)return;let v=new ResizeObserver(T=>{window.requestAnimationFrame(()=>{T[0]&&S(T[0].contentRect.width);});});return v.observe(w.current),()=>v.disconnect()},[]);let D=k<120,C=k>=180;return jsx("div",{ref:w,className:"m3-components-bigcalendar-event",children:D?jsx(motion.div,{className:"m3-components-bigcalendar-event-dot",onMouseEnter:v=>t(v,l),onMouseLeave:r,style:{backgroundColor:h,borderColor:p==="transparent"?d.backgroundColor:p}}):jsx(motion.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},onMouseEnter:v=>t(v,l),onMouseLeave:r,className:"m3-components-bigcalendar-event-chip",style:{backgroundColor:h,color:x,border:c?"none":`1.5px solid ${p}`},children:jsxs("div",{className:"m3-components-bigcalendar-event-content",children:[jsx("span",{className:"m3-components-bigcalendar-event-title",children:i.title}),C&&jsxs("span",{className:"m3-components-bigcalendar-event-time",children:[i.start.toLocaleString("en-US",{hour:"numeric",minute:"2-digit",hour12:true}),i.end&&i.end instanceof Date&&!isNaN(i.end.getTime())&&` - ${i.end.toLocaleString("en-US",{hour:"numeric",minute:"2-digit",hour12:true})}`]}),l.eventTrailingIcon&&jsx("div",{className:"",style:{color:x},children:l.eventTrailingIcon})]})})})};var Ph=forwardRef((i,t)=>{let{currentDate:r,filterOptions:l,events:c,toolBar:d,filterBar:h,filterBy:p,backgroundMode:x,defaultView:w="month",enableAnimations:k=true,slideVariants:S={enter:L=>({x:L>0?"10%":"-10%",opacity:0}),center:{zIndex:1,x:0,opacity:1},exit:L=>({zIndex:0,x:L<0?"10%":"-10%",opacity:0})},transition:D={type:"spring",stiffness:300,damping:30,opacity:{duration:.2}},onEventClicked:C}=i,{themeColors:m}=kt(),v=r?new Date(r):new Date,T=momentLocalizer(yr.default),Y=useMemo(()=>c?c.filter(L=>!p||p.length===0||p.includes("All")?true:p.every(me=>L.eventCategory?.includes(me))).map(L=>{let{eventTitle:me,eventStart:Oe,eventEnd:ke,...fe}=L;return {title:me,start:new Date(Oe),end:new Date(ke),resource:fe}}):[],[c,p]),H=useMemo(()=>({event:L=>jsx(da,{...L,onMouseEnter:()=>{},onMouseLeave:()=>{}})}),[]),[X,Z]=useState(0),[$,V]=useState(v),[z,U]=useState(w),[ne,ee]=useState(l),oe=()=>{Z(-1),V((0, yr.default)($).subtract(1,z).toDate());},be=()=>{Z(1),V((0, yr.default)($).add(1,z).toDate());},we=()=>{Z(0),V(new Date);};return useImperativeHandle(t,()=>({previousMonth:oe,nextMonth:be,jumpToNow:we})),jsxs(motion.div,{layout:true,style:{backgroundColor:m.surfaceContainerHigh,borderColor:m.outlineVariant,"--m3-primary":m.primary,"--m3-on-primary":m.onPrimary,"--m3-outline-variant":m.outlineVariant,"--m3-on-surface":m.onSurface,"--m3-on-surface-variant":m.onSurfaceVariant,"--m3-today-highlight":aa(m.primary,.03)},className:"m3-components-bigcalendar",children:[jsxs("div",{className:"m3-components-bigcalendar-w1",children:[jsx(la,{date:$,view:z,onViewChange:U,onPrev:oe,onNext:be,onToday:we}),h?h(l):jsx("div",{className:"m3-components-bigcalendar-filterbar-w1",children:l.map(L=>jsx("button",{onClick:()=>{ee(me=>me.includes(L)?me.filter(Oe=>Oe!==L):[...me,L]);},className:"m3-components-bigcalendar-filterbar-filterchip",style:{backgroundColor:ne.includes(L)?m.onSurface:"transparent",color:ne.includes(L)?m.surface:m.onSurfaceVariant,borderColor:ne.includes(L)?m.onSurface:m.outlineVariant},children:L},L))})]}),jsx("div",{style:{backgroundColor:m.outlineVariant},className:"m3-components-bigcalendar-divider"}),jsx("div",{className:"rbc-container-wrapper m3-components-bigcalendar-w2",children:jsx(AnimatePresence,{initial:false,custom:X,mode:"wait",children:jsx(motion.div,{custom:X,variants:S,initial:"enter",animate:"center",exit:"exit",transition:D,className:"m3-components-bigcalendar-viewport",children:jsx(Calendar,{localizer:T,events:Y,date:$,view:z,onNavigate:L=>V(L),onView:L=>{(L==="month"||L==="week"||L==="day")&&U(L);},onSelectEvent:L=>C?.(L),toolbar:false,components:H,eventPropGetter:()=>({style:{backgroundColor:"transparent",border:"none",padding:"1px 2px"}})})},$.toISOString())})})]})});/*! Bundled license information:
|
|
1
|
+
export{a as Button}from'./chunk-HSTTEB7U.mjs';import {a}from'./chunk-ONNUY5W2.mjs';export{h as ThemeContext,i as ThemeProvider,d as createModernTheme,e as hexToArgba,f as hexToRgba,g as isDarkBackground,j as useGlobalTheme}from'./chunk-ONNUY5W2.mjs';import {createContext,forwardRef,useMemo,useState,useImperativeHandle,useContext,useRef,useEffect}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {motion,AnimatePresence}from'framer-motion';import {momentLocalizer,Calendar}from'react-big-calendar';var el=Object.create,No=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,rl=Object.getOwnPropertyNames,al=Object.getPrototypeOf,nl=Object.prototype.hasOwnProperty,ol=(t=>typeof a<"u"?a:typeof Proxy<"u"?new Proxy(t,{get:(e,a$1)=>(typeof a<"u"?a:e)[a$1]}):t)(function(t){if(typeof a<"u")return a.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),il=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),sl=(t,e,a,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of rl(e))!nl.call(t,i)&&i!==a&&No(t,i,{get:()=>e[i],enumerable:!(n=tl(e,i))||n.enumerable});return t},Eo=(t,e,a)=>(a=t!=null?el(al(t)):{},sl(!t||!t.__esModule?No(a,"default",{value:t,enumerable:true}):a,t)),Bo=il((t,e)=>{(function(a,n){typeof t=="object"&&typeof e<"u"?e.exports=n():typeof define=="function"&&define.amd?define(n):a.moment=n();})(t,(function(){var a;function n(){return a.apply(null,arguments)}function i(r){a=r;}function l(r){return r instanceof Array||Object.prototype.toString.call(r)==="[object Array]"}function c(r){return r!=null&&Object.prototype.toString.call(r)==="[object Object]"}function d(r,o){return Object.prototype.hasOwnProperty.call(r,o)}function p(r){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(r).length===0;var o;for(o in r)if(d(r,o))return false;return true}function f(r){return r===void 0}function y(r){return typeof r=="number"||Object.prototype.toString.call(r)==="[object Number]"}function P(r){return r instanceof Date||Object.prototype.toString.call(r)==="[object Date]"}function k(r,o){var s=[],u,h=r.length;for(u=0;u<h;++u)s.push(o(r[u],u));return s}function v(r,o){for(var s in o)d(o,s)&&(r[s]=o[s]);return d(o,"toString")&&(r.toString=o.toString),d(o,"valueOf")&&(r.valueOf=o.valueOf),r}function m(r,o,s,u){return Wn(r,o,s,u,true).utc()}function g(){return {empty:false,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:false,invalidEra:null,invalidMonth:null,invalidFormat:false,userInvalidated:false,iso:false,parsedDateParts:[],era:null,meridiem:null,rfc2822:false,weekdayMismatch:false}}function S(r){return r._pf==null&&(r._pf=g()),r._pf}var E;Array.prototype.some?E=Array.prototype.some:E=function(r){var o=Object(this),s=o.length>>>0,u;for(u=0;u<s;u++)if(u in o&&r.call(this,o[u],u,o))return true;return false};function V(r){var o=null,s=false,u=r._d&&!isNaN(r._d.getTime());if(u&&(o=S(r),s=E.call(o.parsedDateParts,function(h){return h!=null}),u=o.overflow<0&&!o.empty&&!o.invalidEra&&!o.invalidMonth&&!o.invalidWeekday&&!o.weekdayMismatch&&!o.nullInput&&!o.invalidFormat&&!o.userInvalidated&&(!o.meridiem||o.meridiem&&s),r._strict&&(u=u&&o.charsLeftOver===0&&o.unusedTokens.length===0&&o.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(r))r._isValid=u;else return u;return r._isValid}function R(r){var o=m(NaN);return r!=null?v(S(o),r):S(o).userInvalidated=true,o}var W=n.momentProperties=[],L=false;function $(r,o){var s,u,h,C=W.length;if(f(o._isAMomentObject)||(r._isAMomentObject=o._isAMomentObject),f(o._i)||(r._i=o._i),f(o._f)||(r._f=o._f),f(o._l)||(r._l=o._l),f(o._strict)||(r._strict=o._strict),f(o._tzm)||(r._tzm=o._tzm),f(o._isUTC)||(r._isUTC=o._isUTC),f(o._offset)||(r._offset=o._offset),f(o._pf)||(r._pf=S(o)),f(o._locale)||(r._locale=o._locale),C>0)for(s=0;s<C;s++)u=W[s],h=o[u],f(h)||(r[u]=h);return r}function H(r){$(this,r),this._d=new Date(r._d!=null?r._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),L===false&&(L=true,n.updateOffset(this),L=false);}function N(r){return r instanceof H||r!=null&&r._isAMomentObject!=null}function I(r){n.suppressDeprecationWarnings===false&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+r);}function de(r,o){var s=true;return v(function(){if(n.deprecationHandler!=null&&n.deprecationHandler(null,r),s){var u=[],h,C,T,Y=arguments.length;for(C=0;C<Y;C++){if(h="",typeof arguments[C]=="object"){h+=`
|
|
2
|
+
[`+C+"] ";for(T in arguments[0])d(arguments[0],T)&&(h+=T+": "+arguments[0][T]+", ");h=h.slice(0,-2);}else h=arguments[C];u.push(h);}I(r+`
|
|
3
|
+
Arguments: `+Array.prototype.slice.call(u).join("")+`
|
|
4
|
+
`+new Error().stack),s=false;}return o.apply(this,arguments)},o)}var we={};function me(r,o){n.deprecationHandler!=null&&n.deprecationHandler(r,o),we[r]||(I(o),we[r]=true);}n.suppressDeprecationWarnings=false,n.deprecationHandler=null;function ke(r){return typeof Function<"u"&&r instanceof Function||Object.prototype.toString.call(r)==="[object Function]"}function ne(r){var o,s;for(s in r)d(r,s)&&(o=r[s],ke(o)?this[s]=o:this["_"+s]=o);this._config=r,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source);}function Oe(r,o){var s=v({},r),u;for(u in o)d(o,u)&&(c(r[u])&&c(o[u])?(s[u]={},v(s[u],r[u]),v(s[u],o[u])):o[u]!=null?s[u]=o[u]:delete s[u]);for(u in r)d(r,u)&&!d(o,u)&&c(r[u])&&(s[u]=v({},s[u]));return s}function De(r){r!=null&&this.set(r);}var Ge;Object.keys?Ge=Object.keys:Ge=function(r){var o,s=[];for(o in r)d(r,o)&&s.push(o);return s};var tt={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Qe(r,o,s){var u=this._calendar[r]||this._calendar.sameElse;return ke(u)?u.call(o,s):u}function Re(r,o,s){var u=""+Math.abs(r),h=o-u.length,C=r>=0;return (C?s?"+":"":"-")+Math.pow(10,Math.max(0,h)).toString().substr(1)+u}var Ue=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,st=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,dt={},mt={};function Z(r,o,s,u){var h=u;typeof u=="string"&&(h=function(){return this[u]()}),r&&(mt[r]=h),o&&(mt[o[0]]=function(){return Re(h.apply(this,arguments),o[1],o[2])}),s&&(mt[s]=function(){return this.localeData().ordinal(h.apply(this,arguments),r)});}function kt(r){return r.match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"")}function ar(r){var o=r.match(Ue),s,u;for(s=0,u=o.length;s<u;s++)mt[o[s]]?o[s]=mt[o[s]]:o[s]=kt(o[s]);return function(h){var C="",T;for(T=0;T<u;T++)C+=ke(o[T])?o[T].call(h,r):o[T];return C}}function St(r,o){return r.isValid()?(o=kn(o,r.localeData()),dt[o]=dt[o]||ar(o),dt[o](r)):r.localeData().invalidDate()}function kn(r,o){var s=5;function u(h){return o.longDateFormat(h)||h}for(st.lastIndex=0;s>=0&&st.test(r);)r=r.replace(st,u),st.lastIndex=0,s-=1;return r}var ti={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ri(r){var o=this._longDateFormat[r],s=this._longDateFormat[r.toUpperCase()];return o||!s?o:(this._longDateFormat[r]=s.match(Ue).map(function(u){return u==="MMMM"||u==="MM"||u==="DD"||u==="dddd"?u.slice(1):u}).join(""),this._longDateFormat[r])}var ai="Invalid date";function ni(){return this._invalidDate}var oi="%d",ii=/\d{1,2}/;function si(r){return this._ordinal.replace("%d",r)}var ui={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ci(r,o,s,u){var h=this._relativeTime[s];return ke(h)?h(r,o,s,u):h.replace(/%d/i,r)}function li(r,o){var s=this._relativeTime[r>0?"future":"past"];return ke(s)?s(o):s.replace(/%s/i,o)}var Sn={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ft(r){return typeof r=="string"?Sn[r]||Sn[r.toLowerCase()]:void 0}function Da(r){var o={},s,u;for(u in r)d(r,u)&&(s=ft(u),s&&(o[s]=r[u]));return o}var hi={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function di(r){var o=[],s;for(s in r)d(r,s)&&o.push({unit:s,priority:hi[s]});return o.sort(function(u,h){return u.priority-h.priority}),o}var wn=/\d/,ut=/\d\d/,bn=/\d{3}/,Ta=/\d{4}/,Jr=/[+-]?\d{6}/,Ne=/\d\d?/,Dn=/\d\d\d\d?/,Tn=/\d\d\d\d\d\d?/,Qr=/\d{1,3}/,Ma=/\d{1,4}/,ea=/[+-]?\d{1,6}/,fr=/\d+/,ta=/[+-]?\d+/,mi=/Z|[+-]\d\d:?\d\d/gi,ra=/Z|[+-]\d\d(?::?\d\d)?/gi,fi=/[+-]?\d+(\.\d{1,3})?/,Nr=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,pr=/^[1-9]\d?/,Aa=/^([1-9]\d|\d)/,aa;aa={};function U(r,o,s){aa[r]=ke(o)?o:function(u,h){return u&&s?s:o};}function pi(r,o){return d(aa,r)?aa[r](o._strict,o._locale):new RegExp(gi(r))}function gi(r){return bt(r.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(o,s,u,h,C){return s||u||h||C}))}function bt(r){return r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function pt(r){return r<0?Math.ceil(r)||0:Math.floor(r)}function Se(r){var o=+r,s=0;return o!==0&&isFinite(o)&&(s=pt(o)),s}var xa={};function Fe(r,o){var s,u=o,h;for(typeof r=="string"&&(r=[r]),y(o)&&(u=function(C,T){T[o]=Se(C);}),h=r.length,s=0;s<h;s++)xa[r[s]]=u;}function Er(r,o){Fe(r,function(s,u,h,C){h._w=h._w||{},o(s,h._w,h,C);});}function yi(r,o,s){o!=null&&d(xa,r)&&xa[r](o,s._a,s,r);}function na(r){return r%4===0&&r%100!==0||r%400===0}var et=0,Dt=1,wt=2,Ye=3,gt=4,Tt=5,nr=6,Pi=7,Ci=8;Z("Y",0,0,function(){var r=this.year();return r<=9999?Re(r,4):"+"+r}),Z(0,["YY",2],0,function(){return this.year()%100}),Z(0,["YYYY",4],0,"year"),Z(0,["YYYYY",5],0,"year"),Z(0,["YYYYYY",6,true],0,"year"),U("Y",ta),U("YY",Ne,ut),U("YYYY",Ma,Ta),U("YYYYY",ea,Jr),U("YYYYYY",ea,Jr),Fe(["YYYYY","YYYYYY"],et),Fe("YYYY",function(r,o){o[et]=r.length===2?n.parseTwoDigitYear(r):Se(r);}),Fe("YY",function(r,o){o[et]=n.parseTwoDigitYear(r);}),Fe("Y",function(r,o){o[et]=parseInt(r,10);});function Br(r){return na(r)?366:365}n.parseTwoDigitYear=function(r){return Se(r)+(Se(r)>68?1900:2e3)};var Mn=gr("FullYear",true);function vi(){return na(this.year())}function gr(r,o){return function(s){return s!=null?(An(this,r,s),n.updateOffset(this,o),this):Lr(this,r)}}function Lr(r,o){if(!r.isValid())return NaN;var s=r._d,u=r._isUTC;switch(o){case "Milliseconds":return u?s.getUTCMilliseconds():s.getMilliseconds();case "Seconds":return u?s.getUTCSeconds():s.getSeconds();case "Minutes":return u?s.getUTCMinutes():s.getMinutes();case "Hours":return u?s.getUTCHours():s.getHours();case "Date":return u?s.getUTCDate():s.getDate();case "Day":return u?s.getUTCDay():s.getDay();case "Month":return u?s.getUTCMonth():s.getMonth();case "FullYear":return u?s.getUTCFullYear():s.getFullYear();default:return NaN}}function An(r,o,s){var u,h,C,T,Y;if(!(!r.isValid()||isNaN(s))){switch(u=r._d,h=r._isUTC,o){case "Milliseconds":return void(h?u.setUTCMilliseconds(s):u.setMilliseconds(s));case "Seconds":return void(h?u.setUTCSeconds(s):u.setSeconds(s));case "Minutes":return void(h?u.setUTCMinutes(s):u.setMinutes(s));case "Hours":return void(h?u.setUTCHours(s):u.setHours(s));case "Date":return void(h?u.setUTCDate(s):u.setDate(s));case "FullYear":break;default:return}C=s,T=r.month(),Y=r.date(),Y=Y===29&&T===1&&!na(C)?28:Y,h?u.setUTCFullYear(C,T,Y):u.setFullYear(C,T,Y);}}function ki(r){return r=ft(r),ke(this[r])?this[r]():this}function Si(r,o){if(typeof r=="object"){r=Da(r);var s=di(r),u,h=s.length;for(u=0;u<h;u++)this[s[u].unit](r[s[u].unit]);}else if(r=ft(r),ke(this[r]))return this[r](o);return this}function wi(r,o){return (r%o+o)%o}var Ie;Array.prototype.indexOf?Ie=Array.prototype.indexOf:Ie=function(r){var o;for(o=0;o<this.length;++o)if(this[o]===r)return o;return -1};function _a(r,o){if(isNaN(r)||isNaN(o))return NaN;var s=wi(o,12);return r+=(o-s)/12,s===1?na(r)?29:28:31-s%7%2}Z("M",["MM",2],"Mo",function(){return this.month()+1}),Z("MMM",0,0,function(r){return this.localeData().monthsShort(this,r)}),Z("MMMM",0,0,function(r){return this.localeData().months(this,r)}),U("M",Ne,pr),U("MM",Ne,ut),U("MMM",function(r,o){return o.monthsShortRegex(r)}),U("MMMM",function(r,o){return o.monthsRegex(r)}),Fe(["M","MM"],function(r,o){o[Dt]=Se(r)-1;}),Fe(["MMM","MMMM"],function(r,o,s,u){var h=s._locale.monthsParse(r,u,s._strict);h!=null?o[Dt]=h:S(s).invalidMonth=r;});var bi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),xn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),_n=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Di=Nr,Ti=Nr;function Mi(r,o){return r?l(this._months)?this._months[r.month()]:this._months[(this._months.isFormat||_n).test(o)?"format":"standalone"][r.month()]:l(this._months)?this._months:this._months.standalone}function Ai(r,o){return r?l(this._monthsShort)?this._monthsShort[r.month()]:this._monthsShort[_n.test(o)?"format":"standalone"][r.month()]:l(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function xi(r,o,s){var u,h,C,T=r.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],u=0;u<12;++u)C=m([2e3,u]),this._shortMonthsParse[u]=this.monthsShort(C,"").toLocaleLowerCase(),this._longMonthsParse[u]=this.months(C,"").toLocaleLowerCase();return s?o==="MMM"?(h=Ie.call(this._shortMonthsParse,T),h!==-1?h:null):(h=Ie.call(this._longMonthsParse,T),h!==-1?h:null):o==="MMM"?(h=Ie.call(this._shortMonthsParse,T),h!==-1?h:(h=Ie.call(this._longMonthsParse,T),h!==-1?h:null)):(h=Ie.call(this._longMonthsParse,T),h!==-1?h:(h=Ie.call(this._shortMonthsParse,T),h!==-1?h:null))}function _i(r,o,s){var u,h,C;if(this._monthsParseExact)return xi.call(this,r,o,s);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),u=0;u<12;u++)if(h=m([2e3,u]),s&&!this._longMonthsParse[u]&&(this._longMonthsParse[u]=new RegExp("^"+this.months(h,"").replace(".","")+"$","i"),this._shortMonthsParse[u]=new RegExp("^"+this.monthsShort(h,"").replace(".","")+"$","i")),!s&&!this._monthsParse[u]&&(C="^"+this.months(h,"")+"|^"+this.monthsShort(h,""),this._monthsParse[u]=new RegExp(C.replace(".",""),"i")),s&&o==="MMMM"&&this._longMonthsParse[u].test(r)||s&&o==="MMM"&&this._shortMonthsParse[u].test(r)||!s&&this._monthsParse[u].test(r))return u}function Fn(r,o){if(!r.isValid())return r;if(typeof o=="string"){if(/^\d+$/.test(o))o=Se(o);else if(o=r.localeData().monthsParse(o),!y(o))return r}var s=o,u=r.date();return u=u<29?u:Math.min(u,_a(r.year(),s)),r._isUTC?r._d.setUTCMonth(s,u):r._d.setMonth(s,u),r}function On(r){return r!=null?(Fn(this,r),n.updateOffset(this,true),this):Lr(this,"Month")}function Fi(){return _a(this.year(),this.month())}function Oi(r){return this._monthsParseExact?(d(this,"_monthsRegex")||Nn.call(this),r?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Di),this._monthsShortStrictRegex&&r?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ni(r){return this._monthsParseExact?(d(this,"_monthsRegex")||Nn.call(this),r?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Ti),this._monthsStrictRegex&&r?this._monthsStrictRegex:this._monthsRegex)}function Nn(){function r(ue,be){return be.length-ue.length}var o=[],s=[],u=[],h,C,T,Y;for(h=0;h<12;h++)C=m([2e3,h]),T=bt(this.monthsShort(C,"")),Y=bt(this.months(C,"")),o.push(T),s.push(Y),u.push(Y),u.push(T);o.sort(r),s.sort(r),u.sort(r),this._monthsRegex=new RegExp("^("+u.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i");}function Ei(r,o,s,u,h,C,T){var Y;return r<100&&r>=0?(Y=new Date(r+400,o,s,u,h,C,T),isFinite(Y.getFullYear())&&Y.setFullYear(r)):Y=new Date(r,o,s,u,h,C,T),Y}function Hr(r){var o,s;return r<100&&r>=0?(s=Array.prototype.slice.call(arguments),s[0]=r+400,o=new Date(Date.UTC.apply(null,s)),isFinite(o.getUTCFullYear())&&o.setUTCFullYear(r)):o=new Date(Date.UTC.apply(null,arguments)),o}function oa(r,o,s){var u=7+o-s,h=(7+Hr(r,0,u).getUTCDay()-o)%7;return -h+u-1}function En(r,o,s,u,h){var C=(7+s-u)%7,T=oa(r,u,h),Y=1+7*(o-1)+C+T,ue,be;return Y<=0?(ue=r-1,be=Br(ue)+Y):Y>Br(r)?(ue=r+1,be=Y-Br(r)):(ue=r,be=Y),{year:ue,dayOfYear:be}}function Vr(r,o,s){var u=oa(r.year(),o,s),h=Math.floor((r.dayOfYear()-u-1)/7)+1,C,T;return h<1?(T=r.year()-1,C=h+Mt(T,o,s)):h>Mt(r.year(),o,s)?(C=h-Mt(r.year(),o,s),T=r.year()+1):(T=r.year(),C=h),{week:C,year:T}}function Mt(r,o,s){var u=oa(r,o,s),h=oa(r+1,o,s);return (Br(r)-u+h)/7}Z("w",["ww",2],"wo","week"),Z("W",["WW",2],"Wo","isoWeek"),U("w",Ne,pr),U("ww",Ne,ut),U("W",Ne,pr),U("WW",Ne,ut),Er(["w","ww","W","WW"],function(r,o,s,u){o[u.substr(0,1)]=Se(r);});function Bi(r){return Vr(r,this._week.dow,this._week.doy).week}var Li={dow:0,doy:6};function Hi(){return this._week.dow}function Vi(){return this._week.doy}function Ri(r){var o=this.localeData().week(this);return r==null?o:this.add((r-o)*7,"d")}function Ii(r){var o=Vr(this,1,4).week;return r==null?o:this.add((r-o)*7,"d")}Z("d",0,"do","day"),Z("dd",0,0,function(r){return this.localeData().weekdaysMin(this,r)}),Z("ddd",0,0,function(r){return this.localeData().weekdaysShort(this,r)}),Z("dddd",0,0,function(r){return this.localeData().weekdays(this,r)}),Z("e",0,0,"weekday"),Z("E",0,0,"isoWeekday"),U("d",Ne),U("e",Ne),U("E",Ne),U("dd",function(r,o){return o.weekdaysMinRegex(r)}),U("ddd",function(r,o){return o.weekdaysShortRegex(r)}),U("dddd",function(r,o){return o.weekdaysRegex(r)}),Er(["dd","ddd","dddd"],function(r,o,s,u){var h=s._locale.weekdaysParse(r,u,s._strict);h!=null?o.d=h:S(s).invalidWeekday=r;}),Er(["d","e","E"],function(r,o,s,u){o[u]=Se(r);});function Yi(r,o){return typeof r!="string"?r:isNaN(r)?(r=o.weekdaysParse(r),typeof r=="number"?r:null):parseInt(r,10)}function Ui(r,o){return typeof r=="string"?o.weekdaysParse(r)%7||7:isNaN(r)?null:r}function Fa(r,o){return r.slice(o,7).concat(r.slice(0,o))}var Wi="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Bn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ji="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zi=Nr,Ki=Nr,$i=Nr;function qi(r,o){var s=l(this._weekdays)?this._weekdays:this._weekdays[r&&r!==true&&this._weekdays.isFormat.test(o)?"format":"standalone"];return r===true?Fa(s,this._week.dow):r?s[r.day()]:s}function Gi(r){return r===true?Fa(this._weekdaysShort,this._week.dow):r?this._weekdaysShort[r.day()]:this._weekdaysShort}function Xi(r){return r===true?Fa(this._weekdaysMin,this._week.dow):r?this._weekdaysMin[r.day()]:this._weekdaysMin}function Zi(r,o,s){var u,h,C,T=r.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],u=0;u<7;++u)C=m([2e3,1]).day(u),this._minWeekdaysParse[u]=this.weekdaysMin(C,"").toLocaleLowerCase(),this._shortWeekdaysParse[u]=this.weekdaysShort(C,"").toLocaleLowerCase(),this._weekdaysParse[u]=this.weekdays(C,"").toLocaleLowerCase();return s?o==="dddd"?(h=Ie.call(this._weekdaysParse,T),h!==-1?h:null):o==="ddd"?(h=Ie.call(this._shortWeekdaysParse,T),h!==-1?h:null):(h=Ie.call(this._minWeekdaysParse,T),h!==-1?h:null):o==="dddd"?(h=Ie.call(this._weekdaysParse,T),h!==-1||(h=Ie.call(this._shortWeekdaysParse,T),h!==-1)?h:(h=Ie.call(this._minWeekdaysParse,T),h!==-1?h:null)):o==="ddd"?(h=Ie.call(this._shortWeekdaysParse,T),h!==-1||(h=Ie.call(this._weekdaysParse,T),h!==-1)?h:(h=Ie.call(this._minWeekdaysParse,T),h!==-1?h:null)):(h=Ie.call(this._minWeekdaysParse,T),h!==-1||(h=Ie.call(this._weekdaysParse,T),h!==-1)?h:(h=Ie.call(this._shortWeekdaysParse,T),h!==-1?h:null))}function Ji(r,o,s){var u,h,C;if(this._weekdaysParseExact)return Zi.call(this,r,o,s);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),u=0;u<7;u++)if(h=m([2e3,1]).day(u),s&&!this._fullWeekdaysParse[u]&&(this._fullWeekdaysParse[u]=new RegExp("^"+this.weekdays(h,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[u]=new RegExp("^"+this.weekdaysShort(h,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[u]=new RegExp("^"+this.weekdaysMin(h,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[u]||(C="^"+this.weekdays(h,"")+"|^"+this.weekdaysShort(h,"")+"|^"+this.weekdaysMin(h,""),this._weekdaysParse[u]=new RegExp(C.replace(".",""),"i")),s&&o==="dddd"&&this._fullWeekdaysParse[u].test(r)||s&&o==="ddd"&&this._shortWeekdaysParse[u].test(r)||s&&o==="dd"&&this._minWeekdaysParse[u].test(r)||!s&&this._weekdaysParse[u].test(r))return u}function Qi(r){if(!this.isValid())return r!=null?this:NaN;var o=Lr(this,"Day");return r!=null?(r=Yi(r,this.localeData()),this.add(r-o,"d")):o}function es(r){if(!this.isValid())return r!=null?this:NaN;var o=(this.day()+7-this.localeData()._week.dow)%7;return r==null?o:this.add(r-o,"d")}function ts(r){if(!this.isValid())return r!=null?this:NaN;if(r!=null){var o=Ui(r,this.localeData());return this.day(this.day()%7?o:o-7)}else return this.day()||7}function rs(r){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Oa.call(this),r?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=zi),this._weekdaysStrictRegex&&r?this._weekdaysStrictRegex:this._weekdaysRegex)}function as(r){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Oa.call(this),r?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ki),this._weekdaysShortStrictRegex&&r?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ns(r){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Oa.call(this),r?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$i),this._weekdaysMinStrictRegex&&r?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Oa(){function r(rt,Ot){return Ot.length-rt.length}var o=[],s=[],u=[],h=[],C,T,Y,ue,be;for(C=0;C<7;C++)T=m([2e3,1]).day(C),Y=bt(this.weekdaysMin(T,"")),ue=bt(this.weekdaysShort(T,"")),be=bt(this.weekdays(T,"")),o.push(Y),s.push(ue),u.push(be),h.push(Y),h.push(ue),h.push(be);o.sort(r),s.sort(r),u.sort(r),h.sort(r),this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i");}function Na(){return this.hours()%12||12}function os(){return this.hours()||24}Z("H",["HH",2],0,"hour"),Z("h",["hh",2],0,Na),Z("k",["kk",2],0,os),Z("hmm",0,0,function(){return ""+Na.apply(this)+Re(this.minutes(),2)}),Z("hmmss",0,0,function(){return ""+Na.apply(this)+Re(this.minutes(),2)+Re(this.seconds(),2)}),Z("Hmm",0,0,function(){return ""+this.hours()+Re(this.minutes(),2)}),Z("Hmmss",0,0,function(){return ""+this.hours()+Re(this.minutes(),2)+Re(this.seconds(),2)});function Ln(r,o){Z(r,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),o)});}Ln("a",true),Ln("A",false);function Hn(r,o){return o._meridiemParse}U("a",Hn),U("A",Hn),U("H",Ne,Aa),U("h",Ne,pr),U("k",Ne,pr),U("HH",Ne,ut),U("hh",Ne,ut),U("kk",Ne,ut),U("hmm",Dn),U("hmmss",Tn),U("Hmm",Dn),U("Hmmss",Tn),Fe(["H","HH"],Ye),Fe(["k","kk"],function(r,o,s){var u=Se(r);o[Ye]=u===24?0:u;}),Fe(["a","A"],function(r,o,s){s._isPm=s._locale.isPM(r),s._meridiem=r;}),Fe(["h","hh"],function(r,o,s){o[Ye]=Se(r),S(s).bigHour=true;}),Fe("hmm",function(r,o,s){var u=r.length-2;o[Ye]=Se(r.substr(0,u)),o[gt]=Se(r.substr(u)),S(s).bigHour=true;}),Fe("hmmss",function(r,o,s){var u=r.length-4,h=r.length-2;o[Ye]=Se(r.substr(0,u)),o[gt]=Se(r.substr(u,2)),o[Tt]=Se(r.substr(h)),S(s).bigHour=true;}),Fe("Hmm",function(r,o,s){var u=r.length-2;o[Ye]=Se(r.substr(0,u)),o[gt]=Se(r.substr(u));}),Fe("Hmmss",function(r,o,s){var u=r.length-4,h=r.length-2;o[Ye]=Se(r.substr(0,u)),o[gt]=Se(r.substr(u,2)),o[Tt]=Se(r.substr(h));});function is(r){return (r+"").toLowerCase().charAt(0)==="p"}var ss=/[ap]\.?m?\.?/i,us=gr("Hours",true);function cs(r,o,s){return r>11?s?"pm":"PM":s?"am":"AM"}var Vn={calendar:tt,longDateFormat:ti,invalidDate:ai,ordinal:oi,dayOfMonthOrdinalParse:ii,relativeTime:ui,months:bi,monthsShort:xn,week:Li,weekdays:Wi,weekdaysMin:ji,weekdaysShort:Bn,meridiemParse:ss},Be={},Rr={},Ir;function ls(r,o){var s,u=Math.min(r.length,o.length);for(s=0;s<u;s+=1)if(r[s]!==o[s])return s;return u}function Rn(r){return r&&r.toLowerCase().replace("_","-")}function hs(r){for(var o=0,s,u,h,C;o<r.length;){for(C=Rn(r[o]).split("-"),s=C.length,u=Rn(r[o+1]),u=u?u.split("-"):null;s>0;){if(h=ia(C.slice(0,s).join("-")),h)return h;if(u&&u.length>=s&&ls(C,u)>=s-1)break;s--;}o++;}return Ir}function ds(r){return !!(r&&r.match("^[^/\\\\]*$"))}function ia(r){var o=null,s;if(Be[r]===void 0&&typeof e<"u"&&e&&e.exports&&ds(r))try{o=Ir._abbr,s=ol,s("./locale/"+r),Rt(o);}catch{Be[r]=null;}return Be[r]}function Rt(r,o){var s;return r&&(f(o)?s=At(r):s=Ea(r,o),s?Ir=s:typeof console<"u"&&console.warn&&console.warn("Locale "+r+" not found. Did you forget to load it?")),Ir._abbr}function Ea(r,o){if(o!==null){var s,u=Vn;if(o.abbr=r,Be[r]!=null)me("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),u=Be[r]._config;else if(o.parentLocale!=null)if(Be[o.parentLocale]!=null)u=Be[o.parentLocale]._config;else if(s=ia(o.parentLocale),s!=null)u=s._config;else return Rr[o.parentLocale]||(Rr[o.parentLocale]=[]),Rr[o.parentLocale].push({name:r,config:o}),null;return Be[r]=new De(Oe(u,o)),Rr[r]&&Rr[r].forEach(function(h){Ea(h.name,h.config);}),Rt(r),Be[r]}else return delete Be[r],null}function ms(r,o){if(o!=null){var s,u,h=Vn;Be[r]!=null&&Be[r].parentLocale!=null?Be[r].set(Oe(Be[r]._config,o)):(u=ia(r),u!=null&&(h=u._config),o=Oe(h,o),u==null&&(o.abbr=r),s=new De(o),s.parentLocale=Be[r],Be[r]=s),Rt(r);}else Be[r]!=null&&(Be[r].parentLocale!=null?(Be[r]=Be[r].parentLocale,r===Rt()&&Rt(r)):Be[r]!=null&&delete Be[r]);return Be[r]}function At(r){var o;if(r&&r._locale&&r._locale._abbr&&(r=r._locale._abbr),!r)return Ir;if(!l(r)){if(o=ia(r),o)return o;r=[r];}return hs(r)}function fs(){return Ge(Be)}function Ba(r){var o,s=r._a;return s&&S(r).overflow===-2&&(o=s[Dt]<0||s[Dt]>11?Dt:s[wt]<1||s[wt]>_a(s[et],s[Dt])?wt:s[Ye]<0||s[Ye]>24||s[Ye]===24&&(s[gt]!==0||s[Tt]!==0||s[nr]!==0)?Ye:s[gt]<0||s[gt]>59?gt:s[Tt]<0||s[Tt]>59?Tt:s[nr]<0||s[nr]>999?nr:-1,S(r)._overflowDayOfYear&&(o<et||o>wt)&&(o=wt),S(r)._overflowWeeks&&o===-1&&(o=Pi),S(r)._overflowWeekday&&o===-1&&(o=Ci),S(r).overflow=o),r}var ps=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gs=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ys=/Z|[+-]\d\d(?::?\d\d)?/,sa=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,false],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,false],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,false],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,false],["YYYY",/\d{4}/,false]],La=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ps=/^\/?Date\((-?\d+)/i,Cs=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,vs={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function In(r){var o,s,u=r._i,h=ps.exec(u)||gs.exec(u),C,T,Y,ue,be=sa.length,rt=La.length;if(h){for(S(r).iso=true,o=0,s=be;o<s;o++)if(sa[o][1].exec(h[1])){T=sa[o][0],C=sa[o][2]!==false;break}if(T==null){r._isValid=false;return}if(h[3]){for(o=0,s=rt;o<s;o++)if(La[o][1].exec(h[3])){Y=(h[2]||" ")+La[o][0];break}if(Y==null){r._isValid=false;return}}if(!C&&Y!=null){r._isValid=false;return}if(h[4])if(ys.exec(h[4]))ue="Z";else {r._isValid=false;return}r._f=T+(Y||"")+(ue||""),Va(r);}else r._isValid=false;}function ks(r,o,s,u,h,C){var T=[Ss(r),xn.indexOf(o),parseInt(s,10),parseInt(u,10),parseInt(h,10)];return C&&T.push(parseInt(C,10)),T}function Ss(r){var o=parseInt(r,10);return o<=49?2e3+o:o<=999?1900+o:o}function ws(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function bs(r,o,s){if(r){var u=Bn.indexOf(r),h=new Date(o[0],o[1],o[2]).getDay();if(u!==h)return S(s).weekdayMismatch=true,s._isValid=false,false}return true}function Ds(r,o,s){if(r)return vs[r];if(o)return 0;var u=parseInt(s,10),h=u%100,C=(u-h)/100;return C*60+h}function Yn(r){var o=Cs.exec(ws(r._i)),s;if(o){if(s=ks(o[4],o[3],o[2],o[5],o[6],o[7]),!bs(o[1],s,r))return;r._a=s,r._tzm=Ds(o[8],o[9],o[10]),r._d=Hr.apply(null,r._a),r._d.setUTCMinutes(r._d.getUTCMinutes()-r._tzm),S(r).rfc2822=true;}else r._isValid=false;}function Ts(r){var o=Ps.exec(r._i);if(o!==null){r._d=new Date(+o[1]);return}if(In(r),r._isValid===false)delete r._isValid;else return;if(Yn(r),r._isValid===false)delete r._isValid;else return;r._strict?r._isValid=false:n.createFromInputFallback(r);}n.createFromInputFallback=de("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(r){r._d=new Date(r._i+(r._useUTC?" UTC":""));});function yr(r,o,s){return r??o??s}function Ms(r){var o=new Date(n.now());return r._useUTC?[o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()]:[o.getFullYear(),o.getMonth(),o.getDate()]}function Ha(r){var o,s,u=[],h,C,T;if(!r._d){for(h=Ms(r),r._w&&r._a[wt]==null&&r._a[Dt]==null&&As(r),r._dayOfYear!=null&&(T=yr(r._a[et],h[et]),(r._dayOfYear>Br(T)||r._dayOfYear===0)&&(S(r)._overflowDayOfYear=true),s=Hr(T,0,r._dayOfYear),r._a[Dt]=s.getUTCMonth(),r._a[wt]=s.getUTCDate()),o=0;o<3&&r._a[o]==null;++o)r._a[o]=u[o]=h[o];for(;o<7;o++)r._a[o]=u[o]=r._a[o]==null?o===2?1:0:r._a[o];r._a[Ye]===24&&r._a[gt]===0&&r._a[Tt]===0&&r._a[nr]===0&&(r._nextDay=true,r._a[Ye]=0),r._d=(r._useUTC?Hr:Ei).apply(null,u),C=r._useUTC?r._d.getUTCDay():r._d.getDay(),r._tzm!=null&&r._d.setUTCMinutes(r._d.getUTCMinutes()-r._tzm),r._nextDay&&(r._a[Ye]=24),r._w&&typeof r._w.d<"u"&&r._w.d!==C&&(S(r).weekdayMismatch=true);}}function As(r){var o,s,u,h,C,T,Y,ue,be;o=r._w,o.GG!=null||o.W!=null||o.E!=null?(C=1,T=4,s=yr(o.GG,r._a[et],Vr(Ee(),1,4).year),u=yr(o.W,1),h=yr(o.E,1),(h<1||h>7)&&(ue=true)):(C=r._locale._week.dow,T=r._locale._week.doy,be=Vr(Ee(),C,T),s=yr(o.gg,r._a[et],be.year),u=yr(o.w,be.week),o.d!=null?(h=o.d,(h<0||h>6)&&(ue=true)):o.e!=null?(h=o.e+C,(o.e<0||o.e>6)&&(ue=true)):h=C),u<1||u>Mt(s,C,T)?S(r)._overflowWeeks=true:ue!=null?S(r)._overflowWeekday=true:(Y=En(s,u,h,C,T),r._a[et]=Y.year,r._dayOfYear=Y.dayOfYear);}n.ISO_8601=function(){},n.RFC_2822=function(){};function Va(r){if(r._f===n.ISO_8601){In(r);return}if(r._f===n.RFC_2822){Yn(r);return}r._a=[],S(r).empty=true;var o=""+r._i,s,u,h,C,T,Y=o.length,ue=0,be,rt;for(h=kn(r._f,r._locale).match(Ue)||[],rt=h.length,s=0;s<rt;s++)C=h[s],u=(o.match(pi(C,r))||[])[0],u&&(T=o.substr(0,o.indexOf(u)),T.length>0&&S(r).unusedInput.push(T),o=o.slice(o.indexOf(u)+u.length),ue+=u.length),mt[C]?(u?S(r).empty=false:S(r).unusedTokens.push(C),yi(C,u,r)):r._strict&&!u&&S(r).unusedTokens.push(C);S(r).charsLeftOver=Y-ue,o.length>0&&S(r).unusedInput.push(o),r._a[Ye]<=12&&S(r).bigHour===true&&r._a[Ye]>0&&(S(r).bigHour=void 0),S(r).parsedDateParts=r._a.slice(0),S(r).meridiem=r._meridiem,r._a[Ye]=xs(r._locale,r._a[Ye],r._meridiem),be=S(r).era,be!==null&&(r._a[et]=r._locale.erasConvertYear(be,r._a[et])),Ha(r),Ba(r);}function xs(r,o,s){var u;return s==null?o:r.meridiemHour!=null?r.meridiemHour(o,s):(r.isPM!=null&&(u=r.isPM(s),u&&o<12&&(o+=12),!u&&o===12&&(o=0)),o)}function _s(r){var o,s,u,h,C,T,Y=false,ue=r._f.length;if(ue===0){S(r).invalidFormat=true,r._d=new Date(NaN);return}for(h=0;h<ue;h++)C=0,T=false,o=$({},r),r._useUTC!=null&&(o._useUTC=r._useUTC),o._f=r._f[h],Va(o),V(o)&&(T=true),C+=S(o).charsLeftOver,C+=S(o).unusedTokens.length*10,S(o).score=C,Y?C<u&&(u=C,s=o):(u==null||C<u||T)&&(u=C,s=o,T&&(Y=true));v(r,s||o);}function Fs(r){if(!r._d){var o=Da(r._i),s=o.day===void 0?o.date:o.day;r._a=k([o.year,o.month,s,o.hour,o.minute,o.second,o.millisecond],function(u){return u&&parseInt(u,10)}),Ha(r);}}function Os(r){var o=new H(Ba(Un(r)));return o._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function Un(r){var o=r._i,s=r._f;return r._locale=r._locale||At(r._l),o===null||s===void 0&&o===""?R({nullInput:true}):(typeof o=="string"&&(r._i=o=r._locale.preparse(o)),N(o)?new H(Ba(o)):(P(o)?r._d=o:l(s)?_s(r):s?Va(r):Ns(r),V(r)||(r._d=null),r))}function Ns(r){var o=r._i;f(o)?r._d=new Date(n.now()):P(o)?r._d=new Date(o.valueOf()):typeof o=="string"?Ts(r):l(o)?(r._a=k(o.slice(0),function(s){return parseInt(s,10)}),Ha(r)):c(o)?Fs(r):y(o)?r._d=new Date(o):n.createFromInputFallback(r);}function Wn(r,o,s,u,h){var C={};return (o===true||o===false)&&(u=o,o=void 0),(s===true||s===false)&&(u=s,s=void 0),(c(r)&&p(r)||l(r)&&r.length===0)&&(r=void 0),C._isAMomentObject=true,C._useUTC=C._isUTC=h,C._l=s,C._i=r,C._f=o,C._strict=u,Os(C)}function Ee(r,o,s,u){return Wn(r,o,s,u,false)}var Es=de("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var r=Ee.apply(null,arguments);return this.isValid()&&r.isValid()?r<this?this:r:R()}),Bs=de("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var r=Ee.apply(null,arguments);return this.isValid()&&r.isValid()?r>this?this:r:R()});function jn(r,o){var s,u;if(o.length===1&&l(o[0])&&(o=o[0]),!o.length)return Ee();for(s=o[0],u=1;u<o.length;++u)(!o[u].isValid()||o[u][r](s))&&(s=o[u]);return s}function Ls(){var r=[].slice.call(arguments,0);return jn("isBefore",r)}function Hs(){var r=[].slice.call(arguments,0);return jn("isAfter",r)}var Vs=function(){return Date.now?Date.now():+new Date},Yr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Rs(r){var o,s=false,u,h=Yr.length;for(o in r)if(d(r,o)&&!(Ie.call(Yr,o)!==-1&&(r[o]==null||!isNaN(r[o]))))return false;for(u=0;u<h;++u)if(r[Yr[u]]){if(s)return false;parseFloat(r[Yr[u]])!==Se(r[Yr[u]])&&(s=true);}return true}function Is(){return this._isValid}function Ys(){return yt(NaN)}function ua(r){var o=Da(r),s=o.year||0,u=o.quarter||0,h=o.month||0,C=o.week||o.isoWeek||0,T=o.day||0,Y=o.hour||0,ue=o.minute||0,be=o.second||0,rt=o.millisecond||0;this._isValid=Rs(o),this._milliseconds=+rt+be*1e3+ue*6e4+Y*1e3*60*60,this._days=+T+C*7,this._months=+h+u*3+s*12,this._data={},this._locale=At(),this._bubble();}function ca(r){return r instanceof ua}function Ra(r){return r<0?Math.round(-1*r)*-1:Math.round(r)}function Us(r,o,s){var u=Math.min(r.length,o.length),h=Math.abs(r.length-o.length),C=0,T;for(T=0;T<u;T++)Se(r[T])!==Se(o[T])&&C++;return C+h}function zn(r,o){Z(r,0,0,function(){var s=this.utcOffset(),u="+";return s<0&&(s=-s,u="-"),u+Re(~~(s/60),2)+o+Re(~~s%60,2)});}zn("Z",":"),zn("ZZ",""),U("Z",ra),U("ZZ",ra),Fe(["Z","ZZ"],function(r,o,s){s._useUTC=true,s._tzm=Ia(ra,r);});var Ws=/([\+\-]|\d\d)/gi;function Ia(r,o){var s=(o||"").match(r),u,h,C;return s===null?null:(u=s[s.length-1]||[],h=(u+"").match(Ws)||["-",0,0],C=+(h[1]*60)+Se(h[2]),C===0?0:h[0]==="+"?C:-C)}function Ya(r,o){var s,u;return o._isUTC?(s=o.clone(),u=(N(r)||P(r)?r.valueOf():Ee(r).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+u),n.updateOffset(s,false),s):Ee(r).local()}function Ua(r){return -Math.round(r._d.getTimezoneOffset())}n.updateOffset=function(){};function js(r,o,s){var u=this._offset||0,h;if(!this.isValid())return r!=null?this:NaN;if(r!=null){if(typeof r=="string"){if(r=Ia(ra,r),r===null)return this}else Math.abs(r)<16&&!s&&(r=r*60);return !this._isUTC&&o&&(h=Ua(this)),this._offset=r,this._isUTC=true,h!=null&&this.add(h,"m"),u!==r&&(!o||this._changeInProgress?Gn(this,yt(r-u,"m"),1,false):this._changeInProgress||(this._changeInProgress=true,n.updateOffset(this,true),this._changeInProgress=null)),this}else return this._isUTC?u:Ua(this)}function zs(r,o){return r!=null?(typeof r!="string"&&(r=-r),this.utcOffset(r,o),this):-this.utcOffset()}function Ks(r){return this.utcOffset(0,r)}function $s(r){return this._isUTC&&(this.utcOffset(0,r),this._isUTC=false,r&&this.subtract(Ua(this),"m")),this}function qs(){if(this._tzm!=null)this.utcOffset(this._tzm,false,true);else if(typeof this._i=="string"){var r=Ia(mi,this._i);r!=null?this.utcOffset(r):this.utcOffset(0,true);}return this}function Gs(r){return this.isValid()?(r=r?Ee(r).utcOffset():0,(this.utcOffset()-r)%60===0):false}function Xs(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Zs(){if(!f(this._isDSTShifted))return this._isDSTShifted;var r={},o;return $(r,this),r=Un(r),r._a?(o=r._isUTC?m(r._a):Ee(r._a),this._isDSTShifted=this.isValid()&&Us(r._a,o.toArray())>0):this._isDSTShifted=false,this._isDSTShifted}function Js(){return this.isValid()?!this._isUTC:false}function Qs(){return this.isValid()?this._isUTC:false}function Kn(){return this.isValid()?this._isUTC&&this._offset===0:false}var eu=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,tu=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function yt(r,o){var s=r,u=null,h,C,T;return ca(r)?s={ms:r._milliseconds,d:r._days,M:r._months}:y(r)||!isNaN(+r)?(s={},o?s[o]=+r:s.milliseconds=+r):(u=eu.exec(r))?(h=u[1]==="-"?-1:1,s={y:0,d:Se(u[wt])*h,h:Se(u[Ye])*h,m:Se(u[gt])*h,s:Se(u[Tt])*h,ms:Se(Ra(u[nr]*1e3))*h}):(u=tu.exec(r))?(h=u[1]==="-"?-1:1,s={y:or(u[2],h),M:or(u[3],h),w:or(u[4],h),d:or(u[5],h),h:or(u[6],h),m:or(u[7],h),s:or(u[8],h)}):s==null?s={}:typeof s=="object"&&("from"in s||"to"in s)&&(T=ru(Ee(s.from),Ee(s.to)),s={},s.ms=T.milliseconds,s.M=T.months),C=new ua(s),ca(r)&&d(r,"_locale")&&(C._locale=r._locale),ca(r)&&d(r,"_isValid")&&(C._isValid=r._isValid),C}yt.fn=ua.prototype,yt.invalid=Ys;function or(r,o){var s=r&&parseFloat(r.replace(",","."));return (isNaN(s)?0:s)*o}function $n(r,o){var s={};return s.months=o.month()-r.month()+(o.year()-r.year())*12,r.clone().add(s.months,"M").isAfter(o)&&--s.months,s.milliseconds=+o-+r.clone().add(s.months,"M"),s}function ru(r,o){var s;return r.isValid()&&o.isValid()?(o=Ya(o,r),r.isBefore(o)?s=$n(r,o):(s=$n(o,r),s.milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0}}function qn(r,o){return function(s,u){var h,C;return u!==null&&!isNaN(+u)&&(me(o,"moment()."+o+"(period, number) is deprecated. Please use moment()."+o+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),C=s,s=u,u=C),h=yt(s,u),Gn(this,h,r),this}}function Gn(r,o,s,u){var h=o._milliseconds,C=Ra(o._days),T=Ra(o._months);r.isValid()&&(u=u??true,T&&Fn(r,Lr(r,"Month")+T*s),C&&An(r,"Date",Lr(r,"Date")+C*s),h&&r._d.setTime(r._d.valueOf()+h*s),u&&n.updateOffset(r,C||T));}var au=qn(1,"add"),nu=qn(-1,"subtract");function Xn(r){return typeof r=="string"||r instanceof String}function ou(r){return N(r)||P(r)||Xn(r)||y(r)||su(r)||iu(r)||r===null||r===void 0}function iu(r){var o=c(r)&&!p(r),s=false,u=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],h,C,T=u.length;for(h=0;h<T;h+=1)C=u[h],s=s||d(r,C);return o&&s}function su(r){var o=l(r),s=false;return o&&(s=r.filter(function(u){return !y(u)&&Xn(r)}).length===0),o&&s}function uu(r){var o=c(r)&&!p(r),s=false,u=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],h,C;for(h=0;h<u.length;h+=1)C=u[h],s=s||d(r,C);return o&&s}function cu(r,o){var s=r.diff(o,"days",true);return s<-6?"sameElse":s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":"sameElse"}function lu(r,o){arguments.length===1&&(arguments[0]?ou(arguments[0])?(r=arguments[0],o=void 0):uu(arguments[0])&&(o=arguments[0],r=void 0):(r=void 0,o=void 0));var s=r||Ee(),u=Ya(s,this).startOf("day"),h=n.calendarFormat(this,u)||"sameElse",C=o&&(ke(o[h])?o[h].call(this,s):o[h]);return this.format(C||this.localeData().calendar(h,this,Ee(s)))}function hu(){return new H(this)}function du(r,o){var s=N(r)?r:Ee(r);return this.isValid()&&s.isValid()?(o=ft(o)||"millisecond",o==="millisecond"?this.valueOf()>s.valueOf():s.valueOf()<this.clone().startOf(o).valueOf()):false}function mu(r,o){var s=N(r)?r:Ee(r);return this.isValid()&&s.isValid()?(o=ft(o)||"millisecond",o==="millisecond"?this.valueOf()<s.valueOf():this.clone().endOf(o).valueOf()<s.valueOf()):false}function fu(r,o,s,u){var h=N(r)?r:Ee(r),C=N(o)?o:Ee(o);return this.isValid()&&h.isValid()&&C.isValid()?(u=u||"()",(u[0]==="("?this.isAfter(h,s):!this.isBefore(h,s))&&(u[1]===")"?this.isBefore(C,s):!this.isAfter(C,s))):false}function pu(r,o){var s=N(r)?r:Ee(r),u;return this.isValid()&&s.isValid()?(o=ft(o)||"millisecond",o==="millisecond"?this.valueOf()===s.valueOf():(u=s.valueOf(),this.clone().startOf(o).valueOf()<=u&&u<=this.clone().endOf(o).valueOf())):false}function gu(r,o){return this.isSame(r,o)||this.isAfter(r,o)}function yu(r,o){return this.isSame(r,o)||this.isBefore(r,o)}function Pu(r,o,s){var u,h,C;if(!this.isValid())return NaN;if(u=Ya(r,this),!u.isValid())return NaN;switch(h=(u.utcOffset()-this.utcOffset())*6e4,o=ft(o),o){case "year":C=la(this,u)/12;break;case "month":C=la(this,u);break;case "quarter":C=la(this,u)/3;break;case "second":C=(this-u)/1e3;break;case "minute":C=(this-u)/6e4;break;case "hour":C=(this-u)/36e5;break;case "day":C=(this-u-h)/864e5;break;case "week":C=(this-u-h)/6048e5;break;default:C=this-u;}return s?C:pt(C)}function la(r,o){if(r.date()<o.date())return -la(o,r);var s=(o.year()-r.year())*12+(o.month()-r.month()),u=r.clone().add(s,"months"),h,C;return o-u<0?(h=r.clone().add(s-1,"months"),C=(o-u)/(u-h)):(h=r.clone().add(s+1,"months"),C=(o-u)/(h-u)),-(s+C)||0}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Cu(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function vu(r){if(!this.isValid())return null;var o=r!==true,s=o?this.clone().utc():this;return s.year()<0||s.year()>9999?St(s,o?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ke(Date.prototype.toISOString)?o?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",St(s,"Z")):St(s,o?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ku(){if(!this.isValid())return "moment.invalid(/* "+this._i+" */)";var r="moment",o="",s,u,h,C;return this.isLocal()||(r=this.utcOffset()===0?"moment.utc":"moment.parseZone",o="Z"),s="["+r+'("]',u=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",h="-MM-DD[T]HH:mm:ss.SSS",C=o+'[")]',this.format(s+u+h+C)}function Su(r){r||(r=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var o=St(this,r);return this.localeData().postformat(o)}function wu(r,o){return this.isValid()&&(N(r)&&r.isValid()||Ee(r).isValid())?yt({to:this,from:r}).locale(this.locale()).humanize(!o):this.localeData().invalidDate()}function bu(r){return this.from(Ee(),r)}function Du(r,o){return this.isValid()&&(N(r)&&r.isValid()||Ee(r).isValid())?yt({from:this,to:r}).locale(this.locale()).humanize(!o):this.localeData().invalidDate()}function Tu(r){return this.to(Ee(),r)}function Zn(r){var o;return r===void 0?this._locale._abbr:(o=At(r),o!=null&&(this._locale=o),this)}var Jn=de("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(r){return r===void 0?this.localeData():this.locale(r)});function Qn(){return this._locale}var ha=1e3,Pr=60*ha,da=60*Pr,eo=(365*400+97)*24*da;function Cr(r,o){return (r%o+o)%o}function to(r,o,s){return r<100&&r>=0?new Date(r+400,o,s)-eo:new Date(r,o,s).valueOf()}function ro(r,o,s){return r<100&&r>=0?Date.UTC(r+400,o,s)-eo:Date.UTC(r,o,s)}function Mu(r){var o,s;if(r=ft(r),r===void 0||r==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?ro:to,r){case "year":o=s(this.year(),0,1);break;case "quarter":o=s(this.year(),this.month()-this.month()%3,1);break;case "month":o=s(this.year(),this.month(),1);break;case "week":o=s(this.year(),this.month(),this.date()-this.weekday());break;case "isoWeek":o=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case "day":case "date":o=s(this.year(),this.month(),this.date());break;case "hour":o=this._d.valueOf(),o-=Cr(o+(this._isUTC?0:this.utcOffset()*Pr),da);break;case "minute":o=this._d.valueOf(),o-=Cr(o,Pr);break;case "second":o=this._d.valueOf(),o-=Cr(o,ha);break}return this._d.setTime(o),n.updateOffset(this,true),this}function Au(r){var o,s;if(r=ft(r),r===void 0||r==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?ro:to,r){case "year":o=s(this.year()+1,0,1)-1;break;case "quarter":o=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case "month":o=s(this.year(),this.month()+1,1)-1;break;case "week":o=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case "isoWeek":o=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case "day":case "date":o=s(this.year(),this.month(),this.date()+1)-1;break;case "hour":o=this._d.valueOf(),o+=da-Cr(o+(this._isUTC?0:this.utcOffset()*Pr),da)-1;break;case "minute":o=this._d.valueOf(),o+=Pr-Cr(o,Pr)-1;break;case "second":o=this._d.valueOf(),o+=ha-Cr(o,ha)-1;break}return this._d.setTime(o),n.updateOffset(this,true),this}function xu(){return this._d.valueOf()-(this._offset||0)*6e4}function _u(){return Math.floor(this.valueOf()/1e3)}function Fu(){return new Date(this.valueOf())}function Ou(){var r=this;return [r.year(),r.month(),r.date(),r.hour(),r.minute(),r.second(),r.millisecond()]}function Nu(){var r=this;return {years:r.year(),months:r.month(),date:r.date(),hours:r.hours(),minutes:r.minutes(),seconds:r.seconds(),milliseconds:r.milliseconds()}}function Eu(){return this.isValid()?this.toISOString():null}function Bu(){return V(this)}function Lu(){return v({},S(this))}function Hu(){return S(this).overflow}function Vu(){return {input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Z("N",0,0,"eraAbbr"),Z("NN",0,0,"eraAbbr"),Z("NNN",0,0,"eraAbbr"),Z("NNNN",0,0,"eraName"),Z("NNNNN",0,0,"eraNarrow"),Z("y",["y",1],"yo","eraYear"),Z("y",["yy",2],0,"eraYear"),Z("y",["yyy",3],0,"eraYear"),Z("y",["yyyy",4],0,"eraYear"),U("N",Wa),U("NN",Wa),U("NNN",Wa),U("NNNN",Gu),U("NNNNN",Xu),Fe(["N","NN","NNN","NNNN","NNNNN"],function(r,o,s,u){var h=s._locale.erasParse(r,u,s._strict);h?S(s).era=h:S(s).invalidEra=r;}),U("y",fr),U("yy",fr),U("yyy",fr),U("yyyy",fr),U("yo",Zu),Fe(["y","yy","yyy","yyyy"],et),Fe(["yo"],function(r,o,s,u){var h;s._locale._eraYearOrdinalRegex&&(h=r.match(s._locale._eraYearOrdinalRegex)),s._locale.eraYearOrdinalParse?o[et]=s._locale.eraYearOrdinalParse(r,h):o[et]=parseInt(r,10);});function Ru(r,o){var s,u,h,C=this._eras||At("en")._eras;for(s=0,u=C.length;s<u;++s)switch(typeof C[s].since=="string"&&(h=n(C[s].since).startOf("day"),C[s].since=h.valueOf()),typeof C[s].until){case "undefined":C[s].until=1/0;break;case "string":h=n(C[s].until).startOf("day").valueOf(),C[s].until=h.valueOf();break}return C}function Iu(r,o,s){var u,h,C=this.eras(),T,Y,ue;for(r=r.toUpperCase(),u=0,h=C.length;u<h;++u)if(T=C[u].name.toUpperCase(),Y=C[u].abbr.toUpperCase(),ue=C[u].narrow.toUpperCase(),s)switch(o){case "N":case "NN":case "NNN":if(Y===r)return C[u];break;case "NNNN":if(T===r)return C[u];break;case "NNNNN":if(ue===r)return C[u];break}else if([T,Y,ue].indexOf(r)>=0)return C[u]}function Yu(r,o){var s=r.since<=r.until?1:-1;return o===void 0?n(r.since).year():n(r.since).year()+(o-r.offset)*s}function Uu(){var r,o,s,u=this.localeData().eras();for(r=0,o=u.length;r<o;++r)if(s=this.clone().startOf("day").valueOf(),u[r].since<=s&&s<=u[r].until||u[r].until<=s&&s<=u[r].since)return u[r].name;return ""}function Wu(){var r,o,s,u=this.localeData().eras();for(r=0,o=u.length;r<o;++r)if(s=this.clone().startOf("day").valueOf(),u[r].since<=s&&s<=u[r].until||u[r].until<=s&&s<=u[r].since)return u[r].narrow;return ""}function ju(){var r,o,s,u=this.localeData().eras();for(r=0,o=u.length;r<o;++r)if(s=this.clone().startOf("day").valueOf(),u[r].since<=s&&s<=u[r].until||u[r].until<=s&&s<=u[r].since)return u[r].abbr;return ""}function zu(){var r,o,s,u,h=this.localeData().eras();for(r=0,o=h.length;r<o;++r)if(s=h[r].since<=h[r].until?1:-1,u=this.clone().startOf("day").valueOf(),h[r].since<=u&&u<=h[r].until||h[r].until<=u&&u<=h[r].since)return (this.year()-n(h[r].since).year())*s+h[r].offset;return this.year()}function Ku(r){return d(this,"_erasNameRegex")||ja.call(this),r?this._erasNameRegex:this._erasRegex}function $u(r){return d(this,"_erasAbbrRegex")||ja.call(this),r?this._erasAbbrRegex:this._erasRegex}function qu(r){return d(this,"_erasNarrowRegex")||ja.call(this),r?this._erasNarrowRegex:this._erasRegex}function Wa(r,o){return o.erasAbbrRegex(r)}function Gu(r,o){return o.erasNameRegex(r)}function Xu(r,o){return o.erasNarrowRegex(r)}function Zu(r,o){return o._eraYearOrdinalRegex||fr}function ja(){var r=[],o=[],s=[],u=[],h,C,T,Y,ue,be=this.eras();for(h=0,C=be.length;h<C;++h)T=bt(be[h].name),Y=bt(be[h].abbr),ue=bt(be[h].narrow),o.push(T),r.push(Y),s.push(ue),u.push(T),u.push(Y),u.push(ue);this._erasRegex=new RegExp("^("+u.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+o.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i");}Z(0,["gg",2],0,function(){return this.weekYear()%100}),Z(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ma(r,o){Z(0,[r,r.length],0,o);}ma("gggg","weekYear"),ma("ggggg","weekYear"),ma("GGGG","isoWeekYear"),ma("GGGGG","isoWeekYear"),U("G",ta),U("g",ta),U("GG",Ne,ut),U("gg",Ne,ut),U("GGGG",Ma,Ta),U("gggg",Ma,Ta),U("GGGGG",ea,Jr),U("ggggg",ea,Jr),Er(["gggg","ggggg","GGGG","GGGGG"],function(r,o,s,u){o[u.substr(0,2)]=Se(r);}),Er(["gg","GG"],function(r,o,s,u){o[u]=n.parseTwoDigitYear(r);});function Ju(r){return ao.call(this,r,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Qu(r){return ao.call(this,r,this.isoWeek(),this.isoWeekday(),1,4)}function ec(){return Mt(this.year(),1,4)}function tc(){return Mt(this.isoWeekYear(),1,4)}function rc(){var r=this.localeData()._week;return Mt(this.year(),r.dow,r.doy)}function ac(){var r=this.localeData()._week;return Mt(this.weekYear(),r.dow,r.doy)}function ao(r,o,s,u,h){var C;return r==null?Vr(this,u,h).year:(C=Mt(r,u,h),o>C&&(o=C),nc.call(this,r,o,s,u,h))}function nc(r,o,s,u,h){var C=En(r,o,s,u,h),T=Hr(C.year,0,C.dayOfYear);return this.year(T.getUTCFullYear()),this.month(T.getUTCMonth()),this.date(T.getUTCDate()),this}Z("Q",0,"Qo","quarter"),U("Q",wn),Fe("Q",function(r,o){o[Dt]=(Se(r)-1)*3;});function oc(r){return r==null?Math.ceil((this.month()+1)/3):this.month((r-1)*3+this.month()%3)}Z("D",["DD",2],"Do","date"),U("D",Ne,pr),U("DD",Ne,ut),U("Do",function(r,o){return r?o._dayOfMonthOrdinalParse||o._ordinalParse:o._dayOfMonthOrdinalParseLenient}),Fe(["D","DD"],wt),Fe("Do",function(r,o){o[wt]=Se(r.match(Ne)[0]);});var no=gr("Date",true);Z("DDD",["DDDD",3],"DDDo","dayOfYear"),U("DDD",Qr),U("DDDD",bn),Fe(["DDD","DDDD"],function(r,o,s){s._dayOfYear=Se(r);});function ic(r){var o=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return r==null?o:this.add(r-o,"d")}Z("m",["mm",2],0,"minute"),U("m",Ne,Aa),U("mm",Ne,ut),Fe(["m","mm"],gt);var sc=gr("Minutes",false);Z("s",["ss",2],0,"second"),U("s",Ne,Aa),U("ss",Ne,ut),Fe(["s","ss"],Tt);var uc=gr("Seconds",false);Z("S",0,0,function(){return ~~(this.millisecond()/100)}),Z(0,["SS",2],0,function(){return ~~(this.millisecond()/10)}),Z(0,["SSS",3],0,"millisecond"),Z(0,["SSSS",4],0,function(){return this.millisecond()*10}),Z(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Z(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Z(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Z(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Z(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),U("S",Qr,wn),U("SS",Qr,ut),U("SSS",Qr,bn);var It,oo;for(It="SSSS";It.length<=9;It+="S")U(It,fr);function cc(r,o){o[nr]=Se(("0."+r)*1e3);}for(It="S";It.length<=9;It+="S")Fe(It,cc);oo=gr("Milliseconds",false),Z("z",0,0,"zoneAbbr"),Z("zz",0,0,"zoneName");function lc(){return this._isUTC?"UTC":""}function hc(){return this._isUTC?"Coordinated Universal Time":""}var B=H.prototype;B.add=au,B.calendar=lu,B.clone=hu,B.diff=Pu,B.endOf=Au,B.format=Su,B.from=wu,B.fromNow=bu,B.to=Du,B.toNow=Tu,B.get=ki,B.invalidAt=Hu,B.isAfter=du,B.isBefore=mu,B.isBetween=fu,B.isSame=pu,B.isSameOrAfter=gu,B.isSameOrBefore=yu,B.isValid=Bu,B.lang=Jn,B.locale=Zn,B.localeData=Qn,B.max=Bs,B.min=Es,B.parsingFlags=Lu,B.set=Si,B.startOf=Mu,B.subtract=nu,B.toArray=Ou,B.toObject=Nu,B.toDate=Fu,B.toISOString=vu,B.inspect=ku,typeof Symbol<"u"&&Symbol.for!=null&&(B[Symbol.for("nodejs.util.inspect.custom")]=function(){return "Moment<"+this.format()+">"}),B.toJSON=Eu,B.toString=Cu,B.unix=_u,B.valueOf=xu,B.creationData=Vu,B.eraName=Uu,B.eraNarrow=Wu,B.eraAbbr=ju,B.eraYear=zu,B.year=Mn,B.isLeapYear=vi,B.weekYear=Ju,B.isoWeekYear=Qu,B.quarter=B.quarters=oc,B.month=On,B.daysInMonth=Fi,B.week=B.weeks=Ri,B.isoWeek=B.isoWeeks=Ii,B.weeksInYear=rc,B.weeksInWeekYear=ac,B.isoWeeksInYear=ec,B.isoWeeksInISOWeekYear=tc,B.date=no,B.day=B.days=Qi,B.weekday=es,B.isoWeekday=ts,B.dayOfYear=ic,B.hour=B.hours=us,B.minute=B.minutes=sc,B.second=B.seconds=uc,B.millisecond=B.milliseconds=oo,B.utcOffset=js,B.utc=Ks,B.local=$s,B.parseZone=qs,B.hasAlignedHourOffset=Gs,B.isDST=Xs,B.isLocal=Js,B.isUtcOffset=Qs,B.isUtc=Kn,B.isUTC=Kn,B.zoneAbbr=lc,B.zoneName=hc,B.dates=de("dates accessor is deprecated. Use date instead.",no),B.months=de("months accessor is deprecated. Use month instead",On),B.years=de("years accessor is deprecated. Use year instead",Mn),B.zone=de("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",zs),B.isDSTShifted=de("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Zs);function dc(r){return Ee(r*1e3)}function mc(){return Ee.apply(null,arguments).parseZone()}function io(r){return r}var Me=De.prototype;Me.calendar=Qe,Me.longDateFormat=ri,Me.invalidDate=ni,Me.ordinal=si,Me.preparse=io,Me.postformat=io,Me.relativeTime=ci,Me.pastFuture=li,Me.set=ne,Me.eras=Ru,Me.erasParse=Iu,Me.erasConvertYear=Yu,Me.erasAbbrRegex=$u,Me.erasNameRegex=Ku,Me.erasNarrowRegex=qu,Me.months=Mi,Me.monthsShort=Ai,Me.monthsParse=_i,Me.monthsRegex=Ni,Me.monthsShortRegex=Oi,Me.week=Bi,Me.firstDayOfYear=Vi,Me.firstDayOfWeek=Hi,Me.weekdays=qi,Me.weekdaysMin=Xi,Me.weekdaysShort=Gi,Me.weekdaysParse=Ji,Me.weekdaysRegex=rs,Me.weekdaysShortRegex=as,Me.weekdaysMinRegex=ns,Me.isPM=is,Me.meridiem=cs;function fa(r,o,s,u){var h=At(),C=m().set(u,o);return h[s](C,r)}function so(r,o,s){if(y(r)&&(o=r,r=void 0),r=r||"",o!=null)return fa(r,o,s,"month");var u,h=[];for(u=0;u<12;u++)h[u]=fa(r,u,s,"month");return h}function za(r,o,s,u){typeof r=="boolean"?(y(o)&&(s=o,o=void 0),o=o||""):(o=r,s=o,r=false,y(o)&&(s=o,o=void 0),o=o||"");var h=At(),C=r?h._week.dow:0,T,Y=[];if(s!=null)return fa(o,(s+C)%7,u,"day");for(T=0;T<7;T++)Y[T]=fa(o,(T+C)%7,u,"day");return Y}function fc(r,o){return so(r,o,"months")}function pc(r,o){return so(r,o,"monthsShort")}function gc(r,o,s){return za(r,o,s,"weekdays")}function yc(r,o,s){return za(r,o,s,"weekdaysShort")}function Pc(r,o,s){return za(r,o,s,"weekdaysMin")}Rt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(r){var o=r%10,s=Se(r%100/10)===1?"th":o===1?"st":o===2?"nd":o===3?"rd":"th";return r+s}}),n.lang=de("moment.lang is deprecated. Use moment.locale instead.",Rt),n.langData=de("moment.langData is deprecated. Use moment.localeData instead.",At);var xt=Math.abs;function Cc(){var r=this._data;return this._milliseconds=xt(this._milliseconds),this._days=xt(this._days),this._months=xt(this._months),r.milliseconds=xt(r.milliseconds),r.seconds=xt(r.seconds),r.minutes=xt(r.minutes),r.hours=xt(r.hours),r.months=xt(r.months),r.years=xt(r.years),this}function uo(r,o,s,u){var h=yt(o,s);return r._milliseconds+=u*h._milliseconds,r._days+=u*h._days,r._months+=u*h._months,r._bubble()}function vc(r,o){return uo(this,r,o,1)}function kc(r,o){return uo(this,r,o,-1)}function co(r){return r<0?Math.floor(r):Math.ceil(r)}function Sc(){var r=this._milliseconds,o=this._days,s=this._months,u=this._data,h,C,T,Y,ue;return r>=0&&o>=0&&s>=0||r<=0&&o<=0&&s<=0||(r+=co(Ka(s)+o)*864e5,o=0,s=0),u.milliseconds=r%1e3,h=pt(r/1e3),u.seconds=h%60,C=pt(h/60),u.minutes=C%60,T=pt(C/60),u.hours=T%24,o+=pt(T/24),ue=pt(lo(o)),s+=ue,o-=co(Ka(ue)),Y=pt(s/12),s%=12,u.days=o,u.months=s,u.years=Y,this}function lo(r){return r*4800/146097}function Ka(r){return r*146097/4800}function wc(r){if(!this.isValid())return NaN;var o,s,u=this._milliseconds;if(r=ft(r),r==="month"||r==="quarter"||r==="year")switch(o=this._days+u/864e5,s=this._months+lo(o),r){case "month":return s;case "quarter":return s/3;case "year":return s/12}else switch(o=this._days+Math.round(Ka(this._months)),r){case "week":return o/7+u/6048e5;case "day":return o+u/864e5;case "hour":return o*24+u/36e5;case "minute":return o*1440+u/6e4;case "second":return o*86400+u/1e3;case "millisecond":return Math.floor(o*864e5)+u;default:throw new Error("Unknown unit "+r)}}function _t(r){return function(){return this.as(r)}}var ho=_t("ms"),bc=_t("s"),Dc=_t("m"),Tc=_t("h"),Mc=_t("d"),Ac=_t("w"),xc=_t("M"),_c=_t("Q"),Fc=_t("y"),Oc=ho;function Nc(){return yt(this)}function Ec(r){return r=ft(r),this.isValid()?this[r+"s"]():NaN}function ir(r){return function(){return this.isValid()?this._data[r]:NaN}}var Bc=ir("milliseconds"),Lc=ir("seconds"),Hc=ir("minutes"),Vc=ir("hours"),Rc=ir("days"),Ic=ir("months"),Yc=ir("years");function Uc(){return pt(this.days()/7)}var Ft=Math.round,vr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Wc(r,o,s,u,h){return h.relativeTime(o||1,!!s,r,u)}function jc(r,o,s,u){var h=yt(r).abs(),C=Ft(h.as("s")),T=Ft(h.as("m")),Y=Ft(h.as("h")),ue=Ft(h.as("d")),be=Ft(h.as("M")),rt=Ft(h.as("w")),Ot=Ft(h.as("y")),Yt=C<=s.ss&&["s",C]||C<s.s&&["ss",C]||T<=1&&["m"]||T<s.m&&["mm",T]||Y<=1&&["h"]||Y<s.h&&["hh",Y]||ue<=1&&["d"]||ue<s.d&&["dd",ue];return s.w!=null&&(Yt=Yt||rt<=1&&["w"]||rt<s.w&&["ww",rt]),Yt=Yt||be<=1&&["M"]||be<s.M&&["MM",be]||Ot<=1&&["y"]||["yy",Ot],Yt[2]=o,Yt[3]=+r>0,Yt[4]=u,Wc.apply(null,Yt)}function zc(r){return r===void 0?Ft:typeof r=="function"?(Ft=r,true):false}function Kc(r,o){return vr[r]===void 0?false:o===void 0?vr[r]:(vr[r]=o,r==="s"&&(vr.ss=o-1),true)}function $c(r,o){if(!this.isValid())return this.localeData().invalidDate();var s=false,u=vr,h,C;return typeof r=="object"&&(o=r,r=false),typeof r=="boolean"&&(s=r),typeof o=="object"&&(u=Object.assign({},vr,o),o.s!=null&&o.ss==null&&(u.ss=o.s-1)),h=this.localeData(),C=jc(this,!s,u,h),s&&(C=h.pastFuture(+this,C)),h.postformat(C)}var $a=Math.abs;function kr(r){return (r>0)-(r<0)||+r}function pa(){if(!this.isValid())return this.localeData().invalidDate();var r=$a(this._milliseconds)/1e3,o=$a(this._days),s=$a(this._months),u,h,C,T,Y=this.asSeconds(),ue,be,rt,Ot;return Y?(u=pt(r/60),h=pt(u/60),r%=60,u%=60,C=pt(s/12),s%=12,T=r?r.toFixed(3).replace(/\.?0+$/,""):"",ue=Y<0?"-":"",be=kr(this._months)!==kr(Y)?"-":"",rt=kr(this._days)!==kr(Y)?"-":"",Ot=kr(this._milliseconds)!==kr(Y)?"-":"",ue+"P"+(C?be+C+"Y":"")+(s?be+s+"M":"")+(o?rt+o+"D":"")+(h||u||r?"T":"")+(h?Ot+h+"H":"")+(u?Ot+u+"M":"")+(r?Ot+T+"S":"")):"P0D"}var Te=ua.prototype;return Te.isValid=Is,Te.abs=Cc,Te.add=vc,Te.subtract=kc,Te.as=wc,Te.asMilliseconds=ho,Te.asSeconds=bc,Te.asMinutes=Dc,Te.asHours=Tc,Te.asDays=Mc,Te.asWeeks=Ac,Te.asMonths=xc,Te.asQuarters=_c,Te.asYears=Fc,Te.valueOf=Oc,Te._bubble=Sc,Te.clone=Nc,Te.get=Ec,Te.milliseconds=Bc,Te.seconds=Lc,Te.minutes=Hc,Te.hours=Vc,Te.days=Rc,Te.weeks=Uc,Te.months=Ic,Te.years=Yc,Te.humanize=$c,Te.toISOString=pa,Te.toString=pa,Te.toJSON=pa,Te.locale=Zn,Te.localeData=Qn,Te.toIsoString=de("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",pa),Te.lang=Jn,Z("X",0,0,"unix"),Z("x",0,0,"valueOf"),U("x",ta),U("X",fi),Fe("X",function(r,o,s){s._d=new Date(parseFloat(r)*1e3);}),Fe("x",function(r,o,s){s._d=new Date(Se(r));}),n.version="2.30.1",i(Ee),n.fn=B,n.min=Ls,n.max=Hs,n.now=Vs,n.utc=m,n.unix=dc,n.months=fc,n.isDate=P,n.locale=Rt,n.invalid=R,n.duration=yt,n.isMoment=N,n.weekdays=gc,n.parseZone=mc,n.localeData=At,n.isDuration=ca,n.monthsShort=pc,n.weekdaysMin=Pc,n.defineLocale=Ea,n.updateLocale=ms,n.locales=fs,n.weekdaysShort=yc,n.normalizeUnits=ft,n.relativeTimeRounding=zc,n.relativeTimeThreshold=Kc,n.calendarFormat=cu,n.prototype=B,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}));});function nt(t){return t<0?-1:t===0?0:1}function Kr(t,e,a){return (1-a)*t+a*e}function ul(t,e,a){return a<t?t:a>e?e:a}function Xe(t,e,a){return a<t?t:a>e?e:a}function fo(t){return t=t%360,t<0&&(t=t+360),t}function ct(t){return t=t%360,t<0&&(t=t+360),t}function Ga(t,e){let a=t[0]*e[0][0]+t[1]*e[0][1]+t[2]*e[0][2],n=t[0]*e[1][0]+t[1]*e[1][1]+t[2]*e[1][2],i=t[0]*e[2][0]+t[1]*e[2][1]+t[2]*e[2][2];return [a,n,i]}var Lo=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],cl=[[3.2413774792388685,-1.5376652402851851,-0.49885366846268053],[-0.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-0.20395524564742123,1.0571799111220335]],Ho=[95.047,100,108.883];function cn(t,e,a){return (255<<24|(t&255)<<16|(e&255)<<8|a&255)>>>0}function po(t){let e=hr(t[0]),a=hr(t[1]),n=hr(t[2]);return cn(e,a,n)}function ln(t){return t>>16&255}function hn(t){return t>>8&255}function dn(t){return t&255}function ll(t,e,a){let n=cl,i=n[0][0]*t+n[0][1]*e+n[0][2]*a,l=n[1][0]*t+n[1][1]*e+n[1][2]*a,c=n[2][0]*t+n[2][1]*e+n[2][2]*a,d=hr(i),p=hr(l),f=hr(c);return cn(d,p,f)}function hl(t){let e=Lt(ln(t)),a=Lt(hn(t)),n=Lt(dn(t));return Ga([e,a,n],Lo)}function dl(t){let e=Lt(ln(t)),a=Lt(hn(t)),n=Lt(dn(t)),i=Lo,l=i[0][0]*e+i[0][1]*a+i[0][2]*n,c=i[1][0]*e+i[1][1]*a+i[1][2]*n,d=i[2][0]*e+i[2][1]*a+i[2][2]*n,p=Ho,f=l/p[0],y=c/p[1],P=d/p[2],k=$r(f),v=$r(y),m=$r(P),g=116*v-16,S=500*(k-v),E=200*(v-m);return [g,S,E]}function ml(t){let e=qt(t),a=hr(e);return cn(a,a,a)}function go(t){let e=hl(t)[1];return 116*$r(e/100)-16}function qt(t){return 100*pl((t+16)/116)}function Xa(t){return $r(t/100)*116-16}function Lt(t){let e=t/255;return e<=.040449936?e/12.92*100:Math.pow((e+.055)/1.055,2.4)*100}function hr(t){let e=t/100,a=0;return e<=.0031308?a=e*12.92:a=1.055*Math.pow(e,1/2.4)-.055,ul(0,255,Math.round(a*255))}function fl(){return Ho}function $r(t){let e=.008856451679035631,a=24389/27;return t>e?Math.pow(t,1/3):(a*t+16)/116}function pl(t){let e=.008856451679035631,a=24389/27,n=t*t*t;return n>e?n:(116*t-16)/a}var Gt=class Vo{static make(e=fl(),a=200/Math.PI*qt(50)/100,n=50,i=2,l=false){let c=e,d=c[0]*.401288+c[1]*.650173+c[2]*-0.051461,p=c[0]*-0.250268+c[1]*1.204414+c[2]*.045854,f=c[0]*-2079e-6+c[1]*.048952+c[2]*.953127,y=.8+i/10,P=y>=.9?Kr(.59,.69,(y-.9)*10):Kr(.525,.59,(y-.8)*10),k=l?1:y*(1-1/3.6*Math.exp((-a-42)/92));k=k>1?1:k<0?0:k;let v=y,m=[k*(100/d)+1-k,k*(100/p)+1-k,k*(100/f)+1-k],g=1/(5*a+1),S=g*g*g*g,E=1-S,V=S*a+.1*E*E*Math.cbrt(5*a),R=qt(n)/e[1],W=1.48+Math.sqrt(R),L=.725/Math.pow(R,.2),$=L,H=[Math.pow(V*m[0]*d/100,.42),Math.pow(V*m[1]*p/100,.42),Math.pow(V*m[2]*f/100,.42)],N=[400*H[0]/(H[0]+27.13),400*H[1]/(H[1]+27.13),400*H[2]/(H[2]+27.13)],I=(2*N[0]+N[1]+.05*N[2])*L;return new Vo(R,I,L,$,P,v,m,V,Math.pow(V,.25),W)}constructor(e,a,n,i,l,c,d,p,f,y){this.n=e,this.aw=a,this.nbb=n,this.ncb=i,this.c=l,this.nc=c,this.rgbD=d,this.fl=p,this.fLRoot=f,this.z=y;}};Gt.DEFAULT=Gt.make();var Wr=class zt{constructor(e,a,n,i,l,c,d,p,f){this.hue=e,this.chroma=a,this.j=n,this.q=i,this.m=l,this.s=c,this.jstar=d,this.astar=p,this.bstar=f;}distance(e){let a=this.jstar-e.jstar,n=this.astar-e.astar,i=this.bstar-e.bstar,l=Math.sqrt(a*a+n*n+i*i);return 1.41*Math.pow(l,.63)}static fromInt(e){return zt.fromIntInViewingConditions(e,Gt.DEFAULT)}static fromIntInViewingConditions(e,a){let n=(e&16711680)>>16,i=(e&65280)>>8,l=e&255,c=Lt(n),d=Lt(i),p=Lt(l),f=.41233895*c+.35762064*d+.18051042*p,y=.2126*c+.7152*d+.0722*p,P=.01932141*c+.11916382*d+.95034478*p,k=.401288*f+.650173*y-.051461*P,v=-0.250268*f+1.204414*y+.045854*P,m=-2079e-6*f+.048952*y+.953127*P,g=a.rgbD[0]*k,S=a.rgbD[1]*v,E=a.rgbD[2]*m,V=Math.pow(a.fl*Math.abs(g)/100,.42),R=Math.pow(a.fl*Math.abs(S)/100,.42),W=Math.pow(a.fl*Math.abs(E)/100,.42),L=nt(g)*400*V/(V+27.13),$=nt(S)*400*R/(R+27.13),H=nt(E)*400*W/(W+27.13),N=(11*L+-12*$+H)/11,I=(L+$-2*H)/9,de=(20*L+20*$+21*H)/20,we=(40*L+20*$+H)/20,me=Math.atan2(I,N)*180/Math.PI,ke=ct(me),ne=ke*Math.PI/180,Oe=we*a.nbb,De=100*Math.pow(Oe/a.aw,a.c*a.z),Ge=4/a.c*Math.sqrt(De/100)*(a.aw+4)*a.fLRoot,tt=ke<20.14?ke+360:ke,Qe=.25*(Math.cos(tt*Math.PI/180+2)+3.8),Re=5e4/13*Qe*a.nc*a.ncb*Math.sqrt(N*N+I*I)/(de+.305),Ue=Math.pow(Re,.9)*Math.pow(1.64-Math.pow(.29,a.n),.73),st=Ue*Math.sqrt(De/100),dt=st*a.fLRoot,mt=50*Math.sqrt(Ue*a.c/(a.aw+4)),Z=(1+100*.007)*De/(1+.007*De),kt=1/.0228*Math.log(1+.0228*dt),ar=kt*Math.cos(ne),St=kt*Math.sin(ne);return new zt(ke,st,De,Ge,dt,mt,Z,ar,St)}static fromJch(e,a,n){return zt.fromJchInViewingConditions(e,a,n,Gt.DEFAULT)}static fromJchInViewingConditions(e,a,n,i){let l=4/i.c*Math.sqrt(e/100)*(i.aw+4)*i.fLRoot,c=a*i.fLRoot,d=a/Math.sqrt(e/100),p=50*Math.sqrt(d*i.c/(i.aw+4)),f=n*Math.PI/180,y=(1+100*.007)*e/(1+.007*e),P=1/.0228*Math.log(1+.0228*c),k=P*Math.cos(f),v=P*Math.sin(f);return new zt(n,a,e,l,c,p,y,k,v)}static fromUcs(e,a,n){return zt.fromUcsInViewingConditions(e,a,n,Gt.DEFAULT)}static fromUcsInViewingConditions(e,a,n,i){let l=a,c=n,d=Math.sqrt(l*l+c*c),p=(Math.exp(d*.0228)-1)/.0228/i.fLRoot,f=Math.atan2(c,l)*(180/Math.PI);f<0&&(f+=360);let y=e/(1-(e-100)*.007);return zt.fromJchInViewingConditions(y,p,f,i)}toInt(){return this.viewed(Gt.DEFAULT)}viewed(e){let a=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(a/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),i=this.hue*Math.PI/180,l=.25*(Math.cos(i+2)+3.8),c=e.aw*Math.pow(this.j/100,1/e.c/e.z),d=l*(5e4/13)*e.nc*e.ncb,p=c/e.nbb,f=Math.sin(i),y=Math.cos(i),P=23*(p+.305)*n/(23*d+11*n*y+108*n*f),k=P*y,v=P*f,m=(460*p+451*k+288*v)/1403,g=(460*p-891*k-261*v)/1403,S=(460*p-220*k-6300*v)/1403,E=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),V=nt(m)*(100/e.fl)*Math.pow(E,1/.42),R=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),W=nt(g)*(100/e.fl)*Math.pow(R,1/.42),L=Math.max(0,27.13*Math.abs(S)/(400-Math.abs(S))),$=nt(S)*(100/e.fl)*Math.pow(L,1/.42),H=V/e.rgbD[0],N=W/e.rgbD[1],I=$/e.rgbD[2],de=1.86206786*H-1.01125463*N+.14918677*I,we=.38752654*H+.62144744*N-.00897398*I,me=-0.0158415*H-.03412294*N+1.04996444*I;return ll(de,we,me)}static fromXyzInViewingConditions(e,a,n,i){let l=.401288*e+.650173*a-.051461*n,c=-0.250268*e+1.204414*a+.045854*n,d=-2079e-6*e+.048952*a+.953127*n,p=i.rgbD[0]*l,f=i.rgbD[1]*c,y=i.rgbD[2]*d,P=Math.pow(i.fl*Math.abs(p)/100,.42),k=Math.pow(i.fl*Math.abs(f)/100,.42),v=Math.pow(i.fl*Math.abs(y)/100,.42),m=nt(p)*400*P/(P+27.13),g=nt(f)*400*k/(k+27.13),S=nt(y)*400*v/(v+27.13),E=(11*m+-12*g+S)/11,V=(m+g-2*S)/9,R=(20*m+20*g+21*S)/20,W=(40*m+20*g+S)/20,L=Math.atan2(V,E)*180/Math.PI,$=L<0?L+360:L>=360?L-360:L,H=$*Math.PI/180,N=W*i.nbb,I=100*Math.pow(N/i.aw,i.c*i.z),de=4/i.c*Math.sqrt(I/100)*(i.aw+4)*i.fLRoot,we=$<20.14?$+360:$,me=1/4*(Math.cos(we*Math.PI/180+2)+3.8),ke=5e4/13*me*i.nc*i.ncb*Math.sqrt(E*E+V*V)/(R+.305),ne=Math.pow(ke,.9)*Math.pow(1.64-Math.pow(.29,i.n),.73),Oe=ne*Math.sqrt(I/100),De=Oe*i.fLRoot,Ge=50*Math.sqrt(ne*i.c/(i.aw+4)),tt=(1+100*.007)*I/(1+.007*I),Qe=Math.log(1+.0228*De)/.0228,Re=Qe*Math.cos(H),Ue=Qe*Math.sin(H);return new zt($,Oe,I,de,De,Ge,tt,Re,Ue)}xyzInViewingConditions(e){let a=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(a/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),i=this.hue*Math.PI/180,l=.25*(Math.cos(i+2)+3.8),c=e.aw*Math.pow(this.j/100,1/e.c/e.z),d=l*(5e4/13)*e.nc*e.ncb,p=c/e.nbb,f=Math.sin(i),y=Math.cos(i),P=23*(p+.305)*n/(23*d+11*n*y+108*n*f),k=P*y,v=P*f,m=(460*p+451*k+288*v)/1403,g=(460*p-891*k-261*v)/1403,S=(460*p-220*k-6300*v)/1403,E=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),V=nt(m)*(100/e.fl)*Math.pow(E,1/.42),R=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),W=nt(g)*(100/e.fl)*Math.pow(R,1/.42),L=Math.max(0,27.13*Math.abs(S)/(400-Math.abs(S))),$=nt(S)*(100/e.fl)*Math.pow(L,1/.42),H=V/e.rgbD[0],N=W/e.rgbD[1],I=$/e.rgbD[2],de=1.86206786*H-1.01125463*N+.14918677*I,we=.38752654*H+.62144744*N-.00897398*I,me=-0.0158415*H-.03412294*N+1.04996444*I;return [de,we,me]}},Xt=class fe{static sanitizeRadians(e){return (e+Math.PI*8)%(Math.PI*2)}static trueDelinearized(e){let a=e/100,n=0;return a<=.0031308?n=a*12.92:n=1.055*Math.pow(a,1/2.4)-.055,n*255}static chromaticAdaptation(e){let a=Math.pow(Math.abs(e),.42);return nt(e)*400*a/(a+27.13)}static hueOf(e){let a=Ga(e,fe.SCALED_DISCOUNT_FROM_LINRGB),n=fe.chromaticAdaptation(a[0]),i=fe.chromaticAdaptation(a[1]),l=fe.chromaticAdaptation(a[2]),c=(11*n+-12*i+l)/11,d=(n+i-2*l)/9;return Math.atan2(d,c)}static areInCyclicOrder(e,a,n){let i=fe.sanitizeRadians(a-e),l=fe.sanitizeRadians(n-e);return i<l}static intercept(e,a,n){return (a-e)/(n-e)}static lerpPoint(e,a,n){return [e[0]+(n[0]-e[0])*a,e[1]+(n[1]-e[1])*a,e[2]+(n[2]-e[2])*a]}static setCoordinate(e,a,n,i){let l=fe.intercept(e[i],a,n[i]);return fe.lerpPoint(e,l,n)}static isBounded(e){return 0<=e&&e<=100}static nthVertex(e,a){let n=fe.Y_FROM_LINRGB[0],i=fe.Y_FROM_LINRGB[1],l=fe.Y_FROM_LINRGB[2],c=a%4<=1?0:100,d=a%2===0?0:100;if(a<4){let p=c,f=d,y=(e-p*i-f*l)/n;return fe.isBounded(y)?[y,p,f]:[-1,-1,-1]}else if(a<8){let p=c,f=d,y=(e-f*n-p*l)/i;return fe.isBounded(y)?[f,y,p]:[-1,-1,-1]}else {let p=c,f=d,y=(e-p*n-f*i)/l;return fe.isBounded(y)?[p,f,y]:[-1,-1,-1]}}static bisectToSegment(e,a){let n=[-1,-1,-1],i=n,l=0,c=0,d=false,p=true;for(let f=0;f<12;f++){let y=fe.nthVertex(e,f);if(y[0]<0)continue;let P=fe.hueOf(y);if(!d){n=y,i=y,l=P,c=P,d=true;continue}(p||fe.areInCyclicOrder(l,P,c))&&(p=false,fe.areInCyclicOrder(l,a,P)?(i=y,c=P):(n=y,l=P));}return [n,i]}static midpoint(e,a){return [(e[0]+a[0])/2,(e[1]+a[1])/2,(e[2]+a[2])/2]}static criticalPlaneBelow(e){return Math.floor(e-.5)}static criticalPlaneAbove(e){return Math.ceil(e-.5)}static bisectToLimit(e,a){let n=fe.bisectToSegment(e,a),i=n[0],l=fe.hueOf(i),c=n[1];for(let d=0;d<3;d++)if(i[d]!==c[d]){let p=-1,f=255;i[d]<c[d]?(p=fe.criticalPlaneBelow(fe.trueDelinearized(i[d])),f=fe.criticalPlaneAbove(fe.trueDelinearized(c[d]))):(p=fe.criticalPlaneAbove(fe.trueDelinearized(i[d])),f=fe.criticalPlaneBelow(fe.trueDelinearized(c[d])));for(let y=0;y<8&&!(Math.abs(f-p)<=1);y++){let P=Math.floor((p+f)/2),k=fe.CRITICAL_PLANES[P],v=fe.setCoordinate(i,k,c,d),m=fe.hueOf(v);fe.areInCyclicOrder(l,a,m)?(c=v,f=P):(i=v,l=m,p=P);}}return fe.midpoint(i,c)}static inverseChromaticAdaptation(e){let a=Math.abs(e),n=Math.max(0,27.13*a/(400-a));return nt(e)*Math.pow(n,1/.42)}static findResultByJ(e,a,n){let i=Math.sqrt(n)*11,l=Gt.DEFAULT,c=1/Math.pow(1.64-Math.pow(.29,l.n),.73),d=.25*(Math.cos(e+2)+3.8)*(5e4/13)*l.nc*l.ncb,p=Math.sin(e),f=Math.cos(e);for(let y=0;y<5;y++){let P=i/100,k=a===0||i===0?0:a/Math.sqrt(P),v=Math.pow(k*c,1/.9),m=l.aw*Math.pow(P,1/l.c/l.z)/l.nbb,g=23*(m+.305)*v/(23*d+11*v*f+108*v*p),S=g*f,E=g*p,V=(460*m+451*S+288*E)/1403,R=(460*m-891*S-261*E)/1403,W=(460*m-220*S-6300*E)/1403,L=fe.inverseChromaticAdaptation(V),$=fe.inverseChromaticAdaptation(R),H=fe.inverseChromaticAdaptation(W),N=Ga([L,$,H],fe.LINRGB_FROM_SCALED_DISCOUNT);if(N[0]<0||N[1]<0||N[2]<0)return 0;let I=fe.Y_FROM_LINRGB[0],de=fe.Y_FROM_LINRGB[1],we=fe.Y_FROM_LINRGB[2],me=I*N[0]+de*N[1]+we*N[2];if(me<=0)return 0;if(y===4||Math.abs(me-n)<.002)return N[0]>100.01||N[1]>100.01||N[2]>100.01?0:po(N);i=i-(me-n)*i/(2*me);}return 0}static solveToInt(e,a,n){if(a<1e-4||n<1e-4||n>99.9999)return ml(n);e=ct(e);let i=e/180*Math.PI,l=qt(n),c=fe.findResultByJ(i,a,l);if(c!==0)return c;let d=fe.bisectToLimit(l,i);return po(d)}static solveToCam(e,a,n){return Wr.fromInt(fe.solveToInt(e,a,n))}};Xt.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];Xt.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];Xt.Y_FROM_LINRGB=[.2126,.7152,.0722];Xt.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var ce=class ga{static from(e,a,n){return new ga(Xt.solveToInt(e,a,n))}static fromInt(e){return new ga(e)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(e){this.setInternalState(Xt.solveToInt(e,this.internalChroma,this.internalTone));}get chroma(){return this.internalChroma}set chroma(e){this.setInternalState(Xt.solveToInt(this.internalHue,e,this.internalTone));}get tone(){return this.internalTone}set tone(e){this.setInternalState(Xt.solveToInt(this.internalHue,this.internalChroma,e));}setValue(e,a){this[e]=a;}toString(){return `HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`}static isBlue(e){return e>=250&&e<270}static isYellow(e){return e>=105&&e<125}static isCyan(e){return e>=170&&e<207}constructor(e){this.argb=e;let a=Wr.fromInt(e);this.internalHue=a.hue,this.internalChroma=a.chroma,this.internalTone=go(e),this.argb=e;}setInternalState(e){let a=Wr.fromInt(e);this.internalHue=a.hue,this.internalChroma=a.chroma,this.internalTone=go(e),this.argb=e;}inViewingConditions(e){let a=Wr.fromInt(this.toInt()).xyzInViewingConditions(e),n=Wr.fromXyzInViewingConditions(a[0],a[1],a[2],Gt.make());return ga.from(n.hue,n.chroma,Xa(a[1]))}},Ke=class Ar{static ratioOfTones(e,a){return e=Xe(0,100,e),a=Xe(0,100,a),Ar.ratioOfYs(qt(e),qt(a))}static ratioOfYs(e,a){let n=e>a?e:a,i=n===a?e:a;return (n+5)/(i+5)}static lighter(e,a){if(e<0||e>100)return -1;let n=qt(e),i=a*(n+5)-5,l=Ar.ratioOfYs(i,n),c=Math.abs(l-a);if(l<a&&c>.04)return -1;let d=Xa(i)+.4;return d<0||d>100?-1:d}static darker(e,a){if(e<0||e>100)return -1;let n=qt(e),i=(n+5)/a-5,l=Ar.ratioOfYs(n,i),c=Math.abs(l-a);if(l<a&&c>.04)return -1;let d=Xa(i)-.4;return d<0||d>100?-1:d}static lighterUnsafe(e,a){let n=Ar.lighter(e,a);return n<0?100:n}static darkerUnsafe(e,a){let n=Ar.darker(e,a);return n<0?0:n}},Za=class Ro{static isDisliked(e){let a=Math.round(e.hue)>=90&&Math.round(e.hue)<=111,n=Math.round(e.chroma)>16,i=Math.round(e.tone)<65;return a&&n&&i}static fixIfDisliked(e){return Ro.isDisliked(e)?ce.from(e.hue,e.chroma,70):e}};function gl(t,e,a){if(t.name!==a.name)throw new Error(`Attempting to extend color ${t.name} with color ${a.name} of different name for spec version ${e}.`);if(t.isBackground!==a.isBackground)throw new Error(`Attempting to extend color ${t.name} as a ${t.isBackground?"background":"foreground"} with color ${a.name} as a ${a.isBackground?"background":"foreground"} for spec version ${e}.`)}function oe(t,e,a){return gl(t,e,a),M.fromPalette({name:t.name,palette:n=>n.specVersion===e?a.palette(n):t.palette(n),tone:n=>n.specVersion===e?a.tone(n):t.tone(n),isBackground:t.isBackground,chromaMultiplier:n=>{let i=n.specVersion===e?a.chromaMultiplier:t.chromaMultiplier;return i!==void 0?i(n):1},background:n=>{let i=n.specVersion===e?a.background:t.background;return i!==void 0?i(n):void 0},secondBackground:n=>{let i=n.specVersion===e?a.secondBackground:t.secondBackground;return i!==void 0?i(n):void 0},contrastCurve:n=>{let i=n.specVersion===e?a.contrastCurve:t.contrastCurve;return i!==void 0?i(n):void 0},toneDeltaPair:n=>{let i=n.specVersion===e?a.toneDeltaPair:t.toneDeltaPair;return i!==void 0?i(n):void 0}})}var M=class ur{static fromPalette(e){return new ur(e.name??"",e.palette,e.tone??ur.getInitialToneFromBackground(e.background),e.isBackground??false,e.chromaMultiplier,e.background,e.secondBackground,e.contrastCurve,e.toneDeltaPair)}static getInitialToneFromBackground(e){return e===void 0?a=>50:a=>e(a)?e(a).getTone(a):50}constructor(e,a,n,i,l,c,d,p,f){if(this.name=e,this.palette=a,this.tone=n,this.isBackground=i,this.chromaMultiplier=l,this.background=c,this.secondBackground=d,this.contrastCurve=p,this.toneDeltaPair=f,this.hctCache=new Map,!c&&d)throw new Error(`Color ${e} has secondBackgrounddefined, but background is not defined.`);if(!c&&p)throw new Error(`Color ${e} has contrastCurvedefined, but background is not defined.`);if(c&&!p)throw new Error(`Color ${e} has backgrounddefined, but contrastCurve is not defined.`)}clone(){return ur.fromPalette({name:this.name,palette:this.palette,tone:this.tone,isBackground:this.isBackground,chromaMultiplier:this.chromaMultiplier,background:this.background,secondBackground:this.secondBackground,contrastCurve:this.contrastCurve,toneDeltaPair:this.toneDeltaPair})}clearCache(){this.hctCache.clear();}getArgb(e){return this.getHct(e).toInt()}getHct(e){let a=this.hctCache.get(e);if(a!=null)return a;let n=yo(e.specVersion).getHct(e,this);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(e,n),n}getTone(e){return yo(e.specVersion).getTone(e,this)}static foregroundTone(e,a){let n=Ke.lighterUnsafe(e,a),i=Ke.darkerUnsafe(e,a),l=Ke.ratioOfTones(n,e),c=Ke.ratioOfTones(i,e);if(ur.tonePrefersLightForeground(e)){let d=Math.abs(l-c)<.1&&l<a&&c<a;return l>=a||l>=c||d?n:i}else return c>=a||c>=l?i:n}static tonePrefersLightForeground(e){return Math.round(e)<60}static toneAllowsLightForeground(e){return Math.round(e)<=49}static enableLightForeground(e){return ur.tonePrefersLightForeground(e)&&!ur.toneAllowsLightForeground(e)?49:e}},yl=class{getHct(t,e){let a=e.getTone(t);return e.palette(t).getHct(a)}getTone(t,e){let a=t.contrastLevel<0,n=e.toneDeltaPair?e.toneDeltaPair(t):void 0;if(n){let i=n.roleA,l=n.roleB,c=n.delta,d=n.polarity,p=n.stayTogether,f=d==="nearer"||d==="lighter"&&!t.isDark||d==="darker"&&t.isDark,y=f?i:l,P=f?l:i,k=e.name===y.name,v=t.isDark?1:-1,m=y.tone(t),g=P.tone(t);if(e.background&&y.contrastCurve&&P.contrastCurve){let S=e.background(t),E=y.contrastCurve(t),V=P.contrastCurve(t);if(S&&E&&V){let R=S.getTone(t),W=E.get(t.contrastLevel),L=V.get(t.contrastLevel);Ke.ratioOfTones(R,m)<W&&(m=M.foregroundTone(R,W)),Ke.ratioOfTones(R,g)<L&&(g=M.foregroundTone(R,L)),a&&(m=M.foregroundTone(R,W),g=M.foregroundTone(R,L));}}return (g-m)*v<c&&(g=Xe(0,100,m+c*v),(g-m)*v>=c||(m=Xe(0,100,g-c*v))),50<=m&&m<60?v>0?(m=60,g=Math.max(g,m+c*v)):(m=49,g=Math.min(g,m+c*v)):50<=g&&g<60&&(p?v>0?(m=60,g=Math.max(g,m+c*v)):(m=49,g=Math.min(g,m+c*v)):v>0?g=60:g=49),k?m:g}else {let i=e.tone(t);if(e.background==null||e.background(t)===void 0||e.contrastCurve==null||e.contrastCurve(t)===void 0)return i;let l=e.background(t).getTone(t),c=e.contrastCurve(t).get(t.contrastLevel);if(Ke.ratioOfTones(l,i)>=c||(i=M.foregroundTone(l,c)),a&&(i=M.foregroundTone(l,c)),e.isBackground&&50<=i&&i<60&&(Ke.ratioOfTones(49,l)>=c?i=49:i=60),e.secondBackground==null||e.secondBackground(t)===void 0)return i;let[d,p]=[e.background,e.secondBackground],[f,y]=[d(t).getTone(t),p(t).getTone(t)],[P,k]=[Math.max(f,y),Math.min(f,y)];if(Ke.ratioOfTones(P,i)>=c&&Ke.ratioOfTones(k,i)>=c)return i;let v=Ke.lighter(P,c),m=Ke.darker(k,c),g=[];return v!==-1&&g.push(v),m!==-1&&g.push(m),M.tonePrefersLightForeground(f)||M.tonePrefersLightForeground(y)?v<0?100:v:g.length===1?g[0]:m<0?0:m}}},Pl=class{getHct(t,e){let a=e.palette(t),n=e.getTone(t),i=a.hue,l=a.chroma*(e.chromaMultiplier?e.chromaMultiplier(t):1);return ce.from(i,l,n)}getTone(t,e){let a=e.toneDeltaPair?e.toneDeltaPair(t):void 0;if(a){let n=a.roleA,i=a.roleB,l=a.polarity,c=a.constraint,d=l==="darker"||l==="relative_lighter"&&t.isDark||l==="relative_darker"&&!t.isDark?-a.delta:a.delta,p=e.name===n.name,f=p?n:i,y=p?i:n,P=f.tone(t),k=y.getTone(t),v=d*(p?1:-1);if(c==="exact"?P=Xe(0,100,k+v):c==="nearer"?v>0?P=Xe(0,100,Xe(k,k+v,P)):P=Xe(0,100,Xe(k+v,k,P)):c==="farther"&&(v>0?P=Xe(k+v,100,P):P=Xe(0,k+v,P)),e.background&&e.contrastCurve){let m=e.background(t),g=e.contrastCurve(t);if(m&&g){let S=m.getTone(t),E=g.get(t.contrastLevel);P=Ke.ratioOfTones(S,P)>=E&&t.contrastLevel>=0?P:M.foregroundTone(S,E);}}return e.isBackground&&!e.name.endsWith("_fixed_dim")&&(P>=57?P=Xe(65,100,P):P=Xe(0,49,P)),P}else {let n=e.tone(t);if(e.background==null||e.background(t)===void 0||e.contrastCurve==null||e.contrastCurve(t)===void 0)return n;let i=e.background(t).getTone(t),l=e.contrastCurve(t).get(t.contrastLevel);if(n=Ke.ratioOfTones(i,n)>=l&&t.contrastLevel>=0?n:M.foregroundTone(i,l),e.isBackground&&!e.name.endsWith("_fixed_dim")&&(n>=57?n=Xe(65,100,n):n=Xe(0,49,n)),e.secondBackground==null||e.secondBackground(t)===void 0)return n;let[c,d]=[e.background,e.secondBackground],[p,f]=[c(t).getTone(t),d(t).getTone(t)],[y,P]=[Math.max(p,f),Math.min(p,f)];if(Ke.ratioOfTones(y,n)>=l&&Ke.ratioOfTones(P,n)>=l)return n;let k=Ke.lighter(y,l),v=Ke.darker(P,l),m=[];return k!==-1&&m.push(k),v!==-1&&m.push(v),M.tonePrefersLightForeground(p)||M.tonePrefersLightForeground(f)?k<0?100:k:m.length===1?m[0]:v<0?0:v}}},Cl=new yl,vl=new Pl;function yo(t){return t==="2025"?vl:Cl}var j=class ya{static fromInt(e){let a=ce.fromInt(e);return ya.fromHct(a)}static fromHct(e){return new ya(e.hue,e.chroma,e)}static fromHueAndChroma(e,a){let n=new kl(e,a).create();return new ya(e,a,n)}constructor(e,a,n){this.hue=e,this.chroma=a,this.keyColor=n,this.cache=new Map;}tone(e){let a=this.cache.get(e);return a===void 0&&(e==99&&ce.isYellow(this.hue)?a=this.averageArgb(this.tone(98),this.tone(100)):a=ce.from(this.hue,this.chroma,e).toInt(),this.cache.set(e,a)),a}getHct(e){return ce.fromInt(this.tone(e))}averageArgb(e,a){let n=e>>>16&255,i=e>>>8&255,l=e&255,c=a>>>16&255,d=a>>>8&255,p=a&255,f=Math.round((n+c)/2),y=Math.round((i+d)/2),P=Math.round((l+p)/2);return (255<<24|(f&255)<<16|(y&255)<<8|P&255)>>>0}},kl=class{constructor(t,e){this.hue=t,this.requestedChroma=e,this.chromaCache=new Map,this.maxChromaValue=200;}create(){let t=0,e=100;for(;t<e;){let a=Math.floor((t+e)/2),n=this.maxChroma(a)<this.maxChroma(a+1);if(this.maxChroma(a)>=this.requestedChroma-.01)if(Math.abs(t-50)<Math.abs(e-50))e=a;else {if(t===a)return ce.from(this.hue,this.requestedChroma,t);t=a;}else n?t=a+1:e=a;}return ce.from(this.hue,this.requestedChroma,t)}maxChroma(t){if(this.chromaCache.has(t))return this.chromaCache.get(t);let e=ce.from(this.hue,this.maxChromaValue,t).chroma;return this.chromaCache.set(t,e),e}},Po=class Pa{constructor(e){this.input=e,this.hctsByTempCache=[],this.hctsByHueCache=[],this.tempsByHctCache=new Map,this.inputRelativeTemperatureCache=-1,this.complementCache=null;}get hctsByTemp(){if(this.hctsByTempCache.length>0)return this.hctsByTempCache;let e=this.hctsByHue.concat([this.input]),a=this.tempsByHct;return e.sort((n,i)=>a.get(n)-a.get(i)),this.hctsByTempCache=e,e}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(e=5,a=12){let n=Math.round(this.input.hue),i=this.hctsByHue[n],l=this.relativeTemperature(i),c=[i],d=0;for(let m=0;m<360;m++){let g=fo(n+m),S=this.hctsByHue[g],E=this.relativeTemperature(S),V=Math.abs(E-l);l=E,d+=V;}let p=1,f=d/a,y=0;for(l=this.relativeTemperature(i);c.length<a;){let m=fo(n+p),g=this.hctsByHue[m],S=this.relativeTemperature(g),E=Math.abs(S-l);y+=E;let V=c.length*f,R=y>=V,W=1;for(;R&&c.length<a;){c.push(g);let L=(c.length+W)*f;R=y>=L,W++;}if(l=S,p++,p>360){for(;c.length<a;)c.push(g);break}}let P=[this.input],k=Math.floor((e-1)/2);for(let m=1;m<k+1;m++){let g=0-m;for(;g<0;)g=c.length+g;g>=c.length&&(g=g%c.length),P.splice(0,0,c[g]);}let v=e-k-1;for(let m=1;m<v+1;m++){let g=m;for(;g<0;)g=c.length+g;g>=c.length&&(g=g%c.length),P.push(c[g]);}return P}get complement(){if(this.complementCache!=null)return this.complementCache;let e=this.coldest.hue,a=this.tempsByHct.get(this.coldest),n=this.warmest.hue,i=this.tempsByHct.get(this.warmest)-a,l=Pa.isBetween(this.input.hue,e,n),c=l?n:e,d=l?e:n,p=1,f=1e3,y=this.hctsByHue[Math.round(this.input.hue)],P=1-this.inputRelativeTemperature;for(let k=0;k<=360;k+=1){let v=ct(c+p*k);if(!Pa.isBetween(v,c,d))continue;let m=this.hctsByHue[Math.round(v)],g=(this.tempsByHct.get(m)-a)/i,S=Math.abs(P-g);S<f&&(f=S,y=m);}return this.complementCache=y,this.complementCache}relativeTemperature(e){let a=this.tempsByHct.get(this.warmest)-this.tempsByHct.get(this.coldest),n=this.tempsByHct.get(e)-this.tempsByHct.get(this.coldest);return a===0?.5:n/a}get inputRelativeTemperature(){return this.inputRelativeTemperatureCache>=0?this.inputRelativeTemperatureCache:(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input),this.inputRelativeTemperatureCache)}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;let e=this.hctsByHue.concat([this.input]),a=new Map;for(let n of e)a.set(n,Pa.rawTemperature(n));return this.tempsByHctCache=a,a}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;let e=[];for(let a=0;a<=360;a+=1){let n=ce.from(a,this.input.chroma,this.input.tone);e.push(n);}return this.hctsByHueCache=e,this.hctsByHueCache}static isBetween(e,a,n){return a<n?a<=e&&e<=n:a<=e||e<=n}static rawTemperature(e){let a=dl(e.toInt()),n=ct(Math.atan2(a[2],a[1])*180/Math.PI),i=Math.sqrt(a[1]*a[1]+a[2]*a[2]);return -0.5+.02*Math.pow(i,1.07)*Math.cos(ct(n-50)*Math.PI/180)}},J=class{constructor(t,e,a,n){this.low=t,this.normal=e,this.medium=a,this.high=n;}get(t){return t<=-1?this.low:t<0?Kr(this.low,this.normal,(t- -1)/1):t<.5?Kr(this.normal,this.medium,(t-0)/.5):t<1?Kr(this.medium,this.high,(t-.5)/.5):this.high}},Ae=class{constructor(t,e,a,n,i,l){this.roleA=t,this.roleB=e,this.delta=a,this.polarity=n,this.stayTogether=i,this.constraint=l,this.constraint=l??"exact";}},w;(function(t){t[t.MONOCHROME=0]="MONOCHROME",t[t.NEUTRAL=1]="NEUTRAL",t[t.TONAL_SPOT=2]="TONAL_SPOT",t[t.VIBRANT=3]="VIBRANT",t[t.EXPRESSIVE=4]="EXPRESSIVE",t[t.FIDELITY=5]="FIDELITY",t[t.CONTENT=6]="CONTENT",t[t.RAINBOW=7]="RAINBOW",t[t.FRUIT_SALAD=8]="FRUIT_SALAD";})(w||(w={}));function Sr(t){return t.variant===w.FIDELITY||t.variant===w.CONTENT}function Le(t){return t.variant===w.MONOCHROME}function Sl(t,e,a,n){let i=a,l=ce.from(t,e,a);if(l.chroma<e){let c=l.chroma;for(;l.chroma<e;){i+=n?-1:1;let d=ce.from(t,e,i);if(c>d.chroma||Math.abs(d.chroma-e)<.4)break;let p=Math.abs(d.chroma-e),f=Math.abs(l.chroma-e);p<f&&(l=d),c=Math.max(c,d.chroma);}}return i}var wl=class{primaryPaletteKeyColor(){return M.fromPalette({name:"primary_palette_key_color",palette:t=>t.primaryPalette,tone:t=>t.primaryPalette.keyColor.tone})}secondaryPaletteKeyColor(){return M.fromPalette({name:"secondary_palette_key_color",palette:t=>t.secondaryPalette,tone:t=>t.secondaryPalette.keyColor.tone})}tertiaryPaletteKeyColor(){return M.fromPalette({name:"tertiary_palette_key_color",palette:t=>t.tertiaryPalette,tone:t=>t.tertiaryPalette.keyColor.tone})}neutralPaletteKeyColor(){return M.fromPalette({name:"neutral_palette_key_color",palette:t=>t.neutralPalette,tone:t=>t.neutralPalette.keyColor.tone})}neutralVariantPaletteKeyColor(){return M.fromPalette({name:"neutral_variant_palette_key_color",palette:t=>t.neutralVariantPalette,tone:t=>t.neutralVariantPalette.keyColor.tone})}errorPaletteKeyColor(){return M.fromPalette({name:"error_palette_key_color",palette:t=>t.errorPalette,tone:t=>t.errorPalette.keyColor.tone})}background(){return M.fromPalette({name:"background",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}onBackground(){return M.fromPalette({name:"on_background",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.background(),contrastCurve:t=>new J(3,3,4.5,7)})}surface(){return M.fromPalette({name:"surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}surfaceDim(){return M.fromPalette({name:"surface_dim",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:new J(87,87,80,75).get(t.contrastLevel),isBackground:true})}surfaceBright(){return M.fromPalette({name:"surface_bright",palette:t=>t.neutralPalette,tone:t=>t.isDark?new J(24,24,29,34).get(t.contrastLevel):98,isBackground:true})}surfaceContainerLowest(){return M.fromPalette({name:"surface_container_lowest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new J(4,4,2,0).get(t.contrastLevel):100,isBackground:true})}surfaceContainerLow(){return M.fromPalette({name:"surface_container_low",palette:t=>t.neutralPalette,tone:t=>t.isDark?new J(10,10,11,12).get(t.contrastLevel):new J(96,96,96,95).get(t.contrastLevel),isBackground:true})}surfaceContainer(){return M.fromPalette({name:"surface_container",palette:t=>t.neutralPalette,tone:t=>t.isDark?new J(12,12,16,20).get(t.contrastLevel):new J(94,94,92,90).get(t.contrastLevel),isBackground:true})}surfaceContainerHigh(){return M.fromPalette({name:"surface_container_high",palette:t=>t.neutralPalette,tone:t=>t.isDark?new J(17,17,21,25).get(t.contrastLevel):new J(92,92,88,85).get(t.contrastLevel),isBackground:true})}surfaceContainerHighest(){return M.fromPalette({name:"surface_container_highest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new J(22,22,26,30).get(t.contrastLevel):new J(90,90,84,80).get(t.contrastLevel),isBackground:true})}onSurface(){return M.fromPalette({name:"on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.highestSurface(t),contrastCurve:t=>new J(4.5,7,11,21)})}surfaceVariant(){return M.fromPalette({name:"surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:90,isBackground:true})}onSurfaceVariant(){return M.fromPalette({name:"on_surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?80:30,background:t=>this.highestSurface(t),contrastCurve:t=>new J(3,4.5,7,11)})}inverseSurface(){return M.fromPalette({name:"inverse_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:20,isBackground:true})}inverseOnSurface(){return M.fromPalette({name:"inverse_on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?20:95,background:t=>this.inverseSurface(),contrastCurve:t=>new J(4.5,7,11,21)})}outline(){return M.fromPalette({name:"outline",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?60:50,background:t=>this.highestSurface(t),contrastCurve:t=>new J(1.5,3,4.5,7)})}outlineVariant(){return M.fromPalette({name:"outline_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:80,background:t=>this.highestSurface(t),contrastCurve:t=>new J(1,1,3,4.5)})}shadow(){return M.fromPalette({name:"shadow",palette:t=>t.neutralPalette,tone:t=>0})}scrim(){return M.fromPalette({name:"scrim",palette:t=>t.neutralPalette,tone:t=>0})}surfaceTint(){return M.fromPalette({name:"surface_tint",palette:t=>t.primaryPalette,tone:t=>t.isDark?80:40,isBackground:true})}primary(){return M.fromPalette({name:"primary",palette:t=>t.primaryPalette,tone:t=>Le(t)?t.isDark?100:0:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new J(3,4.5,7,7),toneDeltaPair:t=>new Ae(this.primaryContainer(),this.primary(),10,"nearer",false)})}primaryDim(){}onPrimary(){return M.fromPalette({name:"on_primary",palette:t=>t.primaryPalette,tone:t=>Le(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.primary(),contrastCurve:t=>new J(4.5,7,11,21)})}primaryContainer(){return M.fromPalette({name:"primary_container",palette:t=>t.primaryPalette,tone:t=>Sr(t)?t.sourceColorHct.tone:Le(t)?t.isDark?85:25:t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new J(1,1,3,4.5),toneDeltaPair:t=>new Ae(this.primaryContainer(),this.primary(),10,"nearer",false)})}onPrimaryContainer(){return M.fromPalette({name:"on_primary_container",palette:t=>t.primaryPalette,tone:t=>Sr(t)?M.foregroundTone(this.primaryContainer().tone(t),4.5):Le(t)?t.isDark?0:100:t.isDark?90:30,background:t=>this.primaryContainer(),contrastCurve:t=>new J(3,4.5,7,11)})}inversePrimary(){return M.fromPalette({name:"inverse_primary",palette:t=>t.primaryPalette,tone:t=>t.isDark?40:80,background:t=>this.inverseSurface(),contrastCurve:t=>new J(3,4.5,7,7)})}secondary(){return M.fromPalette({name:"secondary",palette:t=>t.secondaryPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new J(3,4.5,7,7),toneDeltaPair:t=>new Ae(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}secondaryDim(){}onSecondary(){return M.fromPalette({name:"on_secondary",palette:t=>t.secondaryPalette,tone:t=>Le(t)?t.isDark?10:100:t.isDark?20:100,background:t=>this.secondary(),contrastCurve:t=>new J(4.5,7,11,21)})}secondaryContainer(){return M.fromPalette({name:"secondary_container",palette:t=>t.secondaryPalette,tone:t=>{let e=t.isDark?30:90;return Le(t)?t.isDark?30:85:Sr(t)?Sl(t.secondaryPalette.hue,t.secondaryPalette.chroma,e,!t.isDark):e},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new J(1,1,3,4.5),toneDeltaPair:t=>new Ae(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}onSecondaryContainer(){return M.fromPalette({name:"on_secondary_container",palette:t=>t.secondaryPalette,tone:t=>Le(t)?t.isDark?90:10:Sr(t)?M.foregroundTone(this.secondaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.secondaryContainer(),contrastCurve:t=>new J(3,4.5,7,11)})}tertiary(){return M.fromPalette({name:"tertiary",palette:t=>t.tertiaryPalette,tone:t=>Le(t)?t.isDark?90:25:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new J(3,4.5,7,7),toneDeltaPair:t=>new Ae(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}tertiaryDim(){}onTertiary(){return M.fromPalette({name:"on_tertiary",palette:t=>t.tertiaryPalette,tone:t=>Le(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.tertiary(),contrastCurve:t=>new J(4.5,7,11,21)})}tertiaryContainer(){return M.fromPalette({name:"tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>{if(Le(t))return t.isDark?60:49;if(!Sr(t))return t.isDark?30:90;let e=t.tertiaryPalette.getHct(t.sourceColorHct.tone);return Za.fixIfDisliked(e).tone},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new J(1,1,3,4.5),toneDeltaPair:t=>new Ae(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}onTertiaryContainer(){return M.fromPalette({name:"on_tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>Le(t)?t.isDark?0:100:Sr(t)?M.foregroundTone(this.tertiaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.tertiaryContainer(),contrastCurve:t=>new J(3,4.5,7,11)})}error(){return M.fromPalette({name:"error",palette:t=>t.errorPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new J(3,4.5,7,7),toneDeltaPair:t=>new Ae(this.errorContainer(),this.error(),10,"nearer",false)})}errorDim(){}onError(){return M.fromPalette({name:"on_error",palette:t=>t.errorPalette,tone:t=>t.isDark?20:100,background:t=>this.error(),contrastCurve:t=>new J(4.5,7,11,21)})}errorContainer(){return M.fromPalette({name:"error_container",palette:t=>t.errorPalette,tone:t=>t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new J(1,1,3,4.5),toneDeltaPair:t=>new Ae(this.errorContainer(),this.error(),10,"nearer",false)})}onErrorContainer(){return M.fromPalette({name:"on_error_container",palette:t=>t.errorPalette,tone:t=>Le(t)?t.isDark?90:10:t.isDark?90:30,background:t=>this.errorContainer(),contrastCurve:t=>new J(3,4.5,7,11)})}primaryFixed(){return M.fromPalette({name:"primary_fixed",palette:t=>t.primaryPalette,tone:t=>Le(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new J(1,1,3,4.5),toneDeltaPair:t=>new Ae(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}primaryFixedDim(){return M.fromPalette({name:"primary_fixed_dim",palette:t=>t.primaryPalette,tone:t=>Le(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new J(1,1,3,4.5),toneDeltaPair:t=>new Ae(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}onPrimaryFixed(){return M.fromPalette({name:"on_primary_fixed",palette:t=>t.primaryPalette,tone:t=>Le(t)?100:10,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new J(4.5,7,11,21)})}onPrimaryFixedVariant(){return M.fromPalette({name:"on_primary_fixed_variant",palette:t=>t.primaryPalette,tone:t=>Le(t)?90:30,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new J(3,4.5,7,11)})}secondaryFixed(){return M.fromPalette({name:"secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>Le(t)?80:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new J(1,1,3,4.5),toneDeltaPair:t=>new Ae(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}secondaryFixedDim(){return M.fromPalette({name:"secondary_fixed_dim",palette:t=>t.secondaryPalette,tone:t=>Le(t)?70:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new J(1,1,3,4.5),toneDeltaPair:t=>new Ae(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}onSecondaryFixed(){return M.fromPalette({name:"on_secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>10,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new J(4.5,7,11,21)})}onSecondaryFixedVariant(){return M.fromPalette({name:"on_secondary_fixed_variant",palette:t=>t.secondaryPalette,tone:t=>Le(t)?25:30,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new J(3,4.5,7,11)})}tertiaryFixed(){return M.fromPalette({name:"tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>Le(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new J(1,1,3,4.5),toneDeltaPair:t=>new Ae(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}tertiaryFixedDim(){return M.fromPalette({name:"tertiary_fixed_dim",palette:t=>t.tertiaryPalette,tone:t=>Le(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new J(1,1,3,4.5),toneDeltaPair:t=>new Ae(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}onTertiaryFixed(){return M.fromPalette({name:"on_tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>Le(t)?100:10,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new J(4.5,7,11,21)})}onTertiaryFixedVariant(){return M.fromPalette({name:"on_tertiary_fixed_variant",palette:t=>t.tertiaryPalette,tone:t=>Le(t)?90:30,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new J(3,4.5,7,11)})}highestSurface(t){return t.isDark?this.surfaceBright():this.surfaceDim()}};function Pe(t,e=0,a=100,n=1){let i=Io(t.hue,t.chroma*n,100,true);return Xe(e,a,i)}function Ut(t,e=0,a=100){let n=Io(t.hue,t.chroma,0,false);return Xe(e,a,n)}function Io(t,e,a,n){let i=a,l=ce.from(t,e,i);for(;l.chroma<e&&!(a<0||a>100);){a+=n?-1:1;let c=ce.from(t,e,a);l.chroma<c.chroma&&(l=c,i=a);}return i}function te(t){return t===1.5?new J(1.5,1.5,3,5.5):t===3?new J(3,3,4.5,7):t===4.5?new J(4.5,4.5,7,11):t===6?new J(6,6,7,11):t===7?new J(7,7,11,21):t===9?new J(9,9,11,21):t===11?new J(11,11,21,21):t===21?new J(21,21,21,21):new J(t,t,7,21)}var bl=class extends wl{surface(){let t=M.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>(super.surface().tone(e),e.platform==="phone"?e.isDark?4:ce.isYellow(e.neutralPalette.hue)?99:e.variant===w.VIBRANT?97:98:0),isBackground:true});return oe(super.surface(),"2025",t)}surfaceDim(){let t=M.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?4:ce.isYellow(e.neutralPalette.hue)?90:e.variant===w.VIBRANT?85:87,isBackground:true,chromaMultiplier:e=>{if(!e.isDark){if(e.variant===w.NEUTRAL)return 2.5;if(e.variant===w.TONAL_SPOT)return 1.7;if(e.variant===w.EXPRESSIVE)return ce.isYellow(e.neutralPalette.hue)?2.7:1.75;if(e.variant===w.VIBRANT)return 1.36}return 1}});return oe(super.surfaceDim(),"2025",t)}surfaceBright(){let t=M.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?18:ce.isYellow(e.neutralPalette.hue)?99:e.variant===w.VIBRANT?97:98,isBackground:true,chromaMultiplier:e=>{if(e.isDark){if(e.variant===w.NEUTRAL)return 2.5;if(e.variant===w.TONAL_SPOT)return 1.7;if(e.variant===w.EXPRESSIVE)return ce.isYellow(e.neutralPalette.hue)?2.7:1.75;if(e.variant===w.VIBRANT)return 1.36}return 1}});return oe(super.surfaceBright(),"2025",t)}surfaceContainerLowest(){let t=M.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?0:100,isBackground:true});return oe(super.surfaceContainerLowest(),"2025",t)}surfaceContainerLow(){let t=M.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?6:ce.isYellow(e.neutralPalette.hue)?98:e.variant===w.VIBRANT?95:96:15,isBackground:true,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===w.NEUTRAL)return 1.3;if(e.variant===w.TONAL_SPOT)return 1.25;if(e.variant===w.EXPRESSIVE)return ce.isYellow(e.neutralPalette.hue)?1.3:1.15;if(e.variant===w.VIBRANT)return 1.08}return 1}});return oe(super.surfaceContainerLow(),"2025",t)}surfaceContainer(){let t=M.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?9:ce.isYellow(e.neutralPalette.hue)?96:e.variant===w.VIBRANT?92:94:20,isBackground:true,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===w.NEUTRAL)return 1.6;if(e.variant===w.TONAL_SPOT)return 1.4;if(e.variant===w.EXPRESSIVE)return ce.isYellow(e.neutralPalette.hue)?1.6:1.3;if(e.variant===w.VIBRANT)return 1.15}return 1}});return oe(super.surfaceContainer(),"2025",t)}surfaceContainerHigh(){let t=M.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?12:ce.isYellow(e.neutralPalette.hue)?94:e.variant===w.VIBRANT?90:92:25,isBackground:true,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===w.NEUTRAL)return 1.9;if(e.variant===w.TONAL_SPOT)return 1.5;if(e.variant===w.EXPRESSIVE)return ce.isYellow(e.neutralPalette.hue)?1.95:1.45;if(e.variant===w.VIBRANT)return 1.22}return 1}});return oe(super.surfaceContainerHigh(),"2025",t)}surfaceContainerHighest(){let t=M.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?15:ce.isYellow(e.neutralPalette.hue)?92:e.variant===w.VIBRANT?88:90,isBackground:true,chromaMultiplier:e=>e.variant===w.NEUTRAL?2.2:e.variant===w.TONAL_SPOT?1.7:e.variant===w.EXPRESSIVE?ce.isYellow(e.neutralPalette.hue)?2.3:1.6:e.variant===w.VIBRANT?1.29:1});return oe(super.surfaceContainerHighest(),"2025",t)}onSurface(){let t=M.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.variant===w.VIBRANT?Pe(e.neutralPalette,0,100,1.1):M.getInitialToneFromBackground(a=>a.platform==="phone"?this.highestSurface(a):this.surfaceContainerHigh())(e),chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===w.NEUTRAL)return 2.2;if(e.variant===w.TONAL_SPOT)return 1.7;if(e.variant===w.EXPRESSIVE)return ce.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.isDark&&e.platform==="phone"?te(11):te(9)});return oe(super.onSurface(),"2025",t)}onSurfaceVariant(){let t=M.fromPalette({name:"on_surface_variant",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===w.NEUTRAL)return 2.2;if(e.variant===w.TONAL_SPOT)return 1.7;if(e.variant===w.EXPRESSIVE)return ce.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?e.isDark?te(6):te(4.5):te(7)});return oe(super.onSurfaceVariant(),"2025",t)}outline(){let t=M.fromPalette({name:"outline",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===w.NEUTRAL)return 2.2;if(e.variant===w.TONAL_SPOT)return 1.7;if(e.variant===w.EXPRESSIVE)return ce.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?te(3):te(4.5)});return oe(super.outline(),"2025",t)}outlineVariant(){let t=M.fromPalette({name:"outline_variant",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===w.NEUTRAL)return 2.2;if(e.variant===w.TONAL_SPOT)return 1.7;if(e.variant===w.EXPRESSIVE)return ce.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?te(1.5):te(3)});return oe(super.outlineVariant(),"2025",t)}inverseSurface(){let t=M.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?98:4,isBackground:true});return oe(super.inverseSurface(),"2025",t)}inverseOnSurface(){let t=M.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,background:e=>this.inverseSurface(),contrastCurve:e=>te(7)});return oe(super.inverseOnSurface(),"2025",t)}primary(){let t=M.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>e.variant===w.NEUTRAL?e.platform==="phone"?e.isDark?80:40:90:e.variant===w.TONAL_SPOT?e.platform==="phone"?e.isDark?80:Pe(e.primaryPalette):Pe(e.primaryPalette,0,90):e.variant===w.EXPRESSIVE?e.platform==="phone"?Pe(e.primaryPalette,0,ce.isYellow(e.primaryPalette.hue)?25:ce.isCyan(e.primaryPalette.hue)?88:98):Pe(e.primaryPalette):e.platform==="phone"?Pe(e.primaryPalette,0,ce.isCyan(e.primaryPalette.hue)?88:98):Pe(e.primaryPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?te(4.5):te(7),toneDeltaPair:e=>e.platform==="phone"?new Ae(this.primaryContainer(),this.primary(),5,"relative_lighter",true,"farther"):void 0});return oe(super.primary(),"2025",t)}primaryDim(){return M.fromPalette({name:"primary_dim",palette:t=>t.primaryPalette,tone:t=>t.variant===w.NEUTRAL?85:t.variant===w.TONAL_SPOT?Pe(t.primaryPalette,0,90):Pe(t.primaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>te(4.5),toneDeltaPair:t=>new Ae(this.primaryDim(),this.primary(),5,"darker",true,"farther")})}onPrimary(){let t=M.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,background:e=>e.platform==="phone"?this.primary():this.primaryDim(),contrastCurve:e=>e.platform==="phone"?te(6):te(7)});return oe(super.onPrimary(),"2025",t)}primaryContainer(){let t=M.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>e.platform==="watch"?30:e.variant===w.NEUTRAL?e.isDark?30:90:e.variant===w.TONAL_SPOT?e.isDark?Ut(e.primaryPalette,35,93):Pe(e.primaryPalette,0,90):e.variant===w.EXPRESSIVE?e.isDark?Pe(e.primaryPalette,30,93):Pe(e.primaryPalette,78,ce.isCyan(e.primaryPalette.hue)?88:90):e.isDark?Ut(e.primaryPalette,66,93):Pe(e.primaryPalette,66,ce.isCyan(e.primaryPalette.hue)?88:93),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="phone"?void 0:new Ae(this.primaryContainer(),this.primaryDim(),10,"darker",true,"farther"),contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?te(1.5):void 0});return oe(super.primaryContainer(),"2025",t)}onPrimaryContainer(){let t=M.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,background:e=>this.primaryContainer(),contrastCurve:e=>e.platform==="phone"?te(6):te(7)});return oe(super.onPrimaryContainer(),"2025",t)}primaryFixed(){let t=M.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>{let a=Object.assign({},e,{isDark:false,contrastLevel:0});return this.primaryContainer().getTone(a)},isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?te(1.5):void 0});return oe(super.primaryFixed(),"2025",t)}primaryFixedDim(){let t=M.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>this.primaryFixed().getTone(e),isBackground:true,toneDeltaPair:e=>new Ae(this.primaryFixedDim(),this.primaryFixed(),5,"darker",true,"exact")});return oe(super.primaryFixedDim(),"2025",t)}onPrimaryFixed(){let t=M.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,background:e=>this.primaryFixedDim(),contrastCurve:e=>te(7)});return oe(super.onPrimaryFixed(),"2025",t)}onPrimaryFixedVariant(){let t=M.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,background:e=>this.primaryFixedDim(),contrastCurve:e=>te(4.5)});return oe(super.onPrimaryFixedVariant(),"2025",t)}inversePrimary(){let t=M.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>Pe(e.primaryPalette),background:e=>this.inverseSurface(),contrastCurve:e=>e.platform==="phone"?te(6):te(7)});return oe(super.inversePrimary(),"2025",t)}secondary(){let t=M.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.platform==="watch"?e.variant===w.NEUTRAL?90:Pe(e.secondaryPalette,0,90):e.variant===w.NEUTRAL?e.isDark?Ut(e.secondaryPalette,0,98):Pe(e.secondaryPalette):e.variant===w.VIBRANT?Pe(e.secondaryPalette,0,e.isDark?90:98):e.isDark?80:Pe(e.secondaryPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?te(4.5):te(7),toneDeltaPair:e=>e.platform==="phone"?new Ae(this.secondaryContainer(),this.secondary(),5,"relative_lighter",true,"farther"):void 0});return oe(super.secondary(),"2025",t)}secondaryDim(){return M.fromPalette({name:"secondary_dim",palette:t=>t.secondaryPalette,tone:t=>t.variant===w.NEUTRAL?85:Pe(t.secondaryPalette,0,90),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>te(4.5),toneDeltaPair:t=>new Ae(this.secondaryDim(),this.secondary(),5,"darker",true,"farther")})}onSecondary(){let t=M.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,background:e=>e.platform==="phone"?this.secondary():this.secondaryDim(),contrastCurve:e=>e.platform==="phone"?te(6):te(7)});return oe(super.onSecondary(),"2025",t)}secondaryContainer(){let t=M.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>e.platform==="watch"?30:e.variant===w.VIBRANT?e.isDark?Ut(e.secondaryPalette,30,40):Pe(e.secondaryPalette,84,90):e.variant===w.EXPRESSIVE?e.isDark?15:Pe(e.secondaryPalette,90,95):e.isDark?25:90,isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new Ae(this.secondaryContainer(),this.secondaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?te(1.5):void 0});return oe(super.secondaryContainer(),"2025",t)}onSecondaryContainer(){let t=M.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,background:e=>this.secondaryContainer(),contrastCurve:e=>e.platform==="phone"?te(6):te(7)});return oe(super.onSecondaryContainer(),"2025",t)}secondaryFixed(){let t=M.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>{let a=Object.assign({},e,{isDark:false,contrastLevel:0});return this.secondaryContainer().getTone(a)},isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?te(1.5):void 0});return oe(super.secondaryFixed(),"2025",t)}secondaryFixedDim(){let t=M.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>this.secondaryFixed().getTone(e),isBackground:true,toneDeltaPair:e=>new Ae(this.secondaryFixedDim(),this.secondaryFixed(),5,"darker",true,"exact")});return oe(super.secondaryFixedDim(),"2025",t)}onSecondaryFixed(){let t=M.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,background:e=>this.secondaryFixedDim(),contrastCurve:e=>te(7)});return oe(super.onSecondaryFixed(),"2025",t)}onSecondaryFixedVariant(){let t=M.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,background:e=>this.secondaryFixedDim(),contrastCurve:e=>te(4.5)});return oe(super.onSecondaryFixedVariant(),"2025",t)}tertiary(){let t=M.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>e.platform==="watch"?e.variant===w.TONAL_SPOT?Pe(e.tertiaryPalette,0,90):Pe(e.tertiaryPalette):e.variant===w.EXPRESSIVE||e.variant===w.VIBRANT?Pe(e.tertiaryPalette,0,ce.isCyan(e.tertiaryPalette.hue)?88:e.isDark?98:100):e.isDark?Pe(e.tertiaryPalette,0,98):Pe(e.tertiaryPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?te(4.5):te(7),toneDeltaPair:e=>e.platform==="phone"?new Ae(this.tertiaryContainer(),this.tertiary(),5,"relative_lighter",true,"farther"):void 0});return oe(super.tertiary(),"2025",t)}tertiaryDim(){return M.fromPalette({name:"tertiary_dim",palette:t=>t.tertiaryPalette,tone:t=>t.variant===w.TONAL_SPOT?Pe(t.tertiaryPalette,0,90):Pe(t.tertiaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>te(4.5),toneDeltaPair:t=>new Ae(this.tertiaryDim(),this.tertiary(),5,"darker",true,"farther")})}onTertiary(){let t=M.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,background:e=>e.platform==="phone"?this.tertiary():this.tertiaryDim(),contrastCurve:e=>e.platform==="phone"?te(6):te(7)});return oe(super.onTertiary(),"2025",t)}tertiaryContainer(){let t=M.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>e.platform==="watch"?e.variant===w.TONAL_SPOT?Pe(e.tertiaryPalette,0,90):Pe(e.tertiaryPalette):e.variant===w.NEUTRAL?e.isDark?Pe(e.tertiaryPalette,0,93):Pe(e.tertiaryPalette,0,96):e.variant===w.TONAL_SPOT?Pe(e.tertiaryPalette,0,e.isDark?93:100):e.variant===w.EXPRESSIVE?Pe(e.tertiaryPalette,75,ce.isCyan(e.tertiaryPalette.hue)?88:e.isDark?93:100):e.isDark?Pe(e.tertiaryPalette,0,93):Pe(e.tertiaryPalette,72,100),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new Ae(this.tertiaryContainer(),this.tertiaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?te(1.5):void 0});return oe(super.tertiaryContainer(),"2025",t)}onTertiaryContainer(){let t=M.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryContainer(),contrastCurve:e=>e.platform==="phone"?te(6):te(7)});return oe(super.onTertiaryContainer(),"2025",t)}tertiaryFixed(){let t=M.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>{let a=Object.assign({},e,{isDark:false,contrastLevel:0});return this.tertiaryContainer().getTone(a)},isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?te(1.5):void 0});return oe(super.tertiaryFixed(),"2025",t)}tertiaryFixedDim(){let t=M.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>this.tertiaryFixed().getTone(e),isBackground:true,toneDeltaPair:e=>new Ae(this.tertiaryFixedDim(),this.tertiaryFixed(),5,"darker",true,"exact")});return oe(super.tertiaryFixedDim(),"2025",t)}onTertiaryFixed(){let t=M.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryFixedDim(),contrastCurve:e=>te(7)});return oe(super.onTertiaryFixed(),"2025",t)}onTertiaryFixedVariant(){let t=M.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryFixedDim(),contrastCurve:e=>te(4.5)});return oe(super.onTertiaryFixedVariant(),"2025",t)}error(){let t=M.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.platform==="phone"?e.isDark?Ut(e.errorPalette,0,98):Pe(e.errorPalette):Ut(e.errorPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?te(4.5):te(7),toneDeltaPair:e=>e.platform==="phone"?new Ae(this.errorContainer(),this.error(),5,"relative_lighter",true,"farther"):void 0});return oe(super.error(),"2025",t)}errorDim(){return M.fromPalette({name:"error_dim",palette:t=>t.errorPalette,tone:t=>Ut(t.errorPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>te(4.5),toneDeltaPair:t=>new Ae(this.errorDim(),this.error(),5,"darker",true,"farther")})}onError(){let t=M.fromPalette({name:"on_error",palette:e=>e.errorPalette,background:e=>e.platform==="phone"?this.error():this.errorDim(),contrastCurve:e=>e.platform==="phone"?te(6):te(7)});return oe(super.onError(),"2025",t)}errorContainer(){let t=M.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.platform==="watch"?30:e.isDark?Ut(e.errorPalette,30,93):Pe(e.errorPalette,0,90),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new Ae(this.errorContainer(),this.errorDim(),10,"darker",true,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?te(1.5):void 0});return oe(super.errorContainer(),"2025",t)}onErrorContainer(){let t=M.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,background:e=>this.errorContainer(),contrastCurve:e=>e.platform==="phone"?te(4.5):te(7)});return oe(super.onErrorContainer(),"2025",t)}surfaceVariant(){let t=Object.assign(this.surfaceContainerHighest().clone(),{name:"surface_variant"});return oe(super.surfaceVariant(),"2025",t)}surfaceTint(){let t=Object.assign(this.primary().clone(),{name:"surface_tint"});return oe(super.surfaceTint(),"2025",t)}background(){let t=Object.assign(this.surface().clone(),{name:"background"});return oe(super.background(),"2025",t)}onBackground(){let t=Object.assign(this.onSurface().clone(),{name:"on_background",tone:e=>e.platform==="watch"?100:this.onSurface().getTone(e)});return oe(super.onBackground(),"2025",t)}},_=class q{constructor(){this.allColors=[this.background(),this.onBackground(),this.surface(),this.surfaceDim(),this.surfaceBright(),this.surfaceContainerLowest(),this.surfaceContainerLow(),this.surfaceContainer(),this.surfaceContainerHigh(),this.surfaceContainerHighest(),this.onSurface(),this.onSurfaceVariant(),this.outline(),this.outlineVariant(),this.inverseSurface(),this.inverseOnSurface(),this.primary(),this.primaryDim(),this.onPrimary(),this.primaryContainer(),this.onPrimaryContainer(),this.primaryFixed(),this.primaryFixedDim(),this.onPrimaryFixed(),this.onPrimaryFixedVariant(),this.inversePrimary(),this.secondary(),this.secondaryDim(),this.onSecondary(),this.secondaryContainer(),this.onSecondaryContainer(),this.secondaryFixed(),this.secondaryFixedDim(),this.onSecondaryFixed(),this.onSecondaryFixedVariant(),this.tertiary(),this.tertiaryDim(),this.onTertiary(),this.tertiaryContainer(),this.onTertiaryContainer(),this.tertiaryFixed(),this.tertiaryFixedDim(),this.onTertiaryFixed(),this.onTertiaryFixedVariant(),this.error(),this.errorDim(),this.onError(),this.errorContainer(),this.onErrorContainer()].filter(e=>e!==void 0);}highestSurface(e){return q.colorSpec.highestSurface(e)}primaryPaletteKeyColor(){return q.colorSpec.primaryPaletteKeyColor()}secondaryPaletteKeyColor(){return q.colorSpec.secondaryPaletteKeyColor()}tertiaryPaletteKeyColor(){return q.colorSpec.tertiaryPaletteKeyColor()}neutralPaletteKeyColor(){return q.colorSpec.neutralPaletteKeyColor()}neutralVariantPaletteKeyColor(){return q.colorSpec.neutralVariantPaletteKeyColor()}errorPaletteKeyColor(){return q.colorSpec.errorPaletteKeyColor()}background(){return q.colorSpec.background()}onBackground(){return q.colorSpec.onBackground()}surface(){return q.colorSpec.surface()}surfaceDim(){return q.colorSpec.surfaceDim()}surfaceBright(){return q.colorSpec.surfaceBright()}surfaceContainerLowest(){return q.colorSpec.surfaceContainerLowest()}surfaceContainerLow(){return q.colorSpec.surfaceContainerLow()}surfaceContainer(){return q.colorSpec.surfaceContainer()}surfaceContainerHigh(){return q.colorSpec.surfaceContainerHigh()}surfaceContainerHighest(){return q.colorSpec.surfaceContainerHighest()}onSurface(){return q.colorSpec.onSurface()}surfaceVariant(){return q.colorSpec.surfaceVariant()}onSurfaceVariant(){return q.colorSpec.onSurfaceVariant()}outline(){return q.colorSpec.outline()}outlineVariant(){return q.colorSpec.outlineVariant()}inverseSurface(){return q.colorSpec.inverseSurface()}inverseOnSurface(){return q.colorSpec.inverseOnSurface()}shadow(){return q.colorSpec.shadow()}scrim(){return q.colorSpec.scrim()}surfaceTint(){return q.colorSpec.surfaceTint()}primary(){return q.colorSpec.primary()}primaryDim(){return q.colorSpec.primaryDim()}onPrimary(){return q.colorSpec.onPrimary()}primaryContainer(){return q.colorSpec.primaryContainer()}onPrimaryContainer(){return q.colorSpec.onPrimaryContainer()}inversePrimary(){return q.colorSpec.inversePrimary()}primaryFixed(){return q.colorSpec.primaryFixed()}primaryFixedDim(){return q.colorSpec.primaryFixedDim()}onPrimaryFixed(){return q.colorSpec.onPrimaryFixed()}onPrimaryFixedVariant(){return q.colorSpec.onPrimaryFixedVariant()}secondary(){return q.colorSpec.secondary()}secondaryDim(){return q.colorSpec.secondaryDim()}onSecondary(){return q.colorSpec.onSecondary()}secondaryContainer(){return q.colorSpec.secondaryContainer()}onSecondaryContainer(){return q.colorSpec.onSecondaryContainer()}secondaryFixed(){return q.colorSpec.secondaryFixed()}secondaryFixedDim(){return q.colorSpec.secondaryFixedDim()}onSecondaryFixed(){return q.colorSpec.onSecondaryFixed()}onSecondaryFixedVariant(){return q.colorSpec.onSecondaryFixedVariant()}tertiary(){return q.colorSpec.tertiary()}tertiaryDim(){return q.colorSpec.tertiaryDim()}onTertiary(){return q.colorSpec.onTertiary()}tertiaryContainer(){return q.colorSpec.tertiaryContainer()}onTertiaryContainer(){return q.colorSpec.onTertiaryContainer()}tertiaryFixed(){return q.colorSpec.tertiaryFixed()}tertiaryFixedDim(){return q.colorSpec.tertiaryFixedDim()}onTertiaryFixed(){return q.colorSpec.onTertiaryFixed()}onTertiaryFixedVariant(){return q.colorSpec.onTertiaryFixedVariant()}error(){return q.colorSpec.error()}errorDim(){return q.colorSpec.errorDim()}onError(){return q.colorSpec.onError()}errorContainer(){return q.colorSpec.errorContainer()}onErrorContainer(){return q.colorSpec.onErrorContainer()}static highestSurface(e){return q.colorSpec.highestSurface(e)}};_.contentAccentToneDelta=15;_.colorSpec=new bl;_.primaryPaletteKeyColor=_.colorSpec.primaryPaletteKeyColor();_.secondaryPaletteKeyColor=_.colorSpec.secondaryPaletteKeyColor();_.tertiaryPaletteKeyColor=_.colorSpec.tertiaryPaletteKeyColor();_.neutralPaletteKeyColor=_.colorSpec.neutralPaletteKeyColor();_.neutralVariantPaletteKeyColor=_.colorSpec.neutralVariantPaletteKeyColor();_.background=_.colorSpec.background();_.onBackground=_.colorSpec.onBackground();_.surface=_.colorSpec.surface();_.surfaceDim=_.colorSpec.surfaceDim();_.surfaceBright=_.colorSpec.surfaceBright();_.surfaceContainerLowest=_.colorSpec.surfaceContainerLowest();_.surfaceContainerLow=_.colorSpec.surfaceContainerLow();_.surfaceContainer=_.colorSpec.surfaceContainer();_.surfaceContainerHigh=_.colorSpec.surfaceContainerHigh();_.surfaceContainerHighest=_.colorSpec.surfaceContainerHighest();_.onSurface=_.colorSpec.onSurface();_.surfaceVariant=_.colorSpec.surfaceVariant();_.onSurfaceVariant=_.colorSpec.onSurfaceVariant();_.inverseSurface=_.colorSpec.inverseSurface();_.inverseOnSurface=_.colorSpec.inverseOnSurface();_.outline=_.colorSpec.outline();_.outlineVariant=_.colorSpec.outlineVariant();_.shadow=_.colorSpec.shadow();_.scrim=_.colorSpec.scrim();_.surfaceTint=_.colorSpec.surfaceTint();_.primary=_.colorSpec.primary();_.onPrimary=_.colorSpec.onPrimary();_.primaryContainer=_.colorSpec.primaryContainer();_.onPrimaryContainer=_.colorSpec.onPrimaryContainer();_.inversePrimary=_.colorSpec.inversePrimary();_.secondary=_.colorSpec.secondary();_.onSecondary=_.colorSpec.onSecondary();_.secondaryContainer=_.colorSpec.secondaryContainer();_.onSecondaryContainer=_.colorSpec.onSecondaryContainer();_.tertiary=_.colorSpec.tertiary();_.onTertiary=_.colorSpec.onTertiary();_.tertiaryContainer=_.colorSpec.tertiaryContainer();_.onTertiaryContainer=_.colorSpec.onTertiaryContainer();_.error=_.colorSpec.error();_.onError=_.colorSpec.onError();_.errorContainer=_.colorSpec.errorContainer();_.onErrorContainer=_.colorSpec.onErrorContainer();_.primaryFixed=_.colorSpec.primaryFixed();_.primaryFixedDim=_.colorSpec.primaryFixedDim();_.onPrimaryFixed=_.colorSpec.onPrimaryFixed();_.onPrimaryFixedVariant=_.colorSpec.onPrimaryFixedVariant();_.secondaryFixed=_.colorSpec.secondaryFixed();_.secondaryFixedDim=_.colorSpec.secondaryFixedDim();_.onSecondaryFixed=_.colorSpec.onSecondaryFixed();_.onSecondaryFixedVariant=_.colorSpec.onSecondaryFixedVariant();_.tertiaryFixed=_.colorSpec.tertiaryFixed();_.tertiaryFixedDim=_.colorSpec.tertiaryFixedDim();_.onTertiaryFixed=_.colorSpec.onTertiaryFixed();_.onTertiaryFixedVariant=_.colorSpec.onTertiaryFixedVariant();var We=class Ja{static maybeFallbackSpecVersion(e,a){switch(a){case w.EXPRESSIVE:case w.VIBRANT:case w.TONAL_SPOT:case w.NEUTRAL:return e;default:return "2021"}}constructor(e){this.sourceColorArgb=e.sourceColorHct.toInt(),this.variant=e.variant,this.contrastLevel=e.contrastLevel,this.isDark=e.isDark,this.platform=e.platform??"phone",this.specVersion=Ja.maybeFallbackSpecVersion(e.specVersion??"2021",this.variant),this.sourceColorHct=e.sourceColorHct,this.primaryPalette=e.primaryPalette??wr(this.specVersion).getPrimaryPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.secondaryPalette=e.secondaryPalette??wr(this.specVersion).getSecondaryPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.tertiaryPalette=e.tertiaryPalette??wr(this.specVersion).getTertiaryPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralPalette=e.neutralPalette??wr(this.specVersion).getNeutralPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralVariantPalette=e.neutralVariantPalette??wr(this.specVersion).getNeutralVariantPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.errorPalette=e.errorPalette??wr(this.specVersion).getErrorPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel)??j.fromHueAndChroma(25,84),this.colors=new _;}toString(){return `Scheme: variant=${w[this.variant]}, mode=${this.isDark?"dark":"light"}, platform=${this.platform}, contrastLevel=${this.contrastLevel.toFixed(1)}, seed=${this.sourceColorHct.toString()}, specVersion=${this.specVersion}`}static getPiecewiseHue(e,a,n){let i=Math.min(a.length-1,n.length),l=e.hue;for(let c=0;c<i;c++)if(l>=a[c]&&l<a[c+1])return ct(n[c]);return l}static getRotatedHue(e,a,n){let i=Ja.getPiecewiseHue(e,a,n);return Math.min(a.length-1,n.length)<=0&&(i=0),ct(e.hue+i)}getArgb(e){return e.getArgb(this)}getHct(e){return e.getHct(this)}get primaryPaletteKeyColor(){return this.getArgb(this.colors.primaryPaletteKeyColor())}get secondaryPaletteKeyColor(){return this.getArgb(this.colors.secondaryPaletteKeyColor())}get tertiaryPaletteKeyColor(){return this.getArgb(this.colors.tertiaryPaletteKeyColor())}get neutralPaletteKeyColor(){return this.getArgb(this.colors.neutralPaletteKeyColor())}get neutralVariantPaletteKeyColor(){return this.getArgb(this.colors.neutralVariantPaletteKeyColor())}get errorPaletteKeyColor(){return this.getArgb(this.colors.errorPaletteKeyColor())}get background(){return this.getArgb(this.colors.background())}get onBackground(){return this.getArgb(this.colors.onBackground())}get surface(){return this.getArgb(this.colors.surface())}get surfaceDim(){return this.getArgb(this.colors.surfaceDim())}get surfaceBright(){return this.getArgb(this.colors.surfaceBright())}get surfaceContainerLowest(){return this.getArgb(this.colors.surfaceContainerLowest())}get surfaceContainerLow(){return this.getArgb(this.colors.surfaceContainerLow())}get surfaceContainer(){return this.getArgb(this.colors.surfaceContainer())}get surfaceContainerHigh(){return this.getArgb(this.colors.surfaceContainerHigh())}get surfaceContainerHighest(){return this.getArgb(this.colors.surfaceContainerHighest())}get onSurface(){return this.getArgb(this.colors.onSurface())}get surfaceVariant(){return this.getArgb(this.colors.surfaceVariant())}get onSurfaceVariant(){return this.getArgb(this.colors.onSurfaceVariant())}get inverseSurface(){return this.getArgb(this.colors.inverseSurface())}get inverseOnSurface(){return this.getArgb(this.colors.inverseOnSurface())}get outline(){return this.getArgb(this.colors.outline())}get outlineVariant(){return this.getArgb(this.colors.outlineVariant())}get shadow(){return this.getArgb(this.colors.shadow())}get scrim(){return this.getArgb(this.colors.scrim())}get surfaceTint(){return this.getArgb(this.colors.surfaceTint())}get primary(){return this.getArgb(this.colors.primary())}get primaryDim(){let e=this.colors.primaryDim();if(e===void 0)throw new Error("`primaryDim` color is undefined prior to 2025 spec.");return this.getArgb(e)}get onPrimary(){return this.getArgb(this.colors.onPrimary())}get primaryContainer(){return this.getArgb(this.colors.primaryContainer())}get onPrimaryContainer(){return this.getArgb(this.colors.onPrimaryContainer())}get primaryFixed(){return this.getArgb(this.colors.primaryFixed())}get primaryFixedDim(){return this.getArgb(this.colors.primaryFixedDim())}get onPrimaryFixed(){return this.getArgb(this.colors.onPrimaryFixed())}get onPrimaryFixedVariant(){return this.getArgb(this.colors.onPrimaryFixedVariant())}get inversePrimary(){return this.getArgb(this.colors.inversePrimary())}get secondary(){return this.getArgb(this.colors.secondary())}get secondaryDim(){let e=this.colors.secondaryDim();if(e===void 0)throw new Error("`secondaryDim` color is undefined prior to 2025 spec.");return this.getArgb(e)}get onSecondary(){return this.getArgb(this.colors.onSecondary())}get secondaryContainer(){return this.getArgb(this.colors.secondaryContainer())}get onSecondaryContainer(){return this.getArgb(this.colors.onSecondaryContainer())}get secondaryFixed(){return this.getArgb(this.colors.secondaryFixed())}get secondaryFixedDim(){return this.getArgb(this.colors.secondaryFixedDim())}get onSecondaryFixed(){return this.getArgb(this.colors.onSecondaryFixed())}get onSecondaryFixedVariant(){return this.getArgb(this.colors.onSecondaryFixedVariant())}get tertiary(){return this.getArgb(this.colors.tertiary())}get tertiaryDim(){let e=this.colors.tertiaryDim();if(e===void 0)throw new Error("`tertiaryDim` color is undefined prior to 2025 spec.");return this.getArgb(e)}get onTertiary(){return this.getArgb(this.colors.onTertiary())}get tertiaryContainer(){return this.getArgb(this.colors.tertiaryContainer())}get onTertiaryContainer(){return this.getArgb(this.colors.onTertiaryContainer())}get tertiaryFixed(){return this.getArgb(this.colors.tertiaryFixed())}get tertiaryFixedDim(){return this.getArgb(this.colors.tertiaryFixedDim())}get onTertiaryFixed(){return this.getArgb(this.colors.onTertiaryFixed())}get onTertiaryFixedVariant(){return this.getArgb(this.colors.onTertiaryFixedVariant())}get error(){return this.getArgb(this.colors.error())}get errorDim(){let e=this.colors.errorDim();if(e===void 0)throw new Error("`errorDim` color is undefined prior to 2025 spec.");return this.getArgb(e)}get onError(){return this.getArgb(this.colors.onError())}get errorContainer(){return this.getArgb(this.colors.errorContainer())}get onErrorContainer(){return this.getArgb(this.colors.onErrorContainer())}};We.DEFAULT_SPEC_VERSION="2021";We.DEFAULT_PLATFORM="phone";var Yo=class{getPrimaryPalette(t,e,a,n,i){switch(t){case w.CONTENT:case w.FIDELITY:return j.fromHueAndChroma(e.hue,e.chroma);case w.FRUIT_SALAD:return j.fromHueAndChroma(ct(e.hue-50),48);case w.MONOCHROME:return j.fromHueAndChroma(e.hue,0);case w.NEUTRAL:return j.fromHueAndChroma(e.hue,12);case w.RAINBOW:return j.fromHueAndChroma(e.hue,48);case w.TONAL_SPOT:return j.fromHueAndChroma(e.hue,36);case w.EXPRESSIVE:return j.fromHueAndChroma(ct(e.hue+240),40);case w.VIBRANT:return j.fromHueAndChroma(e.hue,200);default:throw new Error(`Unsupported variant: ${t}`)}}getSecondaryPalette(t,e,a,n,i){switch(t){case w.CONTENT:case w.FIDELITY:return j.fromHueAndChroma(e.hue,Math.max(e.chroma-32,e.chroma*.5));case w.FRUIT_SALAD:return j.fromHueAndChroma(ct(e.hue-50),36);case w.MONOCHROME:return j.fromHueAndChroma(e.hue,0);case w.NEUTRAL:return j.fromHueAndChroma(e.hue,8);case w.RAINBOW:return j.fromHueAndChroma(e.hue,16);case w.TONAL_SPOT:return j.fromHueAndChroma(e.hue,16);case w.EXPRESSIVE:return j.fromHueAndChroma(We.getRotatedHue(e,[0,21,51,121,151,191,271,321,360],[45,95,45,20,45,90,45,45,45]),24);case w.VIBRANT:return j.fromHueAndChroma(We.getRotatedHue(e,[0,41,61,101,131,181,251,301,360],[18,15,10,12,15,18,15,12,12]),24);default:throw new Error(`Unsupported variant: ${t}`)}}getTertiaryPalette(t,e,a,n,i){switch(t){case w.CONTENT:return j.fromHct(Za.fixIfDisliked(new Po(e).analogous(3,6)[2]));case w.FIDELITY:return j.fromHct(Za.fixIfDisliked(new Po(e).complement));case w.FRUIT_SALAD:return j.fromHueAndChroma(e.hue,36);case w.MONOCHROME:return j.fromHueAndChroma(e.hue,0);case w.NEUTRAL:return j.fromHueAndChroma(e.hue,16);case w.RAINBOW:case w.TONAL_SPOT:return j.fromHueAndChroma(ct(e.hue+60),24);case w.EXPRESSIVE:return j.fromHueAndChroma(We.getRotatedHue(e,[0,21,51,121,151,191,271,321,360],[120,120,20,45,20,15,20,120,120]),32);case w.VIBRANT:return j.fromHueAndChroma(We.getRotatedHue(e,[0,41,61,101,131,181,251,301,360],[35,30,20,25,30,35,30,25,25]),32);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralPalette(t,e,a,n,i){switch(t){case w.CONTENT:case w.FIDELITY:return j.fromHueAndChroma(e.hue,e.chroma/8);case w.FRUIT_SALAD:return j.fromHueAndChroma(e.hue,10);case w.MONOCHROME:return j.fromHueAndChroma(e.hue,0);case w.NEUTRAL:return j.fromHueAndChroma(e.hue,2);case w.RAINBOW:return j.fromHueAndChroma(e.hue,0);case w.TONAL_SPOT:return j.fromHueAndChroma(e.hue,6);case w.EXPRESSIVE:return j.fromHueAndChroma(ct(e.hue+15),8);case w.VIBRANT:return j.fromHueAndChroma(e.hue,10);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralVariantPalette(t,e,a,n,i){switch(t){case w.CONTENT:return j.fromHueAndChroma(e.hue,e.chroma/8+4);case w.FIDELITY:return j.fromHueAndChroma(e.hue,e.chroma/8+4);case w.FRUIT_SALAD:return j.fromHueAndChroma(e.hue,16);case w.MONOCHROME:return j.fromHueAndChroma(e.hue,0);case w.NEUTRAL:return j.fromHueAndChroma(e.hue,2);case w.RAINBOW:return j.fromHueAndChroma(e.hue,0);case w.TONAL_SPOT:return j.fromHueAndChroma(e.hue,8);case w.EXPRESSIVE:return j.fromHueAndChroma(ct(e.hue+15),12);case w.VIBRANT:return j.fromHueAndChroma(e.hue,12);default:throw new Error(`Unsupported variant: ${t}`)}}getErrorPalette(t,e,a,n,i){}},Dl=class Pt extends Yo{getPrimaryPalette(e,a,n,i,l){switch(e){case w.NEUTRAL:return j.fromHueAndChroma(a.hue,i==="phone"?ce.isBlue(a.hue)?12:8:ce.isBlue(a.hue)?16:12);case w.TONAL_SPOT:return j.fromHueAndChroma(a.hue,i==="phone"&&n?26:32);case w.EXPRESSIVE:return j.fromHueAndChroma(a.hue,i==="phone"?n?36:48:40);case w.VIBRANT:return j.fromHueAndChroma(a.hue,i==="phone"?74:56);default:return super.getPrimaryPalette(e,a,n,i,l)}}getSecondaryPalette(e,a,n,i,l){switch(e){case w.NEUTRAL:return j.fromHueAndChroma(a.hue,i==="phone"?ce.isBlue(a.hue)?6:4:ce.isBlue(a.hue)?10:6);case w.TONAL_SPOT:return j.fromHueAndChroma(a.hue,16);case w.EXPRESSIVE:return j.fromHueAndChroma(We.getRotatedHue(a,[0,105,140,204,253,278,300,333,360],[-160,155,-100,96,-96,-156,-165,-160]),i==="phone"&&n?16:24);case w.VIBRANT:return j.fromHueAndChroma(We.getRotatedHue(a,[0,38,105,140,333,360],[-14,10,-14,10,-14]),i==="phone"?56:36);default:return super.getSecondaryPalette(e,a,n,i,l)}}getTertiaryPalette(e,a,n,i,l){switch(e){case w.NEUTRAL:return j.fromHueAndChroma(We.getRotatedHue(a,[0,38,105,161,204,278,333,360],[-32,26,10,-39,24,-15,-32]),i==="phone"?20:36);case w.TONAL_SPOT:return j.fromHueAndChroma(We.getRotatedHue(a,[0,20,71,161,333,360],[-40,48,-32,40,-32]),i==="phone"?28:32);case w.EXPRESSIVE:return j.fromHueAndChroma(We.getRotatedHue(a,[0,105,140,204,253,278,300,333,360],[-165,160,-105,101,-101,-160,-170,-165]),48);case w.VIBRANT:return j.fromHueAndChroma(We.getRotatedHue(a,[0,38,71,105,140,161,253,333,360],[-72,35,24,-24,62,50,62,-72]),56);default:return super.getTertiaryPalette(e,a,n,i,l)}}static getExpressiveNeutralHue(e){return We.getRotatedHue(e,[0,71,124,253,278,300,360],[10,0,10,0,10,0])}static getExpressiveNeutralChroma(e,a,n){let i=Pt.getExpressiveNeutralHue(e);return n==="phone"?a?ce.isYellow(i)?6:14:18:12}static getVibrantNeutralHue(e){return We.getRotatedHue(e,[0,38,105,140,333,360],[-14,10,-14,10,-14])}static getVibrantNeutralChroma(e,a){let n=Pt.getVibrantNeutralHue(e);return a==="phone"||ce.isBlue(n)?28:20}getNeutralPalette(e,a,n,i,l){switch(e){case w.NEUTRAL:return j.fromHueAndChroma(a.hue,i==="phone"?1.4:6);case w.TONAL_SPOT:return j.fromHueAndChroma(a.hue,i==="phone"?5:10);case w.EXPRESSIVE:return j.fromHueAndChroma(Pt.getExpressiveNeutralHue(a),Pt.getExpressiveNeutralChroma(a,n,i));case w.VIBRANT:return j.fromHueAndChroma(Pt.getVibrantNeutralHue(a),Pt.getVibrantNeutralChroma(a,i));default:return super.getNeutralPalette(e,a,n,i,l)}}getNeutralVariantPalette(e,a,n,i,l){switch(e){case w.NEUTRAL:return j.fromHueAndChroma(a.hue,(i==="phone"?1.4:6)*2.2);case w.TONAL_SPOT:return j.fromHueAndChroma(a.hue,(i==="phone"?5:10)*1.7);case w.EXPRESSIVE:let c=Pt.getExpressiveNeutralHue(a),d=Pt.getExpressiveNeutralChroma(a,n,i);return j.fromHueAndChroma(c,d*(c>=105&&c<125?1.6:2.3));case w.VIBRANT:let p=Pt.getVibrantNeutralHue(a),f=Pt.getVibrantNeutralChroma(a,i);return j.fromHueAndChroma(p,f*1.29);default:return super.getNeutralVariantPalette(e,a,n,i,l)}}getErrorPalette(e,a,n,i,l){let c=We.getPiecewiseHue(a,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);switch(e){case w.NEUTRAL:return j.fromHueAndChroma(c,i==="phone"?50:40);case w.TONAL_SPOT:return j.fromHueAndChroma(c,i==="phone"?60:48);case w.EXPRESSIVE:return j.fromHueAndChroma(c,i==="phone"?64:48);case w.VIBRANT:return j.fromHueAndChroma(c,i==="phone"?80:60);default:return super.getErrorPalette(e,a,n,i,l)}}},Tl=new Yo,Ml=new Dl;function wr(t){return t==="2025"?Ml:Tl}var Al=class extends We{constructor(t,e,a,n=We.DEFAULT_SPEC_VERSION,i=We.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:w.VIBRANT,contrastLevel:a,isDark:e,platform:i,specVersion:n});}};function xl(t){let e=ln(t),a=hn(t),n=dn(t),i=[e.toString(16),a.toString(16),n.toString(16)];for(let[l,c]of i.entries())c.length===1&&(i[l]="0"+c);return "#"+i.join("")}function _l(t){t=t.replace("#","");let e=t.length===3,a=t.length===6,n=t.length===8;if(!e&&!a&&!n)throw new Error("unexpected hex "+t);let i=0,l=0,c=0;return e?(i=Nt(t.slice(0,1).repeat(2)),l=Nt(t.slice(1,2).repeat(2)),c=Nt(t.slice(2,3).repeat(2))):a?(i=Nt(t.slice(0,2)),l=Nt(t.slice(2,4)),c=Nt(t.slice(4,6))):n&&(i=Nt(t.slice(2,4)),l=Nt(t.slice(4,6)),c=Nt(t.slice(6,8))),(255<<24|(i&255)<<16|(l&255)<<8|c&255)>>>0}function Nt(t){return parseInt(t,16)}function Fl(t,e){let a=ce.fromInt(_l(t)),n=new Al(a,e,0),i={},l=["primary","onPrimary","primaryContainer","onPrimaryContainer","secondary","onSecondary","secondaryContainer","onSecondaryContainer","tertiary","onTertiary","tertiaryContainer","onTertiaryContainer","error","onError","errorContainer","onErrorContainer","background","onBackground","surface","onSurface","surfaceVariant","onSurfaceVariant","outline","outlineVariant","shadow","scrim","inverseSurface","inverseOnSurface","inversePrimary","surfaceDim","surfaceBright","surfaceContainerLowest","surfaceContainerLow","surfaceContainer","surfaceContainerHigh","surfaceContainerHighest"];for(let c of l){let d=_[c];d&&(i[c]=xl(d.getArgb(n)));}return i}function Ol(t,e){let a=t.replace("#",""),n=parseInt(a.substring(0,2),16),i=parseInt(a.substring(2,4),16),l=parseInt(a.substring(4,6),16);return `rgba(${n}, ${i}, ${l}, ${e})`}var Nl=createContext(null),El=Fl("#6750A4",false),Uo=()=>useContext(Nl)||{themeColors:El,systemTheme:"auto",setThemeColors:()=>{throw new Error("[@zaide6137/m3-components-web] Wrap your app in <ThemeProvider>.")},setColorScheme:()=>{throw new Error("[@zaide6137/m3-components-web] Wrap your app in <ThemeProvider>.")}},qa=Eo(Bo()),Co=Eo(Bo());function ot(t){return t<0?-1:t===0?0:1}function qr(t,e,a){return (1-a)*t+a*e}function Bl(t,e,a){return a<t?t:a>e?e:a}function Ze(t,e,a){return a<t?t:a>e?e:a}function vo(t){return t=t%360,t<0&&(t=t+360),t}function lt(t){return t=t%360,t<0&&(t=t+360),t}function Qa(t,e){let a=t[0]*e[0][0]+t[1]*e[0][1]+t[2]*e[0][2],n=t[0]*e[1][0]+t[1]*e[1][1]+t[2]*e[1][2],i=t[0]*e[2][0]+t[1]*e[2][1]+t[2]*e[2][2];return [a,n,i]}var Wo=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],Ll=[[3.2413774792388685,-1.5376652402851851,-0.49885366846268053],[-0.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-0.20395524564742123,1.0571799111220335]],jo=[95.047,100,108.883];function mn(t,e,a){return (255<<24|(t&255)<<16|(e&255)<<8|a&255)>>>0}function ko(t){let e=dr(t[0]),a=dr(t[1]),n=dr(t[2]);return mn(e,a,n)}function fn(t){return t>>16&255}function pn(t){return t>>8&255}function gn(t){return t&255}function Hl(t,e,a){let n=Ll,i=n[0][0]*t+n[0][1]*e+n[0][2]*a,l=n[1][0]*t+n[1][1]*e+n[1][2]*a,c=n[2][0]*t+n[2][1]*e+n[2][2]*a,d=dr(i),p=dr(l),f=dr(c);return mn(d,p,f)}function Vl(t){let e=Ht(fn(t)),a=Ht(pn(t)),n=Ht(gn(t));return Qa([e,a,n],Wo)}function Rl(t){let e=Ht(fn(t)),a=Ht(pn(t)),n=Ht(gn(t)),i=Wo,l=i[0][0]*e+i[0][1]*a+i[0][2]*n,c=i[1][0]*e+i[1][1]*a+i[1][2]*n,d=i[2][0]*e+i[2][1]*a+i[2][2]*n,p=jo,f=l/p[0],y=c/p[1],P=d/p[2],k=Gr(f),v=Gr(y),m=Gr(P),g=116*v-16,S=500*(k-v),E=200*(v-m);return [g,S,E]}function Il(t){let e=Zt(t),a=dr(e);return mn(a,a,a)}function So(t){let e=Vl(t)[1];return 116*Gr(e/100)-16}function Zt(t){return 100*Ul((t+16)/116)}function en(t){return Gr(t/100)*116-16}function Ht(t){let e=t/255;return e<=.040449936?e/12.92*100:Math.pow((e+.055)/1.055,2.4)*100}function dr(t){let e=t/100,a=0;return e<=.0031308?a=e*12.92:a=1.055*Math.pow(e,1/2.4)-.055,Bl(0,255,Math.round(a*255))}function Yl(){return jo}function Gr(t){let e=.008856451679035631,a=24389/27;return t>e?Math.pow(t,1/3):(a*t+16)/116}function Ul(t){let e=.008856451679035631,a=24389/27,n=t*t*t;return n>e?n:(116*t-16)/a}var Jt=class zo{static make(e=Yl(),a=200/Math.PI*Zt(50)/100,n=50,i=2,l=false){let c=e,d=c[0]*.401288+c[1]*.650173+c[2]*-0.051461,p=c[0]*-0.250268+c[1]*1.204414+c[2]*.045854,f=c[0]*-2079e-6+c[1]*.048952+c[2]*.953127,y=.8+i/10,P=y>=.9?qr(.59,.69,(y-.9)*10):qr(.525,.59,(y-.8)*10),k=l?1:y*(1-1/3.6*Math.exp((-a-42)/92));k=k>1?1:k<0?0:k;let v=y,m=[k*(100/d)+1-k,k*(100/p)+1-k,k*(100/f)+1-k],g=1/(5*a+1),S=g*g*g*g,E=1-S,V=S*a+.1*E*E*Math.cbrt(5*a),R=Zt(n)/e[1],W=1.48+Math.sqrt(R),L=.725/Math.pow(R,.2),$=L,H=[Math.pow(V*m[0]*d/100,.42),Math.pow(V*m[1]*p/100,.42),Math.pow(V*m[2]*f/100,.42)],N=[400*H[0]/(H[0]+27.13),400*H[1]/(H[1]+27.13),400*H[2]/(H[2]+27.13)],I=(2*N[0]+N[1]+.05*N[2])*L;return new zo(R,I,L,$,P,v,m,V,Math.pow(V,.25),W)}constructor(e,a,n,i,l,c,d,p,f,y){this.n=e,this.aw=a,this.nbb=n,this.ncb=i,this.c=l,this.nc=c,this.rgbD=d,this.fl=p,this.fLRoot=f,this.z=y;}};Jt.DEFAULT=Jt.make();var jr=class Kt{constructor(e,a,n,i,l,c,d,p,f){this.hue=e,this.chroma=a,this.j=n,this.q=i,this.m=l,this.s=c,this.jstar=d,this.astar=p,this.bstar=f;}distance(e){let a=this.jstar-e.jstar,n=this.astar-e.astar,i=this.bstar-e.bstar,l=Math.sqrt(a*a+n*n+i*i);return 1.41*Math.pow(l,.63)}static fromInt(e){return Kt.fromIntInViewingConditions(e,Jt.DEFAULT)}static fromIntInViewingConditions(e,a){let n=(e&16711680)>>16,i=(e&65280)>>8,l=e&255,c=Ht(n),d=Ht(i),p=Ht(l),f=.41233895*c+.35762064*d+.18051042*p,y=.2126*c+.7152*d+.0722*p,P=.01932141*c+.11916382*d+.95034478*p,k=.401288*f+.650173*y-.051461*P,v=-0.250268*f+1.204414*y+.045854*P,m=-2079e-6*f+.048952*y+.953127*P,g=a.rgbD[0]*k,S=a.rgbD[1]*v,E=a.rgbD[2]*m,V=Math.pow(a.fl*Math.abs(g)/100,.42),R=Math.pow(a.fl*Math.abs(S)/100,.42),W=Math.pow(a.fl*Math.abs(E)/100,.42),L=ot(g)*400*V/(V+27.13),$=ot(S)*400*R/(R+27.13),H=ot(E)*400*W/(W+27.13),N=(11*L+-12*$+H)/11,I=(L+$-2*H)/9,de=(20*L+20*$+21*H)/20,we=(40*L+20*$+H)/20,me=Math.atan2(I,N)*180/Math.PI,ke=lt(me),ne=ke*Math.PI/180,Oe=we*a.nbb,De=100*Math.pow(Oe/a.aw,a.c*a.z),Ge=4/a.c*Math.sqrt(De/100)*(a.aw+4)*a.fLRoot,tt=ke<20.14?ke+360:ke,Qe=.25*(Math.cos(tt*Math.PI/180+2)+3.8),Re=5e4/13*Qe*a.nc*a.ncb*Math.sqrt(N*N+I*I)/(de+.305),Ue=Math.pow(Re,.9)*Math.pow(1.64-Math.pow(.29,a.n),.73),st=Ue*Math.sqrt(De/100),dt=st*a.fLRoot,mt=50*Math.sqrt(Ue*a.c/(a.aw+4)),Z=(1+100*.007)*De/(1+.007*De),kt=1/.0228*Math.log(1+.0228*dt),ar=kt*Math.cos(ne),St=kt*Math.sin(ne);return new Kt(ke,st,De,Ge,dt,mt,Z,ar,St)}static fromJch(e,a,n){return Kt.fromJchInViewingConditions(e,a,n,Jt.DEFAULT)}static fromJchInViewingConditions(e,a,n,i){let l=4/i.c*Math.sqrt(e/100)*(i.aw+4)*i.fLRoot,c=a*i.fLRoot,d=a/Math.sqrt(e/100),p=50*Math.sqrt(d*i.c/(i.aw+4)),f=n*Math.PI/180,y=(1+100*.007)*e/(1+.007*e),P=1/.0228*Math.log(1+.0228*c),k=P*Math.cos(f),v=P*Math.sin(f);return new Kt(n,a,e,l,c,p,y,k,v)}static fromUcs(e,a,n){return Kt.fromUcsInViewingConditions(e,a,n,Jt.DEFAULT)}static fromUcsInViewingConditions(e,a,n,i){let l=a,c=n,d=Math.sqrt(l*l+c*c),p=(Math.exp(d*.0228)-1)/.0228/i.fLRoot,f=Math.atan2(c,l)*(180/Math.PI);f<0&&(f+=360);let y=e/(1-(e-100)*.007);return Kt.fromJchInViewingConditions(y,p,f,i)}toInt(){return this.viewed(Jt.DEFAULT)}viewed(e){let a=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(a/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),i=this.hue*Math.PI/180,l=.25*(Math.cos(i+2)+3.8),c=e.aw*Math.pow(this.j/100,1/e.c/e.z),d=l*(5e4/13)*e.nc*e.ncb,p=c/e.nbb,f=Math.sin(i),y=Math.cos(i),P=23*(p+.305)*n/(23*d+11*n*y+108*n*f),k=P*y,v=P*f,m=(460*p+451*k+288*v)/1403,g=(460*p-891*k-261*v)/1403,S=(460*p-220*k-6300*v)/1403,E=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),V=ot(m)*(100/e.fl)*Math.pow(E,1/.42),R=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),W=ot(g)*(100/e.fl)*Math.pow(R,1/.42),L=Math.max(0,27.13*Math.abs(S)/(400-Math.abs(S))),$=ot(S)*(100/e.fl)*Math.pow(L,1/.42),H=V/e.rgbD[0],N=W/e.rgbD[1],I=$/e.rgbD[2],de=1.86206786*H-1.01125463*N+.14918677*I,we=.38752654*H+.62144744*N-.00897398*I,me=-0.0158415*H-.03412294*N+1.04996444*I;return Hl(de,we,me)}static fromXyzInViewingConditions(e,a,n,i){let l=.401288*e+.650173*a-.051461*n,c=-0.250268*e+1.204414*a+.045854*n,d=-2079e-6*e+.048952*a+.953127*n,p=i.rgbD[0]*l,f=i.rgbD[1]*c,y=i.rgbD[2]*d,P=Math.pow(i.fl*Math.abs(p)/100,.42),k=Math.pow(i.fl*Math.abs(f)/100,.42),v=Math.pow(i.fl*Math.abs(y)/100,.42),m=ot(p)*400*P/(P+27.13),g=ot(f)*400*k/(k+27.13),S=ot(y)*400*v/(v+27.13),E=(11*m+-12*g+S)/11,V=(m+g-2*S)/9,R=(20*m+20*g+21*S)/20,W=(40*m+20*g+S)/20,L=Math.atan2(V,E)*180/Math.PI,$=L<0?L+360:L>=360?L-360:L,H=$*Math.PI/180,N=W*i.nbb,I=100*Math.pow(N/i.aw,i.c*i.z),de=4/i.c*Math.sqrt(I/100)*(i.aw+4)*i.fLRoot,we=$<20.14?$+360:$,me=1/4*(Math.cos(we*Math.PI/180+2)+3.8),ke=5e4/13*me*i.nc*i.ncb*Math.sqrt(E*E+V*V)/(R+.305),ne=Math.pow(ke,.9)*Math.pow(1.64-Math.pow(.29,i.n),.73),Oe=ne*Math.sqrt(I/100),De=Oe*i.fLRoot,Ge=50*Math.sqrt(ne*i.c/(i.aw+4)),tt=(1+100*.007)*I/(1+.007*I),Qe=Math.log(1+.0228*De)/.0228,Re=Qe*Math.cos(H),Ue=Qe*Math.sin(H);return new Kt($,Oe,I,de,De,Ge,tt,Re,Ue)}xyzInViewingConditions(e){let a=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(a/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),i=this.hue*Math.PI/180,l=.25*(Math.cos(i+2)+3.8),c=e.aw*Math.pow(this.j/100,1/e.c/e.z),d=l*(5e4/13)*e.nc*e.ncb,p=c/e.nbb,f=Math.sin(i),y=Math.cos(i),P=23*(p+.305)*n/(23*d+11*n*y+108*n*f),k=P*y,v=P*f,m=(460*p+451*k+288*v)/1403,g=(460*p-891*k-261*v)/1403,S=(460*p-220*k-6300*v)/1403,E=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),V=ot(m)*(100/e.fl)*Math.pow(E,1/.42),R=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),W=ot(g)*(100/e.fl)*Math.pow(R,1/.42),L=Math.max(0,27.13*Math.abs(S)/(400-Math.abs(S))),$=ot(S)*(100/e.fl)*Math.pow(L,1/.42),H=V/e.rgbD[0],N=W/e.rgbD[1],I=$/e.rgbD[2],de=1.86206786*H-1.01125463*N+.14918677*I,we=.38752654*H+.62144744*N-.00897398*I,me=-0.0158415*H-.03412294*N+1.04996444*I;return [de,we,me]}},Qt=class pe{static sanitizeRadians(e){return (e+Math.PI*8)%(Math.PI*2)}static trueDelinearized(e){let a=e/100,n=0;return a<=.0031308?n=a*12.92:n=1.055*Math.pow(a,1/2.4)-.055,n*255}static chromaticAdaptation(e){let a=Math.pow(Math.abs(e),.42);return ot(e)*400*a/(a+27.13)}static hueOf(e){let a=Qa(e,pe.SCALED_DISCOUNT_FROM_LINRGB),n=pe.chromaticAdaptation(a[0]),i=pe.chromaticAdaptation(a[1]),l=pe.chromaticAdaptation(a[2]),c=(11*n+-12*i+l)/11,d=(n+i-2*l)/9;return Math.atan2(d,c)}static areInCyclicOrder(e,a,n){let i=pe.sanitizeRadians(a-e),l=pe.sanitizeRadians(n-e);return i<l}static intercept(e,a,n){return (a-e)/(n-e)}static lerpPoint(e,a,n){return [e[0]+(n[0]-e[0])*a,e[1]+(n[1]-e[1])*a,e[2]+(n[2]-e[2])*a]}static setCoordinate(e,a,n,i){let l=pe.intercept(e[i],a,n[i]);return pe.lerpPoint(e,l,n)}static isBounded(e){return 0<=e&&e<=100}static nthVertex(e,a){let n=pe.Y_FROM_LINRGB[0],i=pe.Y_FROM_LINRGB[1],l=pe.Y_FROM_LINRGB[2],c=a%4<=1?0:100,d=a%2===0?0:100;if(a<4){let p=c,f=d,y=(e-p*i-f*l)/n;return pe.isBounded(y)?[y,p,f]:[-1,-1,-1]}else if(a<8){let p=c,f=d,y=(e-f*n-p*l)/i;return pe.isBounded(y)?[f,y,p]:[-1,-1,-1]}else {let p=c,f=d,y=(e-p*n-f*i)/l;return pe.isBounded(y)?[p,f,y]:[-1,-1,-1]}}static bisectToSegment(e,a){let n=[-1,-1,-1],i=n,l=0,c=0,d=false,p=true;for(let f=0;f<12;f++){let y=pe.nthVertex(e,f);if(y[0]<0)continue;let P=pe.hueOf(y);if(!d){n=y,i=y,l=P,c=P,d=true;continue}(p||pe.areInCyclicOrder(l,P,c))&&(p=false,pe.areInCyclicOrder(l,a,P)?(i=y,c=P):(n=y,l=P));}return [n,i]}static midpoint(e,a){return [(e[0]+a[0])/2,(e[1]+a[1])/2,(e[2]+a[2])/2]}static criticalPlaneBelow(e){return Math.floor(e-.5)}static criticalPlaneAbove(e){return Math.ceil(e-.5)}static bisectToLimit(e,a){let n=pe.bisectToSegment(e,a),i=n[0],l=pe.hueOf(i),c=n[1];for(let d=0;d<3;d++)if(i[d]!==c[d]){let p=-1,f=255;i[d]<c[d]?(p=pe.criticalPlaneBelow(pe.trueDelinearized(i[d])),f=pe.criticalPlaneAbove(pe.trueDelinearized(c[d]))):(p=pe.criticalPlaneAbove(pe.trueDelinearized(i[d])),f=pe.criticalPlaneBelow(pe.trueDelinearized(c[d])));for(let y=0;y<8&&!(Math.abs(f-p)<=1);y++){let P=Math.floor((p+f)/2),k=pe.CRITICAL_PLANES[P],v=pe.setCoordinate(i,k,c,d),m=pe.hueOf(v);pe.areInCyclicOrder(l,a,m)?(c=v,f=P):(i=v,l=m,p=P);}}return pe.midpoint(i,c)}static inverseChromaticAdaptation(e){let a=Math.abs(e),n=Math.max(0,27.13*a/(400-a));return ot(e)*Math.pow(n,1/.42)}static findResultByJ(e,a,n){let i=Math.sqrt(n)*11,l=Jt.DEFAULT,c=1/Math.pow(1.64-Math.pow(.29,l.n),.73),d=.25*(Math.cos(e+2)+3.8)*(5e4/13)*l.nc*l.ncb,p=Math.sin(e),f=Math.cos(e);for(let y=0;y<5;y++){let P=i/100,k=a===0||i===0?0:a/Math.sqrt(P),v=Math.pow(k*c,1/.9),m=l.aw*Math.pow(P,1/l.c/l.z)/l.nbb,g=23*(m+.305)*v/(23*d+11*v*f+108*v*p),S=g*f,E=g*p,V=(460*m+451*S+288*E)/1403,R=(460*m-891*S-261*E)/1403,W=(460*m-220*S-6300*E)/1403,L=pe.inverseChromaticAdaptation(V),$=pe.inverseChromaticAdaptation(R),H=pe.inverseChromaticAdaptation(W),N=Qa([L,$,H],pe.LINRGB_FROM_SCALED_DISCOUNT);if(N[0]<0||N[1]<0||N[2]<0)return 0;let I=pe.Y_FROM_LINRGB[0],de=pe.Y_FROM_LINRGB[1],we=pe.Y_FROM_LINRGB[2],me=I*N[0]+de*N[1]+we*N[2];if(me<=0)return 0;if(y===4||Math.abs(me-n)<.002)return N[0]>100.01||N[1]>100.01||N[2]>100.01?0:ko(N);i=i-(me-n)*i/(2*me);}return 0}static solveToInt(e,a,n){if(a<1e-4||n<1e-4||n>99.9999)return Il(n);e=lt(e);let i=e/180*Math.PI,l=Zt(n),c=pe.findResultByJ(i,a,l);if(c!==0)return c;let d=pe.bisectToLimit(l,i);return ko(d)}static solveToCam(e,a,n){return jr.fromInt(pe.solveToInt(e,a,n))}};Qt.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];Qt.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];Qt.Y_FROM_LINRGB=[.2126,.7152,.0722];Qt.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var le=class Ca{static from(e,a,n){return new Ca(Qt.solveToInt(e,a,n))}static fromInt(e){return new Ca(e)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(e){this.setInternalState(Qt.solveToInt(e,this.internalChroma,this.internalTone));}get chroma(){return this.internalChroma}set chroma(e){this.setInternalState(Qt.solveToInt(this.internalHue,e,this.internalTone));}get tone(){return this.internalTone}set tone(e){this.setInternalState(Qt.solveToInt(this.internalHue,this.internalChroma,e));}setValue(e,a){this[e]=a;}toString(){return `HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`}static isBlue(e){return e>=250&&e<270}static isYellow(e){return e>=105&&e<125}static isCyan(e){return e>=170&&e<207}constructor(e){this.argb=e;let a=jr.fromInt(e);this.internalHue=a.hue,this.internalChroma=a.chroma,this.internalTone=So(e),this.argb=e;}setInternalState(e){let a=jr.fromInt(e);this.internalHue=a.hue,this.internalChroma=a.chroma,this.internalTone=So(e),this.argb=e;}inViewingConditions(e){let a=jr.fromInt(this.toInt()).xyzInViewingConditions(e),n=jr.fromXyzInViewingConditions(a[0],a[1],a[2],Jt.make());return Ca.from(n.hue,n.chroma,en(a[1]))}},$e=class xr{static ratioOfTones(e,a){return e=Ze(0,100,e),a=Ze(0,100,a),xr.ratioOfYs(Zt(e),Zt(a))}static ratioOfYs(e,a){let n=e>a?e:a,i=n===a?e:a;return (n+5)/(i+5)}static lighter(e,a){if(e<0||e>100)return -1;let n=Zt(e),i=a*(n+5)-5,l=xr.ratioOfYs(i,n),c=Math.abs(l-a);if(l<a&&c>.04)return -1;let d=en(i)+.4;return d<0||d>100?-1:d}static darker(e,a){if(e<0||e>100)return -1;let n=Zt(e),i=(n+5)/a-5,l=xr.ratioOfYs(n,i),c=Math.abs(l-a);if(l<a&&c>.04)return -1;let d=en(i)-.4;return d<0||d>100?-1:d}static lighterUnsafe(e,a){let n=xr.lighter(e,a);return n<0?100:n}static darkerUnsafe(e,a){let n=xr.darker(e,a);return n<0?0:n}},tn=class Ko{static isDisliked(e){let a=Math.round(e.hue)>=90&&Math.round(e.hue)<=111,n=Math.round(e.chroma)>16,i=Math.round(e.tone)<65;return a&&n&&i}static fixIfDisliked(e){return Ko.isDisliked(e)?le.from(e.hue,e.chroma,70):e}};function Wl(t,e,a){if(t.name!==a.name)throw new Error(`Attempting to extend color ${t.name} with color ${a.name} of different name for spec version ${e}.`);if(t.isBackground!==a.isBackground)throw new Error(`Attempting to extend color ${t.name} as a ${t.isBackground?"background":"foreground"} with color ${a.name} as a ${a.isBackground?"background":"foreground"} for spec version ${e}.`)}function ie(t,e,a){return Wl(t,e,a),A.fromPalette({name:t.name,palette:n=>n.specVersion===e?a.palette(n):t.palette(n),tone:n=>n.specVersion===e?a.tone(n):t.tone(n),isBackground:t.isBackground,chromaMultiplier:n=>{let i=n.specVersion===e?a.chromaMultiplier:t.chromaMultiplier;return i!==void 0?i(n):1},background:n=>{let i=n.specVersion===e?a.background:t.background;return i!==void 0?i(n):void 0},secondBackground:n=>{let i=n.specVersion===e?a.secondBackground:t.secondBackground;return i!==void 0?i(n):void 0},contrastCurve:n=>{let i=n.specVersion===e?a.contrastCurve:t.contrastCurve;return i!==void 0?i(n):void 0},toneDeltaPair:n=>{let i=n.specVersion===e?a.toneDeltaPair:t.toneDeltaPair;return i!==void 0?i(n):void 0}})}var A=class cr{static fromPalette(e){return new cr(e.name??"",e.palette,e.tone??cr.getInitialToneFromBackground(e.background),e.isBackground??false,e.chromaMultiplier,e.background,e.secondBackground,e.contrastCurve,e.toneDeltaPair)}static getInitialToneFromBackground(e){return e===void 0?a=>50:a=>e(a)?e(a).getTone(a):50}constructor(e,a,n,i,l,c,d,p,f){if(this.name=e,this.palette=a,this.tone=n,this.isBackground=i,this.chromaMultiplier=l,this.background=c,this.secondBackground=d,this.contrastCurve=p,this.toneDeltaPair=f,this.hctCache=new Map,!c&&d)throw new Error(`Color ${e} has secondBackgrounddefined, but background is not defined.`);if(!c&&p)throw new Error(`Color ${e} has contrastCurvedefined, but background is not defined.`);if(c&&!p)throw new Error(`Color ${e} has backgrounddefined, but contrastCurve is not defined.`)}clone(){return cr.fromPalette({name:this.name,palette:this.palette,tone:this.tone,isBackground:this.isBackground,chromaMultiplier:this.chromaMultiplier,background:this.background,secondBackground:this.secondBackground,contrastCurve:this.contrastCurve,toneDeltaPair:this.toneDeltaPair})}clearCache(){this.hctCache.clear();}getArgb(e){return this.getHct(e).toInt()}getHct(e){let a=this.hctCache.get(e);if(a!=null)return a;let n=wo(e.specVersion).getHct(e,this);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(e,n),n}getTone(e){return wo(e.specVersion).getTone(e,this)}static foregroundTone(e,a){let n=$e.lighterUnsafe(e,a),i=$e.darkerUnsafe(e,a),l=$e.ratioOfTones(n,e),c=$e.ratioOfTones(i,e);if(cr.tonePrefersLightForeground(e)){let d=Math.abs(l-c)<.1&&l<a&&c<a;return l>=a||l>=c||d?n:i}else return c>=a||c>=l?i:n}static tonePrefersLightForeground(e){return Math.round(e)<60}static toneAllowsLightForeground(e){return Math.round(e)<=49}static enableLightForeground(e){return cr.tonePrefersLightForeground(e)&&!cr.toneAllowsLightForeground(e)?49:e}},jl=class{getHct(t,e){let a=e.getTone(t);return e.palette(t).getHct(a)}getTone(t,e){let a=t.contrastLevel<0,n=e.toneDeltaPair?e.toneDeltaPair(t):void 0;if(n){let i=n.roleA,l=n.roleB,c=n.delta,d=n.polarity,p=n.stayTogether,f=d==="nearer"||d==="lighter"&&!t.isDark||d==="darker"&&t.isDark,y=f?i:l,P=f?l:i,k=e.name===y.name,v=t.isDark?1:-1,m=y.tone(t),g=P.tone(t);if(e.background&&y.contrastCurve&&P.contrastCurve){let S=e.background(t),E=y.contrastCurve(t),V=P.contrastCurve(t);if(S&&E&&V){let R=S.getTone(t),W=E.get(t.contrastLevel),L=V.get(t.contrastLevel);$e.ratioOfTones(R,m)<W&&(m=A.foregroundTone(R,W)),$e.ratioOfTones(R,g)<L&&(g=A.foregroundTone(R,L)),a&&(m=A.foregroundTone(R,W),g=A.foregroundTone(R,L));}}return (g-m)*v<c&&(g=Ze(0,100,m+c*v),(g-m)*v>=c||(m=Ze(0,100,g-c*v))),50<=m&&m<60?v>0?(m=60,g=Math.max(g,m+c*v)):(m=49,g=Math.min(g,m+c*v)):50<=g&&g<60&&(p?v>0?(m=60,g=Math.max(g,m+c*v)):(m=49,g=Math.min(g,m+c*v)):v>0?g=60:g=49),k?m:g}else {let i=e.tone(t);if(e.background==null||e.background(t)===void 0||e.contrastCurve==null||e.contrastCurve(t)===void 0)return i;let l=e.background(t).getTone(t),c=e.contrastCurve(t).get(t.contrastLevel);if($e.ratioOfTones(l,i)>=c||(i=A.foregroundTone(l,c)),a&&(i=A.foregroundTone(l,c)),e.isBackground&&50<=i&&i<60&&($e.ratioOfTones(49,l)>=c?i=49:i=60),e.secondBackground==null||e.secondBackground(t)===void 0)return i;let[d,p]=[e.background,e.secondBackground],[f,y]=[d(t).getTone(t),p(t).getTone(t)],[P,k]=[Math.max(f,y),Math.min(f,y)];if($e.ratioOfTones(P,i)>=c&&$e.ratioOfTones(k,i)>=c)return i;let v=$e.lighter(P,c),m=$e.darker(k,c),g=[];return v!==-1&&g.push(v),m!==-1&&g.push(m),A.tonePrefersLightForeground(f)||A.tonePrefersLightForeground(y)?v<0?100:v:g.length===1?g[0]:m<0?0:m}}},zl=class{getHct(t,e){let a=e.palette(t),n=e.getTone(t),i=a.hue,l=a.chroma*(e.chromaMultiplier?e.chromaMultiplier(t):1);return le.from(i,l,n)}getTone(t,e){let a=e.toneDeltaPair?e.toneDeltaPair(t):void 0;if(a){let n=a.roleA,i=a.roleB,l=a.polarity,c=a.constraint,d=l==="darker"||l==="relative_lighter"&&t.isDark||l==="relative_darker"&&!t.isDark?-a.delta:a.delta,p=e.name===n.name,f=p?n:i,y=p?i:n,P=f.tone(t),k=y.getTone(t),v=d*(p?1:-1);if(c==="exact"?P=Ze(0,100,k+v):c==="nearer"?v>0?P=Ze(0,100,Ze(k,k+v,P)):P=Ze(0,100,Ze(k+v,k,P)):c==="farther"&&(v>0?P=Ze(k+v,100,P):P=Ze(0,k+v,P)),e.background&&e.contrastCurve){let m=e.background(t),g=e.contrastCurve(t);if(m&&g){let S=m.getTone(t),E=g.get(t.contrastLevel);P=$e.ratioOfTones(S,P)>=E&&t.contrastLevel>=0?P:A.foregroundTone(S,E);}}return e.isBackground&&!e.name.endsWith("_fixed_dim")&&(P>=57?P=Ze(65,100,P):P=Ze(0,49,P)),P}else {let n=e.tone(t);if(e.background==null||e.background(t)===void 0||e.contrastCurve==null||e.contrastCurve(t)===void 0)return n;let i=e.background(t).getTone(t),l=e.contrastCurve(t).get(t.contrastLevel);if(n=$e.ratioOfTones(i,n)>=l&&t.contrastLevel>=0?n:A.foregroundTone(i,l),e.isBackground&&!e.name.endsWith("_fixed_dim")&&(n>=57?n=Ze(65,100,n):n=Ze(0,49,n)),e.secondBackground==null||e.secondBackground(t)===void 0)return n;let[c,d]=[e.background,e.secondBackground],[p,f]=[c(t).getTone(t),d(t).getTone(t)],[y,P]=[Math.max(p,f),Math.min(p,f)];if($e.ratioOfTones(y,n)>=l&&$e.ratioOfTones(P,n)>=l)return n;let k=$e.lighter(y,l),v=$e.darker(P,l),m=[];return k!==-1&&m.push(k),v!==-1&&m.push(v),A.tonePrefersLightForeground(p)||A.tonePrefersLightForeground(f)?k<0?100:k:m.length===1?m[0]:v<0?0:v}}},Kl=new jl,$l=new zl;function wo(t){return t==="2025"?$l:Kl}var z=class va{static fromInt(e){let a=le.fromInt(e);return va.fromHct(a)}static fromHct(e){return new va(e.hue,e.chroma,e)}static fromHueAndChroma(e,a){let n=new ql(e,a).create();return new va(e,a,n)}constructor(e,a,n){this.hue=e,this.chroma=a,this.keyColor=n,this.cache=new Map;}tone(e){let a=this.cache.get(e);return a===void 0&&(e==99&&le.isYellow(this.hue)?a=this.averageArgb(this.tone(98),this.tone(100)):a=le.from(this.hue,this.chroma,e).toInt(),this.cache.set(e,a)),a}getHct(e){return le.fromInt(this.tone(e))}averageArgb(e,a){let n=e>>>16&255,i=e>>>8&255,l=e&255,c=a>>>16&255,d=a>>>8&255,p=a&255,f=Math.round((n+c)/2),y=Math.round((i+d)/2),P=Math.round((l+p)/2);return (255<<24|(f&255)<<16|(y&255)<<8|P&255)>>>0}},ql=class{constructor(t,e){this.hue=t,this.requestedChroma=e,this.chromaCache=new Map,this.maxChromaValue=200;}create(){let t=0,e=100;for(;t<e;){let a=Math.floor((t+e)/2),n=this.maxChroma(a)<this.maxChroma(a+1);if(this.maxChroma(a)>=this.requestedChroma-.01)if(Math.abs(t-50)<Math.abs(e-50))e=a;else {if(t===a)return le.from(this.hue,this.requestedChroma,t);t=a;}else n?t=a+1:e=a;}return le.from(this.hue,this.requestedChroma,t)}maxChroma(t){if(this.chromaCache.has(t))return this.chromaCache.get(t);let e=le.from(this.hue,this.maxChromaValue,t).chroma;return this.chromaCache.set(t,e),e}},bo=class ka{constructor(e){this.input=e,this.hctsByTempCache=[],this.hctsByHueCache=[],this.tempsByHctCache=new Map,this.inputRelativeTemperatureCache=-1,this.complementCache=null;}get hctsByTemp(){if(this.hctsByTempCache.length>0)return this.hctsByTempCache;let e=this.hctsByHue.concat([this.input]),a=this.tempsByHct;return e.sort((n,i)=>a.get(n)-a.get(i)),this.hctsByTempCache=e,e}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(e=5,a=12){let n=Math.round(this.input.hue),i=this.hctsByHue[n],l=this.relativeTemperature(i),c=[i],d=0;for(let m=0;m<360;m++){let g=vo(n+m),S=this.hctsByHue[g],E=this.relativeTemperature(S),V=Math.abs(E-l);l=E,d+=V;}let p=1,f=d/a,y=0;for(l=this.relativeTemperature(i);c.length<a;){let m=vo(n+p),g=this.hctsByHue[m],S=this.relativeTemperature(g),E=Math.abs(S-l);y+=E;let V=c.length*f,R=y>=V,W=1;for(;R&&c.length<a;){c.push(g);let L=(c.length+W)*f;R=y>=L,W++;}if(l=S,p++,p>360){for(;c.length<a;)c.push(g);break}}let P=[this.input],k=Math.floor((e-1)/2);for(let m=1;m<k+1;m++){let g=0-m;for(;g<0;)g=c.length+g;g>=c.length&&(g=g%c.length),P.splice(0,0,c[g]);}let v=e-k-1;for(let m=1;m<v+1;m++){let g=m;for(;g<0;)g=c.length+g;g>=c.length&&(g=g%c.length),P.push(c[g]);}return P}get complement(){if(this.complementCache!=null)return this.complementCache;let e=this.coldest.hue,a=this.tempsByHct.get(this.coldest),n=this.warmest.hue,i=this.tempsByHct.get(this.warmest)-a,l=ka.isBetween(this.input.hue,e,n),c=l?n:e,d=l?e:n,p=1,f=1e3,y=this.hctsByHue[Math.round(this.input.hue)],P=1-this.inputRelativeTemperature;for(let k=0;k<=360;k+=1){let v=lt(c+p*k);if(!ka.isBetween(v,c,d))continue;let m=this.hctsByHue[Math.round(v)],g=(this.tempsByHct.get(m)-a)/i,S=Math.abs(P-g);S<f&&(f=S,y=m);}return this.complementCache=y,this.complementCache}relativeTemperature(e){let a=this.tempsByHct.get(this.warmest)-this.tempsByHct.get(this.coldest),n=this.tempsByHct.get(e)-this.tempsByHct.get(this.coldest);return a===0?.5:n/a}get inputRelativeTemperature(){return this.inputRelativeTemperatureCache>=0?this.inputRelativeTemperatureCache:(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input),this.inputRelativeTemperatureCache)}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;let e=this.hctsByHue.concat([this.input]),a=new Map;for(let n of e)a.set(n,ka.rawTemperature(n));return this.tempsByHctCache=a,a}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;let e=[];for(let a=0;a<=360;a+=1){let n=le.from(a,this.input.chroma,this.input.tone);e.push(n);}return this.hctsByHueCache=e,this.hctsByHueCache}static isBetween(e,a,n){return a<n?a<=e&&e<=n:a<=e||e<=n}static rawTemperature(e){let a=Rl(e.toInt()),n=lt(Math.atan2(a[2],a[1])*180/Math.PI),i=Math.sqrt(a[1]*a[1]+a[2]*a[2]);return -0.5+.02*Math.pow(i,1.07)*Math.cos(lt(n-50)*Math.PI/180)}},Q=class{constructor(t,e,a,n){this.low=t,this.normal=e,this.medium=a,this.high=n;}get(t){return t<=-1?this.low:t<0?qr(this.low,this.normal,(t- -1)/1):t<.5?qr(this.normal,this.medium,(t-0)/.5):t<1?qr(this.medium,this.high,(t-.5)/.5):this.high}},xe=class{constructor(t,e,a,n,i,l){this.roleA=t,this.roleB=e,this.delta=a,this.polarity=n,this.stayTogether=i,this.constraint=l,this.constraint=l??"exact";}},b;(function(t){t[t.MONOCHROME=0]="MONOCHROME",t[t.NEUTRAL=1]="NEUTRAL",t[t.TONAL_SPOT=2]="TONAL_SPOT",t[t.VIBRANT=3]="VIBRANT",t[t.EXPRESSIVE=4]="EXPRESSIVE",t[t.FIDELITY=5]="FIDELITY",t[t.CONTENT=6]="CONTENT",t[t.RAINBOW=7]="RAINBOW",t[t.FRUIT_SALAD=8]="FRUIT_SALAD";})(b||(b={}));function br(t){return t.variant===b.FIDELITY||t.variant===b.CONTENT}function He(t){return t.variant===b.MONOCHROME}function Gl(t,e,a,n){let i=a,l=le.from(t,e,a);if(l.chroma<e){let c=l.chroma;for(;l.chroma<e;){i+=n?-1:1;let d=le.from(t,e,i);if(c>d.chroma||Math.abs(d.chroma-e)<.4)break;let p=Math.abs(d.chroma-e),f=Math.abs(l.chroma-e);p<f&&(l=d),c=Math.max(c,d.chroma);}}return i}var Xl=class{primaryPaletteKeyColor(){return A.fromPalette({name:"primary_palette_key_color",palette:t=>t.primaryPalette,tone:t=>t.primaryPalette.keyColor.tone})}secondaryPaletteKeyColor(){return A.fromPalette({name:"secondary_palette_key_color",palette:t=>t.secondaryPalette,tone:t=>t.secondaryPalette.keyColor.tone})}tertiaryPaletteKeyColor(){return A.fromPalette({name:"tertiary_palette_key_color",palette:t=>t.tertiaryPalette,tone:t=>t.tertiaryPalette.keyColor.tone})}neutralPaletteKeyColor(){return A.fromPalette({name:"neutral_palette_key_color",palette:t=>t.neutralPalette,tone:t=>t.neutralPalette.keyColor.tone})}neutralVariantPaletteKeyColor(){return A.fromPalette({name:"neutral_variant_palette_key_color",palette:t=>t.neutralVariantPalette,tone:t=>t.neutralVariantPalette.keyColor.tone})}errorPaletteKeyColor(){return A.fromPalette({name:"error_palette_key_color",palette:t=>t.errorPalette,tone:t=>t.errorPalette.keyColor.tone})}background(){return A.fromPalette({name:"background",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}onBackground(){return A.fromPalette({name:"on_background",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.background(),contrastCurve:t=>new Q(3,3,4.5,7)})}surface(){return A.fromPalette({name:"surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}surfaceDim(){return A.fromPalette({name:"surface_dim",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:new Q(87,87,80,75).get(t.contrastLevel),isBackground:true})}surfaceBright(){return A.fromPalette({name:"surface_bright",palette:t=>t.neutralPalette,tone:t=>t.isDark?new Q(24,24,29,34).get(t.contrastLevel):98,isBackground:true})}surfaceContainerLowest(){return A.fromPalette({name:"surface_container_lowest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new Q(4,4,2,0).get(t.contrastLevel):100,isBackground:true})}surfaceContainerLow(){return A.fromPalette({name:"surface_container_low",palette:t=>t.neutralPalette,tone:t=>t.isDark?new Q(10,10,11,12).get(t.contrastLevel):new Q(96,96,96,95).get(t.contrastLevel),isBackground:true})}surfaceContainer(){return A.fromPalette({name:"surface_container",palette:t=>t.neutralPalette,tone:t=>t.isDark?new Q(12,12,16,20).get(t.contrastLevel):new Q(94,94,92,90).get(t.contrastLevel),isBackground:true})}surfaceContainerHigh(){return A.fromPalette({name:"surface_container_high",palette:t=>t.neutralPalette,tone:t=>t.isDark?new Q(17,17,21,25).get(t.contrastLevel):new Q(92,92,88,85).get(t.contrastLevel),isBackground:true})}surfaceContainerHighest(){return A.fromPalette({name:"surface_container_highest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new Q(22,22,26,30).get(t.contrastLevel):new Q(90,90,84,80).get(t.contrastLevel),isBackground:true})}onSurface(){return A.fromPalette({name:"on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(4.5,7,11,21)})}surfaceVariant(){return A.fromPalette({name:"surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:90,isBackground:true})}onSurfaceVariant(){return A.fromPalette({name:"on_surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?80:30,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(3,4.5,7,11)})}inverseSurface(){return A.fromPalette({name:"inverse_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:20,isBackground:true})}inverseOnSurface(){return A.fromPalette({name:"inverse_on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?20:95,background:t=>this.inverseSurface(),contrastCurve:t=>new Q(4.5,7,11,21)})}outline(){return A.fromPalette({name:"outline",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?60:50,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(1.5,3,4.5,7)})}outlineVariant(){return A.fromPalette({name:"outline_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:80,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(1,1,3,4.5)})}shadow(){return A.fromPalette({name:"shadow",palette:t=>t.neutralPalette,tone:t=>0})}scrim(){return A.fromPalette({name:"scrim",palette:t=>t.neutralPalette,tone:t=>0})}surfaceTint(){return A.fromPalette({name:"surface_tint",palette:t=>t.primaryPalette,tone:t=>t.isDark?80:40,isBackground:true})}primary(){return A.fromPalette({name:"primary",palette:t=>t.primaryPalette,tone:t=>He(t)?t.isDark?100:0:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(3,4.5,7,7),toneDeltaPair:t=>new xe(this.primaryContainer(),this.primary(),10,"nearer",false)})}primaryDim(){}onPrimary(){return A.fromPalette({name:"on_primary",palette:t=>t.primaryPalette,tone:t=>He(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.primary(),contrastCurve:t=>new Q(4.5,7,11,21)})}primaryContainer(){return A.fromPalette({name:"primary_container",palette:t=>t.primaryPalette,tone:t=>br(t)?t.sourceColorHct.tone:He(t)?t.isDark?85:25:t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(1,1,3,4.5),toneDeltaPair:t=>new xe(this.primaryContainer(),this.primary(),10,"nearer",false)})}onPrimaryContainer(){return A.fromPalette({name:"on_primary_container",palette:t=>t.primaryPalette,tone:t=>br(t)?A.foregroundTone(this.primaryContainer().tone(t),4.5):He(t)?t.isDark?0:100:t.isDark?90:30,background:t=>this.primaryContainer(),contrastCurve:t=>new Q(3,4.5,7,11)})}inversePrimary(){return A.fromPalette({name:"inverse_primary",palette:t=>t.primaryPalette,tone:t=>t.isDark?40:80,background:t=>this.inverseSurface(),contrastCurve:t=>new Q(3,4.5,7,7)})}secondary(){return A.fromPalette({name:"secondary",palette:t=>t.secondaryPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(3,4.5,7,7),toneDeltaPair:t=>new xe(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}secondaryDim(){}onSecondary(){return A.fromPalette({name:"on_secondary",palette:t=>t.secondaryPalette,tone:t=>He(t)?t.isDark?10:100:t.isDark?20:100,background:t=>this.secondary(),contrastCurve:t=>new Q(4.5,7,11,21)})}secondaryContainer(){return A.fromPalette({name:"secondary_container",palette:t=>t.secondaryPalette,tone:t=>{let e=t.isDark?30:90;return He(t)?t.isDark?30:85:br(t)?Gl(t.secondaryPalette.hue,t.secondaryPalette.chroma,e,!t.isDark):e},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(1,1,3,4.5),toneDeltaPair:t=>new xe(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}onSecondaryContainer(){return A.fromPalette({name:"on_secondary_container",palette:t=>t.secondaryPalette,tone:t=>He(t)?t.isDark?90:10:br(t)?A.foregroundTone(this.secondaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.secondaryContainer(),contrastCurve:t=>new Q(3,4.5,7,11)})}tertiary(){return A.fromPalette({name:"tertiary",palette:t=>t.tertiaryPalette,tone:t=>He(t)?t.isDark?90:25:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(3,4.5,7,7),toneDeltaPair:t=>new xe(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}tertiaryDim(){}onTertiary(){return A.fromPalette({name:"on_tertiary",palette:t=>t.tertiaryPalette,tone:t=>He(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.tertiary(),contrastCurve:t=>new Q(4.5,7,11,21)})}tertiaryContainer(){return A.fromPalette({name:"tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>{if(He(t))return t.isDark?60:49;if(!br(t))return t.isDark?30:90;let e=t.tertiaryPalette.getHct(t.sourceColorHct.tone);return tn.fixIfDisliked(e).tone},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(1,1,3,4.5),toneDeltaPair:t=>new xe(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}onTertiaryContainer(){return A.fromPalette({name:"on_tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>He(t)?t.isDark?0:100:br(t)?A.foregroundTone(this.tertiaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.tertiaryContainer(),contrastCurve:t=>new Q(3,4.5,7,11)})}error(){return A.fromPalette({name:"error",palette:t=>t.errorPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(3,4.5,7,7),toneDeltaPair:t=>new xe(this.errorContainer(),this.error(),10,"nearer",false)})}errorDim(){}onError(){return A.fromPalette({name:"on_error",palette:t=>t.errorPalette,tone:t=>t.isDark?20:100,background:t=>this.error(),contrastCurve:t=>new Q(4.5,7,11,21)})}errorContainer(){return A.fromPalette({name:"error_container",palette:t=>t.errorPalette,tone:t=>t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(1,1,3,4.5),toneDeltaPair:t=>new xe(this.errorContainer(),this.error(),10,"nearer",false)})}onErrorContainer(){return A.fromPalette({name:"on_error_container",palette:t=>t.errorPalette,tone:t=>He(t)?t.isDark?90:10:t.isDark?90:30,background:t=>this.errorContainer(),contrastCurve:t=>new Q(3,4.5,7,11)})}primaryFixed(){return A.fromPalette({name:"primary_fixed",palette:t=>t.primaryPalette,tone:t=>He(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(1,1,3,4.5),toneDeltaPair:t=>new xe(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}primaryFixedDim(){return A.fromPalette({name:"primary_fixed_dim",palette:t=>t.primaryPalette,tone:t=>He(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(1,1,3,4.5),toneDeltaPair:t=>new xe(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}onPrimaryFixed(){return A.fromPalette({name:"on_primary_fixed",palette:t=>t.primaryPalette,tone:t=>He(t)?100:10,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new Q(4.5,7,11,21)})}onPrimaryFixedVariant(){return A.fromPalette({name:"on_primary_fixed_variant",palette:t=>t.primaryPalette,tone:t=>He(t)?90:30,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new Q(3,4.5,7,11)})}secondaryFixed(){return A.fromPalette({name:"secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>He(t)?80:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(1,1,3,4.5),toneDeltaPair:t=>new xe(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}secondaryFixedDim(){return A.fromPalette({name:"secondary_fixed_dim",palette:t=>t.secondaryPalette,tone:t=>He(t)?70:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(1,1,3,4.5),toneDeltaPair:t=>new xe(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}onSecondaryFixed(){return A.fromPalette({name:"on_secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>10,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new Q(4.5,7,11,21)})}onSecondaryFixedVariant(){return A.fromPalette({name:"on_secondary_fixed_variant",palette:t=>t.secondaryPalette,tone:t=>He(t)?25:30,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new Q(3,4.5,7,11)})}tertiaryFixed(){return A.fromPalette({name:"tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>He(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(1,1,3,4.5),toneDeltaPair:t=>new xe(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}tertiaryFixedDim(){return A.fromPalette({name:"tertiary_fixed_dim",palette:t=>t.tertiaryPalette,tone:t=>He(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new Q(1,1,3,4.5),toneDeltaPair:t=>new xe(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}onTertiaryFixed(){return A.fromPalette({name:"on_tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>He(t)?100:10,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new Q(4.5,7,11,21)})}onTertiaryFixedVariant(){return A.fromPalette({name:"on_tertiary_fixed_variant",palette:t=>t.tertiaryPalette,tone:t=>He(t)?90:30,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new Q(3,4.5,7,11)})}highestSurface(t){return t.isDark?this.surfaceBright():this.surfaceDim()}};function Ce(t,e=0,a=100,n=1){let i=$o(t.hue,t.chroma*n,100,true);return Ze(e,a,i)}function Wt(t,e=0,a=100){let n=$o(t.hue,t.chroma,0,false);return Ze(e,a,n)}function $o(t,e,a,n){let i=a,l=le.from(t,e,i);for(;l.chroma<e&&!(a<0||a>100);){a+=n?-1:1;let c=le.from(t,e,a);l.chroma<c.chroma&&(l=c,i=a);}return i}function re(t){return t===1.5?new Q(1.5,1.5,3,5.5):t===3?new Q(3,3,4.5,7):t===4.5?new Q(4.5,4.5,7,11):t===6?new Q(6,6,7,11):t===7?new Q(7,7,11,21):t===9?new Q(9,9,11,21):t===11?new Q(11,11,21,21):t===21?new Q(21,21,21,21):new Q(t,t,7,21)}var Zl=class extends Xl{surface(){let t=A.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>(super.surface().tone(e),e.platform==="phone"?e.isDark?4:le.isYellow(e.neutralPalette.hue)?99:e.variant===b.VIBRANT?97:98:0),isBackground:true});return ie(super.surface(),"2025",t)}surfaceDim(){let t=A.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?4:le.isYellow(e.neutralPalette.hue)?90:e.variant===b.VIBRANT?85:87,isBackground:true,chromaMultiplier:e=>{if(!e.isDark){if(e.variant===b.NEUTRAL)return 2.5;if(e.variant===b.TONAL_SPOT)return 1.7;if(e.variant===b.EXPRESSIVE)return le.isYellow(e.neutralPalette.hue)?2.7:1.75;if(e.variant===b.VIBRANT)return 1.36}return 1}});return ie(super.surfaceDim(),"2025",t)}surfaceBright(){let t=A.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?18:le.isYellow(e.neutralPalette.hue)?99:e.variant===b.VIBRANT?97:98,isBackground:true,chromaMultiplier:e=>{if(e.isDark){if(e.variant===b.NEUTRAL)return 2.5;if(e.variant===b.TONAL_SPOT)return 1.7;if(e.variant===b.EXPRESSIVE)return le.isYellow(e.neutralPalette.hue)?2.7:1.75;if(e.variant===b.VIBRANT)return 1.36}return 1}});return ie(super.surfaceBright(),"2025",t)}surfaceContainerLowest(){let t=A.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?0:100,isBackground:true});return ie(super.surfaceContainerLowest(),"2025",t)}surfaceContainerLow(){let t=A.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?6:le.isYellow(e.neutralPalette.hue)?98:e.variant===b.VIBRANT?95:96:15,isBackground:true,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===b.NEUTRAL)return 1.3;if(e.variant===b.TONAL_SPOT)return 1.25;if(e.variant===b.EXPRESSIVE)return le.isYellow(e.neutralPalette.hue)?1.3:1.15;if(e.variant===b.VIBRANT)return 1.08}return 1}});return ie(super.surfaceContainerLow(),"2025",t)}surfaceContainer(){let t=A.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?9:le.isYellow(e.neutralPalette.hue)?96:e.variant===b.VIBRANT?92:94:20,isBackground:true,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===b.NEUTRAL)return 1.6;if(e.variant===b.TONAL_SPOT)return 1.4;if(e.variant===b.EXPRESSIVE)return le.isYellow(e.neutralPalette.hue)?1.6:1.3;if(e.variant===b.VIBRANT)return 1.15}return 1}});return ie(super.surfaceContainer(),"2025",t)}surfaceContainerHigh(){let t=A.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?12:le.isYellow(e.neutralPalette.hue)?94:e.variant===b.VIBRANT?90:92:25,isBackground:true,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===b.NEUTRAL)return 1.9;if(e.variant===b.TONAL_SPOT)return 1.5;if(e.variant===b.EXPRESSIVE)return le.isYellow(e.neutralPalette.hue)?1.95:1.45;if(e.variant===b.VIBRANT)return 1.22}return 1}});return ie(super.surfaceContainerHigh(),"2025",t)}surfaceContainerHighest(){let t=A.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?15:le.isYellow(e.neutralPalette.hue)?92:e.variant===b.VIBRANT?88:90,isBackground:true,chromaMultiplier:e=>e.variant===b.NEUTRAL?2.2:e.variant===b.TONAL_SPOT?1.7:e.variant===b.EXPRESSIVE?le.isYellow(e.neutralPalette.hue)?2.3:1.6:e.variant===b.VIBRANT?1.29:1});return ie(super.surfaceContainerHighest(),"2025",t)}onSurface(){let t=A.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.variant===b.VIBRANT?Ce(e.neutralPalette,0,100,1.1):A.getInitialToneFromBackground(a=>a.platform==="phone"?this.highestSurface(a):this.surfaceContainerHigh())(e),chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===b.NEUTRAL)return 2.2;if(e.variant===b.TONAL_SPOT)return 1.7;if(e.variant===b.EXPRESSIVE)return le.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.isDark&&e.platform==="phone"?re(11):re(9)});return ie(super.onSurface(),"2025",t)}onSurfaceVariant(){let t=A.fromPalette({name:"on_surface_variant",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===b.NEUTRAL)return 2.2;if(e.variant===b.TONAL_SPOT)return 1.7;if(e.variant===b.EXPRESSIVE)return le.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?e.isDark?re(6):re(4.5):re(7)});return ie(super.onSurfaceVariant(),"2025",t)}outline(){let t=A.fromPalette({name:"outline",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===b.NEUTRAL)return 2.2;if(e.variant===b.TONAL_SPOT)return 1.7;if(e.variant===b.EXPRESSIVE)return le.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?re(3):re(4.5)});return ie(super.outline(),"2025",t)}outlineVariant(){let t=A.fromPalette({name:"outline_variant",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===b.NEUTRAL)return 2.2;if(e.variant===b.TONAL_SPOT)return 1.7;if(e.variant===b.EXPRESSIVE)return le.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?re(1.5):re(3)});return ie(super.outlineVariant(),"2025",t)}inverseSurface(){let t=A.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?98:4,isBackground:true});return ie(super.inverseSurface(),"2025",t)}inverseOnSurface(){let t=A.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,background:e=>this.inverseSurface(),contrastCurve:e=>re(7)});return ie(super.inverseOnSurface(),"2025",t)}primary(){let t=A.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>e.variant===b.NEUTRAL?e.platform==="phone"?e.isDark?80:40:90:e.variant===b.TONAL_SPOT?e.platform==="phone"?e.isDark?80:Ce(e.primaryPalette):Ce(e.primaryPalette,0,90):e.variant===b.EXPRESSIVE?e.platform==="phone"?Ce(e.primaryPalette,0,le.isYellow(e.primaryPalette.hue)?25:le.isCyan(e.primaryPalette.hue)?88:98):Ce(e.primaryPalette):e.platform==="phone"?Ce(e.primaryPalette,0,le.isCyan(e.primaryPalette.hue)?88:98):Ce(e.primaryPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?re(4.5):re(7),toneDeltaPair:e=>e.platform==="phone"?new xe(this.primaryContainer(),this.primary(),5,"relative_lighter",true,"farther"):void 0});return ie(super.primary(),"2025",t)}primaryDim(){return A.fromPalette({name:"primary_dim",palette:t=>t.primaryPalette,tone:t=>t.variant===b.NEUTRAL?85:t.variant===b.TONAL_SPOT?Ce(t.primaryPalette,0,90):Ce(t.primaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>re(4.5),toneDeltaPair:t=>new xe(this.primaryDim(),this.primary(),5,"darker",true,"farther")})}onPrimary(){let t=A.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,background:e=>e.platform==="phone"?this.primary():this.primaryDim(),contrastCurve:e=>e.platform==="phone"?re(6):re(7)});return ie(super.onPrimary(),"2025",t)}primaryContainer(){let t=A.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>e.platform==="watch"?30:e.variant===b.NEUTRAL?e.isDark?30:90:e.variant===b.TONAL_SPOT?e.isDark?Wt(e.primaryPalette,35,93):Ce(e.primaryPalette,0,90):e.variant===b.EXPRESSIVE?e.isDark?Ce(e.primaryPalette,30,93):Ce(e.primaryPalette,78,le.isCyan(e.primaryPalette.hue)?88:90):e.isDark?Wt(e.primaryPalette,66,93):Ce(e.primaryPalette,66,le.isCyan(e.primaryPalette.hue)?88:93),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="phone"?void 0:new xe(this.primaryContainer(),this.primaryDim(),10,"darker",true,"farther"),contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?re(1.5):void 0});return ie(super.primaryContainer(),"2025",t)}onPrimaryContainer(){let t=A.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,background:e=>this.primaryContainer(),contrastCurve:e=>e.platform==="phone"?re(6):re(7)});return ie(super.onPrimaryContainer(),"2025",t)}primaryFixed(){let t=A.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>{let a=Object.assign({},e,{isDark:false,contrastLevel:0});return this.primaryContainer().getTone(a)},isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?re(1.5):void 0});return ie(super.primaryFixed(),"2025",t)}primaryFixedDim(){let t=A.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>this.primaryFixed().getTone(e),isBackground:true,toneDeltaPair:e=>new xe(this.primaryFixedDim(),this.primaryFixed(),5,"darker",true,"exact")});return ie(super.primaryFixedDim(),"2025",t)}onPrimaryFixed(){let t=A.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,background:e=>this.primaryFixedDim(),contrastCurve:e=>re(7)});return ie(super.onPrimaryFixed(),"2025",t)}onPrimaryFixedVariant(){let t=A.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,background:e=>this.primaryFixedDim(),contrastCurve:e=>re(4.5)});return ie(super.onPrimaryFixedVariant(),"2025",t)}inversePrimary(){let t=A.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>Ce(e.primaryPalette),background:e=>this.inverseSurface(),contrastCurve:e=>e.platform==="phone"?re(6):re(7)});return ie(super.inversePrimary(),"2025",t)}secondary(){let t=A.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.platform==="watch"?e.variant===b.NEUTRAL?90:Ce(e.secondaryPalette,0,90):e.variant===b.NEUTRAL?e.isDark?Wt(e.secondaryPalette,0,98):Ce(e.secondaryPalette):e.variant===b.VIBRANT?Ce(e.secondaryPalette,0,e.isDark?90:98):e.isDark?80:Ce(e.secondaryPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?re(4.5):re(7),toneDeltaPair:e=>e.platform==="phone"?new xe(this.secondaryContainer(),this.secondary(),5,"relative_lighter",true,"farther"):void 0});return ie(super.secondary(),"2025",t)}secondaryDim(){return A.fromPalette({name:"secondary_dim",palette:t=>t.secondaryPalette,tone:t=>t.variant===b.NEUTRAL?85:Ce(t.secondaryPalette,0,90),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>re(4.5),toneDeltaPair:t=>new xe(this.secondaryDim(),this.secondary(),5,"darker",true,"farther")})}onSecondary(){let t=A.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,background:e=>e.platform==="phone"?this.secondary():this.secondaryDim(),contrastCurve:e=>e.platform==="phone"?re(6):re(7)});return ie(super.onSecondary(),"2025",t)}secondaryContainer(){let t=A.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>e.platform==="watch"?30:e.variant===b.VIBRANT?e.isDark?Wt(e.secondaryPalette,30,40):Ce(e.secondaryPalette,84,90):e.variant===b.EXPRESSIVE?e.isDark?15:Ce(e.secondaryPalette,90,95):e.isDark?25:90,isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new xe(this.secondaryContainer(),this.secondaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?re(1.5):void 0});return ie(super.secondaryContainer(),"2025",t)}onSecondaryContainer(){let t=A.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,background:e=>this.secondaryContainer(),contrastCurve:e=>e.platform==="phone"?re(6):re(7)});return ie(super.onSecondaryContainer(),"2025",t)}secondaryFixed(){let t=A.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>{let a=Object.assign({},e,{isDark:false,contrastLevel:0});return this.secondaryContainer().getTone(a)},isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?re(1.5):void 0});return ie(super.secondaryFixed(),"2025",t)}secondaryFixedDim(){let t=A.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>this.secondaryFixed().getTone(e),isBackground:true,toneDeltaPair:e=>new xe(this.secondaryFixedDim(),this.secondaryFixed(),5,"darker",true,"exact")});return ie(super.secondaryFixedDim(),"2025",t)}onSecondaryFixed(){let t=A.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,background:e=>this.secondaryFixedDim(),contrastCurve:e=>re(7)});return ie(super.onSecondaryFixed(),"2025",t)}onSecondaryFixedVariant(){let t=A.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,background:e=>this.secondaryFixedDim(),contrastCurve:e=>re(4.5)});return ie(super.onSecondaryFixedVariant(),"2025",t)}tertiary(){let t=A.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>e.platform==="watch"?e.variant===b.TONAL_SPOT?Ce(e.tertiaryPalette,0,90):Ce(e.tertiaryPalette):e.variant===b.EXPRESSIVE||e.variant===b.VIBRANT?Ce(e.tertiaryPalette,0,le.isCyan(e.tertiaryPalette.hue)?88:e.isDark?98:100):e.isDark?Ce(e.tertiaryPalette,0,98):Ce(e.tertiaryPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?re(4.5):re(7),toneDeltaPair:e=>e.platform==="phone"?new xe(this.tertiaryContainer(),this.tertiary(),5,"relative_lighter",true,"farther"):void 0});return ie(super.tertiary(),"2025",t)}tertiaryDim(){return A.fromPalette({name:"tertiary_dim",palette:t=>t.tertiaryPalette,tone:t=>t.variant===b.TONAL_SPOT?Ce(t.tertiaryPalette,0,90):Ce(t.tertiaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>re(4.5),toneDeltaPair:t=>new xe(this.tertiaryDim(),this.tertiary(),5,"darker",true,"farther")})}onTertiary(){let t=A.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,background:e=>e.platform==="phone"?this.tertiary():this.tertiaryDim(),contrastCurve:e=>e.platform==="phone"?re(6):re(7)});return ie(super.onTertiary(),"2025",t)}tertiaryContainer(){let t=A.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>e.platform==="watch"?e.variant===b.TONAL_SPOT?Ce(e.tertiaryPalette,0,90):Ce(e.tertiaryPalette):e.variant===b.NEUTRAL?e.isDark?Ce(e.tertiaryPalette,0,93):Ce(e.tertiaryPalette,0,96):e.variant===b.TONAL_SPOT?Ce(e.tertiaryPalette,0,e.isDark?93:100):e.variant===b.EXPRESSIVE?Ce(e.tertiaryPalette,75,le.isCyan(e.tertiaryPalette.hue)?88:e.isDark?93:100):e.isDark?Ce(e.tertiaryPalette,0,93):Ce(e.tertiaryPalette,72,100),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new xe(this.tertiaryContainer(),this.tertiaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?re(1.5):void 0});return ie(super.tertiaryContainer(),"2025",t)}onTertiaryContainer(){let t=A.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryContainer(),contrastCurve:e=>e.platform==="phone"?re(6):re(7)});return ie(super.onTertiaryContainer(),"2025",t)}tertiaryFixed(){let t=A.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>{let a=Object.assign({},e,{isDark:false,contrastLevel:0});return this.tertiaryContainer().getTone(a)},isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?re(1.5):void 0});return ie(super.tertiaryFixed(),"2025",t)}tertiaryFixedDim(){let t=A.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>this.tertiaryFixed().getTone(e),isBackground:true,toneDeltaPair:e=>new xe(this.tertiaryFixedDim(),this.tertiaryFixed(),5,"darker",true,"exact")});return ie(super.tertiaryFixedDim(),"2025",t)}onTertiaryFixed(){let t=A.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryFixedDim(),contrastCurve:e=>re(7)});return ie(super.onTertiaryFixed(),"2025",t)}onTertiaryFixedVariant(){let t=A.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryFixedDim(),contrastCurve:e=>re(4.5)});return ie(super.onTertiaryFixedVariant(),"2025",t)}error(){let t=A.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.platform==="phone"?e.isDark?Wt(e.errorPalette,0,98):Ce(e.errorPalette):Wt(e.errorPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?re(4.5):re(7),toneDeltaPair:e=>e.platform==="phone"?new xe(this.errorContainer(),this.error(),5,"relative_lighter",true,"farther"):void 0});return ie(super.error(),"2025",t)}errorDim(){return A.fromPalette({name:"error_dim",palette:t=>t.errorPalette,tone:t=>Wt(t.errorPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>re(4.5),toneDeltaPair:t=>new xe(this.errorDim(),this.error(),5,"darker",true,"farther")})}onError(){let t=A.fromPalette({name:"on_error",palette:e=>e.errorPalette,background:e=>e.platform==="phone"?this.error():this.errorDim(),contrastCurve:e=>e.platform==="phone"?re(6):re(7)});return ie(super.onError(),"2025",t)}errorContainer(){let t=A.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.platform==="watch"?30:e.isDark?Wt(e.errorPalette,30,93):Ce(e.errorPalette,0,90),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new xe(this.errorContainer(),this.errorDim(),10,"darker",true,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?re(1.5):void 0});return ie(super.errorContainer(),"2025",t)}onErrorContainer(){let t=A.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,background:e=>this.errorContainer(),contrastCurve:e=>e.platform==="phone"?re(4.5):re(7)});return ie(super.onErrorContainer(),"2025",t)}surfaceVariant(){let t=Object.assign(this.surfaceContainerHighest().clone(),{name:"surface_variant"});return ie(super.surfaceVariant(),"2025",t)}surfaceTint(){let t=Object.assign(this.primary().clone(),{name:"surface_tint"});return ie(super.surfaceTint(),"2025",t)}background(){let t=Object.assign(this.surface().clone(),{name:"background"});return ie(super.background(),"2025",t)}onBackground(){let t=Object.assign(this.onSurface().clone(),{name:"on_background",tone:e=>e.platform==="watch"?100:this.onSurface().getTone(e)});return ie(super.onBackground(),"2025",t)}},F=class G{constructor(){this.allColors=[this.background(),this.onBackground(),this.surface(),this.surfaceDim(),this.surfaceBright(),this.surfaceContainerLowest(),this.surfaceContainerLow(),this.surfaceContainer(),this.surfaceContainerHigh(),this.surfaceContainerHighest(),this.onSurface(),this.onSurfaceVariant(),this.outline(),this.outlineVariant(),this.inverseSurface(),this.inverseOnSurface(),this.primary(),this.primaryDim(),this.onPrimary(),this.primaryContainer(),this.onPrimaryContainer(),this.primaryFixed(),this.primaryFixedDim(),this.onPrimaryFixed(),this.onPrimaryFixedVariant(),this.inversePrimary(),this.secondary(),this.secondaryDim(),this.onSecondary(),this.secondaryContainer(),this.onSecondaryContainer(),this.secondaryFixed(),this.secondaryFixedDim(),this.onSecondaryFixed(),this.onSecondaryFixedVariant(),this.tertiary(),this.tertiaryDim(),this.onTertiary(),this.tertiaryContainer(),this.onTertiaryContainer(),this.tertiaryFixed(),this.tertiaryFixedDim(),this.onTertiaryFixed(),this.onTertiaryFixedVariant(),this.error(),this.errorDim(),this.onError(),this.errorContainer(),this.onErrorContainer()].filter(e=>e!==void 0);}highestSurface(e){return G.colorSpec.highestSurface(e)}primaryPaletteKeyColor(){return G.colorSpec.primaryPaletteKeyColor()}secondaryPaletteKeyColor(){return G.colorSpec.secondaryPaletteKeyColor()}tertiaryPaletteKeyColor(){return G.colorSpec.tertiaryPaletteKeyColor()}neutralPaletteKeyColor(){return G.colorSpec.neutralPaletteKeyColor()}neutralVariantPaletteKeyColor(){return G.colorSpec.neutralVariantPaletteKeyColor()}errorPaletteKeyColor(){return G.colorSpec.errorPaletteKeyColor()}background(){return G.colorSpec.background()}onBackground(){return G.colorSpec.onBackground()}surface(){return G.colorSpec.surface()}surfaceDim(){return G.colorSpec.surfaceDim()}surfaceBright(){return G.colorSpec.surfaceBright()}surfaceContainerLowest(){return G.colorSpec.surfaceContainerLowest()}surfaceContainerLow(){return G.colorSpec.surfaceContainerLow()}surfaceContainer(){return G.colorSpec.surfaceContainer()}surfaceContainerHigh(){return G.colorSpec.surfaceContainerHigh()}surfaceContainerHighest(){return G.colorSpec.surfaceContainerHighest()}onSurface(){return G.colorSpec.onSurface()}surfaceVariant(){return G.colorSpec.surfaceVariant()}onSurfaceVariant(){return G.colorSpec.onSurfaceVariant()}outline(){return G.colorSpec.outline()}outlineVariant(){return G.colorSpec.outlineVariant()}inverseSurface(){return G.colorSpec.inverseSurface()}inverseOnSurface(){return G.colorSpec.inverseOnSurface()}shadow(){return G.colorSpec.shadow()}scrim(){return G.colorSpec.scrim()}surfaceTint(){return G.colorSpec.surfaceTint()}primary(){return G.colorSpec.primary()}primaryDim(){return G.colorSpec.primaryDim()}onPrimary(){return G.colorSpec.onPrimary()}primaryContainer(){return G.colorSpec.primaryContainer()}onPrimaryContainer(){return G.colorSpec.onPrimaryContainer()}inversePrimary(){return G.colorSpec.inversePrimary()}primaryFixed(){return G.colorSpec.primaryFixed()}primaryFixedDim(){return G.colorSpec.primaryFixedDim()}onPrimaryFixed(){return G.colorSpec.onPrimaryFixed()}onPrimaryFixedVariant(){return G.colorSpec.onPrimaryFixedVariant()}secondary(){return G.colorSpec.secondary()}secondaryDim(){return G.colorSpec.secondaryDim()}onSecondary(){return G.colorSpec.onSecondary()}secondaryContainer(){return G.colorSpec.secondaryContainer()}onSecondaryContainer(){return G.colorSpec.onSecondaryContainer()}secondaryFixed(){return G.colorSpec.secondaryFixed()}secondaryFixedDim(){return G.colorSpec.secondaryFixedDim()}onSecondaryFixed(){return G.colorSpec.onSecondaryFixed()}onSecondaryFixedVariant(){return G.colorSpec.onSecondaryFixedVariant()}tertiary(){return G.colorSpec.tertiary()}tertiaryDim(){return G.colorSpec.tertiaryDim()}onTertiary(){return G.colorSpec.onTertiary()}tertiaryContainer(){return G.colorSpec.tertiaryContainer()}onTertiaryContainer(){return G.colorSpec.onTertiaryContainer()}tertiaryFixed(){return G.colorSpec.tertiaryFixed()}tertiaryFixedDim(){return G.colorSpec.tertiaryFixedDim()}onTertiaryFixed(){return G.colorSpec.onTertiaryFixed()}onTertiaryFixedVariant(){return G.colorSpec.onTertiaryFixedVariant()}error(){return G.colorSpec.error()}errorDim(){return G.colorSpec.errorDim()}onError(){return G.colorSpec.onError()}errorContainer(){return G.colorSpec.errorContainer()}onErrorContainer(){return G.colorSpec.onErrorContainer()}static highestSurface(e){return G.colorSpec.highestSurface(e)}};F.contentAccentToneDelta=15;F.colorSpec=new Zl;F.primaryPaletteKeyColor=F.colorSpec.primaryPaletteKeyColor();F.secondaryPaletteKeyColor=F.colorSpec.secondaryPaletteKeyColor();F.tertiaryPaletteKeyColor=F.colorSpec.tertiaryPaletteKeyColor();F.neutralPaletteKeyColor=F.colorSpec.neutralPaletteKeyColor();F.neutralVariantPaletteKeyColor=F.colorSpec.neutralVariantPaletteKeyColor();F.background=F.colorSpec.background();F.onBackground=F.colorSpec.onBackground();F.surface=F.colorSpec.surface();F.surfaceDim=F.colorSpec.surfaceDim();F.surfaceBright=F.colorSpec.surfaceBright();F.surfaceContainerLowest=F.colorSpec.surfaceContainerLowest();F.surfaceContainerLow=F.colorSpec.surfaceContainerLow();F.surfaceContainer=F.colorSpec.surfaceContainer();F.surfaceContainerHigh=F.colorSpec.surfaceContainerHigh();F.surfaceContainerHighest=F.colorSpec.surfaceContainerHighest();F.onSurface=F.colorSpec.onSurface();F.surfaceVariant=F.colorSpec.surfaceVariant();F.onSurfaceVariant=F.colorSpec.onSurfaceVariant();F.inverseSurface=F.colorSpec.inverseSurface();F.inverseOnSurface=F.colorSpec.inverseOnSurface();F.outline=F.colorSpec.outline();F.outlineVariant=F.colorSpec.outlineVariant();F.shadow=F.colorSpec.shadow();F.scrim=F.colorSpec.scrim();F.surfaceTint=F.colorSpec.surfaceTint();F.primary=F.colorSpec.primary();F.onPrimary=F.colorSpec.onPrimary();F.primaryContainer=F.colorSpec.primaryContainer();F.onPrimaryContainer=F.colorSpec.onPrimaryContainer();F.inversePrimary=F.colorSpec.inversePrimary();F.secondary=F.colorSpec.secondary();F.onSecondary=F.colorSpec.onSecondary();F.secondaryContainer=F.colorSpec.secondaryContainer();F.onSecondaryContainer=F.colorSpec.onSecondaryContainer();F.tertiary=F.colorSpec.tertiary();F.onTertiary=F.colorSpec.onTertiary();F.tertiaryContainer=F.colorSpec.tertiaryContainer();F.onTertiaryContainer=F.colorSpec.onTertiaryContainer();F.error=F.colorSpec.error();F.onError=F.colorSpec.onError();F.errorContainer=F.colorSpec.errorContainer();F.onErrorContainer=F.colorSpec.onErrorContainer();F.primaryFixed=F.colorSpec.primaryFixed();F.primaryFixedDim=F.colorSpec.primaryFixedDim();F.onPrimaryFixed=F.colorSpec.onPrimaryFixed();F.onPrimaryFixedVariant=F.colorSpec.onPrimaryFixedVariant();F.secondaryFixed=F.colorSpec.secondaryFixed();F.secondaryFixedDim=F.colorSpec.secondaryFixedDim();F.onSecondaryFixed=F.colorSpec.onSecondaryFixed();F.onSecondaryFixedVariant=F.colorSpec.onSecondaryFixedVariant();F.tertiaryFixed=F.colorSpec.tertiaryFixed();F.tertiaryFixedDim=F.colorSpec.tertiaryFixedDim();F.onTertiaryFixed=F.colorSpec.onTertiaryFixed();F.onTertiaryFixedVariant=F.colorSpec.onTertiaryFixedVariant();var je=class rn{static maybeFallbackSpecVersion(e,a){switch(a){case b.EXPRESSIVE:case b.VIBRANT:case b.TONAL_SPOT:case b.NEUTRAL:return e;default:return "2021"}}constructor(e){this.sourceColorArgb=e.sourceColorHct.toInt(),this.variant=e.variant,this.contrastLevel=e.contrastLevel,this.isDark=e.isDark,this.platform=e.platform??"phone",this.specVersion=rn.maybeFallbackSpecVersion(e.specVersion??"2021",this.variant),this.sourceColorHct=e.sourceColorHct,this.primaryPalette=e.primaryPalette??Dr(this.specVersion).getPrimaryPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.secondaryPalette=e.secondaryPalette??Dr(this.specVersion).getSecondaryPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.tertiaryPalette=e.tertiaryPalette??Dr(this.specVersion).getTertiaryPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralPalette=e.neutralPalette??Dr(this.specVersion).getNeutralPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralVariantPalette=e.neutralVariantPalette??Dr(this.specVersion).getNeutralVariantPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.errorPalette=e.errorPalette??Dr(this.specVersion).getErrorPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel)??z.fromHueAndChroma(25,84),this.colors=new F;}toString(){return `Scheme: variant=${b[this.variant]}, mode=${this.isDark?"dark":"light"}, platform=${this.platform}, contrastLevel=${this.contrastLevel.toFixed(1)}, seed=${this.sourceColorHct.toString()}, specVersion=${this.specVersion}`}static getPiecewiseHue(e,a,n){let i=Math.min(a.length-1,n.length),l=e.hue;for(let c=0;c<i;c++)if(l>=a[c]&&l<a[c+1])return lt(n[c]);return l}static getRotatedHue(e,a,n){let i=rn.getPiecewiseHue(e,a,n);return Math.min(a.length-1,n.length)<=0&&(i=0),lt(e.hue+i)}getArgb(e){return e.getArgb(this)}getHct(e){return e.getHct(this)}get primaryPaletteKeyColor(){return this.getArgb(this.colors.primaryPaletteKeyColor())}get secondaryPaletteKeyColor(){return this.getArgb(this.colors.secondaryPaletteKeyColor())}get tertiaryPaletteKeyColor(){return this.getArgb(this.colors.tertiaryPaletteKeyColor())}get neutralPaletteKeyColor(){return this.getArgb(this.colors.neutralPaletteKeyColor())}get neutralVariantPaletteKeyColor(){return this.getArgb(this.colors.neutralVariantPaletteKeyColor())}get errorPaletteKeyColor(){return this.getArgb(this.colors.errorPaletteKeyColor())}get background(){return this.getArgb(this.colors.background())}get onBackground(){return this.getArgb(this.colors.onBackground())}get surface(){return this.getArgb(this.colors.surface())}get surfaceDim(){return this.getArgb(this.colors.surfaceDim())}get surfaceBright(){return this.getArgb(this.colors.surfaceBright())}get surfaceContainerLowest(){return this.getArgb(this.colors.surfaceContainerLowest())}get surfaceContainerLow(){return this.getArgb(this.colors.surfaceContainerLow())}get surfaceContainer(){return this.getArgb(this.colors.surfaceContainer())}get surfaceContainerHigh(){return this.getArgb(this.colors.surfaceContainerHigh())}get surfaceContainerHighest(){return this.getArgb(this.colors.surfaceContainerHighest())}get onSurface(){return this.getArgb(this.colors.onSurface())}get surfaceVariant(){return this.getArgb(this.colors.surfaceVariant())}get onSurfaceVariant(){return this.getArgb(this.colors.onSurfaceVariant())}get inverseSurface(){return this.getArgb(this.colors.inverseSurface())}get inverseOnSurface(){return this.getArgb(this.colors.inverseOnSurface())}get outline(){return this.getArgb(this.colors.outline())}get outlineVariant(){return this.getArgb(this.colors.outlineVariant())}get shadow(){return this.getArgb(this.colors.shadow())}get scrim(){return this.getArgb(this.colors.scrim())}get surfaceTint(){return this.getArgb(this.colors.surfaceTint())}get primary(){return this.getArgb(this.colors.primary())}get primaryDim(){let e=this.colors.primaryDim();if(e===void 0)throw new Error("`primaryDim` color is undefined prior to 2025 spec.");return this.getArgb(e)}get onPrimary(){return this.getArgb(this.colors.onPrimary())}get primaryContainer(){return this.getArgb(this.colors.primaryContainer())}get onPrimaryContainer(){return this.getArgb(this.colors.onPrimaryContainer())}get primaryFixed(){return this.getArgb(this.colors.primaryFixed())}get primaryFixedDim(){return this.getArgb(this.colors.primaryFixedDim())}get onPrimaryFixed(){return this.getArgb(this.colors.onPrimaryFixed())}get onPrimaryFixedVariant(){return this.getArgb(this.colors.onPrimaryFixedVariant())}get inversePrimary(){return this.getArgb(this.colors.inversePrimary())}get secondary(){return this.getArgb(this.colors.secondary())}get secondaryDim(){let e=this.colors.secondaryDim();if(e===void 0)throw new Error("`secondaryDim` color is undefined prior to 2025 spec.");return this.getArgb(e)}get onSecondary(){return this.getArgb(this.colors.onSecondary())}get secondaryContainer(){return this.getArgb(this.colors.secondaryContainer())}get onSecondaryContainer(){return this.getArgb(this.colors.onSecondaryContainer())}get secondaryFixed(){return this.getArgb(this.colors.secondaryFixed())}get secondaryFixedDim(){return this.getArgb(this.colors.secondaryFixedDim())}get onSecondaryFixed(){return this.getArgb(this.colors.onSecondaryFixed())}get onSecondaryFixedVariant(){return this.getArgb(this.colors.onSecondaryFixedVariant())}get tertiary(){return this.getArgb(this.colors.tertiary())}get tertiaryDim(){let e=this.colors.tertiaryDim();if(e===void 0)throw new Error("`tertiaryDim` color is undefined prior to 2025 spec.");return this.getArgb(e)}get onTertiary(){return this.getArgb(this.colors.onTertiary())}get tertiaryContainer(){return this.getArgb(this.colors.tertiaryContainer())}get onTertiaryContainer(){return this.getArgb(this.colors.onTertiaryContainer())}get tertiaryFixed(){return this.getArgb(this.colors.tertiaryFixed())}get tertiaryFixedDim(){return this.getArgb(this.colors.tertiaryFixedDim())}get onTertiaryFixed(){return this.getArgb(this.colors.onTertiaryFixed())}get onTertiaryFixedVariant(){return this.getArgb(this.colors.onTertiaryFixedVariant())}get error(){return this.getArgb(this.colors.error())}get errorDim(){let e=this.colors.errorDim();if(e===void 0)throw new Error("`errorDim` color is undefined prior to 2025 spec.");return this.getArgb(e)}get onError(){return this.getArgb(this.colors.onError())}get errorContainer(){return this.getArgb(this.colors.errorContainer())}get onErrorContainer(){return this.getArgb(this.colors.onErrorContainer())}};je.DEFAULT_SPEC_VERSION="2021";je.DEFAULT_PLATFORM="phone";var qo=class{getPrimaryPalette(t,e,a,n,i){switch(t){case b.CONTENT:case b.FIDELITY:return z.fromHueAndChroma(e.hue,e.chroma);case b.FRUIT_SALAD:return z.fromHueAndChroma(lt(e.hue-50),48);case b.MONOCHROME:return z.fromHueAndChroma(e.hue,0);case b.NEUTRAL:return z.fromHueAndChroma(e.hue,12);case b.RAINBOW:return z.fromHueAndChroma(e.hue,48);case b.TONAL_SPOT:return z.fromHueAndChroma(e.hue,36);case b.EXPRESSIVE:return z.fromHueAndChroma(lt(e.hue+240),40);case b.VIBRANT:return z.fromHueAndChroma(e.hue,200);default:throw new Error(`Unsupported variant: ${t}`)}}getSecondaryPalette(t,e,a,n,i){switch(t){case b.CONTENT:case b.FIDELITY:return z.fromHueAndChroma(e.hue,Math.max(e.chroma-32,e.chroma*.5));case b.FRUIT_SALAD:return z.fromHueAndChroma(lt(e.hue-50),36);case b.MONOCHROME:return z.fromHueAndChroma(e.hue,0);case b.NEUTRAL:return z.fromHueAndChroma(e.hue,8);case b.RAINBOW:return z.fromHueAndChroma(e.hue,16);case b.TONAL_SPOT:return z.fromHueAndChroma(e.hue,16);case b.EXPRESSIVE:return z.fromHueAndChroma(je.getRotatedHue(e,[0,21,51,121,151,191,271,321,360],[45,95,45,20,45,90,45,45,45]),24);case b.VIBRANT:return z.fromHueAndChroma(je.getRotatedHue(e,[0,41,61,101,131,181,251,301,360],[18,15,10,12,15,18,15,12,12]),24);default:throw new Error(`Unsupported variant: ${t}`)}}getTertiaryPalette(t,e,a,n,i){switch(t){case b.CONTENT:return z.fromHct(tn.fixIfDisliked(new bo(e).analogous(3,6)[2]));case b.FIDELITY:return z.fromHct(tn.fixIfDisliked(new bo(e).complement));case b.FRUIT_SALAD:return z.fromHueAndChroma(e.hue,36);case b.MONOCHROME:return z.fromHueAndChroma(e.hue,0);case b.NEUTRAL:return z.fromHueAndChroma(e.hue,16);case b.RAINBOW:case b.TONAL_SPOT:return z.fromHueAndChroma(lt(e.hue+60),24);case b.EXPRESSIVE:return z.fromHueAndChroma(je.getRotatedHue(e,[0,21,51,121,151,191,271,321,360],[120,120,20,45,20,15,20,120,120]),32);case b.VIBRANT:return z.fromHueAndChroma(je.getRotatedHue(e,[0,41,61,101,131,181,251,301,360],[35,30,20,25,30,35,30,25,25]),32);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralPalette(t,e,a,n,i){switch(t){case b.CONTENT:case b.FIDELITY:return z.fromHueAndChroma(e.hue,e.chroma/8);case b.FRUIT_SALAD:return z.fromHueAndChroma(e.hue,10);case b.MONOCHROME:return z.fromHueAndChroma(e.hue,0);case b.NEUTRAL:return z.fromHueAndChroma(e.hue,2);case b.RAINBOW:return z.fromHueAndChroma(e.hue,0);case b.TONAL_SPOT:return z.fromHueAndChroma(e.hue,6);case b.EXPRESSIVE:return z.fromHueAndChroma(lt(e.hue+15),8);case b.VIBRANT:return z.fromHueAndChroma(e.hue,10);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralVariantPalette(t,e,a,n,i){switch(t){case b.CONTENT:return z.fromHueAndChroma(e.hue,e.chroma/8+4);case b.FIDELITY:return z.fromHueAndChroma(e.hue,e.chroma/8+4);case b.FRUIT_SALAD:return z.fromHueAndChroma(e.hue,16);case b.MONOCHROME:return z.fromHueAndChroma(e.hue,0);case b.NEUTRAL:return z.fromHueAndChroma(e.hue,2);case b.RAINBOW:return z.fromHueAndChroma(e.hue,0);case b.TONAL_SPOT:return z.fromHueAndChroma(e.hue,8);case b.EXPRESSIVE:return z.fromHueAndChroma(lt(e.hue+15),12);case b.VIBRANT:return z.fromHueAndChroma(e.hue,12);default:throw new Error(`Unsupported variant: ${t}`)}}getErrorPalette(t,e,a,n,i){}},Jl=class Ct extends qo{getPrimaryPalette(e,a,n,i,l){switch(e){case b.NEUTRAL:return z.fromHueAndChroma(a.hue,i==="phone"?le.isBlue(a.hue)?12:8:le.isBlue(a.hue)?16:12);case b.TONAL_SPOT:return z.fromHueAndChroma(a.hue,i==="phone"&&n?26:32);case b.EXPRESSIVE:return z.fromHueAndChroma(a.hue,i==="phone"?n?36:48:40);case b.VIBRANT:return z.fromHueAndChroma(a.hue,i==="phone"?74:56);default:return super.getPrimaryPalette(e,a,n,i,l)}}getSecondaryPalette(e,a,n,i,l){switch(e){case b.NEUTRAL:return z.fromHueAndChroma(a.hue,i==="phone"?le.isBlue(a.hue)?6:4:le.isBlue(a.hue)?10:6);case b.TONAL_SPOT:return z.fromHueAndChroma(a.hue,16);case b.EXPRESSIVE:return z.fromHueAndChroma(je.getRotatedHue(a,[0,105,140,204,253,278,300,333,360],[-160,155,-100,96,-96,-156,-165,-160]),i==="phone"&&n?16:24);case b.VIBRANT:return z.fromHueAndChroma(je.getRotatedHue(a,[0,38,105,140,333,360],[-14,10,-14,10,-14]),i==="phone"?56:36);default:return super.getSecondaryPalette(e,a,n,i,l)}}getTertiaryPalette(e,a,n,i,l){switch(e){case b.NEUTRAL:return z.fromHueAndChroma(je.getRotatedHue(a,[0,38,105,161,204,278,333,360],[-32,26,10,-39,24,-15,-32]),i==="phone"?20:36);case b.TONAL_SPOT:return z.fromHueAndChroma(je.getRotatedHue(a,[0,20,71,161,333,360],[-40,48,-32,40,-32]),i==="phone"?28:32);case b.EXPRESSIVE:return z.fromHueAndChroma(je.getRotatedHue(a,[0,105,140,204,253,278,300,333,360],[-165,160,-105,101,-101,-160,-170,-165]),48);case b.VIBRANT:return z.fromHueAndChroma(je.getRotatedHue(a,[0,38,71,105,140,161,253,333,360],[-72,35,24,-24,62,50,62,-72]),56);default:return super.getTertiaryPalette(e,a,n,i,l)}}static getExpressiveNeutralHue(e){return je.getRotatedHue(e,[0,71,124,253,278,300,360],[10,0,10,0,10,0])}static getExpressiveNeutralChroma(e,a,n){let i=Ct.getExpressiveNeutralHue(e);return n==="phone"?a?le.isYellow(i)?6:14:18:12}static getVibrantNeutralHue(e){return je.getRotatedHue(e,[0,38,105,140,333,360],[-14,10,-14,10,-14])}static getVibrantNeutralChroma(e,a){let n=Ct.getVibrantNeutralHue(e);return a==="phone"||le.isBlue(n)?28:20}getNeutralPalette(e,a,n,i,l){switch(e){case b.NEUTRAL:return z.fromHueAndChroma(a.hue,i==="phone"?1.4:6);case b.TONAL_SPOT:return z.fromHueAndChroma(a.hue,i==="phone"?5:10);case b.EXPRESSIVE:return z.fromHueAndChroma(Ct.getExpressiveNeutralHue(a),Ct.getExpressiveNeutralChroma(a,n,i));case b.VIBRANT:return z.fromHueAndChroma(Ct.getVibrantNeutralHue(a),Ct.getVibrantNeutralChroma(a,i));default:return super.getNeutralPalette(e,a,n,i,l)}}getNeutralVariantPalette(e,a,n,i,l){switch(e){case b.NEUTRAL:return z.fromHueAndChroma(a.hue,(i==="phone"?1.4:6)*2.2);case b.TONAL_SPOT:return z.fromHueAndChroma(a.hue,(i==="phone"?5:10)*1.7);case b.EXPRESSIVE:let c=Ct.getExpressiveNeutralHue(a),d=Ct.getExpressiveNeutralChroma(a,n,i);return z.fromHueAndChroma(c,d*(c>=105&&c<125?1.6:2.3));case b.VIBRANT:let p=Ct.getVibrantNeutralHue(a),f=Ct.getVibrantNeutralChroma(a,i);return z.fromHueAndChroma(p,f*1.29);default:return super.getNeutralVariantPalette(e,a,n,i,l)}}getErrorPalette(e,a,n,i,l){let c=je.getPiecewiseHue(a,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);switch(e){case b.NEUTRAL:return z.fromHueAndChroma(c,i==="phone"?50:40);case b.TONAL_SPOT:return z.fromHueAndChroma(c,i==="phone"?60:48);case b.EXPRESSIVE:return z.fromHueAndChroma(c,i==="phone"?64:48);case b.VIBRANT:return z.fromHueAndChroma(c,i==="phone"?80:60);default:return super.getErrorPalette(e,a,n,i,l)}}},Ql=new qo,eh=new Jl;function Dr(t){return t==="2025"?eh:Ql}var th=class extends je{constructor(t,e,a,n=je.DEFAULT_SPEC_VERSION,i=je.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:b.VIBRANT,contrastLevel:a,isDark:e,platform:i,specVersion:n});}};function rh(t){let e=fn(t),a=pn(t),n=gn(t),i=[e.toString(16),a.toString(16),n.toString(16)];for(let[l,c]of i.entries())c.length===1&&(i[l]="0"+c);return "#"+i.join("")}function ah(t){t=t.replace("#","");let e=t.length===3,a=t.length===6,n=t.length===8;if(!e&&!a&&!n)throw new Error("unexpected hex "+t);let i=0,l=0,c=0;return e?(i=Et(t.slice(0,1).repeat(2)),l=Et(t.slice(1,2).repeat(2)),c=Et(t.slice(2,3).repeat(2))):a?(i=Et(t.slice(0,2)),l=Et(t.slice(2,4)),c=Et(t.slice(4,6))):n&&(i=Et(t.slice(2,4)),l=Et(t.slice(4,6)),c=Et(t.slice(6,8))),(255<<24|(i&255)<<16|(l&255)<<8|c&255)>>>0}function Et(t){return parseInt(t,16)}function nh(t,e){let a=le.fromInt(ah(t)),n=new th(a,e,0),i={},l=["primary","onPrimary","primaryContainer","onPrimaryContainer","secondary","onSecondary","secondaryContainer","onSecondaryContainer","tertiary","onTertiary","tertiaryContainer","onTertiaryContainer","error","onError","errorContainer","onErrorContainer","background","onBackground","surface","onSurface","surfaceVariant","onSurfaceVariant","outline","outlineVariant","shadow","scrim","inverseSurface","inverseOnSurface","inversePrimary","surfaceDim","surfaceBright","surfaceContainerLowest","surfaceContainerLow","surfaceContainer","surfaceContainerHigh","surfaceContainerHighest"];for(let c of l){let d=F[c];d&&(i[c]=rh(d.getArgb(n)));}return i}function Ur(t,e){let a=t.replace("#",""),n=parseInt(a.substring(0,2),16),i=parseInt(a.substring(2,4),16),l=parseInt(a.substring(4,6),16);return `rgba(${n}, ${i}, ${l}, ${e})`}var oh=createContext(null),ih=nh("#6750A4",false),sh=()=>useContext(oh)||{themeColors:ih,systemTheme:"auto",setThemeColors:()=>{throw new Error("[@zaide6137/m3-components-web] Wrap your app in <ThemeProvider>.")},setColorScheme:()=>{throw new Error("[@zaide6137/m3-components-web] Wrap your app in <ThemeProvider>.")}},uh=forwardRef((t,e)=>{let{className:a,shape:n,type:i,hoverEffect:l=true,text:c,icon:d,onClick:p,disabled:f,loading:y=false}=t,{themeColors:P}=sh(),k=f?i==="filled"?{backgroundColor:Ur(P.onSurface,.12),color:Ur(P.onSurface,.38),border:"none"}:{backgroundColor:"transparent",color:Ur(P.onSurface,.38),border:`1px solid ${Ur(P.onSurface,.12)}`}:i==="filled"?{backgroundColor:P.primary,color:P.onPrimary,border:"none"}:{backgroundColor:"transparent",color:P.primary,border:`1px solid ${P.primary}`},v=40,m=n==="rounded-full"?32:n==="rounded-lg"?12:n==="rounded-md"?8:4;return jsx(motion.button,{disabled:f||y,onClick:!f&&!y?p:void 0,className:`${a||""} m3-components-button`,style:{backgroundColor:k.backgroundColor,color:k.color,border:k.border,borderRadius:"40px"},initial:{borderRadius:v},animate:{borderRadius:v},whileHover:!f&&!y&&l?{borderRadius:m,backgroundColor:i==="outlined"?Ur(P.primary,.08):P.primary}:{},transition:{ease:["easeIn","easeOut"],duration:.2},children:jsxs("div",{className:"m3-components-button-content",children:[y&&jsx("span",{style:{marginRight:"4px"},children:"... "}),d&&jsx("span",{className:"m3-components-button-icon",children:d}),jsx("span",{className:"m3-components-button-text",children:c})]})})}),ch=({date:t,onPrev:e,onNext:a,onToday:n,view:i,onViewChange:l})=>{let{themeColors:c}=Uo(),[d,p]=useState(false),f=(0, Co.default)(),y=f.format("MMM").toUpperCase(),P=f.format("DD"),k=(0, Co.default)(t).format("MMMM YYYY"),v=Math.ceil(f.date()/7),m=i.charAt(0).toUpperCase()+i.slice(1);return jsxs("div",{className:"m3-components-bigcalendar-toolbar",children:[jsxs("div",{className:"m3-components-bigcalendar-toolbar-w1",children:[jsxs("div",{className:"m3-components-bigcalendar-toolbar-date-box",style:{backgroundColor:c.surfaceContainerLowest,borderColor:c.outlineVariant},children:[jsx("div",{className:"m3-components-bigcalendar-toolbar-w2",style:{backgroundColor:c.primary},children:jsx("span",{className:"m3-components-bigcalendar-toolbar-date-month",style:{color:c.onPrimary},children:y})}),jsx("span",{className:"m3-components-bigcalendar-toolbar-date-day",style:{color:c.onSurface},children:P})]}),jsxs("div",{className:"m3-components-bigcalendar-toolbar-w3",children:[jsx("div",{className:"m3-components-bigcalendar-toolbar-w4",children:jsx("div",{className:"m3-components-bigcalendar-toolbar-w5",children:jsx("h1",{className:"m3-components-bigcalendar-toolbar-title",style:{color:c.onSurface},children:k})})}),jsxs("span",{className:"m3-components-bigcalendar-toolbar-week-badge",style:{color:c.onSurfaceVariant,borderColor:c.outlineVariant},children:["Week ",v]})]})]}),jsxs("div",{className:"m3-components-bigcalendar-toolbar-w6",children:[jsxs("div",{className:"m3-components-bigcalendar-toolbar-nav-group",style:{borderColor:c.outlineVariant},children:[jsx("button",{onClick:e,className:"m3-components-bigcalendar-toolbar-nav-prev",style:{borderColor:c.outlineVariant,color:c.onSurface},children:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"m3-components-bigcalendar-toolbar-nav-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),jsx("button",{onClick:n,className:"m3-components-bigcalendar-toolbar-nav-today",style:{color:c.onSurface},children:"Today"}),jsx("button",{onClick:a,className:"m3-components-bigcalendar-toolbar-nav-next",style:{borderColor:c.outlineVariant,color:c.onSurface},children:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"m3-components-bigcalendar-toolbar-nav-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})})]}),jsxs("div",{className:"m3-components-bigcalendar-toolbar-w7",children:[jsxs("button",{onClick:()=>p(!d),className:"m3-components-bigcalendar-toolbar-dropdown-btn",style:{borderColor:c.outlineVariant,color:c.onSurface},children:[jsx("span",{className:"m3-components-bigcalendar-toolbar-dropdown-label",children:"View by:"}),m,jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:`m3-components-bigcalendar-toolbar-dropdown-icon ${d?"rotate-180":""}`,children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})]}),jsx(AnimatePresence,{children:d&&jsxs(Fragment,{children:[jsx("div",{className:"m3-components-bigcalendar-toolbar-dropdown-backdrop",onClick:()=>p(false)}),jsx(motion.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.15},className:"m3-components-bigcalendar-toolbar-dropdown-menu",style:{backgroundColor:c.surfaceContainerHigh,borderColor:c.outlineVariant},children:["month","week","day"].map(g=>jsx("button",{onClick:()=>{l(g),p(false);},className:"m3-components-bigcalendar-toolbar-dropdown-item",style:{color:i===g?c.primary:c.onSurface},children:g.charAt(0).toUpperCase()+g.slice(1)},g))})]})})]}),jsx(uh,{type:"filled",shape:"rounded-lg",text:"+ Create",onClick:()=>{}})]})]})},lh=({event:t,onMouseEnter:e,onMouseLeave:a})=>{let n=t.resource,i=n.eventStyleFilled??true,l=n.eventStyle||{backgroundColor:n.eventSeedColor||"#6750A4",contentColor:"#FFFFFF"},c=i?l.backgroundColor:Ol(l.backgroundColor,.15),d=i?"transparent":l.backgroundColor,p=i?l.contentColor:l.backgroundColor,f=useRef(null),[y,P]=useState(1e3);useEffect(()=>{if(!f.current)return;let m=new ResizeObserver(g=>{window.requestAnimationFrame(()=>{g[0]&&P(g[0].contentRect.width);});});return m.observe(f.current),()=>m.disconnect()},[]);let k=y<120,v=y>=180;return jsx("div",{ref:f,className:"m3-components-bigcalendar-event",children:k?jsx(motion.div,{className:"m3-components-bigcalendar-event-dot",onMouseEnter:m=>e(m,n),onMouseLeave:a,style:{backgroundColor:c,borderColor:d==="transparent"?l.backgroundColor:d}}):jsx(motion.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},onMouseEnter:m=>e(m,n),onMouseLeave:a,className:"m3-components-bigcalendar-event-chip",style:{backgroundColor:c,color:p,border:i?"none":`1.5px solid ${d}`},children:jsxs("div",{className:"m3-components-bigcalendar-event-content",children:[jsx("span",{className:"m3-components-bigcalendar-event-title",children:t.title}),v&&jsxs("span",{className:"m3-components-bigcalendar-event-time",children:[t.start.toLocaleString("en-US",{hour:"numeric",minute:"2-digit",hour12:true}),t.end&&t.end instanceof Date&&!isNaN(t.end.getTime())&&` - ${t.end.toLocaleString("en-US",{hour:"numeric",minute:"2-digit",hour12:true})}`]}),n.eventTrailingIcon&&jsx("div",{className:"",style:{color:p},children:n.eventTrailingIcon})]})})})};function it(t){return t<0?-1:t===0?0:1}function Xr(t,e,a){return (1-a)*t+a*e}function hh(t,e,a){return a<t?t:a>e?e:a}function Je(t,e,a){return a<t?t:a>e?e:a}function Do(t){return t=t%360,t<0&&(t=t+360),t}function ht(t){return t=t%360,t<0&&(t=t+360),t}function an(t,e){let a=t[0]*e[0][0]+t[1]*e[0][1]+t[2]*e[0][2],n=t[0]*e[1][0]+t[1]*e[1][1]+t[2]*e[1][2],i=t[0]*e[2][0]+t[1]*e[2][1]+t[2]*e[2][2];return [a,n,i]}var Go=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],dh=[[3.2413774792388685,-1.5376652402851851,-0.49885366846268053],[-0.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-0.20395524564742123,1.0571799111220335]],Xo=[95.047,100,108.883];function yn(t,e,a){return (255<<24|(t&255)<<16|(e&255)<<8|a&255)>>>0}function To(t){let e=mr(t[0]),a=mr(t[1]),n=mr(t[2]);return yn(e,a,n)}function Pn(t){return t>>16&255}function Cn(t){return t>>8&255}function vn(t){return t&255}function mh(t,e,a){let n=dh,i=n[0][0]*t+n[0][1]*e+n[0][2]*a,l=n[1][0]*t+n[1][1]*e+n[1][2]*a,c=n[2][0]*t+n[2][1]*e+n[2][2]*a,d=mr(i),p=mr(l),f=mr(c);return yn(d,p,f)}function fh(t){let e=Vt(Pn(t)),a=Vt(Cn(t)),n=Vt(vn(t));return an([e,a,n],Go)}function ph(t){let e=Vt(Pn(t)),a=Vt(Cn(t)),n=Vt(vn(t)),i=Go,l=i[0][0]*e+i[0][1]*a+i[0][2]*n,c=i[1][0]*e+i[1][1]*a+i[1][2]*n,d=i[2][0]*e+i[2][1]*a+i[2][2]*n,p=Xo,f=l/p[0],y=c/p[1],P=d/p[2],k=Zr(f),v=Zr(y),m=Zr(P),g=116*v-16,S=500*(k-v),E=200*(v-m);return [g,S,E]}function gh(t){let e=er(t),a=mr(e);return yn(a,a,a)}function Mo(t){let e=fh(t)[1];return 116*Zr(e/100)-16}function er(t){return 100*Ph((t+16)/116)}function nn(t){return Zr(t/100)*116-16}function Vt(t){let e=t/255;return e<=.040449936?e/12.92*100:Math.pow((e+.055)/1.055,2.4)*100}function mr(t){let e=t/100,a=0;return e<=.0031308?a=e*12.92:a=1.055*Math.pow(e,1/2.4)-.055,hh(0,255,Math.round(a*255))}function yh(){return Xo}function Zr(t){let e=.008856451679035631,a=24389/27;return t>e?Math.pow(t,1/3):(a*t+16)/116}function Ph(t){let e=.008856451679035631,a=24389/27,n=t*t*t;return n>e?n:(116*t-16)/a}var tr=class Zo{static make(e=yh(),a=200/Math.PI*er(50)/100,n=50,i=2,l=false){let c=e,d=c[0]*.401288+c[1]*.650173+c[2]*-0.051461,p=c[0]*-0.250268+c[1]*1.204414+c[2]*.045854,f=c[0]*-2079e-6+c[1]*.048952+c[2]*.953127,y=.8+i/10,P=y>=.9?Xr(.59,.69,(y-.9)*10):Xr(.525,.59,(y-.8)*10),k=l?1:y*(1-1/3.6*Math.exp((-a-42)/92));k=k>1?1:k<0?0:k;let v=y,m=[k*(100/d)+1-k,k*(100/p)+1-k,k*(100/f)+1-k],g=1/(5*a+1),S=g*g*g*g,E=1-S,V=S*a+.1*E*E*Math.cbrt(5*a),R=er(n)/e[1],W=1.48+Math.sqrt(R),L=.725/Math.pow(R,.2),$=L,H=[Math.pow(V*m[0]*d/100,.42),Math.pow(V*m[1]*p/100,.42),Math.pow(V*m[2]*f/100,.42)],N=[400*H[0]/(H[0]+27.13),400*H[1]/(H[1]+27.13),400*H[2]/(H[2]+27.13)],I=(2*N[0]+N[1]+.05*N[2])*L;return new Zo(R,I,L,$,P,v,m,V,Math.pow(V,.25),W)}constructor(e,a,n,i,l,c,d,p,f,y){this.n=e,this.aw=a,this.nbb=n,this.ncb=i,this.c=l,this.nc=c,this.rgbD=d,this.fl=p,this.fLRoot=f,this.z=y;}};tr.DEFAULT=tr.make();var zr=class $t{constructor(e,a,n,i,l,c,d,p,f){this.hue=e,this.chroma=a,this.j=n,this.q=i,this.m=l,this.s=c,this.jstar=d,this.astar=p,this.bstar=f;}distance(e){let a=this.jstar-e.jstar,n=this.astar-e.astar,i=this.bstar-e.bstar,l=Math.sqrt(a*a+n*n+i*i);return 1.41*Math.pow(l,.63)}static fromInt(e){return $t.fromIntInViewingConditions(e,tr.DEFAULT)}static fromIntInViewingConditions(e,a){let n=(e&16711680)>>16,i=(e&65280)>>8,l=e&255,c=Vt(n),d=Vt(i),p=Vt(l),f=.41233895*c+.35762064*d+.18051042*p,y=.2126*c+.7152*d+.0722*p,P=.01932141*c+.11916382*d+.95034478*p,k=.401288*f+.650173*y-.051461*P,v=-0.250268*f+1.204414*y+.045854*P,m=-2079e-6*f+.048952*y+.953127*P,g=a.rgbD[0]*k,S=a.rgbD[1]*v,E=a.rgbD[2]*m,V=Math.pow(a.fl*Math.abs(g)/100,.42),R=Math.pow(a.fl*Math.abs(S)/100,.42),W=Math.pow(a.fl*Math.abs(E)/100,.42),L=it(g)*400*V/(V+27.13),$=it(S)*400*R/(R+27.13),H=it(E)*400*W/(W+27.13),N=(11*L+-12*$+H)/11,I=(L+$-2*H)/9,de=(20*L+20*$+21*H)/20,we=(40*L+20*$+H)/20,me=Math.atan2(I,N)*180/Math.PI,ke=ht(me),ne=ke*Math.PI/180,Oe=we*a.nbb,De=100*Math.pow(Oe/a.aw,a.c*a.z),Ge=4/a.c*Math.sqrt(De/100)*(a.aw+4)*a.fLRoot,tt=ke<20.14?ke+360:ke,Qe=.25*(Math.cos(tt*Math.PI/180+2)+3.8),Re=5e4/13*Qe*a.nc*a.ncb*Math.sqrt(N*N+I*I)/(de+.305),Ue=Math.pow(Re,.9)*Math.pow(1.64-Math.pow(.29,a.n),.73),st=Ue*Math.sqrt(De/100),dt=st*a.fLRoot,mt=50*Math.sqrt(Ue*a.c/(a.aw+4)),Z=(1+100*.007)*De/(1+.007*De),kt=1/.0228*Math.log(1+.0228*dt),ar=kt*Math.cos(ne),St=kt*Math.sin(ne);return new $t(ke,st,De,Ge,dt,mt,Z,ar,St)}static fromJch(e,a,n){return $t.fromJchInViewingConditions(e,a,n,tr.DEFAULT)}static fromJchInViewingConditions(e,a,n,i){let l=4/i.c*Math.sqrt(e/100)*(i.aw+4)*i.fLRoot,c=a*i.fLRoot,d=a/Math.sqrt(e/100),p=50*Math.sqrt(d*i.c/(i.aw+4)),f=n*Math.PI/180,y=(1+100*.007)*e/(1+.007*e),P=1/.0228*Math.log(1+.0228*c),k=P*Math.cos(f),v=P*Math.sin(f);return new $t(n,a,e,l,c,p,y,k,v)}static fromUcs(e,a,n){return $t.fromUcsInViewingConditions(e,a,n,tr.DEFAULT)}static fromUcsInViewingConditions(e,a,n,i){let l=a,c=n,d=Math.sqrt(l*l+c*c),p=(Math.exp(d*.0228)-1)/.0228/i.fLRoot,f=Math.atan2(c,l)*(180/Math.PI);f<0&&(f+=360);let y=e/(1-(e-100)*.007);return $t.fromJchInViewingConditions(y,p,f,i)}toInt(){return this.viewed(tr.DEFAULT)}viewed(e){let a=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(a/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),i=this.hue*Math.PI/180,l=.25*(Math.cos(i+2)+3.8),c=e.aw*Math.pow(this.j/100,1/e.c/e.z),d=l*(5e4/13)*e.nc*e.ncb,p=c/e.nbb,f=Math.sin(i),y=Math.cos(i),P=23*(p+.305)*n/(23*d+11*n*y+108*n*f),k=P*y,v=P*f,m=(460*p+451*k+288*v)/1403,g=(460*p-891*k-261*v)/1403,S=(460*p-220*k-6300*v)/1403,E=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),V=it(m)*(100/e.fl)*Math.pow(E,1/.42),R=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),W=it(g)*(100/e.fl)*Math.pow(R,1/.42),L=Math.max(0,27.13*Math.abs(S)/(400-Math.abs(S))),$=it(S)*(100/e.fl)*Math.pow(L,1/.42),H=V/e.rgbD[0],N=W/e.rgbD[1],I=$/e.rgbD[2],de=1.86206786*H-1.01125463*N+.14918677*I,we=.38752654*H+.62144744*N-.00897398*I,me=-0.0158415*H-.03412294*N+1.04996444*I;return mh(de,we,me)}static fromXyzInViewingConditions(e,a,n,i){let l=.401288*e+.650173*a-.051461*n,c=-0.250268*e+1.204414*a+.045854*n,d=-2079e-6*e+.048952*a+.953127*n,p=i.rgbD[0]*l,f=i.rgbD[1]*c,y=i.rgbD[2]*d,P=Math.pow(i.fl*Math.abs(p)/100,.42),k=Math.pow(i.fl*Math.abs(f)/100,.42),v=Math.pow(i.fl*Math.abs(y)/100,.42),m=it(p)*400*P/(P+27.13),g=it(f)*400*k/(k+27.13),S=it(y)*400*v/(v+27.13),E=(11*m+-12*g+S)/11,V=(m+g-2*S)/9,R=(20*m+20*g+21*S)/20,W=(40*m+20*g+S)/20,L=Math.atan2(V,E)*180/Math.PI,$=L<0?L+360:L>=360?L-360:L,H=$*Math.PI/180,N=W*i.nbb,I=100*Math.pow(N/i.aw,i.c*i.z),de=4/i.c*Math.sqrt(I/100)*(i.aw+4)*i.fLRoot,we=$<20.14?$+360:$,me=1/4*(Math.cos(we*Math.PI/180+2)+3.8),ke=5e4/13*me*i.nc*i.ncb*Math.sqrt(E*E+V*V)/(R+.305),ne=Math.pow(ke,.9)*Math.pow(1.64-Math.pow(.29,i.n),.73),Oe=ne*Math.sqrt(I/100),De=Oe*i.fLRoot,Ge=50*Math.sqrt(ne*i.c/(i.aw+4)),tt=(1+100*.007)*I/(1+.007*I),Qe=Math.log(1+.0228*De)/.0228,Re=Qe*Math.cos(H),Ue=Qe*Math.sin(H);return new $t($,Oe,I,de,De,Ge,tt,Re,Ue)}xyzInViewingConditions(e){let a=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(a/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),i=this.hue*Math.PI/180,l=.25*(Math.cos(i+2)+3.8),c=e.aw*Math.pow(this.j/100,1/e.c/e.z),d=l*(5e4/13)*e.nc*e.ncb,p=c/e.nbb,f=Math.sin(i),y=Math.cos(i),P=23*(p+.305)*n/(23*d+11*n*y+108*n*f),k=P*y,v=P*f,m=(460*p+451*k+288*v)/1403,g=(460*p-891*k-261*v)/1403,S=(460*p-220*k-6300*v)/1403,E=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),V=it(m)*(100/e.fl)*Math.pow(E,1/.42),R=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),W=it(g)*(100/e.fl)*Math.pow(R,1/.42),L=Math.max(0,27.13*Math.abs(S)/(400-Math.abs(S))),$=it(S)*(100/e.fl)*Math.pow(L,1/.42),H=V/e.rgbD[0],N=W/e.rgbD[1],I=$/e.rgbD[2],de=1.86206786*H-1.01125463*N+.14918677*I,we=.38752654*H+.62144744*N-.00897398*I,me=-0.0158415*H-.03412294*N+1.04996444*I;return [de,we,me]}},rr=class ge{static sanitizeRadians(e){return (e+Math.PI*8)%(Math.PI*2)}static trueDelinearized(e){let a=e/100,n=0;return a<=.0031308?n=a*12.92:n=1.055*Math.pow(a,1/2.4)-.055,n*255}static chromaticAdaptation(e){let a=Math.pow(Math.abs(e),.42);return it(e)*400*a/(a+27.13)}static hueOf(e){let a=an(e,ge.SCALED_DISCOUNT_FROM_LINRGB),n=ge.chromaticAdaptation(a[0]),i=ge.chromaticAdaptation(a[1]),l=ge.chromaticAdaptation(a[2]),c=(11*n+-12*i+l)/11,d=(n+i-2*l)/9;return Math.atan2(d,c)}static areInCyclicOrder(e,a,n){let i=ge.sanitizeRadians(a-e),l=ge.sanitizeRadians(n-e);return i<l}static intercept(e,a,n){return (a-e)/(n-e)}static lerpPoint(e,a,n){return [e[0]+(n[0]-e[0])*a,e[1]+(n[1]-e[1])*a,e[2]+(n[2]-e[2])*a]}static setCoordinate(e,a,n,i){let l=ge.intercept(e[i],a,n[i]);return ge.lerpPoint(e,l,n)}static isBounded(e){return 0<=e&&e<=100}static nthVertex(e,a){let n=ge.Y_FROM_LINRGB[0],i=ge.Y_FROM_LINRGB[1],l=ge.Y_FROM_LINRGB[2],c=a%4<=1?0:100,d=a%2===0?0:100;if(a<4){let p=c,f=d,y=(e-p*i-f*l)/n;return ge.isBounded(y)?[y,p,f]:[-1,-1,-1]}else if(a<8){let p=c,f=d,y=(e-f*n-p*l)/i;return ge.isBounded(y)?[f,y,p]:[-1,-1,-1]}else {let p=c,f=d,y=(e-p*n-f*i)/l;return ge.isBounded(y)?[p,f,y]:[-1,-1,-1]}}static bisectToSegment(e,a){let n=[-1,-1,-1],i=n,l=0,c=0,d=false,p=true;for(let f=0;f<12;f++){let y=ge.nthVertex(e,f);if(y[0]<0)continue;let P=ge.hueOf(y);if(!d){n=y,i=y,l=P,c=P,d=true;continue}(p||ge.areInCyclicOrder(l,P,c))&&(p=false,ge.areInCyclicOrder(l,a,P)?(i=y,c=P):(n=y,l=P));}return [n,i]}static midpoint(e,a){return [(e[0]+a[0])/2,(e[1]+a[1])/2,(e[2]+a[2])/2]}static criticalPlaneBelow(e){return Math.floor(e-.5)}static criticalPlaneAbove(e){return Math.ceil(e-.5)}static bisectToLimit(e,a){let n=ge.bisectToSegment(e,a),i=n[0],l=ge.hueOf(i),c=n[1];for(let d=0;d<3;d++)if(i[d]!==c[d]){let p=-1,f=255;i[d]<c[d]?(p=ge.criticalPlaneBelow(ge.trueDelinearized(i[d])),f=ge.criticalPlaneAbove(ge.trueDelinearized(c[d]))):(p=ge.criticalPlaneAbove(ge.trueDelinearized(i[d])),f=ge.criticalPlaneBelow(ge.trueDelinearized(c[d])));for(let y=0;y<8&&!(Math.abs(f-p)<=1);y++){let P=Math.floor((p+f)/2),k=ge.CRITICAL_PLANES[P],v=ge.setCoordinate(i,k,c,d),m=ge.hueOf(v);ge.areInCyclicOrder(l,a,m)?(c=v,f=P):(i=v,l=m,p=P);}}return ge.midpoint(i,c)}static inverseChromaticAdaptation(e){let a=Math.abs(e),n=Math.max(0,27.13*a/(400-a));return it(e)*Math.pow(n,1/.42)}static findResultByJ(e,a,n){let i=Math.sqrt(n)*11,l=tr.DEFAULT,c=1/Math.pow(1.64-Math.pow(.29,l.n),.73),d=.25*(Math.cos(e+2)+3.8)*(5e4/13)*l.nc*l.ncb,p=Math.sin(e),f=Math.cos(e);for(let y=0;y<5;y++){let P=i/100,k=a===0||i===0?0:a/Math.sqrt(P),v=Math.pow(k*c,1/.9),m=l.aw*Math.pow(P,1/l.c/l.z)/l.nbb,g=23*(m+.305)*v/(23*d+11*v*f+108*v*p),S=g*f,E=g*p,V=(460*m+451*S+288*E)/1403,R=(460*m-891*S-261*E)/1403,W=(460*m-220*S-6300*E)/1403,L=ge.inverseChromaticAdaptation(V),$=ge.inverseChromaticAdaptation(R),H=ge.inverseChromaticAdaptation(W),N=an([L,$,H],ge.LINRGB_FROM_SCALED_DISCOUNT);if(N[0]<0||N[1]<0||N[2]<0)return 0;let I=ge.Y_FROM_LINRGB[0],de=ge.Y_FROM_LINRGB[1],we=ge.Y_FROM_LINRGB[2],me=I*N[0]+de*N[1]+we*N[2];if(me<=0)return 0;if(y===4||Math.abs(me-n)<.002)return N[0]>100.01||N[1]>100.01||N[2]>100.01?0:To(N);i=i-(me-n)*i/(2*me);}return 0}static solveToInt(e,a,n){if(a<1e-4||n<1e-4||n>99.9999)return gh(n);e=ht(e);let i=e/180*Math.PI,l=er(n),c=ge.findResultByJ(i,a,l);if(c!==0)return c;let d=ge.bisectToLimit(l,i);return To(d)}static solveToCam(e,a,n){return zr.fromInt(ge.solveToInt(e,a,n))}};rr.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];rr.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];rr.Y_FROM_LINRGB=[.2126,.7152,.0722];rr.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var he=class Sa{static from(e,a,n){return new Sa(rr.solveToInt(e,a,n))}static fromInt(e){return new Sa(e)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(e){this.setInternalState(rr.solveToInt(e,this.internalChroma,this.internalTone));}get chroma(){return this.internalChroma}set chroma(e){this.setInternalState(rr.solveToInt(this.internalHue,e,this.internalTone));}get tone(){return this.internalTone}set tone(e){this.setInternalState(rr.solveToInt(this.internalHue,this.internalChroma,e));}setValue(e,a){this[e]=a;}toString(){return `HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`}static isBlue(e){return e>=250&&e<270}static isYellow(e){return e>=105&&e<125}static isCyan(e){return e>=170&&e<207}constructor(e){this.argb=e;let a=zr.fromInt(e);this.internalHue=a.hue,this.internalChroma=a.chroma,this.internalTone=Mo(e),this.argb=e;}setInternalState(e){let a=zr.fromInt(e);this.internalHue=a.hue,this.internalChroma=a.chroma,this.internalTone=Mo(e),this.argb=e;}inViewingConditions(e){let a=zr.fromInt(this.toInt()).xyzInViewingConditions(e),n=zr.fromXyzInViewingConditions(a[0],a[1],a[2],tr.make());return Sa.from(n.hue,n.chroma,nn(a[1]))}},qe=class _r{static ratioOfTones(e,a){return e=Je(0,100,e),a=Je(0,100,a),_r.ratioOfYs(er(e),er(a))}static ratioOfYs(e,a){let n=e>a?e:a,i=n===a?e:a;return (n+5)/(i+5)}static lighter(e,a){if(e<0||e>100)return -1;let n=er(e),i=a*(n+5)-5,l=_r.ratioOfYs(i,n),c=Math.abs(l-a);if(l<a&&c>.04)return -1;let d=nn(i)+.4;return d<0||d>100?-1:d}static darker(e,a){if(e<0||e>100)return -1;let n=er(e),i=(n+5)/a-5,l=_r.ratioOfYs(n,i),c=Math.abs(l-a);if(l<a&&c>.04)return -1;let d=nn(i)-.4;return d<0||d>100?-1:d}static lighterUnsafe(e,a){let n=_r.lighter(e,a);return n<0?100:n}static darkerUnsafe(e,a){let n=_r.darker(e,a);return n<0?0:n}},on=class Jo{static isDisliked(e){let a=Math.round(e.hue)>=90&&Math.round(e.hue)<=111,n=Math.round(e.chroma)>16,i=Math.round(e.tone)<65;return a&&n&&i}static fixIfDisliked(e){return Jo.isDisliked(e)?he.from(e.hue,e.chroma,70):e}};function Ch(t,e,a){if(t.name!==a.name)throw new Error(`Attempting to extend color ${t.name} with color ${a.name} of different name for spec version ${e}.`);if(t.isBackground!==a.isBackground)throw new Error(`Attempting to extend color ${t.name} as a ${t.isBackground?"background":"foreground"} with color ${a.name} as a ${a.isBackground?"background":"foreground"} for spec version ${e}.`)}function se(t,e,a){return Ch(t,e,a),x.fromPalette({name:t.name,palette:n=>n.specVersion===e?a.palette(n):t.palette(n),tone:n=>n.specVersion===e?a.tone(n):t.tone(n),isBackground:t.isBackground,chromaMultiplier:n=>{let i=n.specVersion===e?a.chromaMultiplier:t.chromaMultiplier;return i!==void 0?i(n):1},background:n=>{let i=n.specVersion===e?a.background:t.background;return i!==void 0?i(n):void 0},secondBackground:n=>{let i=n.specVersion===e?a.secondBackground:t.secondBackground;return i!==void 0?i(n):void 0},contrastCurve:n=>{let i=n.specVersion===e?a.contrastCurve:t.contrastCurve;return i!==void 0?i(n):void 0},toneDeltaPair:n=>{let i=n.specVersion===e?a.toneDeltaPair:t.toneDeltaPair;return i!==void 0?i(n):void 0}})}var x=class lr{static fromPalette(e){return new lr(e.name??"",e.palette,e.tone??lr.getInitialToneFromBackground(e.background),e.isBackground??false,e.chromaMultiplier,e.background,e.secondBackground,e.contrastCurve,e.toneDeltaPair)}static getInitialToneFromBackground(e){return e===void 0?a=>50:a=>e(a)?e(a).getTone(a):50}constructor(e,a,n,i,l,c,d,p,f){if(this.name=e,this.palette=a,this.tone=n,this.isBackground=i,this.chromaMultiplier=l,this.background=c,this.secondBackground=d,this.contrastCurve=p,this.toneDeltaPair=f,this.hctCache=new Map,!c&&d)throw new Error(`Color ${e} has secondBackgrounddefined, but background is not defined.`);if(!c&&p)throw new Error(`Color ${e} has contrastCurvedefined, but background is not defined.`);if(c&&!p)throw new Error(`Color ${e} has backgrounddefined, but contrastCurve is not defined.`)}clone(){return lr.fromPalette({name:this.name,palette:this.palette,tone:this.tone,isBackground:this.isBackground,chromaMultiplier:this.chromaMultiplier,background:this.background,secondBackground:this.secondBackground,contrastCurve:this.contrastCurve,toneDeltaPair:this.toneDeltaPair})}clearCache(){this.hctCache.clear();}getArgb(e){return this.getHct(e).toInt()}getHct(e){let a=this.hctCache.get(e);if(a!=null)return a;let n=Ao(e.specVersion).getHct(e,this);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(e,n),n}getTone(e){return Ao(e.specVersion).getTone(e,this)}static foregroundTone(e,a){let n=qe.lighterUnsafe(e,a),i=qe.darkerUnsafe(e,a),l=qe.ratioOfTones(n,e),c=qe.ratioOfTones(i,e);if(lr.tonePrefersLightForeground(e)){let d=Math.abs(l-c)<.1&&l<a&&c<a;return l>=a||l>=c||d?n:i}else return c>=a||c>=l?i:n}static tonePrefersLightForeground(e){return Math.round(e)<60}static toneAllowsLightForeground(e){return Math.round(e)<=49}static enableLightForeground(e){return lr.tonePrefersLightForeground(e)&&!lr.toneAllowsLightForeground(e)?49:e}},vh=class{getHct(t,e){let a=e.getTone(t);return e.palette(t).getHct(a)}getTone(t,e){let a=t.contrastLevel<0,n=e.toneDeltaPair?e.toneDeltaPair(t):void 0;if(n){let i=n.roleA,l=n.roleB,c=n.delta,d=n.polarity,p=n.stayTogether,f=d==="nearer"||d==="lighter"&&!t.isDark||d==="darker"&&t.isDark,y=f?i:l,P=f?l:i,k=e.name===y.name,v=t.isDark?1:-1,m=y.tone(t),g=P.tone(t);if(e.background&&y.contrastCurve&&P.contrastCurve){let S=e.background(t),E=y.contrastCurve(t),V=P.contrastCurve(t);if(S&&E&&V){let R=S.getTone(t),W=E.get(t.contrastLevel),L=V.get(t.contrastLevel);qe.ratioOfTones(R,m)<W&&(m=x.foregroundTone(R,W)),qe.ratioOfTones(R,g)<L&&(g=x.foregroundTone(R,L)),a&&(m=x.foregroundTone(R,W),g=x.foregroundTone(R,L));}}return (g-m)*v<c&&(g=Je(0,100,m+c*v),(g-m)*v>=c||(m=Je(0,100,g-c*v))),50<=m&&m<60?v>0?(m=60,g=Math.max(g,m+c*v)):(m=49,g=Math.min(g,m+c*v)):50<=g&&g<60&&(p?v>0?(m=60,g=Math.max(g,m+c*v)):(m=49,g=Math.min(g,m+c*v)):v>0?g=60:g=49),k?m:g}else {let i=e.tone(t);if(e.background==null||e.background(t)===void 0||e.contrastCurve==null||e.contrastCurve(t)===void 0)return i;let l=e.background(t).getTone(t),c=e.contrastCurve(t).get(t.contrastLevel);if(qe.ratioOfTones(l,i)>=c||(i=x.foregroundTone(l,c)),a&&(i=x.foregroundTone(l,c)),e.isBackground&&50<=i&&i<60&&(qe.ratioOfTones(49,l)>=c?i=49:i=60),e.secondBackground==null||e.secondBackground(t)===void 0)return i;let[d,p]=[e.background,e.secondBackground],[f,y]=[d(t).getTone(t),p(t).getTone(t)],[P,k]=[Math.max(f,y),Math.min(f,y)];if(qe.ratioOfTones(P,i)>=c&&qe.ratioOfTones(k,i)>=c)return i;let v=qe.lighter(P,c),m=qe.darker(k,c),g=[];return v!==-1&&g.push(v),m!==-1&&g.push(m),x.tonePrefersLightForeground(f)||x.tonePrefersLightForeground(y)?v<0?100:v:g.length===1?g[0]:m<0?0:m}}},kh=class{getHct(t,e){let a=e.palette(t),n=e.getTone(t),i=a.hue,l=a.chroma*(e.chromaMultiplier?e.chromaMultiplier(t):1);return he.from(i,l,n)}getTone(t,e){let a=e.toneDeltaPair?e.toneDeltaPair(t):void 0;if(a){let n=a.roleA,i=a.roleB,l=a.polarity,c=a.constraint,d=l==="darker"||l==="relative_lighter"&&t.isDark||l==="relative_darker"&&!t.isDark?-a.delta:a.delta,p=e.name===n.name,f=p?n:i,y=p?i:n,P=f.tone(t),k=y.getTone(t),v=d*(p?1:-1);if(c==="exact"?P=Je(0,100,k+v):c==="nearer"?v>0?P=Je(0,100,Je(k,k+v,P)):P=Je(0,100,Je(k+v,k,P)):c==="farther"&&(v>0?P=Je(k+v,100,P):P=Je(0,k+v,P)),e.background&&e.contrastCurve){let m=e.background(t),g=e.contrastCurve(t);if(m&&g){let S=m.getTone(t),E=g.get(t.contrastLevel);P=qe.ratioOfTones(S,P)>=E&&t.contrastLevel>=0?P:x.foregroundTone(S,E);}}return e.isBackground&&!e.name.endsWith("_fixed_dim")&&(P>=57?P=Je(65,100,P):P=Je(0,49,P)),P}else {let n=e.tone(t);if(e.background==null||e.background(t)===void 0||e.contrastCurve==null||e.contrastCurve(t)===void 0)return n;let i=e.background(t).getTone(t),l=e.contrastCurve(t).get(t.contrastLevel);if(n=qe.ratioOfTones(i,n)>=l&&t.contrastLevel>=0?n:x.foregroundTone(i,l),e.isBackground&&!e.name.endsWith("_fixed_dim")&&(n>=57?n=Je(65,100,n):n=Je(0,49,n)),e.secondBackground==null||e.secondBackground(t)===void 0)return n;let[c,d]=[e.background,e.secondBackground],[p,f]=[c(t).getTone(t),d(t).getTone(t)],[y,P]=[Math.max(p,f),Math.min(p,f)];if(qe.ratioOfTones(y,n)>=l&&qe.ratioOfTones(P,n)>=l)return n;let k=qe.lighter(y,l),v=qe.darker(P,l),m=[];return k!==-1&&m.push(k),v!==-1&&m.push(v),x.tonePrefersLightForeground(p)||x.tonePrefersLightForeground(f)?k<0?100:k:m.length===1?m[0]:v<0?0:v}}},Sh=new vh,wh=new kh;function Ao(t){return t==="2025"?wh:Sh}var K=class wa{static fromInt(e){let a=he.fromInt(e);return wa.fromHct(a)}static fromHct(e){return new wa(e.hue,e.chroma,e)}static fromHueAndChroma(e,a){let n=new bh(e,a).create();return new wa(e,a,n)}constructor(e,a,n){this.hue=e,this.chroma=a,this.keyColor=n,this.cache=new Map;}tone(e){let a=this.cache.get(e);return a===void 0&&(e==99&&he.isYellow(this.hue)?a=this.averageArgb(this.tone(98),this.tone(100)):a=he.from(this.hue,this.chroma,e).toInt(),this.cache.set(e,a)),a}getHct(e){return he.fromInt(this.tone(e))}averageArgb(e,a){let n=e>>>16&255,i=e>>>8&255,l=e&255,c=a>>>16&255,d=a>>>8&255,p=a&255,f=Math.round((n+c)/2),y=Math.round((i+d)/2),P=Math.round((l+p)/2);return (255<<24|(f&255)<<16|(y&255)<<8|P&255)>>>0}},bh=class{constructor(t,e){this.hue=t,this.requestedChroma=e,this.chromaCache=new Map,this.maxChromaValue=200;}create(){let t=0,e=100;for(;t<e;){let a=Math.floor((t+e)/2),n=this.maxChroma(a)<this.maxChroma(a+1);if(this.maxChroma(a)>=this.requestedChroma-.01)if(Math.abs(t-50)<Math.abs(e-50))e=a;else {if(t===a)return he.from(this.hue,this.requestedChroma,t);t=a;}else n?t=a+1:e=a;}return he.from(this.hue,this.requestedChroma,t)}maxChroma(t){if(this.chromaCache.has(t))return this.chromaCache.get(t);let e=he.from(this.hue,this.maxChromaValue,t).chroma;return this.chromaCache.set(t,e),e}},xo=class ba{constructor(e){this.input=e,this.hctsByTempCache=[],this.hctsByHueCache=[],this.tempsByHctCache=new Map,this.inputRelativeTemperatureCache=-1,this.complementCache=null;}get hctsByTemp(){if(this.hctsByTempCache.length>0)return this.hctsByTempCache;let e=this.hctsByHue.concat([this.input]),a=this.tempsByHct;return e.sort((n,i)=>a.get(n)-a.get(i)),this.hctsByTempCache=e,e}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(e=5,a=12){let n=Math.round(this.input.hue),i=this.hctsByHue[n],l=this.relativeTemperature(i),c=[i],d=0;for(let m=0;m<360;m++){let g=Do(n+m),S=this.hctsByHue[g],E=this.relativeTemperature(S),V=Math.abs(E-l);l=E,d+=V;}let p=1,f=d/a,y=0;for(l=this.relativeTemperature(i);c.length<a;){let m=Do(n+p),g=this.hctsByHue[m],S=this.relativeTemperature(g),E=Math.abs(S-l);y+=E;let V=c.length*f,R=y>=V,W=1;for(;R&&c.length<a;){c.push(g);let L=(c.length+W)*f;R=y>=L,W++;}if(l=S,p++,p>360){for(;c.length<a;)c.push(g);break}}let P=[this.input],k=Math.floor((e-1)/2);for(let m=1;m<k+1;m++){let g=0-m;for(;g<0;)g=c.length+g;g>=c.length&&(g=g%c.length),P.splice(0,0,c[g]);}let v=e-k-1;for(let m=1;m<v+1;m++){let g=m;for(;g<0;)g=c.length+g;g>=c.length&&(g=g%c.length),P.push(c[g]);}return P}get complement(){if(this.complementCache!=null)return this.complementCache;let e=this.coldest.hue,a=this.tempsByHct.get(this.coldest),n=this.warmest.hue,i=this.tempsByHct.get(this.warmest)-a,l=ba.isBetween(this.input.hue,e,n),c=l?n:e,d=l?e:n,p=1,f=1e3,y=this.hctsByHue[Math.round(this.input.hue)],P=1-this.inputRelativeTemperature;for(let k=0;k<=360;k+=1){let v=ht(c+p*k);if(!ba.isBetween(v,c,d))continue;let m=this.hctsByHue[Math.round(v)],g=(this.tempsByHct.get(m)-a)/i,S=Math.abs(P-g);S<f&&(f=S,y=m);}return this.complementCache=y,this.complementCache}relativeTemperature(e){let a=this.tempsByHct.get(this.warmest)-this.tempsByHct.get(this.coldest),n=this.tempsByHct.get(e)-this.tempsByHct.get(this.coldest);return a===0?.5:n/a}get inputRelativeTemperature(){return this.inputRelativeTemperatureCache>=0?this.inputRelativeTemperatureCache:(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input),this.inputRelativeTemperatureCache)}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;let e=this.hctsByHue.concat([this.input]),a=new Map;for(let n of e)a.set(n,ba.rawTemperature(n));return this.tempsByHctCache=a,a}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;let e=[];for(let a=0;a<=360;a+=1){let n=he.from(a,this.input.chroma,this.input.tone);e.push(n);}return this.hctsByHueCache=e,this.hctsByHueCache}static isBetween(e,a,n){return a<n?a<=e&&e<=n:a<=e||e<=n}static rawTemperature(e){let a=ph(e.toInt()),n=ht(Math.atan2(a[2],a[1])*180/Math.PI),i=Math.sqrt(a[1]*a[1]+a[2]*a[2]);return -0.5+.02*Math.pow(i,1.07)*Math.cos(ht(n-50)*Math.PI/180)}},ee=class{constructor(t,e,a,n){this.low=t,this.normal=e,this.medium=a,this.high=n;}get(t){return t<=-1?this.low:t<0?Xr(this.low,this.normal,(t- -1)/1):t<.5?Xr(this.normal,this.medium,(t-0)/.5):t<1?Xr(this.medium,this.high,(t-.5)/.5):this.high}},_e=class{constructor(t,e,a,n,i,l){this.roleA=t,this.roleB=e,this.delta=a,this.polarity=n,this.stayTogether=i,this.constraint=l,this.constraint=l??"exact";}},D;(function(t){t[t.MONOCHROME=0]="MONOCHROME",t[t.NEUTRAL=1]="NEUTRAL",t[t.TONAL_SPOT=2]="TONAL_SPOT",t[t.VIBRANT=3]="VIBRANT",t[t.EXPRESSIVE=4]="EXPRESSIVE",t[t.FIDELITY=5]="FIDELITY",t[t.CONTENT=6]="CONTENT",t[t.RAINBOW=7]="RAINBOW",t[t.FRUIT_SALAD=8]="FRUIT_SALAD";})(D||(D={}));function Tr(t){return t.variant===D.FIDELITY||t.variant===D.CONTENT}function Ve(t){return t.variant===D.MONOCHROME}function Dh(t,e,a,n){let i=a,l=he.from(t,e,a);if(l.chroma<e){let c=l.chroma;for(;l.chroma<e;){i+=n?-1:1;let d=he.from(t,e,i);if(c>d.chroma||Math.abs(d.chroma-e)<.4)break;let p=Math.abs(d.chroma-e),f=Math.abs(l.chroma-e);p<f&&(l=d),c=Math.max(c,d.chroma);}}return i}var Th=class{primaryPaletteKeyColor(){return x.fromPalette({name:"primary_palette_key_color",palette:t=>t.primaryPalette,tone:t=>t.primaryPalette.keyColor.tone})}secondaryPaletteKeyColor(){return x.fromPalette({name:"secondary_palette_key_color",palette:t=>t.secondaryPalette,tone:t=>t.secondaryPalette.keyColor.tone})}tertiaryPaletteKeyColor(){return x.fromPalette({name:"tertiary_palette_key_color",palette:t=>t.tertiaryPalette,tone:t=>t.tertiaryPalette.keyColor.tone})}neutralPaletteKeyColor(){return x.fromPalette({name:"neutral_palette_key_color",palette:t=>t.neutralPalette,tone:t=>t.neutralPalette.keyColor.tone})}neutralVariantPaletteKeyColor(){return x.fromPalette({name:"neutral_variant_palette_key_color",palette:t=>t.neutralVariantPalette,tone:t=>t.neutralVariantPalette.keyColor.tone})}errorPaletteKeyColor(){return x.fromPalette({name:"error_palette_key_color",palette:t=>t.errorPalette,tone:t=>t.errorPalette.keyColor.tone})}background(){return x.fromPalette({name:"background",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}onBackground(){return x.fromPalette({name:"on_background",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.background(),contrastCurve:t=>new ee(3,3,4.5,7)})}surface(){return x.fromPalette({name:"surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}surfaceDim(){return x.fromPalette({name:"surface_dim",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:new ee(87,87,80,75).get(t.contrastLevel),isBackground:true})}surfaceBright(){return x.fromPalette({name:"surface_bright",palette:t=>t.neutralPalette,tone:t=>t.isDark?new ee(24,24,29,34).get(t.contrastLevel):98,isBackground:true})}surfaceContainerLowest(){return x.fromPalette({name:"surface_container_lowest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new ee(4,4,2,0).get(t.contrastLevel):100,isBackground:true})}surfaceContainerLow(){return x.fromPalette({name:"surface_container_low",palette:t=>t.neutralPalette,tone:t=>t.isDark?new ee(10,10,11,12).get(t.contrastLevel):new ee(96,96,96,95).get(t.contrastLevel),isBackground:true})}surfaceContainer(){return x.fromPalette({name:"surface_container",palette:t=>t.neutralPalette,tone:t=>t.isDark?new ee(12,12,16,20).get(t.contrastLevel):new ee(94,94,92,90).get(t.contrastLevel),isBackground:true})}surfaceContainerHigh(){return x.fromPalette({name:"surface_container_high",palette:t=>t.neutralPalette,tone:t=>t.isDark?new ee(17,17,21,25).get(t.contrastLevel):new ee(92,92,88,85).get(t.contrastLevel),isBackground:true})}surfaceContainerHighest(){return x.fromPalette({name:"surface_container_highest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new ee(22,22,26,30).get(t.contrastLevel):new ee(90,90,84,80).get(t.contrastLevel),isBackground:true})}onSurface(){return x.fromPalette({name:"on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(4.5,7,11,21)})}surfaceVariant(){return x.fromPalette({name:"surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:90,isBackground:true})}onSurfaceVariant(){return x.fromPalette({name:"on_surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?80:30,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(3,4.5,7,11)})}inverseSurface(){return x.fromPalette({name:"inverse_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:20,isBackground:true})}inverseOnSurface(){return x.fromPalette({name:"inverse_on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?20:95,background:t=>this.inverseSurface(),contrastCurve:t=>new ee(4.5,7,11,21)})}outline(){return x.fromPalette({name:"outline",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?60:50,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(1.5,3,4.5,7)})}outlineVariant(){return x.fromPalette({name:"outline_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:80,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(1,1,3,4.5)})}shadow(){return x.fromPalette({name:"shadow",palette:t=>t.neutralPalette,tone:t=>0})}scrim(){return x.fromPalette({name:"scrim",palette:t=>t.neutralPalette,tone:t=>0})}surfaceTint(){return x.fromPalette({name:"surface_tint",palette:t=>t.primaryPalette,tone:t=>t.isDark?80:40,isBackground:true})}primary(){return x.fromPalette({name:"primary",palette:t=>t.primaryPalette,tone:t=>Ve(t)?t.isDark?100:0:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(3,4.5,7,7),toneDeltaPair:t=>new _e(this.primaryContainer(),this.primary(),10,"nearer",false)})}primaryDim(){}onPrimary(){return x.fromPalette({name:"on_primary",palette:t=>t.primaryPalette,tone:t=>Ve(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.primary(),contrastCurve:t=>new ee(4.5,7,11,21)})}primaryContainer(){return x.fromPalette({name:"primary_container",palette:t=>t.primaryPalette,tone:t=>Tr(t)?t.sourceColorHct.tone:Ve(t)?t.isDark?85:25:t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(1,1,3,4.5),toneDeltaPair:t=>new _e(this.primaryContainer(),this.primary(),10,"nearer",false)})}onPrimaryContainer(){return x.fromPalette({name:"on_primary_container",palette:t=>t.primaryPalette,tone:t=>Tr(t)?x.foregroundTone(this.primaryContainer().tone(t),4.5):Ve(t)?t.isDark?0:100:t.isDark?90:30,background:t=>this.primaryContainer(),contrastCurve:t=>new ee(3,4.5,7,11)})}inversePrimary(){return x.fromPalette({name:"inverse_primary",palette:t=>t.primaryPalette,tone:t=>t.isDark?40:80,background:t=>this.inverseSurface(),contrastCurve:t=>new ee(3,4.5,7,7)})}secondary(){return x.fromPalette({name:"secondary",palette:t=>t.secondaryPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(3,4.5,7,7),toneDeltaPair:t=>new _e(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}secondaryDim(){}onSecondary(){return x.fromPalette({name:"on_secondary",palette:t=>t.secondaryPalette,tone:t=>Ve(t)?t.isDark?10:100:t.isDark?20:100,background:t=>this.secondary(),contrastCurve:t=>new ee(4.5,7,11,21)})}secondaryContainer(){return x.fromPalette({name:"secondary_container",palette:t=>t.secondaryPalette,tone:t=>{let e=t.isDark?30:90;return Ve(t)?t.isDark?30:85:Tr(t)?Dh(t.secondaryPalette.hue,t.secondaryPalette.chroma,e,!t.isDark):e},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(1,1,3,4.5),toneDeltaPair:t=>new _e(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}onSecondaryContainer(){return x.fromPalette({name:"on_secondary_container",palette:t=>t.secondaryPalette,tone:t=>Ve(t)?t.isDark?90:10:Tr(t)?x.foregroundTone(this.secondaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.secondaryContainer(),contrastCurve:t=>new ee(3,4.5,7,11)})}tertiary(){return x.fromPalette({name:"tertiary",palette:t=>t.tertiaryPalette,tone:t=>Ve(t)?t.isDark?90:25:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(3,4.5,7,7),toneDeltaPair:t=>new _e(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}tertiaryDim(){}onTertiary(){return x.fromPalette({name:"on_tertiary",palette:t=>t.tertiaryPalette,tone:t=>Ve(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.tertiary(),contrastCurve:t=>new ee(4.5,7,11,21)})}tertiaryContainer(){return x.fromPalette({name:"tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>{if(Ve(t))return t.isDark?60:49;if(!Tr(t))return t.isDark?30:90;let e=t.tertiaryPalette.getHct(t.sourceColorHct.tone);return on.fixIfDisliked(e).tone},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(1,1,3,4.5),toneDeltaPair:t=>new _e(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}onTertiaryContainer(){return x.fromPalette({name:"on_tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>Ve(t)?t.isDark?0:100:Tr(t)?x.foregroundTone(this.tertiaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.tertiaryContainer(),contrastCurve:t=>new ee(3,4.5,7,11)})}error(){return x.fromPalette({name:"error",palette:t=>t.errorPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(3,4.5,7,7),toneDeltaPair:t=>new _e(this.errorContainer(),this.error(),10,"nearer",false)})}errorDim(){}onError(){return x.fromPalette({name:"on_error",palette:t=>t.errorPalette,tone:t=>t.isDark?20:100,background:t=>this.error(),contrastCurve:t=>new ee(4.5,7,11,21)})}errorContainer(){return x.fromPalette({name:"error_container",palette:t=>t.errorPalette,tone:t=>t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(1,1,3,4.5),toneDeltaPair:t=>new _e(this.errorContainer(),this.error(),10,"nearer",false)})}onErrorContainer(){return x.fromPalette({name:"on_error_container",palette:t=>t.errorPalette,tone:t=>Ve(t)?t.isDark?90:10:t.isDark?90:30,background:t=>this.errorContainer(),contrastCurve:t=>new ee(3,4.5,7,11)})}primaryFixed(){return x.fromPalette({name:"primary_fixed",palette:t=>t.primaryPalette,tone:t=>Ve(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(1,1,3,4.5),toneDeltaPair:t=>new _e(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}primaryFixedDim(){return x.fromPalette({name:"primary_fixed_dim",palette:t=>t.primaryPalette,tone:t=>Ve(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(1,1,3,4.5),toneDeltaPair:t=>new _e(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}onPrimaryFixed(){return x.fromPalette({name:"on_primary_fixed",palette:t=>t.primaryPalette,tone:t=>Ve(t)?100:10,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new ee(4.5,7,11,21)})}onPrimaryFixedVariant(){return x.fromPalette({name:"on_primary_fixed_variant",palette:t=>t.primaryPalette,tone:t=>Ve(t)?90:30,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new ee(3,4.5,7,11)})}secondaryFixed(){return x.fromPalette({name:"secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>Ve(t)?80:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(1,1,3,4.5),toneDeltaPair:t=>new _e(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}secondaryFixedDim(){return x.fromPalette({name:"secondary_fixed_dim",palette:t=>t.secondaryPalette,tone:t=>Ve(t)?70:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(1,1,3,4.5),toneDeltaPair:t=>new _e(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}onSecondaryFixed(){return x.fromPalette({name:"on_secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>10,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new ee(4.5,7,11,21)})}onSecondaryFixedVariant(){return x.fromPalette({name:"on_secondary_fixed_variant",palette:t=>t.secondaryPalette,tone:t=>Ve(t)?25:30,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new ee(3,4.5,7,11)})}tertiaryFixed(){return x.fromPalette({name:"tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>Ve(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(1,1,3,4.5),toneDeltaPair:t=>new _e(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}tertiaryFixedDim(){return x.fromPalette({name:"tertiary_fixed_dim",palette:t=>t.tertiaryPalette,tone:t=>Ve(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new ee(1,1,3,4.5),toneDeltaPair:t=>new _e(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}onTertiaryFixed(){return x.fromPalette({name:"on_tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>Ve(t)?100:10,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new ee(4.5,7,11,21)})}onTertiaryFixedVariant(){return x.fromPalette({name:"on_tertiary_fixed_variant",palette:t=>t.tertiaryPalette,tone:t=>Ve(t)?90:30,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new ee(3,4.5,7,11)})}highestSurface(t){return t.isDark?this.surfaceBright():this.surfaceDim()}};function ve(t,e=0,a=100,n=1){let i=Qo(t.hue,t.chroma*n,100,true);return Je(e,a,i)}function jt(t,e=0,a=100){let n=Qo(t.hue,t.chroma,0,false);return Je(e,a,n)}function Qo(t,e,a,n){let i=a,l=he.from(t,e,i);for(;l.chroma<e&&!(a<0||a>100);){a+=n?-1:1;let c=he.from(t,e,a);l.chroma<c.chroma&&(l=c,i=a);}return i}function ae(t){return t===1.5?new ee(1.5,1.5,3,5.5):t===3?new ee(3,3,4.5,7):t===4.5?new ee(4.5,4.5,7,11):t===6?new ee(6,6,7,11):t===7?new ee(7,7,11,21):t===9?new ee(9,9,11,21):t===11?new ee(11,11,21,21):t===21?new ee(21,21,21,21):new ee(t,t,7,21)}var Mh=class extends Th{surface(){let t=x.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>(super.surface().tone(e),e.platform==="phone"?e.isDark?4:he.isYellow(e.neutralPalette.hue)?99:e.variant===D.VIBRANT?97:98:0),isBackground:true});return se(super.surface(),"2025",t)}surfaceDim(){let t=x.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?4:he.isYellow(e.neutralPalette.hue)?90:e.variant===D.VIBRANT?85:87,isBackground:true,chromaMultiplier:e=>{if(!e.isDark){if(e.variant===D.NEUTRAL)return 2.5;if(e.variant===D.TONAL_SPOT)return 1.7;if(e.variant===D.EXPRESSIVE)return he.isYellow(e.neutralPalette.hue)?2.7:1.75;if(e.variant===D.VIBRANT)return 1.36}return 1}});return se(super.surfaceDim(),"2025",t)}surfaceBright(){let t=x.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?18:he.isYellow(e.neutralPalette.hue)?99:e.variant===D.VIBRANT?97:98,isBackground:true,chromaMultiplier:e=>{if(e.isDark){if(e.variant===D.NEUTRAL)return 2.5;if(e.variant===D.TONAL_SPOT)return 1.7;if(e.variant===D.EXPRESSIVE)return he.isYellow(e.neutralPalette.hue)?2.7:1.75;if(e.variant===D.VIBRANT)return 1.36}return 1}});return se(super.surfaceBright(),"2025",t)}surfaceContainerLowest(){let t=x.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?0:100,isBackground:true});return se(super.surfaceContainerLowest(),"2025",t)}surfaceContainerLow(){let t=x.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?6:he.isYellow(e.neutralPalette.hue)?98:e.variant===D.VIBRANT?95:96:15,isBackground:true,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===D.NEUTRAL)return 1.3;if(e.variant===D.TONAL_SPOT)return 1.25;if(e.variant===D.EXPRESSIVE)return he.isYellow(e.neutralPalette.hue)?1.3:1.15;if(e.variant===D.VIBRANT)return 1.08}return 1}});return se(super.surfaceContainerLow(),"2025",t)}surfaceContainer(){let t=x.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?9:he.isYellow(e.neutralPalette.hue)?96:e.variant===D.VIBRANT?92:94:20,isBackground:true,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===D.NEUTRAL)return 1.6;if(e.variant===D.TONAL_SPOT)return 1.4;if(e.variant===D.EXPRESSIVE)return he.isYellow(e.neutralPalette.hue)?1.6:1.3;if(e.variant===D.VIBRANT)return 1.15}return 1}});return se(super.surfaceContainer(),"2025",t)}surfaceContainerHigh(){let t=x.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?12:he.isYellow(e.neutralPalette.hue)?94:e.variant===D.VIBRANT?90:92:25,isBackground:true,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===D.NEUTRAL)return 1.9;if(e.variant===D.TONAL_SPOT)return 1.5;if(e.variant===D.EXPRESSIVE)return he.isYellow(e.neutralPalette.hue)?1.95:1.45;if(e.variant===D.VIBRANT)return 1.22}return 1}});return se(super.surfaceContainerHigh(),"2025",t)}surfaceContainerHighest(){let t=x.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?15:he.isYellow(e.neutralPalette.hue)?92:e.variant===D.VIBRANT?88:90,isBackground:true,chromaMultiplier:e=>e.variant===D.NEUTRAL?2.2:e.variant===D.TONAL_SPOT?1.7:e.variant===D.EXPRESSIVE?he.isYellow(e.neutralPalette.hue)?2.3:1.6:e.variant===D.VIBRANT?1.29:1});return se(super.surfaceContainerHighest(),"2025",t)}onSurface(){let t=x.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.variant===D.VIBRANT?ve(e.neutralPalette,0,100,1.1):x.getInitialToneFromBackground(a=>a.platform==="phone"?this.highestSurface(a):this.surfaceContainerHigh())(e),chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===D.NEUTRAL)return 2.2;if(e.variant===D.TONAL_SPOT)return 1.7;if(e.variant===D.EXPRESSIVE)return he.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.isDark&&e.platform==="phone"?ae(11):ae(9)});return se(super.onSurface(),"2025",t)}onSurfaceVariant(){let t=x.fromPalette({name:"on_surface_variant",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===D.NEUTRAL)return 2.2;if(e.variant===D.TONAL_SPOT)return 1.7;if(e.variant===D.EXPRESSIVE)return he.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?e.isDark?ae(6):ae(4.5):ae(7)});return se(super.onSurfaceVariant(),"2025",t)}outline(){let t=x.fromPalette({name:"outline",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===D.NEUTRAL)return 2.2;if(e.variant===D.TONAL_SPOT)return 1.7;if(e.variant===D.EXPRESSIVE)return he.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?ae(3):ae(4.5)});return se(super.outline(),"2025",t)}outlineVariant(){let t=x.fromPalette({name:"outline_variant",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===D.NEUTRAL)return 2.2;if(e.variant===D.TONAL_SPOT)return 1.7;if(e.variant===D.EXPRESSIVE)return he.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?ae(1.5):ae(3)});return se(super.outlineVariant(),"2025",t)}inverseSurface(){let t=x.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?98:4,isBackground:true});return se(super.inverseSurface(),"2025",t)}inverseOnSurface(){let t=x.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,background:e=>this.inverseSurface(),contrastCurve:e=>ae(7)});return se(super.inverseOnSurface(),"2025",t)}primary(){let t=x.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>e.variant===D.NEUTRAL?e.platform==="phone"?e.isDark?80:40:90:e.variant===D.TONAL_SPOT?e.platform==="phone"?e.isDark?80:ve(e.primaryPalette):ve(e.primaryPalette,0,90):e.variant===D.EXPRESSIVE?e.platform==="phone"?ve(e.primaryPalette,0,he.isYellow(e.primaryPalette.hue)?25:he.isCyan(e.primaryPalette.hue)?88:98):ve(e.primaryPalette):e.platform==="phone"?ve(e.primaryPalette,0,he.isCyan(e.primaryPalette.hue)?88:98):ve(e.primaryPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?ae(4.5):ae(7),toneDeltaPair:e=>e.platform==="phone"?new _e(this.primaryContainer(),this.primary(),5,"relative_lighter",true,"farther"):void 0});return se(super.primary(),"2025",t)}primaryDim(){return x.fromPalette({name:"primary_dim",palette:t=>t.primaryPalette,tone:t=>t.variant===D.NEUTRAL?85:t.variant===D.TONAL_SPOT?ve(t.primaryPalette,0,90):ve(t.primaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>ae(4.5),toneDeltaPair:t=>new _e(this.primaryDim(),this.primary(),5,"darker",true,"farther")})}onPrimary(){let t=x.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,background:e=>e.platform==="phone"?this.primary():this.primaryDim(),contrastCurve:e=>e.platform==="phone"?ae(6):ae(7)});return se(super.onPrimary(),"2025",t)}primaryContainer(){let t=x.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>e.platform==="watch"?30:e.variant===D.NEUTRAL?e.isDark?30:90:e.variant===D.TONAL_SPOT?e.isDark?jt(e.primaryPalette,35,93):ve(e.primaryPalette,0,90):e.variant===D.EXPRESSIVE?e.isDark?ve(e.primaryPalette,30,93):ve(e.primaryPalette,78,he.isCyan(e.primaryPalette.hue)?88:90):e.isDark?jt(e.primaryPalette,66,93):ve(e.primaryPalette,66,he.isCyan(e.primaryPalette.hue)?88:93),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="phone"?void 0:new _e(this.primaryContainer(),this.primaryDim(),10,"darker",true,"farther"),contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?ae(1.5):void 0});return se(super.primaryContainer(),"2025",t)}onPrimaryContainer(){let t=x.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,background:e=>this.primaryContainer(),contrastCurve:e=>e.platform==="phone"?ae(6):ae(7)});return se(super.onPrimaryContainer(),"2025",t)}primaryFixed(){let t=x.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>{let a=Object.assign({},e,{isDark:false,contrastLevel:0});return this.primaryContainer().getTone(a)},isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?ae(1.5):void 0});return se(super.primaryFixed(),"2025",t)}primaryFixedDim(){let t=x.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>this.primaryFixed().getTone(e),isBackground:true,toneDeltaPair:e=>new _e(this.primaryFixedDim(),this.primaryFixed(),5,"darker",true,"exact")});return se(super.primaryFixedDim(),"2025",t)}onPrimaryFixed(){let t=x.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,background:e=>this.primaryFixedDim(),contrastCurve:e=>ae(7)});return se(super.onPrimaryFixed(),"2025",t)}onPrimaryFixedVariant(){let t=x.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,background:e=>this.primaryFixedDim(),contrastCurve:e=>ae(4.5)});return se(super.onPrimaryFixedVariant(),"2025",t)}inversePrimary(){let t=x.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>ve(e.primaryPalette),background:e=>this.inverseSurface(),contrastCurve:e=>e.platform==="phone"?ae(6):ae(7)});return se(super.inversePrimary(),"2025",t)}secondary(){let t=x.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.platform==="watch"?e.variant===D.NEUTRAL?90:ve(e.secondaryPalette,0,90):e.variant===D.NEUTRAL?e.isDark?jt(e.secondaryPalette,0,98):ve(e.secondaryPalette):e.variant===D.VIBRANT?ve(e.secondaryPalette,0,e.isDark?90:98):e.isDark?80:ve(e.secondaryPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?ae(4.5):ae(7),toneDeltaPair:e=>e.platform==="phone"?new _e(this.secondaryContainer(),this.secondary(),5,"relative_lighter",true,"farther"):void 0});return se(super.secondary(),"2025",t)}secondaryDim(){return x.fromPalette({name:"secondary_dim",palette:t=>t.secondaryPalette,tone:t=>t.variant===D.NEUTRAL?85:ve(t.secondaryPalette,0,90),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>ae(4.5),toneDeltaPair:t=>new _e(this.secondaryDim(),this.secondary(),5,"darker",true,"farther")})}onSecondary(){let t=x.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,background:e=>e.platform==="phone"?this.secondary():this.secondaryDim(),contrastCurve:e=>e.platform==="phone"?ae(6):ae(7)});return se(super.onSecondary(),"2025",t)}secondaryContainer(){let t=x.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>e.platform==="watch"?30:e.variant===D.VIBRANT?e.isDark?jt(e.secondaryPalette,30,40):ve(e.secondaryPalette,84,90):e.variant===D.EXPRESSIVE?e.isDark?15:ve(e.secondaryPalette,90,95):e.isDark?25:90,isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new _e(this.secondaryContainer(),this.secondaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?ae(1.5):void 0});return se(super.secondaryContainer(),"2025",t)}onSecondaryContainer(){let t=x.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,background:e=>this.secondaryContainer(),contrastCurve:e=>e.platform==="phone"?ae(6):ae(7)});return se(super.onSecondaryContainer(),"2025",t)}secondaryFixed(){let t=x.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>{let a=Object.assign({},e,{isDark:false,contrastLevel:0});return this.secondaryContainer().getTone(a)},isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?ae(1.5):void 0});return se(super.secondaryFixed(),"2025",t)}secondaryFixedDim(){let t=x.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>this.secondaryFixed().getTone(e),isBackground:true,toneDeltaPair:e=>new _e(this.secondaryFixedDim(),this.secondaryFixed(),5,"darker",true,"exact")});return se(super.secondaryFixedDim(),"2025",t)}onSecondaryFixed(){let t=x.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,background:e=>this.secondaryFixedDim(),contrastCurve:e=>ae(7)});return se(super.onSecondaryFixed(),"2025",t)}onSecondaryFixedVariant(){let t=x.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,background:e=>this.secondaryFixedDim(),contrastCurve:e=>ae(4.5)});return se(super.onSecondaryFixedVariant(),"2025",t)}tertiary(){let t=x.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>e.platform==="watch"?e.variant===D.TONAL_SPOT?ve(e.tertiaryPalette,0,90):ve(e.tertiaryPalette):e.variant===D.EXPRESSIVE||e.variant===D.VIBRANT?ve(e.tertiaryPalette,0,he.isCyan(e.tertiaryPalette.hue)?88:e.isDark?98:100):e.isDark?ve(e.tertiaryPalette,0,98):ve(e.tertiaryPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?ae(4.5):ae(7),toneDeltaPair:e=>e.platform==="phone"?new _e(this.tertiaryContainer(),this.tertiary(),5,"relative_lighter",true,"farther"):void 0});return se(super.tertiary(),"2025",t)}tertiaryDim(){return x.fromPalette({name:"tertiary_dim",palette:t=>t.tertiaryPalette,tone:t=>t.variant===D.TONAL_SPOT?ve(t.tertiaryPalette,0,90):ve(t.tertiaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>ae(4.5),toneDeltaPair:t=>new _e(this.tertiaryDim(),this.tertiary(),5,"darker",true,"farther")})}onTertiary(){let t=x.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,background:e=>e.platform==="phone"?this.tertiary():this.tertiaryDim(),contrastCurve:e=>e.platform==="phone"?ae(6):ae(7)});return se(super.onTertiary(),"2025",t)}tertiaryContainer(){let t=x.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>e.platform==="watch"?e.variant===D.TONAL_SPOT?ve(e.tertiaryPalette,0,90):ve(e.tertiaryPalette):e.variant===D.NEUTRAL?e.isDark?ve(e.tertiaryPalette,0,93):ve(e.tertiaryPalette,0,96):e.variant===D.TONAL_SPOT?ve(e.tertiaryPalette,0,e.isDark?93:100):e.variant===D.EXPRESSIVE?ve(e.tertiaryPalette,75,he.isCyan(e.tertiaryPalette.hue)?88:e.isDark?93:100):e.isDark?ve(e.tertiaryPalette,0,93):ve(e.tertiaryPalette,72,100),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new _e(this.tertiaryContainer(),this.tertiaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?ae(1.5):void 0});return se(super.tertiaryContainer(),"2025",t)}onTertiaryContainer(){let t=x.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryContainer(),contrastCurve:e=>e.platform==="phone"?ae(6):ae(7)});return se(super.onTertiaryContainer(),"2025",t)}tertiaryFixed(){let t=x.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>{let a=Object.assign({},e,{isDark:false,contrastLevel:0});return this.tertiaryContainer().getTone(a)},isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?ae(1.5):void 0});return se(super.tertiaryFixed(),"2025",t)}tertiaryFixedDim(){let t=x.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>this.tertiaryFixed().getTone(e),isBackground:true,toneDeltaPair:e=>new _e(this.tertiaryFixedDim(),this.tertiaryFixed(),5,"darker",true,"exact")});return se(super.tertiaryFixedDim(),"2025",t)}onTertiaryFixed(){let t=x.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryFixedDim(),contrastCurve:e=>ae(7)});return se(super.onTertiaryFixed(),"2025",t)}onTertiaryFixedVariant(){let t=x.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryFixedDim(),contrastCurve:e=>ae(4.5)});return se(super.onTertiaryFixedVariant(),"2025",t)}error(){let t=x.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.platform==="phone"?e.isDark?jt(e.errorPalette,0,98):ve(e.errorPalette):jt(e.errorPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?ae(4.5):ae(7),toneDeltaPair:e=>e.platform==="phone"?new _e(this.errorContainer(),this.error(),5,"relative_lighter",true,"farther"):void 0});return se(super.error(),"2025",t)}errorDim(){return x.fromPalette({name:"error_dim",palette:t=>t.errorPalette,tone:t=>jt(t.errorPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>ae(4.5),toneDeltaPair:t=>new _e(this.errorDim(),this.error(),5,"darker",true,"farther")})}onError(){let t=x.fromPalette({name:"on_error",palette:e=>e.errorPalette,background:e=>e.platform==="phone"?this.error():this.errorDim(),contrastCurve:e=>e.platform==="phone"?ae(6):ae(7)});return se(super.onError(),"2025",t)}errorContainer(){let t=x.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.platform==="watch"?30:e.isDark?jt(e.errorPalette,30,93):ve(e.errorPalette,0,90),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new _e(this.errorContainer(),this.errorDim(),10,"darker",true,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?ae(1.5):void 0});return se(super.errorContainer(),"2025",t)}onErrorContainer(){let t=x.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,background:e=>this.errorContainer(),contrastCurve:e=>e.platform==="phone"?ae(4.5):ae(7)});return se(super.onErrorContainer(),"2025",t)}surfaceVariant(){let t=Object.assign(this.surfaceContainerHighest().clone(),{name:"surface_variant"});return se(super.surfaceVariant(),"2025",t)}surfaceTint(){let t=Object.assign(this.primary().clone(),{name:"surface_tint"});return se(super.surfaceTint(),"2025",t)}background(){let t=Object.assign(this.surface().clone(),{name:"background"});return se(super.background(),"2025",t)}onBackground(){let t=Object.assign(this.onSurface().clone(),{name:"on_background",tone:e=>e.platform==="watch"?100:this.onSurface().getTone(e)});return se(super.onBackground(),"2025",t)}},O=class X{constructor(){this.allColors=[this.background(),this.onBackground(),this.surface(),this.surfaceDim(),this.surfaceBright(),this.surfaceContainerLowest(),this.surfaceContainerLow(),this.surfaceContainer(),this.surfaceContainerHigh(),this.surfaceContainerHighest(),this.onSurface(),this.onSurfaceVariant(),this.outline(),this.outlineVariant(),this.inverseSurface(),this.inverseOnSurface(),this.primary(),this.primaryDim(),this.onPrimary(),this.primaryContainer(),this.onPrimaryContainer(),this.primaryFixed(),this.primaryFixedDim(),this.onPrimaryFixed(),this.onPrimaryFixedVariant(),this.inversePrimary(),this.secondary(),this.secondaryDim(),this.onSecondary(),this.secondaryContainer(),this.onSecondaryContainer(),this.secondaryFixed(),this.secondaryFixedDim(),this.onSecondaryFixed(),this.onSecondaryFixedVariant(),this.tertiary(),this.tertiaryDim(),this.onTertiary(),this.tertiaryContainer(),this.onTertiaryContainer(),this.tertiaryFixed(),this.tertiaryFixedDim(),this.onTertiaryFixed(),this.onTertiaryFixedVariant(),this.error(),this.errorDim(),this.onError(),this.errorContainer(),this.onErrorContainer()].filter(e=>e!==void 0);}highestSurface(e){return X.colorSpec.highestSurface(e)}primaryPaletteKeyColor(){return X.colorSpec.primaryPaletteKeyColor()}secondaryPaletteKeyColor(){return X.colorSpec.secondaryPaletteKeyColor()}tertiaryPaletteKeyColor(){return X.colorSpec.tertiaryPaletteKeyColor()}neutralPaletteKeyColor(){return X.colorSpec.neutralPaletteKeyColor()}neutralVariantPaletteKeyColor(){return X.colorSpec.neutralVariantPaletteKeyColor()}errorPaletteKeyColor(){return X.colorSpec.errorPaletteKeyColor()}background(){return X.colorSpec.background()}onBackground(){return X.colorSpec.onBackground()}surface(){return X.colorSpec.surface()}surfaceDim(){return X.colorSpec.surfaceDim()}surfaceBright(){return X.colorSpec.surfaceBright()}surfaceContainerLowest(){return X.colorSpec.surfaceContainerLowest()}surfaceContainerLow(){return X.colorSpec.surfaceContainerLow()}surfaceContainer(){return X.colorSpec.surfaceContainer()}surfaceContainerHigh(){return X.colorSpec.surfaceContainerHigh()}surfaceContainerHighest(){return X.colorSpec.surfaceContainerHighest()}onSurface(){return X.colorSpec.onSurface()}surfaceVariant(){return X.colorSpec.surfaceVariant()}onSurfaceVariant(){return X.colorSpec.onSurfaceVariant()}outline(){return X.colorSpec.outline()}outlineVariant(){return X.colorSpec.outlineVariant()}inverseSurface(){return X.colorSpec.inverseSurface()}inverseOnSurface(){return X.colorSpec.inverseOnSurface()}shadow(){return X.colorSpec.shadow()}scrim(){return X.colorSpec.scrim()}surfaceTint(){return X.colorSpec.surfaceTint()}primary(){return X.colorSpec.primary()}primaryDim(){return X.colorSpec.primaryDim()}onPrimary(){return X.colorSpec.onPrimary()}primaryContainer(){return X.colorSpec.primaryContainer()}onPrimaryContainer(){return X.colorSpec.onPrimaryContainer()}inversePrimary(){return X.colorSpec.inversePrimary()}primaryFixed(){return X.colorSpec.primaryFixed()}primaryFixedDim(){return X.colorSpec.primaryFixedDim()}onPrimaryFixed(){return X.colorSpec.onPrimaryFixed()}onPrimaryFixedVariant(){return X.colorSpec.onPrimaryFixedVariant()}secondary(){return X.colorSpec.secondary()}secondaryDim(){return X.colorSpec.secondaryDim()}onSecondary(){return X.colorSpec.onSecondary()}secondaryContainer(){return X.colorSpec.secondaryContainer()}onSecondaryContainer(){return X.colorSpec.onSecondaryContainer()}secondaryFixed(){return X.colorSpec.secondaryFixed()}secondaryFixedDim(){return X.colorSpec.secondaryFixedDim()}onSecondaryFixed(){return X.colorSpec.onSecondaryFixed()}onSecondaryFixedVariant(){return X.colorSpec.onSecondaryFixedVariant()}tertiary(){return X.colorSpec.tertiary()}tertiaryDim(){return X.colorSpec.tertiaryDim()}onTertiary(){return X.colorSpec.onTertiary()}tertiaryContainer(){return X.colorSpec.tertiaryContainer()}onTertiaryContainer(){return X.colorSpec.onTertiaryContainer()}tertiaryFixed(){return X.colorSpec.tertiaryFixed()}tertiaryFixedDim(){return X.colorSpec.tertiaryFixedDim()}onTertiaryFixed(){return X.colorSpec.onTertiaryFixed()}onTertiaryFixedVariant(){return X.colorSpec.onTertiaryFixedVariant()}error(){return X.colorSpec.error()}errorDim(){return X.colorSpec.errorDim()}onError(){return X.colorSpec.onError()}errorContainer(){return X.colorSpec.errorContainer()}onErrorContainer(){return X.colorSpec.onErrorContainer()}static highestSurface(e){return X.colorSpec.highestSurface(e)}};O.contentAccentToneDelta=15;O.colorSpec=new Mh;O.primaryPaletteKeyColor=O.colorSpec.primaryPaletteKeyColor();O.secondaryPaletteKeyColor=O.colorSpec.secondaryPaletteKeyColor();O.tertiaryPaletteKeyColor=O.colorSpec.tertiaryPaletteKeyColor();O.neutralPaletteKeyColor=O.colorSpec.neutralPaletteKeyColor();O.neutralVariantPaletteKeyColor=O.colorSpec.neutralVariantPaletteKeyColor();O.background=O.colorSpec.background();O.onBackground=O.colorSpec.onBackground();O.surface=O.colorSpec.surface();O.surfaceDim=O.colorSpec.surfaceDim();O.surfaceBright=O.colorSpec.surfaceBright();O.surfaceContainerLowest=O.colorSpec.surfaceContainerLowest();O.surfaceContainerLow=O.colorSpec.surfaceContainerLow();O.surfaceContainer=O.colorSpec.surfaceContainer();O.surfaceContainerHigh=O.colorSpec.surfaceContainerHigh();O.surfaceContainerHighest=O.colorSpec.surfaceContainerHighest();O.onSurface=O.colorSpec.onSurface();O.surfaceVariant=O.colorSpec.surfaceVariant();O.onSurfaceVariant=O.colorSpec.onSurfaceVariant();O.inverseSurface=O.colorSpec.inverseSurface();O.inverseOnSurface=O.colorSpec.inverseOnSurface();O.outline=O.colorSpec.outline();O.outlineVariant=O.colorSpec.outlineVariant();O.shadow=O.colorSpec.shadow();O.scrim=O.colorSpec.scrim();O.surfaceTint=O.colorSpec.surfaceTint();O.primary=O.colorSpec.primary();O.onPrimary=O.colorSpec.onPrimary();O.primaryContainer=O.colorSpec.primaryContainer();O.onPrimaryContainer=O.colorSpec.onPrimaryContainer();O.inversePrimary=O.colorSpec.inversePrimary();O.secondary=O.colorSpec.secondary();O.onSecondary=O.colorSpec.onSecondary();O.secondaryContainer=O.colorSpec.secondaryContainer();O.onSecondaryContainer=O.colorSpec.onSecondaryContainer();O.tertiary=O.colorSpec.tertiary();O.onTertiary=O.colorSpec.onTertiary();O.tertiaryContainer=O.colorSpec.tertiaryContainer();O.onTertiaryContainer=O.colorSpec.onTertiaryContainer();O.error=O.colorSpec.error();O.onError=O.colorSpec.onError();O.errorContainer=O.colorSpec.errorContainer();O.onErrorContainer=O.colorSpec.onErrorContainer();O.primaryFixed=O.colorSpec.primaryFixed();O.primaryFixedDim=O.colorSpec.primaryFixedDim();O.onPrimaryFixed=O.colorSpec.onPrimaryFixed();O.onPrimaryFixedVariant=O.colorSpec.onPrimaryFixedVariant();O.secondaryFixed=O.colorSpec.secondaryFixed();O.secondaryFixedDim=O.colorSpec.secondaryFixedDim();O.onSecondaryFixed=O.colorSpec.onSecondaryFixed();O.onSecondaryFixedVariant=O.colorSpec.onSecondaryFixedVariant();O.tertiaryFixed=O.colorSpec.tertiaryFixed();O.tertiaryFixedDim=O.colorSpec.tertiaryFixedDim();O.onTertiaryFixed=O.colorSpec.onTertiaryFixed();O.onTertiaryFixedVariant=O.colorSpec.onTertiaryFixedVariant();var ze=class sn{static maybeFallbackSpecVersion(e,a){switch(a){case D.EXPRESSIVE:case D.VIBRANT:case D.TONAL_SPOT:case D.NEUTRAL:return e;default:return "2021"}}constructor(e){this.sourceColorArgb=e.sourceColorHct.toInt(),this.variant=e.variant,this.contrastLevel=e.contrastLevel,this.isDark=e.isDark,this.platform=e.platform??"phone",this.specVersion=sn.maybeFallbackSpecVersion(e.specVersion??"2021",this.variant),this.sourceColorHct=e.sourceColorHct,this.primaryPalette=e.primaryPalette??Mr(this.specVersion).getPrimaryPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.secondaryPalette=e.secondaryPalette??Mr(this.specVersion).getSecondaryPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.tertiaryPalette=e.tertiaryPalette??Mr(this.specVersion).getTertiaryPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralPalette=e.neutralPalette??Mr(this.specVersion).getNeutralPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralVariantPalette=e.neutralVariantPalette??Mr(this.specVersion).getNeutralVariantPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.errorPalette=e.errorPalette??Mr(this.specVersion).getErrorPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel)??K.fromHueAndChroma(25,84),this.colors=new O;}toString(){return `Scheme: variant=${D[this.variant]}, mode=${this.isDark?"dark":"light"}, platform=${this.platform}, contrastLevel=${this.contrastLevel.toFixed(1)}, seed=${this.sourceColorHct.toString()}, specVersion=${this.specVersion}`}static getPiecewiseHue(e,a,n){let i=Math.min(a.length-1,n.length),l=e.hue;for(let c=0;c<i;c++)if(l>=a[c]&&l<a[c+1])return ht(n[c]);return l}static getRotatedHue(e,a,n){let i=sn.getPiecewiseHue(e,a,n);return Math.min(a.length-1,n.length)<=0&&(i=0),ht(e.hue+i)}getArgb(e){return e.getArgb(this)}getHct(e){return e.getHct(this)}get primaryPaletteKeyColor(){return this.getArgb(this.colors.primaryPaletteKeyColor())}get secondaryPaletteKeyColor(){return this.getArgb(this.colors.secondaryPaletteKeyColor())}get tertiaryPaletteKeyColor(){return this.getArgb(this.colors.tertiaryPaletteKeyColor())}get neutralPaletteKeyColor(){return this.getArgb(this.colors.neutralPaletteKeyColor())}get neutralVariantPaletteKeyColor(){return this.getArgb(this.colors.neutralVariantPaletteKeyColor())}get errorPaletteKeyColor(){return this.getArgb(this.colors.errorPaletteKeyColor())}get background(){return this.getArgb(this.colors.background())}get onBackground(){return this.getArgb(this.colors.onBackground())}get surface(){return this.getArgb(this.colors.surface())}get surfaceDim(){return this.getArgb(this.colors.surfaceDim())}get surfaceBright(){return this.getArgb(this.colors.surfaceBright())}get surfaceContainerLowest(){return this.getArgb(this.colors.surfaceContainerLowest())}get surfaceContainerLow(){return this.getArgb(this.colors.surfaceContainerLow())}get surfaceContainer(){return this.getArgb(this.colors.surfaceContainer())}get surfaceContainerHigh(){return this.getArgb(this.colors.surfaceContainerHigh())}get surfaceContainerHighest(){return this.getArgb(this.colors.surfaceContainerHighest())}get onSurface(){return this.getArgb(this.colors.onSurface())}get surfaceVariant(){return this.getArgb(this.colors.surfaceVariant())}get onSurfaceVariant(){return this.getArgb(this.colors.onSurfaceVariant())}get inverseSurface(){return this.getArgb(this.colors.inverseSurface())}get inverseOnSurface(){return this.getArgb(this.colors.inverseOnSurface())}get outline(){return this.getArgb(this.colors.outline())}get outlineVariant(){return this.getArgb(this.colors.outlineVariant())}get shadow(){return this.getArgb(this.colors.shadow())}get scrim(){return this.getArgb(this.colors.scrim())}get surfaceTint(){return this.getArgb(this.colors.surfaceTint())}get primary(){return this.getArgb(this.colors.primary())}get primaryDim(){let e=this.colors.primaryDim();if(e===void 0)throw new Error("`primaryDim` color is undefined prior to 2025 spec.");return this.getArgb(e)}get onPrimary(){return this.getArgb(this.colors.onPrimary())}get primaryContainer(){return this.getArgb(this.colors.primaryContainer())}get onPrimaryContainer(){return this.getArgb(this.colors.onPrimaryContainer())}get primaryFixed(){return this.getArgb(this.colors.primaryFixed())}get primaryFixedDim(){return this.getArgb(this.colors.primaryFixedDim())}get onPrimaryFixed(){return this.getArgb(this.colors.onPrimaryFixed())}get onPrimaryFixedVariant(){return this.getArgb(this.colors.onPrimaryFixedVariant())}get inversePrimary(){return this.getArgb(this.colors.inversePrimary())}get secondary(){return this.getArgb(this.colors.secondary())}get secondaryDim(){let e=this.colors.secondaryDim();if(e===void 0)throw new Error("`secondaryDim` color is undefined prior to 2025 spec.");return this.getArgb(e)}get onSecondary(){return this.getArgb(this.colors.onSecondary())}get secondaryContainer(){return this.getArgb(this.colors.secondaryContainer())}get onSecondaryContainer(){return this.getArgb(this.colors.onSecondaryContainer())}get secondaryFixed(){return this.getArgb(this.colors.secondaryFixed())}get secondaryFixedDim(){return this.getArgb(this.colors.secondaryFixedDim())}get onSecondaryFixed(){return this.getArgb(this.colors.onSecondaryFixed())}get onSecondaryFixedVariant(){return this.getArgb(this.colors.onSecondaryFixedVariant())}get tertiary(){return this.getArgb(this.colors.tertiary())}get tertiaryDim(){let e=this.colors.tertiaryDim();if(e===void 0)throw new Error("`tertiaryDim` color is undefined prior to 2025 spec.");return this.getArgb(e)}get onTertiary(){return this.getArgb(this.colors.onTertiary())}get tertiaryContainer(){return this.getArgb(this.colors.tertiaryContainer())}get onTertiaryContainer(){return this.getArgb(this.colors.onTertiaryContainer())}get tertiaryFixed(){return this.getArgb(this.colors.tertiaryFixed())}get tertiaryFixedDim(){return this.getArgb(this.colors.tertiaryFixedDim())}get onTertiaryFixed(){return this.getArgb(this.colors.onTertiaryFixed())}get onTertiaryFixedVariant(){return this.getArgb(this.colors.onTertiaryFixedVariant())}get error(){return this.getArgb(this.colors.error())}get errorDim(){let e=this.colors.errorDim();if(e===void 0)throw new Error("`errorDim` color is undefined prior to 2025 spec.");return this.getArgb(e)}get onError(){return this.getArgb(this.colors.onError())}get errorContainer(){return this.getArgb(this.colors.errorContainer())}get onErrorContainer(){return this.getArgb(this.colors.onErrorContainer())}};ze.DEFAULT_SPEC_VERSION="2021";ze.DEFAULT_PLATFORM="phone";var ei=class{getPrimaryPalette(t,e,a,n,i){switch(t){case D.CONTENT:case D.FIDELITY:return K.fromHueAndChroma(e.hue,e.chroma);case D.FRUIT_SALAD:return K.fromHueAndChroma(ht(e.hue-50),48);case D.MONOCHROME:return K.fromHueAndChroma(e.hue,0);case D.NEUTRAL:return K.fromHueAndChroma(e.hue,12);case D.RAINBOW:return K.fromHueAndChroma(e.hue,48);case D.TONAL_SPOT:return K.fromHueAndChroma(e.hue,36);case D.EXPRESSIVE:return K.fromHueAndChroma(ht(e.hue+240),40);case D.VIBRANT:return K.fromHueAndChroma(e.hue,200);default:throw new Error(`Unsupported variant: ${t}`)}}getSecondaryPalette(t,e,a,n,i){switch(t){case D.CONTENT:case D.FIDELITY:return K.fromHueAndChroma(e.hue,Math.max(e.chroma-32,e.chroma*.5));case D.FRUIT_SALAD:return K.fromHueAndChroma(ht(e.hue-50),36);case D.MONOCHROME:return K.fromHueAndChroma(e.hue,0);case D.NEUTRAL:return K.fromHueAndChroma(e.hue,8);case D.RAINBOW:return K.fromHueAndChroma(e.hue,16);case D.TONAL_SPOT:return K.fromHueAndChroma(e.hue,16);case D.EXPRESSIVE:return K.fromHueAndChroma(ze.getRotatedHue(e,[0,21,51,121,151,191,271,321,360],[45,95,45,20,45,90,45,45,45]),24);case D.VIBRANT:return K.fromHueAndChroma(ze.getRotatedHue(e,[0,41,61,101,131,181,251,301,360],[18,15,10,12,15,18,15,12,12]),24);default:throw new Error(`Unsupported variant: ${t}`)}}getTertiaryPalette(t,e,a,n,i){switch(t){case D.CONTENT:return K.fromHct(on.fixIfDisliked(new xo(e).analogous(3,6)[2]));case D.FIDELITY:return K.fromHct(on.fixIfDisliked(new xo(e).complement));case D.FRUIT_SALAD:return K.fromHueAndChroma(e.hue,36);case D.MONOCHROME:return K.fromHueAndChroma(e.hue,0);case D.NEUTRAL:return K.fromHueAndChroma(e.hue,16);case D.RAINBOW:case D.TONAL_SPOT:return K.fromHueAndChroma(ht(e.hue+60),24);case D.EXPRESSIVE:return K.fromHueAndChroma(ze.getRotatedHue(e,[0,21,51,121,151,191,271,321,360],[120,120,20,45,20,15,20,120,120]),32);case D.VIBRANT:return K.fromHueAndChroma(ze.getRotatedHue(e,[0,41,61,101,131,181,251,301,360],[35,30,20,25,30,35,30,25,25]),32);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralPalette(t,e,a,n,i){switch(t){case D.CONTENT:case D.FIDELITY:return K.fromHueAndChroma(e.hue,e.chroma/8);case D.FRUIT_SALAD:return K.fromHueAndChroma(e.hue,10);case D.MONOCHROME:return K.fromHueAndChroma(e.hue,0);case D.NEUTRAL:return K.fromHueAndChroma(e.hue,2);case D.RAINBOW:return K.fromHueAndChroma(e.hue,0);case D.TONAL_SPOT:return K.fromHueAndChroma(e.hue,6);case D.EXPRESSIVE:return K.fromHueAndChroma(ht(e.hue+15),8);case D.VIBRANT:return K.fromHueAndChroma(e.hue,10);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralVariantPalette(t,e,a,n,i){switch(t){case D.CONTENT:return K.fromHueAndChroma(e.hue,e.chroma/8+4);case D.FIDELITY:return K.fromHueAndChroma(e.hue,e.chroma/8+4);case D.FRUIT_SALAD:return K.fromHueAndChroma(e.hue,16);case D.MONOCHROME:return K.fromHueAndChroma(e.hue,0);case D.NEUTRAL:return K.fromHueAndChroma(e.hue,2);case D.RAINBOW:return K.fromHueAndChroma(e.hue,0);case D.TONAL_SPOT:return K.fromHueAndChroma(e.hue,8);case D.EXPRESSIVE:return K.fromHueAndChroma(ht(e.hue+15),12);case D.VIBRANT:return K.fromHueAndChroma(e.hue,12);default:throw new Error(`Unsupported variant: ${t}`)}}getErrorPalette(t,e,a,n,i){}},Ah=class vt extends ei{getPrimaryPalette(e,a,n,i,l){switch(e){case D.NEUTRAL:return K.fromHueAndChroma(a.hue,i==="phone"?he.isBlue(a.hue)?12:8:he.isBlue(a.hue)?16:12);case D.TONAL_SPOT:return K.fromHueAndChroma(a.hue,i==="phone"&&n?26:32);case D.EXPRESSIVE:return K.fromHueAndChroma(a.hue,i==="phone"?n?36:48:40);case D.VIBRANT:return K.fromHueAndChroma(a.hue,i==="phone"?74:56);default:return super.getPrimaryPalette(e,a,n,i,l)}}getSecondaryPalette(e,a,n,i,l){switch(e){case D.NEUTRAL:return K.fromHueAndChroma(a.hue,i==="phone"?he.isBlue(a.hue)?6:4:he.isBlue(a.hue)?10:6);case D.TONAL_SPOT:return K.fromHueAndChroma(a.hue,16);case D.EXPRESSIVE:return K.fromHueAndChroma(ze.getRotatedHue(a,[0,105,140,204,253,278,300,333,360],[-160,155,-100,96,-96,-156,-165,-160]),i==="phone"&&n?16:24);case D.VIBRANT:return K.fromHueAndChroma(ze.getRotatedHue(a,[0,38,105,140,333,360],[-14,10,-14,10,-14]),i==="phone"?56:36);default:return super.getSecondaryPalette(e,a,n,i,l)}}getTertiaryPalette(e,a,n,i,l){switch(e){case D.NEUTRAL:return K.fromHueAndChroma(ze.getRotatedHue(a,[0,38,105,161,204,278,333,360],[-32,26,10,-39,24,-15,-32]),i==="phone"?20:36);case D.TONAL_SPOT:return K.fromHueAndChroma(ze.getRotatedHue(a,[0,20,71,161,333,360],[-40,48,-32,40,-32]),i==="phone"?28:32);case D.EXPRESSIVE:return K.fromHueAndChroma(ze.getRotatedHue(a,[0,105,140,204,253,278,300,333,360],[-165,160,-105,101,-101,-160,-170,-165]),48);case D.VIBRANT:return K.fromHueAndChroma(ze.getRotatedHue(a,[0,38,71,105,140,161,253,333,360],[-72,35,24,-24,62,50,62,-72]),56);default:return super.getTertiaryPalette(e,a,n,i,l)}}static getExpressiveNeutralHue(e){return ze.getRotatedHue(e,[0,71,124,253,278,300,360],[10,0,10,0,10,0])}static getExpressiveNeutralChroma(e,a,n){let i=vt.getExpressiveNeutralHue(e);return n==="phone"?a?he.isYellow(i)?6:14:18:12}static getVibrantNeutralHue(e){return ze.getRotatedHue(e,[0,38,105,140,333,360],[-14,10,-14,10,-14])}static getVibrantNeutralChroma(e,a){let n=vt.getVibrantNeutralHue(e);return a==="phone"||he.isBlue(n)?28:20}getNeutralPalette(e,a,n,i,l){switch(e){case D.NEUTRAL:return K.fromHueAndChroma(a.hue,i==="phone"?1.4:6);case D.TONAL_SPOT:return K.fromHueAndChroma(a.hue,i==="phone"?5:10);case D.EXPRESSIVE:return K.fromHueAndChroma(vt.getExpressiveNeutralHue(a),vt.getExpressiveNeutralChroma(a,n,i));case D.VIBRANT:return K.fromHueAndChroma(vt.getVibrantNeutralHue(a),vt.getVibrantNeutralChroma(a,i));default:return super.getNeutralPalette(e,a,n,i,l)}}getNeutralVariantPalette(e,a,n,i,l){switch(e){case D.NEUTRAL:return K.fromHueAndChroma(a.hue,(i==="phone"?1.4:6)*2.2);case D.TONAL_SPOT:return K.fromHueAndChroma(a.hue,(i==="phone"?5:10)*1.7);case D.EXPRESSIVE:let c=vt.getExpressiveNeutralHue(a),d=vt.getExpressiveNeutralChroma(a,n,i);return K.fromHueAndChroma(c,d*(c>=105&&c<125?1.6:2.3));case D.VIBRANT:let p=vt.getVibrantNeutralHue(a),f=vt.getVibrantNeutralChroma(a,i);return K.fromHueAndChroma(p,f*1.29);default:return super.getNeutralVariantPalette(e,a,n,i,l)}}getErrorPalette(e,a,n,i,l){let c=ze.getPiecewiseHue(a,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);switch(e){case D.NEUTRAL:return K.fromHueAndChroma(c,i==="phone"?50:40);case D.TONAL_SPOT:return K.fromHueAndChroma(c,i==="phone"?60:48);case D.EXPRESSIVE:return K.fromHueAndChroma(c,i==="phone"?64:48);case D.VIBRANT:return K.fromHueAndChroma(c,i==="phone"?80:60);default:return super.getErrorPalette(e,a,n,i,l)}}},xh=new ei,_h=new Ah;function Mr(t){return t==="2025"?_h:xh}var Fh=class extends ze{constructor(t,e,a,n=ze.DEFAULT_SPEC_VERSION,i=ze.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:D.VIBRANT,contrastLevel:a,isDark:e,platform:i,specVersion:n});}};function Oh(t){let e=Pn(t),a=Cn(t),n=vn(t),i=[e.toString(16),a.toString(16),n.toString(16)];for(let[l,c]of i.entries())c.length===1&&(i[l]="0"+c);return "#"+i.join("")}function Nh(t){t=t.replace("#","");let e=t.length===3,a=t.length===6,n=t.length===8;if(!e&&!a&&!n)throw new Error("unexpected hex "+t);let i=0,l=0,c=0;return e?(i=Bt(t.slice(0,1).repeat(2)),l=Bt(t.slice(1,2).repeat(2)),c=Bt(t.slice(2,3).repeat(2))):a?(i=Bt(t.slice(0,2)),l=Bt(t.slice(2,4)),c=Bt(t.slice(4,6))):n&&(i=Bt(t.slice(2,4)),l=Bt(t.slice(4,6)),c=Bt(t.slice(6,8))),(255<<24|(i&255)<<16|(l&255)<<8|c&255)>>>0}function Bt(t){return parseInt(t,16)}function Eh(t,e){let a=he.fromInt(Nh(t)),n=new Fh(a,e,0),i={},l=["primary","onPrimary","primaryContainer","onPrimaryContainer","secondary","onSecondary","secondaryContainer","onSecondaryContainer","tertiary","onTertiary","tertiaryContainer","onTertiaryContainer","error","onError","errorContainer","onErrorContainer","background","onBackground","surface","onSurface","surfaceVariant","onSurfaceVariant","outline","outlineVariant","shadow","scrim","inverseSurface","inverseOnSurface","inversePrimary","surfaceDim","surfaceBright","surfaceContainerLowest","surfaceContainerLow","surfaceContainer","surfaceContainerHigh","surfaceContainerHighest"];for(let c of l){let d=O[c];d&&(i[c]=Oh(d.getArgb(n)));}return i}function Bh(t,e){let a=0,n=0,i=0;return t.length===4?(a=parseInt(t[1]+t[1],16),n=parseInt(t[2]+t[2],16),i=parseInt(t[3]+t[3],16)):t.length===7&&(a=parseInt(t.slice(1,3),16),n=parseInt(t.slice(3,5),16),i=parseInt(t.slice(5,7),16)),`rgba(${a}, ${n}, ${i}, ${e})`}createContext(null);Eh("#6750A4",false);var qh=forwardRef((t,e)=>{let{currentDate:a,filterOptions:n,events:i,toolBar:l,filterBar:c,filterBy:d,backgroundMode:p,defaultView:f="month",enableAnimations:y=true,slideVariants:P={enter:ne=>({x:ne>0?"10%":"-10%",opacity:0}),center:{zIndex:1,x:0,opacity:1},exit:ne=>({zIndex:0,x:ne<0?"10%":"-10%",opacity:0})},transition:k={type:"spring",stiffness:300,damping:30,opacity:{duration:.2}},onEventClicked:v}=t,{themeColors:m}=Uo(),g=a?new Date(a):new Date,S=momentLocalizer(qa.default),E=useMemo(()=>i?i.filter(ne=>!d||d.length===0||d.includes("All")?true:d.every(Oe=>ne.eventCategory?.includes(Oe))).map(ne=>{let{eventTitle:Oe,eventStart:De,eventEnd:Ge,...tt}=ne;return {title:Oe,start:new Date(De),end:new Date(Ge),resource:tt}}):[],[i,d]),V=useMemo(()=>({event:ne=>jsx(lh,{...ne,onMouseEnter:()=>{},onMouseLeave:()=>{}})}),[]),[R,W]=useState(0),[L,$]=useState(g),[H,N]=useState(f),[I,de]=useState(n),we=()=>{W(-1),$((0, qa.default)(L).subtract(1,H).toDate());},me=()=>{W(1),$((0, qa.default)(L).add(1,H).toDate());},ke=()=>{W(0),$(new Date);};return useImperativeHandle(e,()=>({previousMonth:we,nextMonth:me,jumpToNow:ke})),jsxs(motion.div,{layout:true,style:{backgroundColor:m.surfaceContainerHigh,borderColor:m.outlineVariant,"--m3-primary":m.primary,"--m3-on-primary":m.onPrimary,"--m3-outline-variant":m.outlineVariant,"--m3-on-surface":m.onSurface,"--m3-on-surface-variant":m.onSurfaceVariant,"--m3-today-highlight":Bh(m.primary,.03)},className:"m3-components-bigcalendar",children:[jsxs("div",{className:"m3-components-bigcalendar-w1",children:[jsx(ch,{date:L,view:H,onViewChange:N,onPrev:we,onNext:me,onToday:ke}),c?c(n):jsx("div",{className:"m3-components-bigcalendar-filterbar-w1",children:n.map(ne=>jsx("button",{onClick:()=>{de(Oe=>Oe.includes(ne)?Oe.filter(De=>De!==ne):[...Oe,ne]);},className:"m3-components-bigcalendar-filterbar-filterchip",style:{backgroundColor:I.includes(ne)?m.onSurface:"transparent",color:I.includes(ne)?m.surface:m.onSurfaceVariant,borderColor:I.includes(ne)?m.onSurface:m.outlineVariant},children:ne},ne))})]}),jsx("div",{style:{backgroundColor:m.outlineVariant},className:"m3-components-bigcalendar-divider"}),jsx("div",{className:"rbc-container-wrapper m3-components-bigcalendar-w2",children:jsx(AnimatePresence,{initial:false,custom:R,mode:"wait",children:jsx(motion.div,{custom:R,variants:P,initial:"enter",animate:"center",exit:"exit",transition:k,className:"m3-components-bigcalendar-viewport",children:jsx(Calendar,{localizer:S,events:E,date:L,view:H,onNavigate:ne=>$(ne),onView:ne=>{(ne==="month"||ne==="week"||ne==="day")&&N(ne);},onSelectEvent:ne=>v?.(ne),toolbar:false,components:V,eventPropGetter:()=>({style:{backgroundColor:"transparent",border:"none",padding:"1px 2px"}})})},L.toISOString())})})]})});/*! Bundled license information:
|
|
5
|
+
|
|
6
|
+
@material/material-color-utilities/utils/math_utils.js:
|
|
7
|
+
@material/material-color-utilities/utils/color_utils.js:
|
|
8
|
+
@material/material-color-utilities/hct/viewing_conditions.js:
|
|
9
|
+
@material/material-color-utilities/hct/cam16.js:
|
|
10
|
+
@material/material-color-utilities/hct/hct_solver.js:
|
|
11
|
+
@material/material-color-utilities/hct/hct.js:
|
|
12
|
+
@material/material-color-utilities/blend/blend.js:
|
|
13
|
+
@material/material-color-utilities/palettes/tonal_palette.js:
|
|
14
|
+
@material/material-color-utilities/palettes/core_palette.js:
|
|
15
|
+
@material/material-color-utilities/quantize/lab_point_provider.js:
|
|
16
|
+
@material/material-color-utilities/quantize/quantizer_wsmeans.js:
|
|
17
|
+
@material/material-color-utilities/quantize/quantizer_map.js:
|
|
18
|
+
@material/material-color-utilities/quantize/quantizer_wu.js:
|
|
19
|
+
@material/material-color-utilities/quantize/quantizer_celebi.js:
|
|
20
|
+
@material/material-color-utilities/scheme/scheme.js:
|
|
21
|
+
@material/material-color-utilities/scheme/scheme_android.js:
|
|
22
|
+
@material/material-color-utilities/score/score.js:
|
|
23
|
+
@material/material-color-utilities/utils/string_utils.js:
|
|
24
|
+
@material/material-color-utilities/utils/image_utils.js:
|
|
25
|
+
@material/material-color-utilities/utils/theme_utils.js:
|
|
26
|
+
@material/material-color-utilities/index.js:
|
|
27
|
+
(**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright 2021 Google LLC
|
|
30
|
+
*
|
|
31
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
32
|
+
* you may not use this file except in compliance with the License.
|
|
33
|
+
* You may obtain a copy of the License at
|
|
34
|
+
*
|
|
35
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
36
|
+
*
|
|
37
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
38
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
39
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
40
|
+
* See the License for the specific language governing permissions and
|
|
41
|
+
* limitations under the License.
|
|
42
|
+
*)
|
|
43
|
+
|
|
44
|
+
@material/material-color-utilities/contrast/contrast.js:
|
|
45
|
+
@material/material-color-utilities/dynamiccolor/dynamic_color.js:
|
|
46
|
+
@material/material-color-utilities/dynamiccolor/variant.js:
|
|
47
|
+
@material/material-color-utilities/dynamiccolor/material_dynamic_colors.js:
|
|
48
|
+
@material/material-color-utilities/dynamiccolor/dynamic_scheme.js:
|
|
49
|
+
@material/material-color-utilities/scheme/scheme_expressive.js:
|
|
50
|
+
@material/material-color-utilities/scheme/scheme_fruit_salad.js:
|
|
51
|
+
@material/material-color-utilities/scheme/scheme_monochrome.js:
|
|
52
|
+
@material/material-color-utilities/scheme/scheme_neutral.js:
|
|
53
|
+
@material/material-color-utilities/scheme/scheme_rainbow.js:
|
|
54
|
+
@material/material-color-utilities/scheme/scheme_tonal_spot.js:
|
|
55
|
+
@material/material-color-utilities/scheme/scheme_vibrant.js:
|
|
56
|
+
(**
|
|
57
|
+
* @license
|
|
58
|
+
* Copyright 2022 Google LLC
|
|
59
|
+
*
|
|
60
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
61
|
+
* you may not use this file except in compliance with the License.
|
|
62
|
+
* You may obtain a copy of the License at
|
|
63
|
+
*
|
|
64
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
65
|
+
*
|
|
66
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
67
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
68
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
69
|
+
* See the License for the specific language governing permissions and
|
|
70
|
+
* limitations under the License.
|
|
71
|
+
*)
|
|
72
|
+
|
|
73
|
+
@material/material-color-utilities/dislike/dislike_analyzer.js:
|
|
74
|
+
@material/material-color-utilities/temperature/temperature_cache.js:
|
|
75
|
+
@material/material-color-utilities/dynamiccolor/contrast_curve.js:
|
|
76
|
+
@material/material-color-utilities/dynamiccolor/tone_delta_pair.js:
|
|
77
|
+
@material/material-color-utilities/scheme/scheme_content.js:
|
|
78
|
+
@material/material-color-utilities/scheme/scheme_fidelity.js:
|
|
79
|
+
(**
|
|
80
|
+
* @license
|
|
81
|
+
* Copyright 2023 Google LLC
|
|
82
|
+
*
|
|
83
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
84
|
+
* you may not use this file except in compliance with the License.
|
|
85
|
+
* You may obtain a copy of the License at
|
|
86
|
+
*
|
|
87
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
88
|
+
*
|
|
89
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
90
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
91
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
92
|
+
* See the License for the specific language governing permissions and
|
|
93
|
+
* limitations under the License.
|
|
94
|
+
*)
|
|
95
|
+
|
|
96
|
+
@material/material-color-utilities/dynamiccolor/color_spec_2021.js:
|
|
97
|
+
@material/material-color-utilities/dynamiccolor/color_spec_2025.js:
|
|
98
|
+
(**
|
|
99
|
+
* @license
|
|
100
|
+
* Copyright 2025 Google LLC
|
|
101
|
+
*
|
|
102
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
103
|
+
* you may not use this file except in compliance with the License.
|
|
104
|
+
* You may obtain a copy of the License at
|
|
105
|
+
*
|
|
106
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
107
|
+
*
|
|
108
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
109
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111
|
+
* See the License for the specific language governing permissions and
|
|
112
|
+
* limitations under the License.
|
|
113
|
+
*)
|
|
114
|
+
*/
|
|
115
|
+
/*! Bundled license information:
|
|
6
116
|
|
|
7
117
|
moment/moment.js:
|
|
8
118
|
(*! moment.js *)
|
|
@@ -119,5 +229,4 @@ moment/moment.js:
|
|
|
119
229
|
* See the License for the specific language governing permissions and
|
|
120
230
|
* limitations under the License.
|
|
121
231
|
*)
|
|
122
|
-
*/export{
|
|
123
|
-
//# sourceMappingURL=index.mjs.map
|
|
232
|
+
*/export{qh as BigCalendar};
|